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

Unified Diff: third_party/WebKit/Source/devtools/scripts/js_build/gulpfile.js

Issue 2413563002: DevTools: add "npm test" to run tests by fetching content shells (Closed)
Patch Set: nits Created 4 years, 2 months 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/scripts/js_build/gulpfile.js
diff --git a/third_party/WebKit/Source/devtools/scripts/js_build/gulpfile.js b/third_party/WebKit/Source/devtools/scripts/js_build/gulpfile.js
index 43c95b34598765a1e1ec557ba23bfa38a5bf18f4..22a3af2c6d8b454d138d03f93e87cd617ba4d606 100644
--- a/third_party/WebKit/Source/devtools/scripts/js_build/gulpfile.js
+++ b/third_party/WebKit/Source/devtools/scripts/js_build/gulpfile.js
@@ -14,6 +14,9 @@ var gulp = require("gulp");
var concatenateProtocols = require("./ConcatenateProtocols.js");
var utils = require("../utils.js");
+var chromiumGitRef = process.env.CHROMIUM_COMMIT || "master";
+var v8GitRef = process.env.V8_COMMIT || "master";
+
var devtoolsPath = path.resolve(path.join(__dirname, "../.."));
var frontendPath = path.join(devtoolsPath, "front_end");
var releasePath = path.join(devtoolsPath, "release");
@@ -77,14 +80,13 @@ function concatenateProtocolTask()
gulp.task("fetchProtocol", ["clean"], fetchProtocolTask);
function fetchProtocolTask(done)
{
- var browserProtocolURL = "https://chromium.googlesource.com/chromium/src/+/master/third_party/WebKit/Source/core/inspector/browser_protocol.json?format=TEXT";
+ var browserProtocolURL = `https://chromium.googlesource.com/chromium/src/+/${chromiumGitRef}/third_party/WebKit/Source/core/inspector/browser_protocol.json?format=TEXT`;
var browserProtocolFile = path.join(releasePath, "browser_protocol.json");
var browserProtocolPromise = fetchAndSaveCodePromise(browserProtocolURL, browserProtocolFile);
- var jsProtocolURL = "https://chromium.googlesource.com/v8/v8/+/master/src/inspector/js_protocol.json?format=TEXT";
+ var jsProtocolURL = `https://chromium.googlesource.com/v8/v8/+/${v8GitRef}/src/inspector/js_protocol.json?format=TEXT`;
var jsProtocolFile = path.join(releasePath, "js_protocol.json");
var jsProtocolPromise = fetchAndSaveCodePromise(jsProtocolURL, jsProtocolFile);
-
Promise.all([browserProtocolPromise, jsProtocolPromise])
.then(() => done())
.catch(err => console.log("Error fetching protocols:", err));
@@ -104,7 +106,7 @@ function generateSupportedCSSProperties()
gulp.task("fetchSupportedCSSProperties", ["clean"], fetchSupportedCSSProperties);
function fetchSupportedCSSProperties(done)
{
- var supportedCSSPropertiesURL = "https://chromium.googlesource.com/chromium/src/+/master/third_party/WebKit/Source/core/css/CSSProperties.in?format=TEXT";
+ var supportedCSSPropertiesURL = `https://chromium.googlesource.com/chromium/src/+/${chromiumGitRef}/third_party/WebKit/Source/core/css/CSSProperties.in?format=TEXT`;
var supportedCSSPropertiesFile = path.join(releasePath, "CSSProperties.in");
fetchAndSaveCodePromise(supportedCSSPropertiesURL, supportedCSSPropertiesFile)
.then(() => done())

Powered by Google App Engine
This is Rietveld 408576698