| Index: android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenTest.java
|
| diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenTest.java
|
| index c54ca5d24a11def2447192783213f23ef8398328..7ea0f81d51c682a3a31196391b0c1c6ac4ca2246 100644
|
| --- a/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenTest.java
|
| +++ b/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenTest.java
|
| @@ -309,12 +309,11 @@ public class AwContentsClientFullScreenTest extends AwTestBase {
|
| // still there.
|
| DOMUtils.clickNode(this, mContentViewCore, CUSTOM_FULLSCREEN_CONTROL_ID);
|
| mContentsClient.waitForCustomViewShown();
|
| - View customView = mContentsClient.getCustomView();
|
| - assertKeepScreenOnActive(customView, true);
|
| + assertKeepScreenOnActive(mTestContainerView, true);
|
|
|
| // Pause the video and the power save blocker is gone.
|
| DOMUtils.pauseMedia(getWebContentsOnUiThread(), VIDEO_ID);
|
| - assertWaitForKeepScreenOnActive(customView, false);
|
| + assertWaitForKeepScreenOnActive(mTestContainerView, false);
|
|
|
| // Exit fullscreen and the power save blocker is still gone.
|
| DOMUtils.exitFullscreen(getWebContentsOnUiThread());
|
| @@ -340,7 +339,7 @@ public class AwContentsClientFullScreenTest extends AwTestBase {
|
| // still there.
|
| DOMUtils.exitFullscreen(getWebContentsOnUiThread());
|
| mContentsClient.waitForCustomViewHidden();
|
| - assertKeepScreenOnActive(mTestContainerView, true);
|
| + assertKeepScreenOnActive(customView, true);
|
| }
|
|
|
| private void tapPlayButton() throws Exception {
|
| @@ -402,8 +401,8 @@ public class AwContentsClientFullScreenTest extends AwTestBase {
|
| }
|
|
|
| private boolean getKeepScreenOnOnUiThread(View view) {
|
| - // The power save blocker is added to a child anchor view,
|
| - // so we need to traverse the hierarchy.
|
| + // The power save blocker is added to the container view.
|
| + // Search the view hierarchy for it.
|
| if (view instanceof ViewGroup) {
|
| ViewGroup viewGroup = (ViewGroup) view;
|
| for (int i = 0; i < viewGroup.getChildCount(); i++) {
|
|
|