| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 /** | |
| 6 * Test fixture for generated tests. | |
| 7 * @extends {testing.Test} | |
| 8 */ | |
| 9 function HungRendererDialogUITest() {}; | |
| 10 | |
| 11 HungRendererDialogUITest.prototype = { | |
| 12 __proto__: testing.Test.prototype, | |
| 13 | |
| 14 /** | |
| 15 * Define the C++ fixture class and include it. | |
| 16 * @type {?string} | |
| 17 * @override | |
| 18 */ | |
| 19 typedefCppFixture: 'HungRendererDialogUITest', | |
| 20 }; | |
| 21 | |
| 22 // Include the bulk of c++ code. | |
| 23 GEN('#include "chrome/test/data/webui/hung_renderer_dialog_ui_test-inl.h"'); | |
| 24 | |
| 25 // Constructors and destructors must be provided in .cc to prevent clang errors. | |
| 26 GEN('HungRendererDialogUITest::HungRendererDialogUITest() {}'); | |
| 27 GEN('HungRendererDialogUITest::~HungRendererDialogUITest() {}'); | |
| 28 | |
| 29 /** | |
| 30 * Confirms that the URL is correct. | |
| 31 */ | |
| 32 TEST_F('HungRendererDialogUITest', 'testURL', function() { | |
| 33 expectEquals(chrome.expectedUrl, window.location.href); | |
| 34 }); | |
| 35 | |
| 36 /** | |
| 37 * Confirms that the theme graphic is loaded and is of a reasonable size. This | |
| 38 * validates that we are integrating properly with the theme source. | |
| 39 */ | |
| 40 TEST_F('HungRendererDialogUITest', 'testThemeGraphicIntegration', function() { | |
| 41 var themeGraphic = $('theme-graphic'); | |
| 42 assertNotEquals(null, themeGraphic); | |
| 43 expectGT(themeGraphic.width, 0); | |
| 44 expectGT(themeGraphic.height, 0); | |
| 45 }); | |
| 46 | |
| 47 /** | |
| 48 * Confirms that the DOM was updated such that a list item representing the | |
| 49 * frozen tab was added to the list of frozen tabs. Also confirms that the list | |
| 50 * item text content is the title of the frozen tab. | |
| 51 */ | |
| 52 TEST_F('HungRendererDialogUITest', 'testTabTable', function() { | |
| 53 var tabTable = $('tab-table'); | |
| 54 assertNotEquals(null, tabTable); | |
| 55 assertGT(tabTable.childElementCount, 0); | |
| 56 | |
| 57 var children = tabTable.getElementsByTagName('*'); | |
| 58 assertNotEquals(null, children); | |
| 59 var titleElement = children[0]; | |
| 60 assertNotEquals(null, titleElement); | |
| 61 expectEquals(chrome.expectedTitle, titleElement.textContent); | |
| 62 }); | |
| 63 | |
| OLD | NEW |