Closed Bug 1051774 Opened 10 years ago Closed 9 years ago
Image position metadata isn't deactivated
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0 (Beta/Release) Build ID: 20140715215003 Steps to reproduce: Took a picture with Position defined in CameraPictureOptions, then took another with no Position. Actual results: Both pictures got the same position metadata. Expected results: There shouldn't have been any postion metadata in the second picture.
The attached code in the pull request removes previously saved position if the position data is NaN when TakePicture is called. Please review.
Attachment #8470825 - Flags: review?(mhabicher)
Assignee: nobody → markus.nilsson
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Comment on attachment 8470825 [details] [review] Github patch This looks good, Markus, but it needs an automated test. You can either add it to one of the suitable existing tests, or create a new one (e.g. dom/camera/test/test_bug1051774.html). Also, we don't take Gecko patches through Github. For a patch like this, it's not a big deal--we can easily extract the patch and submit it to Mercurial. But in the future, please refer to https://developer.mozilla.org/en-US/docs/Creating_a_patch_that_can_be_checked_in Let me know if you need help with any of this.
Attachment #8470825 - Flags: review?(mhabicher) → review-
Markus, Thanks so much for filing this bug and contributing to this fix. Please address Mike's review comments and submit the patch for review again. Thanks Hema
Mike & Hema, I haven't run mochi-tests before, so it takes a while for me to figure it out. Hopefully I'll have a new patch ready soon. BR, Markus
I can't figure out a way to create a test for this :( If I've understood the test environment correctly, you can't run the camera tests with mochitest-plain since CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk' needs to be true, so you'll have to run the tests on the emulator with mochitest-remote. I modified http://www.nihilogic.dk/labs/exif/exif.js so that it could extract exif tags from a blob and then modified the mozCamera.takePicture() success function in gaia/apps/camera/js/lib/camera/camera.js to print them. That worked fine on a device but when I added mochitests that did the same thing, the exif extraction failed. I then tried the modified camera app on the emulator and there it fails as well. I then extracted one of the pictures from the emulator and as far as I can tell, the picture doesn't have any exif meta data; "exiftool -exif:all IMG_0001.jpg" returns nothing. Any ideas on how to proceed?
Attachment #8484224 - Flags: review?(aosmond) → review+
Component: General → Gaia::Camera
OS: Linux → Gonk (Firefox OS)
Product: Core → Firefox OS
Hardware: x86_64 → ARM
Target Milestone: --- → 2.1 S4 (12sep)
I've landed this without a test because it's a privacy concern, but the emulator doesn't generate EXIF metadata so it's not trivial to check. We're looking at ways to improve our test framework so that we can catch problems like this in the future, but that's a while out. For now: https://hg.mozilla.org/integration/b2g-inbound/rev/664a6bd22f90
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Triage: Low user impact. Not fix on 2.0M.
You need to log in before you can comment on or make changes to this bug.