mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1181852 - Use shared-head.js for devtools/client/shared;r=jryans
This commit is contained in:
parent
adf3bd6632
commit
e6960dd6a2
@ -6,7 +6,7 @@ var {colorUtils} = require("devtools/shared/css-color");
|
||||
var origColorUnit;
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
let [host, win, doc] = yield createHost("bottom", TEST_URI);
|
||||
|
||||
info("Creating a test canvas element to test colors");
|
||||
|
@ -11,7 +11,7 @@ const {CubicBezierWidget} =
|
||||
require("devtools/client/shared/widgets/CubicBezierWidget");
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
let [host, win, doc] = yield createHost("bottom", TEST_URI);
|
||||
|
||||
info("Checking that the graph markup is created in the parent");
|
||||
|
@ -12,7 +12,7 @@ const {CubicBezierWidget} =
|
||||
const {PREDEFINED} = require("devtools/client/shared/widgets/CubicBezierPresets");
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
let [host, win, doc] = yield createHost("bottom", TEST_URI);
|
||||
|
||||
// Required or widget will be clipped inside of 'bottom'
|
||||
|
@ -12,7 +12,7 @@ const {CubicBezierWidget} =
|
||||
const {PREDEFINED} = require("devtools/client/shared/widgets/CubicBezierPresets");
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
let [host, win, doc] = yield createHost("bottom", TEST_URI);
|
||||
|
||||
let container = doc.querySelector("#container");
|
||||
|
@ -12,7 +12,7 @@ const {CubicBezierPresetWidget} =
|
||||
const {PRESETS} = require("devtools/client/shared/widgets/CubicBezierPresets");
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
let [host, win, doc] = yield createHost("bottom", TEST_URI);
|
||||
|
||||
let container = doc.querySelector("#container");
|
||||
|
@ -13,7 +13,7 @@ const {PREDEFINED, PRESETS, DEFAULT_PRESET_CATEGORY} =
|
||||
require("devtools/client/shared/widgets/CubicBezierPresets");
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
let [host, win, doc] = yield createHost("bottom", TEST_URI);
|
||||
|
||||
let container = doc.querySelector("#container");
|
||||
|
@ -13,7 +13,7 @@ const {CubicBezierWidget} =
|
||||
const {PRESETS} = require("devtools/client/shared/widgets/CubicBezierPresets");
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
let [host, win, doc] = yield createHost("bottom", TEST_URI);
|
||||
|
||||
let container = doc.querySelector("#container");
|
||||
|
@ -9,7 +9,7 @@ const TEST_URI = "chrome://devtools/content/shared/widgets/filter-frame.xhtml";
|
||||
const {CSSFilterEditorWidget} = require("devtools/client/shared/widgets/FilterWidget");
|
||||
|
||||
add_task(function *() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
let [host, win, doc] = yield createHost("bottom", TEST_URI);
|
||||
|
||||
const container = doc.querySelector("#container");
|
||||
|
@ -13,7 +13,7 @@ const STRINGS_URI = "chrome://devtools/locale/filterwidget.properties";
|
||||
const L10N = new ViewHelpers.L10N(STRINGS_URI);
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
let [host, win, doc] = yield createHost("bottom", TEST_URI);
|
||||
|
||||
const TEST_DATA = [
|
||||
|
@ -12,7 +12,7 @@ const GRAYSCALE_MAX = 100;
|
||||
const INVERT_MIN = 0;
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
let [host, win, doc] = yield createHost("bottom", TEST_URI);
|
||||
|
||||
const container = doc.querySelector("#container");
|
||||
|
@ -10,7 +10,7 @@ const {CSSFilterEditorWidget} = require("devtools/client/shared/widgets/FilterWi
|
||||
const LIST_ITEM_HEIGHT = 32;
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
let [host, win, doc] = yield createHost("bottom", TEST_URI);
|
||||
|
||||
const container = doc.querySelector("#container");
|
||||
|
@ -16,7 +16,7 @@ const GRAYSCALE_MAX = 100,
|
||||
GRAYSCALE_MIN = 0;
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
let [host, win, doc] = yield createHost("bottom", TEST_URI);
|
||||
|
||||
const container = doc.querySelector("#container");
|
||||
|
@ -7,7 +7,6 @@
|
||||
|
||||
const TEST_URI = "chrome://devtools/content/shared/widgets/filter-frame.xhtml";
|
||||
|
||||
const { Cu } = require("chrome");
|
||||
const {CSSFilterEditorWidget} = require("devtools/client/shared/widgets/FilterWidget");
|
||||
|
||||
const { ViewHelpers } = Cu.import("resource://devtools/client/shared/widgets/ViewHelpers.jsm", {});
|
||||
@ -15,7 +14,7 @@ const STRINGS_URI = "chrome://devtools/locale/filterwidget.properties";
|
||||
const L10N = new ViewHelpers.L10N(STRINGS_URI);
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
let [host, win, doc] = yield createHost("bottom", TEST_URI);
|
||||
|
||||
const container = doc.querySelector("#container");
|
||||
|
@ -7,7 +7,6 @@
|
||||
|
||||
const TEST_URI = "chrome://devtools/content/shared/widgets/filter-frame.xhtml";
|
||||
|
||||
const { Cu } = require("chrome");
|
||||
const {CSSFilterEditorWidget} = require("devtools/client/shared/widgets/FilterWidget");
|
||||
|
||||
const { ViewHelpers } = Cu.import("resource://devtools/client/shared/widgets/ViewHelpers.jsm", {});
|
||||
@ -15,7 +14,7 @@ const STRINGS_URI = "chrome://devtools/locale/filterwidget.properties";
|
||||
const L10N = new ViewHelpers.L10N(STRINGS_URI);
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
let [host, win, doc] = yield createHost("bottom", TEST_URI);
|
||||
|
||||
const container = doc.querySelector("#container");
|
||||
|
@ -14,7 +14,7 @@ const SLOW_VALUE_MULTIPLIER = 0.1;
|
||||
const DEFAULT_VALUE_MULTIPLIER = 1;
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
let [host, win, doc] = yield createHost("bottom", TEST_URI);
|
||||
|
||||
const container = doc.querySelector("#container");
|
||||
|
@ -14,7 +14,7 @@ const SLOW_VALUE_MULTIPLIER = 0.1;
|
||||
const DEFAULT_VALUE_MULTIPLIER = 1;
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
let [host, win, doc] = yield createHost("bottom", TEST_URI);
|
||||
|
||||
const container = doc.querySelector("#container");
|
||||
|
@ -14,7 +14,7 @@ const SLOW_VALUE_MULTIPLIER = 0.1;
|
||||
const DEFAULT_VALUE_MULTIPLIER = 1;
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
let [host, win, doc] = yield createHost("bottom", TEST_URI);
|
||||
|
||||
const container = doc.querySelector("#container");
|
||||
|
@ -9,7 +9,7 @@ const TEST_URI = "chrome://devtools/content/shared/widgets/filter-frame.xhtml";
|
||||
const {CSSFilterEditorWidget} = require("devtools/client/shared/widgets/FilterWidget");
|
||||
|
||||
add_task(function* () {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
|
||||
let [host, win, doc] = yield createHost("bottom", TEST_URI);
|
||||
|
||||
|
@ -9,7 +9,7 @@ const TEST_URI = "chrome://devtools/content/shared/widgets/filter-frame.xhtml";
|
||||
const {CSSFilterEditorWidget} = require("devtools/client/shared/widgets/FilterWidget");
|
||||
|
||||
add_task(function* () {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
|
||||
let [host, win, doc] = yield createHost("bottom", TEST_URI);
|
||||
|
||||
|
@ -9,7 +9,7 @@ const TEST_URI = "chrome://devtools/content/shared/widgets/filter-frame.xhtml";
|
||||
const {CSSFilterEditorWidget} = require("devtools/client/shared/widgets/FilterWidget");
|
||||
|
||||
add_task(function* () {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
|
||||
let [host, win, doc] = yield createHost("bottom", TEST_URI);
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
var {FlameGraph} = require("devtools/client/shared/widgets/FlameGraph");
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
yield performTest();
|
||||
gBrowser.removeCurrentTab();
|
||||
});
|
||||
|
@ -6,7 +6,7 @@
|
||||
var {FlameGraph} = require("devtools/client/shared/widgets/FlameGraph");
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
yield performTest();
|
||||
gBrowser.removeCurrentTab();
|
||||
});
|
||||
|
@ -11,7 +11,7 @@ var TEST_HEIGHT = 100;
|
||||
var {FlameGraph} = require("devtools/client/shared/widgets/FlameGraph");
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
yield performTest();
|
||||
gBrowser.removeCurrentTab();
|
||||
});
|
||||
|
@ -12,7 +12,7 @@ var TEST_DPI_DENSITIY = 2;
|
||||
var {FlameGraph} = require("devtools/client/shared/widgets/FlameGraph");
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
yield performTest();
|
||||
gBrowser.removeCurrentTab();
|
||||
});
|
||||
|
@ -12,7 +12,7 @@ var TEST_DPI_DENSITIY = 2;
|
||||
var {FlameGraph} = require("devtools/client/shared/widgets/FlameGraph");
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
yield performTest();
|
||||
gBrowser.removeCurrentTab();
|
||||
});
|
||||
|
@ -12,7 +12,7 @@ var {FLAME_GRAPH_BLOCK_TEXT_FONT_FAMILY} = require("devtools/client/shared/widge
|
||||
var L10N = new ViewHelpers.L10N();
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
yield performTest();
|
||||
gBrowser.removeCurrentTab();
|
||||
});
|
||||
|
@ -8,7 +8,7 @@ var {FlameGraphUtils} = require("devtools/client/shared/widgets/FlameGraph");
|
||||
var {PALLETTE_SIZE} = require("devtools/client/shared/widgets/FlameGraph");
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
yield performTest();
|
||||
gBrowser.removeCurrentTab();
|
||||
});
|
||||
|
@ -7,7 +7,7 @@ var {FlameGraphUtils} = require("devtools/client/shared/widgets/FlameGraph");
|
||||
var {PALLETTE_SIZE} = require("devtools/client/shared/widgets/FlameGraph");
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
yield performTest();
|
||||
gBrowser.removeCurrentTab();
|
||||
});
|
||||
|
@ -8,7 +8,7 @@ var {PALLETTE_SIZE} = require("devtools/client/shared/widgets/FlameGraph");
|
||||
var {FrameNode} = require("devtools/client/performance/modules/logic/tree-model");
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
yield performTest();
|
||||
gBrowser.removeCurrentTab();
|
||||
});
|
||||
|
@ -8,7 +8,7 @@ var {PALLETTE_SIZE} = require("devtools/client/shared/widgets/FlameGraph");
|
||||
var {FrameNode} = require("devtools/client/performance/modules/logic/tree-model");
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
yield performTest();
|
||||
gBrowser.removeCurrentTab();
|
||||
});
|
||||
|
@ -6,7 +6,7 @@
|
||||
var {FlameGraphUtils} = require("devtools/client/shared/widgets/FlameGraph");
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
yield performTest();
|
||||
gBrowser.removeCurrentTab();
|
||||
});
|
||||
|
@ -8,7 +8,7 @@ var {FlameGraphUtils} = require("devtools/client/shared/widgets/FlameGraph");
|
||||
var {PALLETTE_SIZE} = require("devtools/client/shared/widgets/FlameGraph");
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
yield performTest();
|
||||
gBrowser.removeCurrentTab();
|
||||
});
|
||||
|
@ -6,7 +6,7 @@
|
||||
var LineGraphWidget = require("devtools/client/shared/widgets/LineGraphWidget");
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
yield performTest();
|
||||
gBrowser.removeCurrentTab();
|
||||
finish();
|
||||
|
@ -8,7 +8,7 @@ const TEST_REGIONS = [{ start: 320, end: 460 }, { start: 780, end: 860 }];
|
||||
var LineGraphWidget = require("devtools/client/shared/widgets/LineGraphWidget");
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
yield performTest();
|
||||
gBrowser.removeCurrentTab();
|
||||
});
|
||||
|
@ -7,7 +7,7 @@
|
||||
var LineGraphWidget = require("devtools/client/shared/widgets/LineGraphWidget");
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
yield performTest();
|
||||
gBrowser.removeCurrentTab();
|
||||
});
|
||||
|
@ -6,7 +6,7 @@
|
||||
var LineGraphWidget = require("devtools/client/shared/widgets/LineGraphWidget");
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
yield performTest();
|
||||
gBrowser.removeCurrentTab();
|
||||
});
|
||||
|
@ -8,7 +8,7 @@ const TEST_REGIONS = [{ start: 320, end: 460 }, { start: 780, end: 860 }];
|
||||
var LineGraphWidget = require("devtools/client/shared/widgets/LineGraphWidget");
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
yield performTest();
|
||||
gBrowser.removeCurrentTab();
|
||||
});
|
||||
|
@ -8,7 +8,7 @@ const TEST_REGIONS = [{ start: 320, end: 460 }, { start: 780, end: 860 }];
|
||||
var LineGraphWidget = require("devtools/client/shared/widgets/LineGraphWidget");
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
yield performTest();
|
||||
gBrowser.removeCurrentTab();
|
||||
});
|
||||
|
@ -7,7 +7,7 @@ const TEST_DATA = [{ delta: 112, value: 48 }, { delta: 213, value: 59 }, { delta
|
||||
var LineGraphWidget = require("devtools/client/shared/widgets/LineGraphWidget");
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
yield performTest();
|
||||
gBrowser.removeCurrentTab();
|
||||
});
|
||||
|
@ -7,7 +7,7 @@ const TEST_DATA = [{ delta: 112, value: 48 }, { delta: 213, value: 59 }, { delta
|
||||
var LineGraphWidget = require("devtools/client/shared/widgets/LineGraphWidget");
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
yield performTest();
|
||||
gBrowser.removeCurrentTab();
|
||||
});
|
||||
|
@ -9,7 +9,7 @@ const TEST_DATA = [{ delta: 112, value: 48 }, { delta: 213, value: 59 }, { delta
|
||||
var LineGraphWidget = require("devtools/client/shared/widgets/LineGraphWidget");
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
yield performTest();
|
||||
gBrowser.removeCurrentTab();
|
||||
});
|
||||
|
@ -8,7 +8,7 @@ const TEST_REGIONS = [{ start: 320, end: 460 }, { start: 780, end: 860 }];
|
||||
var LineGraphWidget = require("devtools/client/shared/widgets/LineGraphWidget");
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
yield performTest();
|
||||
gBrowser.removeCurrentTab();
|
||||
});
|
||||
|
@ -8,7 +8,7 @@ var LineGraphWidget = require("devtools/client/shared/widgets/LineGraphWidget");
|
||||
var CURRENT_ZOOM = 1;
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
yield performTest();
|
||||
gBrowser.removeCurrentTab();
|
||||
});
|
||||
|
@ -7,7 +7,7 @@ const TEST_DATA = [{ delta: 112, value: 48 }, { delta: 213, value: 59 }, { delta
|
||||
var LineGraphWidget = require("devtools/client/shared/widgets/LineGraphWidget");
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
yield performTest();
|
||||
gBrowser.removeCurrentTab();
|
||||
});
|
||||
|
@ -7,7 +7,7 @@ const TEST_DATA = [{ delta: 112, value: 48 }, { delta: 213, value: 59 }, { delta
|
||||
var LineGraphWidget = require("devtools/client/shared/widgets/LineGraphWidget");
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
yield performTest();
|
||||
gBrowser.removeCurrentTab();
|
||||
});
|
||||
|
@ -7,7 +7,7 @@ const TEST_DATA = [{ delta: 112, value: 48 }, { delta: 213, value: 59 }, { delta
|
||||
var LineGraphWidget = require("devtools/client/shared/widgets/LineGraphWidget");
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
yield performTest();
|
||||
gBrowser.removeCurrentTab();
|
||||
});
|
||||
|
@ -7,7 +7,7 @@ const TEST_DATA = [];
|
||||
var LineGraphWidget = require("devtools/client/shared/widgets/LineGraphWidget");
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
yield performTest();
|
||||
gBrowser.removeCurrentTab();
|
||||
});
|
||||
|
@ -8,7 +8,7 @@ const TEST_DATA = [{ delta: 100, value: 60 }, { delta: 200, value: 59.9 }];
|
||||
var LineGraphWidget = require("devtools/client/shared/widgets/LineGraphWidget");
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
yield performTest();
|
||||
gBrowser.removeCurrentTab();
|
||||
});
|
||||
|
@ -10,7 +10,7 @@ const TEST_DATA = [{ delta: 112, value: 48 }, { delta: 213, value: 59 }, { delta
|
||||
var LineGraphWidget = require("devtools/client/shared/widgets/LineGraphWidget");
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
yield performTest();
|
||||
gBrowser.removeCurrentTab();
|
||||
});
|
||||
|
@ -8,7 +8,7 @@ const TEST_DATA = [{ delta: 100, value: 60 }, { delta: 200, value: 1 }];
|
||||
var LineGraphWidget = require("devtools/client/shared/widgets/LineGraphWidget");
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
yield performTest();
|
||||
gBrowser.removeCurrentTab();
|
||||
});
|
||||
|
@ -7,7 +7,7 @@ const TEST_DATA = [{ delta: 112, value: 48 }, { delta: 213, value: 59 }, { delta
|
||||
var LineGraphWidget = require("devtools/client/shared/widgets/LineGraphWidget");
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
yield performTest();
|
||||
gBrowser.removeCurrentTab();
|
||||
});
|
||||
|
@ -8,7 +8,7 @@ const TEST_DATA = [{ delta: 112, value: 48 }, { delta: 213, value: 59 }, { delta
|
||||
var LineGraphWidget = require("devtools/client/shared/widgets/LineGraphWidget");
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
yield performTest();
|
||||
gBrowser.removeCurrentTab();
|
||||
});
|
||||
|
@ -5,7 +5,7 @@ const TEST_DATA = [{ delta: 112, value: 48 }, { delta: 213, value: 59 }, { delta
|
||||
var LineGraphWidget = require("devtools/client/shared/widgets/LineGraphWidget");
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
yield performTest();
|
||||
gBrowser.removeCurrentTab();
|
||||
});
|
||||
|
@ -12,7 +12,7 @@ const CATEGORIES = [
|
||||
];
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
yield performTest();
|
||||
gBrowser.removeCurrentTab();
|
||||
});
|
||||
|
@ -12,7 +12,7 @@ const CATEGORIES = [
|
||||
];
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
yield performTest();
|
||||
gBrowser.removeCurrentTab();
|
||||
});
|
||||
|
@ -8,7 +8,7 @@ var BarGraphWidget = require("devtools/client/shared/widgets/BarGraphWidget");
|
||||
var {CanvasGraphUtils} = require("devtools/client/shared/widgets/Graphs");
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
yield performTest();
|
||||
gBrowser.removeCurrentTab();
|
||||
});
|
||||
|
@ -6,7 +6,7 @@
|
||||
var LineGraphWidget = require("devtools/client/shared/widgets/LineGraphWidget");
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
yield performTest();
|
||||
gBrowser.removeCurrentTab();
|
||||
});
|
||||
|
@ -7,7 +7,7 @@ const TEST_DATA = [{ delta: 112, value: 48 }, { delta: 213, value: 59 }, { delta
|
||||
var LineGraphWidget = require("devtools/client/shared/widgets/LineGraphWidget");
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
yield performTest();
|
||||
gBrowser.removeCurrentTab();
|
||||
});
|
||||
|
@ -23,7 +23,7 @@ for (let frameRate of FRAMES) {
|
||||
var LineGraphWidget = require("devtools/client/shared/widgets/LineGraphWidget");
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
yield performTest();
|
||||
gBrowser.removeCurrentTab();
|
||||
});
|
||||
|
@ -20,7 +20,7 @@ const SECTIONS = [
|
||||
];
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
yield performTest();
|
||||
gBrowser.removeCurrentTab();
|
||||
});
|
||||
|
@ -4,13 +4,12 @@
|
||||
|
||||
"use strict";
|
||||
|
||||
var promise = require("promise");
|
||||
var {editableField, getInplaceEditorForSpan: inplaceEditor} = require("devtools/client/shared/inplace-editor");
|
||||
|
||||
// Test the inplace-editor behavior.
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("data:text/html;charset=utf-8,inline editor tests");
|
||||
yield addTab("data:text/html;charset=utf-8,inline editor tests");
|
||||
let [host, win, doc] = yield createHost();
|
||||
|
||||
yield testMultipleInitialization(doc);
|
||||
|
@ -5,12 +5,11 @@
|
||||
"use strict";
|
||||
|
||||
var {editableField, getInplaceEditorForSpan: inplaceEditor} = require("devtools/client/shared/inplace-editor");
|
||||
var promise = require("promise");
|
||||
|
||||
// Test that the trimOutput option for the inplace editor works correctly.
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("data:text/html;charset=utf-8,inline editor tests");
|
||||
yield addTab("data:text/html;charset=utf-8,inline editor tests");
|
||||
let [host, win, doc] = yield createHost();
|
||||
|
||||
yield testNonTrimmed(doc);
|
||||
|
@ -9,28 +9,27 @@ var {getAdjustedQuads} = require("devtools/shared/layout/utils");
|
||||
|
||||
const TEST_URI = TEST_URI_ROOT + "browser_layoutHelpers-getBoxQuads.html";
|
||||
|
||||
function test() {
|
||||
addTab(TEST_URI, function(browser, tab) {
|
||||
let doc = browser.contentDocument;
|
||||
add_task(function* () {
|
||||
|
||||
ok(typeof getAdjustedQuads === "function", "getAdjustedQuads is defined");
|
||||
let tab = yield addTab(TEST_URI);
|
||||
let doc = tab.linkedBrowser.contentDocument;
|
||||
|
||||
info("Running tests");
|
||||
ok(typeof getAdjustedQuads === "function", "getAdjustedQuads is defined");
|
||||
|
||||
returnsTheRightDataStructure(doc);
|
||||
isEmptyForMissingNode(doc);
|
||||
isEmptyForHiddenNodes(doc);
|
||||
defaultsToBorderBoxIfNoneProvided(doc);
|
||||
returnsLikeGetBoxQuadsInSimpleCase(doc);
|
||||
takesIframesOffsetsIntoAccount(doc);
|
||||
takesScrollingIntoAccount(doc);
|
||||
takesZoomIntoAccount(doc);
|
||||
returnsMultipleItemsForWrappingInlineElements(doc);
|
||||
info("Running tests");
|
||||
|
||||
gBrowser.removeCurrentTab();
|
||||
finish();
|
||||
});
|
||||
}
|
||||
returnsTheRightDataStructure(doc);
|
||||
isEmptyForMissingNode(doc);
|
||||
isEmptyForHiddenNodes(doc);
|
||||
defaultsToBorderBoxIfNoneProvided(doc);
|
||||
returnsLikeGetBoxQuadsInSimpleCase(doc);
|
||||
takesIframesOffsetsIntoAccount(doc);
|
||||
takesScrollingIntoAccount(doc);
|
||||
takesZoomIntoAccount(doc);
|
||||
returnsMultipleItemsForWrappingInlineElements(doc);
|
||||
|
||||
gBrowser.removeCurrentTab();
|
||||
});
|
||||
|
||||
function returnsTheRightDataStructure(doc) {
|
||||
info("Checks that the returned data contains bounds and 4 points");
|
||||
|
@ -22,7 +22,6 @@
|
||||
|
||||
const {CssDocsTooltip} = require("devtools/client/shared/widgets/Tooltip");
|
||||
const {setBaseCssDocsUrl, MdnDocsWidget} = require("devtools/client/shared/widgets/MdnDocsWidget");
|
||||
const promise = require("promise");
|
||||
|
||||
// frame to load the tooltip into
|
||||
const MDN_DOCS_TOOLTIP_FRAME = "chrome://devtools/content/shared/widgets/mdn-docs-frame.xhtml";
|
||||
@ -51,7 +50,7 @@ const URI_PARAMS = "?utm_source=mozilla&utm_medium=firefox-inspector&utm_campaig
|
||||
add_task(function*() {
|
||||
setBaseCssDocsUrl(TEST_URI_ROOT);
|
||||
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
let [host, win, doc] = yield createHost("bottom", MDN_DOCS_TOOLTIP_FRAME);
|
||||
let widget = new MdnDocsWidget(win.document);
|
||||
|
||||
|
@ -99,7 +99,7 @@ const TEST_DATA = [{
|
||||
add_task(function*() {
|
||||
setBaseCssDocsUrl(TEST_URI_ROOT);
|
||||
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
let [host, win, doc] = yield createHost("bottom", MDN_DOCS_TOOLTIP_FRAME);
|
||||
let widget = new MdnDocsWidget(win.document);
|
||||
|
||||
|
@ -4,7 +4,6 @@
|
||||
// Tests that options-view OptionsView responds to events correctly.
|
||||
|
||||
const {OptionsView} = require("devtools/client/shared/options-view");
|
||||
const {Services} = require("resource://gre/modules/Services.jsm");
|
||||
|
||||
const BRANCH = "devtools.debugger.";
|
||||
const BLACK_BOX_PREF = "auto-black-box";
|
||||
@ -19,7 +18,7 @@ add_task(function*() {
|
||||
Services.prefs.setBoolPref(BRANCH + PRETTY_PRINT_PREF, true);
|
||||
|
||||
info("Opening a test tab and a toolbox host to create the options view in");
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
let [host, win, doc] = yield createHost("bottom", OPTIONS_VIEW_URL);
|
||||
|
||||
yield testOptionsView(win);
|
||||
|
@ -3,13 +3,12 @@
|
||||
|
||||
"use strict";
|
||||
|
||||
var {Services} = Cu.import("resource://gre/modules/Services.jsm", {});
|
||||
var {Loader} = Cu.import("resource://gre/modules/commonjs/toolkit/loader.js",
|
||||
{});
|
||||
var {OutputParser} = require("devtools/shared/output-parser");
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
yield performTest();
|
||||
gBrowser.removeCurrentTab();
|
||||
});
|
||||
|
@ -8,7 +8,7 @@ const TEST_URI = "chrome://devtools/content/shared/widgets/spectrum-frame.xhtml"
|
||||
const {Spectrum} = require("devtools/client/shared/widgets/Spectrum");
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
yield performTest();
|
||||
gBrowser.removeCurrentTab();
|
||||
});
|
||||
|
@ -7,7 +7,7 @@ const TEST_URI = "data:text/html;charset=utf-8," +
|
||||
var {EyedropperManager} = require("devtools/client/eyedropper/eyedropper");
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab(TEST_URI);
|
||||
yield addTab(TEST_URI);
|
||||
let Telemetry = loadTelemetryAndRecordLogs();
|
||||
|
||||
let target = TargetFactory.forTab(gBrowser.selectedTab);
|
||||
|
@ -11,7 +11,7 @@ const TEST_URI = "data:text/html;charset=utf-8," +
|
||||
const TOOL_DELAY = 200;
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab(TEST_URI);
|
||||
yield addTab(TEST_URI);
|
||||
let Telemetry = loadTelemetryAndRecordLogs();
|
||||
|
||||
let target = TargetFactory.forTab(gBrowser.selectedTab);
|
||||
|
@ -9,7 +9,7 @@ const TEST_URI = "data:text/html;charset=utf-8," +
|
||||
const TOOL_DELAY = 200;
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab(TEST_URI);
|
||||
yield addTab(TEST_URI);
|
||||
let Telemetry = loadTelemetryAndRecordLogs();
|
||||
|
||||
let target = TargetFactory.forTab(gBrowser.selectedTab);
|
||||
|
@ -9,7 +9,7 @@ const TEST_URI = "data:text/html;charset=utf-8," +
|
||||
const TOOL_DELAY = 200;
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab(TEST_URI);
|
||||
yield addTab(TEST_URI);
|
||||
let Telemetry = loadTelemetryAndRecordLogs();
|
||||
|
||||
let target = TargetFactory.forTab(gBrowser.selectedTab);
|
||||
|
@ -9,7 +9,7 @@ const TEST_URI = "data:text/html;charset=utf-8," +
|
||||
const TOOL_DELAY = 200;
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab(TEST_URI);
|
||||
yield addTab(TEST_URI);
|
||||
let Telemetry = loadTelemetryAndRecordLogs();
|
||||
|
||||
let target = TargetFactory.forTab(gBrowser.selectedTab);
|
||||
|
@ -8,7 +8,7 @@ const TEST_URI = "data:text/html;charset=utf-8,<p>browser_telemetry_sidebar.js</
|
||||
const TOOL_DELAY = 200;
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab(TEST_URI);
|
||||
yield addTab(TEST_URI);
|
||||
let Telemetry = loadTelemetryAndRecordLogs();
|
||||
|
||||
let target = TargetFactory.forTab(gBrowser.selectedTab);
|
||||
|
@ -9,7 +9,7 @@ const TEST_URI = "data:text/html;charset=utf-8," +
|
||||
const TOOL_DELAY = 200;
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab(TEST_URI);
|
||||
yield addTab(TEST_URI);
|
||||
let Telemetry = loadTelemetryAndRecordLogs();
|
||||
|
||||
yield openAndCloseToolbox(3, TOOL_DELAY, "inspector");
|
||||
|
@ -13,7 +13,7 @@ add_task(function*() {
|
||||
let originalPref = Services.prefs.getBoolPref("devtools.canvasdebugger.enabled");
|
||||
Services.prefs.setBoolPref("devtools.canvasdebugger.enabled", true);
|
||||
|
||||
yield promiseTab(TEST_URI);
|
||||
yield addTab(TEST_URI);
|
||||
let Telemetry = loadTelemetryAndRecordLogs();
|
||||
|
||||
yield openAndCloseToolbox(2, TOOL_DELAY, "canvasdebugger");
|
||||
|
@ -9,7 +9,7 @@ const TEST_URI = "data:text/html;charset=utf-8," +
|
||||
const TOOL_DELAY = 200;
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab(TEST_URI);
|
||||
yield addTab(TEST_URI);
|
||||
let Telemetry = loadTelemetryAndRecordLogs();
|
||||
|
||||
yield openAndCloseToolbox(2, TOOL_DELAY, "inspector");
|
||||
|
@ -9,7 +9,7 @@ const TEST_URI = "data:text/html;charset=utf-8," +
|
||||
const TOOL_DELAY = 200;
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab(TEST_URI);
|
||||
yield addTab(TEST_URI);
|
||||
let Telemetry = loadTelemetryAndRecordLogs();
|
||||
|
||||
yield openAndCloseToolbox(2, TOOL_DELAY, "jsdebugger");
|
||||
|
@ -8,7 +8,7 @@ const TEST_URI = "data:text/html;charset=utf-8,<p>browser_telemetry_toolboxtabs_
|
||||
const TOOL_DELAY = 200;
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab(TEST_URI);
|
||||
yield addTab(TEST_URI);
|
||||
let Telemetry = loadTelemetryAndRecordLogs();
|
||||
|
||||
yield openAndCloseToolbox(2, TOOL_DELAY, "performance");
|
||||
|
@ -8,7 +8,7 @@ const TEST_URI = "data:text/html;charset=utf-8,<p>browser_telemetry_toolboxtabs_
|
||||
const TOOL_DELAY = 200;
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab(TEST_URI);
|
||||
yield addTab(TEST_URI);
|
||||
let Telemetry = loadTelemetryAndRecordLogs();
|
||||
|
||||
yield openAndCloseToolbox(2, TOOL_DELAY, "netmonitor");
|
||||
|
@ -8,7 +8,7 @@ const TEST_URI = "data:text/html;charset=utf-8,<p>browser_telemetry_toolboxtabs_
|
||||
const TOOL_DELAY = 200;
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab(TEST_URI);
|
||||
yield addTab(TEST_URI);
|
||||
let Telemetry = loadTelemetryAndRecordLogs();
|
||||
|
||||
yield openAndCloseToolbox(2, TOOL_DELAY, "options");
|
||||
|
@ -19,7 +19,7 @@ add_task(function*() {
|
||||
let originalPref = Services.prefs.getBoolPref("devtools.shadereditor.enabled");
|
||||
Services.prefs.setBoolPref("devtools.shadereditor.enabled", true);
|
||||
|
||||
yield promiseTab(TEST_URI);
|
||||
yield addTab(TEST_URI);
|
||||
let Telemetry = loadTelemetryAndRecordLogs();
|
||||
|
||||
yield openAndCloseToolbox(2, TOOL_DELAY, "shadereditor");
|
||||
|
@ -11,7 +11,7 @@ add_task(function*() {
|
||||
info("Activating the storage inspector");
|
||||
Services.prefs.setBoolPref("devtools.storage.enabled", true);
|
||||
|
||||
yield promiseTab(TEST_URI);
|
||||
yield addTab(TEST_URI);
|
||||
let Telemetry = loadTelemetryAndRecordLogs();
|
||||
|
||||
yield openAndCloseToolbox(2, TOOL_DELAY, "storage");
|
||||
|
@ -8,7 +8,7 @@ const TEST_URI = "data:text/html;charset=utf-8,<p>browser_telemetry_toolboxtabs_
|
||||
const TOOL_DELAY = 200;
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab(TEST_URI);
|
||||
yield addTab(TEST_URI);
|
||||
let Telemetry = loadTelemetryAndRecordLogs();
|
||||
|
||||
yield openAndCloseToolbox(2, TOOL_DELAY, "styleeditor");
|
||||
|
@ -12,7 +12,7 @@ add_task(function*() {
|
||||
let originalPref = Services.prefs.getBoolPref("devtools.webaudioeditor.enabled");
|
||||
Services.prefs.setBoolPref("devtools.webaudioeditor.enabled", true);
|
||||
|
||||
yield promiseTab(TEST_URI);
|
||||
yield addTab(TEST_URI);
|
||||
let Telemetry = loadTelemetryAndRecordLogs();
|
||||
|
||||
yield openAndCloseToolbox(2, TOOL_DELAY, "webaudioeditor");
|
||||
|
@ -8,7 +8,7 @@ const TEST_URI = "data:text/html;charset=utf-8,<p>browser_telemetry_toolboxtabs_
|
||||
const TOOL_DELAY = 200;
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab(TEST_URI);
|
||||
yield addTab(TEST_URI);
|
||||
let Telemetry = loadTelemetryAndRecordLogs();
|
||||
|
||||
yield openAndCloseToolbox(2, TOOL_DELAY, "webconsole");
|
||||
|
@ -14,7 +14,7 @@ const template = Cu.import("resource://devtools/shared/gcli/Templater.jsm", {}).
|
||||
const TEST_URI = TEST_URI_ROOT + "browser_templater_basic.html";
|
||||
|
||||
var test = Task.async(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
let [host, win, doc] = yield createHost("bottom", TEST_URI);
|
||||
|
||||
info("Starting DOM Templater Tests");
|
||||
|
@ -6,12 +6,12 @@
|
||||
|
||||
var {getColor, getTheme, setTheme} = require("devtools/client/shared/theme");
|
||||
|
||||
function test() {
|
||||
add_task(function* () {
|
||||
testGetTheme();
|
||||
testSetTheme();
|
||||
testGetColor();
|
||||
testColorExistence();
|
||||
}
|
||||
});
|
||||
|
||||
function testGetTheme () {
|
||||
let originalTheme = getTheme();
|
||||
|
@ -5,26 +5,17 @@
|
||||
|
||||
const TEST_URI = TEST_URI_ROOT + "browser_toolbar_basic.html";
|
||||
|
||||
function test() {
|
||||
addTab(TEST_URI, function(browser, tab) {
|
||||
info("Starting browser_toolbar_basic.js");
|
||||
runTest();
|
||||
});
|
||||
}
|
||||
add_task(function*() {
|
||||
info("Starting browser_toolbar_basic.js");
|
||||
yield addTab(TEST_URI);
|
||||
|
||||
function runTest() {
|
||||
ok(!DeveloperToolbar.visible, "DeveloperToolbar is not visible in runTest");
|
||||
ok(!DeveloperToolbar.visible, "DeveloperToolbar is not visible in to start");
|
||||
|
||||
oneTimeObserve(DeveloperToolbar.NOTIFICATIONS.SHOW, catchFail(checkOpen));
|
||||
let shown = oneTimeObserve(DeveloperToolbar.NOTIFICATIONS.SHOW);
|
||||
document.getElementById("Tools:DevToolbar").doCommand();
|
||||
}
|
||||
|
||||
function isChecked(b) {
|
||||
return b.getAttribute("checked") == "true";
|
||||
}
|
||||
|
||||
function checkOpen() {
|
||||
yield shown;
|
||||
ok(DeveloperToolbar.visible, "DeveloperToolbar is visible in checkOpen");
|
||||
|
||||
let close = document.getElementById("developer-toolbar-closebutton");
|
||||
ok(close, "Close button exists");
|
||||
|
||||
@ -33,42 +24,35 @@ function checkOpen() {
|
||||
ok(!isChecked(toggleToolbox), "toggle toolbox button is not checked");
|
||||
|
||||
let target = TargetFactory.forTab(gBrowser.selectedTab);
|
||||
gDevTools.showToolbox(target, "inspector").then(function(toolbox) {
|
||||
ok(isChecked(toggleToolbox), "toggle toolbox button is checked");
|
||||
|
||||
addTab("about:blank", function(browser, tab) {
|
||||
info("Opened a new tab");
|
||||
|
||||
ok(!isChecked(toggleToolbox), "toggle toolbox button is not checked");
|
||||
|
||||
gBrowser.removeCurrentTab();
|
||||
|
||||
oneTimeObserve(DeveloperToolbar.NOTIFICATIONS.HIDE, catchFail(checkClosed));
|
||||
document.getElementById("Tools:DevToolbar").doCommand();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function checkClosed() {
|
||||
ok(!DeveloperToolbar.visible, "DeveloperToolbar is not visible in checkClosed");
|
||||
|
||||
oneTimeObserve(DeveloperToolbar.NOTIFICATIONS.SHOW, catchFail(checkReOpen));
|
||||
document.getElementById("Tools:DevToolbar").doCommand();
|
||||
}
|
||||
|
||||
function checkReOpen() {
|
||||
ok(DeveloperToolbar.visible, "DeveloperToolbar is visible in checkReOpen");
|
||||
|
||||
let toggleToolbox =
|
||||
document.getElementById("devtoolsMenuBroadcaster_DevToolbox");
|
||||
let toolbox = yield gDevTools.showToolbox(target, "inspector");
|
||||
ok(isChecked(toggleToolbox), "toggle toolbox button is checked");
|
||||
|
||||
oneTimeObserve(DeveloperToolbar.NOTIFICATIONS.HIDE, catchFail(checkReClosed));
|
||||
yield addTab("about:blank");
|
||||
info("Opened a new tab");
|
||||
|
||||
ok(!isChecked(toggleToolbox), "toggle toolbox button is not checked");
|
||||
|
||||
gBrowser.removeCurrentTab();
|
||||
|
||||
let hidden = oneTimeObserve(DeveloperToolbar.NOTIFICATIONS.HIDE);
|
||||
document.getElementById("Tools:DevToolbar").doCommand();
|
||||
yield hidden;
|
||||
ok(!DeveloperToolbar.visible, "DeveloperToolbar is not visible in hidden");
|
||||
|
||||
shown = oneTimeObserve(DeveloperToolbar.NOTIFICATIONS.SHOW);
|
||||
document.getElementById("Tools:DevToolbar").doCommand();
|
||||
yield shown;
|
||||
ok(DeveloperToolbar.visible, "DeveloperToolbar is visible in after open");
|
||||
|
||||
ok(isChecked(toggleToolbox), "toggle toolbox button is checked");
|
||||
|
||||
hidden = oneTimeObserve(DeveloperToolbar.NOTIFICATIONS.HIDE);
|
||||
document.getElementById("developer-toolbar-closebutton").doCommand();
|
||||
}
|
||||
yield hidden;
|
||||
|
||||
function checkReClosed() {
|
||||
ok(!DeveloperToolbar.visible, "DeveloperToolbar is not visible in checkReClosed");
|
||||
ok(!DeveloperToolbar.visible, "DeveloperToolbar is not visible after re-close");
|
||||
});
|
||||
|
||||
finish();
|
||||
function isChecked(b) {
|
||||
return b.getAttribute("checked") == "true";
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ registerCleanupFunction(() => {
|
||||
});
|
||||
|
||||
add_task(function* showToolbar() {
|
||||
yield promiseTab(TEST_URI);
|
||||
yield addTab(TEST_URI);
|
||||
|
||||
info("Starting browser_toolbar_tooltip.js");
|
||||
|
||||
|
@ -19,9 +19,9 @@ function test() {
|
||||
});
|
||||
|
||||
ignoreAllUncaughtExceptions();
|
||||
addTab(TEST_URI, openToolbar);
|
||||
addTab(TEST_URI).then(openToolbar);
|
||||
|
||||
function openToolbar(browser, tab) {
|
||||
function openToolbar(tab) {
|
||||
tab1 = tab;
|
||||
ignoreAllUncaughtExceptions(false);
|
||||
|
||||
@ -62,12 +62,12 @@ function test() {
|
||||
warnings: 1,
|
||||
callback: () => {
|
||||
ignoreAllUncaughtExceptions();
|
||||
addTab(TEST_URI, onOpenSecondTab);
|
||||
addTab(TEST_URI).then(onOpenSecondTab);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
function onOpenSecondTab(browser, tab) {
|
||||
function onOpenSecondTab(tab) {
|
||||
tab2 = tab;
|
||||
|
||||
ignoreAllUncaughtExceptions(false);
|
||||
|
@ -11,7 +11,7 @@ const TEST_URI = "data:text/html;charset=utf-8,<head><link rel='stylesheet' " +
|
||||
const {TreeWidget} = require("devtools/client/shared/widgets/TreeWidget");
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
let [host, win, doc] = yield createHost("bottom", TEST_URI);
|
||||
|
||||
let tree = new TreeWidget(doc.querySelector("div"), {
|
||||
|
@ -12,7 +12,7 @@ const {TreeWidget} = require("devtools/client/shared/widgets/TreeWidget");
|
||||
const Promise = require("promise");
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
let [host, win, doc] = yield createHost("bottom", TEST_URI);
|
||||
|
||||
let tree = new TreeWidget(doc.querySelector("div"), {
|
||||
|
@ -12,7 +12,7 @@ const {TreeWidget} = require("devtools/client/shared/widgets/TreeWidget");
|
||||
const Promise = require("promise");
|
||||
|
||||
add_task(function*() {
|
||||
yield promiseTab("about:blank");
|
||||
yield addTab("about:blank");
|
||||
let [host, win, doc] = yield createHost("bottom", TEST_URI);
|
||||
|
||||
let tree = new TreeWidget(doc.querySelector("div"), {
|
||||
|
@ -2,59 +2,16 @@
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
var {require} = Cu.import("resource://devtools/shared/Loader.jsm", {});
|
||||
var {TargetFactory} = require("devtools/client/framework/target");
|
||||
var {console} = Cu.import("resource://gre/modules/Console.jsm", {});
|
||||
var {gDevTools} = Cu.import("resource://devtools/client/framework/gDevTools.jsm", {});
|
||||
// shared-head.js handles imports, constants, and utility functions
|
||||
Services.scriptloader.loadSubScript("chrome://mochitests/content/browser/devtools/client/framework/test/shared-head.js", this);
|
||||
|
||||
const {DOMHelpers} = Cu.import("resource://devtools/client/shared/DOMHelpers.jsm", {});
|
||||
const {Hosts} = require("devtools/client/framework/toolbox-hosts");
|
||||
const {defer} = require("promise");
|
||||
const DevToolsUtils = require("devtools/shared/DevToolsUtils");
|
||||
|
||||
DevToolsUtils.testing = true;
|
||||
SimpleTest.registerCleanupFunction(() => {
|
||||
DevToolsUtils.testing = false;
|
||||
});
|
||||
|
||||
const TEST_URI_ROOT = "http://example.com/browser/devtools/client/shared/test/";
|
||||
const OPTIONS_VIEW_URL = TEST_URI_ROOT + "doc_options-view.xul";
|
||||
|
||||
/**
|
||||
* Open a new tab at a URL and call a callback on load
|
||||
*/
|
||||
function addTab(aURL, aCallback)
|
||||
{
|
||||
waitForExplicitFinish();
|
||||
|
||||
gBrowser.selectedTab = gBrowser.addTab();
|
||||
let tab = gBrowser.selectedTab;
|
||||
let browser = gBrowser.getBrowserForTab(tab);
|
||||
|
||||
let url = encodeURI(aURL);
|
||||
|
||||
BrowserTestUtils.browserLoaded(browser, false, url).then(() => {
|
||||
aCallback(browser, tab, browser.contentDocument);
|
||||
});
|
||||
|
||||
browser.loadURI(url);
|
||||
}
|
||||
|
||||
function promiseTab(aURL) {
|
||||
return new Promise(resolve =>
|
||||
addTab(aURL, resolve));
|
||||
}
|
||||
|
||||
registerCleanupFunction(function* tearDown() {
|
||||
let target = TargetFactory.forTab(gBrowser.selectedTab);
|
||||
yield gDevTools.closeToolbox(target);
|
||||
|
||||
while (gBrowser.tabs.length > 1) {
|
||||
gBrowser.removeCurrentTab();
|
||||
}
|
||||
|
||||
console = undefined;
|
||||
});
|
||||
|
||||
function catchFail(func) {
|
||||
return function() {
|
||||
try {
|
||||
@ -136,11 +93,17 @@ function waitForValue(aOptions)
|
||||
}
|
||||
|
||||
function oneTimeObserve(name, callback) {
|
||||
var func = function() {
|
||||
Services.obs.removeObserver(func, name);
|
||||
callback();
|
||||
};
|
||||
Services.obs.addObserver(func, name, false);
|
||||
return new Promise((resolve) => {
|
||||
|
||||
var func = function() {
|
||||
Services.obs.removeObserver(func, name);
|
||||
if (callback) {
|
||||
callback();
|
||||
}
|
||||
resolve();
|
||||
};
|
||||
Services.obs.addObserver(func, name, false);
|
||||
});
|
||||
}
|
||||
|
||||
var createHost = Task.async(function*(type = "bottom", src = "data:text/html;charset=utf-8,") {
|
||||
|
Loading…
Reference in New Issue
Block a user