Bug 1432416 - Consistent folder hierarchy for DAMP custom test pages;r=ochameau draft
authorJulian Descottes <jdescottes@mozilla.com>
Thu, 22 Feb 2018 11:04:12 +0100
changeset 759864 b7bb449b855a2e9bbdf5ea167fbd0d145f002bbd
parent 759863 2b78c3a617f54f46d9583a8f99c8b919fb3381d7
push id100497
push userjdescottes@mozilla.com
push dateMon, 26 Feb 2018 19:26:03 +0000
reviewersochameau
bugs1432416
milestone60.0a1
Bug 1432416 - Consistent folder hierarchy for DAMP custom test pages;r=ochameau Create one folder for each tool in devtools/addon/content/pages/custom/ All tools follow the same convention custom/${tool}/index.html MozReview-Commit-ID: 5SCD2Oy5X47
testing/talos/talos/tests/devtools/addon/content/damp.js
testing/talos/talos/tests/devtools/addon/content/pages/custom/console.html
testing/talos/talos/tests/devtools/addon/content/pages/custom/console/index.html
testing/talos/talos/tests/devtools/addon/content/pages/custom/generate-inspector-html.js
testing/talos/talos/tests/devtools/addon/content/pages/custom/inspector.html
testing/talos/talos/tests/devtools/addon/content/pages/custom/inspector/generate-inspector-index-html.js
testing/talos/talos/tests/devtools/addon/content/pages/custom/inspector/index.html
--- a/testing/talos/talos/tests/devtools/addon/content/damp.js
+++ b/testing/talos/talos/tests/devtools/addon/content/damp.js
@@ -20,17 +20,17 @@ XPCOMUtils.defineLazyGetter(this, "Targe
   let { TargetFactory } = require("devtools/client/framework/target");
   return TargetFactory;
 });
 
 const webserver = Services.prefs.getCharPref("addon.test.damp.webserver");
 
 const SIMPLE_URL = webserver + "/tests/devtools/addon/content/pages/simple.html";
 const COMPLICATED_URL = webserver + "/tests/tp5n/bild.de/www.bild.de/index.html";
-const CUSTOM_URL = webserver + "/tests/devtools/addon/content/pages/custom/$TOOL.html";
+const CUSTOM_URL = webserver + "/tests/devtools/addon/content/pages/custom/$TOOL/index.html";
 
 // Record allocation count in new subtests if DEBUG_DEVTOOLS_ALLOCATIONS is set to
 // "normal". Print allocation sites to stdout if DEBUG_DEVTOOLS_ALLOCATIONS is set to
 // "verbose".
 const DEBUG_ALLOCATIONS = env.get("DEBUG_DEVTOOLS_ALLOCATIONS");
 
 function getMostRecentBrowserWindow() {
   return Services.wm.getMostRecentWindow("navigator:browser");
@@ -812,17 +812,17 @@ async _consoleOpenWithCachedMessagesTest
       await debuggerHelper.waitForMetaData(dbg);
     };
     await this.reloadPageAndLog(`${label}.jsdebugger`, toolbox, onReload);
   },
 
   async customDebugger() {
     const label = "custom";
     const expectedSources = 7;
-    let url = CUSTOM_URL.replace(/\$TOOL/, "debugger/index");
+    let url = CUSTOM_URL.replace(/\$TOOL/, "debugger");
     await this.testSetup(url);
     const selectedFile = "App.js";
     const expectedText = "import React, { Component } from 'react';";
     const toolbox = await this.openDebuggerAndLog(label, expectedSources, selectedFile, expectedText);
     await this.reloadDebuggerAndLog(label, toolbox, expectedSources, selectedFile, expectedText);
     await this.closeToolboxAndLog("custom.jsdebugger", toolbox);
     await this.testTeardown();
   },
@@ -842,18 +842,18 @@ async _consoleOpenWithCachedMessagesTest
       });
     };
     await this.reloadPageAndLog(label + ".webconsole", toolbox, onReload);
   },
 
   async customConsole() {
     // These numbers controls the number of console api calls we do in the test
     let sync = 250, stream = 250, async = 250;
-    let page = `console.html?sync=${sync}&stream=${stream}&async=${async}`;
-    let url = CUSTOM_URL.replace(/\$TOOL\.html/, page);
+    let params = `?sync=${sync}&stream=${stream}&async=${async}`;
+    let url = CUSTOM_URL.replace(/\$TOOL/, "console") + params;
     await this.testSetup(url);
     let toolbox = await this.openToolboxAndLog("custom.webconsole", "webconsole");
     await this.reloadConsoleAndLog("custom", toolbox, sync + stream + async);
     await this.closeToolboxAndLog("custom.webconsole", toolbox);
     await this.testTeardown();
   },
 
   _getToolLoadingTests(url, label, {
rename from testing/talos/talos/tests/devtools/addon/content/pages/custom/console.html
rename to testing/talos/talos/tests/devtools/addon/content/pages/custom/console/index.html
rename from testing/talos/talos/tests/devtools/addon/content/pages/custom/generate-inspector-html.js
rename to testing/talos/talos/tests/devtools/addon/content/pages/custom/inspector/generate-inspector-index-html.js
--- a/testing/talos/talos/tests/devtools/addon/content/pages/custom/generate-inspector-html.js
+++ b/testing/talos/talos/tests/devtools/addon/content/pages/custom/inspector/generate-inspector-index-html.js
@@ -1,17 +1,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /**
- * nodejs script to generate: testing/talos/talos/tests/devtools/addon/content/pages/custom/inspector.html
+ * nodejs script to generate: testing/talos/talos/tests/devtools/addon/content/pages/custom/inspector/index.html
  *
  * Execute it like this:
- * $ nodejs generate-inspector-html.js > testing/talos/talos/tests/devtools/addon/content/pages/custom/inspector.html
+ * $ nodejs generate-inspector-index-html.js > testing/talos/talos/tests/devtools/addon/content/pages/custom/inspector/index.html
  */
 
 // We first create a deep tree with ${deep} nested children
 let deep = 50;
 // Then we create ${n} element after the deep tree
 let n = 50;
 // Number of attributes set on the repeated elements
 let attributes = 50;
rename from testing/talos/talos/tests/devtools/addon/content/pages/custom/inspector.html
rename to testing/talos/talos/tests/devtools/addon/content/pages/custom/inspector/index.html