mirror of
https://github.com/servo/servo.git
synced 2025-07-13 02:13:40 +01:00
Update web-platform-tests to revision 000905d008db2538360020335bc2dbba16d322b5.
This commit is contained in:
parent
53d2432c90
commit
2d49203b9c
100 changed files with 3807 additions and 201 deletions
|
@ -0,0 +1,31 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>HTMLTextAreaElement Test: select event</title>
|
||||
<link rel="author" title="Intel" href="http://www.intel.com/">
|
||||
<meta name="flags" content="interact">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<p>Select any numberic characters in the text area below</p>
|
||||
|
||||
<form id="testForm" name="testForm">
|
||||
<textarea id="testtextarea">0123456789</textarea>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
|
||||
var textarea = document.getElementById("testtextarea");
|
||||
|
||||
setup({explicit_done : true});
|
||||
setup({explicit_timeout : true});
|
||||
|
||||
on_event(textarea, "select", function(evt) {
|
||||
test(function() {
|
||||
assert_greater_than(textarea.value.substring(textarea.selectionStart, textarea.selectionEnd).length, 0, "Check if select event captured when text selected");
|
||||
});
|
||||
done();
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<div id="log"></div>
|
|
@ -0,0 +1,13 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>HTMLTextAreaElement Test: select()</title>
|
||||
<link rel="author" title="Intel" href="http://www.intel.com/">
|
||||
<meta name="flags" content="interact">
|
||||
|
||||
<p>Test passes if content of the input area is selected</p>
|
||||
|
||||
<textarea id="test_obj">1234567</textarea>
|
||||
<script>
|
||||
var textarea = document.querySelector("#test_obj");
|
||||
textarea.select();
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue