mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-03-22 04:34:44 +00:00
try to make test more stable
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
|
||||
<script>
|
||||
function frame1Onload() {
|
||||
window.f1_onload = true;
|
||||
window.f1_onload = 'f1_onload_loaded';
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
<iframe id=f2 src="support/sub2.html"></iframe>
|
||||
|
||||
<script id="basic">
|
||||
// reload it
|
||||
$('#f1').src = 'support/sub 1.html';
|
||||
// reload it
|
||||
$('#f2').src = 'support/sub2.html';
|
||||
|
||||
testing.eventually(() => {
|
||||
testing.expectEqual(undefined, window[10]);
|
||||
@@ -53,7 +53,8 @@
|
||||
// Todo: Context security tokens
|
||||
// testing.expectEqual(true, window.sub1_loaded);
|
||||
// testing.expectEqual(true, window.sub2_loaded);
|
||||
// testing.expectEqual(2, window.sub1_count);
|
||||
// testing.expectEqual(1, window.sub1_count);
|
||||
// testing.expectEqual(2, window.sub2_count);
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -68,7 +69,7 @@
|
||||
document.documentElement.appendChild(f3);
|
||||
|
||||
testing.eventually(() => {
|
||||
testing.expectEqual(true, window.f1_onload);
|
||||
testing.expectEqual('f1_onload_loaded', window.f1_onload);
|
||||
testing.expectEqual(true, f3_load_event);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -4,4 +4,5 @@
|
||||
<script>
|
||||
// should not have access to the parent's JS context
|
||||
window.top.sub2_loaded = window.testing == undefined;
|
||||
window.top.sub2_count = (window.top.sub2_count || 0) + 1;
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user