| Index: webkit/data/layout_tests/chrome/fast/dom/window-shadowing.html
|
| ===================================================================
|
| --- webkit/data/layout_tests/chrome/fast/dom/window-shadowing.html (revision 13273)
|
| +++ webkit/data/layout_tests/chrome/fast/dom/window-shadowing.html (working copy)
|
| @@ -1,86 +0,0 @@
|
| -<html>
|
| -<body onload="test()">
|
| -<div id='result'>
|
| -<p>
|
| -Test that the window and top attributes cannot be overwritten by var
|
| -declarations or accessors defined using __defineGetter__ and
|
| -__defineSetter__. Flash accesses top.location and window.location and
|
| -for security needs to see the actual location.
|
| -</p>
|
| -</div>
|
| -<iframe id="testFrame"></iframe>
|
| -<script>
|
| -if (window.layoutTestController) {
|
| - layoutTestController.dumpAsText();
|
| - layoutTestController.waitUntilDone();
|
| -}
|
| -
|
| -function notifyDone() {
|
| - if (window.layoutTestController) {
|
| - layoutTestController.notifyDone();
|
| - }
|
| -}
|
| -
|
| -var resultDiv = document.getElementById("result");
|
| -
|
| -function check(passed) {
|
| - if (passed) {
|
| - resultDiv.innerHTML += "PASS<br>";
|
| - } else {
|
| - resultDiv.innerHTML += "FAIL<br>";
|
| - }
|
| -}
|
| -
|
| -var overwrite = { location: 'ick' };
|
| -
|
| -function failIfCalled() { check(false); }
|
| -
|
| -function testWindowAccessorOverwrite() {
|
| - __defineGetter__("window", failIfCalled);
|
| - window;
|
| - window.__defineGetter__("window", failIfCalled);
|
| - window.window;
|
| - this.__defineGetter__("window", failIfCalled);
|
| - this.window;
|
| - __defineSetter__("window", failIfCalled);
|
| - window = overwrite;
|
| - window.__defineSetter__("window", failIfCalled);
|
| - window.window = overwrite;
|
| - this.__defineSetter__("window", failIfCalled);
|
| - this.window = overwrite;
|
| - delete window;
|
| - __defineGetter__("window", failIfCalled);
|
| - window;
|
| -}
|
| -
|
| -function testTopAccessorOverwrite() {
|
| - __defineGetter__("top", failIfCalled);
|
| - top;
|
| - window.__defineGetter__("top", failIfCalled);
|
| - window.top;
|
| - this.__defineGetter__("top", failIfCalled);
|
| - this.top;
|
| - __defineSetter__("top", failIfCalled);
|
| - top = overwrite;
|
| - window.__defineSetter__("top", failIfCalled);
|
| - window.top = overwrite;
|
| - this.__defineSetter__("top", failIfCalled);
|
| - this.top = overwrite;
|
| - delete top;
|
| - __defineGetter__("top", failIfCalled);
|
| - top;
|
| -
|
| -}
|
| -
|
| -function testVarShadowing() {
|
| - testFrame.location = "resources/window-shadowing-inner.html";
|
| -}
|
| -
|
| -function test() {
|
| - testWindowAccessorOverwrite();
|
| - testTopAccessorOverwrite();
|
| - testVarShadowing();
|
| -}
|
| -</script>
|
| -</body>
|
| -</html>
|
|
|