White space cleanup
This commit is contained in:
parent
f0888ac7bd
commit
f9b358331e
1 changed files with 81 additions and 81 deletions
|
|
@ -399,52 +399,52 @@ o.spec("route", function() {
|
||||||
})
|
})
|
||||||
|
|
||||||
o("onmatch can redirect to another route", function(done) {
|
o("onmatch can redirect to another route", function(done) {
|
||||||
var redirected = false
|
var redirected = false
|
||||||
|
|
||||||
$window.location.href = prefix + "/"
|
$window.location.href = prefix + "/"
|
||||||
route(root, "/a", {
|
route(root, "/a", {
|
||||||
"/a" : {
|
"/a" : {
|
||||||
onmatch: function() {
|
onmatch: function() {
|
||||||
route.set("/b")
|
route.set("/b")
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/b" : {
|
"/b" : {
|
||||||
view: function(vnode){
|
view: function(vnode){
|
||||||
redirected = true
|
redirected = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
o(redirected).equals(true)
|
o(redirected).equals(true)
|
||||||
|
|
||||||
done()
|
done()
|
||||||
}, FRAME_BUDGET)
|
}, FRAME_BUDGET)
|
||||||
})
|
})
|
||||||
|
|
||||||
o("onmatch can redirect to another route that has RouteResolver", function(done) {
|
o("onmatch can redirect to another route that has RouteResolver", function(done) {
|
||||||
var redirected = false
|
var redirected = false
|
||||||
|
|
||||||
$window.location.href = prefix + "/"
|
$window.location.href = prefix + "/"
|
||||||
route(root, "/a", {
|
route(root, "/a", {
|
||||||
"/a" : {
|
"/a" : {
|
||||||
onmatch: function() {
|
onmatch: function() {
|
||||||
route.set("/b")
|
route.set("/b")
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/b" : {
|
"/b" : {
|
||||||
render: function(vnode){
|
render: function(vnode){
|
||||||
redirected = true
|
redirected = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
o(redirected).equals(true)
|
o(redirected).equals(true)
|
||||||
|
|
||||||
done()
|
done()
|
||||||
}, FRAME_BUDGET)
|
}, FRAME_BUDGET)
|
||||||
})
|
})
|
||||||
|
|
||||||
o("onmatch resolution callback resolves at most once", function(done) {
|
o("onmatch resolution callback resolves at most once", function(done) {
|
||||||
var resolveCount = 0
|
var resolveCount = 0
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue