mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-02 06:09:08 +00:00
LibWeb: Import setCustomValidity related tests
This commit is contained in:
parent
a8004a77bb
commit
96bb250a4a
Notes:
github-actions[bot]
2025-02-18 17:18:04 +00:00
Author: https://github.com/Psychpsyo
Commit: 96bb250a4a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3587
Reviewed-by: https://github.com/ADKaster ✅
10 changed files with 115 additions and 0 deletions
|
@ -0,0 +1,6 @@
|
||||||
|
Harness status: OK
|
||||||
|
|
||||||
|
Found 1 tests
|
||||||
|
|
||||||
|
1 Pass
|
||||||
|
Pass object setCustomValidity is correct
|
|
@ -0,0 +1,6 @@
|
||||||
|
Harness status: OK
|
||||||
|
|
||||||
|
Found 1 tests
|
||||||
|
|
||||||
|
1 Pass
|
||||||
|
Pass button setCustomValidity is correct
|
|
@ -0,0 +1,6 @@
|
||||||
|
Harness status: OK
|
||||||
|
|
||||||
|
Found 1 tests
|
||||||
|
|
||||||
|
1 Pass
|
||||||
|
Pass input setCustomValidity is correct
|
|
@ -0,0 +1,6 @@
|
||||||
|
Harness status: OK
|
||||||
|
|
||||||
|
Found 1 tests
|
||||||
|
|
||||||
|
1 Pass
|
||||||
|
Pass output setCustomValidity is correct
|
|
@ -0,0 +1,6 @@
|
||||||
|
Harness status: OK
|
||||||
|
|
||||||
|
Found 1 tests
|
||||||
|
|
||||||
|
1 Pass
|
||||||
|
Pass textarea setCustomValidity is correct
|
|
@ -0,0 +1,17 @@
|
||||||
|
<!DOCTYPE HTML>
|
||||||
|
<title>object setCustomValidity</title>
|
||||||
|
<script src="../../../../resources/testharness.js"></script>
|
||||||
|
<script src="../../../../resources/testharnessreport.js"></script>
|
||||||
|
|
||||||
|
<object id='object_test'></object>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
test(() => {
|
||||||
|
let elem = document.getElementById("object_test");
|
||||||
|
assert_false(elem.validity.customError);
|
||||||
|
elem.setCustomValidity("custom error");
|
||||||
|
assert_true(elem.validity.customError);
|
||||||
|
}, "object setCustomValidity is correct")
|
||||||
|
|
||||||
|
</script>
|
|
@ -0,0 +1,17 @@
|
||||||
|
<!DOCTYPE HTML>
|
||||||
|
<title>button setCustomValidity</title>
|
||||||
|
<script src="../../../../resources/testharness.js"></script>
|
||||||
|
<script src="../../../../resources/testharnessreport.js"></script>
|
||||||
|
|
||||||
|
<button id='button_test'></button>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
test(() => {
|
||||||
|
let elem = document.getElementById("button_test");
|
||||||
|
assert_false(elem.validity.customError);
|
||||||
|
elem.setCustomValidity("custom error");
|
||||||
|
assert_true(elem.validity.customError);
|
||||||
|
}, "button setCustomValidity is correct")
|
||||||
|
|
||||||
|
</script>
|
|
@ -0,0 +1,17 @@
|
||||||
|
<!DOCTYPE HTML>
|
||||||
|
<title>input setCustomValidity</title>
|
||||||
|
<script src="../../../../resources/testharness.js"></script>
|
||||||
|
<script src="../../../../resources/testharnessreport.js"></script>
|
||||||
|
|
||||||
|
<input id='input_test'>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
test(() => {
|
||||||
|
let elem = document.getElementById("input_test");
|
||||||
|
assert_false(elem.validity.customError);
|
||||||
|
elem.setCustomValidity("custom error");
|
||||||
|
assert_true(elem.validity.customError);
|
||||||
|
}, "input setCustomValidity is correct")
|
||||||
|
|
||||||
|
</script>
|
|
@ -0,0 +1,17 @@
|
||||||
|
<!DOCTYPE HTML>
|
||||||
|
<title>output setCustomValidity</title>
|
||||||
|
<script src="../../../../resources/testharness.js"></script>
|
||||||
|
<script src="../../../../resources/testharnessreport.js"></script>
|
||||||
|
|
||||||
|
<output id='output_test'></output>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
test(() => {
|
||||||
|
let elem = document.getElementById("output_test");
|
||||||
|
assert_false(elem.validity.customError);
|
||||||
|
elem.setCustomValidity("custom error");
|
||||||
|
assert_true(elem.validity.customError);
|
||||||
|
}, "output setCustomValidity is correct")
|
||||||
|
|
||||||
|
</script>
|
|
@ -0,0 +1,17 @@
|
||||||
|
<!DOCTYPE HTML>
|
||||||
|
<title>textarea setCustomValidity</title>
|
||||||
|
<script src="../../../../resources/testharness.js"></script>
|
||||||
|
<script src="../../../../resources/testharnessreport.js"></script>
|
||||||
|
|
||||||
|
<textarea id='textarea_test'></textarea>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
test(() => {
|
||||||
|
let elem = document.getElementById("textarea_test");
|
||||||
|
assert_false(elem.validity.customError);
|
||||||
|
elem.setCustomValidity("custom error");
|
||||||
|
assert_true(elem.validity.customError);
|
||||||
|
}, "textarea setCustomValidity is correct")
|
||||||
|
|
||||||
|
</script>
|
Loading…
Add table
Add a link
Reference in a new issue