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

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

Issue 2297873004: DevTools: Add bezier swatches to CSS Sources (Closed)
Patch Set: Extract dumpSwatchPositions and rename flag Created 4 years, 3 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/sources/bezier-swatch-position.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 var initialize_SourcesTest = function() { 1 var initialize_SourcesTest = function() {
2 2
3 InspectorTest.preloadPanel("sources"); 3 InspectorTest.preloadPanel("sources");
4 4
5 function testSourceMapping(text1, text2, mapping, testToken) 5 function testSourceMapping(text1, text2, mapping, testToken)
6 { 6 {
7 var originalPosition = text1.indexOf(testToken); 7 var originalPosition = text1.indexOf(testToken);
8 InspectorTest.assertTrue(originalPosition !== -1); 8 InspectorTest.assertTrue(originalPosition !== -1);
9 var originalLocation = WebInspector.Formatter.positionToLocation(text1.compu teLineEndings(), originalPosition); 9 var originalLocation = WebInspector.Formatter.positionToLocation(text1.compu teLineEndings(), originalPosition);
10 var formattedLocation = mapping.originalToFormatted(originalLocation[0], ori ginalLocation[1]); 10 var formattedLocation = mapping.originalToFormatted(originalLocation[0], ori ginalLocation[1]);
(...skipping 14 matching lines...) Expand all
25 InspectorTest.addResult("====== 8< ------"); 25 InspectorTest.addResult("====== 8< ------");
26 InspectorTest.addResult(formattedSource); 26 InspectorTest.addResult(formattedSource);
27 InspectorTest.addResult("------ >8 ======"); 27 InspectorTest.addResult("------ >8 ======");
28 while (mappingQueries && mappingQueries.length) 28 while (mappingQueries && mappingQueries.length)
29 testSourceMapping(text, formattedSource, mapping, mappingQueries.shi ft()); 29 testSourceMapping(text, formattedSource, mapping, mappingQueries.shi ft());
30 30
31 next(); 31 next();
32 } 32 }
33 } 33 }
34 34
35 InspectorTest.dumpSwatchPositions = function(sourceFrame, bookmarkType)
36 {
37 var textEditor = sourceFrame.textEditor;
38 var markers = textEditor.bookmarks(textEditor.fullRange(), bookmarkType);
39 for (var i = 0; i < markers.length; i++) {
40 var position = markers[i].position();
41 var text = markers[i]._marker.widgetNode.firstChild.textContent;
42 InspectorTest.addResult("Line " + position.startLine + ", Column " + pos ition.startColumn + ": " + text);
43 }
44 }
45
35 }; 46 };
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/sources/bezier-swatch-position.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698