diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2009-03-03 18:28:41 -0800 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-03-03 18:28:41 -0800 |
commit | 648161bb0edfc3d43db63caed5cc5213bc6cb78f (patch) | |
tree | 4b825dc642cb6eb9a060e54bf8d69288fbee4904 /WebCore/manual-tests/window-sizing.html | |
parent | a65af38181ac7d34544586bdb5cd004de93897ad (diff) | |
download | external_webkit-648161bb0edfc3d43db63caed5cc5213bc6cb78f.zip external_webkit-648161bb0edfc3d43db63caed5cc5213bc6cb78f.tar.gz external_webkit-648161bb0edfc3d43db63caed5cc5213bc6cb78f.tar.bz2 |
auto import from //depot/cupcake/@135843
Diffstat (limited to 'WebCore/manual-tests/window-sizing.html')
-rw-r--r-- | WebCore/manual-tests/window-sizing.html | 126 |
1 files changed, 0 insertions, 126 deletions
diff --git a/WebCore/manual-tests/window-sizing.html b/WebCore/manual-tests/window-sizing.html deleted file mode 100644 index 572998b..0000000 --- a/WebCore/manual-tests/window-sizing.html +++ /dev/null @@ -1,126 +0,0 @@ -<html> -<head> -<script> -var w; -function Open(sFeatures) -{ - if (w && !w.closed) - w.close(); - - w = window.open("resources/popup200x200.html", "popup", sFeatures); - -} - -function test1() -{ - Open("width=200, height=200, left = 0, top = 0, scrollbars, resizable"); - - setConsole(document.getElementById('console1')); - clearConsole(); - shouldBe("w.innerHeight", 200); - shouldBe("w.innerWidth", 200); - shouldBe("w.outerWidth", 200); - shouldBe("w.screenLeft", 0); - shouldBe("w.screenTop", 22); // empirical result of low dpi testing - shouldBe("w.outerHeight", 223); // empirical result of low dpi testing -} - -function test2() -{ - console = document.getElementById('console2'); - Open("width=200, height=200, left = 0, top = 0, scrollbars, menubar, status, toolbar, resizable"); - - setConsole(document.getElementById('console2')); - clearConsole(); - shouldBe("w.innerHeight", 200); - shouldBe("w.innerWidth", 200); - shouldBe("w.outerWidth", 200); - shouldBe("w.screenLeft", 0); - shouldBe("w.screenTop", 22); // empirical result of low dpi testing - shouldBe("w.outerHeight", 313); // empirical result of low dpi testing -} - -function test3() -{ - Open("width=200,height=200,left=" + (screen.width - 200) + ",screenY=0, resizable"); - w.moveBy(0, screen.height - w.screenTop - w.outerHeight); - - // should be no-ops - w.moveTo(w.screenLeft - 100, w.screenTop + 100); - w.moveBy(100, -100); - w.resizeTo(w.outerWidth - 100 , w.outerHeight - 100); - w.resizeBy(100, 100); - - setConsole(document.getElementById('console3')); - clearConsole(); - shouldBe("w.innerHeight", 200); - shouldBe("w.innerWidth", 200); - shouldBe("w.outerWidth", 200); - shouldBe("w.screenLeft", screen.width - 200); - shouldBe("w.screenTop", screen.height - w.outerHeight); - shouldBe("w.outerHeight", 223); // empirical result of low dpi testing -} - -var console; -function print(message, color) -{ - var paragraph = document.createElement("div"); - paragraph.appendChild(document.createTextNode(message)); - paragraph.style.fontFamily = "monospace"; - if (color) - paragraph.style.color = color; - console.appendChild(paragraph); -} - -function clearConsole() -{ - console.innerHTML = ""; -} - -function setConsole(c) -{ - console = c; -} - -function shouldBe(a, b) -{ - var evalA = eval(a); - if (evalA == b) - print("PASS: " + a + " should be " + b + " and is.", "green"); - else - print("FAIL: " + a + " should be " + b + " but instead is " + evalA + ".", "red"); -} -</script> -</head> -<body> - -<p>This test checks our support for window sizing and positioning.</p> -<p>To test: Click each button below. Check to make sure that the window it opens has the specified attributes. - Also check for a series of 'PASS' messages below the button.</p> -<p style="color:red">NOTE: Make sure to test at magnified resolutions.</p> -<p>To test @ 2X resolution:</p> -<ol> -<li>Open Quartz Debug (/Developer/Applications/Performance Tools).</li> -<li>Select Tools -> Show User Interface Resolution.</li> -<li>Set the resolution to 2.0.</li> -<li>Restart Safari.</li> -</ol> -<hr> - -<p>Window size (no toolbars): You should see a red 1 pixel border along every edge of this page, and no scrollbars.</p> -<input type="button" value="open it!" onclick="test1()"> -<div id='console1'></div> -<hr> - -<p>Window size (all toolbars): You should see a red 1 pixel border along every edge of this page, and no scrollbars.</p> -<input type="button" value="open it!" onclick="test2()"> -<div id='console2'></div> -<hr> - -<p>Window positioning: This window should be aligned exactly to the bottom right corner of the screen.</p> -<input type="button" value="open it!" onclick="test3()"> -<div id='console3'></div> -<hr> - -</body> -</html> |