Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / pasteboard / paste-head-contents.html
blob952950877776160c51ce6f3e935e2046ed874d19
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <script type="data:text/html">
5 <html xmlns:v="urn:schemas-microsoft-com:vml"
6 xmlns:o="urn:schemas-microsoft-com:office:office"
7 xmlns:x="urn:schemas-microsoft-com:office:excel"
8 xmlns="http://www.w3.org/TR/REC-html40">
9 <head>
10 <meta http-equiv=Content-Type content="text/html; charset=utf-8">
11 <meta name=ProgId content=Excel.Sheet>
12 <meta name=Generator content="Microsoft Excel 14">
13 <link id=Main-File rel=Main-File href="dummy_path">
14 <link rel=File-List href="dummy_path2">
15 <base href="dummy-base">
16 <title>Dummy Title</title>
17 <style>
18 <!--table
19 {mso-displayed-decimal-separator:"\.";
20 mso-displayed-thousand-separator:"\,";}
21 @page
22 {margin:1.0in .75in 1.0in .75in;
23 mso-header-margin:.5in;
24 mso-footer-margin:.5in;}
26 {padding-top:1px;
27 padding-right:1px;
28 padding-left:1px;
29 mso-ignore:padding;
30 color:black;
31 font-size:12.0pt;
32 font-weight:400;
33 font-style:normal;
34 text-decoration:none;
35 font-family:Calibri, sans-serif;
36 mso-font-charset:0;
37 mso-number-format:General;
38 text-align:general;
39 vertical-align:bottom;
40 border:none;
41 mso-background-source:auto;
42 mso-pattern:auto;
43 mso-protection:locked visible;
44 white-space:nowrap;
45 mso-rotate:0;}
46 -->
47 </style>
48 </head>
49 <body link=blue vlink=purple>
50 <table border=0 cellpadding=0 cellspacing=0 width=130 style='border-collapse:
51 collapse;width:130pt'>
52 <!--StartFragment-->
53 <col width=65 span=2 style='width:65pt'>
54 <tr height=15 style='height:15.0pt'>
55 <td height=15 width=65 style='height:15.0pt;width:65pt'>hello</td>
56 <td width=65 style='width:65pt'>world</td>
57 </tr>
58 <tr height=15 style='height:15.0pt'>
59 <td height=15 style='height:15.0pt'></td>
60 <td>webkit</td>
61 </tr>
62 <!--EndFragment-->
63 </table>
64 </body>
65 </html>
66 </script>
67 <p>This test ensures WebKit strips away base, link, meta, style, and title elements before inserting HTML.</p>
68 <div id="test" contenteditable></div>
69 <pre><script type="text/javascript">
71 var htmlInPasteboard = document.getElementsByTagName('script')[0].firstChild.textContent;
72 document.getElementById('test').focus();
73 document.execCommand('InsertHTML', false, htmlInPasteboard);
75 var passed = true;
76 function expectNoInstanceOf(elementName) {
77 var elements = document.body.getElementsByTagName(elementName);
78 if (elements.length <= 0)
79 return;
81 document.write('FAIL - found ' + elements.length + ' ');
82 document.write(elements.length == 1 ? 'instance' : 'instances');
83 document.writeln(' of ' + elementName + ' element');
84 passed = false;
87 if (window.testRunner)
88 testRunner.dumpAsText();
90 expectNoInstanceOf('base');
91 expectNoInstanceOf('meta');
92 expectNoInstanceOf('link');
93 expectNoInstanceOf('title');
94 expectNoInstanceOf('style');
95 if (passed)
96 document.writeln('PASS');
98 document.getElementById('test').innerHTML = '';
100 </script></pre>
101 </body>
102 </html>