summaryrefslogtreecommitdiffstats
path: root/devtools/client/webconsole
diff options
context:
space:
mode:
Diffstat (limited to 'devtools/client/webconsole')
-rw-r--r--devtools/client/webconsole/test/browser_webconsole_bug_585991_autocomplete_keys.js58
-rw-r--r--devtools/client/webconsole/test/browser_webconsole_hpkp_invalid-headers.js4
2 files changed, 32 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 0021a8cc1..b96dc0c8e 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");
diff --git a/devtools/client/webconsole/test/browser_webconsole_hpkp_invalid-headers.js b/devtools/client/webconsole/test/browser_webconsole_hpkp_invalid-headers.js
index 3ee33669d..39870fd54 100644
--- a/devtools/client/webconsole/test/browser_webconsole_hpkp_invalid-headers.js
+++ b/devtools/client/webconsole/test/browser_webconsole_hpkp_invalid-headers.js
@@ -14,14 +14,18 @@ const SJS_URL = "https://example.com/browser/devtools/client/webconsole/" +
"test/test_hpkp-invalid-headers.sjs";
const LEARN_MORE_URI = "https://developer.mozilla.org/docs/Web/Security/" +
"Public_Key_Pinning" + DOCS_GA_PARAMS;
+const HPKP_ENABLED_PREF = "security.cert_pinning.hpkp.enabled";
const NON_BUILTIN_ROOT_PREF = "security.cert_pinning.process_headers_from_" +
"non_builtin_roots";
add_task(function* () {
registerCleanupFunction(() => {
+ Services.prefs.clearUserPref(HPKP_ENABLED_PREF);
Services.prefs.clearUserPref(NON_BUILTIN_ROOT_PREF);
});
+ Services.prefs.setBoolPref(HPKP_ENABLED_PREF, true);
+
yield loadTab(TEST_URI);
let hud = yield openConsole();