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

Unified Diff: content/browser/web_contents/web_contents_impl_browsertest.cc

Issue 240163005: Deliver IPC messages together with SwapCompositorFrame (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: disable browsertest for android for realz this time Created 6 years, 5 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
Index: content/browser/web_contents/web_contents_impl_browsertest.cc
diff --git a/content/browser/web_contents/web_contents_impl_browsertest.cc b/content/browser/web_contents/web_contents_impl_browsertest.cc
index e831e0681a25d764c9c9a89470ff4500c3baba84..27e0efa70493e98a163f48af45b3bba593e69856 100644
--- a/content/browser/web_contents/web_contents_impl_browsertest.cc
+++ b/content/browser/web_contents/web_contents_impl_browsertest.cc
@@ -515,5 +515,45 @@ IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest, LoadProgress) {
EXPECT_EQ(1.0, *progresses.rbegin());
}
+struct FirstVisuallyNonEmptyPaintObserver : public WebContentsObserver {
+ FirstVisuallyNonEmptyPaintObserver(Shell* shell)
+ : WebContentsObserver(shell->web_contents()),
+ did_fist_visually_non_empty_paint_(false) {}
+
+ virtual void DidFirstVisuallyNonEmptyPaint() OVERRIDE {
+ did_fist_visually_non_empty_paint_ = true;
+ on_did_first_visually_non_empty_paint_.Run();
+ }
+
+ void WaitForDidFirstVisuallyNonEmptyPaint() {
+ if (did_fist_visually_non_empty_paint_)
+ return;
+ base::RunLoop run_loop;
+ on_did_first_visually_non_empty_paint_ = run_loop.QuitClosure();
+ run_loop.Run();
+ }
+
+ base::Closure on_did_first_visually_non_empty_paint_;
+ bool did_fist_visually_non_empty_paint_;
+};
+
+// See: http://crbug.com/395664
+#if defined(OS_ANDROID)
+#define MAYBE_FirstVisuallyNonEmptyPaint DISABLED_FirstVisuallyNonEmptyPaint
+#else
+#define MAYBE_FirstVisuallyNonEmptyPaint FirstVisuallyNonEmptyPaint
+#endif
+IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
+ MAYBE_FirstVisuallyNonEmptyPaint) {
+ ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
+ scoped_ptr<FirstVisuallyNonEmptyPaintObserver> observer(
+ new FirstVisuallyNonEmptyPaintObserver(shell()));
+
+ NavigateToURL(shell(), embedded_test_server()->GetURL("/title1.html"));
+
+ observer->WaitForDidFirstVisuallyNonEmptyPaint();
+ ASSERT_TRUE(observer->did_fist_visually_non_empty_paint_);
+}
+
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698