Closed Bug 1069222 Opened 10 years ago Closed 10 years ago

[B2G] Add testcase for ImageCapture on gonk

Categories

(Core :: Audio/Video, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla36

People

(Reporter: ayang, Assigned: ayang)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 3 obsolete files)

      No description provided.
Attached patch b2g_imagecapture_test (obsolete) — Splinter Review
Attachment #8491370 - Flags: review?(roc)
Comment on attachment 8491370 [details] [diff] [review]
b2g_imagecapture_test

Review of attachment 8491370 [details] [diff] [review]:
-----------------------------------------------------------------

Can we extend this test to test taking multiple photos at the same time?

::: content/media/test/test_b2g_imagecapture.html
@@ +28,5 @@
> +    };
> +
> +    // Gonk camera hal emualtor has timing issue so it waits 5s before taking
> +    // picture.
> +    setTimeout(function() { imageCapture.takePhoto(); }, 5000);

This isn't good. Can we fix this in Gecko instead by delaying the ImageCapture until the HAL is ready?
Attachment #8491370 - Flags: review?(roc) → review-
Comment on attachment 8491370 [details] [diff] [review]
b2g_imagecapture_test

Review of attachment 8491370 [details] [diff] [review]:
-----------------------------------------------------------------

::: content/media/test/test_b2g_imagecapture.html
@@ +28,5 @@
> +    };
> +
> +    // Gonk camera hal emualtor has timing issue so it waits 5s before taking
> +    // picture.
> +    setTimeout(function() { imageCapture.takePhoto(); }, 5000);

That should be bug 1021429. The ICS camera emulator HAL is defective.
And it blocks other gonk camera test once the preview starts.

I'm thinking it could be worth to write an CameraControl mimic in gecko for testing purpose.
Depends on: 1021429
Attached patch b2g_imagecapture_test (obsolete) — Splinter Review
Try result.
https://tbpl.mozilla.org/?tree=Try&rev=5be38715812c
Attachment #8491370 - Attachment is obsolete: true
Attachment #8499404 - Flags: review?(roc)
Comment on attachment 8499404 [details] [diff] [review]
b2g_imagecapture_test

Review of attachment 8499404 [details] [diff] [review]:
-----------------------------------------------------------------

::: content/media/test/test_imagecapture.html
@@ +113,5 @@
>  function init() {
>    return new Promise(function(resolve, reject) {
> +    var constraints;
> +    if (SpecialPowers.Services.appinfo.name == "B2G") {
> +      info("B2G ImagteCapture test");

ImageCapture
Attachment #8499404 - Flags: review?(roc) → review+
Blocks: 888177
Attached patch b2g_imagecapture_test (obsolete) — Splinter Review
Update comment.
Attachment #8499404 - Attachment is obsolete: true
Attachment #8504541 - Flags: review+
Hi sheriff, please check-in with Bug 1077299. Thanks.


https://tbpl.mozilla.org/?tree=Try&rev=5be38715812c
Keywords: checkin-needed
Blocks: 1077299
No longer blocks: 888177
Blocks: 888177
No longer blocks: 1077299
Depends on: 1077299
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/ec4e1f0988cd
Status: NEW → RESOLVED
Closed: 10 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
You need to log in before you can comment on or make changes to this bug.