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

Side by Side Diff: third_party/WebKit/LayoutTests/shadow-dom/focus-navigation-with-delegatesFocus.html

Issue 1862563002: Skip shadow hosts with negative tabindex in focus navigation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refactor Created 4 years, 8 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="../fast/dom/shadow/resources/shadow-dom.js"></script> 5 <script src="../fast/dom/shadow/resources/shadow-dom.js"></script>
6 </head> 6 </head>
7 <body> 7 <body>
8 <p>This tests TAB focus navigation with delegatesFocus flag on shadow hosts</p> 8 <p>This tests TAB focus navigation with delegatesFocus flag on shadow hosts</p>
9 <pre id="console"></pre> 9 <pre id="console"></pre>
10 <div id="sandbox"></div> 10 <div id="sandbox"></div>
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 106
107 function test5(mode) { 107 function test5(mode) {
108 debug('(5/8) Testing tab navigation order with tabindex=-1 and delegatesFocu s=false'); 108 debug('(5/8) Testing tab navigation order with tabindex=-1 and delegatesFocu s=false');
109 prepareDOMTree(sandbox, mode, -1, false); 109 prepareDOMTree(sandbox, mode, -1, false);
110 hostDiv = document.getElementById('host-div'); 110 hostDiv = document.getElementById('host-div');
111 shouldBe('window.internals.shadowRoot(hostDiv).delegatesFocus', 'false'); 111 shouldBe('window.internals.shadowRoot(hostDiv).delegatesFocus', 'false');
112 shouldBeEqualToString('hostDiv.getAttribute("tabindex")', '-1'); 112 shouldBeEqualToString('hostDiv.getAttribute("tabindex")', '-1');
113 113
114 expectedOrder = [ 114 expectedOrder = [
115 'input-before', 115 'input-before',
116 'host-div/inner-input',
117 'input-after' 116 'input-after'
118 ]; 117 ];
119 118
120 testFocusNavigationForward(expectedOrder); 119 testFocusNavigationForward(expectedOrder);
121 expectedOrder.reverse(); 120 expectedOrder.reverse();
122 testFocusNavigationBackward(expectedOrder); 121 testFocusNavigationBackward(expectedOrder);
123 } 122 }
124 123
125 function test6(mode) { 124 function test6(mode) {
126 debug('(6/8) Testing tab navigation order with tabindex=-1 and delegatesFocu s=true'); 125 debug('(6/8) Testing tab navigation order with tabindex=-1 and delegatesFocu s=true');
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 207
209 test(); 208 test();
210 209
211 debug('Test finished.'); 210 debug('Test finished.');
212 } 211 }
213 212
214 run_tests(); 213 run_tests();
215 </script> 214 </script>
216 </body> 215 </body>
217 </html> 216 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698