2009-11-09 17:41:12 +03:00
|
|
|
<!DOCTYPE HTML>
|
|
|
|
<html>
|
|
|
|
<!--
|
|
|
|
-->
|
|
|
|
<head>
|
|
|
|
<title>Test for copy/paste</title>
|
|
|
|
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
2015-02-03 01:34:17 +03:00
|
|
|
<script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
|
2018-04-18 21:43:45 +03:00
|
|
|
<script type="text/javascript" src="/tests/SimpleTest/AddTask.js"></script>
|
2013-07-20 06:56:18 +04:00
|
|
|
<script type="text/javascript" src="copypaste.js"></script>
|
2009-11-09 17:41:12 +03:00
|
|
|
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=524975">Mozilla Bug </a>
|
|
|
|
<p id="display"></p>
|
|
|
|
<div id="content" style="display: none">
|
|
|
|
</div>
|
|
|
|
<pre id="test">
|
|
|
|
<script class="testbody" type="text/javascript">
|
|
|
|
|
|
|
|
SimpleTest.waitForExplicitFinish();
|
2017-12-07 16:39:50 +03:00
|
|
|
addLoadEvent(() => {
|
|
|
|
add_task(async function test_copyhtml() {
|
|
|
|
await testCopyPaste(false);
|
|
|
|
});
|
|
|
|
});
|
2009-11-09 17:41:12 +03:00
|
|
|
|
|
|
|
</script>
|
|
|
|
</pre>
|
|
|
|
<div>
|
|
|
|
|
|
|
|
<div id="draggable" title="title to have a long HTML line">This is a <em>draggable</em> bit of text.</div>
|
2010-03-18 18:19:36 +03:00
|
|
|
<textarea id="input" cols="40" rows="10"></textarea>
|
|
|
|
|
|
|
|
<div id="alist">
|
|
|
|
bla
|
|
|
|
<ul>
|
|
|
|
<li>foo</li>
|
2010-05-25 03:24:15 +04:00
|
|
|
<li style="display: none;">baz</li>
|
2010-03-18 18:19:36 +03:00
|
|
|
<li>bar</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
2009-11-09 17:41:12 +03:00
|
|
|
|
2010-06-21 23:56:18 +04:00
|
|
|
<div id="blist">
|
|
|
|
mozilla
|
|
|
|
<ol>
|
|
|
|
<li>foo</li>
|
|
|
|
<li style="display: none;">baz</li>
|
|
|
|
<li>bar</li>
|
|
|
|
</ol>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="clist">
|
|
|
|
mzla
|
|
|
|
<ul>
|
|
|
|
<li>foo<ul>
|
|
|
|
<li>bazzinga!</li>
|
|
|
|
</ul></li>
|
|
|
|
<li style="display: none;">baz</li>
|
|
|
|
<li>bar</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
|
2010-05-25 03:24:15 +04:00
|
|
|
<div id="div4">
|
|
|
|
T<textarea>t t t</textarea>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="div5">
|
|
|
|
T<textarea> </textarea>
|
|
|
|
</div>
|
|
|
|
|
2015-02-03 01:34:17 +03:00
|
|
|
<div>Copy1then Paste<ul id="ul1"><li>LI</li>
|
|
|
|
</ul></div>
|
|
|
|
|
|
|
|
<div><ul id="ul2">
|
|
|
|
<li>LI</li></ul>Copy2then Paste</div>
|
|
|
|
|
|
|
|
<div><ul id="ul3"><li>
|
|
|
|
<li>LI</li></ul>Copy3then Paste</div>
|
|
|
|
|
|
|
|
<div><div id="div1s"><div id="div1se1">before<div>inner</div></div>after</div></div>
|
|
|
|
<div><div id="div2s"><div id="div2se1">before<div>inner</div></div>after</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="contentEditable1" contenteditable spellcheck="false"></div>
|
|
|
|
<div id="contentEditable2" contenteditable spellcheck="false"></div>
|
|
|
|
<div id="contentEditable3" contenteditable spellcheck="false"></div>
|
|
|
|
<div id="contentEditable4" contenteditable spellcheck="false"></div>
|
|
|
|
<div id="contentEditable5" contenteditable spellcheck="false"></div>
|
2015-02-03 01:34:17 +03:00
|
|
|
|
|
|
|
<div>
|
|
|
|
<span id="1127835crash1">1</span><div id="1127835crash2"><div>
|
|
|
|
</div></div><a href="http://www.mozilla.org/" id="1127835crash3">3</a>
|
|
|
|
</div>
|
|
|
|
<div id="contentEditable6" contenteditable spellcheck="false"></div>
|
2015-02-03 01:34:17 +03:00
|
|
|
|
2010-05-25 03:24:15 +04:00
|
|
|
<div id="div6" style="display:none"></div>
|
|
|
|
<script>
|
|
|
|
var x = $("div6")
|
|
|
|
x.appendChild(document.createTextNode('di'))
|
|
|
|
x.appendChild(document.createTextNode('v6'))
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<div id="div7" style="display:none">div7</div>
|
|
|
|
<div id="div8" style="visibility:hidden">div8</div>
|
|
|
|
<div style="visibility:hidden"><div id="div9" style="visibility:visible">div9</div></div>
|
|
|
|
<div style="visibility:hidden"><div><div><div id="div10"></div></div></div></div>
|
|
|
|
<script>
|
|
|
|
var x = $("div10")
|
|
|
|
x.appendChild(document.createTextNode('div'))
|
|
|
|
x.appendChild(document.createTextNode('10'))
|
|
|
|
</script>
|
|
|
|
|
2010-10-11 02:07:00 +04:00
|
|
|
<div id="div11" oncopy="modifySelection('X')"><span>div</span>11</div>
|
|
|
|
<div id="div12" oncopy="modifySelection('X<b style=\'display:none\'>Y</b>')"><span>div</span>12</div>
|
2010-05-25 03:24:15 +04:00
|
|
|
|
2011-08-09 19:14:37 +04:00
|
|
|
<div id="div13">_<noscript>FAIL</noscript>_</div>
|
|
|
|
|
2012-03-31 18:10:34 +04:00
|
|
|
<table><tr id=tr1><td>foo</td><td>bar</td></tr></table>
|
2015-02-03 01:34:17 +03:00
|
|
|
<table><tr id=tr2><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr><tr id=tr3><td>5</td><td>6</td></tr></table>
|
2012-03-31 18:10:34 +04:00
|
|
|
|
2009-11-09 17:41:12 +03:00
|
|
|
</div>
|
|
|
|
</body>
|
|
|
|
</html>
|