Commit 04888f05 authored by Finnur Thorarinsson's avatar Finnur Thorarinsson Committed by Commit Bot

[Android] Photo Picker: Re-enable video test.

On Android P the onCompletion callback isn't called if the video
is super short (like fraction of a second).

Bug: 1046347, 895776, 656015
Change-Id: I77673d3045a4b5a89b679a0bc2cef34ab0bedb88
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2027789Reviewed-by: default avatarRayan Kanso <rayankans@chromium.org>
Commit-Queue: Finnur Thorarinsson <finnur@chromium.org>
Cr-Commit-Position: refs/heads/master@{#736843}
parent f5a4e592
...@@ -22,7 +22,6 @@ import org.junit.runner.RunWith; ...@@ -22,7 +22,6 @@ import org.junit.runner.RunWith;
import org.chromium.base.test.util.CallbackHelper; import org.chromium.base.test.util.CallbackHelper;
import org.chromium.base.test.util.CommandLineFlags; import org.chromium.base.test.util.CommandLineFlags;
import org.chromium.base.test.util.DisabledTest;
import org.chromium.base.test.util.MinAndroidSdkLevel; import org.chromium.base.test.util.MinAndroidSdkLevel;
import org.chromium.base.test.util.UrlUtils; import org.chromium.base.test.util.UrlUtils;
import org.chromium.chrome.R; import org.chromium.chrome.R;
...@@ -329,7 +328,6 @@ public class PhotoPickerDialogTest implements PhotoPickerListener, SelectionObse ...@@ -329,7 +328,6 @@ public class PhotoPickerDialogTest implements PhotoPickerListener, SelectionObse
@Test @Test
@LargeTest @LargeTest
//@DisableIf.Build(sdk_is_less_than = Build.VERSION_CODES.N) // Video is only supported on N+. //@DisableIf.Build(sdk_is_less_than = Build.VERSION_CODES.N) // Video is only supported on N+.
@DisabledTest(message = "crbug.com/1046347")
public void testVideoPlayerPlayAndRestart() throws Throwable { public void testVideoPlayerPlayAndRestart() throws Throwable {
// Requesting to play a video is not a case of an accidental disk read on the UI thread. // Requesting to play a video is not a case of an accidental disk read on the UI thread.
StrictMode.ThreadPolicy oldPolicy = TestThreadUtils.runOnUiThreadBlocking( StrictMode.ThreadPolicy oldPolicy = TestThreadUtils.runOnUiThreadBlocking(
...@@ -345,8 +343,8 @@ public class PhotoPickerDialogTest implements PhotoPickerListener, SelectionObse ...@@ -345,8 +343,8 @@ public class PhotoPickerDialogTest implements PhotoPickerListener, SelectionObse
View container = categoryView.findViewById(R.id.playback_container); View container = categoryView.findViewById(R.id.playback_container);
Assert.assertTrue(container.getVisibility() == View.GONE); Assert.assertTrue(container.getVisibility() == View.GONE);
// This test video takes less than a second to play. // This test video takes one second to play.
String fileName = "chrome/test/data/android/photo_picker/noogler.mp4"; String fileName = "chrome/test/data/android/photo_picker/noogler_1sec.mp4";
File file = new File(UrlUtils.getIsolatedTestFilePath(fileName)); File file = new File(UrlUtils.getIsolatedTestFilePath(fileName));
int callCount = onVideoEndedCallback.getCallCount(); int callCount = onVideoEndedCallback.getCallCount();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment