Closed
Bug 839519
Opened 13 years ago
Closed 12 years ago
test_XHR_parameters.html test failing, because it needs "systemXHR" permission
Categories
(Core :: DOM: Device Interfaces, defect)
Tracking
()
RESOLVED
FIXED
mozilla22
People
(Reporter: martijn.martijn, Assigned: martijn.martijn)
References
Details
Attachments
(2 files)
|
386 bytes,
patch
|
onecyrenus
:
review+
|
Details | Diff | Splinter Review |
|
428 bytes,
patch
|
gwagner
:
review+
|
Details | Diff | Splinter Review |
I'm seeing this failure in mochitest B2G:
61 INFO TEST-PASS | /tests/content/base/test/test_XHR_parameters.html | passed {"mozAnon":1}
62 ERROR TEST-UNEXPECTED-FAIL | /tests/content/base/test/test_XHR_parameters.html | testing mozAnon, - got false, expected true
This is happening because SpecialPowers.addPermission("systemXHR", true, document); doesn't work for child process in oop b2g.
Permissions can't be changed on the fly for inside an app, so this needs to be done beforehand, somehow.
So, iiuc, with bug 814140, we have the ability to add these kinds of permissions in the manifest file.
With the patch in that bug, I don't see "systemXHR" mentioned, so it could just be a matter of adding that permission to the manifest file to fix this test failure.
(thanks for Jlebar and Andrea Marchesini for the explanation)
| Assignee | ||
Comment 1•13 years ago
|
||
This didn't solve the bug, I don't know why, I thought it would work.
| Assignee | ||
Comment 2•13 years ago
|
||
systemXHR is used everywhere and not network-http, so I think Permission.txt needs to be changed here.
Attachment #715707 -
Flags: review?(anygregor)
| Assignee | ||
Comment 3•13 years ago
|
||
Comment on attachment 715701 [details] [diff] [review]
add systemXHR
David, this line should be added anyway, right? Even though it doesn't seem to help for this bug.
Attachment #715701 -
Flags: review?(dclarke)
Comment 4•13 years ago
|
||
martijn that is correct.
However unsure what piece doesn't seem to work for this bug.
Comment 5•13 years ago
|
||
#1 make sure you have rebuilt tree after making permission change.
#2 make sure you have a metadata.json file in same directory as manifest.webapp
| Assignee | ||
Comment 6•13 years ago
|
||
David, I did do a complete rebuild of b2g with ./build.sh. That didn't help.
I see a metadata.json file as well as the manifest.webapp file in gaia/external-apps/mochitest/
The testing/mochitest/manifest.webapp seems to be the only manifest.webapp file in the tree. Or is there something else that I need to change? A rebuild doesn't seem to change the same file in gaia/external-apps/mochitest/ .
Comment 7•13 years ago
|
||
TEST-PASS | unknown test url | passed undefined
TEST-PASS | unknown test url | testing mozAnon
TEST-PASS | unknown test url | testing mozSystem
TEST-PASS | unknown test url | passed null
TEST-PASS | unknown test url | testing mozAnon
TEST-PASS | unknown test url | testing mozSystem
TEST-PASS | unknown test url | passed {}
TEST-PASS | unknown test url | testing mozAnon
TEST-PASS | unknown test url | testing mozSystem
TEST-PASS | unknown test url | passed {"mozSystem":""}
TEST-PASS | unknown test url | testing mozAnon
TEST-PASS | unknown test url | testing mozSystem
TEST-PASS | unknown test url | passed {"mozSystem":0}
TEST-PASS | unknown test url | testing mozAnon
TEST-PASS | unknown test url | testing mozSystem
TEST-PASS | unknown test url | passed {"mozAnon":1}
TEST-PASS | unknown test url | testing mozAnon
TEST-PASS | unknown test url | testing mozSystem
TEST-PASS | unknown test url | passed {"mozAnon":[]}
TEST-PASS | unknown test url | testing mozAnon
TEST-PASS | unknown test url | testing mozSystem
TEST-PASS | unknown test url | passed {"mozAnon":true}
TEST-PASS | unknown test url | testing mozAnon
TEST-PASS | unknown test url | testing mozSystem
TEST-PASS | unknown test url | passed 0
TEST-PASS | unknown test url | testing mozAnon
TEST-PASS | unknown test url | testing mozSystem
TEST-PASS | unknown test url | passed 7
TEST-PASS | unknown test url | testing mozAnon
TEST-PASS | unknown test url | testing mozSystem
TEST-PASS | unknown test url | passed 3.141592653589793
TEST-PASS | unknown test url | testing mozAnon
TEST-PASS | unknown test url | testing mozSystem
TEST-PASS | unknown test url | passed "string"
TEST-PASS | unknown test url | testing mozAnon
TEST-PASS | unknown test url | testing mozSystem
TEST-PASS | unknown test url | passed true
TEST-PASS | unknown test url | testing mozAnon
TEST-PASS | unknown test url | testing mozSystem
TEST-PASS | unknown test url | passed false
TEST-PASS | unknown test url | testing mozAnon
TEST-PASS | unknown test url | testing mozSystem
TEST-PASS | unknown test url | invalid parameter raised exception as expected: "Bla"
test seem to be passing, .. the rebuild doesn't change the test file, it builds a new gaia with the permissions as set.. i think something is getting cached in your objdir directory .. most likely need to make sure gaia is being rebuilt after the permissions change. a simple build.sh wasn't working for me, when i put in a printf, the rebuild worked, so would recommend rm -rf objdir-gecko, or some other mechanism to make sure gaia gets built and used with the emulator
Comment 8•13 years ago
|
||
Comment on attachment 715701 [details] [diff] [review]
add systemXHR
Review of attachment 715701 [details] [diff] [review]:
-----------------------------------------------------------------
works for me
Attachment #715701 -
Flags: review?(dclarke) → review+
Updated•13 years ago
|
Attachment #715707 -
Flags: review?(anygregor) → review+
| Assignee | ||
Comment 9•12 years ago
|
||
I did do a rm -rf objdir-gecko and a rebuild, but I still get 5 errors with that test.
Anyway, the patches are still ok to be checked in.
Keywords: checkin-needed
Comment 10•12 years ago
|
||
can you push this patch to try server?
Comment 11•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/c1de9b068ef2
https://hg.mozilla.org/integration/mozilla-inbound/rev/c6208d0b66fe
Assignee: nobody → martijn.martijn
Keywords: checkin-needed
Comment 12•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/c1de9b068ef2
https://hg.mozilla.org/mozilla-central/rev/c6208d0b66fe
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
You need to log in
before you can comment on or make changes to this bug.
Description
•