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

Side by Side Diff: chrome/browser/android/vr_shell/ui_scene_manager_unittest.cc

Issue 2872773002: VR: Render the current URL and security level on the URL bar. (Closed)
Patch Set: Revert the inclusion of the lock icon; will re-add when moved to UI. Created 3 years, 7 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 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 15 matching lines...) Expand all
26 MOCK_METHOD1(UpdateGamepadData, void(device::GvrGamepadData)); 26 MOCK_METHOD1(UpdateGamepadData, void(device::GvrGamepadData));
27 MOCK_METHOD1(AppButtonGesturePerformed, void(UiInterface::Direction)); 27 MOCK_METHOD1(AppButtonGesturePerformed, void(UiInterface::Direction));
28 28
29 MOCK_METHOD0(AppButtonClicked, void()); 29 MOCK_METHOD0(AppButtonClicked, void());
30 MOCK_METHOD0(ForceExitVr, void()); 30 MOCK_METHOD0(ForceExitVr, void());
31 MOCK_METHOD2( 31 MOCK_METHOD2(
32 RunVRDisplayInfoCallback, 32 RunVRDisplayInfoCallback,
33 void(const base::Callback<void(device::mojom::VRDisplayInfoPtr)>&, 33 void(const base::Callback<void(device::mojom::VRDisplayInfoPtr)>&,
34 device::mojom::VRDisplayInfoPtr*)); 34 device::mojom::VRDisplayInfoPtr*));
35 MOCK_METHOD1(OnContentPaused, void(bool)); 35 MOCK_METHOD1(OnContentPaused, void(bool));
36 MOCK_METHOD0(NavigateBack, void());
36 37
37 // Stub this as scoped pointers don't work as mock method parameters. 38 // Stub this as scoped pointers don't work as mock method parameters.
38 void ProcessContentGesture(std::unique_ptr<blink::WebInputEvent>) {} 39 void ProcessContentGesture(std::unique_ptr<blink::WebInputEvent>) {}
39 40
40 private: 41 private:
41 DISALLOW_COPY_AND_ASSIGN(MockBrowserInterface); 42 DISALLOW_COPY_AND_ASSIGN(MockBrowserInterface);
42 }; 43 };
43 44
44 } // namespace 45 } // namespace
45 46
(...skipping 26 matching lines...) Expand all
72 manager_->OnAppButtonClicked(); 73 manager_->OnAppButtonClicked();
73 EXPECT_FALSE(scene_->GetWebVrRenderingEnabled()); 74 EXPECT_FALSE(scene_->GetWebVrRenderingEnabled());
74 75
75 // Clicking it again should resume content rendering. 76 // Clicking it again should resume content rendering.
76 EXPECT_CALL(*browser_, OnContentPaused(false)).Times(1); 77 EXPECT_CALL(*browser_, OnContentPaused(false)).Times(1);
77 manager_->OnAppButtonClicked(); 78 manager_->OnAppButtonClicked();
78 EXPECT_TRUE(scene_->GetWebVrRenderingEnabled()); 79 EXPECT_TRUE(scene_->GetWebVrRenderingEnabled());
79 } 80 }
80 81
81 } // namespace vr_shell 82 } // namespace vr_shell
OLDNEW
« no previous file with comments | « chrome/browser/android/vr_shell/ui_scene_manager.cc ('k') | chrome/browser/android/vr_shell/vr_browser_interface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698