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

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

Issue 13907007: Replace merge-ui-and-compositor-threads flag with no-merge-ui-and-compositor-threads flag (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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.KeyEvent; 8 import android.view.KeyEvent;
9 9
10 import org.chromium.android_webview.test.util.VideoTestWebServer; 10 import org.chromium.android_webview.test.util.VideoTestWebServer;
11 import org.chromium.base.test.util.DisabledTest;
11 import org.chromium.base.test.util.Feature; 12 import org.chromium.base.test.util.Feature;
12 import org.chromium.content.browser.test.util.TouchCommon; 13 import org.chromium.content.browser.test.util.TouchCommon;
13 14
14 /** 15 /**
15 * Test WebChromeClient::onShow/HideCustomView. 16 * Test WebChromeClient::onShow/HideCustomView.
16 */ 17 */
17 public class AwContentsClientFullScreenVideoTest extends AwTestBase { 18 public class AwContentsClientFullScreenVideoTest extends AwTestBase {
18 19
19 @Feature({"AndroidWebView"}) 20 /**
20 @SmallTest 21 * @Feature({"AndroidWebView"})
22 * @SmallTest
23 *
24 * http://crbug.com/238735
25 */
26 @DisabledTest
21 public void testOnShowAndHideCustomView() throws Throwable { 27 public void testOnShowAndHideCustomView() throws Throwable {
22 FullScreenVideoTestAwContentsClient contentsClient = 28 FullScreenVideoTestAwContentsClient contentsClient =
23 new FullScreenVideoTestAwContentsClient(getActivity()); 29 new FullScreenVideoTestAwContentsClient(getActivity());
24 AwTestContainerView testContainerView = 30 AwTestContainerView testContainerView =
25 createAwTestContainerViewOnMainSync(contentsClient); 31 createAwTestContainerViewOnMainSync(contentsClient);
26 enableJavaScriptOnUiThread(testContainerView.getAwContents()); 32 enableJavaScriptOnUiThread(testContainerView.getAwContents());
27 VideoTestWebServer webServer = new VideoTestWebServer( 33 VideoTestWebServer webServer = new VideoTestWebServer(
28 getInstrumentation().getTargetContext()); 34 getInstrumentation().getTargetContext());
29 try { 35 try {
30 loadUrlSync(testContainerView.getAwContents(), 36 loadUrlSync(testContainerView.getAwContents(),
31 contentsClient.getOnPageFinishedHelper(), 37 contentsClient.getOnPageFinishedHelper(),
32 webServer.getFullScreenVideoTestURL()); 38 webServer.getFullScreenVideoTestURL());
33 Thread.sleep(5 * 1000); 39 Thread.sleep(5 * 1000);
34 TouchCommon touchCommon = new TouchCommon(this); 40 TouchCommon touchCommon = new TouchCommon(this);
35 touchCommon.singleClickView(testContainerView); 41 touchCommon.singleClickView(testContainerView);
36 contentsClient.waitForCustomViewShown(); 42 contentsClient.waitForCustomViewShown();
37 getInstrumentation().sendKeyDownUpSync(KeyEvent.KEYCODE_BACK); 43 getInstrumentation().sendKeyDownUpSync(KeyEvent.KEYCODE_BACK);
38 contentsClient.waitForCustomViewHidden(); 44 contentsClient.waitForCustomViewHidden();
39 } 45 }
40 finally { 46 finally {
41 if (webServer != null) webServer.getTestWebServer().shutdown(); 47 if (webServer != null) webServer.getTestWebServer().shutdown();
42 } 48 }
43 } 49 }
44 } 50 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698