mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-13 10:47:31 +09:00
import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo
This commit is contained in:
commit
dcd9973243
150858 changed files with 23884658 additions and 0 deletions
45
layout/base/tests/chrome/bug1041200_window.html
Normal file
45
layout/base/tests/chrome/bug1041200_window.html
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>Test for Bug 1041200</title>
|
||||
<script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/WindowSnapshot.js"></script>
|
||||
<script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/paint_listener.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<iframe style="width:700px; height:500px; margin-top:200px;" id="ourFrame"></iframe>
|
||||
<script>
|
||||
var SpecialPowers = window.opener.wrappedJSObject.SpecialPowers;
|
||||
var SimpleTest = window.opener.wrappedJSObject.SimpleTest;
|
||||
var ok = window.opener.wrappedJSObject.ok;
|
||||
var info = window.opener.wrappedJSObject.info;
|
||||
|
||||
var viewer =
|
||||
SpecialPowers.wrap(ourFrame).contentWindow
|
||||
.QueryInterface(SpecialPowers.Ci.nsIInterfaceRequestor)
|
||||
.getInterface(SpecialPowers.Ci.nsIWebNavigation)
|
||||
.QueryInterface(SpecialPowers.Ci.nsIDocShell)
|
||||
.contentViewer;
|
||||
viewer.fullZoom = 2;
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
window.onload = function() {
|
||||
window.waitForAllPaintsFlushed(function () {
|
||||
// Supply random key to ensure load actually happens
|
||||
ourFrame.src = "data:text/html,<body onload='parent.childLoaded()' style='background:lime'><p>Hello<p>Hello<p>Hello<p>Hello<p>Hello<p>" + Math.random();
|
||||
}, document.getElementById("ourFrame").contentDocument);
|
||||
};
|
||||
|
||||
window.childLoaded = function() {
|
||||
setTimeout(function() {
|
||||
window.waitForAllPaintsFlushed(function(x1, y1, x2, y2) {
|
||||
ok(x2 - x1 >= 700 && y2 - y1 >= 500,
|
||||
"expected to see invalidate of entire frame, got " + [x1,y1,x2,y2].join(','));
|
||||
SimpleTest.finish();
|
||||
window.close();
|
||||
});
|
||||
}, 0);
|
||||
};
|
||||
</script>
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue