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

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

Issue 2648633002: DevTools: enable backwards-compatibility testing (Closed)
Patch Set: 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 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 fs = require("fs"); 5 var fs = require("fs");
6 var http = require("http"); 6 var http = require("http");
7 var https = require("https"); 7 var https = require("https");
8 var path = require("path"); 8 var path = require("path");
9 var parseURL = require("url").parse; 9 var parseURL = require("url").parse;
10 var shell = require("child_process").execSync; 10 var shell = require("child_process").execSync;
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 function includes(sequence, target) 128 function includes(sequence, target)
129 { 129 {
130 return sequence.indexOf(target) > -1; 130 return sequence.indexOf(target) > -1;
131 } 131 }
132 132
133 function shellOutput(command) 133 function shellOutput(command)
134 { 134 {
135 return shell(command).toString().trim(); 135 return shell(command).toString().trim();
136 } 136 }
137 137
138 function parseArgs(args)
139 {
140 var argObject = {};
141 for (var i = 0; i < args.length; i++) {
142 var arg = args[i];
143 var components = arg.split("=");
144 var key = components[0];
145 argObject[key] = components[1] || true;
146 }
147 return argObject;
148 }
149
138 module.exports = { 150 module.exports = {
139 fetch, 151 fetch,
140 atob, 152 atob,
141 isFile, 153 isFile,
142 isDir, 154 isDir,
143 copy, 155 copy,
144 copyRecursive, 156 copyRecursive,
145 removeRecursive, 157 removeRecursive,
146 includes, 158 includes,
147 shellOutput, 159 shellOutput,
160 parseArgs,
148 }; 161 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698