You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: index.bs
+27-5Lines changed: 27 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -1221,9 +1221,10 @@ Issue: Define how this works.
1221
1221
1222
1222
# User Contexts # {#user-contexts}
1223
1223
1224
-
A <dfn interface>UserContext</dfn> is an aggregation of browsing contexts that separates the browsing contexts in one user context from browsing contexts in another user context.
1224
+
A <dfn>user context</dfn> is an aggregation of browsing contexts that separates the browser state for browsing contexts in one user context from browsing contexts in another user context.
1225
+
The user agent contains at least one user context, the <dfn>default user context</dfn>.
1225
1226
1226
-
Note: User contexts are a WebDriver BiDi-specific equivalent to private browsing modes (https://www.w3.org/2001/tag/doc/private-browsing-modes/).
1227
+
Note: User contexts are a WebDriver-specific abstraction to allow working with private browsing modes (https://www.w3.org/2001/tag/doc/private-browsing-modes/).
1227
1228
While we don't want to pose any restrictions on the implementations of private browsing modes, we want to allow to perform basic operations with private browsing
1228
1229
contexts. A user context can be seen as a user agent in terms of the Infra spec but currently WebDriver BiDi spec is not compliant with that definition of the user agent.
1229
1230
@@ -1822,7 +1823,7 @@ The [=remote end steps=] with |session| and <var ignore>command parameters</var>
1822
1823
1823
1824
#### The browser.createUserContext Command #### {#command-browser-createUserContext}
1824
1825
1825
-
The <dfn export for=commands>browser.createUserContext</dfn> command creates a {{UserContext}} of browsing contexts.
1826
+
The <dfn export for=commands>browser.createUserContext</dfn> command creates a [=user context=] in the user agent.
1826
1827
1827
1828
<dl>
1828
1829
<dt>Command Type</dt>
@@ -1850,7 +1851,7 @@ The <dfn export for=commands>browser.createUserContext</dfn> command creates a {
1850
1851
1851
1852
#### The browser.closeUserContext Command #### {#command-browser-closeUserContext}
1852
1853
1853
-
The <dfn export for=commands>browser.closeUserContext</dfn> command closes the userContext and all browsing contexts in it without running <code>beforeunload</code> handlers.
1854
+
The <dfn export for=commands>browser.closeUserContext</dfn> command closes a user context and all browsing contexts in it without running <code>beforeunload</code> handlers.
1854
1855
1855
1856
<dl>
1856
1857
<dt>Command Type</dt>
@@ -1880,7 +1881,7 @@ The <dfn export for=commands>browser.closeUserContext</dfn> command closes the u
1880
1881
1881
1882
#### The browser.getUserContexts Command #### {#command-browser-getUserContexts}
1882
1883
1883
-
The <dfn export for=commands>browser.getUserContexts</dfn> command returns a list of existing userContexts in the browser instance.
1884
+
The <dfn export for=commands>browser.getUserContexts</dfn> command returns a list of existing user contexts in the user agent.
1884
1885
1885
1886
<dl>
1886
1887
<dt>Command Type</dt>
@@ -1908,6 +1909,27 @@ The <dfn export for=commands>browser.getUserContexts</dfn> command returns a lis
1908
1909
1909
1910
<div algorithm="remote end steps for browser.getUserContexts">
1910
1911
1912
+
The [=remote end steps=] are:
1913
+
1914
+
1. Let |user contexts| be the result of implementation-specific steps to get [=user contexts=] from the user agent.
1915
+
1916
+
1. Let |user context info list| be an empty [=/list=].
1917
+
1918
+
1. For each |user context| in |user contexts|:
1919
+
1920
+
1. If the |user context| is the [=default user context=], continue.
1921
+
1922
+
1. Let |info| be a [=/map=] matching the <code>browser.UserContextInfo</code>
1923
+
production with the <code>userContext</code> field set to |user context|'s ID.
1924
+
1925
+
1. Append |info| to |user context info list|.
1926
+
1927
+
1. Let |result| be a [=/map=] matching the
1928
+
<code>browser.getUserContextsResult</code> production with the <code>userContexts</code>
1929
+
field set to |user context info list|.
1930
+
1931
+
1. Return [=success=] with data |result|.
1932
+
1911
1933
</div>
1912
1934
1913
1935
## The browsingContext Module ## {#module-browsingContext}
0 commit comments