Bug 1492482 - Remove CPOW usage from browser_tab_dragdrop2.js. r=Gijs
authorMike Conley <mconley@mozilla.com>
Tue, 02 Oct 2018 17:55:07 +0000
changeset 487594 8bda47dfef15a0cf5c04ad4a08bf664c7c2360ec
parent 487593 56f92aa110f06c299e2dc301782d7abd3f02400b
child 487595 c25d430da5b7a4b4eff34c8140f4d6279a02b97a
push id246
push userfmarier@mozilla.com
push dateSat, 13 Oct 2018 00:15:40 +0000
reviewersGijs
bugs1492482
milestone64.0a1
Bug 1492482 - Remove CPOW usage from browser_tab_dragdrop2.js. r=Gijs Depends on D6947 Differential Revision: https://phabricator.services.mozilla.com/D6949
browser/base/content/test/general/browser_tab_dragdrop2.js
--- a/browser/base/content/test/general/browser_tab_dragdrop2.js
+++ b/browser/base/content/test/general/browser_tab_dragdrop2.js
@@ -34,17 +34,20 @@ add_task(async function() {
   await Promise.all([tabClosed, promiseDelayedStartupFinished(win2)]);
 
   // Remove the 'TestsDone' event listener as now
   // we're kicking off a new test run manually.
   win2.removeEventListener("TestsDone", onTestsDone);
 
   // Run tests once again.
   let promise = promiseTestsDone(win2);
-  win2.gBrowser.contentWindowAsCPOW.test_panels();
+  let browser2 = win2.gBrowser.selectedBrowser;
+  await ContentTask.spawn(browser2, null, async () => {
+    content.test_panels();
+  });
   await promise;
   ok(true, "tests succeeded a second time");
 
   // Cleanup.
   await promiseWindowClosed(win2);
   await promiseWindowClosed(win);
 });