Bug 1456274 - Add target.makeRemote in several tests. r=ochameau
☠☠ backed out by e43c1c2ce413 ☠ ☠
authorJ. Ryan Stinnett <jryans@gmail.com>
Mon, 23 Apr 2018 19:18:59 -0500
changeset 471668 707d5e397407bdee7cdfbb5ee6ff644126b778a9
parent 471667 97e8882d03431bdb47e706925ac526061966389c
child 471669 a564665d8c0948fbc8c3bae884fc7b1118661b2f
push id1728
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:12:27 +0000
treeherdermozilla-release@c296fde26f5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersochameau
bugs1456274
milestone61.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 1456274 - Add target.makeRemote in several tests. r=ochameau Navigation events now require a "remoted" target. Add `makeRemote` calls to a tests which make use of these features. MozReview-Commit-ID: GJsleBWryCd
devtools/client/framework/test/browser_target_events.js
devtools/server/tests/mochitest/test_framerate_04.html
--- a/devtools/client/framework/test/browser_target_events.js
+++ b/devtools/client/framework/test/browser_target_events.js
@@ -1,16 +1,17 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
 add_task(async function() {
   gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
   await BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
 
   let target = TargetFactory.forTab(gBrowser.selectedTab);
+  await target.makeRemote();
   is(target.tab, gBrowser.selectedTab, "Target linked to the right tab.");
 
   let hidden = once(target, "hidden");
   gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
   await hidden;
   ok(true, "Hidden event received");
 
   let visible = once(target, "visible");
--- a/devtools/server/tests/mochitest/test_framerate_04.html
+++ b/devtools/server/tests/mochitest/test_framerate_04.html
@@ -18,22 +18,23 @@ Bug 1023018 - Tests if the framerate act
 window.onload = function() {
   SimpleTest.waitForExplicitFinish();
   const {FramerateFront} = require("devtools/shared/fronts/framerate");
   const {TargetFactory} = require("devtools/client/framework/target");
 
   let url = document.getElementById("testContent").href;
   attachURL(url, onTab);
 
-  function onTab(_, client, form, contentDoc) {
+  async function onTab(_, client, form, contentDoc) {
     let contentWin = contentDoc.defaultView;
     let chromeWin = Services.wm.getMostRecentWindow("navigator:browser");
     let selectedTab = chromeWin.gBrowser.selectedTab;
 
     let target = TargetFactory.forTab(selectedTab);
+    await target.makeRemote();
     let front = FramerateFront(client, form);
 
     front.startRecording().then(() => {
       window.setTimeout(() => {
         front.getPendingTicks().then(firstBatch => {
           /* eslint-disable max-nested-callbacks */
           target.once("will-navigate", () => {
             window.setTimeout(() => {