| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 "chrome/browser/android/vr_shell/ui_scene_manager.h" | 5 #include "chrome/browser/android/vr_shell/ui_scene_manager.h" |
| 6 | 6 |
| 7 #include "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "chrome/browser/android/vr_shell/ui_scene.h" | 8 #include "chrome/browser/android/vr_shell/ui_scene.h" |
| 9 #include "chrome/browser/android/vr_shell/vr_browser_interface.h" | 9 #include "chrome/browser/android/vr_shell/vr_browser_interface.h" |
| 10 #include "testing/gmock/include/gmock/gmock.h" | 10 #include "testing/gmock/include/gmock/gmock.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 MOCK_METHOD0(AppButtonClicked, void()); | 29 MOCK_METHOD0(AppButtonClicked, void()); |
| 30 MOCK_METHOD0(ForceExitVr, void()); | 30 MOCK_METHOD0(ForceExitVr, void()); |
| 31 MOCK_METHOD0(ExitPresent, void()); | 31 MOCK_METHOD0(ExitPresent, void()); |
| 32 MOCK_METHOD0(ExitFullscreen, void()); | 32 MOCK_METHOD0(ExitFullscreen, void()); |
| 33 MOCK_METHOD2( | 33 MOCK_METHOD2( |
| 34 RunVRDisplayInfoCallback, | 34 RunVRDisplayInfoCallback, |
| 35 void(const base::Callback<void(device::mojom::VRDisplayInfoPtr)>&, | 35 void(const base::Callback<void(device::mojom::VRDisplayInfoPtr)>&, |
| 36 device::mojom::VRDisplayInfoPtr*)); | 36 device::mojom::VRDisplayInfoPtr*)); |
| 37 MOCK_METHOD1(OnContentPaused, void(bool)); | 37 MOCK_METHOD1(OnContentPaused, void(bool)); |
| 38 MOCK_METHOD0(NavigateBack, void()); | 38 MOCK_METHOD0(NavigateBack, void()); |
| 39 MOCK_METHOD1(SetVideoCapturingIndicator, void(bool)); |
| 40 MOCK_METHOD1(SetScreenCapturingIndicator, void(bool)); |
| 41 MOCK_METHOD1(SetAudioCapturingIndicator, void(bool)); |
| 39 | 42 |
| 40 // Stub this as scoped pointers don't work as mock method parameters. | 43 // Stub this as scoped pointers don't work as mock method parameters. |
| 41 void ProcessContentGesture(std::unique_ptr<blink::WebInputEvent>) {} | 44 void ProcessContentGesture(std::unique_ptr<blink::WebInputEvent>) {} |
| 42 | 45 |
| 43 private: | 46 private: |
| 44 DISALLOW_COPY_AND_ASSIGN(MockBrowserInterface); | 47 DISALLOW_COPY_AND_ASSIGN(MockBrowserInterface); |
| 45 }; | 48 }; |
| 46 | 49 |
| 47 } // namespace | 50 } // namespace |
| 48 | 51 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 67 | 70 |
| 68 TEST_F(UiSceneManagerTest, ExitPresentAndFullscreenOnAppButtonClick) { | 71 TEST_F(UiSceneManagerTest, ExitPresentAndFullscreenOnAppButtonClick) { |
| 69 // Clicking app button should trigger to exit presentation. | 72 // Clicking app button should trigger to exit presentation. |
| 70 EXPECT_CALL(*browser_, ExitPresent()).Times(1); | 73 EXPECT_CALL(*browser_, ExitPresent()).Times(1); |
| 71 // And also trigger exit fullscreen. | 74 // And also trigger exit fullscreen. |
| 72 EXPECT_CALL(*browser_, ExitFullscreen()).Times(1); | 75 EXPECT_CALL(*browser_, ExitFullscreen()).Times(1); |
| 73 manager_->OnAppButtonClicked(); | 76 manager_->OnAppButtonClicked(); |
| 74 } | 77 } |
| 75 | 78 |
| 76 } // namespace vr_shell | 79 } // namespace vr_shell |
| OLD | NEW |