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

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

Issue 12226080: Thread ui transform animations (Closed) Base URL: http://git.chromium.org/chromium/src.git@DefineThreadedLayerAnimationElements
Patch Set: Fix WebContentsViewAuraTest.QuickOverscrollDirectionChange Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/aura/root_window.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/web_contents/web_contents_view_aura_browsertest.cc
diff --git a/content/browser/web_contents/web_contents_view_aura_browsertest.cc b/content/browser/web_contents/web_contents_view_aura_browsertest.cc
index 5640ea665fb8eb44b5a2be0bbdeb7072bd7e4f64..6c32d879d391808ec13854b6ca87addaedf917d7 100644
--- a/content/browser/web_contents/web_contents_view_aura_browsertest.cc
+++ b/content/browser/web_contents/web_contents_view_aura_browsertest.cc
@@ -224,6 +224,14 @@ IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest,
aura::RootWindow* root_window = content->GetRootWindow();
gfx::Rect bounds = content->GetBoundsInRootWindow();
+
+ // Each call to GetCurrentIndex involves blocking until the current
+ // MessageLoop is idle. Without a delay in scheduling draws, the
+ // MessageLoop doesn't become idle until the animation triggered by the
+ // preceding touch event completes; since each such animation takes 200ms,
+ // this causes the test to timeout.
+ root_window->DelayDrawsForTesting(base::TimeDelta::FromMilliseconds(10));
Ian Vollick 2013/03/04 13:50:50 SetDrawDelayForTesting, perhaps? DelayDrawsForTest
+
base::TimeDelta timestamp;
ui::TouchEvent press(ui::ET_TOUCH_PRESSED,
gfx::Point(bounds.x() + bounds.width() / 2, bounds.y() + 5),
« no previous file with comments | « no previous file | ui/aura/root_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698