diff --git a/devtools/client/inspector/markup/test/browser_markup_anonymous_01.js b/devtools/client/inspector/markup/test/browser_markup_anonymous_01.js index c4c22070acc..15b45e52177 100644 --- a/devtools/client/inspector/markup/test/browser_markup_anonymous_01.js +++ b/devtools/client/inspector/markup/test/browser_markup_anonymous_01.js @@ -5,10 +5,10 @@ "use strict"; // Test native anonymous content in the markupview. -const TEST_URL = TEST_URL_ROOT + "doc_markup_anonymous.html"; +const TEST_URL = URL_ROOT + "doc_markup_anonymous.html"; add_task(function*() { - let {inspector} = yield addTab(TEST_URL).then(openInspector); + let {inspector} = yield openInspectorForURL(TEST_URL); let pseudo = yield getNodeFront("#pseudo", inspector); diff --git a/devtools/client/inspector/markup/test/browser_markup_anonymous_02.js b/devtools/client/inspector/markup/test/browser_markup_anonymous_02.js index d8dc826a163..b2a7acb9e2f 100644 --- a/devtools/client/inspector/markup/test/browser_markup_anonymous_02.js +++ b/devtools/client/inspector/markup/test/browser_markup_anonymous_02.js @@ -10,7 +10,7 @@ requestLongerTimeout(2); const TEST_URL = "chrome://devtools/content/scratchpad/scratchpad.xul"; add_task(function*() { - let {inspector} = yield addTab(TEST_URL).then(openInspector); + let {inspector} = yield openInspectorForURL(TEST_URL); let toolbarbutton = yield getNodeFront("toolbarbutton", inspector); let children = yield inspector.walker.children(toolbarbutton); diff --git a/devtools/client/inspector/markup/test/browser_markup_anonymous_03.js b/devtools/client/inspector/markup/test/browser_markup_anonymous_03.js index e388baec138..a2bd7fe1aee 100644 --- a/devtools/client/inspector/markup/test/browser_markup_anonymous_03.js +++ b/devtools/client/inspector/markup/test/browser_markup_anonymous_03.js @@ -7,12 +7,12 @@ // Test shadow DOM content in the markupview. // Note that many features are not yet enabled, but basic listing // of elements should be working. -const TEST_URL = TEST_URL_ROOT + "doc_markup_anonymous.html"; +const TEST_URL = URL_ROOT + "doc_markup_anonymous.html"; add_task(function*() { Services.prefs.setBoolPref("dom.webcomponents.enabled", true); - let {inspector} = yield addTab(TEST_URL).then(openInspector); + let {inspector} = yield openInspectorForURL(TEST_URL); let shadow = yield getNodeFront("#shadow", inspector.markup); let children = yield inspector.walker.children(shadow); diff --git a/devtools/client/inspector/markup/test/browser_markup_anonymous_04.js b/devtools/client/inspector/markup/test/browser_markup_anonymous_04.js index 63c0a632ddb..c56b6b5858d 100644 --- a/devtools/client/inspector/markup/test/browser_markup_anonymous_04.js +++ b/devtools/client/inspector/markup/test/browser_markup_anonymous_04.js @@ -6,12 +6,12 @@ // Test native anonymous content in the markupview with devtools.inspector.showAllAnonymousContent // set to true -const TEST_URL = TEST_URL_ROOT + "doc_markup_anonymous.html"; +const TEST_URL = URL_ROOT + "doc_markup_anonymous.html"; add_task(function*() { Services.prefs.setBoolPref("devtools.inspector.showAllAnonymousContent", true); - let {inspector} = yield addTab(TEST_URL).then(openInspector); + let {inspector} = yield openInspectorForURL(TEST_URL); let native = yield getNodeFront("#native", inspector); diff --git a/devtools/client/inspector/markup/test/browser_markup_css_completion_style_attribute.js b/devtools/client/inspector/markup/test/browser_markup_css_completion_style_attribute.js index 96523cd8119..be22ae41eea 100644 --- a/devtools/client/inspector/markup/test/browser_markup_css_completion_style_attribute.js +++ b/devtools/client/inspector/markup/test/browser_markup_css_completion_style_attribute.js @@ -12,7 +12,7 @@ // The correctness and cycling of the suggestions is covered in the ruleview // tests. -const TEST_URL = TEST_URL_ROOT + "doc_markup_edit.html"; +const TEST_URL = URL_ROOT + "doc_markup_edit.html"; // test data format : // [ // what key to press, @@ -65,7 +65,7 @@ const TEST_DATA = [ add_task(function*() { info("Opening the inspector on the test URL"); - let {inspector} = yield addTab(TEST_URL).then(openInspector); + let {inspector} = yield openInspectorForURL(TEST_URL); yield inspector.markup.expandAll(); diff --git a/devtools/client/inspector/markup/test/browser_markup_dragdrop_autoscroll.js b/devtools/client/inspector/markup/test/browser_markup_dragdrop_autoscroll.js index 2015df2c8c3..8040b9e6b7b 100644 --- a/devtools/client/inspector/markup/test/browser_markup_dragdrop_autoscroll.js +++ b/devtools/client/inspector/markup/test/browser_markup_dragdrop_autoscroll.js @@ -7,10 +7,10 @@ // Test that dragging a node near the top or bottom edge of the markup-view // auto-scrolls the view. -const TEST_URL = TEST_URL_ROOT + "doc_markup_dragdrop_autoscroll.html"; +const TEST_URL = URL_ROOT + "doc_markup_dragdrop_autoscroll.html"; add_task(function*() { - let {inspector} = yield addTab(TEST_URL).then(openInspector); + let {inspector} = yield openInspectorForURL(TEST_URL); let markup = inspector.markup; let viewHeight = markup.doc.documentElement.clientHeight; diff --git a/devtools/client/inspector/markup/test/browser_markup_dragdrop_distance.js b/devtools/client/inspector/markup/test/browser_markup_dragdrop_distance.js index 9d1b989b68a..9b230092ecb 100644 --- a/devtools/client/inspector/markup/test/browser_markup_dragdrop_distance.js +++ b/devtools/client/inspector/markup/test/browser_markup_dragdrop_distance.js @@ -8,14 +8,14 @@ // the minimum vertical distance defined in markup-view.js by // DRAG_DROP_MIN_INITIAL_DISTANCE. -const TEST_URL = TEST_URL_ROOT + "doc_markup_dragdrop.html"; +const TEST_URL = URL_ROOT + "doc_markup_dragdrop.html"; const TEST_NODE = "#test"; // Keep this in sync with DRAG_DROP_MIN_INITIAL_DISTANCE in markup-view.js const MIN_DISTANCE = 10; add_task(function*() { - let {inspector} = yield addTab(TEST_URL).then(openInspector); + let {inspector} = yield openInspectorForURL(TEST_URL); info("Drag the test node by half of the minimum distance"); yield simulateNodeDrag(inspector, TEST_NODE, 0, MIN_DISTANCE / 2); diff --git a/devtools/client/inspector/markup/test/browser_markup_dragdrop_dragRootNode.js b/devtools/client/inspector/markup/test/browser_markup_dragdrop_dragRootNode.js index ac5f0853ab8..17e49920834 100644 --- a/devtools/client/inspector/markup/test/browser_markup_dragdrop_dragRootNode.js +++ b/devtools/client/inspector/markup/test/browser_markup_dragdrop_dragRootNode.js @@ -6,11 +6,11 @@ // Test that the root node isn't draggable (as well as head and body). -const TEST_URL = TEST_URL_ROOT + "doc_markup_dragdrop.html"; +const TEST_URL = URL_ROOT + "doc_markup_dragdrop.html"; const TEST_DATA = ["html", "head", "body"]; add_task(function*() { - let {inspector} = yield addTab(TEST_URL).then(openInspector); + let {inspector} = yield openInspectorForURL(TEST_URL); for (let selector of TEST_DATA) { info("Try to drag/drop node " + selector); diff --git a/devtools/client/inspector/markup/test/browser_markup_dragdrop_escapeKeyPress.js b/devtools/client/inspector/markup/test/browser_markup_dragdrop_escapeKeyPress.js index 2e886b89bbc..3e5c532a8a3 100644 --- a/devtools/client/inspector/markup/test/browser_markup_dragdrop_escapeKeyPress.js +++ b/devtools/client/inspector/markup/test/browser_markup_dragdrop_escapeKeyPress.js @@ -6,10 +6,10 @@ // Test whether ESCAPE keypress cancels dragging of an element. -const TEST_URL = TEST_URL_ROOT + "doc_markup_dragdrop.html"; +const TEST_URL = URL_ROOT + "doc_markup_dragdrop.html"; add_task(function*() { - let {inspector} = yield addTab(TEST_URL).then(openInspector); + let {inspector} = yield openInspectorForURL(TEST_URL); let {markup} = inspector; info("Get a test container"); diff --git a/devtools/client/inspector/markup/test/browser_markup_dragdrop_invalidNodes.js b/devtools/client/inspector/markup/test/browser_markup_dragdrop_invalidNodes.js index d273ee73481..536bfc85078 100644 --- a/devtools/client/inspector/markup/test/browser_markup_dragdrop_invalidNodes.js +++ b/devtools/client/inspector/markup/test/browser_markup_dragdrop_invalidNodes.js @@ -6,12 +6,12 @@ // Check that pseudo-elements and anonymous nodes are not draggable. -const TEST_URL = TEST_URL_ROOT + "doc_markup_dragdrop.html"; +const TEST_URL = URL_ROOT + "doc_markup_dragdrop.html"; add_task(function*() { Services.prefs.setBoolPref("devtools.inspector.showAllAnonymousContent", true); - let {inspector} = yield addTab(TEST_URL).then(openInspector); + let {inspector} = yield openInspectorForURL(TEST_URL); info("Expanding nodes below #test"); let parentFront = yield getNodeFront("#test", inspector); diff --git a/devtools/client/inspector/markup/test/browser_markup_dragdrop_reorder.js b/devtools/client/inspector/markup/test/browser_markup_dragdrop_reorder.js index 98164e2a4fb..894026f19cc 100644 --- a/devtools/client/inspector/markup/test/browser_markup_dragdrop_reorder.js +++ b/devtools/client/inspector/markup/test/browser_markup_dragdrop_reorder.js @@ -8,10 +8,10 @@ requestLongerTimeout(2); // Test different kinds of drag and drop node re-ordering. -const TEST_URL = TEST_URL_ROOT + "doc_markup_dragdrop.html"; +const TEST_URL = URL_ROOT + "doc_markup_dragdrop.html"; add_task(function*() { - let {inspector} = yield addTab(TEST_URL).then(openInspector); + let {inspector} = yield openInspectorForURL(TEST_URL); let ids; info("Expand #test node"); diff --git a/devtools/client/inspector/markup/test/browser_markup_dragdrop_tooltip.js b/devtools/client/inspector/markup/test/browser_markup_dragdrop_tooltip.js index b5f717e700c..3120e50ae79 100644 --- a/devtools/client/inspector/markup/test/browser_markup_dragdrop_tooltip.js +++ b/devtools/client/inspector/markup/test/browser_markup_dragdrop_tooltip.js @@ -5,7 +5,7 @@ const TEST_URL = "data:text/html;charset=utf8,
"; add_task(function*() { - let {inspector} = yield addTab(TEST_URL).then(openInspector); + let {inspector} = yield openInspectorForURL(TEST_URL); let {markup} = inspector; info("Get the tooltip target element for the image's src attribute"); diff --git a/devtools/client/inspector/markup/test/browser_markup_events-overflow.js b/devtools/client/inspector/markup/test/browser_markup_events-overflow.js index 8944b88255c..006debaafcb 100644 --- a/devtools/client/inspector/markup/test/browser_markup_events-overflow.js +++ b/devtools/client/inspector/markup/test/browser_markup_events-overflow.js @@ -3,7 +3,7 @@ http://creativecommons.org/publicdomain/zero/1.0/ */ "use strict"; -const TEST_URL = TEST_URL_ROOT + "doc_markup_events-overflow.html"; +const TEST_URL = URL_ROOT + "doc_markup_events-overflow.html"; const TEST_DATA = [ { desc: "editor overflows container", @@ -29,7 +29,7 @@ const TEST_DATA = [ ]; add_task(function*() { - let { inspector } = yield addTab(TEST_URL).then(openInspector); + let { inspector } = yield openInspectorForURL(TEST_URL); let markupContainer = yield getContainerForSelector("#events", inspector); let evHolder = markupContainer.elt.querySelector(".markupview-events"); diff --git a/devtools/client/inspector/markup/test/browser_markup_events.js b/devtools/client/inspector/markup/test/browser_markup_events.js index 56f9dbdd2ff..a6688fdb99f 100644 --- a/devtools/client/inspector/markup/test/browser_markup_events.js +++ b/devtools/client/inspector/markup/test/browser_markup_events.js @@ -7,7 +7,7 @@ // Test that markup view event bubbles show the correct event info for DOM // events. -const TEST_URL = TEST_URL_ROOT + "doc_markup_events.html"; +const TEST_URL = URL_ROOT + "doc_markup_events.html"; loadHelperScript("helper_events_test_runner.js"); diff --git a/devtools/client/inspector/markup/test/browser_markup_events_form.js b/devtools/client/inspector/markup/test/browser_markup_events_form.js index 99eabc0b184..8bb59dc8a0d 100644 --- a/devtools/client/inspector/markup/test/browser_markup_events_form.js +++ b/devtools/client/inspector/markup/test/browser_markup_events_form.js @@ -9,16 +9,16 @@ // The test registers one backend actor providing custom form data // and checks that the value is properly sent to the client (NodeFront). -const TEST_PAGE_URL = TEST_URL_ROOT + "doc_markup_events_form.html"; -const TEST_ACTOR_URL = CHROME_BASE + "actor_events_form.js"; +const TEST_PAGE_URL = URL_ROOT + "doc_markup_events_form.html"; +const TEST_ACTOR_URL = CHROME_URL_ROOT + "actor_events_form.js"; var {ActorRegistryFront} = require("devtools/server/actors/actor-registry"); var {EventsFormFront} = require(TEST_ACTOR_URL); add_task(function*() { info("Opening the Toolbox"); - let {tab} = yield addTab(TEST_PAGE_URL); - let {toolbox} = yield openToolbox("webconsole"); + let tab = yield addTab(TEST_PAGE_URL); + let toolbox = yield openToolboxForTab(tab, "webconsole"); info("Registering test actor"); let {registrar, front} = yield registerTestActor(toolbox); diff --git a/devtools/client/inspector/markup/test/browser_markup_events_jquery_1.0.js b/devtools/client/inspector/markup/test/browser_markup_events_jquery_1.0.js index 09b1bca3eae..367dec27857 100644 --- a/devtools/client/inspector/markup/test/browser_markup_events_jquery_1.0.js +++ b/devtools/client/inspector/markup/test/browser_markup_events_jquery_1.0.js @@ -8,7 +8,7 @@ // and jQuery Live events (jQuery version 1.0). const TEST_LIB = "lib_jquery_1.0.js"; -const TEST_URL = TEST_URL_ROOT + "doc_markup_events_jquery.html?" + TEST_LIB; +const TEST_URL = URL_ROOT + "doc_markup_events_jquery.html?" + TEST_LIB; loadHelperScript("helper_events_test_runner.js"); @@ -18,7 +18,7 @@ const TEST_DATA = [ expected: [ { type: "load", - filename: TEST_URL_ROOT + TEST_LIB, + filename: URL_ROOT + TEST_LIB, attributes: [ "jQuery" ], @@ -104,7 +104,7 @@ const TEST_DATA = [ }, { type: "load", - filename: TEST_URL_ROOT + TEST_LIB, + filename: URL_ROOT + TEST_LIB, attributes: [ "Bubbling", "DOM0" @@ -159,7 +159,7 @@ const TEST_DATA = [ }, { type: "click", - filename: TEST_URL_ROOT + TEST_LIB + ":894", + filename: URL_ROOT + TEST_LIB + ":894", attributes: [ "Bubbling", "DOM2" @@ -199,7 +199,7 @@ const TEST_DATA = [ }, { type: "keydown", - filename: TEST_URL_ROOT + TEST_LIB + ":894", + filename: URL_ROOT + TEST_LIB + ":894", attributes: [ "Bubbling", "DOM2" diff --git a/devtools/client/inspector/markup/test/browser_markup_events_jquery_1.1.js b/devtools/client/inspector/markup/test/browser_markup_events_jquery_1.1.js index 8473fcbfda4..c3cc80ae4fa 100644 --- a/devtools/client/inspector/markup/test/browser_markup_events_jquery_1.1.js +++ b/devtools/client/inspector/markup/test/browser_markup_events_jquery_1.1.js @@ -8,7 +8,7 @@ // and jQuery Live events (jQuery version 1.1). const TEST_LIB = "lib_jquery_1.1.js"; -const TEST_URL = TEST_URL_ROOT + "doc_markup_events_jquery.html?" + TEST_LIB; +const TEST_URL = URL_ROOT + "doc_markup_events_jquery.html?" + TEST_LIB; loadHelperScript("helper_events_test_runner.js"); @@ -18,7 +18,7 @@ const TEST_DATA = [ expected: [ { type: "load", - filename: TEST_URL_ROOT + TEST_LIB, + filename: URL_ROOT + TEST_LIB, attributes: [ "jQuery" ], @@ -108,7 +108,7 @@ const TEST_DATA = [ }, { type: "load", - filename: TEST_URL_ROOT + TEST_LIB, + filename: URL_ROOT + TEST_LIB, attributes: [ "Bubbling", "DOM0" @@ -173,7 +173,7 @@ const TEST_DATA = [ }, { type: "click", - filename: TEST_URL_ROOT + TEST_LIB + ":1224", + filename: URL_ROOT + TEST_LIB + ":1224", attributes: [ "Bubbling", "DOM2" @@ -223,7 +223,7 @@ const TEST_DATA = [ }, { type: "keydown", - filename: TEST_URL_ROOT + TEST_LIB + ":1224", + filename: URL_ROOT + TEST_LIB + ":1224", attributes: [ "Bubbling", "DOM2" diff --git a/devtools/client/inspector/markup/test/browser_markup_events_jquery_1.11.1.js b/devtools/client/inspector/markup/test/browser_markup_events_jquery_1.11.1.js index 74e003d3da2..506406e1523 100644 --- a/devtools/client/inspector/markup/test/browser_markup_events_jquery_1.11.1.js +++ b/devtools/client/inspector/markup/test/browser_markup_events_jquery_1.11.1.js @@ -8,7 +8,7 @@ // and jQuery Live events (jQuery version 1.11.1). const TEST_LIB = "lib_jquery_1.11.1_min.js"; -const TEST_URL = TEST_URL_ROOT + "doc_markup_events_jquery.html?" + TEST_LIB; +const TEST_URL = URL_ROOT + "doc_markup_events_jquery.html?" + TEST_LIB; loadHelperScript("helper_events_test_runner.js"); @@ -105,7 +105,7 @@ const TEST_DATA = [ }, { type: "click", - filename: TEST_URL_ROOT + TEST_LIB + ":3", + filename: URL_ROOT + TEST_LIB + ":3", attributes: [ "Bubbling", "DOM2" @@ -126,7 +126,7 @@ const TEST_DATA = [ }, { type: "keydown", - filename: TEST_URL_ROOT + TEST_LIB + ":3", + filename: URL_ROOT + TEST_LIB + ":3", attributes: [ "Bubbling", "DOM2" diff --git a/devtools/client/inspector/markup/test/browser_markup_events_jquery_1.2.js b/devtools/client/inspector/markup/test/browser_markup_events_jquery_1.2.js index 2f0a01715a3..a9106153f52 100644 --- a/devtools/client/inspector/markup/test/browser_markup_events_jquery_1.2.js +++ b/devtools/client/inspector/markup/test/browser_markup_events_jquery_1.2.js @@ -8,7 +8,7 @@ // and jQuery Live events (jQuery version 1.2). const TEST_LIB = "lib_jquery_1.2_min.js"; -const TEST_URL = TEST_URL_ROOT + "doc_markup_events_jquery.html?" + TEST_LIB; +const TEST_URL = URL_ROOT + "doc_markup_events_jquery.html?" + TEST_LIB; loadHelperScript("helper_events_test_runner.js"); @@ -79,7 +79,7 @@ const TEST_DATA = [ }, { type: "load", - filename: TEST_URL_ROOT + TEST_LIB, + filename: URL_ROOT + TEST_LIB, attributes: [ "Bubbling", "DOM0" @@ -144,7 +144,7 @@ const TEST_DATA = [ }, { type: "click", - filename: TEST_URL_ROOT + TEST_LIB + ":24", + filename: URL_ROOT + TEST_LIB + ":24", attributes: [ "Bubbling", "DOM2" @@ -168,7 +168,7 @@ const TEST_DATA = [ }, { type: "keydown", - filename: TEST_URL_ROOT + TEST_LIB + ":24", + filename: URL_ROOT + TEST_LIB + ":24", attributes: [ "Bubbling", "DOM2" diff --git a/devtools/client/inspector/markup/test/browser_markup_events_jquery_1.3.js b/devtools/client/inspector/markup/test/browser_markup_events_jquery_1.3.js index 46206a98ce6..f828ed133a2 100644 --- a/devtools/client/inspector/markup/test/browser_markup_events_jquery_1.3.js +++ b/devtools/client/inspector/markup/test/browser_markup_events_jquery_1.3.js @@ -8,7 +8,7 @@ // and jQuery Live events (jQuery version 1.3). const TEST_LIB = "lib_jquery_1.3_min.js"; -const TEST_URL = TEST_URL_ROOT + "doc_markup_events_jquery.html?" + TEST_LIB; +const TEST_URL = URL_ROOT + "doc_markup_events_jquery.html?" + TEST_LIB; loadHelperScript("helper_events_test_runner.js"); @@ -18,7 +18,7 @@ const TEST_DATA = [ expected: [ { type: "load", - filename: TEST_URL_ROOT + TEST_LIB + ":19", + filename: URL_ROOT + TEST_LIB + ":19", attributes: [ "jQuery" ], @@ -98,7 +98,7 @@ const TEST_DATA = [ }, { type: "load", - filename: TEST_URL_ROOT + TEST_LIB + ":19", + filename: URL_ROOT + TEST_LIB + ":19", attributes: [ "Bubbling", "DOM2" @@ -109,7 +109,7 @@ const TEST_DATA = [ }, { type: "unload", - filename: TEST_URL_ROOT + TEST_LIB + ":19", + filename: URL_ROOT + TEST_LIB + ":19", attributes: [ "jQuery" ], @@ -120,7 +120,7 @@ const TEST_DATA = [ }, { type: "unload", - filename: TEST_URL_ROOT + TEST_LIB + ":19", + filename: URL_ROOT + TEST_LIB + ":19", attributes: [ "Bubbling", "DOM2" @@ -156,7 +156,7 @@ const TEST_DATA = [ }, { type: "click", - filename: TEST_URL_ROOT + TEST_LIB + ":19", + filename: URL_ROOT + TEST_LIB + ":19", attributes: [ "Bubbling", "DOM2" @@ -177,7 +177,7 @@ const TEST_DATA = [ }, { type: "keydown", - filename: TEST_URL_ROOT + TEST_LIB + ":19", + filename: URL_ROOT + TEST_LIB + ":19", attributes: [ "Bubbling", "DOM2" diff --git a/devtools/client/inspector/markup/test/browser_markup_events_jquery_1.4.js b/devtools/client/inspector/markup/test/browser_markup_events_jquery_1.4.js index c312a676b2f..f535bd47937 100644 --- a/devtools/client/inspector/markup/test/browser_markup_events_jquery_1.4.js +++ b/devtools/client/inspector/markup/test/browser_markup_events_jquery_1.4.js @@ -8,7 +8,7 @@ // and jQuery Live events (jQuery version 1.4). const TEST_LIB = "lib_jquery_1.4_min.js"; -const TEST_URL = TEST_URL_ROOT + "doc_markup_events_jquery.html?" + TEST_LIB; +const TEST_URL = URL_ROOT + "doc_markup_events_jquery.html?" + TEST_LIB; loadHelperScript("helper_events_test_runner.js"); @@ -79,7 +79,7 @@ const TEST_DATA = [ }, { type: "load", - filename: TEST_URL_ROOT + TEST_LIB + ":26", + filename: URL_ROOT + TEST_LIB + ":26", attributes: [ "Bubbling", "DOM2" @@ -123,7 +123,7 @@ const TEST_DATA = [ }, { type: "click", - filename: TEST_URL_ROOT + TEST_LIB + ":48", + filename: URL_ROOT + TEST_LIB + ":48", attributes: [ "Bubbling", "DOM2" @@ -144,7 +144,7 @@ const TEST_DATA = [ }, { type: "keydown", - filename: TEST_URL_ROOT + TEST_LIB + ":48", + filename: URL_ROOT + TEST_LIB + ":48", attributes: [ "Bubbling", "DOM2" @@ -171,7 +171,7 @@ const TEST_DATA = [ }, { type: "dblclick", - filename: TEST_URL_ROOT + TEST_LIB + ":17", + filename: URL_ROOT + TEST_LIB + ":17", attributes: [ "jQuery", "Live" @@ -230,7 +230,7 @@ const TEST_DATA = [ }, { type: "dragstart", - filename: TEST_URL_ROOT + TEST_LIB + ":17", + filename: URL_ROOT + TEST_LIB + ":17", attributes: [ "jQuery", "Live" diff --git a/devtools/client/inspector/markup/test/browser_markup_events_jquery_1.6.js b/devtools/client/inspector/markup/test/browser_markup_events_jquery_1.6.js index 3c1e76962a2..80ca8aa2e5d 100644 --- a/devtools/client/inspector/markup/test/browser_markup_events_jquery_1.6.js +++ b/devtools/client/inspector/markup/test/browser_markup_events_jquery_1.6.js @@ -10,7 +10,7 @@ requestLongerTimeout(2); // and jQuery Live events (jQuery version 1.6). const TEST_LIB = "lib_jquery_1.6_min.js"; -const TEST_URL = TEST_URL_ROOT + "doc_markup_events_jquery.html?" + TEST_LIB; +const TEST_URL = URL_ROOT + "doc_markup_events_jquery.html?" + TEST_LIB; loadHelperScript("helper_events_test_runner.js"); @@ -81,7 +81,7 @@ const TEST_DATA = [ }, { type: "load", - filename: TEST_URL_ROOT + TEST_LIB + ":16", + filename: URL_ROOT + TEST_LIB + ":16", attributes: [ "Bubbling", "DOM2" @@ -122,7 +122,7 @@ const TEST_DATA = [ }, { type: "click", - filename: TEST_URL_ROOT + TEST_LIB + ":16", + filename: URL_ROOT + TEST_LIB + ":16", attributes: [ "Bubbling", "DOM2" @@ -143,7 +143,7 @@ const TEST_DATA = [ }, { type: "keydown", - filename: TEST_URL_ROOT + TEST_LIB + ":16", + filename: URL_ROOT + TEST_LIB + ":16", attributes: [ "Bubbling", "DOM2" @@ -170,7 +170,7 @@ const TEST_DATA = [ }, { type: "dblclick", - filename: TEST_URL_ROOT + TEST_LIB + ":16", + filename: URL_ROOT + TEST_LIB + ":16", attributes: [ "jQuery", "Live" @@ -225,7 +225,7 @@ const TEST_DATA = [ }, { type: "dragend", - filename: TEST_URL_ROOT + TEST_LIB + ":16", + filename: URL_ROOT + TEST_LIB + ":16", attributes: [ "jQuery", "Live" @@ -280,7 +280,7 @@ const TEST_DATA = [ }, { type: "dragleave", - filename: TEST_URL_ROOT + TEST_LIB + ":16", + filename: URL_ROOT + TEST_LIB + ":16", attributes: [ "jQuery", "Live" @@ -335,7 +335,7 @@ const TEST_DATA = [ }, { type: "dragstart", - filename: TEST_URL_ROOT + TEST_LIB + ":16", + filename: URL_ROOT + TEST_LIB + ":16", attributes: [ "jQuery", "Live" diff --git a/devtools/client/inspector/markup/test/browser_markup_events_jquery_1.7.js b/devtools/client/inspector/markup/test/browser_markup_events_jquery_1.7.js index ad238b8059c..70133fe5177 100644 --- a/devtools/client/inspector/markup/test/browser_markup_events_jquery_1.7.js +++ b/devtools/client/inspector/markup/test/browser_markup_events_jquery_1.7.js @@ -10,7 +10,7 @@ requestLongerTimeout(2); // and jQuery Live events (jQuery version 1.7). const TEST_LIB = "lib_jquery_1.7_min.js"; -const TEST_URL = TEST_URL_ROOT + "doc_markup_events_jquery.html?" + TEST_LIB; +const TEST_URL = URL_ROOT + "doc_markup_events_jquery.html?" + TEST_LIB; loadHelperScript("helper_events_test_runner.js"); @@ -81,7 +81,7 @@ const TEST_DATA = [ }, { type: "load", - filename: TEST_URL_ROOT + TEST_LIB + ":2", + filename: URL_ROOT + TEST_LIB + ":2", attributes: [ "Bubbling", "DOM2" @@ -122,7 +122,7 @@ const TEST_DATA = [ }, { type: "click", - filename: TEST_URL_ROOT + TEST_LIB + ":3", + filename: URL_ROOT + TEST_LIB + ":3", attributes: [ "Bubbling", "DOM2" @@ -143,7 +143,7 @@ const TEST_DATA = [ }, { type: "keydown", - filename: TEST_URL_ROOT + TEST_LIB + ":3", + filename: URL_ROOT + TEST_LIB + ":3", attributes: [ "Bubbling", "DOM2" diff --git a/devtools/client/inspector/markup/test/browser_markup_events_jquery_2.1.1.js b/devtools/client/inspector/markup/test/browser_markup_events_jquery_2.1.1.js index 17bade18522..3c6af0b3a7f 100644 --- a/devtools/client/inspector/markup/test/browser_markup_events_jquery_2.1.1.js +++ b/devtools/client/inspector/markup/test/browser_markup_events_jquery_2.1.1.js @@ -10,7 +10,7 @@ requestLongerTimeout(2); // and jQuery Live events (jQuery version 2.1.1). const TEST_LIB = "lib_jquery_2.1.1_min.js"; -const TEST_URL = TEST_URL_ROOT + "doc_markup_events_jquery.html?" + TEST_LIB; +const TEST_URL = URL_ROOT + "doc_markup_events_jquery.html?" + TEST_LIB; loadHelperScript("helper_events_test_runner.js"); @@ -106,7 +106,7 @@ const TEST_DATA = [ }, { type: "click", - filename: TEST_URL_ROOT + TEST_LIB + ":3", + filename: URL_ROOT + TEST_LIB + ":3", attributes: [ "Bubbling", "DOM2" @@ -127,7 +127,7 @@ const TEST_DATA = [ }, { type: "keydown", - filename: TEST_URL_ROOT + TEST_LIB + ":3", + filename: URL_ROOT + TEST_LIB + ":3", attributes: [ "Bubbling", "DOM2" diff --git a/devtools/client/inspector/markup/test/browser_markup_html_edit_01.js b/devtools/client/inspector/markup/test/browser_markup_html_edit_01.js index 6c1847b975d..3be93d09745 100644 --- a/devtools/client/inspector/markup/test/browser_markup_html_edit_01.js +++ b/devtools/client/inspector/markup/test/browser_markup_html_edit_01.js @@ -15,7 +15,7 @@ const TEST_DATA = [ newHTML: '
First Div
', validate: function*(pageNode, pageNodeFront, selectedNodeFront) { is(pageNode.textContent, "First Div", "New div has expected text content"); - ok(!getNode("#one em"), "No em remaining") + ok(!getNode("#one em", {expectNoMatch: true}), "No em remaining") } }, { @@ -71,7 +71,7 @@ const TEST_URL = "data:text/html," + ""; add_task(function*() { - let {inspector} = yield addTab(TEST_URL).then(openInspector); + let {inspector, testActor} = yield openInspectorForURL(TEST_URL); inspector.markup._frame.focus(); - yield runEditOuterHTMLTests(TEST_DATA, inspector); + yield runEditOuterHTMLTests(TEST_DATA, inspector, testActor); }); diff --git a/devtools/client/inspector/markup/test/browser_markup_html_edit_02.js b/devtools/client/inspector/markup/test/browser_markup_html_edit_02.js index 96cf1ab187a..64d62dc9534 100644 --- a/devtools/client/inspector/markup/test/browser_markup_html_edit_02.js +++ b/devtools/client/inspector/markup/test/browser_markup_html_edit_02.js @@ -74,7 +74,7 @@ const TEST_DATA = [ is(pageNodeFront, selectedNodeFront, "Original element is selected"); let p = getNode("#badMarkup5"); - let nodiv = getNode("#badMarkup5 div"); + let nodiv = getNode("#badMarkup5 div", {expectNoMatch: true}); let div = getNode("#badMarkup5 ~ div"); ok(!nodiv, "The invalid markup got created as a sibling"); @@ -95,7 +95,7 @@ const TEST_URL = "data:text/html," + ""; add_task(function*() { - let {inspector} = yield addTab(TEST_URL).then(openInspector); + let {inspector, testActor} = yield openInspectorForURL(TEST_URL); inspector.markup._frame.focus(); - yield runEditOuterHTMLTests(TEST_DATA, inspector); + yield runEditOuterHTMLTests(TEST_DATA, inspector, testActor); }); diff --git a/devtools/client/inspector/markup/test/browser_markup_html_edit_03.js b/devtools/client/inspector/markup/test/browser_markup_html_edit_03.js index 2059bdb7739..1d35202e423 100644 --- a/devtools/client/inspector/markup/test/browser_markup_html_edit_03.js +++ b/devtools/client/inspector/markup/test/browser_markup_html_edit_03.js @@ -21,7 +21,7 @@ const NEW_HTML = '
Edited
'; requestLongerTimeout(2); add_task(function*() { - let {inspector} = yield addTab(TEST_URL).then(openInspector); + let {inspector} = yield openInspectorForURL(TEST_URL); inspector.markup._frame.focus(); diff --git a/devtools/client/inspector/markup/test/browser_markup_image_tooltip.js b/devtools/client/inspector/markup/test/browser_markup_image_tooltip.js index 955a1130b82..d54d7009e6a 100644 --- a/devtools/client/inspector/markup/test/browser_markup_image_tooltip.js +++ b/devtools/client/inspector/markup/test/browser_markup_image_tooltip.js @@ -11,7 +11,7 @@ const PAGE_CONTENT = [ '', '', - '', + '', '' ].join("\n"); diff --git a/devtools/client/inspector/markup/test/browser_markup_image_tooltip_mutations.js b/devtools/client/inspector/markup/test/browser_markup_image_tooltip_mutations.js index 9d7713eb90c..e4df6f78997 100644 --- a/devtools/client/inspector/markup/test/browser_markup_image_tooltip_mutations.js +++ b/devtools/client/inspector/markup/test/browser_markup_image_tooltip_mutations.js @@ -8,15 +8,14 @@ // changes. const INITIAL_SRC = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAADI5JREFUeNrsWwuQFNUVPf1m5z87szv7HWSWj8CigBFMEFZKiQsB1PgJwUAZg1HBpIQsKmokEhNjWUnFVPnDWBT+KolJYbRMoqUVq0yCClpqiX8sCchPWFwVlt2db7+X93pez7zu6Vn2NxsVWh8987p7pu+9555z7+tZjTGGY3kjOMa34w447oBjfKsY7i/UNM3Y8eFSAkD50Plgw03K5P9gvGv7U5ieeR3PszeREiPNX3/0DL4hjslzhm8THh+OITfXk3dhiv4GDtGPVzCaeJmPLYzuu5qJuWfuw2QTlcN1X9pwQU7LhdZ/ZAseD45cOh9hHvDkc/yAF/DNhdb5Mrr3PvBMaAYW8fMSIi2G497IMEK/YutGtAYr6+ej+nxu/NN8Ks3N7AR6HgcLz0Eg1Ljg1UcxZzi5qewIkMYLRweTr2Kzp+nmyXAd5pS3XQDd+N/4h4zgu9FI7brlXf90nMEnuwQxlvv+hosE3TuexmWeysmT4W+WxkMaLzf9Y8ATgjcUn7T9H1gqrpFq8eV1gMn6t16NhngjfoX6q4DUP032Rd4LJgpSLwJ1yzFqBG69eRkah0MVyo0Acfe+yy9AG4nMiYCkeM53KKFXncBLAXqEm+wCqZwaueq7WCmuLTcKSJmj737ol2hurA9eq9VdyiO8yWa3NNyog+SB5CZodSsQq/dfu34tJpYbBaTMzvVddDZu16q5smXf4G8zEvqm4cyaAmJPuTJk3oJWdS4WzcVtfMZbThSQckb/pYfRGgo3zNOqZnEHbJPGK4abaDCQIIsT8V/qTaBqHkLh6LzXH8XZQhbLhYKyyCC/WeHYcNdmvOgfe8skzbWL270/T3wf7tSx/l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lIqHn5bbHg8/bj2D3QfZnCX3mpAICDZV8jH5kpbZqTD0W+DxaA74CWzLN2nd14OlL72J38Lf7+TjC7dadZFDoZJQPrtaIKL/G0L6ktptPZVJ8fMqHYPZOKYPMyQGadIJfDvdXwAFiZOTvDBPydf5vk4rWA+RfdhBlaF/yDDBRoMu9pfnSjv/p7DG+HXfAcQcc49v/BBgAcFAO4DmB2GQAAAAASUVORK5CYII="; -const UPDATED_SRC = TEST_URL_ROOT + "doc_markup_tooltip.png"; +const UPDATED_SRC = URL_ROOT + "doc_markup_tooltip.png"; const INITIAL_SRC_SIZE = "64" + " \u00D7 " + "64"; const UPDATED_SRC_SIZE = "22" + " \u00D7 " + "23"; add_task(function*() { - yield addTab("data:text/html,

