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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/elements/edit/edit-dom-actions-3.html

Issue 2372663004: DevTools: Replace multiline InplaceEditor with CodeMirrorTextEditor (Closed)
Patch Set: resize width Created 3 years, 9 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/edit/edit-dom-actions-4.html » ('j') | 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 src="edit-dom-test.js"></script> 5 <script src="edit-dom-test.js"></script>
6 <script> 6 <script>
7 7
8 function test() 8 function test()
9 { 9 {
10 // Save time on style updates. 10 // Save time on style updates.
(...skipping 25 matching lines...) Expand all
36 36
37 function testBody(node, done) 37 function testBody(node, done)
38 { 38 {
39 var treeOutline = InspectorTest.firstElementsTreeOutline(); 39 var treeOutline = InspectorTest.firstElementsTreeOutline();
40 var treeElement = treeOutline.findTreeElement(node); 40 var treeElement = treeOutline.findTreeElement(node);
41 treeOutline.toggleEditAsHTML(node); 41 treeOutline.toggleEditAsHTML(node);
42 InspectorTest.deprecatedRunAfterPendingDispatches(step2); 42 InspectorTest.deprecatedRunAfterPendingDispatches(step2);
43 43
44 function step2() 44 function step2()
45 { 45 {
46 InspectorTest.addResult(treeElement._editing.codeMirror.getV alue()); 46 InspectorTest.addResult(treeElement._editing.editor.text());
47 treeElement._editing.codeMirror.setValue("<div foo=\"bar-com ment\">Element</div>"); 47 treeElement._editing.editor.setText("<div foo=\"bar-comment\ ">Element</div>");
48 var event = InspectorTest.createKeyEvent("Enter"); 48 var event = InspectorTest.createKeyEvent("Enter");
49 event.isMetaOrCtrlForTest = true; 49 event.isMetaOrCtrlForTest = true;
50 treeElement._htmlEditElement.dispatchEvent(event); 50 treeElement._editing.editor.widget().element.dispatchEvent(e vent);
51 InspectorTest.deprecatedRunAfterPendingDispatches(done); 51 InspectorTest.deprecatedRunAfterPendingDispatches(done);
52 } 52 }
53 } 53 }
54 }, 54 },
55 55
56 function testEditAsHTML(next) 56 function testEditAsHTML(next)
57 { 57 {
58 InspectorTest.domActionTestForNodeId("testEditAsHTML", "node-to-edit -as-html", testBody, next); 58 InspectorTest.domActionTestForNodeId("testEditAsHTML", "node-to-edit -as-html", testBody, next);
59 59
60 function testBody(node, done) 60 function testBody(node, done)
61 { 61 {
62 var treeOutline = InspectorTest.firstElementsTreeOutline(); 62 var treeOutline = InspectorTest.firstElementsTreeOutline();
63 var treeElement = treeOutline.findTreeElement(node); 63 var treeElement = treeOutline.findTreeElement(node);
64 treeOutline.toggleEditAsHTML(node); 64 treeOutline.toggleEditAsHTML(node);
65 InspectorTest.deprecatedRunAfterPendingDispatches(step2); 65 InspectorTest.deprecatedRunAfterPendingDispatches(step2);
66 66
67 function step2() 67 function step2()
68 { 68 {
69 InspectorTest.addResult(treeElement._editing.codeMirror.getV alue()); 69 InspectorTest.addResult(treeElement._editing.editor.text());
70 treeElement._editing.codeMirror.setValue("<span foo=\"bar\"> <span id=\"inner-span\">Span contents</span></span>"); 70 treeElement._editing.editor.setText("<span foo=\"bar\"><span id=\"inner-span\">Span contents</span></span>");
71 var event = InspectorTest.createKeyEvent("Enter"); 71 var event = InspectorTest.createKeyEvent("Enter");
72 event.isMetaOrCtrlForTest = true; 72 event.isMetaOrCtrlForTest = true;
73 treeElement._htmlEditElement.dispatchEvent(event); 73 treeElement._editing.editor.widget().element.dispatchEvent(e vent);
74 InspectorTest.deprecatedRunAfterPendingDispatches(InspectorT est.expandElementsTree.bind(InspectorTest, done)); 74 InspectorTest.deprecatedRunAfterPendingDispatches(InspectorT est.expandElementsTree.bind(InspectorTest, done));
75 } 75 }
76 } 76 }
77 }, 77 },
78 ]); 78 ]);
79 } 79 }
80 80
81 </script> 81 </script>
82 </head> 82 </head>
83 83
84 <body onload="runTest()"> 84 <body onload="runTest()">
85 <p> 85 <p>
86 Tests that user can mutate DOM by means of elements panel. 86 Tests that user can mutate DOM by means of elements panel.
87 </p> 87 </p>
88 88
89 <div> 89 <div>
90 <div id="testEditCommentAsHTML"> 90 <div id="testEditCommentAsHTML">
91 <!-- Comment --> 91 <!-- Comment -->
92 </div> 92 </div>
93 93
94 <div id="testEditAsHTML"> 94 <div id="testEditAsHTML">
95 <div id="node-to-edit-as-html"><span id="span">Text</span></div> 95 <div id="node-to-edit-as-html"><span id="span">Text</span></div>
96 </div> 96 </div>
97 </div> 97 </div>
98 </body> 98 </body>
99 </html> 99 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/elements/edit/edit-dom-actions-4.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698