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

Side by Side Diff: chrome/test/data/webui/async_gen.js

Issue 8586009: Allow WebUI Tests to use preLoad in HtmlDialogUI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reduce GEN(' ') (indentations) by moving code to .cc and .h file(s). Created 9 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 * Test fixture for generated async tests. 6 * Test fixture for generated async tests.
7 * @extends {testing.Test} 7 * @extends {testing.Test}
8 */ 8 */
9 function WebUIBrowserAsyncGenTest() {} 9 function WebUIBrowserAsyncGenTest() {}
10 10
(...skipping 28 matching lines...) Expand all
39 */ 39 */
40 tornDown: false, 40 tornDown: false,
41 41
42 /** 42 /**
43 * True when running sync portion of test. 43 * True when running sync portion of test.
44 * @type {boolean} 44 * @type {boolean}
45 */ 45 */
46 running: false, 46 running: false,
47 }; 47 };
48 48
49 // Include the bulk of c++ code. 49 // Include the c++ test fixture.
50 GEN('#include "chrome/test/data/webui/async_gen-inl.h"'); 50 GEN('#include "chrome/test/data/webui/async_gen.h"');
51 GEN('');
52
53 // Constructors and destructors must be provided in .cc to prevent clang errors.
54 GEN('WebUIBrowserAsyncGenTest::WebUIBrowserAsyncGenTest() {}');
55 GEN('WebUIBrowserAsyncGenTest::~WebUIBrowserAsyncGenTest() {}');
56 GEN('WebUIBrowserAsyncGenTest::AsyncWebUIMessageHandler::');
57 GEN(' AsyncWebUIMessageHandler() {}');
58 GEN('WebUIBrowserAsyncGenTest::AsyncWebUIMessageHandler::');
59 GEN(' ~AsyncWebUIMessageHandler() {}');
60 GEN('');
61 51
62 /** 52 /**
63 * Will be set to continuation test #1. 53 * Will be set to continuation test #1.
64 * @type {Function} 54 * @type {Function}
65 * @this {WebUIBrowserAsyncGenTest} 55 * @this {WebUIBrowserAsyncGenTest}
66 */ 56 */
67 var continueTest; 57 var continueTest;
68 58
69 /** 59 /**
70 * Will be set to continuation test #2. 60 * Will be set to continuation test #2.
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 // Cause setTestRanTrue to be invoked asynchronously. 266 // Cause setTestRanTrue to be invoked asynchronously.
277 chrome.send('callJS', ['setTestRanTrue']); 267 chrome.send('callJS', ['setTestRanTrue']);
278 }, 268 },
279 }; 269 };
280 270
281 TEST_F('WebUIBrowserAsyncGenDeferredToGlobalTest', 'TestDeferRunTestToGlobal', 271 TEST_F('WebUIBrowserAsyncGenDeferredToGlobalTest', 'TestDeferRunTestToGlobal',
282 function() { 272 function() {
283 this.ranTest_ = true; 273 this.ranTest_ = true;
284 assertTrue(testRan); 274 assertTrue(testRan);
285 }); 275 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698