Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=599322.patch
5 -->
6 <head>
7 <title>Test for Bug 599322.patch</title>
8 <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
9 <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
10 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
11 </head>
12 <body>
13 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=599322.patch">Mozilla Bug 599322.patch</a>
14 <p id="display"></p>
15 <div id="content">
16 <div id="src">src<img src="/tests/editor/libeditor/html/tests/green.png"></div>
17 <iframe id="dst" src="javascript:;"></iframe>
18 </div>
19 <pre id="test">
20 <script type="application/javascript">
22 /** Test for Bug 599322.patch **/
24 SimpleTest.expectAssertions(1);
26 SimpleTest.waitForExplicitFinish();
27 addLoadEvent(function() {
28 var src = document.getElementById("src");
29 var dst = document.getElementById("dst");
30 var doc = dst.contentDocument;
31 doc.open();
32 doc.write("<html><head><base href='http://mochi.test:8888/'></head><body></body></html>");
33 doc.close();
34 SimpleTest.waitForFocus(function() {
35 getSelection().selectAllChildren(src);
36 SimpleTest.waitForClipboard("src",
37 function() {
38 synthesizeKey("c", {accelKey: true});
39 },
40 function() {
41 dst.contentDocument.designMode = "on";
42 dst.focus();
43 dst.contentDocument.body.focus();
44 synthesizeKey("v", {accelKey: true});
45 is(dst.contentDocument.querySelector("img").src,
46 document.querySelector("img").src,
47 "The source should be correctly set based on the base URI");
48 SimpleTest.finish();
49 },
50 function() {
51 SimpleTest.finish();
52 }
53 );
54 });
55 });
57 </script>
58 </pre>
59 </body>
60 </html>