OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 5323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5334 } | 5334 } |
5335 | 5335 |
5336 TEST_F(WebFrameTest, FullscreenLayerNonScrollable) | 5336 TEST_F(WebFrameTest, FullscreenLayerNonScrollable) |
5337 { | 5337 { |
5338 FakeCompositingWebViewClient client; | 5338 FakeCompositingWebViewClient client; |
5339 registerMockedHttpURLLoad("fullscreen_div.html"); | 5339 registerMockedHttpURLLoad("fullscreen_div.html"); |
5340 FrameTestHelpers::WebViewHelper webViewHelper; | 5340 FrameTestHelpers::WebViewHelper webViewHelper; |
5341 int viewportWidth = 640; | 5341 int viewportWidth = 640; |
5342 int viewportHeight = 480; | 5342 int viewportHeight = 480; |
5343 WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad(m_baseURL + "full
screen_div.html", true, 0, &client, &configueCompositingWebView); | 5343 WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad(m_baseURL + "full
screen_div.html", true, 0, &client, &configueCompositingWebView); |
5344 webViewImpl->settings()->setFullScreenEnabled(true); | |
5345 webViewImpl->resize(WebSize(viewportWidth, viewportHeight)); | 5344 webViewImpl->resize(WebSize(viewportWidth, viewportHeight)); |
5346 webViewImpl->layout(); | 5345 webViewImpl->layout(); |
5347 | 5346 |
5348 Document* document = toWebFrameImpl(webViewImpl->mainFrame())->frame()->docu
ment(); | 5347 Document* document = toWebFrameImpl(webViewImpl->mainFrame())->frame()->docu
ment(); |
5349 WebCore::UserGestureIndicator gesture(WebCore::DefinitelyProcessingUserGestu
re); | 5348 WebCore::UserGestureIndicator gesture(WebCore::DefinitelyProcessingUserGestu
re); |
5350 Element* divFullscreen = document->getElementById("div1"); | 5349 Element* divFullscreen = document->getElementById("div1"); |
5351 divFullscreen->webkitRequestFullscreen(); | 5350 divFullscreen->webkitRequestFullscreen(); |
5352 webViewImpl->willEnterFullScreen(); | 5351 webViewImpl->willEnterFullScreen(); |
5353 webViewImpl->didEnterFullScreen(); | 5352 webViewImpl->didEnterFullScreen(); |
5354 webViewImpl->layout(); | 5353 webViewImpl->layout(); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5390 EXPECT_EQ(2U, container->percentHeightDescendants()->size()); | 5389 EXPECT_EQ(2U, container->percentHeightDescendants()->size()); |
5391 EXPECT_TRUE(container->percentHeightDescendants()->contains(percentHeightInA
nonymous)); | 5390 EXPECT_TRUE(container->percentHeightDescendants()->contains(percentHeightInA
nonymous)); |
5392 EXPECT_TRUE(container->percentHeightDescendants()->contains(percentHeightDir
ectChild)); | 5391 EXPECT_TRUE(container->percentHeightDescendants()->contains(percentHeightDir
ectChild)); |
5393 | 5392 |
5394 WebCore::RenderBlock* anonymousBlock = percentHeightInAnonymous->containingB
lock(); | 5393 WebCore::RenderBlock* anonymousBlock = percentHeightInAnonymous->containingB
lock(); |
5395 EXPECT_TRUE(anonymousBlock->isAnonymous()); | 5394 EXPECT_TRUE(anonymousBlock->isAnonymous()); |
5396 EXPECT_FALSE(anonymousBlock->hasPercentHeightDescendants()); | 5395 EXPECT_FALSE(anonymousBlock->hasPercentHeightDescendants()); |
5397 } | 5396 } |
5398 | 5397 |
5399 } // namespace | 5398 } // namespace |
OLD | NEW |