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

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: more self 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() {};
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 * Tests that the Hung Render Dialog is working properly.
44 */
45 TEST_F('HungRendererDialogUITest', 'testHungRenderer', function() {
46 // Confirm that the URL is correct.
47 assertEquals(chrome.expectedUrl, window.location.href);
48
49 // Confirm that the theme graphic is loaded and is of a reasonable size.
50 // This validates that we are integrating properly with the theme source.
51 var themeGraphic = $('theme-graphic');
52 assertNotEquals(null, themeGraphic);
53 assertGT(themeGraphic.width, 0);
flackr 2011/11/05 13:19:40 Use expect for checks that aren't fatal.
54 assertGT(themeGraphic.height, 0);
flackr 2011/11/05 13:19:40 I think these themeGraphic checks should be in a s
wyck 2011/11/07 20:39:24 My thinking is that BrowserTests are expensive to
flackr 2011/11/07 21:00:13 I understand your point, however with both testabl
55
56 // Confirm that the DOM was updated such that a list item representing the
57 // frozen tab was added to the list of frozen tabs.
58 var tabTable = $('tab-table');
59 assertNotEquals(null, tabTable);
60 assertGT(tabTable.childElementCount, 0);
61
62 // Confirm that the list item text content is the title of the frozen tab.
63 var children = tabTable.getElementsByTagName('*');
64 assertNotEquals(null, children);
65 var titleElement = children[0];
66 assertNotEquals(null, titleElement);
67 assertEquals(chrome.expectedTitle, titleElement.textContent);
68 });
69
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