mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-11 03:56:16 +00:00
LibWeb+WebContent: Do not include DOM HTML in text test expectations
For example, in the following abbreviated test HTML: <span>some text</span> <script>println("whf")</script> We would have to craft the expectation file to include the "some text" segment, usually with some leading whitespace. This is a bit annoying, and makes it difficult to manually craft expectation files. So instead of comparing the expectation against the entire DOM inner text, we now send the inner text of just the <pre> element containing the test output when we invoke `internals.signalTextTestIsDone`.
This commit is contained in:
parent
f3f7f77dbc
commit
bf668696de
Notes:
github-actions[bot]
2024-10-03 11:08:22 +00:00
Author: https://github.com/trflynn89
Commit: bf668696de
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1603
Reviewed-by: https://github.com/awesomekling ✅
Reviewed-by: https://github.com/circl-lastname
Reviewed-by: https://github.com/kalenikaliaksandr ✅
319 changed files with 333 additions and 333 deletions
|
@ -1 +1 @@
|
|||
PASS (didn't crash)
|
||||
PASS (didn't crash)
|
||||
|
|
|
@ -1 +1 @@
|
|||
Cloned CDATASection node data: PASS
|
||||
Cloned CDATASection node data: PASS
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<DIV id="one" >
|
||||
<DIV id="one" >
|
||||
<DIV id="two" >
|
||||
<DIV id="two" >
|
||||
<DIV id="one" >
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<DIV id="one" >
|
||||
<DIV id="one" >
|
||||
<DIV id="two" >
|
||||
<DIV id="two" >
|
||||
<DIV id="one" >
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
[object HTMLDocument]
|
||||
[object HTMLDocument]
|
||||
true
|
||||
[object HTMLDocument]
|
||||
true
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Submit <FORM >
|
||||
<FORM >
|
||||
document.bob === document.forms[0]: true
|
||||
<BUTTON id="fred" >
|
||||
img element with name 'foo' and id 'bar':
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
element.classList initial value: ""
|
||||
element.classList initial value: ""
|
||||
element.classList after setting classList to "a": "a"
|
||||
element.classList after setting className to "": ""
|
||||
element.classList after setting to className to "a a b c": "a a b c"
|
||||
|
|
|
@ -1 +1 @@
|
|||
<DIV id="target" >
|
||||
<DIV id="target" >
|
||||
|
|
|
@ -1 +1 @@
|
|||
hello <DIV id="c" >
|
||||
<DIV id="c" >
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Negative coordinates return null: true
|
||||
Negative coordinates return null: true
|
||||
Coordinates outside the viewport return null: true
|
||||
<HTML id="root-element" >
|
||||
<DIV id="large-box" >
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
xlink:ref getAttribute = 'null'
|
||||
xlink:ref getAttribute = 'null'
|
||||
xlink:ref getAttributeNS = 'test'
|
||||
href getAttribute = 'test'
|
||||
href getAttributeNS = 'null'
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
xlink:href getAttributeNode = 'null'
|
||||
xlink:href getAttributeNode = 'null'
|
||||
xlink:href getAttributeNodeNS = 'Attr': name = xlink:href value = test
|
||||
href getAttributeNode = 'Attr': name = href value = test
|
||||
href getAttributeNodeNS = 'null'
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Original values
|
||||
Original values
|
||||
xlink:href getAttributeNS = 'test'
|
||||
href getAttribute = 'test'
|
||||
Non-matching namespace
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
Item 1Item 2Item 3Item 4Item 5Item 6Item 7Item 8Item 9Item 10Item 11Item 12 scrollWidth: 1430
|
||||
scrollWidth: 1430
|
||||
scrollLeft: 1130
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
hello <DIV id="c" >
|
||||
<DIV id="c" >
|
||||
<DIV id="b" >
|
||||
<DIV id="a" >
|
||||
<HTML >
|
||||
|
|
|
@ -1 +1 @@
|
|||
Some text Elements at point 30, 20: p < div < body < html
|
||||
p < div < body < html
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Negative coordinates return empty array: true
|
||||
Negative coordinates return empty array: true
|
||||
Coordinates outside the viewport return empty array: true
|
||||
== Elements at (500, 10) ==
|
||||
<DIV id="large-box" >
|
||||
|
|
|
@ -1 +1 @@
|
|||
12389 PASS (didn't crash)
|
||||
PASS (didn't crash)
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
Well hello friends some
|
||||
text text-input selectionStart: 0 selectionEnd: 0 selectionDirection: none
|
||||
text-input selectionStart: 0 selectionEnd: 0 selectionDirection: none
|
||||
date-input selectionStart: null selectionEnd: null selectionDirection: null
|
||||
textarea selectionStart: 0 selectionEnd: 0 selectionDirection: none
|
||||
text-input selectionStart: 18 selectionEnd: 18 selectionDirection: none
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Calling setRangeText() on an element where setRangeText doesn't apply throws: InvalidStateError
|
||||
Calling setRangeText() on an element where setRangeText doesn't apply throws: InvalidStateError
|
||||
setRangeText("foo") on: textarea - Value: foo
|
||||
setRangeText("foo", 1, 3) on: textarea - Value: tfoot
|
||||
setRangeText("foo") on: password - Value: footest
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
Empty string in collection: false
|
||||
Empty string in collection: false
|
||||
'haxx' in collection: true
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
HTMLCollection
|
||||
HTMLCollection
|
||||
anchor1
|
||||
anchor2
|
||||
anchor3
|
||||
|
|
|
@ -8,4 +8,4 @@ element.isEqualNode(elementWithDifferentLocalName): false
|
|||
element.isEqualNode(elementWithAttribute): false
|
||||
element.isEqualNode(elementWithAttribute) (after adding non-matching attribute): false
|
||||
element.isEqualNode(elementWithAttribute) (after adding matching attribute): false
|
||||
element.isEqualNode(elementWithAttribute) (after removing non-matching attribute): true
|
||||
element.isEqualNode(elementWithAttribute) (after removing non-matching attribute): true
|
||||
|
|
|
@ -17,4 +17,4 @@ After setting element attribute xmlns:bar='exampleNamespaceURI'
|
|||
element.lookupNamespaceURI(null): null
|
||||
element.lookupNamespaceURI(""): null
|
||||
element.lookupNamespaceURI("foo"): null
|
||||
element.lookupNamespaceURI("bar"): exampleNamespaceURI
|
||||
element.lookupNamespaceURI("bar"): exampleNamespaceURI
|
||||
|
|
|
@ -6,4 +6,4 @@ Prefix for absent namespace "no" on document: null
|
|||
Prefix for namespace "def" on child: abc
|
||||
Prefix null on child: null
|
||||
Prefix for namespace "test" (in parent) on child: ex
|
||||
Prefix for namespace "def" (from attribute "x") on child: abc
|
||||
Prefix for namespace "def" (from attribute "x") on child: abc
|
||||
|
|
|
@ -5,4 +5,4 @@ Document fragment text after documentFragment.normalize(): 1234, child nodes: 2
|
|||
Text node 1 data: 12
|
||||
Text node 2 data: 2
|
||||
Text node 3 data: 34
|
||||
Text node 4 data: 4
|
||||
Text node 4 data: 4
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
Top: 16
|
||||
Top: 16
|
||||
Left: 8
|
||||
|
|
|
@ -1,2 +1 @@
|
|||
Hello💨😮 World
|
||||
llo💨😮 Wo
|
||||
|
|
|
@ -3,4 +3,4 @@ Text node B with previous sibling A: AB
|
|||
Text node B with previous sibling A and next sibling C: ABC
|
||||
CDATA section D with no siblings: D
|
||||
CDATA section E with previous sibling D: DE
|
||||
CDATA section E with previous sibling D and next sibling F: DEF
|
||||
CDATA section E with previous sibling D and next sibling F: DEF
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
a(
|
||||
a(
|
||||
a(
|
||||
|
|
|
@ -1 +1 @@
|
|||
Item 1Item 2Item 3Item 4Item 5Item 6Item 7Item 8Item 9Item 10Item 11Item 12 1200
|
||||
1200
|
||||
|
|
|
@ -1 +1 @@
|
|||
Item 1Item 2Item 3Item 4Item 5Item 6Item 7Item 8Item 9Item 10Item 11Item 12 1200
|
||||
1200
|
||||
|
|
|
@ -1 +1 @@
|
|||
document.getElementById(""): null
|
||||
document.getElementById(""): null
|
||||
|
|
|
@ -1 +1 @@
|
|||
getElementById('foo') => 1
|
||||
getElementById('foo') => 1
|
||||
|
|
|
@ -1 +1 @@
|
|||
document.getElementsByClassName("").length: 0
|
||||
document.getElementsByClassName("").length: 0
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
document.getElementsByClassName("te st").length: 3
|
||||
document.getElementsByClassName("te st").length: 3
|
||||
<DIV id="1" >
|
||||
<DIV id="2" >
|
||||
<DIV id="3" >
|
||||
|
|
|
@ -1 +1 @@
|
|||
document.getElementsByName("").length: 0
|
||||
document.getElementsByName("").length: 0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
Hello Ladybird Ladybird again World 6
|
||||
6
|
||||
4
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
x [object DOMRectList]
|
||||
[object DOMRect]
|
||||
[object DOMRectList]
|
||||
[object DOMRect]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
1
|
||||
1
|
||||
<H2 >
|
||||
2
|
||||
<H2 >
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue