Revision eb9f8a917a751b5bd2e4ed86840eac8b5c4445f2 authored by Brian Birtles on 15 March 2018, 06:57:09 UTC, committed by Brian Birtles on 15 March 2018, 06:57:09 UTC
This patch also drops the test that an AnimationEffectTiming object is
created in the appropriate realm since it is no longer the case that
a separate timing object is created.
1 parent df2153f
Raw File
pointerlock_remove_target_on_mouseup-manual.html
<!DOCTYPE html>
<meta charset="utf-8">
<title>Remove PointerLock target on mouseup</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<p>Click anywhere to run the test. If a "PASS" result appears the test passes, otherwise it fails</p>
<div id="target"></div>
<script>
async_test(t => {
    const target = document.getElementById('target');
    document.addEventListener('mousedown', t.step_func(() => {
        target.requestPointerLock();
        document.addEventListener('mouseup', t.step_func(() => {
            target.remove();
            assert_true(document.pointerLockElement === null, 'Pointer lock exited!');
            t.done();
        }));
    }));
})
</script>
back to top