Closed Bug 1370507 Opened 3 years ago Closed 3 years ago

browser_all_files_referenced.js should be able to handle template strings

Categories

(Firefox :: General, enhancement)

53 Branch
enhancement
Not set

Tracking

()

RESOLVED FIXED
Firefox 55
Tracking Status
firefox55 --- fixed

People

(Reporter: standard8, Assigned: standard8)

Details

Attachments

(1 file, 1 obsolete file)

I'm trying to add some code that references a frame script via a template string.

At the moment, browser_all_files_referenced.js says the frame script is undefined as it doesn't understand about template strings.

I've got a patch that allows it to understand template strings, and makes it more flexible for stripping the query from the url (if there is one).
Attached patch Adds template string support (obsolete) — Splinter Review
Attachment #8874807 - Flags: review?(florian)
Comment on attachment 8874807 [details] [diff] [review]
Adds template string support

Review of attachment 8874807 [details] [diff] [review]:
-----------------------------------------------------------------

r=me if it's green on try. Thanks for documenting the --appname dist trick :-).

::: browser/base/content/test/static/browser_all_files_referenced.js
@@ -324,4 @@
>      let baseUri;
>      for (let line of data.split("\n")) {
>        let urls =
> -        line.match(/["']chrome:\/\/[a-zA-Z0-9 -]+\/(content|skin|locale)\/[^"' ]*["']/g);

I think you want to exclude the ` character too in this part of the regexp: [^"' ]
Attachment #8874807 - Flags: review?(florian) → review+
Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/e1409f1a455c
browser_all_files_referenced.js should be able to handle template strings. r=florian
https://hg.mozilla.org/mozilla-central/rev/e1409f1a455c
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 55
You need to log in before you can comment on or make changes to this bug.