Bug 1137285 - Convert addTab+openInspector to openInspectorForURL r=pbrosset

This commit is contained in:
Alexandre Poirot 2015-08-26 06:05:14 -07:00
parent f543286b73
commit 74269e984f
5 changed files with 9 additions and 15 deletions

View File

@ -8,8 +8,7 @@
// those nodes
add_task(function*() {
info("Loading the test document and opening the inspector");
yield addTab("data:text/html;charset=utf-8,<h1>foo</h1><span>bar</span>");
let {toolbox, inspector} = yield openInspector();
let {toolbox, inspector} = yield openInspectorForURL("data:text/html;charset=utf-8,<h1>foo</h1><span>bar</span>");
info("Selecting the test node");
yield selectNode("span", inspector);
let bcButtons = inspector.breadcrumbs["container"];

View File

@ -4,17 +4,14 @@
"use strict";
const TEST_URI = "http://example.com/browser/browser/devtools/inspector/" +
"test/browser_inspector_highlight_after_transition.html";
const TEST_URI = TEST_URL_ROOT + "doc_inspector_highlight_after_transition.html";
// Test that the nodeinfobar is never displayed above the top or below the
// bottom of the content area.
add_task(function*() {
info("Loading the test document and opening the inspector");
yield addTab(TEST_URI);
let {inspector} = yield openInspector();
let {inspector} = yield openInspectorForURL(TEST_URI);
yield checkDivHeight(inspector);
});

View File

@ -8,8 +8,7 @@
// those nodes
add_task(function*() {
info("Loading the test document and opening the inspector");
yield addTab("data:text/html;charset=utf-8,<h1>foo</h1><span>bar</span>");
let {toolbox, inspector} = yield openInspector();
let {toolbox, inspector} = yield openInspectorForURL("data:text/html;charset=utf-8,<h1>foo</h1><span>bar</span>");
let isVisible = yield isHighlighting(toolbox);
ok(!isVisible, "The highlighter is hidden by default");

View File

@ -6,12 +6,10 @@
// Check the position and text content of the highlighter nodeinfo bar.
const TEST_URI = "http://example.com/browser/browser/devtools/inspector/" +
"test/doc_inspector_infobar_01.html";
const TEST_URI = TEST_URL_ROOT + "doc_inspector_infobar_01.html";
add_task(function*() {
yield addTab(TEST_URI);
let {inspector} = yield openInspector();
let {inspector} = yield openInspectorForURL(TEST_URI);
let testData = [
{

View File

@ -7,17 +7,18 @@
// that these items actually work
const DOMUtils = Cc["@mozilla.org/inspector/dom-utils;1"].getService(Ci.inIDOMUtils);
const TEST_URI = "data:text/html;charset=UTF-8," +
"pseudo-class lock node menu tests";
const PSEUDOS = ["hover", "active", "focus"];
add_task(function*() {
yield addTab("data:text/html,pseudo-class lock node menu tests");
let {inspector} = yield openInspectorForURL(TEST_URI);
info("Creating the test element");
let div = content.document.createElement("div");
div.textContent = "test div";
content.document.body.appendChild(div);
let {inspector} = yield openInspector();
yield selectNode("div", inspector);
info("Getting the inspector ctx menu and opening it");