Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(207)

Side by Side Diff: third_party/WebKit/Source/devtools/scripts/npm_test.js

Issue 2448143004: DevTools: add custom-devtools-frontend flag for content shell layout tests (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 var childProcess = require("child_process"); 5 var childProcess = require("child_process");
6 var fs = require("fs"); 6 var fs = require("fs");
7 var path = require("path"); 7 var path = require("path");
8 var shell = require("child_process").execSync; 8 var shell = require("child_process").execSync;
9 9
10 var utils = require("./utils"); 10 var utils = require("./utils");
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 var contentShellResourcesPath = path.resolve(buildDirectoryPath, "Release", "resources"); 203 var contentShellResourcesPath = path.resolve(buildDirectoryPath, "Release", "resources");
204 build(contentShellResourcesPath); 204 build(contentShellResourcesPath);
205 if (IS_BUILD_ONLY) 205 if (IS_BUILD_ONLY)
206 return; 206 return;
207 runTests(buildDirectoryPath); 207 runTests(buildDirectoryPath);
208 } 208 }
209 209
210 function build(contentShellResourcesPath) 210 function build(contentShellResourcesPath)
211 { 211 {
212 var devtoolsResourcesPath = path.resolve(contentShellResourcesPath, "inspect or"); 212 var devtoolsResourcesPath = path.resolve(contentShellResourcesPath, "inspect or");
213 var copiedFrontendPath = path.resolve(devtoolsResourcesPath, "front_end");
214 var debugPath = path.resolve(devtoolsResourcesPath, "debug");
215 utils.removeRecursive(copiedFrontendPath);
216 utils.removeRecursive(debugPath);
217 utils.copyRecursive(SOURCE_PATH, devtoolsResourcesPath);
218 fs.renameSync(copiedFrontendPath, debugPath);
219 var inspectorBackendCommandsPath = path.resolve(devtoolsResourcesPath, "Insp ectorBackendCommands.js"); 213 var inspectorBackendCommandsPath = path.resolve(devtoolsResourcesPath, "Insp ectorBackendCommands.js");
220 var supportedCSSPropertiesPath = path.resolve(devtoolsResourcesPath, "Suppor tedCSSProperties.js"); 214 var supportedCSSPropertiesPath = path.resolve(devtoolsResourcesPath, "Suppor tedCSSProperties.js");
221 utils.copy(inspectorBackendCommandsPath, debugPath); 215 utils.copy(inspectorBackendCommandsPath, SOURCE_PATH);
222 utils.copy(supportedCSSPropertiesPath, debugPath); 216 utils.copy(supportedCSSPropertiesPath, SOURCE_PATH);
223 } 217 }
224 218
225 function runTests(buildDirectoryPath) 219 function runTests(buildDirectoryPath)
226 { 220 {
227 var testArgs = [ 221 var testArgs = [
222 `--additional-drt-flag=--devtools-path=${SOURCE_PATH}`,
228 "--additional-drt-flag=--debug-devtools", 223 "--additional-drt-flag=--debug-devtools",
229 "--no-pixel-tests", 224 "--no-pixel-tests",
230 "--build-directory", 225 "--build-directory",
231 buildDirectoryPath, 226 buildDirectoryPath,
232 ].concat(getInspectorTests()); 227 ].concat(getInspectorTests());
233 if (IS_DEBUG_ENABLED) { 228 if (IS_DEBUG_ENABLED) {
234 testArgs.push("--additional-drt-flag=--remote-debugging-port=9222"); 229 testArgs.push("--additional-drt-flag=--remote-debugging-port=9222");
235 testArgs.push("--time-out-ms=6000000"); 230 testArgs.push("--time-out-ms=6000000");
236 console.log("\n============================================="); 231 console.log("\n=============================================");
237 console.log("Go to: http://localhost:9222/"); 232 console.log("Go to: http://localhost:9222/");
(...skipping 16 matching lines...) Expand all
254 function getInspectorTests() 249 function getInspectorTests()
255 { 250 {
256 var specificTests = process.argv.filter(arg => utils.includes(arg, "inspecto r")); 251 var specificTests = process.argv.filter(arg => utils.includes(arg, "inspecto r"));
257 if (specificTests.length) 252 if (specificTests.length)
258 return specificTests; 253 return specificTests;
259 return [ 254 return [
260 "inspector*", 255 "inspector*",
261 "http/tests/inspector*", 256 "http/tests/inspector*",
262 ]; 257 ];
263 } 258 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698