| <!-- webkit-test-runner [ useFlexibleViewport=true textExtractionEnabled=true ] --> |
| <!DOCTYPE html> |
| <html> |
| <meta name="viewport" content="width=device-width, initial-scale=1"> |
| <meta charset="utf-8"> |
| <head> |
| <script src="../../resources/ui-helper.js"></script> |
| </head> |
| <body> |
| <!-- Strip zero-width characters --> |
| <p>Zero‍Width‍Joiner</p> |
| <p>Zero​Width​Space</p> |
| <p>Zero‌Width‌Non‌Joiner</p> |
| <p>Word⁠Joiner⁠Test</p> |
| <p>BOMTest</p> |
| |
| <!-- Remove empty markdown list items --> |
| <ul id="list-with-empty"> |
| <li>First item</li> |
| <li></li> |
| <li>Second item</li> |
| <li> </li> |
| <li>Third item</li> |
| </ul> |
| |
| <!-- De-duplicate consecutive lines --> |
| <div id="duplicates"> |
| <p>Repeated text</p> |
| <p>Repeated text</p> |
| <p>Repeated text</p> |
| <p>Different text</p> |
| <p>Different text</p> |
| </div> |
| |
| <script> |
| function createResultDiv(text) { |
| let div = document.createElement("div"); |
| div.textContent = text; |
| div.style.whiteSpace = "pre"; |
| return div; |
| } |
| |
| addEventListener("load", async () => { |
| if (!window.testRunner) |
| return; |
| |
| testRunner.dumpAsText(); |
| testRunner.waitUntilDone(); |
| |
| const resultDivs = []; |
| for (let outputFormat of ["markdown", "text-tree", "html"]) { |
| resultDivs.push(createResultDiv(`--- ${outputFormat}`)) |
| resultDivs.push(createResultDiv("\n")) |
| resultDivs.push(createResultDiv(await UIHelper.requestDebugText({ |
| outputFormat, |
| includeRects: false, |
| includeURLs: false, |
| }))); |
| resultDivs.push(createResultDiv("\n")) |
| } |
| |
| document.body.replaceChildren(...resultDivs); |
| testRunner.notifyDone(); |
| }); |
| </script> |
| </body> |
| </html> |