Commit 4ac56ab9 authored by David Tseng's avatar David Tseng Committed by Chromium LUCI CQ

Cleanup accessibility extension helper

Mostly a follow up to
https://chromium-review.googlesource.com/c/chromium/src/+/2613726

R=dmazzoni@chromium.org

AX-Relnotes: n/a
Change-Id: I12ba5e9dc3fba9ac529712190f26ae209528fed7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2617230
Commit-Queue: David Tseng <dtseng@chromium.org>
Reviewed-by: default avatarDominic Mazzoni <dmazzoni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#841795}
parent 193500e6
......@@ -2,8 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
GEN_INCLUDE(['../../common/testing/assert_additions.js']);
GEN_INCLUDE(['common.js', '../../common/testing/callback_helper.js']);
// clang-format off
GEN_INCLUDE([
'../../common/testing/assert_additions.js',
'../../common/testing/common.js',
'../../common/testing/callback_helper.js'
]);
// clang-format on
/**
* Base test fixture for ChromeVox webui tests. Run in a Blink renderer.
......
......@@ -99,18 +99,3 @@ class TestUtils {
});
}
}
/**
* 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) {
TEST_F(testFixture, testName, function() {
this.newCallback(testFunction)();
});
}
// Copyright 2021 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.
/** @fileoverview File containing test framework helper functions. */
/**
* 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 a
* 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) {
TEST_F(testFixture, testName, function() {
this.newCallback(testFunction)();
});
}
......@@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
GEN_INCLUDE(['assert_additions.js', 'callback_helper.js', 'doc_utils.js']);
GEN_INCLUDE(
['assert_additions.js', 'callback_helper.js', 'common.js', 'doc_utils.js']);
/**
* Base test fixture for end to end tests (tests that need a full extension
......@@ -167,18 +168,3 @@ E2ETestBase.prototype.isAsync = true;
* No UI in the background context.
*/
E2ETestBase.prototype.runAccessibilityChecks = false;
/**
* 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) {
TEST_F(testFixture, testName, function() {
this.newCallback(testFunction)();
});
}
......@@ -77,6 +77,7 @@ source_set("browser_tests") {
js2gtest("select_to_speak_extjs_tests") {
test_type = "extension"
sources = [
# These are end-to-end tests.
"paragraph_utils_overflow_test.js",
"select_to_speak_keystroke_selection_test.js",
"select_to_speak_mouse_selection_test.js",
......
......@@ -10,7 +10,9 @@ GEN_INCLUDE([
'//chrome/browser/resources/chromeos/accessibility/chromevox/testing/' +
'common.js',
'//chrome/browser/resources/chromeos/accessibility/common/testing/' +
'callback_helper.js'
'callback_helper.js',
'//chrome/browser/resources/chromeos/accessibility/common/testing/' +
'common.js'
]);
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment