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 5334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5345 | 5345 |
5346 // Verify that the main frame is scrollable upon exiting fullscreen. | 5346 // Verify that the main frame is scrollable upon exiting fullscreen. |
5347 webViewImpl->willExitFullScreen(); | 5347 webViewImpl->willExitFullScreen(); |
5348 webViewImpl->didExitFullScreen(); | 5348 webViewImpl->didExitFullScreen(); |
5349 webViewImpl->layout(); | 5349 webViewImpl->layout(); |
5350 ASSERT_FALSE(WebCore::FullscreenElementStack::isFullScreen(*document)); | 5350 ASSERT_FALSE(WebCore::FullscreenElementStack::isFullScreen(*document)); |
5351 webScrollLayer = webViewImpl->compositor()->scrollLayer()->platformLayer(); | 5351 webScrollLayer = webViewImpl->compositor()->scrollLayer()->platformLayer(); |
5352 ASSERT_TRUE(webScrollLayer->scrollable()); | 5352 ASSERT_TRUE(webScrollLayer->scrollable()); |
5353 } | 5353 } |
5354 | 5354 |
| 5355 TEST_F(WebFrameTest, FullscreenMainFrameScrollable) |
| 5356 { |
| 5357 FakeCompositingWebViewClient client; |
| 5358 registerMockedHttpURLLoad("fullscreen_div.html"); |
| 5359 FrameTestHelpers::WebViewHelper webViewHelper; |
| 5360 int viewportWidth = 640; |
| 5361 int viewportHeight = 480; |
| 5362 WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad(m_baseURL + "full
screen_div.html", true, 0, &client, &configueCompositingWebView); |
| 5363 webViewImpl->resize(WebSize(viewportWidth, viewportHeight)); |
| 5364 webViewImpl->layout(); |
| 5365 |
| 5366 Document* document = toWebLocalFrameImpl(webViewImpl->mainFrame())->frame()-
>document(); |
| 5367 WebCore::UserGestureIndicator gesture(WebCore::DefinitelyProcessingUserGestu
re); |
| 5368 document->documentElement()->webkitRequestFullscreen(); |
| 5369 webViewImpl->willEnterFullScreen(); |
| 5370 webViewImpl->didEnterFullScreen(); |
| 5371 webViewImpl->layout(); |
| 5372 |
| 5373 // Verify that the main frame is still scrollable. |
| 5374 ASSERT_TRUE(WebCore::FullscreenElementStack::isFullScreen(*document)); |
| 5375 WebLayer* webScrollLayer = webViewImpl->compositor()->scrollLayer()->platfor
mLayer(); |
| 5376 ASSERT_TRUE(webScrollLayer->scrollable()); |
| 5377 } |
| 5378 |
5355 TEST_F(WebFrameTest, RenderBlockPercentHeightDescendants) | 5379 TEST_F(WebFrameTest, RenderBlockPercentHeightDescendants) |
5356 { | 5380 { |
5357 registerMockedHttpURLLoad("percent-height-descendants.html"); | 5381 registerMockedHttpURLLoad("percent-height-descendants.html"); |
5358 FrameTestHelpers::WebViewHelper webViewHelper; | 5382 FrameTestHelpers::WebViewHelper webViewHelper; |
5359 webViewHelper.initializeAndLoad(m_baseURL + "percent-height-descendants.html
"); | 5383 webViewHelper.initializeAndLoad(m_baseURL + "percent-height-descendants.html
"); |
5360 | 5384 |
5361 WebView* webView = webViewHelper.webView(); | 5385 WebView* webView = webViewHelper.webView(); |
5362 webView->resize(WebSize(800, 800)); | 5386 webView->resize(WebSize(800, 800)); |
5363 webView->layout(); | 5387 webView->layout(); |
5364 | 5388 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5420 registerMockedHttpURLLoad("link-manifest-change.html"); | 5444 registerMockedHttpURLLoad("link-manifest-change.html"); |
5421 | 5445 |
5422 ManifestChangeWebFrameClient webFrameClient; | 5446 ManifestChangeWebFrameClient webFrameClient; |
5423 FrameTestHelpers::WebViewHelper webViewHelper; | 5447 FrameTestHelpers::WebViewHelper webViewHelper; |
5424 webViewHelper.initializeAndLoad(m_baseURL + "link-manifest-change.html", tru
e, &webFrameClient); | 5448 webViewHelper.initializeAndLoad(m_baseURL + "link-manifest-change.html", tru
e, &webFrameClient); |
5425 | 5449 |
5426 EXPECT_EQ(14, webFrameClient.manifestChangeCount()); | 5450 EXPECT_EQ(14, webFrameClient.manifestChangeCount()); |
5427 } | 5451 } |
5428 | 5452 |
5429 } // namespace | 5453 } // namespace |
OLD | NEW |