Merge mozilla-central to inbound. a=merge on a CLOSED TREE

This commit is contained in:
Cosmin Sabou 2018-03-05 20:16:04 +02:00
Родитель de379f365d afd17d1bf7
Коммит d1fd0be305
208 изменённых файлов: 528 добавлений и 576 удалений

Просмотреть файл

@ -142,7 +142,7 @@ devtools/client/storage/test/*.html
!devtools/client/storage/test/storage-unsecured-iframe-usercontextid.html
devtools/client/webaudioeditor/**
devtools/client/webconsole/net/**
devtools/client/webconsole/new-console-output/test/mochitest/**
!devtools/client/webconsole/new-console-output/test/mochitest/**
devtools/client/webconsole/test/**
devtools/client/webconsole/webconsole-connection-proxy.js
devtools/client/webconsole/webconsole.js

Просмотреть файл

@ -69,7 +69,7 @@
let resultNode = this._placesNode;
if (!PlacesUtils.nodeIsFolder(resultNode) ||
PlacesControllerDragHelper.disallowInsertion(resultNode, this._rootView)) {
this._rootView.controller.disallowInsertion(resultNode)) {
return null;
}

Просмотреть файл

@ -118,7 +118,6 @@ support-files =
[browser_dbg-asm.js]
[browser_dbg-async-stepping.js]
[browser_dbg-babel-scopes.js]
skip-if = (os == "win" && ccov) # bug 1438797
[browser_dbg-babel-stepping.js]
[browser_dbg-breaking.js]
[browser_dbg-breaking-from-console.js]

Просмотреть файл

@ -1,6 +1,9 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
// This test can be really slow on debug platforms and should be split
requestLongerTimeout(4);
// Tests loading sourcemapped sources for Babel's compile output.
async function breakpointScopes(dbg, fixture, { line, column }, scopes) {
@ -86,8 +89,6 @@ async function assertScopes(dbg, items) {
}
add_task(async function() {
requestLongerTimeout(3);
await pushPref("devtools.debugger.features.map-scopes", true);
const dbg = await initDebugger("doc-babel.html");

Просмотреть файл

@ -327,3 +327,8 @@ webconsole.resetFiltersButton.label=Reset filters
webconsole.enablePersistentLogs.label=Persist Logs
# LOCALIZATION NOTE (webconsole.enablePersistentLogs.tooltip)
webconsole.enablePersistentLogs.tooltip=If you enable this option the output will not be cleared each time you navigate to a new page
# LOCALIZATION NOTE (webconsole.navigated): this string is used in the console when the
# current inspected page is navigated to a new location.
# Parameters: %S is the new URL.
webconsole.navigated=Navigated to %S

Просмотреть файл

@ -7,7 +7,7 @@
const { Component, createFactory } = require("devtools/client/shared/vendor/react");
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
const dom = require("devtools/client/shared/vendor/react-dom-factories");
const { connect } = require("../utils/redux-connect");
const { connect } = require("devtools/client/shared/redux/visibility-handler-connect");
// Components
loader.lazyGetter(this, "MonitorPanel", function () {

Просмотреть файл

@ -7,7 +7,7 @@
const { Component } = require("devtools/client/shared/vendor/react");
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
const dom = require("devtools/client/shared/vendor/react-dom-factories");
const { connect } = require("../utils/redux-connect");
const { connect } = require("devtools/client/shared/redux/visibility-handler-connect");
const { L10N } = require("../utils/l10n");
const { fetchNetworkUpdatePacket } = require("../utils/request-utils");
const Actions = require("../actions/index");

Просмотреть файл

@ -9,7 +9,7 @@ const { Component, createFactory } = require("devtools/client/shared/vendor/reac
const dom = require("devtools/client/shared/vendor/react-dom-factories");
const { div } = dom;
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
const { connect } = require("../utils/redux-connect");
const { connect } = require("devtools/client/shared/redux/visibility-handler-connect");
const { findDOMNode } = require("devtools/client/shared/vendor/react-dom");
const Actions = require("../actions/index");
const { updateFormDataSections } = require("../utils/request-utils");

Просмотреть файл

@ -7,7 +7,7 @@
const { createFactory } = require("devtools/client/shared/vendor/react");
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
const dom = require("devtools/client/shared/vendor/react-dom-factories");
const { connect } = require("../utils/redux-connect");
const { connect } = require("devtools/client/shared/redux/visibility-handler-connect");
const Actions = require("../actions/index");
const { getSelectedRequest } = require("../selectors/index");

Просмотреть файл

@ -7,7 +7,7 @@
const { Component, createFactory } = require("devtools/client/shared/vendor/react");
const dom = require("devtools/client/shared/vendor/react-dom-factories");
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
const { connect } = require("../utils/redux-connect");
const { connect } = require("devtools/client/shared/redux/visibility-handler-connect");
const { L10N } = require("../utils/l10n");
const {
fetchNetworkUpdatePacket,

Просмотреть файл

@ -7,7 +7,7 @@
const { Component, createFactory } = require("devtools/client/shared/vendor/react");
const dom = require("devtools/client/shared/vendor/react-dom-factories");
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
const { connect } = require("../utils/redux-connect");
const { connect } = require("devtools/client/shared/redux/visibility-handler-connect");
const { HTMLTooltip } = require("devtools/client/shared/widgets/tooltip/HTMLTooltip");
const Actions = require("../actions/index");

Просмотреть файл

@ -7,7 +7,7 @@
const { Component, createFactory } = require("devtools/client/shared/vendor/react");
const dom = require("devtools/client/shared/vendor/react-dom-factories");
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
const { connect } = require("../utils/redux-connect");
const { connect } = require("devtools/client/shared/redux/visibility-handler-connect");
const Actions = require("../actions/index");
const { ACTIVITY_TYPE } = require("../constants");
const { L10N } = require("../utils/l10n");

Просмотреть файл

@ -7,7 +7,7 @@
const { Component } = require("devtools/client/shared/vendor/react");
const dom = require("devtools/client/shared/vendor/react-dom-factories");
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
const { connect } = require("../utils/redux-connect");
const { connect } = require("devtools/client/shared/redux/visibility-handler-connect");
const { getTheme, addThemeObserver, removeThemeObserver } =
require("devtools/client/shared/theme");
const Actions = require("../actions/index");

Просмотреть файл

@ -9,7 +9,7 @@ const { FILTER_TAGS } = require("../constants");
const { Component, createFactory } = require("devtools/client/shared/vendor/react");
const dom = require("devtools/client/shared/vendor/react-dom-factories");
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
const { connect } = require("../utils/redux-connect");
const { connect } = require("devtools/client/shared/redux/visibility-handler-connect");
const { Chart } = require("devtools/client/shared/widgets/Chart");
const { PluralForm } = require("devtools/shared/plural-form");
const Actions = require("../actions/index");

Просмотреть файл

@ -6,7 +6,7 @@
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
const dom = require("devtools/client/shared/vendor/react-dom-factories");
const { connect } = require("../utils/redux-connect");
const { connect } = require("devtools/client/shared/redux/visibility-handler-connect");
const { PluralForm } = require("devtools/shared/plural-form");
const Actions = require("../actions/index");
const {

Просмотреть файл

@ -8,7 +8,7 @@ const Services = require("Services");
const { Component, createFactory } = require("devtools/client/shared/vendor/react");
const dom = require("devtools/client/shared/vendor/react-dom-factories");
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
const { connect } = require("../utils/redux-connect");
const { connect } = require("devtools/client/shared/redux/visibility-handler-connect");
const Actions = require("../actions/index");
const { FILTER_SEARCH_DELAY, FILTER_TAGS } = require("../constants");

Просмотреть файл

@ -18,7 +18,6 @@ DevToolsModules(
'menu.js',
'open-request-in-tab.js',
'prefs.js',
'redux-connect.js',
'request-utils.js',
'sort-predicates.js',
'sort-utils.js'

Просмотреть файл

@ -11,4 +11,5 @@ DIRS += [
DevToolsModules(
'create-store.js',
'non-react-subscriber.js',
'visibility-handler-connect.js',
)

Просмотреть файл

@ -14,7 +14,7 @@ const { connect } = require("devtools/client/shared/vendor/react-redux");
* originally passed in. The HOC is responsible for not causing
* rendering if the owner panel runs in the background.
*/
function connectWrapper() {
function visibilityHandlerConnect() {
let args = [].slice.call(arguments);
return component => {
return connect(...args)(props => {
@ -24,5 +24,5 @@ function connectWrapper() {
}
module.exports = {
connect: connectWrapper
connect: visibilityHandlerConnect
};

Просмотреть файл

@ -3,10 +3,10 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const { Component, createElement, createFactory } = require("devtools/client/shared/vendor/react");
const { Component, createFactory } = require("devtools/client/shared/vendor/react");
const dom = require("devtools/client/shared/vendor/react-dom-factories");
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
const { connect } = require("devtools/client/shared/vendor/react-redux");
const { connect } = require("devtools/client/shared/redux/visibility-handler-connect");
const {initialize} = require("devtools/client/webconsole/new-console-output/actions/ui");
const {
@ -18,7 +18,6 @@ const {
getAllRepeatById,
} = require("devtools/client/webconsole/new-console-output/selectors/messages");
const MessageContainer = createFactory(require("devtools/client/webconsole/new-console-output/components/MessageContainer").MessageContainer);
const VisibilityHandler = createFactory(require("devtools/client/shared/components/VisibilityHandler"));
const {
MESSAGE_TYPE,
} = require("devtools/client/webconsole/new-console-output/constants");
@ -195,9 +194,4 @@ function mapStateToProps(state, props) {
};
}
module.exports = connect(mapStateToProps)(props =>
VisibilityHandler(
null,
createElement(ConsoleOutput, props)
)
);
module.exports = connect(mapStateToProps)(ConsoleOutput);

Просмотреть файл

@ -7,6 +7,7 @@ support-files =
code_bundle_nosource.js
code_bundle_nosource.js.map
head.js
sjs_cors-test-server.sjs
sjs_slow-response-test-server.sjs
source-mapped.css
source-mapped.css.map
@ -232,7 +233,6 @@ skip-if = os != 'mac' # The tested ctrl+key shortcuts are OSX only
[browser_jsterm_popup.js]
[browser_jsterm_selfxss.js]
subsuite = clipboard
[browser_netmonitor_shows_reqs_in_webconsole.js]
[browser_webconsole_allow_mixedcontent_securityerrors.js]
tags = mcb
[browser_webconsole_batching.js]
@ -339,6 +339,7 @@ subsuite = clipboard
[browser_webconsole_scroll.js]
[browser_webconsole_select_all.js]
[browser_webconsole_show_subresource_security_errors.js]
[browser_webconsole_shows_reqs_from_netmonitor.js]
[browser_webconsole_shows_reqs_in_netmonitor.js]
[browser_webconsole_sourcemap_css.js]
[browser_webconsole_sourcemap_error.js]

Просмотреть файл

@ -3,6 +3,8 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* import-globals-from head.js */
// Check that exceptions from scripts loaded with the addon-sdk loader are
// opened correctly in View Source from the Browser Console.
// See bug 866950.

Просмотреть файл

@ -3,6 +3,8 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* import-globals-from head.js */
// Check that console.clear() does not clear the output of the browser console.
"use strict";

Просмотреть файл

@ -6,7 +6,7 @@
// Check that we display the expected context menu entries.
const TEST_URI = "http://example.com/browser/devtools/client/webconsole/" +
"new-console-output/test/mochitest/test-console.html";
"new-console-output/test/mochitest/test-console.html";
add_task(async function () {
// Enable net messages in the console for this test.
@ -64,6 +64,6 @@ function getSimplifiedContextMenu(popupElement) {
.map(entry => {
const key = entry.getAttribute("accesskey");
const disabled = entry.hasAttribute("disabled");
return `#${entry.id} (${key})${disabled ? " [disabled]": ""}`
return `#${entry.id} (${key})${disabled ? " [disabled]" : ""}`;
});
}

Просмотреть файл

@ -6,10 +6,9 @@
"use strict";
const TEST_URI = `data:text/html,<meta charset=utf8>console API calls`;
const TEST_URI = `data:text/html,<meta charset=utf8>console API calls`
add_task(async function() {
add_task(async function () {
await addTab(TEST_URI);
const hud = await HUDService.toggleBrowserConsole();

Просмотреть файл

@ -3,6 +3,8 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* import-globals-from head.js */
// Bug 874061: test for how the browser and web consoles display messages coming
// from private windows. See bug for description of expected behavior.
@ -24,8 +26,9 @@ function test() {
start();
function start() {
gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser, "data:text/html;charset=utf8," +
"<p>hello world! I am not private!");
gBrowser.selectedTab =
BrowserTestUtils.addTab(gBrowser, "data:text/html;charset=utf8," +
"<p>hello world! I am not private!");
gBrowser.selectedBrowser.addEventListener("load", onLoadTab, true);
}

Просмотреть файл

@ -3,6 +3,8 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* import-globals-from head.js */
// Tests that the autocomplete input is being blurred and focused when selecting a value.
// This will help screen-readers notify users of the value that was set in the input.

Просмотреть файл

@ -3,6 +3,8 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* import-globals-from head.js */
// Test that user input that is not submitted in the command line input is not
// lost after navigating in history.
// See https://bugzilla.mozilla.org/show_bug.cgi?id=817834

Просмотреть файл

@ -19,9 +19,7 @@ add_task(async function () {
let { jsterm } = await openNewTabAndConsole(TEST_URI);
const {
autocompletePopup: popup,
completeNode,
inputNode,
autocompletePopup: popup
} = jsterm;
let onPopUpOpen = popup.once("popup-opened");

Просмотреть файл

@ -3,6 +3,8 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* import-globals-from head.js */
// Tests that the cached autocomplete results are used when the new
// user input is a subset of the existing completion results.

Просмотреть файл

@ -1,6 +1,8 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* import-globals-from head.js */
// Test that autocomplete doesn't break when trying to reach into objects from
// a different domain. See Bug 989025.

Просмотреть файл

@ -29,7 +29,6 @@ add_task(async function () {
const {
autocompletePopup: popup,
completeNode,
inputNode,
} = jsterm;
let onPopUpOpen = popup.once("popup-opened");

Просмотреть файл

@ -3,6 +3,8 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* import-globals-from head.js */
// Tests that, when the user types an extraneous closing bracket, no error
// appears. See Bug 592442.
@ -17,6 +19,6 @@ add_task(async function () {
await jstermSetValueAndComplete(jsterm, "document.getElementById)");
ok(true, "no error was thrown when an extraneous bracket was inserted");
} catch (ex) {
ok(false, "an error was thrown when an extraneous bracket was inserted")
ok(false, "an error was thrown when an extraneous bracket was inserted");
}
});

Просмотреть файл

@ -3,12 +3,13 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* import-globals-from head.js */
// Tests that the autocompletion results contain the names of JSTerm helpers.
// See Bug 686937.
"use strict";
const TEST_URI = "data:text/html;charset=utf8,<p>test JSTerm Helpers autocomplete";
add_task(async function () {
@ -34,4 +35,4 @@ function complete(jsterm) {
function getPopupItemsLabel(popup) {
return popup.getItems().map(item => item.label);
}
}

Просмотреть файл

@ -3,6 +3,8 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* import-globals-from head.js */
// Tests that code completion works properly in chrome tabs, like about:config.
"use strict";

Просмотреть файл

@ -3,6 +3,8 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* import-globals-from head.js */
// Test that makes sure web console autocomplete happens in the user-selected
// stackframe from the js debugger.

Просмотреть файл

@ -3,6 +3,8 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* import-globals-from head.js */
// Tests that native getters (e.g. document.body) autocompletes in the web console.
// See Bug 651501.

Просмотреть файл

@ -31,7 +31,6 @@ add_task(async function () {
const {
autocompletePopup: popup,
completeNode,
inputNode,
} = jsterm;
ok(!popup.isOpen, "popup is not open");

Просмотреть файл

@ -34,7 +34,6 @@ add_task(async function () {
const {
autocompletePopup: popup,
completeNode,
inputNode,
} = jsterm;
let onPopUpOpen = popup.once("popup-opened");

Просмотреть файл

@ -21,7 +21,6 @@ add_task(async function () {
const {
autocompletePopup: popup,
completeNode,
inputNode,
} = jsterm;
const onPopUpOpen = popup.once("popup-opened");

Просмотреть файл

@ -3,6 +3,8 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* import-globals-from head.js */
// Tests that code completion works properly.
"use strict";
@ -27,7 +29,8 @@ add_task(async function () {
// Test typing 'window.Ob' and press tab. Just 'window.O' is
// ambiguous: could be window.Object, window.Option, etc.
await jstermSetValueAndComplete(jsterm, "window.Ob", undefined, jsterm.COMPLETE_FORWARD);
await jstermSetValueAndComplete(jsterm, "window.Ob", undefined,
jsterm.COMPLETE_FORWARD);
is(input.value, "window.Object", "'window.Ob' tab completion");
// Test typing 'document.getElem'.

Просмотреть файл

@ -3,6 +3,8 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* import-globals-from head.js */
// Tests that the `copy` console helper works as intended.
"use strict";

Просмотреть файл

@ -3,6 +3,8 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* import-globals-from head.js */
// Map Control + A to Select All, In the web console input
/* import-globals-from head.js */

Просмотреть файл

@ -3,6 +3,8 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* import-globals-from head.js */
// Test navigation of webconsole contents via ctrl-a, ctrl-e, ctrl-p, ctrl-n
// see https://bugzilla.mozilla.org/show_bug.cgi?id=804845
//

Просмотреть файл

@ -23,7 +23,7 @@ add_task(async function () {
let title = ErrorDocs.GetURL({ errorMessageName }).split("?")[0];
jsterm.clearOutput();
const onMessage = waitForMessage(hud, "RangeError:")
const onMessage = waitForMessage(hud, "RangeError:");
jsterm.execute(expression);
const {node} = await onMessage;
const learnMoreLink = node.querySelector(".learn-more-link");

Просмотреть файл

@ -3,6 +3,8 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* import-globals-from head.js */
// Tests the console history feature accessed via the up and down arrow keys.
"use strict";

Просмотреть файл

@ -3,6 +3,8 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* import-globals-from head.js */
// Test that console command input is persisted across toolbox loads.
// See Bug 943306.
@ -14,7 +16,7 @@ const TEST_URI = "data:text/html;charset=utf-8,Web Console test for " +
"persisting history - bug 943306";
const INPUT_HISTORY_COUNT = 10;
add_task(async function() {
add_task(async function () {
info("Setting custom input history pref to " + INPUT_HISTORY_COUNT);
Services.prefs.setIntPref("devtools.webconsole.inputHistoryCount", INPUT_HISTORY_COUNT);

Просмотреть файл

@ -3,6 +3,8 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* import-globals-from head.js */
// Check that the inspect() jsterm helper function works.
"use strict";

Просмотреть файл

@ -3,12 +3,14 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* import-globals-from head.js */
// Tests for bug 704295
"use strict";
const TEST_URI = "http://example.com/browser/devtools/client/webconsole/" +
"test/test-console.html";
"new-console-output/test/mochitest/test-console.html";
add_task(async function () {
let hud = await openNewTabAndConsole(TEST_URI);

Просмотреть файл

@ -9,7 +9,7 @@
const TEST_URI = "data:text/html,Testing jsterm with no input";
add_task(async function() {
add_task(async function () {
let hud = await openNewTabAndConsole(TEST_URI);
testCompletion(hud);
});

Просмотреть файл

@ -9,7 +9,7 @@
const TEST_URI = "data:text/html,Testing jsterm focus";
add_task(async function() {
add_task(async function () {
let hud = await openNewTabAndConsole(TEST_URI);
let jsterm = hud.jsterm;
let input = jsterm.inputNode;

Просмотреть файл

@ -3,6 +3,8 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* import-globals-from head.js */
// Test that the autocomplete popup closes on switching tabs. See bug 900448.
"use strict";

Просмотреть файл

@ -3,6 +3,8 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* import-globals-from head.js */
// The test loads a web page with mixed active and display content
// on it while the "block mixed content" settings are _off_.
// It then checks that the loading mixed content warning messages
@ -14,9 +16,10 @@
"use strict";
const TEST_URI = "https://example.com/browser/devtools/client/webconsole/" +
"new-console-output/test/mochitest/test-mixedcontent-securityerrors.html";
const LEARN_MORE_URI =
"https://developer.mozilla.org/docs/Web/Security/Mixed_content" + DOCS_GA_PARAMS;
"new-console-output/test/mochitest/" +
"test-mixedcontent-securityerrors.html";
const LEARN_MORE_URI = "https://developer.mozilla.org/docs/Web/Security/" +
"Mixed_content" + DOCS_GA_PARAMS;
add_task(async function () {
await Promise.all([
@ -47,7 +50,7 @@ add_task(async function () {
const checkLink = ({ link, where, expectedLink, expectedTab }) => {
is(link, expectedLink, `Clicking the provided link opens ${link}`);
is(where, expectedTab, `Clicking the provided link opens in expected tab`);
}
};
info("Clicking on the Learn More link");
const learnMoreLink = mixedActiveContentMessage.querySelector(".learn-more-link");

Просмотреть файл

@ -7,10 +7,11 @@
// Check adding console calls as batch keep the order of the message.
const TEST_URI = "http://example.com/browser/devtools/client/webconsole/new-console-output/test/mochitest/test-batching.html";
const TEST_URI = "http://example.com/browser/devtools/client/webconsole/" +
"new-console-output/test/mochitest/test-batching.html";
const { l10n } = require("devtools/client/webconsole/new-console-output/utils/messages");
add_task(async function() {
add_task(async function () {
let hud = await openNewTabAndConsole(TEST_URI);
const messageNumber = 100;
await testSimpleBatchLogging(hud, messageNumber);

Просмотреть файл

@ -3,6 +3,8 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* import-globals-from head.js */
// The test loads a web page with mixed active and display content
// on it while the "block mixed content" settings are _on_.
// It then checks that the blocked mixed content warning messages
@ -17,9 +19,10 @@
"use strict";
const TEST_URI = "https://example.com/browser/devtools/client/webconsole/" +
"new-console-output/test/mochitest/test-mixedcontent-securityerrors.html";
const LEARN_MORE_URI =
"https://developer.mozilla.org/docs/Web/Security/Mixed_content" + DOCS_GA_PARAMS;
"new-console-output/test/mochitest/" +
"test-mixedcontent-securityerrors.html";
const LEARN_MORE_URI = "https://developer.mozilla.org/docs/Web/Security/" +
"Mixed_content" + DOCS_GA_PARAMS;
const blockedActiveContentText = "Blocked loading mixed active content " +
"\u201chttp://example.com/\u201d";
@ -28,9 +31,10 @@ const blockedDisplayContentText = "Blocked loading mixed display content " +
const activeContentText = "Loading mixed (insecure) active content " +
"\u201chttp://example.com/\u201d on a secure page";
const displayContentText = "Loading mixed (insecure) display content " +
"\u201chttp://example.com/tests/image/test/mochitest/blue.png\u201d on a secure page";
"\u201chttp://example.com/tests/image/test/mochitest/blue.png\u201d on a " +
"secure page";
add_task(async function() {
add_task(async function () {
await pushPrefEnv();
const hud = await openNewTabAndConsole(TEST_URI);

Просмотреть файл

@ -3,15 +3,18 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* import-globals-from head.js */
// Test to see if the cached messages are displayed when the console UI is
// opened.
"use strict";
const TEST_URI = "http://example.com/browser/devtools/client/webconsole/" +
"new-console-output/test/mochitest/test-webconsole-error-observer.html";
"new-console-output/test/mochitest/" +
"test-webconsole-error-observer.html";
add_task(async function() {
add_task(async function () {
// On e10s, the exception is triggered in child process
// and is ignored by test harness
if (!Services.appinfo.browserTabsRemoteAutostart) {

Просмотреть файл

@ -3,12 +3,14 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* import-globals-from head.js */
// Test that the cd() jsterm helper function works as expected. See bug 609872.
"use strict";
const TEST_URI = "http://example.com/browser/devtools/client/webconsole/" +
"new-console-output/test/mochitest/test-cd-iframe-parent.html";
"new-console-output/test/mochitest/test-cd-iframe-parent.html";
add_task(async function () {
const hud = await openNewTabAndConsole(TEST_URI);

Просмотреть файл

@ -3,6 +3,8 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* import-globals-from head.js */
// Tests that the Web Console shows weak crypto warnings (SHA-1 Certificate)
"use strict";
@ -15,9 +17,6 @@ const SHA1_URL = "https://sha1ee.example.com" + TEST_URI_PATH;
const SHA256_URL = "https://sha256ee.example.com" + TEST_URI_PATH;
const TRIGGER_MSG = "If you haven't seen ssl warnings yet, you won't";
const cache = Cc["@mozilla.org/netwerk/cache-storage-service;1"]
.getService(Ci.nsICacheStorageService);
add_task(async function () {
const hud = await openNewTabAndConsole(TEST_URI);
@ -41,5 +40,5 @@ add_task(async function () {
ok(!textContent.includes("SSL 3.0"), "There is no warning message for SSL 3.0");
ok(!textContent.includes("RC4"), "There is no warning message for RC4");
cache.clear();
Services.cache2.clear();
});

Просмотреть файл

@ -3,12 +3,15 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* import-globals-from head.js */
// Tests that clicking on a function displays its source in the debugger. See Bug 1050691.
"use strict";
const TEST_URI = "http://example.com/browser/devtools/client/webconsole/" +
"new-console-output/test/mochitest/test-click-function-to-source.html";
"new-console-output/test/mochitest/" +
"test-click-function-to-source.html";
// Force the old debugger UI since it's directly used (see Bug 1301705)
pushPref("devtools.debugger.new-debugger-frontend", false);
@ -20,16 +23,16 @@ add_task(async function () {
const {panel} = await openDebugger();
let panelWin = panel.panelWin;
info("And right after come back to the Console panel.")
info("And right after come back to the Console panel.");
await openConsole();
info("Log a function");
const onLoggedFunction = waitForMessage(hud, "function foo")
const onLoggedFunction = waitForMessage(hud, "function foo");
ContentTask.spawn(gBrowser.selectedBrowser, {}, function () {
content.wrappedJSObject.foo();
});
const {node} = await onLoggedFunction;
const jumpIcon = node.querySelector(".jump-definition")
const jumpIcon = node.querySelector(".jump-definition");
ok(jumpIcon, "A jump to definition button is rendered, as expected");
info("Click on the jump to definition button.");
@ -40,5 +43,6 @@ add_task(async function () {
const {editor} = panelWin.DebuggerView;
const {line, ch} = editor.getCursor();
// Source editor starts counting line and column numbers from 0.
ok(line === 6 && ch === 0, "Debugger is open at the expected position");
is(line, 8, "Debugger is open at the expected line");
is(ch, 0, "Debugger is open at the expected character");
});

Просмотреть файл

@ -1,6 +1,8 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* import-globals-from head.js */
// When strings containing URLs are entered into the webconsole,
// ensure that the output can be clicked to open those URLs.
// This test only check that clicking on a link works as expected,

Просмотреть файл

@ -3,6 +3,8 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* import-globals-from head.js */
// Test that the sidebar is hidden for all methods of closing it.
"use strict";

Просмотреть файл

@ -3,6 +3,8 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* import-globals-from head.js */
// Tests to ensure that errors don't appear when the console is closed while a
// completion is being performed. See Bug 580001.

Просмотреть файл

@ -3,13 +3,15 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* import-globals-from head.js */
// Check that inspecting a closure in the variables view sidebar works when
// execution is paused.
"use strict";
const TEST_URI = "http://example.com/browser/devtools/client/webconsole/" +
"test/test-closures.html";
"new-console-output/test/mochitest/test-closures.html";
var gWebConsole, gJSTerm, gVariablesView;
@ -38,7 +40,8 @@ function test() {
let deferred = defer();
fetchScopes(hud, toolbox, panelWin, deferred);
ContentTask.spawn(gBrowser.selectedBrowser, {}, function* () {
// eslint-disable-next-line
ContentTask.spawn(gBrowser.selectedBrowser, {}, () => {
let button = content.document.querySelector("button");
ok(button, "button element found");
button.click();

Просмотреть файл

@ -17,7 +17,7 @@ add_task(async function () {
await waitFor(() => findMessage(hud, loggedString));
ok(true, "The initial message is displayed in the console");
// Create a promise for the message logged after the reload.
const onMessage = waitForMessage(hud, loggedString)
const onMessage = waitForMessage(hud, loggedString);
BrowserReload();
await onMessage;
ok(true, "The message is also displayed after a page reload");

Просмотреть файл

@ -3,6 +3,8 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* import-globals-from head.js */
// Make sure that the Web Console output does not break after we try to call
// console.dir() for objects that are not inspectable.

Просмотреть файл

@ -8,8 +8,10 @@
// Check console.group, console.groupCollapsed and console.groupEnd calls
// behave as expected.
const TEST_URI = "http://example.com/browser/devtools/client/webconsole/new-console-output/test/mochitest/test-console-group.html";
const { INDENT_WIDTH } = require("devtools/client/webconsole/new-console-output/components/MessageIndent");
const TEST_URI = "http://example.com/browser/devtools/client/webconsole/" +
"new-console-output/test/mochitest/test-console-group.html";
const { INDENT_WIDTH } =
require("devtools/client/webconsole/new-console-output/components/MessageIndent");
add_task(async function () {
const hud = await openNewTabAndConsole(TEST_URI);
@ -30,8 +32,8 @@ add_task(async function () {
node,
store,
shouldBeOpen: true,
visibleMessageIdsAfterExpand: ["1","2","3","4","6","8","9","12"],
visibleMessageIdsAfterCollapse: ["1","8","9","12"],
visibleMessageIdsAfterExpand: ["1", "2", "3", "4", "6", "8", "9", "12"],
visibleMessageIdsAfterCollapse: ["1", "8", "9", "12"],
});
info("Test a message in a 1 level deep group");
@ -47,8 +49,8 @@ add_task(async function () {
node,
store,
shouldBeOpen: true,
visibleMessageIdsAfterExpand: ["1","2","3","4","6","8","9","12"],
visibleMessageIdsAfterCollapse: ["1","2","3","6","8","9","12"],
visibleMessageIdsAfterExpand: ["1", "2", "3", "4", "6", "8", "9", "12"],
visibleMessageIdsAfterCollapse: ["1", "2", "3", "6", "8", "9", "12"],
});
info("Test a message in a 2 level deep group");
@ -74,8 +76,8 @@ add_task(async function () {
node,
store,
shouldBeOpen: false,
visibleMessageIdsAfterExpand: ["1","2","3","4","6","8","9","10","12"],
visibleMessageIdsAfterCollapse: ["1","2","3","4","6","8","9","12"]
visibleMessageIdsAfterExpand: ["1", "2", "3", "4", "6", "8", "9", "10", "12"],
visibleMessageIdsAfterCollapse: ["1", "2", "3", "4", "6", "8", "9", "12"]
});
info("Test a message at root level, after closing a collapsed group");
@ -104,23 +106,23 @@ async function testGroupToggle({
visibleMessageIdsAfterCollapse
}) {
let toggleArrow = node.querySelector(".theme-twisty");
const isOpen = node => node.classList.contains("open");
const isOpen = node2 => node2.classList.contains("open");
const assertVisibleMessageIds = (expanded) => {
let visibleMessageIds = store.getState().messages.visibleMessages;
expanded ? is(visibleMessageIds.toString(), visibleMessageIdsAfterExpand.toString()) :
is(visibleMessageIds.toString(), visibleMessageIdsAfterCollapse.toString());
}
};
await waitFor(() => isOpen(node) === shouldBeOpen)
await waitFor(() => isOpen(node) === shouldBeOpen);
assertVisibleMessageIds(shouldBeOpen);
toggleArrow.click();
shouldBeOpen = !shouldBeOpen;
await waitFor(() => isOpen(node) === shouldBeOpen)
await waitFor(() => isOpen(node) === shouldBeOpen);
assertVisibleMessageIds(shouldBeOpen);
toggleArrow.click();
shouldBeOpen = !shouldBeOpen;
await waitFor(() => isOpen(node) === shouldBeOpen)
await waitFor(() => isOpen(node) === shouldBeOpen);
assertVisibleMessageIds(shouldBeOpen);
}
}

Просмотреть файл

@ -3,6 +3,8 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* import-globals-from head.js */
// Tests that the basic console.log()-style APIs and filtering work for
// sharedWorkers

Просмотреть файл

@ -8,7 +8,8 @@
// Check console.table calls with all the test cases shown
// in the MDN doc (https://developer.mozilla.org/en-US/docs/Web/API/Console/table)
const TEST_URI = "http://example.com/browser/devtools/client/webconsole/new-console-output/test/mochitest/test-console-table.html";
const TEST_URI = "http://example.com/browser/devtools/client/webconsole/" +
"new-console-output/test/mochitest/test-console-table.html";
add_task(function* () {
let toolbox = yield openNewTabAndToolbox(TEST_URI, "webconsole");

Просмотреть файл

@ -25,27 +25,27 @@ add_task(async function testTraceMessages() {
variable: "console.trace()",
repeats: 3,
filename: "test-console-trace-duplicates.html",
line: 23,
line: 24,
column: 3,
stack: [{
functionName: "foo3",
filename: TEST_URI,
line: 23,
line: 24,
column: 3
}, {
functionName: "foo2",
filename: TEST_URI,
line: 19,
line: 20,
column: 3
}, {
functionName: "foo1",
filename: TEST_URI,
line: 11,
line: 12,
column: 3
}, {
functionName: "<anonymous>",
filename: TEST_URI,
line: 26,
line: 27,
column: 1
}]
});

Просмотреть файл

@ -28,7 +28,7 @@ const TEST_URI = `data:text/html;charset=utf-8,<script>
// Test the Copy menu item of the webconsole copies the expected clipboard text for
// different log messages.
add_task(async function() {
add_task(async function () {
let observer = new PrefObserver("");
let onPrefUpdated = observer.once(PREF_MESSAGE_TIMESTAMP, () => {});
Services.prefs.setBoolPref(PREF_MESSAGE_TIMESTAMP, true);

Просмотреть файл

@ -3,16 +3,19 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* import-globals-from head.js */
// Test the Copy Link Location menu item of the webconsole is displayed for network
// messages and copies the expected URL.
"use strict";
const TEST_URI = "http://example.com/browser/devtools/client/webconsole/" +
"new-console-output/test/mochitest/test-console.html?_date=" + Date.now();
"new-console-output/test/mochitest/test-console.html?_date=" +
Date.now();
const CONTEXT_MENU_ID = "#console-menu-copy-url";
add_task(async function() {
add_task(async function () {
// Enable net messages in the console for this test.
await pushPref("devtools.webconsole.filter.net", true);

Просмотреть файл

@ -1,6 +1,8 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* import-globals-from head.js */
// Test the "Copy object" menu item of the webconsole is enabled only when
// clicking on messages that are associated with an object actor.
@ -22,7 +24,7 @@ const TEST_URI = `data:text/html;charset=utf-8,<script>
</script>`;
const copyObjectMenuItemId = "#console-menu-copy-object";
add_task(async function() {
add_task(async function () {
let hud = await openNewTabAndConsole(TEST_URI);
let [msgWithText, msgWithObj, msgNested] =

Просмотреть файл

@ -3,6 +3,8 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* import-globals-from head.js */
// Test that the "Open in sidebar" context menu entry is active for
// the correct objects and opens the sidebar when clicked.

Просмотреть файл

@ -3,15 +3,17 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* import-globals-from head.js */
// Test that the Open URL in new Tab menu item is displayed for network logs and works as
// expected.
"use strict";
const TEST_URI = "http://example.com/browser/devtools/client/webconsole/" +
"new-console-output/test/mochitest/test-console.html";
"new-console-output/test/mochitest/test-console.html";
add_task(async function() {
add_task(async function () {
// Enable net messages in the console for this test.
await pushPref("devtools.webconsole.filter.net", true);

Просмотреть файл

@ -3,6 +3,8 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* import-globals-from head.js */
// Test the "Store as global variable" menu item of the webconsole is enabled only when
// clicking on messages that are associated with an object actor.
@ -20,7 +22,7 @@ const TEST_URI = `data:text/html;charset=utf-8,<script>
console.log("foo", window.symbol);
</script>`;
add_task(async function() {
add_task(async function () {
let hud = await openNewTabAndConsole(TEST_URI);
let messages = await waitFor(() => findMessages(hud, "foo"));
@ -57,7 +59,8 @@ add_task(async function() {
content.console.log("foo", obj);
});
let msgInvisible = (await onMessageInvisible).node;
await storeAsVariable(hud, msgInvisible, "object", varIdx++, "window.invisibleToDebugger");
await storeAsVariable(hud, msgInvisible, "object", varIdx++,
"window.invisibleToDebugger");
});
async function storeAsVariable(hud, msg, type, varIdx, equalTo) {

Просмотреть файл

@ -3,6 +3,8 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* import-globals-from head.js */
// Tests that a file with an unsupported CSP directive ('reflected-xss filter')
// displays the appropriate message to the console. See Bug 1045902.
@ -10,16 +12,13 @@
const EXPECTED_RESULT = "Not supporting directive \u2018reflected-xss\u2019. " +
"Directive and values will be ignored.";
const TEST_FILE =
"http://example.com/browser/devtools/client/webconsole/new-console-output/test/" +
"mochitest/test_console_csp_ignore_reflected_xss_message.html";
const TEST_FILE = "http://example.com/browser/devtools/client/webconsole/" +
"new-console-output/test/mochitest/" +
"test_console_csp_ignore_reflected_xss_message.html";
const TEST_URI =
"data:text/html;charset=utf8,Web Console CSP ignoring reflected XSS (bug 1045902)";
const cache = Cc["@mozilla.org/netwerk/cache-storage-service;1"]
.getService(Ci.nsICacheStorageService);
add_task(async function () {
const hud = await openNewTabAndConsole(TEST_URI);
await loadDocument(TEST_FILE);
@ -27,5 +26,5 @@ add_task(async function () {
await waitFor(() => findMessage(hud, EXPECTED_RESULT, ".message.warn"));
ok(true, `CSP logs displayed in console when using "reflected-xss" directive`);
cache.clear();
Services.cache2.clear();
});

Просмотреть файл

@ -3,6 +3,8 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* import-globals-from head.js */
// Tests that the Web Console CSP messages for two META policies
// are correctly displayed. See Bug 1247459.

Просмотреть файл

@ -16,9 +16,7 @@ add_task(async function () {
info("Closing console");
await closeConsole();
const isFocused = await ContentTask.spawn(gBrowser.selectedBrowser, { }, function () {
const cmp = "@mozilla.org/focus-manager;1";
const fm = Cc[cmp].getService(Ci.nsIFocusManager);
return fm.focusedWindow == content;
return Services.focus.focusedWindow == content;
});
ok(isFocused, "content document has focus after closing the console");
});

Просмотреть файл

@ -1,14 +1,15 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* import-globals-from head.js */
// Tests that exceptions thrown by content don't show up twice in the Web
// Console. See Bug 582201.
"use strict";
const INIT_URI = "data:text/html;charset=utf8,hello world";
const TEST_URI = "http://example.com/browser/devtools/client/webconsole/" +
"new-console-output/test/mochitest/test-duplicate-error.html";
"new-console-output/test/mochitest/test-duplicate-error.html";
add_task(async function () {
// On e10s, the exception is triggered in child process
@ -23,5 +24,5 @@ add_task(async function () {
const errorMessages = hud.outputNode.querySelectorAll(".message.error");
is(errorMessages.length, 1, "There's only one error message for fooDuplicateError1");
is(errorMessages[0].querySelector(".message-repeats"), null,
"There is no repeat bubble on the error message")
"There is no repeat bubble on the error message");
});

Просмотреть файл

@ -3,6 +3,8 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* import-globals-from head.js */
// Tests that errors still show up in the Web Console after a page reload.
// See bug 580030: the error handler fails silently after page reload.
// https://bugzilla.mozilla.org/show_bug.cgi?id=580030

Просмотреть файл

@ -3,6 +3,8 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* import-globals-from head.js */
// Test that makes sure web console eval happens in the user-selected stackframe
// from the js debugger.
@ -76,7 +78,7 @@ add_task(async function () {
await onResultMessage;
ok(true, "`foo + foo3` updated in `firstCall()`");
await ContentTask.spawn(gBrowser.selectedBrowser, null, function() {
await ContentTask.spawn(gBrowser.selectedBrowser, null, function () {
is(content.wrappedJSObject.foo, "globalFooBug783499", "`foo` in content window");
is(content.wrappedJSObject.foo2, "newFoo", "`foo2` in content window");
ok(!content.wrappedJSObject.foo3, "`foo3` was not added to the content window");

Просмотреть файл

@ -3,6 +3,8 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* import-globals-from head.js */
// Test to make sure that web console commands can fire while paused at a
// breakpoint that was triggered from a JS call. Relies on asynchronous js
// evaluation over the protocol - see Bug 1088861.

Просмотреть файл

@ -3,6 +3,8 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* import-globals-from head.js */
// Tests that commands run by the user are executed in content space.
"use strict";

Просмотреть файл

@ -8,7 +8,8 @@
// See Bug 597136.
const TEST_URI = "http://example.com/browser/devtools/client/webconsole/" +
"new-console-output/test/mochitest/test-external-script-errors.html";
"new-console-output/test/mochitest/" +
"test-external-script-errors.html";
add_task(async function () {
// On e10s, the exception is triggered in child process

Просмотреть файл

@ -61,7 +61,6 @@ add_task(async function () {
await onMessagesUnFiltered;
is(outputContainer.scrollTop, 0,
"The console is still scrolled to the top after clearing the filter");
});
function hasVerticalOverflow(container) {

Просмотреть файл

@ -9,7 +9,8 @@
"use strict";
const TEST_URI = "http://example.com/browser/devtools/client/webconsole/new-console-output/test/mochitest/test-console-filters.html";
const TEST_URI = "http://example.com/browser/devtools/client/webconsole/" +
"new-console-output/test/mochitest/test-console-filters.html";
add_task(async function () {
const hud = await openNewTabAndConsole(TEST_URI);

Просмотреть файл

@ -3,13 +3,16 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* import-globals-from head.js */
// Tests all filters persist.
"use strict";
const TEST_URI = "http://example.com/browser/devtools/client/webconsole/new-console-output/test/mochitest/test-console-filters.html";
const TEST_URI = "http://example.com/browser/devtools/client/webconsole/" +
"new-console-output/test/mochitest/test-console-filters.html";
add_task(async function() {
add_task(async function () {
let hud = await openNewTabAndConsole(TEST_URI);
let filterButtons = await getFilterButtons(hud);

Просмотреть файл

@ -1,6 +1,8 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* import-globals-from head.js */
// Tests that the $0 console helper works as intended. See Bug 653531.
"use strict";

Просмотреть файл

@ -1,6 +1,8 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* import-globals-from head.js */
// Tests that errors about invalid HPKP security headers are logged to the web console.
"use strict";
@ -8,8 +10,8 @@
const TEST_URI = "data:text/html;charset=utf-8,Web Console HPKP invalid header test";
const SJS_URL = "https://example.com/browser/devtools/client/webconsole/" +
"new-console-output/test/mochitest/test_hpkp-invalid-headers.sjs";
const LEARN_MORE_URI =
"https://developer.mozilla.org/docs/Web/HTTP/Public_Key_Pinning" + DOCS_GA_PARAMS;
const LEARN_MORE_URI = "https://developer.mozilla.org/docs/Web/HTTP/" +
"Public_Key_Pinning" + DOCS_GA_PARAMS;
const NON_BUILTIN_ROOT_PREF =
"security.cert_pinning.process_headers_from_non_builtin_roots";

Просмотреть файл

@ -1,6 +1,8 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* import-globals-from head.js */
// Tests that errors about invalid HSTS security headers are logged to the web console.
"use strict";

Просмотреть файл

@ -3,6 +3,8 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* import-globals-from head.js */
// Tests that warnings about ineffective iframe sandboxing are logged to the
// web console when necessary (and not otherwise). See Bug 752559.
@ -47,5 +49,5 @@ async function testWarningMessageVisibility(uri, visible) {
const warning = findMessage(hud, INEFFECTIVE_IFRAME_SANDBOXING_MSG, ".message.warn");
is(!!warning, visible,
`The warning message is${visible ? "": " not"} visible on ${uri}`);
`The warning message is${visible ? "" : " not"} visible on ${uri}`);
}

Просмотреть файл

@ -5,7 +5,8 @@
"use strict";
const TEST_URI = "http://example.com/browser/devtools/client/webconsole/new-console-output/test/mochitest/test-console.html";
const TEST_URI = "http://example.com/browser/devtools/client/webconsole/" +
"new-console-output/test/mochitest/test-console.html";
add_task(function* () {
let toolbox = yield openNewTabAndToolbox(TEST_URI, "webconsole");

Просмотреть файл

@ -3,6 +3,8 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* import-globals-from head.js */
// Test that the JS input field is focused when the user switches back to the
// web console from other tools, see bug 891581.

Просмотреть файл

@ -3,6 +3,8 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* import-globals-from head.js */
// Tests that the input field is focused when the console is opened.
"use strict";
@ -13,7 +15,7 @@ const TEST_URI =
console.log("console message 1");
</script>`;
add_task(async function() {
add_task(async function () {
let hud = await openNewTabAndConsole(TEST_URI);
let inputNode = hud.jsterm.inputNode;
@ -24,7 +26,7 @@ add_task(async function() {
ok(hasFocus(inputNode), "input node is focused after output is cleared");
info("Focus during message logging");
ContentTask.spawn(gBrowser.selectedBrowser, {}, function() {
ContentTask.spawn(gBrowser.selectedBrowser, {}, function () {
content.wrappedJSObject.console.log("console message 2");
});
let msg = await waitFor(() => findMessage(hud, "console message 2"));

Просмотреть файл

@ -3,14 +3,16 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* import-globals-from head.js */
// Tests that errors about insecure passwords are logged to the web console.
// See Bug 762593.
"use strict";
const TEST_URI =
"http://example.com/browser/devtools/client/webconsole/new-console-output/test/" +
"mochitest/test-insecure-passwords-about-blank-web-console-warning.html";
const TEST_URI = "http://example.com/browser/devtools/client/webconsole/" +
"new-console-output/test/mochitest/" +
"test-insecure-passwords-about-blank-web-console-warning.html";
const INSECURE_PASSWORD_MSG = "Password fields present on an insecure (http://) iframe." +
" This is a security risk that allows user login credentials to be stolen.";

Просмотреть файл

@ -3,6 +3,8 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* import-globals-from head.js */
// Check that users can inspect objects logged from cross-domain iframes -
// bug 869003.

Просмотреть файл

@ -3,12 +3,14 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* import-globals-from head.js */
// Tests that the input box expands as the user types long lines.
"use strict";
const TEST_URI = "http://example.com/browser/devtools/client/webconsole/" +
"test/test-console.html";
"new-console-output/test/mochitest/test-console.html";
add_task(async function () {
const { jsterm } = await openNewTabAndConsole(TEST_URI);

Просмотреть файл

@ -3,6 +3,8 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* import-globals-from head.js */
// Check that basic keyboard shortcuts work in the web console.
"use strict";

Просмотреть файл

@ -3,6 +3,8 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* import-globals-from head.js */
// Test that message source links for js errors and console API calls open in
// the jsdebugger when clicked.
@ -10,9 +12,9 @@
requestLongerTimeout(2);
const TEST_URI = "http://example.com/browser/devtools/client/webconsole/" +
"new-console-output/test/mochitest/test-location-debugger-link.html";
"new-console-output/test/mochitest/test-location-debugger-link.html";
add_task(async function() {
add_task(async function () {
// Force the new debugger UI, in case this gets uplifted with the old
// debugger still turned on
await pushPref("devtools.debugger.new-debugger-frontend", true);

Просмотреть файл

@ -5,7 +5,9 @@
"use strict";
const TEST_URI = "http://example.com/browser/devtools/client/webconsole/new-console-output/test/mochitest/test-location-styleeditor-link.html";
const TEST_URI = "http://example.com/browser/devtools/client/webconsole/" +
"new-console-output/test/mochitest/" +
"test-location-styleeditor-link.html";
add_task(async function () {
await pushPref("devtools.webconsole.filter.css", true);

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше