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 package org.chromium.chrome.browser.vr_shell; | 5 package org.chromium.chrome.browser.vr_shell; |
6 | 6 |
7 import static org.chromium.chrome.browser.vr_shell.VrUtils.POLL_TIMEOUT_LONG_MS; | 7 import static org.chromium.chrome.browser.vr_shell.VrUtils.POLL_TIMEOUT_LONG_MS; |
8 import static org.chromium.chrome.browser.vr_shell.VrUtils.POLL_TIMEOUT_SHORT_MS
; | 8 import static org.chromium.chrome.browser.vr_shell.VrUtils.POLL_TIMEOUT_SHORT_MS
; |
9 import static org.chromium.chrome.test.util.ChromeRestriction.RESTRICTION_TYPE_V
IEWER_DAYDREAM; | 9 import static org.chromium.chrome.test.util.ChromeRestriction.RESTRICTION_TYPE_V
IEWER_DAYDREAM; |
10 | 10 |
11 import android.support.test.filters.MediumTest; | 11 import android.support.test.filters.MediumTest; |
12 | 12 |
| 13 import org.junit.Assert; |
| 14 import org.junit.Before; |
| 15 import org.junit.Rule; |
| 16 import org.junit.Test; |
| 17 import org.junit.runner.RunWith; |
| 18 |
13 import org.chromium.base.test.util.CommandLineFlags; | 19 import org.chromium.base.test.util.CommandLineFlags; |
14 import org.chromium.base.test.util.Restriction; | 20 import org.chromium.base.test.util.Restriction; |
| 21 import org.chromium.chrome.browser.ChromeSwitches; |
| 22 import org.chromium.chrome.test.ChromeActivityTestCaseBase; |
| 23 import org.chromium.chrome.test.ChromeActivityTestRule; |
| 24 import org.chromium.chrome.test.ChromeJUnit4ClassRunner; |
| 25 import org.chromium.chrome.test.ChromeTabbedActivityTestRule; |
15 import org.chromium.chrome.test.util.ChromeTabUtils; | 26 import org.chromium.chrome.test.util.ChromeTabUtils; |
16 import org.chromium.content.browser.ContentViewCore; | 27 import org.chromium.content.browser.ContentViewCore; |
17 import org.chromium.content.browser.test.util.DOMUtils; | 28 import org.chromium.content.browser.test.util.DOMUtils; |
18 import org.chromium.content_public.browser.WebContents; | 29 import org.chromium.content_public.browser.WebContents; |
19 | 30 |
20 import java.util.concurrent.TimeoutException; | 31 import java.util.concurrent.TimeoutException; |
21 | 32 |
22 /** | 33 /** |
23 * End-to-end tests for testing navigation transitions (e.g. link clicking) in V
R Browser mode, aka | 34 * End-to-end tests for testing navigation transitions (e.g. link clicking) in V
R Browser mode, aka |
24 * "VR Shell". This may require interacting with WebVR in addition to the VR bro
wser, so inherit | 35 * "VR Shell". This may require interacting with WebVR in addition to the VR bro
wser, so inherit |
25 * from VrTestBase for the WebVR test framework. | 36 * from VrTestBase for the WebVR test framework. |
26 */ | 37 */ |
| 38 @RunWith(ChromeJUnit4ClassRunner.class) |
| 39 @CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE, |
| 40 ChromeActivityTestRule.DISABLE_NETWORK_PREDICTION_FLAG, "enable-features
=VrShell"}) |
27 @Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM) | 41 @Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM) |
28 @CommandLineFlags.Add("enable-features=VrShell") | 42 |
29 public class VrShellNavigationTest extends VrTestBase { | 43 public class VrShellNavigationTest { |
| 44 @Rule |
| 45 public ChromeTabbedActivityTestRule mActivityTestRule = new ChromeTabbedActi
vityTestRule(); |
| 46 @Rule |
| 47 public VrTestRule mVrTestRule = new VrTestRule(); |
| 48 |
30 private static final String TEST_PAGE_2D_URL = | 49 private static final String TEST_PAGE_2D_URL = |
31 VrTestBase.getHtmlTestFile("test_navigation_2d_page"); | 50 VrTestRule.getHtmlTestFile("test_navigation_2d_page"); |
32 private static final String TEST_PAGE_WEBVR_URL = | 51 private static final String TEST_PAGE_WEBVR_URL = |
33 VrTestBase.getHtmlTestFile("test_navigation_webvr_page"); | 52 VrTestRule.getHtmlTestFile("test_navigation_webvr_page"); |
| 53 |
| 54 private ContentViewCore mFirstTabCvc; |
| 55 private WebContents mFirstTabWebContents; |
34 | 56 |
35 private enum Page { PAGE_2D, PAGE_WEBVR } | 57 private enum Page { PAGE_2D, PAGE_WEBVR } |
36 private enum PresentationMode { NON_PRESENTING, PRESENTING } | 58 private enum PresentationMode { NON_PRESENTING, PRESENTING } |
37 private enum FullscreenMode { NON_FULLSCREENED, FULLSCREENED } | 59 private enum FullscreenMode { NON_FULLSCREENED, FULLSCREENED } |
38 | 60 |
39 private String getUrl(Page page) { | 61 private String getUrl(Page page) { |
40 switch (page) { | 62 switch (page) { |
41 case PAGE_2D: | 63 case PAGE_2D: |
42 return TEST_PAGE_2D_URL + "?id=0"; | 64 return TEST_PAGE_2D_URL + "?id=0"; |
43 case PAGE_WEBVR: | 65 case PAGE_WEBVR: |
44 return TEST_PAGE_WEBVR_URL + "?id=0"; | 66 return TEST_PAGE_WEBVR_URL + "?id=0"; |
45 default: | 67 default: |
46 throw new UnsupportedOperationException("Don't know page type "
+ page); | 68 throw new UnsupportedOperationException("Don't know page type "
+ page); |
47 } | 69 } |
48 } | 70 } |
49 | 71 |
50 /** | 72 /** |
51 * Triggers navigation to either a 2D or WebVR page. Similar to | 73 * Triggers navigation to either a 2D or WebVR page. Similar to |
52 * {@link ChromeActivityTestCaseBase#loadUrl loadUrl} but makes sure page in
itiates the | 74 * {@link ChromeActivityTestCaseBase#loadUrl loadUrl} but makes sure page in
itiates the |
53 * navigation. This is desirable since we are testing navigation transitions
end-to-end. | 75 * navigation. This is desirable since we are testing navigation transitions
end-to-end. |
54 */ | 76 */ |
55 private void navigateTo(final Page to) throws InterruptedException { | 77 private void navigateTo(final Page to) throws InterruptedException { |
56 ChromeTabUtils.waitForTabPageLoaded(getActivity().getActivityTab(), new
Runnable() { | 78 ChromeTabUtils.waitForTabPageLoaded( |
57 @Override | 79 mActivityTestRule.getActivity().getActivityTab(), new Runnable()
{ |
58 public void run() { | 80 @Override |
59 runJavaScriptOrFail("window.location.href = '" + getUrl(to) + "'
;", | 81 public void run() { |
60 POLL_TIMEOUT_SHORT_MS, mWebContents); | 82 mVrTestRule.runJavaScriptOrFail( |
61 } | 83 "window.location.href = '" + getUrl(to) + "';", |
62 }, POLL_TIMEOUT_LONG_MS); | 84 POLL_TIMEOUT_SHORT_MS, mFirstTabWebContents); |
| 85 } |
| 86 }, POLL_TIMEOUT_LONG_MS); |
63 } | 87 } |
64 | 88 |
65 private void enterFullscreen(ContentViewCore cvc) | 89 private void enterFullscreen(ContentViewCore cvc) |
66 throws InterruptedException, TimeoutException { | 90 throws InterruptedException, TimeoutException { |
67 DOMUtils.clickNode(cvc, "fullscreen"); | 91 DOMUtils.clickNode(cvc, "fullscreen"); |
68 waitOnJavaScriptStep(cvc.getWebContents()); | 92 mVrTestRule.waitOnJavaScriptStep(cvc.getWebContents()); |
69 assertTrue(DOMUtils.isFullscreen(cvc.getWebContents())); | 93 Assert.assertTrue(DOMUtils.isFullscreen(cvc.getWebContents())); |
70 } | 94 } |
71 | 95 |
72 private void enterPresentation(ContentViewCore cvc) | 96 private void enterPresentation(ContentViewCore cvc) |
73 throws InterruptedException, TimeoutException { | 97 throws InterruptedException, TimeoutException { |
74 // TODO(bsheedy): check if we could use DOMUtils.clickNode in VrTestBase
#enterVrTap and | 98 // TODO(bsheedy): check if we could use DOMUtils.clickNode in VrTestBase
#enterVrTap and |
75 // then use VrTestBase#enterVrTap here. | 99 // then use VrTestBase#enterVrTap here. |
76 DOMUtils.clickNode(cvc, "webgl-canvas"); | 100 DOMUtils.clickNode(cvc, "webgl-canvas"); |
77 waitOnJavaScriptStep(mWebContents); | 101 mVrTestRule.waitOnJavaScriptStep(mFirstTabWebContents); |
78 assertTrue(VrShellDelegate.getVrShellForTesting().getWebVrModeEnabled())
; | 102 Assert.assertTrue(VrShellDelegate.getVrShellForTesting().getWebVrModeEna
bled()); |
79 } | 103 } |
80 | 104 |
81 private void assertState(WebContents wc, Page page, PresentationMode present
ationMode, | 105 private void assertState(WebContents wc, Page page, PresentationMode present
ationMode, |
82 FullscreenMode fullscreenMode) throws InterruptedException, TimeoutE
xception { | 106 FullscreenMode fullscreenMode) throws InterruptedException, TimeoutE
xception { |
83 assertTrue("Browser is in VR", VrShellDelegate.isInVr()); | 107 Assert.assertTrue("Browser is in VR", VrShellDelegate.isInVr()); |
84 assertEquals("Browser is on correct web site", getUrl(page), wc.getVisib
leUrl()); | 108 Assert.assertEquals("Browser is on correct web site", getUrl(page), wc.g
etVisibleUrl()); |
85 assertEquals("Browser is in VR Presentation Mode", | 109 Assert.assertEquals("Browser is in VR Presentation Mode", |
86 presentationMode == PresentationMode.PRESENTING, | 110 presentationMode == PresentationMode.PRESENTING, |
87 VrShellDelegate.getVrShellForTesting().getWebVrModeEnabled()); | 111 VrShellDelegate.getVrShellForTesting().getWebVrModeEnabled()); |
88 assertEquals("Browser is in fullscreen", fullscreenMode == FullscreenMod
e.FULLSCREENED, | 112 Assert.assertEquals("Browser is in fullscreen", |
89 DOMUtils.isFullscreen(wc)); | 113 fullscreenMode == FullscreenMode.FULLSCREENED, DOMUtils.isFullsc
reen(wc)); |
90 } | 114 } |
91 | 115 |
92 @Override | |
93 public int loadUrl(String url, long secondsToWait) | 116 public int loadUrl(String url, long secondsToWait) |
94 throws IllegalArgumentException, InterruptedException { | 117 throws IllegalArgumentException, InterruptedException { |
95 int result = super.loadUrl(url, secondsToWait); | 118 int result = mActivityTestRule.loadUrl(url, secondsToWait); |
96 waitOnJavaScriptStep(getActivity().getActivityTab().getWebContents()); | 119 mVrTestRule.waitOnJavaScriptStep( |
| 120 mActivityTestRule.getActivity().getActivityTab().getWebContents(
)); |
97 return result; | 121 return result; |
98 } | 122 } |
99 | 123 |
100 @Override | 124 @Before |
101 protected void setUp() throws Exception { | 125 public void setUp() throws Exception { |
102 super.setUp(); | 126 mActivityTestRule.startMainActivityOnBlankPage(); |
| 127 mFirstTabWebContents = mActivityTestRule.getActivity().getActivityTab().
getWebContents(); |
| 128 mFirstTabCvc = mActivityTestRule.getActivity().getActivityTab().getConte
ntViewCore(); |
103 VrUtils.forceEnterVr(); | 129 VrUtils.forceEnterVr(); |
104 VrUtils.waitForVrSupported(POLL_TIMEOUT_LONG_MS); | 130 VrUtils.waitForVrSupported(POLL_TIMEOUT_LONG_MS); |
105 } | 131 } |
106 | 132 |
107 /** | 133 /** |
108 * Tests navigation from a 2D to a 2D page. | 134 * Tests navigation from a 2D to a 2D page. |
109 */ | 135 */ |
| 136 @Test |
110 @MediumTest | 137 @MediumTest |
111 public void test2dTo2d() throws InterruptedException, TimeoutException { | 138 public void test2dTo2d() throws InterruptedException, TimeoutException { |
112 loadUrl(TEST_PAGE_2D_URL, PAGE_LOAD_TIMEOUT_S); | 139 loadUrl(TEST_PAGE_2D_URL, VrTestRule.PAGE_LOAD_TIMEOUT_S); |
113 | 140 |
114 navigateTo(Page.PAGE_2D); | 141 navigateTo(Page.PAGE_2D); |
115 | 142 |
116 assertState(mWebContents, Page.PAGE_2D, PresentationMode.NON_PRESENTING, | 143 assertState(mFirstTabWebContents, Page.PAGE_2D, PresentationMode.NON_PRE
SENTING, |
117 FullscreenMode.NON_FULLSCREENED); | 144 FullscreenMode.NON_FULLSCREENED); |
118 } | 145 } |
119 | 146 |
120 /** | 147 /** |
121 * Tests navigation from a 2D to a WebVR page. | 148 * Tests navigation from a 2D to a WebVR page. |
122 */ | 149 */ |
| 150 @Test |
123 @CommandLineFlags.Add("enable-webvr") | 151 @CommandLineFlags.Add("enable-webvr") |
124 @MediumTest | 152 @MediumTest |
125 public void test2dToWebVr() | 153 public void test2dToWebVr() |
126 throws IllegalArgumentException, InterruptedException, TimeoutExcept
ion { | 154 throws IllegalArgumentException, InterruptedException, TimeoutExcept
ion { |
127 loadUrl(TEST_PAGE_2D_URL, PAGE_LOAD_TIMEOUT_S); | 155 loadUrl(TEST_PAGE_2D_URL, VrTestRule.PAGE_LOAD_TIMEOUT_S); |
128 | 156 |
129 navigateTo(Page.PAGE_WEBVR); | 157 navigateTo(Page.PAGE_WEBVR); |
130 | 158 |
131 assertState(mWebContents, Page.PAGE_WEBVR, PresentationMode.NON_PRESENTI
NG, | 159 assertState(mFirstTabWebContents, Page.PAGE_WEBVR, PresentationMode.NON_
PRESENTING, |
132 FullscreenMode.NON_FULLSCREENED); | 160 FullscreenMode.NON_FULLSCREENED); |
133 } | 161 } |
134 | 162 |
135 /** | 163 /** |
136 * Tests navigation from a fullscreened 2D to a WebVR page. | 164 * Tests navigation from a fullscreened 2D to a WebVR page. |
137 */ | 165 */ |
| 166 @Test |
138 @CommandLineFlags.Add("enable-webvr") | 167 @CommandLineFlags.Add("enable-webvr") |
139 @MediumTest | 168 @MediumTest |
140 public void test2dFullscreenToWebVr() | 169 public void test2dFullscreenToWebVr() |
141 throws IllegalArgumentException, InterruptedException, TimeoutExcept
ion { | 170 throws IllegalArgumentException, InterruptedException, TimeoutExcept
ion { |
142 loadUrl(TEST_PAGE_2D_URL, PAGE_LOAD_TIMEOUT_S); | 171 loadUrl(TEST_PAGE_2D_URL, VrTestRule.PAGE_LOAD_TIMEOUT_S); |
143 enterFullscreen(getActivity().getActivityTab().getContentViewCore()); | 172 enterFullscreen(mFirstTabCvc); |
144 | 173 |
145 navigateTo(Page.PAGE_WEBVR); | 174 navigateTo(Page.PAGE_WEBVR); |
146 | 175 |
147 assertState(mWebContents, Page.PAGE_WEBVR, PresentationMode.NON_PRESENTI
NG, | 176 assertState(mFirstTabWebContents, Page.PAGE_WEBVR, PresentationMode.NON_
PRESENTING, |
148 FullscreenMode.NON_FULLSCREENED); | 177 FullscreenMode.NON_FULLSCREENED); |
149 } | 178 } |
150 | 179 |
151 /** | 180 /** |
152 * Tests navigation from a WebVR to a 2D page. | 181 * Tests navigation from a WebVR to a 2D page. |
153 */ | 182 */ |
| 183 @Test |
154 @CommandLineFlags.Add("enable-webvr") | 184 @CommandLineFlags.Add("enable-webvr") |
155 @MediumTest | 185 @MediumTest |
156 public void testWebVrTo2d() | 186 public void testWebVrTo2d() |
157 throws IllegalArgumentException, InterruptedException, TimeoutExcept
ion { | 187 throws IllegalArgumentException, InterruptedException, TimeoutExcept
ion { |
158 loadUrl(TEST_PAGE_WEBVR_URL, PAGE_LOAD_TIMEOUT_S); | 188 loadUrl(TEST_PAGE_WEBVR_URL, VrTestRule.PAGE_LOAD_TIMEOUT_S); |
159 | 189 |
160 navigateTo(Page.PAGE_2D); | 190 navigateTo(Page.PAGE_2D); |
161 | 191 |
162 assertState(mWebContents, Page.PAGE_2D, PresentationMode.NON_PRESENTING, | 192 assertState(mFirstTabWebContents, Page.PAGE_2D, PresentationMode.NON_PRE
SENTING, |
163 FullscreenMode.NON_FULLSCREENED); | 193 FullscreenMode.NON_FULLSCREENED); |
164 } | 194 } |
165 | 195 |
166 /** | 196 /** |
167 * Tests navigation from a WebVR to a WebVR page. | 197 * Tests navigation from a WebVR to a WebVR page. |
168 */ | 198 */ |
| 199 @Test |
169 @CommandLineFlags.Add("enable-webvr") | 200 @CommandLineFlags.Add("enable-webvr") |
170 @MediumTest | 201 @MediumTest |
171 public void testWebVrToWebVr() | 202 public void testWebVrToWebVr() |
172 throws IllegalArgumentException, InterruptedException, TimeoutExcept
ion { | 203 throws IllegalArgumentException, InterruptedException, TimeoutExcept
ion { |
173 loadUrl(TEST_PAGE_WEBVR_URL, PAGE_LOAD_TIMEOUT_S); | 204 loadUrl(TEST_PAGE_WEBVR_URL, VrTestRule.PAGE_LOAD_TIMEOUT_S); |
174 | 205 |
175 navigateTo(Page.PAGE_WEBVR); | 206 navigateTo(Page.PAGE_WEBVR); |
176 | 207 |
177 assertState(mWebContents, Page.PAGE_WEBVR, PresentationMode.NON_PRESENTI
NG, | 208 assertState(mFirstTabWebContents, Page.PAGE_WEBVR, PresentationMode.NON_
PRESENTING, |
178 FullscreenMode.NON_FULLSCREENED); | 209 FullscreenMode.NON_FULLSCREENED); |
179 } | 210 } |
180 | 211 |
181 /** | 212 /** |
182 * Tests navigation from a presenting WebVR to a 2D page. | 213 * Tests navigation from a presenting WebVR to a 2D page. |
183 */ | 214 */ |
| 215 @Test |
184 @CommandLineFlags.Add("enable-webvr") | 216 @CommandLineFlags.Add("enable-webvr") |
185 @MediumTest | 217 @MediumTest |
186 public void testWebVrPresentingTo2d() | 218 public void testWebVrPresentingTo2d() |
187 throws IllegalArgumentException, InterruptedException, TimeoutExcept
ion { | 219 throws IllegalArgumentException, InterruptedException, TimeoutExcept
ion { |
188 loadUrl(TEST_PAGE_WEBVR_URL, PAGE_LOAD_TIMEOUT_S); | 220 loadUrl(TEST_PAGE_WEBVR_URL, VrTestRule.PAGE_LOAD_TIMEOUT_S); |
189 enterPresentation(getActivity().getActivityTab().getContentViewCore()); | 221 enterPresentation(mFirstTabCvc); |
190 | 222 |
191 navigateTo(Page.PAGE_2D); | 223 navigateTo(Page.PAGE_2D); |
192 | 224 |
193 assertState(mWebContents, Page.PAGE_2D, PresentationMode.NON_PRESENTING, | 225 assertState(mFirstTabWebContents, Page.PAGE_2D, PresentationMode.NON_PRE
SENTING, |
194 FullscreenMode.NON_FULLSCREENED); | 226 FullscreenMode.NON_FULLSCREENED); |
195 } | 227 } |
196 | 228 |
197 /** | 229 /** |
198 * Tests navigation from a presenting WebVR to a WebVR page. | 230 * Tests navigation from a presenting WebVR to a WebVR page. |
199 */ | 231 */ |
| 232 @Test |
200 @CommandLineFlags.Add("enable-webvr") | 233 @CommandLineFlags.Add("enable-webvr") |
201 @MediumTest | 234 @MediumTest |
202 public void testWebVrPresentingToWebVr() | 235 public void testWebVrPresentingToWebVr() |
203 throws IllegalArgumentException, InterruptedException, TimeoutExcept
ion { | 236 throws IllegalArgumentException, InterruptedException, TimeoutExcept
ion { |
204 loadUrl(TEST_PAGE_WEBVR_URL, PAGE_LOAD_TIMEOUT_S); | 237 loadUrl(TEST_PAGE_WEBVR_URL, VrTestRule.PAGE_LOAD_TIMEOUT_S); |
205 enterPresentation(getActivity().getActivityTab().getContentViewCore()); | 238 enterPresentation(mFirstTabCvc); |
206 | 239 |
207 navigateTo(Page.PAGE_WEBVR); | 240 navigateTo(Page.PAGE_WEBVR); |
208 | 241 |
209 assertState(mWebContents, Page.PAGE_WEBVR, PresentationMode.NON_PRESENTI
NG, | 242 assertState(mFirstTabWebContents, Page.PAGE_WEBVR, PresentationMode.NON_
PRESENTING, |
210 FullscreenMode.NON_FULLSCREENED); | 243 FullscreenMode.NON_FULLSCREENED); |
211 } | 244 } |
212 | 245 |
213 /** | 246 /** |
214 * Tests navigation from a fullscreened WebVR to a 2D page. | 247 * Tests navigation from a fullscreened WebVR to a 2D page. |
215 */ | 248 */ |
| 249 @Test |
216 @CommandLineFlags.Add("enable-webvr") | 250 @CommandLineFlags.Add("enable-webvr") |
217 @MediumTest | 251 @MediumTest |
218 public void testWebVrFullscreenTo2d() | 252 public void testWebVrFullscreenTo2d() |
219 throws IllegalArgumentException, InterruptedException, TimeoutExcept
ion { | 253 throws IllegalArgumentException, InterruptedException, TimeoutExcept
ion { |
220 loadUrl(TEST_PAGE_WEBVR_URL, PAGE_LOAD_TIMEOUT_S); | 254 loadUrl(TEST_PAGE_WEBVR_URL, VrTestRule.PAGE_LOAD_TIMEOUT_S); |
221 enterFullscreen(getActivity().getActivityTab().getContentViewCore()); | 255 enterFullscreen(mFirstTabCvc); |
222 | 256 |
223 navigateTo(Page.PAGE_2D); | 257 navigateTo(Page.PAGE_2D); |
224 | 258 |
225 assertState(mWebContents, Page.PAGE_2D, PresentationMode.NON_PRESENTING, | 259 assertState(mFirstTabWebContents, Page.PAGE_2D, PresentationMode.NON_PRE
SENTING, |
226 FullscreenMode.NON_FULLSCREENED); | 260 FullscreenMode.NON_FULLSCREENED); |
227 } | 261 } |
228 | 262 |
229 /** | 263 /** |
230 * Tests navigation from a fullscreened WebVR to a WebVR page. | 264 * Tests navigation from a fullscreened WebVR to a WebVR page. |
231 */ | 265 */ |
| 266 @Test |
232 @CommandLineFlags.Add("enable-webvr") | 267 @CommandLineFlags.Add("enable-webvr") |
233 @MediumTest | 268 @MediumTest |
234 public void testWebVrFullscreenToWebVr() | 269 public void testWebVrFullscreenToWebVr() |
235 throws IllegalArgumentException, InterruptedException, TimeoutExcept
ion { | 270 throws IllegalArgumentException, InterruptedException, TimeoutExcept
ion { |
236 loadUrl(TEST_PAGE_WEBVR_URL, PAGE_LOAD_TIMEOUT_S); | 271 loadUrl(TEST_PAGE_WEBVR_URL, VrTestRule.PAGE_LOAD_TIMEOUT_S); |
237 enterFullscreen(getActivity().getActivityTab().getContentViewCore()); | 272 enterFullscreen(mFirstTabCvc); |
238 | 273 |
239 navigateTo(Page.PAGE_WEBVR); | 274 navigateTo(Page.PAGE_WEBVR); |
240 | 275 |
241 assertState(mWebContents, Page.PAGE_WEBVR, PresentationMode.NON_PRESENTI
NG, | 276 assertState(mFirstTabWebContents, Page.PAGE_WEBVR, PresentationMode.NON_
PRESENTING, |
242 FullscreenMode.NON_FULLSCREENED); | 277 FullscreenMode.NON_FULLSCREENED); |
243 } | 278 } |
244 } | 279 } |
OLD | NEW |