Chromium Code Reviews| Index: chrome/browser/resources/chromeos/chromevox2/cvox2/background/background.extjs |
| diff --git a/chrome/browser/resources/chromeos/chromevox2/cvox2/background/background.extjs b/chrome/browser/resources/chromeos/chromevox2/cvox2/background/background.extjs |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..31b0912a02a3522c92d38e65c12a609f7bd3cec5 |
| --- /dev/null |
| +++ b/chrome/browser/resources/chromeos/chromevox2/cvox2/background/background.extjs |
| @@ -0,0 +1,49 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +// Include test fixture. |
| +GEN_INCLUDE(['../../../chromevox/testing/chromevox_unittest_base.js']); |
| + |
| +/** |
| + * Test fixture for cvox2.Background. |
| + * @constructor |
| + * @extends {ChromeVoxUnitTestBase} |
| + */ |
| +function BackgroundTest() {} |
| + |
| +BackgroundTest.prototype = { |
| + __proto__: ChromeVoxUnitTestBase.prototype, |
| + |
| + /** @override */ |
| + browsePreload: null, |
|
Peter Lundblad
2014/06/11 16:45:04
This seems like something we would want in a commo
Peter Lundblad
2014/06/11 16:45:04
This seems like something we would want in a commo
Peter Lundblad
2014/06/11 16:45:04
This seems like something we would want in a commo
David Tseng
2014/06/11 17:52:54
Will refactor in a future cl (once there's a secon
|
| + |
| + /** @override */ |
| + closureModuleDeps: [], |
|
Peter Lundblad
2014/06/11 16:45:04
This is the value from the base class, why do you
Peter Lundblad
2014/06/11 16:45:04
This is the value from the base class, why do you
Peter Lundblad
2014/06/11 16:45:05
This is the value from the base class, why do you
David Tseng
2014/06/11 17:52:54
Done.
|
| + |
| + /** @override */ |
| + testGenCppIncludes: function() { |
| + GEN_BLOCK(function() {/*! |
|
Peter Lundblad
2014/06/11 16:45:04
nit: indentation.
Peter Lundblad
2014/06/11 16:45:05
nit: indentation.
Peter Lundblad
2014/06/11 16:45:05
nit: indentation.
David Tseng
2014/06/11 17:52:54
Done.
|
| +#include "ash/accessibility_delegate.h" |
| +#include "chrome/browser/chromeos/accessibility/accessibility_manager.h" |
| +#include "chrome/common/extensions/extension_constants.h" |
| + */}); |
| + }, |
| + |
| + /** @override */ |
| + testGenPreamble: function() { |
| + GEN_BLOCK(function() {/*! |
|
Peter Lundblad
2014/06/11 16:45:04
nit: indentation.
Peter Lundblad
2014/06/11 16:45:04
nit: indentation.
Peter Lundblad
2014/06/11 16:45:05
nit: indentation.
David Tseng
2014/06/11 17:52:54
Done.
|
| + if (!chromeos::AccessibilityManager::Get()->IsSpokenFeedbackEnabled()) { |
| + chromeos::AccessibilityManager::Get()->EnableSpokenFeedback( |
| + true, ash::A11Y_NOTIFICATION_NONE); |
| + WaitFor(extension_misc::kChromeVoxExtensionId); |
| + } |
| + */}); |
| + } |
| +}; |
|
Peter Lundblad
2014/06/11 16:45:04
I think this is a candidate for refactoring to spl
Peter Lundblad
2014/06/11 16:45:05
I think this is a candidate for refactoring to spl
Peter Lundblad
2014/06/11 16:45:05
I think this is a candidate for refactoring to spl
David Tseng
2014/06/11 17:52:54
Same as above (needed only when there's 2+ files).
|
| + |
| +/** Tests ChromeVox classic is in this context. */ |
| +TEST_F('BackgroundTest', 'ClassicNamespaces', function() { |
| + assertEquals('object', typeof(cvox)); |
| + assertEquals('function', typeof(cvox.ChromeVoxBackground)); |
| +}); |