qutebrowser/tests/end2end/data/paste_primary.html
Florian Bruhin b645a88ade Stabilize :insert-text tests
With QtWebEngine, inserting text into the field is async, so if our
test runs too fast, it would fail. Now we instead log stuff via JS on
changes insteaad, and wait for those log messages in the tests.
2016-09-12 15:25:03 +02:00

26 lines
852 B
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Paste primary selection</title>
<script type="text/javascript">
function setup_event_listener() {
var textarea = document.getElementById('qute-textarea');
textarea.addEventListener('input', function() {
console.log("textarea contents: " + textarea.value);
});
}
function set_text(value) {
var textarea = document.getElementById('qute-textarea');
textarea.value = value;
console.log("textarea set to: " + value);
}
</script>
</head>
<body onload="setup_event_listener()">
<textarea id="qute-textarea"></textarea>
<textarea id="qute-textarea-noedit" readonly></textarea>
</body>
</html>