Bug 1406841 - remove js property provider mochitests;r=bgrins draft
authorJulian Descottes <jdescottes@mozilla.com>
Thu, 11 Jan 2018 22:55:03 +0100
changeset 719945 b2a11629c6f224879bcb9d4a171922bf23d9131f
parent 719034 1ce9b4193d624d5d4ed4bceecfbeb1514f818848
child 745936 e5fc485ed064cdc6501e1ea2a2eca0a1ebf24638
push id95405
push userjdescottes@mozilla.com
push dateFri, 12 Jan 2018 23:43:03 +0000
reviewersbgrins
bugs1406841
milestone59.0a1
Bug 1406841 - remove js property provider mochitests;r=bgrins The features tested here are already covered in - https://searchfox.org/mozilla-central/source/devtools/shared/webconsole/test/unit/test_js_property_provider.js - https://searchfox.org/mozilla-central/source/devtools/shared/webconsole/test/test_jsterm_autocomplete.html MozReview-Commit-ID: 1LY8mq5UvCA
devtools/client/webconsole/new-console-output/test/mochitest/browser.ini
devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_property_provider.js
devtools/client/webconsole/test/browser.ini
devtools/client/webconsole/test/browser_webconsole_property_provider.js
--- a/devtools/client/webconsole/new-console-output/test/mochitest/browser.ini
+++ b/devtools/client/webconsole/new-console-output/test/mochitest/browser.ini
@@ -351,19 +351,16 @@ subsuite = clipboard
 skip-if = true #	Bug 1404364
 # old console skip-if = (os == 'linux' && bits == 32 && debug) # bug 1328915, disable linux32 debug devtools for timeouts
 [browser_webconsole_output_copy_newlines.js]
 subsuite = clipboard
 skip-if = true #	Bug 1405641
 # old console skip-if = (os == 'linux' && bits == 32 && debug) # bug 1328915, disable linux32 debug devtools for timeouts
 [browser_webconsole_output_order.js]
 [browser_webconsole_persist.js]
-[browser_webconsole_property_provider.js]
-skip-if = true # Bug 1406841
-#old console skip-if = e10s # Bug 1042253 - webconsole tests disabled with e10s
 [browser_webconsole_prune_scroll.js]
 skip-if = true #	Bug 1404832
 [browser_webconsole_reflow.js]
 skip-if = true #	Bug 1406022
 [browser_webconsole_reopen_closed_tab.js]
 [browser_webconsole_repeat_different_objects.js]
 [browser_webconsole_repeated_messages_accuracy.js]
 skip-if = true #	Bug 1403450
deleted file mode 100644
--- a/devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_property_provider.js
+++ /dev/null
@@ -1,46 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-// Tests the property provider, which is part of the code completion
-// infrastructure.
-
-"use strict";
-
-const TEST_URI = "data:text/html;charset=utf8,<p>test the JS property provider";
-
-function test() {
-  loadTab(TEST_URI).then(testPropertyProvider);
-}
-
-function testPropertyProvider({browser}) {
-  browser.removeEventListener("load", testPropertyProvider, true);
-  let {JSPropertyProvider} = require("devtools/shared/webconsole/js-property-provider");
-
-  let tmp = Cu.import("resource://gre/modules/jsdebugger.jsm", {});
-  tmp.addDebuggerToGlobal(tmp);
-  let dbg = new tmp.Debugger();
-  let dbgWindow = dbg.addDebuggee(content);
-
-  let completion = JSPropertyProvider(dbgWindow, null, "thisIsNotDefined");
-  is(completion.matches.length, 0, "no match for 'thisIsNotDefined");
-
-  // This is a case the PropertyProvider can't handle. Should return null.
-  completion = JSPropertyProvider(dbgWindow, null, "window[1].acb");
-  is(completion, null, "no match for 'window[1].acb");
-
-  // A very advanced completion case.
-  let strComplete =
-    "function a() { }document;document.getElementById(window.locatio";
-  completion = JSPropertyProvider(dbgWindow, null, strComplete);
-  ok(completion.matches.length == 2, "two matches found");
-  ok(completion.matchProp == "locatio", "matching part is 'test'");
-  let matches = completion.matches;
-  matches.sort();
-  ok(matches[0] == "location", "the first match is 'location'");
-  ok(matches[1] == "locationbar", "the second match is 'locationbar'");
-
-  dbg.removeDebuggee(content);
-  finishTest();
-}
--- a/devtools/client/webconsole/test/browser.ini
+++ b/devtools/client/webconsole/test/browser.ini
@@ -350,18 +350,16 @@ skip-if = true # Bug 1298364
 [browser_webconsole_netlogging_reset_filter.js]
 [browser_webconsole_notifications.js]
 [browser_webconsole_open-links-without-callback.js]
 [browser_webconsole_promise.js]
 [browser_webconsole_output_copy_newlines.js]
 subsuite = clipboard
 skip-if = (os == 'linux' && bits == 32 && debug) # bug 1328915, disable linux32 debug devtools for timeouts
 [browser_webconsole_output_order.js]
-[browser_webconsole_property_provider.js]
-skip-if = e10s # Bug 1042253 - webconsole tests disabled with e10s
 [browser_webconsole_scratchpad_panel_link.js]
 [browser_webconsole_split.js]
 [browser_webconsole_split_escape_key.js]
 [browser_webconsole_split_focus.js]
 [browser_webconsole_split_persist.js]
 [browser_webconsole_trackingprotection_errors.js]
 tags = trackingprotection
 skip-if = (os == 'win' && bits == 64) # Bug 1390001
deleted file mode 100644
--- a/devtools/client/webconsole/test/browser_webconsole_property_provider.js
+++ /dev/null
@@ -1,46 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-// Tests the property provider, which is part of the code completion
-// infrastructure.
-
-"use strict";
-
-const TEST_URI = "data:text/html;charset=utf8,<p>test the JS property provider";
-
-function test() {
-  loadTab(TEST_URI).then(testPropertyProvider);
-}
-
-function testPropertyProvider({browser}) {
-  browser.removeEventListener("load", testPropertyProvider, true);
-  let {JSPropertyProvider} = require("devtools/shared/webconsole/js-property-provider");
-
-  let tmp = Cu.import("resource://gre/modules/jsdebugger.jsm", {});
-  tmp.addDebuggerToGlobal(tmp);
-  let dbg = new tmp.Debugger();
-  let dbgWindow = dbg.addDebuggee(content);
-
-  let completion = JSPropertyProvider(dbgWindow, null, "thisIsNotDefined");
-  is(completion.matches.length, 0, "no match for 'thisIsNotDefined");
-
-  // This is a case the PropertyProvider can't handle. Should return null.
-  completion = JSPropertyProvider(dbgWindow, null, "window[1].acb");
-  is(completion, null, "no match for 'window[1].acb");
-
-  // A very advanced completion case.
-  let strComplete =
-    "function a() { }document;document.getElementById(window.locatio";
-  completion = JSPropertyProvider(dbgWindow, null, strComplete);
-  ok(completion.matches.length == 2, "two matches found");
-  ok(completion.matchProp == "locatio", "matching part is 'test'");
-  let matches = completion.matches;
-  matches.sort();
-  ok(matches[0] == "location", "the first match is 'location'");
-  ok(matches[1] == "locationbar", "the second match is 'locationbar'");
-
-  dbg.removeDebuggee(content);
-  finishTest();
-}