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

Side by Side Diff: chrome/android/javatests/src/org/chromium/chrome/browser/vr_shell/VrTestBase.java

Issue 2859533003: WebVR: lock focus while presenting to presenting window (Closed)
Patch Set: Update comment + fix comment line lengths 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
« no previous file with comments | « no previous file | chrome/android/javatests/src/org/chromium/chrome/browser/vr_shell/WebVrTest.java » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 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_CHECK_INTERVAL_L ONG_MS; 7 import static org.chromium.chrome.browser.vr_shell.VrUtils.POLL_CHECK_INTERVAL_L ONG_MS;
8 import static org.chromium.chrome.browser.vr_shell.VrUtils.POLL_CHECK_INTERVAL_S HORT_MS; 8 import static org.chromium.chrome.browser.vr_shell.VrUtils.POLL_CHECK_INTERVAL_S HORT_MS;
9 import static org.chromium.chrome.browser.vr_shell.VrUtils.POLL_TIMEOUT_LONG_MS; 9 import static org.chromium.chrome.browser.vr_shell.VrUtils.POLL_TIMEOUT_LONG_MS;
10 import static org.chromium.chrome.browser.vr_shell.VrUtils.POLL_TIMEOUT_SHORT_MS ; 10 import static org.chromium.chrome.browser.vr_shell.VrUtils.POLL_TIMEOUT_SHORT_MS ;
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 } 186 }
187 return true; 187 return true;
188 } 188 }
189 189
190 /** 190 /**
191 * Waits for a JavaScript step to finish, asserting that the step finished 191 * Waits for a JavaScript step to finish, asserting that the step finished
192 * instead of timing out. 192 * instead of timing out.
193 * @param webContents The WebContents for the tab the JavaScript step is in 193 * @param webContents The WebContents for the tab the JavaScript step is in
194 */ 194 */
195 protected void waitOnJavaScriptStep(WebContents webContents) { 195 protected void waitOnJavaScriptStep(WebContents webContents) {
196 assertTrue("Polling JavaScript boolean javascriptDone succeeded", 196 assertTrue("Polling JavaScript boolean javascriptDone timed out",
197 pollJavaScriptBoolean("javascriptDone", POLL_TIMEOUT_LONG_MS, we bContents)); 197 pollJavaScriptBoolean("javascriptDone", POLL_TIMEOUT_LONG_MS, we bContents));
198 // Reset the synchronization boolean 198 // Reset the synchronization boolean
199 runJavaScriptOrFail("javascriptDone = false", POLL_TIMEOUT_SHORT_MS, web Contents); 199 runJavaScriptOrFail("javascriptDone = false", POLL_TIMEOUT_SHORT_MS, web Contents);
200 } 200 }
201 201
202 /** 202 /**
203 * Executes a JavaScript step function using the given WebContents. 203 * Executes a JavaScript step function using the given WebContents.
204 * @param stepFunction The JavaScript step function to call 204 * @param stepFunction The JavaScript step function to call
205 * @param webContents The WebContents for the tab the JavaScript is in 205 * @param webContents The WebContents for the tab the JavaScript is in
206 */ 206 */
207 protected void executeStepAndWait(String stepFunction, WebContents webConten ts) { 207 protected void executeStepAndWait(String stepFunction, WebContents webConten ts) {
208 // Run the step and block 208 // Run the step and block
209 JavaScriptUtils.executeJavaScript(webContents, stepFunction); 209 JavaScriptUtils.executeJavaScript(webContents, stepFunction);
210 waitOnJavaScriptStep(webContents); 210 waitOnJavaScriptStep(webContents);
211 } 211 }
212 } 212 }
OLDNEW
« no previous file with comments | « no previous file | chrome/android/javatests/src/org/chromium/chrome/browser/vr_shell/WebVrTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698