gecko/dom/tests/mochitest/general/test_browserFrame1.html
2012-01-20 12:02:48 -05:00

46 lines
1.0 KiB
HTML

<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=710231
-->
<head>
<title>Test for Bug 710231</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<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=710231">Mozilla Bug 710231</a>
<!--
Test that an iframe without the |mozbrowser| attribute does not emit
mozbrowserX events.
-->
<iframe id='iframe' onload='iframeLoad()'></iframe>
<script type="application/javascript;version=1.7">
"use strict";
SimpleTest.waitForExplicitFinish();
function runTest() {
var iframe = document.getElementById('iframe');
iframe.addEventListener('mozbrowserloadstart', function() {
ok(false, 'Should not send mozbrowserloadstart event.');
});
iframe.src = 'http://example.com';
}
function iframeLoad() {
ok(true, 'Got iframe load event.');
SimpleTest.finish();
}
addEventListener('load', runTest());
</script>
</body>
</html>