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;
import org.chromium.base.test.util.CallbackHelper;
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.UrlUtils;
import org.chromium.chrome.R;
......@@ -329,7 +328,6 @@ public class PhotoPickerDialogTest implements PhotoPickerListener, SelectionObse
@Test
@LargeTest
//@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 {
// Requesting to play a video is not a case of an accidental disk read on the UI thread.
StrictMode.ThreadPolicy oldPolicy = TestThreadUtils.runOnUiThreadBlocking(
......@@ -345,8 +343,8 @@ public class PhotoPickerDialogTest implements PhotoPickerListener, SelectionObse
View container = categoryView.findViewById(R.id.playback_container);
Assert.assertTrue(container.getVisibility() == View.GONE);
// This test video takes less than a second to play.
String fileName = "chrome/test/data/android/photo_picker/noogler.mp4";
// This test video takes one second to play.
String fileName = "chrome/test/data/android/photo_picker/noogler_1sec.mp4";
File file = new File(UrlUtils.getIsolatedTestFilePath(fileName));
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