summaryrefslogtreecommitdiff
path: root/test/data/html/document-util.html
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2023-12-20 00:31:45 -0500
committerGitHub <noreply@github.com>2023-12-20 05:31:45 +0000
commit0a0994ca64fceafde05997d93e5ca7d6e5baa7b2 (patch)
treec876ddcf63171ff1121f1e46799c2515e63ad370 /test/data/html/document-util.html
parent3c226215419ca815712e9568f7d871a96f5ff1cf (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/document-util.html')
-rw-r--r--test/data/html/document-util.html372
1 files changed, 372 insertions, 0 deletions
diff --git a/test/data/html/document-util.html b/test/data/html/document-util.html
new file mode 100644
index 00000000..d8ac012e
--- /dev/null
+++ b/test/data/html/document-util.html
@@ -0,0 +1,372 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width,initial-scale=1">
+ <title>DocumentUtil Tests</title>
+ <link rel="icon" type="image/gif" href="data:image/gif;base64,R0lGODdhAQABAIABAAAAAP///ywAAAAAAQABAAACAkQBADs=">
+ <link rel="stylesheet" href="test-stylesheet.css">
+</head>
+<body>
+
+ <h1>DocumentUtil Tests</h1>
+
+ <test-description>Automated test cases for DocumentUtil.</test-description>
+
+ <test-case
+ data-test-type="scan"
+ data-element-from-point-selector="span"
+ data-caret-range-from-point-selector="span"
+ data-start-node-selector="span"
+ data-start-offset="0"
+ data-end-node-selector="span"
+ data-end-offset="0"
+ data-result-type="TextSourceRange"
+ data-sentence-scan-extent="100"
+ data-sentence="真白「心配してくださって、ありがとございます」"
+ >
+ <span>真白「心配してくださって、ありがとございます」</span>
+ </test-case>
+
+ <test-case
+ data-test-type="scan"
+ data-element-from-point-selector="span"
+ data-caret-range-from-point-selector="span"
+ data-start-node-selector="span"
+ data-start-offset="5"
+ data-end-node-selector="span"
+ data-end-offset="5"
+ data-result-type="TextSourceRange"
+ data-sentence-scan-extent="100"
+ data-sentence="心配してくださって、ありがとございます"
+ >
+ <span>真白「心配してくださって、ありがとございます」</span>
+ </test-case>
+
+ <test-case
+ data-test-type="scan"
+ data-element-from-point-selector="span"
+ data-caret-range-from-point-selector="span"
+ data-start-node-selector="span"
+ data-start-offset="16"
+ data-end-node-selector="span"
+ data-end-offset="16"
+ data-result-type="TextSourceRange"
+ data-sentence-scan-extent="100"
+ data-sentence="心配して「くださって」、ありがと「ございます」"
+ >
+ <span>真白「心配して「くださって」、ありがと「ございます」」</span>
+ </test-case>
+
+ <test-case
+ data-test-type="scan"
+ data-element-from-point-selector="span"
+ data-caret-range-from-point-selector="span"
+ data-start-node-selector="span"
+ data-start-offset="4"
+ data-end-node-selector="span"
+ data-end-offset="4"
+ data-result-type="TextSourceRange"
+ data-sentence-scan-extent="100"
+ data-sentence="ありがとございます。"
+ >
+ <span>ありがとございます。ありがとございます。</span>
+ </test-case>
+
+ <test-case
+ data-test-type="scan"
+ data-element-from-point-selector="span"
+ data-caret-range-from-point-selector="span"
+ data-start-node-selector="span"
+ data-start-offset="14"
+ data-end-node-selector="span"
+ data-end-offset="14"
+ data-result-type="TextSourceRange"
+ data-sentence-scan-extent="100"
+ data-sentence="ありがとございます。"
+ >
+ <span>ありがとございます。ありがとございます。</span>
+ </test-case>
+
+ <test-case
+ data-test-type="scan"
+ data-element-from-point-selector="span"
+ data-caret-range-from-point-selector="span"
+ data-start-node-selector="span"
+ data-start-offset="4"
+ data-end-node-selector="span"
+ data-end-offset="4"
+ data-result-type="TextSourceRange"
+ data-sentence-scan-extent="100"
+ data-sentence="ありがとございます。!?"
+ >
+ <span>ありがとございます。!?ありがとございます。!?</span>
+ </test-case>
+
+ <test-case
+ data-test-type="scan"
+ data-element-from-point-selector="span"
+ data-caret-range-from-point-selector="span"
+ data-start-node-selector="span"
+ data-start-offset="4"
+ data-end-node-selector="span"
+ data-end-offset="4"
+ data-result-type="TextSourceRange"
+ data-sentence-scan-extent="100"
+ data-sentence="ありがとございます!!!"
+ >
+ <span>ありがとございます!!!ありがとございます!!!</span>
+ </test-case>
+
+ <test-case
+ data-test-type="scan"
+ data-element-from-point-selector="input"
+ data-caret-range-from-point-selector="input"
+ data-start-node-selector="input"
+ data-start-offset="0"
+ data-end-node-selector="input"
+ data-end-offset="0"
+ data-result-type="TextSourceRange"
+ data-sentence-scan-extent="100"
+ data-sentence="真白「心配してくださって、ありがとございます」"
+ data-has-imposter="true"
+ >
+ <input type="text" value="真白「心配してくださって、ありがとございます」" style="width: 100%; box-sizing: border-box; font-family: inherit; font-size: inherit; border: 1px solid #d8d8d8; padding: 0.2em;">
+ </test-case>
+
+ <test-case
+ data-test-type="scan"
+ data-element-from-point-selector="textarea"
+ data-caret-range-from-point-selector="textarea"
+ data-start-node-selector="textarea"
+ data-start-offset="0"
+ data-end-node-selector="textarea"
+ data-end-offset="0"
+ data-result-type="TextSourceRange"
+ data-sentence-scan-extent="100"
+ data-sentence="真白「心配してくださって、ありがとございます」"
+ data-has-imposter="true"
+ >
+ <textarea style="width: 100%; height: 3em; box-sizing: border-box; font-family: inherit; font-size: inherit; border: 1px solid #d8d8d8; padding: 0.2em;">真白「心配してくださって、ありがとございます」</textarea>
+ </test-case>
+
+ <test-case
+ data-test-type="scan"
+ data-element-from-point-selector="button"
+ data-caret-range-from-point-selector="button"
+ data-start-node-selector="button"
+ data-start-offset="0"
+ data-end-node-selector="button"
+ data-end-offset="0"
+ data-result-type="TextSourceElement"
+ data-sentence-scan-extent="100"
+ data-sentence="よみたん"
+ >
+ <button type="button" style="width: 100%; box-sizing: border-box; font-family: inherit; font-size: inherit; border: 1px solid #d8d8d8; background-color: #f0f0f0; padding: 0.2em;">よみたん</button>
+ </test-case>
+
+ <test-case
+ data-test-type="scan"
+ data-element-from-point-selector="img"
+ data-caret-range-from-point-selector="img"
+ data-start-node-selector="img"
+ data-start-offset="0"
+ data-end-node-selector="img"
+ data-end-offset="0"
+ data-result-type="TextSourceElement"
+ data-sentence-scan-extent="100"
+ data-sentence="よみたん"
+ >
+ <img src="data:image/gif;base64,R0lGODdhAQABAIABAAAAAP///ywAAAAAAQABAAACAkQBADs=" alt="よみたん" title="よみたん" style="width: 70px; height: 70px; image-rendering: crisp-edges; image-rendering: pixelated; display: block;">
+ </test-case>
+
+ <test-case
+ data-test-type="scan"
+ data-element-from-point-selector="span:nth-of-type(3)"
+ data-caret-range-from-point-selector="span:nth-of-type(3)"
+ data-start-node-selector="span:nth-of-type(3)"
+ data-start-offset="0"
+ data-end-node-selector="span:nth-of-type(3)"
+ data-end-offset="0"
+ data-result-type="TextSourceRange"
+ data-sentence-scan-extent="22"
+ data-sentence="ありがとございます3"
+ data-terminate-at-newlines="true"
+ >
+<span>ありがとございます1</span>
+<span>ありがとございます2</span>
+<span>ありがとございます3</span>
+<span>ありがとございます4</span>
+<span>ありがとございます5</span>
+ </test-case>
+
+ <test-case
+ data-test-type="scan"
+ data-element-from-point-selector="span:nth-of-type(3)"
+ data-caret-range-from-point-selector="span:nth-of-type(3)"
+ data-start-node-selector="span:nth-of-type(3)"
+ data-start-offset="0"
+ data-end-node-selector="span:nth-of-type(3)"
+ data-end-offset="0"
+ data-result-type="TextSourceRange"
+ data-sentence-scan-extent="22"
+ data-sentence="ありがとございます1&#10;ありがとございます2&#10;ありがとございます3&#10;ありがとございます4"
+ data-terminate-at-newlines="false"
+ >
+<span>ありがとございます1</span>
+<span>ありがとございます2</span>
+<span>ありがとございます3</span>
+<span>ありがとございます4</span>
+<span>ありがとございます5</span>
+ </test-case>
+
+ <test-case
+ data-test-type="text-source-range-seek"
+ data-seek-node-selector="span:nth-of-type(1)"
+ data-seek-node-is-text="true"
+ data-seek-offset="0"
+ data-seek-length="149"
+ data-seek-direction="forward"
+ data-expected-result-node-selector="span:nth-of-type(1)"
+ data-expected-result-node-is-text="true"
+ data-expected-result-offset="149"
+ data-expected-result-content="
+ あいうえお
+ かきくけこ
+ さしすせそ
+ たちつてと
+ なにぬねの
+ はひふへほ
+ まみむめも
+ や&#x3000;ゆ&#x3000;よ
+ らりるれろ
+ わゐ&#x3000;ゑを
+ "
+ >
+ <span>
+ あいうえお
+ かきくけこ
+ さしすせそ
+ たちつてと
+ なにぬねの
+ はひふへほ
+ まみむめも
+ や&#x3000;ゆ&#x3000;よ
+ らりるれろ
+ わゐ&#x3000;ゑを
+ </span><span>trailing content</span>
+ </test-case>
+
+ <test-case
+ data-test-type="text-source-range-seek"
+ data-seek-node-selector="span:nth-of-type(1)"
+ data-seek-node-is-text="true"
+ data-seek-offset="149"
+ data-seek-length="149"
+ data-seek-direction="backward"
+ data-expected-result-node-selector="span:nth-of-type(1)"
+ data-expected-result-node-is-text="true"
+ data-expected-result-offset="0"
+ data-expected-result-content="
+ あいうえお
+ かきくけこ
+ さしすせそ
+ たちつてと
+ なにぬねの
+ はひふへほ
+ まみむめも
+ や&#x3000;ゆ&#x3000;よ
+ らりるれろ
+ わゐ&#x3000;ゑを
+ "
+ >
+ <span>
+ あいうえお
+ かきくけこ
+ さしすせそ
+ たちつてと
+ なにぬねの
+ はひふへほ
+ まみむめも
+ や&#x3000;ゆ&#x3000;よ
+ らりるれろ
+ わゐ&#x3000;ゑを
+ </span><span>trailing content</span>
+ </test-case>
+
+ <test-case
+ data-test-type="text-source-range-seek"
+ data-seek-node-selector="span:nth-of-type(1)"
+ data-seek-node-is-text="true"
+ data-seek-offset="0"
+ data-seek-length="150"
+ data-seek-direction="forward"
+ data-expected-result-node-selector="span:nth-of-type(2)"
+ data-expected-result-node-is-text="true"
+ data-expected-result-offset="1"
+ data-expected-result-content="
+ あいうえお
+ かきくけこ
+ さしすせそ
+ たちつてと
+ なにぬねの
+ はひふへほ
+ まみむめも
+ や&#x3000;ゆ&#x3000;よ
+ らりるれろ
+ わゐ&#x3000;ゑを
+ t"
+ >
+ <span>
+ あいうえお
+ かきくけこ
+ さしすせそ
+ たちつてと
+ なにぬねの
+ はひふへほ
+ まみむめも
+ や&#x3000;ゆ&#x3000;よ
+ らりるれろ
+ わゐ&#x3000;ゑを
+ </span><span>trailing content</span>
+ </test-case>
+
+ <test-case
+ data-test-type="text-source-range-seek"
+ data-seek-node-selector="span:nth-of-type(2)"
+ data-seek-node-is-text="true"
+ data-seek-offset="1"
+ data-seek-length="150"
+ data-seek-direction="backward"
+ data-expected-result-node-selector="span:nth-of-type(1)"
+ data-expected-result-node-is-text="true"
+ data-expected-result-offset="0"
+ data-expected-result-content="
+ あいうえお
+ かきくけこ
+ さしすせそ
+ たちつてと
+ なにぬねの
+ はひふへほ
+ まみむめも
+ や&#x3000;ゆ&#x3000;よ
+ らりるれろ
+ わゐ&#x3000;ゑを
+ t"
+ >
+ <span>
+ あいうえお
+ かきくけこ
+ さしすせそ
+ たちつてと
+ なにぬねの
+ はひふへほ
+ まみむめも
+ や&#x3000;ゆ&#x3000;よ
+ らりるれろ
+ わゐ&#x3000;ゑを
+ </span><span>trailing content</span>
+ </test-case>
+
+</body>
+</html>