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

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: added printfs to debug timeout which doesn't happen locally 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 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 delete to_delete; 240 delete to_delete;
241 241
242 // Should still be dragging. 242 // Should still be dragging.
243 ASSERT_TRUE(tab_strip->IsDragSessionActive()); 243 ASSERT_TRUE(tab_strip->IsDragSessionActive());
244 ASSERT_TRUE(TabDragController::IsActive()); 244 ASSERT_TRUE(TabDragController::IsActive());
245 245
246 // Release the mouse. 246 // Release the mouse.
247 ASSERT_TRUE(ui_test_utils::SendMouseEventsSync( 247 ASSERT_TRUE(ui_test_utils::SendMouseEventsSync(
248 ui_controls::LEFT, ui_controls::UP)); 248 ui_controls::LEFT, ui_controls::UP));
249 249
250 // Wait for the effects of the mouse event to settle.
251 ui_test_utils::RunAllPendingInMessageLoop();
252
250 // Releasing the mouse should destroy the existing browser and create a new 253 // Releasing the mouse should destroy the existing browser and create a new
251 // one. 254 // one.
252 ASSERT_EQ(1u, BrowserList::size()); 255 ASSERT_EQ(1u, BrowserList::size());
253 Browser* new_browser = *BrowserList::begin(); 256 Browser* new_browser = *BrowserList::begin();
254 EXPECT_NE(new_browser, browser()); 257 EXPECT_NE(new_browser, browser());
255 258
256 ASSERT_FALSE(GetTabStripForBrowser(new_browser)->IsDragSessionActive()); 259 ASSERT_FALSE(GetTabStripForBrowser(new_browser)->IsDragSessionActive());
257 ASSERT_FALSE(TabDragController::IsActive()); 260 ASSERT_FALSE(TabDragController::IsActive());
258 261
259 EXPECT_EQ("0", IDString(new_browser->tab_strip_model())); 262 EXPECT_EQ("0", IDString(new_browser->tab_strip_model()));
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 ASSERT_TRUE(ui_test_utils::SendKeyPressSync( 348 ASSERT_TRUE(ui_test_utils::SendKeyPressSync(
346 browser2, ui::VKEY_ESCAPE, false, false, false, false)); 349 browser2, ui::VKEY_ESCAPE, false, false, false, false));
347 350
348 ASSERT_FALSE(tab_strip->IsDragSessionActive()); 351 ASSERT_FALSE(tab_strip->IsDragSessionActive());
349 ASSERT_FALSE(tab_strip2->IsDragSessionActive()); 352 ASSERT_FALSE(tab_strip2->IsDragSessionActive());
350 ASSERT_FALSE(TabDragController::IsActive()); 353 ASSERT_FALSE(TabDragController::IsActive());
351 ASSERT_EQ(2u, BrowserList::size()); 354 ASSERT_EQ(2u, BrowserList::size());
352 EXPECT_EQ("0 1", IDString(browser()->tab_strip_model())); 355 EXPECT_EQ("0 1", IDString(browser()->tab_strip_model()));
353 EXPECT_EQ("100", IDString(browser2->tab_strip_model())); 356 EXPECT_EQ("100", IDString(browser2->tab_strip_model()));
354 } 357 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698