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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/wpt/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-remove-source.html

Issue 2020943002: update-w3c-deps: Do not modify testharness tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
1 <!doctype html> 1 <!doctype html>
2 <title>Changes to networkState when inserting and removing a &lt;source></title> 2 <title>Changes to networkState when inserting and removing a &lt;source></title>
3 <script src="/resources/testharness.js"></script> 3 <script src="/resources/testharness.js"></script>
4 <script src="/resources/testharnessreport.js"></script> 4 <script src="/resources/testharnessreport.js"></script>
5 <div id=log></div> 5 <div id=log></div>
6 <script> 6 <script>
7 var v; 7 var v;
8 var t = async_test(function(t) { 8 var t = async_test(function(t) {
9 v = document.createElement('video'); 9 v = document.createElement('video');
10 assert_equals(v.networkState, v.NETWORK_EMPTY, 'networkState when creating the element'); 10 assert_equals(v.networkState, v.NETWORK_EMPTY, 'networkState when creating the element');
11 v.appendChild(document.createElement('source')); // runs resource selection al gorithm 11 v.appendChild(document.createElement('source')); // runs resource selection al gorithm
12 assert_equals(v.networkState, v.NETWORK_NO_SOURCE, 'networkState when insertin g a source element'); 12 assert_equals(v.networkState, v.NETWORK_NO_SOURCE, 'networkState when insertin g a source element');
13 v.removeChild(v.firstChild); 13 v.removeChild(v.firstChild);
14 assert_equals(v.networkState, v.NETWORK_NO_SOURCE, 'networkState after removin g the source element'); 14 assert_equals(v.networkState, v.NETWORK_NO_SOURCE, 'networkState after removin g the source element');
15 }); 15 });
16 </script> 16 </script>
17 <!-- now resource selection will continue its sync section (the </script> tag b elow provides a stable state) --> 17 <!-- now resource selection will continue its sync section (the </script> tag be low provides a stable state) -->
18 <!-- will find neither src nor source, so sets networkState to NETWORK_EMPTY - -> 18 <!-- will find neither src nor source, so sets networkState to NETWORK_EMPTY -->
19 <script> 19 <script>
20 t.step(function() { 20 t.step(function() {
21 assert_equals(v.networkState, v.NETWORK_EMPTY, 'networkState after letting the sync section of resource selection run'); 21 assert_equals(v.networkState, v.NETWORK_EMPTY, 'networkState after letting the sync section of resource selection run');
22 t.done(); 22 t.done();
23 }); 23 });
24 </script> 24 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698