Bug 1253016 - Fix a DOM test that uses legacy define behavior. r=bz
authorTom Schuster <evilpies@gmail.com>
Sat, 12 Mar 2016 15:02:12 +0100
changeset 288424 7b19afd04625747ba9918b8f7a0bab85d985435b
parent 288423 16b05a0fb83aa8a444d6afe0942291627c500960
child 288425 711999c346bf91efc38436872b6b5f98dd436d30
push id30079
push userryanvm@gmail.com
push dateSat, 12 Mar 2016 20:24:19 +0000
treeherdermozilla-central@d1d47ba19ce9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs1253016
milestone48.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1253016 - Fix a DOM test that uses legacy define behavior. r=bz
dom/tests/mochitest/bugs/test_bug541530.html
--- a/dom/tests/mochitest/bugs/test_bug541530.html
+++ b/dom/tests/mochitest/bugs/test_bug541530.html
@@ -22,19 +22,18 @@ window = {};
 var origLocation = location;
 
 ok(window === orig, "can't override window");
 ok(window.location === location, "properties are properly aliased");
 ok(document.location === location, "properties are properly aliased");
 
 var canDefine = false;
 try {
-    var foo;
-    this.__defineGetter__.call(foo, 'bar', function() {});
-    this.__defineSetter__.call(foo, 'bar', function() {});
+    this.__defineGetter__.call(this, 'bar', function() {});
+    this.__defineSetter__.call(this, 'bar', function() {});
     canDefine = true;
 } catch (e) {}
 ok(canDefine, "Should have access to __defineGetter__ and __defineSetter__");
 
 try {
     this.__defineGetter__('window', function() {});
     ok(false, "should not be able to defineGetter(window)");
 } catch (e) {