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

Unified Diff: content/browser/screen_orientation/screen_orientation_browsertest.cc

Issue 441713002: Use WaitForResizeComplete() instead of waiting for first paint. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/public/test/test_navigation_observer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/screen_orientation/screen_orientation_browsertest.cc
diff --git a/content/browser/screen_orientation/screen_orientation_browsertest.cc b/content/browser/screen_orientation/screen_orientation_browsertest.cc
index 670a3d031415b364c767e873481392d1bb23839b..daccbd23351f6c0d9abd0b68d79b8442f54b2aa7 100644
--- a/content/browser/screen_orientation/screen_orientation_browsertest.cc
+++ b/content/browser/screen_orientation/screen_orientation_browsertest.cc
@@ -11,6 +11,7 @@
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/content_switches.h"
+#include "content/public/test/browser_test_utils.h"
#include "content/public/test/content_browser_test.h"
#include "content/public/test/content_browser_test_utils.h"
#include "content/public/test/test_navigation_observer.h"
@@ -115,16 +116,12 @@ IN_PROC_BROWSER_TEST_F(ScreenOrientationBrowserTest, ScreenOrientationChange) {
GURL test_url = GetTestUrl("screen_orientation",
"screen_orientation_screenorientationchange.html");
- TestNavigationObserver navigation_observer(
- shell()->web_contents(), 1
- // Android doesn't paint (ie. UseSoftwareCompositing() has no effect) so we
- // shouldn't wait for the first paint.
- #if !defined(OS_ANDROID)
- , TestNavigationObserver::FirstPaintRequired
- #endif
- );
+ TestNavigationObserver navigation_observer(shell()->web_contents(), 1);
shell()->LoadURL(test_url);
navigation_observer.Wait();
+#if USE_AURA
+ WaitForResizeComplete(shell()->web_contents());
+#endif // USE_AURA
int angle = GetOrientationAngle();
« no previous file with comments | « no previous file | content/public/test/test_navigation_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698