OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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([ | 5 GEN_INCLUDE([ |
6 'chrome/browser/resources/chromeos/chromevox/testing/common.js']); | 6 'chrome/browser/resources/chromeos/chromevox/testing/common.js']); |
7 | 7 |
8 /** | 8 /** |
9 * Base test fixture for ChromeVox end to end tests. | 9 * Base test fixture for ChromeVox end to end tests. |
10 * | 10 * |
(...skipping 27 matching lines...) Expand all Loading... |
38 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" | 38 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" |
39 #include "chrome/common/extensions/extension_constants.h" | 39 #include "chrome/common/extensions/extension_constants.h" |
40 */}); | 40 */}); |
41 }, | 41 }, |
42 | 42 |
43 /** @override */ | 43 /** @override */ |
44 testGenPreamble: function() { | 44 testGenPreamble: function() { |
45 GEN_BLOCK(function() {/*! | 45 GEN_BLOCK(function() {/*! |
46 if (chromeos::AccessibilityManager::Get()->IsSpokenFeedbackEnabled()) { | 46 if (chromeos::AccessibilityManager::Get()->IsSpokenFeedbackEnabled()) { |
47 chromeos::AccessibilityManager::Get()->EnableSpokenFeedback(false, | 47 chromeos::AccessibilityManager::Get()->EnableSpokenFeedback(false, |
48 ash::A11Y_NOTIFICATION_NONE); | 48 ui::A11Y_NOTIFICATION_NONE); |
49 } | 49 } |
50 | 50 |
51 base::Closure load_cb = | 51 base::Closure load_cb = |
52 base::Bind(&chromeos::AccessibilityManager::EnableSpokenFeedback, | 52 base::Bind(&chromeos::AccessibilityManager::EnableSpokenFeedback, |
53 base::Unretained(chromeos::AccessibilityManager::Get()), | 53 base::Unretained(chromeos::AccessibilityManager::Get()), |
54 true, | 54 true, |
55 ash::A11Y_NOTIFICATION_NONE); | 55 ui::A11Y_NOTIFICATION_NONE); |
56 WaitForExtension(extension_misc::kChromeVoxExtensionId, load_cb); | 56 WaitForExtension(extension_misc::kChromeVoxExtensionId, load_cb); |
57 */}); | 57 */}); |
58 }, | 58 }, |
59 | 59 |
60 /** | 60 /** |
61 * Run a test with the specified HTML snippet loaded. | 61 * Run a test with the specified HTML snippet loaded. |
62 * @param {function() : void} doc Snippet wrapped inside of a function. | 62 * @param {function() : void} doc Snippet wrapped inside of a function. |
63 * @param {function()} callback Called once the document is ready. | 63 * @param {function()} callback Called once the document is ready. |
64 */ | 64 */ |
65 runWithDocument: function(doc, callback) { | 65 runWithDocument: function(doc, callback) { |
(...skipping 24 matching lines...) Expand all Loading... |
90 * @param {string} testName Test name. | 90 * @param {string} testName Test name. |
91 * @param {function} testFunction The test impl. | 91 * @param {function} testFunction The test impl. |
92 */ | 92 */ |
93 function SYNC_TEST_F(testFixture, testName, testFunction) { | 93 function SYNC_TEST_F(testFixture, testName, testFunction) { |
94 var wrappedTestFunction = function() { | 94 var wrappedTestFunction = function() { |
95 testFunction.call(this); | 95 testFunction.call(this); |
96 testDone([true, '']); | 96 testDone([true, '']); |
97 }; | 97 }; |
98 TEST_F(testFixture, testName, wrappedTestFunction); | 98 TEST_F(testFixture, testName, wrappedTestFunction); |
99 } | 99 } |
OLD | NEW |