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

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

Issue 2550703002: Move pending state from FullscreenController to Fullscreen (Closed)
Patch Set: tests and documentation Created 4 years 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 7798 matching lines...) Expand 10 before | Expand all | Expand 10 after
7809 // fullscreen element stack. 7809 // fullscreen element stack.
7810 EXPECT_EQ(topBody, Fullscreen::currentFullScreenElementFrom(*topDoc)); 7810 EXPECT_EQ(topBody, Fullscreen::currentFullScreenElementFrom(*topDoc));
7811 EXPECT_EQ(iframe, Fullscreen::fullscreenElementFrom(*topDoc)); 7811 EXPECT_EQ(iframe, Fullscreen::fullscreenElementFrom(*topDoc));
7812 EXPECT_EQ(iframeBody, Fullscreen::currentFullScreenElementFrom(*iframeDoc)); 7812 EXPECT_EQ(iframeBody, Fullscreen::currentFullScreenElementFrom(*iframeDoc));
7813 EXPECT_EQ(iframeBody, Fullscreen::fullscreenElementFrom(*iframeDoc)); 7813 EXPECT_EQ(iframeBody, Fullscreen::fullscreenElementFrom(*iframeDoc));
7814 7814
7815 webViewImpl->didExitFullscreen(); 7815 webViewImpl->didExitFullscreen();
7816 webViewImpl->updateAllLifecyclePhases(); 7816 webViewImpl->updateAllLifecyclePhases();
7817 7817
7818 // We should now have fully exited fullscreen. 7818 // We should now have fully exited fullscreen.
7819 // TODO(foolip): The top document's currentFullScreenElement is left 7819 EXPECT_EQ(nullptr, Fullscreen::currentFullScreenElementFrom(*topDoc));
7820 // unchanged, leaving the page in a strange state. https://crbug.com/552541
7821 EXPECT_EQ(topBody, Fullscreen::currentFullScreenElementFrom(*topDoc));
7822 EXPECT_EQ(nullptr, Fullscreen::fullscreenElementFrom(*topDoc)); 7820 EXPECT_EQ(nullptr, Fullscreen::fullscreenElementFrom(*topDoc));
7823 EXPECT_EQ(nullptr, Fullscreen::currentFullScreenElementFrom(*iframeDoc)); 7821 EXPECT_EQ(nullptr, Fullscreen::currentFullScreenElementFrom(*iframeDoc));
7824 EXPECT_EQ(nullptr, Fullscreen::fullscreenElementFrom(*iframeDoc)); 7822 EXPECT_EQ(nullptr, Fullscreen::fullscreenElementFrom(*iframeDoc));
7825 } 7823 }
7826 7824
7827 TEST_P(ParameterizedWebFrameTest, FullscreenWithTinyViewport) { 7825 TEST_P(ParameterizedWebFrameTest, FullscreenWithTinyViewport) {
7828 FakeCompositingWebViewClient client; 7826 FakeCompositingWebViewClient client;
7829 registerMockedHttpURLLoad("viewport-tiny.html"); 7827 registerMockedHttpURLLoad("viewport-tiny.html");
7830 FrameTestHelpers::WebViewHelper webViewHelper; 7828 FrameTestHelpers::WebViewHelper webViewHelper;
7831 WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad( 7829 WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad(
(...skipping 3173 matching lines...) Expand 10 before | Expand all | Expand 10 after
11005 11003
11006 EXPECT_TRUE(mainFrameClient.childClient().didCallFrameDetached()); 11004 EXPECT_TRUE(mainFrameClient.childClient().didCallFrameDetached());
11007 EXPECT_TRUE(mainFrameClient.childClient().didCallDidStopLoading()); 11005 EXPECT_TRUE(mainFrameClient.childClient().didCallDidStopLoading());
11008 EXPECT_TRUE(mainFrameClient.childClient().didCallDidFinishDocumentLoad()); 11006 EXPECT_TRUE(mainFrameClient.childClient().didCallDidFinishDocumentLoad());
11009 EXPECT_TRUE(mainFrameClient.childClient().didCallDidHandleOnloadEvents()); 11007 EXPECT_TRUE(mainFrameClient.childClient().didCallDidHandleOnloadEvents());
11010 11008
11011 webViewHelper.reset(); 11009 webViewHelper.reset();
11012 } 11010 }
11013 11011
11014 } // namespace blink 11012 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698