mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-02 14:19:15 +00:00
LibWeb: Added HTMLLinkElement.as Tests
This commit is contained in:
parent
2f4668edce
commit
7ac6fd2746
Notes:
sideshowbarker
2024-07-16 18:06:41 +09:00
Author: https://github.com/Hexeption
Commit: 7ac6fd2746
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/39
Reviewed-by: https://github.com/AtkinsSJ
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/nico
3 changed files with 19 additions and 21 deletions
|
@ -1,21 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Link AS test</title>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
var link = document.createElement('link');
|
||||
link.rel = 'stylesheet';
|
||||
link.href = 'https://fonts.googleapis.com/css?family=Roboto:400,700';
|
||||
link.as = 'style';
|
||||
|
||||
console.log("Link.as: " + link.as); // should be 'style'
|
||||
|
||||
link.as = 'uwu';
|
||||
|
||||
console.log("Link.as: " + link.as); // should be ''
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
2
Tests/LibWeb/Text/expected/link_as.txt
Normal file
2
Tests/LibWeb/Text/expected/link_as.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
Link.as: style
|
||||
Link.as: empty
|
17
Tests/LibWeb/Text/input/link_as.html
Normal file
17
Tests/LibWeb/Text/input/link_as.html
Normal file
|
@ -0,0 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<script src="include.js"></script>
|
||||
<script>
|
||||
test(() => {
|
||||
const link = document.createElement("link");
|
||||
link.as = "style"
|
||||
|
||||
println("Link.as: " + link.as)
|
||||
|
||||
link.as = "uwu"
|
||||
|
||||
if(link.as === "") {
|
||||
println("Link.as: empty")
|
||||
}
|
||||
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue