Skip to content

Commit 7193414

Browse files
Merge pull request #105 from bvandersloot-mozilla/main
Add user agent automation definition
2 parents a190704 + 320930d commit 7193414

File tree

1 file changed

+67
-2
lines changed

1 file changed

+67
-2
lines changed

index.html

Lines changed: 67 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
shortName: 'gpc',
6363
group: "wg/privacy",
6464
github: 'w3c/gpc',
65-
xref: ['html'],
65+
xref: ['html', 'webdriver'],
6666
localBiblio: {
6767
'CCPA-AG-FINAL-STATEMENT': {
6868
title: 'California Attorney General CCPA Final Statement of Reasons',
@@ -172,7 +172,7 @@ <h2>Expressing a Do Not Sell Or Share Preference</h2>
172172
<section>
173173
<h3>Expression Format</h3>
174174
<p>
175-
A Global Privacy Control [=preference=] should be conveyed for all HTTP requests (in the form
175+
A Global Privacy Control [=preference=] should be conveyed for all HTTP requests (in the form
176176
of the HTTP header) and all websites (in the form of the Web API property).
177177
</p>
178178
<p>
@@ -503,6 +503,71 @@ <h2 id="security">Security Considerations</h2>
503503
There are no known security impacts of the features in this specification.
504504
</p>
505505
</section>
506+
<section>
507+
<h2 id="automation">Automation</h2>
508+
For the purposes of user-agent automation and application testing, this document defines
509+
the following [=extension command|extension commands=]. [[WebDriver]]
510+
511+
<h3 id="set-global-privacy-control">Set Global Privacy Control</h3>
512+
<table>
513+
<tbody>
514+
<tr>
515+
<th>HTTP Method</th>
516+
<th>URI Template</th>
517+
</tr>
518+
<tr>
519+
<td>POST</td>
520+
<td>/session/{session id}/privacy</td>
521+
</tr>
522+
</tbody>
523+
</table>
524+
525+
<p>The <dfn class="export">Set Global Privacy Control</dfn> [=extension command=] modifies the
526+
[=do-not-sell-or-share preference=] for the current session.
527+
528+
<p>The [=remote end steps=], given <var>session</var>, <var>URL variables</var> and
529+
<var>parameters</var> are:
530+
531+
<ol>
532+
<li><p>Let |gpc| be the property `gpc` of |parameters|.
533+
<li><p>If |gpc| is undefined or is not a boolean, return error with error code invalid argument.
534+
<li><p>Record the user's [=preference=] for this |session| such that the browser will perform
535+
[=do-not-sell-or-share interaction|do-not-sell-or-share interactions=] if |gpc| is true and
536+
will not perform [=do-not-sell-or-share interaction|do-not-sell-or-share interactions=] if
537+
|gpc| is false.
538+
<li><p>Return [=success=] with data `null`.
539+
</ol>
540+
541+
<h3 id="get-global-privacy-control">Get Global Privacy Control</h3>
542+
<table>
543+
<tbody>
544+
<tr>
545+
<th>HTTP Method</th>
546+
<th>URI Template</th>
547+
</tr>
548+
<tr>
549+
<td>GET</td>
550+
<td>/session/{session id}/privacy</td>
551+
</tr>
552+
</tbody>
553+
</table>
554+
555+
<p>The <dfn class="export">Get Global Privacy Control</dfn> [=extension command=] returns the
556+
[=do-not-sell-or-share preference=] for the current session.
557+
558+
<p>The [=remote end steps=], given <var>session</var>, <var>URL variables</var> and
559+
<var>parameters</var> are:
560+
561+
<ol>
562+
<li><p>If the user's [=preference=] for this |session| issuch that the browser will
563+
perform [=do-not-sell-or-share interaction|do-not-sell-or-share interactions=], let
564+
|gpc| be true.
565+
<li><p>Otherwise, let |gpc| be false.
566+
<li><p>Let |result| be a JSON [=Object=] with property "<code>gpc</code>" set to |gpc|.
567+
<li><p>Return [=success=] with data `null`.
568+
</ol>
569+
570+
</section>
506571
<section id="conformance"></section>
507572
<section class="appendix">
508573
<h2>Implementation Considerations</h2>

0 commit comments

Comments
 (0)