Bug 1065355 (part 2) - get shadereditor tests working in e10s. r=pbrosset

This commit is contained in:
Mark Hammond 2014-09-22 09:07:49 +10:00
parent f64fb1028f
commit bd5b9d7209
36 changed files with 37 additions and 41 deletions

View File

@ -7,10 +7,9 @@
*/
function ifWebGLSupported() {
let [target, debuggee, panel] = yield initShaderEditor(SIMPLE_CANVAS_URL);
let { target, panel } = yield initShaderEditor(SIMPLE_CANVAS_URL);
ok(target, "Should have a target available.");
ok(debuggee, "Should have a debuggee available.");
ok(panel, "Should have a panel available.");
yield teardown(panel);

View File

@ -5,7 +5,7 @@
* Tests if the shader editor works with bfcache.
*/
function ifWebGLSupported() {
let [target, debuggee, panel] = yield initShaderEditor(SIMPLE_CANVAS_URL);
let { target, panel } = yield initShaderEditor(SIMPLE_CANVAS_URL);
let { gFront, $, EVENTS, ShadersListView, ShadersEditorsView } = panel.panelWin;
// Attach frame scripts if in e10s to perform

View File

@ -7,7 +7,7 @@
*/
function ifWebGLSupported() {
let [target, debuggee, panel] = yield initShaderEditor(SIMPLE_CANVAS_URL);
let { target, panel } = yield initShaderEditor(SIMPLE_CANVAS_URL);
let { gFront, ShadersEditorsView, EVENTS } = panel.panelWin;
reload(target);

View File

@ -7,7 +7,7 @@
*/
function ifWebGLSupported() {
let [target, debuggee, panel] = yield initShaderEditor(SIMPLE_CANVAS_URL);
let { target, panel } = yield initShaderEditor(SIMPLE_CANVAS_URL);
let { gFront, EVENTS, ShadersEditorsView } = panel.panelWin;
reload(target);

View File

@ -7,7 +7,7 @@
*/
function ifWebGLSupported() {
let [target, debuggee, panel] = yield initShaderEditor(SIMPLE_CANVAS_URL);
let { target, panel } = yield initShaderEditor(SIMPLE_CANVAS_URL);
let { gFront, EVENTS, ShadersEditorsView } = panel.panelWin;
reload(target);

View File

@ -6,7 +6,7 @@
*/
function ifWebGLSupported() {
let [target, debuggee, panel] = yield initShaderEditor(SIMPLE_CANVAS_URL);
let { target, panel } = yield initShaderEditor(SIMPLE_CANVAS_URL);
let { gFront, ShadersEditorsView } = panel.panelWin;
try {

View File

@ -6,7 +6,7 @@
*/
function ifWebGLSupported() {
let [target, debuggee, panel] = yield initShaderEditor(SIMPLE_CANVAS_URL);
let { target, panel } = yield initShaderEditor(SIMPLE_CANVAS_URL);
let { gFront, $ } = panel.panelWin;
is($("#reload-notice").hidden, false,

View File

@ -6,7 +6,7 @@
*/
function ifWebGLSupported() {
let [target, debuggee, panel] = yield initShaderEditor(SIMPLE_CANVAS_URL);
let { target, panel } = yield initShaderEditor(SIMPLE_CANVAS_URL);
let { gFront, $, EVENTS, ShadersListView, ShadersEditorsView } = panel.panelWin;
reload(target);

View File

@ -6,7 +6,7 @@
*/
function ifWebGLSupported() {
let [target, debuggee, panel] = yield initShaderEditor(MULTIPLE_CONTEXTS_URL);
let { target, debuggee, panel } = yield initShaderEditor(MULTIPLE_CONTEXTS_URL);
let { gFront, EVENTS, ShadersListView, ShadersEditorsView } = panel.panelWin;
once(panel.panelWin, EVENTS.SHADER_COMPILED).then(() => {

View File

@ -7,7 +7,7 @@
*/
function ifWebGLSupported() {
let [target, debuggee, panel] = yield initShaderEditor(BLENDED_GEOMETRY_CANVAS_URL);
let { target, debuggee, panel } = yield initShaderEditor(BLENDED_GEOMETRY_CANVAS_URL);
let { gFront, EVENTS, ShadersListView, ShadersEditorsView } = panel.panelWin;
reload(target);

View File

@ -6,7 +6,7 @@
*/
function ifWebGLSupported() {
let [target, debuggee, panel] = yield initShaderEditor(MULTIPLE_CONTEXTS_URL);
let { target, debuggee, panel } = yield initShaderEditor(MULTIPLE_CONTEXTS_URL);
let { EVENTS, gFront, ShadersListView, ShadersEditorsView } = panel.panelWin;
reload(target);

View File

@ -6,7 +6,7 @@
*/
function ifWebGLSupported() {
let [target, debuggee, panel] = yield initShaderEditor(MULTIPLE_CONTEXTS_URL);
let { target, panel } = yield initShaderEditor(MULTIPLE_CONTEXTS_URL);
let { gFront, EVENTS, ShadersListView, ShadersEditorsView } = panel.panelWin;
once(panel.panelWin, EVENTS.SHADER_COMPILED).then(() => {

View File

@ -7,7 +7,7 @@
*/
function ifWebGLSupported() {
let [target, debuggee, panel] = yield initShaderEditor(BLENDED_GEOMETRY_CANVAS_URL);
let { target, debuggee, panel } = yield initShaderEditor(BLENDED_GEOMETRY_CANVAS_URL);
let { gFront, EVENTS, ShadersListView, ShadersEditorsView } = panel.panelWin;
reload(target);

View File

@ -7,7 +7,7 @@
*/
function ifWebGLSupported() {
let [target, debuggee, panel] = yield initShaderEditor(MULTIPLE_CONTEXTS_URL);
let { target, panel } = yield initShaderEditor(MULTIPLE_CONTEXTS_URL);
let { gFront, EVENTS, L10N, ShadersListView, ShadersEditorsView } = panel.panelWin;
is(ShadersListView.itemCount, 0,

View File

@ -6,7 +6,7 @@
*/
function ifWebGLSupported() {
let [target, debuggee, panel] = yield initShaderEditor(SIMPLE_CANVAS_URL);
let { target, panel } = yield initShaderEditor(SIMPLE_CANVAS_URL);
let { gFront, $, EVENTS, ShadersEditorsView } = panel.panelWin;
reload(target);

View File

@ -7,7 +7,7 @@
*/
function ifWebGLSupported() {
let [target, debuggee, panel] = yield initShaderEditor(SIMPLE_CANVAS_URL);
let { target, panel } = yield initShaderEditor(SIMPLE_CANVAS_URL);
let { gFront, EVENTS, ShadersEditorsView } = panel.panelWin;
reload(target);

View File

@ -7,7 +7,7 @@
*/
function ifWebGLSupported() {
let [target, debuggee, panel] = yield initShaderEditor(MULTIPLE_CONTEXTS_URL);
let { target, panel } = yield initShaderEditor(MULTIPLE_CONTEXTS_URL);
let { gFront, EVENTS, ShadersListView, ShadersEditorsView } = panel.panelWin;
reload(target);

View File

@ -6,10 +6,9 @@
*/
function ifWebGLSupported() {
let [target, debuggee, front] = yield initBackend(SIMPLE_CANVAS_URL);
let { target, front } = yield initBackend(SIMPLE_CANVAS_URL);
ok(target, "Should have a target available.");
ok(debuggee, "Should have a debuggee available.");
ok(front, "Should have a protocol front available.");
yield removeTab(target.tab);

View File

@ -7,7 +7,7 @@
*/
function ifWebGLSupported() {
let [target, debuggee, front] = yield initBackend(SIMPLE_CANVAS_URL);
let { target, front } = yield initBackend(SIMPLE_CANVAS_URL);
once(front, "program-linked").then(() => {
ok(false, "A 'program-linked' notification shouldn't have been sent!");

View File

@ -7,7 +7,7 @@
*/
function ifWebGLSupported() {
let [target, debuggee, front] = yield initBackend(SIMPLE_CANVAS_URL);
let { target, front } = yield initBackend(SIMPLE_CANVAS_URL);
let navigated = once(target, "navigate");
let linked = once(front, "program-linked");

View File

@ -7,7 +7,7 @@
*/
function ifWebGLSupported() {
let [target, debuggee, front] = yield initBackend(SIMPLE_CANVAS_URL);
let { target, front } = yield initBackend(SIMPLE_CANVAS_URL);
front.setup({ reload: true });
let programActor = yield once(front, "program-linked");

View File

@ -7,7 +7,7 @@
*/
function ifWebGLSupported() {
let [target, debuggee, front] = yield initBackend(SIMPLE_CANVAS_URL);
let { target, front } = yield initBackend(SIMPLE_CANVAS_URL);
front.setup({ reload: true });
let programActor = yield once(front, "program-linked");

View File

@ -7,7 +7,7 @@
*/
function ifWebGLSupported() {
let [target, debuggee, front] = yield initBackend(SIMPLE_CANVAS_URL);
let { target, front } = yield initBackend(SIMPLE_CANVAS_URL);
front.setup({ reload: true });
let programActor = yield once(front, "program-linked");

View File

@ -6,7 +6,7 @@
*/
function ifWebGLSupported() {
let [target, debuggee, front] = yield initBackend(SIMPLE_CANVAS_URL);
let { target, front } = yield initBackend(SIMPLE_CANVAS_URL);
front.setup({ reload: true });
let programActor = yield once(front, "program-linked");

View File

@ -7,7 +7,7 @@
*/
function ifWebGLSupported() {
let [target, debuggee, front] = yield initBackend(SIMPLE_CANVAS_URL);
let { target, front } = yield initBackend(SIMPLE_CANVAS_URL);
front.setup({ reload: true });
let programActor = yield once(front, "program-linked");

View File

@ -7,7 +7,7 @@
*/
function ifWebGLSupported() {
let [target, debuggee, front] = yield initBackend(SIMPLE_CANVAS_URL);
let { target, front } = yield initBackend(SIMPLE_CANVAS_URL);
front.setup({ reload: true });
let programActor = yield once(front, "program-linked");

View File

@ -7,7 +7,7 @@
*/
function ifWebGLSupported() {
let [target, debuggee, front] = yield initBackend(SIMPLE_CANVAS_URL);
let { target, front } = yield initBackend(SIMPLE_CANVAS_URL);
front.setup({ reload: true });
yield testHighlighting((yield once(front, "program-linked")));

View File

@ -7,7 +7,7 @@
*/
function ifWebGLSupported() {
let [target, debuggee, front] = yield initBackend(SIMPLE_CANVAS_URL);
let { target, front } = yield initBackend(SIMPLE_CANVAS_URL);
let linked = once(front, "program-linked");
front.setup({ reload: true });

View File

@ -7,7 +7,7 @@
*/
function ifWebGLSupported() {
let [target, debuggee, front] = yield initBackend(SHADER_ORDER_URL);
let { target, front } = yield initBackend(SHADER_ORDER_URL);
front.setup({ reload: true });
let programActor = yield once(front, "program-linked");

View File

@ -6,7 +6,7 @@
*/
function ifWebGLSupported() {
let [target, debuggee, front] = yield initBackend(MULTIPLE_CONTEXTS_URL);
let { target, front } = yield initBackend(MULTIPLE_CONTEXTS_URL);
front.setup({ reload: true });
let [firstProgramActor, secondProgramActor] = yield getPrograms(front, 2);

View File

@ -7,7 +7,7 @@
*/
function ifWebGLSupported() {
let [target, debuggee, front] = yield initBackend(MULTIPLE_CONTEXTS_URL);
let { target, front } = yield initBackend(MULTIPLE_CONTEXTS_URL);
front.setup({ reload: true });
let [firstProgramActor, secondProgramActor] = yield getPrograms(front, 2);

View File

@ -6,7 +6,7 @@
*/
function ifWebGLSupported() {
let [target, debuggee, front] = yield initBackend(SIMPLE_CANVAS_URL);
let { target, front } = yield initBackend(SIMPLE_CANVAS_URL);
front.setup({ reload: false });
// Attach frame scripts if in e10s to perform

View File

@ -7,7 +7,7 @@
*/
function ifWebGLSupported() {
let [target, debuggee, front] = yield initBackend(SIMPLE_CANVAS_URL);
let { target, front } = yield initBackend(SIMPLE_CANVAS_URL);
front.setup({ reload: false });
// Attach frame scripts if in e10s to perform

View File

@ -7,7 +7,7 @@
*/
function ifWebGLSupported() {
let [target, debuggee, front] = yield initBackend(OVERLAPPING_GEOMETRY_CANVAS_URL);
let { target, front } = yield initBackend(OVERLAPPING_GEOMETRY_CANVAS_URL);
front.setup({ reload: true });
let [firstProgramActor, secondProgramActor] = yield getPrograms(front, 2);

View File

@ -6,7 +6,7 @@
*/
function ifWebGLSupported() {
let [target, debuggee, front] = yield initBackend(MULTIPLE_CONTEXTS_URL);
let { target, front } = yield initBackend(MULTIPLE_CONTEXTS_URL);
front.setup({ reload: true });
yield getPrograms(front, 2);

View File

@ -241,12 +241,11 @@ function initBackend(aUrl) {
return Task.spawn(function*() {
let tab = yield addTab(aUrl);
let target = TargetFactory.forTab(tab);
let debuggee = target.window.wrappedJSObject;
yield target.makeRemote();
let front = new WebGLFront(target.client, target.form);
return [target, debuggee, front];
return { target, front };
});
}
@ -256,14 +255,13 @@ function initShaderEditor(aUrl) {
return Task.spawn(function*() {
let tab = yield addTab(aUrl);
let target = TargetFactory.forTab(tab);
let debuggee = target.window.wrappedJSObject;
yield target.makeRemote();
Services.prefs.setBoolPref("devtools.shadereditor.enabled", true);
let toolbox = yield gDevTools.showToolbox(target, "shadereditor");
let panel = toolbox.getCurrentPanel();
return [target, debuggee, panel];
return { target, panel };
});
}