| 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 6419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6430 int viewportHeight = 480; | 6430 int viewportHeight = 480; |
| 6431 client.m_screenInfo.rect.width = viewportWidth; | 6431 client.m_screenInfo.rect.width = viewportWidth; |
| 6432 client.m_screenInfo.rect.height = viewportHeight; | 6432 client.m_screenInfo.rect.height = viewportHeight; |
| 6433 WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad(m_baseURL + "full
screen_div.html", true, nullptr, &client, nullptr, configureAndroid); | 6433 WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad(m_baseURL + "full
screen_div.html", true, nullptr, &client, nullptr, configureAndroid); |
| 6434 webViewHelper.resize(WebSize(viewportWidth, viewportHeight)); | 6434 webViewHelper.resize(WebSize(viewportWidth, viewportHeight)); |
| 6435 webViewImpl->updateAllLifecyclePhases(); | 6435 webViewImpl->updateAllLifecyclePhases(); |
| 6436 | 6436 |
| 6437 Document* document = webViewImpl->mainFrameImpl()->frame()->document(); | 6437 Document* document = webViewImpl->mainFrameImpl()->frame()->document(); |
| 6438 UserGestureIndicator gesture(DefinitelyProcessingUserGesture); | 6438 UserGestureIndicator gesture(DefinitelyProcessingUserGesture); |
| 6439 Element* divFullscreen = document->getElementById("div1"); | 6439 Element* divFullscreen = document->getElementById("div1"); |
| 6440 Fullscreen::from(*document).requestFullscreen(*divFullscreen, Fullscreen::Pr
efixedRequest); | 6440 Fullscreen::requestFullscreen(*divFullscreen, Fullscreen::PrefixedRequest); |
| 6441 webViewImpl->didEnterFullscreen(); | 6441 webViewImpl->didEnterFullscreen(); |
| 6442 webViewImpl->updateAllLifecyclePhases(); | 6442 webViewImpl->updateAllLifecyclePhases(); |
| 6443 EXPECT_EQ(Fullscreen::currentFullScreenElementFrom(*document), divFullscreen
); | 6443 EXPECT_EQ(Fullscreen::currentFullScreenElementFrom(*document), divFullscreen
); |
| 6444 | 6444 |
| 6445 // Verify that the element is sized to the viewport. | 6445 // Verify that the element is sized to the viewport. |
| 6446 LayoutFullScreen* fullscreenLayoutObject = Fullscreen::from(*document).fullS
creenLayoutObject(); | 6446 LayoutFullScreen* fullscreenLayoutObject = Fullscreen::from(*document).fullS
creenLayoutObject(); |
| 6447 EXPECT_EQ(viewportWidth, fullscreenLayoutObject->logicalWidth().toInt()); | 6447 EXPECT_EQ(viewportWidth, fullscreenLayoutObject->logicalWidth().toInt()); |
| 6448 EXPECT_EQ(viewportHeight, fullscreenLayoutObject->logicalHeight().toInt()); | 6448 EXPECT_EQ(viewportHeight, fullscreenLayoutObject->logicalHeight().toInt()); |
| 6449 | 6449 |
| 6450 // Verify it's updated after a device rotation. | 6450 // Verify it's updated after a device rotation. |
| (...skipping 12 matching lines...) Expand all Loading... |
| 6463 FrameTestHelpers::WebViewHelper webViewHelper; | 6463 FrameTestHelpers::WebViewHelper webViewHelper; |
| 6464 int viewportWidth = 640; | 6464 int viewportWidth = 640; |
| 6465 int viewportHeight = 480; | 6465 int viewportHeight = 480; |
| 6466 WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad(m_baseURL + "full
screen_div.html", true, nullptr, &client, nullptr, configureAndroid); | 6466 WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad(m_baseURL + "full
screen_div.html", true, nullptr, &client, nullptr, configureAndroid); |
| 6467 webViewHelper.resize(WebSize(viewportWidth, viewportHeight)); | 6467 webViewHelper.resize(WebSize(viewportWidth, viewportHeight)); |
| 6468 webViewImpl->updateAllLifecyclePhases(); | 6468 webViewImpl->updateAllLifecyclePhases(); |
| 6469 | 6469 |
| 6470 Document* document = webViewImpl->mainFrameImpl()->frame()->document(); | 6470 Document* document = webViewImpl->mainFrameImpl()->frame()->document(); |
| 6471 UserGestureIndicator gesture(DefinitelyProcessingUserGesture); | 6471 UserGestureIndicator gesture(DefinitelyProcessingUserGesture); |
| 6472 Element* divFullscreen = document->getElementById("div1"); | 6472 Element* divFullscreen = document->getElementById("div1"); |
| 6473 Fullscreen::from(*document).requestFullscreen(*divFullscreen, Fullscreen::Pr
efixedRequest); | 6473 Fullscreen::requestFullscreen(*divFullscreen, Fullscreen::PrefixedRequest); |
| 6474 webViewImpl->didEnterFullscreen(); | 6474 webViewImpl->didEnterFullscreen(); |
| 6475 webViewImpl->updateAllLifecyclePhases(); | 6475 webViewImpl->updateAllLifecyclePhases(); |
| 6476 | 6476 |
| 6477 // Verify that the viewports are nonscrollable. | 6477 // Verify that the viewports are nonscrollable. |
| 6478 EXPECT_EQ(Fullscreen::currentFullScreenElementFrom(*document), divFullscreen
); | 6478 EXPECT_EQ(Fullscreen::currentFullScreenElementFrom(*document), divFullscreen
); |
| 6479 FrameView* frameView = webViewHelper.webView()->mainFrameImpl()->frameView()
; | 6479 FrameView* frameView = webViewHelper.webView()->mainFrameImpl()->frameView()
; |
| 6480 WebLayer* layoutViewportScrollLayer = webViewImpl->compositor()->scrollLayer
()->platformLayer(); | 6480 WebLayer* layoutViewportScrollLayer = webViewImpl->compositor()->scrollLayer
()->platformLayer(); |
| 6481 WebLayer* visualViewportScrollLayer = frameView->page()->frameHost().visualV
iewport().scrollLayer()->platformLayer(); | 6481 WebLayer* visualViewportScrollLayer = frameView->page()->frameHost().visualV
iewport().scrollLayer()->platformLayer(); |
| 6482 ASSERT_FALSE(layoutViewportScrollLayer->userScrollableHorizontal()); | 6482 ASSERT_FALSE(layoutViewportScrollLayer->userScrollableHorizontal()); |
| 6483 ASSERT_FALSE(layoutViewportScrollLayer->userScrollableVertical()); | 6483 ASSERT_FALSE(layoutViewportScrollLayer->userScrollableVertical()); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 6500 registerMockedHttpURLLoad("fullscreen_div.html"); | 6500 registerMockedHttpURLLoad("fullscreen_div.html"); |
| 6501 FrameTestHelpers::WebViewHelper webViewHelper; | 6501 FrameTestHelpers::WebViewHelper webViewHelper; |
| 6502 int viewportWidth = 640; | 6502 int viewportWidth = 640; |
| 6503 int viewportHeight = 480; | 6503 int viewportHeight = 480; |
| 6504 WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad(m_baseURL + "full
screen_div.html", true, nullptr, &client, nullptr, configureAndroid); | 6504 WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad(m_baseURL + "full
screen_div.html", true, nullptr, &client, nullptr, configureAndroid); |
| 6505 webViewHelper.resize(WebSize(viewportWidth, viewportHeight)); | 6505 webViewHelper.resize(WebSize(viewportWidth, viewportHeight)); |
| 6506 webViewImpl->updateAllLifecyclePhases(); | 6506 webViewImpl->updateAllLifecyclePhases(); |
| 6507 | 6507 |
| 6508 Document* document = webViewImpl->mainFrameImpl()->frame()->document(); | 6508 Document* document = webViewImpl->mainFrameImpl()->frame()->document(); |
| 6509 UserGestureIndicator gesture(DefinitelyProcessingUserGesture); | 6509 UserGestureIndicator gesture(DefinitelyProcessingUserGesture); |
| 6510 Fullscreen::from(*document).requestFullscreen(*document->documentElement(),
Fullscreen::PrefixedRequest); | 6510 Fullscreen::requestFullscreen(*document->documentElement(), Fullscreen::Pref
ixedRequest); |
| 6511 webViewImpl->didEnterFullscreen(); | 6511 webViewImpl->didEnterFullscreen(); |
| 6512 webViewImpl->updateAllLifecyclePhases(); | 6512 webViewImpl->updateAllLifecyclePhases(); |
| 6513 | 6513 |
| 6514 // Verify that the main frame is still scrollable. | 6514 // Verify that the main frame is still scrollable. |
| 6515 EXPECT_EQ(Fullscreen::currentFullScreenElementFrom(*document), document->doc
umentElement()); | 6515 EXPECT_EQ(Fullscreen::currentFullScreenElementFrom(*document), document->doc
umentElement()); |
| 6516 WebLayer* webScrollLayer = webViewImpl->compositor()->scrollLayer()->platfor
mLayer(); | 6516 WebLayer* webScrollLayer = webViewImpl->compositor()->scrollLayer()->platfor
mLayer(); |
| 6517 ASSERT_TRUE(webScrollLayer->scrollable()); | 6517 ASSERT_TRUE(webScrollLayer->scrollable()); |
| 6518 ASSERT_TRUE(webScrollLayer->userScrollableHorizontal()); | 6518 ASSERT_TRUE(webScrollLayer->userScrollableHorizontal()); |
| 6519 ASSERT_TRUE(webScrollLayer->userScrollableVertical()); | 6519 ASSERT_TRUE(webScrollLayer->userScrollableVertical()); |
| 6520 | 6520 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 6535 int viewportWidth = 640; | 6535 int viewportWidth = 640; |
| 6536 int viewportHeight = 480; | 6536 int viewportHeight = 480; |
| 6537 client.m_screenInfo.rect.width = viewportWidth; | 6537 client.m_screenInfo.rect.width = viewportWidth; |
| 6538 client.m_screenInfo.rect.height = viewportHeight; | 6538 client.m_screenInfo.rect.height = viewportHeight; |
| 6539 webViewHelper.resize(WebSize(viewportWidth, viewportHeight)); | 6539 webViewHelper.resize(WebSize(viewportWidth, viewportHeight)); |
| 6540 webViewImpl->updateAllLifecyclePhases(); | 6540 webViewImpl->updateAllLifecyclePhases(); |
| 6541 | 6541 |
| 6542 Document* document = toWebLocalFrameImpl(webViewHelper.webView()->mainFrame(
)->firstChild())->frame()->document(); | 6542 Document* document = toWebLocalFrameImpl(webViewHelper.webView()->mainFrame(
)->firstChild())->frame()->document(); |
| 6543 UserGestureIndicator gesture(DefinitelyProcessingUserGesture); | 6543 UserGestureIndicator gesture(DefinitelyProcessingUserGesture); |
| 6544 Element* divFullscreen = document->getElementById("div1"); | 6544 Element* divFullscreen = document->getElementById("div1"); |
| 6545 Fullscreen::from(*document).requestFullscreen(*divFullscreen, Fullscreen::Pr
efixedRequest); | 6545 Fullscreen::requestFullscreen(*divFullscreen, Fullscreen::PrefixedRequest); |
| 6546 webViewImpl->didEnterFullscreen(); | 6546 webViewImpl->didEnterFullscreen(); |
| 6547 webViewImpl->updateAllLifecyclePhases(); | 6547 webViewImpl->updateAllLifecyclePhases(); |
| 6548 | 6548 |
| 6549 // Verify that the element is sized to the viewport. | 6549 // Verify that the element is sized to the viewport. |
| 6550 LayoutFullScreen* fullscreenLayoutObject = Fullscreen::from(*document).fullS
creenLayoutObject(); | 6550 LayoutFullScreen* fullscreenLayoutObject = Fullscreen::from(*document).fullS
creenLayoutObject(); |
| 6551 EXPECT_EQ(viewportWidth, fullscreenLayoutObject->logicalWidth().toInt()); | 6551 EXPECT_EQ(viewportWidth, fullscreenLayoutObject->logicalWidth().toInt()); |
| 6552 EXPECT_EQ(viewportHeight, fullscreenLayoutObject->logicalHeight().toInt()); | 6552 EXPECT_EQ(viewportHeight, fullscreenLayoutObject->logicalHeight().toInt()); |
| 6553 | 6553 |
| 6554 // Verify it's updated after a device rotation. | 6554 // Verify it's updated after a device rotation. |
| 6555 client.m_screenInfo.rect.width = viewportHeight; | 6555 client.m_screenInfo.rect.width = viewportHeight; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 6575 | 6575 |
| 6576 LayoutViewItem layoutViewItem = webViewHelper.webView()->mainFrameImpl()->fr
ameView()->layoutViewItem(); | 6576 LayoutViewItem layoutViewItem = webViewHelper.webView()->mainFrameImpl()->fr
ameView()->layoutViewItem(); |
| 6577 EXPECT_EQ(320, layoutViewItem.logicalWidth().floor()); | 6577 EXPECT_EQ(320, layoutViewItem.logicalWidth().floor()); |
| 6578 EXPECT_EQ(533, layoutViewItem.logicalHeight().floor()); | 6578 EXPECT_EQ(533, layoutViewItem.logicalHeight().floor()); |
| 6579 EXPECT_FLOAT_EQ(1.2, webViewImpl->pageScaleFactor()); | 6579 EXPECT_FLOAT_EQ(1.2, webViewImpl->pageScaleFactor()); |
| 6580 EXPECT_FLOAT_EQ(1.2, webViewImpl->minimumPageScaleFactor()); | 6580 EXPECT_FLOAT_EQ(1.2, webViewImpl->minimumPageScaleFactor()); |
| 6581 EXPECT_FLOAT_EQ(5.0, webViewImpl->maximumPageScaleFactor()); | 6581 EXPECT_FLOAT_EQ(5.0, webViewImpl->maximumPageScaleFactor()); |
| 6582 | 6582 |
| 6583 Document* document = webViewImpl->mainFrameImpl()->frame()->document(); | 6583 Document* document = webViewImpl->mainFrameImpl()->frame()->document(); |
| 6584 UserGestureIndicator gesture(DefinitelyProcessingUserGesture); | 6584 UserGestureIndicator gesture(DefinitelyProcessingUserGesture); |
| 6585 Fullscreen::from(*document).requestFullscreen(*document->documentElement(),
Fullscreen::PrefixedRequest); | 6585 Fullscreen::requestFullscreen(*document->documentElement(), Fullscreen::Pref
ixedRequest); |
| 6586 webViewImpl->didEnterFullscreen(); | 6586 webViewImpl->didEnterFullscreen(); |
| 6587 webViewImpl->updateAllLifecyclePhases(); | 6587 webViewImpl->updateAllLifecyclePhases(); |
| 6588 EXPECT_EQ(384, layoutViewItem.logicalWidth().floor()); | 6588 EXPECT_EQ(384, layoutViewItem.logicalWidth().floor()); |
| 6589 EXPECT_EQ(640, layoutViewItem.logicalHeight().floor()); | 6589 EXPECT_EQ(640, layoutViewItem.logicalHeight().floor()); |
| 6590 EXPECT_FLOAT_EQ(1.0, webViewImpl->pageScaleFactor()); | 6590 EXPECT_FLOAT_EQ(1.0, webViewImpl->pageScaleFactor()); |
| 6591 EXPECT_FLOAT_EQ(1.0, webViewImpl->minimumPageScaleFactor()); | 6591 EXPECT_FLOAT_EQ(1.0, webViewImpl->minimumPageScaleFactor()); |
| 6592 EXPECT_FLOAT_EQ(1.0, webViewImpl->maximumPageScaleFactor()); | 6592 EXPECT_FLOAT_EQ(1.0, webViewImpl->maximumPageScaleFactor()); |
| 6593 | 6593 |
| 6594 webViewImpl->didExitFullscreen(); | 6594 webViewImpl->didExitFullscreen(); |
| 6595 webViewImpl->updateAllLifecyclePhases(); | 6595 webViewImpl->updateAllLifecyclePhases(); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 6609 int viewportWidth = 384; | 6609 int viewportWidth = 384; |
| 6610 int viewportHeight = 640; | 6610 int viewportHeight = 640; |
| 6611 client.m_screenInfo.rect.width = viewportWidth; | 6611 client.m_screenInfo.rect.width = viewportWidth; |
| 6612 client.m_screenInfo.rect.height = viewportHeight; | 6612 client.m_screenInfo.rect.height = viewportHeight; |
| 6613 webViewHelper.resize(WebSize(viewportWidth, viewportHeight)); | 6613 webViewHelper.resize(WebSize(viewportWidth, viewportHeight)); |
| 6614 webViewImpl->updateAllLifecyclePhases(); | 6614 webViewImpl->updateAllLifecyclePhases(); |
| 6615 | 6615 |
| 6616 LayoutViewItem layoutViewItem = webViewHelper.webView()->mainFrameImpl()->fr
ameView()->layoutViewItem(); | 6616 LayoutViewItem layoutViewItem = webViewHelper.webView()->mainFrameImpl()->fr
ameView()->layoutViewItem(); |
| 6617 Document* document = webViewImpl->mainFrameImpl()->frame()->document(); | 6617 Document* document = webViewImpl->mainFrameImpl()->frame()->document(); |
| 6618 UserGestureIndicator gesture(DefinitelyProcessingUserGesture); | 6618 UserGestureIndicator gesture(DefinitelyProcessingUserGesture); |
| 6619 Fullscreen::from(*document).requestFullscreen(*document->documentElement(),
Fullscreen::PrefixedRequest); | 6619 Fullscreen::requestFullscreen(*document->documentElement(), Fullscreen::Pref
ixedRequest); |
| 6620 webViewImpl->didEnterFullscreen(); | 6620 webViewImpl->didEnterFullscreen(); |
| 6621 webViewImpl->updateAllLifecyclePhases(); | 6621 webViewImpl->updateAllLifecyclePhases(); |
| 6622 EXPECT_EQ(384, layoutViewItem.logicalWidth().floor()); | 6622 EXPECT_EQ(384, layoutViewItem.logicalWidth().floor()); |
| 6623 EXPECT_EQ(640, layoutViewItem.logicalHeight().floor()); | 6623 EXPECT_EQ(640, layoutViewItem.logicalHeight().floor()); |
| 6624 EXPECT_FLOAT_EQ(1.0, webViewImpl->pageScaleFactor()); | 6624 EXPECT_FLOAT_EQ(1.0, webViewImpl->pageScaleFactor()); |
| 6625 EXPECT_FLOAT_EQ(1.0, webViewImpl->minimumPageScaleFactor()); | 6625 EXPECT_FLOAT_EQ(1.0, webViewImpl->minimumPageScaleFactor()); |
| 6626 EXPECT_FLOAT_EQ(1.0, webViewImpl->maximumPageScaleFactor()); | 6626 EXPECT_FLOAT_EQ(1.0, webViewImpl->maximumPageScaleFactor()); |
| 6627 | 6627 |
| 6628 viewportWidth = 640; | 6628 viewportWidth = 640; |
| 6629 viewportHeight = 384; | 6629 viewportHeight = 384; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6666 LayoutViewItem layoutViewItem = webViewHelper.webView()->mainFrameImpl()->fr
ameView()->layoutViewItem(); | 6666 LayoutViewItem layoutViewItem = webViewHelper.webView()->mainFrameImpl()->fr
ameView()->layoutViewItem(); |
| 6667 EXPECT_EQ(screenSizeMinusStatusBarsMinusUrlBar.width, layoutViewItem.logical
Width().floor()); | 6667 EXPECT_EQ(screenSizeMinusStatusBarsMinusUrlBar.width, layoutViewItem.logical
Width().floor()); |
| 6668 EXPECT_EQ(screenSizeMinusStatusBarsMinusUrlBar.height, layoutViewItem.logica
lHeight().floor()); | 6668 EXPECT_EQ(screenSizeMinusStatusBarsMinusUrlBar.height, layoutViewItem.logica
lHeight().floor()); |
| 6669 EXPECT_FLOAT_EQ(1.0, webViewImpl->pageScaleFactor()); | 6669 EXPECT_FLOAT_EQ(1.0, webViewImpl->pageScaleFactor()); |
| 6670 EXPECT_FLOAT_EQ(1.0, webViewImpl->minimumPageScaleFactor()); | 6670 EXPECT_FLOAT_EQ(1.0, webViewImpl->minimumPageScaleFactor()); |
| 6671 EXPECT_FLOAT_EQ(5.0, webViewImpl->maximumPageScaleFactor()); | 6671 EXPECT_FLOAT_EQ(5.0, webViewImpl->maximumPageScaleFactor()); |
| 6672 | 6672 |
| 6673 { | 6673 { |
| 6674 Document* document = webViewImpl->mainFrameImpl()->frame()->document(); | 6674 Document* document = webViewImpl->mainFrameImpl()->frame()->document(); |
| 6675 UserGestureIndicator gesture(DefinitelyProcessingUserGesture); | 6675 UserGestureIndicator gesture(DefinitelyProcessingUserGesture); |
| 6676 Fullscreen::from(*document).requestFullscreen(*document->body(), Fullscr
een::PrefixedRequest); | 6676 Fullscreen::requestFullscreen(*document->body(), Fullscreen::PrefixedReq
uest); |
| 6677 } | 6677 } |
| 6678 | 6678 |
| 6679 webViewImpl->didEnterFullscreen(); | 6679 webViewImpl->didEnterFullscreen(); |
| 6680 webViewImpl->updateAllLifecyclePhases(); | 6680 webViewImpl->updateAllLifecyclePhases(); |
| 6681 client.m_screenInfo.rect.width = screenSizeMinusStatusBars.width; | 6681 client.m_screenInfo.rect.width = screenSizeMinusStatusBars.width; |
| 6682 client.m_screenInfo.rect.height = screenSizeMinusStatusBars.height; | 6682 client.m_screenInfo.rect.height = screenSizeMinusStatusBars.height; |
| 6683 webViewHelper.resize(screenSizeMinusStatusBars); | 6683 webViewHelper.resize(screenSizeMinusStatusBars); |
| 6684 client.m_screenInfo.rect.width = screenSize.width; | 6684 client.m_screenInfo.rect.width = screenSize.width; |
| 6685 client.m_screenInfo.rect.height = screenSize.height; | 6685 client.m_screenInfo.rect.height = screenSize.height; |
| 6686 webViewHelper.resize(screenSize); | 6686 webViewHelper.resize(screenSize); |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6731 webViewImpl->mainFrameImpl()->frameView()->layoutViewItem(); | 6731 webViewImpl->mainFrameImpl()->frameView()->layoutViewItem(); |
| 6732 EXPECT_EQ(320, layoutViewItem.logicalWidth().floor()); | 6732 EXPECT_EQ(320, layoutViewItem.logicalWidth().floor()); |
| 6733 EXPECT_EQ(640, layoutViewItem.logicalHeight().floor()); | 6733 EXPECT_EQ(640, layoutViewItem.logicalHeight().floor()); |
| 6734 EXPECT_FLOAT_EQ(0.3125, webViewImpl->pageScaleFactor()); | 6734 EXPECT_FLOAT_EQ(0.3125, webViewImpl->pageScaleFactor()); |
| 6735 EXPECT_FLOAT_EQ(0.3125, webViewImpl->minimumPageScaleFactor()); | 6735 EXPECT_FLOAT_EQ(0.3125, webViewImpl->minimumPageScaleFactor()); |
| 6736 EXPECT_FLOAT_EQ(5.0, webViewImpl->maximumPageScaleFactor()); | 6736 EXPECT_FLOAT_EQ(5.0, webViewImpl->maximumPageScaleFactor()); |
| 6737 | 6737 |
| 6738 Document* document = | 6738 Document* document = |
| 6739 webViewImpl->mainFrameImpl()->frame()->document(); | 6739 webViewImpl->mainFrameImpl()->frame()->document(); |
| 6740 UserGestureIndicator gesture(DefinitelyProcessingUserGesture); | 6740 UserGestureIndicator gesture(DefinitelyProcessingUserGesture); |
| 6741 Fullscreen::from(*document).requestFullscreen( | 6741 Fullscreen::requestFullscreen( |
| 6742 *document->documentElement(), Fullscreen::PrefixedRequest); | 6742 *document->documentElement(), Fullscreen::PrefixedRequest); |
| 6743 webViewImpl->didEnterFullscreen(); | 6743 webViewImpl->didEnterFullscreen(); |
| 6744 webViewImpl->updateAllLifecyclePhases(); | 6744 webViewImpl->updateAllLifecyclePhases(); |
| 6745 | 6745 |
| 6746 // Entering fullscreen causes layout size and page scale limits to be | 6746 // Entering fullscreen causes layout size and page scale limits to be |
| 6747 // overridden. | 6747 // overridden. |
| 6748 EXPECT_EQ(100, layoutViewItem.logicalWidth().floor()); | 6748 EXPECT_EQ(100, layoutViewItem.logicalWidth().floor()); |
| 6749 EXPECT_EQ(200, layoutViewItem.logicalHeight().floor()); | 6749 EXPECT_EQ(200, layoutViewItem.logicalHeight().floor()); |
| 6750 EXPECT_FLOAT_EQ(1.0, webViewImpl->pageScaleFactor()); | 6750 EXPECT_FLOAT_EQ(1.0, webViewImpl->pageScaleFactor()); |
| 6751 EXPECT_FLOAT_EQ(1.0, webViewImpl->minimumPageScaleFactor()); | 6751 EXPECT_FLOAT_EQ(1.0, webViewImpl->minimumPageScaleFactor()); |
| (...skipping 2182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8934 FrameTestHelpers::WebViewHelper helper; | 8934 FrameTestHelpers::WebViewHelper helper; |
| 8935 helper.initializeAndLoad(url, true); | 8935 helper.initializeAndLoad(url, true); |
| 8936 Platform::current()->getURLLoaderMockFactory()->setLoaderDelegate(nullptr); | 8936 Platform::current()->getURLLoaderMockFactory()->setLoaderDelegate(nullptr); |
| 8937 | 8937 |
| 8938 Document* document = toLocalFrame(helper.webView()->page()->mainFrame())->do
cument(); | 8938 Document* document = toLocalFrame(helper.webView()->page()->mainFrame())->do
cument(); |
| 8939 EXPECT_TRUE(document->isImageDocument()); | 8939 EXPECT_TRUE(document->isImageDocument()); |
| 8940 EXPECT_EQ(Resource::DecodeError, toImageDocument(document)->cachedImage()->g
etStatus()); | 8940 EXPECT_EQ(Resource::DecodeError, toImageDocument(document)->cachedImage()->g
etStatus()); |
| 8941 } | 8941 } |
| 8942 | 8942 |
| 8943 } // namespace blink | 8943 } // namespace blink |
| OLD | NEW |