Disabling test from Bug 574036 - HUD Console should allow copying text, r=mossop
authorMihai Sucan <msucan@mozilla.com>
Tue, 10 Aug 2010 13:13:04 -0300
changeset 49297 203ed2bd78ceddc02d2079574b7376f5b453585b
parent 49296 35132a94de6556e561813fb532fe0ae05a1d9c0f
child 49298 f1e252898bca46815c1ff1d55c69fcb4cff7d1de
push id14980
push userrcampbell@mozilla.com
push dateTue, 10 Aug 2010 16:13:27 +0000
treeherdermozilla-central@203ed2bd78ce [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmossop
bugs574036
milestone2.0b4pre
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
Disabling test from Bug 574036 - HUD Console should allow copying text, r=mossop
toolkit/components/console/hudservice/tests/browser/browser_HUDServiceTestsAll.js
--- a/toolkit/components/console/hudservice/tests/browser/browser_HUDServiceTestsAll.js
+++ b/toolkit/components/console/hudservice/tests/browser/browser_HUDServiceTestsAll.js
@@ -742,87 +742,25 @@ function testDuplicateError() {
           ok(text.indexOf("fooDuplicateError1", error1pos + 1) == -1,
             "no duplicate for fooDuplicateError1");
         }
 
         ok(text.indexOf("test-duplicate-error.html") > -1,
           "found test-duplicate-error.html");
 
         text = null;
-        testCopyOutputMenuItem();
+        testWebConsoleClose();
       });
     }
   };
 
   Services.console.registerListener(consoleObserver);
   content.location = TEST_DUPLICATE_ERROR_URI;
 }
 
-function testCopyOutputMenuItem()
-{
-  // See bug 574036 - HUD Console should allow copying text.
-  // https://bugzilla.mozilla.org/show_bug.cgi?id=574036
-
-  var HUD = HUDService.hudWeakReferences[hudId].get();
-  var selection = getSelection();
-  var console = content.wrappedJSObject.console;
-
-  if (selection.rangeCount > 0) {
-    selection.removeAllRanges();
-  }
-
-  // Test 1: check that the copyOutputMenuItem is disabled
-  HUD.contextMenu.addEventListener("popupshown", function () {
-    HUD.contextMenu.removeEventListener("popupshown", arguments.callee, false);
-
-    // Skip the test on Linux, because the menu is always enabled.
-    // See bug 584972 - https://bugzilla.mozilla.org/show_bug.cgi?id=584972
-    if (navigator.platform.indexOf("Linux") == -1) {
-      ok(HUD.copyOutputMenuItem.disabled, "HUD.copyOutputMenuItem is disabled");
-    }
-
-    console.log("Hello world!");
-
-    var range = HUD.chromeDocument.createRange();
-    range.selectNode(HUD.outputNode.firstChild);
-    selection.addRange(range);
-
-    // Test 2: check that the copyOutputMenuItem is enabled, because a node is
-    // selected.
-    HUD.contextMenu.addEventListener("popupshown", function () {
-      HUD.contextMenu.removeEventListener("popupshown", arguments.callee,
-        false);
-
-      ok(!HUD.copyOutputMenuItem.disabled, "HUD.copyOutputMenuItem is enabled");
-
-      selection.removeAllRanges();
-
-      // We are done, close the contextmenu now.
-      EventUtils.synthesizeKey("VK_ESCAPE", {});
-
-      testWebConsoleClose();
-    }, false);
-
-    HUD.contextMenu.addEventListener("popuphidden", function () {
-      HUD.contextMenu.removeEventListener("popuphidden", arguments.callee,
-        false);
-
-      // Show the context menu again.
-      EventUtils.synthesizeMouse(HUD.outputNode, 2, 2, {type: "contextmenu",
-        button: 2});
-    }, false);
-
-    // We need to hide the context menu, before we can show it again.
-    EventUtils.synthesizeKey("VK_ESCAPE", {});
-  }, false);
-
-  EventUtils.synthesizeMouse(HUD.outputNode, 1, 1, {type: "contextmenu",
-    button: 2});
-}
-
 /**
  * Unit test for bug 580001:
  * 'Close console after completion causes error "inputValue is undefined"'
  */
 function testWebConsoleClose() {
   let display = HUDService.getDisplayByURISpec(content.location.href);
   let input = display.querySelector(".jsterm-input-node");