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

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

Issue 2125893003: HTMLDialogElement#showModal() should ignore unfocusable elements with [autofocus] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update dialog-autofocus-multiple-times.html Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/dom/HTMLDialogElement/dialog-autofocus-multiple-times.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../../resources/js-test.js"></script> 4 <script src="../../../resources/js-test.js"></script>
5 <script src="../../forms/resources/common.js"></script> 5 <script src="../../forms/resources/common.js"></script>
6 <script> 6 <script>
7 description('Tests autofocus when a modal dialog is opened.'); 7 description('Tests autofocus when a modal dialog is opened.');
8 8
9 function test() { 9 function test() {
10 shouldBe('document.activeElement', 'document.getElementById("outer-button")' ); 10 shouldBe('document.activeElement', 'document.getElementById("outer-button")' );
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 } 44 }
45 45
46 jsTestIsAsync = true; 46 jsTestIsAsync = true;
47 waitUntilLoadedAndAutofocused(test); 47 waitUntilLoadedAndAutofocused(test);
48 </script> 48 </script>
49 </head> 49 </head>
50 <body> 50 <body>
51 <button id="outer-button" autofocus></button> 51 <button id="outer-button" autofocus></button>
52 <dialog id="dialog"> 52 <dialog id="dialog">
53 <button></button> 53 <button></button>
54 <!-- Unfocusable elements with [autofocus] should be ignored. -->
55 <input autofocus disabled>
56 <textarea autofocus hidden></textarea>
54 <dialog> 57 <dialog>
55 <button autofocus></button> 58 <button autofocus></button>
56 </dialog> 59 </dialog>
57 <div> 60 <div>
58 <span> 61 <span>
59 <button id="autofocus-button" autofocus></button> 62 <button id="autofocus-button" autofocus></button>
60 </span> 63 </span>
61 </div> 64 </div>
62 <button id="another-button" autofocus></button> 65 <button id="another-button" autofocus></button>
63 </dialog> 66 </dialog>
64 </body> 67 </body>
65 </html> 68 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/dom/HTMLDialogElement/dialog-autofocus-multiple-times.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698