Persona is no longer an option for authentication on BMO. For more details see Persona Deprecated.
Last Comment Bug 794742 - social tests with data: urls should specify a charset to reduce test output noise
: social tests with data: urls should specify a charset to reduce test output n...
Product: Firefox
Classification: Client Software
Component: SocialAPI (show other bugs)
: unspecified
: All All
: -- normal (vote)
: Firefox 18
Assigned To: Mark Hammond [:markh]
: Shane Caraveo (:mixedpuppy)
Depends on: 797874
  Show dependency treegraph
Reported: 2012-09-26 23:33 PDT by Mark Hammond [:markh]
Modified: 2012-10-16 16:35 PDT (History)
3 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

add a charset to data: urls (1.39 KB, patch)
2012-09-26 23:36 PDT, Mark Hammond [:markh]
jaws: review+ approval‑mozilla‑aurora+
Details | Diff | Splinter Review

Description Mark Hammond [:markh] 2012-09-26 23:33:55 PDT
When running the social tests, there are lots of entries in the test output like:

TEST-INFO | chrome://.../browser_frameworker.js | Console message: [JavaScript Error: "The character encoding of the plain text document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the file needs to be declared in the transfer protocol or file needs to use a byte order mark as an encoding signature." {file: "data:application/javascript,...

Low priority, but still worthwhile IMO, especially as such lines tend to be looooong
Comment 1 Mark Hammond [:markh] 2012-09-26 23:36:38 PDT
Created attachment 665271 [details] [diff] [review]
add a charset to data: urls

Trivial patch.  Note the same warning is generated for tests that use real URLs, but those lines are much shorter so I haven't bothered looking into how to reduce them.
Comment 2 [Limited availability until Oct 31] Jared Wein [:jaws] (please needinfo? me) 2012-09-26 23:46:35 PDT
Comment on attachment 665271 [details] [diff] [review]
add a charset to data: urls

Review of attachment 665271 [details] [diff] [review]:

JS can have Unicode characters in it, so we should use utf-8 charset.

r=me with the change in charset.

::: toolkit/components/social/test/browser/browser_frameworker.js
@@ +3,4 @@
>   * file, You can obtain one at */
>  function makeWorkerUrl(runner) {
> +  return "data:application/javascript;charset=us-ascii," + encodeURI("let run=" + runner.toSource()) + ";run();"


::: toolkit/components/social/test/browser/browser_notifications.js
@@ +74,4 @@
>    let manifest = {
>      origin: TEST_PROVIDER_ORIGIN,
>      name: "Example Provider",
> +    workerURL: "data:application/javascript;charset=us-ascii," + encodeURI("let run=" + workerFunction.toSource()) + ";run();"

Comment 4 Ed Morley [:emorley] 2012-09-28 07:51:57 PDT
Comment 5 :Gavin Sharp [email:] 2012-10-02 18:21:38 PDT

Note You need to log in before you can comment on or make changes to this bug.