| 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 2437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2448 int viewHeight = 500; | 2448 int viewHeight = 500; |
| 2449 | 2449 |
| 2450 OwnPtr<FakeCompositingWebViewClient> fakeCompositingWebViewClient = adoptPtr
(new FakeCompositingWebViewClient()); | 2450 OwnPtr<FakeCompositingWebViewClient> fakeCompositingWebViewClient = adoptPtr
(new FakeCompositingWebViewClient()); |
| 2451 FrameTestHelpers::WebViewHelper webViewHelper; | 2451 FrameTestHelpers::WebViewHelper webViewHelper; |
| 2452 webViewHelper.initialize(true, nullptr, fakeCompositingWebViewClient.get(),
nullptr, &configueCompositingWebView); | 2452 webViewHelper.initialize(true, nullptr, fakeCompositingWebViewClient.get(),
nullptr, &configueCompositingWebView); |
| 2453 | 2453 |
| 2454 webViewHelper.resize(WebSize(viewWidth, viewHeight)); | 2454 webViewHelper.resize(WebSize(viewWidth, viewHeight)); |
| 2455 FrameTestHelpers::loadFrame(webViewHelper.webView()->mainFrame(), m_baseURL
+ "large-div.html"); | 2455 FrameTestHelpers::loadFrame(webViewHelper.webView()->mainFrame(), m_baseURL
+ "large-div.html"); |
| 2456 | 2456 |
| 2457 FrameView* view = webViewHelper.webViewImpl()->mainFrameImpl()->frameView(); | 2457 FrameView* view = webViewHelper.webViewImpl()->mainFrameImpl()->frameView(); |
| 2458 EXPECT_TRUE(view->layoutView()->compositor()->layerForHorizontalScrollbar())
; | 2458 EXPECT_TRUE(view->layoutViewItem().compositor()->layerForHorizontalScrollbar
()); |
| 2459 EXPECT_TRUE(view->layoutView()->compositor()->layerForVerticalScrollbar()); | 2459 EXPECT_TRUE(view->layoutViewItem().compositor()->layerForVerticalScrollbar()
); |
| 2460 | 2460 |
| 2461 webViewHelper.resize(WebSize(viewWidth * 10, viewHeight * 10)); | 2461 webViewHelper.resize(WebSize(viewWidth * 10, viewHeight * 10)); |
| 2462 EXPECT_FALSE(view->layoutView()->compositor()->layerForHorizontalScrollbar()
); | 2462 EXPECT_FALSE(view->layoutViewItem().compositor()->layerForHorizontalScrollba
r()); |
| 2463 EXPECT_FALSE(view->layoutView()->compositor()->layerForVerticalScrollbar()); | 2463 EXPECT_FALSE(view->layoutViewItem().compositor()->layerForVerticalScrollbar(
)); |
| 2464 } | 2464 } |
| 2465 | 2465 |
| 2466 void setScaleAndScrollAndLayout(WebViewImpl* webView, WebPoint scroll, float sca
le) | 2466 void setScaleAndScrollAndLayout(WebViewImpl* webView, WebPoint scroll, float sca
le) |
| 2467 { | 2467 { |
| 2468 webView->setPageScaleFactor(scale); | 2468 webView->setPageScaleFactor(scale); |
| 2469 webView->mainFrame()->setScrollOffset(WebSize(scroll.x, scroll.y)); | 2469 webView->mainFrame()->setScrollOffset(WebSize(scroll.x, scroll.y)); |
| 2470 webView->updateAllLifecyclePhases(); | 2470 webView->updateAllLifecyclePhases(); |
| 2471 } | 2471 } |
| 2472 | 2472 |
| 2473 void simulatePageScale(WebViewImpl* webViewImpl, float& scale) | 2473 void simulatePageScale(WebViewImpl* webViewImpl, float& scale) |
| (...skipping 4192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6666 registerMockedHttpURLLoad("viewport-tiny.html"); | 6666 registerMockedHttpURLLoad("viewport-tiny.html"); |
| 6667 FrameTestHelpers::WebViewHelper webViewHelper(this); | 6667 FrameTestHelpers::WebViewHelper webViewHelper(this); |
| 6668 WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad(m_baseURL + "view
port-tiny.html", true, nullptr, &client, nullptr, configureAndroid); | 6668 WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad(m_baseURL + "view
port-tiny.html", true, nullptr, &client, nullptr, configureAndroid); |
| 6669 int viewportWidth = 384; | 6669 int viewportWidth = 384; |
| 6670 int viewportHeight = 640; | 6670 int viewportHeight = 640; |
| 6671 client.m_screenInfo.rect.width = viewportWidth; | 6671 client.m_screenInfo.rect.width = viewportWidth; |
| 6672 client.m_screenInfo.rect.height = viewportHeight; | 6672 client.m_screenInfo.rect.height = viewportHeight; |
| 6673 webViewHelper.resize(WebSize(viewportWidth, viewportHeight)); | 6673 webViewHelper.resize(WebSize(viewportWidth, viewportHeight)); |
| 6674 webViewImpl->updateAllLifecyclePhases(); | 6674 webViewImpl->updateAllLifecyclePhases(); |
| 6675 | 6675 |
| 6676 LayoutView* layoutView = webViewHelper.webViewImpl()->mainFrameImpl()->frame
View()->layoutView(); | 6676 LayoutViewItem layoutViewItem = webViewHelper.webViewImpl()->mainFrameImpl()
->frameView()->layoutViewItem(); |
| 6677 EXPECT_EQ(320, layoutView->logicalWidth().floor()); | 6677 EXPECT_EQ(320, layoutViewItem.logicalWidth().floor()); |
| 6678 EXPECT_EQ(533, layoutView->logicalHeight().floor()); | 6678 EXPECT_EQ(533, layoutViewItem.logicalHeight().floor()); |
| 6679 EXPECT_FLOAT_EQ(1.2, webViewImpl->pageScaleFactor()); | 6679 EXPECT_FLOAT_EQ(1.2, webViewImpl->pageScaleFactor()); |
| 6680 EXPECT_FLOAT_EQ(1.2, webViewImpl->minimumPageScaleFactor()); | 6680 EXPECT_FLOAT_EQ(1.2, webViewImpl->minimumPageScaleFactor()); |
| 6681 EXPECT_FLOAT_EQ(5.0, webViewImpl->maximumPageScaleFactor()); | 6681 EXPECT_FLOAT_EQ(5.0, webViewImpl->maximumPageScaleFactor()); |
| 6682 | 6682 |
| 6683 Document* document = toWebLocalFrameImpl(webViewImpl->mainFrame())->frame()-
>document(); | 6683 Document* document = toWebLocalFrameImpl(webViewImpl->mainFrame())->frame()-
>document(); |
| 6684 UserGestureIndicator gesture(DefinitelyProcessingUserGesture); | 6684 UserGestureIndicator gesture(DefinitelyProcessingUserGesture); |
| 6685 Fullscreen::from(*document).requestFullscreen(*document->documentElement(),
Fullscreen::PrefixedRequest); | 6685 Fullscreen::from(*document).requestFullscreen(*document->documentElement(),
Fullscreen::PrefixedRequest); |
| 6686 webViewImpl->didEnterFullScreen(); | 6686 webViewImpl->didEnterFullScreen(); |
| 6687 webViewImpl->updateAllLifecyclePhases(); | 6687 webViewImpl->updateAllLifecyclePhases(); |
| 6688 EXPECT_EQ(384, layoutView->logicalWidth().floor()); | 6688 EXPECT_EQ(384, layoutViewItem.logicalWidth().floor()); |
| 6689 EXPECT_EQ(640, layoutView->logicalHeight().floor()); | 6689 EXPECT_EQ(640, layoutViewItem.logicalHeight().floor()); |
| 6690 EXPECT_FLOAT_EQ(1.0, webViewImpl->pageScaleFactor()); | 6690 EXPECT_FLOAT_EQ(1.0, webViewImpl->pageScaleFactor()); |
| 6691 EXPECT_FLOAT_EQ(1.0, webViewImpl->minimumPageScaleFactor()); | 6691 EXPECT_FLOAT_EQ(1.0, webViewImpl->minimumPageScaleFactor()); |
| 6692 EXPECT_FLOAT_EQ(1.0, webViewImpl->maximumPageScaleFactor()); | 6692 EXPECT_FLOAT_EQ(1.0, webViewImpl->maximumPageScaleFactor()); |
| 6693 | 6693 |
| 6694 webViewImpl->didExitFullScreen(); | 6694 webViewImpl->didExitFullScreen(); |
| 6695 webViewImpl->updateAllLifecyclePhases(); | 6695 webViewImpl->updateAllLifecyclePhases(); |
| 6696 EXPECT_EQ(320, layoutView->logicalWidth().floor()); | 6696 EXPECT_EQ(320, layoutViewItem.logicalWidth().floor()); |
| 6697 EXPECT_EQ(533, layoutView->logicalHeight().floor()); | 6697 EXPECT_EQ(533, layoutViewItem.logicalHeight().floor()); |
| 6698 EXPECT_FLOAT_EQ(1.2, webViewImpl->pageScaleFactor()); | 6698 EXPECT_FLOAT_EQ(1.2, webViewImpl->pageScaleFactor()); |
| 6699 EXPECT_FLOAT_EQ(1.2, webViewImpl->minimumPageScaleFactor()); | 6699 EXPECT_FLOAT_EQ(1.2, webViewImpl->minimumPageScaleFactor()); |
| 6700 EXPECT_FLOAT_EQ(5.0, webViewImpl->maximumPageScaleFactor()); | 6700 EXPECT_FLOAT_EQ(5.0, webViewImpl->maximumPageScaleFactor()); |
| 6701 } | 6701 } |
| 6702 | 6702 |
| 6703 TEST_P(ParameterizedWebFrameTest, FullscreenResizeWithTinyViewport) | 6703 TEST_P(ParameterizedWebFrameTest, FullscreenResizeWithTinyViewport) |
| 6704 { | 6704 { |
| 6705 FakeCompositingWebViewClient client; | 6705 FakeCompositingWebViewClient client; |
| 6706 registerMockedHttpURLLoad("viewport-tiny.html"); | 6706 registerMockedHttpURLLoad("viewport-tiny.html"); |
| 6707 FrameTestHelpers::WebViewHelper webViewHelper(this); | 6707 FrameTestHelpers::WebViewHelper webViewHelper(this); |
| 6708 WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad(m_baseURL + "view
port-tiny.html", true, nullptr, &client, nullptr, configureAndroid); | 6708 WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad(m_baseURL + "view
port-tiny.html", true, nullptr, &client, nullptr, configureAndroid); |
| 6709 int viewportWidth = 384; | 6709 int viewportWidth = 384; |
| 6710 int viewportHeight = 640; | 6710 int viewportHeight = 640; |
| 6711 client.m_screenInfo.rect.width = viewportWidth; | 6711 client.m_screenInfo.rect.width = viewportWidth; |
| 6712 client.m_screenInfo.rect.height = viewportHeight; | 6712 client.m_screenInfo.rect.height = viewportHeight; |
| 6713 webViewHelper.resize(WebSize(viewportWidth, viewportHeight)); | 6713 webViewHelper.resize(WebSize(viewportWidth, viewportHeight)); |
| 6714 webViewImpl->updateAllLifecyclePhases(); | 6714 webViewImpl->updateAllLifecyclePhases(); |
| 6715 | 6715 |
| 6716 LayoutView* layoutView = webViewHelper.webViewImpl()->mainFrameImpl()->frame
View()->layoutView(); | 6716 LayoutViewItem layoutViewItem = webViewHelper.webViewImpl()->mainFrameImpl()
->frameView()->layoutViewItem(); |
| 6717 Document* document = toWebLocalFrameImpl(webViewImpl->mainFrame())->frame()-
>document(); | 6717 Document* document = toWebLocalFrameImpl(webViewImpl->mainFrame())->frame()-
>document(); |
| 6718 UserGestureIndicator gesture(DefinitelyProcessingUserGesture); | 6718 UserGestureIndicator gesture(DefinitelyProcessingUserGesture); |
| 6719 Fullscreen::from(*document).requestFullscreen(*document->documentElement(),
Fullscreen::PrefixedRequest); | 6719 Fullscreen::from(*document).requestFullscreen(*document->documentElement(),
Fullscreen::PrefixedRequest); |
| 6720 webViewImpl->didEnterFullScreen(); | 6720 webViewImpl->didEnterFullScreen(); |
| 6721 webViewImpl->updateAllLifecyclePhases(); | 6721 webViewImpl->updateAllLifecyclePhases(); |
| 6722 EXPECT_EQ(384, layoutView->logicalWidth().floor()); | 6722 EXPECT_EQ(384, layoutViewItem.logicalWidth().floor()); |
| 6723 EXPECT_EQ(640, layoutView->logicalHeight().floor()); | 6723 EXPECT_EQ(640, layoutViewItem.logicalHeight().floor()); |
| 6724 EXPECT_FLOAT_EQ(1.0, webViewImpl->pageScaleFactor()); | 6724 EXPECT_FLOAT_EQ(1.0, webViewImpl->pageScaleFactor()); |
| 6725 EXPECT_FLOAT_EQ(1.0, webViewImpl->minimumPageScaleFactor()); | 6725 EXPECT_FLOAT_EQ(1.0, webViewImpl->minimumPageScaleFactor()); |
| 6726 EXPECT_FLOAT_EQ(1.0, webViewImpl->maximumPageScaleFactor()); | 6726 EXPECT_FLOAT_EQ(1.0, webViewImpl->maximumPageScaleFactor()); |
| 6727 | 6727 |
| 6728 viewportWidth = 640; | 6728 viewportWidth = 640; |
| 6729 viewportHeight = 384; | 6729 viewportHeight = 384; |
| 6730 client.m_screenInfo.rect.width = viewportWidth; | 6730 client.m_screenInfo.rect.width = viewportWidth; |
| 6731 client.m_screenInfo.rect.height = viewportHeight; | 6731 client.m_screenInfo.rect.height = viewportHeight; |
| 6732 webViewHelper.resize(WebSize(viewportWidth, viewportHeight)); | 6732 webViewHelper.resize(WebSize(viewportWidth, viewportHeight)); |
| 6733 webViewImpl->updateAllLifecyclePhases(); | 6733 webViewImpl->updateAllLifecyclePhases(); |
| 6734 EXPECT_EQ(640, layoutView->logicalWidth().floor()); | 6734 EXPECT_EQ(640, layoutViewItem.logicalWidth().floor()); |
| 6735 EXPECT_EQ(384, layoutView->logicalHeight().floor()); | 6735 EXPECT_EQ(384, layoutViewItem.logicalHeight().floor()); |
| 6736 EXPECT_FLOAT_EQ(1.0, webViewImpl->pageScaleFactor()); | 6736 EXPECT_FLOAT_EQ(1.0, webViewImpl->pageScaleFactor()); |
| 6737 EXPECT_FLOAT_EQ(1.0, webViewImpl->minimumPageScaleFactor()); | 6737 EXPECT_FLOAT_EQ(1.0, webViewImpl->minimumPageScaleFactor()); |
| 6738 EXPECT_FLOAT_EQ(1.0, webViewImpl->maximumPageScaleFactor()); | 6738 EXPECT_FLOAT_EQ(1.0, webViewImpl->maximumPageScaleFactor()); |
| 6739 | 6739 |
| 6740 webViewImpl->didExitFullScreen(); | 6740 webViewImpl->didExitFullScreen(); |
| 6741 webViewImpl->updateAllLifecyclePhases(); | 6741 webViewImpl->updateAllLifecyclePhases(); |
| 6742 EXPECT_EQ(320, layoutView->logicalWidth().floor()); | 6742 EXPECT_EQ(320, layoutViewItem.logicalWidth().floor()); |
| 6743 EXPECT_EQ(192, layoutView->logicalHeight().floor()); | 6743 EXPECT_EQ(192, layoutViewItem.logicalHeight().floor()); |
| 6744 EXPECT_FLOAT_EQ(2, webViewImpl->pageScaleFactor()); | 6744 EXPECT_FLOAT_EQ(2, webViewImpl->pageScaleFactor()); |
| 6745 EXPECT_FLOAT_EQ(2, webViewImpl->minimumPageScaleFactor()); | 6745 EXPECT_FLOAT_EQ(2, webViewImpl->minimumPageScaleFactor()); |
| 6746 EXPECT_FLOAT_EQ(5.0, webViewImpl->maximumPageScaleFactor()); | 6746 EXPECT_FLOAT_EQ(5.0, webViewImpl->maximumPageScaleFactor()); |
| 6747 } | 6747 } |
| 6748 | 6748 |
| 6749 TEST_P(ParameterizedWebFrameTest, FullscreenRestoreScaleFactorUponExiting) | 6749 TEST_P(ParameterizedWebFrameTest, FullscreenRestoreScaleFactorUponExiting) |
| 6750 { | 6750 { |
| 6751 // The purpose of this test is to more precisely simulate the sequence of | 6751 // The purpose of this test is to more precisely simulate the sequence of |
| 6752 // resize and switching fullscreen state operations on WebView, with the | 6752 // resize and switching fullscreen state operations on WebView, with the |
| 6753 // interference from Android status bars like a real device does. | 6753 // interference from Android status bars like a real device does. |
| 6754 // This verifies we handle the transition and restore states correctly. | 6754 // This verifies we handle the transition and restore states correctly. |
| 6755 WebSize screenSizeMinusStatusBarsMinusUrlBar(598, 303); | 6755 WebSize screenSizeMinusStatusBarsMinusUrlBar(598, 303); |
| 6756 WebSize screenSizeMinusStatusBars(598, 359); | 6756 WebSize screenSizeMinusStatusBars(598, 359); |
| 6757 WebSize screenSize(640, 384); | 6757 WebSize screenSize(640, 384); |
| 6758 | 6758 |
| 6759 FakeCompositingWebViewClient client; | 6759 FakeCompositingWebViewClient client; |
| 6760 registerMockedHttpURLLoad("fullscreen_restore_scale_factor.html"); | 6760 registerMockedHttpURLLoad("fullscreen_restore_scale_factor.html"); |
| 6761 FrameTestHelpers::WebViewHelper webViewHelper(this); | 6761 FrameTestHelpers::WebViewHelper webViewHelper(this); |
| 6762 WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad(m_baseURL + "full
screen_restore_scale_factor.html", true, nullptr, &client, nullptr, &configureAn
droid); | 6762 WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad(m_baseURL + "full
screen_restore_scale_factor.html", true, nullptr, &client, nullptr, &configureAn
droid); |
| 6763 client.m_screenInfo.rect.width = screenSizeMinusStatusBarsMinusUrlBar.width; | 6763 client.m_screenInfo.rect.width = screenSizeMinusStatusBarsMinusUrlBar.width; |
| 6764 client.m_screenInfo.rect.height = screenSizeMinusStatusBarsMinusUrlBar.heigh
t; | 6764 client.m_screenInfo.rect.height = screenSizeMinusStatusBarsMinusUrlBar.heigh
t; |
| 6765 webViewHelper.resize(screenSizeMinusStatusBarsMinusUrlBar); | 6765 webViewHelper.resize(screenSizeMinusStatusBarsMinusUrlBar); |
| 6766 LayoutView* layoutView = webViewHelper.webViewImpl()->mainFrameImpl()->frame
View()->layoutView(); | 6766 LayoutViewItem layoutViewItem = webViewHelper.webViewImpl()->mainFrameImpl()
->frameView()->layoutViewItem(); |
| 6767 EXPECT_EQ(screenSizeMinusStatusBarsMinusUrlBar.width, layoutView->logicalWid
th().floor()); | 6767 EXPECT_EQ(screenSizeMinusStatusBarsMinusUrlBar.width, layoutViewItem.logical
Width().floor()); |
| 6768 EXPECT_EQ(screenSizeMinusStatusBarsMinusUrlBar.height, layoutView->logicalHe
ight().floor()); | 6768 EXPECT_EQ(screenSizeMinusStatusBarsMinusUrlBar.height, layoutViewItem.logica
lHeight().floor()); |
| 6769 EXPECT_FLOAT_EQ(1.0, webViewImpl->pageScaleFactor()); | 6769 EXPECT_FLOAT_EQ(1.0, webViewImpl->pageScaleFactor()); |
| 6770 EXPECT_FLOAT_EQ(1.0, webViewImpl->minimumPageScaleFactor()); | 6770 EXPECT_FLOAT_EQ(1.0, webViewImpl->minimumPageScaleFactor()); |
| 6771 EXPECT_FLOAT_EQ(5.0, webViewImpl->maximumPageScaleFactor()); | 6771 EXPECT_FLOAT_EQ(5.0, webViewImpl->maximumPageScaleFactor()); |
| 6772 | 6772 |
| 6773 { | 6773 { |
| 6774 Document* document = toWebLocalFrameImpl(webViewImpl->mainFrame())->fram
e()->document(); | 6774 Document* document = toWebLocalFrameImpl(webViewImpl->mainFrame())->fram
e()->document(); |
| 6775 UserGestureIndicator gesture(DefinitelyProcessingUserGesture); | 6775 UserGestureIndicator gesture(DefinitelyProcessingUserGesture); |
| 6776 Fullscreen::from(*document).requestFullscreen(*document->body(), Fullscr
een::PrefixedRequest); | 6776 Fullscreen::from(*document).requestFullscreen(*document->body(), Fullscr
een::PrefixedRequest); |
| 6777 } | 6777 } |
| 6778 | 6778 |
| 6779 webViewImpl->didEnterFullScreen(); | 6779 webViewImpl->didEnterFullScreen(); |
| 6780 webViewImpl->updateAllLifecyclePhases(); | 6780 webViewImpl->updateAllLifecyclePhases(); |
| 6781 client.m_screenInfo.rect.width = screenSizeMinusStatusBars.width; | 6781 client.m_screenInfo.rect.width = screenSizeMinusStatusBars.width; |
| 6782 client.m_screenInfo.rect.height = screenSizeMinusStatusBars.height; | 6782 client.m_screenInfo.rect.height = screenSizeMinusStatusBars.height; |
| 6783 webViewHelper.resize(screenSizeMinusStatusBars); | 6783 webViewHelper.resize(screenSizeMinusStatusBars); |
| 6784 client.m_screenInfo.rect.width = screenSize.width; | 6784 client.m_screenInfo.rect.width = screenSize.width; |
| 6785 client.m_screenInfo.rect.height = screenSize.height; | 6785 client.m_screenInfo.rect.height = screenSize.height; |
| 6786 webViewHelper.resize(screenSize); | 6786 webViewHelper.resize(screenSize); |
| 6787 EXPECT_EQ(screenSize.width, layoutView->logicalWidth().floor()); | 6787 EXPECT_EQ(screenSize.width, layoutViewItem.logicalWidth().floor()); |
| 6788 EXPECT_EQ(screenSize.height, layoutView->logicalHeight().floor()); | 6788 EXPECT_EQ(screenSize.height, layoutViewItem.logicalHeight().floor()); |
| 6789 EXPECT_FLOAT_EQ(1.0, webViewImpl->pageScaleFactor()); | 6789 EXPECT_FLOAT_EQ(1.0, webViewImpl->pageScaleFactor()); |
| 6790 EXPECT_FLOAT_EQ(1.0, webViewImpl->minimumPageScaleFactor()); | 6790 EXPECT_FLOAT_EQ(1.0, webViewImpl->minimumPageScaleFactor()); |
| 6791 EXPECT_FLOAT_EQ(1.0, webViewImpl->maximumPageScaleFactor()); | 6791 EXPECT_FLOAT_EQ(1.0, webViewImpl->maximumPageScaleFactor()); |
| 6792 | 6792 |
| 6793 webViewImpl->didExitFullScreen(); | 6793 webViewImpl->didExitFullScreen(); |
| 6794 webViewImpl->updateAllLifecyclePhases(); | 6794 webViewImpl->updateAllLifecyclePhases(); |
| 6795 client.m_screenInfo.rect.width = screenSizeMinusStatusBars.width; | 6795 client.m_screenInfo.rect.width = screenSizeMinusStatusBars.width; |
| 6796 client.m_screenInfo.rect.height = screenSizeMinusStatusBars.height; | 6796 client.m_screenInfo.rect.height = screenSizeMinusStatusBars.height; |
| 6797 webViewHelper.resize(screenSizeMinusStatusBars); | 6797 webViewHelper.resize(screenSizeMinusStatusBars); |
| 6798 client.m_screenInfo.rect.width = screenSizeMinusStatusBarsMinusUrlBar.width; | 6798 client.m_screenInfo.rect.width = screenSizeMinusStatusBarsMinusUrlBar.width; |
| 6799 client.m_screenInfo.rect.height = screenSizeMinusStatusBarsMinusUrlBar.heigh
t; | 6799 client.m_screenInfo.rect.height = screenSizeMinusStatusBarsMinusUrlBar.heigh
t; |
| 6800 webViewHelper.resize(screenSizeMinusStatusBarsMinusUrlBar); | 6800 webViewHelper.resize(screenSizeMinusStatusBarsMinusUrlBar); |
| 6801 EXPECT_EQ(screenSizeMinusStatusBarsMinusUrlBar.width, layoutView->logicalWid
th().floor()); | 6801 EXPECT_EQ(screenSizeMinusStatusBarsMinusUrlBar.width, layoutViewItem.logical
Width().floor()); |
| 6802 EXPECT_EQ(screenSizeMinusStatusBarsMinusUrlBar.height, layoutView->logicalHe
ight().floor()); | 6802 EXPECT_EQ(screenSizeMinusStatusBarsMinusUrlBar.height, layoutViewItem.logica
lHeight().floor()); |
| 6803 EXPECT_FLOAT_EQ(1.0, webViewImpl->pageScaleFactor()); | 6803 EXPECT_FLOAT_EQ(1.0, webViewImpl->pageScaleFactor()); |
| 6804 EXPECT_FLOAT_EQ(1.0, webViewImpl->minimumPageScaleFactor()); | 6804 EXPECT_FLOAT_EQ(1.0, webViewImpl->minimumPageScaleFactor()); |
| 6805 EXPECT_FLOAT_EQ(5.0, webViewImpl->maximumPageScaleFactor()); | 6805 EXPECT_FLOAT_EQ(5.0, webViewImpl->maximumPageScaleFactor()); |
| 6806 } | 6806 } |
| 6807 | 6807 |
| 6808 TEST_P(ParameterizedWebFrameTest, LayoutBlockPercentHeightDescendants) | 6808 TEST_P(ParameterizedWebFrameTest, LayoutBlockPercentHeightDescendants) |
| 6809 { | 6809 { |
| 6810 registerMockedHttpURLLoad("percent-height-descendants.html"); | 6810 registerMockedHttpURLLoad("percent-height-descendants.html"); |
| 6811 FrameTestHelpers::WebViewHelper webViewHelper(this); | 6811 FrameTestHelpers::WebViewHelper webViewHelper(this); |
| 6812 webViewHelper.initializeAndLoad(m_baseURL + "percent-height-descendants.html
"); | 6812 webViewHelper.initializeAndLoad(m_baseURL + "percent-height-descendants.html
"); |
| (...skipping 1871 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8684 WebLocalFrame* mainFrame = helper.webView()->mainFrame()->toWebLocalFrame(); | 8684 WebLocalFrame* mainFrame = helper.webView()->mainFrame()->toWebLocalFrame(); |
| 8685 v8::HandleScope scope(v8::Isolate::GetCurrent()); | 8685 v8::HandleScope scope(v8::Isolate::GetCurrent()); |
| 8686 mainFrame->executeScript(WebScriptSource("hello = 'world';")); | 8686 mainFrame->executeScript(WebScriptSource("hello = 'world';")); |
| 8687 FrameTestHelpers::loadFrame(mainFrame, "data:text/html,new page"); | 8687 FrameTestHelpers::loadFrame(mainFrame, "data:text/html,new page"); |
| 8688 v8::Local<v8::Value> result = mainFrame->executeScriptAndReturnValue(WebScri
ptSource("hello")); | 8688 v8::Local<v8::Value> result = mainFrame->executeScriptAndReturnValue(WebScri
ptSource("hello")); |
| 8689 ASSERT_TRUE(result->IsString()); | 8689 ASSERT_TRUE(result->IsString()); |
| 8690 EXPECT_EQ("world", toCoreString(result->ToString(mainFrame->mainWorldScriptC
ontext()).ToLocalChecked())); | 8690 EXPECT_EQ("world", toCoreString(result->ToString(mainFrame->mainWorldScriptC
ontext()).ToLocalChecked())); |
| 8691 } | 8691 } |
| 8692 | 8692 |
| 8693 } // namespace blink | 8693 } // namespace blink |
| OLD | NEW |