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() {