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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/syntax-highlight.js

Issue 2493373002: DevTools: rename WebInspector into modules. (Closed)
Patch Set: for bots Created 4 years, 1 month 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_SyntaxHighlight = function() { 1 var initialize_SyntaxHighlight = function() {
2 2
3 InspectorTest.dumpSyntaxHighlight = function(str, mimeType) 3 InspectorTest.dumpSyntaxHighlight = function(str, mimeType)
4 { 4 {
5 var node = document.createElement("span"); 5 var node = document.createElement("span");
6 node.textContent = str; 6 node.textContent = str;
7 var javascriptSyntaxHighlighter = new WebInspector.DOMSyntaxHighlighter(mime Type); 7 var javascriptSyntaxHighlighter = new UI.DOMSyntaxHighlighter(mimeType);
8 return javascriptSyntaxHighlighter.syntaxHighlightNode(node).then(dumpSyntax ); 8 return javascriptSyntaxHighlighter.syntaxHighlightNode(node).then(dumpSyntax );
9 9
10 function dumpSyntax() 10 function dumpSyntax()
11 { 11 {
12 var node_parts = []; 12 var node_parts = [];
13 for (var i = 0; i < node.childNodes.length; i++) { 13 for (var i = 0; i < node.childNodes.length; i++) {
14 if (node.childNodes[i].getAttribute) { 14 if (node.childNodes[i].getAttribute) {
15 node_parts.push(node.childNodes[i].getAttribute("class")); 15 node_parts.push(node.childNodes[i].getAttribute("class"));
16 } else { 16 } else {
17 node_parts.push("*"); 17 node_parts.push("*");
18 } 18 }
19 } 19 }
20 InspectorTest.addResult(str + ": " + node_parts.join(", ")); 20 InspectorTest.addResult(str + ": " + node_parts.join(", "));
21 } 21 }
22 }; 22 };
23 23
24 }; 24 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698