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

Side by Side Diff: android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenTest.java

Issue 691623002: [Android] Remove non-static version of TouchCommon. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 1 month 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/autofill/AutofillPopupTest.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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.android_webview.test; 5 package org.chromium.android_webview.test;
6 6
7 import android.test.suitebuilder.annotation.MediumTest; 7 import android.test.suitebuilder.annotation.MediumTest;
8 import android.view.View; 8 import android.view.View;
9 import android.view.ViewGroup; 9 import android.view.ViewGroup;
10 10
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 String testUrl = mTestContainerView.getAwContents().getUrl(); 244 String testUrl = mTestContainerView.getAwContents().getUrl();
245 if (VIDEO_INSIDE_DIV_TEST_URL.equals(testUrl)) { 245 if (VIDEO_INSIDE_DIV_TEST_URL.equals(testUrl)) {
246 // VIDEO_INSIDE_DIV_TEST_URL uses a custom play control with known i d. 246 // VIDEO_INSIDE_DIV_TEST_URL uses a custom play control with known i d.
247 DOMUtils.clickNode(this, mContentViewCore, CUSTOM_PLAY_CONTROL_ID); 247 DOMUtils.clickNode(this, mContentViewCore, CUSTOM_PLAY_CONTROL_ID);
248 } else if (VIDEO_TEST_URL.equals(testUrl) 248 } else if (VIDEO_TEST_URL.equals(testUrl)
249 && DOMUtils.isFullscreen(mContentViewCore.getWebContents())) { 249 && DOMUtils.isFullscreen(mContentViewCore.getWebContents())) {
250 // VIDEO_TEST_URL uses the standard html5 video controls. The standa rd 250 // VIDEO_TEST_URL uses the standard html5 video controls. The standa rd
251 // html5 controls are shadow html elements without any ids. In fulls creen we can still 251 // html5 controls are shadow html elements without any ids. In fulls creen we can still
252 // tap the play button because this is rendered in the center of the custom view. 252 // tap the play button because this is rendered in the center of the custom view.
253 // In embedded mode we don't have an easy way of retrieving its loca tion. 253 // In embedded mode we don't have an easy way of retrieving its loca tion.
254 TouchCommon touchCommon = new TouchCommon(AwContentsClientFullScreen Test.this); 254 TouchCommon.singleClickView(mContentsClient.getCustomView());
255 touchCommon.singleClickView(mContentsClient.getCustomView());
256 } else { 255 } else {
257 fail("Unable to tap standard html5 play control in embedded mode"); 256 fail("Unable to tap standard html5 play control in embedded mode");
258 } 257 }
259 } 258 }
260 259
261 /** 260 /**
262 * Asserts that the keep screen on property in the given {@code view} is act ive as 261 * Asserts that the keep screen on property in the given {@code view} is act ive as
263 * {@code expected}. It also verifies that it is only active when the video is playing. 262 * {@code expected}. It also verifies that it is only active when the video is playing.
264 */ 263 */
265 private void assertKeepScreenOnActive(final View view, final boolean expecte d) 264 private void assertKeepScreenOnActive(final View view, final boolean expecte d)
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 private void loadTestPageAndClickFullscreen(String videoTestUrl) throws Exce ption { 321 private void loadTestPageAndClickFullscreen(String videoTestUrl) throws Exce ption {
323 loadTestPage(videoTestUrl); 322 loadTestPage(videoTestUrl);
324 DOMUtils.clickNode(this, mContentViewCore, CUSTOM_FULLSCREEN_CONTROL_ID) ; 323 DOMUtils.clickNode(this, mContentViewCore, CUSTOM_FULLSCREEN_CONTROL_ID) ;
325 } 324 }
326 325
327 private void loadTestPage(String videoTestUrl) throws Exception { 326 private void loadTestPage(String videoTestUrl) throws Exception {
328 loadUrlSync(mTestContainerView.getAwContents(), 327 loadUrlSync(mTestContainerView.getAwContents(),
329 mContentsClient.getOnPageFinishedHelper(), videoTestUrl); 328 mContentsClient.getOnPageFinishedHelper(), videoTestUrl);
330 } 329 }
331 } 330 }
OLDNEW
« no previous file with comments | « no previous file | chrome/android/javatests/src/org/chromium/chrome/browser/autofill/AutofillPopupTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698