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

Unified Diff: third_party/WebKit/Source/devtools/scripts/utils.js

Issue 2648633002: DevTools: enable backwards-compatibility testing (Closed)
Patch Set: nits Created 3 years, 11 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/utils.js
diff --git a/third_party/WebKit/Source/devtools/scripts/utils.js b/third_party/WebKit/Source/devtools/scripts/utils.js
index 75bd6fe9c9d19ee9cd3c48d87e61fd999be4098e..b2b76d28d690fe093d81b8c7d6cafa4c47ddd06f 100644
--- a/third_party/WebKit/Source/devtools/scripts/utils.js
+++ b/third_party/WebKit/Source/devtools/scripts/utils.js
@@ -124,6 +124,17 @@ function shellOutput(command) {
return shell(command).toString().trim();
}
+function parseArgs(args) {
+ var argObject = {};
+ for (var i = 0; i < args.length; i++) {
+ var arg = args[i];
+ var components = arg.split('=');
+ var key = components[0];
+ argObject[key] = components[1] || true;
+ }
+ return argObject;
+}
+
module.exports = {
- fetch, atob, isFile, isDir, copy, copyRecursive, removeRecursive, includes, shellOutput,
+ fetch, atob, isFile, isDir, copy, copyRecursive, removeRecursive, includes, shellOutput, parseArgs,
};

Powered by Google App Engine
This is Rietveld 408576698