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

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

Issue 2619603002: Remove android_java_ui as it is not used (Closed)
Patch Set: Rebase to master 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"
11 #include "chrome/common/features.h"
12 #include "chrome/test/base/chrome_render_view_host_test_harness.h" 11 #include "chrome/test/base/chrome_render_view_host_test_harness.h"
13 #include "content/public/browser/render_process_host.h" 12 #include "content/public/browser/render_process_host.h"
14 #include "content/public/browser/web_contents.h" 13 #include "content/public/browser/web_contents.h"
15 #include "content/public/browser/web_contents_delegate.h" 14 #include "content/public/browser/web_contents_delegate.h"
16 #include "testing/gmock/include/gmock/gmock.h" 15 #include "testing/gmock/include/gmock/gmock.h"
17 #include "testing/gtest/include/gtest/gtest.h" 16 #include "testing/gtest/include/gtest/gtest.h"
18 17
19 using ::testing::Return; 18 using ::testing::Return;
20 19
21 namespace media_router { 20 namespace media_router {
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 base::Bind(&MediaRouterDialogControllerTest::RequestSuccess, 74 base::Bind(&MediaRouterDialogControllerTest::RequestSuccess,
76 base::Unretained(this)), 75 base::Unretained(this)),
77 base::Bind(&MediaRouterDialogControllerTest::RequestError, 76 base::Bind(&MediaRouterDialogControllerTest::RequestError,
78 base::Unretained(this)))); 77 base::Unretained(this))));
79 } 78 }
80 79
81 std::unique_ptr<TestMediaRouterDialogController> dialog_controller_; 80 std::unique_ptr<TestMediaRouterDialogController> dialog_controller_;
82 std::unique_ptr<MockWebContentsDelegate> web_contents_delegate_; 81 std::unique_ptr<MockWebContentsDelegate> web_contents_delegate_;
83 }; 82 };
84 83
85 #if BUILDFLAG(ANDROID_JAVA_UI) 84 #if defined(OS_ANDROID)
86 // The non-Android implementation is tested in 85 // The non-Android implementation is tested in
87 // MediaRouterDialogControllerImplTest. 86 // MediaRouterDialogControllerImplTest.
88 TEST_F(MediaRouterDialogControllerTest, CreateForWebContents) { 87 TEST_F(MediaRouterDialogControllerTest, CreateForWebContents) {
89 MediaRouterDialogController* dialog_controller = 88 MediaRouterDialogController* dialog_controller =
90 MediaRouterDialogController::GetOrCreateForWebContents(web_contents()); 89 MediaRouterDialogController::GetOrCreateForWebContents(web_contents());
91 ASSERT_NE(dialog_controller, nullptr); 90 ASSERT_NE(dialog_controller, nullptr);
92 } 91 }
93 #endif 92 #endif
94 93
95 TEST_F(MediaRouterDialogControllerTest, ShowAndHideDialog) { 94 TEST_F(MediaRouterDialogControllerTest, ShowAndHideDialog) {
(...skipping 21 matching lines...) Expand all
117 EXPECT_TRUE(dialog_controller_->IsShowingMediaRouterDialog()); 116 EXPECT_TRUE(dialog_controller_->IsShowingMediaRouterDialog());
118 117
119 // If a dialog is already shown, ShowMediaRouterDialogForPresentation() should 118 // If a dialog is already shown, ShowMediaRouterDialogForPresentation() should
120 // return false. 119 // return false.
121 EXPECT_CALL(*web_contents_delegate_, ActivateContents(web_contents())); 120 EXPECT_CALL(*web_contents_delegate_, ActivateContents(web_contents()));
122 EXPECT_FALSE( 121 EXPECT_FALSE(
123 dialog_controller_->ShowMediaRouterDialogForPresentation(GetRequest())); 122 dialog_controller_->ShowMediaRouterDialogForPresentation(GetRequest()));
124 } 123 }
125 124
126 } // namespace media_router 125 } // namespace media_router
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698