OLD | NEW |
| (Empty) |
1 // Copyright 2016 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 /** @fileoverview Suite of tests for the Settings Device page. */ | |
6 | |
7 GEN_INCLUDE(['settings_page_browsertest.js']); | |
8 | |
9 /** | |
10 * @constructor | |
11 * @extends {SettingsPageBrowserTest} | |
12 */ | |
13 function SettingsDevicePageBrowserTest() {} | |
14 | |
15 SettingsDevicePageBrowserTest.prototype = { | |
16 __proto__: SettingsPageBrowserTest.prototype | |
17 }; | |
18 | |
19 // Times out on debug builders and may time out on memory bots because | |
20 // the Settings page can take several seconds to load in a Release build | |
21 // and several times that in a Debug build. See https://crbug.com/558434. | |
22 GEN('#if defined(MEMORY_SANITIZER) || !defined(NDEBUG)'); | |
23 GEN('#define MAYBE_DevicePage DISABLED_DevicePage'); | |
24 GEN('#else'); | |
25 GEN('#define MAYBE_DevicePage DevicePage'); | |
26 GEN('#endif'); | |
27 | |
28 TEST_F('SettingsDevicePageBrowserTest', 'MAYBE_DevicePage', function() { | |
29 // Assign |self| to |this| instead of binding since 'this' in suite() | |
30 // and test() will be a Mocha 'Suite' or 'Test' instance. | |
31 var self = this; | |
32 | |
33 // Register mocha tests. | |
34 suite('SettingsDevicePage', function() { | |
35 test('device section', function() { | |
36 var page = self.getPage('basic'); | |
37 var deviceSection = self.getSection(page, 'device'); | |
38 expectTrue(!!deviceSection); | |
39 }); | |
40 }); | |
41 | |
42 // Run all registered tests. | |
43 mocha.run(); | |
44 }); | |
OLD | NEW |