Revision control
Copy as Markdown
Other Tools
<!DOCTYPE HTML>
<html>
<!--
-->
<head>
<title>Test that we only sniff 512 bytes</title>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=739040">Mozilla Bug 739040</a>
<p id="display">
<iframe id="validTestFrame" src="http://mochi.test:8888/tests/suite/browser/test/mochitest/valid-feed.xml"></iframe>
<iframe id="unsniffableTestFrame" src="http://mochi.test:8888/tests/suite/browser/test/mochitest/valid-unsniffable-feed.xml"></iframe>
</p>
<div id="content" style="display: none">
</div>
<pre id="test">
<script class="testbody">
SimpleTest.waitForExplicitFinish();
addLoadEvent(function() {
is($("validTestFrame").contentDocument.documentElement.id, "feedHandler",
"valid feed should be sniffed");
isnot($("unsniffableTestFrame").contentDocument.documentElement.id, "feedHandler",
"unsniffable feed should not be sniffed");
});
addLoadEvent(SimpleTest.finish);
</script>
</pre>
</body>
</html>