Bug 1293305 - Part 1.7: Remove already disabled test that uses for-each. r=bholley
authorTooru Fujisawa <arai_a@mac.com>
Mon, 21 Nov 2016 15:03:35 +0900
changeset 323570 f1054bac4d40a67c179b60c068bb0a58cb071b36
parent 323569 933d53cdb6fe0c6b5bd141e4345735c12aca6bf9
child 323571 faf335ab953216b790042988defcf5c416e69cf3
push id30978
push usercbook@mozilla.com
push dateMon, 21 Nov 2016 14:44:46 +0000
treeherdermozilla-central@0534254e9a40 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbholley
bugs1293305
milestone53.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 1293305 - Part 1.7: Remove already disabled test that uses for-each. r=bholley
js/xpconnect/tests/chrome/chrome.ini
js/xpconnect/tests/chrome/test_wrappers-2.xul
--- a/js/xpconnect/tests/chrome/chrome.ini
+++ b/js/xpconnect/tests/chrome/chrome.ini
@@ -108,12 +108,9 @@ skip-if = os == 'win' || os == 'mac' # b
 [test_scriptSettings.xul]
 [test_watchpoints.xul]
 [test_weakmap_keys_preserved.xul]
 [test_weakmap_keys_preserved2.xul]
 [test_weakmaps.xul]
 [test_weakref.xul]
 [test_windowProxyDeadWrapper.html]
 [test_wrappers.xul]
-[test_wrappers-2.xul]
-# Disabled until this test gets updated to test the new proxy based wrappers.
-skip-if = true
 [test_xrayToJS.xul]
deleted file mode 100644
--- a/js/xpconnect/tests/chrome/test_wrappers-2.xul
+++ /dev/null
@@ -1,215 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css"
-                 type="text/css"?>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=500931
--->
-<window title="Mozilla Bug 500931"
-  xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-  <script type="application/javascript"
-          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-
-  <!-- test results are displayed in the html:body -->
-  <body xmlns="http://www.w3.org/1999/xhtml">
-  <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=403005"
-     target="_blank">Mozilla Bug 403005</a>
-  <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=409298"
-     target="_blank">Mozilla Bug 409298</a>
-  </body>
-
-  <!-- test code goes here -->
-  <script type="application/javascript"><![CDATA[
-
-    /** Test for Bug 403005 and 409298 **/
-
-  SimpleTest.waitForExplicitFinish();
-
-  function go()
-  {
-    ok(window instanceof Object, "window is instanceof Object");
-
-    let wrap = $('ifr').contentWindow.wrappedJSObject;
-    ok(!('obj' in XPCNativeWrapper(wrap)), "XPCNativeWrapper constructor works");
-    let iwin = $('ifr').contentWindow;
-    is(iwin.document.ELEMENT_NODE, 1, 'constants work through XrayWrapper');
-    is(iwin.document.nodeName, "#document", 'attributes work through XrayWrappe
-
-    location.foopy = 3;
-
-    var xow_answer = [];
-    for (let i in location)
-        xow_answer.push(i);
-
-    var xpcnw_answer = [];
-    var xpcnw = new XPCNativeWrapper(location);
-    xpcnw.barpy = 4;
-    for (let i in xpcnw)
-        xpcnw_answer.push(i);
-
-    var expected = [
-        "hash",
-        "host",
-        "hostname",
-        "href",
-        "pathname",
-        "port",
-        "protocol",
-        "search",
-        "reload",
-        "replace",
-        "assign",
-        "foopy"
-    ];
-
-    var xpcnw_expected = expected.slice(0, expected.length - 1);
-    xpcnw_expected.push("barpy");
-
-    is(xow_answer.sort().toString(),
-       expected.sort().toString(),
-       'enumeration over XOWs walks the prototype chain');
-
-    is(xpcnw_answer.sort().toString(),
-       xpcnw_expected.sort().toString(),
-       'enumeration over XPCNWs walks the prototype chain');
-
-    var for_each_expected = [];
-    for each (let i in new XPCNativeWrapper(location))
-        for_each_expected.push(typeof i);
-
-    var for_each_answer = [];
-    for each (let i in Iterator(new XPCNativeWrapper(location)))
-        for_each_answer.push(typeof i);
-
-    is(for_each_answer.sort().toString(),
-       for_each_expected.sort().toString(),
-       'wrapper iterators are properly iterators');
-
-    let sjow_answer = [];
-    let (obj = { a: 3, next:1 }) {
-        for (let i in wrap.to_iterate)
-            sjow_answer.push(i);
-        is(sjow_answer.sort().toString(), ['a', 'next'].sort().toString(),
-           'enumeration over SJOWs walks the prototype chain');
-    }
-
-    sjow_answer = [];
-    for (let i in wrap.location)
-        sjow_answer.push(i);
-
-    is(sjow_answer.sort().toString(),
-       expected.sort().toString(),
-       'enumeration over SJOWs walks the prototype chain and works over XOWs');
-
-    for (let i in wrap.enumerate) {
-        is(typeof i, "string", "enumeration on wrappers only returns strings");
-    }
-
-    isnot(wrap, new XPCNativeWrapper(iwin),
-         'SJOWs equality hook returns false correctly against XPCNW');
-
-    is(typeof(wrap.func), 'function',
-       'SJOWs look like functions when they wrap functions');
-    is(typeof(wrap.o), 'object',
-       'SJOWs look like objects when they wrap objects');
-    ok(wrap.o === wrap.o,
-       "Identity holds when accessing the same object twice");
-
-    var origProto = iwin.__proto__;
-    try {
-        iwin.__proto__ = iwin;
-        ok(false, 'cyclic proto value allowed');
-        iwin.__proto__ = origProto;
-    } catch (e) {
-        is(e.toString(),
-           'TypeError: cyclic __proto__ value',
-           'throw the right exception for a cyclic proto');
-        is(iwin.__proto__, origProto, 'reset __proto__ after a cyclic proto');
-    }
-
-    try {
-        is('PASS', iwin.eval("'PASS'"), 'iwin.eval throws an exception');
-    } catch (e) {
-        ok(false, 'iwin.eval does not throw an exception');
-    }
-
-    try {
-        new XPCNativeWrapper("");
-        ok(false, "How did we construct a wrapper around a primitive?");
-    } catch (e) {
-        ok(true, "Unable to new XPCNativeWrapper(primitive)");
-    }
-
-    try {
-        is(XPCNativeWrapper(""), "", "XPCNativeWrapper as a function allows primitives");
-    } catch (e) {
-        ok(false, "Unable to wrap a primitive, even without 'new'");
-    }
-
-    // Some tests for SJOWs too.
-    isnot(wrap.document.body != document.body, "body should not be the same");
-
-    XPCNativeWrapper.prototype = {};
-    let (w = new XPCNativeWrapper(iwin)) {
-        ok(iwin.location, "able to set XPCNativeWrapper.prototype and do stuff with it");
-    }
-
-    is(new XPCNativeWrapper(iwin, Window).closed, false,
-       "able to wrap a window in a window XPCNativeWrapper");
-    try {
-        new XPCNativeWrapper(document, Window);
-        todo(false, "Able to wrap a document in a Window XPCNativeWrapper?")
-    } catch (e) {
-        ok(/ILLEGAL_VALUE/(e), "not able to wrap a document in a Window XPCNativeWrapper");
-    }
-
-    let (w = new XPCNativeWrapper($('ifr').contentWindow)) {
-        w.foopybar = 5;
-        ok(!("foopybar" in iwin), "XPCNativeWrappers allow expandos through");
-        is(w.foopybar, 5, "can set expandos on XPCNativeWrappers, though");
-
-        ok(delete w.foopybar, "deleting properties returns true correctly");
-        ok(!("foopybar" in w), "Can delete properties from XPCNativeWrappers");
-
-        is(w.window, iwin, "w.window exists and is the window");
-        ok(delete w.iwin, "can delete builtin properties");
-        is(w.window, iwin, "w.window is automatically recreated");
-
-        iwin.foopy = 5;
-        ok(delete w.foopy, "delete returns true");
-        is(iwin.foopy, 5, "delete doesn't delete underlying properties");
-        ok(delete iwin.foopy, "can delete window.foopy");
-        ok(!("foopy" in iwin), "foopy is no longer in window");
-    }
-
-    try {
-      is((function(x) { return x+1; }).apply(this, wrap.a), 2,
-         "able to call apply with an XPCSafeJSObjectWrapped array");
-    } catch (e) {
-        ok(false,
-           "Unable to call apply() with a XPCSafeJSObjectWrapped array");
-    }
-
-    try {
-        iwin.__proto__ = null;
-        is(iwin.__proto__, null,
-           "allowed to update iwin.__proto__ to null");
-    } catch (e) {
-        ok(false, "some crazy exception was thrown");
-    }
-
-    try {
-        new XPCSafeJSObjectWrapped(<x />).foo;
-        ok(false, "Allowed to wrap E4X in SJOWs?");
-    } catch (e) {
-    }
-
-    SimpleTest.finish();
-  }
-  ]]></script>
-  <iframe type="content"
-          src="http://mochi.test:8888/tests/js/xpconnect/tests/mochitest/file_wrappers-2.html"
-          onload="go()"
-          id="ifr">
-  </iframe>
-</window>