Bug 638054 - Remove or fix tests outside JS using watch/unwatch. r=bz,fitzgen
authorTom Schuster <evilpies@gmail.com>
Tue, 24 Oct 2017 20:48:14 +0200
changeset 387886 a124f4901430f6db74cfc7fe3b07957a1c691b40
parent 387885 31bc65f1acab36ec5abbb9b29974e279b622dff6
child 388032 ef024b6a452b77fb399a654f90fdb35aa8e61c64
child 388063 ec25214fbc5c67477c4e5a9edfd69215c9c3002e
push id32738
push userarchaeopteryx@coole-files.de
push dateTue, 24 Oct 2017 21:58:00 +0000
treeherdermozilla-central@a124f4901430 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz, fitzgen
bugs638054
milestone58.0a1
first release with
nightly linux32
a124f4901430 / 58.0a1 / 20171024220325 / files
nightly linux64
a124f4901430 / 58.0a1 / 20171024220325 / files
nightly mac
a124f4901430 / 58.0a1 / 20171024220325 / files
nightly win32
a124f4901430 / 58.0a1 / 20171024220325 / files
nightly win64
a124f4901430 / 58.0a1 / 20171024220325 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 638054 - Remove or fix tests outside JS using watch/unwatch. r=bz,fitzgen
devtools/client/webconsole/test/browser_webconsole_bug_585991_autocomplete_keys.js
dom/bindings/test/test_Object.prototype_props.html
dom/html/test/mochitest.ini
dom/html/test/test_document.watch.html
dom/svg/crashtests/880544-1.svg
dom/svg/crashtests/880544-2.svg
dom/svg/crashtests/880544-3.svg
dom/svg/crashtests/880544-4.svg
dom/svg/crashtests/880544-5.svg
dom/svg/crashtests/crashtests.list
dom/tests/mochitest/bugs/iframe_bug38959-1.html
dom/tests/mochitest/bugs/iframe_bug38959-2.html
dom/tests/mochitest/bugs/mochitest.ini
dom/tests/mochitest/bugs/test_bug38959.html
js/xpconnect/tests/chrome/chrome.ini
js/xpconnect/tests/chrome/test_watchpoints.xul
js/xpconnect/tests/chrome/test_xrayToJS.xul
--- a/devtools/client/webconsole/test/browser_webconsole_bug_585991_autocomplete_keys.js
+++ b/devtools/client/webconsole/test/browser_webconsole_bug_585991_autocomplete_keys.js
@@ -52,18 +52,18 @@ var consoleOpened = Task.async(function*
   ok(!popup.isOpen, "popup is not open");
 
   popup.once("popup-opened", () => {
     ok(popup.isOpen, "popup is open");
 
     // 4 values, and the following properties:
     // __defineGetter__  __defineSetter__ __lookupGetter__ __lookupSetter__
     // __proto__ hasOwnProperty isPrototypeOf propertyIsEnumerable
-    // toLocaleString toString toSource unwatch valueOf watch constructor.
-    is(popup.itemCount, 19, "popup.itemCount is correct");
+    // toLocaleString toString toSource valueOfconstructor.
+    is(popup.itemCount, 17, "popup.itemCount is correct");
 
     let sameItems = popup.getItems().reverse().map(function (e) {
       return e.label;
     });
 
     ok(sameItems.every(function (prop, index) {
       return [
         "__defineGetter__",
@@ -77,62 +77,60 @@ var consoleOpened = Task.async(function*
         "item0",
         "item1",
         "item2",
         "item3",
         "propertyIsEnumerable",
         "toLocaleString",
         "toSource",
         "toString",
-        "unwatch",
         "valueOf",
-        "watch",
       ][index] === prop;
     }), "getItems returns the items we expect");
 
-    is(popup.selectedIndex, 18,
+    is(popup.selectedIndex, 16,
        "Index of the first item from bottom is selected.");
     EventUtils.synthesizeKey("VK_DOWN", {});
 
     let prefix = jsterm.getInputValue().replace(/[\S]/g, " ");
 
     is(popup.selectedIndex, 0, "index 0 is selected");
-    is(popup.selectedItem.label, "watch", "watch is selected");
-    is(completeNode.value, prefix + "watch",
-        "completeNode.value holds watch");
+    is(popup.selectedItem.label, "valueOf", "valueOf is selected");
+    is(completeNode.value, prefix + "valueOf",
+        "completeNode.value holds valueOf");
 
     EventUtils.synthesizeKey("VK_DOWN", {});
 
     is(popup.selectedIndex, 1, "index 1 is selected");
-    is(popup.selectedItem.label, "valueOf", "valueOf is selected");
-    is(completeNode.value, prefix + "valueOf",
-        "completeNode.value holds valueOf");
+    is(popup.selectedItem.label, "toString", "toString is selected");
+    is(completeNode.value, prefix + "toString",
+        "completeNode.value holds toString");
 
     EventUtils.synthesizeKey("VK_UP", {});
 
     is(popup.selectedIndex, 0, "index 0 is selected");
-    is(popup.selectedItem.label, "watch", "watch is selected");
-    is(completeNode.value, prefix + "watch",
-        "completeNode.value holds watch");
+    is(popup.selectedItem.label, "valueOf", "valueOf is selected");
+    is(completeNode.value, prefix + "valueOf",
+        "completeNode.value holds valueOf");
 
     let currentSelectionIndex = popup.selectedIndex;
 
     EventUtils.synthesizeKey("VK_PAGE_DOWN", {});
 
     ok(popup.selectedIndex > currentSelectionIndex,
       "Index is greater after PGDN");
 
     currentSelectionIndex = popup.selectedIndex;
     EventUtils.synthesizeKey("VK_PAGE_UP", {});
 
     ok(popup.selectedIndex < currentSelectionIndex,
        "Index is less after Page UP");
 
     EventUtils.synthesizeKey("VK_END", {});
-    is(popup.selectedIndex, 18, "index is last after End");
+    is(popup.selectedIndex, 16, "index is last after End");
 
     EventUtils.synthesizeKey("VK_HOME", {});
     is(popup.selectedIndex, 0, "index is first after Home");
 
     info("press Tab and wait for popup to hide");
     popup.once("popup-closed", () => {
       deferred.resolve();
     });
@@ -146,35 +144,35 @@ var consoleOpened = Task.async(function*
 });
 
 function popupHideAfterTab() {
   let deferred = defer();
 
   // At this point the completion suggestion should be accepted.
   ok(!popup.isOpen, "popup is not open");
 
-  is(jsterm.getInputValue(), "window.foobarBug585991.watch",
+  is(jsterm.getInputValue(), "window.foobarBug585991.valueOf",
      "completion was successful after VK_TAB");
 
   ok(!completeNode.value, "completeNode is empty");
 
   popup.once("popup-opened", function onShown() {
     ok(popup.isOpen, "popup is open");
 
-    is(popup.itemCount, 19, "popup.itemCount is correct");
+    is(popup.itemCount, 17, "popup.itemCount is correct");
 
-    is(popup.selectedIndex, 18, "First index from bottom is selected");
+    is(popup.selectedIndex, 16, "First index from bottom is selected");
     EventUtils.synthesizeKey("VK_DOWN", {});
 
     let prefix = jsterm.getInputValue().replace(/[\S]/g, " ");
 
     is(popup.selectedIndex, 0, "index 0 is selected");
-    is(popup.selectedItem.label, "watch", "watch is selected");
-    is(completeNode.value, prefix + "watch",
-        "completeNode.value holds watch");
+    is(popup.selectedItem.label, "valueOf", "valueOf is selected");
+    is(completeNode.value, prefix + "valueOf",
+        "completeNode.value holds valueOf");
 
     popup.once("popup-closed", function onHidden() {
       ok(!popup.isOpen, "popup is not open after VK_ESCAPE");
 
       is(jsterm.getInputValue(), "window.foobarBug585991.",
          "completion was cancelled");
 
       ok(!completeNode.value, "completeNode is empty");
@@ -198,39 +196,39 @@ function popupHideAfterTab() {
 }
 
 function testReturnKey() {
   let deferred = defer();
 
   popup.once("popup-opened", function onShown() {
     ok(popup.isOpen, "popup is open");
 
-    is(popup.itemCount, 19, "popup.itemCount is correct");
+    is(popup.itemCount, 17, "popup.itemCount is correct");
 
-    is(popup.selectedIndex, 18, "First index from bottom is selected");
+    is(popup.selectedIndex, 16, "First index from bottom is selected");
     EventUtils.synthesizeKey("VK_DOWN", {});
 
     let prefix = jsterm.getInputValue().replace(/[\S]/g, " ");
 
     is(popup.selectedIndex, 0, "index 0 is selected");
-    is(popup.selectedItem.label, "watch", "watch is selected");
-    is(completeNode.value, prefix + "watch",
-        "completeNode.value holds watch");
+    is(popup.selectedItem.label, "valueOf", "valueOf is selected");
+    is(completeNode.value, prefix + "valueOf",
+        "completeNode.value holds valueOf");
 
     EventUtils.synthesizeKey("VK_DOWN", {});
 
     is(popup.selectedIndex, 1, "index 1 is selected");
-    is(popup.selectedItem.label, "valueOf", "valueOf is selected");
-    is(completeNode.value, prefix + "valueOf",
-       "completeNode.value holds valueOf");
+    is(popup.selectedItem.label, "toString", "toString is selected");
+    is(completeNode.value, prefix + "toString",
+       "completeNode.value holds toString");
 
     popup.once("popup-closed", function onHidden() {
       ok(!popup.isOpen, "popup is not open after VK_RETURN");
 
-      is(jsterm.getInputValue(), "window.foobarBug585991.valueOf",
+      is(jsterm.getInputValue(), "window.foobarBug585991.toString",
          "completion was successful after VK_RETURN");
 
       ok(!completeNode.value, "completeNode is empty");
 
       deferred.resolve();
     }, false);
 
     info("press Return to accept suggestion. wait for popup to hide");
--- a/dom/bindings/test/test_Object.prototype_props.html
+++ b/dom/bindings/test/test_Object.prototype_props.html
@@ -6,15 +6,15 @@
 <div id="log"></div>
 <script>
 test(function() {
   var props = Object.getOwnPropertyNames(Object.prototype);
   // If you change this list, make sure it continues to match the list in
   // Codegen.py's CGDictionary.getMemberDefinition method.
   var expected = [
       "constructor", "toSource", "toString", "toLocaleString", "valueOf",
-      "watch", "unwatch", "hasOwnProperty", "isPrototypeOf",
-      "propertyIsEnumerable", "__defineGetter__", "__defineSetter__",
-      "__lookupGetter__", "__lookupSetter__", "__proto__"
+      "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable",
+      "__defineGetter__", "__defineSetter__", "__lookupGetter__",
+      "__lookupSetter__", "__proto__"
     ];
   assert_array_equals(props.sort(), expected.sort());
 }, "Own properties of Object.prototype");
 </script>
--- a/dom/html/test/mochitest.ini
+++ b/dom/html/test/mochitest.ini
@@ -541,17 +541,16 @@ skip-if = toolkit == "android" || toolki
 [test_bug403868.xhtml]
 [test_bug435128.html]
 skip-if = true # Disabled for timeouts.
 [test_bug463104.html]
 [test_form-parsing.html]
 [test_viewport.html]
 [test_documentAll.html]
 [test_document-element-inserted.html]
-[test_document.watch.html]
 [test_bug445004.html]
 skip-if = true || toolkit == 'android' # Disabled permanently (bug 559932).
 [test_bug446483.html]
 skip-if = toolkit == 'android'
 [test_bug448564.html]
 [test_bug478251.html]
 [test_bug481440.html]
 [test_bug481647.html]
deleted file mode 100644
--- a/dom/html/test/test_document.watch.html
+++ /dev/null
@@ -1,129 +0,0 @@
-<!DOCTYPE html>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=903332
--->
-<head>
-  <meta charset="utf-8">
-  <title>Test for Bug 903332</title>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-  <script type="application/javascript">
-
-  /** Test for Bug 903332 **/
-
-  var watch1Called;
-  function watch1(prop, oldValue, newValue)
-  {
-    is(watch1Called, false, "watch1Called not reset properly?");
-    watch1Called = true;
-
-    is(prop, "cookie", "wrong property name passed to watch1");
-    return newValue;
-  }
-
-  var watch2Called;
-  function watch2(prop, oldValue, newValue)
-  {
-    is(watch2Called, false, "watch2Called not reset properly?");
-    watch2Called = true;
-
-    is(prop, "cookie", "wrong property name passed to watch2");
-    return newValue;
-  }
-
-  // Just in case subsequent tests depend on a particular value...
-  var originalValue = document.cookie;
-  ok(true, "originalValue: " + originalValue);
-
-  var originalPrefix = originalValue.length > 0 ? originalValue + "; " : "";
-
-  try
-  {
-    // trial set (no watch) to verify things work
-    document.cookie = "first=set";
-    is(document.cookie, originalPrefix + "first=set",
-       "first value correct");
-
-    // add a watch
-    document.watch("cookie", watch1);
-
-    // set, check for watch invoked
-    watch1Called = false;
-    document.cookie = "second=set";
-    is(watch1Called, true, "watch1 function should be called");
-    is(document.cookie, originalPrefix + "first=set; second=set",
-       "second value correct");
-
-    // and a second time, just in case
-    watch1Called = false;
-    document.cookie = "third=set";
-    is(watch1Called, true, "watch1 function should be called");
-    is(document.cookie, originalPrefix + "first=set; second=set; third=set",
-       "third value correct");
-
-    // overwrite the current watch with a new one
-    document.watch("cookie", watch2);
-
-    // set, check for watch invoked
-    watch1Called = false;
-    watch2Called = false;
-    document.cookie = "fourth=set";
-    is(watch1Called, false, "watch1 invoked erroneously");
-    is(watch2Called, true, "watch2 function should be called");
-    is(document.cookie, originalPrefix + "first=set; second=set; third=set; fourth=set",
-       "fourth value correct");
-
-    // and a second time, just in case
-    watch1Called = false;
-    watch2Called = false;
-    document.cookie = "fifth=set";
-    is(watch1Called, false, "watch1 invoked erroneously");
-    is(watch2Called, true, "watch2 function should be called");
-    is(document.cookie, originalPrefix + "first=set; second=set; third=set; fourth=set; fifth=set",
-       "fifth value correct");
-
-    // remove the watch
-    document.unwatch("cookie");
-
-    // check for non-invocation now
-    watch1Called = false;
-    watch2Called = false;
-    document.cookie = "sixth=set";
-    is(watch1Called, false, "watch1 shouldn't be called");
-    is(watch2Called, false, "watch2 shouldn't be called");
-    is(document.cookie, originalPrefix + "first=set; second=set; third=set; fourth=set; fifth=set; sixth=set",
-       "sixth value correct");
-  }
-  finally
-  {
-    // reset
-    document.unwatch("cookie"); // harmless, should be no-op except if bugs
-
-    var d = new Date();
-    d.setTime(0);
-    var suffix = "=; expires=" + d.toGMTString();
-
-    document.cookie = "first" + suffix;
-    document.cookie = "second" + suffix;
-    document.cookie = "third" + suffix;
-    document.cookie = "fourth" + suffix;
-    document.cookie = "fifth" + suffix;
-    document.cookie = "sixth" + suffix;
-  }
-
-  is(document.cookie, originalValue,
-     "document.cookie isn't what it was initially!  expect bustage further " +
-     "down the line");
-  </script>
-</head>
-<body>
-<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=903332">Mozilla Bug 903332</a>
-<p id="display"></p>
-<div id="content" style="display: none">
-
-</div>
-<pre id="test">
-</pre>
-</body>
-</html>
deleted file mode 100644
--- a/dom/svg/crashtests/880544-1.svg
+++ /dev/null
@@ -1,15 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg">
-  <script>//<![CDATA[
-
-function add_watch()
-{
-  document.getElementById("p").transform.baseVal.watch("0", function(){});
-}
-
-window.addEventListener("load", add_watch, false);
-
-  //]]></script>
-
-  <path id="p" transform="scale(1)" />
-
-</svg>
deleted file mode 100644
--- a/dom/svg/crashtests/880544-2.svg
+++ /dev/null
@@ -1,15 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg">
-  <script>//<![CDATA[
-
-function add_watch()
-{
-  document.getElementById("e").x.baseVal.watch("0", function(){});
-}
-
-window.addEventListener("load", add_watch, false);
-
-  //]]></script>
-
-  <text id="e" x="10">foo</text>
-
-</svg>
deleted file mode 100644
--- a/dom/svg/crashtests/880544-3.svg
+++ /dev/null
@@ -1,15 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg">
-  <script>//<![CDATA[
-
-function add_watch()
-{
-  document.getElementById("e").rotate.baseVal.watch("0", function(){});
-}
-
-window.addEventListener("load", add_watch, false);
-
-  //]]></script>
-
-  <text id="e" rotate="10">foo</text>
-
-</svg>
deleted file mode 100644
--- a/dom/svg/crashtests/880544-4.svg
+++ /dev/null
@@ -1,15 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg">
-  <script>//<![CDATA[
-
-function add_watch()
-{
-  document.getElementById("e").pathSegList.watch("0", function(){});
-}
-
-window.addEventListener("load", add_watch, false);
-
-  //]]></script>
-
-  <path id="e" d="M0,0"/>
-
-</svg>
deleted file mode 100644
--- a/dom/svg/crashtests/880544-5.svg
+++ /dev/null
@@ -1,15 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg">
-  <script>//<![CDATA[
-
-function add_watch()
-{
-  document.getElementById("e").points.watch("0", function(){});
-}
-
-window.addEventListener("load", add_watch, false);
-
-  //]]></script>
-
-  <polygon id="e" points="0,0"/>
-
-</svg>
--- a/dom/svg/crashtests/crashtests.list
+++ b/dom/svg/crashtests/crashtests.list
@@ -61,21 +61,16 @@ load 719779-1.svg
 load 723441-1.html
 load 751515-1.svg
 load 761507-1.svg
 load 831561.html
 load 837450-1.svg
 load 842463-1.html
 load 847138-1.svg
 load 864509.svg
-load 880544-1.svg
-load 880544-2.svg
-load 880544-3.svg
-load 880544-4.svg
-load 880544-5.svg
 load 898915-1.svg
 load 1035248-1.svg
 load 1035248-2.svg
 load 1244898-1.xhtml
 load 1250725.html
 load 1267272-1.svg
 load 1282985-1.svg
 # Disabled for now due to it taking a very long time to run - bug 1259356
deleted file mode 100644
--- a/dom/tests/mochitest/bugs/iframe_bug38959-1.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<html>
-<head>
-	<title>Iframe test for bug 38959</title>
-</head>
-<body">
-<script>
-
-x = false;
-window.opener.postMessage(1, "http://mochi.test:8888");
-window.close();
-
-</script>
-</body>
-</html>
deleted file mode 100644
--- a/dom/tests/mochitest/bugs/iframe_bug38959-2.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<html>
-<head>
-	<title>Iframe test for bug 38959</title>
-</head>
-<body">
-<script>
-
-x = true;
-window.opener.postMessage(2, "http://mochi.test:8888");
-window.close();
-
-</script>
-</body>
-</html>
--- a/dom/tests/mochitest/bugs/mochitest.ini
+++ b/dom/tests/mochitest/bugs/mochitest.ini
@@ -16,18 +16,16 @@ support-files =
   file_bug809290_b1.html
   file_bug809290_b2.html
   file_bug809290_c.html
   file_empty.html
   file_window_bar.html
   grandchild_bug260264.html
   iframe_bug304459-1.html
   iframe_bug304459-2.html
-  iframe_bug38959-1.html
-  iframe_bug38959-2.html
   iframe_bug430276-2.html
   iframe_bug430276.html
   iframe_bug440572.html
   iframe_bug49312.html
   iframe_domparser_after_blank.html
   utils_bug260264.js
   utils_bug743615.js
   worker_bug743615.js
@@ -61,17 +59,16 @@ skip-if = toolkit == 'android'
 [test_bug346659.html]
 [test_bug351601.html]
 [test_bug369306.html]
 skip-if = toolkit == 'android' #TIMED_OUT
 [test_bug370098.html]
 [test_bug377539.html]
 [test_bug384122.html]
 [test_bug389366.html]
-[test_bug38959.html]
 [test_bug393974.html]
 [test_bug394769.html]
 [test_bug396843.html]
 [test_bug400204.html]
 [test_bug404748.html]
 [test_bug414291.html]
 tags = openwindow
 [test_bug427744.html]
deleted file mode 100644
--- a/dom/tests/mochitest/bugs/test_bug38959.html
+++ /dev/null
@@ -1,57 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=38959
--->
-<head>
-  <title>Test for Bug 38959</title>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-</head>
-<body>
-<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=38959">Mozilla Bug 38959</a>
-<p id="display"></p>
-<div id="content" style="display: none">
-  <iframe id="frame"></iframe>
-</div>
-<pre id="test">
-<script type="application/javascript">
-
-/** Test for Bug 38959 **/
-
-var newValue;
-
-function watcher(id, ol, ne)
-{
-  newValue = ne;
-  return ne;
-}
-
-function openWindow(url, crossOrigin)
-{
-  newValue = true;
-  var w = window.open(url);
-  w.watch("x", watcher);
-}
-
-function receiveMessage(evt)
-{
-  ok(newValue, "Watchpoints only allowed same-origin.");
-  if (evt.data == 1) {
-    openWindow("/tests/dom/tests/mochitest/bugs/iframe_bug38959-2.html");
-  }
-  else {
-    SimpleTest.finish();
-  }
-}
-
-SimpleTest.waitForExplicitFinish();
-
-window.addEventListener("message", receiveMessage);
-
-openWindow("http://example.org/tests/dom/tests/mochitest/bugs/iframe_bug38959-1.html");
-
-</script>
-</pre>
-</body>
-</html>
--- a/js/xpconnect/tests/chrome/chrome.ini
+++ b/js/xpconnect/tests/chrome/chrome.ini
@@ -105,17 +105,16 @@ skip-if = os == 'win' || os == 'mac' || 
 [test_matches.xul]
 [test_nodelists.xul]
 [test_nsScriptErrorWithStack.html]
 [test_onGarbageCollection.html]
 [test_paris_weakmap_keys.xul]
 [test_precisegc.xul]
 [test_sandboxImport.xul]
 [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_xrayic.xul]
 [test_xrayToJS.xul]
deleted file mode 100644
--- a/js/xpconnect/tests/chrome/test_watchpoints.xul
+++ /dev/null
@@ -1,75 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet type="text/css" href="chrome://global/skin"?>
-<?xml-stylesheet type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"?>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=693527
--->
-<window title="Mozilla Bug "
-        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-
-  <!-- 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="
-     target="_blank">Mozilla Bug 693527</a>
-  </body>
-
-  <!-- test code goes here -->
-  <script type="application/javascript">
-  <![CDATA[
-  /** Test for Bug 693527 **/
-
-  let Cu = Components.utils;
-  let Ci = Components.interfaces;
-
-  /* Create a weak reference, with a single-element weak map. */
-  let make_weak_ref = function (obj) {
-    let m = new WeakMap;
-    m.set(obj, {});
-    return m;
-  };
-
-  /* Check to see if a weak reference is dead. */
-  let weak_ref_dead = function (r) {
-    return ThreadSafeChromeUtils.nondeterministicGetWeakMapKeys(r).length == 0;
-  }
-
-
-  let make_cycle = function () {
-    var p = document.createElement("p");
-    p.children.x = p;
-    var f = function() { };
-    p.watch("y", f);
-    var d = document.createElement("div");
-    d.appendChild(p);
-    f.loop = d;
-    f.bar = {}; // observing f directly makes the leak go away even without the CC somehow
-    return make_weak_ref(f.bar);
-  };
-
-  var cycle_ref = make_cycle();
-
-
-  /* set up for running precise GC/CC then checking the results */
-
-  SimpleTest.waitForExplicitFinish();
-
-  Cu.schedulePreciseGC(function () {
-    window.QueryInterface(Ci.nsIInterfaceRequestor)
-         .getInterface(Ci.nsIDOMWindowUtils)
-         .cycleCollect();
-    window.QueryInterface(Ci.nsIInterfaceRequestor)
-         .getInterface(Ci.nsIDOMWindowUtils)
-         .garbageCollect();
-    window.QueryInterface(Ci.nsIInterfaceRequestor)
-         .getInterface(Ci.nsIDOMWindowUtils)
-         .garbageCollect();
-  
-    ok(weak_ref_dead(cycle_ref), "Garbage gray watchpoint cycle should be collected.");
-
-    SimpleTest.finish();
-  });
-
-  ]]>
-  </script>
-</window>
--- a/js/xpconnect/tests/chrome/test_xrayToJS.xul
+++ b/js/xpconnect/tests/chrome/test_xrayToJS.xul
@@ -183,18 +183,18 @@ https://bugzilla.mozilla.org/show_bug.cg
     "setDate", "setUTCDate", "setHours", "setUTCHours", "setMinutes",
     "setUTCMinutes", "setSeconds", "setUTCSeconds", "setMilliseconds",
     "setUTCMilliseconds", "toUTCString", "toLocaleFormat", "toLocaleString",
     "toLocaleDateString", "toLocaleTimeString", "toDateString", "toTimeString",
     "toISOString", "toJSON", "toSource", "toString", "valueOf", "constructor",
     "toGMTString", Symbol.toPrimitive];
   gConstructorProperties['Date'] = constructorProps(["UTC", "parse", "now"]);
   gPrototypeProperties['Object'] =
-    ["constructor", "toSource", "toString", "toLocaleString", "valueOf", "watch",
-     "unwatch", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable",
+    ["constructor", "toSource", "toString", "toLocaleString", "valueOf",
+     "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable",
      "__defineGetter__", "__defineSetter__", "__lookupGetter__", "__lookupSetter__",
      "__proto__"];
   gConstructorProperties['Object'] =
     constructorProps(["setPrototypeOf", "getOwnPropertyDescriptor", "getOwnPropertyDescriptors",
                       "keys", "is", "defineProperty", "defineProperties", "create",
                       "getOwnPropertyNames", "getOwnPropertySymbols",
                       "preventExtensions", "freeze", "isFrozen", "seal",
                       "isSealed", "assign", "getPrototypeOf", "values",