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

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

Issue 7237030: Added options browser_tests using the generator and js handler framework. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Windows doesn't allow OVERRIDE on destructors. Created 9 years, 5 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: chrome/browser/ui/webui/javascript2webui.js
diff --git a/chrome/browser/ui/webui/javascript2webui.js b/chrome/browser/ui/webui/javascript2webui.js
index a61a4adc746ba0d3848434aa530f4e972db64175..d93330f959fe97284cda5f96c637b66c0ec348e3 100644
--- a/chrome/browser/ui/webui/javascript2webui.js
+++ b/chrome/browser/ui/webui/javascript2webui.js
@@ -19,14 +19,20 @@ if (!('test_fixture' in this)) {
print(js_file + ' did not define test_fixture.');
quit(-1);
}
+if (!('test_browse_preload' in this)) {
+ this['test_browse_preload'] = undefined;
+}
print('// GENERATED FILE');
print('// ' + arguments.join(' '));
print('// PLEASE DO NOT HAND EDIT!');
print();
for (var func in this) {
- if (!prevfuncs[func] && this[func] instanceof Function) {
+ if (!prevfuncs[func] && typeof(this[func]) == 'function') {
print('IN_PROC_BROWSER_TEST_F(' + test_fixture + ', ' + func + ') {');
print(' AddLibrary(FilePath(FILE_PATH_LITERAL("' + js_file_base + '")));');
+ if (test_browse_preload) {
+ print(' BrowsePreload(GURL("' + test_browse_preload + '"), true);');
+ }
print(' ASSERT_TRUE(RunJavascriptTest("' + func + '"));');
print('}');
print();
« no previous file with comments | « no previous file | chrome/browser/ui/webui/print_preview_browsertest.cc » ('j') | chrome/browser/ui/webui/settings_browsertest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698