markup view tooltip test

"); - - let { inspector } = yield openInspector(); + let { inspector } = yield openInspectorForURL( + "data:text/html,

markup view tooltip test

"); info("Retrieving NodeFront for the element."); let img = yield getNodeFront("img", inspector); diff --git a/devtools/client/inspector/markup/test/browser_markup_keybindings_01.js b/devtools/client/inspector/markup/test/browser_markup_keybindings_01.js index 39654d7ad57..16ad0654b25 100644 --- a/devtools/client/inspector/markup/test/browser_markup_keybindings_01.js +++ b/devtools/client/inspector/markup/test/browser_markup_keybindings_01.js @@ -11,7 +11,7 @@ requestLongerTimeout(2); const TEST_URL = "data:text/html;charset=utf8,
"; add_task(function*() { - let {inspector} = yield addTab(TEST_URL).then(openInspector); + let {inspector} = yield openInspectorForURL(TEST_URL); info("Focusing the tag editor of the test element"); let {editor} = yield getContainerForSelector("div", inspector); diff --git a/devtools/client/inspector/markup/test/browser_markup_keybindings_02.js b/devtools/client/inspector/markup/test/browser_markup_keybindings_02.js index 04f54ddcfba..8c81f88ccbe 100644 --- a/devtools/client/inspector/markup/test/browser_markup_keybindings_02.js +++ b/devtools/client/inspector/markup/test/browser_markup_keybindings_02.js @@ -10,7 +10,7 @@ const TEST_URL = "data:text/html;charset=utf8,
"; add_task(function*() { - let {inspector, toolbox} = yield addTab(TEST_URL).then(openInspector); + let {inspector, toolbox} = yield openInspectorForURL(TEST_URL); info("Focusing the tag editor of the test element"); let {editor} = yield getContainerForSelector("div", inspector); diff --git a/devtools/client/inspector/markup/test/browser_markup_keybindings_03.js b/devtools/client/inspector/markup/test/browser_markup_keybindings_03.js index 46dde00214f..8aefd7aad5f 100644 --- a/devtools/client/inspector/markup/test/browser_markup_keybindings_03.js +++ b/devtools/client/inspector/markup/test/browser_markup_keybindings_03.js @@ -11,7 +11,7 @@ const TEST_URL = "data:text/html;charset=utf8,
Text node"; add_task(function*() { - let {inspector, toolbox} = yield addTab(TEST_URL).then(openInspector); + let {inspector, toolbox} = yield openInspectorForURL(TEST_URL); let {walker} = inspector; info("Select the test node to have the 2 test containers visible"); diff --git a/devtools/client/inspector/markup/test/browser_markup_keybindings_04.js b/devtools/client/inspector/markup/test/browser_markup_keybindings_04.js index 357ad402243..5425e85ecb8 100644 --- a/devtools/client/inspector/markup/test/browser_markup_keybindings_04.js +++ b/devtools/client/inspector/markup/test/browser_markup_keybindings_04.js @@ -14,7 +14,7 @@ requestLongerTimeout(2); const TEST_URL = "data:text/html;charset=utf8,
test element
"; add_task(function*() { - let {toolbox, inspector} = yield addTab(TEST_URL).then(openInspector); + let {inspector, testActor} = yield openInspectorForURL(TEST_URL); info("Select the test node with the browser ctx menu"); yield selectWithBrowserMenu(inspector); @@ -26,7 +26,7 @@ add_task(function*() { assertNodeSelected(inspector, "body"); info("Select the test node with the element picker"); - yield selectWithElementPicker(inspector); + yield selectWithElementPicker(inspector, testActor); assertNodeSelected(inspector, "div"); info("Press arrowUp to focus " + @@ -71,16 +71,13 @@ function* selectWithBrowserMenu(inspector) { yield inspector.once("inspector-updated"); } -function* selectWithElementPicker(inspector) { +function* selectWithElementPicker(inspector, testActor) { yield inspector.toolbox.highlighterUtils.startPicker(); yield BrowserTestUtils.synthesizeMouseAtCenter("div", { type: "mousemove", }, gBrowser.selectedBrowser); - executeInContent("Test:SynthesizeKey", { - key: "VK_RETURN", - options: {} - }, {}, false); + yield testActor.synthesizeKey({key: "VK_RETURN", options: {}}); yield inspector.once("inspector-updated"); } diff --git a/devtools/client/inspector/markup/test/browser_markup_keybindings_delete_attributes.js b/devtools/client/inspector/markup/test/browser_markup_keybindings_delete_attributes.js index 2c55668a62a..e4c875e0bfb 100644 --- a/devtools/client/inspector/markup/test/browser_markup_keybindings_delete_attributes.js +++ b/devtools/client/inspector/markup/test/browser_markup_keybindings_delete_attributes.js @@ -25,7 +25,7 @@ const TEST_DATA = [{ }]; add_task(function*() { - let {inspector} = yield addTab(TEST_URL).then(openInspector); + let {inspector} = yield openInspectorForURL(TEST_URL); let {walker} = inspector; for (let {selector, attribute} of TEST_DATA) { diff --git a/devtools/client/inspector/markup/test/browser_markup_links_01.js b/devtools/client/inspector/markup/test/browser_markup_links_01.js index cd965d87be8..0da375dfc67 100644 --- a/devtools/client/inspector/markup/test/browser_markup_links_01.js +++ b/devtools/client/inspector/markup/test/browser_markup_links_01.js @@ -7,7 +7,7 @@ // Tests that links are shown in attributes when the values (or part of the // values) are URIs or pointers to IDs. -const TEST_URL = TEST_URL_ROOT + "doc_markup_links.html"; +const TEST_URL = URL_ROOT + "doc_markup_links.html"; const TEST_DATA = [{ selector: "link", @@ -102,7 +102,7 @@ const TEST_DATA = [{ requestLongerTimeout(2); add_task(function*() { - let {inspector} = yield addTab(TEST_URL).then(openInspector); + let {inspector} = yield openInspectorForURL(TEST_URL); for (let {selector, attributes} of TEST_DATA) { info("Testing attributes on node " + selector); diff --git a/devtools/client/inspector/markup/test/browser_markup_links_02.js b/devtools/client/inspector/markup/test/browser_markup_links_02.js index 0398e4faf8c..6973ce7a5b6 100644 --- a/devtools/client/inspector/markup/test/browser_markup_links_02.js +++ b/devtools/client/inspector/markup/test/browser_markup_links_02.js @@ -7,10 +7,10 @@ // Tests that attributes are linkified correctly when attributes are updated // and created. -const TEST_URL = TEST_URL_ROOT + "doc_markup_links.html"; +const TEST_URL = URL_ROOT + "doc_markup_links.html"; add_task(function*() { - let {inspector} = yield addTab(TEST_URL).then(openInspector); + let {inspector} = yield openInspectorForURL(TEST_URL); info("Adding a contextmenu attribute to the body node"); yield addNewAttributes("body", "contextmenu=\"menu1\"", inspector); diff --git a/devtools/client/inspector/markup/test/browser_markup_links_03.js b/devtools/client/inspector/markup/test/browser_markup_links_03.js index 4ee6fc4ad2d..f820e31a547 100644 --- a/devtools/client/inspector/markup/test/browser_markup_links_03.js +++ b/devtools/client/inspector/markup/test/browser_markup_links_03.js @@ -6,14 +6,14 @@ // Tests that links appear correctly in attributes created in content. -const TEST_URL = TEST_URL_ROOT + "doc_markup_links.html"; +const TEST_URL = URL_ROOT + "doc_markup_links.html"; add_task(function*() { - let {inspector} = yield addTab(TEST_URL).then(openInspector); + let {inspector, testActor} = yield openInspectorForURL(TEST_URL); info("Adding a contextmenu attribute to the body node via the content"); let onMutated = inspector.once("markupmutation"); - yield setNodeAttribute("body", "contextmenu", "menu1"); + yield setNodeAttribute("body", "contextmenu", "menu1", testActor); yield onMutated; info("Checking for links in the new attribute"); @@ -25,7 +25,7 @@ add_task(function*() { info("Editing the contextmenu attribute on the body node"); onMutated = inspector.once("markupmutation"); - yield setNodeAttribute("body", "contextmenu", "menu2"); + yield setNodeAttribute("body", "contextmenu", "menu2", testActor); yield onMutated; info("Checking for links in the updated attribute"); diff --git a/devtools/client/inspector/markup/test/browser_markup_links_04.js b/devtools/client/inspector/markup/test/browser_markup_links_04.js index 0dc8ed3bbb6..6b2cf26d130 100644 --- a/devtools/client/inspector/markup/test/browser_markup_links_04.js +++ b/devtools/client/inspector/markup/test/browser_markup_links_04.js @@ -7,7 +7,7 @@ // Tests that the contextual menu shows the right items when clicking on a link // in an attribute. -const TEST_URL = TEST_URL_ROOT + "doc_markup_links.html"; +const TEST_URL = URL_ROOT + "doc_markup_links.html"; const STRINGS = Services.strings .createBundle("chrome://devtools/locale/inspector.properties"); const TOOLBOX_STRINGS = Services.strings @@ -69,7 +69,7 @@ const TEST_DATA = [{ }]; add_task(function*() { - let {inspector} = yield addTab(TEST_URL).then(openInspector); + let {inspector} = yield openInspectorForURL(TEST_URL); let linkFollow = inspector.panelDoc.getElementById("node-menu-link-follow"); let linkCopy = inspector.panelDoc.getElementById("node-menu-link-copy"); diff --git a/devtools/client/inspector/markup/test/browser_markup_links_05.js b/devtools/client/inspector/markup/test/browser_markup_links_05.js index 8e635fef52c..a5c9bd68205 100644 --- a/devtools/client/inspector/markup/test/browser_markup_links_05.js +++ b/devtools/client/inspector/markup/test/browser_markup_links_05.js @@ -7,10 +7,10 @@ // Tests that the contextual menu items shown when clicking on links in // attributes actually do the right things. -const TEST_URL = TEST_URL_ROOT + "doc_markup_links.html"; +const TEST_URL = URL_ROOT + "doc_markup_links.html"; add_task(function*() { - let {inspector} = yield addTab(TEST_URL).then(openInspector); + let {inspector} = yield openInspectorForURL(TEST_URL); info("Select a node with a URI attribute"); yield selectNode("video", inspector); @@ -27,7 +27,7 @@ add_task(function*() { yield waitForTabLoad(tab); ok(true, "A new tab opened"); - is(tab.linkedBrowser.currentURI.spec, TEST_URL_ROOT + "doc_markup_tooltip.png", + is(tab.linkedBrowser.currentURI.spec, URL_ROOT + "doc_markup_tooltip.png", "The URL for the new tab is correct"); gBrowser.removeTab(tab); diff --git a/devtools/client/inspector/markup/test/browser_markup_links_06.js b/devtools/client/inspector/markup/test/browser_markup_links_06.js index 8c15478c134..3c440da2e08 100644 --- a/devtools/client/inspector/markup/test/browser_markup_links_06.js +++ b/devtools/client/inspector/markup/test/browser_markup_links_06.js @@ -7,10 +7,10 @@ // Tests that the contextual menu items shown when clicking on linked attributes // for