Revision 71b44f991df620aa9c06497b4049e720d1bce3aa authored by Raphael Kubo da Costa on 13 March 2018, 09:07:09 UTC, committed by Wanming Lin on 13 March 2018, 09:07:09 UTC
Call it `OrientationSensorLocalCoordinateSystem` per w3c/orientation-sensor#56.
1 parent 8f7d065
clipboard-events-synthetic.html
<!DOCTYPE html>
<title>synthetic clipboard events should not be composed</title>
<link rel="help" href="https://w3c.github.io/clipboard-apis/#clipboard-event-copy">
<link rel="help" href="https://w3c.github.io/clipboard-apis/#clipboard-event-cut">
<link rel="help" href="https://w3c.github.io/clipboard-apis/#clipboard-event-paste">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id=log></div>
<script>
const EVENTS = [ 'copy', 'cut', 'paste' ];
EVENTS.forEach(name => {
function testEvent(name, init, composed_flag_expectation, name) {
async_test(function(test) {
document.addEventListener(name, test.step_func_done((e) => {
assert_false(e.isTrusted, `synthetic ${name} event is untrusted`);
assert_equals(e.composed, composed_flag_expectation,
`composed flag should be ${composed_flag_expectation}`);
}));
let event = new ClipboardEvent(name, init);
document.dispatchEvent(event);
}, name);
}
testEvent(name, { bubbles: true, cancellable: true}, false,
`Unspecified synthetic ${name} event should not be composed.`);
testEvent(name, { bubbles: true, cancelable: true, composed: true }, true,
`Synthetic ${name} event can be explicitly composed.`);
testEvent(name, { bubbles: true, cancelable: true, composed: false }, false,
`Synthetic ${name} event can be explicitly uncomposed.`);
});
</script>
Computing file changes ...