mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 1166840 - Merge SpecialPowers.{copyString,clipboardCopyString}. r=ehsan
This commit is contained in:
parent
3ffa8d565d
commit
33d00f98a4
@ -32,7 +32,7 @@ SimpleTest.waitForFocus(function() {
|
||||
|
||||
SimpleTest.waitForClipboard(kExpectedValue,
|
||||
function() {
|
||||
SpecialPowers.copyString(kValue, document);
|
||||
SpecialPowers.clipboardCopyString(kValue);
|
||||
},
|
||||
function() {
|
||||
synthesizeKey("V", {accelKey: true});
|
||||
|
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user