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

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

Issue 2167473004: Fix mac_views_browser compile after r406360 (MessageLoop::Run() protected on Mac) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 bool ReleaseMouseAsync() { 525 bool ReleaseMouseAsync() {
526 return input_source() == INPUT_SOURCE_MOUSE && 526 return input_source() == INPUT_SOURCE_MOUSE &&
527 ui_controls::SendMouseEvents(ui_controls::LEFT, ui_controls::UP); 527 ui_controls::SendMouseEvents(ui_controls::LEFT, ui_controls::UP);
528 } 528 }
529 529
530 void QuitWhenNotDragging() { 530 void QuitWhenNotDragging() {
531 if (input_source() == INPUT_SOURCE_MOUSE) { 531 if (input_source() == INPUT_SOURCE_MOUSE) {
532 // Schedule observer to quit message loop when done dragging. This has to 532 // Schedule observer to quit message loop when done dragging. This has to
533 // be async so the message loop can run. 533 // be async so the message loop can run.
534 test::QuitWhenNotDraggingImpl(); 534 test::QuitWhenNotDraggingImpl();
535 base::MessageLoop::current()->Run(); 535 base::RunLoop().Run();
536 } else { 536 } else {
537 // Touch events are sync, so we know we're not in a drag session. But some 537 // Touch events are sync, so we know we're not in a drag session. But some
538 // tests rely on the browser fully closing, which is async. So, run all 538 // tests rely on the browser fully closing, which is async. So, run all
539 // pending tasks. 539 // pending tasks.
540 base::RunLoop run_loop; 540 base::RunLoop run_loop;
541 run_loop.RunUntilIdle(); 541 run_loop.RunUntilIdle();
542 } 542 }
543 } 543 }
544 544
545 void AddBlankTabAndShow(Browser* browser) { 545 void AddBlankTabAndShow(Browser* browser) {
(...skipping 1950 matching lines...) Expand 10 before | Expand all | Expand 10 after
2496 DetachToBrowserTabDragControllerTest, 2496 DetachToBrowserTabDragControllerTest,
2497 ::testing::Values("mouse", "touch")); 2497 ::testing::Values("mouse", "touch"));
2498 INSTANTIATE_TEST_CASE_P(TabDragging, 2498 INSTANTIATE_TEST_CASE_P(TabDragging,
2499 DetachToBrowserTabDragControllerTestTouch, 2499 DetachToBrowserTabDragControllerTestTouch,
2500 ::testing::Values("touch")); 2500 ::testing::Values("touch"));
2501 #else 2501 #else
2502 INSTANTIATE_TEST_CASE_P(TabDragging, 2502 INSTANTIATE_TEST_CASE_P(TabDragging,
2503 DetachToBrowserTabDragControllerTest, 2503 DetachToBrowserTabDragControllerTest,
2504 ::testing::Values("mouse")); 2504 ::testing::Values("mouse"));
2505 #endif 2505 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698