Bug 1065355 (part 1) - get timeline tests working in e10s. r=pbrosset

This commit is contained in:
Mark Hammond 2014-09-22 09:07:47 +10:00
parent a15a56e4f4
commit 475f4bd3ec
11 changed files with 11 additions and 14 deletions

View File

@ -1,5 +1,4 @@
[DEFAULT]
skip-if = e10s # Bug 1065355 - devtools tests disabled with e10s
subsuite = devtools
support-files =
doc_simple-test.html

View File

@ -7,10 +7,9 @@
*/
let test = Task.async(function*() {
let [target, debuggee, panel] = yield initTimelinePanel(SIMPLE_URL);
let { target, panel } = yield initTimelinePanel(SIMPLE_URL);
ok(target, "Should have a target available.");
ok(debuggee, "Should have a debuggee available.");
ok(panel, "Should have a panel available.");
ok(panel.panelWin.gToolbox, "Should have a toolbox reference on the panel window.");

View File

@ -7,7 +7,7 @@
*/
let test = Task.async(function*() {
let [target, debuggee, panel] = yield initTimelinePanel(SIMPLE_URL);
let { target, panel } = yield initTimelinePanel(SIMPLE_URL);
let { EVENTS, TimelineView, TimelineController } = panel.panelWin;
let { OVERVIEW_INITIAL_SELECTION_RATIO: selectionRatio } = panel.panelWin;

View File

@ -7,7 +7,7 @@
*/
let test = Task.async(function*() {
let [target, debuggee, panel] = yield initTimelinePanel(SIMPLE_URL);
let { target, panel } = yield initTimelinePanel(SIMPLE_URL);
let { EVENTS, TimelineView, TimelineController } = panel.panelWin;
let { OVERVIEW_INITIAL_SELECTION_RATIO: selectionRatio } = panel.panelWin;

View File

@ -6,7 +6,7 @@
*/
let test = Task.async(function*() {
let [target, debuggee, panel] = yield initTimelinePanel("about:blank");
let { target, panel } = yield initTimelinePanel("about:blank");
let { EVENTS, TimelineView, TimelineController } = panel.panelWin;
yield DevToolsUtils.waitForTime(1000);

View File

@ -7,7 +7,7 @@
*/
let test = Task.async(function*() {
let [target, debuggee, panel] = yield initTimelinePanel(SIMPLE_URL);
let { target, panel } = yield initTimelinePanel(SIMPLE_URL);
let { $, EVENTS } = panel.panelWin;
is($("#record-button").hasAttribute("checked"), false,

View File

@ -6,7 +6,7 @@
*/
let test = Task.async(function*() {
let [target, debuggee, panel] = yield initTimelinePanel(SIMPLE_URL);
let { target, panel } = yield initTimelinePanel(SIMPLE_URL);
let { gFront, TimelineController } = panel.panelWin;
is((yield gFront.isRecording()), false,

View File

@ -7,7 +7,7 @@
*/
let test = Task.async(function*() {
let [target, debuggee, panel] = yield initTimelinePanel(SIMPLE_URL);
let { target, panel } = yield initTimelinePanel(SIMPLE_URL);
let { $, EVENTS, TimelineView, TimelineController } = panel.panelWin;
yield TimelineController.toggleRecording();

View File

@ -6,7 +6,7 @@
*/
let test = Task.async(function*() {
let [target, debuggee, panel] = yield initTimelinePanel(SIMPLE_URL);
let { target, panel } = yield initTimelinePanel(SIMPLE_URL);
let { $, $$, EVENTS, TimelineController } = panel.panelWin;
yield TimelineController.toggleRecording();

View File

@ -16,7 +16,7 @@ var gRGB_TO_HSL = {
};
let test = Task.async(function*() {
let [target, debuggee, panel] = yield initTimelinePanel(SIMPLE_URL);
let { target, panel } = yield initTimelinePanel(SIMPLE_URL);
let { TIMELINE_BLUEPRINT } = devtools.require("devtools/timeline/global");
let { $, $$, EVENTS, TimelineController } = panel.panelWin;

View File

@ -78,20 +78,19 @@ function removeTab(tab) {
* The location of the new tab to spawn.
* @return object
* A promise resolved once the timeline is initialized, with the
* [target, debuggee, panel] instances.
* {target, panel} instances.
*/
function* initTimelinePanel(url) {
info("Initializing a timeline pane.");
let tab = yield addTab(url);
let target = TargetFactory.forTab(tab);
let debuggee = target.window.wrappedJSObject;
yield target.makeRemote();
let toolbox = yield gDevTools.showToolbox(target, "timeline");
let panel = toolbox.getCurrentPanel();
return [target, debuggee, panel];
return { target, panel };
}
/**