| Index: LayoutTests/http/tests/media/mixed-range-response.html
|
| diff --git a/LayoutTests/http/tests/media/mixed-range-response.html b/LayoutTests/http/tests/media/mixed-range-response.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..3d7ea641fe03b3330e3c075fe03e8cc0cffd5412
|
| --- /dev/null
|
| +++ b/LayoutTests/http/tests/media/mixed-range-response.html
|
| @@ -0,0 +1,30 @@
|
| +<title>Mixed range responses must be handled as an error.</title>
|
| +<script src="../resources/testharness.js"></script>
|
| +<script src="../resources/testharnessreport.js"></script>
|
| +<script src="../../media-resources/media-file.js"></script>
|
| +<body>
|
| +<script>
|
| +// This file tests the following behavior:
|
| +// 1. The audio element sends the first request.
|
| +// 2. mixed-range-response.php returns the first 3 bytes ("Ogg").
|
| +// 3. The element sends the second request with "Range: bytes=3-" header.
|
| +// 4. mixed-range-response.php returns 206 response.
|
| +// 5. The element sends the thired request to load-video.php.
|
| +// 6. load-video.php returns the audio file from the fourth byte.
|
| +//
|
| +// The original URLs of 2. (mixed-range-response.php) and 6. (load-video.php)
|
| +// are different. So an error should be occur.
|
| +
|
| +async_test(function(t) {
|
| + var audio = document.createElement('audio');
|
| + audio.oncanplay = t.step_func(function() {
|
| + throw 'CanPlay event should not be fired.';
|
| + });
|
| + audio.onerror = t.step_func(function() {
|
| + t.done();
|
| + });
|
| + audio.src = './resources/mixed-range-response.php';
|
| + document.body.appendChild(audio);
|
| +});
|
| +</script>
|
| +</body>
|
|
|