mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-27 04:38:02 +00:00
Bug 490152 - test_framerecursion.html | Error thrown during test: onLoad is not defined - got 0, expected 1; r=gavin a=orange-fix
This commit is contained in:
parent
195d5d22fa
commit
79786ca2a3
@ -10,6 +10,31 @@
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"></link>
|
||||
</head>
|
||||
<body id="contentbody">
|
||||
<pre id="test">
|
||||
<script class="testbody" type="text/javascript">
|
||||
|
||||
// Start the test once the iFrame loads
|
||||
function onLoad() {
|
||||
test_MicroformatsAPI();
|
||||
}
|
||||
|
||||
function test_MicroformatsAPI() {
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
Components.utils.import("resource://gre/modules/Microformats.js");
|
||||
|
||||
count = Microformats.count("geo",
|
||||
document.getElementById("contentbody"),
|
||||
{recurseExternalFrames: false},
|
||||
0);
|
||||
is(count, 1, "Only one geo - we don't count external frames");
|
||||
|
||||
count = Microformats.count("geo",
|
||||
document.getElementById("contentbody"),
|
||||
{recurseExternalFrames: true});
|
||||
is(count, 2, "Two Geo's - one in frame and one in iframe");
|
||||
}
|
||||
</script>
|
||||
</pre>
|
||||
|
||||
<frameset>
|
||||
<frame id="frame1">
|
||||
@ -36,31 +61,5 @@
|
||||
<!-- Geo -->
|
||||
<iframe id="iframe" src="geo.html" onload="onLoad();">
|
||||
</iframe>
|
||||
|
||||
<!-- Ok, the test, here we go -->
|
||||
<pre id="test">
|
||||
<script class="testbody" type="text/javascript">
|
||||
|
||||
// Start the test once the iFrame loads
|
||||
function onLoad() {
|
||||
test_MicroformatsAPI();
|
||||
}
|
||||
|
||||
function test_MicroformatsAPI() {
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
Components.utils.import("resource://gre/modules/Microformats.js");
|
||||
|
||||
count = Microformats.count("geo",
|
||||
document.getElementById("contentbody"),
|
||||
{recurseExternalFrames: false},
|
||||
0);
|
||||
is(count, 1, "Only one geo - we don't count external frames");
|
||||
|
||||
count = Microformats.count("geo",
|
||||
document.getElementById("contentbody"),
|
||||
{recurseExternalFrames: true});
|
||||
is(count, 2, "Two Geo's - one in frame and one in iframe");
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
x
Reference in New Issue
Block a user