-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Created tests for http://www.w3.org/TR/html-media-capture/ #306
Created tests for http://www.w3.org/TR/html-media-capture/ #306
Conversation
Critic review: https://critic.hoppipolla.co.uk/r/284 This is an external review system which you may optionally use for the code review of your pull request. |
<p>Test passes</p> | ||
<ol> | ||
<li>if there appears a video capture screen,</li> | ||
<li>if there is a way to change camera,</li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't normative.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the review.
http://www.w3.org/TR/html-media-capture/#security, says,
Similarly, the user agent SHOULD allow the user:
- to select the exact media capture device to be used if there exists multiple devices of the same type (e.g. a front-facing camera in addition to a primary camera).
As the test said, it is only for > 1 cameras.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tobie, looking back to the spec, I find below statement. Could you please review this again? Many thanks.
[[
2. Conformance
As well as sections marked as non-normative, all authoring guidelines, diagrams, examples, and notes in this specification are non-normative. Everything else in this specification is normative.
]]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for dropping the ball on this.
I read the spec as: if your device has two camera's "there
may exist valid reasons in particular circumstances"[1] not to provide UI for the user to pick one,
"but the full implications must be understood and carefully weighed before choosing a different course."[1]
So basically, there might be might be situations where it's OK not to offer this option to the user and still be spec compliant. So this brings up a methodology question of how we should deal with this in practice.
This has been discussed in the past[2].
I'm going to bring it back up the public-test-infra@ mailing list and propose a resolution.
Sounds good?
[1] http://www.ietf.org/rfc/rfc2119.txt
[2] http://lists.w3.org/Archives/Public/public-webapps/2011JulSep/0053.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for pointing me out this. It sounds like an issue of conformance testing of RFC2119 key word 'should'. The above talk [2] sounds reasonable.
However, it is a little different from the coverage tool, that you proposed 4 tests per RFC2119 key word ('must' and 'should') by default :)
It is good to find out a resolution around this, thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
However, it is a little different from the coverage tool, that you proposed 4 tests per RFC2119 key word ('must' and 'should') by default :)
Hehe. Good catch. :)
Let's seek to get consensus on this in the mailing list[3] and apply the decision consistently. My personal preference would be to mark optional tests with meta-data but still include them in the repo.
[3] http://lists.w3.org/Archives/Public/public-test-infra/2013JulSep/0240.html
w3c-test:mirror |
|
||
<script> | ||
test(function() { | ||
var inputs = document.querySelector('input'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the intention is to perform this test on all input elements, querySelectorAll should be used instead.
The permission model being used in these tests is different from the one depicted in the spec. The spec suggests implicit consent through user interaction, whereas the test instructions presume an explicit allow/deny prompt ("Click the button, allow camera access, and start to capture an image.", "Make sure that there is no granted camera access.", "Click the button, deny camera access.") Furthermore, the tests do not verify that the UA correctly produces a file when the user goes ahead with a capture, or correctly produces no files when the user denies the capture (implicitly by cancelling the capture). I would re-work the capture tests as follows, using capture_image.html and capture_image_deny.html as examples. capture_image.html
capture_image_deny.html
I would skip the check on whether an image capture screen is shown, or put that in a separate test, as that is actually a SHOULD requirement. |
A number of specifications and test suites got moved to different folders on w3c-test.org. This commit should fix all broken links that appear in the final roadmap. As an exception to the rule, I could not find the tests referenced by the inputaccept.json file for the Media Capture specification. I see there's an on-going pull request at: web-platform-tests/wpt#306 ... but files do not appear under http://w3c-test.org/submissions. The broken link remains. Not related but note the notifications API tutorial is no longer available on WebPlatform.org so I dropped the section from the notification.json file.
@zqzhang The spec was updated as follows to address the issues raised in this PR: http://dev.w3.org/cvsweb/2009/dap/camera/Overview.src.html.diff?r1=1.5;r2=1.6;f=h Namely, the Security and privacy considerations section is now non-normative, and as such contains no test assertions: http://dev.w3.org/2009/dap/camera/#security Could you update the PR to reflect this? Thanks! |
LGTM @zqzhang Thanks! |
Squashed and landed in 5d797b8 |
ea389ca278 chore(package): bump version number to 20.0.1 518e5cc12b chore(CHANGELOG): regenerate aa3588b457 chore(dist): update 7ceaf0ee5b refactor(lib/webidl2): enum as a module (#318) 27b0eb31d3 fix(lib/webidl2): emit error message correctly (#317) bcb8c32c69 docs(lib/writer): fix extendedAttribute example 1ddd771ed8 docs(lib/writer): document generic() (#315) 86029c5866 chore(package): bump version number to 20.0.0 f195b986b8 chore(CHANGELOG): regenerate 7423f5d8f7 chore(dist): update 996d4f7e71 feat(lib/writer): introduce generic() hook (#314) 87b07ec705 refactor(lib/webidl2): modularize Default (#312) be140dad86 refactor(lib/webidl2): modularize Token and list() (#311) 464d3a1e2b refactor(lib/webidl2): modularize Includes (#310) 6b3b7c54f5 chore(package): bump version number to 19.0.1 c68baccbb2 chore(CHANGELOG): regenerate 97851631ab chore(dist): update 1cc6b3e257 fix(lib/writer): call ts.trivia with actual string (#309) e84ba4fd34 chore(CHANGELOG): regenerate 37f87e6393 chore(package): bump version number to 19.0.0 6486380999 update dist 6340c3e1e4 fix(lib/webidl2): restore error fields (#308) c6a7c97358 fix(lib/webidl2): rename float as decimal (#307) 048e3d748e BREAKING CHANGE: remove all trivia fields (#306) f37e39e928 BREAKING CHANGE: remove baseName and escaped* fields (#305) b0c5a9e5e6 BREAKING CHANGE: remove token fields (#304) e1aa18822f BREAKING CHANGE: remove trivia from boolean fields (#303) 112862924c refactor: merge error functions (#299) 1926437649 fix(checker): add an empty line between messages (#298) 3de7e3066a chore(package): bump version number to 18.0.1 a3637e9c20 update build 09c4e4f725 chore(package): bump version number to 18.0.0 df4c73deef fix(lib/validator): validate when overloads are all from mixins (#296) a8e81d479e refactor: use module for checker (#295) 679395293f fix(checker): use webpack build result (#294) abd41222d5 refactor: use ES module syntax and bundle by webpack (#293) aa75ae538c feat: add validation feature to the checker page (#292) b7e7b1ba99 feat: a validator for IDL (#262) 852194f5ee refactor: remove remaining JSON idlTypes (#291) b8590cd281 refactor: use Type for primitive types (#290) 44987f3bf5 refactor: generic type as a class (#289) c86dac1295 refactor: union type as a class (#288) 64f0fa50d7 refactor: argument as a class (#287) 209c1d4cf4 fix(lib/webidl2): disallow empty generic type (#286) 927328d5c7 fix(lib/webidl2): disallow null on constants (#284) 45287bf978 refactor: use list() in identifiers()/enums (#285) 2d555baf51 refactor: extended attributes as a class (#283) 11afb8e7ea refactor: extended attribute as a class (#282) 7d1562c406 refactor: default value as a class (#281) 812a292252 BREAKING CHANGE: constant as a class (#280) 44b68f8afc refactor(lib/writer): use tokens object in container() (#273) a9bb14d43e add a test case (#277) 7c07ca4eb5 refactor: attribute as a class (#276) a25f052736 refactor: operation as a class (#275) dba7a4b8b7 test(lib/webidl2): nullable constant with typedef identifiers (#279) 903c374ebb refactor: callback function as a class (#278) f396b5182d refactor: iterable as a class (#274) 810d2db4cf refactor: containers as classes (#272) ce9787caab refactor: namespace as a class (#271) 56a590d327 refactor: dictionary as a class (#270) 5e51ccec85 refactor: field as a class (#268) 9643425b8e refactor(lib/webidl2): move toJSON to Definition (#269) c13e3aa65f refactor: enum as a class (#267) ae4a1b4fd8 refactor: typedef as a class (#266) 81edfc0774 refactor: includes as a class (#265) f9c0d44f49 chore: add .gitattributes (#264) 51618dced6 style: apply no-trailing-spaces (#263) d9c160f4ba chore(package): bump version number to 17.0.2 1a2147bb20 fix(lib/webidl2): apply a preceding hyphen for identifiers (#261) c27f3c3e94 fix(checker): avoid using innerText (#260) 4b0443568c fix(lib/webidl2): restore enum value string form in error (#258) 805e2b2ea2 docs: lowercase the example namespace "Console" (#257) 16d5a92b2d chore(CHANGELOG): regenerate 3bb235ca95 chore(package): bump version number to 17.0.1 1aa1258028 fix: unescape includes/idlTypes/inheritances (#253) e57f46632b fix(lib/webidl2): prevent any in a union type (#254) 8cbec8b4d0 Revert "fix(lib/webidl2): prevent any in a union type" 73c15634ac fix(lib/webidl2): prevent any in a union type c393451a43 feat(lib/webidl): subclass standard error (#247) 6e2a83bfee chore(CHANGELOG): regenerate 3f8ac3f23b 17.0.0 9e2c43da44 BREAKING CHANGE: remove .extAttrs from arguments (#248) ec05bc243b 16.1.0 4ae64a8766 Add unit tests for writer template functions (#245) dd89780e22 feat(lib/webidl2): better error messages (#244) edaf314b6a Add docs for template feature (#243) df4484597e Revert "add test for writer template feature" 19f5e6e8f8 Revert "upgrade eslint" 7e886e9f26 add test for writer template feature 1313c80c16 upgrade eslint 1014b33145 feat(lib/writer): write() with optional templates (#241) 5d5a645936 chore(package): bump version number to 16.0.0 3c538be29f BREAKING CHANGE: merge modifier fields (#240) 7350bb1227 refactor(lib/writer): use container() (#239) b215543038 refactor(lib/writer): use token() (#238) 0a0bfa9ee9 refactor(lib/writer): reduce conditional constructs (#237) 40a048b800 chore: remove jscov (#236) 018b24f7fc chore(package): update eslint (#235) d38c4ed618 eslint: prevent eval() (#234) 8ff7a963cf chore(package-locK): regenerate 731f5edb5a chore(CHANGELOG): regenerated d759b8c968 chore(package): update version + deps 568e1d5db6 docs(README): enum value's type is now enum-value (#233) f3462f9501 BREAKING CHANGE: enum values should be of type enum-value (#232) 46b250286d fix: escape top identifiers (#229) 91bba911e5 fix(lib/webidl): disallow multiple special keywords (#224) b2a9f6c901 BREAKING CHANGE: Drop support for implements statement (#106) da93c9373b refactor(lib/writer): horizontally shorter type() (#221) 2e03190e30 chore(README): operation body always has idlType (#218) 6cc3277c9d chore(package): bump version number to 14.0.1 a3e89c87d2 fix(index): import writer from index (#219) 1582972c21 chore(CHANGELOG): regenerate 402e4e3514 chore(package): bump version number to 14.0.0 698b8e991d Document changes for idlType and extAttrs (#217) 7328816495 Document trivia for root type declarations/members (#214) b3fd89040d BREAKING CHANGE: remove support for legacyiterable (#216) cce0d6d484 Document trivia for iterable-likes (#213) b5b4d90a12 Document trivia for interfaces/mixins/namespaces (#212) 69a0f2b5ac Document generic array, escapedName and removal of sequence (#211) 7d08a0c8af BREAKING CHANGE: support full whitespace conservation (#185) bbe95578bd trivia for implements/includes (#209) 9df331ce7d Add trivia for enums and typedefs (#207) 2559b95c75 Add trivia for callbacks (#206) 4cbd4143ba Add trivia for partial types (#205) fc147026f7 trivia for dictionaries (#204) be9126fa7b Add trivia for mixins and namespaces (#203) b02aa3366a Use eslint minimally (#202) 74cd53340d Add trivia for extended attributes (#201) 7524981417 Add trivia for extended attribute identifiers (#200) 3d682826e2 Add trivia for const member type (#199) 25d5919278 trivia for arguments (#198) b17417ca83 trivia for operation (#197) 6e12a109d1 trivia for inheritance (#195) 79d791a389 Add trivia for iterable declarations (#194) 0cb3e7cba4 Add trivia for modifiers (#193) ecebf30070 Add trivia for idlTypes (#192) 32f11bc730 BREAKING CHANGE: remove nullable field from const type (#189) f4292a7a21 Generics always as an array (#188) 1ea9f9c91a fix: prevent empty iterable declaration (#187) d36f7e4b7e Add trivia field for interfaces/mixins (#186) git-subtree-dir: resources/webidl2 git-subtree-split: 306cf6479f909a38297c4982e79171958669fe55
Following discussion in the spec PR #306 [1], this change updates the way to obtain a MediaSourceHandle to be via a "handle" attribute on the MediaSource instance that is both readonly and always returns the same object (or throws exception, if for instance, it is attempted to be read from a main-thread-owned MediaSource instance instead of a dedicated-worker-owned MediaSource instance). Also included is the removal of the readyState check when attempting to obtain this handle (since it is now never expected to be changeable; no sequence of distinct handles is ever expected to be obtainable from a worker MediaSource). Also removed is the prevention of retrieving such a handle from an instance more than once. Multiple tests are added or updated to ensure correct behavior. BUG=878133 Change-Id: Ic07095d6d1dc95b8e6be818027984600aa7ab334
Following discussion in the spec PR #306 [1], this change updates the way to obtain a MediaSourceHandle to be via a "handle" attribute on the MediaSource instance that is both readonly and always returns the same object (or throws exception, if for instance, it is attempted to be read from a main-thread-owned MediaSource instance instead of a dedicated- worker-owned MediaSource instance). Also included is the removal of the readyState check when attempting to obtain this handle (since it is now never expected to be changeable; no sequence of distinct handles is ever expected to be obtainable from a worker MediaSource). Also removed is the prevention of retrieving such a handle from an instance more than once. Multiple tests are added or updated to ensure correct behavior. [1] w3c/media-source#306 BUG=878133 Change-Id: Ic07095d6d1dc95b8e6be818027984600aa7ab334
Following discussion in the spec PR #306 [1], this change updates the way to obtain a MediaSourceHandle to be via a "handle" attribute on the MediaSource instance that is both readonly and always returns the same object (or throws exception, if for instance, it is attempted to be read from a main-thread-owned MediaSource instance instead of a dedicated- worker-owned MediaSource instance). Also included is the removal of the readyState check when attempting to obtain this handle (since it is now never expected to be changeable; no sequence of distinct handles is ever expected to be obtainable from a worker MediaSource). Also removed is the prevention of retrieving such a handle from an instance more than once. Multiple tests are added or updated to ensure correct behavior. [1] w3c/media-source#306 BUG=878133 Change-Id: Ic07095d6d1dc95b8e6be818027984600aa7ab334
Following discussion in the spec PR #306 [1], this change updates the way to obtain a MediaSourceHandle to be via a "handle" attribute on the MediaSource instance that is both readonly and always returns the same object (or throws exception, if for instance, it is attempted to be read from a main-thread-owned MediaSource instance instead of a dedicated- worker-owned MediaSource instance). Also included is the removal of the readyState check when attempting to obtain this handle (since it is now never expected to be changeable; no sequence of distinct handles is ever expected to be obtainable from a worker MediaSource). Also removed is the prevention of retrieving such a handle from an instance more than once. Multiple tests are added or updated to ensure correct behavior. [1] w3c/media-source#306 BUG=878133 Change-Id: Ic07095d6d1dc95b8e6be818027984600aa7ab334
Following discussion in the spec PR #306 [1], this change updates the way to obtain a MediaSourceHandle to be via a "handle" attribute on the MediaSource instance that is both readonly and always returns the same object (or throws exception, if for instance, it is attempted to be read from a main-thread-owned MediaSource instance instead of a dedicated- worker-owned MediaSource instance). Also included is the removal of the readyState check when attempting to obtain this handle (since it is now never expected to be changeable; no sequence of distinct handles is ever expected to be obtainable from a worker MediaSource). Also removed is the prevention of retrieving such a handle from an instance more than once. Multiple tests are added or updated to ensure correct behavior. [1] w3c/media-source#306 BUG=878133 Change-Id: Ic07095d6d1dc95b8e6be818027984600aa7ab334
Following discussion in the spec PR #306 [1], this change updates the way to obtain a MediaSourceHandle to be via a "handle" attribute on the MediaSource instance that is both readonly and always returns the same object (or throws exception, if for instance, it is attempted to be read from a main-thread-owned MediaSource instance instead of a dedicated- worker-owned MediaSource instance). Also included is the removal of the readyState check when attempting to obtain this handle (since it is now never expected to be changeable; no sequence of distinct handles is ever expected to be obtainable from a worker MediaSource). Also removed is the prevention of retrieving such a handle from an instance more than once. Multiple tests are added or updated to ensure correct behavior. [1] w3c/media-source#306 BUG=878133 Change-Id: Ic07095d6d1dc95b8e6be818027984600aa7ab334 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3750140 Commit-Queue: Matthew Wolenetz <wolenetz@chromium.org> Reviewed-by: Will Cassella <cassew@chromium.org> Cr-Commit-Position: refs/heads/main@{#1024034}
Following discussion in the spec PR #306 [1], this change updates the way to obtain a MediaSourceHandle to be via a "handle" attribute on the MediaSource instance that is both readonly and always returns the same object (or throws exception, if for instance, it is attempted to be read from a main-thread-owned MediaSource instance instead of a dedicated- worker-owned MediaSource instance). Also included is the removal of the readyState check when attempting to obtain this handle (since it is now never expected to be changeable; no sequence of distinct handles is ever expected to be obtainable from a worker MediaSource). Also removed is the prevention of retrieving such a handle from an instance more than once. Multiple tests are added or updated to ensure correct behavior. [1] w3c/media-source#306 BUG=878133 Change-Id: Ic07095d6d1dc95b8e6be818027984600aa7ab334 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3750140 Commit-Queue: Matthew Wolenetz <wolenetz@chromium.org> Reviewed-by: Will Cassella <cassew@chromium.org> Cr-Commit-Position: refs/heads/main@{#1024034}
No description provided.