Bug 1153516. Stop using loose is() comparisons in test_dom_xrays.html. r=bholley

This commit is contained in:
Boris Zbarsky 2015-04-13 19:36:44 -04:00
parent 6c598883d1
commit 5c0ebc7a8f

View File

@ -39,9 +39,9 @@ function checkXrayProperty(obj, name, values)
var pd = Object.getOwnPropertyDescriptor(obj, name);
ok(pd, "getOwnPropertyDescriptor should see \"" + name + "\" through Xrays");
if (pd && pd.get) {
is(pd.get.call(instance), value, "Should get the right value for \"" + name + "\" through Xrays");
ise(pd.get.call(instance), value, "Should get the right value for \"" + name + "\" through Xrays");
} else {
is(obj[name], value, "Should get the right value for \"" + name + "\" through Xrays");
ise(obj[name], value, "Should get the right value for \"" + name + "\" through Xrays");
}
if (pd && pd.enumerable) {
ok(Object.keys(obj).indexOf("" + name) > -1, "Enumerating the Xray should return \"" + name + "\"");
@ -104,7 +104,9 @@ function test()
// HTMLDocument
// Unforgeable properties live on the instance.
checkXrayProperty(doc, "location", [ document.getElementById("t").src ]);
checkXrayProperty(doc, "location", [ win.location ]);
ise(String(win.location), document.getElementById("t").src,
"Should have the right stringification");
// HTMLHtmlElement
var elem = doc.documentElement;