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

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

Issue 8372042: Tests for WebUI Hung Renderer Dialog (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: After flackr's review 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
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chrome/test/data/webui/hung_renderer_dialog_ui_test-inl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 /**
23 * Test fixture for asynchronous tests.
24 * @extends {HungRendererDialogUITest}
25 */
26 function HungRendererDialogUITestAsync() {};
flackr 2011/11/07 21:00:14 This seems to be unused, remove please.
27
28 HungRendererDialogUITestAsync.prototype = {
29 __proto__: HungRendererDialogUITest.prototype,
30
31 /** @inheritDoc */
32 isAsync: true,
33 };
34
35 // Include the bulk of c++ code.
36 GEN('#include "chrome/test/data/webui/hung_renderer_dialog_ui_test-inl.h"');
37
38 // Constructors and destructors must be provided in .cc to prevent clang errors.
39 GEN('HungRendererDialogUITest::HungRendererDialogUITest() {}');
40 GEN('HungRendererDialogUITest::~HungRendererDialogUITest() {}');
41
42 /**
43 * Confirms that the URL is correct.
44 */
45 TEST_F('HungRendererDialogUITest', 'testURL', function() {
46 expectEquals(chrome.expectedUrl, window.location.href);
47 });
48
49 /**
50 * Confirms that the theme graphic is loaded and is of a reasonable size. This
51 * validates that we are integrating properly with the theme source.
52 */
53 TEST_F('HungRendererDialogUITest', 'testThemeGraphicIntegration', function() {
54 var themeGraphic = $('theme-graphic');
55 assertNotEquals(null, themeGraphic);
56 expectGT(themeGraphic.width, 0);
57 expectGT(themeGraphic.height, 0);
58 });
59
60 /**
61 * Confirms that the DOM was updated such that a list item representing the
62 * frozen tab was added to the list of frozen tabs. Also confirms that the list
63 * item text content is the title of the frozen tab.
64 */
65 TEST_F('HungRendererDialogUITest', 'testHungRenderer', function() {
66 var tabTable = $('tab-table');
67 assertNotEquals(null, tabTable);
68 assertGT(tabTable.childElementCount, 0);
69
70 var children = tabTable.getElementsByTagName('*');
71 assertNotEquals(null, children);
72 var titleElement = children[0];
73 assertNotEquals(null, titleElement);
74 expectEquals(chrome.expectedTitle, titleElement.textContent);
75 });
76
OLDNEW
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chrome/test/data/webui/hung_renderer_dialog_ui_test-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698