| OLD | NEW |
| 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 = childProcess.execSync; | 8 var shell = childProcess.execSync; |
| 9 | 9 |
| 10 var remoteDebuggingPort = parseInt(process.env.REMOTE_DEBUGGING_PORT, 10) || 922
2; | 10 var remoteDebuggingPort = parseInt(process.env.REMOTE_DEBUGGING_PORT, 10) || 922
2; |
| 11 var serverPort = parseInt(process.env.PORT, 10) || 8090; | 11 var serverPort = parseInt(process.env.PORT, 10) || 8090; |
| 12 | 12 |
| 13 var chromeArgs = [ | 13 var chromeArgs = [ |
| 14 `--remote-debugging-port=${remoteDebuggingPort}`, | 14 `--remote-debugging-port=${remoteDebuggingPort}`, |
| 15 `--custom-devtools-frontend=http://localhost:${serverPort}/front_end/`, |
| 15 `--no-first-run`, | 16 `--no-first-run`, |
| 16 `http://localhost:${remoteDebuggingPort}#http://localhost:${serverPort}/fron
t_end/inspector.html?experiments=true`, | 17 `http://localhost:${remoteDebuggingPort}#custom=true&experiments=true`, |
| 17 `https://devtools.chrome.com` | 18 `https://devtools.chrome.com` |
| 18 ].concat(process.argv.slice(2)); | 19 ].concat(process.argv.slice(2)); |
| 19 | 20 |
| 20 if (process.platform === "win32") { | 21 if (process.platform === "win32") { |
| 21 launchChromeWindows(); | 22 launchChromeWindows(); |
| 22 return; | 23 return; |
| 23 } | 24 } |
| 24 if (process.platform === "darwin") { | 25 if (process.platform === "darwin") { |
| 25 launchChromeMac(); | 26 launchChromeMac(); |
| 26 return; | 27 return; |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 { | 106 { |
| 106 var string = buffer.toString(); | 107 var string = buffer.toString(); |
| 107 console.log(string); | 108 console.log(string); |
| 108 return string; | 109 return string; |
| 109 } | 110 } |
| 110 | 111 |
| 111 function shellOutput(command) | 112 function shellOutput(command) |
| 112 { | 113 { |
| 113 return shell(command).toString().trim(); | 114 return shell(command).toString().trim(); |
| 114 } | 115 } |
| OLD | NEW |