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

Unified Diff: content/browser/screen_orientation/screen_orientation_browsertest.cc

Issue 444033002: Fix screen.orientation.lock() rejection and an integration test. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments Created 6 years, 4 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 | content/browser/screen_orientation/screen_orientation_dispatcher_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/screen_orientation/screen_orientation_browsertest.cc
diff --git a/content/browser/screen_orientation/screen_orientation_browsertest.cc b/content/browser/screen_orientation/screen_orientation_browsertest.cc
index daccbd23351f6c0d9abd0b68d79b8442f54b2aa7..8216106ace3da5e265e71f9c1676b9f7fedd8bf9 100644
--- a/content/browser/screen_orientation/screen_orientation_browsertest.cc
+++ b/content/browser/screen_orientation/screen_orientation_browsertest.cc
@@ -144,6 +144,9 @@ IN_PROC_BROWSER_TEST_F(ScreenOrientationBrowserTest, WindowOrientationChange) {
TestNavigationObserver navigation_observer(shell()->web_contents(), 1);
shell()->LoadURL(test_url);
navigation_observer.Wait();
+#if USE_AURA
+ WaitForResizeComplete(shell()->web_contents());
+#endif // USE_AURA
if (!WindowOrientationSupported())
return;
@@ -160,4 +163,26 @@ IN_PROC_BROWSER_TEST_F(ScreenOrientationBrowserTest, WindowOrientationChange) {
}
}
+// Chromium Android does not support fullscreen
+IN_PROC_BROWSER_TEST_F(ScreenOrientationBrowserTest, LockSmoke) {
+ GURL test_url = GetTestUrl("screen_orientation",
+ "screen_orientation_lock_smoke.html");
+
+ TestNavigationObserver navigation_observer(shell()->web_contents(), 2);
+ shell()->LoadURL(test_url);
+ navigation_observer.Wait();
+#if USE_AURA
+ WaitForResizeComplete(shell()->web_contents());
+#endif // USE_AURA
+
+ std::string expected =
+#if defined(OS_ANDROID)
+ "SecurityError"; // WebContents need to be fullscreen.
+#else
+ "NotSupportedError"; // Locking isn't supported.
+#endif
+
+ EXPECT_EQ(expected, shell()->web_contents()->GetLastCommittedURL().ref());
+}
+
} // namespace content
« no previous file with comments | « no previous file | content/browser/screen_orientation/screen_orientation_dispatcher_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698