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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/inspector/elements-test.js

Issue 2527763003: [DevTools] Turn links into spans to prevent default behavior. (Closed)
Patch Set: fixed comments Created 4 years 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_ElementTest = function() { 1 var initialize_ElementTest = function() {
2 2
3 InspectorTest.preloadPanel("elements"); 3 InspectorTest.preloadPanel("elements");
4 4
5 InspectorTest.inlineStyleSection = function() 5 InspectorTest.inlineStyleSection = function()
6 { 6 {
7 return UI.panels.elements._stylesWidget._sectionBlocks[0].sections[0]; 7 return UI.panels.elements._stylesWidget._sectionBlocks[0].sections[0];
8 } 8 }
9 9
10 InspectorTest.computedStyleWidget = function() 10 InspectorTest.computedStyleWidget = function()
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 selectorText += String.sprintf(" (%s)", anchorText); 391 selectorText += String.sprintf(" (%s)", anchorText);
392 } 392 }
393 InspectorTest.addResult(selectorText); 393 InspectorTest.addResult(selectorText);
394 394
395 InspectorTest.dumpStyleTreeOutline(section.propertiesTreeOutline, omitLongha nds ? 1 : 2); 395 InspectorTest.dumpStyleTreeOutline(section.propertiesTreeOutline, omitLongha nds ? 1 : 2);
396 InspectorTest.addResult(""); 396 InspectorTest.addResult("");
397 } 397 }
398 398
399 function extractLinkText(element) 399 function extractLinkText(element)
400 { 400 {
401 var anchor = element.nodeName === "A" ? element : element.querySelector("a") ; 401 var anchor = element.querySelector(".devtools-link");
402 if (!anchor) 402 if (!anchor)
403 return element.textContent; 403 return element.textContent;
404 var anchorText = anchor.textContent; 404 var anchorText = anchor.textContent;
405 var info = Components.Linkifier._linkInfo(anchor); 405 var info = Components.Linkifier._linkInfo(anchor);
406 var uiLocation = info && info.uiLocation; 406 var uiLocation = info && info.uiLocation;
407 var anchorTarget = uiLocation ? (uiLocation.uiSourceCode.name() + ":" + (uiL ocation.lineNumber + 1) + ":" + (uiLocation.columnNumber + 1)) : ""; 407 var anchorTarget = uiLocation ? (uiLocation.uiSourceCode.name() + ":" + (uiL ocation.lineNumber + 1) + ":" + (uiLocation.columnNumber + 1)) : "";
408 return anchorText + " -> " + anchorTarget; 408 return anchorText + " -> " + anchorTarget;
409 } 409 }
410 410
411 function buildMarkedSelectors(element) 411 function buildMarkedSelectors(element)
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after
971 InspectorTest.dumpAnimationTimeline = function(timeline) 971 InspectorTest.dumpAnimationTimeline = function(timeline)
972 { 972 {
973 for (var ui of timeline._uiAnimations) { 973 for (var ui of timeline._uiAnimations) {
974 InspectorTest.addResult(ui.animation().type()); 974 InspectorTest.addResult(ui.animation().type());
975 InspectorTest.addResult(ui._nameElement.innerHTML); 975 InspectorTest.addResult(ui._nameElement.innerHTML);
976 InspectorTest.addResult(ui._svg.innerHTML); 976 InspectorTest.addResult(ui._svg.innerHTML);
977 } 977 }
978 } 978 }
979 979
980 }; 980 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698