cherry-pick(#35016): chore: unblock 1.51 dotnet roll

This commit is contained in:
Dmitry Gozman 2025-03-04 15:01:15 +00:00
parent 7cccd68de6
commit 8550616f9d
4 changed files with 15 additions and 2 deletions

View File

@ -336,11 +336,19 @@ await Expect(Page).ToHaveURLAsync(new Regex(".*checkout"));
### param: PageAssertions.toHaveURL.url
* since: v1.18
* langs: js
- `url` <[string]|[RegExp]|[function]\([URL]\):[boolean]>
Expected URL string, RegExp, or predicate receiving [URL] to match.
When [`option: Browser.newContext.baseURL`] is provided via the context options and the `url` argument is a string, the two values are merged via the [`new URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor and used for the comparison against the current browser URL.
### param: PageAssertions.toHaveURL.urlOrRegExp
* since: v1.18
* langs: csharp, python, java
- `urlOrRegExp` <[string]|[RegExp]>
Expected URL string or RegExp.
### option: PageAssertions.toHaveURL.ignoreCase
* since: v1.44
- `ignoreCase` <[boolean]>

View File

@ -676,13 +676,13 @@ Emulates `'forced-colors'` media feature, supported values are `'active'`, `'non
## context-option-contrast
* langs: js, java
- `contrast` <null|[ForcedColors]<"no-preference"|"more">>
- `contrast` <null|[Contrast]<"no-preference"|"more">>
Emulates `'prefers-contrast'` media feature, supported values are `'no-preference'`, `'more'`. See [`method: Page.emulateMedia`] for more details. Passing `null` resets emulation to system defaults. Defaults to `'no-preference'`.
## context-option-contrast-csharp-python
* langs: csharp, python
- `contrast` <[ForcedColors]<"no-preference"|"more"|"null">>
- `contrast` <[Contrast]<"no-preference"|"more"|"null">>
Emulates `'prefers-contrast'` media feature, supported values are `'no-preference'`, `'more'`. See [`method: Page.emulateMedia`] for more details. Passing `'null'` resets emulation to system defaults. Defaults to `'no-preference'`.

View File

@ -1422,6 +1422,9 @@ export class InjectedScript {
received = getAriaRole(element) || '';
} else if (expression === 'to.have.title') {
received = this.document.title;
} else if (expression === 'to.have.url') {
// Note: this is used by all language ports except for javascript.
received = this.document.location.href;
} else if (expression === 'to.have.value') {
element = this.retarget(element, 'follow-label')!;
if (element.nodeName !== 'INPUT' && element.nodeName !== 'TEXTAREA' && element.nodeName !== 'SELECT')

View File

@ -190,6 +190,8 @@ for (const [name, item] of Object.entries(protocol)) {
} else if (item.type === 'object') {
if (Object.keys(item.properties).length === 0)
continue;
if (['AXNode', 'SetNetworkCookie', 'NetworkCookie', 'IndexedDBDatabase', 'SetOriginStorage', 'OriginStorage'].includes(name))
continue;
const init = objectType(item.properties, '', false, name);
writeCSharpClass(name, null, init.ts);
}