diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /layout/base/tests/chrome/bug1041200_window.html | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'layout/base/tests/chrome/bug1041200_window.html')
-rw-r--r-- | layout/base/tests/chrome/bug1041200_window.html | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/layout/base/tests/chrome/bug1041200_window.html b/layout/base/tests/chrome/bug1041200_window.html new file mode 100644 index 000000000..e098e1d92 --- /dev/null +++ b/layout/base/tests/chrome/bug1041200_window.html @@ -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> + |