0

Import wpt@ec2e2302a4b28cd75581d22a32873464832a131b

6b05ee8e3...ec2e2302a

Using wpt-import in Chromium 2a3f4d9c5d.

Note to gardeners: This CL imports external tests and adds expectations
for those tests; if this CL is large and causes a few new failures,
please fix the failures by adding new lines to TestExpectations rather
than reverting. See:
https://chromium.googlesource.com/chromium/src/+/main/docs/testing/web_platform_tests.md

Directory owners for changes in this CL:
drott@chromium.org, kojii@chromium.org:
  external/wpt/css/css-fonts
jsbell@chromium.org:
  external/wpt/resources

NOAUTOREVERT=true

No-Export: true
Cq-Include-Trybots: luci.chromium.try:linux-blink-rel
Change-Id: I810142ea3acd082f9dc76d508422ab302f34a944
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6361734
Auto-Submit: WPT Autoroller <wpt-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Reviewed-by: Jonathan Lee <jonathanjlee@google.com>
Reviewed-by: Weizhong Xia <weizhong@google.com>
Commit-Queue: Jonathan Lee <jonathanjlee@google.com>
Cr-Commit-Position: refs/heads/main@{#1433695}
This commit is contained in:
Chromium WPT Sync
2025-03-17 12:21:07 -07:00
committed by Chromium LUCI CQ
parent dc98f1fcb8
commit d8be95cef8
89 changed files with 892 additions and 180 deletions
third_party/blink/web_tests
TestExpectations
external
WPT_BASE_MANIFEST_8.json
wpt
css
css-fonts
font-face-sign-function.htmlfont-face-stretch-auto-static-ref.htmlfont-face-stretch-auto-static.htmlfont-face-style-auto-static-ref.htmlfont-face-style-auto-static.htmlfont-face-weight-auto-static-ref.htmlfont-face-weight-auto-static.htmlfont-feature-resolution-001-ref.htmlfont-feature-resolution-001.htmlfont-feature-resolution-002-ref.htmlfont-feature-resolution-002.htmlfont-synthesis-01-ref.htmlfont-synthesis-01.htmlfont-synthesis-02-ref.htmlfont-synthesis-02.htmlfont-synthesis-03-ref.htmlfont-synthesis-03.htmlfont-synthesis-04-ref.htmlfont-synthesis-04.htmlfont-synthesis-05-ref.htmlfont-synthesis-05.htmlfont-synthesis-07-ref.htmlfont-synthesis-07.htmlfont-synthesis-08-ref.htmlfont-synthesis-08.htmlfont-synthesis-position-001-ref.htmlfont-synthesis-position-001.htmlfont-synthesis-small-caps-first-letter-ref.htmlfont-synthesis-small-caps-first-letter.htmlfont-synthesis-small-caps-first-line-ref.htmlfont-synthesis-small-caps-first-line.htmlfont-synthesis-small-caps-ref.htmlfont-synthesis-small-caps.htmlfont-synthesis-style-first-letter-ref.htmlfont-synthesis-style-first-letter.htmlfont-synthesis-style-first-line-ref.htmlfont-synthesis-style-first-line.htmlfont-synthesis-style-ref.htmlfont-synthesis-style.htmlfont-synthesis-weight-first-letter-ref.htmlfont-synthesis-weight-first-letter.htmlfont-synthesis-weight-first-line-ref.htmlfont-synthesis-weight-first-line.htmlfont-synthesis-weight-ref.htmlfont-synthesis-weight.htmlfont-variant-position-04-notref.htmlfont-variant-position-04.htmlfont-variant-position-05-notref.htmlfont-variant-position-05.htmllang-attribute-affects-rendering-of-second-text-run-ref.htmllang-attribute-affects-rendering-of-second-text-run.htmllang-attribute-affects-rendering-ref.htmllang-attribute-affects-rendering.html
css-text
css-values
html
resources
webdriver
tests
bidi
browsing_context
integration
script
add_preload_script
session
platform
linux
external

@ -2619,6 +2619,25 @@ crbug.com/383880384 [ Win ] external/wpt/css/css-properties-values-api/registere
[ Linux ] external/wpt/webdriver/tests/bidi/network/continue_response/cookies.py [ Pass Timeout ]
# ====== New tests from wpt-importer added here ======
external/wpt/css/css-fonts/font-synthesis-01.html [ Failure ]
external/wpt/css/css-fonts/font-synthesis-02.html [ Failure ]
external/wpt/css/css-fonts/font-synthesis-03.html [ Failure ]
external/wpt/css/css-fonts/font-synthesis-04.html [ Failure ]
[ Win ] external/wpt/css/css-fonts/font-synthesis-07.html [ Failure ]
external/wpt/css/css-fonts/font-synthesis-08.html [ Failure ]
[ Win ] external/wpt/css/css-fonts/font-synthesis-small-caps-first-letter.html [ Failure ]
[ Win ] external/wpt/css/css-fonts/font-synthesis-small-caps-first-line.html [ Failure ]
[ Win ] external/wpt/css/css-fonts/font-synthesis-small-caps.html [ Failure ]
external/wpt/css/css-fonts/font-synthesis-style-first-letter.html [ Failure ]
external/wpt/css/css-fonts/font-synthesis-style-first-line.html [ Failure ]
external/wpt/css/css-fonts/font-synthesis-style.html [ Failure ]
external/wpt/css/css-fonts/font-synthesis-weight-first-letter.html [ Failure ]
external/wpt/css/css-fonts/font-synthesis-weight-first-line.html [ Failure ]
external/wpt/css/css-fonts/font-synthesis-weight.html [ Failure ]
external/wpt/css/css-fonts/lang-attribute-affects-rendering-of-second-text-run.html [ Failure ]
external/wpt/css/css-fonts/lang-attribute-affects-rendering.html [ Failure ]
external/wpt/html/canvas/offscreen/manual/text/canvas.2d.offscreen.worker.lang.html [ Timeout ]
external/wpt/html/canvas/offscreen/manual/text/canvas.2d.offscreen.worker.lang.inherit.html [ Timeout ]
crbug.com/403967924 [ Linux ] external/wpt/css/css-ui/caret-eol-001.html [ Failure ]
crbug.com/403967924 [ Win ] external/wpt/css/css-ui/caret-eol-001.html [ Failure ]
crbug.com/403967924 [ Linux ] external/wpt/css/css-ui/caret-eol-002.html [ Failure ]
@ -3468,8 +3487,7 @@ crbug.com/626703 external/wpt/css/css-fonts/rch-in-monospace.html [ Failure ]
crbug.com/626703 external/wpt/css/css-fonts/ric-in-monospace.html [ Failure ]
crbug.com/626703 external/wpt/css/css-text/text-transform/text-transform-full-size-kana-008.html [ Failure ]
crbug.com/626703 external/wpt/css/css-fonts/font-synthesis-position-001.html [ Failure ]
crbug.com/626703 [ Linux ] external/wpt/css/css-fonts/font-variant-position-04.html [ Failure ]
crbug.com/626703 [ Win ] external/wpt/css/css-fonts/font-variant-position-04.html [ Failure ]
crbug.com/626703 external/wpt/css/css-fonts/font-variant-position-04.html [ Failure ]
crbug.com/626703 external/wpt/css/css-fonts/font-variant-position-05.html [ Failure ]
crbug.com/626703 external/wpt/css/selectors/selectors-4/lang-017.html [ Failure ]
crbug.com/626703 external/wpt/css/selectors/selectors-4/lang-018.html [ Failure ]

@ -4115,6 +4115,13 @@
{}
]
],
"column-scroll-marker-015-crash.html": [
"f7d94832d1404f55f6553e30d8bbf5aebcc293db",
[
null,
{}
]
],
"column-scroll-marker-no-content-crash.html": [
"12879ec6f2f756bd17cdc7591d1dfb8f1cd25384",
[
@ -128195,7 +128202,7 @@
]
],
"font-face-sign-function.html": [
"28c958c7ee704c1fa35ce838b29d9b766270862c",
"aee8fff0882603f9513633d578cfcb8ccfe3327a",
[
null,
[
@ -128208,7 +128215,7 @@
]
],
"font-face-stretch-auto-static.html": [
"ce3c94fa2feb25483d44883cb5a883d74fea641b",
"fb87ca9a278a767400792a7734f2c9a944e14aa6",
[
null,
[
@ -128247,7 +128254,7 @@
]
],
"font-face-style-auto-static.html": [
"8c8cae3e91936d74e495f8e0a094524a53f2dcbe",
"b0d902018aaf60800204db581fc4cf167cbadc8f",
[
null,
[
@ -128312,7 +128319,7 @@
]
],
"font-face-weight-auto-static.html": [
"af84d4b1f1a91417225c955c98bdb746b665aea8",
"1d2a82b9a39206c5c7bbfc3e1f5e76849f36f176",
[
null,
[
@ -128676,7 +128683,7 @@
]
],
"font-feature-resolution-001.html": [
"45f316af5c9c90e460cd11965e19f2f04a1b5b4e",
"ed74a5ae161c2eb46fcff989e35db602c76fd89a",
[
null,
[
@ -128689,7 +128696,7 @@
]
],
"font-feature-resolution-002.html": [
"05cc4db7464853c35548a924ea7c132e31b56f52",
"fe54f423f69769196d7d19e076cddd49b8801445",
[
null,
[
@ -130067,7 +130074,7 @@
]
],
"font-synthesis-01.html": [
"cf6d099e0ddc303b5f27cc37b0bc31874f14dd9c",
"bac811f267a03f0a496a6dafdb79f48e0015f7c7",
[
null,
[
@ -130080,7 +130087,7 @@
]
],
"font-synthesis-02.html": [
"59243c4cb7a8ad36cbfe68e29326e14f2faa4a5f",
"f27e0230057cead27ab74562043c3a2f1fe5e38f",
[
null,
[
@ -130093,7 +130100,7 @@
]
],
"font-synthesis-03.html": [
"53cac8ee4019b47ae23c4485cd0d213c9d6d2cdc",
"bec84b853822466626b7af7398fca7fc65a479d0",
[
null,
[
@ -130106,7 +130113,7 @@
]
],
"font-synthesis-04.html": [
"908171546927819e643d257fe8c44e6256bbd2e7",
"d281df4d34680de4930ec8c283fc82c49029f119",
[
null,
[
@ -130119,7 +130126,7 @@
]
],
"font-synthesis-05.html": [
"e521e6c67cf2c69d32c31bab763ca9a644bc7766",
"4f630a6a4cc080e185fefc8b7fbe24acea33e9e8",
[
null,
[
@ -130145,7 +130152,7 @@
]
],
"font-synthesis-07.html": [
"8f8572412df46c92aecf98092dcd65a47e4abb75",
"68d21ae642e0eeba5da263962cc3c7bba0255cf4",
[
null,
[
@ -130158,7 +130165,7 @@
]
],
"font-synthesis-08.html": [
"b3de1afcaee681b7e79969b325fc6bf98de4ec1c",
"5f61f81322237d0ba3ad2addbb940aae2b299c8b",
[
null,
[
@ -130171,7 +130178,7 @@
]
],
"font-synthesis-position-001.html": [
"1ed13f67c1950f3abf4b599c2b58ad1b0db3d169",
"9cd57e2a02db9e090fdca654eef9b66c4327881e",
[
null,
[
@ -130184,7 +130191,7 @@
]
],
"font-synthesis-small-caps-first-letter.html": [
"9e31777c73af5763c8c093fd6820becab033fe2a",
"97c5386091fd77624c526b3c0de0ab3be70e12ae",
[
null,
[
@ -130197,7 +130204,7 @@
]
],
"font-synthesis-small-caps-first-line.html": [
"77d66e58d8a8a3a58ccb352fad6ce9c71e3297a2",
"b11fa4b7b2681a9d76aa50c7478c099501bf4976",
[
null,
[
@ -130223,7 +130230,7 @@
]
],
"font-synthesis-small-caps.html": [
"953ebf5a3a3bf5d69a6ecfd3480b09a07410beb5",
"8b63ffbee4fb938df81b489f74c13e9f9e8ecdd0",
[
null,
[
@ -130249,7 +130256,7 @@
]
],
"font-synthesis-style-first-letter.html": [
"1296baf05f9c430cda6c52e5a63e813c79862b9a",
"2c8a531116af35b4733947951b5cdfacd360df6a",
[
null,
[
@ -130262,7 +130269,7 @@
]
],
"font-synthesis-style-first-line.html": [
"147c8eb7ff85a5af873e03aaba297e09909e418e",
"6a378b334b7fac486d402fc155e6544265aaa9b5",
[
null,
[
@ -130288,7 +130295,7 @@
]
],
"font-synthesis-style.html": [
"2970e377ed408c765a0f097286eea9fcb00624dc",
"5adf6272f36cf9e8ecf948b6ca60326b3c16e89c",
[
null,
[
@ -130314,7 +130321,7 @@
]
],
"font-synthesis-weight-first-letter.html": [
"3d60b2a22847e1b99f1ee53d27c231a41bbc60da",
"a169ffac623fb7625087f00b253d812a9e07ea97",
[
null,
[
@ -130327,7 +130334,7 @@
]
],
"font-synthesis-weight-first-line.html": [
"5093a9e17b667bb7995cc1f9d234439cf76e76e6",
"a850b333f3ad37a0311fb6ba703096b98e4c367b",
[
null,
[
@ -130340,7 +130347,7 @@
]
],
"font-synthesis-weight.html": [
"6213817edf6052fddbd63c63b820edd307fcfee9",
"a11895e90cddfbd782da04acb0f5e30b50b09e5a",
[
null,
[
@ -131289,7 +131296,7 @@
]
],
"font-variant-position-04.html": [
"de1cbd8779509a602be2032adbd27ce478ee0077",
"72b3b3d887567b6e83e1ba0a37234b7d5f5c689f",
[
null,
[
@ -131302,7 +131309,7 @@
]
],
"font-variant-position-05.html": [
"f93cb9861732768b5c2ebaacb43be00992d931c2",
"1a81b9bd8edd0e027cd3f3aea30fbe83fccf0901",
[
null,
[
@ -131393,7 +131400,7 @@
]
],
"lang-attribute-affects-rendering-of-second-text-run.html": [
"296468719c95b4f58b853657cc6a66c3827750d6",
"1e280b26498e25cf8bf78434a7df85dfd4b1c964",
[
null,
[
@ -131406,7 +131413,7 @@
]
],
"lang-attribute-affects-rendering.html": [
"041fd8f5abdc1524b585673e919de83126efe49a",
"98282f7148f26591704eb6e047c3b869b1d6005f",
[
null,
[
@ -206650,7 +206657,7 @@
]
],
"text-autospace-ligature-001.html": [
"d9acc35626c7111312a1dd83655b34885999bd97",
"f7ea716cc154ba6ce9a207752fe17beb95d9bb18",
[
null,
[
@ -284753,7 +284760,7 @@
]
],
"canvas.2d.lang.dynamic.html": [
"b6bf559c1f985b3352f50739745b12037473227d",
"225fcaa7ba19ddb4311d994760e262892a8f98fe",
[
null,
[
@ -284766,7 +284773,7 @@
]
],
"canvas.2d.lang.empty.canvas.html": [
"d4495194397f809d46771b888fda22b33fbd7fa1",
"099081de379890e28efd18b29f395cf780e3ce37",
[
null,
[
@ -284779,7 +284786,7 @@
]
],
"canvas.2d.lang.html": [
"41e146cf75bb8a212f6ba19a9393096e5ff57d04",
"b8fca4dd5e72b95c6a47d61b2bb3d895cc4ddb8d",
[
null,
[
@ -284792,7 +284799,7 @@
]
],
"canvas.2d.lang.inherit.disconnected.canvas.html": [
"dee7326d2449b275981d2cc02a9af6f8874f55d5",
"0af5f20d6f5d21a0e79122d4ef76c0535a75654a",
[
null,
[
@ -284805,7 +284812,7 @@
]
],
"canvas.2d.lang.inherit.disconnected.canvas.no.lang.html": [
"e16b5c50307b5809b09299ec7be964d2df0e6728",
"6b06ae5df960c0ffe240894dce5c50461db65fc9",
[
null,
[
@ -284818,7 +284825,7 @@
]
],
"canvas.2d.lang.inherit.html": [
"41da3d5c442539a4f771790f9bf8fe362dd1d412",
"845880f20d86c45983caf0cd839583d07082cedf",
[
null,
[
@ -288418,7 +288425,7 @@
]
],
"canvas.2d.offscreen.lang.html": [
"1d34794f75d8e69e80694b6645e75fc07a523cef",
"c3c6b36901d39d18689930171fdef69947870bd0",
[
null,
[
@ -288431,7 +288438,7 @@
]
],
"canvas.2d.offscreen.lang.inherit.html": [
"8916c5910825147ecf6afc6e4f53b603934d58cb",
"63b6854cd780b9a93f3bdcab8b7418b96e3f0422",
[
null,
[
@ -288470,7 +288477,7 @@
]
],
"canvas.2d.offscreen.transferred.lang.html": [
"051d21ca7f5e7fb04db1c95a5d6672f22eea6aec",
"06c0db121d0b213d23a8f03b3aae6c39e168de0b",
[
null,
[
@ -288483,7 +288490,7 @@
]
],
"canvas.2d.offscreen.transferred.lang.inherit.document.html": [
"243392874a2e9cdb2f27f104265a4d18f9125b5a",
"a7561ddd855649790f437922daed20d22bac9a08",
[
null,
[
@ -288496,7 +288503,7 @@
]
],
"canvas.2d.offscreen.transferred.lang.inherit.html": [
"ffd0ae4aae57d2397c57cf04ea855d21c1b9d848",
"72aab773a5e9dc85e32625a4b66dd227d1a292ef",
[
null,
[
@ -337196,7 +337203,7 @@
[]
],
"font-face-stretch-auto-static-ref.html": [
"5b3c4477332a127234b43993af3a31658c439c72",
"cbafc4850d74303a88ee88bb3ef131ea68322dee",
[]
],
"font-face-stretch-auto-variable-ref.html": [
@ -337208,7 +337215,7 @@
[]
],
"font-face-style-auto-static-ref.html": [
"375a6d4e3e8d101df194afea937066120912b942",
"aea71f63d7385f956766a63596bc56207d71e778",
[]
],
"font-face-style-auto-variable-ref.html": [
@ -337232,7 +337239,7 @@
[]
],
"font-face-weight-auto-static-ref.html": [
"34772a941884a60846ef78733c7c9169459f8028",
"ca0f9b568c2c120568b9a5b45ab0a56cf4bb8367",
[]
],
"font-face-weight-auto-variable-ref.html": [
@ -337272,11 +337279,11 @@
[]
],
"font-feature-resolution-001-ref.html": [
"261b93f5dbadbf95f50e2582cebb9d42e92c201c",
"3a2a6515cb713702b867427d183d994167b82d8e",
[]
],
"font-feature-resolution-002-ref.html": [
"99084224149f42e81341b8248cb88137af64b103",
"5bf3e2cefc0e70a4731ff04def40a070c75da6e1",
[]
],
"font-feature-settings-descriptor-01-ref.html": [
@ -337568,23 +337575,23 @@
[]
],
"font-synthesis-01-ref.html": [
"535518272a04c2e11cf945f40c1b7321215e3ba3",
"9992466cff60e93ab1e47088f2d1c2792f0899df",
[]
],
"font-synthesis-02-ref.html": [
"5f80bcdf5a56ebf449e72f570a1154ce1aa6d3db",
"c0e446a76ab64b382d77cd584f823bd863dbf70b",
[]
],
"font-synthesis-03-ref.html": [
"8f36b311177a92bd4b6d4704217a8b854d170cb7",
"f77f75ef1601909594b82c8786b2a97ba9b139a3",
[]
],
"font-synthesis-04-ref.html": [
"f3b65481f226c92923d686bdcb7005586a2a3149",
"810889a52b9fd9831f099df7e11885c773cfeacb",
[]
],
"font-synthesis-05-ref.html": [
"801889d15605537143852ea57f17adc7c94e7e6b",
"1710440333668a459ee98622bfcbe469a6e425dd",
[]
],
"font-synthesis-06-ref.html": [
@ -337592,23 +337599,23 @@
[]
],
"font-synthesis-07-ref.html": [
"428c8c401856627c81bc7d03663317fd76bbf08b",
"d0746cd2f6c3cf1d0df5725f30d0b99ede42b2b4",
[]
],
"font-synthesis-08-ref.html": [
"39cd4558d98b1fcdbc78968dff477c44d7f0fa94",
"012c9dc89db63553f8e8f645c45b0ed382a60880",
[]
],
"font-synthesis-position-001-ref.html": [
"228dc652f29d0cd1d73f0d88b8d970699070191e",
"145714605c572129742f19d41c7ff8ed0b6a4e51",
[]
],
"font-synthesis-small-caps-first-letter-ref.html": [
"8f66b7b298a7c247b6848527ac0fec1ee0de8286",
"5277489ce830e16cc0c7923600d98c1d197d4eb2",
[]
],
"font-synthesis-small-caps-first-line-ref.html": [
"121f9412fb2e3768f6a24cf27347519b779bbcf2",
"718012d48cd66b6ee9d442255dbb0e03cd403ca3",
[]
],
"font-synthesis-small-caps-not-applied-ref.html": [
@ -337616,7 +337623,7 @@
[]
],
"font-synthesis-small-caps-ref.html": [
"6851d552674fe495f692e3a510e4aff4927c8f37",
"f2b8044d72646e7466d7973fc3083046ae60c783",
[]
],
"font-synthesis-style-binary-ref.html": [
@ -337624,11 +337631,11 @@
[]
],
"font-synthesis-style-first-letter-ref.html": [
"c4f9b175de79052ad0f29df3be07a33c1072f245",
"ef325ce6ef377e8e211db90e2d625f9e74dc191f",
[]
],
"font-synthesis-style-first-line-ref.html": [
"bef793609e6841b04b9f8b201d6881e2f8424d37",
"bcea0fcb0629298482ae008a2891787d2728dc80",
[]
],
"font-synthesis-style-oblique-only-ref.html": [
@ -337636,7 +337643,7 @@
[]
],
"font-synthesis-style-ref.html": [
"969572344a549eaa0a7b1b9b22b22c3e0e7c03ce",
"a6256884c54ae69518ad2f7e9ed54dedad1fe39c",
[]
],
"font-synthesis-weight-binary-ref.html": [
@ -337644,15 +337651,15 @@
[]
],
"font-synthesis-weight-first-letter-ref.html": [
"fd29f4134d67d22b6e344dcc7ec8315a32dac2e5",
"108394f780f4a83a7fbf19daa1a464ffc4a31b1b",
[]
],
"font-synthesis-weight-first-line-ref.html": [
"b92bd2c9801d8c8711b4c5fd54a68432dd1ef366",
"feffe6d39348006db93e812a9e661675b09e4b79",
[]
],
"font-synthesis-weight-ref.html": [
"8d5e3f6e08bcfeff2470b09a8c6cc2d069e08165",
"89bd3ae55df786b8fdee7d2490aac312656ae5e8",
[]
],
"font-variant-01-ref.html": [
@ -337948,11 +337955,11 @@
[]
],
"font-variant-position-04-notref.html": [
"5bfe6db4331e861c0dbb090161105ea149d3831e",
"6445f79d657294c42bbff73ce74cefeea7fd5215",
[]
],
"font-variant-position-05-notref.html": [
"a79c7b83a77f67e098721e7194a26dd297b6c246",
"b874462215a654cb0b1732d402979bec6b3635b6",
[]
],
"font-variant-position-ref.html": [
@ -337992,11 +337999,11 @@
[]
],
"lang-attribute-affects-rendering-of-second-text-run-ref.html": [
"7d2f4e7129fd5b42bf971e074c7cfec51209e6a3",
"3f8b9f541196807a401b7e53e84b9b72e872a5c7",
[]
],
"lang-attribute-affects-rendering-ref.html": [
"f832a1ef61fe39141c9566f1d76d52161607d83d",
"d84eb87164b3d00a05f05e9ff41fd9c51cc2a0e0",
[]
],
"line-gap-override-ref.html": [
@ -360839,7 +360846,7 @@
[]
],
"text-autospace-ligature-001-ref.html": [
"286cdfc104bd33bde6ff7e0ddbdde3add113b91e",
"8cae2c0ec71c35dc654d5a4192435611a95c8658",
[]
],
"text-autospace-no-001-mismatch-ref.html": [
@ -388859,19 +388866,19 @@
[]
],
"canvas.2d.lang-ref.html": [
"0822e6dce16c9c350be4683a0660399c3d06bc47",
"6bb9238a74a287c88dd7846aa98cbfdd3e2d611f",
[]
],
"canvas.2d.lang.dynamic-ref.html": [
"380162b35660a8c98de294d40abf1325f1d7f3ad",
"177bddb1794ef440663d90f75b204360e05dc100",
[]
],
"canvas.2d.lang.empty-ref.html": [
"580d9dac442a9c3ae80a773b698c03df8d8c7217",
"258ebf6298e164ad4edf9f6171f1ff17ac1991d2",
[]
],
"canvas.2d.unknown.lang-ref.html": [
"89a2c92af0945b1b23395e59da15bd96e060d673",
"9d12ba0d695b39bca17b3fec88b1eb2d14c890c1",
[]
],
"canvas_text_font_001-ref.htm": [
@ -389943,7 +389950,7 @@
[]
],
"canvas.2d.offscreen.lang-ref.html": [
"0e54d6a8e2bce7df8f8b8dca1c1c606f7623123a",
"51eff356b8e6fd2742cc4da82ba015383f8f0a1a",
[]
],
"canvas.2d.offscreen.worker.direction-ref.html": [
@ -389951,7 +389958,7 @@
[]
],
"canvas.2d.offscreen.worker.lang-ref.html": [
"551a092b234c3af14ca246434d8a40c111b56fbb",
"35c87f8c69e2ad0983e8838fdcf00b2b13ca9da7",
[]
],
"text-direction-worker-inherit.js": [
@ -389963,15 +389970,15 @@
[]
],
"text-lang-worker-en.js": [
"08958811348cde24e0a7052e6b0a78317815b82e",
"12e231a6d6a6a9953851f22fb3ca296d283ab9c9",
[]
],
"text-lang-worker-inherit.js": [
"6bc3371faf27022dbaaa6e99988e6590e112b19f",
"7be7f1f41f0b644ddec658c304449f4d6cd9909a",
[]
],
"text-lang-worker-tr.js": [
"5cf708a4a022e29107d65d02a0fe680f77e59db8",
"047b06d692106a35c34b14fcef23a83d87d2ebb3",
[]
]
},
@ -395385,7 +395392,7 @@
]
},
"structured-cloning-error-stack-optional.sub.window-expected.txt": [
"d75d1a12f318769ac692eb96a8c0994b6d48cc2a",
"5ee103430e26521f558b3cf9d7f81520c052e9de",
[]
]
},
@ -414855,7 +414862,7 @@
[]
],
"testharness.js": [
"5b5410c8b2198e384a73f996d2d86c07c8fc747d",
"bd668be20f87c8ac8f802f556a2b0d4813b60bd7",
[]
],
"testharness.js.headers": [
@ -520909,7 +520916,7 @@
]
],
"clamp-length-serialize.html": [
"987d028ee87126d98328cbaef12b1c0b504a1a71",
"91560d7899d4b01f4493610d9aa7c1db0cdd97f4",
[
null,
{}
@ -824066,14 +824073,21 @@
},
"set_viewport": {
"device_pixel_ratio.py": [
"76a4ef7ecd28c6977762404820f61c1b2dfd5dea",
"6267a793b8891c9d2dcd428d19a9de1da8368913",
[
null,
{}
]
],
"invalid.py": [
"744bc0f7f79f86722fbf2f05bb8475c6cdfc9e23",
"671157986b39b2bfbd8b7568180f96d9d0f8b75e",
[
null,
{}
]
],
"user_contexts.py": [
"64c261637342868e90ee67a2332503e00fa96b0d",
[
null,
{}
@ -824455,6 +824469,13 @@
null,
{}
]
],
"set_viewport_with_preload_script.py": [
"790c0a1d7c30299ad2cf94ebf3b8dc9379d1e3a0",
[
null,
{}
]
]
},
"log": {
@ -824908,7 +824929,7 @@
]
],
"user_contexts.py": [
"9a6bb45cc7083c489ee14e1196f45e5cebedfeb8",
"db798d83f4f316e5bab3e81a5586228f83f0fab2",
[
null,
{}
@ -825352,7 +825373,7 @@
]
],
"user_contexts.py": [
"f98221ba7e3ed267023e3ac4638a3107a3ededbc",
"ae2f574eca5a696b3b3646dae784743c0d18f695",
[
null,
{}

@ -9,7 +9,7 @@
}
@font-face {
font-family: "Lato";
src: url('support/fonts/Lato-Medium.ttf') format('truetype');
src: url('/fonts/Lato-Medium.ttf') format('truetype');
font-display: swap;
font-weight: calc(sign(1rem - 1px) * 400);
font-width: calc(sign(1rem - 1px) * 100%);

@ -5,7 +5,7 @@
<style>
@font-face {
font-family: "Lato";
src: url('support/fonts/Lato-Medium.ttf') format('truetype');
src: url('/fonts/Lato-Medium.ttf') format('truetype');
font-display: swap;
font-stretch: normal;
}

@ -8,7 +8,7 @@
<style>
@font-face {
font-family: "Lato";
src: url('support/fonts/Lato-Medium.ttf') format('truetype');
src: url('/fonts/Lato-Medium.ttf') format('truetype');
font-display: swap;
font-stretch: auto;
}

@ -5,7 +5,7 @@
<style>
@font-face {
font-family: "Lato";
src: url('support/fonts/Lato-Medium.ttf') format('truetype');
src: url('/fonts/Lato-Medium.ttf') format('truetype');
font-display: swap;
font-style: normal;
}

@ -8,7 +8,7 @@
<style>
@font-face {
font-family: "Lato";
src: url('support/fonts/Lato-Medium.ttf') format('truetype');
src: url('/fonts/Lato-Medium.ttf') format('truetype');
font-display: swap;
font-style: auto;
}

@ -5,7 +5,7 @@
<style>
@font-face {
font-family: "Lato";
src: url('support/fonts/Lato-Medium.ttf') format('truetype');
src: url('/fonts/Lato-Medium.ttf') format('truetype');
font-display: swap;
font-weight: normal;
}

@ -8,7 +8,7 @@
<style>
@font-face {
font-family: "Lato";
src: url('support/fonts/Lato-Medium.ttf') format('truetype');
src: url('/fonts/Lato-Medium.ttf') format('truetype');
font-display: swap;
font-weight: auto;
}

@ -8,7 +8,7 @@
<style>
@font-face {
font-family: lato-ffs-;
src: url(support/fonts/Lato-Medium-Liga.ttf);
src: url(/fonts/Lato-Medium-Liga.ttf);
}
.test, .ref {
font-family: lato-ffs-;

@ -10,16 +10,16 @@
<style>
@font-face {
font-family: lato-ffs-;
src: url(support/fonts/Lato-Medium-Liga.ttf);
src: url(/fonts/Lato-Medium-Liga.ttf);
}
@font-face {
font-family: lato-ffs-0;
src: url(support/fonts/Lato-Medium-Liga.ttf);
src: url(/fonts/Lato-Medium-Liga.ttf);
font-feature-settings: 'liga' off;
}
@font-face {
font-family: lato-ffs-1;
src: url(support/fonts/Lato-Medium-Liga.ttf);
src: url(/fonts/Lato-Medium-Liga.ttf);
font-feature-settings: 'liga' on;
}
.test, .ref {

@ -8,7 +8,7 @@
<style>
@font-face {
font-family: lato-ffs-;
src: url(support/fonts/Lato-Medium-Liga.ttf);
src: url(/fonts/Lato-Medium-Liga.ttf);
}
.test, .ref {
font-family: lato-ffs-;

@ -10,16 +10,16 @@
<style>
@font-face {
font-family: lato-ffs-;
src: url(support/fonts/Lato-Medium-Liga.ttf);
src: url(/fonts/Lato-Medium-Liga.ttf);
}
@font-face {
font-family: lato-ffs-0;
src: url(support/fonts/Lato-Medium-Liga.ttf);
src: url(/fonts/Lato-Medium-Liga.ttf);
font-feature-settings: 'dlig' off;
}
@font-face {
font-family: lato-ffs-1;
src: url(support/fonts/Lato-Medium-Liga.ttf);
src: url(/fonts/Lato-Medium-Liga.ttf);
font-feature-settings: 'dlig' on;
}
.test, .ref {

@ -6,7 +6,7 @@
<style>
@font-face {
font-family: "test";
src: url(support/fonts/Lato-Medium.ttf);
src: url(/fonts/Lato-Medium.ttf);
}
.test {
font-family: "test";

@ -9,7 +9,7 @@
<style>
@font-face {
font-family: "test";
src: url(support/fonts/Lato-Medium.ttf);
src: url(/fonts/Lato-Medium.ttf);
}
@supports not (font-synthesis: none) {
.test {color: red;}

@ -6,7 +6,7 @@
<style>
@font-face {
font-family: "test";
src: url(support/fonts/Lato-Medium.ttf);
src: url(/fonts/Lato-Medium.ttf);
}
.test {
font-family: "test";

@ -9,7 +9,7 @@
<style>
@font-face {
font-family: "test";
src: url(support/fonts/Lato-Medium.ttf);
src: url(/fonts/Lato-Medium.ttf);
}
@supports not (font-synthesis: style) {
.test {color: red;}

@ -6,7 +6,7 @@
<style>
@font-face {
font-family: "test";
src: url(support/fonts/Lato-Medium.ttf);
src: url(/fonts/Lato-Medium.ttf);
}
.test {
font-family: "test";

@ -9,7 +9,7 @@
<style>
@font-face {
font-family: "test";
src: url(support/fonts/Lato-Medium.ttf);
src: url(/fonts/Lato-Medium.ttf);
}
@supports not (font-synthesis: none) {
.test {color: red;}

@ -6,7 +6,7 @@
<style>
@font-face {
font-family: "test";
src: url(support/fonts/Lato-Medium.ttf);
src: url(/fonts/Lato-Medium.ttf);
}
.test {
font-family: "test";

@ -9,7 +9,7 @@
<style>
@font-face {
font-family: "test";
src: url(support/fonts/Lato-Medium.ttf);
src: url(/fonts/Lato-Medium.ttf);
}
@supports not (font-synthesis: weight) {
.test {color: red;}

@ -6,7 +6,7 @@
<style>
@font-face {
font-family: "test";
src: url(support/fonts/Lato-Medium.ttf);
src: url(/fonts/Lato-Medium.ttf);
}
.test {
font-family: "test";

@ -9,7 +9,7 @@
<style>
@font-face {
font-family: "test";
src: url(support/fonts/Lato-Medium.ttf);
src: url(/fonts/Lato-Medium.ttf);
}
@supports not (font-synthesis: weight style) {
.test p {color: red;}

@ -5,7 +5,7 @@
<style>
@font-face {
font-family: Lato;
src: url(support/fonts/Lato-Medium.ttf);
src: url(/fonts/Lato-Medium.ttf);
}
.test {
font: 2em/1 Lato;

@ -8,7 +8,7 @@
<style>
@font-face {
font-family: Lato;
src: url(support/fonts/Lato-Medium.ttf);
src: url(/fonts/Lato-Medium.ttf);
}
.test {
font: 2em/1 Lato;

@ -5,7 +5,7 @@
<style>
@font-face {
font-family: "lato";
src: url(support/fonts/Lato-Medium.ttf);
src: url(/fonts/Lato-Medium.ttf);
}
.test {
font-family: "lato";

@ -9,7 +9,7 @@
<style>
@font-face {
font-family: "lato";
src: url(support/fonts/Lato-Medium.ttf);
src: url(/fonts/Lato-Medium.ttf);
}
.test {
font-family: "lato";

@ -8,7 +8,7 @@
*/
@font-face {
font-family: "lato";
src: url(support/fonts/Lato-Medium.ttf);
src: url(/fonts/Lato-Medium.ttf);
}
.test {
font-family: "lato";

@ -13,7 +13,7 @@
*/
@font-face {
font-family: "lato";
src: url(support/fonts/Lato-Medium.ttf);
src: url(/fonts/Lato-Medium.ttf);
}
@supports not (font-synthesis-position: none) {
.test::before {

@ -6,7 +6,7 @@
<style>
@font-face {
font-family: "Lato-Medium";
src: url(support/fonts/Lato-Medium.ttf);
src: url(/fonts/Lato-Medium.ttf);
}
.test {
font-family: "Lato-Medium";

@ -9,7 +9,7 @@
<style>
@font-face {
font-family: "Lato-Medium";
src: url(support/fonts/Lato-Medium.ttf);
src: url(/fonts/Lato-Medium.ttf);
}
@supports not (font-synthesis-small-caps: none) {
.test {color: red;}

@ -6,7 +6,7 @@
<style>
@font-face {
font-family: "Lato-Medium";
src: url(support/fonts/Lato-Medium.ttf);
src: url(/fonts/Lato-Medium.ttf);
}
.test {
font-family: "Lato-Medium";

@ -9,7 +9,7 @@
<style>
@font-face {
font-family: "Lato-Medium";
src: url(support/fonts/Lato-Medium.ttf);
src: url(/fonts/Lato-Medium.ttf);
}
@supports not (font-synthesis-small-caps: none) {
.test {color: red;}

@ -6,7 +6,7 @@
<style>
@font-face {
font-family: "lato";
src: url(support/fonts/Lato-Medium.ttf);
src: url(/fonts/Lato-Medium.ttf);
}
.test {
font-family: "lato";

@ -9,7 +9,7 @@
<style>
@font-face {
font-family: "lato";
src: url(support/fonts/Lato-Medium.ttf);
src: url(/fonts/Lato-Medium.ttf);
}
@supports not (font-synthesis-small-caps: none) {
.test {color: red;}

@ -5,7 +5,7 @@
<style>
@font-face {
font-family: "Lato-Medium";
src: url(support/fonts/Lato-Medium.ttf);
src: url(/fonts/Lato-Medium.ttf);
}
.test {
font-family: "Lato-Medium";

@ -8,7 +8,7 @@
<style>
@font-face {
font-family: "Lato-Medium";
src: url(support/fonts/Lato-Medium.ttf);
src: url(/fonts/Lato-Medium.ttf);
}
@supports not (font-synthesis-style: none) {
.test {color: red;}

@ -5,7 +5,7 @@
<style>
@font-face {
font-family: "Lato-Medium";
src: url(support/fonts/Lato-Medium.ttf);
src: url(/fonts/Lato-Medium.ttf);
}
.test {
font-family: "Lato-Medium";

@ -8,7 +8,7 @@
<style>
@font-face {
font-family: "Lato-Medium";
src: url(support/fonts/Lato-Medium.ttf);
src: url(/fonts/Lato-Medium.ttf);
}
@supports not (font-synthesis-style: none) {
.test {color: red;}

@ -5,7 +5,7 @@
<style>
@font-face {
font-family: "lato";
src: url(support/fonts/Lato-Medium.ttf);
src: url(/fonts/Lato-Medium.ttf);
}
.test {
font-family: "lato";

@ -8,7 +8,7 @@
<style>
@font-face {
font-family: "lato";
src: url(support/fonts/Lato-Medium.ttf);
src: url(/fonts/Lato-Medium.ttf);
}
@supports not (font-synthesis-style: none) {
.test {color: red;}

@ -5,7 +5,7 @@
<style>
@font-face {
font-family: "Lato-Medium";
src: url(support/fonts/Lato-Medium.ttf);
src: url(/fonts/Lato-Medium.ttf);
}
.test {
font-family: "Lato-Medium";

@ -8,7 +8,7 @@
<style>
@font-face {
font-family: "Lato-Medium";
src: url(support/fonts/Lato-Medium.ttf);
src: url(/fonts/Lato-Medium.ttf);
}
@supports not (font-synthesis-weight: none) {
.test {color: red;}

@ -5,7 +5,7 @@
<style>
@font-face {
font-family: "Lato-Medium";
src: url(support/fonts/Lato-Medium.ttf);
src: url(/fonts/Lato-Medium.ttf);
}
.test {
font-family: "Lato-Medium";

@ -8,7 +8,7 @@
<style>
@font-face {
font-family: "Lato-Medium";
src: url(support/fonts/Lato-Medium.ttf);
src: url(/fonts/Lato-Medium.ttf);
}
@supports not (font-synthesis-weight: none) {
.test {color: red;}

@ -5,7 +5,7 @@
<style>
@font-face {
font-family: "lato";
src: url(support/fonts/Lato-Medium.ttf);
src: url(/fonts/Lato-Medium.ttf);
}
.test {
font-family: "lato";

@ -8,7 +8,7 @@
<style>
@font-face {
font-family: "lato";
src: url(support/fonts/Lato-Medium.ttf);
src: url(/fonts/Lato-Medium.ttf);
}
@supports not (font-synthesis-weight: none) {
.test {color: red;}

@ -9,7 +9,7 @@
*/
@font-face {
font-family: "lato";
src: url(support/fonts/Lato-Medium.ttf);
src: url(/fonts/Lato-Medium.ttf);
}
.test {
font-family: "lato";

@ -12,7 +12,7 @@
*/
@font-face {
font-family: "lato";
src: url(support/fonts/Lato-Medium.ttf);
src: url(/fonts/Lato-Medium.ttf);
}
.test {
font-family: "lato";

@ -9,7 +9,7 @@
*/
@font-face {
font-family: "lato";
src: url(support/fonts/Lato-Medium.ttf);
src: url(/fonts/Lato-Medium.ttf);
}
.test {
font-family: "lato";

@ -12,7 +12,7 @@
*/
@font-face {
font-family: "lato";
src: url(support/fonts/Lato-Medium.ttf);
src: url(/fonts/Lato-Medium.ttf);
}
.test {
font-family: "lato";

@ -9,7 +9,7 @@
font-family: test-font-family;
/* <Lato-Medium.ttf> provides different ligatures for English and
Turkish. */
src: url(support/fonts/Lato-Medium.ttf);
src: url(/fonts/Lato-Medium.ttf);
}
div { font-family: test-font-family; }

@ -11,7 +11,7 @@
font-family: test-font-family;
/* <Lato-Medium.ttf> provides different ligatures for English and
Turkish. */
src: url(support/fonts/Lato-Medium.ttf);
src: url(/fonts/Lato-Medium.ttf);
}
div { font-family: test-font-family; }

@ -7,7 +7,7 @@
@font-face {
font-family: test-font-family;
src: url(support/fonts/Lato-Medium.ttf);
src: url(/fonts/Lato-Medium.ttf);
}
div { font-family: test-font-family; }

@ -11,7 +11,7 @@
font-family: test-font-family;
/* <Lato-Medium.ttf> provides different ligatures for English and
Turkish. */
src: url(support/fonts/Lato-Medium.ttf);
src: url(/fonts/Lato-Medium.ttf);
}
div { font-family: test-font-family; }

@ -4,7 +4,7 @@
<style>
@font-face {
font-family: ligature-font;
src: url('../../css-fonts/support/fonts/Lato-Medium-Liga.ttf');
src: url('/fonts/Lato-Medium-Liga.ttf');
}
#test-container {
font-family: ligature-font;

@ -5,7 +5,7 @@
<style>
@font-face {
font-family: ligature-font;
src: url('../../css-fonts/support/fonts/Lato-Medium-Liga.ttf');
src: url('/fonts/Lato-Medium-Liga.ttf');
}
#test-container {
font-family: ligature-font;

@ -6,8 +6,8 @@
<script src="../support/parsing-testcommon.js"></script>
<script>
function test_valid_length(value, expected) {
test_valid_value('letter-spacing', value, expected);
test_valid_value('letter-spacing', `calc(${value})`, expected);
test_valid_value('margin-top', value, expected);
test_valid_value('margin-top', `calc(${value})`, expected);
}
test_valid_length('clamp(1px, 2px, 3px)', 'calc(2px)');
@ -39,6 +39,7 @@ test_valid_length('calc(0px - clamp(30px, 100px, 20px))', 'calc(-30px)');
// mixed units that can't be resolved until computed-value time
test_valid_length('clamp(1px, 1em, 1vh)', 'clamp(1px, 1em, 1vh)');
test_valid_length('clamp(-18px, 3vw, -3vw)', 'clamp(-18px, 3vw, -3vw)', 'clamp(-18px, 3vw, -3vw)');
test_valid_length('calc(0px + clamp(1px, 1em, 1vh))', 'calc(0px + clamp(1px, 1em, 1vh))');
test_valid_length('calc(0px - clamp(1px, 1em, 1vh))', 'calc(0px - clamp(1px, 1em, 1vh))');
</script>

@ -26,7 +26,7 @@
let test_font = new FontFace(
// Lato-Medium is a font with language specific ligatures.
"Lato-Medium",
"url(/css/css-fonts/support/fonts/Lato-Medium.ttf)"
"url(/fonts/Lato-Medium.ttf)"
);
test_font.load().then((font) => {

@ -29,7 +29,7 @@
let test_font = new FontFace(
// Lato-Medium is a font with language specific ligatures.
"Lato-Medium",
"url(/css/css-fonts/support/fonts/Lato-Medium.ttf)"
"url(/fonts/Lato-Medium.ttf)"
);
test_font.load().then((font) => {

@ -18,7 +18,7 @@
let test_font = new FontFace(
// Lato-Medium is a font with language specific ligatures.
"Lato-Medium",
"url(/css/css-fonts/support/fonts/Lato-Medium.ttf)"
"url(/fonts/Lato-Medium.ttf)"
);
test_font.load().then((font) => {

@ -7,7 +7,7 @@
let test_font = new FontFace(
// Lato-Medium is a font with language specific ligatures.
"Lato-Medium",
"url(/css/css-fonts/support/fonts/Lato-Medium.ttf)"
"url(/fonts/Lato-Medium.ttf)"
);
test_font.load().then((font) => {

@ -11,7 +11,7 @@
let test_font = new FontFace(
// Lato-Medium is a font with language specific ligatures.
"Lato-Medium",
"url(/css/css-fonts/support/fonts/Lato-Medium.ttf)"
"url(/fonts/Lato-Medium.ttf)"
);
test_font.load().then((font) => {

@ -31,7 +31,7 @@
let test_font = new FontFace(
// Lato-Medium is a font with language specific ligatures.
"Lato-Medium",
"url(/css/css-fonts/support/fonts/Lato-Medium.ttf)"
"url(/fonts/Lato-Medium.ttf)"
);
test_font.load().then((font) => {

@ -39,7 +39,7 @@
let test_font = new FontFace(
// Lato-Medium is a font with language specific ligatures.
"Lato-Medium",
"url(/css/css-fonts/support/fonts/Lato-Medium.ttf)"
"url(/fonts/Lato-Medium.ttf)"
);
test_font.load().then((font) => {

@ -38,7 +38,7 @@
let test_font = new FontFace(
// Lato-Medium is a font with language specific ligatures.
"Lato-Medium",
"url(/css/css-fonts/support/fonts/Lato-Medium.ttf)"
"url(/fonts/Lato-Medium.ttf)"
);
test_font.load().then((font) => {

@ -23,7 +23,7 @@
let test_font = new FontFace(
// Lato-Medium is a font with language specific ligatures.
"Lato-Medium",
"url(/css/css-fonts/support/fonts/Lato-Medium.ttf)"
"url(/fonts/Lato-Medium.ttf)"
);
test_font.load().then((font) => {

@ -27,7 +27,7 @@
let test_font = new FontFace(
// Lato-Medium is a font with language specific ligatures.
"Lato-Medium",
"url(/css/css-fonts/support/fonts/Lato-Medium.ttf)"
"url(/fonts/Lato-Medium.ttf)"
);
test_font.load().then((font) => {

@ -3,12 +3,12 @@
<title>HTML5 Canvas Test Reference: The lang attribute in an offscreen canvas</title>
<link rel="author" href="mailto:schenney@chromium.org"/>
<style>
#canvas-en {
#canvas-tr {
position: absolute;
top: 10px;
left: 10px;
}
#canvas-tr {
#canvas-en {
position: absolute;
top: 120px;
left: 10px;
@ -26,7 +26,7 @@
let test_font = new FontFace(
// Lato-Medium is a font with language specific ligatures.
"Lato-Medium",
"url(/css/css-fonts/support/fonts/Lato-Medium.ttf)"
"url(/fonts/Lato-Medium.ttf)"
);
test_font.load().then((font) => {
@ -37,10 +37,10 @@
}
</script>
<body onload="generateReference()">
<canvas lang="en" id="canvas-tr" width="300" height="100">
<canvas lang="tr" id="canvas-tr" width="300" height="100">
Browser does not support HTML5 Canvas.
</canvas>
<canvas lang="tr" id="canvas-en" width="300" height="100">
<canvas lang="en" id="canvas-en" width="300" height="100">
Browser does not support HTML5 Canvas.
</canvas>
</body>

@ -38,7 +38,7 @@
let test_font = new FontFace(
// Lato-Medium is a font with language specific ligatures.
"Lato-Medium",
"url(/css/css-fonts/support/fonts/Lato-Medium.ttf)"
"url(/fonts/Lato-Medium.ttf)"
);
test_font.load().then((font) => {

@ -37,7 +37,7 @@
let test_font = new FontFace(
// Lato-Medium is a font with language specific ligatures.
"Lato-Medium",
"url(/css/css-fonts/support/fonts/Lato-Medium.ttf)"
"url(/fonts/Lato-Medium.ttf)"
);
test_font.load().then((font) => {

@ -32,7 +32,7 @@
let test_font = new FontFace(
// Lato-Medium is a font with language specific ligatures.
"Lato-Medium",
"url(/css/css-fonts/support/fonts/Lato-Medium.ttf)"
"url(/fonts/Lato-Medium.ttf)"
);
test_font.load().then((font) => {

@ -32,7 +32,7 @@
let test_font = new FontFace(
// Lato-Medium is a font with language specific ligatures.
"Lato-Medium",
"url(/css/css-fonts/support/fonts/Lato-Medium.ttf)"
"url(/fonts/Lato-Medium.ttf)"
);
test_font.load().then((font) => {

@ -31,7 +31,7 @@
let test_font = new FontFace(
// Lato-Medium is a font with language specific ligatures.
"Lato-Medium",
"url(/css/css-fonts/support/fonts/Lato-Medium.ttf)"
"url(/fonts/Lato-Medium.ttf)"
);
test_font.load().then((font) => {

@ -29,7 +29,7 @@
let test_font = new FontFace(
// Lato-Medium is a font with language specific ligatures.
"Lato-Medium",
"url(/css/css-fonts/support/fonts/Lato-Medium.ttf)"
"url(/fonts/Lato-Medium.ttf)"
);
test_font.load().then((font) => {

@ -5,7 +5,7 @@ self.onmessage = function(e) {
let test_font = new FontFace(
// Lato-Medium is a font with language specific ligatures.
"Lato-Medium",
"url(/css/css-fonts/support/fonts/Lato-Medium.ttf)"
"url(/fonts/Lato-Medium.ttf)"
);
test_font.load().then((font) => {

@ -5,7 +5,7 @@ self.onmessage = function(e) {
let test_font = new FontFace(
// Lato-Medium is a font with language specific ligatures.
"Lato-Medium",
"url(/css/css-fonts/support/fonts/Lato-Medium.ttf)"
"url(/fonts/Lato-Medium.ttf)"
);
test_font.load().then((font) => {

@ -5,7 +5,7 @@ self.onmessage = function(e) {
let test_font = new FontFace(
// Lato-Medium is a font with language specific ligatures.
"Lato-Medium",
"url(/css/css-fonts/support/fonts/Lato-Medium.ttf)"
"url(/fonts/Lato-Medium.ttf)"
);
test_font.load().then((font) => {

@ -1,11 +1,11 @@
This is a testharness.js-based test.
[FAIL] web API-created DOMException (structuredClone())
assert_equals: expected (string) "InvalidCharacterError: Failed to execute 'createElement' on 'Document': The tag name provided ('') is not a valid name.\\n at http://web-platform.test:8001/html/infrastructure/safe-passing-of-structured-data/structured-cloning-error-stack-optional.sub.window.js:33:14\\n at Test.<anonymous> (http://web-platform.test:8001/html/infrastructure/safe-passing-of-structured-data/structured-cloning-error-stack-optional.sub.window.js:41:19)\\n at Test.step (http://web-platform.test:8001/resources/testharness.js:2638:25)\\n at test (http://web-platform.test:8001/resources/testharness.js:633:30)\\n at stackTests (http://web-platform.test:8001/html/infrastructure/safe-passing-of-structured-data/structured-cloning-error-stack-optional.sub.window.js:40:3)\\n at http://web-platform.test:8001/html/infrastructure/safe-passing-of-structured-data/structured-cloning-error-stack-optional.sub.window.js:31:1" but got (undefined) undefined
assert_equals: expected (string) "InvalidCharacterError: Failed to execute 'createElement' on 'Document': The tag name provided ('') is not a valid name.\\n at http://web-platform.test:8001/html/infrastructure/safe-passing-of-structured-data/structured-cloning-error-stack-optional.sub.window.js:33:14\\n at Test.<anonymous> (http://web-platform.test:8001/html/infrastructure/safe-passing-of-structured-data/structured-cloning-error-stack-optional.sub.window.js:41:19)\\n at Test.step (http://web-platform.test:8001/resources/testharness.js:2642:25)\\n at test (http://web-platform.test:8001/resources/testharness.js:633:30)\\n at stackTests (http://web-platform.test:8001/html/infrastructure/safe-passing-of-structured-data/structured-cloning-error-stack-optional.sub.window.js:40:3)\\n at http://web-platform.test:8001/html/infrastructure/safe-passing-of-structured-data/structured-cloning-error-stack-optional.sub.window.js:31:1" but got (undefined) undefined
[FAIL] web API-created DOMException (worker)
assert_equals: expected (string) "InvalidCharacterError: Failed to execute 'createElement' on 'Document': The tag name provided ('') is not a valid name.\\n at http://web-platform.test:8001/html/infrastructure/safe-passing-of-structured-data/structured-cloning-error-stack-optional.sub.window.js:33:14\\n at Test.<anonymous> (http://web-platform.test:8001/html/infrastructure/safe-passing-of-structured-data/structured-cloning-error-stack-optional.sub.window.js:53:19)\\n at Test.step (http://web-platform.test:8001/resources/testharness.js:2638:25)\\n at async_test (http://web-platform.test:8001/resources/testharness.js:681:34)\\n at stackTests (http://web-platform.test:8001/html/infrastructure/safe-passing-of-structured-data/structured-cloning-error-stack-optional.sub.window.js:52:3)\\n at http://web-platform.test:8001/html/infrastructure/safe-passing-of-structured-data/structured-cloning-error-stack-optional.sub.window.js:31:1" but got (undefined) undefined
assert_equals: expected (string) "InvalidCharacterError: Failed to execute 'createElement' on 'Document': The tag name provided ('') is not a valid name.\\n at http://web-platform.test:8001/html/infrastructure/safe-passing-of-structured-data/structured-cloning-error-stack-optional.sub.window.js:33:14\\n at Test.<anonymous> (http://web-platform.test:8001/html/infrastructure/safe-passing-of-structured-data/structured-cloning-error-stack-optional.sub.window.js:53:19)\\n at Test.step (http://web-platform.test:8001/resources/testharness.js:2642:25)\\n at async_test (http://web-platform.test:8001/resources/testharness.js:681:34)\\n at stackTests (http://web-platform.test:8001/html/infrastructure/safe-passing-of-structured-data/structured-cloning-error-stack-optional.sub.window.js:52:3)\\n at http://web-platform.test:8001/html/infrastructure/safe-passing-of-structured-data/structured-cloning-error-stack-optional.sub.window.js:31:1" but got (undefined) undefined
[FAIL] web API-created DOMException (cross-site iframe)
assert_equals: expected (string) "InvalidCharacterError: Failed to execute 'createElement' on 'Document': The tag name provided ('') is not a valid name.\\n at http://web-platform.test:8001/html/infrastructure/safe-passing-of-structured-data/structured-cloning-error-stack-optional.sub.window.js:33:14\\n at iframeTest (http://web-platform.test:8001/html/infrastructure/safe-passing-of-structured-data/structured-cloning-error-stack-optional.sub.window.js:72:19)\\n at Test.<anonymous> (http://web-platform.test:8001/html/infrastructure/safe-passing-of-structured-data/structured-cloning-error-stack-optional.sub.window.js:99:5)\\n at Test.step (http://web-platform.test:8001/resources/testharness.js:2638:25)\\n at async_test (http://web-platform.test:8001/resources/testharness.js:681:34)\\n at stackTests (http://web-platform.test:8001/html/infrastructure/safe-passing-of-structured-data/structured-cloning-error-stack-optional.sub.window.js:96:3)\\n at http://web-platform.test:8001/html/infrastructure/safe-passing-of-structured-data/structured-cloning-error-stack-optional.sub.window.js:31:1" but got (undefined) undefined
assert_equals: expected (string) "InvalidCharacterError: Failed to execute 'createElement' on 'Document': The tag name provided ('') is not a valid name.\\n at http://web-platform.test:8001/html/infrastructure/safe-passing-of-structured-data/structured-cloning-error-stack-optional.sub.window.js:33:14\\n at iframeTest (http://web-platform.test:8001/html/infrastructure/safe-passing-of-structured-data/structured-cloning-error-stack-optional.sub.window.js:72:19)\\n at Test.<anonymous> (http://web-platform.test:8001/html/infrastructure/safe-passing-of-structured-data/structured-cloning-error-stack-optional.sub.window.js:99:5)\\n at Test.step (http://web-platform.test:8001/resources/testharness.js:2642:25)\\n at async_test (http://web-platform.test:8001/resources/testharness.js:681:34)\\n at stackTests (http://web-platform.test:8001/html/infrastructure/safe-passing-of-structured-data/structured-cloning-error-stack-optional.sub.window.js:96:3)\\n at http://web-platform.test:8001/html/infrastructure/safe-passing-of-structured-data/structured-cloning-error-stack-optional.sub.window.js:31:1" but got (undefined) undefined
[FAIL] web API-created DOMException (same-origin iframe)
assert_equals: expected (string) "InvalidCharacterError: Failed to execute 'createElement' on 'Document': The tag name provided ('') is not a valid name.\\n at http://web-platform.test:8001/html/infrastructure/safe-passing-of-structured-data/structured-cloning-error-stack-optional.sub.window.js:33:14\\n at iframeTest (http://web-platform.test:8001/html/infrastructure/safe-passing-of-structured-data/structured-cloning-error-stack-optional.sub.window.js:72:19)\\n at Test.<anonymous> (http://web-platform.test:8001/html/infrastructure/safe-passing-of-structured-data/structured-cloning-error-stack-optional.sub.window.js:104:5)\\n at Test.step (http://web-platform.test:8001/resources/testharness.js:2638:25)\\n at async_test (http://web-platform.test:8001/resources/testharness.js:681:34)\\n at stackTests (http://web-platform.test:8001/html/infrastructure/safe-passing-of-structured-data/structured-cloning-error-stack-optional.sub.window.js:102:3)\\n at http://web-platform.test:8001/html/infrastructure/safe-passing-of-structured-data/structured-cloning-error-stack-optional.sub.window.js:31:1" but got (undefined) undefined
assert_equals: expected (string) "InvalidCharacterError: Failed to execute 'createElement' on 'Document': The tag name provided ('') is not a valid name.\\n at http://web-platform.test:8001/html/infrastructure/safe-passing-of-structured-data/structured-cloning-error-stack-optional.sub.window.js:33:14\\n at iframeTest (http://web-platform.test:8001/html/infrastructure/safe-passing-of-structured-data/structured-cloning-error-stack-optional.sub.window.js:72:19)\\n at Test.<anonymous> (http://web-platform.test:8001/html/infrastructure/safe-passing-of-structured-data/structured-cloning-error-stack-optional.sub.window.js:104:5)\\n at Test.step (http://web-platform.test:8001/resources/testharness.js:2642:25)\\n at async_test (http://web-platform.test:8001/resources/testharness.js:681:34)\\n at stackTests (http://web-platform.test:8001/html/infrastructure/safe-passing-of-structured-data/structured-cloning-error-stack-optional.sub.window.js:102:3)\\n at http://web-platform.test:8001/html/infrastructure/safe-passing-of-structured-data/structured-cloning-error-stack-optional.sub.window.js:31:1" but got (undefined) undefined
Harness: the test ran to completion.

@ -1330,6 +1330,15 @@
"0xffff": "uffff",
};
const formatEscapeMap = {
"\\": "\\\\",
'"': '\\"'
};
for (const p in replacements) {
formatEscapeMap[String.fromCharCode(p)] = "\\" + replacements[p];
}
const formatEscapePattern = new RegExp(`[${Object.keys(formatEscapeMap).map(k => k === "\\" ? "\\\\" : k).join("")}]`, "g");
/**
* Convert a value to a nice, human-readable string
*
@ -1380,12 +1389,7 @@
switch (typeof val) {
case "string":
val = val.replace(/\\/g, "\\\\");
for (var p in replacements) {
var replace = "\\" + replacements[p];
val = val.replace(RegExp(String.fromCharCode(p), "g"), replace);
}
return '"' + val.replace(/"/g, '\\"') + '"';
return '"' + val.replace(formatEscapePattern, match => formatEscapeMap[match]) + '"';
case "boolean":
case "undefined":
return String(val);

@ -22,6 +22,15 @@ async def test_device_pixel_ratio_only(bidi_session, inline, new_tab, device_pix
assert await get_device_pixel_ratio(bidi_session, new_tab) == device_pixel_ratio
assert await get_viewport_dimensions(bidi_session, new_tab) == viewport
url = inline("<div>foo</div>", domain="alt")
await bidi_session.browsing_context.navigate(
context=new_tab["context"], url=url, wait="complete"
)
# Make sure that overrides are applied after cross-origin navigation.
assert await get_device_pixel_ratio(bidi_session, new_tab) == device_pixel_ratio
assert await get_viewport_dimensions(bidi_session, new_tab) == viewport
@pytest.mark.asyncio
@pytest.mark.parametrize("device_pixel_ratio", [0.5, 2])

@ -6,7 +6,7 @@ import webdriver.bidi.error as error
pytestmark = pytest.mark.asyncio
@pytest.mark.parametrize("value", [None, False, 42, {}, []])
@pytest.mark.parametrize("value", [False, 42, {}, []])
async def test_params_context_invalid_type(bidi_session, value):
with pytest.raises(error.InvalidArgumentException):
await bidi_session.browsing_context.set_viewport(context=value, viewport={
@ -89,3 +89,72 @@ async def test_params_devicePixelRatio_invalid_value(bidi_session, new_tab, devi
device_pixel_ratio=device_pixel_ratio,
viewport=None
)
@pytest.mark.parametrize("value", [True, "foo", 42, {}])
async def test_params_user_contexts_invalid_type(bidi_session, value):
with pytest.raises(error.InvalidArgumentException):
await bidi_session.browsing_context.set_viewport(
user_contexts=value,
viewport={
"width": 100,
"height": 200,
}
)
async def test_params_user_contexts_empty_list(bidi_session):
with pytest.raises(error.InvalidArgumentException):
await bidi_session.browsing_context.set_viewport(
user_contexts=[],
viewport={
"width": 100,
"height": 200,
}
)
@pytest.mark.parametrize("value", [None, False, 42, {}, []])
async def test_params_user_contexts_entry_invalid_type(bidi_session, value):
with pytest.raises(error.InvalidArgumentException):
await bidi_session.browsing_context.set_viewport(
user_contexts=[value],
viewport={
"width": 100,
"height": 200,
}
)
@pytest.mark.parametrize("value", ["", "somestring"])
async def test_params_user_contexts_entry_invalid_value(bidi_session, value):
with pytest.raises(error.NoSuchUserContextException):
await bidi_session.browsing_context.set_viewport(
user_contexts=[value],
viewport={
"width": 100,
"height": 200,
}
)
async def test_params_both_user_contexts_and_context(bidi_session, top_context):
with pytest.raises(error.InvalidArgumentException):
await bidi_session.browsing_context.set_viewport(
context=top_context["context"],
user_contexts=["default"],
viewport={
"width": 100,
"height": 200,
}
)
async def test_params_no_user_contexts_and_context(bidi_session):
with pytest.raises(error.InvalidArgumentException):
await bidi_session.browsing_context.set_viewport(
viewport={
"width": 100,
"height": 200,
}
)

@ -0,0 +1,402 @@
import pytest
from webdriver.bidi.undefined import UNDEFINED
from ... import get_device_pixel_ratio, get_viewport_dimensions
pytestmark = pytest.mark.asyncio
async def test_set_to_user_context(bidi_session, new_tab, create_user_context):
user_context = await create_user_context()
context_in_user_context_1 = await bidi_session.browsing_context.create(
user_context=user_context, type_hint="tab"
)
test_viewport = {"width": 250, "height": 300}
assert await get_viewport_dimensions(bidi_session, new_tab) != test_viewport
assert (
await get_viewport_dimensions(bidi_session, context_in_user_context_1)
!= test_viewport
)
await bidi_session.browsing_context.set_viewport(
user_contexts=[user_context], viewport=test_viewport
)
# Make sure that the viewport changes are only applied to the context associated with user context
assert (
await get_viewport_dimensions(bidi_session, context_in_user_context_1)
== test_viewport
)
assert await get_viewport_dimensions(bidi_session, new_tab) != test_viewport
# Create a new context in the user context
context_in_user_context_2 = await bidi_session.browsing_context.create(
user_context=user_context, type_hint="tab"
)
# Make sure that the viewport changes are also applied
assert (
await get_viewport_dimensions(bidi_session, context_in_user_context_2)
== test_viewport
)
# Create a new context in the default context
context_in_default_context = await bidi_session.browsing_context.create(
type_hint="tab"
)
# Make sure that the viewport changes are not applied
assert (
await get_viewport_dimensions(bidi_session, context_in_default_context)
!= test_viewport
)
async def test_set_to_default_user_context(bidi_session, new_tab, create_user_context):
user_context = await create_user_context()
context_in_user_context_1 = await bidi_session.browsing_context.create(
user_context=user_context, type_hint="tab"
)
test_viewport = {"width": 250, "height": 300}
assert await get_viewport_dimensions(bidi_session, new_tab) != test_viewport
assert (
await get_viewport_dimensions(bidi_session, context_in_user_context_1)
!= test_viewport
)
await bidi_session.browsing_context.set_viewport(
user_contexts=["default"], viewport=test_viewport
)
# Make sure that the viewport changes are only applied to the context associated with default user context
assert await get_viewport_dimensions(bidi_session, new_tab) == test_viewport
assert (
await get_viewport_dimensions(bidi_session, context_in_user_context_1)
!= test_viewport
)
# Create a new context in the default context
context_in_default_context = await bidi_session.browsing_context.create(
type_hint="tab"
)
assert (
await get_viewport_dimensions(bidi_session, context_in_default_context)
== test_viewport
)
# Reset viewport settings
await bidi_session.browsing_context.set_viewport(
user_contexts=["default"], viewport=None
)
async def test_set_to_multiple_user_contexts(bidi_session, create_user_context):
user_context_1 = await create_user_context()
user_context_2 = await create_user_context()
context_in_user_context_1 = await bidi_session.browsing_context.create(
user_context=user_context_1, type_hint="tab"
)
context_in_user_context_2 = await bidi_session.browsing_context.create(
user_context=user_context_2, type_hint="tab"
)
test_viewport = {"width": 250, "height": 300}
assert (
await get_viewport_dimensions(bidi_session, context_in_user_context_1)
!= test_viewport
)
assert (
await get_viewport_dimensions(bidi_session, context_in_user_context_2)
!= test_viewport
)
await bidi_session.browsing_context.set_viewport(
user_contexts=[user_context_1, user_context_2], viewport=test_viewport
)
# Make sure that the viewport changes are applied to both user contexts
assert (
await get_viewport_dimensions(bidi_session, context_in_user_context_1)
== test_viewport
)
assert (
await get_viewport_dimensions(bidi_session, context_in_user_context_2)
== test_viewport
)
async def test_undefined_viewport(bidi_session, inline, create_user_context):
user_context = await create_user_context()
context_in_user_context_1 = await bidi_session.browsing_context.create(
user_context=user_context, type_hint="tab"
)
test_viewport = {"width": 499, "height": 599}
assert (
await get_viewport_dimensions(bidi_session, context_in_user_context_1)
!= test_viewport
)
# Load a page so that reflow is triggered when changing the viewport
url = inline("<div>foo</div>")
await bidi_session.browsing_context.navigate(
context=context_in_user_context_1["context"], url=url, wait="complete"
)
await bidi_session.browsing_context.set_viewport(
user_contexts=[user_context], viewport=test_viewport
)
assert (
await get_viewport_dimensions(bidi_session, context_in_user_context_1)
== test_viewport
)
await bidi_session.browsing_context.set_viewport(
user_contexts=[user_context], viewport=UNDEFINED
)
assert (
await get_viewport_dimensions(bidi_session, context_in_user_context_1)
== test_viewport
)
# Create another context in updated user context
context_in_user_context_2 = await bidi_session.browsing_context.create(
user_context=user_context, type_hint="tab"
)
assert (
await get_viewport_dimensions(bidi_session, context_in_user_context_2)
== test_viewport
)
async def test_reset_to_default(bidi_session, inline, create_user_context):
user_context = await create_user_context()
context_in_user_context_1 = await bidi_session.browsing_context.create(
user_context=user_context, type_hint="tab"
)
original_viewport = await get_viewport_dimensions(
bidi_session, context_in_user_context_1
)
test_viewport = {"width": 666, "height": 333}
assert (
await get_viewport_dimensions(bidi_session, context_in_user_context_1)
!= test_viewport
)
# Load a page so that reflow is triggered when changing the viewport
url = inline("<div>foo</div>")
await bidi_session.browsing_context.navigate(
context=context_in_user_context_1["context"], url=url, wait="complete"
)
await bidi_session.browsing_context.set_viewport(
user_contexts=[user_context], viewport=test_viewport
)
assert (
await get_viewport_dimensions(bidi_session, context_in_user_context_1)
== test_viewport
)
await bidi_session.browsing_context.set_viewport(
user_contexts=[user_context], viewport=None
)
assert (
await get_viewport_dimensions(bidi_session, context_in_user_context_1)
== original_viewport
)
# Create another context in updated user context
context_in_user_context_2 = await bidi_session.browsing_context.create(
user_context=user_context, type_hint="tab"
)
assert (
await get_viewport_dimensions(bidi_session, context_in_user_context_2)
== original_viewport
)
async def test_set_viewport_and_device_pixel_ratio(bidi_session, create_user_context):
user_context = await create_user_context()
context_in_user_context_1 = await bidi_session.browsing_context.create(
user_context=user_context, type_hint="tab"
)
test_viewport = {"width": 250, "height": 300}
# Set the viewport changes
await bidi_session.browsing_context.set_viewport(
user_contexts=[user_context], viewport=test_viewport
)
assert (
await get_viewport_dimensions(bidi_session, context_in_user_context_1)
== test_viewport
)
# Create a new context in the user context
context_in_user_context_2 = await bidi_session.browsing_context.create(
user_context=user_context, type_hint="tab"
)
# Make sure that the viewport changes are also applied
assert (
await get_viewport_dimensions(bidi_session, context_in_user_context_2)
== test_viewport
)
# Set the device pixel ratio changes
test_device_pixel_ratio = 2
await bidi_session.browsing_context.set_viewport(
user_contexts=[user_context], device_pixel_ratio=test_device_pixel_ratio
)
assert (
await get_device_pixel_ratio(bidi_session, context_in_user_context_1)
== test_device_pixel_ratio
)
assert (
await get_device_pixel_ratio(bidi_session, context_in_user_context_2)
== test_device_pixel_ratio
)
# Create a new context in the user context
context_in_user_context_3 = await bidi_session.browsing_context.create(
user_context=user_context, type_hint="tab"
)
assert (
await get_device_pixel_ratio(bidi_session, context_in_user_context_3)
== test_device_pixel_ratio
)
assert (
await get_viewport_dimensions(bidi_session, context_in_user_context_3)
== test_viewport
)
async def test_set_to_user_context_and_then_to_context(
bidi_session, create_user_context
):
user_context = await create_user_context()
context_in_user_context_1 = await bidi_session.browsing_context.create(
user_context=user_context, type_hint="tab"
)
test_viewport = {"width": 250, "height": 300}
assert (
await get_viewport_dimensions(bidi_session, context_in_user_context_1)
!= test_viewport
)
# Apply viewport dimensions to the user context.
await bidi_session.browsing_context.set_viewport(
user_contexts=[user_context], viewport=test_viewport
)
assert (
await get_viewport_dimensions(bidi_session, context_in_user_context_1)
== test_viewport
)
new_test_viewport = {"width": 100, "height": 100}
# Apply viewport dimensions now only to the context
await bidi_session.browsing_context.set_viewport(
context=context_in_user_context_1["context"], viewport=new_test_viewport
)
assert (
await get_viewport_dimensions(bidi_session, context_in_user_context_1)
== new_test_viewport
)
await bidi_session.browsing_context.reload(
context=context_in_user_context_1["context"], wait="complete"
)
# Make sure that after reload the viewport dimensions are still updated.
assert (
await get_viewport_dimensions(bidi_session, context_in_user_context_1)
== new_test_viewport
)
# Create a new context in the user context
context_in_user_context_2 = await bidi_session.browsing_context.create(
user_context=user_context, type_hint="tab"
)
# Make sure that the viewport settings for the user context are applied
assert (
await get_viewport_dimensions(bidi_session, context_in_user_context_2)
== test_viewport
)
async def test_set_viewport_to_user_context_and_then_device_pixel_ratio_to_context(
bidi_session, create_user_context
):
user_context = await create_user_context()
context_in_user_context_1 = await bidi_session.browsing_context.create(
user_context=user_context, type_hint="tab"
)
original_dpr = await get_device_pixel_ratio(bidi_session, context_in_user_context_1)
test_dpr = original_dpr + 1
test_viewport = {"width": 250, "height": 300}
assert (
await get_viewport_dimensions(bidi_session, context_in_user_context_1)
!= test_viewport
)
# Apply viewport dimensions to the user context.
await bidi_session.browsing_context.set_viewport(
user_contexts=[user_context], viewport=test_viewport
)
assert (
await get_viewport_dimensions(bidi_session, context_in_user_context_1)
== test_viewport
)
# Apply viewport device pixel ratio now only to the context.
await bidi_session.browsing_context.set_viewport(
context=context_in_user_context_1["context"], device_pixel_ratio=test_dpr
)
assert (
await get_device_pixel_ratio(bidi_session, context_in_user_context_1)
== test_dpr
)
assert (
await get_viewport_dimensions(bidi_session, context_in_user_context_1)
== test_viewport
)
# Create a new context in the user context
context_in_user_context_2 = await bidi_session.browsing_context.create(
user_context=user_context, type_hint="tab"
)
# Make sure that the viewport settings for the user context are applied
assert (
await get_viewport_dimensions(bidi_session, context_in_user_context_2)
== test_viewport
)
assert (
await get_device_pixel_ratio(bidi_session, context_in_user_context_2)
== original_dpr
)

@ -0,0 +1,54 @@
import pytest
from .. import remote_mapping_to_dict
pytestmark = pytest.mark.asyncio
async def test_order(
bidi_session,
add_preload_script,
create_user_context,
subscribe_events,
wait_for_event,
wait_for_future_safe,
):
await subscribe_events(["script.message"])
test_viewport = {"width": 250, "height": 300}
user_context = await create_user_context()
await add_preload_script(
function_declaration="""(channel) => {
channel({
height: window.innerHeight,
width: window.innerWidth,
});
}""",
arguments=[{"type": "channel", "value": {"channel": "channel_name"}}],
)
on_message = wait_for_event("script.message")
await bidi_session.browsing_context.create(
user_context=user_context, type_hint="tab"
)
message = await wait_for_future_safe(on_message)
viewport = remote_mapping_to_dict(message["data"]["value"])
assert test_viewport != viewport
await bidi_session.browsing_context.set_viewport(
user_contexts=[user_context], viewport=test_viewport
)
on_message = wait_for_event("script.message")
await bidi_session.browsing_context.create(
user_context=user_context, type_hint="tab"
)
message = await wait_for_future_safe(on_message)
viewport = remote_mapping_to_dict(message["data"]["value"])
# Make sure that the preload script runs after viewport settings are updated.
assert test_viewport == viewport

@ -55,6 +55,56 @@ async def test_add_preload_script_to_user_context(
await bidi_session.browsing_context.close(context=new_context_2["context"])
async def test_add_preload_script_to_default_user_context(
bidi_session, add_preload_script, inline, create_user_context
):
await add_preload_script(
function_declaration="() => { window.foo='bar'; }", user_contexts=["default"]
)
new_context_1 = await bidi_session.browsing_context.create(type_hint="tab")
# Check that preload script applied the changes to the tab in the user context.
result = await bidi_session.script.evaluate(
expression="window.foo",
target=ContextTarget(new_context_1["context"]),
await_promise=True,
)
assert result == {"type": "string", "value": "bar"}
url = inline("<div>foo</div>")
await bidi_session.browsing_context.navigate(
context=new_context_1["context"],
url=url,
wait="complete",
)
# Check that preload script was applied after navigation
result = await bidi_session.script.evaluate(
expression="window.foo",
target=ContextTarget(new_context_1["context"]),
await_promise=True,
)
assert result == {"type": "string", "value": "bar"}
user_context = await create_user_context()
# Create a new browsing context in the other user context.
new_context_2 = await bidi_session.browsing_context.create(
type_hint="tab", user_context=user_context
)
# Check that preload script didn't apply the changes to the tab in the default user context.
result = await bidi_session.script.evaluate(
expression="window.foo",
target=ContextTarget(new_context_2["context"]),
await_promise=True,
)
assert result == {"type": "undefined"}
await bidi_session.browsing_context.close(context=new_context_1["context"])
await bidi_session.browsing_context.close(context=new_context_2["context"])
async def test_add_preload_script_to_multiple_user_contexts(
bidi_session, add_preload_script, create_user_context
):

@ -34,6 +34,35 @@ async def test_subscribe_one_user_context(bidi_session, subscribe_events, create
)
async def test_subscribe_default_user_context(bidi_session, subscribe_events, create_user_context, wait_for_events):
user_context = await create_user_context()
default_context = await bidi_session.browsing_context.create(
type_hint="tab",
user_context="default"
)
other_context = await bidi_session.browsing_context.create(
type_hint="tab",
user_context=user_context
)
await subscribe_events(events=["log.entryAdded"], user_contexts=["default"])
with wait_for_events(["log.entryAdded"]) as waiter:
await create_console_api_message(bidi_session, default_context, "text1")
await create_console_api_message(bidi_session, other_context, "text2")
events = await waiter.get_events(lambda events : len(events) >= 1)
assert len(events) == 1
recursive_compare(
{
"text": "text1",
},
events[0][1],
)
async def test_subscribe_multiple_user_contexts(bidi_session, subscribe_events, wait_for_events, create_user_context):
user_context = await create_user_context()

@ -0,0 +1,31 @@
This is a wdspec test.
[FAIL] test_params_user_contexts_invalid_type[True]
TypeError: BrowsingContext.set_viewport() got an unexpected keyword argument 'user_contexts'
[FAIL] test_params_user_contexts_invalid_type[foo]
TypeError: BrowsingContext.set_viewport() got an unexpected keyword argument 'user_contexts'
[FAIL] test_params_user_contexts_invalid_type[42]
TypeError: BrowsingContext.set_viewport() got an unexpected keyword argument 'user_contexts'
[FAIL] test_params_user_contexts_invalid_type[value3]
TypeError: BrowsingContext.set_viewport() got an unexpected keyword argument 'user_contexts'
[FAIL] test_params_user_contexts_empty_list
TypeError: BrowsingContext.set_viewport() got an unexpected keyword argument 'user_contexts'
[FAIL] test_params_user_contexts_entry_invalid_type[None]
TypeError: BrowsingContext.set_viewport() got an unexpected keyword argument 'user_contexts'
[FAIL] test_params_user_contexts_entry_invalid_type[False]
TypeError: BrowsingContext.set_viewport() got an unexpected keyword argument 'user_contexts'
[FAIL] test_params_user_contexts_entry_invalid_type[42]
TypeError: BrowsingContext.set_viewport() got an unexpected keyword argument 'user_contexts'
[FAIL] test_params_user_contexts_entry_invalid_type[value3]
TypeError: BrowsingContext.set_viewport() got an unexpected keyword argument 'user_contexts'
[FAIL] test_params_user_contexts_entry_invalid_type[value4]
TypeError: BrowsingContext.set_viewport() got an unexpected keyword argument 'user_contexts'
[FAIL] test_params_user_contexts_entry_invalid_value[]
TypeError: BrowsingContext.set_viewport() got an unexpected keyword argument 'user_contexts'
[FAIL] test_params_user_contexts_entry_invalid_value[somestring]
TypeError: BrowsingContext.set_viewport() got an unexpected keyword argument 'user_contexts'
[FAIL] test_params_both_user_contexts_and_context
TypeError: BrowsingContext.set_viewport() got an unexpected keyword argument 'user_contexts'
[FAIL] test_params_no_user_contexts_and_context
TypeError: BrowsingContext.set_viewport() missing 1 required positional argument: 'context'
Harness: the test ran to completion.

@ -0,0 +1,19 @@
This is a wdspec test.
[FAIL] test_set_to_user_context
TypeError: BrowsingContext.set_viewport() got an unexpected keyword argument 'user_contexts'
[FAIL] test_set_to_default_user_context
TypeError: BrowsingContext.set_viewport() got an unexpected keyword argument 'user_contexts'
[FAIL] test_set_to_multiple_user_contexts
TypeError: BrowsingContext.set_viewport() got an unexpected keyword argument 'user_contexts'
[FAIL] test_undefined_viewport
TypeError: BrowsingContext.set_viewport() got an unexpected keyword argument 'user_contexts'
[FAIL] test_reset_to_default
TypeError: BrowsingContext.set_viewport() got an unexpected keyword argument 'user_contexts'
[FAIL] test_set_viewport_and_device_pixel_ratio
TypeError: BrowsingContext.set_viewport() got an unexpected keyword argument 'user_contexts'
[FAIL] test_set_to_user_context_and_then_to_context
TypeError: BrowsingContext.set_viewport() got an unexpected keyword argument 'user_contexts'
[FAIL] test_set_viewport_to_user_context_and_then_device_pixel_ratio_to_context
TypeError: BrowsingContext.set_viewport() got an unexpected keyword argument 'user_contexts'
Harness: the test ran to completion.

@ -0,0 +1,5 @@
This is a wdspec test.
[FAIL] test_order
TypeError: BrowsingContext.set_viewport() got an unexpected keyword argument 'user_contexts'
Harness: the test ran to completion.