| OLD | NEW |
| 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 <vector> | 5 #include <vector> |
| 6 | 6 |
| 7 #include "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "chrome/browser/media/router/media_router_ui_service.h" | 8 #include "chrome/browser/media/router/media_router_ui_service.h" |
| 9 #include "chrome/browser/media/router/test_helper.h" | 9 #include "chrome/browser/media/router/test_helper.h" |
| 10 #include "chrome/browser/ui/browser_commands.h" | 10 #include "chrome/browser/ui/browser_commands.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 namespace media_router { | 22 namespace media_router { |
| 23 | 23 |
| 24 class MediaRouterDialogControllerImplTest : public MediaRouterWebUITest { | 24 class MediaRouterDialogControllerImplTest : public MediaRouterWebUITest { |
| 25 public: | 25 public: |
| 26 MediaRouterDialogControllerImplTest() : MediaRouterWebUITest(true) {} | 26 MediaRouterDialogControllerImplTest() : MediaRouterWebUITest(true) {} |
| 27 ~MediaRouterDialogControllerImplTest() override {} | 27 ~MediaRouterDialogControllerImplTest() override {} |
| 28 | 28 |
| 29 void OpenMediaRouterDialog(); | 29 void OpenMediaRouterDialog(); |
| 30 | 30 |
| 31 MOCK_METHOD2(PresentationSuccessCallback, | 31 MOCK_METHOD2(PresentationSuccessCallback, |
| 32 void(const content::PresentationSessionInfo&, | 32 void(const content::PresentationInfo&, const MediaRoute&)); |
| 33 const MediaRoute&)); | |
| 34 MOCK_METHOD1(PresentationErrorCallback, | 33 MOCK_METHOD1(PresentationErrorCallback, |
| 35 void(const content::PresentationError& error)); | 34 void(const content::PresentationError& error)); |
| 36 | 35 |
| 37 protected: | 36 protected: |
| 38 WebContents* initiator_ = nullptr; | 37 WebContents* initiator_ = nullptr; |
| 39 MediaRouterDialogControllerImpl* dialog_controller_ = nullptr; | 38 MediaRouterDialogControllerImpl* dialog_controller_ = nullptr; |
| 40 WebContents* media_router_dialog_ = nullptr; | 39 WebContents* media_router_dialog_ = nullptr; |
| 41 | 40 |
| 42 private: | 41 private: |
| 43 DISALLOW_COPY_AND_ASSIGN(MediaRouterDialogControllerImplTest); | 42 DISALLOW_COPY_AND_ASSIGN(MediaRouterDialogControllerImplTest); |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 PresentationErrorCallback, | 265 PresentationErrorCallback, |
| 267 base::Unretained(this))))); | 266 base::Unretained(this))))); |
| 268 | 267 |
| 269 // When |dialog_controller_| is destroyed with its dialog open, | 268 // When |dialog_controller_| is destroyed with its dialog open, |
| 270 // |action_controller| should be notified. | 269 // |action_controller| should be notified. |
| 271 EXPECT_CALL(*action_controller, OnDialogHidden()); | 270 EXPECT_CALL(*action_controller, OnDialogHidden()); |
| 272 EXPECT_CALL(*this, PresentationErrorCallback(testing::_)); | 271 EXPECT_CALL(*this, PresentationErrorCallback(testing::_)); |
| 273 } | 272 } |
| 274 | 273 |
| 275 } // namespace media_router | 274 } // namespace media_router |
| OLD | NEW |