| 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..496978203f7a0dff573de56916053900955bb0fa
|
| --- /dev/null
|
| +++ b/chrome/browser/resources/chromeos/chromevox2/cvox2/background/background.extjs
|
| @@ -0,0 +1,54 @@
|
| +// 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,
|
| +
|
| + /** @override */
|
| + testGenCppIncludes: function() {
|
| + GEN_BLOCK(function() {/*!
|
| +#include "ash/accessibility_delegate.h"
|
| +#include "base/bind.h"
|
| +#include "base/callback.h"
|
| +#include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
|
| +#include "chrome/common/extensions/extension_constants.h"
|
| + */});
|
| + },
|
| +
|
| + /** @override */
|
| + testGenPreamble: function() {
|
| + GEN_BLOCK(function() {/*!
|
| + if (chromeos::AccessibilityManager::Get()->IsSpokenFeedbackEnabled()) {
|
| + chromeos::AccessibilityManager::Get()->EnableSpokenFeedback(false,
|
| + ash::A11Y_NOTIFICATION_NONE);
|
| + }
|
| +
|
| + base::Closure load_cb =
|
| + base::Bind(&chromeos::AccessibilityManager::EnableSpokenFeedback,
|
| + base::Unretained(chromeos::AccessibilityManager::Get()),
|
| + true,
|
| + ash::A11Y_NOTIFICATION_NONE);
|
| + WaitForExtension(extension_misc::kChromeVoxExtensionId, load_cb);
|
| + */});
|
| + }
|
| +};
|
| +
|
| +/** Tests ChromeVox classic is in this context. */
|
| +TEST_F('BackgroundTest', 'ClassicNamespaces', function() {
|
| + assertEquals('object', typeof(cvox));
|
| + assertEquals('function', typeof(cvox.ChromeVoxBackground));
|
| +});
|
|
|