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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/inspector/text-source-map.html

Issue 2727383002: DevTools: sort sourceMap mappings since they might not be ordered. (Closed)
Patch Set: Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/inspector/text-source-map-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/http/tests/inspector/text-source-map.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/text-source-map.html b/third_party/WebKit/LayoutTests/http/tests/inspector/text-source-map.html
index 2e5f1f137a87f30b7ea7f0c73ec0275639e16526..671b042aae8b948669a827e310951e68103e1009 100644
--- a/third_party/WebKit/LayoutTests/http/tests/inspector/text-source-map.html
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector/text-source-map.html
@@ -72,8 +72,8 @@ function test()
function testNoMappingEntry(next)
{
var mappingPayload = {
- "mappings":"AAAA,C,CAAE;",
- "sources":["example.js"]
+ "mappings": "AAAA,C,CAAE;",
+ "sources": ["example.js"]
};
var mapping = new SDK.TextSourceMap("compiled.js", "source-map.json", mappingPayload);
checkMapping(0, 0, "example.js", 0, 0, mapping);
@@ -95,6 +95,28 @@ function test()
next();
},
+ function testNonSortedMappings(next)
+ {
+ /*
+ example.js:
+ ABCD
+
+ compiled.js:
+ DCBA
+ */
+ var mappingPayload = {
+ // mappings go in reversed direction.
+ "mappings": "GAAA,DAAC,DAAC,DAAC",
+ "sources": ["example.js"]
+ };
+ var mapping = new SDK.TextSourceMap("compiled.js", "source-map.json", mappingPayload);
+ checkMapping(0, 0, "example.js", 0, 3, mapping);
+ checkMapping(0, 1, "example.js", 0, 2, mapping);
+ checkMapping(0, 2, "example.js", 0, 1, mapping);
+ checkMapping(0, 3, "example.js", 0, 0, mapping);
+ next();
+ },
+
function testSections(next)
{
var mappingPayload = {
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/inspector/text-source-map-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698