Bug 85116 - Clean up media canPlayType() layout tests
: Clean up media canPlayType() layout tests
Status: RESOLVED FIXED
: WebKit
Media Elements
: 528+ (Nightly build)
: Unspecified Unspecified
: P2 Normal
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2012-04-27 18:36 PST by
Modified: 2012-05-02 00:02 PST (History)


Attachments
Patch (26.13 KB, patch)
2012-04-27 18:37 PST, Andrew Scherkus
eric.carlson: review+
Review Patch | Details | Formatted Diff | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2012-04-27 18:36:20 PST
They're a bit of mess and not all WebKit ports can take advantage of them.

I'm proposing the following:
  * Rename video-can-play-type.html to media-can-play-type.html
  * Move all format-specific tests out of video-can-play-type.html into format-specific tests
  * Add text to each test that says it's ok if the test fails if the port does not support the format
------- Comment #1 From 2012-04-27 18:37:32 PST -------
Created an attachment (id=139313) [details]
Patch
------- Comment #2 From 2012-04-27 18:39:10 PST -------
I did other misc cleanup such as:
  * Add <!DOCTYPE html>
  * Move <script> elements from head to body
  * Use <body onload="start()"> on all tests
  * Remove unneeded CSS styling on audio/video elements

I can totally understand if this makes it crazy hard to review CL and I'll revert said changes.
------- Comment #3 From 2012-04-28 14:10:33 PST -------
(From update of attachment 139313 [details])
View in context: https://bugs.webkit.org/attachment.cgi?id=139313&action=review

> LayoutTests/media/media-can-play-flac-audio.html:9
> +        <script src="video-test.js"></script>
>          <script>

Nit: why are these inside of the <body>? Here and in the rest of the tests?
------- Comment #4 From 2012-04-30 12:47:00 PST -------
(In reply to comment #3)
> (From update of attachment 139313 [details] [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=139313&action=review
> 
> > LayoutTests/media/media-can-play-flac-audio.html:9
> > +        <script src="video-test.js"></script>
> >          <script>
> 
> Nit: why are these inside of the <body>? Here and in the rest of the tests?

Bad habit I guess :)

I'm a script-before-the-closing-body-tag kinda guy (mostly so I can access DOM elements and attach handlers right away), but considering all of these tests use the body onload handler there's no reason not to stick them in <head>
------- Comment #5 From 2012-05-02 00:02:06 PST -------
Committed as http://trac.webkit.org/changeset/115798