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

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

Issue 2627463003: Convert MediaRouter mojom apis to intake url::Origin objects instead of strings (Closed)
Patch Set: Add missing dependency for extensions_renderer_resources target Created 3 years, 10 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 #include <vector> 6 #include <vector>
7 7
8 #include "chrome/browser/media/router/create_presentation_connection_request.h" 8 #include "chrome/browser/media/router/create_presentation_connection_request.h"
9 #include "chrome/browser/media/router/media_router_dialog_controller.h" 9 #include "chrome/browser/media/router/media_router_dialog_controller.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 void RequestSuccess(const content::PresentationSessionInfo&, 64 void RequestSuccess(const content::PresentationSessionInfo&,
65 const MediaRoute&) {} 65 const MediaRoute&) {}
66 void RequestError(const content::PresentationError& error) {} 66 void RequestError(const content::PresentationError& error) {}
67 67
68 std::unique_ptr<CreatePresentationConnectionRequest> GetRequest() { 68 std::unique_ptr<CreatePresentationConnectionRequest> GetRequest() {
69 return std::unique_ptr<CreatePresentationConnectionRequest>( 69 return std::unique_ptr<CreatePresentationConnectionRequest>(
70 new CreatePresentationConnectionRequest( 70 new CreatePresentationConnectionRequest(
71 RenderFrameHostId(1, 2), 71 RenderFrameHostId(1, 2),
72 {GURL("http://example.com"), GURL("http://example2.com")}, 72 {GURL("http://example.com"), GURL("http://example2.com")},
73 GURL("http://google.com"), 73 url::Origin(GURL("http://google.com")),
74 base::Bind(&MediaRouterDialogControllerTest::RequestSuccess, 74 base::Bind(&MediaRouterDialogControllerTest::RequestSuccess,
75 base::Unretained(this)), 75 base::Unretained(this)),
76 base::Bind(&MediaRouterDialogControllerTest::RequestError, 76 base::Bind(&MediaRouterDialogControllerTest::RequestError,
77 base::Unretained(this)))); 77 base::Unretained(this))));
78 } 78 }
79 79
80 std::unique_ptr<TestMediaRouterDialogController> dialog_controller_; 80 std::unique_ptr<TestMediaRouterDialogController> dialog_controller_;
81 std::unique_ptr<MockWebContentsDelegate> web_contents_delegate_; 81 std::unique_ptr<MockWebContentsDelegate> web_contents_delegate_;
82 }; 82 };
83 83
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 EXPECT_TRUE(dialog_controller_->IsShowingMediaRouterDialog()); 116 EXPECT_TRUE(dialog_controller_->IsShowingMediaRouterDialog());
117 117
118 // If a dialog is already shown, ShowMediaRouterDialogForPresentation() should 118 // If a dialog is already shown, ShowMediaRouterDialogForPresentation() should
119 // return false. 119 // return false.
120 EXPECT_CALL(*web_contents_delegate_, ActivateContents(web_contents())); 120 EXPECT_CALL(*web_contents_delegate_, ActivateContents(web_contents()));
121 EXPECT_FALSE( 121 EXPECT_FALSE(
122 dialog_controller_->ShowMediaRouterDialogForPresentation(GetRequest())); 122 dialog_controller_->ShowMediaRouterDialogForPresentation(GetRequest()));
123 } 123 }
124 124
125 } // namespace media_router 125 } // namespace media_router
OLDNEW
« no previous file with comments | « chrome/browser/media/router/media_router.h ('k') | chrome/browser/media/router/media_sinks_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698