Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 1 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-load.html - WPT Dashboard Interop Dashboard
<!doctype html>
<title>invoking resource selection with load()</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id=log></div>
<script>
var v;
var t = async_test(function(t) {
v = document.createElement('video');
assert_equals(v.networkState, v.NETWORK_EMPTY, 'networkState after creating v');
v.load();
assert_equals(v.networkState, v.NETWORK_NO_SOURCE, 'networkState after v.load()');
});
</script>
<script>
t.step(function() {
assert_equals(v.networkState, v.NETWORK_EMPTY, 'networkState in separate script');
t.done();
});
</script>