blob: 0522609f625d4e6bd2fc1125fdde56f74948110d [file] [log] [blame]
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"