-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
Blink/WebKit has a bug here and fails the last two parser tests.
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<!doctype html> | ||
<title>muted</title> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="/common/media.js"></script> | ||
<style>video { display: none; }</style> | ||
<div id=log></div> | ||
|
||
<!-- These tests are inside <video> so that the steps for updating the | ||
muted IDL attribute cannot be delayed until </video>. --> | ||
|
||
<video id=v1> | ||
<script> | ||
test(function() { | ||
var v = document.getElementById('v1'); | ||
assert_false(v.muted); | ||
}, 'muted for parser-created video'); | ||
</script> | ||
</video> | ||
|
||
<video id=v2 muted> | ||
<script> | ||
test(function() { | ||
var v = document.getElementById('v2'); | ||
assert_true(v.muted); | ||
}, 'muted for parser-created video with muted attribute'); | ||
</script> | ||
</video> | ||
|
||
<!-- Negative test to ensure that the load algorithm does not update the | ||
muted IDL attribute to match the content attribute. --> | ||
|
||
<video id=v3 muted></video> | ||
<script> | ||
async_test(function(t) { | ||
var v = document.getElementById('v3'); | ||
assert_true(v.muted); | ||
v.muted = false; | ||
v.src = 'data:,'; // invokes load() | ||
v.addEventListener('error', t.step_func(function() { | ||
assert_false(v.muted); | ||
t.done(); | ||
})); | ||
}, 'muted for parser-created video with muted attribute after load'); | ||
</script> | ||
|
||
<!-- Negative tests for script-created elements, where the muted content | ||
attribute should have no effect. --> | ||
|
||
<script> | ||
test(function() { | ||
var v = document.createElement('video'); | ||
assert_false(v.muted); | ||
}, 'muted for script-created video'); | ||
|
||
test(function() { | ||
var v = document.createElement('video'); | ||
v.setAttribute('muted', ''); | ||
assert_false(v.muted); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
foolip
Author
Owner
|
||
}, 'muted for script-created video with muted attribute'); | ||
</script> |
Since you have set muted attribute, here should be assert_true(v.muted) ?