[aw] Fullscreen tests for non-media elements.
It is very common to go fullscreen on a div
containing a video element with custom html controls,
so we test that scenario.
We also rename AwContentsClientFullScreenVideoTest to
AwContentsClientFullScreenTest as this class is now testing
the fullscreen API for all types of elements.
This change depends on:
https://codereview.chromium.org/618013003/
BUG=398485
Committed: https://crrev.com/2d50461c7f3a529c880bdab509d9d560a047890c
Cr-Commit-Position: refs/heads/master@{#300110}
6 years, 2 months ago
(2014-10-08 17:00:38 UTC)
#2
mkosiba (inactive)
https://codereview.chromium.org/639923003/diff/1/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenVideoInsideDivTest.java File android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenVideoInsideDivTest.java (right): https://codereview.chromium.org/639923003/diff/1/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenVideoInsideDivTest.java#newcode19 android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenVideoInsideDivTest.java:19: * div elements, in this case a div containing ...
6 years, 2 months ago
(2014-10-09 11:47:51 UTC)
#3
https://codereview.chromium.org/639923003/diff/1/android_webview/javatests/sr...
File
android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenVideoInsideDivTest.java
(right):
https://codereview.chromium.org/639923003/diff/1/android_webview/javatests/sr...
android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenVideoInsideDivTest.java:19:
* div elements, in this case a div containing a video.
Unfortunately experience shows that reusing test code via inheritance does not
work.
The way we've been handling this kind of problem till now is by extracting the
common code to a
private void doTest...(args) {...}
method and then having either multiple test methods call that method with
different params or (less preferred) having one test method call all of the
doTest variants with different params.
It's not very elegant and does create some duplication in test method
declarations. I'm open to other suggestions that don't involve inheritance :)
Ignacio Solla
Please not that I have also renamed AwContentsClientFullScreenVideoTest to AwContentsClientFullScreenTest as this class is now ...
6 years, 2 months ago
(2014-10-09 15:12:26 UTC)
#4
Please not that I have also renamed AwContentsClientFullScreenVideoTest to
AwContentsClientFullScreenTest as this class is now testing the fullscreen API
for all types of elements, not just video.
https://codereview.chromium.org/639923003/diff/1/android_webview/javatests/sr...
File
android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenVideoInsideDivTest.java
(right):
https://codereview.chromium.org/639923003/diff/1/android_webview/javatests/sr...
android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenVideoInsideDivTest.java:19:
* div elements, in this case a div containing a video.
On 2014/10/09 11:47:51, mkosiba wrote:
> Unfortunately experience shows that reusing test code via inheritance does not
> work.
>
> The way we've been handling this kind of problem till now is by extracting the
> common code to a
>
> private void doTest...(args) {...}
>
> method and then having either multiple test methods call that method with
> different params or (less preferred) having one test method call all of the
> doTest variants with different params.
>
> It's not very elegant and does create some duplication in test method
> declarations. I'm open to other suggestions that don't involve inheritance :)
Ok, as discussed offline I have chosen the doTest approach.
mkosiba (inactive)
thanks! LGTM https://codereview.chromium.org/639923003/diff/20001/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenTest.java File android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenTest.java (right): https://codereview.chromium.org/639923003/diff/20001/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenTest.java#newcode117 android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenTest.java:117: assertTrue(onPlayObserver.waitForEvent(2000)); any reason not to use AwTestBase.WAIT_TIMEOUT_MS? ...
6 years, 2 months ago
(2014-10-09 15:18:54 UTC)
#5
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/18062)
6 years, 2 months ago
(2014-10-16 16:01:30 UTC)
#10
Issue 639923003: [aw] Fullscreen tests for non-media elements.
(Closed)
Created 6 years, 2 months ago by Ignacio Solla
Modified 6 years, 2 months ago
Reviewers: mkosiba (inactive)
Base URL: https://chromium.googlesource.com/chromium/src.git@fullscreenNonMediaForReview
Comments: 8