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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/HTMLDialogElement/dialog-autofocus-multiple-times.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
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 is run every time a dialog is opened.'); 7 description('Tests autofocus is run every time a 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 15 matching lines...) Expand all
26 finishJSTest(); 26 finishJSTest();
27 } 27 }
28 28
29 jsTestIsAsync = true; 29 jsTestIsAsync = true;
30 waitUntilLoadedAndAutofocused(test); 30 waitUntilLoadedAndAutofocused(test);
31 </script> 31 </script>
32 </head> 32 </head>
33 <body> 33 <body>
34 <button id="outer-button" autofocus></button> 34 <button id="outer-button" autofocus></button>
35 <dialog id="dlg"> 35 <dialog id="dlg">
36 <!-- Unfocusable elements with [autofocus] should be ignored. -->
37 <input autofocus disabled>
38 <textarea autofocus hidden></textarea>
36 <input id="input1"></input> 39 <input id="input1"></input>
37 <input id="input2" autofocus></input> 40 <input id="input2" autofocus></input>
38 </dialog> 41 </dialog>
39 </body> 42 </body>
40 </html> 43 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698