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) {
|
||||
var redirected = false
|
||||
var redirected = false
|
||||
|
||||
$window.location.href = prefix + "/"
|
||||
route(root, "/a", {
|
||||
"/a" : {
|
||||
onmatch: function() {
|
||||
route.set("/b")
|
||||
}
|
||||
},
|
||||
"/b" : {
|
||||
view: function(vnode){
|
||||
redirected = true
|
||||
}
|
||||
}
|
||||
})
|
||||
$window.location.href = prefix + "/"
|
||||
route(root, "/a", {
|
||||
"/a" : {
|
||||
onmatch: function() {
|
||||
route.set("/b")
|
||||
}
|
||||
},
|
||||
"/b" : {
|
||||
view: function(vnode){
|
||||
redirected = true
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
setTimeout(function() {
|
||||
o(redirected).equals(true)
|
||||
setTimeout(function() {
|
||||
o(redirected).equals(true)
|
||||
|
||||
done()
|
||||
}, FRAME_BUDGET)
|
||||
})
|
||||
done()
|
||||
}, FRAME_BUDGET)
|
||||
})
|
||||
|
||||
o("onmatch can redirect to another route that has RouteResolver", function(done) {
|
||||
var redirected = false
|
||||
var redirected = false
|
||||
|
||||
$window.location.href = prefix + "/"
|
||||
route(root, "/a", {
|
||||
"/a" : {
|
||||
onmatch: function() {
|
||||
route.set("/b")
|
||||
}
|
||||
},
|
||||
"/b" : {
|
||||
render: function(vnode){
|
||||
redirected = true
|
||||
}
|
||||
}
|
||||
})
|
||||
$window.location.href = prefix + "/"
|
||||
route(root, "/a", {
|
||||
"/a" : {
|
||||
onmatch: function() {
|
||||
route.set("/b")
|
||||
}
|
||||
},
|
||||
"/b" : {
|
||||
render: function(vnode){
|
||||
redirected = true
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
setTimeout(function() {
|
||||
o(redirected).equals(true)
|
||||
setTimeout(function() {
|
||||
o(redirected).equals(true)
|
||||
|
||||
done()
|
||||
}, FRAME_BUDGET)
|
||||
})
|
||||
done()
|
||||
}, FRAME_BUDGET)
|
||||
})
|
||||
|
||||
o("onmatch resolution callback resolves at most once", function(done) {
|
||||
var resolveCount = 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue