From 33d00f98a43a1cff2de24b0108d931efa30ba953 Mon Sep 17 00:00:00 2001 From: Birunthan Mohanathas Date: Thu, 21 May 2015 21:50:04 +0100 Subject: [PATCH] Bug 1166840 - Merge SpecialPowers.{copyString,clipboardCopyString}. r=ehsan --- editor/libeditor/tests/test_bug681229.html | 2 +- testing/specialpowers/content/specialpowersAPI.js | 14 ++++---------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/editor/libeditor/tests/test_bug681229.html b/editor/libeditor/tests/test_bug681229.html index b7594671b309..6debcfde7cd9 100644 --- a/editor/libeditor/tests/test_bug681229.html +++ b/editor/libeditor/tests/test_bug681229.html @@ -32,7 +32,7 @@ SimpleTest.waitForFocus(function() { SimpleTest.waitForClipboard(kExpectedValue, function() { - SpecialPowers.copyString(kValue, document); + SpecialPowers.clipboardCopyString(kValue); }, function() { synthesizeKey("V", {accelKey: true}); diff --git a/testing/specialpowers/content/specialpowersAPI.js b/testing/specialpowers/content/specialpowersAPI.js index a494addde577..d16dc3dedd8c 100644 --- a/testing/specialpowers/content/specialpowersAPI.js +++ b/testing/specialpowers/content/specialpowersAPI.js @@ -1567,12 +1567,6 @@ SpecialPowersAPI.prototype = { deleteCategoryEntry(category, entry, persists); }, - copyString: function(str, doc) { - Components.classes["@mozilla.org/widget/clipboardhelper;1"]. - getService(Components.interfaces.nsIClipboardHelper). - copyString(str); - }, - openDialog: function(win, args) { return win.openDialog.apply(win, args); }, @@ -1651,10 +1645,10 @@ SpecialPowersAPI.prototype = { return data.QueryInterface(Components.interfaces.nsISupportsString).data; }, - clipboardCopyString: function(preExpectedVal, doc) { - var cbHelperSvc = Components.classes["@mozilla.org/widget/clipboardhelper;1"]. - getService(Components.interfaces.nsIClipboardHelper); - cbHelperSvc.copyString(preExpectedVal); + clipboardCopyString: function(str) { + Cc["@mozilla.org/widget/clipboardhelper;1"]. + getService(Ci.nsIClipboardHelper). + copyString(str); }, supportsSelectionClipboard: function() {