1 // Copyright (c) 2012 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.
6 * TestFixture for browser options WebUI testing.
7 * @extends {testing.Test}
10 function BrowserOptionsWebUITest() {}
12 BrowserOptionsWebUITest.prototype = {
13 __proto__: testing.Test.prototype,
16 browsePreload: 'chrome://chrome/settings/',
19 // Test opening the browser options has correct location.
20 // Times out on Mac debug only. See http://crbug.com/121030
21 GEN('#if defined(OS_MACOSX) && !defined(NDEBUG)');
22 GEN('#define MAYBE_testOpenBrowserOptions ' +
23 'DISABLED_testOpenBrowserOptions');
25 GEN('#define MAYBE_testOpenBrowserOptions testOpenBrowserOptions');
26 GEN('#endif // defined(OS_MACOSX)');
27 TEST_F('BrowserOptionsWebUITest', 'MAYBE_testOpenBrowserOptions', function() {
28 assertEquals(this.browsePreload, document.location.href);
29 expectFalse($('navigation').classList.contains('background'));
33 * TestFixture for the uber page when the browser options page has an overlay.
34 * @extends {testing.Test}
37 function BrowserOptionsOverlayWebUITest() {}
39 BrowserOptionsOverlayWebUITest.prototype = {
40 __proto__: testing.Test.prototype,
43 browsePreload: 'chrome://chrome/settings/autofill',
46 TEST_F('BrowserOptionsOverlayWebUITest', 'testNavigationInBackground',
48 assertEquals(this.browsePreload, document.location.href);
49 expectTrue($('navigation').classList.contains('background'));
53 * @extends {testing.Test}
56 function BrowserOptionsFrameWebUITest() {}
58 BrowserOptionsFrameWebUITest.prototype = {
59 __proto__: testing.Test.prototype,
62 browsePreload: 'chrome://settings-frame/',
65 TEST_F('BrowserOptionsFrameWebUITest', 'testAdvancedSettingsHiddenByDefault',
67 assertEquals(this.browsePreload, document.location.href);
68 expectTrue($('advanced-settings').hidden);
72 * @extends {testing.Test}
75 function AdvancedSettingsWebUITest() {}
77 AdvancedSettingsWebUITest.prototype = {
78 __proto__: testing.Test.prototype,
81 browsePreload: 'chrome://settings-frame/autofill',
84 TEST_F('AdvancedSettingsWebUITest', 'testAdvancedSettingsShown', function() {
85 assertEquals(this.browsePreload, document.location.href);
86 expectFalse($('advanced-settings').hidden);