mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +00:00
LibWeb: Test fetchPriority attribute on all elements
This commit is contained in:
parent
2fed064791
commit
1dda129fe1
Notes:
sideshowbarker
2024-07-16 22:54:10 +09:00
Author: https://github.com/jamierocks
Commit: 1dda129fe1
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/99
4 changed files with 43 additions and 23 deletions
22
Tests/LibWeb/Text/input/HTML/fetchPriority-attribute.html
Normal file
22
Tests/LibWeb/Text/input/HTML/fetchPriority-attribute.html
Normal file
|
@ -0,0 +1,22 @@
|
|||
<!DOCTYPE html>
|
||||
<script src="../include.js"></script>
|
||||
<script>
|
||||
test(() => {
|
||||
for (const elementName of ["link", "img", "script"]) {
|
||||
const element = document.createElement(elementName);
|
||||
println(`${elementName} fetchPriority initial value: ${element.fetchPriority}`);
|
||||
element.fetchPriority = "invalid";
|
||||
println(`${elementName} fetchPriority value after setting to "invalid": ${element.fetchPriority}`);
|
||||
element.fetchPriority = "high";
|
||||
println(`${elementName} fetchPriority value after setting to "high": ${element.fetchPriority}`);
|
||||
element.fetchPriority = null;
|
||||
println(`${elementName} fetchPriority value after setting to null: ${element.fetchPriority}`);
|
||||
element.fetchPriority = "HIGH";
|
||||
println(`${elementName} fetchPriority value after setting to "HIGH": ${element.fetchPriority}`);
|
||||
element.fetchPriority = "";
|
||||
println(`${elementName} fetchPriority value after setting to "": ${element.fetchPriority}`);
|
||||
element.removeAttribute("fetchPriority");
|
||||
println(`${elementName} fetchPriority value after calling removeAttribute: ${element.fetchPriority}`);
|
||||
}
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue