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

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: return an Origin instead of GURL for GetLastCommittedURLForFrame Created 3 years, 11 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 64
65 void RequestSuccess(const content::PresentationSessionInfo&, 65 void RequestSuccess(const content::PresentationSessionInfo&,
66 const MediaRoute&) {} 66 const MediaRoute&) {}
67 void RequestError(const content::PresentationError& error) {} 67 void RequestError(const content::PresentationError& error) {}
68 68
69 std::unique_ptr<CreatePresentationConnectionRequest> GetRequest() { 69 std::unique_ptr<CreatePresentationConnectionRequest> GetRequest() {
70 return std::unique_ptr<CreatePresentationConnectionRequest>( 70 return std::unique_ptr<CreatePresentationConnectionRequest>(
71 new CreatePresentationConnectionRequest( 71 new CreatePresentationConnectionRequest(
72 RenderFrameHostId(1, 2), 72 RenderFrameHostId(1, 2),
73 {GURL("http://example.com"), GURL("http://example2.com")}, 73 {GURL("http://example.com"), GURL("http://example2.com")},
74 GURL("http://google.com"), 74 url::Origin(GURL("http://google.com")),
75 base::Bind(&MediaRouterDialogControllerTest::RequestSuccess, 75 base::Bind(&MediaRouterDialogControllerTest::RequestSuccess,
76 base::Unretained(this)), 76 base::Unretained(this)),
77 base::Bind(&MediaRouterDialogControllerTest::RequestError, 77 base::Bind(&MediaRouterDialogControllerTest::RequestError,
78 base::Unretained(this)))); 78 base::Unretained(this))));
79 } 79 }
80 80
81 std::unique_ptr<TestMediaRouterDialogController> dialog_controller_; 81 std::unique_ptr<TestMediaRouterDialogController> dialog_controller_;
82 std::unique_ptr<MockWebContentsDelegate> web_contents_delegate_; 82 std::unique_ptr<MockWebContentsDelegate> web_contents_delegate_;
83 }; 83 };
84 84
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 EXPECT_TRUE(dialog_controller_->IsShowingMediaRouterDialog()); 117 EXPECT_TRUE(dialog_controller_->IsShowingMediaRouterDialog());
118 118
119 // If a dialog is already shown, ShowMediaRouterDialogForPresentation() should 119 // If a dialog is already shown, ShowMediaRouterDialogForPresentation() should
120 // return false. 120 // return false.
121 EXPECT_CALL(*web_contents_delegate_, ActivateContents(web_contents())); 121 EXPECT_CALL(*web_contents_delegate_, ActivateContents(web_contents()));
122 EXPECT_FALSE( 122 EXPECT_FALSE(
123 dialog_controller_->ShowMediaRouterDialogForPresentation(GetRequest())); 123 dialog_controller_->ShowMediaRouterDialogForPresentation(GetRequest()));
124 } 124 }
125 125
126 } // namespace media_router 126 } // namespace media_router
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698