| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 // Include test fixture. |
| 6 GEN_INCLUDE(['../../../chromevox/testing/chromevox_unittest_base.js']); |
| 7 |
| 8 /** |
| 9 * Test fixture for cvox2.Background. |
| 10 * @constructor |
| 11 * @extends {ChromeVoxUnitTestBase} |
| 12 */ |
| 13 function BackgroundTest() {} |
| 14 |
| 15 BackgroundTest.prototype = { |
| 16 __proto__: ChromeVoxUnitTestBase.prototype, |
| 17 |
| 18 /** @override */ |
| 19 browsePreload: null, |
| 20 |
| 21 /** @override */ |
| 22 testGenCppIncludes: function() { |
| 23 GEN_BLOCK(function() {/*! |
| 24 #include "ash/accessibility_delegate.h" |
| 25 #include "base/bind.h" |
| 26 #include "base/callback.h" |
| 27 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" |
| 28 #include "chrome/common/extensions/extension_constants.h" |
| 29 */}); |
| 30 }, |
| 31 |
| 32 /** @override */ |
| 33 testGenPreamble: function() { |
| 34 GEN_BLOCK(function() {/*! |
| 35 if (chromeos::AccessibilityManager::Get()->IsSpokenFeedbackEnabled()) { |
| 36 chromeos::AccessibilityManager::Get()->EnableSpokenFeedback(false, |
| 37 ash::A11Y_NOTIFICATION_NONE); |
| 38 } |
| 39 |
| 40 base::Closure load_cb = |
| 41 base::Bind(&chromeos::AccessibilityManager::EnableSpokenFeedback, |
| 42 base::Unretained(chromeos::AccessibilityManager::Get()), |
| 43 true, |
| 44 ash::A11Y_NOTIFICATION_NONE); |
| 45 WaitForExtension(extension_misc::kChromeVoxExtensionId, load_cb); |
| 46 */}); |
| 47 } |
| 48 }; |
| 49 |
| 50 /** Tests ChromeVox classic is in this context. */ |
| 51 TEST_F('BackgroundTest', 'ClassicNamespaces', function() { |
| 52 assertEquals('object', typeof(cvox)); |
| 53 assertEquals('function', typeof(cvox.ChromeVoxBackground)); |
| 54 }); |
| OLD | NEW |