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

Side by Side Diff: third_party/WebKit/Source/web/tests/WebFrameTest.cpp

Issue 2401123002: UserGestureIndicator is a mess. Clean it up. (Closed)
Patch Set: Callback cleanup, comments Created 4 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 unified diff | Download patch
OLDNEW
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 6658 matching lines...) Expand 10 before | Expand all | Expand 10 after
6669 toLocalFrame(webViewHelper.webView()->page()->mainFrame())->document(); 6669 toLocalFrame(webViewHelper.webView()->page()->mainFrame())->document();
6670 KURL destination = toKURL(m_baseURL + "hello_world.html"); 6670 KURL destination = toKURL(m_baseURL + "hello_world.html");
6671 6671
6672 // ctrl+click event 6672 // ctrl+click event
6673 Event* event = MouseEvent::create( 6673 Event* event = MouseEvent::create(
6674 EventTypeNames::click, false, false, document->domWindow(), 0, 0, 0, 0, 0, 6674 EventTypeNames::click, false, false, document->domWindow(), 0, 0, 0, 0, 0,
6675 0, 0, PlatformEvent::CtrlKey, 0, 0, nullptr, 0, 6675 0, 0, PlatformEvent::CtrlKey, 0, 0, nullptr, 0,
6676 PlatformMouseEvent::RealOrIndistinguishable, String(), nullptr); 6676 PlatformMouseEvent::RealOrIndistinguishable, String(), nullptr);
6677 FrameLoadRequest frameRequest(document, ResourceRequest(destination)); 6677 FrameLoadRequest frameRequest(document, ResourceRequest(destination));
6678 frameRequest.setTriggeringEvent(event); 6678 frameRequest.setTriggeringEvent(event);
6679 UserGestureIndicator gesture(DefinitelyProcessingUserGesture); 6679 UserGestureIndicator gesture(UserGestureToken::create());
6680 toLocalFrame(webViewHelper.webView()->page()->mainFrame()) 6680 toLocalFrame(webViewHelper.webView()->page()->mainFrame())
6681 ->loader() 6681 ->loader()
6682 .load(frameRequest); 6682 .load(frameRequest);
6683 FrameTestHelpers::pumpPendingRequestsForFrameToLoad( 6683 FrameTestHelpers::pumpPendingRequestsForFrameToLoad(
6684 webViewHelper.webView()->mainFrame()); 6684 webViewHelper.webView()->mainFrame());
6685 6685
6686 // decidePolicyForNavigation should be called both for the original request 6686 // decidePolicyForNavigation should be called both for the original request
6687 // and the ctrl+click. 6687 // and the ctrl+click.
6688 EXPECT_EQ(2, webFrameClient.decidePolicyCallCount()); 6688 EXPECT_EQ(2, webFrameClient.decidePolicyCallCount());
6689 } 6689 }
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after
7391 int viewportHeight = 480; 7391 int viewportHeight = 480;
7392 client.m_screenInfo.rect.width = viewportWidth; 7392 client.m_screenInfo.rect.width = viewportWidth;
7393 client.m_screenInfo.rect.height = viewportHeight; 7393 client.m_screenInfo.rect.height = viewportHeight;
7394 WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad( 7394 WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad(
7395 m_baseURL + "fullscreen_div.html", true, nullptr, &client, nullptr, 7395 m_baseURL + "fullscreen_div.html", true, nullptr, &client, nullptr,
7396 configureAndroid); 7396 configureAndroid);
7397 webViewHelper.resize(WebSize(viewportWidth, viewportHeight)); 7397 webViewHelper.resize(WebSize(viewportWidth, viewportHeight));
7398 webViewImpl->updateAllLifecyclePhases(); 7398 webViewImpl->updateAllLifecyclePhases();
7399 7399
7400 Document* document = webViewImpl->mainFrameImpl()->frame()->document(); 7400 Document* document = webViewImpl->mainFrameImpl()->frame()->document();
7401 UserGestureIndicator gesture(DefinitelyProcessingUserGesture); 7401 UserGestureIndicator gesture(UserGestureToken::create());
7402 Element* divFullscreen = document->getElementById("div1"); 7402 Element* divFullscreen = document->getElementById("div1");
7403 Fullscreen::requestFullscreen(*divFullscreen, Fullscreen::PrefixedRequest); 7403 Fullscreen::requestFullscreen(*divFullscreen, Fullscreen::PrefixedRequest);
7404 webViewImpl->didEnterFullscreen(); 7404 webViewImpl->didEnterFullscreen();
7405 webViewImpl->updateAllLifecyclePhases(); 7405 webViewImpl->updateAllLifecyclePhases();
7406 EXPECT_EQ(Fullscreen::currentFullScreenElementFrom(*document), divFullscreen); 7406 EXPECT_EQ(Fullscreen::currentFullScreenElementFrom(*document), divFullscreen);
7407 7407
7408 // Verify that the element is sized to the viewport. 7408 // Verify that the element is sized to the viewport.
7409 LayoutFullScreen* fullscreenLayoutObject = 7409 LayoutFullScreen* fullscreenLayoutObject =
7410 Fullscreen::from(*document).fullScreenLayoutObject(); 7410 Fullscreen::from(*document).fullScreenLayoutObject();
7411 EXPECT_EQ(viewportWidth, fullscreenLayoutObject->logicalWidth().toInt()); 7411 EXPECT_EQ(viewportWidth, fullscreenLayoutObject->logicalWidth().toInt());
(...skipping 14 matching lines...) Expand all
7426 FrameTestHelpers::WebViewHelper webViewHelper; 7426 FrameTestHelpers::WebViewHelper webViewHelper;
7427 int viewportWidth = 640; 7427 int viewportWidth = 640;
7428 int viewportHeight = 480; 7428 int viewportHeight = 480;
7429 WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad( 7429 WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad(
7430 m_baseURL + "fullscreen_div.html", true, nullptr, &client, nullptr, 7430 m_baseURL + "fullscreen_div.html", true, nullptr, &client, nullptr,
7431 configureAndroid); 7431 configureAndroid);
7432 webViewHelper.resize(WebSize(viewportWidth, viewportHeight)); 7432 webViewHelper.resize(WebSize(viewportWidth, viewportHeight));
7433 webViewImpl->updateAllLifecyclePhases(); 7433 webViewImpl->updateAllLifecyclePhases();
7434 7434
7435 Document* document = webViewImpl->mainFrameImpl()->frame()->document(); 7435 Document* document = webViewImpl->mainFrameImpl()->frame()->document();
7436 UserGestureIndicator gesture(DefinitelyProcessingUserGesture); 7436 UserGestureIndicator gesture(UserGestureToken::create());
7437 Element* divFullscreen = document->getElementById("div1"); 7437 Element* divFullscreen = document->getElementById("div1");
7438 Fullscreen::requestFullscreen(*divFullscreen, Fullscreen::PrefixedRequest); 7438 Fullscreen::requestFullscreen(*divFullscreen, Fullscreen::PrefixedRequest);
7439 webViewImpl->didEnterFullscreen(); 7439 webViewImpl->didEnterFullscreen();
7440 webViewImpl->updateAllLifecyclePhases(); 7440 webViewImpl->updateAllLifecyclePhases();
7441 7441
7442 // Verify that the viewports are nonscrollable. 7442 // Verify that the viewports are nonscrollable.
7443 EXPECT_EQ(Fullscreen::currentFullScreenElementFrom(*document), divFullscreen); 7443 EXPECT_EQ(Fullscreen::currentFullScreenElementFrom(*document), divFullscreen);
7444 FrameView* frameView = webViewHelper.webView()->mainFrameImpl()->frameView(); 7444 FrameView* frameView = webViewHelper.webView()->mainFrameImpl()->frameView();
7445 WebLayer* layoutViewportScrollLayer = 7445 WebLayer* layoutViewportScrollLayer =
7446 webViewImpl->compositor()->scrollLayer()->platformLayer(); 7446 webViewImpl->compositor()->scrollLayer()->platformLayer();
(...skipping 23 matching lines...) Expand all
7470 FrameTestHelpers::WebViewHelper webViewHelper; 7470 FrameTestHelpers::WebViewHelper webViewHelper;
7471 int viewportWidth = 640; 7471 int viewportWidth = 640;
7472 int viewportHeight = 480; 7472 int viewportHeight = 480;
7473 WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad( 7473 WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad(
7474 m_baseURL + "fullscreen_div.html", true, nullptr, &client, nullptr, 7474 m_baseURL + "fullscreen_div.html", true, nullptr, &client, nullptr,
7475 configureAndroid); 7475 configureAndroid);
7476 webViewHelper.resize(WebSize(viewportWidth, viewportHeight)); 7476 webViewHelper.resize(WebSize(viewportWidth, viewportHeight));
7477 webViewImpl->updateAllLifecyclePhases(); 7477 webViewImpl->updateAllLifecyclePhases();
7478 7478
7479 Document* document = webViewImpl->mainFrameImpl()->frame()->document(); 7479 Document* document = webViewImpl->mainFrameImpl()->frame()->document();
7480 UserGestureIndicator gesture(DefinitelyProcessingUserGesture); 7480 UserGestureIndicator gesture(UserGestureToken::create());
7481 Fullscreen::requestFullscreen(*document->documentElement(), 7481 Fullscreen::requestFullscreen(*document->documentElement(),
7482 Fullscreen::PrefixedRequest); 7482 Fullscreen::PrefixedRequest);
7483 webViewImpl->didEnterFullscreen(); 7483 webViewImpl->didEnterFullscreen();
7484 webViewImpl->updateAllLifecyclePhases(); 7484 webViewImpl->updateAllLifecyclePhases();
7485 7485
7486 // Verify that the main frame is still scrollable. 7486 // Verify that the main frame is still scrollable.
7487 EXPECT_EQ(Fullscreen::currentFullScreenElementFrom(*document), 7487 EXPECT_EQ(Fullscreen::currentFullScreenElementFrom(*document),
7488 document->documentElement()); 7488 document->documentElement());
7489 WebLayer* webScrollLayer = 7489 WebLayer* webScrollLayer =
7490 webViewImpl->compositor()->scrollLayer()->platformLayer(); 7490 webViewImpl->compositor()->scrollLayer()->platformLayer();
(...skipping 20 matching lines...) Expand all
7511 int viewportHeight = 480; 7511 int viewportHeight = 480;
7512 client.m_screenInfo.rect.width = viewportWidth; 7512 client.m_screenInfo.rect.width = viewportWidth;
7513 client.m_screenInfo.rect.height = viewportHeight; 7513 client.m_screenInfo.rect.height = viewportHeight;
7514 webViewHelper.resize(WebSize(viewportWidth, viewportHeight)); 7514 webViewHelper.resize(WebSize(viewportWidth, viewportHeight));
7515 webViewImpl->updateAllLifecyclePhases(); 7515 webViewImpl->updateAllLifecyclePhases();
7516 7516
7517 Document* document = 7517 Document* document =
7518 toWebLocalFrameImpl(webViewHelper.webView()->mainFrame()->firstChild()) 7518 toWebLocalFrameImpl(webViewHelper.webView()->mainFrame()->firstChild())
7519 ->frame() 7519 ->frame()
7520 ->document(); 7520 ->document();
7521 UserGestureIndicator gesture(DefinitelyProcessingUserGesture); 7521 UserGestureIndicator gesture(UserGestureToken::create());
7522 Element* divFullscreen = document->getElementById("div1"); 7522 Element* divFullscreen = document->getElementById("div1");
7523 Fullscreen::requestFullscreen(*divFullscreen, Fullscreen::PrefixedRequest); 7523 Fullscreen::requestFullscreen(*divFullscreen, Fullscreen::PrefixedRequest);
7524 webViewImpl->didEnterFullscreen(); 7524 webViewImpl->didEnterFullscreen();
7525 webViewImpl->updateAllLifecyclePhases(); 7525 webViewImpl->updateAllLifecyclePhases();
7526 7526
7527 // Verify that the element is sized to the viewport. 7527 // Verify that the element is sized to the viewport.
7528 LayoutFullScreen* fullscreenLayoutObject = 7528 LayoutFullScreen* fullscreenLayoutObject =
7529 Fullscreen::from(*document).fullScreenLayoutObject(); 7529 Fullscreen::from(*document).fullScreenLayoutObject();
7530 EXPECT_EQ(viewportWidth, fullscreenLayoutObject->logicalWidth().toInt()); 7530 EXPECT_EQ(viewportWidth, fullscreenLayoutObject->logicalWidth().toInt());
7531 EXPECT_EQ(viewportHeight, fullscreenLayoutObject->logicalHeight().toInt()); 7531 EXPECT_EQ(viewportHeight, fullscreenLayoutObject->logicalHeight().toInt());
(...skipping 23 matching lines...) Expand all
7555 7555
7556 LayoutViewItem layoutViewItem = 7556 LayoutViewItem layoutViewItem =
7557 webViewHelper.webView()->mainFrameImpl()->frameView()->layoutViewItem(); 7557 webViewHelper.webView()->mainFrameImpl()->frameView()->layoutViewItem();
7558 EXPECT_EQ(320, layoutViewItem.logicalWidth().floor()); 7558 EXPECT_EQ(320, layoutViewItem.logicalWidth().floor());
7559 EXPECT_EQ(533, layoutViewItem.logicalHeight().floor()); 7559 EXPECT_EQ(533, layoutViewItem.logicalHeight().floor());
7560 EXPECT_FLOAT_EQ(1.2, webViewImpl->pageScaleFactor()); 7560 EXPECT_FLOAT_EQ(1.2, webViewImpl->pageScaleFactor());
7561 EXPECT_FLOAT_EQ(1.2, webViewImpl->minimumPageScaleFactor()); 7561 EXPECT_FLOAT_EQ(1.2, webViewImpl->minimumPageScaleFactor());
7562 EXPECT_FLOAT_EQ(5.0, webViewImpl->maximumPageScaleFactor()); 7562 EXPECT_FLOAT_EQ(5.0, webViewImpl->maximumPageScaleFactor());
7563 7563
7564 Document* document = webViewImpl->mainFrameImpl()->frame()->document(); 7564 Document* document = webViewImpl->mainFrameImpl()->frame()->document();
7565 UserGestureIndicator gesture(DefinitelyProcessingUserGesture); 7565 UserGestureIndicator gesture(UserGestureToken::create());
7566 Fullscreen::requestFullscreen(*document->documentElement(), 7566 Fullscreen::requestFullscreen(*document->documentElement(),
7567 Fullscreen::PrefixedRequest); 7567 Fullscreen::PrefixedRequest);
7568 webViewImpl->didEnterFullscreen(); 7568 webViewImpl->didEnterFullscreen();
7569 webViewImpl->updateAllLifecyclePhases(); 7569 webViewImpl->updateAllLifecyclePhases();
7570 EXPECT_EQ(384, layoutViewItem.logicalWidth().floor()); 7570 EXPECT_EQ(384, layoutViewItem.logicalWidth().floor());
7571 EXPECT_EQ(640, layoutViewItem.logicalHeight().floor()); 7571 EXPECT_EQ(640, layoutViewItem.logicalHeight().floor());
7572 EXPECT_FLOAT_EQ(1.0, webViewImpl->pageScaleFactor()); 7572 EXPECT_FLOAT_EQ(1.0, webViewImpl->pageScaleFactor());
7573 EXPECT_FLOAT_EQ(1.0, webViewImpl->minimumPageScaleFactor()); 7573 EXPECT_FLOAT_EQ(1.0, webViewImpl->minimumPageScaleFactor());
7574 EXPECT_FLOAT_EQ(1.0, webViewImpl->maximumPageScaleFactor()); 7574 EXPECT_FLOAT_EQ(1.0, webViewImpl->maximumPageScaleFactor());
7575 7575
(...skipping 16 matching lines...) Expand all
7592 int viewportWidth = 384; 7592 int viewportWidth = 384;
7593 int viewportHeight = 640; 7593 int viewportHeight = 640;
7594 client.m_screenInfo.rect.width = viewportWidth; 7594 client.m_screenInfo.rect.width = viewportWidth;
7595 client.m_screenInfo.rect.height = viewportHeight; 7595 client.m_screenInfo.rect.height = viewportHeight;
7596 webViewHelper.resize(WebSize(viewportWidth, viewportHeight)); 7596 webViewHelper.resize(WebSize(viewportWidth, viewportHeight));
7597 webViewImpl->updateAllLifecyclePhases(); 7597 webViewImpl->updateAllLifecyclePhases();
7598 7598
7599 LayoutViewItem layoutViewItem = 7599 LayoutViewItem layoutViewItem =
7600 webViewHelper.webView()->mainFrameImpl()->frameView()->layoutViewItem(); 7600 webViewHelper.webView()->mainFrameImpl()->frameView()->layoutViewItem();
7601 Document* document = webViewImpl->mainFrameImpl()->frame()->document(); 7601 Document* document = webViewImpl->mainFrameImpl()->frame()->document();
7602 UserGestureIndicator gesture(DefinitelyProcessingUserGesture); 7602 UserGestureIndicator gesture(UserGestureToken::create());
7603 Fullscreen::requestFullscreen(*document->documentElement(), 7603 Fullscreen::requestFullscreen(*document->documentElement(),
7604 Fullscreen::PrefixedRequest); 7604 Fullscreen::PrefixedRequest);
7605 webViewImpl->didEnterFullscreen(); 7605 webViewImpl->didEnterFullscreen();
7606 webViewImpl->updateAllLifecyclePhases(); 7606 webViewImpl->updateAllLifecyclePhases();
7607 EXPECT_EQ(384, layoutViewItem.logicalWidth().floor()); 7607 EXPECT_EQ(384, layoutViewItem.logicalWidth().floor());
7608 EXPECT_EQ(640, layoutViewItem.logicalHeight().floor()); 7608 EXPECT_EQ(640, layoutViewItem.logicalHeight().floor());
7609 EXPECT_FLOAT_EQ(1.0, webViewImpl->pageScaleFactor()); 7609 EXPECT_FLOAT_EQ(1.0, webViewImpl->pageScaleFactor());
7610 EXPECT_FLOAT_EQ(1.0, webViewImpl->minimumPageScaleFactor()); 7610 EXPECT_FLOAT_EQ(1.0, webViewImpl->minimumPageScaleFactor());
7611 EXPECT_FLOAT_EQ(1.0, webViewImpl->maximumPageScaleFactor()); 7611 EXPECT_FLOAT_EQ(1.0, webViewImpl->maximumPageScaleFactor());
7612 7612
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
7654 EXPECT_EQ(screenSizeMinusStatusBarsMinusUrlBar.width, 7654 EXPECT_EQ(screenSizeMinusStatusBarsMinusUrlBar.width,
7655 layoutViewItem.logicalWidth().floor()); 7655 layoutViewItem.logicalWidth().floor());
7656 EXPECT_EQ(screenSizeMinusStatusBarsMinusUrlBar.height, 7656 EXPECT_EQ(screenSizeMinusStatusBarsMinusUrlBar.height,
7657 layoutViewItem.logicalHeight().floor()); 7657 layoutViewItem.logicalHeight().floor());
7658 EXPECT_FLOAT_EQ(1.0, webViewImpl->pageScaleFactor()); 7658 EXPECT_FLOAT_EQ(1.0, webViewImpl->pageScaleFactor());
7659 EXPECT_FLOAT_EQ(1.0, webViewImpl->minimumPageScaleFactor()); 7659 EXPECT_FLOAT_EQ(1.0, webViewImpl->minimumPageScaleFactor());
7660 EXPECT_FLOAT_EQ(5.0, webViewImpl->maximumPageScaleFactor()); 7660 EXPECT_FLOAT_EQ(5.0, webViewImpl->maximumPageScaleFactor());
7661 7661
7662 { 7662 {
7663 Document* document = webViewImpl->mainFrameImpl()->frame()->document(); 7663 Document* document = webViewImpl->mainFrameImpl()->frame()->document();
7664 UserGestureIndicator gesture(DefinitelyProcessingUserGesture); 7664 UserGestureIndicator gesture(UserGestureToken::create());
7665 Fullscreen::requestFullscreen(*document->body(), 7665 Fullscreen::requestFullscreen(*document->body(),
7666 Fullscreen::PrefixedRequest); 7666 Fullscreen::PrefixedRequest);
7667 } 7667 }
7668 7668
7669 webViewImpl->didEnterFullscreen(); 7669 webViewImpl->didEnterFullscreen();
7670 webViewImpl->updateAllLifecyclePhases(); 7670 webViewImpl->updateAllLifecyclePhases();
7671 client.m_screenInfo.rect.width = screenSizeMinusStatusBars.width; 7671 client.m_screenInfo.rect.width = screenSizeMinusStatusBars.width;
7672 client.m_screenInfo.rect.height = screenSizeMinusStatusBars.height; 7672 client.m_screenInfo.rect.height = screenSizeMinusStatusBars.height;
7673 webViewHelper.resize(screenSizeMinusStatusBars); 7673 webViewHelper.resize(screenSizeMinusStatusBars);
7674 client.m_screenInfo.rect.width = screenSize.width; 7674 client.m_screenInfo.rect.width = screenSize.width;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
7715 // viewport-tiny.html specifies a 320px layout width. 7715 // viewport-tiny.html specifies a 320px layout width.
7716 LayoutViewItem layoutViewItem = 7716 LayoutViewItem layoutViewItem =
7717 webViewImpl->mainFrameImpl()->frameView()->layoutViewItem(); 7717 webViewImpl->mainFrameImpl()->frameView()->layoutViewItem();
7718 EXPECT_EQ(320, layoutViewItem.logicalWidth().floor()); 7718 EXPECT_EQ(320, layoutViewItem.logicalWidth().floor());
7719 EXPECT_EQ(640, layoutViewItem.logicalHeight().floor()); 7719 EXPECT_EQ(640, layoutViewItem.logicalHeight().floor());
7720 EXPECT_FLOAT_EQ(0.3125, webViewImpl->pageScaleFactor()); 7720 EXPECT_FLOAT_EQ(0.3125, webViewImpl->pageScaleFactor());
7721 EXPECT_FLOAT_EQ(0.3125, webViewImpl->minimumPageScaleFactor()); 7721 EXPECT_FLOAT_EQ(0.3125, webViewImpl->minimumPageScaleFactor());
7722 EXPECT_FLOAT_EQ(5.0, webViewImpl->maximumPageScaleFactor()); 7722 EXPECT_FLOAT_EQ(5.0, webViewImpl->maximumPageScaleFactor());
7723 7723
7724 Document* document = webViewImpl->mainFrameImpl()->frame()->document(); 7724 Document* document = webViewImpl->mainFrameImpl()->frame()->document();
7725 UserGestureIndicator gesture(DefinitelyProcessingUserGesture); 7725 UserGestureIndicator gesture(
7726 UserGestureToken::create(UserGestureToken::NewGesture));
7726 Fullscreen::requestFullscreen(*document->documentElement(), 7727 Fullscreen::requestFullscreen(*document->documentElement(),
7727 Fullscreen::PrefixedRequest); 7728 Fullscreen::PrefixedRequest);
7728 webViewImpl->didEnterFullscreen(); 7729 webViewImpl->didEnterFullscreen();
7729 webViewImpl->updateAllLifecyclePhases(); 7730 webViewImpl->updateAllLifecyclePhases();
7730 7731
7731 // Entering fullscreen causes layout size and page scale limits to be 7732 // Entering fullscreen causes layout size and page scale limits to be
7732 // overridden. 7733 // overridden.
7733 EXPECT_EQ(100, layoutViewItem.logicalWidth().floor()); 7734 EXPECT_EQ(100, layoutViewItem.logicalWidth().floor());
7734 EXPECT_EQ(200, layoutViewItem.logicalHeight().floor()); 7735 EXPECT_EQ(200, layoutViewItem.logicalHeight().floor());
7735 EXPECT_FLOAT_EQ(1.0, webViewImpl->pageScaleFactor()); 7736 EXPECT_FLOAT_EQ(1.0, webViewImpl->pageScaleFactor());
(...skipping 2427 matching lines...) Expand 10 before | Expand all | Expand 10 after
10163 Platform::current()->getURLLoaderMockFactory()->setLoaderDelegate(nullptr); 10164 Platform::current()->getURLLoaderMockFactory()->setLoaderDelegate(nullptr);
10164 10165
10165 Document* document = 10166 Document* document =
10166 toLocalFrame(helper.webView()->page()->mainFrame())->document(); 10167 toLocalFrame(helper.webView()->page()->mainFrame())->document();
10167 EXPECT_TRUE(document->isImageDocument()); 10168 EXPECT_TRUE(document->isImageDocument());
10168 EXPECT_EQ(Resource::DecodeError, 10169 EXPECT_EQ(Resource::DecodeError,
10169 toImageDocument(document)->cachedImage()->getStatus()); 10170 toImageDocument(document)->cachedImage()->getStatus());
10170 } 10171 }
10171 10172
10172 } // namespace blink 10173 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebViewImpl.cpp ('k') | third_party/WebKit/Source/web/tests/WebUserGestureTokenTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698