Closed
Bug 794742
Opened 13 years ago
Closed 13 years ago
social tests with data: urls should specify a charset to reduce test output noise
Categories
(Firefox Graveyard :: SocialAPI, defect)
Firefox Graveyard
SocialAPI
Tracking
(firefox17 fixed)
RESOLVED
FIXED
Firefox 18
| Tracking | Status | |
|---|---|---|
| firefox17 | --- | fixed |
People
(Reporter: markh, Assigned: markh)
References
Details
(Whiteboard: [qa-])
Attachments
(1 file)
|
1.39 KB,
patch
|
jaws
:
review+
Gavin
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
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
| Assignee | ||
Comment 1•13 years ago
|
||
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.
Assignee: nobody → mhammond
Attachment #665271 -
Flags: review?(mixedpuppy)
Comment 2•13 years ago
|
||
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 http://mozilla.org/MPL/2.0/. */
>
> function makeWorkerUrl(runner) {
> + return "data:application/javascript;charset=us-ascii," + encodeURI("let run=" + runner.toSource()) + ";run();"
data:application/javascript;charset=utf-8,
::: 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();"
charset=utf-8
Attachment #665271 -
Flags: review?(mixedpuppy) → review+
| Assignee | ||
Comment 3•13 years ago
|
||
Status: NEW → ASSIGNED
Comment 4•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 18
Updated•13 years ago
|
Attachment #665271 -
Flags: approval-mozilla-aurora+
Comment 5•13 years ago
|
||
status-firefox17:
--- → fixed
Updated•7 years ago
|
Product: Firefox → Firefox Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•