Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3118)

Unified Diff: chrome/browser/resources/chromeos/chromevox2/cvox2/background/background.extjs

Issue 320753002: Support javascript gtests in an extension background page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: EXPECT_TRUE and TODO. Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/chromeos/chromevox/chromevox_tests.gypi ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
+});
« no previous file with comments | « chrome/browser/resources/chromeos/chromevox/chromevox_tests.gypi ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698