forked from LadybirdBrowser/ladybird
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tests: Add vendor-specific testdriver
send_keys()
function
This uses the `Internals.sendText()` function.
- Loading branch information
Showing
3 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
Tests/LibWeb/Text/expected/wpt-import/infrastructure/testdriver/send_keys.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Harness status: OK | ||
|
||
Found 1 tests | ||
|
||
1 Pass | ||
Pass TestDriver send keys method |
23 changes: 23 additions & 0 deletions
23
Tests/LibWeb/Text/input/wpt-import/infrastructure/testdriver/send_keys.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<!DOCTYPE html> | ||
<meta charset="utf-8"> | ||
<title>TestDriver send keys method</title> | ||
<script src="../../resources/testharness.js"></script> | ||
<script src="../../resources/testharnessreport.js"></script> | ||
<script src="../../resources/testdriver.js"></script> | ||
<script src="../../resources/testdriver-vendor.js"></script> | ||
|
||
<input type="text" id="text">Text Input</button> | ||
|
||
<script> | ||
async_test(t => { | ||
let input_text = "Hello, wpt!"; | ||
let text_box = document.getElementById("text"); | ||
test_driver | ||
.send_keys(text_box, input_text) | ||
.then(() => { | ||
assert_equals(text_box.value, input_text); | ||
t.done(); | ||
}) | ||
.catch(t.unreached_func("send keys failed")); | ||
}); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters