From a94860bda4d149f25ef5c72794eeb285f7c1b6ac Mon Sep 17 00:00:00 2001 From: Wes Kocher Date: Thu, 20 Feb 2014 16:30:26 -0800 Subject: [PATCH] Backed out 5 changesets (bug 326743) for m-oth failures Backed out changeset d498b3fa8908 (bug 326743) Backed out changeset 820d24250606 (bug 326743) Backed out changeset 334ddf5ad1fb (bug 326743) Backed out changeset becbe15a0b5d (bug 326743) Backed out changeset dbc693bc48c5 (bug 326743) --- browser/base/content/browser-sets.inc | 6 -- .../content/test/general/browser_bug537013.js | 22 ++---- .../content/test/general/browser_bug567306.js | 10 +-- .../locales/en-US/chrome/browser/browser.dtd | 1 - .../viewsource/content/viewSource.xul | 7 -- .../content/tests/chrome/bug409624_window.xul | 1 - .../content/tests/chrome/findbar_window.xul | 47 +++-------- toolkit/content/widgets/findbar.xml | 48 +---------- .../en-US/chrome/global/viewSource.dtd | 1 - toolkit/modules/Finder.jsm | 79 ++----------------- widget/android/nsClipboard.cpp | 6 -- widget/cocoa/nsClipboard.h | 8 +- widget/cocoa/nsClipboard.mm | 72 +++++------------ widget/gtk/nsClipboard.cpp | 7 -- widget/nsIClipboard.idl | 11 +-- widget/qt/nsClipboard.cpp | 9 --- widget/xpwidgets/nsBaseClipboard.cpp | 22 +----- widget/xpwidgets/nsClipboardHelper.cpp | 11 +-- widget/xpwidgets/nsClipboardProxy.cpp | 7 -- 19 files changed, 55 insertions(+), 320 deletions(-) diff --git a/browser/base/content/browser-sets.inc b/browser/base/content/browser-sets.inc index 21abe3eb6fbf..68607ce9d288 100644 --- a/browser/base/content/browser-sets.inc +++ b/browser/base/content/browser-sets.inc @@ -50,9 +50,6 @@ -#ifdef XP_MACOSX - -#endif @@ -353,9 +350,6 @@ -#ifdef XP_MACOSX - -#endif diff --git a/browser/base/content/test/general/browser_bug537013.js b/browser/base/content/test/general/browser_bug537013.js index 4d4a4f591a86..4f8d0be67977 100644 --- a/browser/base/content/test/general/browser_bug537013.js +++ b/browser/base/content/test/general/browser_bug537013.js @@ -11,9 +11,6 @@ let texts = [ "To err is human; to forgive is not company policy." ]; -let Clipboard = Cc["@mozilla.org/widget/clipboard;1"].getService(Ci.nsIClipboard); -let HasFindClipboard = Clipboard.supportsFindClipboard(); - function addTabWithText(aText, aCallback) { let newTab = gBrowser.addTab("data:text/html,

" + aText + "

