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

Side by Side Diff: chrome/browser/media/router/media_router_ui_service_factory_unittest.cc

Issue 2332693003: Show media router toolbar icon ephemerally for active local routes and issues (Closed)
Patch Set: Address Derek's comment Created 4 years, 2 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 <memory> 5 #include <memory>
6 6
7 #include "chrome/browser/media/router/media_router_ui_service.h" 7 #include "chrome/browser/media/router/media_router_ui_service.h"
8 #include "chrome/browser/media/router/media_router_ui_service_factory.h" 8 #include "chrome/browser/media/router/media_router_ui_service_factory.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/ui/toolbar/toolbar_actions_model.h" 10 #include "chrome/browser/ui/toolbar/toolbar_actions_model.h"
(...skipping 26 matching lines...) Expand all
37 37
38 protected: 38 protected:
39 content::TestBrowserThreadBundle thread_bundle_; 39 content::TestBrowserThreadBundle thread_bundle_;
40 Profile* profile() { return profile_.get(); } 40 Profile* profile() { return profile_.get(); }
41 41
42 private: 42 private:
43 std::unique_ptr<Profile> profile_; 43 std::unique_ptr<Profile> profile_;
44 }; 44 };
45 45
46 TEST_F(MediaRouterUIServiceFactoryUnitTest, CreateService) { 46 TEST_F(MediaRouterUIServiceFactoryUnitTest, CreateService) {
47 MediaRouterUIService* service = 47 // We call BuildServiceInstanceFor() directly because
48 MediaRouterUIServiceFactory::GetForBrowserContext(profile()); 48 // MediaRouterUIServiceFactory::GetForBrowserContext() is set to return a
49 // nullptr for a test profile.
50 std::unique_ptr<MediaRouterUIService> service(
51 static_cast<MediaRouterUIService*>(
52 MediaRouterUIServiceFactory::GetInstance()->BuildServiceInstanceFor(
53 profile())));
49 ASSERT_TRUE(service); 54 ASSERT_TRUE(service);
50 } 55 }
51 56
52 } // namespace media_router 57 } // namespace media_router
OLDNEW
« no previous file with comments | « chrome/browser/media/router/media_router_ui_service_factory.cc ('k') | chrome/browser/ui/toolbar/media_router_action.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698