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

Unified Diff: content/browser/site_per_process_browsertest.cc

Issue 2785533003: Animated scroll shouldn't consume unhandled scrolls for OOPIFs. (Closed)
Patch Set: Fix Android compile. Created 3 years, 8 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/site_per_process_browsertest.cc
diff --git a/content/browser/site_per_process_browsertest.cc b/content/browser/site_per_process_browsertest.cc
index cb7a479d278c1781ffa6b7d373b786eb0e27a4cf..d09dea79557274885ce0d74ea343c9e71a248e6e 100644
--- a/content/browser/site_per_process_browsertest.cc
+++ b/content/browser/site_per_process_browsertest.cc
@@ -1091,8 +1091,7 @@ IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest,
// Test that scrolling a nested out-of-process iframe bubbles unused scroll
// delta to a parent frame.
// Flaky: https://crbug.com/627238
-IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest,
- DISABLED_ScrollBubblingFromOOPIFTest) {
+IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, ScrollBubblingFromOOPIFTest) {
GURL main_url(embedded_test_server()->GetURL(
"a.com", "/cross_site_iframe_factory.html?a(b)"));
EXPECT_TRUE(NavigateToURL(shell(), main_url));
@@ -1192,6 +1191,17 @@ IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest,
filter->Reset();
+ // TODO(wjmaclean): This is ugly, but it seems that it stops the scroll
+ // we're about to send from occassionally colliding with the previous
+ // scroll animation.
+ {
+ base::RunLoop run_loop;
+ base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
+ FROM_HERE, run_loop.QuitClosure(), TestTimeouts::action_timeout());
+ run_loop.Run();
+ update_rect = filter->last_rect();
+ }
+
// Scroll the parent down again in order to test scroll bubbling from
// gestures.
scroll_event.delta_y = -5.0f;

Powered by Google App Engine
This is Rietveld 408576698