mirror of
https://github.com/servo/servo.git
synced 2025-08-26 23:58:20 +01:00
Update web-platform-tests to revision 36634cbcf3253dfe8d220990a27ad4eeebf8ec2f
This commit is contained in:
parent
0964d055cd
commit
7295abcc2a
245 changed files with 5966 additions and 1901 deletions
|
@ -0,0 +1,30 @@
|
|||
<!DOCTYPE html>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<!--
|
||||
This test is adopted from Olli Pettay's test case at
|
||||
http://mozilla.pettay.fi/shadow_focus.html
|
||||
-->
|
||||
<div id="host"></div>
|
||||
<input id="lightInput">
|
||||
<script>
|
||||
const root = host.attachShadow({ mode: "closed" });
|
||||
root.innerHTML = "<input id='shadowInput'>";
|
||||
|
||||
async_test((test) => {
|
||||
root.getElementById("shadowInput").focus();
|
||||
window.addEventListener("focus", test.step_func_done((e) => {
|
||||
assert_equals(e.relatedTarget, host);
|
||||
}, "relatedTarget should be pointing to shadow host."), true);
|
||||
lightInput.focus();
|
||||
}, "relatedTarget should not leak at capturing phase, at window object.");
|
||||
|
||||
async_test((test) => {
|
||||
root.getElementById("shadowInput").focus();
|
||||
lightInput.addEventListener("focus", test.step_func_done((e) => {
|
||||
assert_equals(e.relatedTarget, host);
|
||||
}, "relatedTarget should be pointing to shadow host."), true);
|
||||
lightInput.focus();
|
||||
}, "relatedTarget should not leak at target.");
|
||||
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue