OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 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 Runs the Print Preview tests. */ |
| 6 |
| 7 var ROOT_PATH = '../../../../../'; |
| 8 |
| 9 /** |
| 10 * @constructor |
| 11 * @extends {testing.Test} |
| 12 */ |
| 13 function PrintPreviewUIBrowserTest() {} |
| 14 |
| 15 PrintPreviewUIBrowserTest.prototype = { |
| 16 __proto__: testing.Test.prototype, |
| 17 |
| 18 /** |
| 19 * Browse to the sample page, cause print preview & call preLoad(). |
| 20 * @override |
| 21 */ |
| 22 browsePrintPreload: 'print_preview/print_preview_hello_world_test.html', |
| 23 |
| 24 /** @override */ |
| 25 runAccessibilityChecks: true, |
| 26 |
| 27 /** @override */ |
| 28 accessibilityIssuesAreErrors: false, |
| 29 |
| 30 /** @override */ |
| 31 isAsync: true, |
| 32 |
| 33 /** @override */ |
| 34 preLoad: function() { |
| 35 window.isTest = true; |
| 36 testing.Test.prototype.preLoad.call(this); |
| 37 |
| 38 }, |
| 39 |
| 40 /** @override */ |
| 41 setUp: function() { |
| 42 testing.Test.prototype.setUp.call(this); |
| 43 |
| 44 testing.Test.disableAnimationsAndTransitions(); |
| 45 // Enable when failure is resolved. |
| 46 // AX_TEXT_03: http://crbug.com/559209 |
| 47 this.accessibilityAuditConfig.ignoreSelectors( |
| 48 'multipleLabelableElementsPerLabel', |
| 49 '#page-settings > .right-column > *'); |
| 50 }, |
| 51 |
| 52 extraLibraries: [ |
| 53 ROOT_PATH + 'ui/webui/resources/js/cr.js', |
| 54 ROOT_PATH + 'ui/webui/resources/js/promise_resolver.js', |
| 55 ROOT_PATH + 'third_party/mocha/mocha.js', |
| 56 ROOT_PATH + 'chrome/test/data/webui/mocha_adapter.js', |
| 57 ROOT_PATH + 'ui/webui/resources/js/util.js', |
| 58 ROOT_PATH + 'chrome/test/data/webui/settings/test_browser_proxy.js', |
| 59 'print_preview_tests.js', |
| 60 'native_layer_stub.js', |
| 61 ], |
| 62 }; |
| 63 |
| 64 TEST_F('PrintPreviewUIBrowserTest', 'PrinterList', function() { |
| 65 mocha.grep(/PrinterList\b/).run(); |
| 66 }); |
| 67 |
| 68 TEST_F('PrintPreviewUIBrowserTest', 'PrinterListCloudEmpty', function() { |
| 69 mocha.grep(/PrinterListCloudEmpty\b/).run(); |
| 70 }); |
| 71 |
| 72 TEST_F('PrintPreviewUIBrowserTest', 'RestoreLocalDestination', function() { |
| 73 mocha.grep(/RestoreLocalDestination\b/).run(); |
| 74 }); |
| 75 |
| 76 TEST_F('PrintPreviewUIBrowserTest', 'RestoreMultipleDestinations', function() { |
| 77 mocha.grep(/RestoreMultipleDestinations\b/).run(); |
| 78 }); |
| 79 |
| 80 TEST_F('PrintPreviewUIBrowserTest', 'DefaultDestinationSelectionRules', |
| 81 function() { |
| 82 mocha.grep(/DefaultDestinationSelectionRules\b/).run(); |
| 83 }); |
OLD | NEW |