Skip to content

Commit a76bf66

Browse files
committed
LibWeb: Add a bunch of new passing WPT tests
1 parent 6e2eb37 commit a76bf66

20 files changed

+1194
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Harness status: OK
2+
3+
Found 6 tests
4+
5+
6 Pass
6+
Pass document.write() with TrustedHTML arguments only.
7+
Pass document.write() with String arguments only.
8+
Pass document.write() with TrustedHTML for all but one argument.
9+
Pass document.writeln() with TrustedHTML arguments only.
10+
Pass document.writeln() with String arguments only.
11+
Pass document.writeln() with TrustedHTML for all but one argument.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Harness status: OK
2+
3+
Found 5 tests
4+
5+
4 Pass
6+
1 Fail
7+
Fail document.innerText assigned via policy (successful HTML transformation).
8+
Pass `document.innerText = string` throws.
9+
Pass 'document.innerText = null' throws
10+
Pass 'document.innerText = string' assigned via default policy (successful HTML transformation).
11+
Pass 'document.innerText = null' assigned via default policy does not throw
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Harness status: OK
2+
3+
Found 5 tests
4+
5+
5 Pass
6+
Pass Document.parseHTMLUnsafe assigned via policy (successful HTML transformation).
7+
Pass `Document.parseHTMLUnsafe(string)` throws.
8+
Pass 'Document.parseHTMLUnsafe(null)' throws
9+
Pass 'Document.parseHTMLUnsafe(string)' assigned via default policy (successful HTML transformation).
10+
Pass 'Document.parseHTMLUnsafe(null)' assigned via default policy does not throw
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Harness status: OK
2+
3+
Found 20 tests
4+
5+
15 Pass
6+
5 Fail
7+
Pass document.write with html assigned via policy (successful URL transformation).
8+
Pass document.write with multiple trusted arguments.
9+
Fail document.writeln with html assigned via policy (successful URL transformation).
10+
Fail document.writeln with multiple trusted arguments.
11+
Pass `document.write(string)` throws
12+
Pass `document.write(string, string)` throws
13+
Pass `document.write(string, TrustedHTML)` throws
14+
Pass `document.writeln(string)` throws
15+
Pass `document.writeln(string, string)` throws
16+
Pass `document.writeln(string, TrustedHTML)` throws
17+
Pass `document.write(null)` throws
18+
Pass `document.writeln(null)` throws
19+
Pass `document.write(string)` observes default policy
20+
Pass `document.write(string, string)` observes default policy
21+
Pass `document.write(string, TrustedHTML)` observes default policy
22+
Pass `document.write` passes the correct sink string to the default policy
23+
Fail `document.writeln(string)` observes default policy
24+
Fail `document.writeln(string, string)` observes default policy
25+
Fail `document.writeln(string, TrustedHTML)` observes default policy
26+
Pass `document.writeln` passes the correct sink string to the default policy
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Harness status: OK
2+
3+
Found 7 tests
4+
5+
7 Pass
6+
Pass insertAdjacentHTML with html assigned via policy (successful HTML transformation).
7+
Pass insertAdjacentHTML(TrustedHTML) throws SyntaxError DOMException when position invalid.
8+
Pass `insertAdjacentHTML(string)` throws.
9+
Pass `insertAdjacentHTML(string)` still throws TypeError when position invalid.
10+
Pass `insertAdjacentHTML(null)` throws.
11+
Pass `insertAdjacentHTML(string)` assigned via default policy (successful HTML transformation).
12+
Pass `insertAdjacentHTML(null)` assigned via default policy does not throw.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Harness status: OK
2+
3+
Found 7 tests
4+
5+
6 Pass
6+
1 Fail
7+
Pass outerHTML with html assigned via policy (successful HTML transformation).
8+
Pass `outerHTML = TrustedHTML` throws NoModificationAllowedError when parent is a document.
9+
Pass `outerHTML = string` throws.
10+
Pass `outerHTML = string` throws TypeError even when parent is a document.
11+
Pass `outerHTML = null` throws.
12+
Pass `outerHTML = string` assigned via default policy (successful HTML transformation).
13+
Fail `outerHTML = null` assigned via default policy does not throw
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Harness status: OK
2+
3+
Found 14 tests
4+
5+
14 Pass
6+
Pass script.src accepts only TrustedScriptURL
7+
Pass iframe.srcdoc accepts only TrustedHTML
8+
Pass div.onclick accepts only TrustedScript
9+
Pass `Script.prototype.setAttribute.SrC = string` throws.
10+
Pass script.src accepts string and null after default policy was created.
11+
Pass script.src's mutationobservers receive the default policy's value.
12+
Pass iframe.srcdoc's mutationobservers receive the default policy's value.
13+
Pass div.onclick's mutationobservers receive the default policy's value.
14+
Pass iframe.srcdoc accepts string and null after default policy was created.
15+
Pass div.onclick accepts string and null after default policy was created.
16+
Pass a.rel accepts a Trusted Type
17+
Pass a.rel accepts strings
18+
Pass a.rel accepts null
19+
Pass `script.src = setAttributeNode(embed.src)` with string works.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Harness status: OK
2+
3+
Found 5 tests
4+
5+
5 Pass
6+
Pass element.setHTMLUnsafe(html) assigned via policy (successful HTML transformation).
7+
Pass `element.setHTMLUnsafe(string)` throws.
8+
Pass `element.setHTMLUnsafe(null)` throws.
9+
Pass `element.setHTMLUnsafe(string)` assigned via default policy (successful HTML transformation).
10+
Pass `element.setHTMLUnsafe(string)` assigned via default policy does not throw
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Harness status: OK
2+
3+
Found 5 tests
4+
5+
4 Pass
6+
1 Fail
7+
Pass shadowRoot.innerHTML = html assigned via policy (successful HTML transformation).
8+
Pass `shadowRoot.innerHTML = string` throws.
9+
Pass `shadowRoot.innerHTML = null` throws.
10+
Pass `shadowRoot.innerHTML = string` assigned via default policy (successful HTML transformation).
11+
Fail `shadowRoot.innerHTML = string` assigned via default policy does not throw
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Harness status: OK
2+
3+
Found 5 tests
4+
5+
5 Pass
6+
Pass shadowRoot.setHTMLUnsafe(html) assigned via policy (successful HTML transformation).
7+
Pass `shadowRoot.setHTMLUnsafe(string)` throws.
8+
Pass `shadowRoot.setHTMLUnsafe(null)` throws.
9+
Pass `shadowRoot.setHTMLUnsafe(string)` assigned via default policy (successful HTML transformation).
10+
Pass `shadowRoot.setHTMLUnsafe(string)` assigned via default policy does not throw

0 commit comments

Comments
 (0)