Make "Set Global Privacy Control" function consistent with TestDriver - #152
Open
arichiv wants to merge 1 commit into
Open
Make "Set Global Privacy Control" function consistent with TestDriver#152arichiv wants to merge 1 commit into
arichiv wants to merge 1 commit into
Conversation
…tion This is the current expectation: https://github.com/web-platform-tests/wpt/blob/f9a50c1cea3305dbea06dcf55cce4fbb01839fe2/gpc/global_privacy_control.testdriver.html#L14 For more context see #151
There was a problem hiding this comment.
Pull request overview
This PR updates the spec for the “Set Global Privacy Control” WebDriver extension command to match Web Platform Tests (TestDriver) expectations by returning the updated GPC state instead of null.
Changes:
- Update the command description to note that it returns a result.
- Change the remote end steps to construct and return a JSON object containing the resulting
gpcvalue.
Suppressed comments (1)
index.html:566
Return [=success=] with dataresult.reads like returning the literal string "result" (and it also introduces the unusual "JSON [=Object=]" phrasing). Sinceresultis an algorithm variable (|result|), return the variable and use consistent "JSON object" terminology.
<li><p>Let |result| be a JSON [=Object=] with property "<code>gpc</code>" set to |gpc|.
<li><p>Return [=success=] with data `result`.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
552
to
+553
| <p>The <dfn class="export">Set Global Privacy Control</dfn> [=extension command=] modifies the | ||
| [=do-not-sell-or-share preference=] for the current session. | ||
| [=do-not-sell-or-share preference=] for the current session and returns the result. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is the current expectation: https://github.com/web-platform-tests/wpt/blob/f9a50c1cea3305dbea06dcf55cce4fbb01839fe2/gpc/global_privacy_control.testdriver.html#L14
Fixes #151
Preview | Diff