Bug 99398 - Clean up some Media Source test cases implementation.
Summary: Clean up some Media Source test cases implementation.
Status: UNCONFIRMED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-15 17:41 PDT by Anand Chakravarty
Modified: 2012-10-15 17:41 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anand Chakravarty 2012-10-15 17:41:55 PDT
Some of the implemented test cases for the Media Source API have tests/functions that perform multiple actions. For easier tracking of test case coverage/failures and ease of maintenance, it would be good to better focus these test cases so that each test case implements only a specific scenario and not overload their purpose. 

A good candidate for reducing test case overloading is video-media-source-state-changes.html. It verifies multiple state transitions and it would be better to have a separate test for each set of state transitions we want to verify. 

An example where a test does more than it probably should is video-media-source-objects.html. This test, in addition to verifying the type and contents of different objects, also verifies that calls to append and buffered throws an error after SourceBuffer has been removed, and there is also another seemingly unnecessary check, for performing addSourceBuffer on a close media source, in the afterSourceBufferRemoved function. These extra checks are better implemented as separate test cases or, if they are already implemented elsewhere, just removed from this test to avoid duplication.