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

Unified Diff: device/vr/vr_display_impl_unittest.cc

Issue 2746233002: Fixes 2D-to-WebVR site transitions when browsing in VR. (Closed)
Patch Set: Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: device/vr/vr_display_impl_unittest.cc
diff --git a/device/vr/vr_display_impl_unittest.cc b/device/vr/vr_display_impl_unittest.cc
index f53fde62b7e5aa8bea29bb27bc0aeb26c6a5940e..c3516f90abb15ad3a6a9f7a25822d488a9cc67f4 100644
--- a/device/vr/vr_display_impl_unittest.cc
+++ b/device/vr/vr_display_impl_unittest.cc
@@ -60,6 +60,10 @@ class VRDisplayImplTest : public testing::Test {
bool presenting() { return !!device_->presenting_display_; }
+ VRDisplayImpl* GetVRDisplayImpl(VRServiceImpl* service, VRDevice* device) {
mthiesse 2017/03/13 22:17:29 Why add this function?
tiborg 2017/03/13 23:00:58 In C++ friend declarations are not inheritable. TE
+ return service->GetVRDisplayImpl(device);
+ }
+
base::MessageLoop message_loop_;
bool is_request_presenting_success_ = false;
FakeVRDeviceProvider* provider_;
@@ -74,8 +78,8 @@ TEST_F(VRDisplayImplTest, DevicePresentationIsolation) {
auto service_1 = BindService();
auto service_2 = BindService();
- VRDisplayImpl* display_1 = service_1->GetVRDisplayImpl(device());
- VRDisplayImpl* display_2 = service_2->GetVRDisplayImpl(device());
+ VRDisplayImpl* display_1 = GetVRDisplayImpl(service_1.get(), device());
+ VRDisplayImpl* display_2 = GetVRDisplayImpl(service_2.get(), device());
// When not presenting either service should be able to access the device.
EXPECT_TRUE(device()->IsAccessAllowed(display_1));

Powered by Google App Engine
This is Rietveld 408576698