Unverified Commit 091104f8 authored by Yegor's avatar Yegor Committed by GitHub

[web] stop using deprecated jsonwire web-driver protocol (#122560)

[web] stop using deprecated jsonwire web-driver protocol
parent e22e8f25
...@@ -983,9 +983,9 @@ targets: ...@@ -983,9 +983,9 @@ targets:
tags: > tags: >
["framework", "hostonly", "shard", "linux"] ["framework", "hostonly", "shard", "linux"]
runIf: runIf:
- dev/ - dev/**
- packages/ - packages/**
- bin/ - bin/**
- .ci.yaml - .ci.yaml
- name: Linux web_long_running_tests_2_5 - name: Linux web_long_running_tests_2_5
...@@ -1004,9 +1004,9 @@ targets: ...@@ -1004,9 +1004,9 @@ targets:
tags: > tags: >
["framework", "hostonly", "shard", "linux"] ["framework", "hostonly", "shard", "linux"]
runIf: runIf:
- dev/ - dev/**
- packages/ - packages/**
- bin/ - bin/**
- .ci.yaml - .ci.yaml
- name: Linux web_long_running_tests_3_5 - name: Linux web_long_running_tests_3_5
...@@ -1024,9 +1024,9 @@ targets: ...@@ -1024,9 +1024,9 @@ targets:
tags: > tags: >
["framework", "hostonly", "shard", "linux"] ["framework", "hostonly", "shard", "linux"]
runIf: runIf:
- dev/ - dev/**
- packages/ - packages/**
- bin/ - bin/**
- .ci.yaml - .ci.yaml
- name: Linux web_long_running_tests_4_5 - name: Linux web_long_running_tests_4_5
...@@ -1044,9 +1044,9 @@ targets: ...@@ -1044,9 +1044,9 @@ targets:
tags: > tags: >
["framework", "hostonly", "shard", "linux"] ["framework", "hostonly", "shard", "linux"]
runIf: runIf:
- dev/ - dev/**
- packages/ - packages/**
- bin/ - bin/**
- .ci.yaml - .ci.yaml
- name: Linux web_long_running_tests_5_5 - name: Linux web_long_running_tests_5_5
...@@ -1064,9 +1064,9 @@ targets: ...@@ -1064,9 +1064,9 @@ targets:
tags: > tags: >
["framework", "hostonly", "shard", "linux"] ["framework", "hostonly", "shard", "linux"]
runIf: runIf:
- dev/ - dev/**
- packages/ - packages/**
- bin/ - bin/**
- .ci.yaml - .ci.yaml
- name: Linux web_tests_0 - name: Linux web_tests_0
...@@ -1084,9 +1084,9 @@ targets: ...@@ -1084,9 +1084,9 @@ targets:
tags: > tags: >
["framework", "hostonly", "shard", "linux"] ["framework", "hostonly", "shard", "linux"]
runIf: runIf:
- dev/ - dev/**
- packages/ - packages/**
- bin/ - bin/**
- .ci.yaml - .ci.yaml
- name: Linux web_tests_1 - name: Linux web_tests_1
...@@ -1104,9 +1104,9 @@ targets: ...@@ -1104,9 +1104,9 @@ targets:
tags: > tags: >
["framework", "hostonly", "shard", "linux"] ["framework", "hostonly", "shard", "linux"]
runIf: runIf:
- dev/ - dev/**
- packages/ - packages/**
- bin/ - bin/**
- .ci.yaml - .ci.yaml
- name: Linux web_tests_2 - name: Linux web_tests_2
...@@ -1124,9 +1124,9 @@ targets: ...@@ -1124,9 +1124,9 @@ targets:
tags: > tags: >
["framework", "hostonly", "shard", "linux"] ["framework", "hostonly", "shard", "linux"]
runIf: runIf:
- dev/ - dev/**
- packages/ - packages/**
- bin/ - bin/**
- .ci.yaml - .ci.yaml
- name: Linux web_tests_3 - name: Linux web_tests_3
...@@ -1144,9 +1144,9 @@ targets: ...@@ -1144,9 +1144,9 @@ targets:
tags: > tags: >
["framework", "hostonly", "shard", "linux"] ["framework", "hostonly", "shard", "linux"]
runIf: runIf:
- dev/ - dev/**
- packages/ - packages/**
- bin/ - bin/**
- .ci.yaml - .ci.yaml
- name: Linux web_tests_4 - name: Linux web_tests_4
...@@ -1164,9 +1164,9 @@ targets: ...@@ -1164,9 +1164,9 @@ targets:
tags: > tags: >
["framework", "hostonly", "shard", "linux"] ["framework", "hostonly", "shard", "linux"]
runIf: runIf:
- dev/ - dev/**
- packages/ - packages/**
- bin/ - bin/**
- .ci.yaml - .ci.yaml
- name: Linux web_tests_5 - name: Linux web_tests_5
...@@ -1184,9 +1184,9 @@ targets: ...@@ -1184,9 +1184,9 @@ targets:
tags: > tags: >
["framework", "hostonly", "shard", "linux"] ["framework", "hostonly", "shard", "linux"]
runIf: runIf:
- dev/ - dev/**
- packages/ - packages/**
- bin/ - bin/**
- .ci.yaml - .ci.yaml
- name: Linux web_tests_6 - name: Linux web_tests_6
...@@ -1204,9 +1204,9 @@ targets: ...@@ -1204,9 +1204,9 @@ targets:
tags: > tags: >
["framework", "hostonly", "shard", "linux"] ["framework", "hostonly", "shard", "linux"]
runIf: runIf:
- dev/ - dev/**
- packages/ - packages/**
- bin/ - bin/**
- .ci.yaml - .ci.yaml
- name: Linux web_tests_7_last - name: Linux web_tests_7_last
...@@ -1224,9 +1224,9 @@ targets: ...@@ -1224,9 +1224,9 @@ targets:
tags: > tags: >
["framework", "hostonly", "shard", "linux"] ["framework", "hostonly", "shard", "linux"]
runIf: runIf:
- dev/ - dev/**
- packages/ - packages/**
- bin/ - bin/**
- .ci.yaml - .ci.yaml
- name: Linux web_canvaskit_tests_0 - name: Linux web_canvaskit_tests_0
...@@ -1244,9 +1244,10 @@ targets: ...@@ -1244,9 +1244,10 @@ targets:
tags: > tags: >
["framework", "hostonly", "shard", "linux"] ["framework", "hostonly", "shard", "linux"]
runIf: runIf:
- dev/ - dev/**
- packages/ - packages/**
- bin/ - bin/**
- .ci.yaml
- name: Linux web_canvaskit_tests_1 - name: Linux web_canvaskit_tests_1
recipe: flutter/flutter_drone recipe: flutter/flutter_drone
...@@ -1263,9 +1264,10 @@ targets: ...@@ -1263,9 +1264,10 @@ targets:
tags: > tags: >
["framework", "hostonly", "shard", "linux"] ["framework", "hostonly", "shard", "linux"]
runIf: runIf:
- dev/ - dev/**
- packages/ - packages/**
- bin/ - bin/**
- .ci.yaml
- name: Linux web_canvaskit_tests_2 - name: Linux web_canvaskit_tests_2
recipe: flutter/flutter_drone recipe: flutter/flutter_drone
...@@ -1282,9 +1284,10 @@ targets: ...@@ -1282,9 +1284,10 @@ targets:
tags: > tags: >
["framework", "hostonly", "shard", "linux"] ["framework", "hostonly", "shard", "linux"]
runIf: runIf:
- dev/ - dev/**
- packages/ - packages/**
- bin/ - bin/**
- .ci.yaml
- name: Linux web_canvaskit_tests_3 - name: Linux web_canvaskit_tests_3
recipe: flutter/flutter_drone recipe: flutter/flutter_drone
...@@ -1301,9 +1304,10 @@ targets: ...@@ -1301,9 +1304,10 @@ targets:
tags: > tags: >
["framework", "hostonly", "shard", "linux"] ["framework", "hostonly", "shard", "linux"]
runIf: runIf:
- dev/ - dev/**
- packages/ - packages/**
- bin/ - bin/**
- .ci.yaml
- name: Linux web_canvaskit_tests_4 - name: Linux web_canvaskit_tests_4
recipe: flutter/flutter_drone recipe: flutter/flutter_drone
...@@ -1320,9 +1324,10 @@ targets: ...@@ -1320,9 +1324,10 @@ targets:
tags: > tags: >
["framework", "hostonly", "shard", "linux"] ["framework", "hostonly", "shard", "linux"]
runIf: runIf:
- dev/ - dev/**
- packages/ - packages/**
- bin/ - bin/**
- .ci.yaml
- name: Linux web_canvaskit_tests_5 - name: Linux web_canvaskit_tests_5
recipe: flutter/flutter_drone recipe: flutter/flutter_drone
...@@ -1339,9 +1344,10 @@ targets: ...@@ -1339,9 +1344,10 @@ targets:
tags: > tags: >
["framework", "hostonly", "shard", "linux"] ["framework", "hostonly", "shard", "linux"]
runIf: runIf:
- dev/ - dev/**
- packages/ - packages/**
- bin/ - bin/**
- .ci.yaml
- name: Linux web_canvaskit_tests_6 - name: Linux web_canvaskit_tests_6
recipe: flutter/flutter_drone recipe: flutter/flutter_drone
...@@ -1358,9 +1364,10 @@ targets: ...@@ -1358,9 +1364,10 @@ targets:
tags: > tags: >
["framework", "hostonly", "shard", "linux"] ["framework", "hostonly", "shard", "linux"]
runIf: runIf:
- dev/ - dev/**
- packages/ - packages/**
- bin/ - bin/**
- .ci.yaml
- name: Linux web_canvaskit_tests_7_last - name: Linux web_canvaskit_tests_7_last
recipe: flutter/flutter_drone recipe: flutter/flutter_drone
...@@ -1377,9 +1384,10 @@ targets: ...@@ -1377,9 +1384,10 @@ targets:
tags: > tags: >
["framework", "hostonly", "shard", "linux"] ["framework", "hostonly", "shard", "linux"]
runIf: runIf:
- dev/ - dev/**
- packages/ - packages/**
- bin/ - bin/**
- .ci.yaml
- name: Linux web_tool_tests - name: Linux web_tool_tests
recipe: flutter/flutter_drone recipe: flutter/flutter_drone
...@@ -1397,9 +1405,9 @@ targets: ...@@ -1397,9 +1405,9 @@ targets:
tags: > tags: >
["framework", "hostonly", "shard", "linux"] ["framework", "hostonly", "shard", "linux"]
runIf: runIf:
- dev/ - dev/**
- packages/flutter_tools/ - packages/flutter_tools/**
- bin/ - bin/**
- .ci.yaml - .ci.yaml
- name: Linux_android analyzer_benchmark - name: Linux_android analyzer_benchmark
......
...@@ -277,7 +277,8 @@ class FlutterWebConnection { ...@@ -277,7 +277,8 @@ class FlutterWebConnection {
sessionId, sessionId,
json.decode(settings['session-capabilities'] as String) as Map<String, dynamic>, json.decode(settings['session-capabilities'] as String) as Map<String, dynamic>,
async_io.AsyncIoRequestClient(sessionUri.resolve('session/$sessionId/')), async_io.AsyncIoRequestClient(sessionUri.resolve('session/$sessionId/')),
_convertToSpec(settings['session-spec'].toString().toLowerCase())); async_io.WebDriverSpec.W3c,
);
if (settings['android-chrome-on-emulator'] == true) { if (settings['android-chrome-on-emulator'] == true) {
final Uri localUri = Uri.parse(url); final Uri localUri = Uri.parse(url);
// Converts to Android Emulator Uri. // Converts to Android Emulator Uri.
...@@ -361,14 +362,3 @@ Future<void> waitUntilExtensionInstalled(async_io.WebDriver driver, Duration? ti ...@@ -361,14 +362,3 @@ Future<void> waitUntilExtensionInstalled(async_io.WebDriver driver, Duration? ti
matcher: 'function', matcher: 'function',
timeout: timeout ?? const Duration(days: 365)); timeout: timeout ?? const Duration(days: 365));
} }
async_io.WebDriverSpec _convertToSpec(String specString) {
switch (specString.toLowerCase()) {
case 'webdriverspec.w3c':
return async_io.WebDriverSpec.W3c;
case 'webdriverspec.jsonwire':
return async_io.WebDriverSpec.JsonWire;
default:
return async_io.WebDriverSpec.Auto;
}
}
...@@ -257,10 +257,10 @@ Map<String, dynamic> getDesiredCapabilities( ...@@ -257,10 +257,10 @@ Map<String, dynamic> getDesiredCapabilities(
async_io.LogType.browser: 'INFO', async_io.LogType.browser: 'INFO',
async_io.LogType.performance: 'ALL', async_io.LogType.performance: 'ALL',
}, },
'chromeOptions': <String, dynamic>{ 'goog:chromeOptions': <String, dynamic>{
if (chromeBinary != null) if (chromeBinary != null)
'binary': chromeBinary, 'binary': chromeBinary,
'w3c': false, 'w3c': true,
'args': <String>[ 'args': <String>[
'--bwsi', '--bwsi',
'--disable-background-timer-throttling', '--disable-background-timer-throttling',
......
...@@ -43,8 +43,8 @@ void main() { ...@@ -43,8 +43,8 @@ void main() {
sync_io.LogType.browser: 'INFO', sync_io.LogType.browser: 'INFO',
sync_io.LogType.performance: 'ALL', sync_io.LogType.performance: 'ALL',
}, },
'chromeOptions': <String, dynamic>{ 'goog:chromeOptions': <String, dynamic>{
'w3c': false, 'w3c': true,
'args': <String>[ 'args': <String>[
...kChromeArgs, ...kChromeArgs,
'--headless', '--headless',
...@@ -70,9 +70,9 @@ void main() { ...@@ -70,9 +70,9 @@ void main() {
sync_io.LogType.browser: 'INFO', sync_io.LogType.browser: 'INFO',
sync_io.LogType.performance: 'ALL', sync_io.LogType.performance: 'ALL',
}, },
'chromeOptions': <String, dynamic>{ 'goog:chromeOptions': <String, dynamic>{
'binary': chromeBinary, 'binary': chromeBinary,
'w3c': false, 'w3c': true,
'args': kChromeArgs, 'args': kChromeArgs,
'perfLoggingPrefs': <String, String>{ 'perfLoggingPrefs': <String, String>{
'traceCategories': 'traceCategories':
...@@ -100,8 +100,8 @@ void main() { ...@@ -100,8 +100,8 @@ void main() {
sync_io.LogType.browser: 'INFO', sync_io.LogType.browser: 'INFO',
sync_io.LogType.performance: 'ALL', sync_io.LogType.performance: 'ALL',
}, },
'chromeOptions': <String, dynamic>{ 'goog:chromeOptions': <String, dynamic>{
'w3c': false, 'w3c': true,
'args': <String>[ 'args': <String>[
...kChromeArgs, ...kChromeArgs,
'--autoplay-policy=no-user-gesture-required', '--autoplay-policy=no-user-gesture-required',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment