OLD | NEW |
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 Loading... |
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 |
OLD | NEW |