Bug 1451973 - Use loadProcessScript instead of loadFrameScript with process message manager. r=mconley.
authorPeter Van der Beken <peterv@propagandism.org>
Fri, 25 May 2018 21:47:23 +0200
changeset 420971 91627f5e19c7e5722405e8098f0084c394557593
parent 420970 bb85c5ee5afc151be0d07ecc48318dc69cfef446
child 420972 22e014e0bea4a4a87d23a48007c014e3a54b37cb
push id34083
push userapavel@mozilla.com
push dateSat, 02 Jun 2018 23:03:25 +0000
treeherdermozilla-central@1f62ecdf59b6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmconley
bugs1451973
milestone62.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 1451973 - Use loadProcessScript instead of loadFrameScript with process message manager. r=mconley.
testing/talos/talos/tests/tabswitch/api.js
testing/talos/talos/tests/tabswitch/background.js
testing/talos/talos/tests/tabswitch/schema.json
--- a/testing/talos/talos/tests/tabswitch/api.js
+++ b/testing/talos/talos/tests/tabswitch/api.js
@@ -308,23 +308,23 @@ function handleFile(win, file) {
 }
 
 var remotePage;
 
 this.tps = class extends ExtensionAPI {
   getAPI(context) {
     return {
       tps: {
-        setup({ frameScriptPath }) {
+        setup({ processScriptPath }) {
           const AboutNewTabService = Cc["@mozilla.org/browser/aboutnewtab-service;1"]
                                        .getService(Ci.nsIAboutNewTabService);
           AboutNewTabService.newTabURL = "about:blank";
 
-          const frameScriptURL = context.extension.baseURI.resolve(frameScriptPath);
-          Services.ppmm.loadFrameScript(frameScriptURL, true);
+          const processScriptURL = context.extension.baseURI.resolve(processScriptPath);
+          Services.ppmm.loadProcessScript(processScriptURL, true);
           remotePage = new RemotePages("about:tabswitch");
           remotePage.addMessageListener("tabswitch-do-test", function doTest(msg) {
             test(msg.target.browser.ownerGlobal);
           });
 
           return () => {
             Services.ppmm.sendAsyncMessage("TPS:Teardown");
             remotePage.destroy();
--- a/testing/talos/talos/tests/tabswitch/background.js
+++ b/testing/talos/talos/tests/tabswitch/background.js
@@ -3,11 +3,11 @@
 /**
  * The TPS test is a Pageloader test, meaning that the tps.manifest file
  * tells Talos to load a particular page. The loading of that page signals
  * the start of the test. It's also where results need to go, as the
  * Talos gunk augments the loaded page with a special tpRecordTime
  * function that is used to report results.
  */
 
-let frameScriptPath = "content/tabswitch-content-process.js";
+let processScriptPath = "content/tabswitch-content-process.js";
 
-browser.tps.setup({ frameScriptPath });
+browser.tps.setup({ processScriptPath });
--- a/testing/talos/talos/tests/tabswitch/schema.json
+++ b/testing/talos/talos/tests/tabswitch/schema.json
@@ -6,18 +6,18 @@
       {
         "name": "setup",
         "type": "function",
         "description": "Prepares the TPS test to be run by the Talos framework.",
         "parameters": [{
           "type": "object",
           "name": "setupArgs",
           "properties": {
-            "frameScriptPath": {
+            "processScriptPath": {
               "type": "string",
-              "description": "Relative path for the frame script to load for the test in the initial tab."
+              "description": "Relative path for the process script to load for the test in the initial tab."
             }
           }
         }]
       }
     ]
   }
 ]
\ No newline at end of file