Bug 1273369 - Remove CPOW usage in browser_webconsole_bug_613280_jsterm_copy.js;r=bgrins

MozReview-Commit-ID: 8fYEOrIZF72
This commit is contained in:
Kevin Chan 2016-09-09 07:48:56 -07:00
parent 0f2c669a48
commit 017fe8c219

View File

@ -10,7 +10,9 @@ const TEST_URI = "data:text/html;charset=utf-8,Web Console test for bug 613280";
function test() {
loadTab(TEST_URI).then(() => {
openConsole().then((HUD) => {
content.console.log("foobarBazBug613280");
ContentTask.spawn(gBrowser.selectedBrowser, null, function*(){
content.console.log("foobarBazBug613280");
});
waitForMessages({
webconsole: HUD,
messages: [{
@ -26,8 +28,6 @@ function test() {
function performTest(HUD, [result]) {
let msg = [...result.matched][0];
let input = HUD.jsterm.inputNode;
let selection = getSelection();
let contentSelection = content.getSelection();
let clipboardSetup = function () {
goDoCommand("cmd_copy");
@ -37,24 +37,6 @@ function performTest(HUD, [result]) {
finishTest();
};
// Check if we first need to clear any existing selections.
if (selection.rangeCount > 0 || contentSelection.rangeCount > 0 ||
input.selectionStart != input.selectionEnd) {
if (input.selectionStart != input.selectionEnd) {
input.selectionStart = input.selectionEnd = 0;
}
if (selection.rangeCount > 0) {
selection.removeAllRanges();
}
if (contentSelection.rangeCount > 0) {
contentSelection.removeAllRanges();
}
goUpdateCommand("cmd_copy");
}
let controller = top.document.commandDispatcher
.getControllerForCommand("cmd_copy");
is(controller.isCommandEnabled("cmd_copy"), false, "cmd_copy is disabled");