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.
6 * Base test fixture for ChromeVox end to end tests.
8 * These tests run against production ChromeVox inside of the extension's
9 * background page context.
12 function ChromeVoxE2ETest() {}
14 ChromeVoxE2ETest.prototype = {
15 __proto__: testing.Test.prototype,
19 * No UI in the background context.
21 runAccessibilityChecks: false,
30 testGenCppIncludes: function() {
31 GEN_BLOCK(function() {/*!
32 #include "ash/accessibility_delegate.h"
33 #include "base/bind.h"
34 #include "base/callback.h"
35 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
36 #include "chrome/common/extensions/extension_constants.h"
41 testGenPreamble: function() {
42 GEN_BLOCK(function() {/*!
43 if (chromeos::AccessibilityManager::Get()->IsSpokenFeedbackEnabled()) {
44 chromeos::AccessibilityManager::Get()->EnableSpokenFeedback(false,
45 ash::A11Y_NOTIFICATION_NONE);
48 base::Closure load_cb =
49 base::Bind(&chromeos::AccessibilityManager::EnableSpokenFeedback,
50 base::Unretained(chromeos::AccessibilityManager::Get()),
52 ash::A11Y_NOTIFICATION_NONE);
53 WaitForExtension(extension_misc::kChromeVoxExtensionId, load_cb);
59 * Similar to |TEST_F|. Generates a test for the given |testFixture|,
60 * |testName|, and |testFunction|.
61 * Used this variant when an |isAsync| fixture wants to temporarily mix in an
63 * @param {string} testFixture Fixture name.
64 * @param {string} testName Test name.
65 * @param {function} testFunction The test impl.
67 function SYNC_TEST_F(testFixture, testName, testFunction) {
68 var wrappedTestFunction = function() {
72 TEST_F(testFixture, testName, wrappedTestFunction);