haikuwebkit/LayoutTests/editing/pasteboard/copy-paste-converts-fixed-e...

51 lines
1.9 KiB
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This tests to see if position:fixed gets converted to position:absolute upon copy/paste
first test - before:
| <html>
| <head>
| "\n"
| <meta>
| content="text/html; charset=utf-8"
| http-equiv="Content-type"
| "\n"
| <script>
| src="../../resources/dump-as-markup.js"
| type="text/javascript"
| "\n"
| "\n"
| <body>
| "\nabc"
| <div>
| style="position: fixed; left: 0px; top: 0px;"
| "def"
| "ghi\n"
| <br>
| "\n\n"
| <script>
| "\n\nMarkup.description('This tests to see if position:fixed gets converted to position:absolute upon copy/paste');\n\ndocument.designMode = 'on';\n\nif (window.internals)\n window.internals.settings.setShouldConvertPositionStyleOnCopy(true);\n\nvar s = window.getSelection();\n\nMarkup.dump('test1', 'first test - before');\ndocument.execCommand("SelectAll");\ndocument.execCommand("Cut");\ndocument.execCommand("Paste");\nMarkup.dump('test1', 'first test - after');\n\n"
first test - after:
| <html>
| <head>
| "\n"
| <meta>
| content="text/html; charset=utf-8"
| http-equiv="Content-type"
| "\n"
| <script>
| src="../../resources/dump-as-markup.js"
| type="text/javascript"
| "\n"
| "\n"
| <body>
| <div>
| style="position: relative;"
| "abc"
| <div>
| style="position: absolute; left: 0px; top: 0px;"
| "def"
| "ghi <#selection-caret>"
| "\n\n"
| <script>
| "\n\nMarkup.description('This tests to see if position:fixed gets converted to position:absolute upon copy/paste');\n\ndocument.designMode = 'on';\n\nif (window.internals)\n window.internals.settings.setShouldConvertPositionStyleOnCopy(true);\n\nvar s = window.getSelection();\n\nMarkup.dump('test1', 'first test - before');\ndocument.execCommand("SelectAll");\ndocument.execCommand("Cut");\ndocument.execCommand("Paste");\nMarkup.dump('test1', 'first test - after');\n\n"