mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
090dbac5a3
This reverts commit e52c30cbd5
.
It's highly possible that this test was flaky on CI due to mixing units
of seconds and milliseconds in the transient activation calculation.
Revert the workaround for that commit in an attempt to avoid needless
ad-hoc behavior.
26 lines
733 B
HTML
26 lines
733 B
HTML
<button id="button"></button>
|
|
<script src="include.js"></script>
|
|
<script type="text/javascript">
|
|
function writeText(onComplete) {
|
|
navigator.clipboard.writeText("Well hello friends :^)").then(
|
|
() => {
|
|
println("Success");
|
|
onComplete();
|
|
},
|
|
() => {
|
|
println("Failure");
|
|
onComplete();
|
|
}
|
|
);
|
|
}
|
|
|
|
asyncTest((done) => {
|
|
writeText(() => {
|
|
const button = document.getElementById("button");
|
|
internals.dispatchUserActivatedEvent(button, new Event("mousedown"));
|
|
button.dispatchEvent(new Event("click"));
|
|
|
|
writeText(done);
|
|
});
|
|
});
|
|
</script>
|