mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
LibWeb: Added HTMLLinkElement.as Tests
This commit is contained in:
@@ -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>
|
||||||
Reference in New Issue
Block a user