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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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 });
OLDNEW
« 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