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

Unified Diff: ui/views/controls/webview/webview_unittest.cc

Issue 1488653002: Fix scroll restoration when exiting fullscreen mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Accidentally made will_cause_resize always false in previous cleanup. Fixed Created 4 years, 11 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 | « ui/views/controls/webview/webview.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/webview/webview_unittest.cc
diff --git a/ui/views/controls/webview/webview_unittest.cc b/ui/views/controls/webview/webview_unittest.cc
index bc2a927c5a70738994633b00a3d5c28d4e66dad6..2a53691e2e29700a8323459e755ea26f99538804 100644
--- a/ui/views/controls/webview/webview_unittest.cc
+++ b/ui/views/controls/webview/webview_unittest.cc
@@ -281,13 +281,13 @@ TEST_F(WebViewUnitTest, EmbeddedFullscreenDuringScreenCapture_Layout) {
// WebView like before.
delegate.set_is_fullscreened(true);
static_cast<content::WebContentsObserver*>(web_view())->
- DidToggleFullscreenModeForTab(true);
+ DidToggleFullscreenModeForTab(true, false);
EXPECT_EQ(gfx::Rect(0, 0, 100, 100), holder()->bounds());
// ...and transition back out of fullscreen mode.
delegate.set_is_fullscreened(false);
static_cast<content::WebContentsObserver*>(web_view())->
- DidToggleFullscreenModeForTab(false);
+ DidToggleFullscreenModeForTab(false, false);
EXPECT_EQ(gfx::Rect(0, 0, 100, 100), holder()->bounds());
// Now, begin screen capture of the WebContents and then enter fullscreen
@@ -297,7 +297,7 @@ TEST_F(WebViewUnitTest, EmbeddedFullscreenDuringScreenCapture_Layout) {
web_contents->IncrementCapturerCount(capture_size);
delegate.set_is_fullscreened(true);
static_cast<content::WebContentsObserver*>(web_view())->
- DidToggleFullscreenModeForTab(true);
+ DidToggleFullscreenModeForTab(true, false);
EXPECT_EQ(gfx::Rect(18, 26, 64, 48), holder()->bounds());
// Resize the WebView so that its width is smaller than the capture width.
@@ -309,7 +309,7 @@ TEST_F(WebViewUnitTest, EmbeddedFullscreenDuringScreenCapture_Layout) {
// of the holder fill the entire WebView once again.
delegate.set_is_fullscreened(false);
static_cast<content::WebContentsObserver*>(web_view())->
- DidToggleFullscreenModeForTab(false);
+ DidToggleFullscreenModeForTab(false, false);
EXPECT_EQ(gfx::Rect(0, 0, 32, 32), holder()->bounds());
}
@@ -340,7 +340,7 @@ TEST_F(WebViewUnitTest, EmbeddedFullscreenDuringScreenCapture_Switching) {
web_contents1->IncrementCapturerCount(capture_size);
delegate1.set_is_fullscreened(true);
static_cast<content::WebContentsObserver*>(web_view())->
- DidToggleFullscreenModeForTab(true);
+ DidToggleFullscreenModeForTab(true, false);
EXPECT_EQ(web_contents1->GetNativeView(), holder()->native_view());
EXPECT_EQ(gfx::Rect(18, 26, 64, 48), holder()->bounds());
@@ -393,7 +393,7 @@ TEST_F(WebViewUnitTest, EmbeddedFullscreenDuringScreenCapture_ClickToFocus) {
web_contents->IncrementCapturerCount(capture_size);
delegate.set_is_fullscreened(true);
static_cast<content::WebContentsObserver*>(web_view())->
- DidToggleFullscreenModeForTab(true);
+ DidToggleFullscreenModeForTab(true, false);
EXPECT_EQ(gfx::Rect(18, 21, 64, 48), holder()->bounds());
// Focus the other widget.
« no previous file with comments | « ui/views/controls/webview/webview.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698