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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/elements/elements-tab-stops.html

Issue 2790813002: DevTools: ViewContainer shouldn't be a tab stop (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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/elements/elements-tab-stops-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <html>
2 <head>
3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../http/tests/inspector/elements-test.js"></script>
5 <script type="text/javascript">
6
7 var test = function() {
8
9 var maxElements = 1000;
10 var elements = 0;
11 InspectorTest.domModel.requestDocument(documentRequested);
12 function documentRequested() {
13 eventSender.keyDown("Tab");
14 var startElement = document.deepActiveElement();
15 do {
16 dumpFocus();
17 eventSender.keyDown("Tab");
18 elements++;
19 } while (startElement !== document.deepActiveElement() && elements < maxElem ents)
20
21 InspectorTest.addResult('')
22 InspectorTest.addResult('Shift+Tab:')
23 InspectorTest.addResult('')
24 startElement = document.deepActiveElement();
25 do {
26 dumpFocus();
27 eventSender.keyDown("Tab", ['shiftKey']);
28 elements++;
29 } while (startElement !== document.deepActiveElement() && elements < maxElem ents)
30
31 if (elements >= maxElements)
32 InspectorTest.addResult("FAIL: Unable to complete tab stop cycle.")
33
34 InspectorTest.completeTest();
35 }
36
37 function dumpFocus() {
38 var element = document.deepActiveElement();
39 if (!element) {
40 InspectorTest.addResult("null");
41 return;
42 }
43 var name = element.tagName;
44 if (element.id)
45 name += "#" + element.id;
46 if (element.getAttribute('aria-label'))
47 name += ":" + element.getAttribute('aria-label')
48 else if (element.title)
49 name += ":" + element.title
50 else if (element.textContent && element.textContent.length < 50) {
51 name += ":" + element.textContent.replace('\u200B', '');
52 }
53 else if (element.className)
54 name += "." + element.className.split(" ").join(".");
55 InspectorTest.addResult(name);
56 }
57 }
58 </script>
59 </head>
60 <body onload="runTest()">
61 <p>Tests what elements have focus after pressing tab.</p>
62 </body>
63 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/elements/elements-tab-stops-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698