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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/HTMLDialogElement/show-modal-focusing-steps.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/show-modal-focusing-steps.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/HTMLDialogElement/show-modal-focusing-steps.html b/third_party/WebKit/LayoutTests/fast/dom/HTMLDialogElement/show-modal-focusing-steps.html
deleted file mode 100644
index 41dde1826f73e07c846b1329b22611dd6809352e..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/fast/dom/HTMLDialogElement/show-modal-focusing-steps.html
+++ /dev/null
@@ -1,67 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<script src="../../../resources/js-test.js"></script>
-<script src="../../forms/resources/common.js"></script>
-<script>
-description('Tests focus when a modal dialog is opened.');
-
-function test()
-{
- outerButton = document.getElementById('outer-button');
- shouldBe('document.activeElement', 'outerButton');
-
- debug('Test that focus goes to body if the dialog has no focusable elements, including itself');
- var outerDialog = document.getElementById('outer-dialog');
- outerDialog.showModal();
- shouldBe('document.activeElement', 'document.body');
-
- debug('Test that an autofocus element in the dialog gets focus.');
- var dialog = document.getElementById('dialog');
- dialog.showModal();
- autofocusButton = document.getElementById('autofocus-button');
- shouldBe('document.activeElement', 'autofocusButton');
- dialog.close();
-
- debug('... or else first focusable element in the dialog gets focus.');
- autofocusButton.parentNode.removeChild(autofocusButton);
- dialog.showModal();
- firstButton = document.getElementById('first-button');
- shouldBe('document.activeElement', 'firstButton');
- dialog.close();
-
- debug('... or else the dialog itself gets focus.');
- var buttons = dialog.querySelectorAll('button');
- for (var i = 0; i < buttons.length; ++i)
- buttons[i].hidden = true;
- dialog.showModal();
- shouldBe('document.activeElement', 'dialog');
- dialog.close();
-
- document.getElementById('outer-dialog').close();
- finishJSTest();
-}
-
-jsTestIsAsync = true;
-waitUntilLoadedAndAutofocused(test);
-</script>
-</head>
-<body>
-<button id="outer-button" autofocus></button>
-<dialog id="outer-dialog">
- <dialog id="dialog" tabindex=0>
- <button disabled></button>
- <dialog>
- <button autofocus></button>
- </dialog>
- <button id="first-button"></button>
- <div>
- <span>
- <button id="autofocus-button" autofocus></button>
- </span>
- </div>
- <button id="final-button"></button>
- </dialog>
-</dialog>
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698