1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/**
* TestFixture for browser options WebUI testing.
* @extends {testing.Test}
* @constructor
*/
function BrowserOptionsWebUITest() {}
BrowserOptionsWebUITest.prototype = {
__proto__: testing.Test.prototype,
/** @override */
browsePreload: 'chrome://chrome/settings/',
};
// Test opening the browser options has correct location.
// Times out on Mac debug only. See http://crbug.com/121030
GEN('#if defined(OS_MACOSX) && !defined(NDEBUG)');
GEN('#define MAYBE_testOpenBrowserOptions ' +
'DISABLED_testOpenBrowserOptions');
GEN('#else');
GEN('#define MAYBE_testOpenBrowserOptions testOpenBrowserOptions');
GEN('#endif // defined(OS_MACOSX)');
TEST_F('BrowserOptionsWebUITest', 'MAYBE_testOpenBrowserOptions', function() {
assertEquals(this.browsePreload, document.location.href);
expectFalse($('navigation').classList.contains('background'));
});
/**
* TestFixture for the uber page when the browser options page has an overlay.
* @extends {testing.Test}
* @constructor
*/
function BrowserOptionsOverlayWebUITest() {}
BrowserOptionsOverlayWebUITest.prototype = {
__proto__: testing.Test.prototype,
/** @override */
browsePreload: 'chrome://chrome/settings/autofill',
};
TEST_F('BrowserOptionsOverlayWebUITest', 'testNavigationInBackground',
function() {
assertEquals(this.browsePreload, document.location.href);
expectTrue($('navigation').classList.contains('background'));
});
/**
* @extends {testing.Test}
* @constructor
*/
function BrowserOptionsFrameWebUITest() {}
BrowserOptionsFrameWebUITest.prototype = {
__proto__: testing.Test.prototype,
/** @override */
browsePreload: 'chrome://settings-frame/',
};
TEST_F('BrowserOptionsFrameWebUITest', 'testAdvancedSettingsHiddenByDefault',
function() {
assertEquals(this.browsePreload, document.location.href);
expectTrue($('advanced-settings').hidden);
});
/**
* @extends {testing.Test}
* @constructor
*/
function AdvancedSettingsWebUITest() {}
AdvancedSettingsWebUITest.prototype = {
__proto__: testing.Test.prototype,
/** @override */
browsePreload: 'chrome://settings-frame/autofill',
};
TEST_F('AdvancedSettingsWebUITest', 'testAdvancedSettingsShown', function() {
assertEquals(this.browsePreload, document.location.href);
expectFalse($('advanced-settings').hidden);
});
|