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

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

Issue 425343002: [Android WebView] API to enable fullscreen. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update AwContentsClientGetVideoLoadingProgressViewTest Created 6 years, 4 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 | Annotate | Revision Log
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.SmallTest; 7 import android.test.suitebuilder.annotation.SmallTest;
8 import android.view.View; 8 import android.view.View;
9 9
10 import org.chromium.android_webview.AwContents; 10 import org.chromium.android_webview.AwContents;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 protected View getVideoLoadingProgressView() { 55 protected View getVideoLoadingProgressView() {
56 View view = new View(getInstrumentation().getTargetConte xt()); 56 View view = new View(getInstrumentation().getTargetConte xt());
57 view.addOnAttachStateChangeListener( 57 view.addOnAttachStateChangeListener(
58 AwContentsClientGetVideoLoadingProgressViewTest. this); 58 AwContentsClientGetVideoLoadingProgressViewTest. this);
59 return view; 59 return view;
60 } 60 }
61 }; 61 };
62 final AwTestContainerView testContainerView = 62 final AwTestContainerView testContainerView =
63 createAwTestContainerViewOnMainSync(contentsClient); 63 createAwTestContainerViewOnMainSync(contentsClient);
64 final AwContents awContents = testContainerView.getAwContents(); 64 final AwContents awContents = testContainerView.getAwContents();
65 awContents.getSettings().setFullscreenSupported(true);
65 enableJavaScriptOnUiThread(awContents); 66 enableJavaScriptOnUiThread(awContents);
66 VideoTestWebServer webServer = new VideoTestWebServer( 67 VideoTestWebServer webServer = new VideoTestWebServer(
67 getInstrumentation().getTargetContext()); 68 getInstrumentation().getTargetContext());
68 try { 69 try {
69 loadUrlSync(awContents, contentsClient.getOnPageFinishedHelper(), 70 loadUrlSync(awContents, contentsClient.getOnPageFinishedHelper(),
70 webServer.getFullScreenVideoTestURL()); 71 webServer.getFullScreenVideoTestURL());
71 Thread.sleep(5 * 1000); 72 Thread.sleep(5 * 1000);
72 TouchCommon touchCommon = new TouchCommon(this); 73 TouchCommon touchCommon = new TouchCommon(this);
73 touchCommon.singleClickView(testContainerView); 74 touchCommon.singleClickView(testContainerView);
74 waitForViewAttached(); 75 waitForViewAttached();
75 } finally { 76 } finally {
76 if (webServer != null) webServer.getTestWebServer().shutdown(); 77 if (webServer != null) webServer.getTestWebServer().shutdown();
77 } 78 }
78 } 79 }
79 } 80 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698