| Index: chrome/browser/resources/chromeos/chromevox/testing/chromevox_e2e_test_base.js
|
| diff --git a/chrome/browser/resources/chromeos/chromevox/testing/chromevox_e2e_test_base.js b/chrome/browser/resources/chromeos/chromevox/testing/chromevox_e2e_test_base.js
|
| index 9b797cbf58a0b0536b59864ca6e1c44e0c2585a9..1edf3167bd8121ddaa27520ce6ed1162fa3bfde1 100644
|
| --- a/chrome/browser/resources/chromeos/chromevox/testing/chromevox_e2e_test_base.js
|
| +++ b/chrome/browser/resources/chromeos/chromevox/testing/chromevox_e2e_test_base.js
|
| @@ -43,6 +43,11 @@
|
| /** @override */
|
| testGenPreamble: function() {
|
| GEN_BLOCK(function() {/*!
|
| + if (chromeos::AccessibilityManager::Get()->IsSpokenFeedbackEnabled()) {
|
| + chromeos::AccessibilityManager::Get()->EnableSpokenFeedback(false,
|
| + ui::A11Y_NOTIFICATION_NONE);
|
| + }
|
| +
|
| base::Closure load_cb =
|
| base::Bind(&chromeos::AccessibilityManager::EnableSpokenFeedback,
|
| base::Unretained(chromeos::AccessibilityManager::Get()),
|
| @@ -53,26 +58,11 @@
|
| },
|
|
|
| /**
|
| - * Launch a new tab, wait until tab status complete, then run callback.
|
| + * Run a test with the specified HTML snippet loaded.
|
| * @param {function() : void} doc Snippet wrapped inside of a function.
|
| * @param {function()} callback Called once the document is ready.
|
| */
|
| - runWithLoadedTab: function(doc, callback) {
|
| - this.launchNewTabWithDoc(doc, function(tab) {
|
| - chrome.tabs.onUpdated.addListener(function(tabId, changeInfo) {
|
| - if (tabId == tab.id && changeInfo.status == 'complete') {
|
| - callback(tabId);
|
| - }
|
| - });
|
| - });
|
| - },
|
| -
|
| - /**
|
| - * Launches the given document in a new tab.
|
| - * @param {function() : void} doc Snippet wrapped inside of a function.
|
| - * @param {function()} opt_callback Called once the document is created.
|
| - */
|
| - runWithTab: function(doc, opt_callback) {
|
| + runWithDocument: function(doc, callback) {
|
| var docString = TestUtils.extractHtmlFromCommentEncodedString(doc);
|
| var url = 'data:text/html,<!doctype html>' +
|
| docString +
|
| @@ -81,7 +71,13 @@
|
| active: true,
|
| url: url
|
| };
|
| - chrome.tabs.create(createParams, opt_callback);
|
| + chrome.tabs.create(createParams, function(tab) {
|
| + chrome.tabs.onUpdated.addListener(function(tabId, changeInfo) {
|
| + if (tabId == tab.id && changeInfo.status == 'complete') {
|
| + callback(tabId);
|
| + }
|
| + });
|
| + });
|
| },
|
|
|
| /**
|
|
|