Bug 1166840 - Merge SpecialPowers.{copyString,clipboardCopyString}. r=ehsan

This commit is contained in:
Birunthan Mohanathas 2015-05-21 21:50:04 +01:00
parent 3ffa8d565d
commit 33d00f98a4
2 changed files with 5 additions and 11 deletions

View File

@ -32,7 +32,7 @@ SimpleTest.waitForFocus(function() {
SimpleTest.waitForClipboard(kExpectedValue,
function() {
SpecialPowers.copyString(kValue, document);
SpecialPowers.clipboardCopyString(kValue);
},
function() {
synthesizeKey("V", {accelKey: true});

View File

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