Closed Bug 861456 Opened 12 years ago Closed 12 years ago

Enable DeviceStorage tests for B2G

Categories

(Core :: DOM: Core & HTML, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 893135

People

(Reporter: Luqman, Assigned: Luqman)

References

Details

Attachments

(1 file, 1 obsolete file)

Update the DeviceStorage tests to work with the B2G emulator.
Attachment #737057 - Flags: review?(doug.turner)
Attachment #737057 - Attachment is obsolete: true
Attachment #737057 - Flags: review?(doug.turner)
Attachment #743401 - Flags: review?(doug.turner)
Blocks: 860887
Attachment #743401 - Flags: review?(doug.turner) → review?(dhylands)
Comment on attachment 743401 [details] [diff] [review] Enable more device storage tests on b2g. Review of attachment 743401 [details] [diff] [review]: ----------------------------------------------------------------- These all need to be rebased on the latest. A number of these files were changed when bug 858416 landed about 3 weeks ago, so I'm only going to give these a superficial review now, and will r-. I'd like to re-review once they've been rebased. I'd also like to see a successful try run against all platforms with M2 and M3 enabled (once this is rebased against a recent master). ::: dom/devicestorage/test/test_823965.html @@ +35,2 @@ > > + ok(e.target.result.name == gFileName, "File name should match"); This will fail now that composite storage (858416) has landed. The issue is that you'll get back a fully qualified name, so even though you created devicestorage/hi.png, you'll get back /sdcard/devicestorage/hi.png (on a real phone). On desktop and places where composite storage isn't used, you'll get back devicestorage/hi.png See test_watch.html (you'll need to rebase first, since it was modified about 3 weeks ago, and your test_watch.html doesn't seem to have the changes). @@ +61,5 @@ > + } > + > + function addSuccess(e) { > + > + ok(e.target.result == gFileName, "File name should match"); This will fail (see comment above). @@ +94,5 @@ > + SpecialPowers.pushPermissions([ > + {type: 'device-storage:pictures-create', allow: true, context: document}, > + {type: 'device-storage:pictures-read', allow: true, context: document}, > + {type: 'device-storage:pictures-write', allow: true, context: document} > + ], runTests); So why are we needing to add these permissions? nsDeviceStorage already has code to skip the permissions checks when device.storage.prompt.testing preference is set, and devicestorage_setup sets device.storage.prompt.testing. ::: dom/devicestorage/test/test_enumerate.html @@ +31,5 @@ > + dump("We still have length = " + files.length + "\n"); > + devicestorage_cleanup(); > + return; > + } > + nit: trailing spaces
Attachment #743401 - Flags: review?(dhylands) → review-
I screwed up the bug number. But this is a dup, since bug 893135 makes all of the device storage tests work on all of the platforms that device storage builds on.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
Whiteboard: [fixed-in-birch]
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: