author Florian Rivoal <git@florian.rivoal.net>
Thu, 31 Jan 2019 15:16:15 +0000
changeset 457805 740eefb87a454562ba9572fd09a2b00716527a47
parent 456903 58591a07b651876435553a897df5d6592ca1e5e5
permissions -rw-r--r--
Bug 1497386 [wpt PR 13428] - [css-text] plain-text copy & paste does not preserve text-transform, a=testonly Automatic update from web-platform-tests [css-text] plain-text copy & paste does not preserve text-transform This is a test for https://github.com/w3c/csswg-drafts/issues/627 -- Merge pull request #13428 from frivoal/text-627 [css-text] plain-text copy & paste does not preserve text-transform -- wpt-commits: 176d04ddd933ec150424b7f2c923ad6c4519b618, e13446ad8a47fa1643f3afa987d0da950822023b wpt-pr: 13428

<!doctype html>
<meta charset=utf-8>
<title>CSS Text 3 test: effects of text-transform on plain text copy&paste</title>
<link rel=author title="Florian Rivoal" href="https://florian.rivoal.net">
<link rel=help href="https://drafts.csswg.org/css-text-3/#text-transform-property">
<meta name=flags content="interact">
<meta name=assert content="text-transform must not affect the content of a plain text copy and paste operation.">
I wish this test could be written automatedly, but I don't think it can.
We can work around the fact that  document.execCommand(‘copy’) only works when triggered by user interactions
by using test_driver.bless,
but even then there's no way to read the content of the clipboard in an automated way:
* document.execCommand(‘paste’) isn't supported in regular web pages by anyone but IE
* The Clipboard API is not supported across the board,
  and Firefox only supports reading the clipboard in browser extensions,
  not in regular web pages.
div {
  text-transform: uppercase;
  border: solid 5px blue;
textarea { border: solid 5px orange; }
div, textarea { padding: 1em; }

<p>Copy the content of the blue box, then paste it in the orange box.
<p>The test passes if the result is in lowercase.

<div id=source>there is no need to shout</div>