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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/elements/edit/edit-trimmed-attribute-value.html

Issue 2080963002: Fix inspector layout tests to deal send tab via event sender. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | « third_party/WebKit/LayoutTests/inspector/elements/edit/edit-dom-test.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../../../http/tests/inspector/inspector-test.js"></script> 3 <script src="../../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../../http/tests/inspector/elements-test.js"></script> 4 <script src="../../../http/tests/inspector/elements-test.js"></script>
5 <script> 5 <script>
6 6
7 function test() 7 function test()
8 { 8 {
9 InspectorTest.selectNodeWithId("inspected", execute); 9 InspectorTest.selectNodeWithId("inspected", execute);
10 10
11 function execute() 11 function execute()
12 { 12 {
13 var treeElement = InspectorTest.firstElementsTreeOutline().findTreeEleme nt(InspectorTest.expandedNodeWithId("inspected")); 13 var treeElement = InspectorTest.firstElementsTreeOutline().findTreeEleme nt(InspectorTest.expandedNodeWithId("inspected"));
14 var textElement = treeElement.listItemElement.getElementsByClassName("we bkit-html-attribute")[0]; 14 var textElement = treeElement.listItemElement.getElementsByClassName("we bkit-html-attribute")[0];
15 InspectorTest.addResult("Original textContent"); 15 InspectorTest.addResult("Original textContent");
16 InspectorTest.addResult(treeElement.title.textContent); 16 InspectorTest.addResult(treeElement.title.textContent);
17 17
18 treeElement._startEditingTarget(textElement); 18 treeElement._startEditingTarget(textElement);
19 InspectorTest.addResult("textContent when editing 'href'"); 19 InspectorTest.addResult("textContent when editing 'href'");
20 InspectorTest.addResult(treeElement.title.textContent); 20 InspectorTest.addResult(treeElement.title.textContent);
21 21
22 textElement.dispatchEvent(InspectorTest.createKeyEvent("Tab")); 22 eventSender.keyDown("Tab");
23 InspectorTest.addResult("textContent after moving to 'id'"); 23 InspectorTest.addResult("textContent after moving to 'id'");
24 InspectorTest.addResult(treeElement.title.textContent); 24 InspectorTest.addResult(treeElement.title.textContent);
25 25
26 textElement = treeElement.listItemElement.getElementsByClassName("webkit -html-attribute")[1]; 26 textElement = treeElement.listItemElement.getElementsByClassName("webkit -html-attribute")[1];
27 textElement.dispatchEvent(InspectorTest.createKeyEvent("Escape")); 27 textElement.dispatchEvent(InspectorTest.createKeyEvent("Escape"));
28 InspectorTest.addResult("textContent after canceling the edit (equal to the original one)"); 28 InspectorTest.addResult("textContent after canceling the edit (equal to the original one)");
29 InspectorTest.addResult(treeElement.title.textContent); 29 InspectorTest.addResult(treeElement.title.textContent);
30 30
31 InspectorTest.completeTest(); 31 InspectorTest.completeTest();
32 } 32 }
33 } 33 }
34 34
35 </script> 35 </script>
36 </head> 36 </head>
37 37
38 <body onload="runTest()"> 38 <body onload="runTest()">
39 <p> 39 <p>
40 Tests that user can mutate DOM by means of elements panel. 40 Tests that user can mutate DOM by means of elements panel.
41 </p> 41 </p>
42 42
43 <div> 43 <div>
44 <a href="data:text/plain;,12345678901234567890123456789012345678901234567890 123456789012345678901234567890/1234567890123456789012345678901234567890123456789 01234567890" id="inspected">Anchor</a> 44 <a href="data:text/plain;,12345678901234567890123456789012345678901234567890 123456789012345678901234567890/1234567890123456789012345678901234567890123456789 01234567890" id="inspected">Anchor</a>
45 </div> 45 </div>
46 </body> 46 </body>
47 </html> 47 </html>
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/inspector/elements/edit/edit-dom-test.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698