Backed out changeset 37cf24967016 (bug 1155493)
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Thu, 21 May 2015 16:20:53 +0200
changeset 244960 fa7575b66cc5ff06fbb492fa5becbd16fe67d6fb
parent 244959 6635e368ea9e1230ee3cfb9934c87760dea5e086
child 244961 34b904a81f69886fc38a502b148ac1cde16e2a17
push id60068
push usercbook@mozilla.com
push dateThu, 21 May 2015 14:24:11 +0000
treeherdermozilla-inbound@0c323ae5636a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1155493
milestone41.0a1
backs out37cf24967016342b1bfe069c32321489d730bec3
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
Backed out changeset 37cf24967016 (bug 1155493)
dom/browser-element/mochitest/browserElementTestHelpers.js
dom/browser-element/mochitest/browserElement_CopyPaste.js
--- a/dom/browser-element/mochitest/browserElementTestHelpers.js
+++ b/dom/browser-element/mochitest/browserElementTestHelpers.js
@@ -60,20 +60,16 @@ const browserElementTestHelpers = {
   setEnabledPref: function(value) {
     this._setPref('dom.mozBrowserFramesEnabled', value);
   },
 
   setSelectionChangeEnabledPref: function(value) {
     this._setPref('selectioncaret.enabled', value);
   },
 
-  setAccessibleCaretEnabledPref: function(value) {
-    this._setPref('layout.accessiblecaret.enabled', value);
-  },
-
   getOOPByDefaultPref: function() {
     return this._getBoolPref("dom.ipc.browser_frames.oop_by_default");
   },
 
   addPermission: function() {
     this.lockTestReady();
     SpecialPowers.pushPermissions(
       [{'type': "browser", 'allow': 1, 'context': document}],
--- a/dom/browser-element/mochitest/browserElement_CopyPaste.js
+++ b/dom/browser-element/mochitest/browserElement_CopyPaste.js
@@ -16,17 +16,16 @@ var mm;
 var iframeOuter;
 var iframeInner;
 var state = 0;
 var stateMeaning;
 var defaultData;
 var pasteData;
 var focusScript;
 var createEmbededFrame = false;
-var testAccessibleCaret = false;
 
 function copyToClipboard(str) {
   gTextarea.value = str;
   SpecialPowers.wrap(gTextarea).editor.selectAll();
   SpecialPowers.wrap(gTextarea).editor.copy();
 }
 
 function getScriptForGetContent() {
@@ -156,58 +155,47 @@ function dispatchTest(e) {
                    "</body>" +
                    "<script>document.designMode='on';</script>" +
                    "</html>";
       stateMeaning = " (test: normal div with designMode:on)";
       focusScript = "var elt=content.document.getElementById('text');elt.focus();";
       break;
     default:
       if (createEmbededFrame || browserElementTestHelpers.getOOPByDefaultPref()) {
-        if (testAccessibleCaret) {
-          SimpleTest.finish();
-          return;
-        } else {
-          testAccessibleCaret = true;
-          createEmbededFrame = false;
-          browserElementTestHelpers.setSelectionChangeEnabledPref(false);
-          browserElementTestHelpers.setAccessibleCaretEnabledPref(true);
-        }
+        SimpleTest.finish();
       } else {
         createEmbededFrame = true;
+
+        // clean up and run test again.
+        document.body.removeChild(iframeOuter);
+        document.body.removeChild(gTextarea);
+        state = 0;
+        runTest();
       }
-
-      // clean up and run test again.
-      document.body.removeChild(iframeOuter);
-      document.body.removeChild(gTextarea);
-      state = 0;
-      runTest();
       break;
   }
 }
 
 function isChildProcess() {
   return SpecialPowers.Cc["@mozilla.org/xre/app-info;1"]
                          .getService(SpecialPowers.Ci.nsIXULRuntime)
                          .processType != SpecialPowers.Ci.nsIXULRuntime.PROCESS_TYPE_DEFAULT;
 }
 
 function testSelectAll(e) {
   // Skip mozbrowser test if we're at child process.
   if (!isChildProcess()) {
-    let eventName = testAccessibleCaret ? "mozbrowsercaretstatechanged" : "mozbrowserselectionstatechanged";
-    iframeOuter.addEventListener(eventName, function selectchangeforselectall(e) {
-      if (!e.detail.states || e.detail.states.indexOf('selectall') == 0) {
-        iframeOuter.removeEventListener(eventName, selectchangeforselectall, true);
+    iframeOuter.addEventListener("mozbrowserselectionstatechanged", function selectchangeforselectall(e) {
+      if (e.detail.states.indexOf('selectall') == 0) {
+        iframeOuter.removeEventListener("mozbrowserselectionstatechanged", selectchangeforselectall, true);
         ok(true, "got mozbrowserselectionstatechanged event." + stateMeaning);
         ok(e.detail, "event.detail is not null." + stateMeaning);
         ok(e.detail.width != 0, "event.detail.width is not zero" + stateMeaning);
         ok(e.detail.height != 0, "event.detail.height is not zero" + stateMeaning);
-        if (!testAccessibleCaret) {
-          ok(e.detail.states, "event.detail.state " + e.detail.states);
-        }
+        ok(e.detail.states, "event.detail.state " + e.detail.states);
         SimpleTest.executeSoon(function() { testCopy1(e); });
       }
     }, true);
   }
 
   mm.addMessageListener('content-focus', function messageforfocus(msg) {
     mm.removeMessageListener('content-focus', messageforfocus);
     // test selectall command, after calling this the selectionstatechanged event should be fired.