#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"
content::RunAllPendingInMessageLoop();
content::WebContents* embedder_web_contents =
- GetFirstShellWindowWebContents();
+ GetFirstAppWindowWebContents();
if (!embedder_web_contents) {
LOG(ERROR) << "UNABLE TO FIND EMBEDDER WEB CONTENTS.";
return;
ASSERT_TRUE(loaded_listener.WaitUntilSatisfied());
content::WebContents* embedder_web_contents =
- GetFirstShellWindowWebContents();
+ GetFirstAppWindowWebContents();
ASSERT_TRUE(embedder_web_contents);
ExtensionTestMessageListener test_run_listener("PASSED", false);
// This test ensures <webview> doesn't crash in SW rendering when autosize is
// turned on.
// Flaky on Windows http://crbug.com/299507
-#if defined(OS_WIN)
+#if defined(OS_WIN) || defined(OS_MACOSX)
#define MAYBE_AutoSizeSW DISABLED_AutoSizeSW
#else
#define MAYBE_AutoSizeSW AutoSizeSW
LoadAndLaunchPlatformApp("web_view/shim");
ASSERT_TRUE(launched_listener.WaitUntilSatisfied());
- content::WebContents* embedder_web_contents =
- GetFirstShellWindowWebContents();
+ content::WebContents* embedder_web_contents = GetFirstAppWindowWebContents();
ASSERT_TRUE(embedder_web_contents);
GURL::Replacements replace_host;
SetBrowserClientForTesting(&new_client);
// Now load the guest.
- content::WebContents* embedder_web_contents =
- GetFirstShellWindowWebContents();
+ content::WebContents* embedder_web_contents = GetFirstAppWindowWebContents();
ExtensionTestMessageListener second("GuestAddedToDom", false);
EXPECT_TRUE(content::ExecuteScript(
embedder_web_contents,
WaitForInterstitial(guest_web_contents);
// Now close the app while interstitial page being shown in guest.
- apps::ShellWindow* window = GetFirstShellWindow();
+ apps::AppWindow* window = GetFirstAppWindow();
window->GetBaseWindow()->Close();
}
<< message_;
}
-// Disabled on Windows for flaky failures: crbug.com/329032
-#if defined(OS_WIN)
-#define MAYBE_Size DISABLED_Size
-#else
-#define MAYBE_Size Size
-#endif
-IN_PROC_BROWSER_TEST_F(WebViewTest, MAYBE_Size) {
- ASSERT_TRUE(RunPlatformAppTest("platform_apps/web_view/size")) << message_;
-}
-
// This test verifies that prerendering has been disabled inside <webview>.
// This test is here rather than in PrerenderBrowserTest for testing convenience
// only. If it breaks then this is a bug in the prerenderer.
LoadAndLaunchPlatformApp("web_view/media_access/allow");
ASSERT_TRUE(launched_listener.WaitUntilSatisfied());
- content::WebContents* embedder_web_contents =
- GetFirstShellWindowWebContents();
+ content::WebContents* embedder_web_contents = GetFirstAppWindowWebContents();
ASSERT_TRUE(embedder_web_contents);
MockWebContentsDelegate* mock = new MockWebContentsDelegate;
embedder_web_contents->SetDelegate(mock);
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
const extensions::Extension* extension =
LoadAndLaunchPlatformApp("web_view/teardown");
ASSERT_TRUE(first_loaded_listener.WaitUntilSatisfied());
- apps::ShellWindow* window = NULL;
- if (!GetShellWindowCount())
- window = CreateShellWindow(extension);
+ apps::AppWindow* window = NULL;
+ if (!GetAppWindowCount())
+ window = CreateAppWindow(extension);
else
- window = GetFirstShellWindow();
- CloseShellWindow(window);
+ window = GetFirstAppWindow();
+ CloseAppWindow(window);
// Load the app again.
ExtensionTestMessageListener second_loaded_listener("guest-loaded", false);
}
};
-#if defined(USE_AURA) && defined(OS_LINUX)
-// Keeps failing on LinuxAura try server, tentatively disable this
-// so that CQ becomes sane.
-// crbug.com/330146
-#define MAYBE_Shim_ScreenshotCapture DISABLED_Shim_ScreenshotCapture
-#else
-#define MAYBE_Shim_ScreenshotCapture Shim_ScreenshotCapture
-#endif
+IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestZoomAPI) {
+ TestHelper("testZoomAPI", "web_view/shim", NO_TEST_SERVER);
+}
+
+// <webview> screenshot capture fails with ubercomp.
+// See http://crbug.com/327035.
IN_PROC_BROWSER_TEST_P(WebViewCaptureTest,
- MAYBE_Shim_ScreenshotCapture) {
+ DISABLED_Shim_ScreenshotCapture) {
TestHelper("testScreenshotCapture", "web_view/shim", NO_TEST_SERVER);
}