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

Side by Side Diff: chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest_win.cc

Issue 10479018: Add base::RunLoop and update ui_test_utils to use it to reduce flakiness (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: win_shared build Created 8 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.h" 5 #include "chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/property_bag.h" 10 #include "base/property_bag.h"
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 delete to_delete; 239 delete to_delete;
240 240
241 // Should still be dragging. 241 // Should still be dragging.
242 ASSERT_TRUE(tab_strip->IsDragSessionActive()); 242 ASSERT_TRUE(tab_strip->IsDragSessionActive());
243 ASSERT_TRUE(TabDragController::IsActive()); 243 ASSERT_TRUE(TabDragController::IsActive());
244 244
245 // Release the mouse. 245 // Release the mouse.
246 ASSERT_TRUE(ui_test_utils::SendMouseEventsSync( 246 ASSERT_TRUE(ui_test_utils::SendMouseEventsSync(
247 ui_controls::LEFT, ui_controls::UP)); 247 ui_controls::LEFT, ui_controls::UP));
248 248
249 // Wait for the effects of the mouse event to settle.
250 ui_test_utils::RunAllPendingInMessageLoop();
Paweł Hajdan Jr. 2012/06/18 15:56:25 If this is needed after every SendMouseEventsSync,
jbates 2012/06/18 23:14:03 Removed it, because the reposting QuitNow task in
251
249 // Releasing the mouse should destroy the existing browser and create a new 252 // Releasing the mouse should destroy the existing browser and create a new
250 // one. 253 // one.
251 ASSERT_EQ(1u, BrowserList::size()); 254 ASSERT_EQ(1u, BrowserList::size());
252 Browser* new_browser = *BrowserList::begin(); 255 Browser* new_browser = *BrowserList::begin();
253 EXPECT_NE(new_browser, browser()); 256 EXPECT_NE(new_browser, browser());
254 257
255 ASSERT_FALSE(GetTabStripForBrowser(new_browser)->IsDragSessionActive()); 258 ASSERT_FALSE(GetTabStripForBrowser(new_browser)->IsDragSessionActive());
256 ASSERT_FALSE(TabDragController::IsActive()); 259 ASSERT_FALSE(TabDragController::IsActive());
257 260
258 EXPECT_EQ("0", IDString(new_browser->tab_strip_model())); 261 EXPECT_EQ("0", IDString(new_browser->tab_strip_model()));
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 ASSERT_TRUE(ui_test_utils::SendKeyPressSync( 347 ASSERT_TRUE(ui_test_utils::SendKeyPressSync(
345 browser2, ui::VKEY_ESCAPE, false, false, false, false)); 348 browser2, ui::VKEY_ESCAPE, false, false, false, false));
346 349
347 ASSERT_FALSE(tab_strip->IsDragSessionActive()); 350 ASSERT_FALSE(tab_strip->IsDragSessionActive());
348 ASSERT_FALSE(tab_strip2->IsDragSessionActive()); 351 ASSERT_FALSE(tab_strip2->IsDragSessionActive());
349 ASSERT_FALSE(TabDragController::IsActive()); 352 ASSERT_FALSE(TabDragController::IsActive());
350 ASSERT_EQ(2u, BrowserList::size()); 353 ASSERT_EQ(2u, BrowserList::size());
351 EXPECT_EQ("0 1", IDString(browser()->tab_strip_model())); 354 EXPECT_EQ("0 1", IDString(browser()->tab_strip_model()));
352 EXPECT_EQ("100", IDString(browser2->tab_strip_model())); 355 EXPECT_EQ("100", IDString(browser2->tab_strip_model()));
353 } 356 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698