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

Unified Diff: chrome/browser/apps/web_view_browsertest.cc

Issue 153263006: Add test for ChromeVox injection into webview (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comment fixed Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/accessibility/speech_monitor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/apps/web_view_browsertest.cc
diff --git a/chrome/browser/apps/web_view_browsertest.cc b/chrome/browser/apps/web_view_browsertest.cc
index 3326947f023765899b2c6ca3fdbb330c3ceca577..c96a591afb11330bf92d8acd1693d3586a5f0914 100644
--- a/chrome/browser/apps/web_view_browsertest.cc
+++ b/chrome/browser/apps/web_view_browsertest.cc
@@ -32,6 +32,11 @@
#include "net/test/embedded_test_server/http_response.h"
#include "ui/gl/gl_switches.h"
+#if defined(OS_CHROMEOS)
+#include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
+#include "chrome/browser/chromeos/accessibility/speech_monitor.h"
+#endif
+
// For fine-grained suppression on flaky tests.
#if defined(OS_WIN)
#include "base/win/windows_version.h"
@@ -1545,6 +1550,26 @@ IN_PROC_BROWSER_TEST_F(WebViewTest, SpeechRecognition) {
EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle());
}
+#if defined(OS_CHROMEOS)
+IN_PROC_BROWSER_TEST_F(WebViewTest, ChromeVoxInjection) {
+ EXPECT_FALSE(
+ chromeos::AccessibilityManager::Get()->IsSpokenFeedbackEnabled());
+
+ ASSERT_TRUE(StartEmbeddedTestServer());
+ content::WebContents* guest_web_contents = LoadGuest(
+ "/extensions/platform_apps/web_view/chromevox_injection/guest.html",
+ "web_view/chromevox_injection");
+ ASSERT_TRUE(guest_web_contents);
+
+ chromeos::SpeechMonitor monitor;
+ chromeos::AccessibilityManager::Get()->EnableSpokenFeedback(
+ true, ash::A11Y_NOTIFICATION_NONE);
+ EXPECT_TRUE(monitor.SkipChromeVoxEnabledMessage());
+
+ EXPECT_EQ("chrome vox test title", monitor.GetNextUtterance());
+}
+#endif
+
// Flaky on Windows. http://crbug.com/303966
#if defined(OS_WIN)
#define MAYBE_TearDownTest DISABLED_TearDownTest
« no previous file with comments | « no previous file | chrome/browser/chromeos/accessibility/speech_monitor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698