| This tests to see if position:absolute gets wrapped with a position:relative 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: absolute; left: 0px; top: 0px;" |
| | "def" |
| | "ghi\n" |
| | <br> |
| | "\n\n" |
| | <script> |
| | "\n\nMarkup.description('This tests to see if position:absolute gets wrapped with a position:relative 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:absolute gets wrapped with a position:relative 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" |