Index: chrome/browser/resources/chromeos/chromevox/testing/chromevox_e2e_test.js |
diff --git a/chrome/browser/resources/chromeos/chromevox2/cvox2/background/background.extjs b/chrome/browser/resources/chromeos/chromevox/testing/chromevox_e2e_test.js |
similarity index 54% |
copy from chrome/browser/resources/chromeos/chromevox2/cvox2/background/background.extjs |
copy to chrome/browser/resources/chromeos/chromevox/testing/chromevox_e2e_test.js |
index 496978203f7a0dff573de56916053900955bb0fa..79818240bff952dcb40d30428c45c4c30d2ef320 100644 |
--- a/chrome/browser/resources/chromeos/chromevox2/cvox2/background/background.extjs |
+++ b/chrome/browser/resources/chromeos/chromevox/testing/chromevox_e2e_test.js |
@@ -2,18 +2,26 @@ |
// 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. |
+ * Base test fixture for ChromeVox end to end tests. |
+ * |
+ * These tests run against production ChromeVox inside of the extension's |
+ * background page context. |
* @constructor |
- * @extends {ChromeVoxUnitTestBase} |
*/ |
-function BackgroundTest() {} |
+function ChromeVoxE2ETest() {} |
+ |
+ChromeVoxE2ETest.prototype = { |
+ __proto__: testing.Test.prototype, |
+ |
+ /** |
+ * @override |
+ * No UI in the background context. |
+ */ |
+ runAccessibilityChecks: false, |
-BackgroundTest.prototype = { |
- __proto__: ChromeVoxUnitTestBase.prototype, |
+ /** @override */ |
+ isAsync: true, |
/** @override */ |
browsePreload: null, |
@@ -47,8 +55,19 @@ BackgroundTest.prototype = { |
} |
}; |
-/** Tests ChromeVox classic is in this context. */ |
-TEST_F('BackgroundTest', 'ClassicNamespaces', function() { |
- assertEquals('object', typeof(cvox)); |
- assertEquals('function', typeof(cvox.ChromeVoxBackground)); |
-}); |
+/** |
+ * Similar to |TEST_F|. Generates a test for the given |testFixture|, |
+ * |testName|, and |testFunction|. |
+ * Used this variant when an |isAsync| fixture wants to temporarily mix in an |
+ * sync test. |
+ * @param {string} testFixture Fixture name. |
+ * @param {string} testName Test name. |
+ * @param {function} testFunction The test impl. |
+ */ |
+function SYNC_TEST_F(testFixture, testName, testFunction) { |
+ var wrappedTestFunction = function() { |
+ testFunction(); |
+ testDone([true, '']); |
+ }; |
+ TEST_F(testFixture, testName, wrappedTestFunction); |
+} |