OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 GEN_INCLUDE(['options_browsertest_base.js']); | 5 GEN_INCLUDE(['options_browsertest_base.js']); |
6 | 6 |
7 /** | 7 /** |
8 * TestFixture for content settings exception area WebUI testing. | 8 * TestFixture for content settings exception area WebUI testing. |
9 * @extends {testing.Test} | 9 * @extends {testing.Test} |
10 * @constructor | 10 * @constructor |
11 */ | 11 */ |
12 function ContentSettingsExceptionAreaWebUITest() {} | 12 function ContentSettingsExceptionAreaWebUITest() {} |
13 | 13 |
14 ContentSettingsExceptionAreaWebUITest.prototype = { | 14 ContentSettingsExceptionAreaWebUITest.prototype = { |
15 __proto__: testing.Test.prototype, | 15 __proto__: testing.Test.prototype, |
16 | 16 |
17 /** @override */ | 17 /** @override */ |
18 browsePreload: 'chrome://settings-frame/contentExceptions', | 18 browsePreload: 'chrome://settings-frame/contentExceptions', |
19 }; | 19 }; |
20 | 20 |
21 // See crbug.com/579666 for OS_LINUX and crbug.com/588586 for Windows. | 21 // See crbug.com/579666 for OS_LINUX and crbug.com/588586 for Windows. |
22 GEN('#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_WINDOWS)'); | 22 GEN('#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_WIN)'); |
23 GEN('#define MAYBE_testOpenContentSettingsExceptionArea ' + | 23 GEN('#define MAYBE_testOpenContentSettingsExceptionArea ' + |
24 'DISABLED_testOpenContentSettingsExceptionArea'); | 24 'DISABLED_testOpenContentSettingsExceptionArea'); |
25 GEN('#else'); | 25 GEN('#else'); |
26 GEN('#define MAYBE_testOpenContentSettingsExceptionArea ' + | 26 GEN('#define MAYBE_testOpenContentSettingsExceptionArea ' + |
27 'testOpenContentSettingsExceptionArea'); | 27 'testOpenContentSettingsExceptionArea'); |
28 GEN('#endif // defined(OS_CHROMEOS) || defined(OS_LINUX)'); | 28 GEN('#endif // defined(OS_CHROMEOS) || defined(OS_LINUX)'); |
29 // Test opening the content settings exception area has correct location. | 29 // Test opening the content settings exception area has correct location. |
30 TEST_F('ContentSettingsExceptionAreaWebUITest', | 30 TEST_F('ContentSettingsExceptionAreaWebUITest', |
31 'MAYBE_testOpenContentSettingsExceptionArea', function() { | 31 'MAYBE_testOpenContentSettingsExceptionArea', function() { |
32 assertEquals(this.browsePreload, document.location.href); | 32 assertEquals(this.browsePreload, document.location.href); |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 // NOTE: if this test doesn't succeed, |ContentSettings.setExceptions| may not | 98 // NOTE: if this test doesn't succeed, |ContentSettings.setExceptions| may not |
99 // be restored to its original method. I know no easy way to fix this. | 99 // be restored to its original method. I know no easy way to fix this. |
100 ContentSettings.setExceptions = function() { | 100 ContentSettings.setExceptions = function() { |
101 setExceptions.apply(ContentSettings, arguments); | 101 setExceptions.apply(ContentSettings, arguments); |
102 setExceptionsCallback(); | 102 setExceptionsCallback(); |
103 }; | 103 }; |
104 | 104 |
105 // Add an item to the location exception area to start the test. | 105 // Add an item to the location exception area to start the test. |
106 list.items[0].finishEdit(origin, 'block'); | 106 list.items[0].finishEdit(origin, 'block'); |
107 }); | 107 }); |
OLD | NEW |