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

Side by Side Diff: chrome/browser/ui/views/media_router/media_router_ui_browsertest.cc

Issue 2824363002: Rewrite base::Bind to base::BindOnce with base_bind_rewriters in //chrome/browser/ui (Closed)
Patch Set: 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/threading/thread_task_runner_handle.h" 6 #include "base/threading/thread_task_runner_handle.h"
7 #include "chrome/app/chrome_command_ids.h" 7 #include "chrome/app/chrome_command_ids.h"
8 #include "chrome/browser/extensions/browser_action_test_util.h" 8 #include "chrome/browser/extensions/browser_action_test_util.h"
9 #include "chrome/browser/media/router/media_router_ui_service.h" 9 #include "chrome/browser/media/router/media_router_ui_service.h"
10 #include "chrome/browser/prefs/browser_prefs.h" 10 #include "chrome/browser/prefs/browser_prefs.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 void OpenMediaRouterDialogAndWaitForNewWebContents() { 68 void OpenMediaRouterDialogAndWaitForNewWebContents() {
69 content::TestNavigationObserver nav_observer(NULL); 69 content::TestNavigationObserver nav_observer(NULL);
70 nav_observer.StartWatchingNewWebContents(); 70 nav_observer.StartWatchingNewWebContents();
71 71
72 AppMenuButton* app_menu_button = GetAppMenuButton(); 72 AppMenuButton* app_menu_button = GetAppMenuButton();
73 73
74 // When the Media Router Action executes, it opens a dialog with web 74 // When the Media Router Action executes, it opens a dialog with web
75 // contents to chrome://media-router. 75 // contents to chrome://media-router.
76 base::ThreadTaskRunnerHandle::Get()->PostTask( 76 base::ThreadTaskRunnerHandle::Get()->PostTask(
77 FROM_HERE, 77 FROM_HERE,
78 base::Bind(&MediaRouterUIBrowserTest::ExecuteMediaRouterAction, 78 base::BindOnce(&MediaRouterUIBrowserTest::ExecuteMediaRouterAction,
79 base::Unretained(this), app_menu_button)); 79 base::Unretained(this), app_menu_button));
80 80
81 base::RunLoop run_loop; 81 base::RunLoop run_loop;
82 app_menu_button->ShowMenu(false); 82 app_menu_button->ShowMenu(false);
83 run_loop.RunUntilIdle(); 83 run_loop.RunUntilIdle();
84 84
85 nav_observer.Wait(); 85 nav_observer.Wait();
86 EXPECT_FALSE(app_menu_button->IsMenuShowing()); 86 EXPECT_FALSE(app_menu_button->IsMenuShowing());
87 ASSERT_EQ(chrome::kChromeUIMediaRouterURL, 87 ASSERT_EQ(chrome::kChromeUIMediaRouterURL,
88 nav_observer.last_navigation_url().spec()); 88 nav_observer.last_navigation_url().spec());
89 nav_observer.StopWatchingNewWebContents(); 89 nav_observer.StopWatchingNewWebContents();
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 } 376 }
377 377
378 IN_PROC_BROWSER_TEST_F(MediaRouterUIBrowserTest, 378 IN_PROC_BROWSER_TEST_F(MediaRouterUIBrowserTest,
379 MigrateToolbarIconUnshownPref) { 379 MigrateToolbarIconUnshownPref) {
380 MigrateToolbarIconPref(false); 380 MigrateToolbarIconPref(false);
381 EXPECT_FALSE(MediaRouterActionController::GetAlwaysShowActionPref( 381 EXPECT_FALSE(MediaRouterActionController::GetAlwaysShowActionPref(
382 browser()->profile())); 382 browser()->profile()));
383 } 383 }
384 384
385 } // namespace media_router 385 } // namespace media_router
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698