-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Add tests for the writingsuggestions attribute #43780
Conversation
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.
These are really thorough! Was great to see.
Only nit is the formatting... could maybe run prettier over js tests, but no big deal if not. |
Some of the getAttribute checks may need to be modified to align with the default behavior of missing/invalid content attributes. The content attributes are not affected by inheritance e.g.:
This aligns with the content attribute behavior of the 'spellcheck' attribute, which 'writingSuggestions' shares a lot of similarities with. cc: @dandclark |
This CL implements the new 'writingSuggestions' attribute. We add a new runtime flag and setter/getter methods for it. The attribute has values "true"/"false" to allow developers to enable or disable browser-provided writing suggestions. If the attribute is not explicitly set on an element, it inherits its value from ancestor elements if specified; otherwise, it default to "true". Changes were verified against wpt tests: #43780 Intent to Prototype: https://groups.google.com/a/chromium.org/g/blink-dev/c/rHyRCx-hJhE Bug: 1513953 Change-Id: I716deba02f3d8df37dd04d1363d624cf2615203c
This CL implements the new 'writingSuggestions' attribute. We add a new runtime flag and setter/getter methods for it. The attribute has values "true"/"false" to allow developers to enable or disable browser-provided writing suggestions. If the attribute is not explicitly set on an element, it inherits its value from ancestor elements if specified; otherwise, it default to "true". Changes were verified against wpt tests: (note: checks for getAttribute() for missing/invalid attributes differ to align with default behavior) #43780 Intent to Prototype: https://groups.google.com/a/chromium.org/g/blink-dev/c/rHyRCx-hJhE Bug: 1513953 Change-Id: I716deba02f3d8df37dd04d1363d624cf2615203c
This CL implements the new 'writingSuggestions' attribute. We add a new runtime flag and setter/getter methods for it. The attribute has values "true"/"false" to allow developers to enable or disable browser-provided writing suggestions. If the attribute is not explicitly set on an element, it inherits its value from ancestor elements if specified; otherwise, it default to "true". Changes were verified against wpt tests: (note: checks for getAttribute() for missing/invalid attributes differ to align with default behavior) #43780 Intent to Prototype: https://groups.google.com/a/chromium.org/g/blink-dev/c/rHyRCx-hJhE Bug: 1513953 Change-Id: I716deba02f3d8df37dd04d1363d624cf2615203c
This CL implements the new 'writingSuggestions' attribute. We add a new runtime flag and setter/getter methods for it. The attribute has values "true"/"false" to allow developers to enable or disable browser-provided writing suggestions. If the attribute is not explicitly set on an element, it inherits its value from ancestor elements if specified; otherwise, it defaults to "true". Changes were verified against wpt tests: (note: checks for getAttribute() for missing/invalid attributes differ to align with default behavior) #43780 Intent to Prototype: https://groups.google.com/a/chromium.org/g/blink-dev/c/rHyRCx-hJhE Bug: 1513953 Change-Id: I716deba02f3d8df37dd04d1363d624cf2615203c
This CL implements the new 'writingSuggestions' attribute. We add a new runtime flag and setter/getter methods for it. The attribute has values "true"/"false" to allow developers to enable or disable browser-provided writing suggestions. If the attribute is not explicitly set on an element, it inherits its value from ancestor elements if specified; otherwise, it defaults to "true". Changes were verified against wpt tests: (note: checks for getAttribute() for missing/invalid attributes differ to align with default behavior) #43780 Intent to Prototype: https://groups.google.com/a/chromium.org/g/blink-dev/c/rHyRCx-hJhE Bug: 1513953 Change-Id: I716deba02f3d8df37dd04d1363d624cf2615203c
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.
I'm missing coverage for:
- input types to which the attribute does not apply.
- Elements that are disabled.
To be clear -- the attribute setting/getting/reflection behavior that's validated in this test would be the same for those elements. The spec's checks for disabled and non-applicable input types only applies to the steps determining whether the user agent actually applies the suggestions or not. But, still a good idea to have these tests to verify that the attribute setting/getting/reflection behavior is no different. |
This CL implements the new 'writingSuggestions' attribute. We add a new runtime flag and setter/getter methods for it. The attribute has values "true"/"false" to allow developers to enable or disable browser-provided writing suggestions. If the attribute is not explicitly set on an element, it inherits its value from ancestor elements; otherwise, it defaults to "true". Changes were verified against wpt tests: (note: checks for getAttribute() for missing/invalid attributes differ to align with default behavior) #43780 Intent to Prototype: https://groups.google.com/a/chromium.org/g/blink-dev/c/rHyRCx-hJhE Bug: 1513953 Change-Id: I716deba02f3d8df37dd04d1363d624cf2615203c
This CL implements the new 'writingsuggestions' attribute. We add a new runtime flag and setter/getter methods for it. The attribute has values "true"/"false" to allow developers to enable or disable browser-provided writing suggestions. If the attribute is not explicitly set on an element, it inherits its value from ancestor elements; otherwise, it defaults to "true". Changes were verified against wpt tests: (note: checks for getAttribute() for missing/invalid attributes differ to align with default behavior) #43780 Intent to Prototype: https://groups.google.com/a/chromium.org/g/blink-dev/c/rHyRCx-hJhE Bug: 1513953 Change-Id: I716deba02f3d8df37dd04d1363d624cf2615203c
This CL implements the new 'writingsuggestions' attribute. We add a new runtime flag and setter/getter methods for it. The attribute has values "true"/"false" to allow developers to enable or disable browser-provided writing suggestions. If the attribute is not explicitly set on an element, it inherits its value from ancestor elements; otherwise, it defaults to "true". Changes were verified against wpt tests: (note: checks for getAttribute() for missing/invalid attributes differ to align with default behavior) #43780 Intent to Prototype: https://groups.google.com/a/chromium.org/g/blink-dev/c/rHyRCx-hJhE Bug: 1513953 Change-Id: I716deba02f3d8df37dd04d1363d624cf2615203c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5247315 Reviewed-by: Dan Clark <daniec@microsoft.com> Commit-Queue: Stephanie Zhang <stephanie.zhang@microsoft.com> Reviewed-by: Mason Freed <masonf@chromium.org> Cr-Commit-Position: refs/heads/main@{#1259389}
This CL implements the new 'writingsuggestions' attribute. We add a new runtime flag and setter/getter methods for it. The attribute has values "true"/"false" to allow developers to enable or disable browser-provided writing suggestions. If the attribute is not explicitly set on an element, it inherits its value from ancestor elements; otherwise, it defaults to "true". Changes were verified against wpt tests: (note: checks for getAttribute() for missing/invalid attributes differ to align with default behavior) #43780 Intent to Prototype: https://groups.google.com/a/chromium.org/g/blink-dev/c/rHyRCx-hJhE Bug: 1513953 Change-Id: I716deba02f3d8df37dd04d1363d624cf2615203c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5247315 Reviewed-by: Dan Clark <daniec@microsoft.com> Commit-Queue: Stephanie Zhang <stephanie.zhang@microsoft.com> Reviewed-by: Mason Freed <masonf@chromium.org> Cr-Commit-Position: refs/heads/main@{#1259389}
…stonly Automatic update from web-platform-tests Add 'writingsuggestions' attribute This CL implements the new 'writingsuggestions' attribute. We add a new runtime flag and setter/getter methods for it. The attribute has values "true"/"false" to allow developers to enable or disable browser-provided writing suggestions. If the attribute is not explicitly set on an element, it inherits its value from ancestor elements; otherwise, it defaults to "true". Changes were verified against wpt tests: (note: checks for getAttribute() for missing/invalid attributes differ to align with default behavior) web-platform-tests/wpt#43780 Intent to Prototype: https://groups.google.com/a/chromium.org/g/blink-dev/c/rHyRCx-hJhE Bug: 1513953 Change-Id: I716deba02f3d8df37dd04d1363d624cf2615203c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5247315 Reviewed-by: Dan Clark <daniec@microsoft.com> Commit-Queue: Stephanie Zhang <stephanie.zhang@microsoft.com> Reviewed-by: Mason Freed <masonf@chromium.org> Cr-Commit-Position: refs/heads/main@{#1259389} -- wpt-commits: dbbfe1b6f0efc3b68ce5d59bdb0c36b3dd615c86 wpt-pr: 44413
input types This CL adds tests for disabled elements and input types to which writing suggestions are not applicable (eg <input type="color"/>). The 'writingsuggestions' attribute setting/getting/reflection behavior for these types of elements is identical to that of elements on which writing suggestions should be generated. The User Agent is responsible for ensuring that writing suggestions aren't applied to these types of elements. github.com//pull/43780#issuecomment-1936426092 Bug: 1513953 Change-Id: I31aa03b131ab440d5d6e749c227837997f13464c
…stonly Automatic update from web-platform-tests Add 'writingsuggestions' attribute This CL implements the new 'writingsuggestions' attribute. We add a new runtime flag and setter/getter methods for it. The attribute has values "true"/"false" to allow developers to enable or disable browser-provided writing suggestions. If the attribute is not explicitly set on an element, it inherits its value from ancestor elements; otherwise, it defaults to "true". Changes were verified against wpt tests: (note: checks for getAttribute() for missing/invalid attributes differ to align with default behavior) web-platform-tests/wpt#43780 Intent to Prototype: https://groups.google.com/a/chromium.org/g/blink-dev/c/rHyRCx-hJhE Bug: 1513953 Change-Id: I716deba02f3d8df37dd04d1363d624cf2615203c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5247315 Reviewed-by: Dan Clark <daniecmicrosoft.com> Commit-Queue: Stephanie Zhang <stephanie.zhangmicrosoft.com> Reviewed-by: Mason Freed <masonfchromium.org> Cr-Commit-Position: refs/heads/main{#1259389} -- wpt-commits: dbbfe1b6f0efc3b68ce5d59bdb0c36b3dd615c86 wpt-pr: 44413 UltraBlame original commit: c25909ad3c081dfe228692bab7ecddc4c087a642
input types This CL adds tests for disabled elements and input types to which writing suggestions are not applicable (eg <input type="color"/>). The 'writingsuggestions' attribute setting/getting/reflection behavior for these types of elements is identical to that of elements on which writing suggestions should be generated. The User Agent is responsible for ensuring that writing suggestions aren't applied to these types of elements. github.com//pull/43780#issuecomment-1936426092 Bug: 1513953 Change-Id: I31aa03b131ab440d5d6e749c227837997f13464c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5299628 Commit-Queue: Stephanie Zhang <stephanie.zhang@microsoft.com> Reviewed-by: Sanket Joshi <sajos@microsoft.com> Reviewed-by: Dan Clark <daniec@microsoft.com> Cr-Commit-Position: refs/heads/main@{#1261510}
input types This CL adds tests for disabled elements and input types to which writing suggestions are not applicable (eg <input type="color"/>). The 'writingsuggestions' attribute setting/getting/reflection behavior for these types of elements is identical to that of elements on which writing suggestions should be generated. The User Agent is responsible for ensuring that writing suggestions aren't applied to these types of elements. github.com//pull/43780#issuecomment-1936426092 Bug: 1513953 Change-Id: I31aa03b131ab440d5d6e749c227837997f13464c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5299628 Commit-Queue: Stephanie Zhang <stephanie.zhang@microsoft.com> Reviewed-by: Sanket Joshi <sajos@microsoft.com> Reviewed-by: Dan Clark <daniec@microsoft.com> Cr-Commit-Position: refs/heads/main@{#1261510}
…stonly Automatic update from web-platform-tests Add 'writingsuggestions' attribute This CL implements the new 'writingsuggestions' attribute. We add a new runtime flag and setter/getter methods for it. The attribute has values "true"/"false" to allow developers to enable or disable browser-provided writing suggestions. If the attribute is not explicitly set on an element, it inherits its value from ancestor elements; otherwise, it defaults to "true". Changes were verified against wpt tests: (note: checks for getAttribute() for missing/invalid attributes differ to align with default behavior) web-platform-tests/wpt#43780 Intent to Prototype: https://groups.google.com/a/chromium.org/g/blink-dev/c/rHyRCx-hJhE Bug: 1513953 Change-Id: I716deba02f3d8df37dd04d1363d624cf2615203c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5247315 Reviewed-by: Dan Clark <daniecmicrosoft.com> Commit-Queue: Stephanie Zhang <stephanie.zhangmicrosoft.com> Reviewed-by: Mason Freed <masonfchromium.org> Cr-Commit-Position: refs/heads/main{#1259389} -- wpt-commits: dbbfe1b6f0efc3b68ce5d59bdb0c36b3dd615c86 wpt-pr: 44413 UltraBlame original commit: c25909ad3c081dfe228692bab7ecddc4c087a642
…stonly Automatic update from web-platform-tests Add 'writingsuggestions' attribute This CL implements the new 'writingsuggestions' attribute. We add a new runtime flag and setter/getter methods for it. The attribute has values "true"/"false" to allow developers to enable or disable browser-provided writing suggestions. If the attribute is not explicitly set on an element, it inherits its value from ancestor elements; otherwise, it defaults to "true". Changes were verified against wpt tests: (note: checks for getAttribute() for missing/invalid attributes differ to align with default behavior) web-platform-tests/wpt#43780 Intent to Prototype: https://groups.google.com/a/chromium.org/g/blink-dev/c/rHyRCx-hJhE Bug: 1513953 Change-Id: I716deba02f3d8df37dd04d1363d624cf2615203c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5247315 Reviewed-by: Dan Clark <daniec@microsoft.com> Commit-Queue: Stephanie Zhang <stephanie.zhang@microsoft.com> Reviewed-by: Mason Freed <masonf@chromium.org> Cr-Commit-Position: refs/heads/main@{#1259389} -- wpt-commits: dbbfe1b6f0efc3b68ce5d59bdb0c36b3dd615c86 wpt-pr: 44413
Hi all, we've recently updated these tests as part of our implementation in Chromium. The tests include coverage for disabled elements and input types where writing suggestions are not applicable. Since there hasn't been a resolute decision about what the attribute should return for these cases, we've aligned the behavior with other elements where writing suggestions are applicable. If there are any changes to this behavior in the future, I'll provide updated tests. Thanks! |
…led elements and "unsupported" input types, a=testonly Automatic update from web-platform-tests Add 'writingsuggestions' tests for disabled elements and "unsupported" input types This CL adds tests for disabled elements and input types to which writing suggestions are not applicable (eg <input type="color"/>). The 'writingsuggestions' attribute setting/getting/reflection behavior for these types of elements is identical to that of elements on which writing suggestions should be generated. The User Agent is responsible for ensuring that writing suggestions aren't applied to these types of elements. github.com/web-platform-tests/wpt/pull/43780#issuecomment-1936426092 Bug: 1513953 Change-Id: I31aa03b131ab440d5d6e749c227837997f13464c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5299628 Commit-Queue: Stephanie Zhang <stephanie.zhang@microsoft.com> Reviewed-by: Sanket Joshi <sajos@microsoft.com> Reviewed-by: Dan Clark <daniec@microsoft.com> Cr-Commit-Position: refs/heads/main@{#1261510} -- wpt-commits: f6f118de16681fc1586f265c2ea7bea98fc7dec9 wpt-pr: 44613
This CL implements the new 'writingsuggestions' attribute. We add a new runtime flag and setter/getter methods for it. The attribute has values "true"/"false" to allow developers to enable or disable browser-provided writing suggestions. If the attribute is not explicitly set on an element, it inherits its value from ancestor elements; otherwise, it defaults to "true". Changes were verified against wpt tests: (note: checks for getAttribute() for missing/invalid attributes differ to align with default behavior) #43780 Intent to Prototype: https://groups.google.com/a/chromium.org/g/blink-dev/c/rHyRCx-hJhE Bug: 1513953 Change-Id: I716deba02f3d8df37dd04d1363d624cf2615203c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5247315 Reviewed-by: Dan Clark <daniec@microsoft.com> Commit-Queue: Stephanie Zhang <stephanie.zhang@microsoft.com> Reviewed-by: Mason Freed <masonf@chromium.org> Cr-Commit-Position: refs/heads/main@{#1259389}
input types This CL adds tests for disabled elements and input types to which writing suggestions are not applicable (eg <input type="color"/>). The 'writingsuggestions' attribute setting/getting/reflection behavior for these types of elements is identical to that of elements on which writing suggestions should be generated. The User Agent is responsible for ensuring that writing suggestions aren't applied to these types of elements. github.com//pull/43780#issuecomment-1936426092 Bug: 1513953 Change-Id: I31aa03b131ab440d5d6e749c227837997f13464c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5299628 Commit-Queue: Stephanie Zhang <stephanie.zhang@microsoft.com> Reviewed-by: Sanket Joshi <sajos@microsoft.com> Reviewed-by: Dan Clark <daniec@microsoft.com> Cr-Commit-Position: refs/heads/main@{#1261510}
…led elements and "unsupported" input types, a=testonly Automatic update from web-platform-tests Add 'writingsuggestions' tests for disabled elements and "unsupported" input types This CL adds tests for disabled elements and input types to which writing suggestions are not applicable (eg <input type="color"/>). The 'writingsuggestions' attribute setting/getting/reflection behavior for these types of elements is identical to that of elements on which writing suggestions should be generated. The User Agent is responsible for ensuring that writing suggestions aren't applied to these types of elements. github.com/web-platform-tests/wpt/pull/43780#issuecomment-1936426092 Bug: 1513953 Change-Id: I31aa03b131ab440d5d6e749c227837997f13464c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5299628 Commit-Queue: Stephanie Zhang <stephanie.zhang@microsoft.com> Reviewed-by: Sanket Joshi <sajos@microsoft.com> Reviewed-by: Dan Clark <daniec@microsoft.com> Cr-Commit-Position: refs/heads/main@{#1261510} -- wpt-commits: f6f118de16681fc1586f265c2ea7bea98fc7dec9 wpt-pr: 44613
As mentioned in this comment, tests for the |
whatwg/html#9065 proposes the introduction of a new attribute to control UA-provided writing assistance. This PR adds WPT test coverage for that attribute.
Corresponding spec PR: whatwg/html#10018