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

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

Issue 2648633002: DevTools: enable backwards-compatibility testing (Closed)
Patch Set: nits Created 3 years, 10 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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 } 117 }
118 118
119 function includes(sequence, target) { 119 function includes(sequence, target) {
120 return sequence.indexOf(target) > -1; 120 return sequence.indexOf(target) > -1;
121 } 121 }
122 122
123 function shellOutput(command) { 123 function shellOutput(command) {
124 return shell(command).toString().trim(); 124 return shell(command).toString().trim();
125 } 125 }
126 126
127 function parseArgs(args) {
128 var argObject = {};
129 for (var i = 0; i < args.length; i++) {
130 var arg = args[i];
131 var components = arg.split('=');
132 var key = components[0];
133 argObject[key] = components[1] || true;
134 }
135 return argObject;
136 }
137
127 module.exports = { 138 module.exports = {
128 fetch, atob, isFile, isDir, copy, copyRecursive, removeRecursive, includes, shellOutput, 139 fetch, atob, isFile, isDir, copy, copyRecursive, removeRecursive, includes, shellOutput, parseArgs,
129 }; 140 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698