From e0d841e33967cc4e41913faa91d9603ae8d45475 Mon Sep 17 00:00:00 2001 From: Francois Daoust Date: Thu, 16 Jan 2025 22:23:28 +0100 Subject: [PATCH] Rebase WebDriver BiDi test --- tests/github/w3c/webdriver-bidi/index.html | 290 ++++++++++++++++----- 1 file changed, 222 insertions(+), 68 deletions(-) diff --git a/tests/github/w3c/webdriver-bidi/index.html b/tests/github/w3c/webdriver-bidi/index.html index cc6a126c52..5a4a41325a 100644 --- a/tests/github/w3c/webdriver-bidi/index.html +++ b/tests/github/w3c/webdriver-bidi/index.html @@ -797,7 +797,7 @@

Remote end definition

Command = {
-  id: uint,
+  id: uint,
   CommandData,
   *text => any,
 }
@@ -817,16 +817,16 @@ 

CommandResponse = { - id: uint, - result: ResultData, + id: uint, + result: ResultData, *text => any } ErrorResponse = { - id: uint / null, - error: "unknown error" / "unknown method" / "invalid argument", - message: text, - ?stacktrace: text, + id: uint / null, + error: "unknown error" / "unknown method" / "invalid argument", + message: text, + ?stacktrace: text, *text => any } @@ -1942,15 +1942,15 @@
Command Type
SessionStatusCommand = {
-  method: "session.status",
-  params: EmptyParams,
+  method: "session.status",
+  params: EmptyParams,
 }
 
Return Type
SessionStatusResult = {
-  ready: bool,
-  message: text,
+  ready: bool,
+  message: text,
 }
 
@@ -1976,13 +1976,13 @@
Command Type
SessionSubscribeCommand = {
-  method: "session.subscribe",
-  params: SubscribeParameters
+  method: "session.subscribe",
+  params: SubscribeParameters
 }
 
 SessionSubscribeParameters = {
-  events: [*text],
-  ?contexts: [*BrowsingContext],
+  events: [*text],
+  ?contexts: [*BrowsingContext],
 }
 
Return Type @@ -2044,8 +2044,8 @@
SessionUnsubscribeCommand = { - method: "session.unsubscribe", - params: SubscribeParameters + method: "session.unsubscribe", + params: SubscribeParameters }

Return Type @@ -2110,10 +2110,10 @@
BrowsingContextInfoList = [* BrowsingContextInfo] BrowsingContextInfo = { - context: BrowsingContext, - ?parent: BrowsingContext / null, - url: text, - children: BrowsingContextInfoList / null + context: BrowsingContext, + ?parent: BrowsingContext / null, + url: text, + children: BrowsingContextInfoList / null } @@ -2172,19 +2172,19 @@
BrowsingContextGetTreeCommand = { - method: "browsingContext.getTree", - params: BrowsingContextGetTreeParameters + method: "browsingContext.getTree", + params: BrowsingContextGetTreeParameters } BrowsingContextGetTreeParameters = { - ?maxDepth: uint, - ?parent: BrowsingContext, + ?maxDepth: uint, + ?parent: BrowsingContext, }
Return Type
BrowsingContextGetTreeResult = {
-  contexts: BrowsingContextInfoList
+  contexts: BrowsingContextInfoList
 }
 
@@ -2213,8 +2213,8 @@
BrowsingContextCreatedEvent = { - method: "browsingContext.contextCreated", - params: BrowsingContextInfo + method: "browsingContext.contextCreated", + params: BrowsingContextInfo } @@ -2270,8 +2270,8 @@
BrowsingContextDestroyedEvent = { - method: "browsingContext.contextDestroyed", - params: BrowsingContextInfo + method: "browsingContext.contextDestroyed", + params: BrowsingContextInfo } @@ -2325,12 +2325,12 @@
6.3.2.2. The script.RealmInfo type

Local end definition

RealmInfo = {
-  realm: Realm,
-  type: RealmType,
-  origin: text
+  realm: Realm,
+  type: RealmType,
+  origin: text
 }
 
-RealmType = "window" / "dedicated-worker" / "shared-worker" / "service-worker" / "worker" / "paint-worklet" / "audio-worklet" / "worklet" / text
+RealmType = "window" / "dedicated-worker" / "shared-worker" / "service-worker" / "worker" / "paint-worklet" / "audio-worklet" / "worklet" / text
 

The RealmInfo type represents the properties of a realm.

@@ -2422,13 +2422,13 @@
<
Command Type
ScriptGetRealmsCommand = {
-  method: "script.getRealms",
-  params: GetRealmsParameters
+  method: "script.getRealms",
+  params: GetRealmsParameters
 }
 
 GetRealmsParameters = {
-  ?context: BrowsingContext,
-  ?type: RealmType,
+  ?context: BrowsingContext,
+  ?type: RealmType,
 }
 
Return Type @@ -2436,7 +2436,7 @@
<
RealmInfoList = [* RealmInfo]
 
 ScriptGetRealmsResult = {
-  realms: RealmInfoList
+  realms: RealmInfoList
 }
 
@@ -2500,8 +2500,8 @@
Event Type
ScriptRealmCreatedEvent = {
-  method: "script.realmCreated",
-  params: RealmInfo
+  method: "script.realmCreated",
+  params: RealmInfo
 }
 
@@ -2558,12 +2558,12 @@
RealmDestroyedParameters = { - realm: Realm + realm: Realm } ScriptRealmDestroyedEvent = { - method: "script.realmDestoyed", - params: RealmDestroyedParameters + method: "script.realmDestoyed", + params: RealmDestroyedParameters } @@ -2674,7 +2674,7 @@

6.4.2. Types

6.4.2.1. log.LogEntry
-
LogLevel = "debug" / "info" / "warning" / "error"
+
LogLevel = "debug" / "info" / "warning" / "error"
 
 LogEntry = (
   GenericLogEntry //
@@ -2683,28 +2683,28 @@ 
BaseLogEntry = { - level: LogLevel, - text: text / null, - timestamp: int, - ?stackTrace: [*StackFrame], + level: LogLevel, + text: text / null, + timestamp: int, + ?stackTrace: [*StackFrame], } GenericLogEntry = { BaseLogEntry, - type: text, + type: text, } ConsoleLogEntry = { BaseLogEntry, - type: "console", - method: text, - realm: Realm, - args: [*RemoteValue], + type: "console", + method: text, + realm: Realm, + args: [*RemoteValue], } JavascriptLogEntry = { BaseLogEntry, - type: "javascript", + type: "javascript", }
@@ -2714,10 +2714,10 @@
6.4.2.2. log.StackFrame
StackFrame = {
-  url: text,
-  functionName: text,
-  lineNumber: int,
-  columnNumber: int,
+  url: text,
+  functionName: text,
+  lineNumber: int,
+  columnNumber: int,
 }
 
 
@@ -2757,8 +2757,8 @@
Event Type
LogEntryAddedEvent = {
-  method: "log.entryAdded",
-  params: LogEntry,
+  method: "log.entryAdded",
+  params: LogEntry,
 }
 
@@ -2921,20 +2921,29 @@

Index

Terms defined by this specification