| Index: trunk/src/chrome/browser/chromeos/accessibility/spoken_feedback_browsertest.cc
|
| ===================================================================
|
| --- trunk/src/chrome/browser/chromeos/accessibility/spoken_feedback_browsertest.cc (revision 289492)
|
| +++ trunk/src/chrome/browser/chromeos/accessibility/spoken_feedback_browsertest.cc (working copy)
|
| @@ -10,7 +10,6 @@
|
| #include "base/strings/string_util.h"
|
| #include "chrome/app/chrome_command_ids.h"
|
| #include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
|
| -#include "chrome/browser/chromeos/accessibility/accessibility_util.h"
|
| #include "chrome/browser/chromeos/accessibility/speech_monitor.h"
|
| #include "chrome/browser/chromeos/login/ui/login_display_host.h"
|
| #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h"
|
| @@ -23,6 +22,7 @@
|
| #include "chrome/browser/ui/browser_commands.h"
|
| #include "chrome/browser/ui/browser_window.h"
|
| #include "chrome/common/chrome_switches.h"
|
| +#include "chrome/common/extensions/extension_constants.h"
|
| #include "chrome/test/base/in_process_browser_test.h"
|
| #include "chrome/test/base/interactive_test_utils.h"
|
| #include "chrome/test/base/testing_profile.h"
|
| @@ -32,6 +32,8 @@
|
| #include "content/public/common/url_constants.h"
|
| #include "content/public/test/browser_test_utils.h"
|
| #include "content/public/test/test_utils.h"
|
| +#include "extensions/browser/extension_host.h"
|
| +#include "extensions/browser/process_manager.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
| #include "ui/base/test/ui_controls.h"
|
| #include "ui/views/widget/widget.h"
|
| @@ -65,6 +67,19 @@
|
| root_window, key, false, false, false, false));
|
| }
|
|
|
| + void SimulateTouchScreenInChromeVox() {
|
| + // ChromeVox looks at whether 'ontouchstart' exists to know whether
|
| + // or not it should respond to hover events. Fake it so that touch
|
| + // exploration events get spoken.
|
| + extensions::ExtensionHost* host =
|
| + extensions::ExtensionSystem::Get(browser()->profile())->
|
| + process_manager()->GetBackgroundHostForExtension(
|
| + extension_misc::kChromeVoxExtensionId);
|
| + CHECK(content::ExecuteScript(
|
| + host->host_contents(),
|
| + "window.ontouchstart = function() {};"));
|
| + }
|
| +
|
| private:
|
| StubBrailleController braille_controller_;
|
| DISALLOW_COPY_AND_ASSIGN(LoggedInSpokenFeedbackTest);
|
| @@ -217,7 +232,7 @@
|
| true, ash::A11Y_NOTIFICATION_NONE);
|
| EXPECT_TRUE(monitor.SkipChromeVoxEnabledMessage());
|
|
|
| - accessibility::SimulateTouchScreenInChromeVoxForTest(browser()->profile());
|
| + SimulateTouchScreenInChromeVox();
|
|
|
| // Send an accessibility hover event on the system tray, which is
|
| // what we get when you tap it on a touch screen when ChromeVox is on.
|
|
|