forked from Floorp-Projects/Floorp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1355126 - regression test for absolute sourceRoot; r=bgrins
MozReview-Commit-ID: EOsAWOr5XWn
- Loading branch information
Showing
5 changed files
with
72 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
devtools/client/framework/test/browser_source_map-absolute.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* Any copyright is dedicated to the Public Domain. | ||
http://creativecommons.org/publicdomain/zero/1.0/ */ | ||
|
||
// Test that an absolute sourceRoot works. | ||
|
||
"use strict"; | ||
|
||
// Empty page | ||
const PAGE_URL = `${URL_ROOT}doc_empty-tab-01.html`; | ||
const JS_URL = `${URL_ROOT}code_binary_search_absolute.js`; | ||
const ORIGINAL_URL = `${URL_ROOT}code_binary_search.coffee`; | ||
|
||
add_task(function* () { | ||
yield pushPref("devtools.debugger.new-debugger-frontend", true); | ||
|
||
const toolbox = yield openNewTabAndToolbox(PAGE_URL, "jsdebugger"); | ||
const service = toolbox.sourceMapURLService; | ||
|
||
// Inject JS script | ||
let sourceSeen = waitForSourceLoad(toolbox, JS_URL); | ||
yield createScript(JS_URL); | ||
yield sourceSeen; | ||
|
||
info(`checking original location for ${JS_URL}:6`); | ||
let newLoc = yield service.originalPositionFor(JS_URL, 6); | ||
|
||
is(newLoc.sourceUrl, ORIGINAL_URL, "check mapped URL"); | ||
is(newLoc.line, 4, "check mapped line number"); | ||
}); |
29 changes: 29 additions & 0 deletions
29
devtools/client/framework/test/code_binary_search_absolute.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
10 changes: 10 additions & 0 deletions
10
devtools/client/framework/test/code_binary_search_absolute.map
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"version": 3, | ||
"file": "code_binary_search.js", | ||
"sourceRoot": "http://example.com/browser/devtools/client/framework/test/", | ||
"sources": [ | ||
"code_binary_search.coffee" | ||
], | ||
"names": [], | ||
"mappings": ";AACA;CAAA;CAAA,CAAA,CAAuB,EAAA,CAAjB,GAAkB,IAAxB;CAEE,OAAA,UAAA;CAAA,EAAQ,CAAR,CAAA;CAAA,EACQ,CAAR,CAAa,CAAL;CADR,EAEQ,CAAR,CAAA;CAEA,EAA0C,CAAR,CAAtB,MAAN;CAGJ,EAA6B,CAAR,CAAA,CAArB;CAAA,EAAQ,CAAR,CAAQ,GAAR;QAAA;CACA,EAA6B,CAAR,CAAA,CAArB;CAAA,EAAQ,EAAR,GAAA;QADA;CAAA,EAIQ,CAAI,CAAZ,CAAA;CAXF,IAIA;CAUA,GAAA,CAAS;CAAT,YAA8B;MAA9B;AAA0C,CAAD,YAAA;MAhBpB;CAAvB,EAAuB;CAAvB" | ||
} |