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

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: Trying to fix test broken on Mac Created 5 years 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
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 76ef42d665fe5dca72372db78bee373babfe5a83..dc8468d3a7652e47cb6a69984c50d140ae41bb81 100644
--- a/ui/views/controls/webview/webview_unittest.cc
+++ b/ui/views/controls/webview/webview_unittest.cc
@@ -278,13 +278,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
@@ -294,7 +294,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.
@@ -306,7 +306,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());
}
@@ -337,7 +337,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());
@@ -390,7 +390,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.
« content/browser/frame_host/render_frame_host_impl.cc ('K') | « ui/views/controls/webview/webview.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698