OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 /** | 5 /** |
6 * @fileoverview Generator script for creating gtest-style JavaScript | 6 * @fileoverview Generator script for creating gtest-style JavaScript |
7 * tests for WebUI and unit tests. Generates C++ gtest wrappers | 7 * tests for WebUI and unit tests. Generates C++ gtest wrappers |
8 * which will invoke the appropriate JavaScript for each test. | 8 * which will invoke the appropriate JavaScript for each test. |
9 * @author scr@chromium.org (Sheridan Rawlins) | 9 * @author scr@chromium.org (Sheridan Rawlins) |
10 * @see WebUI testing: http://goo.gl/ZWFXF | 10 * @see WebUI testing: http://goo.gl/ZWFXF |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
180 testGenPreamble(testFixture, testFunction); | 180 testGenPreamble(testFixture, testFunction); |
181 if (browsePreload) | 181 if (browsePreload) |
182 print(' BrowsePreload(GURL("' + browsePreload + '"));'); | 182 print(' BrowsePreload(GURL("' + browsePreload + '"));'); |
183 if (browsePrintPreload) { | 183 if (browsePrintPreload) { |
184 print(' BrowsePrintPreload(GURL(WebUITestDataPathToURL(\n' + | 184 print(' BrowsePrintPreload(GURL(WebUITestDataPathToURL(\n' + |
185 ' FILE_PATH_LITERAL("' + browsePrintPreload + '"))));'); | 185 ' FILE_PATH_LITERAL("' + browsePrintPreload + '"))));'); |
186 } | 186 } |
187 print(' ' + testPredicate + '(RunJavascriptTestF(' + isAsyncParam + | 187 print(' ' + testPredicate + '(RunJavascriptTestF(' + isAsyncParam + |
188 '"' + testFixture + '", ' + | 188 '"' + testFixture + '", ' + |
189 '"' + testFunction + '"));'); | 189 '"' + testFunction + '"));'); |
190 print(' ' + testPredicate + '(RunJavascriptTestF(' + isAsyncParam + | |
191 '"' + testFixture + '", ' + | |
192 '"accessibilityAudit"));'); | |
scr
2012/12/07 06:11:35
We don't need this anymore do we?
aboxhall
2012/12/07 19:23:50
No, this has been reverted.
| |
190 if (testGenPostamble) | 193 if (testGenPostamble) |
191 testGenPostamble(testFixture, testFunction); | 194 testGenPostamble(testFixture, testFunction); |
192 print('}'); | 195 print('}'); |
193 print(); | 196 print(); |
194 } | 197 } |
195 | 198 |
196 // Now that generation functions are defined, load in |jsFile|. | 199 // Now that generation functions are defined, load in |jsFile|. |
197 var js = read(jsFile); | 200 var js = read(jsFile); |
198 eval(js); | 201 eval(js); |
OLD | NEW |