mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-03 14:50:18 +00:00
Tests: Import WPT test for DOMTokenList coverage on attributes
This commit is contained in:
parent
5a4d657a4e
commit
061ac1f8c7
Notes:
github-actions[bot]
2024-11-17 21:14:00 +00:00
Author: https://github.com/shannonbooth
Commit: 061ac1f8c7
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2404
2 changed files with 241 additions and 0 deletions
|
@ -0,0 +1,186 @@
|
||||||
|
Summary
|
||||||
|
|
||||||
|
Harness status: OK
|
||||||
|
|
||||||
|
Rerun
|
||||||
|
|
||||||
|
Found 175 tests
|
||||||
|
|
||||||
|
173 Pass
|
||||||
|
2 Fail
|
||||||
|
Details
|
||||||
|
Result Test Name MessagePass a.classList in http://www.w3.org/1999/xhtml namespace should be DOMTokenList.
|
||||||
|
Pass area.classList in http://www.w3.org/1999/xhtml namespace should be DOMTokenList.
|
||||||
|
Pass link.classList in http://www.w3.org/1999/xhtml namespace should be DOMTokenList.
|
||||||
|
Pass iframe.classList in http://www.w3.org/1999/xhtml namespace should be DOMTokenList.
|
||||||
|
Pass output.classList in http://www.w3.org/1999/xhtml namespace should be DOMTokenList.
|
||||||
|
Pass td.classList in http://www.w3.org/1999/xhtml namespace should be DOMTokenList.
|
||||||
|
Pass th.classList in http://www.w3.org/1999/xhtml namespace should be DOMTokenList.
|
||||||
|
Pass a.classList in http://www.w3.org/2000/svg namespace should be DOMTokenList.
|
||||||
|
Pass area.classList in http://www.w3.org/2000/svg namespace should be DOMTokenList.
|
||||||
|
Pass link.classList in http://www.w3.org/2000/svg namespace should be DOMTokenList.
|
||||||
|
Pass iframe.classList in http://www.w3.org/2000/svg namespace should be DOMTokenList.
|
||||||
|
Pass output.classList in http://www.w3.org/2000/svg namespace should be DOMTokenList.
|
||||||
|
Pass td.classList in http://www.w3.org/2000/svg namespace should be DOMTokenList.
|
||||||
|
Pass th.classList in http://www.w3.org/2000/svg namespace should be DOMTokenList.
|
||||||
|
Pass a.classList in http://www.w3.org/1998/Math/MathML namespace should be DOMTokenList.
|
||||||
|
Pass area.classList in http://www.w3.org/1998/Math/MathML namespace should be DOMTokenList.
|
||||||
|
Pass link.classList in http://www.w3.org/1998/Math/MathML namespace should be DOMTokenList.
|
||||||
|
Pass iframe.classList in http://www.w3.org/1998/Math/MathML namespace should be DOMTokenList.
|
||||||
|
Pass output.classList in http://www.w3.org/1998/Math/MathML namespace should be DOMTokenList.
|
||||||
|
Pass td.classList in http://www.w3.org/1998/Math/MathML namespace should be DOMTokenList.
|
||||||
|
Pass th.classList in http://www.w3.org/1998/Math/MathML namespace should be DOMTokenList.
|
||||||
|
Pass a.classList in http://example.com/ namespace should be DOMTokenList.
|
||||||
|
Pass area.classList in http://example.com/ namespace should be DOMTokenList.
|
||||||
|
Pass link.classList in http://example.com/ namespace should be DOMTokenList.
|
||||||
|
Pass iframe.classList in http://example.com/ namespace should be DOMTokenList.
|
||||||
|
Pass output.classList in http://example.com/ namespace should be DOMTokenList.
|
||||||
|
Pass td.classList in http://example.com/ namespace should be DOMTokenList.
|
||||||
|
Pass th.classList in http://example.com/ namespace should be DOMTokenList.
|
||||||
|
Pass a.classList in null namespace should be DOMTokenList.
|
||||||
|
Pass area.classList in null namespace should be DOMTokenList.
|
||||||
|
Pass link.classList in null namespace should be DOMTokenList.
|
||||||
|
Pass iframe.classList in null namespace should be DOMTokenList.
|
||||||
|
Pass output.classList in null namespace should be DOMTokenList.
|
||||||
|
Pass td.classList in null namespace should be DOMTokenList.
|
||||||
|
Pass th.classList in null namespace should be DOMTokenList.
|
||||||
|
Pass a.relList in http://www.w3.org/1999/xhtml namespace should be DOMTokenList.
|
||||||
|
Pass area.relList in http://www.w3.org/1999/xhtml namespace should be DOMTokenList.
|
||||||
|
Pass link.relList in http://www.w3.org/1999/xhtml namespace should be DOMTokenList.
|
||||||
|
Pass iframe.relList in http://www.w3.org/1999/xhtml namespace should be undefined.
|
||||||
|
Pass output.relList in http://www.w3.org/1999/xhtml namespace should be undefined.
|
||||||
|
Pass td.relList in http://www.w3.org/1999/xhtml namespace should be undefined.
|
||||||
|
Pass th.relList in http://www.w3.org/1999/xhtml namespace should be undefined.
|
||||||
|
Pass a.relList in http://www.w3.org/2000/svg namespace should be DOMTokenList.
|
||||||
|
Pass area.relList in http://www.w3.org/2000/svg namespace should be undefined.
|
||||||
|
Pass link.relList in http://www.w3.org/2000/svg namespace should be undefined.
|
||||||
|
Pass iframe.relList in http://www.w3.org/2000/svg namespace should be undefined.
|
||||||
|
Pass output.relList in http://www.w3.org/2000/svg namespace should be undefined.
|
||||||
|
Pass td.relList in http://www.w3.org/2000/svg namespace should be undefined.
|
||||||
|
Pass th.relList in http://www.w3.org/2000/svg namespace should be undefined.
|
||||||
|
Pass a.relList in http://www.w3.org/1998/Math/MathML namespace should be undefined.
|
||||||
|
Pass area.relList in http://www.w3.org/1998/Math/MathML namespace should be undefined.
|
||||||
|
Pass link.relList in http://www.w3.org/1998/Math/MathML namespace should be undefined.
|
||||||
|
Pass iframe.relList in http://www.w3.org/1998/Math/MathML namespace should be undefined.
|
||||||
|
Pass output.relList in http://www.w3.org/1998/Math/MathML namespace should be undefined.
|
||||||
|
Pass td.relList in http://www.w3.org/1998/Math/MathML namespace should be undefined.
|
||||||
|
Pass th.relList in http://www.w3.org/1998/Math/MathML namespace should be undefined.
|
||||||
|
Pass a.relList in http://example.com/ namespace should be undefined.
|
||||||
|
Pass area.relList in http://example.com/ namespace should be undefined.
|
||||||
|
Pass link.relList in http://example.com/ namespace should be undefined.
|
||||||
|
Pass iframe.relList in http://example.com/ namespace should be undefined.
|
||||||
|
Pass output.relList in http://example.com/ namespace should be undefined.
|
||||||
|
Pass td.relList in http://example.com/ namespace should be undefined.
|
||||||
|
Pass th.relList in http://example.com/ namespace should be undefined.
|
||||||
|
Pass a.relList in null namespace should be undefined.
|
||||||
|
Pass area.relList in null namespace should be undefined.
|
||||||
|
Pass link.relList in null namespace should be undefined.
|
||||||
|
Pass iframe.relList in null namespace should be undefined.
|
||||||
|
Pass output.relList in null namespace should be undefined.
|
||||||
|
Pass td.relList in null namespace should be undefined.
|
||||||
|
Pass th.relList in null namespace should be undefined.
|
||||||
|
Pass a.htmlFor in http://www.w3.org/1999/xhtml namespace should be undefined.
|
||||||
|
Pass area.htmlFor in http://www.w3.org/1999/xhtml namespace should be undefined.
|
||||||
|
Pass link.htmlFor in http://www.w3.org/1999/xhtml namespace should be undefined.
|
||||||
|
Pass iframe.htmlFor in http://www.w3.org/1999/xhtml namespace should be undefined.
|
||||||
|
Pass output.htmlFor in http://www.w3.org/1999/xhtml namespace should be DOMTokenList.
|
||||||
|
Pass td.htmlFor in http://www.w3.org/1999/xhtml namespace should be undefined.
|
||||||
|
Pass th.htmlFor in http://www.w3.org/1999/xhtml namespace should be undefined.
|
||||||
|
Pass a.htmlFor in http://www.w3.org/2000/svg namespace should be undefined.
|
||||||
|
Pass area.htmlFor in http://www.w3.org/2000/svg namespace should be undefined.
|
||||||
|
Pass link.htmlFor in http://www.w3.org/2000/svg namespace should be undefined.
|
||||||
|
Pass iframe.htmlFor in http://www.w3.org/2000/svg namespace should be undefined.
|
||||||
|
Pass output.htmlFor in http://www.w3.org/2000/svg namespace should be undefined.
|
||||||
|
Pass td.htmlFor in http://www.w3.org/2000/svg namespace should be undefined.
|
||||||
|
Pass th.htmlFor in http://www.w3.org/2000/svg namespace should be undefined.
|
||||||
|
Pass a.htmlFor in http://www.w3.org/1998/Math/MathML namespace should be undefined.
|
||||||
|
Pass area.htmlFor in http://www.w3.org/1998/Math/MathML namespace should be undefined.
|
||||||
|
Pass link.htmlFor in http://www.w3.org/1998/Math/MathML namespace should be undefined.
|
||||||
|
Pass iframe.htmlFor in http://www.w3.org/1998/Math/MathML namespace should be undefined.
|
||||||
|
Pass output.htmlFor in http://www.w3.org/1998/Math/MathML namespace should be undefined.
|
||||||
|
Pass td.htmlFor in http://www.w3.org/1998/Math/MathML namespace should be undefined.
|
||||||
|
Pass th.htmlFor in http://www.w3.org/1998/Math/MathML namespace should be undefined.
|
||||||
|
Pass a.htmlFor in http://example.com/ namespace should be undefined.
|
||||||
|
Pass area.htmlFor in http://example.com/ namespace should be undefined.
|
||||||
|
Pass link.htmlFor in http://example.com/ namespace should be undefined.
|
||||||
|
Pass iframe.htmlFor in http://example.com/ namespace should be undefined.
|
||||||
|
Pass output.htmlFor in http://example.com/ namespace should be undefined.
|
||||||
|
Pass td.htmlFor in http://example.com/ namespace should be undefined.
|
||||||
|
Pass th.htmlFor in http://example.com/ namespace should be undefined.
|
||||||
|
Pass a.htmlFor in null namespace should be undefined.
|
||||||
|
Pass area.htmlFor in null namespace should be undefined.
|
||||||
|
Pass link.htmlFor in null namespace should be undefined.
|
||||||
|
Pass iframe.htmlFor in null namespace should be undefined.
|
||||||
|
Pass output.htmlFor in null namespace should be undefined.
|
||||||
|
Pass td.htmlFor in null namespace should be undefined.
|
||||||
|
Pass th.htmlFor in null namespace should be undefined.
|
||||||
|
Pass a.sandbox in http://www.w3.org/1999/xhtml namespace should be undefined.
|
||||||
|
Pass area.sandbox in http://www.w3.org/1999/xhtml namespace should be undefined.
|
||||||
|
Pass link.sandbox in http://www.w3.org/1999/xhtml namespace should be undefined.
|
||||||
|
Fail iframe.sandbox in http://www.w3.org/1999/xhtml namespace should be DOMTokenList.
|
||||||
|
Pass output.sandbox in http://www.w3.org/1999/xhtml namespace should be undefined.
|
||||||
|
Pass td.sandbox in http://www.w3.org/1999/xhtml namespace should be undefined.
|
||||||
|
Pass th.sandbox in http://www.w3.org/1999/xhtml namespace should be undefined.
|
||||||
|
Pass a.sandbox in http://www.w3.org/2000/svg namespace should be undefined.
|
||||||
|
Pass area.sandbox in http://www.w3.org/2000/svg namespace should be undefined.
|
||||||
|
Pass link.sandbox in http://www.w3.org/2000/svg namespace should be undefined.
|
||||||
|
Pass iframe.sandbox in http://www.w3.org/2000/svg namespace should be undefined.
|
||||||
|
Pass output.sandbox in http://www.w3.org/2000/svg namespace should be undefined.
|
||||||
|
Pass td.sandbox in http://www.w3.org/2000/svg namespace should be undefined.
|
||||||
|
Pass th.sandbox in http://www.w3.org/2000/svg namespace should be undefined.
|
||||||
|
Pass a.sandbox in http://www.w3.org/1998/Math/MathML namespace should be undefined.
|
||||||
|
Pass area.sandbox in http://www.w3.org/1998/Math/MathML namespace should be undefined.
|
||||||
|
Pass link.sandbox in http://www.w3.org/1998/Math/MathML namespace should be undefined.
|
||||||
|
Pass iframe.sandbox in http://www.w3.org/1998/Math/MathML namespace should be undefined.
|
||||||
|
Pass output.sandbox in http://www.w3.org/1998/Math/MathML namespace should be undefined.
|
||||||
|
Pass td.sandbox in http://www.w3.org/1998/Math/MathML namespace should be undefined.
|
||||||
|
Pass th.sandbox in http://www.w3.org/1998/Math/MathML namespace should be undefined.
|
||||||
|
Pass a.sandbox in http://example.com/ namespace should be undefined.
|
||||||
|
Pass area.sandbox in http://example.com/ namespace should be undefined.
|
||||||
|
Pass link.sandbox in http://example.com/ namespace should be undefined.
|
||||||
|
Pass iframe.sandbox in http://example.com/ namespace should be undefined.
|
||||||
|
Pass output.sandbox in http://example.com/ namespace should be undefined.
|
||||||
|
Pass td.sandbox in http://example.com/ namespace should be undefined.
|
||||||
|
Pass th.sandbox in http://example.com/ namespace should be undefined.
|
||||||
|
Pass a.sandbox in null namespace should be undefined.
|
||||||
|
Pass area.sandbox in null namespace should be undefined.
|
||||||
|
Pass link.sandbox in null namespace should be undefined.
|
||||||
|
Pass iframe.sandbox in null namespace should be undefined.
|
||||||
|
Pass output.sandbox in null namespace should be undefined.
|
||||||
|
Pass td.sandbox in null namespace should be undefined.
|
||||||
|
Pass th.sandbox in null namespace should be undefined.
|
||||||
|
Pass a.sizes in http://www.w3.org/1999/xhtml namespace should be undefined.
|
||||||
|
Pass area.sizes in http://www.w3.org/1999/xhtml namespace should be undefined.
|
||||||
|
Fail link.sizes in http://www.w3.org/1999/xhtml namespace should be DOMTokenList.
|
||||||
|
Pass iframe.sizes in http://www.w3.org/1999/xhtml namespace should be undefined.
|
||||||
|
Pass output.sizes in http://www.w3.org/1999/xhtml namespace should be undefined.
|
||||||
|
Pass td.sizes in http://www.w3.org/1999/xhtml namespace should be undefined.
|
||||||
|
Pass th.sizes in http://www.w3.org/1999/xhtml namespace should be undefined.
|
||||||
|
Pass a.sizes in http://www.w3.org/2000/svg namespace should be undefined.
|
||||||
|
Pass area.sizes in http://www.w3.org/2000/svg namespace should be undefined.
|
||||||
|
Pass link.sizes in http://www.w3.org/2000/svg namespace should be undefined.
|
||||||
|
Pass iframe.sizes in http://www.w3.org/2000/svg namespace should be undefined.
|
||||||
|
Pass output.sizes in http://www.w3.org/2000/svg namespace should be undefined.
|
||||||
|
Pass td.sizes in http://www.w3.org/2000/svg namespace should be undefined.
|
||||||
|
Pass th.sizes in http://www.w3.org/2000/svg namespace should be undefined.
|
||||||
|
Pass a.sizes in http://www.w3.org/1998/Math/MathML namespace should be undefined.
|
||||||
|
Pass area.sizes in http://www.w3.org/1998/Math/MathML namespace should be undefined.
|
||||||
|
Pass link.sizes in http://www.w3.org/1998/Math/MathML namespace should be undefined.
|
||||||
|
Pass iframe.sizes in http://www.w3.org/1998/Math/MathML namespace should be undefined.
|
||||||
|
Pass output.sizes in http://www.w3.org/1998/Math/MathML namespace should be undefined.
|
||||||
|
Pass td.sizes in http://www.w3.org/1998/Math/MathML namespace should be undefined.
|
||||||
|
Pass th.sizes in http://www.w3.org/1998/Math/MathML namespace should be undefined.
|
||||||
|
Pass a.sizes in http://example.com/ namespace should be undefined.
|
||||||
|
Pass area.sizes in http://example.com/ namespace should be undefined.
|
||||||
|
Pass link.sizes in http://example.com/ namespace should be undefined.
|
||||||
|
Pass iframe.sizes in http://example.com/ namespace should be undefined.
|
||||||
|
Pass output.sizes in http://example.com/ namespace should be undefined.
|
||||||
|
Pass td.sizes in http://example.com/ namespace should be undefined.
|
||||||
|
Pass th.sizes in http://example.com/ namespace should be undefined.
|
||||||
|
Pass a.sizes in null namespace should be undefined.
|
||||||
|
Pass area.sizes in null namespace should be undefined.
|
||||||
|
Pass link.sizes in null namespace should be undefined.
|
||||||
|
Pass iframe.sizes in null namespace should be undefined.
|
||||||
|
Pass output.sizes in null namespace should be undefined.
|
||||||
|
Pass td.sizes in null namespace should be undefined.
|
||||||
|
Pass th.sizes in null namespace should be undefined.
|
|
@ -0,0 +1,55 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>DOMTokenList coverage for attributes</title>
|
||||||
|
<script src="../../resources/testharness.js"></script>
|
||||||
|
<script src="../../resources/testharnessreport.js"></script>
|
||||||
|
<div id=log></div>
|
||||||
|
<script>
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
var pairs = [
|
||||||
|
// Defined in DOM
|
||||||
|
{attr: "classList", sup: ["anyElement"]},
|
||||||
|
// Defined in HTML except for a which is also SVG
|
||||||
|
{attr: "relList", sup: ["a", "area", "link"]},
|
||||||
|
// Defined in HTML
|
||||||
|
{attr: "htmlFor", sup: ["output"]},
|
||||||
|
{attr: "sandbox", sup: ["iframe"]},
|
||||||
|
{attr: "sizes", sup: ["link"]}
|
||||||
|
];
|
||||||
|
var namespaces = [
|
||||||
|
"http://www.w3.org/1999/xhtml",
|
||||||
|
"http://www.w3.org/2000/svg",
|
||||||
|
"http://www.w3.org/1998/Math/MathML",
|
||||||
|
"http://example.com/",
|
||||||
|
""
|
||||||
|
];
|
||||||
|
|
||||||
|
var elements = ["a", "area", "link", "iframe", "output", "td", "th"];
|
||||||
|
function testAttr(pair, new_el){
|
||||||
|
return (pair.attr === "classList" ||
|
||||||
|
(pair.attr === "relList" && new_el.localName === "a" &&
|
||||||
|
new_el.namespaceURI === "http://www.w3.org/2000/svg") ||
|
||||||
|
(new_el.namespaceURI === "http://www.w3.org/1999/xhtml" &&
|
||||||
|
pair.sup.indexOf(new_el.localName) != -1));
|
||||||
|
}
|
||||||
|
|
||||||
|
pairs.forEach(function(pair) {
|
||||||
|
namespaces.forEach(function(ns) {
|
||||||
|
elements.forEach(function(el) {
|
||||||
|
var new_el = document.createElementNS(ns, el);
|
||||||
|
if (testAttr(pair, new_el)) {
|
||||||
|
test(function() {
|
||||||
|
assert_class_string(new_el[pair.attr], "DOMTokenList");
|
||||||
|
}, new_el.localName + "." + pair.attr + " in " + new_el.namespaceURI + " namespace should be DOMTokenList.");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
test(function() {
|
||||||
|
assert_equals(new_el[pair.attr], undefined);
|
||||||
|
}, new_el.localName + "." + pair.attr + " in " + new_el.namespaceURI + " namespace should be undefined.");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
Loading…
Add table
Add a link
Reference in a new issue