diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2023-12-20 00:31:45 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-20 05:31:45 +0000 |
commit | 0a0994ca64fceafde05997d93e5ca7d6e5baa7b2 (patch) | |
tree | c876ddcf63171ff1121f1e46799c2515e63ad370 /test/data/html/test-dom-text-scanner.html | |
parent | 3c226215419ca815712e9568f7d871a96f5ff1cf (diff) |
HTML test updates (#398)
* Rename y-test to test-case
* Rename y-description to test-description
* Remove extension name
* Update placeholder favicon
* Refactor scripts
* Make element types more consistent
* More updates
* Rename
* Simplify file URLs
* Rename file
* Add descriptions
* Rename
* Rename
* Rename
Diffstat (limited to 'test/data/html/test-dom-text-scanner.html')
-rw-r--r-- | test/data/html/test-dom-text-scanner.html | 393 |
1 files changed, 0 insertions, 393 deletions
diff --git a/test/data/html/test-dom-text-scanner.html b/test/data/html/test-dom-text-scanner.html deleted file mode 100644 index f22e0895..00000000 --- a/test/data/html/test-dom-text-scanner.html +++ /dev/null @@ -1,393 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="UTF-8"> - <meta name="viewport" content="width=device-width,initial-scale=1"> - <title>Yomitan DOMTextScanner Tests</title> - <link rel="icon" type="image/gif" href="data:image/gif;base64,R0lGODlhEAAQAKEBAAAAAP///////////yH5BAEKAAIALAAAAAAQABAAAAImFI6Zpt0B4YkS0TCpq07xbmEgcGVRUpLaI46ZG7ppalY0jDCwUAAAOw=="> - <link rel="stylesheet" href="test-stylesheet.css"> - </head> -<body> - - <h1>Yomitan DOMTextScanner Tests</h1> - - <y-test - data-test-data='{ - "node": "div:nth-of-type(1)", - "offset": 0, - "length": 15, - "expected": { - "node": "div:nth-of-type(2)>div::text", - "offset": 3, - "content": "小ぢん\nまり1\n小ぢん\nまり2" - } - }' - > - <y-description>Layout newlines expected due to entering and exiting display:block nodes.</y-description> -<div><div>小ぢん</div>まり1</div> -<div>小ぢん<div>まり2</div></div> - </y-test> - - <y-test - data-test-data='{ - "node": "div:nth-of-type(1)::text", - "offset": 0, - "length": 13, - "expected": { - "node": "div:nth-of-type(2)::text", - "offset": 6, - "content": "小ぢんまり1\n小ぢんまり2" - } - }' - > - <y-description>Layout newline expected due to sequential display:block elements.</y-description> -<div>小ぢんまり1</div><div>小ぢんまり2</div> - </y-test> - - <y-test - data-test-data='{ - "node": "div:nth-of-type(1)::text", - "offset": 0, - "length": 13, - "expected": { - "node": "div:nth-of-type(2)::text", - "offset": 6, - "content": "小ぢんまり1\n小ぢんまり2" - } - }' - > - <y-description>Layout newline expected due to sequential display:block elements separated by a newline.</y-description> -<div>小ぢんまり1</div> -<div>小ぢんまり2</div> - </y-test> - - <y-test - data-test-data='{ - "node": "span:nth-of-type(1)::text", - "offset": 0, - "length": 12, - "expected": { - "node": "span:nth-of-type(2)::text", - "offset": 6, - "content": "小ぢんまり1小ぢんまり2" - } - }' - > - <y-description>No newlines expected due to display:inline.</y-description> -<span>小ぢんまり1</span><span>小ぢんまり2</span> - </y-test> - - <y-test - data-test-data='{ - "node": "span:nth-of-type(1)::text", - "offset": 0, - "length": 13, - "expected": { - "node": "span:nth-of-type(2)::text", - "offset": 6, - "content": "小ぢんまり1 小ぢんまり2" - } - }' - > - <y-description>No newlines expected due to white-space:normal.</y-description> -<span>小ぢんまり1</span> -<span>小ぢんまり2</span> - </y-test> - - <y-test - data-test-data='{ - "node": "span:nth-of-type(1)::text", - "offset": 0, - "length": 13, - "expected": { - "node": "span:nth-of-type(2)::text", - "offset": 6, - "content": "小ぢんまり1\n小ぢんまり2" - } - }' - > - <y-description>Newline expected due to white-space:pre.</y-description> -<pre> -<span>小ぢんまり1</span> -<span>小ぢんまり2</span> -</pre> - </y-test> - - <y-test - data-test-data='{ - "node": "span:nth-of-type(1)::text", - "offset": 0, - "length": 12, - "expected": { - "node": "span:nth-of-type(2)::text", - "offset": 6, - "content": "小ぢんまり1小ぢんまり2" - } - }' - > - <y-description>No newlines expected due to display:inline-block. Actual layout flow cannot be determined by DOM/CSS alone.</y-description> -<span style="display: inline-block;">小ぢんまり1</span><span style="display: inline-block;">小ぢんまり2</span> - </y-test> - - <y-test - style="position: relative;" - data-test-data='{ - "node": "div:nth-of-type(1)::text", - "offset": 0, - "length": 13, - "expected": { - "node": "div:nth-of-type(2)::text", - "offset": 6, - "content": "小ぢんまり1\n小ぢんまり2" - } - }' - > - <y-description>Single newline expected due to display:block layout.</y-description> -<div>小ぢんまり1</div><div style="position: relative;">小ぢんまり2</div> - </y-test> - - <y-test - style="position: relative; overflow: hidden;" - data-test-data='{ - "node": "div:nth-of-type(1)::text", - "offset": 0, - "length": 14, - "expected": { - "node": "div:nth-of-type(2)::text", - "offset": 6, - "content": "小ぢんまり1\n\n小ぢんまり2" - } - }' - > - <y-description>Two newlines expected due to position:absolute causing a significant layout change.</y-description> -<div>小ぢんまり1</div><div style="position: absolute;">小ぢんまり2</div> - </y-test> - - <y-test - style="position: relative; overflow: hidden;" - data-test-data='{ - "node": "div:nth-of-type(1)::text", - "offset": 0, - "length": 14, - "expected": { - "node": "div:nth-of-type(2)::text", - "offset": 6, - "content": "小ぢんまり1\n\n小ぢんまり2" - } - }' - > - <y-description>Two newlines expected due to position:fixed causing a significant layout change.</y-description> -<div>小ぢんまり1</div><div style="position: fixed;">小ぢんまり2</div> - </y-test> - - <y-test - style="position: relative;" - data-test-data='{ - "node": "div:nth-of-type(1)::text", - "offset": 0, - "length": 14, - "expected": { - "node": "div:nth-of-type(2)::text", - "offset": 6, - "content": "小ぢんまり1\n\n小ぢんまり2" - } - }' - > - <y-description>Two newlines expected due to position:sticky being able to cause a significant layout change.</y-description> -<div>小ぢんまり1</div><div style="position: sticky;">小ぢんまり2</div> - </y-test> - - <y-test - data-test-data='{ - "node": "rt", - "offset": 0, - "length": 6, - "expected": { - "node": "div::text", - "offset": 5, - "content": "小ぢんまり1" - } - }' - > - <y-description>Scanning text starting in an <rt> element. Should start scanning at the start of the <ruby> tag instead.</y-description> -<div><ruby>小<rp>(</rp><rt>こ</rt><rp>)</rp></ruby>ぢんまり1</div> - </y-test> - - <y-test - data-test-data='{ - "node": "div", - "offset": 0, - "length": 6, - "expected": { - "node": "div::nth-text(2)", - "offset": 3, - "content": "小ぢんまり1" - } - }' - > - <y-description>Skip <script> content.</y-description> -<div>小ぢん<script>/*comment*/</script>まり1</div> - </y-test> - - <y-test - data-test-data='{ - "node": "div", - "offset": 0, - "length": 6, - "expected": { - "node": "div::nth-text(2)", - "offset": 3, - "content": "小ぢんまり1" - } - }' - > - <y-description>Skip <style> content.</y-description> -<div>小ぢん<style>/*comment*/</style>まり1</div> - </y-test> - - <y-test - data-test-data='{ - "node": "div", - "offset": 0, - "length": 6, - "expected": { - "node": "div::nth-text(2)", - "offset": 3, - "content": "小ぢんまり1" - } - }' - > - <y-description>Skip <textarea> content.</y-description> -<div>小ぢん<textarea>textarea content</textarea>まり1</div> - </y-test> - - <y-test - data-test-data='{ - "node": "div", - "offset": 0, - "length": 6, - "expected": { - "node": "div::nth-text(2)", - "offset": 3, - "content": "小ぢんまり1" - } - }' - > - <y-description>Skip <input> content.</y-description> -<div>小ぢん<input value="content">まり1</div> - </y-test> - - <y-test - data-test-data='{ - "node": "div", - "offset": 0, - "length": 6, - "expected": { - "node": "div::nth-text(2)", - "offset": 3, - "content": "小ぢんまり1" - } - }' - > - <y-description>Skip <button> content.</y-description> -<div>小ぢん<button type="button">content</button>まり1</div> - </y-test> - - <y-test - data-test-data='{ - "node": "div", - "offset": 0, - "length": 6, - "expected": { - "node": "div::nth-text(2)", - "offset": 3, - "content": "小ぢんまり1" - } - }' - > - <y-description>Skip content with font-size:0.</y-description> -<div>小ぢん<span style="font-size: 0;">content</span>まり1</div> - </y-test> - - <y-test - data-test-data='{ - "node": "div", - "offset": 0, - "length": 6, - "expected": { - "node": "div::nth-text(2)", - "offset": 3, - "content": "小ぢんまり1" - } - }' - > - <y-description>Skip content with opacity:0.</y-description> -<div>小ぢん<span style="opacity: 0;">content</span>まり1</div> - </y-test> - - <y-test - data-test-data='{ - "node": "div", - "offset": 0, - "length": 6, - "expected": { - "node": "div::nth-text(2)", - "offset": 3, - "content": "小ぢんまり1" - } - }' - > - <y-description>Skip content with visibility:hidden.</y-description> -<div>小ぢん<span style="visibility: hidden;">content</span>まり1</div> - </y-test> - - <y-test - data-test-data='{ - "node": "div", - "offset": 0, - "length": 6, - "expected": { - "node": "div::nth-text(2)", - "offset": 3, - "content": "小ぢんまり1" - } - }' - > - <y-description>Skip content with display:none.</y-description> -<div>小ぢん<span style="display: none;">content</span>まり1</div> - </y-test> - - <y-test - data-test-data='{ - "node": "div", - "offset": 0, - "length": 6, - "expected": { - "node": "div::nth-text(2)", - "offset": 3, - "content": "小ぢんまり1" - } - }' - > - <y-description>Don't skip content with user-select:none.</y-description> -<div>小ぢ<span style="user-select: none;">ん</span>まり1</div> - </y-test> - - <y-test - data-test-data='{ - "node": "div", - "offset": 0, - "length": 6, - "expected": { - "node": "div::nth-text(2)", - "offset": 3, - "content": "小ぢんまり1" - } - }' - > - <y-description>Skip content with user-select:none <em>and</em> a transparent color.</y-description> -<div>小ぢん<span style="user-select: none; color: rgba(0, 0, 0, 0);">content</span>まり1</div> - </y-test> - -</body> -</html>
\ No newline at end of file |