Bug 843829 - Fix incorrect test. r=mrbkap
☠☠ backed out by e60919ded783 ☠ ☠
authorBobby Holley <bobbyholley@gmail.com>
Tue, 02 Apr 2013 18:51:19 -0700
changeset 127129 97d16e7beb27
parent 127128 6c6ab0e54917
child 127130 2e889cd77a48
push id117
push usertomi.aarnio@nokia.com
push dateWed, 03 Apr 2013 12:07:07 +0000
Bug 843829 - Fix incorrect test. r=mrbkap This wasn't actually testing anything, because |is| is defined in the scope of the content, so by passing the objects as arguments, we end up re-wrapping them in the content scope, where the distinction between waived and non-waived objects doesn't exist. We're actually just about to remove this test in the next patch, but I wanted to make it correct first. :-)
--- a/content/xbl/test/file_bug821850.xhtml
+++ b/content/xbl/test/file_bug821850.xhtml
@@ -39,17 +39,17 @@ https://bugzilla.mozilla.org/show_bug.cg
           var bound = document.getElementById('bound');
           ok(bound, "bound is non-null");
           is(bound.method('baz'), "method:baz", "Xray methods work");
           is(bound.prop, "propVal", "Property Xrays work");
           is(bound.primitiveField, 2, "Field Xrays work");
           is(bound.objectField.bar.a, 1, "Field Xrays work on objects");
           is(bound.contentField.foo, 10, "Field Xrays work on content objects");
           var hole = bound.contentField.rabbit.hole;
-          is(hole.win, window, "We gain back Xray vision when hitting a native object");
+          ok(hole.win === window, "We gain back Xray vision when hitting a native object");
           ok(Cu.isXrayWrapper(hole.win), "Really is Xray");
           // This gets invoked by an event handler.
           window.finish = function() {
             // Content messed with stuff. Make sure we still see the right thing.
             is(bound.method('bay'), "method:bay", "Xray methods work");
             is(bound.wrappedJSObject.method('bay'), "hah", "Xray waived methods work");
             is(bound.prop, "set:someOtherVal", "Xray props work");