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

Unified Diff: third_party/WebKit/Source/web/tests/WebFrameTest.cpp

Issue 1410833004: Revert "Implement FullScreen using top layer." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 | « third_party/WebKit/Source/web/FullscreenController.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/tests/WebFrameTest.cpp
diff --git a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
index 5fe0cd649bac35e4a34fecbff9242bd0cceb2222..a5a13626199a841ae74911fc098cfda9d8c0fb54 100644
--- a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
+++ b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
@@ -64,6 +64,7 @@
#include "core/html/ImageDocument.h"
#include "core/input/EventHandler.h"
#include "core/layout/HitTestResult.h"
+#include "core/layout/LayoutFullScreen.h"
#include "core/layout/LayoutView.h"
#include "core/layout/compositing/PaintLayerCompositor.h"
#include "core/loader/DocumentLoader.h"
@@ -6477,40 +6478,6 @@ TEST_F(WebFrameTest, MaximumScrollPositionCanBeNegative)
EXPECT_LT(frameView->maximumScrollPosition().x(), 0);
}
-TEST_F(WebFrameTest, FullscreenCleanTopLayerAndFullscreenStack)
-{
- FakeCompositingWebViewClient client;
- registerMockedHttpURLLoad("fullscreen_div.html");
- FrameTestHelpers::WebViewHelper webViewHelper;
- int viewportWidth = 640;
- int viewportHeight = 480;
- client.m_screenInfo.rect.width = viewportWidth;
- client.m_screenInfo.rect.height = viewportHeight;
- WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad(
- m_baseURL + "fullscreen_div.html", true, 0, &client, configureAndroid);
- webViewImpl->resize(WebSize(viewportWidth, viewportHeight));
- webViewImpl->layout();
-
- UserGestureIndicator gesture(DefinitelyProcessingUserGesture);
- Document* document = toWebLocalFrameImpl(webViewImpl->mainFrame())->frame()->document();
- Fullscreen& fullscreen = Fullscreen::from(*document);
-
- Element* divFullscreen = document->getElementById("div1");
- fullscreen.requestFullscreen(*divFullscreen, Fullscreen::PrefixedRequest);
- webViewImpl->didEnterFullScreen();
- ASSERT_TRUE(Fullscreen::isFullScreen(*document));
-
- // Sanity check. We should have both in our stack.
- ASSERT_EQ(fullscreen.fullScreenElementStack().size(), 1UL);
- ASSERT_EQ(document->topLayerElements().size(), 2UL);
-
- fullscreen.exitFullscreen();
- webViewImpl->didExitFullScreen();
-
- ASSERT_EQ(fullscreen.fullScreenElementStack().size(), 0UL);
- ASSERT_EQ(document->topLayerElements().size(), 0UL);
-}
-
TEST_P(ParameterizedWebFrameTest, FullscreenLayerSize)
{
FakeCompositingWebViewClient client;
@@ -6533,8 +6500,7 @@ TEST_P(ParameterizedWebFrameTest, FullscreenLayerSize)
ASSERT_TRUE(Fullscreen::isFullScreen(*document));
// Verify that the element is sized to the viewport.
- Element* fullscreenElement = Fullscreen::currentFullScreenElementFrom(*document);
- LayoutBox* fullscreenLayoutObject = toLayoutBox(fullscreenElement->layoutObject());
+ LayoutFullScreen* fullscreenLayoutObject = Fullscreen::from(*document).fullScreenLayoutObject();
EXPECT_EQ(viewportWidth, fullscreenLayoutObject->logicalWidth().toInt());
EXPECT_EQ(viewportHeight, fullscreenLayoutObject->logicalHeight().toInt());
@@ -6638,8 +6604,7 @@ TEST_P(ParameterizedWebFrameTest, FullscreenSubframe)
webViewImpl->layout();
// Verify that the element is sized to the viewport.
- Element* fullscreenElement = Fullscreen::currentFullScreenElementFrom(*document);
- LayoutBox* fullscreenLayoutObject = toLayoutBox(fullscreenElement->layoutObject());
+ LayoutFullScreen* fullscreenLayoutObject = Fullscreen::from(*document).fullScreenLayoutObject();
EXPECT_EQ(viewportWidth, fullscreenLayoutObject->logicalWidth().toInt());
EXPECT_EQ(viewportHeight, fullscreenLayoutObject->logicalHeight().toInt());
« no previous file with comments | « third_party/WebKit/Source/web/FullscreenController.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698