"); tabs.push(newTab); @@ -22,7 +19,6 @@ function addTabWithText(aText, aCallback) { function setFindString(aString) { gFindBar.open(); - gFindBar._findField.focus(); gFindBar._findField.select(); EventUtils.sendString(aString); is(gFindBar._findField.value, aString, "Set the field correctly!"); @@ -65,9 +61,7 @@ function continueTests1() { // Confirm the first tab is still correct, ensure re-hiding works as expected gBrowser.selectedTab = tabs[0]; ok(!gFindBar.hidden, "First tab shows find bar!"); - // When the Find Clipboard is supported, this test not relevant. - if (!HasFindClipboard) - is(gFindBar._findField.value, texts[0], "First tab persists find value!"); + is(gFindBar._findField.value, texts[0], "First tab persists find value!"); ok(gFindBar.getElement("highlight").checked, "Highlight button state persists!"); @@ -100,11 +94,8 @@ function continueTests2() { ok(gFindBar.hidden, "Fourth tab doesn't show find bar!"); is(gFindBar, gBrowser.getFindBar(), "Find bar is right one!"); gFindBar.open(); - // Disabled the following assertion due to intermittent failure on OSX 10.6 Debug. - if (!HasFindClipboard) { - is(gFindBar._findField.value, toTest, - "Fourth tab has second tab's find value!"); - } + is(gFindBar._findField.value, texts[1], + "Fourth tab has second tab's find value!"); newWindow = gBrowser.replaceTabWithWindow(tabs.pop()); whenDelayedStartupFinished(newWindow, checkNewWindow); @@ -113,11 +104,8 @@ function continueTests2() { // Test that findbar gets restored when a tab is moved to a new window. function checkNewWindow() { ok(!newWindow.gFindBar.hidden, "New window shows find bar!"); - // Disabled the following assertion due to intermittent failure on OSX 10.6 Debug. - if (!HasFindClipboard) { - is(newWindow.gFindBar._findField.value, toTest, - "New window find bar has correct find value!"); - } + is(newWindow.gFindBar._findField.value, texts[1], + "New window find bar has correct find value!"); ok(!newWindow.gFindBar.getElement("find-next").disabled, "New window findbar has enabled buttons!"); newWindow.close(); diff --git a/browser/base/content/test/general/browser_bug567306.js b/browser/base/content/test/general/browser_bug567306.js index f3507f66eea2..1fa35efa8511 100644 --- a/browser/base/content/test/general/browser_bug567306.js +++ b/browser/base/content/test/general/browser_bug567306.js @@ -2,10 +2,7 @@ * http://creativecommons.org/publicdomain/zero/1.0/ */ -const {Ci: interfaces, Cc: classes} = Components; - -let Clipboard = Cc["@mozilla.org/widget/clipboard;1"].getService(Ci.nsIClipboard); -let HasFindClipboard = Clipboard.supportsFindClipboard(); +let Ci = Components.interfaces; function test() { waitForExplicitFinish(); @@ -40,10 +37,7 @@ function onFocus(win) { let findBar = win.gFindBar; selectText(win.content); findBar.onFindCommand(); - // When the OS supports the Find Clipboard (OSX), the find field value is - // persisted across Fx sessions, thus not useful to test. - if (!HasFindClipboard) - is(findBar._findField.value, "Select Me", "Findbar is initialized with selection"); + is(findBar._findField.value, "Select Me", "Findbar is initialized with selection"); findBar.close(); win.close(); finish(); diff --git a/browser/locales/en-US/chrome/browser/browser.dtd b/browser/locales/en-US/chrome/browser/browser.dtd index 57908eb46edb..0e05c1fd0927 100644 --- a/browser/locales/en-US/chrome/browser/browser.dtd +++ b/browser/locales/en-US/chrome/browser/browser.dtd @@ -614,7 +614,6 @@ you can use these alternative items. Otherwise, their values should be empty. - - diff --git a/toolkit/components/viewsource/content/viewSource.xul b/toolkit/components/viewsource/content/viewSource.xul index 41c15817a8d3..3fcb57efb245 100644 --- a/toolkit/components/viewsource/content/viewSource.xul +++ b/toolkit/components/viewsource/content/viewSource.xul @@ -51,10 +51,6 @@ oncommand="document.getElementById('FindToolbar').onFindAgainCommand(false);"/> -#ifdef XP_MACOSX - -#endif @@ -90,9 +86,6 @@ -#ifdef XP_MACOSX - -#endif diff --git a/toolkit/content/tests/chrome/bug409624_window.xul b/toolkit/content/tests/chrome/bug409624_window.xul index fe9948936f71..d4bb387dde83 100644 --- a/toolkit/content/tests/chrome/bug409624_window.xul +++ b/toolkit/content/tests/chrome/bug409624_window.xul @@ -58,7 +58,6 @@ // Simulate typical input textbox.focus(); - gFindBar.clear(); sendChar("m"); ok(gFindBar.canClear, "canClear property true after input"); let preSelection = gBrowser.contentWindow.getSelection(); diff --git a/toolkit/content/tests/chrome/findbar_window.xul b/toolkit/content/tests/chrome/findbar_window.xul index 237729785a90..38a7f01acf5b 100644 --- a/toolkit/content/tests/chrome/findbar_window.xul +++ b/toolkit/content/tests/chrome/findbar_window.xul @@ -30,9 +30,6 @@ var gFindBar = null; var gBrowser; - var gClipboard = Cc["@mozilla.org/widget/clipboard;1"].getService(Ci.nsIClipboard); - var gHasFindClipboard = gClipboard.supportsFindClipboard(); - var gStatusText; var gXULBrowserWindow = { QueryInterface: function(aIID) { @@ -100,8 +97,7 @@ testFindbarSelection(); testDrop(); testQuickFindLink(); - if (gHasFindClipboard) - testStatusText(); + testStatusText(); testQuickFindClose(); } @@ -111,11 +107,8 @@ ok(!gFindBar.hidden, "testFindbarSelection: failed to open findbar: " + aTestName); ok(document.commandDispatcher.focusedElement == gFindBar._findField.inputField, "testFindbarSelection: find field is not focused: " + aTestName); - if (!gHasFindClipboard) { - ok(gFindBar._findField.value == aExpSelection, - "Incorrect selection in testFindbarSelection: " + aTestName + - ". Selection: " + gFindBar._findField.value); - } + ok(gFindBar._findField.value == aExpSelection, + "Incorrect selection in testFindbarSelection: " + aTestName + ". Selection: " + gFindBar._findField.value); // Clear the value, close the findbar gFindBar._findField.value = ""; @@ -195,7 +188,6 @@ enterStringIntoFindField(searchStr); ok(gBrowser.contentWindow.getSelection().toString().toLowerCase() == searchStr, "testNormalFind: failed to find '" + searchStr + "'"); - testClipboardSearchString(gBrowser.contentWindow.getSelection().toString()); if (!matchCaseCheckbox.hidden) { matchCaseCheckbox.click(); @@ -254,7 +246,6 @@ ok(gBrowser.contentWindow.getSelection().toString().toLowerCase() == searchStr, "testNormalFindWithComposition: text should be found after committing composition"); - testClipboardSearchString(gBrowser.contentWindow.getSelection().toString()); if (clicked) { matchCaseCheckbox.click(); @@ -314,7 +305,6 @@ enterStringIntoFindField(searchStr); ok(gBrowser.contentWindow.getSelection() == searchStr, "testQuickFindLink: failed to find sample link"); - testClipboardSearchString(searchStr); } // See bug 963925 for more details on this test. @@ -331,7 +321,7 @@ let a = gFindBar._findField.value; let b = gFindBar._browser.finder._fastFind.searchString; let c = gFindBar._browser.finder.searchString; - ok(a == b && b == c, "testFindWithHighlight 1: " + a + ", " + b + ", " + c + "."); + ok(a == b && b == c, "testFindWithHighlight: " + a + ", " + b + ", " + c + "."); let oldGetInitialSelection = gFindBar._getInitialSelection; let searchStr = "t"; @@ -342,24 +332,22 @@ a = gFindBar._findField.value; b = gFindBar._browser.finder._fastFind.searchString; c = gFindBar._browser.finder.searchString; - ok(a == searchStr && b == c, "testFindWithHighlight 2: " + a + ", " + b + ", " + c + "."); + ok(a == searchStr && b == c, "testFindWithHighlight: " + a + ", " + b + ", " + c + "."); let highlightButton = gFindBar.getElement("highlight"); highlightButton.click(); - ok(highlightButton.checked, "testFindWithHighlight 3: Highlight All should be checked."); + ok(highlightButton.checked, "testFindWithHighlight: Highlight All should be checked."); - if (!gHasFindClipboard) { - a = gFindBar._findField.value; - b = gFindBar._browser.finder._fastFind.searchString; - c = gFindBar._browser.finder.searchString; - ok(a == searchStr && b == c, "testFindWithHighlight 4: " + a + ", " + b + ", " + c + "."); - } + a = gFindBar._findField.value; + b = gFindBar._browser.finder._fastFind.searchString; + c = gFindBar._browser.finder.searchString; + ok(a == searchStr && b == c, "testFindWithHighlight: " + a + ", " + b + ", " + c + "."); gFindBar.onFindAgainCommand(); a = gFindBar._findField.value; b = gFindBar._browser.finder._fastFind.searchString; c = gFindBar._browser.finder.searchString; - ok(a == b && b == c, "testFindWithHighlight 5: " + a + ", " + b + ", " + c + "."); + ok(a == b && b == c, "testFindWithHighlight: " + a + ", " + b + ", " + c + "."); highlightButton.click(); ok(!highlightButton.checked, "testFindWithHighlight: Highlight All should be unchecked."); @@ -380,19 +368,6 @@ enterStringIntoFindField(SEARCH_TEXT); ok(gBrowser.contentWindow.getSelection() == SEARCH_TEXT, "testQuickFindText: failed to find '" + SEARCH_TEXT + "'"); - testClipboardSearchString(SEARCH_TEXT); - } - - function testClipboardSearchString(aExpected) { - if (!gHasFindClipboard) - return; - - if (!aExpected) - aExpected = ""; - var searchStr = gFindBar.browser.finder.clipboardSearchString; - ok(searchStr.toLowerCase() == aExpected.toLowerCase(), - "testClipboardSearchString: search string not set to '" + aExpected + - "', instead found '" + searchStr + "'"); } ]]> diff --git a/toolkit/content/widgets/findbar.xml b/toolkit/content/widgets/findbar.xml index 3cc9dc10dd6a..28afcd7b6867 100644 --- a/toolkit/content/widgets/findbar.xml +++ b/toolkit/content/widgets/findbar.xml @@ -110,13 +110,6 @@ findbar.browser.finder.enableSelection(); ]]> -#ifdef XP_MACOSX - -#endif - -#ifdef XP_MACOSX - - - - - - - - -#endif -