Bug 1465635 - Convert canvas front instantiation to Target.getFront. r=yulia
authorAlexandre Poirot <poirot.alex@gmail.com>
Sat, 02 Feb 2019 11:24:49 +0000
changeset 456547 9c7fe2ba8434594aa5d49149e74ffba6d21303e2
parent 456546 2fe3a0ae216beb2ef4ebbb5e02019d41845c4f4a
child 456548 e6efb1191ec609df0fa28c0594efbafb3e84eb98
push id35489
push userrmaries@mozilla.com
push dateSat, 02 Feb 2019 21:36:03 +0000
treeherdermozilla-central@63348118ef1d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersyulia
bugs1465635
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1465635 - Convert canvas front instantiation to Target.getFront. r=yulia Depends on D15825 Differential Revision: https://phabricator.services.mozilla.com/D15826
devtools/client/canvasdebugger/test/browser_canvas-actor-test-10.js
devtools/client/canvasdebugger/test/head.js
--- a/devtools/client/canvasdebugger/test/browser_canvas-actor-test-10.js
+++ b/devtools/client/canvasdebugger/test/browser_canvas-actor-test-10.js
@@ -1,16 +1,18 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 /**
  * Tests that the correct framebuffer, renderbuffer and textures are re-bound
  * after generating screenshots using the actor.
  */
 
+var { CanvasFront } = require("devtools/shared/fronts/canvas");
+
 async function ifTestingSupported() {
   const { target, front } = await initCanvasDebuggerBackend(WEBGL_BINDINGS_URL);
   loadFrameScriptUtils();
 
   const navigated = once(target, "navigate");
 
   await front.setup({ reload: true });
   ok(true, "The front was setup up successfully.");
--- a/devtools/client/canvasdebugger/test/head.js
+++ b/devtools/client/canvasdebugger/test/head.js
@@ -17,17 +17,16 @@ Services.scriptloader.loadSubScript(
   "chrome://mochitests/content/browser/devtools/client/debugger/new/test/mochitest/helpers/context.js",
   this);
 
 var { generateUUID } = Cc["@mozilla.org/uuid-generator;1"].getService(Ci.nsIUUIDGenerator);
 
 var { DebuggerClient } = require("devtools/shared/client/debugger-client");
 var { DebuggerServer } = require("devtools/server/main");
 var { METHOD_FUNCTION } = require("devtools/shared/fronts/function-call");
-var { CanvasFront } = require("devtools/shared/fronts/canvas");
 var { Toolbox } = require("devtools/client/framework/toolbox");
 var { isWebGLSupported } = require("devtools/client/shared/webgl-utils");
 
 const EXAMPLE_URL = "http://example.com/browser/devtools/client/canvasdebugger/test/";
 const SET_TIMEOUT_URL = EXAMPLE_URL + "doc_settimeout.html";
 const NO_CANVAS_URL = EXAMPLE_URL + "doc_no-canvas.html";
 const RAF_NO_CANVAS_URL = EXAMPLE_URL + "doc_raf-no-canvas.html";
 const SIMPLE_CANVAS_URL = EXAMPLE_URL + "doc_simple-canvas.html";
@@ -147,16 +146,17 @@ function initCallWatcherBackend(aUrl) {
 function initCanvasDebuggerBackend(aUrl) {
   info("Initializing a canvas debugger front.");
   initServer();
 
   return (async function() {
     const tab = await addTab(aUrl);
     const target = await TargetFactory.forTab(tab);
     await target.attach();
+
     const front = await target.getFront("canvas");
     return { target, front };
   })();
 }
 
 function initCanvasDebuggerFrontend(aUrl) {
   info("Initializing a canvas debugger pane.");