mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-15 08:53:07 +09:00
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.
This commit is contained in:
parent
ca9e376e55
commit
3d8d9f95df
141 changed files with 34 additions and 2940 deletions
|
|
@ -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");
|
||||
|
||||
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");
|
||||
|
||||
EventUtils.synthesizeKey("VK_DOWN", {});
|
||||
|
||||
is(popup.selectedIndex, 1, "index 1 is selected");
|
||||
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");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue