Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/HTMLDialogElement/dialog-autofocus.html

Issue 2671603003: Move DIALOG element tests to html/dialog/. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/fast/dom/HTMLDialogElement/dialog-autofocus.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/HTMLDialogElement/dialog-autofocus.html b/third_party/WebKit/LayoutTests/fast/dom/HTMLDialogElement/dialog-autofocus.html
deleted file mode 100644
index 421f7f0c2ec1869f70c5ec6d8d773aae3239d618..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/fast/dom/HTMLDialogElement/dialog-autofocus.html
+++ /dev/null
@@ -1,68 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<script src="../../../resources/js-test.js"></script>
-<script src="../../forms/resources/common.js"></script>
-<script>
-description('Tests autofocus when a modal dialog is opened.');
-
-function test() {
- shouldBe('document.activeElement', 'document.getElementById("outer-button")');
-
- var dialog = document.getElementById('dialog');
- dialog.showModal();
-
- autofocusButton = document.getElementById('autofocus-button');
- shouldBe('document.activeElement', 'autofocusButton');
-
- anotherButton = document.getElementById('another-button');
- anotherButton.focus();
- shouldBe('document.activeElement', 'anotherButton');
-
- debug('Test that reattaching does not give focus back to a previously autofocused element.');
- autofocusButton.style.display = 'none';
- document.body.offsetHeight;
- autofocusButton.style.display = 'block';
- document.body.offsetHeight;
- shouldBe('document.activeElement', 'anotherButton');
-
- debug('Test that reinserting does not give focus back to a previously autofocused element.');
- var parentNode = autofocusButton.parentNode;
- parentNode.removeChild(autofocusButton);
- document.body.offsetHeight;
- parentNode.appendChild(autofocusButton);
- document.body.offsetHeight;
- shouldBe('document.activeElement', 'anotherButton');
-
- dialog.close();
- debug('Test that autofocus runs again when a dialog is reopened.');
- dialog.showModal();
- shouldBe('document.activeElement', 'autofocusButton');
- dialog.close();
-
- finishJSTest();
-}
-
-jsTestIsAsync = true;
-waitUntilLoadedAndAutofocused(test);
-</script>
-</head>
-<body>
-<button id="outer-button" autofocus></button>
-<dialog id="dialog">
- <button></button>
- <!-- Unfocusable elements with [autofocus] should be ignored. -->
- <input autofocus disabled>
- <textarea autofocus hidden></textarea>
- <dialog>
- <button autofocus></button>
- </dialog>
- <div>
- <span>
- <button id="autofocus-button" autofocus></button>
- </span>
- </div>
- <button id="another-button" autofocus></button>
-</dialog>
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698