text-transform-copy-paste-001-manual.html (1329B)
1 <!doctype html> 2 <meta charset=utf-8> 3 <title>CSS Text 3 test: effects of text-transform on plain text copy&paste</title> 4 <link rel=author title="Florian Rivoal" href="https://florian.rivoal.net"> 5 <link rel=help href="https://drafts.csswg.org/css-text-3/#text-transform-property"> 6 <meta name=flags content="interact"> 7 <meta name=assert content="text-transform must not affect the content of a plain text copy and paste operation."> 8 <!-- 9 I wish this test could be written automatedly, but I don't think it can. 10 We can work around the fact that document.execCommand(‘copy’) only works when triggered by user interactions 11 by using test_driver.bless, 12 but even then there's no way to read the content of the clipboard in an automated way: 13 * document.execCommand(‘paste’) isn't supported in regular web pages by anyone but IE 14 * The Clipboard API is not supported across the board, 15 and Firefox only supports reading the clipboard in browser extensions, 16 not in regular web pages. 17 --> 18 <style> 19 div { 20 text-transform: uppercase; 21 border: solid 5px blue; 22 } 23 textarea { border: solid 5px orange; } 24 div, textarea { padding: 1em; } 25 </style> 26 27 <p>Copy the content of the blue box, then paste it in the orange box. 28 <p>The test passes if the result is in lowercase. 29 30 <div id=source>there is no need to shout</div> 31 <textarea></textarea>