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

Side by Side Diff: third_party/WebKit/LayoutTests/svg/dom/tabindex-focus.html

Issue 2782583002: Deduplicate testharness test names in LayoutTests/svg/ (Closed)
Patch Set: Created 3 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 <title>Tabindex on svg elements tests</title> 2 <title>Tabindex on svg elements tests</title>
3 <script src=../../resources/testharness.js></script> 3 <script src=../../resources/testharness.js></script>
4 <script src=../../resources/testharnessreport.js></script> 4 <script src=../../resources/testharnessreport.js></script>
5 <body> 5 <body>
6 <div id="testcontainer"><svg id="testroot" width="1" height="1"/></div> 6 <div id="testcontainer"><svg id="testroot" width="1" height="1"/></div>
7 <div id=log></div> 7 <div id=log></div>
8 <script> 8 <script>
9 var svg = document.getElementById("testroot"); 9 var svg = document.getElementById("testroot");
10 function isFocusable(elm) { 10 function isFocusable(elm) {
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 var element = svg.firstElementChild; 178 var element = svg.firstElementChild;
179 while(element) { 179 while(element) {
180 test(function() { 180 test(function() {
181 try { 181 try {
182 element.firstElementChild.focus(); 182 element.firstElementChild.focus();
183 assert_equals(document.activeElement, isFocusable(elemen t.firstElementChild) ? element.firstElementChild : document.body); 183 assert_equals(document.activeElement, isFocusable(elemen t.firstElementChild) ? element.firstElementChild : document.body);
184 } 184 }
185 finally { 185 finally {
186 document.body.focus(); 186 document.body.focus();
187 } 187 }
188 » }, element.firstElementChild.nodeName + ".focus() without tabindex set." ); 188 » }, element.firstElementChild.nodeName + ".focus() without tabindex set ( as text child.)");
189 test(function() { 189 test(function() {
190 try { 190 try {
191 element.firstElementChild.setAttribute("tabindex", "1"); 191 element.firstElementChild.setAttribute("tabindex", "1");
192 element.firstElementChild.focus(); 192 element.firstElementChild.focus();
193 assert_equals(document.activeElement, isFocusableWithTab index(element.firstElementChild) ? element.firstElementChild : document.body); 193 assert_equals(document.activeElement, isFocusableWithTab index(element.firstElementChild) ? element.firstElementChild : document.body);
194 element.firstElementChild.removeAttribute("tabindex"); 194 element.firstElementChild.removeAttribute("tabindex");
195 } 195 }
196 finally { 196 finally {
197 document.body.focus(); 197 document.body.focus();
198 } 198 }
199 » }, element.firstElementChild.nodeName + ".focus() with tabindex set."); 199 » }, element.firstElementChild.nodeName + ".focus() with tabindex set (as text child.)");
200 200
201 element.parentNode.removeChild(element); 201 element.parentNode.removeChild(element);
202 element = svg.firstElementChild; 202 element = svg.firstElementChild;
203 } 203 }
204 </script> 204 </script>
205 </body> 205 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698