_AssertFailure: doh._AssertFailure: assertEqual() failed:
expected
1
but got
0
with hint:
closest('div') length
: assertEqual() failed:
expected
1
but got
0
with hint:
closest('div') length
doh._AssertFailure: assertEqual() failed:
expected
1
but got
0
with hint:
closest('div') length
ERROR IN:
function closest(t){
// test simple selector
var classy = dojo.query("#classy");
var closestDiv = classy.closest("div");
verify(closestDiv, ["third"], "closest('div')");
verify(closestDiv.end().closest(".classy"), ["classy"], "closestDiv.end().closest('.classy')");
// test descendant selector
var bang = dojo.query(".bang");
var closestFooBar = bang.closest(".foo > .bar");
verify(closestFooBar, ["level4"], ".foo > .bar");
// test descendant selector that doesn't match (".foo" alone matches nodes, but not
// ".bogus .foo")
var closestBogusFoo = bang.closest(".bogus .foo");
verify(closestBogusFoo, [], ".bogus .foo");
// positive test that scope argument works: .foo > .bar should match a scope
// of "level2" or above
closestFooBar = bang.closest(".foo > .bar", "level2");
verify(closestFooBar, ["level4"], ".foo > .bar query relative to level2");
// > .bar should match a scope of level3 or level1
var topBar = bang.closest("> .bar", "level3");
verify(topBar, ["level4"], "> .bar query relative to level3");
// negative test that scope argument works: .foo > .bar relative to level3
// doesn't match since .foo is level3, rather than a child of level3
closestFooBar = bang.closest(".foo > .bar", "level3");
verify(closestFooBar, [], ".foo > .bar query relative to level3");
// complex test of multiple elements in NodeList
// Only some of the elements in dojo.query("div") have a ".foo" ancestor,
// and three of those elements have the *same* .foo ancestor, so
// closest(".foo") should result in list of just two elements
var closestFoo = dojo.query("div").closest(".foo");
verify(closestFoo, ["level1", "level3"], ".foo from div");
}
FAILED test: ../../dojo/tests/NodeList-traverse.html::t::closest 2 ms
PASSED test: ../../dojo/tests/NodeList-traverse.html::t::parent 0 ms
_AssertFailure: doh._AssertFailure: assertEqual() failed:
expected
1
but got
0
with hint:
verify length
: assertEqual() failed:
expected
1
but got
0
with hint:
verify length
doh._AssertFailure: assertEqual() failed:
expected
1
but got
0
with hint:
verify length
ERROR IN:
function parents(t){
var classy = dojo.query("#classy");
verify(classy.parents(), ["third", "body", "html"]);
verify(classy.parents(".third"), ["third"]);
verify(classy.parents("body"), ["body"]);
}
FAILED test: ../../dojo/tests/NodeList-traverse.html::t::parents 2 ms
Unless there is a more specific version of Opera 11 that this fails on, this appears to be fixed/working in Dojo trunk on Opera 11.