summaryrefslogtreecommitdiff
path: root/devtools/client
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-10-27 02:14:16 +0100
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-10-27 02:14:16 +0100
commit24027f0df9d23304709a80c22c6bfdbd27a95046 (patch)
treef3bbd19d50d8433df73a2691a22239912169405e /devtools/client
parent44a077980abb92dcea9ed374fd9719eaaf2f1458 (diff)
downloaduxp-24027f0df9d23304709a80c22c6bfdbd27a95046.tar.gz
Issue #1257 - Part 3: Remove/update tests.
This removes a ton of tests that are no longer relevant with (un)watch removed (e.g. testing stability/bugs in the watchpoint system itself which has never been the most stable), and updates others that would previously rely on watch/unwatch, so that they don't unexpectedly fail.
Diffstat (limited to 'devtools/client')
-rw-r--r--devtools/client/webconsole/test/browser_webconsole_bug_585991_autocomplete_keys.js58
1 files changed, 28 insertions, 30 deletions
diff --git a/devtools/client/webconsole/test/browser_webconsole_bug_585991_autocomplete_keys.js b/devtools/client/webconsole/test/browser_webconsole_bug_585991_autocomplete_keys.js
index 0021a8cc1b..b96dc0c8ed 100644
--- a/devtools/client/webconsole/test/browser_webconsole_bug_585991_autocomplete_keys.js
+++ b/devtools/client/webconsole/test/browser_webconsole_bug_585991_autocomplete_keys.js
@@ -57,8 +57,8 @@ var consoleOpened = Task.async(function* (hud) {
// 4 values, and the following properties:
// __defineGetter__ __defineSetter__ __lookupGetter__ __lookupSetter__
// __proto__ hasOwnProperty isPrototypeOf propertyIsEnumerable
- // toLocaleString toString toSource unwatch valueOf watch constructor.
- is(popup.itemCount, 19, "popup.itemCount is correct");
+ // toLocaleString toString toSource valueOfconstructor.
+ is(popup.itemCount, 17, "popup.itemCount is correct");
let sameItems = popup.getItems().reverse().map(function (e) {
return e.label;
@@ -82,36 +82,34 @@ var consoleOpened = Task.async(function* (hud) {
"toLocaleString",
"toSource",
"toString",
- "unwatch",
"valueOf",
- "watch",
][index] === prop;
}), "getItems returns the items we expect");
- is(popup.selectedIndex, 18,
+ is(popup.selectedIndex, 16,
"Index of the first item from bottom is selected.");
EventUtils.synthesizeKey("VK_DOWN", {});
let prefix = jsterm.getInputValue().replace(/[\S]/g, " ");
is(popup.selectedIndex, 0, "index 0 is selected");
- is(popup.selectedItem.label, "watch", "watch is selected");
- is(completeNode.value, prefix + "watch",
- "completeNode.value holds watch");
+ is(popup.selectedItem.label, "valueOf", "valueOf is selected");
+ is(completeNode.value, prefix + "valueOf",
+ "completeNode.value holds valueOf");
EventUtils.synthesizeKey("VK_DOWN", {});
is(popup.selectedIndex, 1, "index 1 is selected");
- is(popup.selectedItem.label, "valueOf", "valueOf is selected");
- is(completeNode.value, prefix + "valueOf",
- "completeNode.value holds valueOf");
+ is(popup.selectedItem.label, "toString", "toString is selected");
+ is(completeNode.value, prefix + "toString",
+ "completeNode.value holds toString");
EventUtils.synthesizeKey("VK_UP", {});
is(popup.selectedIndex, 0, "index 0 is selected");
- is(popup.selectedItem.label, "watch", "watch is selected");
- is(completeNode.value, prefix + "watch",
- "completeNode.value holds watch");
+ is(popup.selectedItem.label, "valueOf", "valueOf is selected");
+ is(completeNode.value, prefix + "valueOf",
+ "completeNode.value holds valueOf");
let currentSelectionIndex = popup.selectedIndex;
@@ -127,7 +125,7 @@ var consoleOpened = Task.async(function* (hud) {
"Index is less after Page UP");
EventUtils.synthesizeKey("VK_END", {});
- is(popup.selectedIndex, 18, "index is last after End");
+ is(popup.selectedIndex, 16, "index is last after End");
EventUtils.synthesizeKey("VK_HOME", {});
is(popup.selectedIndex, 0, "index is first after Home");
@@ -151,7 +149,7 @@ function popupHideAfterTab() {
// At this point the completion suggestion should be accepted.
ok(!popup.isOpen, "popup is not open");
- is(jsterm.getInputValue(), "window.foobarBug585991.watch",
+ is(jsterm.getInputValue(), "window.foobarBug585991.valueOf",
"completion was successful after VK_TAB");
ok(!completeNode.value, "completeNode is empty");
@@ -159,17 +157,17 @@ function popupHideAfterTab() {
popup.once("popup-opened", function onShown() {
ok(popup.isOpen, "popup is open");
- is(popup.itemCount, 19, "popup.itemCount is correct");
+ is(popup.itemCount, 17, "popup.itemCount is correct");
- is(popup.selectedIndex, 18, "First index from bottom is selected");
+ is(popup.selectedIndex, 16, "First index from bottom is selected");
EventUtils.synthesizeKey("VK_DOWN", {});
let prefix = jsterm.getInputValue().replace(/[\S]/g, " ");
is(popup.selectedIndex, 0, "index 0 is selected");
- is(popup.selectedItem.label, "watch", "watch is selected");
- is(completeNode.value, prefix + "watch",
- "completeNode.value holds watch");
+ is(popup.selectedItem.label, "valueOf", "valueOf is selected");
+ is(completeNode.value, prefix + "valueOf",
+ "completeNode.value holds valueOf");
popup.once("popup-closed", function onHidden() {
ok(!popup.isOpen, "popup is not open after VK_ESCAPE");
@@ -203,29 +201,29 @@ function testReturnKey() {
popup.once("popup-opened", function onShown() {
ok(popup.isOpen, "popup is open");
- is(popup.itemCount, 19, "popup.itemCount is correct");
+ is(popup.itemCount, 17, "popup.itemCount is correct");
- is(popup.selectedIndex, 18, "First index from bottom is selected");
+ is(popup.selectedIndex, 16, "First index from bottom is selected");
EventUtils.synthesizeKey("VK_DOWN", {});
let prefix = jsterm.getInputValue().replace(/[\S]/g, " ");
is(popup.selectedIndex, 0, "index 0 is selected");
- is(popup.selectedItem.label, "watch", "watch is selected");
- is(completeNode.value, prefix + "watch",
- "completeNode.value holds watch");
+ is(popup.selectedItem.label, "valueOf", "valueOf is selected");
+ is(completeNode.value, prefix + "valueOf",
+ "completeNode.value holds valueOf");
EventUtils.synthesizeKey("VK_DOWN", {});
is(popup.selectedIndex, 1, "index 1 is selected");
- is(popup.selectedItem.label, "valueOf", "valueOf is selected");
- is(completeNode.value, prefix + "valueOf",
- "completeNode.value holds valueOf");
+ is(popup.selectedItem.label, "toString", "toString is selected");
+ is(completeNode.value, prefix + "toString",
+ "completeNode.value holds toString");
popup.once("popup-closed", function onHidden() {
ok(!popup.isOpen, "popup is not open after VK_RETURN");
- is(jsterm.getInputValue(), "window.foobarBug585991.valueOf",
+ is(jsterm.getInputValue(), "window.foobarBug585991.toString",
"completion was successful after VK_RETURN");
ok(!completeNode.value, "completeNode is empty");