mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-14 20:22:00 +00:00
Minor tweaks, mostly to use isnot()
This commit is contained in:
parent
82c1df0239
commit
9e09938936
@ -33,13 +33,12 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=339494
|
||||
{
|
||||
ok(!d.hasAttribute("hhh"), "Value check 1",
|
||||
"There should be no value");
|
||||
ok(d.getAttribute("hhh") != "testvalue", "Value check 2",
|
||||
"Value should not be old value");
|
||||
isnot(d.getAttribute("hhh"), "testvalue", "Value check 2");
|
||||
document.removeEventListener("DOMAttrModified", removeItAgain, false);
|
||||
d.removeAttribute("hhh");
|
||||
ok(true, "Reachability", "We shouldn't have crashed");
|
||||
}
|
||||
|
||||
|
||||
var s = document.getElementById("s");
|
||||
|
||||
s.setAttribute("ggg", "testvalue");
|
||||
@ -52,10 +51,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=339494
|
||||
{
|
||||
ok(s.hasAttribute("ggg"), "Value check 3",
|
||||
"There should be a value");
|
||||
ok(s.getAttribute("ggg") != "testvalue", "Value check 4",
|
||||
"Value should not be old value");
|
||||
ok(s.getAttribute("ggg") == "othervalue", "Value check 5",
|
||||
"Value should be newvalue");
|
||||
isnot(s.getAttribute("ggg"), "testvalue", "Value check 4");
|
||||
is(s.getAttribute("ggg"), "othervalue", "Value check 5");
|
||||
}
|
||||
|
||||
</script>
|
||||
|
@ -32,13 +32,12 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=339494
|
||||
{
|
||||
ok(!d.hasAttribute("hhh"), "Value check 1",
|
||||
"There should be no value");
|
||||
ok(d.getAttribute("hhh") != "testvalue", "Value check 2",
|
||||
"Value should not be old value");
|
||||
isnot(d.getAttribute("hhh"), "testvalue", "Value check 2");
|
||||
document.removeEventListener("DOMAttrModified", removeItAgain, false);
|
||||
// d.removeAttribute("hhh");
|
||||
d.removeAttribute("hhh");
|
||||
ok(true, "Reachability", "We shouldn't have crashed");
|
||||
}
|
||||
|
||||
|
||||
var s = document.getElementById("s");
|
||||
|
||||
s.setAttribute("ggg", "testvalue");
|
||||
@ -51,10 +50,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=339494
|
||||
{
|
||||
ok(s.hasAttribute("ggg"), "Value check 3",
|
||||
"There should be a value");
|
||||
ok(s.getAttribute("ggg") != "testvalue", "Value check 4",
|
||||
"Value should not be old value");
|
||||
ok(s.getAttribute("ggg") == "othervalue", "Value check 5",
|
||||
"Value should be newvalue");
|
||||
isnot(s.getAttribute("ggg"), "testvalue", "Value check 4");
|
||||
is(s.getAttribute("ggg"), "othervalue", "Value check 5");
|
||||
}
|
||||
|
||||
</script>
|
||||
|
@ -40,8 +40,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=339494
|
||||
{
|
||||
ok(!d.hasAttribute("hhh"), "Value check 1",
|
||||
"There should be no value");
|
||||
ok(d.getAttribute("hhh") != "testvalue", "Value check 2",
|
||||
"Value should not be old value");
|
||||
isnot(d.getAttribute("hhh"), "testvalue", "Value check 2");
|
||||
document.removeEventListener("DOMAttrModified", removeItAgain, false);
|
||||
d.removeAttribute("hhh");
|
||||
ok(true, "Reachability", "We shouldn't have crashed");
|
||||
@ -59,10 +58,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=339494
|
||||
{
|
||||
ok(s.hasAttribute("ggg"), "Value check 3",
|
||||
"There should be a value");
|
||||
ok(s.getAttribute("ggg") != "testvalue", "Value check 4",
|
||||
"Value should not be old value");
|
||||
ok(s.getAttribute("ggg") == "othervalue", "Value check 5",
|
||||
"Value should be newvalue");
|
||||
isnot(s.getAttribute("ggg"), "testvalue", "Value check 4");
|
||||
is(s.getAttribute("ggg"), "othervalue", "Value check 5");
|
||||
}
|
||||
|
||||
</script>
|
||||
|
@ -23,8 +23,7 @@ function runTest() {
|
||||
var span = document.createElement("span");
|
||||
$("test").insertBefore(span, $("test").firstChild);
|
||||
ok(true, "Reachability", "We should get here without crashing");
|
||||
ok($("test").firstChild === span, "First child is correct",
|
||||
"First child should be the node we inserted");
|
||||
is($("test").firstChild, span, "First child is correct");
|
||||
}
|
||||
</script>
|
||||
<div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user