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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/elements/edit/set-outer-html-test.js

Issue 2261933002: DevTools: Use JS symbols instead of strings for eligible events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 var initialize_SetOuterHTMLTest = function() { 1 var initialize_SetOuterHTMLTest = function() {
2 2
3 InspectorTest.events = []; 3 InspectorTest.events = [];
4 InspectorTest.containerId; 4 InspectorTest.containerId;
5 5
6 InspectorTest.setUpTestSuite = function(next) 6 InspectorTest.setUpTestSuite = function(next)
7 { 7 {
8 InspectorTest.expandElementsTree(step1); 8 InspectorTest.expandElementsTree(step1);
9 9
10 function step1() 10 function step1()
(...skipping 23 matching lines...) Expand all
34 InspectorTest.recordEvent = function(eventName, event) 34 InspectorTest.recordEvent = function(eventName, event)
35 { 35 {
36 if (!event.data || event.type === WebInspector.DOMModel.Events.MarkersChange d || event.type === WebInspector.DOMModel.Events.DOMMutated) 36 if (!event.data || event.type === WebInspector.DOMModel.Events.MarkersChange d || event.type === WebInspector.DOMModel.Events.DOMMutated)
37 return; 37 return;
38 var node = event.data.node || event.data; 38 var node = event.data.node || event.data;
39 var parent = event.data.parent; 39 var parent = event.data.parent;
40 for (var currentNode = parent || node; currentNode; currentNode = currentNod e.parentNode) { 40 for (var currentNode = parent || node; currentNode; currentNode = currentNod e.parentNode) {
41 if (currentNode.getAttribute("id") === "output") 41 if (currentNode.getAttribute("id") === "output")
42 return; 42 return;
43 } 43 }
44 InspectorTest.events.push("Event " + eventName + ": " + node.nodeName()); 44 InspectorTest.events.push("Event " + eventName.toString() + ": " + node.node Name());
45 } 45 }
46 46
47 InspectorTest.patchOuterHTML = function(pattern, replacement, next) 47 InspectorTest.patchOuterHTML = function(pattern, replacement, next)
48 { 48 {
49 InspectorTest.addResult("Replacing '" + pattern + "' with '" + replacement + "'\n"); 49 InspectorTest.addResult("Replacing '" + pattern + "' with '" + replacement + "'\n");
50 InspectorTest.setOuterHTML(InspectorTest.containerText.replace(pattern, repl acement), next); 50 InspectorTest.setOuterHTML(InspectorTest.containerText.replace(pattern, repl acement), next);
51 } 51 }
52 52
53 InspectorTest.patchOuterHTMLUseUndo = function(pattern, replacement, next) 53 InspectorTest.patchOuterHTMLUseUndo = function(pattern, replacement, next)
54 { 54 {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 InspectorTest.addResult("==========8<=========="); 102 InspectorTest.addResult("==========8<==========");
103 InspectorTest.addResult(text); 103 InspectorTest.addResult(text);
104 InspectorTest.addResult("==========>8=========="); 104 InspectorTest.addResult("==========>8==========");
105 if (last) 105 if (last)
106 InspectorTest.addResult("\n\n\n"); 106 InspectorTest.addResult("\n\n\n");
107 next(); 107 next();
108 } 108 }
109 } 109 }
110 110
111 }; 111 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698