| Index: LayoutTests/fast/dom/Window/window-focus-self.html
|
| diff --git a/LayoutTests/fast/dom/Window/window-focus-self.html b/LayoutTests/fast/dom/Window/window-focus-self.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..e1fb6dbe3e230b203f9cb077ec6fb90a5b1183d0
|
| --- /dev/null
|
| +++ b/LayoutTests/fast/dom/Window/window-focus-self.html
|
| @@ -0,0 +1,41 @@
|
| +<!DOCTYPE html>
|
| +<html>
|
| +<head>
|
| +<script>
|
| +function runTest() {
|
| + window.onfocus = windowFocused;
|
| + window.onblur = windowBlurred;
|
| +
|
| + if (window.testRunner) {
|
| + testRunner.waitUntilDone();
|
| + testRunner.dumpAsText();
|
| + testRunner.setWindowIsKey(false);
|
| + window.open('javascript:window.focus()', '_self', '');
|
| + setTimeout(function() { testRunner.notifyDone(); }, 0);
|
| + }
|
| +}
|
| +
|
| +function log(message) {
|
| + var console = document.getElementById("console");
|
| + var li = document.createElement("li");
|
| + var text = document.createTextNode(message);
|
| +
|
| + console.appendChild(li);
|
| + li.appendChild(text);
|
| +}
|
| +
|
| +function windowFocused() {
|
| + log("FAIL: Window was focused");
|
| +}
|
| +
|
| +function windowBlurred() {
|
| + log("Window was blurred");
|
| +}
|
| +</script>
|
| +</head>
|
| +<body>
|
| + This tests that a window cannot focus itself by using javascript: urls.
|
| + <ul id="console"></ul>
|
| + <script>runTest();</script>
|
| +</body>
|
| +</html>
|
|
|