Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(294)

Side by Side Diff: LayoutTests/http/tests/media/mixed-range-response.html

Issue 1226473002: Add LayoutTests for mixed range response handling. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <title>Mixed range responses must be handled as an error.</title>
2 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script>
4 <script src="../../media-resources/media-file.js"></script>
5 <body>
6 <script>
7 // This file tests the following behavior:
8 // 1. The audio element sends the first request.
9 // 2. mixed-range-response.php returns the first 3 bytes ("Ogg").
10 // 3. The element sends the second request with "Range: bytes=3-" header.
11 // 4. mixed-range-response.php returns 206 response.
12 // 5. The element sends the thired request to load-video.php.
13 // 6. load-video.php returns the audio file from the fourth byte.
14 //
15 // The original URLs of 2. (mixed-range-response.php) and 6. (load-video.php)
16 // are different. So an error should be occur.
17
18 async_test(function(t) {
19 var audio = document.createElement('audio');
20 audio.oncanplay = t.step_func(function() {
21 throw 'CanPlay event should not be fired.';
22 });
23 audio.onerror = t.step_func(function() {
24 t.done();
25 });
26 audio.src = './resources/mixed-range-response.php';
27 document.body.appendChild(audio);
28 });
29 </script>
30 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698