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

Unified Diff: chrome/browser/ui/webui/javascript2webui.js

Issue 7087014: Support automatic javascript test registry in gtest when creating WebUI tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move the include of the generated dir to the condition for ! 'arm'. Created 9 years, 6 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
« no previous file with comments | « no previous file | chrome/browser/ui/webui/web_ui_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/javascript2webui.js
diff --git a/chrome/browser/ui/webui/javascript2webui.js b/chrome/browser/ui/webui/javascript2webui.js
index b4ad607912fe709bcff9704a4a133578f0cdd165..a61a4adc746ba0d3848434aa530f4e972db64175 100644
--- a/chrome/browser/ui/webui/javascript2webui.js
+++ b/chrome/browser/ui/webui/javascript2webui.js
@@ -1,20 +1,24 @@
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-if (arguments.length < 4) {
+if (arguments.length < 3) {
print('usage: ' +
- arguments[0] + ' test_fixture path-to-testfile.js testfile.js');
+ arguments[0] + ' path-to-testfile.js testfile.js [output.cc]');
quit();
}
-var test_fixture = arguments[1];
-var js_file = arguments[2];
-var js_file_base = arguments[3];
+var js_file = arguments[1];
+var js_file_base = arguments[2];
+var outputfile = arguments[3];
var prevfuncs = {};
for (var func in this) {
if (this[func] instanceof Function)
prevfuncs[func] = func;
}
var js = load(js_file);
+if (!('test_fixture' in this)) {
+ print(js_file + ' did not define test_fixture.');
+ quit(-1);
+}
print('// GENERATED FILE');
print('// ' + arguments.join(' '));
print('// PLEASE DO NOT HAND EDIT!');
« no previous file with comments | « no previous file | chrome/browser/ui/webui/web_ui_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698