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

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

Issue 8586009: Allow WebUI Tests to use preLoad in HtmlDialogUI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Revert to patch set 4. Created 9 years, 1 month 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 tests. 6 * Test fixture for generated tests.
7 * @extends {testing.Test} 7 * @extends {testing.Test}
8 */ 8 */
9 function HungRendererDialogUITest() {}; 9 function HungRendererDialogUITest() {};
10 10
11 HungRendererDialogUITest.prototype = { 11 HungRendererDialogUITest.prototype = {
12 __proto__: testing.Test.prototype, 12 __proto__: testing.Test.prototype,
13 13
14 /** 14 /**
15 * Define the C++ fixture class and include it. 15 * Define the C++ fixture class and include it.
16 * @type {?string} 16 * @type {?string}
17 * @override 17 * @override
18 */ 18 */
19 typedefCppFixture: 'HungRendererDialogUITest', 19 typedefCppFixture: 'HungRendererDialogUITest',
20
21 /**
22 * Show the hung renderer dialog.
23 */
24 testGenPreamble: function() {
25 GEN(' ShowHungRendererDialogInternal();');
26 },
20 }; 27 };
21 28
22 // Include the bulk of c++ code. 29 // Include the bulk of c++ code.
23 GEN('#include "chrome/test/data/webui/hung_renderer_dialog_ui_test-inl.h"'); 30 GEN('#include "chrome/test/data/webui/hung_renderer_dialog_ui_test-inl.h"');
24 31
25 // Constructors and destructors must be provided in .cc to prevent clang errors. 32 // Constructors and destructors must be provided in .cc to prevent clang errors.
26 GEN('HungRendererDialogUITest::HungRendererDialogUITest() {}'); 33 GEN('HungRendererDialogUITest::HungRendererDialogUITest() {}');
27 GEN('HungRendererDialogUITest::~HungRendererDialogUITest() {}'); 34 GEN('HungRendererDialogUITest::~HungRendererDialogUITest() {}');
28 35
29 /** 36 /**
(...skipping 24 matching lines...) Expand all
54 assertNotEquals(null, tabTable); 61 assertNotEquals(null, tabTable);
55 assertGT(tabTable.childElementCount, 0); 62 assertGT(tabTable.childElementCount, 0);
56 63
57 var children = tabTable.getElementsByTagName('*'); 64 var children = tabTable.getElementsByTagName('*');
58 assertNotEquals(null, children); 65 assertNotEquals(null, children);
59 var titleElement = children[0]; 66 var titleElement = children[0];
60 assertNotEquals(null, titleElement); 67 assertNotEquals(null, titleElement);
61 expectEquals(chrome.expectedTitle, titleElement.textContent); 68 expectEquals(chrome.expectedTitle, titleElement.textContent);
62 }); 69 });
63 70
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698