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

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

Issue 2658253003: [RootLayerScrolls] Fix ScrollingCoordinatorTest (Closed)
Patch Set: Created 3 years, 10 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 7729 matching lines...) Expand 10 before | Expand all | Expand 10 after
7740 registerMockedHttpURLLoad("fullscreen_div.html"); 7740 registerMockedHttpURLLoad("fullscreen_div.html");
7741 FrameTestHelpers::WebViewHelper webViewHelper; 7741 FrameTestHelpers::WebViewHelper webViewHelper;
7742 int viewportWidth = 640; 7742 int viewportWidth = 640;
7743 int viewportHeight = 480; 7743 int viewportHeight = 480;
7744 WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad( 7744 WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad(
7745 m_baseURL + "fullscreen_div.html", true, nullptr, &client, nullptr, 7745 m_baseURL + "fullscreen_div.html", true, nullptr, &client, nullptr,
7746 configureAndroid); 7746 configureAndroid);
7747 webViewHelper.resize(WebSize(viewportWidth, viewportHeight)); 7747 webViewHelper.resize(WebSize(viewportWidth, viewportHeight));
7748 webViewImpl->updateAllLifecyclePhases(); 7748 webViewImpl->updateAllLifecyclePhases();
7749 7749
7750 WebLayer* webScrollLayer = webViewImpl->mainFrameImpl()
7751 ->frame()
7752 ->view()
7753 ->layoutViewportScrollableArea()
7754 ->layerForScrolling()
7755 ->platformLayer();
7756 ASSERT_TRUE(webScrollLayer->scrollable());
7757 ASSERT_TRUE(webScrollLayer->userScrollableHorizontal());
7758 ASSERT_TRUE(webScrollLayer->userScrollableVertical());
7759
7750 Document* document = webViewImpl->mainFrameImpl()->frame()->document(); 7760 Document* document = webViewImpl->mainFrameImpl()->frame()->document();
7751 UserGestureIndicator gesture(DocumentUserGestureToken::create(document)); 7761 UserGestureIndicator gesture(DocumentUserGestureToken::create(document));
7752 Fullscreen::requestFullscreen(*document->documentElement()); 7762 Fullscreen::requestFullscreen(*document->documentElement());
7753 webViewImpl->didEnterFullscreen(); 7763 webViewImpl->didEnterFullscreen();
7754 EXPECT_EQ(nullptr, Fullscreen::fullscreenElementFrom(*document)); 7764 EXPECT_EQ(nullptr, Fullscreen::fullscreenElementFrom(*document));
7755 webViewImpl->beginFrame(WTF::monotonicallyIncreasingTime()); 7765 webViewImpl->beginFrame(WTF::monotonicallyIncreasingTime());
7756 EXPECT_EQ(document->documentElement(), 7766 EXPECT_EQ(document->documentElement(),
7757 Fullscreen::fullscreenElementFrom(*document)); 7767 Fullscreen::fullscreenElementFrom(*document));
7758 webViewImpl->updateAllLifecyclePhases(); 7768 webViewImpl->updateAllLifecyclePhases();
7759 7769
7760 // Verify that the main frame is still scrollable. 7770 // Verify that the main frame is still scrollable.
7761 WebLayer* webScrollLayer = 7771 webScrollLayer = webViewImpl->mainFrameImpl()
7762 webViewImpl->compositor()->scrollLayer()->platformLayer(); 7772 ->frame()
7773 ->view()
7774 ->layoutViewportScrollableArea()
7775 ->layerForScrolling()
7776 ->platformLayer();
7763 ASSERT_TRUE(webScrollLayer->scrollable()); 7777 ASSERT_TRUE(webScrollLayer->scrollable());
7764 ASSERT_TRUE(webScrollLayer->userScrollableHorizontal()); 7778 ASSERT_TRUE(webScrollLayer->userScrollableHorizontal());
7765 ASSERT_TRUE(webScrollLayer->userScrollableVertical()); 7779 ASSERT_TRUE(webScrollLayer->userScrollableVertical());
7766 7780
7767 // Verify the main frame still behaves correctly after a resize. 7781 // Verify the main frame still behaves correctly after a resize.
7768 webViewHelper.resize(WebSize(viewportHeight, viewportWidth)); 7782 webViewHelper.resize(WebSize(viewportHeight, viewportWidth));
7769 ASSERT_TRUE(webScrollLayer->scrollable()); 7783 ASSERT_TRUE(webScrollLayer->scrollable());
7770 ASSERT_TRUE(webScrollLayer->userScrollableHorizontal()); 7784 ASSERT_TRUE(webScrollLayer->userScrollableHorizontal());
7771 ASSERT_TRUE(webScrollLayer->userScrollableVertical()); 7785 ASSERT_TRUE(webScrollLayer->userScrollableVertical());
7772 } 7786 }
(...skipping 3464 matching lines...) Expand 10 before | Expand all | Expand 10 after
11237 11251
11238 EXPECT_TRUE(mainFrameClient.childClient().didCallFrameDetached()); 11252 EXPECT_TRUE(mainFrameClient.childClient().didCallFrameDetached());
11239 EXPECT_TRUE(mainFrameClient.childClient().didCallDidStopLoading()); 11253 EXPECT_TRUE(mainFrameClient.childClient().didCallDidStopLoading());
11240 EXPECT_TRUE(mainFrameClient.childClient().didCallDidFinishDocumentLoad()); 11254 EXPECT_TRUE(mainFrameClient.childClient().didCallDidFinishDocumentLoad());
11241 EXPECT_TRUE(mainFrameClient.childClient().didCallDidHandleOnloadEvents()); 11255 EXPECT_TRUE(mainFrameClient.childClient().didCallDidHandleOnloadEvents());
11242 11256
11243 webViewHelper.reset(); 11257 webViewHelper.reset();
11244 } 11258 }
11245 11259
11246 } // namespace blink 11260 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698