Merge branch 'microsoft:main' into main
This commit is contained in:
commit
c1c9a577e0
20
.github/workflows/tests_others.yml
vendored
20
.github/workflows/tests_others.yml
vendored
|
|
@ -88,11 +88,15 @@ jobs:
|
|||
flakiness-subscription-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_SUBSCRIPTION_ID }}
|
||||
|
||||
test_clock_frozen_time_linux:
|
||||
name: Frozen time library
|
||||
name: time library - ${{ matrix.clock }}
|
||||
environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }}
|
||||
permissions:
|
||||
id-token: write # This is required for OIDC login (azure/login) to succeed
|
||||
contents: read # This is required for actions/checkout to succeed
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
clock: [frozen, realtime]
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
|
@ -101,32 +105,36 @@ jobs:
|
|||
node-version: 20
|
||||
browsers-to-install: chromium
|
||||
command: npm run test -- --project=chromium-*
|
||||
bot-name: "frozen-time-library-chromium-linux"
|
||||
bot-name: "${{ matrix.clock }}-time-library-chromium-linux"
|
||||
flakiness-client-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_CLIENT_ID }}
|
||||
flakiness-tenant-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_TENANT_ID }}
|
||||
flakiness-subscription-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_SUBSCRIPTION_ID }}
|
||||
env:
|
||||
PW_FREEZE_TIME: 1
|
||||
PW_CLOCK: ${{ matrix.clock }}
|
||||
|
||||
test_clock_frozen_time_test_runner:
|
||||
name: Frozen time test runner
|
||||
name: time test runner - ${{ matrix.clock }}
|
||||
environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }}
|
||||
runs-on: ubuntu-22.04
|
||||
permissions:
|
||||
id-token: write # This is required for OIDC login (azure/login) to succeed
|
||||
contents: read # This is required for actions/checkout to succeed
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
clock: [frozen, realtime]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: ./.github/actions/run-test
|
||||
with:
|
||||
node-version: 20
|
||||
command: npm run ttest
|
||||
bot-name: "frozen-time-runner-chromium-linux"
|
||||
bot-name: "${{ matrix.clock }}-time-runner-chromium-linux"
|
||||
flakiness-client-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_CLIENT_ID }}
|
||||
flakiness-tenant-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_TENANT_ID }}
|
||||
flakiness-subscription-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_SUBSCRIPTION_ID }}
|
||||
env:
|
||||
PW_FREEZE_TIME: 1
|
||||
PW_CLOCK: ${{ matrix.clock }}
|
||||
|
||||
test_electron:
|
||||
name: Electron - ${{ matrix.os }}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# 🎭 Playwright
|
||||
|
||||
[](https://www.npmjs.com/package/playwright) <!-- GEN:chromium-version-badge -->[](https://www.chromium.org/Home)<!-- GEN:stop --> <!-- GEN:firefox-version-badge -->[](https://www.mozilla.org/en-US/firefox/new/)<!-- GEN:stop --> <!-- GEN:webkit-version-badge -->[](https://webkit.org/)<!-- GEN:stop -->
|
||||
[](https://www.npmjs.com/package/playwright) <!-- GEN:chromium-version-badge -->[](https://www.chromium.org/Home)<!-- GEN:stop --> <!-- GEN:firefox-version-badge -->[](https://www.mozilla.org/en-US/firefox/new/)<!-- GEN:stop --> <!-- GEN:webkit-version-badge -->[](https://webkit.org/)<!-- GEN:stop -->
|
||||
|
||||
## [Documentation](https://playwright.dev) | [API reference](https://playwright.dev/docs/api/class-playwright)
|
||||
|
||||
|
|
@ -8,9 +8,9 @@ Playwright is a framework for Web Testing and Automation. It allows testing [Chr
|
|||
|
||||
| | Linux | macOS | Windows |
|
||||
| :--- | :---: | :---: | :---: |
|
||||
| Chromium <!-- GEN:chromium-version -->126.0.6478.36<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|
||||
| Chromium <!-- GEN:chromium-version -->127.0.6533.5<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|
||||
| WebKit <!-- GEN:webkit-version -->17.4<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|
||||
| Firefox <!-- GEN:firefox-version -->126.0<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|
||||
| Firefox <!-- GEN:firefox-version -->127.0<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|
||||
|
||||
Headless execution is supported for all browsers on all platforms. Check out [system requirements](https://playwright.dev/docs/intro#system-requirements) for details.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
REMOTE_URL="https://github.com/mozilla/gecko-dev"
|
||||
BASE_BRANCH="release"
|
||||
BASE_REVISION="f8704c84a751716bad093b9bdc482db53fe5b3ea"
|
||||
BASE_REVISION="bd7e0ac24a6fb1cddde3e45ea191b7abcc90cf56"
|
||||
|
|
|
|||
|
|
@ -146,6 +146,7 @@ class NetworkRequest {
|
|||
this._expectingInterception = false;
|
||||
this._expectingResumedRequest = undefined; // { method, headers, postData }
|
||||
this._sentOnResponse = false;
|
||||
this._fulfilled = false;
|
||||
|
||||
if (this._pageNetwork)
|
||||
appendExtraHTTPHeaders(httpChannel, this._pageNetwork.combinedExtraHTTPHeaders());
|
||||
|
|
@ -194,6 +195,7 @@ class NetworkRequest {
|
|||
|
||||
// Public interception API.
|
||||
fulfill(status, statusText, headers, base64body) {
|
||||
this._fulfilled = true;
|
||||
this._interceptedChannel.synthesizeStatus(status, statusText);
|
||||
for (const header of headers) {
|
||||
this._interceptedChannel.synthesizeHeader(header.name, header.value);
|
||||
|
|
@ -801,7 +803,8 @@ class ResponseStorage {
|
|||
return;
|
||||
}
|
||||
let encodings = [];
|
||||
if ((request.httpChannel instanceof Ci.nsIEncodedChannel) && request.httpChannel.contentEncodings && !request.httpChannel.applyConversion) {
|
||||
// Note: fulfilled request comes with decoded body right away.
|
||||
if ((request.httpChannel instanceof Ci.nsIEncodedChannel) && request.httpChannel.contentEncodings && !request.httpChannel.applyConversion && !request._fulfilled) {
|
||||
const encodingHeader = request.httpChannel.getResponseHeader("Content-Encoding");
|
||||
encodings = encodingHeader.split(/\s*\t*,\s*\t*/);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -355,6 +355,7 @@ class PageTarget {
|
|||
this._screencastRecordingInfo = undefined;
|
||||
this._dialogs = new Map();
|
||||
this.forcedColors = 'no-override';
|
||||
this.disableCache = false;
|
||||
this.mediumOverride = '';
|
||||
this.crossProcessCookie = {
|
||||
initScripts: [],
|
||||
|
|
@ -461,12 +462,26 @@ class PageTarget {
|
|||
this.updateReducedMotionOverride(browsingContext);
|
||||
this.updateForcedColorsOverride(browsingContext);
|
||||
this.updateForceOffline(browsingContext);
|
||||
this.updateCacheDisabled(browsingContext);
|
||||
}
|
||||
|
||||
updateForceOffline(browsingContext = undefined) {
|
||||
(browsingContext || this._linkedBrowser.browsingContext).forceOffline = this._browserContext.forceOffline;
|
||||
}
|
||||
|
||||
setCacheDisabled(disabled) {
|
||||
this.disableCache = disabled;
|
||||
this.updateCacheDisabled();
|
||||
}
|
||||
|
||||
updateCacheDisabled(browsingContext = this._linkedBrowser.browsingContext) {
|
||||
const enableFlags = Ci.nsIRequest.LOAD_NORMAL;
|
||||
const disableFlags = Ci.nsIRequest.LOAD_BYPASS_CACHE |
|
||||
Ci.nsIRequest.INHIBIT_CACHING;
|
||||
|
||||
browsingContext.defaultLoadFlags = (this._browserContext.disableCache || this.disableCache) ? disableFlags : enableFlags;
|
||||
}
|
||||
|
||||
updateTouchOverride(browsingContext = undefined) {
|
||||
(browsingContext || this._linkedBrowser.browsingContext).touchEventsOverride = this._browserContext.touchOverride ? 'enabled' : 'none';
|
||||
}
|
||||
|
|
@ -837,6 +852,7 @@ class BrowserContext {
|
|||
this.defaultPlatform = null;
|
||||
this.touchOverride = false;
|
||||
this.forceOffline = false;
|
||||
this.disableCache = false;
|
||||
this.colorScheme = 'none';
|
||||
this.forcedColors = 'no-override';
|
||||
this.reducedMotion = 'none';
|
||||
|
|
@ -938,6 +954,12 @@ class BrowserContext {
|
|||
page.updateForceOffline();
|
||||
}
|
||||
|
||||
setCacheDisabled(disabled) {
|
||||
this.disableCache = disabled;
|
||||
for (const page of this.pages)
|
||||
page.updateCacheDisabled();
|
||||
}
|
||||
|
||||
async setDefaultViewport(viewport) {
|
||||
this.defaultViewportSize = viewport ? viewport.viewportSize : undefined;
|
||||
this.deviceScaleFactor = viewport ? viewport.deviceScaleFactor : undefined;
|
||||
|
|
|
|||
|
|
@ -152,7 +152,6 @@ class PageAgent {
|
|||
getFullAXTree: this._getFullAXTree.bind(this),
|
||||
insertText: this._insertText.bind(this),
|
||||
scrollIntoViewIfNeeded: this._scrollIntoViewIfNeeded.bind(this),
|
||||
setCacheDisabled: this._setCacheDisabled.bind(this),
|
||||
setFileInputFiles: this._setFileInputFiles.bind(this),
|
||||
evaluate: this._runtime.evaluate.bind(this._runtime),
|
||||
callFunction: this._runtime.callFunction.bind(this._runtime),
|
||||
|
|
@ -162,15 +161,6 @@ class PageAgent {
|
|||
];
|
||||
}
|
||||
|
||||
_setCacheDisabled({cacheDisabled}) {
|
||||
const enable = Ci.nsIRequest.LOAD_NORMAL;
|
||||
const disable = Ci.nsIRequest.LOAD_BYPASS_CACHE |
|
||||
Ci.nsIRequest.INHIBIT_CACHING;
|
||||
|
||||
const docShell = this._frameTree.mainFrame().docShell();
|
||||
docShell.defaultLoadFlags = cacheDisabled ? disable : enable;
|
||||
}
|
||||
|
||||
_emitAllEvents(frame) {
|
||||
this._browserPage.emit('pageEventFired', {
|
||||
frameId: frame.id(),
|
||||
|
|
@ -519,71 +509,16 @@ class PageAgent {
|
|||
false /* aIgnoreRootScrollFrame */,
|
||||
true /* aFlushLayout */);
|
||||
|
||||
const {defaultPrevented: startPrevented} = await this._dispatchTouchEvent({
|
||||
await this._dispatchTouchEvent({
|
||||
type: 'touchstart',
|
||||
modifiers,
|
||||
touchPoints: [{x, y}]
|
||||
});
|
||||
const {defaultPrevented: endPrevented} = await this._dispatchTouchEvent({
|
||||
await this._dispatchTouchEvent({
|
||||
type: 'touchend',
|
||||
modifiers,
|
||||
touchPoints: [{x, y}]
|
||||
});
|
||||
if (startPrevented || endPrevented)
|
||||
return;
|
||||
|
||||
const frame = this._frameTree.mainFrame();
|
||||
const winUtils = frame.domWindow().windowUtils;
|
||||
winUtils.jugglerSendMouseEvent(
|
||||
'mousemove',
|
||||
x,
|
||||
y,
|
||||
0 /*button*/,
|
||||
0 /*clickCount*/,
|
||||
modifiers,
|
||||
false /*aIgnoreRootScrollFrame*/,
|
||||
0.0 /*pressure*/,
|
||||
5 /*inputSource*/,
|
||||
true /*isDOMEventSynthesized*/,
|
||||
false /*isWidgetEventSynthesized*/,
|
||||
0 /*buttons*/,
|
||||
winUtils.DEFAULT_MOUSE_POINTER_ID /* pointerIdentifier */,
|
||||
true /*disablePointerEvent*/
|
||||
);
|
||||
|
||||
winUtils.jugglerSendMouseEvent(
|
||||
'mousedown',
|
||||
x,
|
||||
y,
|
||||
0 /*button*/,
|
||||
1 /*clickCount*/,
|
||||
modifiers,
|
||||
false /*aIgnoreRootScrollFrame*/,
|
||||
0.0 /*pressure*/,
|
||||
5 /*inputSource*/,
|
||||
true /*isDOMEventSynthesized*/,
|
||||
false /*isWidgetEventSynthesized*/,
|
||||
1 /*buttons*/,
|
||||
winUtils.DEFAULT_MOUSE_POINTER_ID /*pointerIdentifier*/,
|
||||
true /*disablePointerEvent*/,
|
||||
);
|
||||
|
||||
winUtils.jugglerSendMouseEvent(
|
||||
'mouseup',
|
||||
x,
|
||||
y,
|
||||
0 /*button*/,
|
||||
1 /*clickCount*/,
|
||||
modifiers,
|
||||
false /*aIgnoreRootScrollFrame*/,
|
||||
0.0 /*pressure*/,
|
||||
5 /*inputSource*/,
|
||||
true /*isDOMEventSynthesized*/,
|
||||
false /*isWidgetEventSynthesized*/,
|
||||
0 /*buttons*/,
|
||||
winUtils.DEFAULT_MOUSE_POINTER_ID /*pointerIdentifier*/,
|
||||
true /*disablePointerEvent*/,
|
||||
);
|
||||
}
|
||||
|
||||
async _dispatchDragEvent({type, x, y, modifiers}) {
|
||||
|
|
|
|||
|
|
@ -186,6 +186,10 @@ class BrowserHandler {
|
|||
this._targetRegistry.browserContextForId(browserContextId).requestInterceptionEnabled = enabled;
|
||||
}
|
||||
|
||||
['Browser.setCacheDisabled']({browserContextId, cacheDisabled}) {
|
||||
this._targetRegistry.browserContextForId(browserContextId).setCacheDisabled(cacheDisabled);
|
||||
}
|
||||
|
||||
['Browser.setIgnoreHTTPSErrors']({browserContextId, ignoreHTTPSErrors}) {
|
||||
this._targetRegistry.browserContextForId(browserContextId).setIgnoreHTTPSErrors(nullToUndefined(ignoreHTTPSErrors));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -302,8 +302,8 @@ class PageHandler {
|
|||
await this._pageTarget.activateAndRun(() => {});
|
||||
}
|
||||
|
||||
async ['Page.setCacheDisabled'](options) {
|
||||
return await this._contentPage.send('setCacheDisabled', options);
|
||||
async ['Page.setCacheDisabled']({cacheDisabled}) {
|
||||
return await this._pageTarget.setCacheDisabled(cacheDisabled);
|
||||
}
|
||||
|
||||
async ['Page.addBinding']({ worldName, name, script }) {
|
||||
|
|
|
|||
|
|
@ -322,6 +322,12 @@ const Browser = {
|
|||
enabled: t.Boolean,
|
||||
},
|
||||
},
|
||||
'setCacheDisabled': {
|
||||
params: {
|
||||
browserContextId: t.Optional(t.String),
|
||||
cacheDisabled: t.Boolean,
|
||||
},
|
||||
},
|
||||
'setGeolocationOverride': {
|
||||
params: {
|
||||
browserContextId: t.Optional(t.String),
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ index 8e9bf2b413585b5a3db9370eee5d57fb6c6716ed..5a3b194b54e3813c89989f13a214c989
|
|||
* Return XPCOM wrapper for the internal accessible.
|
||||
*/
|
||||
diff --git a/browser/app/winlauncher/LauncherProcessWin.cpp b/browser/app/winlauncher/LauncherProcessWin.cpp
|
||||
index b40e0fceb567c0d217adf284e13f434e49cc8467..2c4e6d5fbf8da40954ad6a5b15e412493e43b14e 100644
|
||||
index 81d4ee91e9383693d794dbf68184a80b49b582c6..1a07e3511f73199fe0b248412d01d7b8a3744a66 100644
|
||||
--- a/browser/app/winlauncher/LauncherProcessWin.cpp
|
||||
+++ b/browser/app/winlauncher/LauncherProcessWin.cpp
|
||||
@@ -22,6 +22,7 @@
|
||||
|
|
@ -68,7 +68,7 @@ index b40e0fceb567c0d217adf284e13f434e49cc8467..2c4e6d5fbf8da40954ad6a5b15e41249
|
|||
#include <windows.h>
|
||||
#include <processthreadsapi.h>
|
||||
|
||||
@@ -421,8 +422,18 @@ Maybe<int> LauncherMain(int& argc, wchar_t* argv[],
|
||||
@@ -425,8 +426,18 @@ Maybe<int> LauncherMain(int& argc, wchar_t* argv[],
|
||||
HANDLE stdHandles[] = {::GetStdHandle(STD_INPUT_HANDLE),
|
||||
::GetStdHandle(STD_OUTPUT_HANDLE),
|
||||
::GetStdHandle(STD_ERROR_HANDLE)};
|
||||
|
|
@ -106,10 +106,10 @@ index f6d425f36a965f03ac82dbe3ab6cde06f12751ac..d60999ab2658b1e1e5f07a8aee530451
|
|||
browser/chrome/browser/search-extensions/amazon/favicon.ico
|
||||
browser/chrome/browser/search-extensions/amazondotcn/favicon.ico
|
||||
diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in
|
||||
index 4068c0c165fcebd0a72f4d780bc0cbd680fe7a9c..fec7f8505d22485fa6ad4193d59387f493bd1ef8 100644
|
||||
index 1b87a9ab4aec939acac1da54a2b6670cc581fe86..a638dbe8e2f260d8be550fa8eb5bf6f6c2c31080 100644
|
||||
--- a/browser/installer/package-manifest.in
|
||||
+++ b/browser/installer/package-manifest.in
|
||||
@@ -197,6 +197,9 @@
|
||||
@@ -185,6 +185,9 @@
|
||||
@RESPATH@/chrome/remote.manifest
|
||||
#endif
|
||||
|
||||
|
|
@ -120,7 +120,7 @@ index 4068c0c165fcebd0a72f4d780bc0cbd680fe7a9c..fec7f8505d22485fa6ad4193d59387f4
|
|||
@RESPATH@/components/extensions-toolkit.manifest
|
||||
@RESPATH@/browser/components/extensions-browser.manifest
|
||||
diff --git a/devtools/server/socket/websocket-server.js b/devtools/server/socket/websocket-server.js
|
||||
index 4236ec2921bd57c58cfffdf1cdcf509d76fca3db..23d0cb1f06bb8c7a1cac8fcec94a99fba5bfe3f2 100644
|
||||
index d49c6fbf1bf83b832795fa674f6b41f223eef812..7ea3540947ff5f61b15f27fbf4b955649f8e9ff9 100644
|
||||
--- a/devtools/server/socket/websocket-server.js
|
||||
+++ b/devtools/server/socket/websocket-server.js
|
||||
@@ -134,13 +134,12 @@ function writeHttpResponse(output, response) {
|
||||
|
|
@ -167,31 +167,28 @@ index 4236ec2921bd57c58cfffdf1cdcf509d76fca3db..23d0cb1f06bb8c7a1cac8fcec94a99fb
|
|||
const transportProvider = {
|
||||
setListener(upgradeListener) {
|
||||
diff --git a/docshell/base/BrowsingContext.cpp b/docshell/base/BrowsingContext.cpp
|
||||
index 0ef5e02d2ae365b4e7b30fd49771e547c030bcfc..0787518696fc90bba3dce8c1e1c00387c3e7a6c9 100644
|
||||
index 6e1a1b689398fa6c3c73f2f243ae02c67a4476c8..9dcf71ce753cf11f295d83eb7653e940065c8e2c 100644
|
||||
--- a/docshell/base/BrowsingContext.cpp
|
||||
+++ b/docshell/base/BrowsingContext.cpp
|
||||
@@ -114,6 +114,20 @@ struct ParamTraits<mozilla::dom::PrefersColorSchemeOverride>
|
||||
mozilla::dom::PrefersColorSchemeOverride::None,
|
||||
mozilla::dom::PrefersColorSchemeOverride::EndGuard_> {};
|
||||
@@ -106,8 +106,15 @@ struct ParamTraits<mozilla::dom::DisplayMode>
|
||||
|
||||
template <>
|
||||
struct ParamTraits<mozilla::dom::PrefersColorSchemeOverride>
|
||||
- : public mozilla::dom::WebIDLEnumSerializer<
|
||||
- mozilla::dom::PrefersColorSchemeOverride> {};
|
||||
+ : public mozilla::dom::WebIDLEnumSerializer<mozilla::dom::PrefersColorSchemeOverride> {};
|
||||
+
|
||||
+template <>
|
||||
+struct ParamTraits<mozilla::dom::PrefersReducedMotionOverride>
|
||||
+ : public ContiguousEnumSerializer<
|
||||
+ mozilla::dom::PrefersReducedMotionOverride,
|
||||
+ mozilla::dom::PrefersReducedMotionOverride::None,
|
||||
+ mozilla::dom::PrefersReducedMotionOverride::EndGuard_> {};
|
||||
+ : public mozilla::dom::WebIDLEnumSerializer<mozilla::dom::PrefersReducedMotionOverride> {};
|
||||
+
|
||||
+template <>
|
||||
+struct ParamTraits<mozilla::dom::ForcedColorsOverride>
|
||||
+ : public ContiguousEnumSerializer<
|
||||
+ mozilla::dom::ForcedColorsOverride,
|
||||
+ mozilla::dom::ForcedColorsOverride::None,
|
||||
+ mozilla::dom::ForcedColorsOverride::EndGuard_> {};
|
||||
+
|
||||
+ : public mozilla::dom::WebIDLEnumSerializer<mozilla::dom::ForcedColorsOverride> {};
|
||||
|
||||
template <>
|
||||
struct ParamTraits<mozilla::dom::ExplicitActiveStatus>
|
||||
: public ContiguousEnumSerializer<
|
||||
@@ -2793,6 +2807,40 @@ void BrowsingContext::DidSet(FieldIndex<IDX_PrefersColorSchemeOverride>,
|
||||
@@ -2804,6 +2811,40 @@ void BrowsingContext::DidSet(FieldIndex<IDX_PrefersColorSchemeOverride>,
|
||||
PresContextAffectingFieldChanged();
|
||||
}
|
||||
|
||||
|
|
@ -233,10 +230,10 @@ index 0ef5e02d2ae365b4e7b30fd49771e547c030bcfc..0787518696fc90bba3dce8c1e1c00387
|
|||
nsString&& aOldValue) {
|
||||
MOZ_ASSERT(IsTop());
|
||||
diff --git a/docshell/base/BrowsingContext.h b/docshell/base/BrowsingContext.h
|
||||
index 7554128cf49ce929c973aeddf5f50ede01829c28..81ae7ec9523b944654c048af6a9f6844799eb4f3 100644
|
||||
index 5ec95a61e4d3af265cbe7dd9d83f6535da1d103e..f8acafe6d58c429af27a38363e06ad546dfbfddd 100644
|
||||
--- a/docshell/base/BrowsingContext.h
|
||||
+++ b/docshell/base/BrowsingContext.h
|
||||
@@ -200,10 +200,10 @@ struct EmbedderColorSchemes {
|
||||
@@ -199,10 +199,10 @@ struct EmbedderColorSchemes {
|
||||
FIELD(GVInaudibleAutoplayRequestStatus, GVAutoplayRequestStatus) \
|
||||
/* ScreenOrientation-related APIs */ \
|
||||
FIELD(CurrentOrientationAngle, float) \
|
||||
|
|
@ -249,7 +246,7 @@ index 7554128cf49ce929c973aeddf5f50ede01829c28..81ae7ec9523b944654c048af6a9f6844
|
|||
FIELD(EmbedderElementType, Maybe<nsString>) \
|
||||
FIELD(MessageManagerGroup, nsString) \
|
||||
FIELD(MaxTouchPointsOverride, uint8_t) \
|
||||
@@ -241,6 +241,10 @@ struct EmbedderColorSchemes {
|
||||
@@ -240,6 +240,10 @@ struct EmbedderColorSchemes {
|
||||
* <browser> embedder element. */ \
|
||||
FIELD(EmbedderColorSchemes, EmbedderColorSchemes) \
|
||||
FIELD(DisplayMode, dom::DisplayMode) \
|
||||
|
|
@ -260,7 +257,7 @@ index 7554128cf49ce929c973aeddf5f50ede01829c28..81ae7ec9523b944654c048af6a9f6844
|
|||
/* The number of entries added to the session history because of this \
|
||||
* browsing context. */ \
|
||||
FIELD(HistoryEntryCount, uint32_t) \
|
||||
@@ -933,6 +937,14 @@ class BrowsingContext : public nsILoadContext, public nsWrapperCache {
|
||||
@@ -926,6 +930,14 @@ class BrowsingContext : public nsILoadContext, public nsWrapperCache {
|
||||
return GetPrefersColorSchemeOverride();
|
||||
}
|
||||
|
||||
|
|
@ -275,7 +272,7 @@ index 7554128cf49ce929c973aeddf5f50ede01829c28..81ae7ec9523b944654c048af6a9f6844
|
|||
bool IsInBFCache() const;
|
||||
|
||||
bool AllowJavascript() const { return GetAllowJavascript(); }
|
||||
@@ -1097,6 +1109,23 @@ class BrowsingContext : public nsILoadContext, public nsWrapperCache {
|
||||
@@ -1090,6 +1102,23 @@ class BrowsingContext : public nsILoadContext, public nsWrapperCache {
|
||||
void WalkPresContexts(Callback&&);
|
||||
void PresContextAffectingFieldChanged();
|
||||
|
||||
|
|
@ -300,10 +297,10 @@ index 7554128cf49ce929c973aeddf5f50ede01829c28..81ae7ec9523b944654c048af6a9f6844
|
|||
|
||||
bool CanSet(FieldIndex<IDX_SuspendMediaWhenInactive>, bool, ContentParent*) {
|
||||
diff --git a/docshell/base/CanonicalBrowsingContext.cpp b/docshell/base/CanonicalBrowsingContext.cpp
|
||||
index d5f85b1e571a7840425164a3c7715e8c70ed5c8b..5ba7484b1e7f817b2bb21dd6b5b35c6ffe2c1ca5 100644
|
||||
index 84f2d2960a3fa642754e0c909f92d96865e39984..e91fc85fc7a7966d2d536839fab823ae88d1b4bd 100644
|
||||
--- a/docshell/base/CanonicalBrowsingContext.cpp
|
||||
+++ b/docshell/base/CanonicalBrowsingContext.cpp
|
||||
@@ -1466,6 +1466,12 @@ void CanonicalBrowsingContext::LoadURI(nsIURI* aURI,
|
||||
@@ -1477,6 +1477,12 @@ void CanonicalBrowsingContext::LoadURI(nsIURI* aURI,
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -317,7 +314,7 @@ index d5f85b1e571a7840425164a3c7715e8c70ed5c8b..5ba7484b1e7f817b2bb21dd6b5b35c6f
|
|||
}
|
||||
|
||||
diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp
|
||||
index 0b8212fbf3f81ef6264f17fc8e84f91cde39c0f7..99d43d662978c0418231b8ea55d670f81b5618d7 100644
|
||||
index 3404597343e0d21c42c5adc2f2849888869cf75a..558f03f30672b9f0fdb68ba8d23a0d878d33643d 100644
|
||||
--- a/docshell/base/nsDocShell.cpp
|
||||
+++ b/docshell/base/nsDocShell.cpp
|
||||
@@ -15,6 +15,12 @@
|
||||
|
|
@ -379,7 +376,7 @@ index 0b8212fbf3f81ef6264f17fc8e84f91cde39c0f7..99d43d662978c0418231b8ea55d670f8
|
|||
mAllowAuth(mItemType == typeContent),
|
||||
mAllowKeywordFixup(false),
|
||||
mDisableMetaRefreshWhenInactive(false),
|
||||
@@ -3115,6 +3132,214 @@ nsDocShell::GetMessageManager(ContentFrameMessageManager** aMessageManager) {
|
||||
@@ -3101,6 +3118,214 @@ nsDocShell::GetMessageManager(ContentFrameMessageManager** aMessageManager) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
@ -594,7 +591,7 @@ index 0b8212fbf3f81ef6264f17fc8e84f91cde39c0f7..99d43d662978c0418231b8ea55d670f8
|
|||
NS_IMETHODIMP
|
||||
nsDocShell::GetIsNavigating(bool* aOut) {
|
||||
*aOut = mIsNavigating;
|
||||
@@ -4803,7 +5028,7 @@ nsDocShell::GetVisibility(bool* aVisibility) {
|
||||
@@ -4789,7 +5014,7 @@ nsDocShell::GetVisibility(bool* aVisibility) {
|
||||
}
|
||||
|
||||
void nsDocShell::ActivenessMaybeChanged() {
|
||||
|
|
@ -603,7 +600,7 @@ index 0b8212fbf3f81ef6264f17fc8e84f91cde39c0f7..99d43d662978c0418231b8ea55d670f8
|
|||
if (RefPtr<PresShell> presShell = GetPresShell()) {
|
||||
presShell->ActivenessMaybeChanged();
|
||||
}
|
||||
@@ -6722,6 +6947,10 @@ bool nsDocShell::CanSavePresentation(uint32_t aLoadType,
|
||||
@@ -6711,6 +6936,10 @@ bool nsDocShell::CanSavePresentation(uint32_t aLoadType,
|
||||
return false; // no entry to save into
|
||||
}
|
||||
|
||||
|
|
@ -614,7 +611,7 @@ index 0b8212fbf3f81ef6264f17fc8e84f91cde39c0f7..99d43d662978c0418231b8ea55d670f8
|
|||
MOZ_ASSERT(!mozilla::SessionHistoryInParent(),
|
||||
"mOSHE cannot be non-null with SHIP");
|
||||
nsCOMPtr<nsIDocumentViewer> viewer = mOSHE->GetDocumentViewer();
|
||||
@@ -8454,6 +8683,12 @@ nsresult nsDocShell::PerformRetargeting(nsDocShellLoadState* aLoadState) {
|
||||
@@ -8443,6 +8672,12 @@ nsresult nsDocShell::PerformRetargeting(nsDocShellLoadState* aLoadState) {
|
||||
true, // aForceNoOpener
|
||||
getter_AddRefs(newBC));
|
||||
MOZ_ASSERT(!newBC);
|
||||
|
|
@ -627,7 +624,7 @@ index 0b8212fbf3f81ef6264f17fc8e84f91cde39c0f7..99d43d662978c0418231b8ea55d670f8
|
|||
return rv;
|
||||
}
|
||||
|
||||
@@ -9566,6 +9801,16 @@ nsresult nsDocShell::InternalLoad(nsDocShellLoadState* aLoadState,
|
||||
@@ -9569,6 +9804,16 @@ nsresult nsDocShell::InternalLoad(nsDocShellLoadState* aLoadState,
|
||||
nsINetworkPredictor::PREDICT_LOAD, attrs, nullptr);
|
||||
|
||||
nsCOMPtr<nsIRequest> req;
|
||||
|
|
@ -644,7 +641,7 @@ index 0b8212fbf3f81ef6264f17fc8e84f91cde39c0f7..99d43d662978c0418231b8ea55d670f8
|
|||
rv = DoURILoad(aLoadState, aCacheKey, getter_AddRefs(req));
|
||||
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
@@ -12714,6 +12959,9 @@ class OnLinkClickEvent : public Runnable {
|
||||
@@ -12732,6 +12977,9 @@ class OnLinkClickEvent : public Runnable {
|
||||
mHandler->OnLinkClickSync(mContent, mLoadState, mNoOpenerImplied,
|
||||
mTriggeringPrincipal);
|
||||
}
|
||||
|
|
@ -654,7 +651,7 @@ index 0b8212fbf3f81ef6264f17fc8e84f91cde39c0f7..99d43d662978c0418231b8ea55d670f8
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
@@ -12798,6 +13046,8 @@ nsresult nsDocShell::OnLinkClick(
|
||||
@@ -12816,6 +13064,8 @@ nsresult nsDocShell::OnLinkClick(
|
||||
nsCOMPtr<nsIRunnable> ev =
|
||||
new OnLinkClickEvent(this, aContent, loadState, noOpenerImplied,
|
||||
aIsTrusted, aTriggeringPrincipal);
|
||||
|
|
@ -664,7 +661,7 @@ index 0b8212fbf3f81ef6264f17fc8e84f91cde39c0f7..99d43d662978c0418231b8ea55d670f8
|
|||
}
|
||||
|
||||
diff --git a/docshell/base/nsDocShell.h b/docshell/base/nsDocShell.h
|
||||
index 9f2d9a17dc0d54be4bd09f8e04da6e85f987fe34..8ff6e67fedef0bf73297c4cfed569b8f2ced36d9 100644
|
||||
index 82ac6c9ab9dbc102a429ab0fe6cb24b8fcdf477f..f6328c25349cf39fcce973adcf908782e8721447 100644
|
||||
--- a/docshell/base/nsDocShell.h
|
||||
+++ b/docshell/base/nsDocShell.h
|
||||
@@ -15,6 +15,7 @@
|
||||
|
|
@ -699,7 +696,7 @@ index 9f2d9a17dc0d54be4bd09f8e04da6e85f987fe34..8ff6e67fedef0bf73297c4cfed569b8f
|
|||
// Create a content viewer within this nsDocShell for the given
|
||||
// `WindowGlobalChild` actor.
|
||||
nsresult CreateDocumentViewerForActor(
|
||||
@@ -1003,6 +1014,8 @@ class nsDocShell final : public nsDocLoader,
|
||||
@@ -1004,6 +1015,8 @@ class nsDocShell final : public nsDocLoader,
|
||||
|
||||
bool CSSErrorReportingEnabled() const { return mCSSErrorReportingEnabled; }
|
||||
|
||||
|
|
@ -708,7 +705,7 @@ index 9f2d9a17dc0d54be4bd09f8e04da6e85f987fe34..8ff6e67fedef0bf73297c4cfed569b8f
|
|||
// Handles retrieval of subframe session history for nsDocShell::LoadURI. If a
|
||||
// load is requested in a subframe of the current DocShell, the subframe
|
||||
// loadType may need to reflect the loadType of the parent document, or in
|
||||
@@ -1294,6 +1307,16 @@ class nsDocShell final : public nsDocLoader,
|
||||
@@ -1295,6 +1308,16 @@ class nsDocShell final : public nsDocLoader,
|
||||
bool mAllowDNSPrefetch : 1;
|
||||
bool mAllowWindowControl : 1;
|
||||
bool mCSSErrorReportingEnabled : 1;
|
||||
|
|
@ -726,7 +723,7 @@ index 9f2d9a17dc0d54be4bd09f8e04da6e85f987fe34..8ff6e67fedef0bf73297c4cfed569b8f
|
|||
bool mAllowKeywordFixup : 1;
|
||||
bool mDisableMetaRefreshWhenInactive : 1;
|
||||
diff --git a/docshell/base/nsIDocShell.idl b/docshell/base/nsIDocShell.idl
|
||||
index 9e79b6831a74c6de7c6a6c56d9a024d29c1c704b..db5cd5586b74ec65d788480f9c5fca93eb562c21 100644
|
||||
index 21f09a517e91644f81f5bb823f556c15cd06e51f..a68d30e0a60f03a0942ac1cd8a1f83804fdfd3e0 100644
|
||||
--- a/docshell/base/nsIDocShell.idl
|
||||
+++ b/docshell/base/nsIDocShell.idl
|
||||
@@ -44,6 +44,7 @@ interface nsIURI;
|
||||
|
|
@ -737,7 +734,7 @@ index 9e79b6831a74c6de7c6a6c56d9a024d29c1c704b..db5cd5586b74ec65d788480f9c5fca93
|
|||
interface nsIEditor;
|
||||
interface nsIEditingSession;
|
||||
interface nsIInputStream;
|
||||
@@ -767,6 +768,36 @@ interface nsIDocShell : nsIDocShellTreeItem
|
||||
@@ -754,6 +755,36 @@ interface nsIDocShell : nsIDocShellTreeItem
|
||||
*/
|
||||
void synchronizeLayoutHistoryState();
|
||||
|
||||
|
|
@ -775,10 +772,10 @@ index 9e79b6831a74c6de7c6a6c56d9a024d29c1c704b..db5cd5586b74ec65d788480f9c5fca93
|
|||
* This attempts to save any applicable layout history state (like
|
||||
* scroll position) in the nsISHEntry. This is normally done
|
||||
diff --git a/dom/base/Document.cpp b/dom/base/Document.cpp
|
||||
index 0a2f5be08d0dcad40cd11f4b064a1287b8141e2f..a845203c6aaea8384e8835cbe005669767a1b196 100644
|
||||
index 4e9286a91e3b0f1114aa0a7aa6ff81dde615a73d..941a0c3dac71008ca760024a1e828f75f6af5182 100644
|
||||
--- a/dom/base/Document.cpp
|
||||
+++ b/dom/base/Document.cpp
|
||||
@@ -3705,6 +3705,9 @@ void Document::SendToConsole(nsCOMArray<nsISecurityConsoleMessage>& aMessages) {
|
||||
@@ -3676,6 +3676,9 @@ void Document::SendToConsole(nsCOMArray<nsISecurityConsoleMessage>& aMessages) {
|
||||
}
|
||||
|
||||
void Document::ApplySettingsFromCSP(bool aSpeculative) {
|
||||
|
|
@ -788,7 +785,7 @@ index 0a2f5be08d0dcad40cd11f4b064a1287b8141e2f..a845203c6aaea8384e8835cbe0056697
|
|||
nsresult rv = NS_OK;
|
||||
if (!aSpeculative) {
|
||||
// 1) apply settings from regular CSP
|
||||
@@ -3762,6 +3765,11 @@ nsresult Document::InitCSP(nsIChannel* aChannel) {
|
||||
@@ -3733,6 +3736,11 @@ nsresult Document::InitCSP(nsIChannel* aChannel) {
|
||||
MOZ_ASSERT(!mScriptGlobalObject,
|
||||
"CSP must be initialized before mScriptGlobalObject is set!");
|
||||
|
||||
|
|
@ -800,7 +797,7 @@ index 0a2f5be08d0dcad40cd11f4b064a1287b8141e2f..a845203c6aaea8384e8835cbe0056697
|
|||
// If this is a data document - no need to set CSP.
|
||||
if (mLoadedAsData) {
|
||||
return NS_OK;
|
||||
@@ -4557,6 +4565,10 @@ bool Document::HasFocus(ErrorResult& rv) const {
|
||||
@@ -4500,6 +4508,10 @@ bool Document::HasFocus(ErrorResult& rv) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -811,7 +808,7 @@ index 0a2f5be08d0dcad40cd11f4b064a1287b8141e2f..a845203c6aaea8384e8835cbe0056697
|
|||
if (!fm->IsInActiveWindow(bc)) {
|
||||
return false;
|
||||
}
|
||||
@@ -18878,6 +18890,68 @@ ColorScheme Document::PreferredColorScheme(IgnoreRFP aIgnoreRFP) const {
|
||||
@@ -18849,6 +18861,66 @@ ColorScheme Document::PreferredColorScheme(IgnoreRFP aIgnoreRFP) const {
|
||||
return PreferenceSheet::PrefsFor(*this).mColorScheme;
|
||||
}
|
||||
|
||||
|
|
@ -837,7 +834,6 @@ index 0a2f5be08d0dcad40cd11f4b064a1287b8141e2f..a845203c6aaea8384e8835cbe0056697
|
|||
+ case dom::PrefersReducedMotionOverride::No_preference:
|
||||
+ return false;
|
||||
+ case dom::PrefersReducedMotionOverride::None:
|
||||
+ case dom::PrefersReducedMotionOverride::EndGuard_:
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
|
|
@ -866,7 +862,6 @@ index 0a2f5be08d0dcad40cd11f4b064a1287b8141e2f..a845203c6aaea8384e8835cbe0056697
|
|||
+ case dom::ForcedColorsOverride::None:
|
||||
+ return false;
|
||||
+ case dom::ForcedColorsOverride::No_override:
|
||||
+ case dom::ForcedColorsOverride::EndGuard_:
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
|
|
@ -881,10 +876,10 @@ index 0a2f5be08d0dcad40cd11f4b064a1287b8141e2f..a845203c6aaea8384e8835cbe0056697
|
|||
if (!sLoadingForegroundTopLevelContentDocument) {
|
||||
return false;
|
||||
diff --git a/dom/base/Document.h b/dom/base/Document.h
|
||||
index 3f8032594868b8aa1c8bec2d25b789518170eb0e..5017b426369378b892a224a88410f18e743da45f 100644
|
||||
index a52c61addffc4a2344fa06cb0bceebe6a7ca9075..b0f8d65e5341bf277e48bef3b88cb4cc384fbc49 100644
|
||||
--- a/dom/base/Document.h
|
||||
+++ b/dom/base/Document.h
|
||||
@@ -4051,6 +4051,9 @@ class Document : public nsINode,
|
||||
@@ -4044,6 +4044,9 @@ class Document : public nsINode,
|
||||
// color-scheme meta tag.
|
||||
ColorScheme DefaultColorScheme() const;
|
||||
|
||||
|
|
@ -895,10 +890,10 @@ index 3f8032594868b8aa1c8bec2d25b789518170eb0e..5017b426369378b892a224a88410f18e
|
|||
|
||||
static bool AutomaticStorageAccessPermissionCanBeGranted(
|
||||
diff --git a/dom/base/Navigator.cpp b/dom/base/Navigator.cpp
|
||||
index d4b04f809228fecc3e2dbf33dac42151ffc24b11..39dfddff7404e878cd9fcc8f3b9bb734ab72d743 100644
|
||||
index 14a00b8ed85f69312a89990acbb5e0f9755bd832..4b07c28615920a95a2ba59247f8575515cac4235 100644
|
||||
--- a/dom/base/Navigator.cpp
|
||||
+++ b/dom/base/Navigator.cpp
|
||||
@@ -335,14 +335,18 @@ void Navigator::GetAppName(nsAString& aAppName) const {
|
||||
@@ -338,14 +338,18 @@ void Navigator::GetAppName(nsAString& aAppName) const {
|
||||
* for more detail.
|
||||
*/
|
||||
/* static */
|
||||
|
|
@ -919,7 +914,7 @@ index d4b04f809228fecc3e2dbf33dac42151ffc24b11..39dfddff7404e878cd9fcc8f3b9bb734
|
|||
|
||||
// Split values on commas.
|
||||
for (nsDependentSubstring lang :
|
||||
@@ -394,7 +398,13 @@ void Navigator::GetLanguage(nsAString& aLanguage) {
|
||||
@@ -397,7 +401,13 @@ void Navigator::GetLanguage(nsAString& aLanguage) {
|
||||
}
|
||||
|
||||
void Navigator::GetLanguages(nsTArray<nsString>& aLanguages) {
|
||||
|
|
@ -935,10 +930,10 @@ index d4b04f809228fecc3e2dbf33dac42151ffc24b11..39dfddff7404e878cd9fcc8f3b9bb734
|
|||
// The returned value is cached by the binding code. The window listens to the
|
||||
// accept languages change and will clear the cache when needed. It has to
|
||||
diff --git a/dom/base/Navigator.h b/dom/base/Navigator.h
|
||||
index 998328cfc6f36fd579e4fe26629a92a1ceefa9fa..c73e48d8dfe5a66fb9eb7f6bf49527f88cabc884 100644
|
||||
index e559dc4d6aef61b7012a27f3d6c3186a12a15319..9798a50789ce972c4d9e94419e20a5cde4cd552a 100644
|
||||
--- a/dom/base/Navigator.h
|
||||
+++ b/dom/base/Navigator.h
|
||||
@@ -216,7 +216,7 @@ class Navigator final : public nsISupports, public nsWrapperCache {
|
||||
@@ -215,7 +215,7 @@ class Navigator final : public nsISupports, public nsWrapperCache {
|
||||
|
||||
StorageManager* Storage();
|
||||
|
||||
|
|
@ -948,10 +943,10 @@ index 998328cfc6f36fd579e4fe26629a92a1ceefa9fa..c73e48d8dfe5a66fb9eb7f6bf49527f8
|
|||
dom::MediaCapabilities* MediaCapabilities();
|
||||
dom::MediaSession* MediaSession();
|
||||
diff --git a/dom/base/nsContentUtils.cpp b/dom/base/nsContentUtils.cpp
|
||||
index 6d3a9f8937a7b37bf82a18362d7ee525e4e267f4..c598acdcda9d47cdd193011e8faa916988872a18 100644
|
||||
index c6f1687f73df6b1849a191ff8722dc9fc26fc3eb..9fdface27d5c9bd0c61b8af229a31be2356c46b5 100644
|
||||
--- a/dom/base/nsContentUtils.cpp
|
||||
+++ b/dom/base/nsContentUtils.cpp
|
||||
@@ -8697,7 +8697,8 @@ nsresult nsContentUtils::SendMouseEvent(
|
||||
@@ -8711,7 +8711,8 @@ nsresult nsContentUtils::SendMouseEvent(
|
||||
bool aIgnoreRootScrollFrame, float aPressure,
|
||||
unsigned short aInputSourceArg, uint32_t aIdentifier, bool aToWindow,
|
||||
PreventDefaultResult* aPreventDefault, bool aIsDOMEventSynthesized,
|
||||
|
|
@ -961,7 +956,7 @@ index 6d3a9f8937a7b37bf82a18362d7ee525e4e267f4..c598acdcda9d47cdd193011e8faa9169
|
|||
nsPoint offset;
|
||||
nsCOMPtr<nsIWidget> widget = GetWidget(aPresShell, &offset);
|
||||
if (!widget) return NS_ERROR_FAILURE;
|
||||
@@ -8705,6 +8706,7 @@ nsresult nsContentUtils::SendMouseEvent(
|
||||
@@ -8719,6 +8720,7 @@ nsresult nsContentUtils::SendMouseEvent(
|
||||
EventMessage msg;
|
||||
Maybe<WidgetMouseEvent::ExitFrom> exitFrom;
|
||||
bool contextMenuKey = false;
|
||||
|
|
@ -969,7 +964,7 @@ index 6d3a9f8937a7b37bf82a18362d7ee525e4e267f4..c598acdcda9d47cdd193011e8faa9169
|
|||
if (aType.EqualsLiteral("mousedown")) {
|
||||
msg = eMouseDown;
|
||||
} else if (aType.EqualsLiteral("mouseup")) {
|
||||
@@ -8729,6 +8731,12 @@ nsresult nsContentUtils::SendMouseEvent(
|
||||
@@ -8743,6 +8745,12 @@ nsresult nsContentUtils::SendMouseEvent(
|
||||
msg = eMouseHitTest;
|
||||
} else if (aType.EqualsLiteral("MozMouseExploreByTouch")) {
|
||||
msg = eMouseExploreByTouch;
|
||||
|
|
@ -982,7 +977,7 @@ index 6d3a9f8937a7b37bf82a18362d7ee525e4e267f4..c598acdcda9d47cdd193011e8faa9169
|
|||
} else {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
@@ -8737,12 +8745,21 @@ nsresult nsContentUtils::SendMouseEvent(
|
||||
@@ -8751,12 +8759,21 @@ nsresult nsContentUtils::SendMouseEvent(
|
||||
aInputSourceArg = MouseEvent_Binding::MOZ_SOURCE_MOUSE;
|
||||
}
|
||||
|
||||
|
|
@ -1006,7 +1001,7 @@ index 6d3a9f8937a7b37bf82a18362d7ee525e4e267f4..c598acdcda9d47cdd193011e8faa9169
|
|||
event.pointerId = aIdentifier;
|
||||
event.mModifiers = GetWidgetModifiers(aModifiers);
|
||||
event.mButton = aButton;
|
||||
@@ -8753,8 +8770,10 @@ nsresult nsContentUtils::SendMouseEvent(
|
||||
@@ -8767,8 +8784,10 @@ nsresult nsContentUtils::SendMouseEvent(
|
||||
event.mPressure = aPressure;
|
||||
event.mInputSource = aInputSourceArg;
|
||||
event.mClickCount = aClickCount;
|
||||
|
|
@ -1018,10 +1013,10 @@ index 6d3a9f8937a7b37bf82a18362d7ee525e4e267f4..c598acdcda9d47cdd193011e8faa9169
|
|||
nsPresContext* presContext = aPresShell->GetPresContext();
|
||||
if (!presContext) return NS_ERROR_FAILURE;
|
||||
diff --git a/dom/base/nsContentUtils.h b/dom/base/nsContentUtils.h
|
||||
index db68b67c5a3e60ac214231ac82fd9f652a697858..529b49b2c6c5f693747d847bca85e93415b9159c 100644
|
||||
index 338fc097dede02a538f240ba4cc66307086c7f56..8345e47237bc40490bd17019a053cce4c3d74a91 100644
|
||||
--- a/dom/base/nsContentUtils.h
|
||||
+++ b/dom/base/nsContentUtils.h
|
||||
@@ -2958,7 +2958,8 @@ class nsContentUtils {
|
||||
@@ -3055,7 +3055,8 @@ class nsContentUtils {
|
||||
int32_t aModifiers, bool aIgnoreRootScrollFrame, float aPressure,
|
||||
unsigned short aInputSourceArg, uint32_t aIdentifier, bool aToWindow,
|
||||
mozilla::PreventDefaultResult* aPreventDefault,
|
||||
|
|
@ -1032,7 +1027,7 @@ index db68b67c5a3e60ac214231ac82fd9f652a697858..529b49b2c6c5f693747d847bca85e934
|
|||
static void FirePageShowEventForFrameLoaderSwap(
|
||||
nsIDocShellTreeItem* aItem,
|
||||
diff --git a/dom/base/nsDOMWindowUtils.cpp b/dom/base/nsDOMWindowUtils.cpp
|
||||
index 6c547a9fd8604ac7fd7b965be473bc4120b2fdf7..c9aa1951da7af70913f77c76bb7c68ba144adaeb 100644
|
||||
index 9bc8340b9009717e0feecd5c14ff02be07a03daf..70ea04c7f11e6ccfadf72a82ec1741fac10ef5fd 100644
|
||||
--- a/dom/base/nsDOMWindowUtils.cpp
|
||||
+++ b/dom/base/nsDOMWindowUtils.cpp
|
||||
@@ -685,6 +685,26 @@ nsDOMWindowUtils::GetPresShellId(uint32_t* aPresShellId) {
|
||||
|
|
@ -1110,10 +1105,10 @@ index 63968c9b7a4e418e4c0de6e7a75fa215a36a9105..decf3ea3833ccdffd49a7aded2d600f9
|
|||
MOZ_CAN_RUN_SCRIPT
|
||||
nsresult SendTouchEventCommon(
|
||||
diff --git a/dom/base/nsFocusManager.cpp b/dom/base/nsFocusManager.cpp
|
||||
index 60f45157cdfceb7ebf4f9a1681d0e59dc1822360..964d7cc1b847cd8ef21cef29be4fdc11168b18d8 100644
|
||||
index 5a4cf78d65eee0adcbeca33787706113eca19de7..7c8016e422ccc9e86563eaa83c9acc1dad0e5967 100644
|
||||
--- a/dom/base/nsFocusManager.cpp
|
||||
+++ b/dom/base/nsFocusManager.cpp
|
||||
@@ -1673,6 +1673,10 @@ Maybe<uint64_t> nsFocusManager::SetFocusInner(Element* aNewContent,
|
||||
@@ -1675,6 +1675,10 @@ Maybe<uint64_t> nsFocusManager::SetFocusInner(Element* aNewContent,
|
||||
(GetActiveBrowsingContext() == newRootBrowsingContext);
|
||||
}
|
||||
|
||||
|
|
@ -1124,7 +1119,27 @@ index 60f45157cdfceb7ebf4f9a1681d0e59dc1822360..964d7cc1b847cd8ef21cef29be4fdc11
|
|||
// Exit fullscreen if a website focuses another window
|
||||
if (StaticPrefs::full_screen_api_exit_on_windowRaise() &&
|
||||
!isElementInActiveWindow && (aFlags & FLAG_RAISE)) {
|
||||
@@ -2946,7 +2950,9 @@ void nsFocusManager::RaiseWindow(nsPIDOMWindowOuter* aWindow,
|
||||
@@ -2242,6 +2246,7 @@ bool nsFocusManager::BlurImpl(BrowsingContext* aBrowsingContextToClear,
|
||||
bool aIsLeavingDocument, bool aAdjustWidget,
|
||||
bool aRemainActive, Element* aElementToFocus,
|
||||
uint64_t aActionId) {
|
||||
+
|
||||
LOGFOCUS(("<<Blur begin actionid: %" PRIu64 ">>", aActionId));
|
||||
|
||||
// hold a reference to the focused content, which may be null
|
||||
@@ -2288,6 +2293,11 @@ bool nsFocusManager::BlurImpl(BrowsingContext* aBrowsingContextToClear,
|
||||
return true;
|
||||
}
|
||||
|
||||
+ // Playwright: emulate focused page by never bluring when leaving document.
|
||||
+ if (XRE_IsContentProcess() && aIsLeavingDocument && docShell && nsDocShell::Cast(docShell)->ShouldOverrideHasFocus()) {
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
// Keep a ref to presShell since dispatching the DOM event may cause
|
||||
// the document to be destroyed.
|
||||
RefPtr<PresShell> presShell = docShell->GetPresShell();
|
||||
@@ -2947,7 +2957,9 @@ void nsFocusManager::RaiseWindow(nsPIDOMWindowOuter* aWindow,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1136,10 +1151,10 @@ index 60f45157cdfceb7ebf4f9a1681d0e59dc1822360..964d7cc1b847cd8ef21cef29be4fdc11
|
|||
// care of lowering the present active window. This happens in
|
||||
// a separate runnable to avoid touching multiple windows in
|
||||
diff --git a/dom/base/nsGlobalWindowOuter.cpp b/dom/base/nsGlobalWindowOuter.cpp
|
||||
index a10808b95d5f7c81942d2a513f63a72c7821061e..027b9a3c87811b794816bddb90ff67bc271f7faa 100644
|
||||
index e28dcdb092b23558702377af32eece5d273d4cf3..a37ae9d6ccd978d5e84562450e7039d6a75d517b 100644
|
||||
--- a/dom/base/nsGlobalWindowOuter.cpp
|
||||
+++ b/dom/base/nsGlobalWindowOuter.cpp
|
||||
@@ -2510,10 +2510,16 @@ nsresult nsGlobalWindowOuter::SetNewDocument(Document* aDocument,
|
||||
@@ -2509,10 +2509,16 @@ nsresult nsGlobalWindowOuter::SetNewDocument(Document* aDocument,
|
||||
}();
|
||||
|
||||
if (!isContentAboutBlankInChromeDocshell) {
|
||||
|
|
@ -1160,7 +1175,7 @@ index a10808b95d5f7c81942d2a513f63a72c7821061e..027b9a3c87811b794816bddb90ff67bc
|
|||
}
|
||||
}
|
||||
|
||||
@@ -2633,6 +2639,19 @@ void nsGlobalWindowOuter::DispatchDOMWindowCreated() {
|
||||
@@ -2632,6 +2638,19 @@ void nsGlobalWindowOuter::DispatchDOMWindowCreated() {
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1193,10 +1208,10 @@ index 8337a7353fb8e97372f0b57bd0fd867506a9129f..e7dedd6d26125e481e1145337a0be6ab
|
|||
// Outer windows only.
|
||||
virtual void EnsureSizeAndPositionUpToDate() override;
|
||||
diff --git a/dom/base/nsINode.cpp b/dom/base/nsINode.cpp
|
||||
index 11ca350f483458ba11f0ee170ce38e9785e8c70f..6bb310f6e96239388b4c92bd7bdf2d698fac8139 100644
|
||||
index d5455e559639aee9328905b50f02c52e94db950b..3fbd1e0459e5391066fc6b3a4e30a841594b31bf 100644
|
||||
--- a/dom/base/nsINode.cpp
|
||||
+++ b/dom/base/nsINode.cpp
|
||||
@@ -1362,6 +1362,61 @@ void nsINode::GetBoxQuadsFromWindowOrigin(const BoxQuadOptions& aOptions,
|
||||
@@ -1365,6 +1365,61 @@ void nsINode::GetBoxQuadsFromWindowOrigin(const BoxQuadOptions& aOptions,
|
||||
mozilla::GetBoxQuadsFromWindowOrigin(this, aOptions, aResult, aRv);
|
||||
}
|
||||
|
||||
|
|
@ -1259,10 +1274,10 @@ index 11ca350f483458ba11f0ee170ce38e9785e8c70f..6bb310f6e96239388b4c92bd7bdf2d69
|
|||
DOMQuad& aQuad, const GeometryNode& aFrom,
|
||||
const ConvertCoordinateOptions& aOptions, CallerType aCallerType,
|
||||
diff --git a/dom/base/nsINode.h b/dom/base/nsINode.h
|
||||
index 0ba44cb08ffffde3bf9616e7e3b1fb33317181b6..b698e309e7bf658739b3a69a1d68f657a6c84e6e 100644
|
||||
index 3a47992cc89176fe9500f7b1d5b74e4422cb9625..27e6da8498af5e4a3c37407a3a8ab592e28dc372 100644
|
||||
--- a/dom/base/nsINode.h
|
||||
+++ b/dom/base/nsINode.h
|
||||
@@ -2235,6 +2235,10 @@ class nsINode : public mozilla::dom::EventTarget {
|
||||
@@ -2248,6 +2248,10 @@ class nsINode : public mozilla::dom::EventTarget {
|
||||
nsTArray<RefPtr<DOMQuad>>& aResult,
|
||||
ErrorResult& aRv);
|
||||
|
||||
|
|
@ -1302,7 +1317,7 @@ index cceb725d393d5e5f83c8f87491089c3fa1d57cc3..e906a7fb7c3fd72554613f640dcc272e
|
|||
|
||||
static bool DumpEnabled();
|
||||
diff --git a/dom/chrome-webidl/BrowsingContext.webidl b/dom/chrome-webidl/BrowsingContext.webidl
|
||||
index 8600a844634eed78e0b8470eaf11144f8ebd230b..853a4c98b78092181ad15542ae48cd41e9c49a82 100644
|
||||
index d70f3e18cc8e8f749e5057297161206129871453..2f2be2a6539203d1957bfe580a06ab70a512c053 100644
|
||||
--- a/dom/chrome-webidl/BrowsingContext.webidl
|
||||
+++ b/dom/chrome-webidl/BrowsingContext.webidl
|
||||
@@ -53,6 +53,24 @@ enum PrefersColorSchemeOverride {
|
||||
|
|
@ -1330,7 +1345,7 @@ index 8600a844634eed78e0b8470eaf11144f8ebd230b..853a4c98b78092181ad15542ae48cd41
|
|||
/**
|
||||
* Allowed overrides of platform/pref default behaviour for touch events.
|
||||
*/
|
||||
@@ -205,6 +223,12 @@ interface BrowsingContext {
|
||||
@@ -209,6 +227,12 @@ interface BrowsingContext {
|
||||
// Color-scheme simulation, for DevTools.
|
||||
[SetterThrows] attribute PrefersColorSchemeOverride prefersColorSchemeOverride;
|
||||
|
||||
|
|
@ -1443,10 +1458,10 @@ index 7e1af00d05fbafa2d828e2c7e4dcc5c82d115f5b..e85af9718d064e4d2865bc944e9d4ba1
|
|||
~Geolocation();
|
||||
|
||||
diff --git a/dom/html/HTMLInputElement.cpp b/dom/html/HTMLInputElement.cpp
|
||||
index ae2c4af82c3827a521a79f8879a6f941ea68feca..92ea48eba6fb575ea1415d8713b49707b895561b 100644
|
||||
index d5a65a17555b7764611803f7fb298712b2c60fd7..fdee7deaf0b14e01702b902f8b73256c281e76b8 100644
|
||||
--- a/dom/html/HTMLInputElement.cpp
|
||||
+++ b/dom/html/HTMLInputElement.cpp
|
||||
@@ -58,6 +58,7 @@
|
||||
@@ -57,6 +57,7 @@
|
||||
#include "mozilla/dom/Document.h"
|
||||
#include "mozilla/dom/HTMLDataListElement.h"
|
||||
#include "mozilla/dom/HTMLOptionElement.h"
|
||||
|
|
@ -1454,11 +1469,12 @@ index ae2c4af82c3827a521a79f8879a6f941ea68feca..92ea48eba6fb575ea1415d8713b49707
|
|||
#include "nsIFormControlFrame.h"
|
||||
#include "nsITextControlFrame.h"
|
||||
#include "nsIFrame.h"
|
||||
@@ -784,6 +785,12 @@ nsresult HTMLInputElement::InitFilePicker(FilePickerType aType) {
|
||||
@@ -783,6 +784,13 @@ nsresult HTMLInputElement::InitFilePicker(FilePickerType aType) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
+ nsDocShell* docShell = static_cast<nsDocShell*>(win->GetDocShell());
|
||||
+ nsCOMPtr<nsPIDOMWindowOuter> win = doc->GetWindow();
|
||||
+ nsDocShell* docShell = win ? static_cast<nsDocShell*>(win->GetDocShell()) : nullptr;
|
||||
+ if (docShell && docShell->IsFileInputInterceptionEnabled()) {
|
||||
+ docShell->FilePickerShown(this);
|
||||
+ return NS_OK;
|
||||
|
|
@ -1468,7 +1484,7 @@ index ae2c4af82c3827a521a79f8879a6f941ea68feca..92ea48eba6fb575ea1415d8713b49707
|
|||
return NS_OK;
|
||||
}
|
||||
diff --git a/dom/interfaces/base/nsIDOMWindowUtils.idl b/dom/interfaces/base/nsIDOMWindowUtils.idl
|
||||
index 564b24e3f89e0ce6e683902a7fc4e1c3a6f5faac..e4264b251e580bb13aa2941b26227541c74d3371 100644
|
||||
index 6a0df1b435cee9cea3b7d7ca30d0aff0e31f8ac0..c17b24823dd873c025e407fcc635b7c678dfd8ed 100644
|
||||
--- a/dom/interfaces/base/nsIDOMWindowUtils.idl
|
||||
+++ b/dom/interfaces/base/nsIDOMWindowUtils.idl
|
||||
@@ -373,6 +373,26 @@ interface nsIDOMWindowUtils : nsISupports {
|
||||
|
|
@ -1499,10 +1515,10 @@ index 564b24e3f89e0ce6e683902a7fc4e1c3a6f5faac..e4264b251e580bb13aa2941b26227541
|
|||
* touchstart, touchend, touchmove, and touchcancel
|
||||
*
|
||||
diff --git a/dom/ipc/BrowserChild.cpp b/dom/ipc/BrowserChild.cpp
|
||||
index 830ad8579a39d262a1fd2c86479f2ddc77c01ae2..b840b68c9b5545fc974e1dafacac2e74372f4e41 100644
|
||||
index bdd10fdcb285e43778b55907ac05bfa973207e5e..d98808918ff8eccd6c51b4fbce1cce5e3745206a 100644
|
||||
--- a/dom/ipc/BrowserChild.cpp
|
||||
+++ b/dom/ipc/BrowserChild.cpp
|
||||
@@ -1651,6 +1651,21 @@ void BrowserChild::HandleRealMouseButtonEvent(const WidgetMouseEvent& aEvent,
|
||||
@@ -1652,6 +1652,21 @@ void BrowserChild::HandleRealMouseButtonEvent(const WidgetMouseEvent& aEvent,
|
||||
if (postLayerization) {
|
||||
postLayerization->Register();
|
||||
}
|
||||
|
|
@ -1777,7 +1793,7 @@ index 3b39538e51840cd9b1685b2efd2ff2e9ec83608a..c7bf4f2d53b58bbacb22b3ebebf6f3fc
|
|||
|
||||
return aGlobalOrNull;
|
||||
diff --git a/dom/security/nsCSPUtils.cpp b/dom/security/nsCSPUtils.cpp
|
||||
index 50730b691b06409f47cb9172570866a7bb519abc..e5ae4f31b8f93f17943c24108a82c6370470e9f2 100644
|
||||
index 11d09909f73fee425fd0f50b384c396a52e02a36..b0e668881bcd3b850de709ebf2557ae8391b8fe8 100644
|
||||
--- a/dom/security/nsCSPUtils.cpp
|
||||
+++ b/dom/security/nsCSPUtils.cpp
|
||||
@@ -22,6 +22,7 @@
|
||||
|
|
@ -1824,10 +1840,10 @@ index 2f71b284ee5f7e11f117c447834b48355784448c..2640bd57123c2b03bf4b06a2419cd020
|
|||
* returned quads are further translated relative to the window
|
||||
* origin -- which is not the layout origin. Further translation
|
||||
diff --git a/dom/workers/RuntimeService.cpp b/dom/workers/RuntimeService.cpp
|
||||
index bcfbe33925afb97e68305394fb38e42481682540..47bc46f34a93991f112292c851c539a6bc97778f 100644
|
||||
index 02efb1205382850b41c38d5f6ee47092adcdc63e..28c8d05d0b5cc415f3d13a4588248f3844faf4f2 100644
|
||||
--- a/dom/workers/RuntimeService.cpp
|
||||
+++ b/dom/workers/RuntimeService.cpp
|
||||
@@ -985,7 +985,7 @@ void PrefLanguagesChanged(const char* /* aPrefName */, void* /* aClosure */) {
|
||||
@@ -995,7 +995,7 @@ void PrefLanguagesChanged(const char* /* aPrefName */, void* /* aClosure */) {
|
||||
AssertIsOnMainThread();
|
||||
|
||||
nsTArray<nsString> languages;
|
||||
|
|
@ -1836,7 +1852,7 @@ index bcfbe33925afb97e68305394fb38e42481682540..47bc46f34a93991f112292c851c539a6
|
|||
|
||||
RuntimeService* runtime = RuntimeService::GetService();
|
||||
if (runtime) {
|
||||
@@ -1172,8 +1172,7 @@ bool RuntimeService::RegisterWorker(WorkerPrivate& aWorkerPrivate) {
|
||||
@@ -1182,8 +1182,7 @@ bool RuntimeService::RegisterWorker(WorkerPrivate& aWorkerPrivate) {
|
||||
}
|
||||
|
||||
// The navigator overridden properties should have already been read.
|
||||
|
|
@ -1846,7 +1862,7 @@ index bcfbe33925afb97e68305394fb38e42481682540..47bc46f34a93991f112292c851c539a6
|
|||
mNavigatorPropertiesLoaded = true;
|
||||
}
|
||||
|
||||
@@ -1772,6 +1771,13 @@ void RuntimeService::PropagateStorageAccessPermissionGranted(
|
||||
@@ -1789,6 +1788,13 @@ void RuntimeService::PropagateStorageAccessPermissionGranted(
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1860,7 +1876,7 @@ index bcfbe33925afb97e68305394fb38e42481682540..47bc46f34a93991f112292c851c539a6
|
|||
template <typename Func>
|
||||
void RuntimeService::BroadcastAllWorkers(const Func& aFunc) {
|
||||
AssertIsOnMainThread();
|
||||
@@ -2287,6 +2293,14 @@ void PropagateStorageAccessPermissionGrantedToWorkers(
|
||||
@@ -2304,6 +2310,14 @@ void PropagateStorageAccessPermissionGrantedToWorkers(
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1876,10 +1892,10 @@ index bcfbe33925afb97e68305394fb38e42481682540..47bc46f34a93991f112292c851c539a6
|
|||
MOZ_ASSERT(!NS_IsMainThread());
|
||||
MOZ_ASSERT(aCx);
|
||||
diff --git a/dom/workers/RuntimeService.h b/dom/workers/RuntimeService.h
|
||||
index e6deb81f357043a937d032bb4b6c38207203f4d9..ff16582af9fbf550dfb7b5639658c34199524c45 100644
|
||||
index f51076ac1480794989999d00577bc9cf1566d5f9..fe15b2e00dc8f0bf203f2af9aad86e16c996d43d 100644
|
||||
--- a/dom/workers/RuntimeService.h
|
||||
+++ b/dom/workers/RuntimeService.h
|
||||
@@ -108,6 +108,8 @@ class RuntimeService final : public nsIObserver {
|
||||
@@ -109,6 +109,8 @@ class RuntimeService final : public nsIObserver {
|
||||
void PropagateStorageAccessPermissionGranted(
|
||||
const nsPIDOMWindowInner& aWindow);
|
||||
|
||||
|
|
@ -1902,17 +1918,17 @@ index d10dabb5c5ff8e17851edf2bd2efc08e74584d8e..53c4070c5fde43b27fb8fbfdcf4c23d8
|
|||
|
||||
bool IsWorkerGlobal(JSObject* global);
|
||||
diff --git a/dom/workers/WorkerPrivate.cpp b/dom/workers/WorkerPrivate.cpp
|
||||
index acef06ba3abb006932f26f8a96fd73028f015150..940210c603d906ae0469d826b81ba8f537e7fef5 100644
|
||||
index a8643981aa966e9324a5dbdb09b4fe57210dc581..5120df2607584a7cd50ea03aa997ef5ade5c8ee2 100644
|
||||
--- a/dom/workers/WorkerPrivate.cpp
|
||||
+++ b/dom/workers/WorkerPrivate.cpp
|
||||
@@ -679,6 +679,18 @@ class UpdateContextOptionsRunnable final : public WorkerControlRunnable {
|
||||
@@ -682,6 +682,18 @@ class UpdateContextOptionsRunnable final : public WorkerControlRunnable {
|
||||
}
|
||||
};
|
||||
|
||||
+class ResetDefaultLocaleRunnable final : public WorkerControlRunnable {
|
||||
+ public:
|
||||
+ explicit ResetDefaultLocaleRunnable(WorkerPrivate* aWorkerPrivate)
|
||||
+ : WorkerControlRunnable(aWorkerPrivate, WorkerThread) {}
|
||||
+ : WorkerControlRunnable(aWorkerPrivate, "ResetDefaultLocaleRunnable", WorkerThread) {}
|
||||
+
|
||||
+ virtual bool WorkerRun(JSContext* aCx,
|
||||
+ WorkerPrivate* aWorkerPrivate) override {
|
||||
|
|
@ -1924,7 +1940,7 @@ index acef06ba3abb006932f26f8a96fd73028f015150..940210c603d906ae0469d826b81ba8f5
|
|||
class UpdateLanguagesRunnable final : public WorkerRunnable {
|
||||
nsTArray<nsString> mLanguages;
|
||||
|
||||
@@ -1977,6 +1989,16 @@ void WorkerPrivate::UpdateContextOptions(
|
||||
@@ -1993,6 +2005,16 @@ void WorkerPrivate::UpdateContextOptions(
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1941,7 +1957,7 @@ index acef06ba3abb006932f26f8a96fd73028f015150..940210c603d906ae0469d826b81ba8f5
|
|||
void WorkerPrivate::UpdateLanguages(const nsTArray<nsString>& aLanguages) {
|
||||
AssertIsOnParentThread();
|
||||
|
||||
@@ -5480,6 +5502,15 @@ void WorkerPrivate::UpdateContextOptionsInternal(
|
||||
@@ -5489,6 +5511,15 @@ void WorkerPrivate::UpdateContextOptionsInternal(
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2032,10 +2048,10 @@ index 523e84c8c93f4221701f90f2e8ee146ec8e1adbd..98d5b1176e5378431b859a2dbd4d4e77
|
|||
inline ClippedTime TimeClip(double time);
|
||||
|
||||
diff --git a/js/src/debugger/Object.cpp b/js/src/debugger/Object.cpp
|
||||
index c5a4f1f6dcf95922b5c8506d6bd24ad4fd2f1efc..a79bb0ad42d1bbd0434cda27c118cdd099013ab2 100644
|
||||
index 17528b0fd99ce8274e702746ff5674de4c3d4f2d..37fa52ae07381bec3504136b9bec0aa1ca110d6b 100644
|
||||
--- a/js/src/debugger/Object.cpp
|
||||
+++ b/js/src/debugger/Object.cpp
|
||||
@@ -2450,7 +2450,11 @@ Maybe<Completion> DebuggerObject::call(JSContext* cx,
|
||||
@@ -2468,7 +2468,11 @@ Maybe<Completion> DebuggerObject::call(JSContext* cx,
|
||||
invokeArgs[i].set(args2[i]);
|
||||
}
|
||||
|
||||
|
|
@ -2202,10 +2218,10 @@ index dac899f7558b26d6848da8b98ed8a93555c8751a..2a07d67fa1c2840b25085566e84dc3b2
|
|||
// No boxes to return
|
||||
return;
|
||||
diff --git a/layout/base/PresShell.cpp b/layout/base/PresShell.cpp
|
||||
index 4afd2b10dfdab527b63f17919c52a559b3ac3de6..787283c004d9baa7227f00c338e0322dca88f949 100644
|
||||
index 31c21c337786b76306029149a925293a44c45c28..7aa4eb0b4980bb8ecdc4e10c91b1cd70e5d0ad08 100644
|
||||
--- a/layout/base/PresShell.cpp
|
||||
+++ b/layout/base/PresShell.cpp
|
||||
@@ -10963,7 +10963,9 @@ bool PresShell::ComputeActiveness() const {
|
||||
@@ -11127,7 +11127,9 @@ bool PresShell::ComputeActiveness() const {
|
||||
if (!browserChild->IsVisible()) {
|
||||
MOZ_LOG(gLog, LogLevel::Debug,
|
||||
(" > BrowserChild %p is not visible", browserChild));
|
||||
|
|
@ -2229,10 +2245,10 @@ index 7bb839ae18835d128dc9285b7f9dc5b5e06335af..09e3979d07447522ace740daf2b818a6
|
|||
const mozilla::dom::Document*);
|
||||
mozilla::StylePrefersColorScheme Gecko_MediaFeatures_PrefersColorScheme(
|
||||
diff --git a/layout/style/nsMediaFeatures.cpp b/layout/style/nsMediaFeatures.cpp
|
||||
index c99eecb4867c623b8ccc6e6fb42986d71f795cc0..d127837d7e069818daaeb73ef42497226ff95e26 100644
|
||||
index f888c127d4423336a8f51e2011fc42eaf6c33f11..51d6e069f4a81c42b4bf270ba44ae4f82b8df592 100644
|
||||
--- a/layout/style/nsMediaFeatures.cpp
|
||||
+++ b/layout/style/nsMediaFeatures.cpp
|
||||
@@ -257,11 +257,11 @@ bool Gecko_MediaFeatures_MatchesPlatform(StylePlatform aPlatform) {
|
||||
@@ -260,11 +260,11 @@ bool Gecko_MediaFeatures_MatchesPlatform(StylePlatform aPlatform) {
|
||||
}
|
||||
|
||||
bool Gecko_MediaFeatures_PrefersReducedMotion(const Document* aDocument) {
|
||||
|
|
@ -2250,7 +2266,7 @@ index c99eecb4867c623b8ccc6e6fb42986d71f795cc0..d127837d7e069818daaeb73ef4249722
|
|||
|
||||
bool Gecko_MediaFeatures_PrefersReducedTransparency(const Document* aDocument) {
|
||||
diff --git a/netwerk/base/LoadInfo.cpp b/netwerk/base/LoadInfo.cpp
|
||||
index b15f24fffd7ea5a8a00319451fa7ebf9df32ec05..0279f6626f2ac938b0456d370fd956f2a23a036b 100644
|
||||
index eb90324c37ce515e5a0fcf75412605ae57ead9ee..6733dd6c99d77399529945386caa3926960e4176 100644
|
||||
--- a/netwerk/base/LoadInfo.cpp
|
||||
+++ b/netwerk/base/LoadInfo.cpp
|
||||
@@ -653,7 +653,8 @@ LoadInfo::LoadInfo(const LoadInfo& rhs)
|
||||
|
|
@ -2337,7 +2353,7 @@ index 155daa5cd52c4e93e1cc4559875868f4faf2c37e..02e8a2614a27a4cc9e1de760d4c48617
|
|||
/**
|
||||
* Set the status and reason for the forthcoming synthesized response.
|
||||
diff --git a/netwerk/ipc/DocumentLoadListener.cpp b/netwerk/ipc/DocumentLoadListener.cpp
|
||||
index ca1f59e8847bd399fcf3018ede95d318265c374c..d114f0bcaddedc3553780ff7b97e395e28aff91e 100644
|
||||
index d849eab7507f0665a8a79a1b11759afa3481f1ad..3a95d5201a1c1f2161a95e15beae86f2833a875f 100644
|
||||
--- a/netwerk/ipc/DocumentLoadListener.cpp
|
||||
+++ b/netwerk/ipc/DocumentLoadListener.cpp
|
||||
@@ -167,6 +167,7 @@ static auto CreateDocumentLoadInfo(CanonicalBrowsingContext* aBrowsingContext,
|
||||
|
|
@ -2387,10 +2403,10 @@ index c58fbc96391f8dcb585bd00b5ae8cba9088abd82..c121c891b61c9d60df770020c4ad0952
|
|||
if (mPump && mLoadFlags & LOAD_CALL_CONTENT_SNIFFERS) {
|
||||
mPump->PeekStream(CallTypeSniffers, static_cast<nsIChannel*>(this));
|
||||
diff --git a/parser/html/nsHtml5TreeOpExecutor.cpp b/parser/html/nsHtml5TreeOpExecutor.cpp
|
||||
index 3cb38dcf28a5cb3a8e70c336c8b1c822be59268f..4d9ae3ab666d4ba7b42730d50367720870f0183f 100644
|
||||
index f2c47c42a6b6448ede3a6fef1510a3982336d5af..9e35df57102c93238de2e4d548bbe1205d227f3b 100644
|
||||
--- a/parser/html/nsHtml5TreeOpExecutor.cpp
|
||||
+++ b/parser/html/nsHtml5TreeOpExecutor.cpp
|
||||
@@ -1381,6 +1381,10 @@ void nsHtml5TreeOpExecutor::UpdateReferrerInfoFromMeta(
|
||||
@@ -1382,6 +1382,10 @@ void nsHtml5TreeOpExecutor::UpdateReferrerInfoFromMeta(
|
||||
void nsHtml5TreeOpExecutor::AddSpeculationCSP(const nsAString& aCSP) {
|
||||
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
|
||||
|
||||
|
|
@ -2498,10 +2514,10 @@ index 73c83e526be1a3a252f995d0718e3975d50bffa7..db5977c54221e19e107a8325a0834302
|
|||
(lazy.isRunningTests || Cu.isInAutomation) &&
|
||||
this.SERVER_URL == "data:,#remote-settings-dummy/v1"
|
||||
diff --git a/servo/components/style/gecko/media_features.rs b/servo/components/style/gecko/media_features.rs
|
||||
index c9ad30b28b069a122cf01c5e97b83dc68ef022ff..f32dbcfe26fe2f6b8a0d066d6dfd208f1afc510d 100644
|
||||
index 8de45d95c2b942f069c898c93702bc7db2219369..be72e9678c3de31b1eaa72cfcb2c8be886f4a80f 100644
|
||||
--- a/servo/components/style/gecko/media_features.rs
|
||||
+++ b/servo/components/style/gecko/media_features.rs
|
||||
@@ -293,10 +293,15 @@ pub enum ForcedColors {
|
||||
@@ -292,10 +292,15 @@ pub enum ForcedColors {
|
||||
|
||||
/// https://drafts.csswg.org/mediaqueries-5/#forced-colors
|
||||
fn eval_forced_colors(context: &Context, query_value: Option<ForcedColors>) -> bool {
|
||||
|
|
@ -2597,10 +2613,10 @@ index 209af157a35cf9c4586424421ee19b3f680796b6..1feb61e2f18e9a13631addc935f00da0
|
|||
|
||||
/**
|
||||
diff --git a/toolkit/mozapps/update/UpdateService.sys.mjs b/toolkit/mozapps/update/UpdateService.sys.mjs
|
||||
index 290344c58bf488b4aa955c2c58bdaa11048e2f48..2d419b90e6c5a910d3038380cd6c819eb8b0c768 100644
|
||||
index 34bf1b9e19ae54f78d134b023af96820bc13a905..b85793edcd1996833420a026cb08706d648ece14 100644
|
||||
--- a/toolkit/mozapps/update/UpdateService.sys.mjs
|
||||
+++ b/toolkit/mozapps/update/UpdateService.sys.mjs
|
||||
@@ -3853,6 +3853,8 @@ UpdateService.prototype = {
|
||||
@@ -3852,6 +3852,8 @@ UpdateService.prototype = {
|
||||
},
|
||||
|
||||
get disabledForTesting() {
|
||||
|
|
@ -2610,7 +2626,7 @@ index 290344c58bf488b4aa955c2c58bdaa11048e2f48..2d419b90e6c5a910d3038380cd6c819e
|
|||
(Cu.isInAutomation ||
|
||||
lazy.Marionette.running ||
|
||||
diff --git a/toolkit/toolkit.mozbuild b/toolkit/toolkit.mozbuild
|
||||
index f554b692f7e874dd21be1ef783e899ba602ee7f3..dd6c94f8723ca227611c8390d9dcd4f292939703 100644
|
||||
index b697eb1e3b02b0ffcc95a6e492dc23eb888488cc..0f4059341dbb3c2ecb2c46be0850e0d56e2a7453 100644
|
||||
--- a/toolkit/toolkit.mozbuild
|
||||
+++ b/toolkit/toolkit.mozbuild
|
||||
@@ -155,6 +155,7 @@ if CONFIG["ENABLE_WEBDRIVER"]:
|
||||
|
|
@ -2622,7 +2638,7 @@ index f554b692f7e874dd21be1ef783e899ba602ee7f3..dd6c94f8723ca227611c8390d9dcd4f2
|
|||
]
|
||||
|
||||
diff --git a/toolkit/xre/nsWindowsWMain.cpp b/toolkit/xre/nsWindowsWMain.cpp
|
||||
index 7eb9e1104682d4eb47060654f43a1efa8b2a6bb2..a8315d6decf654b5302bea5beeea34140c300ded 100644
|
||||
index 2a91deec5c10f87ed09f99b659baab77b2b638f2..78f4f30a0efe314563c6405f7b0848d2c3ca0551 100644
|
||||
--- a/toolkit/xre/nsWindowsWMain.cpp
|
||||
+++ b/toolkit/xre/nsWindowsWMain.cpp
|
||||
@@ -14,8 +14,10 @@
|
||||
|
|
@ -2636,10 +2652,10 @@ index 7eb9e1104682d4eb47060654f43a1efa8b2a6bb2..a8315d6decf654b5302bea5beeea3414
|
|||
#include <windows.h>
|
||||
|
||||
#ifdef __MINGW32__
|
||||
@@ -114,6 +116,19 @@ static void FreeAllocStrings(int argc, char** argv) {
|
||||
int wmain(int argc, WCHAR** argv) {
|
||||
@@ -137,6 +139,19 @@ int wmain(int argc, WCHAR** argv) {
|
||||
SanitizeEnvironmentVariables();
|
||||
SetDllDirectoryW(L"");
|
||||
RemovePrefetchArguments(argc, argv);
|
||||
+ bool hasJugglerPipe =
|
||||
+ mozilla::CheckArg(argc, argv, "juggler-pipe", nullptr,
|
||||
+ mozilla::CheckArgFlag::None) == mozilla::ARG_FOUND;
|
||||
|
|
@ -2793,7 +2809,7 @@ index 4573e28470c5112f5ac2c5dd53e7a9d1ceedb943..b53b86d8e39f1de4b0d0f1a8d5d7295e
|
|||
// OnStartRequest)
|
||||
mDialog = nullptr;
|
||||
diff --git a/uriloader/exthandler/nsExternalHelperAppService.h b/uriloader/exthandler/nsExternalHelperAppService.h
|
||||
index 205f73cfa127e15e171854165c92551fea957e84..6399525ea0abb55655c824b086a043d022392113 100644
|
||||
index 1f77e095dbfa3acc046779114007d83fc1cfa087..2354abbab7af6f6bdc3bd628722f03ea401d236a 100644
|
||||
--- a/uriloader/exthandler/nsExternalHelperAppService.h
|
||||
+++ b/uriloader/exthandler/nsExternalHelperAppService.h
|
||||
@@ -257,6 +257,8 @@ class nsExternalHelperAppService : public nsIExternalHelperAppService,
|
||||
|
|
@ -2886,7 +2902,7 @@ index 1c25e9d9a101233f71e92288a0f93125b81ac1c5..22cf67b0f6e3ddd2b3ed725a314ba6a9
|
|||
}
|
||||
#endif
|
||||
diff --git a/widget/MouseEvents.h b/widget/MouseEvents.h
|
||||
index ea714704df53af78a55065ce7626798e0e674a23..a108e0459aeac9789adac7d7ec166abf94646454 100644
|
||||
index d29b406524c8b4afe437b559e33b4b2b5824ee58..6bef9c1657f93f90f96735d76fedb6ba3888b5c1 100644
|
||||
--- a/widget/MouseEvents.h
|
||||
+++ b/widget/MouseEvents.h
|
||||
@@ -258,6 +258,7 @@ class WidgetMouseEvent : public WidgetMouseEventBase,
|
||||
|
|
@ -2935,7 +2951,7 @@ diff --git a/widget/cocoa/NativeKeyBindings.mm b/widget/cocoa/NativeKeyBindings.
|
|||
index e4bdf715e2fb899e97a5bfeb2e147127460d6047..3554f919480278b7353617481c7ce8050630a1aa 100644
|
||||
--- a/widget/cocoa/NativeKeyBindings.mm
|
||||
+++ b/widget/cocoa/NativeKeyBindings.mm
|
||||
@@ -528,6 +528,13 @@ void NativeKeyBindings::GetEditCommandsForTests(
|
||||
@@ -528,6 +528,13 @@
|
||||
break;
|
||||
case KEY_NAME_INDEX_ArrowLeft:
|
||||
if (aEvent.IsAlt()) {
|
||||
|
|
@ -2949,7 +2965,7 @@ index e4bdf715e2fb899e97a5bfeb2e147127460d6047..3554f919480278b7353617481c7ce805
|
|||
break;
|
||||
}
|
||||
if (aEvent.IsMeta() || (aEvent.IsControl() && aEvent.IsShift())) {
|
||||
@@ -550,6 +557,13 @@ void NativeKeyBindings::GetEditCommandsForTests(
|
||||
@@ -550,6 +557,13 @@
|
||||
break;
|
||||
case KEY_NAME_INDEX_ArrowRight:
|
||||
if (aEvent.IsAlt()) {
|
||||
|
|
@ -2963,7 +2979,7 @@ index e4bdf715e2fb899e97a5bfeb2e147127460d6047..3554f919480278b7353617481c7ce805
|
|||
break;
|
||||
}
|
||||
if (aEvent.IsMeta() || (aEvent.IsControl() && aEvent.IsShift())) {
|
||||
@@ -572,6 +586,10 @@ void NativeKeyBindings::GetEditCommandsForTests(
|
||||
@@ -572,6 +586,10 @@
|
||||
break;
|
||||
case KEY_NAME_INDEX_ArrowUp:
|
||||
if (aEvent.IsControl()) {
|
||||
|
|
@ -2974,7 +2990,7 @@ index e4bdf715e2fb899e97a5bfeb2e147127460d6047..3554f919480278b7353617481c7ce805
|
|||
break;
|
||||
}
|
||||
if (aEvent.IsMeta()) {
|
||||
@@ -582,7 +600,7 @@ void NativeKeyBindings::GetEditCommandsForTests(
|
||||
@@ -582,7 +600,7 @@
|
||||
!aEvent.IsShift()
|
||||
? ToObjcSelectorPtr(@selector(moveToBeginningOfDocument:))
|
||||
: ToObjcSelectorPtr(
|
||||
|
|
@ -2983,7 +2999,7 @@ index e4bdf715e2fb899e97a5bfeb2e147127460d6047..3554f919480278b7353617481c7ce805
|
|||
aCommands);
|
||||
break;
|
||||
}
|
||||
@@ -609,6 +627,10 @@ void NativeKeyBindings::GetEditCommandsForTests(
|
||||
@@ -609,6 +627,10 @@
|
||||
break;
|
||||
case KEY_NAME_INDEX_ArrowDown:
|
||||
if (aEvent.IsControl()) {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
REMOTE_URL="https://github.com/WebKit/WebKit.git"
|
||||
BASE_BRANCH="main"
|
||||
BASE_REVISION="e225c278f4c06f451ea92cc68b12986dd2a99979"
|
||||
BASE_REVISION="b2ca06dc3d84b356d01cdf09a82049f80515fbfe"
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -41,7 +41,7 @@ await page.Clock.FastForwardAsync("30:00");
|
|||
|
||||
### param: Clock.fastForward.ticks
|
||||
* since: v1.45
|
||||
- `ticks` <[int]|[string]>
|
||||
- `ticks` <[long]|[string]>
|
||||
|
||||
Time may be the number of milliseconds to advance the clock by or a human-readable string. Valid string formats are "08" for eight seconds, "01:00" for one minute and "02:34:10" for two hours, 34 minutes and ten seconds.
|
||||
|
||||
|
|
@ -65,7 +65,7 @@ Fake timers are used to manually control the flow of time in tests. They allow y
|
|||
|
||||
### option: Clock.install.time
|
||||
* since: v1.45
|
||||
- `time` <[int]|[string]|[Date]>
|
||||
- `time` <[long]|[string]|[Date]>
|
||||
|
||||
Time to initialize with, current system time by default.
|
||||
|
||||
|
|
@ -103,7 +103,7 @@ await page.Clock.RunForAsync("30:00");
|
|||
|
||||
### param: Clock.runFor.ticks
|
||||
* since: v1.45
|
||||
- `ticks` <[int]|[string]>
|
||||
- `ticks` <[long]|[string]>
|
||||
|
||||
Time may be the number of milliseconds to advance the clock by or a human-readable string. Valid string formats are "08" for eight seconds, "01:00" for one minute and "02:34:10" for two hours, 34 minutes and ten seconds.
|
||||
|
||||
|
|
@ -147,7 +147,7 @@ await page.Clock.PauseAtAsync("2020-02-02");
|
|||
|
||||
### param: Clock.pauseAt.time
|
||||
* since: v1.45
|
||||
- `time` <[int]|[string]|[Date]>
|
||||
- `time` <[long]|[string]|[Date]>
|
||||
|
||||
|
||||
## async method: Clock.resume
|
||||
|
|
@ -195,7 +195,7 @@ await page.Clock.SetFixedTimeAsync("2020-02-02");
|
|||
|
||||
### param: Clock.setFixedTime.time
|
||||
* since: v1.45
|
||||
- `time` <[int]|[string]|[Date]>
|
||||
- `time` <[long]|[string]|[Date]>
|
||||
|
||||
Time to be set.
|
||||
|
||||
|
|
@ -238,4 +238,4 @@ await page.Clock.SetSystemTimeAsync("2020-02-02");
|
|||
|
||||
### param: Clock.setSystemTime.time
|
||||
* since: v1.45
|
||||
- `time` <[int]|[string]|[Date]>
|
||||
- `time` <[long]|[string]|[Date]>
|
||||
|
|
|
|||
|
|
@ -953,6 +953,7 @@ When all steps combined have not finished during the specified [`option: timeout
|
|||
|
||||
Sets the value of the file input to these file paths or files. If some of the `filePaths` are relative paths, then they
|
||||
are resolved relative to the current working directory. For empty array, clears the selected files.
|
||||
For inputs with a `[webkitdirectory]` attribute, only a single directory path is supported.
|
||||
|
||||
This method expects [ElementHandle] to point to an
|
||||
[input element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input). However, if the element is inside the `<label>` element that has an associated [control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), targets the control instead.
|
||||
|
|
|
|||
|
|
@ -2164,6 +2164,7 @@ When all steps combined have not finished during the specified [`option: timeout
|
|||
* since: v1.14
|
||||
|
||||
Upload file or multiple files into `<input type=file>`.
|
||||
For inputs with a `[webkitdirectory]` attribute, only a single directory path is supported.
|
||||
|
||||
**Usage**
|
||||
|
||||
|
|
@ -2177,6 +2178,9 @@ await page.getByLabel('Upload files').setInputFiles([
|
|||
path.join(__dirname, 'file2.txt'),
|
||||
]);
|
||||
|
||||
// Select a directory
|
||||
await page.getByLabel('Upload directory').setInputFiles(path.join(__dirname, 'mydir'));
|
||||
|
||||
// Remove all the selected files
|
||||
await page.getByLabel('Upload file').setInputFiles([]);
|
||||
|
||||
|
|
@ -2195,6 +2199,9 @@ page.getByLabel("Upload file").setInputFiles(Paths.get("myfile.pdf"));
|
|||
// Select multiple files
|
||||
page.getByLabel("Upload files").setInputFiles(new Path[] {Paths.get("file1.txt"), Paths.get("file2.txt")});
|
||||
|
||||
// Select a directory
|
||||
page.getByLabel("Upload directory").setInputFiles(Paths.get("mydir"));
|
||||
|
||||
// Remove all the selected files
|
||||
page.getByLabel("Upload file").setInputFiles(new Path[0]);
|
||||
|
||||
|
|
@ -2210,6 +2217,9 @@ await page.get_by_label("Upload file").set_input_files('myfile.pdf')
|
|||
# Select multiple files
|
||||
await page.get_by_label("Upload files").set_input_files(['file1.txt', 'file2.txt'])
|
||||
|
||||
# Select a directory
|
||||
await page.get_by_label("Upload directory").set_input_files('mydir')
|
||||
|
||||
# Remove all the selected files
|
||||
await page.get_by_label("Upload file").set_input_files([])
|
||||
|
||||
|
|
@ -2228,6 +2238,9 @@ page.get_by_label("Upload file").set_input_files('myfile.pdf')
|
|||
# Select multiple files
|
||||
page.get_by_label("Upload files").set_input_files(['file1.txt', 'file2.txt'])
|
||||
|
||||
# Select a directory
|
||||
page.get_by_label("Upload directory").set_input_files('mydir')
|
||||
|
||||
# Remove all the selected files
|
||||
page.get_by_label("Upload file").set_input_files([])
|
||||
|
||||
|
|
@ -2246,6 +2259,9 @@ await page.GetByLabel("Upload file").SetInputFilesAsync("myfile.pdf");
|
|||
// Select multiple files
|
||||
await page.GetByLabel("Upload files").SetInputFilesAsync(new[] { "file1.txt", "file12.txt" });
|
||||
|
||||
// Select a directory
|
||||
await page.GetByLabel("Upload directory").SetInputFilesAsync("mydir");
|
||||
|
||||
// Remove all the selected files
|
||||
await page.GetByLabel("Upload file").SetInputFilesAsync(new[] {});
|
||||
|
||||
|
|
|
|||
|
|
@ -3927,6 +3927,7 @@ An object containing additional HTTP headers to be sent with every request. All
|
|||
|
||||
Sets the value of the file input to these file paths or files. If some of the `filePaths` are relative paths, then they
|
||||
are resolved relative to the current working directory. For empty array, clears the selected files.
|
||||
For inputs with a `[webkitdirectory]` attribute, only a single directory path is supported.
|
||||
|
||||
This method expects [`param: selector`] to point to an
|
||||
[input element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input). However, if the element is inside the `<label>` element that has an associated [control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), targets the control instead.
|
||||
|
|
|
|||
|
|
@ -628,65 +628,15 @@ DEBUG=pw:browser dotnet test
|
|||
|
||||
## Running headed
|
||||
|
||||
By default, Playwright launches browsers in headless mode. This can be changed by passing a flag when the browser is launched.
|
||||
|
||||
```js
|
||||
// Works across chromium, firefox and webkit
|
||||
const { chromium } = require('playwright');
|
||||
const browser = await chromium.launch({ headless: false });
|
||||
```
|
||||
|
||||
```java
|
||||
// Works across chromium, firefox and webkit
|
||||
import com.microsoft.playwright.*;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
try (Playwright playwright = Playwright.create()) {
|
||||
BrowserType chromium = playwright.chromium();
|
||||
Browser browser = chromium.launch(new BrowserType.LaunchOptions().setHeadless(false));
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
```python async
|
||||
import asyncio
|
||||
from playwright.async_api import async_playwright
|
||||
|
||||
async def main():
|
||||
async with async_playwright() as p:
|
||||
# Works across chromium, firefox and webkit
|
||||
browser = await p.chromium.launch(headless=False)
|
||||
|
||||
asyncio.run(main())
|
||||
```
|
||||
|
||||
```python sync
|
||||
from playwright.sync_api import sync_playwright
|
||||
|
||||
with sync_playwright() as p:
|
||||
# Works across chromium, firefox and webkit
|
||||
browser = p.chromium.launch(headless=False)
|
||||
```
|
||||
|
||||
```csharp
|
||||
using Microsoft.Playwright;
|
||||
|
||||
using var playwright = await Playwright.CreateAsync();
|
||||
await playwright.Chromium.LaunchAsync(new()
|
||||
{
|
||||
Headless = false
|
||||
});
|
||||
```
|
||||
By default, Playwright launches browsers in headless mode. See in our [Running tests](./running-tests.md#run-tests-in-headed-mode) guide how to run tests in headed mode.
|
||||
|
||||
On Linux agents, headed execution requires [Xvfb](https://en.wikipedia.org/wiki/Xvfb) to be installed. Our [Docker image](./docker.md) and GitHub Action have Xvfb pre-installed. To run browsers in headed mode with Xvfb, add `xvfb-run` before the actual command.
|
||||
|
||||
```bash js
|
||||
xvfb-run node index.js
|
||||
xvfb-run npx playwrght test
|
||||
```
|
||||
```bash python
|
||||
xvfb-run python test.py
|
||||
xvfb-run pytest
|
||||
```
|
||||
```bash java
|
||||
xvfb-run mvn test
|
||||
|
|
|
|||
|
|
@ -397,17 +397,17 @@ page.locator("#area").pressSequentially("Hello World!");
|
|||
|
||||
```python async
|
||||
# Press keys one by one
|
||||
await page.locator('#area').pressSequentially('Hello World!')
|
||||
await page.locator('#area').press_sequentially('Hello World!')
|
||||
```
|
||||
|
||||
```python sync
|
||||
# Press keys one by one
|
||||
page.locator('#area').pressSequentially('Hello World!')
|
||||
page.locator('#area').press_sequentially('Hello World!')
|
||||
```
|
||||
|
||||
```csharp
|
||||
// Press keys one by one
|
||||
await page.Locator("#area").TypeAsync("Hello World!");
|
||||
await Page.Locator("#area").PressSequentiallyAsync("Hello World!");
|
||||
```
|
||||
|
||||
This method will emit all the necessary keyboard events, with all the `keydown`, `keyup`, `keypress` events in place. You can even specify the optional `delay` between the key presses to simulate real user behavior.
|
||||
|
|
@ -542,6 +542,9 @@ await page.getByLabel('Upload files').setInputFiles([
|
|||
path.join(__dirname, 'file2.txt'),
|
||||
]);
|
||||
|
||||
// Select a directory
|
||||
await page.getByLabel('Upload directory').setInputFiles(path.join(__dirname, 'mydir'));
|
||||
|
||||
// Remove all the selected files
|
||||
await page.getByLabel('Upload file').setInputFiles([]);
|
||||
|
||||
|
|
@ -560,6 +563,9 @@ page.getByLabel("Upload file").setInputFiles(Paths.get("myfile.pdf"));
|
|||
// Select multiple files
|
||||
page.getByLabel("Upload files").setInputFiles(new Path[] {Paths.get("file1.txt"), Paths.get("file2.txt")});
|
||||
|
||||
// Select a directory
|
||||
page.getByLabel("Upload directory").setInputFiles(Paths.get("mydir"));
|
||||
|
||||
// Remove all the selected files
|
||||
page.getByLabel("Upload file").setInputFiles(new Path[0]);
|
||||
|
||||
|
|
@ -575,6 +581,9 @@ await page.get_by_label("Upload file").set_input_files('myfile.pdf')
|
|||
# Select multiple files
|
||||
await page.get_by_label("Upload files").set_input_files(['file1.txt', 'file2.txt'])
|
||||
|
||||
# Select a directory
|
||||
await page.get_by_label("Upload directory").set_input_files('mydir')
|
||||
|
||||
# Remove all the selected files
|
||||
await page.get_by_label("Upload file").set_input_files([])
|
||||
|
||||
|
|
@ -593,6 +602,9 @@ page.get_by_label("Upload file").set_input_files('myfile.pdf')
|
|||
# Select multiple files
|
||||
page.get_by_label("Upload files").set_input_files(['file1.txt', 'file2.txt'])
|
||||
|
||||
# Select a directory
|
||||
page.get_by_label("Upload directory").set_input_files('mydir')
|
||||
|
||||
# Remove all the selected files
|
||||
page.get_by_label("Upload file").set_input_files([])
|
||||
|
||||
|
|
@ -611,6 +623,9 @@ await page.GetByLabel("Upload file").SetInputFilesAsync("myfile.pdf");
|
|||
// Select multiple files
|
||||
await page.GetByLabel("Upload files").SetInputFilesAsync(new[] { "file1.txt", "file12.txt" });
|
||||
|
||||
// Select a directory
|
||||
await page.GetByLabel("Upload directory").SetInputFilesAsync("mydir");
|
||||
|
||||
// Remove all the selected files
|
||||
await page.GetByLabel("Upload file").SetInputFilesAsync(new[] {});
|
||||
|
||||
|
|
|
|||
|
|
@ -180,7 +180,7 @@ See our doc on [Running and Debugging Tests](./running-tests.md) to learn more a
|
|||
|
||||
- Playwright is distributed as a .NET Standard 2.0 library. We recommend .NET 8.
|
||||
- Windows 10+, Windows Server 2016+ or Windows Subsystem for Linux (WSL).
|
||||
- MacOS 12 Monterey, MacOS 13 Ventura, or MacOS 14 Sonoma.
|
||||
- macOS 13 Ventura, or macOS 14 Sonoma.
|
||||
- Debian 11, Debian 12, Ubuntu 20.04 or Ubuntu 22.04, Ubuntu 24.04, on x86-64 and arm64 architecture.
|
||||
|
||||
## What's next
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ By default browsers launched with Playwright run headless, meaning no browser UI
|
|||
|
||||
- Java 8 or higher.
|
||||
- Windows 10+, Windows Server 2016+ or Windows Subsystem for Linux (WSL).
|
||||
- MacOS 12 Monterey, MacOS 13 Ventura, or MacOS 14 Sonoma.
|
||||
- macOS 13 Ventura, or macOS 14 Sonoma.
|
||||
- Debian 11, Debian 12, Ubuntu 20.04 or Ubuntu 22.04, Ubuntu 24.04, on x86-64 and arm64 architecture.
|
||||
|
||||
## What's next
|
||||
|
|
|
|||
|
|
@ -288,7 +288,7 @@ pnpm exec playwright --version
|
|||
|
||||
- Node.js 18+
|
||||
- Windows 10+, Windows Server 2016+ or Windows Subsystem for Linux (WSL).
|
||||
- MacOS 12 Monterey, MacOS 13 Ventura, or MacOS 14 Sonoma.
|
||||
- macOS 13 Ventura, or macOS 14 Sonoma.
|
||||
- Debian 11, Debian 12, Ubuntu 20.04 or Ubuntu 22.04, Ubuntu 24.04, on x86-64 and arm64 architecture.
|
||||
|
||||
## What's next
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ pip install pytest-playwright playwright -U
|
|||
|
||||
- Python 3.8 or higher.
|
||||
- Windows 10+, Windows Server 2016+ or Windows Subsystem for Linux (WSL).
|
||||
- MacOS 12 Monterey, MacOS 13 Ventura, or MacOS 14 Sonoma.
|
||||
- macOS 13 Ventura, or macOS 14 Sonoma.
|
||||
- Debian 11, Debian 12, Ubuntu 20.04 or Ubuntu 22.04, Ubuntu 24.04, on x86-64 and arm64 architecture.
|
||||
|
||||
## What's next
|
||||
|
|
|
|||
|
|
@ -6,6 +6,98 @@ toc_max_heading_level: 2
|
|||
|
||||
import LiteYouTube from '@site/src/components/LiteYouTube';
|
||||
|
||||
## Version 1.45
|
||||
|
||||
### Clock
|
||||
|
||||
Utilizing the new [Clock] API allows to manipulate and control time within tests to verify time-related behavior. This API covers many common scenarios, including:
|
||||
* testing with predefined time;
|
||||
* keeping consistent time and timers;
|
||||
* monitoring inactivity;
|
||||
* ticking through time manually.
|
||||
|
||||
```js
|
||||
// Initialize clock and let the page load naturally.
|
||||
await page.clock.install({ time: new Date('2024-02-02T08:00:00') });
|
||||
await page.goto('http://localhost:3333');
|
||||
|
||||
// Pretend that the user closed the laptop lid and opened it again at 10am,
|
||||
// Pause the time once reached that point.
|
||||
await page.clock.pauseAt(new Date('2024-02-02T10:00:00'));
|
||||
|
||||
// Assert the page state.
|
||||
await expect(page.getByTestId('current-time')).toHaveText('2/2/2024, 10:00:00 AM');
|
||||
|
||||
// Close the laptop lid again and open it at 10:30am.
|
||||
await page.clock.fastForward('30:00');
|
||||
await expect(page.getByTestId('current-time')).toHaveText('2/2/2024, 10:30:00 AM');
|
||||
```
|
||||
|
||||
See [the clock guide](./clock.md) for more details.
|
||||
|
||||
### Test runner
|
||||
|
||||
- New CLI option `--fail-on-flaky-tests` that sets exit code to `1` upon any flaky tests. Note that by default, the test runner exits with code `0` when all failed tests recovered upon a retry. With this option, the test run will fail in such case.
|
||||
|
||||
- New enviroment variable `PLAYWRIGHT_FORCE_TTY` controls whether built-in `list`, `line` and `dot` reporters assume a live terminal. For example, this could be useful to disable tty behavior when your CI environment does not handle ANSI control sequences well. Alternatively, you can enable tty behavior even when to live terminal is present, if you plan to post-process the output and handle control sequences.
|
||||
|
||||
```sh
|
||||
# Avoid TTY features that output ANSI control sequences
|
||||
PLAYWRIGHT_FORCE_TTY=0 npx playwright test
|
||||
|
||||
# Enable TTY features, assuming a terminal width 80
|
||||
PLAYWRIGHT_FORCE_TTY=80 npx playwright test
|
||||
```
|
||||
|
||||
- New options [`property: TestConfig.respectGitIgnore`] and [`property: TestProject.respectGitIgnore`] control whether files matching `.gitignore` patterns are excluded when searching for tests.
|
||||
|
||||
- New property `timeout` is now available for custom expect matchers. This property takes into account `playwright.config.ts` and `expect.configure()`.
|
||||
```ts
|
||||
import { expect as baseExpect } from '@playwright/test';
|
||||
|
||||
export const expect = baseExpect.extend({
|
||||
async toHaveAmount(locator: Locator, expected: number, options?: { timeout?: number }) {
|
||||
// When no timeout option is specified, use the config timeout.
|
||||
const timeout = options?.timeout ?? this.timeout;
|
||||
// ... implement the assertion ...
|
||||
},
|
||||
});
|
||||
```
|
||||
|
||||
### Miscellaneous
|
||||
|
||||
- Method [`method: Locator.setInputFiles`] now supports uploading a directory for `<input type=file webkitdirectory>` elements.
|
||||
```ts
|
||||
await page.getByLabel('Upload directory').setInputFiles(path.join(__dirname, 'mydir'));
|
||||
```
|
||||
|
||||
- Multiple methods like [`method: Locator.click`] or [`method: Locator.press`] now support a `ControlOrMeta` modifier key. This key maps to `Meta` on macOS and maps to `Control` on Windows and Linux.
|
||||
```ts
|
||||
// Press the common keyboard shortcut Control+S or Meta+S to trigger a "Save" operation.
|
||||
await page.keyboard.press('ControlOrMeta+S');
|
||||
```
|
||||
|
||||
- New property `httpCredentials.send` in [`method: APIRequest.newContext`] that allows to either always send the `Authorization` header or only send it in response to `401 Unauthorized`.
|
||||
|
||||
- New option `reason` in [`method: APIRequestContext.dispose`] that will be included in the error message of ongoing operations interrupted by the context disposal.
|
||||
|
||||
- New option `host` in [`method: BrowserType.launchServer`] allows to accept websocket connections on a specific address instead of unspecified `0.0.0.0`.
|
||||
|
||||
- Playwright now supports Chromium, Firefox and WebKit on Ubuntu 24.04.
|
||||
|
||||
- v1.45 is the last release to receive WebKit update for macOS 12 Monterey. Please update macOS to keep using the latest WebKit.
|
||||
|
||||
### Browser Versions
|
||||
|
||||
* Chromium 127.0.6533.5
|
||||
* Mozilla Firefox 127.0
|
||||
* WebKit 17.4
|
||||
|
||||
This version was also tested against the following stable channels:
|
||||
|
||||
* Google Chrome 126
|
||||
* Microsoft Edge 126
|
||||
|
||||
## Version 1.44
|
||||
|
||||
<LiteYouTube
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ Use the following command to run all tests.
|
|||
dotnet test
|
||||
```
|
||||
|
||||
### Run your tests in headed mode
|
||||
### Run tests in headed mode
|
||||
|
||||
Use the following command to run your tests in headed mode opening a browser window for each test.
|
||||
|
||||
|
|
|
|||
|
|
@ -85,6 +85,10 @@ See [here](./test-runners.md) for further details on how to run tests in paralle
|
|||
|
||||
See experimental [JUnit integration](./junit.md) to automatically initialize Playwright objects and more.
|
||||
|
||||
### Run tests in headed mode
|
||||
|
||||
If you prefer, you can run your tests in headed mode by using the `launch(new BrowserType.LaunchOptions().setHeadless(false))` option.
|
||||
|
||||
## What's Next
|
||||
|
||||
- [Debugging tests](./debug.md)
|
||||
|
|
|
|||
|
|
@ -232,12 +232,14 @@ Let's say you'd like to test following component:
|
|||
```js title="input-media.tsx"
|
||||
import React from 'react';
|
||||
|
||||
export const InputMedia: React.FC<{
|
||||
type InputMediaProps = {
|
||||
// Media is a complex browser object we can't send to Node while testing.
|
||||
onChange: (media: Media) => void,
|
||||
}> = ({ onChange }) => {
|
||||
return <></> as any;
|
||||
onChange(media: Media): void;
|
||||
};
|
||||
|
||||
export function InputMedia(props: InputMediaProps) {
|
||||
return <></> as any;
|
||||
}
|
||||
```
|
||||
|
||||
Create a story file for your component:
|
||||
|
|
@ -246,12 +248,14 @@ Create a story file for your component:
|
|||
import React from 'react';
|
||||
import InputMedia from './import-media';
|
||||
|
||||
export const InputMediaForTest: React.FC<{
|
||||
onMediaChange: (mediaName: string) => void,
|
||||
}> = ({ onMediaChange }) => {
|
||||
// Instead of sending a complex `media` object to the test, send the media name.
|
||||
return <InputMedia onChange={media => onMediaChange(media.name)} />;
|
||||
type InputMediaForTestProps = {
|
||||
onMediaChange(mediaName: string): void;
|
||||
};
|
||||
|
||||
export function InputMediaForTest(props: InputMediaForTestProps) {
|
||||
// Instead of sending a complex `media` object to the test, send the media name.
|
||||
return <InputMedia onChange={media => props.onMediaChange(media.name)} />;
|
||||
}
|
||||
// Export more stories here.
|
||||
```
|
||||
|
||||
|
|
@ -265,7 +269,6 @@ test('changes the image', async ({ mount }) => {
|
|||
<InputMediaForTest
|
||||
onMediaChange={mediaName => {
|
||||
mediaSelected = mediaName;
|
||||
console.log({ mediaName });
|
||||
}}
|
||||
/>
|
||||
);
|
||||
|
|
@ -928,3 +931,7 @@ test('override initialState ', async ({ mount }) => {
|
|||
await expect(component).toContainText('override initialState');
|
||||
});
|
||||
```
|
||||
|
||||
### How do I access the component's methods or its instance?
|
||||
|
||||
Accessing a component's internal methods or its instance within test code is neither recommended nor supported. Instead, focus on observing and interacting with the component from a user's perspective, typically by clicking or verifying if something is visible on the page. Tests become less fragile and more valuable when they avoid interacting with internal implementation details, such as the component instance or its methods. Keep in mind that if a test fails when run from a user’s perspective, it likely means the automated test has uncovered a genuine bug in your code.
|
||||
|
|
|
|||
|
|
@ -108,16 +108,3 @@ In `package.json`, add two scripts:
|
|||
The `pretest` script runs typescript on the tests. `test` will run the tests that have been generated to the `tests-out` directory. The `-c` argument configures the test runner to look for tests inside the `tests-out` directory.
|
||||
|
||||
Then `npm run test` will build the tests and run them.
|
||||
|
||||
## Using `import` inside `evaluate()`
|
||||
|
||||
Using dynamic imports inside a function passed to various `evaluate()` methods is not supported. This is because Playwright uses `Function.prototype.toString()` to serialize functions, and transpiler will sometimes replace dynamic imports with `require()` calls, which are not valid inside the web page.
|
||||
|
||||
To work around this issue, use a string template instead of a function:
|
||||
|
||||
```js
|
||||
await page.evaluate(`(async () => {
|
||||
const { value } = await import('some-module');
|
||||
console.log(value);
|
||||
})()`);
|
||||
```
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ In the Actions tab you can see what locator was used for every action and how lo
|
|||
|
||||
### Screenshots
|
||||
|
||||
When tracing with the [`option: screenshots`] option turned on, each trace records a screencast and renders it as a film strip. You can hover over the film strip to see a magnified image of for each action and state which helps you easily find the action you want to inspect.
|
||||
When tracing with the [`option: screenshots`] option turned on (default), each trace records a screencast and renders it as a film strip. You can hover over the film strip to see a magnified image of for each action and state which helps you easily find the action you want to inspect.
|
||||
|
||||
Double click on an action to see the time range for that action. You can use the slider in the timeline to increase the actions selected and these will be shown in the Actions tab and all console logs and network logs will be filtered to only show the logs for the actions selected.
|
||||
|
||||
|
|
@ -58,7 +58,7 @@ Notice how it highlights both, the DOM Node as well as the exact click position.
|
|||
|
||||
### Source
|
||||
|
||||
As you hover over each action of your test the line of code for that action is highlighted in the source panel.
|
||||
When you click on an action in the sidebar, the line of code for that action is highlighted in the source panel.
|
||||
|
||||

|
||||
|
||||
|
|
@ -86,6 +86,10 @@ See console logs from the browser as well as from your test. Different icons are
|
|||
|
||||

|
||||
|
||||
Double click on an action from your test in the actions sidebar. This will filter the console to only show the logs that were made during that action. Click the *Show all* button to see all console logs again.
|
||||
|
||||
Use the timeline to filter actions, by clicking a start point and dragging to an ending point. The console tab will also be filtered to only show the logs that were made during the actions selected.
|
||||
|
||||
|
||||
### Network
|
||||
|
||||
|
|
@ -93,6 +97,10 @@ The Network tab shows you all the network requests that were made during your te
|
|||
|
||||

|
||||
|
||||
Double click on an action from your test in the actions sidebar. This will filter the network requests to only show the requests that were made during that action. Click the *Show all* button to see all network requests again.
|
||||
|
||||
Use the timeline to filter actions, by clicking a start point and dragging to an ending point. The network tab will also be filtered to only show the network requests that were made during the actions selected.
|
||||
|
||||
### Metadata
|
||||
|
||||
Next to the Actions tab you will find the Metadata tab which will show you more information on your test such as the Browser, viewport size, test duration and more.
|
||||
|
|
|
|||
82
package-lock.json
generated
82
package-lock.json
generated
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "playwright-internal",
|
||||
"version": "1.45.0-next",
|
||||
"version": "1.46.0-next",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "playwright-internal",
|
||||
"version": "1.45.0-next",
|
||||
"version": "1.46.0-next",
|
||||
"license": "Apache-2.0",
|
||||
"workspaces": [
|
||||
"packages/*"
|
||||
|
|
@ -2722,12 +2722,12 @@
|
|||
}
|
||||
},
|
||||
"node_modules/braces": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
|
||||
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
|
||||
"integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"fill-range": "^7.0.1"
|
||||
"fill-range": "^7.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
|
|
@ -4170,9 +4170,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/fill-range": {
|
||||
"version": "7.0.1",
|
||||
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
|
||||
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
|
||||
"version": "7.1.1",
|
||||
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
|
||||
"integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"to-regex-range": "^5.0.1"
|
||||
|
|
@ -8162,10 +8162,10 @@
|
|||
}
|
||||
},
|
||||
"packages/playwright": {
|
||||
"version": "1.45.0-next",
|
||||
"version": "1.46.0-next",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"playwright-core": "1.45.0-next"
|
||||
"playwright-core": "1.46.0-next"
|
||||
},
|
||||
"bin": {
|
||||
"playwright": "cli.js"
|
||||
|
|
@ -8179,11 +8179,11 @@
|
|||
},
|
||||
"packages/playwright-browser-chromium": {
|
||||
"name": "@playwright/browser-chromium",
|
||||
"version": "1.45.0-next",
|
||||
"version": "1.46.0-next",
|
||||
"hasInstallScript": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"playwright-core": "1.45.0-next"
|
||||
"playwright-core": "1.46.0-next"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
|
|
@ -8191,11 +8191,11 @@
|
|||
},
|
||||
"packages/playwright-browser-firefox": {
|
||||
"name": "@playwright/browser-firefox",
|
||||
"version": "1.45.0-next",
|
||||
"version": "1.46.0-next",
|
||||
"hasInstallScript": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"playwright-core": "1.45.0-next"
|
||||
"playwright-core": "1.46.0-next"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
|
|
@ -8203,22 +8203,22 @@
|
|||
},
|
||||
"packages/playwright-browser-webkit": {
|
||||
"name": "@playwright/browser-webkit",
|
||||
"version": "1.45.0-next",
|
||||
"version": "1.46.0-next",
|
||||
"hasInstallScript": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"playwright-core": "1.45.0-next"
|
||||
"playwright-core": "1.46.0-next"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
}
|
||||
},
|
||||
"packages/playwright-chromium": {
|
||||
"version": "1.45.0-next",
|
||||
"version": "1.46.0-next",
|
||||
"hasInstallScript": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"playwright-core": "1.45.0-next"
|
||||
"playwright-core": "1.46.0-next"
|
||||
},
|
||||
"bin": {
|
||||
"playwright": "cli.js"
|
||||
|
|
@ -8228,7 +8228,7 @@
|
|||
}
|
||||
},
|
||||
"packages/playwright-core": {
|
||||
"version": "1.45.0-next",
|
||||
"version": "1.46.0-next",
|
||||
"license": "Apache-2.0",
|
||||
"bin": {
|
||||
"playwright-core": "cli.js"
|
||||
|
|
@ -8239,11 +8239,11 @@
|
|||
},
|
||||
"packages/playwright-ct-core": {
|
||||
"name": "@playwright/experimental-ct-core",
|
||||
"version": "1.45.0-next",
|
||||
"version": "1.46.0-next",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"playwright": "1.45.0-next",
|
||||
"playwright-core": "1.45.0-next",
|
||||
"playwright": "1.46.0-next",
|
||||
"playwright-core": "1.46.0-next",
|
||||
"vite": "^5.2.8"
|
||||
},
|
||||
"engines": {
|
||||
|
|
@ -8252,10 +8252,10 @@
|
|||
},
|
||||
"packages/playwright-ct-react": {
|
||||
"name": "@playwright/experimental-ct-react",
|
||||
"version": "1.45.0-next",
|
||||
"version": "1.46.0-next",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@playwright/experimental-ct-core": "1.45.0-next",
|
||||
"@playwright/experimental-ct-core": "1.46.0-next",
|
||||
"@vitejs/plugin-react": "^4.2.1"
|
||||
},
|
||||
"bin": {
|
||||
|
|
@ -8267,10 +8267,10 @@
|
|||
},
|
||||
"packages/playwright-ct-react17": {
|
||||
"name": "@playwright/experimental-ct-react17",
|
||||
"version": "1.45.0-next",
|
||||
"version": "1.46.0-next",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@playwright/experimental-ct-core": "1.45.0-next",
|
||||
"@playwright/experimental-ct-core": "1.46.0-next",
|
||||
"@vitejs/plugin-react": "^4.2.1"
|
||||
},
|
||||
"bin": {
|
||||
|
|
@ -8282,10 +8282,10 @@
|
|||
},
|
||||
"packages/playwright-ct-solid": {
|
||||
"name": "@playwright/experimental-ct-solid",
|
||||
"version": "1.45.0-next",
|
||||
"version": "1.46.0-next",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@playwright/experimental-ct-core": "1.45.0-next",
|
||||
"@playwright/experimental-ct-core": "1.46.0-next",
|
||||
"vite-plugin-solid": "^2.7.0"
|
||||
},
|
||||
"bin": {
|
||||
|
|
@ -8300,10 +8300,10 @@
|
|||
},
|
||||
"packages/playwright-ct-svelte": {
|
||||
"name": "@playwright/experimental-ct-svelte",
|
||||
"version": "1.45.0-next",
|
||||
"version": "1.46.0-next",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@playwright/experimental-ct-core": "1.45.0-next",
|
||||
"@playwright/experimental-ct-core": "1.46.0-next",
|
||||
"@sveltejs/vite-plugin-svelte": "^3.0.1"
|
||||
},
|
||||
"bin": {
|
||||
|
|
@ -8318,10 +8318,10 @@
|
|||
},
|
||||
"packages/playwright-ct-vue": {
|
||||
"name": "@playwright/experimental-ct-vue",
|
||||
"version": "1.45.0-next",
|
||||
"version": "1.46.0-next",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@playwright/experimental-ct-core": "1.45.0-next",
|
||||
"@playwright/experimental-ct-core": "1.46.0-next",
|
||||
"@vitejs/plugin-vue": "^4.2.1"
|
||||
},
|
||||
"bin": {
|
||||
|
|
@ -8333,10 +8333,10 @@
|
|||
},
|
||||
"packages/playwright-ct-vue2": {
|
||||
"name": "@playwright/experimental-ct-vue2",
|
||||
"version": "1.45.0-next",
|
||||
"version": "1.46.0-next",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@playwright/experimental-ct-core": "1.45.0-next",
|
||||
"@playwright/experimental-ct-core": "1.46.0-next",
|
||||
"@vitejs/plugin-vue2": "^2.2.0"
|
||||
},
|
||||
"bin": {
|
||||
|
|
@ -8385,11 +8385,11 @@
|
|||
}
|
||||
},
|
||||
"packages/playwright-firefox": {
|
||||
"version": "1.45.0-next",
|
||||
"version": "1.46.0-next",
|
||||
"hasInstallScript": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"playwright-core": "1.45.0-next"
|
||||
"playwright-core": "1.46.0-next"
|
||||
},
|
||||
"bin": {
|
||||
"playwright": "cli.js"
|
||||
|
|
@ -8400,10 +8400,10 @@
|
|||
},
|
||||
"packages/playwright-test": {
|
||||
"name": "@playwright/test",
|
||||
"version": "1.45.0-next",
|
||||
"version": "1.46.0-next",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"playwright": "1.45.0-next"
|
||||
"playwright": "1.46.0-next"
|
||||
},
|
||||
"bin": {
|
||||
"playwright": "cli.js"
|
||||
|
|
@ -8413,11 +8413,11 @@
|
|||
}
|
||||
},
|
||||
"packages/playwright-webkit": {
|
||||
"version": "1.45.0-next",
|
||||
"version": "1.46.0-next",
|
||||
"hasInstallScript": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"playwright-core": "1.45.0-next"
|
||||
"playwright-core": "1.46.0-next"
|
||||
},
|
||||
"bin": {
|
||||
"playwright": "cli.js"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "playwright-internal",
|
||||
"private": true,
|
||||
"version": "1.45.0-next",
|
||||
"version": "1.46.0-next",
|
||||
"description": "A high-level API to automate web browsers",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@playwright/browser-chromium",
|
||||
"version": "1.45.0-next",
|
||||
"version": "1.46.0-next",
|
||||
"description": "Playwright package that automatically installs Chromium",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
@ -27,6 +27,6 @@
|
|||
"install": "node install.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"playwright-core": "1.45.0-next"
|
||||
"playwright-core": "1.46.0-next"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@playwright/browser-firefox",
|
||||
"version": "1.45.0-next",
|
||||
"version": "1.46.0-next",
|
||||
"description": "Playwright package that automatically installs Firefox",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
@ -27,6 +27,6 @@
|
|||
"install": "node install.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"playwright-core": "1.45.0-next"
|
||||
"playwright-core": "1.46.0-next"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@playwright/browser-webkit",
|
||||
"version": "1.45.0-next",
|
||||
"version": "1.46.0-next",
|
||||
"description": "Playwright package that automatically installs WebKit",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
@ -27,6 +27,6 @@
|
|||
"install": "node install.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"playwright-core": "1.45.0-next"
|
||||
"playwright-core": "1.46.0-next"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "playwright-chromium",
|
||||
"version": "1.45.0-next",
|
||||
"version": "1.46.0-next",
|
||||
"description": "A high-level API to automate Chromium",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
@ -30,6 +30,6 @@
|
|||
"install": "node install.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"playwright-core": "1.45.0-next"
|
||||
"playwright-core": "1.46.0-next"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,31 +3,31 @@
|
|||
"browsers": [
|
||||
{
|
||||
"name": "chromium",
|
||||
"revision": "1122",
|
||||
"revision": "1123",
|
||||
"installByDefault": true,
|
||||
"browserVersion": "126.0.6478.36"
|
||||
"browserVersion": "127.0.6533.5"
|
||||
},
|
||||
{
|
||||
"name": "chromium-tip-of-tree",
|
||||
"revision": "1230",
|
||||
"revision": "1231",
|
||||
"installByDefault": false,
|
||||
"browserVersion": "127.0.6533.0"
|
||||
"browserVersion": "128.0.6536.0"
|
||||
},
|
||||
{
|
||||
"name": "firefox",
|
||||
"revision": "1453",
|
||||
"revision": "1454",
|
||||
"installByDefault": true,
|
||||
"browserVersion": "126.0"
|
||||
"browserVersion": "127.0"
|
||||
},
|
||||
{
|
||||
"name": "firefox-beta",
|
||||
"revision": "1453",
|
||||
"revision": "1454",
|
||||
"installByDefault": false,
|
||||
"browserVersion": "127.0b3"
|
||||
"browserVersion": "128.0b3"
|
||||
},
|
||||
{
|
||||
"name": "webkit",
|
||||
"revision": "2029",
|
||||
"revision": "2035",
|
||||
"installByDefault": true,
|
||||
"revisionOverrides": {
|
||||
"mac10.14": "1446",
|
||||
|
|
@ -46,7 +46,7 @@
|
|||
},
|
||||
{
|
||||
"name": "android",
|
||||
"revision": "1000",
|
||||
"revision": "1001",
|
||||
"installByDefault": false
|
||||
}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "playwright-core",
|
||||
"version": "1.45.0-next",
|
||||
"version": "1.46.0-next",
|
||||
"description": "A high-level API to automate web browsers",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
|
|||
|
|
@ -85,11 +85,15 @@ export class Browser extends ChannelOwner<channels.BrowserChannel> implements ap
|
|||
const response = forReuse ? await this._channel.newContextForReuse(contextOptions) : await this._channel.newContext(contextOptions);
|
||||
const context = BrowserContext.from(response.context);
|
||||
await this._browserType._didCreateContext(context, contextOptions, this._options, options.logger || this._logger);
|
||||
if (!forReuse && !!process.env.PW_FREEZE_TIME) {
|
||||
if (!forReuse && process.env.PW_CLOCK === 'frozen') {
|
||||
await this._wrapApiCall(async () => {
|
||||
await context.clock.install({ time: 0 });
|
||||
await context.clock.pauseAt(1000);
|
||||
}, true);
|
||||
} else if (!forReuse && process.env.PW_CLOCK === 'realtime') {
|
||||
await this._wrapApiCall(async () => {
|
||||
await context.clock.install({ time: 0 });
|
||||
}, true);
|
||||
}
|
||||
return context;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,6 +58,8 @@ function parseTime(time: string | number | Date): { timeNumber?: number, timeStr
|
|||
return { timeNumber: time };
|
||||
if (typeof time === 'string')
|
||||
return { timeString: time };
|
||||
if (!isFinite(time.getTime()))
|
||||
throw new Error(`Invalid date: ${time}`);
|
||||
return { timeNumber: time.getTime() };
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -250,12 +250,31 @@ export function convertSelectOptionValues(values: string | api.ElementHandle | S
|
|||
return { options: values as SelectOption[] };
|
||||
}
|
||||
|
||||
type SetInputFilesFiles = Pick<channels.ElementHandleSetInputFilesParams, 'payloads' | 'localPaths' | 'streams'>;
|
||||
type SetInputFilesFiles = Pick<channels.ElementHandleSetInputFilesParams, 'payloads' | 'localPaths' | 'localDirectory' | 'streams' | 'directoryStream'>;
|
||||
|
||||
function filePayloadExceedsSizeLimit(payloads: FilePayload[]) {
|
||||
return payloads.reduce((size, item) => size + (item.buffer ? item.buffer.byteLength : 0), 0) >= fileUploadSizeLimit;
|
||||
}
|
||||
|
||||
async function resolvePathsAndDirectoryForInputFiles(items: string[]): Promise<[string[] | undefined, string | undefined]> {
|
||||
let localPaths: string[] | undefined;
|
||||
let localDirectory: string | undefined;
|
||||
for (const item of items) {
|
||||
const stat = await fs.promises.stat(item as string);
|
||||
if (stat.isDirectory()) {
|
||||
if (localDirectory)
|
||||
throw new Error('Multiple directories are not supported');
|
||||
localDirectory = path.resolve(item as string);
|
||||
} else {
|
||||
localPaths ??= [];
|
||||
localPaths.push(path.resolve(item as string));
|
||||
}
|
||||
}
|
||||
if (localPaths?.length && localDirectory)
|
||||
throw new Error('File paths must be all files or a single directory');
|
||||
return [localPaths, localDirectory];
|
||||
}
|
||||
|
||||
export async function convertInputFiles(files: string | FilePayload | string[] | FilePayload[], context: BrowserContext): Promise<SetInputFilesFiles> {
|
||||
const items: (string | FilePayload)[] = Array.isArray(files) ? files.slice() : [files];
|
||||
|
||||
|
|
@ -263,17 +282,33 @@ export async function convertInputFiles(files: string | FilePayload | string[] |
|
|||
if (!items.every(item => typeof item === 'string'))
|
||||
throw new Error('File paths cannot be mixed with buffers');
|
||||
|
||||
const [localPaths, localDirectory] = await resolvePathsAndDirectoryForInputFiles(items as string[]);
|
||||
|
||||
if (context._connection.isRemote()) {
|
||||
const streams: channels.WritableStreamChannel[] = await Promise.all((items as string[]).map(async item => {
|
||||
const lastModifiedMs = (await fs.promises.stat(item)).mtimeMs;
|
||||
const { writableStream: stream } = await context._wrapApiCall(() => context._channel.createTempFile({ name: path.basename(item), lastModifiedMs }), true);
|
||||
const writable = WritableStream.from(stream);
|
||||
await pipelineAsync(fs.createReadStream(item), writable.stream());
|
||||
return stream;
|
||||
}));
|
||||
return { streams };
|
||||
const files = localDirectory ? (await fs.promises.readdir(localDirectory, { withFileTypes: true, recursive: true })).filter(f => f.isFile()).map(f => path.join(f.path, f.name)) : localPaths!;
|
||||
const { writableStreams, rootDir } = await context._wrapApiCall(async () => context._channel.createTempFiles({
|
||||
rootDirName: localDirectory ? path.basename(localDirectory as string) : undefined,
|
||||
items: await Promise.all(files.map(async file => {
|
||||
const lastModifiedMs = (await fs.promises.stat(file)).mtimeMs;
|
||||
return {
|
||||
name: localDirectory ? path.relative(localDirectory as string, file) : path.basename(file),
|
||||
lastModifiedMs
|
||||
};
|
||||
})),
|
||||
}), true);
|
||||
for (let i = 0; i < files.length; i++) {
|
||||
const writable = WritableStream.from(writableStreams[i]);
|
||||
await pipelineAsync(fs.createReadStream(files[i]), writable.stream());
|
||||
}
|
||||
return {
|
||||
directoryStream: rootDir,
|
||||
streams: localDirectory ? undefined : writableStreams,
|
||||
};
|
||||
}
|
||||
return { localPaths: items.map(f => path.resolve(f as string)) as string[] };
|
||||
return {
|
||||
localPaths,
|
||||
localDirectory,
|
||||
};
|
||||
}
|
||||
|
||||
const payloads = items as FilePayload[];
|
||||
|
|
|
|||
|
|
@ -951,12 +951,16 @@ scheme.BrowserContextHarExportParams = tObject({
|
|||
scheme.BrowserContextHarExportResult = tObject({
|
||||
artifact: tChannel(['Artifact']),
|
||||
});
|
||||
scheme.BrowserContextCreateTempFileParams = tObject({
|
||||
name: tString,
|
||||
lastModifiedMs: tOptional(tNumber),
|
||||
scheme.BrowserContextCreateTempFilesParams = tObject({
|
||||
rootDirName: tOptional(tString),
|
||||
items: tArray(tObject({
|
||||
name: tString,
|
||||
lastModifiedMs: tOptional(tNumber),
|
||||
})),
|
||||
});
|
||||
scheme.BrowserContextCreateTempFileResult = tObject({
|
||||
writableStream: tChannel(['WritableStream']),
|
||||
scheme.BrowserContextCreateTempFilesResult = tObject({
|
||||
rootDir: tOptional(tChannel(['WritableStream'])),
|
||||
writableStreams: tArray(tChannel(['WritableStream'])),
|
||||
});
|
||||
scheme.BrowserContextUpdateSubscriptionParams = tObject({
|
||||
event: tEnum(['console', 'dialog', 'request', 'response', 'requestFinished', 'requestFailed']),
|
||||
|
|
@ -1623,6 +1627,8 @@ scheme.FrameSetInputFilesParams = tObject({
|
|||
mimeType: tOptional(tString),
|
||||
buffer: tBinary,
|
||||
}))),
|
||||
localDirectory: tOptional(tString),
|
||||
directoryStream: tOptional(tChannel(['WritableStream'])),
|
||||
localPaths: tOptional(tArray(tString)),
|
||||
streams: tOptional(tArray(tChannel(['WritableStream']))),
|
||||
timeout: tOptional(tNumber),
|
||||
|
|
@ -1990,6 +1996,8 @@ scheme.ElementHandleSetInputFilesParams = tObject({
|
|||
mimeType: tOptional(tString),
|
||||
buffer: tBinary,
|
||||
}))),
|
||||
localDirectory: tOptional(tString),
|
||||
directoryStream: tOptional(tChannel(['WritableStream'])),
|
||||
localPaths: tOptional(tArray(tString)),
|
||||
streams: tOptional(tArray(tChannel(['WritableStream']))),
|
||||
timeout: tOptional(tNumber),
|
||||
|
|
|
|||
|
|
@ -13,3 +13,4 @@
|
|||
.externalNativeBuild
|
||||
.cxx
|
||||
local.properties
|
||||
build/
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
/build
|
||||
|
|
@ -8,6 +8,7 @@ android {
|
|||
defaultConfig {
|
||||
applicationId "com.microsoft.playwright.androiddriver"
|
||||
minSdkVersion 21
|
||||
// noinspection ExpiredTargetSdkVersion
|
||||
targetSdkVersion 29
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
|
|
@ -25,10 +26,11 @@ android {
|
|||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
namespace 'com.microsoft.playwright.androiddriver'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
|
||||
androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0'
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.microsoft.playwright.androiddriver">
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
|
|
@ -9,4 +8,4 @@
|
|||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true" />
|
||||
|
||||
</manifest>
|
||||
</manifest>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ buildscript {
|
|||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath "com.android.tools.build:gradle:4.1.0"
|
||||
classpath 'com.android.tools.build:gradle:8.5.0'
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
|
|
@ -21,4 +21,4 @@ allprojects {
|
|||
|
||||
task clean(type: Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,4 +16,7 @@ org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
|
|||
# https://developer.android.com/topic/libraries/support-library/androidx-rn
|
||||
android.useAndroidX=true
|
||||
# Automatically convert third-party libraries to use AndroidX
|
||||
android.enableJetifier=true
|
||||
android.enableJetifier=true
|
||||
android.defaults.buildfeatures.buildconfig=true
|
||||
android.nonTransitiveRClass=false
|
||||
android.nonFinalResIds=false
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1,6 +1,5 @@
|
|||
#Tue Dec 08 09:38:33 PST 2020
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
|
||||
|
|
|
|||
|
|
@ -1,78 +1,129 @@
|
|||
#!/usr/bin/env sh
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright © 2015-2021 the original authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# https://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
## Gradle start up script for UN*X
|
||||
##
|
||||
#
|
||||
# Gradle start up script for POSIX generated by Gradle.
|
||||
#
|
||||
# Important for running:
|
||||
#
|
||||
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
||||
# noncompliant, but you have some other compliant shell such as ksh or
|
||||
# bash, then to run this script, type that shell name before the whole
|
||||
# command line, like:
|
||||
#
|
||||
# ksh Gradle
|
||||
#
|
||||
# Busybox and similar reduced shells will NOT work, because this script
|
||||
# requires all of these POSIX shell features:
|
||||
# * functions;
|
||||
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||
# * compound commands having a testable exit status, especially «case»;
|
||||
# * various built-in commands including «command», «set», and «ulimit».
|
||||
#
|
||||
# Important for patching:
|
||||
#
|
||||
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
||||
# by Bash, Ksh, etc; in particular arrays are avoided.
|
||||
#
|
||||
# The "traditional" practice of packing multiple parameters into a
|
||||
# space-separated string is a well documented source of bugs and security
|
||||
# problems, so this is (mostly) avoided, by progressively accumulating
|
||||
# options in "$@", and eventually passing that to Java.
|
||||
#
|
||||
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
||||
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
||||
# see the in-line comments for details.
|
||||
#
|
||||
# There are tweaks for specific operating systems such as AIX, CygWin,
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
|
||||
# Resolve links: $0 may be a link
|
||||
PRG="$0"
|
||||
# Need this for relative symlinks.
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`"/$link"
|
||||
fi
|
||||
app_path=$0
|
||||
|
||||
# Need this for daisy-chained symlinks.
|
||||
while
|
||||
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
||||
[ -h "$app_path" ]
|
||||
do
|
||||
ls=$( ls -ld "$app_path" )
|
||||
link=${ls#*' -> '}
|
||||
case $link in #(
|
||||
/*) app_path=$link ;; #(
|
||||
*) app_path=$APP_HOME$link ;;
|
||||
esac
|
||||
done
|
||||
SAVED="`pwd`"
|
||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||
APP_HOME="`pwd -P`"
|
||||
cd "$SAVED" >/dev/null
|
||||
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
APP_BASE_NAME=${0##*/}
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS=""
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
MAX_FD=maximum
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
}
|
||||
} >&2
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
} >&2
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
NONSTOP* )
|
||||
nonstop=true
|
||||
;;
|
||||
case "$( uname )" in #(
|
||||
CYGWIN* ) cygwin=true ;; #(
|
||||
Darwin* ) darwin=true ;; #(
|
||||
MSYS* | MINGW* ) msys=true ;; #(
|
||||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
JAVACMD=$JAVA_HOME/jre/sh/java
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
JAVACMD=$JAVA_HOME/bin/java
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
|
@ -81,7 +132,7 @@ Please set the JAVA_HOME variable in your environment to match the
|
|||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD="java"
|
||||
JAVACMD=java
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
|
|
@ -89,84 +140,101 @@ location of your Java installation."
|
|||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||
MAX_FD_LIMIT=`ulimit -H -n`
|
||||
if [ $? -eq 0 ] ; then
|
||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||
MAX_FD="$MAX_FD_LIMIT"
|
||||
fi
|
||||
ulimit -n $MAX_FD
|
||||
if [ $? -ne 0 ] ; then
|
||||
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||
fi
|
||||
else
|
||||
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||
fi
|
||||
fi
|
||||
|
||||
# For Darwin, add options to specify how the application appears in the dock
|
||||
if $darwin; then
|
||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||
fi
|
||||
|
||||
# For Cygwin, switch paths to Windows format before running java
|
||||
if $cygwin ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||
SEP=""
|
||||
for dir in $ROOTDIRSRAW ; do
|
||||
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||
SEP="|"
|
||||
done
|
||||
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||
# Add a user-defined pattern to the cygpath arguments
|
||||
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||
fi
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
i=0
|
||||
for arg in "$@" ; do
|
||||
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||
|
||||
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||
else
|
||||
eval `echo args$i`="\"$arg\""
|
||||
fi
|
||||
i=$((i+1))
|
||||
done
|
||||
case $i in
|
||||
(0) set -- ;;
|
||||
(1) set -- "$args0" ;;
|
||||
(2) set -- "$args0" "$args1" ;;
|
||||
(3) set -- "$args0" "$args1" "$args2" ;;
|
||||
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
case $MAX_FD in #(
|
||||
max*)
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
case $MAX_FD in #(
|
||||
'' | soft) :;; #(
|
||||
*)
|
||||
ulimit -n "$MAX_FD" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
esac
|
||||
fi
|
||||
|
||||
# Escape application args
|
||||
save () {
|
||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
}
|
||||
APP_ARGS=$(save "$@")
|
||||
# Collect all arguments for the java command, stacking in reverse order:
|
||||
# * args from the command line
|
||||
# * the main class name
|
||||
# * -classpath
|
||||
# * -D...appname settings
|
||||
# * --module-path (only if needed)
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
||||
|
||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if "$cygwin" || "$msys" ; then
|
||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||
|
||||
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
|
||||
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
|
||||
cd "$(dirname "$0")"
|
||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
for arg do
|
||||
if
|
||||
case $arg in #(
|
||||
-*) false ;; # don't mess with options #(
|
||||
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
||||
[ -e "$t" ] ;; #(
|
||||
*) false ;;
|
||||
esac
|
||||
then
|
||||
arg=$( cygpath --path --ignore --mixed "$arg" )
|
||||
fi
|
||||
# Roll the args list around exactly as many times as the number of
|
||||
# args, so each arg winds up back in the position where it started, but
|
||||
# possibly modified.
|
||||
#
|
||||
# NB: a `for` loop captures its iteration list before it begins, so
|
||||
# changing the positional parameters here affects neither the number of
|
||||
# iterations, nor the values presented in `arg`.
|
||||
shift # remove old arg
|
||||
set -- "$@" "$arg" # push replacement arg
|
||||
done
|
||||
fi
|
||||
|
||||
# Collect all arguments for the java command;
|
||||
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
||||
# shell script including quotes and variable substitutions, so put them in
|
||||
# double quotes to make sure that they get re-expanded; and
|
||||
# * put everything else in single quotes, so that it's not re-expanded.
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-classpath "$CLASSPATH" \
|
||||
org.gradle.wrapper.GradleWrapperMain \
|
||||
"$@"
|
||||
|
||||
# Stop when "xargs" is not available.
|
||||
if ! command -v xargs >/dev/null 2>&1
|
||||
then
|
||||
die "xargs is not available"
|
||||
fi
|
||||
|
||||
# Use "xargs" to parse quoted args.
|
||||
#
|
||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||
#
|
||||
# In Bash we could simply go:
|
||||
#
|
||||
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
||||
# set -- "${ARGS[@]}" "$@"
|
||||
#
|
||||
# but POSIX shell has neither arrays nor command substitution, so instead we
|
||||
# post-process each arg (as a line of input to sed) to backslash-escape any
|
||||
# character that might be a shell metacharacter, then use eval to reverse
|
||||
# that process (while maintaining the separation between arguments), and wrap
|
||||
# the whole thing up as a single "set" statement.
|
||||
#
|
||||
# This will of course break if any of these variables contains a newline or
|
||||
# an unmatched quote.
|
||||
#
|
||||
|
||||
eval "set -- $(
|
||||
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
||||
xargs -n1 |
|
||||
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
||||
tr '\n' ' '
|
||||
)" '"$@"'
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,20 @@
|
|||
@if "%DEBUG%" == "" @echo off
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
|
|
@ -9,19 +25,22 @@
|
|||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
if "%DIRNAME%"=="" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS=
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto init
|
||||
if %ERRORLEVEL% equ 0 goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
|
@ -35,7 +54,7 @@ goto fail
|
|||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto init
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
|
|
@ -45,38 +64,26 @@ echo location of your Java installation.
|
|||
|
||||
goto fail
|
||||
|
||||
:init
|
||||
@rem Get command-line arguments, handling Windows variants
|
||||
|
||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||
|
||||
:win9xME_args
|
||||
@rem Slurp the command line arguments.
|
||||
set CMD_LINE_ARGS=
|
||||
set _SKIP=2
|
||||
|
||||
:win9xME_args_slurp
|
||||
if "x%~1" == "x" goto execute
|
||||
|
||||
set CMD_LINE_ARGS=%*
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
set EXIT_CODE=%ERRORLEVEL%
|
||||
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||
exit /b %EXIT_CODE%
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
|
|
|||
|
|
@ -216,6 +216,7 @@ export abstract class BrowserContext extends SdkObject {
|
|||
await this._resetStorage();
|
||||
await this._removeExposedBindings();
|
||||
await this._removeInitScripts();
|
||||
this.clock.markAsUninstalled();
|
||||
// TODO: following can be optimized to not perform noops.
|
||||
if (this._options.permissions)
|
||||
await this.grantPermissions(this._options.permissions);
|
||||
|
|
|
|||
|
|
@ -305,9 +305,12 @@ export class Chromium extends BrowserType {
|
|||
if (os.platform() === 'darwin') {
|
||||
// See https://github.com/microsoft/playwright/issues/7362
|
||||
chromeArguments.push('--enable-use-zoom-for-dsf=false');
|
||||
}
|
||||
if (options.headless) {
|
||||
// See https://bugs.chromium.org/p/chromium/issues/detail?id=1407025.
|
||||
if (options.headless)
|
||||
chromeArguments.push('--use-angle');
|
||||
// See also https://github.com/microsoft/playwright/issues/30585
|
||||
// and chromium fix at https://issues.chromium.org/issues/338414704.
|
||||
chromeArguments.push('--enable-gpu');
|
||||
}
|
||||
|
||||
if (options.devtools)
|
||||
|
|
|
|||
|
|
@ -758,7 +758,7 @@ Does not always exist (e.g. for unsafe form submission urls).
|
|||
* Enum indicating the reason a response has been blocked. These reasons are
|
||||
refinements of the net error BLOCKED_BY_RESPONSE.
|
||||
*/
|
||||
export type BlockedByResponseReason = "CoepFrameResourceNeedsCoepHeader"|"CoopSandboxedIFrameCannotNavigateToCoopPage"|"CorpNotSameOrigin"|"CorpNotSameOriginAfterDefaultedToSameOriginByCoep"|"CorpNotSameSite";
|
||||
export type BlockedByResponseReason = "CoepFrameResourceNeedsCoepHeader"|"CoopSandboxedIFrameCannotNavigateToCoopPage"|"CorpNotSameOrigin"|"CorpNotSameOriginAfterDefaultedToSameOriginByCoep"|"CorpNotSameOriginAfterDefaultedToSameOriginByDip"|"CorpNotSameOriginAfterDefaultedToSameOriginByCoepAndDip"|"CorpNotSameSite";
|
||||
/**
|
||||
* Details for a request that has been blocked with the BLOCKED_BY_RESPONSE
|
||||
code. Currently only used for COEP/COOP, but may be extended to include
|
||||
|
|
@ -934,7 +934,7 @@ Should be updated alongside RequestIdTokenStatus in
|
|||
third_party/blink/public/mojom/devtools/inspector_issue.mojom to include
|
||||
all cases except for success.
|
||||
*/
|
||||
export type FederatedAuthRequestIssueReason = "ShouldEmbargo"|"TooManyRequests"|"WellKnownHttpNotFound"|"WellKnownNoResponse"|"WellKnownInvalidResponse"|"WellKnownListEmpty"|"WellKnownInvalidContentType"|"ConfigNotInWellKnown"|"WellKnownTooBig"|"ConfigHttpNotFound"|"ConfigNoResponse"|"ConfigInvalidResponse"|"ConfigInvalidContentType"|"ClientMetadataHttpNotFound"|"ClientMetadataNoResponse"|"ClientMetadataInvalidResponse"|"ClientMetadataInvalidContentType"|"DisabledInSettings"|"ErrorFetchingSignin"|"InvalidSigninResponse"|"AccountsHttpNotFound"|"AccountsNoResponse"|"AccountsInvalidResponse"|"AccountsListEmpty"|"AccountsInvalidContentType"|"IdTokenHttpNotFound"|"IdTokenNoResponse"|"IdTokenInvalidResponse"|"IdTokenIdpErrorResponse"|"IdTokenCrossSiteIdpErrorResponse"|"IdTokenInvalidRequest"|"IdTokenInvalidContentType"|"ErrorIdToken"|"Canceled"|"RpPageNotVisible"|"SilentMediationFailure"|"ThirdPartyCookiesBlocked"|"NotSignedInWithIdp"|"MissingTransientUserActivation"|"ReplacedByButtonMode";
|
||||
export type FederatedAuthRequestIssueReason = "ShouldEmbargo"|"TooManyRequests"|"WellKnownHttpNotFound"|"WellKnownNoResponse"|"WellKnownInvalidResponse"|"WellKnownListEmpty"|"WellKnownInvalidContentType"|"ConfigNotInWellKnown"|"WellKnownTooBig"|"ConfigHttpNotFound"|"ConfigNoResponse"|"ConfigInvalidResponse"|"ConfigInvalidContentType"|"ClientMetadataHttpNotFound"|"ClientMetadataNoResponse"|"ClientMetadataInvalidResponse"|"ClientMetadataInvalidContentType"|"DisabledInSettings"|"ErrorFetchingSignin"|"InvalidSigninResponse"|"AccountsHttpNotFound"|"AccountsNoResponse"|"AccountsInvalidResponse"|"AccountsListEmpty"|"AccountsInvalidContentType"|"IdTokenHttpNotFound"|"IdTokenNoResponse"|"IdTokenInvalidResponse"|"IdTokenIdpErrorResponse"|"IdTokenCrossSiteIdpErrorResponse"|"IdTokenInvalidRequest"|"IdTokenInvalidContentType"|"ErrorIdToken"|"Canceled"|"RpPageNotVisible"|"SilentMediationFailure"|"ThirdPartyCookiesBlocked"|"NotSignedInWithIdp"|"MissingTransientUserActivation"|"ReplacedByButtonMode"|"RelyingPartyOriginIsOpaque"|"TypeNotMatching";
|
||||
export interface FederatedAuthUserInfoRequestIssueDetails {
|
||||
federatedAuthUserInfoRequestIssueReason: FederatedAuthUserInfoRequestIssueReason;
|
||||
}
|
||||
|
|
@ -3486,7 +3486,7 @@ front-end.
|
|||
/**
|
||||
* Pseudo element type.
|
||||
*/
|
||||
export type PseudoType = "first-line"|"first-letter"|"before"|"after"|"marker"|"backdrop"|"selection"|"search-text"|"target-text"|"spelling-error"|"grammar-error"|"highlight"|"first-line-inherited"|"scroll-marker"|"scroll-markers"|"scrollbar"|"scrollbar-thumb"|"scrollbar-button"|"scrollbar-track"|"scrollbar-track-piece"|"scrollbar-corner"|"resizer"|"input-list-button"|"view-transition"|"view-transition-group"|"view-transition-image-pair"|"view-transition-old"|"view-transition-new";
|
||||
export type PseudoType = "first-line"|"first-letter"|"before"|"after"|"marker"|"backdrop"|"selection"|"search-text"|"target-text"|"spelling-error"|"grammar-error"|"highlight"|"first-line-inherited"|"scroll-marker"|"scroll-marker-group"|"scrollbar"|"scrollbar-thumb"|"scrollbar-button"|"scrollbar-track"|"scrollbar-track-piece"|"scrollbar-corner"|"resizer"|"input-list-button"|"view-transition"|"view-transition-group"|"view-transition-image-pair"|"view-transition-old"|"view-transition-new";
|
||||
/**
|
||||
* Shadow root type.
|
||||
*/
|
||||
|
|
@ -4801,6 +4801,29 @@ container queries against this container.
|
|||
*/
|
||||
nodeIds: NodeId[];
|
||||
}
|
||||
/**
|
||||
* Returns the target anchor element of the given anchor query according to
|
||||
https://www.w3.org/TR/css-anchor-position-1/#target.
|
||||
*/
|
||||
export type getAnchorElementParameters = {
|
||||
/**
|
||||
* Id of the positioned element from which to find the anchor.
|
||||
*/
|
||||
nodeId: NodeId;
|
||||
/**
|
||||
* An optional anchor specifier, as defined in
|
||||
https://www.w3.org/TR/css-anchor-position-1/#anchor-specifier.
|
||||
If not provided, it will return the implicit anchor element for
|
||||
the given positioned element.
|
||||
*/
|
||||
anchorSpecifier?: string;
|
||||
}
|
||||
export type getAnchorElementReturnValue = {
|
||||
/**
|
||||
* The anchor element of the given anchor query.
|
||||
*/
|
||||
nodeId: NodeId;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -8116,6 +8139,14 @@ milliseconds relatively to this requestTime.
|
|||
* Settled fetch event respondWith promise.
|
||||
*/
|
||||
workerRespondWithSettled: number;
|
||||
/**
|
||||
* Started ServiceWorker static routing source evaluation.
|
||||
*/
|
||||
workerRouterEvaluationStart?: number;
|
||||
/**
|
||||
* Started cache lookup when the source was evaluated to `cache`.
|
||||
*/
|
||||
workerCacheLookupStart?: number;
|
||||
/**
|
||||
* Started sending request.
|
||||
*/
|
||||
|
|
@ -8323,7 +8354,7 @@ applicable or not known.
|
|||
/**
|
||||
* The reason why request was blocked.
|
||||
*/
|
||||
export type BlockedReason = "other"|"csp"|"mixed-content"|"origin"|"inspector"|"subresource-filter"|"content-type"|"coep-frame-resource-needs-coep-header"|"coop-sandboxed-iframe-cannot-navigate-to-coop-page"|"corp-not-same-origin"|"corp-not-same-origin-after-defaulted-to-same-origin-by-coep"|"corp-not-same-site";
|
||||
export type BlockedReason = "other"|"csp"|"mixed-content"|"origin"|"inspector"|"subresource-filter"|"content-type"|"coep-frame-resource-needs-coep-header"|"coop-sandboxed-iframe-cannot-navigate-to-coop-page"|"corp-not-same-origin"|"corp-not-same-origin-after-defaulted-to-same-origin-by-coep"|"corp-not-same-origin-after-defaulted-to-same-origin-by-dip"|"corp-not-same-origin-after-defaulted-to-same-origin-by-coep-and-dip"|"corp-not-same-site";
|
||||
/**
|
||||
* The reason why request was blocked.
|
||||
*/
|
||||
|
|
@ -8374,6 +8405,10 @@ be set, otherwiser no value will be set.
|
|||
field will be set, otherwise no value will be set.
|
||||
*/
|
||||
matchedSourceType?: ServiceWorkerRouterSource;
|
||||
/**
|
||||
* The actual router source used.
|
||||
*/
|
||||
actualSourceType?: ServiceWorkerRouterSource;
|
||||
}
|
||||
/**
|
||||
* HTTP response data.
|
||||
|
|
@ -8600,6 +8635,21 @@ module) (0-based).
|
|||
*/
|
||||
requestId?: RequestId;
|
||||
}
|
||||
/**
|
||||
* cookiePartitionKey object
|
||||
The representation of the components of the key that are created by the cookiePartitionKey class contained in net/cookies/cookie_partition_key.h.
|
||||
*/
|
||||
export interface CookiePartitionKey {
|
||||
/**
|
||||
* The site of the top-level URL the browser was visiting at the start
|
||||
of the request to the endpoint that set the cookie.
|
||||
*/
|
||||
topLevelSite: string;
|
||||
/**
|
||||
* Indicates if the cookie has any ancestors that are cross-site to the topLevelSite.
|
||||
*/
|
||||
hasCrossSiteAncestor: boolean;
|
||||
}
|
||||
/**
|
||||
* Cookie object
|
||||
*/
|
||||
|
|
@ -8663,10 +8713,9 @@ This is a temporary ability and it will be removed in the future.
|
|||
*/
|
||||
sourcePort: number;
|
||||
/**
|
||||
* Cookie partition key. The site of the top-level URL the browser was visiting at the start
|
||||
of the request to the endpoint that set the cookie.
|
||||
* Cookie partition key.
|
||||
*/
|
||||
partitionKey?: string;
|
||||
partitionKey?: CookiePartitionKey;
|
||||
/**
|
||||
* True if cookie partition key is opaque.
|
||||
*/
|
||||
|
|
@ -8683,7 +8732,7 @@ of the request to the endpoint that set the cookie.
|
|||
/**
|
||||
* Types of reasons why a cookie should have been blocked by 3PCD but is exempted for the request.
|
||||
*/
|
||||
export type CookieExemptionReason = "None"|"UserSetting"|"TPCDMetadata"|"TPCDDeprecationTrial"|"TPCDHeuristics"|"EnterprisePolicy"|"StorageAccess"|"TopLevelStorageAccess"|"CorsOptIn";
|
||||
export type CookieExemptionReason = "None"|"UserSetting"|"TPCDMetadata"|"TPCDDeprecationTrial"|"TPCDHeuristics"|"EnterprisePolicy"|"StorageAccess"|"TopLevelStorageAccess"|"CorsOptIn"|"Scheme";
|
||||
/**
|
||||
* A cookie which was not stored from a response with the corresponding reason.
|
||||
*/
|
||||
|
|
@ -8801,11 +8850,9 @@ This is a temporary ability and it will be removed in the future.
|
|||
*/
|
||||
sourcePort?: number;
|
||||
/**
|
||||
* Cookie partition key. The site of the top-level URL the browser was visiting at the start
|
||||
of the request to the endpoint that set the cookie.
|
||||
If not set, the cookie will be set as not partitioned.
|
||||
* Cookie partition key. If not set, the cookie will be set as not partitioned.
|
||||
*/
|
||||
partitionKey?: string;
|
||||
partitionKey?: CookiePartitionKey;
|
||||
}
|
||||
/**
|
||||
* Authorization challenge for HTTP status code 401 or 407.
|
||||
|
|
@ -9629,7 +9676,7 @@ available, such as in the case of HTTP/2 or QUIC.
|
|||
* The cookie partition key that will be used to store partitioned cookies set in this response.
|
||||
Only sent when partitioned cookies are enabled.
|
||||
*/
|
||||
cookiePartitionKey?: string;
|
||||
cookiePartitionKey?: CookiePartitionKey;
|
||||
/**
|
||||
* True if partitioned cookies are enabled, but the partition key is not serializable to string.
|
||||
*/
|
||||
|
|
@ -9668,7 +9715,7 @@ or after the response was received.
|
|||
of the operation already exists und thus, the operation was abort
|
||||
preemptively (e.g. a cache hit).
|
||||
*/
|
||||
status: "Ok"|"InvalidArgument"|"MissingIssuerKeys"|"FailedPrecondition"|"ResourceExhausted"|"AlreadyExists"|"Unavailable"|"Unauthorized"|"BadResponse"|"InternalError"|"UnknownError"|"FulfilledLocally";
|
||||
status: "Ok"|"InvalidArgument"|"MissingIssuerKeys"|"FailedPrecondition"|"ResourceExhausted"|"AlreadyExists"|"ResourceLimited"|"Unauthorized"|"BadResponse"|"InternalError"|"UnknownError"|"FulfilledLocally";
|
||||
type: TrustTokenOperationType;
|
||||
requestId: RequestId;
|
||||
/**
|
||||
|
|
@ -9905,10 +9952,10 @@ provided URL.
|
|||
*/
|
||||
path?: string;
|
||||
/**
|
||||
* If specified, deletes only cookies with the the given name and partitionKey where domain
|
||||
matches provided URL.
|
||||
* If specified, deletes only cookies with the the given name and partitionKey where
|
||||
all partition key attributes match the cookie partition key attribute.
|
||||
*/
|
||||
partitionKey?: string;
|
||||
partitionKey?: CookiePartitionKey;
|
||||
}
|
||||
export type deleteCookiesReturnValue = {
|
||||
}
|
||||
|
|
@ -10218,11 +10265,9 @@ This is a temporary ability and it will be removed in the future.
|
|||
*/
|
||||
sourcePort?: number;
|
||||
/**
|
||||
* Cookie partition key. The site of the top-level URL the browser was visiting at the start
|
||||
of the request to the endpoint that set the cookie.
|
||||
If not set, the cookie will be set as not partitioned.
|
||||
* Cookie partition key. If not set, the cookie will be set as not partitioned.
|
||||
*/
|
||||
partitionKey?: string;
|
||||
partitionKey?: CookiePartitionKey;
|
||||
}
|
||||
export type setCookieReturnValue = {
|
||||
/**
|
||||
|
|
@ -11233,7 +11278,7 @@ as an ad.
|
|||
* All Permissions Policy features. This enum should match the one defined
|
||||
in third_party/blink/renderer/core/permissions_policy/permissions_policy_features.json5.
|
||||
*/
|
||||
export type PermissionsPolicyFeature = "accelerometer"|"ambient-light-sensor"|"attribution-reporting"|"autoplay"|"bluetooth"|"browsing-topics"|"camera"|"captured-surface-control"|"ch-dpr"|"ch-device-memory"|"ch-downlink"|"ch-ect"|"ch-prefers-color-scheme"|"ch-prefers-reduced-motion"|"ch-prefers-reduced-transparency"|"ch-rtt"|"ch-save-data"|"ch-ua"|"ch-ua-arch"|"ch-ua-bitness"|"ch-ua-platform"|"ch-ua-model"|"ch-ua-mobile"|"ch-ua-form-factors"|"ch-ua-full-version"|"ch-ua-full-version-list"|"ch-ua-platform-version"|"ch-ua-wow64"|"ch-viewport-height"|"ch-viewport-width"|"ch-width"|"clipboard-read"|"clipboard-write"|"compute-pressure"|"cross-origin-isolated"|"direct-sockets"|"display-capture"|"document-domain"|"encrypted-media"|"execution-while-out-of-viewport"|"execution-while-not-rendered"|"focus-without-user-activation"|"fullscreen"|"frobulate"|"gamepad"|"geolocation"|"gyroscope"|"hid"|"identity-credentials-get"|"idle-detection"|"interest-cohort"|"join-ad-interest-group"|"keyboard-map"|"local-fonts"|"magnetometer"|"microphone"|"midi"|"otp-credentials"|"payment"|"picture-in-picture"|"private-aggregation"|"private-state-token-issuance"|"private-state-token-redemption"|"publickey-credentials-create"|"publickey-credentials-get"|"run-ad-auction"|"screen-wake-lock"|"serial"|"shared-autofill"|"shared-storage"|"shared-storage-select-url"|"smart-card"|"speaker-selection"|"storage-access"|"sub-apps"|"sync-xhr"|"unload"|"usb"|"usb-unrestricted"|"vertical-scroll"|"web-printing"|"web-share"|"window-management"|"xr-spatial-tracking";
|
||||
export type PermissionsPolicyFeature = "accelerometer"|"ambient-light-sensor"|"attribution-reporting"|"autoplay"|"bluetooth"|"browsing-topics"|"camera"|"captured-surface-control"|"ch-dpr"|"ch-device-memory"|"ch-downlink"|"ch-ect"|"ch-prefers-color-scheme"|"ch-prefers-reduced-motion"|"ch-prefers-reduced-transparency"|"ch-rtt"|"ch-save-data"|"ch-ua"|"ch-ua-arch"|"ch-ua-bitness"|"ch-ua-platform"|"ch-ua-model"|"ch-ua-mobile"|"ch-ua-form-factors"|"ch-ua-full-version"|"ch-ua-full-version-list"|"ch-ua-platform-version"|"ch-ua-wow64"|"ch-viewport-height"|"ch-viewport-width"|"ch-width"|"clipboard-read"|"clipboard-write"|"compute-pressure"|"cross-origin-isolated"|"deferred-fetch"|"direct-sockets"|"display-capture"|"document-domain"|"encrypted-media"|"execution-while-out-of-viewport"|"execution-while-not-rendered"|"focus-without-user-activation"|"fullscreen"|"frobulate"|"gamepad"|"geolocation"|"gyroscope"|"hid"|"identity-credentials-get"|"idle-detection"|"interest-cohort"|"join-ad-interest-group"|"keyboard-map"|"local-fonts"|"magnetometer"|"microphone"|"midi"|"otp-credentials"|"payment"|"picture-in-picture"|"private-aggregation"|"private-state-token-issuance"|"private-state-token-redemption"|"publickey-credentials-create"|"publickey-credentials-get"|"run-ad-auction"|"screen-wake-lock"|"serial"|"shared-autofill"|"shared-storage"|"shared-storage-select-url"|"smart-card"|"speaker-selection"|"storage-access"|"sub-apps"|"sync-xhr"|"unload"|"usb"|"usb-unrestricted"|"vertical-scroll"|"web-printing"|"web-share"|"window-management"|"xr-spatial-tracking";
|
||||
/**
|
||||
* Reason for a permissions policy feature to be disabled.
|
||||
*/
|
||||
|
|
@ -11821,7 +11866,7 @@ https://github.com/WICG/manifest-incubations/blob/gh-pages/scope_extensions-expl
|
|||
/**
|
||||
* List of not restored reasons for back-forward cache.
|
||||
*/
|
||||
export type BackForwardCacheNotRestoredReason = "NotPrimaryMainFrame"|"BackForwardCacheDisabled"|"RelatedActiveContentsExist"|"HTTPStatusNotOK"|"SchemeNotHTTPOrHTTPS"|"Loading"|"WasGrantedMediaAccess"|"DisableForRenderFrameHostCalled"|"DomainNotAllowed"|"HTTPMethodNotGET"|"SubframeIsNavigating"|"Timeout"|"CacheLimit"|"JavaScriptExecution"|"RendererProcessKilled"|"RendererProcessCrashed"|"SchedulerTrackedFeatureUsed"|"ConflictingBrowsingInstance"|"CacheFlushed"|"ServiceWorkerVersionActivation"|"SessionRestored"|"ServiceWorkerPostMessage"|"EnteredBackForwardCacheBeforeServiceWorkerHostAdded"|"RenderFrameHostReused_SameSite"|"RenderFrameHostReused_CrossSite"|"ServiceWorkerClaim"|"IgnoreEventAndEvict"|"HaveInnerContents"|"TimeoutPuttingInCache"|"BackForwardCacheDisabledByLowMemory"|"BackForwardCacheDisabledByCommandLine"|"NetworkRequestDatapipeDrainedAsBytesConsumer"|"NetworkRequestRedirected"|"NetworkRequestTimeout"|"NetworkExceedsBufferLimit"|"NavigationCancelledWhileRestoring"|"NotMostRecentNavigationEntry"|"BackForwardCacheDisabledForPrerender"|"UserAgentOverrideDiffers"|"ForegroundCacheLimit"|"BrowsingInstanceNotSwapped"|"BackForwardCacheDisabledForDelegate"|"UnloadHandlerExistsInMainFrame"|"UnloadHandlerExistsInSubFrame"|"ServiceWorkerUnregistration"|"CacheControlNoStore"|"CacheControlNoStoreCookieModified"|"CacheControlNoStoreHTTPOnlyCookieModified"|"NoResponseHead"|"Unknown"|"ActivationNavigationsDisallowedForBug1234857"|"ErrorDocument"|"FencedFramesEmbedder"|"CookieDisabled"|"HTTPAuthRequired"|"CookieFlushed"|"BroadcastChannelOnMessage"|"WebSocket"|"WebTransport"|"WebRTC"|"MainResourceHasCacheControlNoStore"|"MainResourceHasCacheControlNoCache"|"SubresourceHasCacheControlNoStore"|"SubresourceHasCacheControlNoCache"|"ContainsPlugins"|"DocumentLoaded"|"OutstandingNetworkRequestOthers"|"RequestedMIDIPermission"|"RequestedAudioCapturePermission"|"RequestedVideoCapturePermission"|"RequestedBackForwardCacheBlockedSensors"|"RequestedBackgroundWorkPermission"|"BroadcastChannel"|"WebXR"|"SharedWorker"|"WebLocks"|"WebHID"|"WebShare"|"RequestedStorageAccessGrant"|"WebNfc"|"OutstandingNetworkRequestFetch"|"OutstandingNetworkRequestXHR"|"AppBanner"|"Printing"|"WebDatabase"|"PictureInPicture"|"Portal"|"SpeechRecognizer"|"IdleManager"|"PaymentManager"|"SpeechSynthesis"|"KeyboardLock"|"WebOTPService"|"OutstandingNetworkRequestDirectSocket"|"InjectedJavascript"|"InjectedStyleSheet"|"KeepaliveRequest"|"IndexedDBEvent"|"Dummy"|"JsNetworkRequestReceivedCacheControlNoStoreResource"|"WebRTCSticky"|"WebTransportSticky"|"WebSocketSticky"|"SmartCard"|"LiveMediaStreamTrack"|"UnloadHandler"|"ParserAborted"|"ContentSecurityHandler"|"ContentWebAuthenticationAPI"|"ContentFileChooser"|"ContentSerial"|"ContentFileSystemAccess"|"ContentMediaDevicesDispatcherHost"|"ContentWebBluetooth"|"ContentWebUSB"|"ContentMediaSessionService"|"ContentScreenReader"|"EmbedderPopupBlockerTabHelper"|"EmbedderSafeBrowsingTriggeredPopupBlocker"|"EmbedderSafeBrowsingThreatDetails"|"EmbedderAppBannerManager"|"EmbedderDomDistillerViewerSource"|"EmbedderDomDistillerSelfDeletingRequestDelegate"|"EmbedderOomInterventionTabHelper"|"EmbedderOfflinePage"|"EmbedderChromePasswordManagerClientBindCredentialManager"|"EmbedderPermissionRequestManager"|"EmbedderModalDialog"|"EmbedderExtensions"|"EmbedderExtensionMessaging"|"EmbedderExtensionMessagingForOpenPort"|"EmbedderExtensionSentMessageToCachedFrame"|"RequestedByWebViewClient";
|
||||
export type BackForwardCacheNotRestoredReason = "NotPrimaryMainFrame"|"BackForwardCacheDisabled"|"RelatedActiveContentsExist"|"HTTPStatusNotOK"|"SchemeNotHTTPOrHTTPS"|"Loading"|"WasGrantedMediaAccess"|"DisableForRenderFrameHostCalled"|"DomainNotAllowed"|"HTTPMethodNotGET"|"SubframeIsNavigating"|"Timeout"|"CacheLimit"|"JavaScriptExecution"|"RendererProcessKilled"|"RendererProcessCrashed"|"SchedulerTrackedFeatureUsed"|"ConflictingBrowsingInstance"|"CacheFlushed"|"ServiceWorkerVersionActivation"|"SessionRestored"|"ServiceWorkerPostMessage"|"EnteredBackForwardCacheBeforeServiceWorkerHostAdded"|"RenderFrameHostReused_SameSite"|"RenderFrameHostReused_CrossSite"|"ServiceWorkerClaim"|"IgnoreEventAndEvict"|"HaveInnerContents"|"TimeoutPuttingInCache"|"BackForwardCacheDisabledByLowMemory"|"BackForwardCacheDisabledByCommandLine"|"NetworkRequestDatapipeDrainedAsBytesConsumer"|"NetworkRequestRedirected"|"NetworkRequestTimeout"|"NetworkExceedsBufferLimit"|"NavigationCancelledWhileRestoring"|"NotMostRecentNavigationEntry"|"BackForwardCacheDisabledForPrerender"|"UserAgentOverrideDiffers"|"ForegroundCacheLimit"|"BrowsingInstanceNotSwapped"|"BackForwardCacheDisabledForDelegate"|"UnloadHandlerExistsInMainFrame"|"UnloadHandlerExistsInSubFrame"|"ServiceWorkerUnregistration"|"CacheControlNoStore"|"CacheControlNoStoreCookieModified"|"CacheControlNoStoreHTTPOnlyCookieModified"|"NoResponseHead"|"Unknown"|"ActivationNavigationsDisallowedForBug1234857"|"ErrorDocument"|"FencedFramesEmbedder"|"CookieDisabled"|"HTTPAuthRequired"|"CookieFlushed"|"BroadcastChannelOnMessage"|"WebViewSettingsChanged"|"WebViewJavaScriptObjectChanged"|"WebViewMessageListenerInjected"|"WebViewSafeBrowsingAllowlistChanged"|"WebViewDocumentStartJavascriptChanged"|"WebSocket"|"WebTransport"|"WebRTC"|"MainResourceHasCacheControlNoStore"|"MainResourceHasCacheControlNoCache"|"SubresourceHasCacheControlNoStore"|"SubresourceHasCacheControlNoCache"|"ContainsPlugins"|"DocumentLoaded"|"OutstandingNetworkRequestOthers"|"RequestedMIDIPermission"|"RequestedAudioCapturePermission"|"RequestedVideoCapturePermission"|"RequestedBackForwardCacheBlockedSensors"|"RequestedBackgroundWorkPermission"|"BroadcastChannel"|"WebXR"|"SharedWorker"|"WebLocks"|"WebHID"|"WebShare"|"RequestedStorageAccessGrant"|"WebNfc"|"OutstandingNetworkRequestFetch"|"OutstandingNetworkRequestXHR"|"AppBanner"|"Printing"|"WebDatabase"|"PictureInPicture"|"Portal"|"SpeechRecognizer"|"IdleManager"|"PaymentManager"|"SpeechSynthesis"|"KeyboardLock"|"WebOTPService"|"OutstandingNetworkRequestDirectSocket"|"InjectedJavascript"|"InjectedStyleSheet"|"KeepaliveRequest"|"IndexedDBEvent"|"Dummy"|"JsNetworkRequestReceivedCacheControlNoStoreResource"|"WebRTCSticky"|"WebTransportSticky"|"WebSocketSticky"|"SmartCard"|"LiveMediaStreamTrack"|"UnloadHandler"|"ParserAborted"|"ContentSecurityHandler"|"ContentWebAuthenticationAPI"|"ContentFileChooser"|"ContentSerial"|"ContentFileSystemAccess"|"ContentMediaDevicesDispatcherHost"|"ContentWebBluetooth"|"ContentWebUSB"|"ContentMediaSessionService"|"ContentScreenReader"|"EmbedderPopupBlockerTabHelper"|"EmbedderSafeBrowsingTriggeredPopupBlocker"|"EmbedderSafeBrowsingThreatDetails"|"EmbedderAppBannerManager"|"EmbedderDomDistillerViewerSource"|"EmbedderDomDistillerSelfDeletingRequestDelegate"|"EmbedderOomInterventionTabHelper"|"EmbedderOfflinePage"|"EmbedderChromePasswordManagerClientBindCredentialManager"|"EmbedderPermissionRequestManager"|"EmbedderModalDialog"|"EmbedderExtensions"|"EmbedderExtensionMessaging"|"EmbedderExtensionMessagingForOpenPort"|"EmbedderExtensionSentMessageToCachedFrame"|"RequestedByWebViewClient";
|
||||
/**
|
||||
* Types of not restored reasons for back-forward cache.
|
||||
*/
|
||||
|
|
@ -17025,9 +17070,8 @@ manifestId.
|
|||
}
|
||||
/**
|
||||
* Launches the installed web app, or an url in the same web app instead of the
|
||||
default start url if it is provided. Returns a tab / web contents based
|
||||
Target.TargetID which can be used to attach to via Target.attachToTarget or
|
||||
similar APIs.
|
||||
default start url if it is provided. Returns a page Target.TargetID which
|
||||
can be used to attach to via Target.attachToTarget or similar APIs.
|
||||
*/
|
||||
export type launchParameters = {
|
||||
manifestId: string;
|
||||
|
|
@ -17039,6 +17083,41 @@ similar APIs.
|
|||
*/
|
||||
targetId: Target.TargetID;
|
||||
}
|
||||
/**
|
||||
* Opens one or more local files from an installed web app identified by its
|
||||
manifestId. The web app needs to have file handlers registered to process
|
||||
the files. The API returns one or more page Target.TargetIDs which can be
|
||||
used to attach to via Target.attachToTarget or similar APIs.
|
||||
If some files in the parameters cannot be handled by the web app, they will
|
||||
be ignored. If none of the files can be handled, this API returns an error.
|
||||
If no files provided as the parameter, this API also returns an error.
|
||||
|
||||
According to the definition of the file handlers in the manifest file, one
|
||||
Target.TargetID may represent a page handling one or more files. The order
|
||||
of the returned Target.TargetIDs is not guaranteed.
|
||||
|
||||
TODO(crbug.com/339454034): Check the existences of the input files.
|
||||
*/
|
||||
export type launchFilesInAppParameters = {
|
||||
manifestId: string;
|
||||
files: string[];
|
||||
}
|
||||
export type launchFilesInAppReturnValue = {
|
||||
/**
|
||||
* IDs of the tab targets created as the result.
|
||||
*/
|
||||
targetIds: Target.TargetID[];
|
||||
}
|
||||
/**
|
||||
* Opens the current page in its web app identified by the manifest id, needs
|
||||
to be called on a page target. This function returns immediately without
|
||||
waiting for the app finishing loading.
|
||||
*/
|
||||
export type openCurrentPageInAppParameters = {
|
||||
manifestId: string;
|
||||
}
|
||||
export type openCurrentPageInAppReturnValue = {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -20010,6 +20089,7 @@ Error was thrown.
|
|||
"DOM.getFrameOwner": DOM.getFrameOwnerParameters;
|
||||
"DOM.getContainerForNode": DOM.getContainerForNodeParameters;
|
||||
"DOM.getQueryingDescendantsForContainer": DOM.getQueryingDescendantsForContainerParameters;
|
||||
"DOM.getAnchorElement": DOM.getAnchorElementParameters;
|
||||
"DOMDebugger.getEventListeners": DOMDebugger.getEventListenersParameters;
|
||||
"DOMDebugger.removeDOMBreakpoint": DOMDebugger.removeDOMBreakpointParameters;
|
||||
"DOMDebugger.removeEventListenerBreakpoint": DOMDebugger.removeEventListenerBreakpointParameters;
|
||||
|
|
@ -20379,6 +20459,8 @@ Error was thrown.
|
|||
"PWA.install": PWA.installParameters;
|
||||
"PWA.uninstall": PWA.uninstallParameters;
|
||||
"PWA.launch": PWA.launchParameters;
|
||||
"PWA.launchFilesInApp": PWA.launchFilesInAppParameters;
|
||||
"PWA.openCurrentPageInApp": PWA.openCurrentPageInAppParameters;
|
||||
"Console.clearMessages": Console.clearMessagesParameters;
|
||||
"Console.disable": Console.disableParameters;
|
||||
"Console.enable": Console.enableParameters;
|
||||
|
|
@ -20603,6 +20685,7 @@ Error was thrown.
|
|||
"DOM.getFrameOwner": DOM.getFrameOwnerReturnValue;
|
||||
"DOM.getContainerForNode": DOM.getContainerForNodeReturnValue;
|
||||
"DOM.getQueryingDescendantsForContainer": DOM.getQueryingDescendantsForContainerReturnValue;
|
||||
"DOM.getAnchorElement": DOM.getAnchorElementReturnValue;
|
||||
"DOMDebugger.getEventListeners": DOMDebugger.getEventListenersReturnValue;
|
||||
"DOMDebugger.removeDOMBreakpoint": DOMDebugger.removeDOMBreakpointReturnValue;
|
||||
"DOMDebugger.removeEventListenerBreakpoint": DOMDebugger.removeEventListenerBreakpointReturnValue;
|
||||
|
|
@ -20972,6 +21055,8 @@ Error was thrown.
|
|||
"PWA.install": PWA.installReturnValue;
|
||||
"PWA.uninstall": PWA.uninstallReturnValue;
|
||||
"PWA.launch": PWA.launchReturnValue;
|
||||
"PWA.launchFilesInApp": PWA.launchFilesInAppReturnValue;
|
||||
"PWA.openCurrentPageInApp": PWA.openCurrentPageInAppReturnValue;
|
||||
"Console.clearMessages": Console.clearMessagesReturnValue;
|
||||
"Console.disable": Console.disableReturnValue;
|
||||
"Console.enable": Console.enableReturnValue;
|
||||
|
|
|
|||
|
|
@ -26,6 +26,10 @@ export class Clock {
|
|||
this._browserContext = browserContext;
|
||||
}
|
||||
|
||||
markAsUninstalled() {
|
||||
this._scriptInstalled = false;
|
||||
}
|
||||
|
||||
async fastForward(ticks: number | string) {
|
||||
await this._installIfNeeded();
|
||||
const ticksMillis = parseTicks(ticks);
|
||||
|
|
@ -144,5 +148,8 @@ function parseTime(epoch: string | number | undefined): number {
|
|||
return 0;
|
||||
if (typeof epoch === 'number')
|
||||
return epoch;
|
||||
return new Date(epoch).getTime();
|
||||
const parsed = new Date(epoch);
|
||||
if (!isFinite(parsed.getTime()))
|
||||
throw new Error(`Invalid date: ${epoch}`);
|
||||
return parsed.getTime();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@
|
|||
"defaultBrowserType": "webkit"
|
||||
},
|
||||
"Galaxy S5": {
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.6478.36 Mobile Safari/537.36",
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6533.5 Mobile Safari/537.36",
|
||||
"viewport": {
|
||||
"width": 360,
|
||||
"height": 640
|
||||
|
|
@ -121,7 +121,7 @@
|
|||
"defaultBrowserType": "chromium"
|
||||
},
|
||||
"Galaxy S5 landscape": {
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.6478.36 Mobile Safari/537.36",
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6533.5 Mobile Safari/537.36",
|
||||
"viewport": {
|
||||
"width": 640,
|
||||
"height": 360
|
||||
|
|
@ -132,7 +132,7 @@
|
|||
"defaultBrowserType": "chromium"
|
||||
},
|
||||
"Galaxy S8": {
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 7.0; SM-G950U Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.6478.36 Mobile Safari/537.36",
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 7.0; SM-G950U Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6533.5 Mobile Safari/537.36",
|
||||
"viewport": {
|
||||
"width": 360,
|
||||
"height": 740
|
||||
|
|
@ -143,7 +143,7 @@
|
|||
"defaultBrowserType": "chromium"
|
||||
},
|
||||
"Galaxy S8 landscape": {
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 7.0; SM-G950U Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.6478.36 Mobile Safari/537.36",
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 7.0; SM-G950U Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6533.5 Mobile Safari/537.36",
|
||||
"viewport": {
|
||||
"width": 740,
|
||||
"height": 360
|
||||
|
|
@ -154,7 +154,7 @@
|
|||
"defaultBrowserType": "chromium"
|
||||
},
|
||||
"Galaxy S9+": {
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 8.0.0; SM-G965U Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.6478.36 Mobile Safari/537.36",
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 8.0.0; SM-G965U Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6533.5 Mobile Safari/537.36",
|
||||
"viewport": {
|
||||
"width": 320,
|
||||
"height": 658
|
||||
|
|
@ -165,7 +165,7 @@
|
|||
"defaultBrowserType": "chromium"
|
||||
},
|
||||
"Galaxy S9+ landscape": {
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 8.0.0; SM-G965U Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.6478.36 Mobile Safari/537.36",
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 8.0.0; SM-G965U Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6533.5 Mobile Safari/537.36",
|
||||
"viewport": {
|
||||
"width": 658,
|
||||
"height": 320
|
||||
|
|
@ -176,7 +176,7 @@
|
|||
"defaultBrowserType": "chromium"
|
||||
},
|
||||
"Galaxy Tab S4": {
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 8.1.0; SM-T837A) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.6478.36 Safari/537.36",
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 8.1.0; SM-T837A) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6533.5 Safari/537.36",
|
||||
"viewport": {
|
||||
"width": 712,
|
||||
"height": 1138
|
||||
|
|
@ -187,7 +187,7 @@
|
|||
"defaultBrowserType": "chromium"
|
||||
},
|
||||
"Galaxy Tab S4 landscape": {
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 8.1.0; SM-T837A) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.6478.36 Safari/537.36",
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 8.1.0; SM-T837A) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6533.5 Safari/537.36",
|
||||
"viewport": {
|
||||
"width": 1138,
|
||||
"height": 712
|
||||
|
|
@ -978,7 +978,7 @@
|
|||
"defaultBrowserType": "webkit"
|
||||
},
|
||||
"LG Optimus L70": {
|
||||
"userAgent": "Mozilla/5.0 (Linux; U; Android 4.4.2; en-us; LGMS323 Build/KOT49I.MS32310c) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/126.0.6478.36 Mobile Safari/537.36",
|
||||
"userAgent": "Mozilla/5.0 (Linux; U; Android 4.4.2; en-us; LGMS323 Build/KOT49I.MS32310c) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/127.0.6533.5 Mobile Safari/537.36",
|
||||
"viewport": {
|
||||
"width": 384,
|
||||
"height": 640
|
||||
|
|
@ -989,7 +989,7 @@
|
|||
"defaultBrowserType": "chromium"
|
||||
},
|
||||
"LG Optimus L70 landscape": {
|
||||
"userAgent": "Mozilla/5.0 (Linux; U; Android 4.4.2; en-us; LGMS323 Build/KOT49I.MS32310c) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/126.0.6478.36 Mobile Safari/537.36",
|
||||
"userAgent": "Mozilla/5.0 (Linux; U; Android 4.4.2; en-us; LGMS323 Build/KOT49I.MS32310c) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/127.0.6533.5 Mobile Safari/537.36",
|
||||
"viewport": {
|
||||
"width": 640,
|
||||
"height": 384
|
||||
|
|
@ -1000,7 +1000,7 @@
|
|||
"defaultBrowserType": "chromium"
|
||||
},
|
||||
"Microsoft Lumia 550": {
|
||||
"userAgent": "Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 550) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.6478.36 Mobile Safari/537.36 Edge/14.14263",
|
||||
"userAgent": "Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 550) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6533.5 Mobile Safari/537.36 Edge/14.14263",
|
||||
"viewport": {
|
||||
"width": 640,
|
||||
"height": 360
|
||||
|
|
@ -1011,7 +1011,7 @@
|
|||
"defaultBrowserType": "chromium"
|
||||
},
|
||||
"Microsoft Lumia 550 landscape": {
|
||||
"userAgent": "Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 550) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.6478.36 Mobile Safari/537.36 Edge/14.14263",
|
||||
"userAgent": "Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 550) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6533.5 Mobile Safari/537.36 Edge/14.14263",
|
||||
"viewport": {
|
||||
"width": 360,
|
||||
"height": 640
|
||||
|
|
@ -1022,7 +1022,7 @@
|
|||
"defaultBrowserType": "chromium"
|
||||
},
|
||||
"Microsoft Lumia 950": {
|
||||
"userAgent": "Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 950) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.6478.36 Mobile Safari/537.36 Edge/14.14263",
|
||||
"userAgent": "Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 950) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6533.5 Mobile Safari/537.36 Edge/14.14263",
|
||||
"viewport": {
|
||||
"width": 360,
|
||||
"height": 640
|
||||
|
|
@ -1033,7 +1033,7 @@
|
|||
"defaultBrowserType": "chromium"
|
||||
},
|
||||
"Microsoft Lumia 950 landscape": {
|
||||
"userAgent": "Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 950) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.6478.36 Mobile Safari/537.36 Edge/14.14263",
|
||||
"userAgent": "Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 950) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6533.5 Mobile Safari/537.36 Edge/14.14263",
|
||||
"viewport": {
|
||||
"width": 640,
|
||||
"height": 360
|
||||
|
|
@ -1044,7 +1044,7 @@
|
|||
"defaultBrowserType": "chromium"
|
||||
},
|
||||
"Nexus 10": {
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 10 Build/MOB31T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.6478.36 Safari/537.36",
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 10 Build/MOB31T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6533.5 Safari/537.36",
|
||||
"viewport": {
|
||||
"width": 800,
|
||||
"height": 1280
|
||||
|
|
@ -1055,7 +1055,7 @@
|
|||
"defaultBrowserType": "chromium"
|
||||
},
|
||||
"Nexus 10 landscape": {
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 10 Build/MOB31T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.6478.36 Safari/537.36",
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 10 Build/MOB31T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6533.5 Safari/537.36",
|
||||
"viewport": {
|
||||
"width": 1280,
|
||||
"height": 800
|
||||
|
|
@ -1066,7 +1066,7 @@
|
|||
"defaultBrowserType": "chromium"
|
||||
},
|
||||
"Nexus 4": {
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 4.4.2; Nexus 4 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.6478.36 Mobile Safari/537.36",
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 4.4.2; Nexus 4 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6533.5 Mobile Safari/537.36",
|
||||
"viewport": {
|
||||
"width": 384,
|
||||
"height": 640
|
||||
|
|
@ -1077,7 +1077,7 @@
|
|||
"defaultBrowserType": "chromium"
|
||||
},
|
||||
"Nexus 4 landscape": {
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 4.4.2; Nexus 4 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.6478.36 Mobile Safari/537.36",
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 4.4.2; Nexus 4 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6533.5 Mobile Safari/537.36",
|
||||
"viewport": {
|
||||
"width": 640,
|
||||
"height": 384
|
||||
|
|
@ -1088,7 +1088,7 @@
|
|||
"defaultBrowserType": "chromium"
|
||||
},
|
||||
"Nexus 5": {
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.6478.36 Mobile Safari/537.36",
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6533.5 Mobile Safari/537.36",
|
||||
"viewport": {
|
||||
"width": 360,
|
||||
"height": 640
|
||||
|
|
@ -1099,7 +1099,7 @@
|
|||
"defaultBrowserType": "chromium"
|
||||
},
|
||||
"Nexus 5 landscape": {
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.6478.36 Mobile Safari/537.36",
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6533.5 Mobile Safari/537.36",
|
||||
"viewport": {
|
||||
"width": 640,
|
||||
"height": 360
|
||||
|
|
@ -1110,7 +1110,7 @@
|
|||
"defaultBrowserType": "chromium"
|
||||
},
|
||||
"Nexus 5X": {
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 8.0.0; Nexus 5X Build/OPR4.170623.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.6478.36 Mobile Safari/537.36",
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 8.0.0; Nexus 5X Build/OPR4.170623.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6533.5 Mobile Safari/537.36",
|
||||
"viewport": {
|
||||
"width": 412,
|
||||
"height": 732
|
||||
|
|
@ -1121,7 +1121,7 @@
|
|||
"defaultBrowserType": "chromium"
|
||||
},
|
||||
"Nexus 5X landscape": {
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 8.0.0; Nexus 5X Build/OPR4.170623.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.6478.36 Mobile Safari/537.36",
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 8.0.0; Nexus 5X Build/OPR4.170623.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6533.5 Mobile Safari/537.36",
|
||||
"viewport": {
|
||||
"width": 732,
|
||||
"height": 412
|
||||
|
|
@ -1132,7 +1132,7 @@
|
|||
"defaultBrowserType": "chromium"
|
||||
},
|
||||
"Nexus 6": {
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 7.1.1; Nexus 6 Build/N6F26U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.6478.36 Mobile Safari/537.36",
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 7.1.1; Nexus 6 Build/N6F26U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6533.5 Mobile Safari/537.36",
|
||||
"viewport": {
|
||||
"width": 412,
|
||||
"height": 732
|
||||
|
|
@ -1143,7 +1143,7 @@
|
|||
"defaultBrowserType": "chromium"
|
||||
},
|
||||
"Nexus 6 landscape": {
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 7.1.1; Nexus 6 Build/N6F26U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.6478.36 Mobile Safari/537.36",
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 7.1.1; Nexus 6 Build/N6F26U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6533.5 Mobile Safari/537.36",
|
||||
"viewport": {
|
||||
"width": 732,
|
||||
"height": 412
|
||||
|
|
@ -1154,7 +1154,7 @@
|
|||
"defaultBrowserType": "chromium"
|
||||
},
|
||||
"Nexus 6P": {
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 8.0.0; Nexus 6P Build/OPP3.170518.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.6478.36 Mobile Safari/537.36",
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 8.0.0; Nexus 6P Build/OPP3.170518.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6533.5 Mobile Safari/537.36",
|
||||
"viewport": {
|
||||
"width": 412,
|
||||
"height": 732
|
||||
|
|
@ -1165,7 +1165,7 @@
|
|||
"defaultBrowserType": "chromium"
|
||||
},
|
||||
"Nexus 6P landscape": {
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 8.0.0; Nexus 6P Build/OPP3.170518.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.6478.36 Mobile Safari/537.36",
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 8.0.0; Nexus 6P Build/OPP3.170518.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6533.5 Mobile Safari/537.36",
|
||||
"viewport": {
|
||||
"width": 732,
|
||||
"height": 412
|
||||
|
|
@ -1176,7 +1176,7 @@
|
|||
"defaultBrowserType": "chromium"
|
||||
},
|
||||
"Nexus 7": {
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 7 Build/MOB30X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.6478.36 Safari/537.36",
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 7 Build/MOB30X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6533.5 Safari/537.36",
|
||||
"viewport": {
|
||||
"width": 600,
|
||||
"height": 960
|
||||
|
|
@ -1187,7 +1187,7 @@
|
|||
"defaultBrowserType": "chromium"
|
||||
},
|
||||
"Nexus 7 landscape": {
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 7 Build/MOB30X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.6478.36 Safari/537.36",
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 7 Build/MOB30X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6533.5 Safari/537.36",
|
||||
"viewport": {
|
||||
"width": 960,
|
||||
"height": 600
|
||||
|
|
@ -1242,7 +1242,7 @@
|
|||
"defaultBrowserType": "webkit"
|
||||
},
|
||||
"Pixel 2": {
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 8.0; Pixel 2 Build/OPD3.170816.012) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.6478.36 Mobile Safari/537.36",
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 8.0; Pixel 2 Build/OPD3.170816.012) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6533.5 Mobile Safari/537.36",
|
||||
"viewport": {
|
||||
"width": 411,
|
||||
"height": 731
|
||||
|
|
@ -1253,7 +1253,7 @@
|
|||
"defaultBrowserType": "chromium"
|
||||
},
|
||||
"Pixel 2 landscape": {
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 8.0; Pixel 2 Build/OPD3.170816.012) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.6478.36 Mobile Safari/537.36",
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 8.0; Pixel 2 Build/OPD3.170816.012) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6533.5 Mobile Safari/537.36",
|
||||
"viewport": {
|
||||
"width": 731,
|
||||
"height": 411
|
||||
|
|
@ -1264,7 +1264,7 @@
|
|||
"defaultBrowserType": "chromium"
|
||||
},
|
||||
"Pixel 2 XL": {
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 8.0.0; Pixel 2 XL Build/OPD1.170816.004) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.6478.36 Mobile Safari/537.36",
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 8.0.0; Pixel 2 XL Build/OPD1.170816.004) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6533.5 Mobile Safari/537.36",
|
||||
"viewport": {
|
||||
"width": 411,
|
||||
"height": 823
|
||||
|
|
@ -1275,7 +1275,7 @@
|
|||
"defaultBrowserType": "chromium"
|
||||
},
|
||||
"Pixel 2 XL landscape": {
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 8.0.0; Pixel 2 XL Build/OPD1.170816.004) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.6478.36 Mobile Safari/537.36",
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 8.0.0; Pixel 2 XL Build/OPD1.170816.004) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6533.5 Mobile Safari/537.36",
|
||||
"viewport": {
|
||||
"width": 823,
|
||||
"height": 411
|
||||
|
|
@ -1286,7 +1286,7 @@
|
|||
"defaultBrowserType": "chromium"
|
||||
},
|
||||
"Pixel 3": {
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 9; Pixel 3 Build/PQ1A.181105.017.A1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.6478.36 Mobile Safari/537.36",
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 9; Pixel 3 Build/PQ1A.181105.017.A1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6533.5 Mobile Safari/537.36",
|
||||
"viewport": {
|
||||
"width": 393,
|
||||
"height": 786
|
||||
|
|
@ -1297,7 +1297,7 @@
|
|||
"defaultBrowserType": "chromium"
|
||||
},
|
||||
"Pixel 3 landscape": {
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 9; Pixel 3 Build/PQ1A.181105.017.A1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.6478.36 Mobile Safari/537.36",
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 9; Pixel 3 Build/PQ1A.181105.017.A1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6533.5 Mobile Safari/537.36",
|
||||
"viewport": {
|
||||
"width": 786,
|
||||
"height": 393
|
||||
|
|
@ -1308,7 +1308,7 @@
|
|||
"defaultBrowserType": "chromium"
|
||||
},
|
||||
"Pixel 4": {
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 10; Pixel 4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.6478.36 Mobile Safari/537.36",
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 10; Pixel 4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6533.5 Mobile Safari/537.36",
|
||||
"viewport": {
|
||||
"width": 353,
|
||||
"height": 745
|
||||
|
|
@ -1319,7 +1319,7 @@
|
|||
"defaultBrowserType": "chromium"
|
||||
},
|
||||
"Pixel 4 landscape": {
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 10; Pixel 4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.6478.36 Mobile Safari/537.36",
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 10; Pixel 4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6533.5 Mobile Safari/537.36",
|
||||
"viewport": {
|
||||
"width": 745,
|
||||
"height": 353
|
||||
|
|
@ -1330,7 +1330,7 @@
|
|||
"defaultBrowserType": "chromium"
|
||||
},
|
||||
"Pixel 4a (5G)": {
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 11; Pixel 4a (5G)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.6478.36 Mobile Safari/537.36",
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 11; Pixel 4a (5G)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6533.5 Mobile Safari/537.36",
|
||||
"screen": {
|
||||
"width": 412,
|
||||
"height": 892
|
||||
|
|
@ -1345,7 +1345,7 @@
|
|||
"defaultBrowserType": "chromium"
|
||||
},
|
||||
"Pixel 4a (5G) landscape": {
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 11; Pixel 4a (5G)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.6478.36 Mobile Safari/537.36",
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 11; Pixel 4a (5G)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6533.5 Mobile Safari/537.36",
|
||||
"screen": {
|
||||
"height": 892,
|
||||
"width": 412
|
||||
|
|
@ -1360,7 +1360,7 @@
|
|||
"defaultBrowserType": "chromium"
|
||||
},
|
||||
"Pixel 5": {
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.6478.36 Mobile Safari/537.36",
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6533.5 Mobile Safari/537.36",
|
||||
"screen": {
|
||||
"width": 393,
|
||||
"height": 851
|
||||
|
|
@ -1375,7 +1375,7 @@
|
|||
"defaultBrowserType": "chromium"
|
||||
},
|
||||
"Pixel 5 landscape": {
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.6478.36 Mobile Safari/537.36",
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6533.5 Mobile Safari/537.36",
|
||||
"screen": {
|
||||
"width": 851,
|
||||
"height": 393
|
||||
|
|
@ -1390,7 +1390,7 @@
|
|||
"defaultBrowserType": "chromium"
|
||||
},
|
||||
"Pixel 7": {
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 14; Pixel 7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.6478.36 Mobile Safari/537.36",
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 14; Pixel 7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6533.5 Mobile Safari/537.36",
|
||||
"screen": {
|
||||
"width": 412,
|
||||
"height": 915
|
||||
|
|
@ -1405,7 +1405,7 @@
|
|||
"defaultBrowserType": "chromium"
|
||||
},
|
||||
"Pixel 7 landscape": {
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 14; Pixel 7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.6478.36 Mobile Safari/537.36",
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 14; Pixel 7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6533.5 Mobile Safari/537.36",
|
||||
"screen": {
|
||||
"width": 915,
|
||||
"height": 412
|
||||
|
|
@ -1420,7 +1420,7 @@
|
|||
"defaultBrowserType": "chromium"
|
||||
},
|
||||
"Moto G4": {
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 7.0; Moto G (4)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.6478.36 Mobile Safari/537.36",
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 7.0; Moto G (4)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6533.5 Mobile Safari/537.36",
|
||||
"viewport": {
|
||||
"width": 360,
|
||||
"height": 640
|
||||
|
|
@ -1431,7 +1431,7 @@
|
|||
"defaultBrowserType": "chromium"
|
||||
},
|
||||
"Moto G4 landscape": {
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 7.0; Moto G (4)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.6478.36 Mobile Safari/537.36",
|
||||
"userAgent": "Mozilla/5.0 (Linux; Android 7.0; Moto G (4)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6533.5 Mobile Safari/537.36",
|
||||
"viewport": {
|
||||
"width": 640,
|
||||
"height": 360
|
||||
|
|
@ -1442,7 +1442,7 @@
|
|||
"defaultBrowserType": "chromium"
|
||||
},
|
||||
"Desktop Chrome HiDPI": {
|
||||
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.6478.36 Safari/537.36",
|
||||
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6533.5 Safari/537.36",
|
||||
"screen": {
|
||||
"width": 1792,
|
||||
"height": 1120
|
||||
|
|
@ -1457,7 +1457,7 @@
|
|||
"defaultBrowserType": "chromium"
|
||||
},
|
||||
"Desktop Edge HiDPI": {
|
||||
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.6478.36 Safari/537.36 Edg/126.0.6478.36",
|
||||
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6533.5 Safari/537.36 Edg/127.0.6533.5",
|
||||
"screen": {
|
||||
"width": 1792,
|
||||
"height": 1120
|
||||
|
|
@ -1472,7 +1472,7 @@
|
|||
"defaultBrowserType": "chromium"
|
||||
},
|
||||
"Desktop Firefox HiDPI": {
|
||||
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:126.0) Gecko/20100101 Firefox/126.0",
|
||||
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:127.0) Gecko/20100101 Firefox/127.0",
|
||||
"screen": {
|
||||
"width": 1792,
|
||||
"height": 1120
|
||||
|
|
@ -1502,7 +1502,7 @@
|
|||
"defaultBrowserType": "webkit"
|
||||
},
|
||||
"Desktop Chrome": {
|
||||
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.6478.36 Safari/537.36",
|
||||
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6533.5 Safari/537.36",
|
||||
"screen": {
|
||||
"width": 1920,
|
||||
"height": 1080
|
||||
|
|
@ -1517,7 +1517,7 @@
|
|||
"defaultBrowserType": "chromium"
|
||||
},
|
||||
"Desktop Edge": {
|
||||
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.6478.36 Safari/537.36 Edg/126.0.6478.36",
|
||||
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6533.5 Safari/537.36 Edg/127.0.6533.5",
|
||||
"screen": {
|
||||
"width": 1920,
|
||||
"height": 1080
|
||||
|
|
@ -1532,7 +1532,7 @@
|
|||
"defaultBrowserType": "chromium"
|
||||
},
|
||||
"Desktop Firefox": {
|
||||
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:126.0) Gecko/20100101 Firefox/126.0",
|
||||
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:127.0) Gecko/20100101 Firefox/127.0",
|
||||
"screen": {
|
||||
"width": 1920,
|
||||
"height": 1080
|
||||
|
|
|
|||
|
|
@ -178,13 +178,20 @@ export class BrowserContextDispatcher extends Dispatcher<BrowserContext, channel
|
|||
return false;
|
||||
}
|
||||
|
||||
async createTempFile(params: channels.BrowserContextCreateTempFileParams): Promise<channels.BrowserContextCreateTempFileResult> {
|
||||
async createTempFiles(params: channels.BrowserContextCreateTempFilesParams): Promise<channels.BrowserContextCreateTempFilesResult> {
|
||||
const dir = this._context._browser.options.artifactsDir;
|
||||
const tmpDir = path.join(dir, 'upload-' + createGuid());
|
||||
await fs.promises.mkdir(tmpDir);
|
||||
const tempDirWithRootName = params.rootDirName ? path.join(tmpDir, path.basename(params.rootDirName)) : tmpDir;
|
||||
await fs.promises.mkdir(tempDirWithRootName, { recursive: true });
|
||||
this._context._tempDirs.push(tmpDir);
|
||||
const file = fs.createWriteStream(path.join(tmpDir, params.name));
|
||||
return { writableStream: new WritableStreamDispatcher(this, file, params.lastModifiedMs) };
|
||||
return {
|
||||
rootDir: params.rootDirName ? new WritableStreamDispatcher(this, tempDirWithRootName) : undefined,
|
||||
writableStreams: await Promise.all(params.items.map(async item => {
|
||||
await fs.promises.mkdir(path.dirname(path.join(tempDirWithRootName, item.name)), { recursive: true });
|
||||
const file = fs.createWriteStream(path.join(tempDirWithRootName, item.name));
|
||||
return new WritableStreamDispatcher(this, file, item.lastModifiedMs);
|
||||
}))
|
||||
};
|
||||
}
|
||||
|
||||
async setDefaultNavigationTimeoutNoReply(params: channels.BrowserContextSetDefaultNavigationTimeoutNoReplyParams) {
|
||||
|
|
|
|||
|
|
@ -20,17 +20,19 @@ import * as fs from 'fs';
|
|||
import { createGuid } from '../../utils';
|
||||
import type { BrowserContextDispatcher } from './browserContextDispatcher';
|
||||
|
||||
export class WritableStreamDispatcher extends Dispatcher<{ guid: string, stream: fs.WriteStream }, channels.WritableStreamChannel, BrowserContextDispatcher> implements channels.WritableStreamChannel {
|
||||
export class WritableStreamDispatcher extends Dispatcher<{ guid: string, streamOrDirectory: fs.WriteStream | string }, channels.WritableStreamChannel, BrowserContextDispatcher> implements channels.WritableStreamChannel {
|
||||
_type_WritableStream = true;
|
||||
private _lastModifiedMs: number | undefined;
|
||||
|
||||
constructor(scope: BrowserContextDispatcher, stream: fs.WriteStream, lastModifiedMs?: number) {
|
||||
super(scope, { guid: 'writableStream@' + createGuid(), stream }, 'WritableStream', {});
|
||||
constructor(scope: BrowserContextDispatcher, streamOrDirectory: fs.WriteStream | string, lastModifiedMs?: number) {
|
||||
super(scope, { guid: 'writableStream@' + createGuid(), streamOrDirectory }, 'WritableStream', {});
|
||||
this._lastModifiedMs = lastModifiedMs;
|
||||
}
|
||||
|
||||
async write(params: channels.WritableStreamWriteParams): Promise<channels.WritableStreamWriteResult> {
|
||||
const stream = this._object.stream;
|
||||
if (typeof this._object.streamOrDirectory === 'string')
|
||||
throw new Error('Cannot write to a directory');
|
||||
const stream = this._object.streamOrDirectory;
|
||||
await new Promise<void>((fulfill, reject) => {
|
||||
stream.write(params.binary, error => {
|
||||
if (error)
|
||||
|
|
@ -42,13 +44,17 @@ export class WritableStreamDispatcher extends Dispatcher<{ guid: string, stream:
|
|||
}
|
||||
|
||||
async close() {
|
||||
const stream = this._object.stream;
|
||||
if (typeof this._object.streamOrDirectory === 'string')
|
||||
throw new Error('Cannot close a directory');
|
||||
const stream = this._object.streamOrDirectory;
|
||||
await new Promise<void>(fulfill => stream.end(fulfill));
|
||||
if (this._lastModifiedMs)
|
||||
await fs.promises.utimes(this.path(), new Date(this._lastModifiedMs), new Date(this._lastModifiedMs));
|
||||
}
|
||||
|
||||
path(): string {
|
||||
return this._object.stream.path as string;
|
||||
if (typeof this._object.streamOrDirectory === 'string')
|
||||
return this._object.streamOrDirectory;
|
||||
return this._object.streamOrDirectory.path as string;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ import { prepareFilesForUpload } from './fileUploadUtils';
|
|||
export type InputFilesItems = {
|
||||
filePayloads?: types.FilePayload[],
|
||||
localPaths?: string[]
|
||||
localDirectory?: string
|
||||
};
|
||||
|
||||
type ActionName = 'click' | 'hover' | 'dblclick' | 'tap' | 'move and up' | 'move and down';
|
||||
|
|
@ -625,29 +626,38 @@ export class ElementHandle<T extends Node = Node> extends js.JSHandle<T> {
|
|||
}
|
||||
|
||||
async _setInputFiles(progress: Progress, items: InputFilesItems, options: types.NavigatingActionWaitOptions): Promise<'error:notconnected' | 'done'> {
|
||||
const { filePayloads, localPaths } = items;
|
||||
const { filePayloads, localPaths, localDirectory } = items;
|
||||
const multiple = filePayloads && filePayloads.length > 1 || localPaths && localPaths.length > 1;
|
||||
const result = await this.evaluateHandleInUtility(([injected, node, multiple]): Element | undefined => {
|
||||
const result = await this.evaluateHandleInUtility(([injected, node, { multiple, directoryUpload }]): Element | undefined => {
|
||||
const element = injected.retarget(node, 'follow-label');
|
||||
if (!element)
|
||||
return;
|
||||
if (element.tagName !== 'INPUT')
|
||||
throw injected.createStacklessError('Node is not an HTMLInputElement');
|
||||
if (multiple && !(element as HTMLInputElement).multiple)
|
||||
const inputElement = element as HTMLInputElement;
|
||||
if (multiple && !inputElement.multiple && !inputElement.webkitdirectory)
|
||||
throw injected.createStacklessError('Non-multiple file input can only accept single file');
|
||||
return element;
|
||||
}, multiple);
|
||||
if (directoryUpload && !inputElement.webkitdirectory)
|
||||
throw injected.createStacklessError('File input does not support directories, pass individual files instead');
|
||||
return inputElement;
|
||||
}, { multiple, directoryUpload: !!localDirectory });
|
||||
if (result === 'error:notconnected' || !result.asElement())
|
||||
return 'error:notconnected';
|
||||
const retargeted = result.asElement() as ElementHandle<HTMLInputElement>;
|
||||
await progress.beforeInputAction(this);
|
||||
await this._page._frameManager.waitForSignalsCreatedBy(progress, options.noWaitAfter, async () => {
|
||||
progress.throwIfAborted(); // Avoid action that has side-effects.
|
||||
if (localPaths) {
|
||||
await Promise.all(localPaths.map(localPath => (
|
||||
if (localPaths || localDirectory) {
|
||||
const localPathsOrDirectory = localDirectory ? [localDirectory] : localPaths!;
|
||||
await Promise.all((localPathsOrDirectory).map(localPath => (
|
||||
fs.promises.access(localPath, fs.constants.F_OK)
|
||||
)));
|
||||
await this._page._delegate.setInputFilePaths(retargeted, localPaths);
|
||||
// Browsers traverse the given directory asynchronously and we want to ensure all files are uploaded.
|
||||
const waitForInputEvent = localDirectory ? this.evaluate(node => new Promise<any>(fulfill => {
|
||||
node.addEventListener('input', fulfill, { once: true });
|
||||
})).catch(() => {}) : Promise.resolve();
|
||||
await this._page._delegate.setInputFilePaths(retargeted, localPathsOrDirectory);
|
||||
await waitForInputEvent;
|
||||
} else {
|
||||
await this._page._delegate.setInputFiles(retargeted, filePayloads!);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,14 +30,17 @@ async function filesExceedUploadLimit(files: string[]) {
|
|||
}
|
||||
|
||||
export async function prepareFilesForUpload(frame: Frame, params: channels.ElementHandleSetInputFilesParams): Promise<InputFilesItems> {
|
||||
const { payloads, streams } = params;
|
||||
let { localPaths } = params;
|
||||
const { payloads, streams, directoryStream } = params;
|
||||
let { localPaths, localDirectory } = params;
|
||||
|
||||
if ([payloads, localPaths, streams].filter(Boolean).length !== 1)
|
||||
if ([payloads, localPaths, localDirectory, streams, directoryStream].filter(Boolean).length !== 1)
|
||||
throw new Error('Exactly one of payloads, localPaths and streams must be provided');
|
||||
|
||||
if (streams)
|
||||
localPaths = streams.map(c => (c as WritableStreamDispatcher).path());
|
||||
if (directoryStream)
|
||||
localDirectory = (directoryStream as WritableStreamDispatcher).path();
|
||||
|
||||
if (localPaths) {
|
||||
for (const p of localPaths)
|
||||
assert(path.isAbsolute(p) && path.resolve(p) === p, 'Paths provided to localPaths must be absolute and fully resolved.');
|
||||
|
|
@ -73,5 +76,5 @@ export async function prepareFilesForUpload(frame: Frame, params: channels.Eleme
|
|||
lastModifiedMs: payload.lastModifiedMs
|
||||
}));
|
||||
|
||||
return { localPaths, filePayloads };
|
||||
return { localPaths, localDirectory, filePayloads };
|
||||
}
|
||||
|
|
@ -45,8 +45,8 @@ type Timer = {
|
|||
func: TimerHandler;
|
||||
args: any[];
|
||||
delay: number;
|
||||
callAt: number;
|
||||
createdAt: number;
|
||||
callAt: Ticks;
|
||||
createdAt: Ticks;
|
||||
id: number;
|
||||
error?: Error;
|
||||
};
|
||||
|
|
@ -58,15 +58,15 @@ interface Embedder {
|
|||
setInterval(task: () => void, delay: number): () => void;
|
||||
}
|
||||
|
||||
type Ticks = number & { readonly __brand: 'Ticks' };
|
||||
type EmbedderTicks = number & { readonly __brand: 'EmbedderTicks' };
|
||||
type WallTime = number & { readonly __brand: 'WallTime' };
|
||||
|
||||
type Time = {
|
||||
// ms since Epoch
|
||||
time: number;
|
||||
// Ticks since the session began (ala performance.now)
|
||||
ticks: number;
|
||||
// Whether fixed time was set.
|
||||
time: WallTime;
|
||||
ticks: Ticks;
|
||||
isFixedTime: boolean;
|
||||
// Origin time since Epoch when session started.
|
||||
origin: number;
|
||||
origin: WallTime;
|
||||
};
|
||||
|
||||
type LogEntryType = 'fastForward' |'install' | 'pauseAt' | 'resume' | 'runFor' | 'setFixedTime' | 'setSystemTime';
|
||||
|
|
@ -79,11 +79,11 @@ export class ClockController {
|
|||
private _embedder: Embedder;
|
||||
readonly disposables: (() => void)[] = [];
|
||||
private _log: { type: LogEntryType, time: number, param?: number }[] = [];
|
||||
private _realTime: { startTicks: number, lastSyncTicks: number } | undefined;
|
||||
private _currentRealTimeTimer: { callAt: number, dispose: () => void } | undefined;
|
||||
private _realTime: { startTicks: EmbedderTicks, lastSyncTicks: EmbedderTicks } | undefined;
|
||||
private _currentRealTimeTimer: { callAt: Ticks, dispose: () => void } | undefined;
|
||||
|
||||
constructor(embedder: Embedder) {
|
||||
this._now = { time: 0, isFixedTime: false, ticks: 0, origin: -1 };
|
||||
this._now = { time: asWallTime(0), isFixedTime: false, ticks: 0 as Ticks, origin: asWallTime(-1) };
|
||||
this._embedder = embedder;
|
||||
}
|
||||
|
||||
|
|
@ -99,17 +99,17 @@ export class ClockController {
|
|||
|
||||
install(time: number) {
|
||||
this._replayLogOnce();
|
||||
this._innerSetTime(time);
|
||||
this._innerSetTime(asWallTime(time));
|
||||
}
|
||||
|
||||
setSystemTime(time: number) {
|
||||
this._replayLogOnce();
|
||||
this._innerSetTime(time);
|
||||
this._innerSetTime(asWallTime(time));
|
||||
}
|
||||
|
||||
setFixedTime(time: number) {
|
||||
this._replayLogOnce();
|
||||
this._innerSetFixedTime(time);
|
||||
this._innerSetFixedTime(asWallTime(time));
|
||||
}
|
||||
|
||||
performanceNow(): DOMHighResTimeStamp {
|
||||
|
|
@ -117,22 +117,22 @@ export class ClockController {
|
|||
return this._now.ticks;
|
||||
}
|
||||
|
||||
private _innerSetTime(time: number) {
|
||||
private _innerSetTime(time: WallTime) {
|
||||
this._now.time = time;
|
||||
this._now.isFixedTime = false;
|
||||
if (this._now.origin < 0)
|
||||
this._now.origin = this._now.time;
|
||||
}
|
||||
|
||||
private _innerSetFixedTime(time: number) {
|
||||
private _innerSetFixedTime(time: WallTime) {
|
||||
this._innerSetTime(time);
|
||||
this._now.isFixedTime = true;
|
||||
}
|
||||
|
||||
private _advanceNow(toTicks: number) {
|
||||
private _advanceNow(to: Ticks) {
|
||||
if (!this._now.isFixedTime)
|
||||
this._now.time += toTicks - this._now.ticks;
|
||||
this._now.ticks = toTicks;
|
||||
this._now.time = asWallTime(this._now.time + to - this._now.ticks);
|
||||
this._now.ticks = to;
|
||||
}
|
||||
|
||||
async log(type: LogEntryType, time: number, param?: number) {
|
||||
|
|
@ -143,30 +143,32 @@ export class ClockController {
|
|||
this._replayLogOnce();
|
||||
if (ticks < 0)
|
||||
throw new TypeError('Negative ticks are not supported');
|
||||
await this._runTo(this._now.ticks + ticks);
|
||||
await this._runTo(shiftTicks(this._now.ticks, ticks));
|
||||
}
|
||||
|
||||
private async _runTo(tickTo: number) {
|
||||
if (this._now.ticks > tickTo)
|
||||
private async _runTo(to: Ticks) {
|
||||
if (this._now.ticks > to)
|
||||
return;
|
||||
|
||||
let firstException: Error | undefined;
|
||||
while (true) {
|
||||
const result = await this._callFirstTimer(tickTo);
|
||||
const result = await this._callFirstTimer(to);
|
||||
if (!result.timerFound)
|
||||
break;
|
||||
firstException = firstException || result.error;
|
||||
}
|
||||
|
||||
this._advanceNow(tickTo);
|
||||
this._advanceNow(to);
|
||||
if (firstException)
|
||||
throw firstException;
|
||||
}
|
||||
|
||||
async pauseAt(time: number) {
|
||||
async pauseAt(time: number): Promise<number> {
|
||||
this._replayLogOnce();
|
||||
this._innerPause();
|
||||
await this._innerFastForwardTo(time);
|
||||
const toConsume = time - this._now.time;
|
||||
await this._innerFastForwardTo(shiftTicks(this._now.ticks, toConsume));
|
||||
return toConsume;
|
||||
}
|
||||
|
||||
private _innerPause() {
|
||||
|
|
@ -180,7 +182,7 @@ export class ClockController {
|
|||
}
|
||||
|
||||
private _innerResume() {
|
||||
const now = this._embedder.performanceNow();
|
||||
const now = this._embedder.performanceNow() as EmbedderTicks;
|
||||
this._realTime = { startTicks: now, lastSyncTicks: now };
|
||||
this._updateRealTimeTimer();
|
||||
}
|
||||
|
|
@ -195,7 +197,7 @@ export class ClockController {
|
|||
const firstTimer = this._firstTimer();
|
||||
|
||||
// Either run the next timer or move time in 100ms chunks.
|
||||
const callAt = Math.min(firstTimer ? firstTimer.callAt : this._now.ticks + maxTimeout, this._now.ticks + 100);
|
||||
const callAt = Math.min(firstTimer ? firstTimer.callAt : this._now.ticks + maxTimeout, this._now.ticks + 100) as Ticks;
|
||||
if (this._currentRealTimeTimer && this._currentRealTimeTimer.callAt < callAt)
|
||||
return;
|
||||
|
||||
|
|
@ -207,30 +209,30 @@ export class ClockController {
|
|||
this._currentRealTimeTimer = {
|
||||
callAt,
|
||||
dispose: this._embedder.setTimeout(() => {
|
||||
const now = Math.ceil(this._embedder.performanceNow());
|
||||
const now = Math.ceil(this._embedder.performanceNow()) as EmbedderTicks;
|
||||
this._currentRealTimeTimer = undefined;
|
||||
const sinceLastSync = now - this._realTime!.lastSyncTicks;
|
||||
this._realTime!.lastSyncTicks = now;
|
||||
// eslint-disable-next-line no-console
|
||||
this._runTo(this._now.ticks + sinceLastSync).catch(e => console.error(e)).then(() => this._updateRealTimeTimer());
|
||||
this._runTo(shiftTicks(this._now.ticks, sinceLastSync)).catch(e => console.error(e)).then(() => this._updateRealTimeTimer());
|
||||
}, callAt - this._now.ticks),
|
||||
};
|
||||
}
|
||||
|
||||
async fastForward(ticks: number) {
|
||||
this._replayLogOnce();
|
||||
await this._innerFastForwardTo(this._now.ticks + ticks | 0);
|
||||
await this._innerFastForwardTo(shiftTicks(this._now.ticks, ticks | 0));
|
||||
}
|
||||
|
||||
|
||||
private async _innerFastForwardTo(toTicks: number) {
|
||||
if (toTicks < this._now.ticks)
|
||||
private async _innerFastForwardTo(to: Ticks) {
|
||||
if (to < this._now.ticks)
|
||||
throw new Error('Cannot fast-forward to the past');
|
||||
for (const timer of this._timers.values()) {
|
||||
if (toTicks > timer.callAt)
|
||||
timer.callAt = toTicks;
|
||||
if (to > timer.callAt)
|
||||
timer.callAt = to;
|
||||
}
|
||||
await this._runTo(toTicks);
|
||||
await this._runTo(to);
|
||||
}
|
||||
|
||||
addTimer(options: { func: TimerHandler, type: TimerType, delay?: number | string, args?: any[] }): number {
|
||||
|
|
@ -249,7 +251,7 @@ export class ClockController {
|
|||
func: options.func,
|
||||
args: options.args || [],
|
||||
delay,
|
||||
callAt: this._now.ticks + (delay || (this._duringTick ? 1 : 0)),
|
||||
callAt: shiftTicks(this._now.ticks, (delay || (this._duringTick ? 1 : 0))),
|
||||
createdAt: this._now.ticks,
|
||||
id: this._uniqueTimerId++,
|
||||
error: new Error(),
|
||||
|
|
@ -283,7 +285,7 @@ export class ClockController {
|
|||
this._advanceNow(timer.callAt);
|
||||
|
||||
if (timer.type === TimerType.Interval)
|
||||
this._timers.get(timer.id)!.callAt += timer.delay;
|
||||
timer.callAt = shiftTicks(timer.callAt, timer.delay);
|
||||
else
|
||||
this._timers.delete(timer.id);
|
||||
return timer;
|
||||
|
|
@ -375,29 +377,29 @@ export class ClockController {
|
|||
|
||||
for (const { type, time, param } of this._log) {
|
||||
if (!isPaused && lastLogTime !== -1)
|
||||
this._advanceNow(this._now.ticks + time - lastLogTime);
|
||||
this._advanceNow(shiftTicks(this._now.ticks, time - lastLogTime));
|
||||
lastLogTime = time;
|
||||
|
||||
if (type === 'install') {
|
||||
this._innerSetTime(param!);
|
||||
this._innerSetTime(asWallTime(param!));
|
||||
} else if (type === 'fastForward' || type === 'runFor') {
|
||||
this._advanceNow(this._now.ticks + param!);
|
||||
this._advanceNow(shiftTicks(this._now.ticks, param!));
|
||||
} else if (type === 'pauseAt') {
|
||||
isPaused = true;
|
||||
this._innerPause();
|
||||
this._innerSetTime(param!);
|
||||
this._innerSetTime(asWallTime(param!));
|
||||
} else if (type === 'resume') {
|
||||
this._innerResume();
|
||||
isPaused = false;
|
||||
} else if (type === 'setFixedTime') {
|
||||
this._innerSetFixedTime(param!);
|
||||
this._innerSetFixedTime(asWallTime(param!));
|
||||
} else if (type === 'setSystemTime') {
|
||||
this._innerSetTime(param!);
|
||||
this._innerSetTime(asWallTime(param!));
|
||||
}
|
||||
}
|
||||
|
||||
if (!isPaused && lastLogTime > 0)
|
||||
this._advanceNow(this._now.ticks + this._embedder.dateNow() - lastLogTime);
|
||||
this._advanceNow(shiftTicks(this._now.ticks, this._embedder.dateNow() - lastLogTime));
|
||||
|
||||
this._log.length = 0;
|
||||
}
|
||||
|
|
@ -703,10 +705,19 @@ export function install(globalObject: WindowOrWorkerGlobalScope, config: Install
|
|||
}
|
||||
|
||||
export function inject(globalObject: WindowOrWorkerGlobalScope) {
|
||||
const builtin = platformOriginals(globalObject).bound;
|
||||
const { clock: controller } = install(globalObject);
|
||||
controller.resume();
|
||||
return {
|
||||
controller,
|
||||
builtin: platformOriginals(globalObject).bound,
|
||||
builtin,
|
||||
};
|
||||
}
|
||||
|
||||
function asWallTime(n: number): WallTime {
|
||||
return n as WallTime;
|
||||
}
|
||||
|
||||
function shiftTicks(ticks: Ticks, ms: number): Ticks {
|
||||
return ticks + ms as Ticks;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ import { getChecked, getAriaDisabled, getAriaRole, getElementAccessibleName, get
|
|||
import { kLayoutSelectorNames, type LayoutSelectorName, layoutSelectorScore } from './layoutSelectorUtils';
|
||||
import { asLocator } from '../../utils/isomorphic/locatorGenerators';
|
||||
import type { Language } from '../../utils/isomorphic/locatorGenerators';
|
||||
import { normalizeWhiteSpace, trimStringWithEllipsis } from '../../utils/isomorphic/stringUtils';
|
||||
import { cacheNormalizedWhitespaces, normalizeWhiteSpace, trimStringWithEllipsis } from '../../utils/isomorphic/stringUtils';
|
||||
|
||||
export type FrameExpectParams = Omit<channels.FrameExpectParams, 'expectedValue'> & { expectedValue?: any };
|
||||
|
||||
|
|
@ -66,7 +66,7 @@ export class InjectedScript {
|
|||
// eslint-disable-next-line no-restricted-globals
|
||||
readonly window: Window & typeof globalThis;
|
||||
readonly document: Document;
|
||||
readonly utils = { isInsideScope, elementText, asLocator, normalizeWhiteSpace };
|
||||
readonly utils = { isInsideScope, elementText, asLocator, normalizeWhiteSpace, cacheNormalizedWhitespaces };
|
||||
|
||||
// eslint-disable-next-line no-restricted-globals
|
||||
constructor(window: Window & typeof globalThis, isUnderTest: boolean, sdkLanguage: Language, testIdAttributeNameForStrictErrorAndConsoleCodegen: string, stableRafCount: number, browserName: string, customEngines: { name: string, engine: SelectorEngine }[]) {
|
||||
|
|
@ -478,7 +478,7 @@ export class InjectedScript {
|
|||
element = element.closest('button, [role=button], [role=checkbox], [role=radio]') || element;
|
||||
}
|
||||
if (behavior === 'follow-label') {
|
||||
if (!element.matches('input, textarea, button, select, [role=button], [role=checkbox], [role=radio]') &&
|
||||
if (!element.matches('a, input, textarea, button, select, [role=link], [role=button], [role=checkbox], [role=radio]') &&
|
||||
!(element as any).isContentEditable) {
|
||||
// Go up to the label that might be connected to the input/textarea.
|
||||
element = element.closest('label') || element;
|
||||
|
|
|
|||
|
|
@ -356,7 +356,7 @@ class RecordActionTool implements RecorderTool {
|
|||
return;
|
||||
this._performAction({
|
||||
name: 'select',
|
||||
selector: this._hoveredModel!.selector,
|
||||
selector: this._activeModel!.selector,
|
||||
options: [...selectElement.selectedOptions].map(option => option.value),
|
||||
signals: []
|
||||
});
|
||||
|
|
@ -973,7 +973,7 @@ export class Recorder {
|
|||
body[data-pw-cursor=text] *, body[data-pw-cursor=text] *::after { cursor: text !important; }
|
||||
`);
|
||||
this.installListeners();
|
||||
|
||||
injectedScript.utils.cacheNormalizedWhitespaces();
|
||||
if (injectedScript.isUnderTest)
|
||||
console.error('Recorder script ready for test'); // eslint-disable-line no-console
|
||||
}
|
||||
|
|
|
|||
|
|
@ -528,7 +528,7 @@ function suitableTextAlternatives(text: string) {
|
|||
const match = text.match(/^([\d.,]+)[^.,\w]/);
|
||||
const leadingNumberLength = match ? match[1].length : 0;
|
||||
if (leadingNumberLength) {
|
||||
const alt = text.substring(leadingNumberLength).trimStart();
|
||||
const alt = trimWordBoundary(text.substring(leadingNumberLength).trimStart(), 80);
|
||||
result.push({ text: alt, scoreBouns: alt.length <= 30 ? 2 : 1 });
|
||||
}
|
||||
}
|
||||
|
|
@ -537,7 +537,7 @@ function suitableTextAlternatives(text: string) {
|
|||
const match = text.match(/[^.,\w]([\d.,]+)$/);
|
||||
const trailingNumberLength = match ? match[1].length : 0;
|
||||
if (trailingNumberLength) {
|
||||
const alt = text.substring(0, text.length - trailingNumberLength).trimEnd();
|
||||
const alt = trimWordBoundary(text.substring(0, text.length - trailingNumberLength).trimEnd(), 80);
|
||||
result.push({ text: alt, scoreBouns: alt.length <= 30 ? 2 : 1 });
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -204,7 +204,7 @@ export class Screenshotter {
|
|||
return this._queue.postTask(async () => {
|
||||
progress.log('taking page screenshot');
|
||||
const { viewportSize } = await this._originalViewportSize(progress);
|
||||
await this._preparePageForScreenshot(progress, options.style, options.caret !== 'initial', options.animations === 'disabled');
|
||||
await this._preparePageForScreenshot(progress, this._page.mainFrame(), options.style, options.caret !== 'initial', options.animations === 'disabled');
|
||||
progress.throwIfAborted(); // Avoid restoring after failure - should be done by cleanup.
|
||||
|
||||
if (options.fullPage) {
|
||||
|
|
@ -233,7 +233,7 @@ export class Screenshotter {
|
|||
progress.log('taking element screenshot');
|
||||
const { viewportSize } = await this._originalViewportSize(progress);
|
||||
|
||||
await this._preparePageForScreenshot(progress, options.style, options.caret !== 'initial', options.animations === 'disabled');
|
||||
await this._preparePageForScreenshot(progress, handle._frame, options.style, options.caret !== 'initial', options.animations === 'disabled');
|
||||
progress.throwIfAborted(); // Do not do extra work.
|
||||
|
||||
await handle._waitAndScrollIntoViewIfNeeded(progress, true /* waitForVisible */);
|
||||
|
|
@ -257,7 +257,7 @@ export class Screenshotter {
|
|||
});
|
||||
}
|
||||
|
||||
async _preparePageForScreenshot(progress: Progress, screenshotStyle: string | undefined, hideCaret: boolean, disableAnimations: boolean) {
|
||||
async _preparePageForScreenshot(progress: Progress, frame: Frame, screenshotStyle: string | undefined, hideCaret: boolean, disableAnimations: boolean) {
|
||||
if (disableAnimations)
|
||||
progress.log(' disabled all CSS animations');
|
||||
const syncAnimations = this._page._delegate.shouldToggleStyleSheetToSyncAnimations();
|
||||
|
|
@ -266,9 +266,7 @@ export class Screenshotter {
|
|||
}));
|
||||
if (!process.env.PW_TEST_SCREENSHOT_NO_FONTS_READY) {
|
||||
progress.log('waiting for fonts to load...');
|
||||
await Promise.all(this._page.frames().map(async frame => {
|
||||
await frame.nonStallingEvaluateInExistingContext('document.fonts.ready', false, 'utility').catch(() => {});
|
||||
}));
|
||||
await frame.nonStallingEvaluateInExistingContext('document.fonts.ready', false, 'utility').catch(() => {});
|
||||
progress.log('fonts loaded');
|
||||
}
|
||||
progress.cleanupWhenAborted(() => this._restorePageAfterScreenshot());
|
||||
|
|
|
|||
|
|
@ -2122,10 +2122,6 @@ export module Protocol {
|
|||
* Array of <code>DOMNode</code> ids of any children marked as selected.
|
||||
*/
|
||||
selectedChildNodeIds?: NodeId[];
|
||||
/**
|
||||
* On / off state of switch form controls.
|
||||
*/
|
||||
switchState?: "off"|"on";
|
||||
}
|
||||
/**
|
||||
* A structure holding an RGBA color.
|
||||
|
|
|
|||
|
|
@ -226,12 +226,12 @@ export class WKPage implements PageDelegate {
|
|||
}
|
||||
if (this._page.fileChooserIntercepted())
|
||||
promises.push(session.send('Page.setInterceptFileChooserDialog', { enabled: true }));
|
||||
promises.push(session.send('Page.overrideSetting', { setting: 'DeviceOrientationEventEnabled' as any, value: contextOptions.isMobile }));
|
||||
promises.push(session.send('Page.overrideSetting', { setting: 'FullScreenEnabled' as any, value: !contextOptions.isMobile }));
|
||||
promises.push(session.send('Page.overrideSetting', { setting: 'NotificationsEnabled' as any, value: !contextOptions.isMobile }));
|
||||
promises.push(session.send('Page.overrideSetting', { setting: 'PointerLockEnabled' as any, value: !contextOptions.isMobile }));
|
||||
promises.push(session.send('Page.overrideSetting', { setting: 'InputTypeMonthEnabled' as any, value: contextOptions.isMobile }));
|
||||
promises.push(session.send('Page.overrideSetting', { setting: 'InputTypeWeekEnabled' as any, value: contextOptions.isMobile }));
|
||||
promises.push(session.send('Page.overrideSetting', { setting: 'DeviceOrientationEventEnabled', value: contextOptions.isMobile }));
|
||||
promises.push(session.send('Page.overrideSetting', { setting: 'FullScreenEnabled', value: !contextOptions.isMobile }));
|
||||
promises.push(session.send('Page.overrideSetting', { setting: 'NotificationsEnabled', value: !contextOptions.isMobile }));
|
||||
promises.push(session.send('Page.overrideSetting', { setting: 'PointerLockEnabled', value: !contextOptions.isMobile }));
|
||||
promises.push(session.send('Page.overrideSetting', { setting: 'InputTypeMonthEnabled', value: contextOptions.isMobile }));
|
||||
promises.push(session.send('Page.overrideSetting', { setting: 'InputTypeWeekEnabled', value: contextOptions.isMobile }));
|
||||
await Promise.all(promises);
|
||||
}
|
||||
|
||||
|
|
@ -716,7 +716,10 @@ export class WKPage implements PageDelegate {
|
|||
const angle = viewportSize.width > viewportSize.height ? 90 : 0;
|
||||
// Special handling for macOS 12.
|
||||
const useLegacySetOrientationOverrideMethod = os.platform() === 'darwin' && parseInt(os.release().split('.')[0], 10) <= 21;
|
||||
promises.push(this._pageProxySession.send(useLegacySetOrientationOverrideMethod ? 'Page.setOrientationOverride' as any : 'Emulation.setOrientationOverride', { angle }));
|
||||
if (useLegacySetOrientationOverrideMethod)
|
||||
promises.push(this._session.send('Page.setOrientationOverride' as any, { angle }));
|
||||
else
|
||||
promises.push(this._pageProxySession.send('Emulation.setOrientationOverride', { angle }));
|
||||
}
|
||||
await Promise.all(promises);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,8 +67,19 @@ function cssEscapeOne(s: string, i: number): string {
|
|||
return '\\' + s.charAt(i);
|
||||
}
|
||||
|
||||
let normalizedWhitespaceCache: Map<string, string> | undefined;
|
||||
|
||||
export function cacheNormalizedWhitespaces() {
|
||||
normalizedWhitespaceCache = new Map();
|
||||
}
|
||||
|
||||
export function normalizeWhiteSpace(text: string): string {
|
||||
return text.replace(/\u200b/g, '').trim().replace(/\s+/g, ' ');
|
||||
let result = normalizedWhitespaceCache?.get(text);
|
||||
if (result === undefined) {
|
||||
result = text.replace(/\u200b/g, '').trim().replace(/\s+/g, ' ');
|
||||
normalizedWhitespaceCache?.set(text, result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
export function normalizeEscapedRegexQuotes(source: string) {
|
||||
|
|
|
|||
137
packages/playwright-core/types/protocol.d.ts
vendored
137
packages/playwright-core/types/protocol.d.ts
vendored
|
|
@ -758,7 +758,7 @@ Does not always exist (e.g. for unsafe form submission urls).
|
|||
* Enum indicating the reason a response has been blocked. These reasons are
|
||||
refinements of the net error BLOCKED_BY_RESPONSE.
|
||||
*/
|
||||
export type BlockedByResponseReason = "CoepFrameResourceNeedsCoepHeader"|"CoopSandboxedIFrameCannotNavigateToCoopPage"|"CorpNotSameOrigin"|"CorpNotSameOriginAfterDefaultedToSameOriginByCoep"|"CorpNotSameSite";
|
||||
export type BlockedByResponseReason = "CoepFrameResourceNeedsCoepHeader"|"CoopSandboxedIFrameCannotNavigateToCoopPage"|"CorpNotSameOrigin"|"CorpNotSameOriginAfterDefaultedToSameOriginByCoep"|"CorpNotSameOriginAfterDefaultedToSameOriginByDip"|"CorpNotSameOriginAfterDefaultedToSameOriginByCoepAndDip"|"CorpNotSameSite";
|
||||
/**
|
||||
* Details for a request that has been blocked with the BLOCKED_BY_RESPONSE
|
||||
code. Currently only used for COEP/COOP, but may be extended to include
|
||||
|
|
@ -934,7 +934,7 @@ Should be updated alongside RequestIdTokenStatus in
|
|||
third_party/blink/public/mojom/devtools/inspector_issue.mojom to include
|
||||
all cases except for success.
|
||||
*/
|
||||
export type FederatedAuthRequestIssueReason = "ShouldEmbargo"|"TooManyRequests"|"WellKnownHttpNotFound"|"WellKnownNoResponse"|"WellKnownInvalidResponse"|"WellKnownListEmpty"|"WellKnownInvalidContentType"|"ConfigNotInWellKnown"|"WellKnownTooBig"|"ConfigHttpNotFound"|"ConfigNoResponse"|"ConfigInvalidResponse"|"ConfigInvalidContentType"|"ClientMetadataHttpNotFound"|"ClientMetadataNoResponse"|"ClientMetadataInvalidResponse"|"ClientMetadataInvalidContentType"|"DisabledInSettings"|"ErrorFetchingSignin"|"InvalidSigninResponse"|"AccountsHttpNotFound"|"AccountsNoResponse"|"AccountsInvalidResponse"|"AccountsListEmpty"|"AccountsInvalidContentType"|"IdTokenHttpNotFound"|"IdTokenNoResponse"|"IdTokenInvalidResponse"|"IdTokenIdpErrorResponse"|"IdTokenCrossSiteIdpErrorResponse"|"IdTokenInvalidRequest"|"IdTokenInvalidContentType"|"ErrorIdToken"|"Canceled"|"RpPageNotVisible"|"SilentMediationFailure"|"ThirdPartyCookiesBlocked"|"NotSignedInWithIdp"|"MissingTransientUserActivation"|"ReplacedByButtonMode";
|
||||
export type FederatedAuthRequestIssueReason = "ShouldEmbargo"|"TooManyRequests"|"WellKnownHttpNotFound"|"WellKnownNoResponse"|"WellKnownInvalidResponse"|"WellKnownListEmpty"|"WellKnownInvalidContentType"|"ConfigNotInWellKnown"|"WellKnownTooBig"|"ConfigHttpNotFound"|"ConfigNoResponse"|"ConfigInvalidResponse"|"ConfigInvalidContentType"|"ClientMetadataHttpNotFound"|"ClientMetadataNoResponse"|"ClientMetadataInvalidResponse"|"ClientMetadataInvalidContentType"|"DisabledInSettings"|"ErrorFetchingSignin"|"InvalidSigninResponse"|"AccountsHttpNotFound"|"AccountsNoResponse"|"AccountsInvalidResponse"|"AccountsListEmpty"|"AccountsInvalidContentType"|"IdTokenHttpNotFound"|"IdTokenNoResponse"|"IdTokenInvalidResponse"|"IdTokenIdpErrorResponse"|"IdTokenCrossSiteIdpErrorResponse"|"IdTokenInvalidRequest"|"IdTokenInvalidContentType"|"ErrorIdToken"|"Canceled"|"RpPageNotVisible"|"SilentMediationFailure"|"ThirdPartyCookiesBlocked"|"NotSignedInWithIdp"|"MissingTransientUserActivation"|"ReplacedByButtonMode"|"RelyingPartyOriginIsOpaque"|"TypeNotMatching";
|
||||
export interface FederatedAuthUserInfoRequestIssueDetails {
|
||||
federatedAuthUserInfoRequestIssueReason: FederatedAuthUserInfoRequestIssueReason;
|
||||
}
|
||||
|
|
@ -3486,7 +3486,7 @@ front-end.
|
|||
/**
|
||||
* Pseudo element type.
|
||||
*/
|
||||
export type PseudoType = "first-line"|"first-letter"|"before"|"after"|"marker"|"backdrop"|"selection"|"search-text"|"target-text"|"spelling-error"|"grammar-error"|"highlight"|"first-line-inherited"|"scroll-marker"|"scroll-markers"|"scrollbar"|"scrollbar-thumb"|"scrollbar-button"|"scrollbar-track"|"scrollbar-track-piece"|"scrollbar-corner"|"resizer"|"input-list-button"|"view-transition"|"view-transition-group"|"view-transition-image-pair"|"view-transition-old"|"view-transition-new";
|
||||
export type PseudoType = "first-line"|"first-letter"|"before"|"after"|"marker"|"backdrop"|"selection"|"search-text"|"target-text"|"spelling-error"|"grammar-error"|"highlight"|"first-line-inherited"|"scroll-marker"|"scroll-marker-group"|"scrollbar"|"scrollbar-thumb"|"scrollbar-button"|"scrollbar-track"|"scrollbar-track-piece"|"scrollbar-corner"|"resizer"|"input-list-button"|"view-transition"|"view-transition-group"|"view-transition-image-pair"|"view-transition-old"|"view-transition-new";
|
||||
/**
|
||||
* Shadow root type.
|
||||
*/
|
||||
|
|
@ -4801,6 +4801,29 @@ container queries against this container.
|
|||
*/
|
||||
nodeIds: NodeId[];
|
||||
}
|
||||
/**
|
||||
* Returns the target anchor element of the given anchor query according to
|
||||
https://www.w3.org/TR/css-anchor-position-1/#target.
|
||||
*/
|
||||
export type getAnchorElementParameters = {
|
||||
/**
|
||||
* Id of the positioned element from which to find the anchor.
|
||||
*/
|
||||
nodeId: NodeId;
|
||||
/**
|
||||
* An optional anchor specifier, as defined in
|
||||
https://www.w3.org/TR/css-anchor-position-1/#anchor-specifier.
|
||||
If not provided, it will return the implicit anchor element for
|
||||
the given positioned element.
|
||||
*/
|
||||
anchorSpecifier?: string;
|
||||
}
|
||||
export type getAnchorElementReturnValue = {
|
||||
/**
|
||||
* The anchor element of the given anchor query.
|
||||
*/
|
||||
nodeId: NodeId;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -8116,6 +8139,14 @@ milliseconds relatively to this requestTime.
|
|||
* Settled fetch event respondWith promise.
|
||||
*/
|
||||
workerRespondWithSettled: number;
|
||||
/**
|
||||
* Started ServiceWorker static routing source evaluation.
|
||||
*/
|
||||
workerRouterEvaluationStart?: number;
|
||||
/**
|
||||
* Started cache lookup when the source was evaluated to `cache`.
|
||||
*/
|
||||
workerCacheLookupStart?: number;
|
||||
/**
|
||||
* Started sending request.
|
||||
*/
|
||||
|
|
@ -8323,7 +8354,7 @@ applicable or not known.
|
|||
/**
|
||||
* The reason why request was blocked.
|
||||
*/
|
||||
export type BlockedReason = "other"|"csp"|"mixed-content"|"origin"|"inspector"|"subresource-filter"|"content-type"|"coep-frame-resource-needs-coep-header"|"coop-sandboxed-iframe-cannot-navigate-to-coop-page"|"corp-not-same-origin"|"corp-not-same-origin-after-defaulted-to-same-origin-by-coep"|"corp-not-same-site";
|
||||
export type BlockedReason = "other"|"csp"|"mixed-content"|"origin"|"inspector"|"subresource-filter"|"content-type"|"coep-frame-resource-needs-coep-header"|"coop-sandboxed-iframe-cannot-navigate-to-coop-page"|"corp-not-same-origin"|"corp-not-same-origin-after-defaulted-to-same-origin-by-coep"|"corp-not-same-origin-after-defaulted-to-same-origin-by-dip"|"corp-not-same-origin-after-defaulted-to-same-origin-by-coep-and-dip"|"corp-not-same-site";
|
||||
/**
|
||||
* The reason why request was blocked.
|
||||
*/
|
||||
|
|
@ -8374,6 +8405,10 @@ be set, otherwiser no value will be set.
|
|||
field will be set, otherwise no value will be set.
|
||||
*/
|
||||
matchedSourceType?: ServiceWorkerRouterSource;
|
||||
/**
|
||||
* The actual router source used.
|
||||
*/
|
||||
actualSourceType?: ServiceWorkerRouterSource;
|
||||
}
|
||||
/**
|
||||
* HTTP response data.
|
||||
|
|
@ -8600,6 +8635,21 @@ module) (0-based).
|
|||
*/
|
||||
requestId?: RequestId;
|
||||
}
|
||||
/**
|
||||
* cookiePartitionKey object
|
||||
The representation of the components of the key that are created by the cookiePartitionKey class contained in net/cookies/cookie_partition_key.h.
|
||||
*/
|
||||
export interface CookiePartitionKey {
|
||||
/**
|
||||
* The site of the top-level URL the browser was visiting at the start
|
||||
of the request to the endpoint that set the cookie.
|
||||
*/
|
||||
topLevelSite: string;
|
||||
/**
|
||||
* Indicates if the cookie has any ancestors that are cross-site to the topLevelSite.
|
||||
*/
|
||||
hasCrossSiteAncestor: boolean;
|
||||
}
|
||||
/**
|
||||
* Cookie object
|
||||
*/
|
||||
|
|
@ -8663,10 +8713,9 @@ This is a temporary ability and it will be removed in the future.
|
|||
*/
|
||||
sourcePort: number;
|
||||
/**
|
||||
* Cookie partition key. The site of the top-level URL the browser was visiting at the start
|
||||
of the request to the endpoint that set the cookie.
|
||||
* Cookie partition key.
|
||||
*/
|
||||
partitionKey?: string;
|
||||
partitionKey?: CookiePartitionKey;
|
||||
/**
|
||||
* True if cookie partition key is opaque.
|
||||
*/
|
||||
|
|
@ -8683,7 +8732,7 @@ of the request to the endpoint that set the cookie.
|
|||
/**
|
||||
* Types of reasons why a cookie should have been blocked by 3PCD but is exempted for the request.
|
||||
*/
|
||||
export type CookieExemptionReason = "None"|"UserSetting"|"TPCDMetadata"|"TPCDDeprecationTrial"|"TPCDHeuristics"|"EnterprisePolicy"|"StorageAccess"|"TopLevelStorageAccess"|"CorsOptIn";
|
||||
export type CookieExemptionReason = "None"|"UserSetting"|"TPCDMetadata"|"TPCDDeprecationTrial"|"TPCDHeuristics"|"EnterprisePolicy"|"StorageAccess"|"TopLevelStorageAccess"|"CorsOptIn"|"Scheme";
|
||||
/**
|
||||
* A cookie which was not stored from a response with the corresponding reason.
|
||||
*/
|
||||
|
|
@ -8801,11 +8850,9 @@ This is a temporary ability and it will be removed in the future.
|
|||
*/
|
||||
sourcePort?: number;
|
||||
/**
|
||||
* Cookie partition key. The site of the top-level URL the browser was visiting at the start
|
||||
of the request to the endpoint that set the cookie.
|
||||
If not set, the cookie will be set as not partitioned.
|
||||
* Cookie partition key. If not set, the cookie will be set as not partitioned.
|
||||
*/
|
||||
partitionKey?: string;
|
||||
partitionKey?: CookiePartitionKey;
|
||||
}
|
||||
/**
|
||||
* Authorization challenge for HTTP status code 401 or 407.
|
||||
|
|
@ -9629,7 +9676,7 @@ available, such as in the case of HTTP/2 or QUIC.
|
|||
* The cookie partition key that will be used to store partitioned cookies set in this response.
|
||||
Only sent when partitioned cookies are enabled.
|
||||
*/
|
||||
cookiePartitionKey?: string;
|
||||
cookiePartitionKey?: CookiePartitionKey;
|
||||
/**
|
||||
* True if partitioned cookies are enabled, but the partition key is not serializable to string.
|
||||
*/
|
||||
|
|
@ -9668,7 +9715,7 @@ or after the response was received.
|
|||
of the operation already exists und thus, the operation was abort
|
||||
preemptively (e.g. a cache hit).
|
||||
*/
|
||||
status: "Ok"|"InvalidArgument"|"MissingIssuerKeys"|"FailedPrecondition"|"ResourceExhausted"|"AlreadyExists"|"Unavailable"|"Unauthorized"|"BadResponse"|"InternalError"|"UnknownError"|"FulfilledLocally";
|
||||
status: "Ok"|"InvalidArgument"|"MissingIssuerKeys"|"FailedPrecondition"|"ResourceExhausted"|"AlreadyExists"|"ResourceLimited"|"Unauthorized"|"BadResponse"|"InternalError"|"UnknownError"|"FulfilledLocally";
|
||||
type: TrustTokenOperationType;
|
||||
requestId: RequestId;
|
||||
/**
|
||||
|
|
@ -9905,10 +9952,10 @@ provided URL.
|
|||
*/
|
||||
path?: string;
|
||||
/**
|
||||
* If specified, deletes only cookies with the the given name and partitionKey where domain
|
||||
matches provided URL.
|
||||
* If specified, deletes only cookies with the the given name and partitionKey where
|
||||
all partition key attributes match the cookie partition key attribute.
|
||||
*/
|
||||
partitionKey?: string;
|
||||
partitionKey?: CookiePartitionKey;
|
||||
}
|
||||
export type deleteCookiesReturnValue = {
|
||||
}
|
||||
|
|
@ -10218,11 +10265,9 @@ This is a temporary ability and it will be removed in the future.
|
|||
*/
|
||||
sourcePort?: number;
|
||||
/**
|
||||
* Cookie partition key. The site of the top-level URL the browser was visiting at the start
|
||||
of the request to the endpoint that set the cookie.
|
||||
If not set, the cookie will be set as not partitioned.
|
||||
* Cookie partition key. If not set, the cookie will be set as not partitioned.
|
||||
*/
|
||||
partitionKey?: string;
|
||||
partitionKey?: CookiePartitionKey;
|
||||
}
|
||||
export type setCookieReturnValue = {
|
||||
/**
|
||||
|
|
@ -11233,7 +11278,7 @@ as an ad.
|
|||
* All Permissions Policy features. This enum should match the one defined
|
||||
in third_party/blink/renderer/core/permissions_policy/permissions_policy_features.json5.
|
||||
*/
|
||||
export type PermissionsPolicyFeature = "accelerometer"|"ambient-light-sensor"|"attribution-reporting"|"autoplay"|"bluetooth"|"browsing-topics"|"camera"|"captured-surface-control"|"ch-dpr"|"ch-device-memory"|"ch-downlink"|"ch-ect"|"ch-prefers-color-scheme"|"ch-prefers-reduced-motion"|"ch-prefers-reduced-transparency"|"ch-rtt"|"ch-save-data"|"ch-ua"|"ch-ua-arch"|"ch-ua-bitness"|"ch-ua-platform"|"ch-ua-model"|"ch-ua-mobile"|"ch-ua-form-factors"|"ch-ua-full-version"|"ch-ua-full-version-list"|"ch-ua-platform-version"|"ch-ua-wow64"|"ch-viewport-height"|"ch-viewport-width"|"ch-width"|"clipboard-read"|"clipboard-write"|"compute-pressure"|"cross-origin-isolated"|"direct-sockets"|"display-capture"|"document-domain"|"encrypted-media"|"execution-while-out-of-viewport"|"execution-while-not-rendered"|"focus-without-user-activation"|"fullscreen"|"frobulate"|"gamepad"|"geolocation"|"gyroscope"|"hid"|"identity-credentials-get"|"idle-detection"|"interest-cohort"|"join-ad-interest-group"|"keyboard-map"|"local-fonts"|"magnetometer"|"microphone"|"midi"|"otp-credentials"|"payment"|"picture-in-picture"|"private-aggregation"|"private-state-token-issuance"|"private-state-token-redemption"|"publickey-credentials-create"|"publickey-credentials-get"|"run-ad-auction"|"screen-wake-lock"|"serial"|"shared-autofill"|"shared-storage"|"shared-storage-select-url"|"smart-card"|"speaker-selection"|"storage-access"|"sub-apps"|"sync-xhr"|"unload"|"usb"|"usb-unrestricted"|"vertical-scroll"|"web-printing"|"web-share"|"window-management"|"xr-spatial-tracking";
|
||||
export type PermissionsPolicyFeature = "accelerometer"|"ambient-light-sensor"|"attribution-reporting"|"autoplay"|"bluetooth"|"browsing-topics"|"camera"|"captured-surface-control"|"ch-dpr"|"ch-device-memory"|"ch-downlink"|"ch-ect"|"ch-prefers-color-scheme"|"ch-prefers-reduced-motion"|"ch-prefers-reduced-transparency"|"ch-rtt"|"ch-save-data"|"ch-ua"|"ch-ua-arch"|"ch-ua-bitness"|"ch-ua-platform"|"ch-ua-model"|"ch-ua-mobile"|"ch-ua-form-factors"|"ch-ua-full-version"|"ch-ua-full-version-list"|"ch-ua-platform-version"|"ch-ua-wow64"|"ch-viewport-height"|"ch-viewport-width"|"ch-width"|"clipboard-read"|"clipboard-write"|"compute-pressure"|"cross-origin-isolated"|"deferred-fetch"|"direct-sockets"|"display-capture"|"document-domain"|"encrypted-media"|"execution-while-out-of-viewport"|"execution-while-not-rendered"|"focus-without-user-activation"|"fullscreen"|"frobulate"|"gamepad"|"geolocation"|"gyroscope"|"hid"|"identity-credentials-get"|"idle-detection"|"interest-cohort"|"join-ad-interest-group"|"keyboard-map"|"local-fonts"|"magnetometer"|"microphone"|"midi"|"otp-credentials"|"payment"|"picture-in-picture"|"private-aggregation"|"private-state-token-issuance"|"private-state-token-redemption"|"publickey-credentials-create"|"publickey-credentials-get"|"run-ad-auction"|"screen-wake-lock"|"serial"|"shared-autofill"|"shared-storage"|"shared-storage-select-url"|"smart-card"|"speaker-selection"|"storage-access"|"sub-apps"|"sync-xhr"|"unload"|"usb"|"usb-unrestricted"|"vertical-scroll"|"web-printing"|"web-share"|"window-management"|"xr-spatial-tracking";
|
||||
/**
|
||||
* Reason for a permissions policy feature to be disabled.
|
||||
*/
|
||||
|
|
@ -11821,7 +11866,7 @@ https://github.com/WICG/manifest-incubations/blob/gh-pages/scope_extensions-expl
|
|||
/**
|
||||
* List of not restored reasons for back-forward cache.
|
||||
*/
|
||||
export type BackForwardCacheNotRestoredReason = "NotPrimaryMainFrame"|"BackForwardCacheDisabled"|"RelatedActiveContentsExist"|"HTTPStatusNotOK"|"SchemeNotHTTPOrHTTPS"|"Loading"|"WasGrantedMediaAccess"|"DisableForRenderFrameHostCalled"|"DomainNotAllowed"|"HTTPMethodNotGET"|"SubframeIsNavigating"|"Timeout"|"CacheLimit"|"JavaScriptExecution"|"RendererProcessKilled"|"RendererProcessCrashed"|"SchedulerTrackedFeatureUsed"|"ConflictingBrowsingInstance"|"CacheFlushed"|"ServiceWorkerVersionActivation"|"SessionRestored"|"ServiceWorkerPostMessage"|"EnteredBackForwardCacheBeforeServiceWorkerHostAdded"|"RenderFrameHostReused_SameSite"|"RenderFrameHostReused_CrossSite"|"ServiceWorkerClaim"|"IgnoreEventAndEvict"|"HaveInnerContents"|"TimeoutPuttingInCache"|"BackForwardCacheDisabledByLowMemory"|"BackForwardCacheDisabledByCommandLine"|"NetworkRequestDatapipeDrainedAsBytesConsumer"|"NetworkRequestRedirected"|"NetworkRequestTimeout"|"NetworkExceedsBufferLimit"|"NavigationCancelledWhileRestoring"|"NotMostRecentNavigationEntry"|"BackForwardCacheDisabledForPrerender"|"UserAgentOverrideDiffers"|"ForegroundCacheLimit"|"BrowsingInstanceNotSwapped"|"BackForwardCacheDisabledForDelegate"|"UnloadHandlerExistsInMainFrame"|"UnloadHandlerExistsInSubFrame"|"ServiceWorkerUnregistration"|"CacheControlNoStore"|"CacheControlNoStoreCookieModified"|"CacheControlNoStoreHTTPOnlyCookieModified"|"NoResponseHead"|"Unknown"|"ActivationNavigationsDisallowedForBug1234857"|"ErrorDocument"|"FencedFramesEmbedder"|"CookieDisabled"|"HTTPAuthRequired"|"CookieFlushed"|"BroadcastChannelOnMessage"|"WebSocket"|"WebTransport"|"WebRTC"|"MainResourceHasCacheControlNoStore"|"MainResourceHasCacheControlNoCache"|"SubresourceHasCacheControlNoStore"|"SubresourceHasCacheControlNoCache"|"ContainsPlugins"|"DocumentLoaded"|"OutstandingNetworkRequestOthers"|"RequestedMIDIPermission"|"RequestedAudioCapturePermission"|"RequestedVideoCapturePermission"|"RequestedBackForwardCacheBlockedSensors"|"RequestedBackgroundWorkPermission"|"BroadcastChannel"|"WebXR"|"SharedWorker"|"WebLocks"|"WebHID"|"WebShare"|"RequestedStorageAccessGrant"|"WebNfc"|"OutstandingNetworkRequestFetch"|"OutstandingNetworkRequestXHR"|"AppBanner"|"Printing"|"WebDatabase"|"PictureInPicture"|"Portal"|"SpeechRecognizer"|"IdleManager"|"PaymentManager"|"SpeechSynthesis"|"KeyboardLock"|"WebOTPService"|"OutstandingNetworkRequestDirectSocket"|"InjectedJavascript"|"InjectedStyleSheet"|"KeepaliveRequest"|"IndexedDBEvent"|"Dummy"|"JsNetworkRequestReceivedCacheControlNoStoreResource"|"WebRTCSticky"|"WebTransportSticky"|"WebSocketSticky"|"SmartCard"|"LiveMediaStreamTrack"|"UnloadHandler"|"ParserAborted"|"ContentSecurityHandler"|"ContentWebAuthenticationAPI"|"ContentFileChooser"|"ContentSerial"|"ContentFileSystemAccess"|"ContentMediaDevicesDispatcherHost"|"ContentWebBluetooth"|"ContentWebUSB"|"ContentMediaSessionService"|"ContentScreenReader"|"EmbedderPopupBlockerTabHelper"|"EmbedderSafeBrowsingTriggeredPopupBlocker"|"EmbedderSafeBrowsingThreatDetails"|"EmbedderAppBannerManager"|"EmbedderDomDistillerViewerSource"|"EmbedderDomDistillerSelfDeletingRequestDelegate"|"EmbedderOomInterventionTabHelper"|"EmbedderOfflinePage"|"EmbedderChromePasswordManagerClientBindCredentialManager"|"EmbedderPermissionRequestManager"|"EmbedderModalDialog"|"EmbedderExtensions"|"EmbedderExtensionMessaging"|"EmbedderExtensionMessagingForOpenPort"|"EmbedderExtensionSentMessageToCachedFrame"|"RequestedByWebViewClient";
|
||||
export type BackForwardCacheNotRestoredReason = "NotPrimaryMainFrame"|"BackForwardCacheDisabled"|"RelatedActiveContentsExist"|"HTTPStatusNotOK"|"SchemeNotHTTPOrHTTPS"|"Loading"|"WasGrantedMediaAccess"|"DisableForRenderFrameHostCalled"|"DomainNotAllowed"|"HTTPMethodNotGET"|"SubframeIsNavigating"|"Timeout"|"CacheLimit"|"JavaScriptExecution"|"RendererProcessKilled"|"RendererProcessCrashed"|"SchedulerTrackedFeatureUsed"|"ConflictingBrowsingInstance"|"CacheFlushed"|"ServiceWorkerVersionActivation"|"SessionRestored"|"ServiceWorkerPostMessage"|"EnteredBackForwardCacheBeforeServiceWorkerHostAdded"|"RenderFrameHostReused_SameSite"|"RenderFrameHostReused_CrossSite"|"ServiceWorkerClaim"|"IgnoreEventAndEvict"|"HaveInnerContents"|"TimeoutPuttingInCache"|"BackForwardCacheDisabledByLowMemory"|"BackForwardCacheDisabledByCommandLine"|"NetworkRequestDatapipeDrainedAsBytesConsumer"|"NetworkRequestRedirected"|"NetworkRequestTimeout"|"NetworkExceedsBufferLimit"|"NavigationCancelledWhileRestoring"|"NotMostRecentNavigationEntry"|"BackForwardCacheDisabledForPrerender"|"UserAgentOverrideDiffers"|"ForegroundCacheLimit"|"BrowsingInstanceNotSwapped"|"BackForwardCacheDisabledForDelegate"|"UnloadHandlerExistsInMainFrame"|"UnloadHandlerExistsInSubFrame"|"ServiceWorkerUnregistration"|"CacheControlNoStore"|"CacheControlNoStoreCookieModified"|"CacheControlNoStoreHTTPOnlyCookieModified"|"NoResponseHead"|"Unknown"|"ActivationNavigationsDisallowedForBug1234857"|"ErrorDocument"|"FencedFramesEmbedder"|"CookieDisabled"|"HTTPAuthRequired"|"CookieFlushed"|"BroadcastChannelOnMessage"|"WebViewSettingsChanged"|"WebViewJavaScriptObjectChanged"|"WebViewMessageListenerInjected"|"WebViewSafeBrowsingAllowlistChanged"|"WebViewDocumentStartJavascriptChanged"|"WebSocket"|"WebTransport"|"WebRTC"|"MainResourceHasCacheControlNoStore"|"MainResourceHasCacheControlNoCache"|"SubresourceHasCacheControlNoStore"|"SubresourceHasCacheControlNoCache"|"ContainsPlugins"|"DocumentLoaded"|"OutstandingNetworkRequestOthers"|"RequestedMIDIPermission"|"RequestedAudioCapturePermission"|"RequestedVideoCapturePermission"|"RequestedBackForwardCacheBlockedSensors"|"RequestedBackgroundWorkPermission"|"BroadcastChannel"|"WebXR"|"SharedWorker"|"WebLocks"|"WebHID"|"WebShare"|"RequestedStorageAccessGrant"|"WebNfc"|"OutstandingNetworkRequestFetch"|"OutstandingNetworkRequestXHR"|"AppBanner"|"Printing"|"WebDatabase"|"PictureInPicture"|"Portal"|"SpeechRecognizer"|"IdleManager"|"PaymentManager"|"SpeechSynthesis"|"KeyboardLock"|"WebOTPService"|"OutstandingNetworkRequestDirectSocket"|"InjectedJavascript"|"InjectedStyleSheet"|"KeepaliveRequest"|"IndexedDBEvent"|"Dummy"|"JsNetworkRequestReceivedCacheControlNoStoreResource"|"WebRTCSticky"|"WebTransportSticky"|"WebSocketSticky"|"SmartCard"|"LiveMediaStreamTrack"|"UnloadHandler"|"ParserAborted"|"ContentSecurityHandler"|"ContentWebAuthenticationAPI"|"ContentFileChooser"|"ContentSerial"|"ContentFileSystemAccess"|"ContentMediaDevicesDispatcherHost"|"ContentWebBluetooth"|"ContentWebUSB"|"ContentMediaSessionService"|"ContentScreenReader"|"EmbedderPopupBlockerTabHelper"|"EmbedderSafeBrowsingTriggeredPopupBlocker"|"EmbedderSafeBrowsingThreatDetails"|"EmbedderAppBannerManager"|"EmbedderDomDistillerViewerSource"|"EmbedderDomDistillerSelfDeletingRequestDelegate"|"EmbedderOomInterventionTabHelper"|"EmbedderOfflinePage"|"EmbedderChromePasswordManagerClientBindCredentialManager"|"EmbedderPermissionRequestManager"|"EmbedderModalDialog"|"EmbedderExtensions"|"EmbedderExtensionMessaging"|"EmbedderExtensionMessagingForOpenPort"|"EmbedderExtensionSentMessageToCachedFrame"|"RequestedByWebViewClient";
|
||||
/**
|
||||
* Types of not restored reasons for back-forward cache.
|
||||
*/
|
||||
|
|
@ -17025,9 +17070,8 @@ manifestId.
|
|||
}
|
||||
/**
|
||||
* Launches the installed web app, or an url in the same web app instead of the
|
||||
default start url if it is provided. Returns a tab / web contents based
|
||||
Target.TargetID which can be used to attach to via Target.attachToTarget or
|
||||
similar APIs.
|
||||
default start url if it is provided. Returns a page Target.TargetID which
|
||||
can be used to attach to via Target.attachToTarget or similar APIs.
|
||||
*/
|
||||
export type launchParameters = {
|
||||
manifestId: string;
|
||||
|
|
@ -17039,6 +17083,41 @@ similar APIs.
|
|||
*/
|
||||
targetId: Target.TargetID;
|
||||
}
|
||||
/**
|
||||
* Opens one or more local files from an installed web app identified by its
|
||||
manifestId. The web app needs to have file handlers registered to process
|
||||
the files. The API returns one or more page Target.TargetIDs which can be
|
||||
used to attach to via Target.attachToTarget or similar APIs.
|
||||
If some files in the parameters cannot be handled by the web app, they will
|
||||
be ignored. If none of the files can be handled, this API returns an error.
|
||||
If no files provided as the parameter, this API also returns an error.
|
||||
|
||||
According to the definition of the file handlers in the manifest file, one
|
||||
Target.TargetID may represent a page handling one or more files. The order
|
||||
of the returned Target.TargetIDs is not guaranteed.
|
||||
|
||||
TODO(crbug.com/339454034): Check the existences of the input files.
|
||||
*/
|
||||
export type launchFilesInAppParameters = {
|
||||
manifestId: string;
|
||||
files: string[];
|
||||
}
|
||||
export type launchFilesInAppReturnValue = {
|
||||
/**
|
||||
* IDs of the tab targets created as the result.
|
||||
*/
|
||||
targetIds: Target.TargetID[];
|
||||
}
|
||||
/**
|
||||
* Opens the current page in its web app identified by the manifest id, needs
|
||||
to be called on a page target. This function returns immediately without
|
||||
waiting for the app finishing loading.
|
||||
*/
|
||||
export type openCurrentPageInAppParameters = {
|
||||
manifestId: string;
|
||||
}
|
||||
export type openCurrentPageInAppReturnValue = {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -20010,6 +20089,7 @@ Error was thrown.
|
|||
"DOM.getFrameOwner": DOM.getFrameOwnerParameters;
|
||||
"DOM.getContainerForNode": DOM.getContainerForNodeParameters;
|
||||
"DOM.getQueryingDescendantsForContainer": DOM.getQueryingDescendantsForContainerParameters;
|
||||
"DOM.getAnchorElement": DOM.getAnchorElementParameters;
|
||||
"DOMDebugger.getEventListeners": DOMDebugger.getEventListenersParameters;
|
||||
"DOMDebugger.removeDOMBreakpoint": DOMDebugger.removeDOMBreakpointParameters;
|
||||
"DOMDebugger.removeEventListenerBreakpoint": DOMDebugger.removeEventListenerBreakpointParameters;
|
||||
|
|
@ -20379,6 +20459,8 @@ Error was thrown.
|
|||
"PWA.install": PWA.installParameters;
|
||||
"PWA.uninstall": PWA.uninstallParameters;
|
||||
"PWA.launch": PWA.launchParameters;
|
||||
"PWA.launchFilesInApp": PWA.launchFilesInAppParameters;
|
||||
"PWA.openCurrentPageInApp": PWA.openCurrentPageInAppParameters;
|
||||
"Console.clearMessages": Console.clearMessagesParameters;
|
||||
"Console.disable": Console.disableParameters;
|
||||
"Console.enable": Console.enableParameters;
|
||||
|
|
@ -20603,6 +20685,7 @@ Error was thrown.
|
|||
"DOM.getFrameOwner": DOM.getFrameOwnerReturnValue;
|
||||
"DOM.getContainerForNode": DOM.getContainerForNodeReturnValue;
|
||||
"DOM.getQueryingDescendantsForContainer": DOM.getQueryingDescendantsForContainerReturnValue;
|
||||
"DOM.getAnchorElement": DOM.getAnchorElementReturnValue;
|
||||
"DOMDebugger.getEventListeners": DOMDebugger.getEventListenersReturnValue;
|
||||
"DOMDebugger.removeDOMBreakpoint": DOMDebugger.removeDOMBreakpointReturnValue;
|
||||
"DOMDebugger.removeEventListenerBreakpoint": DOMDebugger.removeEventListenerBreakpointReturnValue;
|
||||
|
|
@ -20972,6 +21055,8 @@ Error was thrown.
|
|||
"PWA.install": PWA.installReturnValue;
|
||||
"PWA.uninstall": PWA.uninstallReturnValue;
|
||||
"PWA.launch": PWA.launchReturnValue;
|
||||
"PWA.launchFilesInApp": PWA.launchFilesInAppReturnValue;
|
||||
"PWA.openCurrentPageInApp": PWA.openCurrentPageInAppReturnValue;
|
||||
"Console.clearMessages": Console.clearMessagesReturnValue;
|
||||
"Console.disable": Console.disableReturnValue;
|
||||
"Console.enable": Console.enableReturnValue;
|
||||
|
|
|
|||
12
packages/playwright-core/types/types.d.ts
vendored
12
packages/playwright-core/types/types.d.ts
vendored
|
|
@ -4055,7 +4055,8 @@ export interface Page {
|
|||
* instead. Read more about [locators](https://playwright.dev/docs/locators).
|
||||
*
|
||||
* Sets the value of the file input to these file paths or files. If some of the `filePaths` are relative paths, then
|
||||
* they are resolved relative to the current working directory. For empty array, clears the selected files.
|
||||
* they are resolved relative to the current working directory. For empty array, clears the selected files. For inputs
|
||||
* with a `[webkitdirectory]` attribute, only a single directory path is supported.
|
||||
*
|
||||
* This method expects `selector` to point to an
|
||||
* [input element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input). However, if the element is inside
|
||||
|
|
@ -10580,7 +10581,8 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {
|
|||
* instead. Read more about [locators](https://playwright.dev/docs/locators).
|
||||
*
|
||||
* Sets the value of the file input to these file paths or files. If some of the `filePaths` are relative paths, then
|
||||
* they are resolved relative to the current working directory. For empty array, clears the selected files.
|
||||
* they are resolved relative to the current working directory. For empty array, clears the selected files. For inputs
|
||||
* with a `[webkitdirectory]` attribute, only a single directory path is supported.
|
||||
*
|
||||
* This method expects {@link ElementHandle} to point to an
|
||||
* [input element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input). However, if the element is inside
|
||||
|
|
@ -12787,7 +12789,8 @@ export interface Locator {
|
|||
}): Promise<void>;
|
||||
|
||||
/**
|
||||
* Upload file or multiple files into `<input type=file>`.
|
||||
* Upload file or multiple files into `<input type=file>`. For inputs with a `[webkitdirectory]` attribute, only a
|
||||
* single directory path is supported.
|
||||
*
|
||||
* **Usage**
|
||||
*
|
||||
|
|
@ -12801,6 +12804,9 @@ export interface Locator {
|
|||
* path.join(__dirname, 'file2.txt'),
|
||||
* ]);
|
||||
*
|
||||
* // Select a directory
|
||||
* await page.getByLabel('Upload directory').setInputFiles(path.join(__dirname, 'mydir'));
|
||||
*
|
||||
* // Remove all the selected files
|
||||
* await page.getByLabel('Upload file').setInputFiles([]);
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@playwright/experimental-ct-core",
|
||||
"version": "1.45.0-next",
|
||||
"version": "1.46.0-next",
|
||||
"description": "Playwright Component Testing Helpers",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
@ -26,8 +26,8 @@
|
|||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"playwright-core": "1.45.0-next",
|
||||
"playwright-core": "1.46.0-next",
|
||||
"vite": "^5.2.8",
|
||||
"playwright": "1.45.0-next"
|
||||
"playwright": "1.46.0-next"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@playwright/experimental-ct-react",
|
||||
"version": "1.45.0-next",
|
||||
"version": "1.46.0-next",
|
||||
"description": "Playwright Component Testing for React",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
@ -29,7 +29,7 @@
|
|||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@playwright/experimental-ct-core": "1.45.0-next",
|
||||
"@playwright/experimental-ct-core": "1.46.0-next",
|
||||
"@vitejs/plugin-react": "^4.2.1"
|
||||
},
|
||||
"bin": {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@playwright/experimental-ct-react17",
|
||||
"version": "1.45.0-next",
|
||||
"version": "1.46.0-next",
|
||||
"description": "Playwright Component Testing for React",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
@ -29,7 +29,7 @@
|
|||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@playwright/experimental-ct-core": "1.45.0-next",
|
||||
"@playwright/experimental-ct-core": "1.46.0-next",
|
||||
"@vitejs/plugin-react": "^4.2.1"
|
||||
},
|
||||
"bin": {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@playwright/experimental-ct-solid",
|
||||
"version": "1.45.0-next",
|
||||
"version": "1.46.0-next",
|
||||
"description": "Playwright Component Testing for Solid",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
@ -29,7 +29,7 @@
|
|||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@playwright/experimental-ct-core": "1.45.0-next",
|
||||
"@playwright/experimental-ct-core": "1.46.0-next",
|
||||
"vite-plugin-solid": "^2.7.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@playwright/experimental-ct-svelte",
|
||||
"version": "1.45.0-next",
|
||||
"version": "1.46.0-next",
|
||||
"description": "Playwright Component Testing for Svelte",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
@ -29,7 +29,7 @@
|
|||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@playwright/experimental-ct-core": "1.45.0-next",
|
||||
"@playwright/experimental-ct-core": "1.46.0-next",
|
||||
"@sveltejs/vite-plugin-svelte": "^3.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@playwright/experimental-ct-vue",
|
||||
"version": "1.45.0-next",
|
||||
"version": "1.46.0-next",
|
||||
"description": "Playwright Component Testing for Vue",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
@ -29,7 +29,7 @@
|
|||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@playwright/experimental-ct-core": "1.45.0-next",
|
||||
"@playwright/experimental-ct-core": "1.46.0-next",
|
||||
"@vitejs/plugin-vue": "^4.2.1"
|
||||
},
|
||||
"bin": {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@playwright/experimental-ct-vue2",
|
||||
"version": "1.45.0-next",
|
||||
"version": "1.46.0-next",
|
||||
"description": "Playwright Component Testing for Vue2",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
@ -29,7 +29,7 @@
|
|||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@playwright/experimental-ct-core": "1.45.0-next",
|
||||
"@playwright/experimental-ct-core": "1.46.0-next",
|
||||
"@vitejs/plugin-vue2": "^2.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "playwright-firefox",
|
||||
"version": "1.45.0-next",
|
||||
"version": "1.46.0-next",
|
||||
"description": "A high-level API to automate Firefox",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
@ -30,6 +30,6 @@
|
|||
"install": "node install.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"playwright-core": "1.45.0-next"
|
||||
"playwright-core": "1.46.0-next"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@playwright/test",
|
||||
"version": "1.45.0-next",
|
||||
"version": "1.46.0-next",
|
||||
"description": "A high-level API to automate web browsers",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
@ -30,6 +30,6 @@
|
|||
},
|
||||
"scripts": {},
|
||||
"dependencies": {
|
||||
"playwright": "1.45.0-next"
|
||||
"playwright": "1.46.0-next"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "playwright-webkit",
|
||||
"version": "1.45.0-next",
|
||||
"version": "1.46.0-next",
|
||||
"description": "A high-level API to automate WebKit",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
@ -30,6 +30,6 @@
|
|||
"install": "node install.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"playwright-core": "1.45.0-next"
|
||||
"playwright-core": "1.46.0-next"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@ This project incorporates components from the projects listed below. The origina
|
|||
- @babel/plugin-syntax-async-generators@7.8.4 (https://github.com/babel/babel/tree/master/packages/babel-plugin-syntax-async-generators)
|
||||
- @babel/plugin-syntax-class-static-block@7.14.5 (https://github.com/babel/babel)
|
||||
- @babel/plugin-syntax-decorators@7.24.1 (https://github.com/babel/babel)
|
||||
- @babel/plugin-syntax-dynamic-import@7.8.3 (https://github.com/babel/babel/tree/master/packages/babel-plugin-syntax-dynamic-import)
|
||||
- @babel/plugin-syntax-explicit-resource-management@7.24.1 (https://github.com/babel/babel)
|
||||
- @babel/plugin-syntax-export-namespace-from@7.8.3 (https://github.com/babel/babel/tree/master/packages/babel-plugin-syntax-export-namespace-from)
|
||||
- @babel/plugin-syntax-import-attributes@7.24.1 (https://github.com/babel/babel)
|
||||
|
|
@ -54,7 +53,6 @@ This project incorporates components from the projects listed below. The origina
|
|||
- @babel/plugin-syntax-typescript@7.24.1 (https://github.com/babel/babel)
|
||||
- @babel/plugin-transform-class-properties@7.24.1 (https://github.com/babel/babel)
|
||||
- @babel/plugin-transform-class-static-block@7.24.4 (https://github.com/babel/babel)
|
||||
- @babel/plugin-transform-dynamic-import@7.24.1 (https://github.com/babel/babel)
|
||||
- @babel/plugin-transform-export-namespace-from@7.24.1 (https://github.com/babel/babel)
|
||||
- @babel/plugin-transform-logical-assignment-operators@7.24.1 (https://github.com/babel/babel)
|
||||
- @babel/plugin-transform-modules-commonjs@7.24.1 (https://github.com/babel/babel)
|
||||
|
|
@ -92,6 +90,7 @@ This project incorporates components from the projects listed below. The origina
|
|||
- anymatch@3.1.3 (https://github.com/micromatch/anymatch)
|
||||
- binary-extensions@2.2.0 (https://github.com/sindresorhus/binary-extensions)
|
||||
- braces@3.0.2 (https://github.com/micromatch/braces)
|
||||
- braces@3.0.3 (https://github.com/micromatch/braces)
|
||||
- browserslist@4.22.2 (https://github.com/browserslist/browserslist)
|
||||
- buffer-from@1.1.2 (https://github.com/LinusU/buffer-from)
|
||||
- caniuse-lite@1.0.30001579 (https://github.com/browserslist/caniuse-lite)
|
||||
|
|
@ -114,6 +113,7 @@ This project incorporates components from the projects listed below. The origina
|
|||
- escape-string-regexp@2.0.0 (https://github.com/sindresorhus/escape-string-regexp)
|
||||
- expect@29.5.0 (https://github.com/facebook/jest)
|
||||
- fill-range@7.0.1 (https://github.com/jonschlinkert/fill-range)
|
||||
- fill-range@7.1.1 (https://github.com/jonschlinkert/fill-range)
|
||||
- gensync@1.0.0-beta.2 (https://github.com/loganfsmyth/gensync)
|
||||
- glob-parent@5.1.2 (https://github.com/gulpjs/glob-parent)
|
||||
- globals@11.12.0 (https://github.com/sindresorhus/globals)
|
||||
|
|
@ -1250,33 +1250,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
=========================================
|
||||
END OF @babel/plugin-syntax-decorators@7.24.1 AND INFORMATION
|
||||
|
||||
%% @babel/plugin-syntax-dynamic-import@7.8.3 NOTICES AND INFORMATION BEGIN HERE
|
||||
=========================================
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2014-present Sebastian McKenzie and other contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
=========================================
|
||||
END OF @babel/plugin-syntax-dynamic-import@7.8.3 AND INFORMATION
|
||||
|
||||
%% @babel/plugin-syntax-explicit-resource-management@7.24.1 NOTICES AND INFORMATION BEGIN HERE
|
||||
=========================================
|
||||
MIT License
|
||||
|
|
@ -1682,33 +1655,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
=========================================
|
||||
END OF @babel/plugin-transform-class-static-block@7.24.4 AND INFORMATION
|
||||
|
||||
%% @babel/plugin-transform-dynamic-import@7.24.1 NOTICES AND INFORMATION BEGIN HERE
|
||||
=========================================
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2014-present Sebastian McKenzie and other contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
=========================================
|
||||
END OF @babel/plugin-transform-dynamic-import@7.24.1 AND INFORMATION
|
||||
|
||||
%% @babel/plugin-transform-export-namespace-from@7.24.1 NOTICES AND INFORMATION BEGIN HERE
|
||||
=========================================
|
||||
MIT License
|
||||
|
|
@ -2625,6 +2571,32 @@ THE SOFTWARE.
|
|||
=========================================
|
||||
END OF braces@3.0.2 AND INFORMATION
|
||||
|
||||
%% braces@3.0.3 NOTICES AND INFORMATION BEGIN HERE
|
||||
=========================================
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014-present, Jon Schlinkert.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
=========================================
|
||||
END OF braces@3.0.3 AND INFORMATION
|
||||
|
||||
%% browserslist@4.22.2 NOTICES AND INFORMATION BEGIN HERE
|
||||
=========================================
|
||||
The MIT License (MIT)
|
||||
|
|
@ -3478,6 +3450,32 @@ THE SOFTWARE.
|
|||
=========================================
|
||||
END OF fill-range@7.0.1 AND INFORMATION
|
||||
|
||||
%% fill-range@7.1.1 NOTICES AND INFORMATION BEGIN HERE
|
||||
=========================================
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014-present, Jon Schlinkert.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
=========================================
|
||||
END OF fill-range@7.1.1 AND INFORMATION
|
||||
|
||||
%% gensync@1.0.0-beta.2 NOTICES AND INFORMATION BEGIN HERE
|
||||
=========================================
|
||||
Copyright 2018 Logan Smyth <loganfsmyth@gmail.com>
|
||||
|
|
|
|||
27
packages/playwright/bundles/babel/package-lock.json
generated
27
packages/playwright/bundles/babel/package-lock.json
generated
|
|
@ -21,7 +21,6 @@
|
|||
"@babel/plugin-syntax-optional-catch-binding": "^7.8.3",
|
||||
"@babel/plugin-transform-class-properties": "^7.24.1",
|
||||
"@babel/plugin-transform-class-static-block": "^7.24.4",
|
||||
"@babel/plugin-transform-dynamic-import": "^7.24.1",
|
||||
"@babel/plugin-transform-export-namespace-from": "^7.24.1",
|
||||
"@babel/plugin-transform-logical-assignment-operators": "^7.24.1",
|
||||
"@babel/plugin-transform-modules-commonjs": "^7.24.1",
|
||||
|
|
@ -434,17 +433,6 @@
|
|||
"@babel/core": "^7.0.0-0"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/plugin-syntax-dynamic-import": {
|
||||
"version": "7.8.3",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz",
|
||||
"integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==",
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "^7.8.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": "^7.0.0-0"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/plugin-syntax-explicit-resource-management": {
|
||||
"version": "7.24.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-syntax-explicit-resource-management/-/plugin-syntax-explicit-resource-management-7.24.1.tgz",
|
||||
|
|
@ -634,21 +622,6 @@
|
|||
"@babel/core": "^7.12.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/plugin-transform-dynamic-import": {
|
||||
"version": "7.24.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.24.1.tgz",
|
||||
"integrity": "sha512-av2gdSTyXcJVdI+8aFZsCAtR29xJt0S5tas+Ef8NvBNmD1a+N/3ecMLeMBgfcK+xzsjdLDT6oHt+DFPyeqUbDA==",
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "^7.24.0",
|
||||
"@babel/plugin-syntax-dynamic-import": "^7.8.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": "^7.0.0-0"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/plugin-transform-export-namespace-from": {
|
||||
"version": "7.24.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.24.1.tgz",
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@
|
|||
"@babel/plugin-syntax-optional-catch-binding": "^7.8.3",
|
||||
"@babel/plugin-transform-class-properties": "^7.24.1",
|
||||
"@babel/plugin-transform-class-static-block": "^7.24.4",
|
||||
"@babel/plugin-transform-dynamic-import": "^7.24.1",
|
||||
"@babel/plugin-transform-export-namespace-from": "^7.24.1",
|
||||
"@babel/plugin-transform-logical-assignment-operators": "^7.24.1",
|
||||
"@babel/plugin-transform-modules-commonjs": "^7.24.1",
|
||||
|
|
|
|||
|
|
@ -73,8 +73,9 @@ function babelTransformOptions(isTypeScript: boolean, isModule: boolean, plugins
|
|||
|
||||
if (!isModule) {
|
||||
plugins.push([require('@babel/plugin-transform-modules-commonjs')]);
|
||||
// This converts async imports to require() calls so that we can intercept them with pirates.
|
||||
plugins.push([require('@babel/plugin-transform-dynamic-import')]);
|
||||
// Note: we used to include '@babel/plugin-transform-dynamic-import' to convert async imports
|
||||
// into require(), so that pirates can intercept them. With the ESM loader enabled by default,
|
||||
// there is no need for this.
|
||||
plugins.push([
|
||||
(): PluginObj => ({
|
||||
name: 'css-to-identity-obj-proxy',
|
||||
|
|
|
|||
28
packages/playwright/bundles/utils/package-lock.json
generated
28
packages/playwright/bundles/utils/package-lock.json
generated
|
|
@ -73,11 +73,11 @@
|
|||
}
|
||||
},
|
||||
"node_modules/braces": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
|
||||
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
|
||||
"integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
|
||||
"dependencies": {
|
||||
"fill-range": "^7.0.1"
|
||||
"fill-range": "^7.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
|
|
@ -126,9 +126,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/fill-range": {
|
||||
"version": "7.0.1",
|
||||
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
|
||||
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
|
||||
"version": "7.1.1",
|
||||
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
|
||||
"integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
|
||||
"dependencies": {
|
||||
"to-regex-range": "^5.0.1"
|
||||
},
|
||||
|
|
@ -330,11 +330,11 @@
|
|||
"integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA=="
|
||||
},
|
||||
"braces": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
|
||||
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
|
||||
"integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
|
||||
"requires": {
|
||||
"fill-range": "^7.0.1"
|
||||
"fill-range": "^7.1.1"
|
||||
}
|
||||
},
|
||||
"buffer-from": {
|
||||
|
|
@ -366,9 +366,9 @@
|
|||
}
|
||||
},
|
||||
"fill-range": {
|
||||
"version": "7.0.1",
|
||||
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
|
||||
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
|
||||
"version": "7.1.1",
|
||||
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
|
||||
"integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
|
||||
"requires": {
|
||||
"to-regex-range": "^5.0.1"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "playwright",
|
||||
"version": "1.45.0-next",
|
||||
"version": "1.46.0-next",
|
||||
"description": "A high-level API to automate web browsers",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
@ -58,7 +58,7 @@
|
|||
},
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"playwright-core": "1.45.0-next"
|
||||
"playwright-core": "1.46.0-next"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"fsevents": "2.3.2"
|
||||
|
|
|
|||
|
|
@ -414,7 +414,7 @@ function relativeTestPath(config: FullConfig, test: TestCase): string {
|
|||
|
||||
export function stepSuffix(step: TestStep | undefined) {
|
||||
const stepTitles = step ? step.titlePath() : [];
|
||||
return stepTitles.map(t => ' › ' + t).join('');
|
||||
return stepTitles.map(t => t.split('\n')[0]).map(t => ' › ' + t).join('');
|
||||
}
|
||||
|
||||
export function formatTestTitle(config: FullConfig, test: TestCase, step?: TestStep, omitLocation: boolean = false): string {
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ import url from 'url';
|
|||
import { addToCompilationCache, currentFileDepsCollector, serializeCompilationCache, startCollectingFileDeps, stopCollectingFileDeps } from './compilationCache';
|
||||
import { transformHook, resolveHook, setTransformConfig, shouldTransform } from './transform';
|
||||
import { PortTransport } from './portTransport';
|
||||
import { fileIsModule } from '../util';
|
||||
|
||||
// Node < 18.6: defaultResolve takes 3 arguments.
|
||||
// Node >= 18.6: nextResolve from the chain takes 2 arguments.
|
||||
|
|
@ -62,9 +63,13 @@ async function load(moduleUrl: string, context: { format?: string }, defaultLoad
|
|||
if (transformed.serializedCache)
|
||||
await transport?.send('pushToCompilationCache', { cache: transformed.serializedCache });
|
||||
|
||||
// Output format is always the same as input format, if it was unknown, we always report modules.
|
||||
// Output format is required, so we determine it manually when unknown.
|
||||
// shortCircuit is required by Node >= 18.6 to designate no more loaders should be called.
|
||||
return { format: context.format || 'module', source: transformed.code, shortCircuit: true };
|
||||
return {
|
||||
format: context.format || (fileIsModule(filename) ? 'module' : 'commonjs'),
|
||||
source: transformed.code,
|
||||
shortCircuit: true,
|
||||
};
|
||||
}
|
||||
|
||||
let transport: PortTransport | undefined;
|
||||
|
|
|
|||
321
packages/playwright/types/test.d.ts
vendored
321
packages/playwright/types/test.d.ts
vendored
|
|
@ -7541,112 +7541,7 @@ interface PageAssertions {
|
|||
* @param name Snapshot name.
|
||||
* @param options
|
||||
*/
|
||||
toHaveScreenshot(name: string|ReadonlyArray<string>, options?: {
|
||||
/**
|
||||
* When set to `"disabled"`, stops CSS animations, CSS transitions and Web Animations. Animations get different
|
||||
* treatment depending on their duration:
|
||||
* - finite animations are fast-forwarded to completion, so they'll fire `transitionend` event.
|
||||
* - infinite animations are canceled to initial state, and then played over after the screenshot.
|
||||
*
|
||||
* Defaults to `"disabled"` that disables animations.
|
||||
*/
|
||||
animations?: "disabled"|"allow";
|
||||
|
||||
/**
|
||||
* When set to `"hide"`, screenshot will hide text caret. When set to `"initial"`, text caret behavior will not be
|
||||
* changed. Defaults to `"hide"`.
|
||||
*/
|
||||
caret?: "hide"|"initial";
|
||||
|
||||
/**
|
||||
* An object which specifies clipping of the resulting image.
|
||||
*/
|
||||
clip?: {
|
||||
/**
|
||||
* x-coordinate of top-left corner of clip area
|
||||
*/
|
||||
x: number;
|
||||
|
||||
/**
|
||||
* y-coordinate of top-left corner of clip area
|
||||
*/
|
||||
y: number;
|
||||
|
||||
/**
|
||||
* width of clipping area
|
||||
*/
|
||||
width: number;
|
||||
|
||||
/**
|
||||
* height of clipping area
|
||||
*/
|
||||
height: number;
|
||||
};
|
||||
|
||||
/**
|
||||
* When true, takes a screenshot of the full scrollable page, instead of the currently visible viewport. Defaults to
|
||||
* `false`.
|
||||
*/
|
||||
fullPage?: boolean;
|
||||
|
||||
/**
|
||||
* Specify locators that should be masked when the screenshot is taken. Masked elements will be overlaid with a pink
|
||||
* box `#FF00FF` (customized by `maskColor`) that completely covers its bounding box.
|
||||
*/
|
||||
mask?: Array<Locator>;
|
||||
|
||||
/**
|
||||
* Specify the color of the overlay box for masked elements, in
|
||||
* [CSS color format](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value). Default color is pink `#FF00FF`.
|
||||
*/
|
||||
maskColor?: string;
|
||||
|
||||
/**
|
||||
* An acceptable ratio of pixels that are different to the total amount of pixels, between `0` and `1`. Default is
|
||||
* configurable with `TestConfig.expect`. Unset by default.
|
||||
*/
|
||||
maxDiffPixelRatio?: number;
|
||||
|
||||
/**
|
||||
* An acceptable amount of pixels that could be different. Default is configurable with `TestConfig.expect`. Unset by
|
||||
* default.
|
||||
*/
|
||||
maxDiffPixels?: number;
|
||||
|
||||
/**
|
||||
* Hides default white background and allows capturing screenshots with transparency. Not applicable to `jpeg` images.
|
||||
* Defaults to `false`.
|
||||
*/
|
||||
omitBackground?: boolean;
|
||||
|
||||
/**
|
||||
* When set to `"css"`, screenshot will have a single pixel per each css pixel on the page. For high-dpi devices, this
|
||||
* will keep screenshots small. Using `"device"` option will produce a single pixel per each device pixel, so
|
||||
* screenshots of high-dpi devices will be twice as large or even larger.
|
||||
*
|
||||
* Defaults to `"css"`.
|
||||
*/
|
||||
scale?: "css"|"device";
|
||||
|
||||
/**
|
||||
* File name containing the stylesheet to apply while making the screenshot. This is where you can hide dynamic
|
||||
* elements, make elements invisible or change their properties to help you creating repeatable screenshots. This
|
||||
* stylesheet pierces the Shadow DOM and applies to the inner frames.
|
||||
*/
|
||||
stylePath?: string|Array<string>;
|
||||
|
||||
/**
|
||||
* An acceptable perceived color difference in the [YIQ color space](https://en.wikipedia.org/wiki/YIQ) between the
|
||||
* same pixel in compared images, between zero (strict) and one (lax), default is configurable with
|
||||
* `TestConfig.expect`. Defaults to `0.2`.
|
||||
*/
|
||||
threshold?: number;
|
||||
|
||||
/**
|
||||
* Time to retry the assertion for in milliseconds. Defaults to `timeout` in `TestConfig.expect`.
|
||||
*/
|
||||
timeout?: number;
|
||||
}): Promise<void>;
|
||||
toHaveScreenshot(name: string|ReadonlyArray<string>, options?: PageAssertionsToHaveScreenshotOptions): Promise<void>;
|
||||
|
||||
/**
|
||||
* This function will wait until two consecutive page screenshots yield the same result, and then compare the last
|
||||
|
|
@ -7661,112 +7556,7 @@ interface PageAssertions {
|
|||
* Note that screenshot assertions only work with Playwright test runner.
|
||||
* @param options
|
||||
*/
|
||||
toHaveScreenshot(options?: {
|
||||
/**
|
||||
* When set to `"disabled"`, stops CSS animations, CSS transitions and Web Animations. Animations get different
|
||||
* treatment depending on their duration:
|
||||
* - finite animations are fast-forwarded to completion, so they'll fire `transitionend` event.
|
||||
* - infinite animations are canceled to initial state, and then played over after the screenshot.
|
||||
*
|
||||
* Defaults to `"disabled"` that disables animations.
|
||||
*/
|
||||
animations?: "disabled"|"allow";
|
||||
|
||||
/**
|
||||
* When set to `"hide"`, screenshot will hide text caret. When set to `"initial"`, text caret behavior will not be
|
||||
* changed. Defaults to `"hide"`.
|
||||
*/
|
||||
caret?: "hide"|"initial";
|
||||
|
||||
/**
|
||||
* An object which specifies clipping of the resulting image.
|
||||
*/
|
||||
clip?: {
|
||||
/**
|
||||
* x-coordinate of top-left corner of clip area
|
||||
*/
|
||||
x: number;
|
||||
|
||||
/**
|
||||
* y-coordinate of top-left corner of clip area
|
||||
*/
|
||||
y: number;
|
||||
|
||||
/**
|
||||
* width of clipping area
|
||||
*/
|
||||
width: number;
|
||||
|
||||
/**
|
||||
* height of clipping area
|
||||
*/
|
||||
height: number;
|
||||
};
|
||||
|
||||
/**
|
||||
* When true, takes a screenshot of the full scrollable page, instead of the currently visible viewport. Defaults to
|
||||
* `false`.
|
||||
*/
|
||||
fullPage?: boolean;
|
||||
|
||||
/**
|
||||
* Specify locators that should be masked when the screenshot is taken. Masked elements will be overlaid with a pink
|
||||
* box `#FF00FF` (customized by `maskColor`) that completely covers its bounding box.
|
||||
*/
|
||||
mask?: Array<Locator>;
|
||||
|
||||
/**
|
||||
* Specify the color of the overlay box for masked elements, in
|
||||
* [CSS color format](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value). Default color is pink `#FF00FF`.
|
||||
*/
|
||||
maskColor?: string;
|
||||
|
||||
/**
|
||||
* An acceptable ratio of pixels that are different to the total amount of pixels, between `0` and `1`. Default is
|
||||
* configurable with `TestConfig.expect`. Unset by default.
|
||||
*/
|
||||
maxDiffPixelRatio?: number;
|
||||
|
||||
/**
|
||||
* An acceptable amount of pixels that could be different. Default is configurable with `TestConfig.expect`. Unset by
|
||||
* default.
|
||||
*/
|
||||
maxDiffPixels?: number;
|
||||
|
||||
/**
|
||||
* Hides default white background and allows capturing screenshots with transparency. Not applicable to `jpeg` images.
|
||||
* Defaults to `false`.
|
||||
*/
|
||||
omitBackground?: boolean;
|
||||
|
||||
/**
|
||||
* When set to `"css"`, screenshot will have a single pixel per each css pixel on the page. For high-dpi devices, this
|
||||
* will keep screenshots small. Using `"device"` option will produce a single pixel per each device pixel, so
|
||||
* screenshots of high-dpi devices will be twice as large or even larger.
|
||||
*
|
||||
* Defaults to `"css"`.
|
||||
*/
|
||||
scale?: "css"|"device";
|
||||
|
||||
/**
|
||||
* File name containing the stylesheet to apply while making the screenshot. This is where you can hide dynamic
|
||||
* elements, make elements invisible or change their properties to help you creating repeatable screenshots. This
|
||||
* stylesheet pierces the Shadow DOM and applies to the inner frames.
|
||||
*/
|
||||
stylePath?: string|Array<string>;
|
||||
|
||||
/**
|
||||
* An acceptable perceived color difference in the [YIQ color space](https://en.wikipedia.org/wiki/YIQ) between the
|
||||
* same pixel in compared images, between zero (strict) and one (lax), default is configurable with
|
||||
* `TestConfig.expect`. Defaults to `0.2`.
|
||||
*/
|
||||
threshold?: number;
|
||||
|
||||
/**
|
||||
* Time to retry the assertion for in milliseconds. Defaults to `timeout` in `TestConfig.expect`.
|
||||
*/
|
||||
timeout?: number;
|
||||
}): Promise<void>;
|
||||
toHaveScreenshot(options?: PageAssertionsToHaveScreenshotOptions): Promise<void>;
|
||||
|
||||
/**
|
||||
* Ensures the page has the given title.
|
||||
|
|
@ -8448,6 +8238,113 @@ export interface WorkerInfo {
|
|||
workerIndex: number;
|
||||
}
|
||||
|
||||
export interface PageAssertionsToHaveScreenshotOptions {
|
||||
/**
|
||||
* When set to `"disabled"`, stops CSS animations, CSS transitions and Web Animations. Animations get different
|
||||
* treatment depending on their duration:
|
||||
* - finite animations are fast-forwarded to completion, so they'll fire `transitionend` event.
|
||||
* - infinite animations are canceled to initial state, and then played over after the screenshot.
|
||||
*
|
||||
* Defaults to `"disabled"` that disables animations.
|
||||
*/
|
||||
animations?: "disabled"|"allow";
|
||||
|
||||
/**
|
||||
* When set to `"hide"`, screenshot will hide text caret. When set to `"initial"`, text caret behavior will not be
|
||||
* changed. Defaults to `"hide"`.
|
||||
*/
|
||||
caret?: "hide"|"initial";
|
||||
|
||||
/**
|
||||
* An object which specifies clipping of the resulting image.
|
||||
*/
|
||||
clip?: {
|
||||
/**
|
||||
* x-coordinate of top-left corner of clip area
|
||||
*/
|
||||
x: number;
|
||||
|
||||
/**
|
||||
* y-coordinate of top-left corner of clip area
|
||||
*/
|
||||
y: number;
|
||||
|
||||
/**
|
||||
* width of clipping area
|
||||
*/
|
||||
width: number;
|
||||
|
||||
/**
|
||||
* height of clipping area
|
||||
*/
|
||||
height: number;
|
||||
};
|
||||
|
||||
/**
|
||||
* When true, takes a screenshot of the full scrollable page, instead of the currently visible viewport. Defaults to
|
||||
* `false`.
|
||||
*/
|
||||
fullPage?: boolean;
|
||||
|
||||
/**
|
||||
* Specify locators that should be masked when the screenshot is taken. Masked elements will be overlaid with a pink
|
||||
* box `#FF00FF` (customized by `maskColor`) that completely covers its bounding box.
|
||||
*/
|
||||
mask?: Array<Locator>;
|
||||
|
||||
/**
|
||||
* Specify the color of the overlay box for masked elements, in
|
||||
* [CSS color format](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value). Default color is pink `#FF00FF`.
|
||||
*/
|
||||
maskColor?: string;
|
||||
|
||||
/**
|
||||
* An acceptable ratio of pixels that are different to the total amount of pixels, between `0` and `1`. Default is
|
||||
* configurable with `TestConfig.expect`. Unset by default.
|
||||
*/
|
||||
maxDiffPixelRatio?: number;
|
||||
|
||||
/**
|
||||
* An acceptable amount of pixels that could be different. Default is configurable with `TestConfig.expect`. Unset by
|
||||
* default.
|
||||
*/
|
||||
maxDiffPixels?: number;
|
||||
|
||||
/**
|
||||
* Hides default white background and allows capturing screenshots with transparency. Not applicable to `jpeg` images.
|
||||
* Defaults to `false`.
|
||||
*/
|
||||
omitBackground?: boolean;
|
||||
|
||||
/**
|
||||
* When set to `"css"`, screenshot will have a single pixel per each css pixel on the page. For high-dpi devices, this
|
||||
* will keep screenshots small. Using `"device"` option will produce a single pixel per each device pixel, so
|
||||
* screenshots of high-dpi devices will be twice as large or even larger.
|
||||
*
|
||||
* Defaults to `"css"`.
|
||||
*/
|
||||
scale?: "css"|"device";
|
||||
|
||||
/**
|
||||
* File name containing the stylesheet to apply while making the screenshot. This is where you can hide dynamic
|
||||
* elements, make elements invisible or change their properties to help you creating repeatable screenshots. This
|
||||
* stylesheet pierces the Shadow DOM and applies to the inner frames.
|
||||
*/
|
||||
stylePath?: string|Array<string>;
|
||||
|
||||
/**
|
||||
* An acceptable perceived color difference in the [YIQ color space](https://en.wikipedia.org/wiki/YIQ) between the
|
||||
* same pixel in compared images, between zero (strict) and one (lax), default is configurable with
|
||||
* `TestConfig.expect`. Defaults to `0.2`.
|
||||
*/
|
||||
threshold?: number;
|
||||
|
||||
/**
|
||||
* Time to retry the assertion for in milliseconds. Defaults to `timeout` in `TestConfig.expect`.
|
||||
*/
|
||||
timeout?: number;
|
||||
}
|
||||
|
||||
interface TestConfigWebServer {
|
||||
/**
|
||||
* Shell command to start. For example `npm run start`..
|
||||
|
|
|
|||
|
|
@ -1458,7 +1458,7 @@ export interface BrowserContextChannel extends BrowserContextEventTarget, EventT
|
|||
newCDPSession(params: BrowserContextNewCDPSessionParams, metadata?: CallMetadata): Promise<BrowserContextNewCDPSessionResult>;
|
||||
harStart(params: BrowserContextHarStartParams, metadata?: CallMetadata): Promise<BrowserContextHarStartResult>;
|
||||
harExport(params: BrowserContextHarExportParams, metadata?: CallMetadata): Promise<BrowserContextHarExportResult>;
|
||||
createTempFile(params: BrowserContextCreateTempFileParams, metadata?: CallMetadata): Promise<BrowserContextCreateTempFileResult>;
|
||||
createTempFiles(params: BrowserContextCreateTempFilesParams, metadata?: CallMetadata): Promise<BrowserContextCreateTempFilesResult>;
|
||||
updateSubscription(params: BrowserContextUpdateSubscriptionParams, metadata?: CallMetadata): Promise<BrowserContextUpdateSubscriptionResult>;
|
||||
clockFastForward(params: BrowserContextClockFastForwardParams, metadata?: CallMetadata): Promise<BrowserContextClockFastForwardResult>;
|
||||
clockInstall(params: BrowserContextClockInstallParams, metadata?: CallMetadata): Promise<BrowserContextClockInstallResult>;
|
||||
|
|
@ -1737,15 +1737,19 @@ export type BrowserContextHarExportOptions = {
|
|||
export type BrowserContextHarExportResult = {
|
||||
artifact: ArtifactChannel,
|
||||
};
|
||||
export type BrowserContextCreateTempFileParams = {
|
||||
name: string,
|
||||
lastModifiedMs?: number,
|
||||
export type BrowserContextCreateTempFilesParams = {
|
||||
rootDirName?: string,
|
||||
items: {
|
||||
name: string,
|
||||
lastModifiedMs?: number,
|
||||
}[],
|
||||
};
|
||||
export type BrowserContextCreateTempFileOptions = {
|
||||
lastModifiedMs?: number,
|
||||
export type BrowserContextCreateTempFilesOptions = {
|
||||
rootDirName?: string,
|
||||
};
|
||||
export type BrowserContextCreateTempFileResult = {
|
||||
writableStream: WritableStreamChannel,
|
||||
export type BrowserContextCreateTempFilesResult = {
|
||||
rootDir?: WritableStreamChannel,
|
||||
writableStreams: WritableStreamChannel[],
|
||||
};
|
||||
export type BrowserContextUpdateSubscriptionParams = {
|
||||
event: 'console' | 'dialog' | 'request' | 'response' | 'requestFinished' | 'requestFailed',
|
||||
|
|
@ -2918,6 +2922,8 @@ export type FrameSetInputFilesParams = {
|
|||
mimeType?: string,
|
||||
buffer: Binary,
|
||||
}[],
|
||||
localDirectory?: string,
|
||||
directoryStream?: WritableStreamChannel,
|
||||
localPaths?: string[],
|
||||
streams?: WritableStreamChannel[],
|
||||
timeout?: number,
|
||||
|
|
@ -2930,6 +2936,8 @@ export type FrameSetInputFilesOptions = {
|
|||
mimeType?: string,
|
||||
buffer: Binary,
|
||||
}[],
|
||||
localDirectory?: string,
|
||||
directoryStream?: WritableStreamChannel,
|
||||
localPaths?: string[],
|
||||
streams?: WritableStreamChannel[],
|
||||
timeout?: number,
|
||||
|
|
@ -3542,6 +3550,8 @@ export type ElementHandleSetInputFilesParams = {
|
|||
mimeType?: string,
|
||||
buffer: Binary,
|
||||
}[],
|
||||
localDirectory?: string,
|
||||
directoryStream?: WritableStreamChannel,
|
||||
localPaths?: string[],
|
||||
streams?: WritableStreamChannel[],
|
||||
timeout?: number,
|
||||
|
|
@ -3553,6 +3563,8 @@ export type ElementHandleSetInputFilesOptions = {
|
|||
mimeType?: string,
|
||||
buffer: Binary,
|
||||
}[],
|
||||
localDirectory?: string,
|
||||
directoryStream?: WritableStreamChannel,
|
||||
localPaths?: string[],
|
||||
streams?: WritableStreamChannel[],
|
||||
timeout?: number,
|
||||
|
|
|
|||
|
|
@ -1184,12 +1184,21 @@ BrowserContext:
|
|||
returns:
|
||||
artifact: Artifact
|
||||
|
||||
createTempFile:
|
||||
createTempFiles:
|
||||
parameters:
|
||||
name: string
|
||||
lastModifiedMs: number?
|
||||
rootDirName: string?
|
||||
items:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
name: string
|
||||
lastModifiedMs: number?
|
||||
returns:
|
||||
writableStream: WritableStream
|
||||
rootDir: WritableStream?
|
||||
writableStreams:
|
||||
type: array
|
||||
items: WritableStream
|
||||
|
||||
updateSubscription:
|
||||
parameters:
|
||||
|
|
@ -2184,6 +2193,8 @@ Frame:
|
|||
name: string
|
||||
mimeType: string?
|
||||
buffer: binary
|
||||
localDirectory: string?
|
||||
directoryStream: WritableStream?
|
||||
localPaths:
|
||||
type: array?
|
||||
items: string
|
||||
|
|
@ -2744,6 +2755,8 @@ ElementHandle:
|
|||
name: string
|
||||
mimeType: string?
|
||||
buffer: binary
|
||||
localDirectory: string?
|
||||
directoryStream: WritableStream?
|
||||
localPaths:
|
||||
type: array?
|
||||
items: string
|
||||
|
|
|
|||
12
tests/assets/input/folderupload.html
Normal file
12
tests/assets/input/folderupload.html
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Folder upload test</title>
|
||||
</head>
|
||||
<body>
|
||||
<form action="/upload" method="post" enctype="multipart/form-data">
|
||||
<input type="file" name="file1" webkitdirectory>
|
||||
<input type="submit">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -55,6 +55,7 @@ config.projects.push({
|
|||
name: 'electron-api',
|
||||
use: {
|
||||
browserName: 'chromium',
|
||||
headless: false,
|
||||
},
|
||||
testDir: path.join(testDir, 'electron'),
|
||||
metadata,
|
||||
|
|
@ -66,6 +67,7 @@ config.projects.push({
|
|||
snapshotPathTemplate: '{testDir}/{testFileDir}/{testFileName}-snapshots/{arg}-chromium{ext}',
|
||||
use: {
|
||||
browserName: 'chromium',
|
||||
headless: false,
|
||||
},
|
||||
testDir: path.join(testDir, 'page'),
|
||||
metadata,
|
||||
|
|
|
|||
|
|
@ -391,7 +391,7 @@ it('should(not) block third party cookies', async ({ context, page, server, brow
|
|||
|
||||
it('should not block third party SameSite=None cookies', async ({ contextFactory, httpsServer, browserName }) => {
|
||||
it.skip(browserName === 'webkit', 'No third party cookies in WebKit');
|
||||
it.skip(!!process.env.PW_FREEZE_TIME);
|
||||
it.skip(process.env.PW_CLOCK === 'frozen');
|
||||
const context = await contextFactory({
|
||||
ignoreHTTPSErrors: true,
|
||||
});
|
||||
|
|
|
|||
|
|
@ -252,6 +252,19 @@ test('should reset tracing', async ({ reusedContext, trace }, testInfo) => {
|
|||
expect(error.message).toContain('Must start tracing before stopping');
|
||||
});
|
||||
|
||||
test('should work with clock emulation', async ({ reusedContext, trace }, testInfo) => {
|
||||
let context = await reusedContext();
|
||||
|
||||
let page = await context.newPage();
|
||||
await page.clock.setFixedTime(new Date('2020-01-01T00:00:00.000Z'));
|
||||
expect(await page.evaluate('new Date().toISOString()')).toBe('2020-01-01T00:00:00.000Z');
|
||||
|
||||
context = await reusedContext();
|
||||
page = context.pages()[0];
|
||||
await page.clock.setFixedTime(new Date('2020-01-01T00:00:00Z'));
|
||||
expect(await page.evaluate('new Date().toISOString()')).toBe('2020-01-01T00:00:00.000Z');
|
||||
});
|
||||
|
||||
test('should continue issuing events after closing the reused page', async ({ reusedContext, server }) => {
|
||||
test.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/24574' });
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ import { devices } from '@playwright/test';
|
|||
import { contextTest as it, expect } from '../config/browserTest';
|
||||
import { browserTest } from '../config/browserTest';
|
||||
import { verifyViewport } from '../config/utils';
|
||||
import * as os from 'os';
|
||||
|
||||
it('should get the proper default viewport size', async ({ page, server }) => {
|
||||
await verifyViewport(page, 1280, 720);
|
||||
|
|
@ -177,9 +178,10 @@ browserTest('should be able to get correct orientation angle on non-mobile devic
|
|||
await context.close();
|
||||
});
|
||||
|
||||
it('should set window.screen.orientation.type for mobile devices', async ({ contextFactory, browserName, server }) => {
|
||||
it('should set window.screen.orientation.type for mobile devices', async ({ contextFactory, browserName, server, isMac }) => {
|
||||
it.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/31151' });
|
||||
it.skip(browserName === 'firefox', 'Firefox does not support mobile emulation');
|
||||
it.skip(isMac && parseInt(os.release().split('.')[0], 10) <= 21, 'WebKit on macOS 12 is frozen and does not support orientation.type override');
|
||||
const context = await contextFactory(devices['iPhone 14']);
|
||||
const page = await context.newPage();
|
||||
await page.goto(server.PREFIX + '/index.html');
|
||||
|
|
|
|||
|
|
@ -110,7 +110,6 @@ it('should play audio @smoke', async ({ page, server, browserName, platform }) =
|
|||
});
|
||||
|
||||
it('should support webgl @smoke', async ({ page, browserName, platform }) => {
|
||||
it.fixme(browserName === 'chromium' && platform === 'darwin' && os.arch() === 'arm64', 'SwiftShader is not available on macOS-arm64 - https://github.com/microsoft/playwright/issues/28216');
|
||||
const hasWebGL = await page.evaluate(() => {
|
||||
const canvas = document.createElement('canvas');
|
||||
return !!canvas.getContext('webgl');
|
||||
|
|
@ -119,10 +118,7 @@ it('should support webgl @smoke', async ({ page, browserName, platform }) => {
|
|||
});
|
||||
|
||||
it('should support webgl 2 @smoke', async ({ page, browserName, headless, isWindows, platform }) => {
|
||||
it.skip(browserName === 'webkit', 'WebKit doesn\'t have webgl2 enabled yet upstream.');
|
||||
it.fixme(browserName === 'firefox' && isWindows);
|
||||
it.fixme(browserName === 'chromium' && !headless, 'chromium doesn\'t like webgl2 when running under xvfb');
|
||||
it.fixme(browserName === 'chromium' && platform === 'darwin' && os.arch() === 'arm64', 'SwiftShader is not available on macOS-arm64 - https://github.com/microsoft/playwright/issues/28216');
|
||||
|
||||
const hasWebGL2 = await page.evaluate(() => {
|
||||
const canvas = document.createElement('canvas');
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ it('should ignore eval() scripts by default', async function({ page, server }) {
|
|||
});
|
||||
|
||||
it('shouldn\'t ignore eval() scripts if reportAnonymousScripts is true', async function({ page, server }) {
|
||||
it.skip(!!process.env.PW_FREEZE_TIME);
|
||||
it.skip(!!process.env.PW_CLOCK);
|
||||
await page.coverage.startJSCoverage({ reportAnonymousScripts: true });
|
||||
await page.goto(server.PREFIX + '/jscoverage/eval.html');
|
||||
const coverage = await page.coverage.stopJSCoverage();
|
||||
|
|
|
|||
|
|
@ -1350,6 +1350,30 @@ it.describe('fastForward', () => {
|
|||
});
|
||||
});
|
||||
|
||||
it.describe('pauseAt', () => {
|
||||
it('pause at target time', async ({ clock }) => {
|
||||
clock.install(0);
|
||||
await clock.pauseAt(1000);
|
||||
expect(clock.Date.now()).toBe(1000);
|
||||
});
|
||||
|
||||
it('fire target timers', async ({ clock }) => {
|
||||
clock.install(0);
|
||||
const stub = createStub();
|
||||
clock.setTimeout(stub, 1000);
|
||||
clock.setTimeout(stub, 1001);
|
||||
await clock.pauseAt(1000);
|
||||
expect(stub.callCount).toBe(1);
|
||||
});
|
||||
|
||||
it('returns consumed clicks', async ({ clock }) => {
|
||||
const now = Date.now();
|
||||
clock.install(now);
|
||||
const consumedTicks = await clock.pauseAt(now + 1000 * 60 * 60 * 24);
|
||||
expect(consumedTicks).toBe(1000 * 60 * 60 * 24);
|
||||
});
|
||||
});
|
||||
|
||||
it.describe('performance.now()', () => {
|
||||
it('should start at 0', async ({ clock }) => {
|
||||
const result = clock.performance.now();
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ it('should(not) block third party cookies', async ({ page, server, allowsThirdPa
|
|||
|
||||
it('should not block third party SameSite=None cookies', async ({ httpsServer, browserName, browser }) => {
|
||||
it.skip(browserName === 'webkit', 'No third party cookies in WebKit');
|
||||
it.skip(!!process.env.PW_FREEZE_TIME);
|
||||
it.skip(process.env.PW_CLOCK === 'frozen');
|
||||
const page = await browser.newPage({
|
||||
ignoreHTTPSErrors: true,
|
||||
});
|
||||
|
|
|
|||
|
|
@ -557,6 +557,7 @@ await page.Locator("#checkbox").UncheckAsync();`);
|
|||
|
||||
const locator = await recorder.hoverOverElement('select');
|
||||
expect(locator).toBe(`locator('#age')`);
|
||||
await page.locator('select').click();
|
||||
|
||||
const [message, sources] = await Promise.all([
|
||||
page.waitForEvent('console', msg => msg.type() !== 'error'),
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue