content/canvas/test/test_drawWindow.html

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 <!DOCTYPE HTML>
michael@0 2 <html>
michael@0 3 <head>
michael@0 4 <meta charset="utf-8">
michael@0 5 <title>Test for canvas drawWindow</title>
michael@0 6 <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
michael@0 7 <script type="application/javascript" src="/tests/SimpleTest/WindowSnapshot.js"></script>
michael@0 8 <script type="application/javascript" src="file_drawWindow_common.js"></script>
michael@0 9 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
michael@0 10 <script type="application/javascript">
michael@0 11
michael@0 12 SimpleTest.waitForExplicitFinish();
michael@0 13 window.addEventListener("load", openSourceWindow, false);
michael@0 14
michael@0 15 var sourceWindow;
michael@0 16
michael@0 17 function openSourceWindow(event) {
michael@0 18 if (event.target != document) {
michael@0 19 return;
michael@0 20 }
michael@0 21
michael@0 22 sourceWindow = window.open("file_drawWindow_source.html", "",
michael@0 23 "width=200,height=100");
michael@0 24 sourceWindow.addEventListener("load", runTests, false);
michael@0 25 }
michael@0 26
michael@0 27 function runTests(event) {
michael@0 28 if (event.target != sourceWindow.document) {
michael@0 29 return;
michael@0 30 }
michael@0 31
michael@0 32 // Run the tests with the source document in an <iframe> within this
michael@0 33 // page, which we expect to have transparency.
michael@0 34 runDrawWindowTests(document.getElementById("source").contentWindow,
michael@0 35 0, true);
michael@0 36
michael@0 37 // Run the tests on the same source document, but in a window opened
michael@0 38 // by window.open. We do not expect this to have transparency...
michael@0 39 // except on B2G. (This is *probably* a bug in B2G.)
michael@0 40 var isB2G = /Mobile|Tablet/.test(navigator.userAgent) &&
michael@0 41 !navigator.userAgent.contains("Android");
michael@0 42 runDrawWindowTests(sourceWindow, 0, isB2G);
michael@0 43
michael@0 44 sourceWindow.close();
michael@0 45
michael@0 46 SimpleTest.finish();
michael@0 47 }
michael@0 48
michael@0 49 </script>
michael@0 50 </head>
michael@0 51 <body>
michael@0 52 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=">Mozilla Bug </a>
michael@0 53 <iframe id="source" src="file_drawWindow_source.html" width="200" height="100"></iframe>
michael@0 54 </body>
michael@0 55 </html>

mercurial