<!DOCTYPE html>
<html>
<body>
<script type="data:text/html">
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=utf-8">
<meta name=ProgId content=Excel.Sheet>
<meta name=Generator content="Microsoft Excel 14">
<link id=Main-File rel=Main-File href="dummy_path">
<link rel=File-List href="dummy_path2">
<base href="dummy-base">
<title>Dummy Title</title>
<style>
<!--table
	{mso-displayed-decimal-separator:"\.";
	mso-displayed-thousand-separator:"\,";}
@page
	{margin:1.0in .75in 1.0in .75in;
	mso-header-margin:.5in;
	mso-footer-margin:.5in;}
td
	{padding-top:1px;
	padding-right:1px;
	padding-left:1px;
	mso-ignore:padding;
	color:black;
	font-size:12.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:Calibri, sans-serif;
	mso-font-charset:0;
	mso-number-format:General;
	text-align:general;
	vertical-align:bottom;
	border:none;
	mso-background-source:auto;
	mso-pattern:auto;
	mso-protection:locked visible;
	white-space:nowrap;
	mso-rotate:0;}
-->
</style>
</head>
<body link=blue vlink=purple>
<table border=0 cellpadding=0 cellspacing=0 width=130 style='border-collapse:
 collapse;width:130pt'>
<!--StartFragment-->
 <col width=65 span=2 style='width:65pt'>
 <tr height=15 style='height:15.0pt'>
  <td height=15 width=65 style='height:15.0pt;width:65pt'>hello</td>
  <td width=65 style='width:65pt'>world</td>
 </tr>
 <tr height=15 style='height:15.0pt'>
  <td height=15 style='height:15.0pt'></td>
  <td>webkit</td>
 </tr>
<!--EndFragment-->
</table>
</body>
</html>
</script>
<p>This test ensures WebKit strips away base, link, meta, style, and title elements before inserting HTML.</p>
<div id="test" contenteditable></div>
<pre><script type="text/javascript">

var htmlInPasteboard = document.getElementsByTagName('script')[0].firstChild.textContent;
document.getElementById('test').focus();
document.execCommand('InsertHTML', false, htmlInPasteboard);

var passed = true;
function expectNoInstanceOf(elementName) {
    var elements = document.body.getElementsByTagName(elementName);
    if (elements.length <= 0)
        return;

    document.write('FAIL - found ' + elements.length + ' ');
    document.write(elements.length == 1 ? 'instance' : 'instances');
    document.writeln(' of ' + elementName + ' element');
    passed = false;
}

if (window.testRunner)
    testRunner.dumpAsText();

expectNoInstanceOf('base');
expectNoInstanceOf('meta');
expectNoInstanceOf('link');
expectNoInstanceOf('title');
expectNoInstanceOf('style');
if (passed)
    document.writeln('PASS');

document.getElementById('test').innerHTML = '';

</script></pre>
</body>
</html>
