@checkly/playwright-core 1.41.21 → 1.41.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/browserServerImpl.js +1 -1
- package/lib/cli/driver.js +2 -2
- package/lib/cli/program.js +2 -2
- package/lib/client/android.js +1 -1
- package/lib/client/artifact.js +2 -2
- package/lib/client/browserContext.js +5 -5
- package/lib/client/browserType.js +1 -1
- package/lib/client/channelOwner.js +2 -2
- package/lib/client/connection.js +1 -1
- package/lib/client/consoleMessage.js +2 -2
- package/lib/client/fetch.js +3 -3
- package/lib/client/frame.js +2 -2
- package/lib/client/locator.js +2 -2
- package/lib/client/page.js +1 -1
- package/lib/common/debugLogger.js +0 -1
- package/lib/common/socksProxy.js +11 -16
- package/lib/outofprocess.js +2 -2
- package/lib/remote/playwrightConnection.js +1 -1
- package/lib/remote/playwrightServer.js +1 -1
- package/lib/server/android/android.js +1 -1
- package/lib/server/android/backendAdb.js +2 -2
- package/lib/server/browser.js +2 -2
- package/lib/server/browserContext.js +8 -9
- package/lib/server/browserType.js +3 -3
- package/lib/server/chromium/crBrowser.js +2 -3
- package/lib/server/chromium/crConnection.js +1 -1
- package/lib/server/chromium/crExecutionContext.js +2 -2
- package/lib/server/chromium/crInput.js +2 -2
- package/lib/server/chromium/crNetworkManager.js +10 -11
- package/lib/server/chromium/crPage.js +3 -5
- package/lib/server/chromium/crServiceWorker.js +2 -3
- package/lib/server/dispatchers/browserContextDispatcher.js +4 -4
- package/lib/server/dispatchers/dispatcher.js +10 -10
- package/lib/server/dispatchers/localUtilsDispatcher.js +4 -4
- package/lib/server/dispatchers/playwrightDispatcher.js +5 -5
- package/lib/server/dispatchers/writableStreamDispatcher.js +2 -2
- package/lib/server/dom.js +3 -3
- package/lib/server/electron/electron.js +2 -2
- package/lib/server/fetch.js +4 -4
- package/lib/server/firefox/ffBrowser.js +3 -3
- package/lib/server/firefox/ffExecutionContext.js +2 -2
- package/lib/server/firefox/ffNetworkManager.js +7 -7
- package/lib/server/firefox/ffPage.js +2 -4
- package/lib/server/firefox/firefox.js +2 -2
- package/lib/server/frames.js +3 -3
- package/lib/server/har/harTracer.js +6 -6
- package/lib/server/input.js +2 -2
- package/lib/server/isomorphic/utilityScriptSerializers.js +0 -1
- package/lib/server/javascript.js +2 -2
- package/lib/server/page.js +2 -2
- package/lib/server/progress.js +2 -3
- package/lib/server/recorder/recorderUtils.js +2 -2
- package/lib/server/recorder.js +13 -13
- package/lib/server/registry/browserFetcher.js +0 -1
- package/lib/server/registry/dependencies.js +2 -2
- package/lib/server/registry/index.js +2 -3
- package/lib/server/registry/oopDownloadBrowserMain.js +2 -2
- package/lib/server/screenshotter.js +0 -1
- package/lib/server/socksInterceptor.js +2 -2
- package/lib/server/trace/recorder/snapshotter.js +1 -1
- package/lib/server/trace/recorder/tracing.js +7 -9
- package/lib/server/trace/test/inMemorySnapshotter.js +1 -1
- package/lib/server/trace/viewer/traceViewer.js +1 -1
- package/lib/server/transport.js +11 -11
- package/lib/server/webkit/wkBrowser.js +3 -3
- package/lib/server/webkit/wkExecutionContext.js +2 -2
- package/lib/server/webkit/wkInput.js +2 -2
- package/lib/server/webkit/wkInterceptableRequest.js +2 -2
- package/lib/server/webkit/wkPage.js +8 -10
- package/lib/utils/happy-eyeballs.js +5 -4
- package/lib/utils/isomorphic/cssParser.js +2 -2
- package/lib/utils/isomorphic/selectorParser.js +0 -1
- package/lib/utils/processLauncher.js +2 -2
- package/lib/utils/profiler.js +2 -2
- package/lib/utils/zipFile.js +1 -1
- package/lib/vite/htmlReport/index.html +12 -13
- package/lib/vite/recorder/assets/codeMirrorModule-Hs9-1ZG4.css +1 -0
- package/lib/vite/recorder/assets/codeMirrorModule-I9ks4y7D.js +24 -0
- package/lib/vite/recorder/assets/{index-64ce22d5.css → index-ljsTwXtJ.css} +1 -1
- package/lib/vite/recorder/assets/index-yg8ypzl6.js +47 -0
- package/lib/vite/recorder/index.html +2 -3
- package/lib/vite/traceViewer/assets/codeMirrorModule-2mdjgmqe.js +24 -0
- package/lib/vite/traceViewer/assets/codeMirrorModule-A2_PGeGB.js +24 -0
- package/lib/vite/{recorder/assets/codeMirrorModule-85487eb6.js → traceViewer/assets/codeMirrorModule-GJA8DRmd.js} +1 -1
- package/lib/vite/traceViewer/assets/codeMirrorModule-aUzO-LID.js +24 -0
- package/lib/vite/traceViewer/assets/wsPort-93o0i57c.js +69 -0
- package/lib/vite/traceViewer/assets/wsPort-L8WBvZfK.js +69 -0
- package/lib/vite/traceViewer/assets/wsPort-qI0zJPR7.js +69 -0
- package/lib/vite/traceViewer/assets/wsPort-uVqol1LI.js +69 -0
- package/lib/vite/traceViewer/index.4xhUWj1f.js +2 -0
- package/lib/vite/traceViewer/index.LR1HufLs.js +2 -0
- package/lib/vite/traceViewer/index.Ox-CymYJ.js +2 -0
- package/lib/vite/traceViewer/index.html +4 -5
- package/lib/vite/traceViewer/index.o6j3Cv4u.js +2 -0
- package/lib/vite/traceViewer/sw.bundle.js +1 -1
- package/lib/vite/traceViewer/uiMode.PlLkrJDI.js +10 -0
- package/lib/vite/traceViewer/uiMode.YGPXSUMv.js +10 -0
- package/lib/vite/traceViewer/uiMode.YYFJGvtV.js +10 -0
- package/lib/vite/traceViewer/uiMode.html +4 -5
- package/lib/vite/traceViewer/uiMode.qpn6w4df.js +10 -0
- package/lib/vite/traceViewer/wsPort.zR1WIy9-.css +1 -0
- package/package.json +1 -1
- package/lib/vite/recorder/assets/codeMirrorModule-5d0f417c.css +0 -1
- package/lib/vite/recorder/assets/index-b14c63fe.js +0 -41
- /package/lib/vite/recorder/assets/{codicon-79f233d0.ttf → codicon-zGuYmc9o.ttf} +0 -0
|
@@ -16,8 +16,8 @@ var _userAgent = require("../../utils/userAgent");
|
|
|
16
16
|
var _network2 = require("../../utils/network");
|
|
17
17
|
var _frames = require("../frames");
|
|
18
18
|
var _mimeType = require("../../utils/mimeType");
|
|
19
|
-
function _getRequireWildcardCache(
|
|
20
|
-
function _interopRequireWildcard(
|
|
19
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
20
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
21
21
|
/**
|
|
22
22
|
* Copyright (c) Microsoft Corporation.
|
|
23
23
|
*
|
|
@@ -263,14 +263,14 @@ class HarTracer {
|
|
|
263
263
|
if (compressionCalculationBarrier) this._addBarrier(page || request.serviceWorker(), compressionCalculationBarrier.barrier);
|
|
264
264
|
const promise = response.body().then(buffer => {
|
|
265
265
|
if (this._options.omitScripts && request.resourceType() === 'script') {
|
|
266
|
-
compressionCalculationBarrier === null || compressionCalculationBarrier === void 0
|
|
266
|
+
compressionCalculationBarrier === null || compressionCalculationBarrier === void 0 || compressionCalculationBarrier.setDecodedBodySize(0);
|
|
267
267
|
return;
|
|
268
268
|
}
|
|
269
269
|
const content = harEntry.response.content;
|
|
270
|
-
compressionCalculationBarrier === null || compressionCalculationBarrier === void 0
|
|
270
|
+
compressionCalculationBarrier === null || compressionCalculationBarrier === void 0 || compressionCalculationBarrier.setDecodedBodySize(buffer.length);
|
|
271
271
|
this._storeResponseContent(buffer, content, request.resourceType());
|
|
272
272
|
}).catch(() => {
|
|
273
|
-
compressionCalculationBarrier === null || compressionCalculationBarrier === void 0
|
|
273
|
+
compressionCalculationBarrier === null || compressionCalculationBarrier === void 0 || compressionCalculationBarrier.setDecodedBodySize(0);
|
|
274
274
|
}).then(() => {
|
|
275
275
|
if (this._started) this._delegate.onEntryFinished(harEntry);
|
|
276
276
|
});
|
|
@@ -286,7 +286,7 @@ class HarTracer {
|
|
|
286
286
|
harEntry.response.headersSize = sizes.responseHeadersSize;
|
|
287
287
|
harEntry.response._transferSize = sizes.transferSize;
|
|
288
288
|
harEntry.request.headersSize = sizes.requestHeadersSize;
|
|
289
|
-
compressionCalculationBarrier === null || compressionCalculationBarrier === void 0
|
|
289
|
+
compressionCalculationBarrier === null || compressionCalculationBarrier === void 0 || compressionCalculationBarrier.setEncodedBodySize(sizes.responseBodySize);
|
|
290
290
|
}));
|
|
291
291
|
}
|
|
292
292
|
}
|
package/lib/server/input.js
CHANGED
|
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.keypadLocation = exports.Touchscreen = exports.Mouse = exports.Keyboard = void 0;
|
|
7
7
|
var _utils = require("../utils");
|
|
8
8
|
var keyboardLayout = _interopRequireWildcard(require("./usKeyboardLayout"));
|
|
9
|
-
function _getRequireWildcardCache(
|
|
10
|
-
function _interopRequireWildcard(
|
|
9
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
10
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
11
11
|
/**
|
|
12
12
|
* Copyright (c) Microsoft Corporation.
|
|
13
13
|
*
|
package/lib/server/javascript.js
CHANGED
|
@@ -14,8 +14,8 @@ var utilityScriptSource = _interopRequireWildcard(require("../generated/utilityS
|
|
|
14
14
|
var _utilityScriptSerializers = require("./isomorphic/utilityScriptSerializers");
|
|
15
15
|
var _instrumentation = require("./instrumentation");
|
|
16
16
|
var _manualPromise = require("../utils/manualPromise");
|
|
17
|
-
function _getRequireWildcardCache(
|
|
18
|
-
function _interopRequireWildcard(
|
|
17
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
18
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
19
19
|
/**
|
|
20
20
|
* Copyright (c) Microsoft Corporation.
|
|
21
21
|
*
|
package/lib/server/page.js
CHANGED
|
@@ -23,8 +23,8 @@ var _instrumentation = require("./instrumentation");
|
|
|
23
23
|
var _selectorParser = require("../utils/isomorphic/selectorParser");
|
|
24
24
|
var _utilityScriptSerializers = require("./isomorphic/utilityScriptSerializers");
|
|
25
25
|
var _errors = require("./errors");
|
|
26
|
-
function _getRequireWildcardCache(
|
|
27
|
-
function _interopRequireWildcard(
|
|
26
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
27
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
28
28
|
/**
|
|
29
29
|
* Copyright 2017 Google Inc. All rights reserved.
|
|
30
30
|
* Modifications copyright (c) Microsoft Corporation.
|
package/lib/server/progress.js
CHANGED
|
@@ -40,7 +40,6 @@ class ProgressController {
|
|
|
40
40
|
this.instrumentation = sdkObject.instrumentation;
|
|
41
41
|
this._forceAbortPromise.catch(e => null); // Prevent unhandled promise rejection.
|
|
42
42
|
}
|
|
43
|
-
|
|
44
43
|
setLogName(logName) {
|
|
45
44
|
this._logName = logName;
|
|
46
45
|
}
|
|
@@ -55,7 +54,7 @@ class ProgressController {
|
|
|
55
54
|
}
|
|
56
55
|
(0, _utils.assert)(this._state === 'before');
|
|
57
56
|
this._state = 'running';
|
|
58
|
-
(_this$sdkObject$attri = this.sdkObject.attribution.context) === null || _this$sdkObject$attri === void 0
|
|
57
|
+
(_this$sdkObject$attri = this.sdkObject.attribution.context) === null || _this$sdkObject$attri === void 0 || _this$sdkObject$attri._activeProgressControllers.add(this);
|
|
59
58
|
const progress = {
|
|
60
59
|
log: message => {
|
|
61
60
|
progress.logEntry({
|
|
@@ -97,7 +96,7 @@ class ProgressController {
|
|
|
97
96
|
throw e;
|
|
98
97
|
} finally {
|
|
99
98
|
var _this$sdkObject$attri2;
|
|
100
|
-
(_this$sdkObject$attri2 = this.sdkObject.attribution.context) === null || _this$sdkObject$attri2 === void 0
|
|
99
|
+
(_this$sdkObject$attri2 = this.sdkObject.attribution.context) === null || _this$sdkObject$attri2 === void 0 || _this$sdkObject$attri2._activeProgressControllers.delete(this);
|
|
101
100
|
clearTimeout(timer);
|
|
102
101
|
}
|
|
103
102
|
}
|
|
@@ -21,7 +21,7 @@ exports.metadataToCallLog = metadataToCallLog;
|
|
|
21
21
|
*/
|
|
22
22
|
|
|
23
23
|
function metadataToCallLog(metadata, status) {
|
|
24
|
-
var _metadata$params, _metadata$params2, _metadata$error
|
|
24
|
+
var _metadata$params, _metadata$params2, _metadata$error;
|
|
25
25
|
let title = metadata.apiName || metadata.method;
|
|
26
26
|
if (metadata.method === 'waitForEventInfo') title += `(${metadata.params.info.event})`;
|
|
27
27
|
title = title.replace('object.expect', 'expect');
|
|
@@ -40,7 +40,7 @@ function metadataToCallLog(metadata, status) {
|
|
|
40
40
|
messages: metadata.log,
|
|
41
41
|
title,
|
|
42
42
|
status,
|
|
43
|
-
error: (_metadata$error = metadata.error) === null || _metadata$error === void 0
|
|
43
|
+
error: (_metadata$error = metadata.error) === null || _metadata$error === void 0 || (_metadata$error = _metadata$error.error) === null || _metadata$error === void 0 ? void 0 : _metadata$error.message,
|
|
44
44
|
params,
|
|
45
45
|
duration
|
|
46
46
|
};
|
package/lib/server/recorder.js
CHANGED
|
@@ -26,8 +26,8 @@ var _timeoutRunner = require("../utils/timeoutRunner");
|
|
|
26
26
|
var _locatorParser = require("../utils/isomorphic/locatorParser");
|
|
27
27
|
var _stringUtils = require("../utils/isomorphic/stringUtils");
|
|
28
28
|
var _eventsHelper = require("./../utils/eventsHelper");
|
|
29
|
-
function _getRequireWildcardCache(
|
|
30
|
-
function _interopRequireWildcard(
|
|
29
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
30
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
31
31
|
/**
|
|
32
32
|
* Copyright (c) Microsoft Corporation.
|
|
33
33
|
*
|
|
@@ -144,7 +144,7 @@ class Recorder {
|
|
|
144
144
|
var _this$_recorderApp;
|
|
145
145
|
this._recorderSources = data.sources;
|
|
146
146
|
this._pushAllSources();
|
|
147
|
-
(_this$_recorderApp = this._recorderApp) === null || _this$_recorderApp === void 0
|
|
147
|
+
(_this$_recorderApp = this._recorderApp) === null || _this$_recorderApp === void 0 || _this$_recorderApp.setFileIfNeeded(data.primaryFileName);
|
|
148
148
|
});
|
|
149
149
|
await this._context.exposeBinding('__pw_recorderState', false, source => {
|
|
150
150
|
let actionSelector = '';
|
|
@@ -213,7 +213,7 @@ class Recorder {
|
|
|
213
213
|
} of this._debugger.pausedDetails()) {
|
|
214
214
|
if (!this._currentCallsMetadata.has(metadata)) this.onBeforeCall(sdkObject, metadata);
|
|
215
215
|
}
|
|
216
|
-
(_this$_recorderApp3 = this._recorderApp) === null || _this$_recorderApp3 === void 0
|
|
216
|
+
(_this$_recorderApp3 = this._recorderApp) === null || _this$_recorderApp3 === void 0 || _this$_recorderApp3.setPaused(this._debugger.isPaused());
|
|
217
217
|
this._updateUserSources();
|
|
218
218
|
this.updateCallLog([...this._currentCallsMetadata.keys()]);
|
|
219
219
|
}
|
|
@@ -222,7 +222,7 @@ class Recorder {
|
|
|
222
222
|
if (this._mode === mode) return;
|
|
223
223
|
this._highlightedSelector = '';
|
|
224
224
|
this._mode = mode;
|
|
225
|
-
(_this$_recorderApp4 = this._recorderApp) === null || _this$_recorderApp4 === void 0
|
|
225
|
+
(_this$_recorderApp4 = this._recorderApp) === null || _this$_recorderApp4 === void 0 || _this$_recorderApp4.setMode(this._mode);
|
|
226
226
|
this._contextRecorder.setEnabled(this._mode === 'recording' || this._mode === 'assertingText' || this._mode === 'assertingVisibility' || this._mode === 'assertingValue');
|
|
227
227
|
this._debugger.setMuted(this._mode === 'recording' || this._mode === 'assertingText' || this._mode === 'assertingVisibility' || this._mode === 'assertingValue');
|
|
228
228
|
if (this._mode !== 'none' && this._mode !== 'standby' && this._context.pages().length === 1) this._context.pages()[0].bringToFront().catch(() => {});
|
|
@@ -258,7 +258,7 @@ class Recorder {
|
|
|
258
258
|
} else if (metadata.params && metadata.params.selector) {
|
|
259
259
|
var _this$_recorderApp5;
|
|
260
260
|
this._highlightedSelector = metadata.params.selector;
|
|
261
|
-
(_this$_recorderApp5 = this._recorderApp) === null || _this$_recorderApp5 === void 0
|
|
261
|
+
(_this$_recorderApp5 = this._recorderApp) === null || _this$_recorderApp5 === void 0 || _this$_recorderApp5.setSelector(this._highlightedSelector).catch(() => {});
|
|
262
262
|
}
|
|
263
263
|
}
|
|
264
264
|
async onAfterCall(sdkObject, metadata) {
|
|
@@ -306,11 +306,11 @@ class Recorder {
|
|
|
306
306
|
}
|
|
307
307
|
}
|
|
308
308
|
this._pushAllSources();
|
|
309
|
-
if (fileToSelect) (_this$_recorderApp6 = this._recorderApp) === null || _this$_recorderApp6 === void 0
|
|
309
|
+
if (fileToSelect) (_this$_recorderApp6 = this._recorderApp) === null || _this$_recorderApp6 === void 0 || _this$_recorderApp6.setFileIfNeeded(fileToSelect);
|
|
310
310
|
}
|
|
311
311
|
_pushAllSources() {
|
|
312
312
|
var _this$_recorderApp7;
|
|
313
|
-
(_this$_recorderApp7 = this._recorderApp) === null || _this$_recorderApp7 === void 0
|
|
313
|
+
(_this$_recorderApp7 = this._recorderApp) === null || _this$_recorderApp7 === void 0 || _this$_recorderApp7.setSources([...this._recorderSources, ...this._userSources.values()]);
|
|
314
314
|
}
|
|
315
315
|
async onBeforeInputAction(sdkObject, metadata) {}
|
|
316
316
|
async onCallLog(sdkObject, metadata, logName, message) {
|
|
@@ -327,7 +327,7 @@ class Recorder {
|
|
|
327
327
|
if (this._debugger.isPaused(metadata)) status = 'paused';
|
|
328
328
|
logs.push((0, _recorderUtils.metadataToCallLog)(metadata, status));
|
|
329
329
|
}
|
|
330
|
-
(_this$_recorderApp8 = this._recorderApp) === null || _this$_recorderApp8 === void 0
|
|
330
|
+
(_this$_recorderApp8 = this._recorderApp) === null || _this$_recorderApp8 === void 0 || _this$_recorderApp8.updateCallLogs(logs);
|
|
331
331
|
}
|
|
332
332
|
_readSource(fileName) {
|
|
333
333
|
try {
|
|
@@ -384,7 +384,7 @@ class ContextRecorder extends _events.EventEmitter {
|
|
|
384
384
|
};
|
|
385
385
|
source.revealLine = text.split('\n').length - 1;
|
|
386
386
|
this._recorderSources.push(source);
|
|
387
|
-
if (languageGenerator === this._orderedLanguages[0]) (_this$_throttledOutpu = this._throttledOutputFile) === null || _this$_throttledOutpu === void 0
|
|
387
|
+
if (languageGenerator === this._orderedLanguages[0]) (_this$_throttledOutpu = this._throttledOutputFile) === null || _this$_throttledOutpu === void 0 || _this$_throttledOutpu.setContent(source.text);
|
|
388
388
|
}
|
|
389
389
|
this.emit(ContextRecorder.Events.Change, {
|
|
390
390
|
sources: this._recorderSources,
|
|
@@ -393,11 +393,11 @@ class ContextRecorder extends _events.EventEmitter {
|
|
|
393
393
|
});
|
|
394
394
|
context.on(_browserContext.BrowserContext.Events.BeforeClose, () => {
|
|
395
395
|
var _this$_throttledOutpu2;
|
|
396
|
-
(_this$_throttledOutpu2 = this._throttledOutputFile) === null || _this$_throttledOutpu2 === void 0
|
|
396
|
+
(_this$_throttledOutpu2 = this._throttledOutputFile) === null || _this$_throttledOutpu2 === void 0 || _this$_throttledOutpu2.flush();
|
|
397
397
|
});
|
|
398
398
|
this._listeners.push(_eventsHelper.eventsHelper.addEventListener(process, 'exit', () => {
|
|
399
399
|
var _this$_throttledOutpu3;
|
|
400
|
-
(_this$_throttledOutpu3 = this._throttledOutputFile) === null || _this$_throttledOutpu3 === void 0
|
|
400
|
+
(_this$_throttledOutpu3 = this._throttledOutputFile) === null || _this$_throttledOutpu3 === void 0 || _this$_throttledOutpu3.flush();
|
|
401
401
|
}));
|
|
402
402
|
this._generator = generator;
|
|
403
403
|
}
|
|
@@ -409,7 +409,7 @@ class ContextRecorder extends _events.EventEmitter {
|
|
|
409
409
|
languages.delete(primaryLanguage);
|
|
410
410
|
this._orderedLanguages = [primaryLanguage, ...languages];
|
|
411
411
|
this._throttledOutputFile = outputFile ? new ThrottledFile(outputFile) : null;
|
|
412
|
-
(_this$_generator = this._generator) === null || _this$_generator === void 0
|
|
412
|
+
(_this$_generator = this._generator) === null || _this$_generator === void 0 || _this$_generator.restart();
|
|
413
413
|
}
|
|
414
414
|
languageName(id) {
|
|
415
415
|
for (const lang of this._orderedLanguages) {
|
|
@@ -126,7 +126,6 @@ function logPolitely(toBeLogged) {
|
|
|
126
126
|
const logLevelDisplay = ['silent', 'error', 'warn'].indexOf(logLevel || '') > -1;
|
|
127
127
|
if (!logLevelDisplay) console.log(toBeLogged); // eslint-disable-line no-console
|
|
128
128
|
}
|
|
129
|
-
|
|
130
129
|
function getDownloadProgress() {
|
|
131
130
|
if (process.stdout.isTTY) return getAnimatedDownloadProgress();
|
|
132
131
|
return getBasicDownloadProgress();
|
|
@@ -21,8 +21,8 @@ var _hostPlatform = require("../../utils/hostPlatform");
|
|
|
21
21
|
var _ = require(".");
|
|
22
22
|
var _nativeDeps = require("./nativeDeps");
|
|
23
23
|
var _userAgent = require("../../utils/userAgent");
|
|
24
|
-
function _getRequireWildcardCache(
|
|
25
|
-
function _interopRequireWildcard(
|
|
24
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
25
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
26
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
27
|
/**
|
|
28
28
|
* Copyright (c) Microsoft Corporation.
|
|
@@ -31,8 +31,8 @@ var _spawnAsync = require("../../utils/spawnAsync");
|
|
|
31
31
|
var _dependencies = require("./dependencies");
|
|
32
32
|
var _browserFetcher = require("./browserFetcher");
|
|
33
33
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
34
|
-
function _getRequireWildcardCache(
|
|
35
|
-
function _interopRequireWildcard(
|
|
34
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
35
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
36
36
|
/**
|
|
37
37
|
* Copyright 2017 Google Inc. All rights reserved.
|
|
38
38
|
* Modifications copyright (c) Microsoft Corporation.
|
|
@@ -879,7 +879,6 @@ async function installBrowsersForNpmInstall(browsers) {
|
|
|
879
879
|
}
|
|
880
880
|
await registry.install(executables, false /* forceReinstall */);
|
|
881
881
|
}
|
|
882
|
-
|
|
883
882
|
function findChromiumChannel(sdkLanguage) {
|
|
884
883
|
// Fall back to the stable channels of popular vendors to work out of the box.
|
|
885
884
|
// Null means no installation and no channels found.
|
|
@@ -24,7 +24,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
24
24
|
|
|
25
25
|
function log(message) {
|
|
26
26
|
var _process$send, _process;
|
|
27
|
-
(_process$send = (_process = process).send) === null || _process$send === void 0
|
|
27
|
+
(_process$send = (_process = process).send) === null || _process$send === void 0 || _process$send.call(_process, {
|
|
28
28
|
method: 'log',
|
|
29
29
|
params: {
|
|
30
30
|
message
|
|
@@ -33,7 +33,7 @@ function log(message) {
|
|
|
33
33
|
}
|
|
34
34
|
function progress(done, total) {
|
|
35
35
|
var _process$send2, _process2;
|
|
36
|
-
(_process$send2 = (_process2 = process).send) === null || _process$send2 === void 0
|
|
36
|
+
(_process$send2 = (_process2 = process).send) === null || _process$send2 === void 0 || _process$send2.call(_process2, {
|
|
37
37
|
method: 'progress',
|
|
38
38
|
params: {
|
|
39
39
|
done,
|
|
@@ -200,7 +200,6 @@ class Screenshotter {
|
|
|
200
200
|
progress.throwIfAborted(); // Do not do extra work.
|
|
201
201
|
|
|
202
202
|
await handle._waitAndScrollIntoViewIfNeeded(progress, true /* waitForVisible */);
|
|
203
|
-
|
|
204
203
|
progress.throwIfAborted(); // Do not do extra work.
|
|
205
204
|
const boundingBox = await handle.boundingBox();
|
|
206
205
|
(0, _utils.assert)(boundingBox, 'Node is either not visible or not an HTMLElement');
|
|
@@ -8,8 +8,8 @@ var socks = _interopRequireWildcard(require("../common/socksProxy"));
|
|
|
8
8
|
var _events = _interopRequireDefault(require("events"));
|
|
9
9
|
var _validator = require("../protocol/validator");
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
function _getRequireWildcardCache(
|
|
12
|
-
function _interopRequireWildcard(
|
|
11
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
12
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
13
13
|
/**
|
|
14
14
|
* Copyright (c) Microsoft Corporation.
|
|
15
15
|
*
|
|
@@ -83,7 +83,7 @@ class Snapshotter {
|
|
|
83
83
|
const expression = `window["${this._snapshotStreamer}"].captureSnapshot(${JSON.stringify(snapshotName)})`;
|
|
84
84
|
|
|
85
85
|
// In a best-effort manner, without waiting for it, mark target element.
|
|
86
|
-
element === null || element === void 0
|
|
86
|
+
element === null || element === void 0 || element.callFunctionNoReply((element, callId) => {
|
|
87
87
|
const customEvent = new CustomEvent('__playwright_target__', {
|
|
88
88
|
bubbles: true,
|
|
89
89
|
cancelable: true,
|
|
@@ -94,7 +94,7 @@ class Tracing extends _instrumentation.SdkObject {
|
|
|
94
94
|
mode: 'discard'
|
|
95
95
|
}).catch(() => {});
|
|
96
96
|
await this.stop();
|
|
97
|
-
(_this$_snapshotter = this._snapshotter) === null || _this$_snapshotter === void 0
|
|
97
|
+
(_this$_snapshotter = this._snapshotter) === null || _this$_snapshotter === void 0 || _this$_snapshotter.resetForReuse();
|
|
98
98
|
}
|
|
99
99
|
async start(options) {
|
|
100
100
|
if (this._isStopping) throw new Error('Cannot start tracing while stopping');
|
|
@@ -198,7 +198,7 @@ class Tracing extends _instrumentation.SdkObject {
|
|
|
198
198
|
}
|
|
199
199
|
abort() {
|
|
200
200
|
var _this$_snapshotter3;
|
|
201
|
-
(_this$_snapshotter3 = this._snapshotter) === null || _this$_snapshotter3 === void 0
|
|
201
|
+
(_this$_snapshotter3 = this._snapshotter) === null || _this$_snapshotter3 === void 0 || _this$_snapshotter3.dispose();
|
|
202
202
|
this._harTracer.stop();
|
|
203
203
|
}
|
|
204
204
|
async flush() {
|
|
@@ -286,9 +286,9 @@ class Tracing extends _instrumentation.SdkObject {
|
|
|
286
286
|
// IMPORTANT: no awaits before this._appendTraceEvent in this method.
|
|
287
287
|
const event = createBeforeActionTraceEvent(metadata);
|
|
288
288
|
if (!event) return Promise.resolve();
|
|
289
|
-
(_sdkObject$attributio = sdkObject.attribution.page) === null || _sdkObject$attributio === void 0
|
|
289
|
+
(_sdkObject$attributio = sdkObject.attribution.page) === null || _sdkObject$attributio === void 0 || _sdkObject$attributio.temporarilyDisableTracingScreencastThrottling();
|
|
290
290
|
event.beforeSnapshot = `before@${metadata.id}`;
|
|
291
|
-
(_this$_state = this._state) === null || _this$_state === void 0
|
|
291
|
+
(_this$_state = this._state) === null || _this$_state === void 0 || _this$_state.callIds.add(metadata.id);
|
|
292
292
|
this._appendTraceEvent(event);
|
|
293
293
|
return this._captureSnapshot(event.beforeSnapshot, sdkObject, metadata);
|
|
294
294
|
}
|
|
@@ -298,7 +298,7 @@ class Tracing extends _instrumentation.SdkObject {
|
|
|
298
298
|
// IMPORTANT: no awaits before this._appendTraceEvent in this method.
|
|
299
299
|
const event = createInputActionTraceEvent(metadata);
|
|
300
300
|
if (!event) return Promise.resolve();
|
|
301
|
-
(_sdkObject$attributio2 = sdkObject.attribution.page) === null || _sdkObject$attributio2 === void 0
|
|
301
|
+
(_sdkObject$attributio2 = sdkObject.attribution.page) === null || _sdkObject$attributio2 === void 0 || _sdkObject$attributio2.temporarilyDisableTracingScreencastThrottling();
|
|
302
302
|
event.inputSnapshot = `input@${metadata.id}`;
|
|
303
303
|
this._appendTraceEvent(event);
|
|
304
304
|
return this._captureSnapshot(event.inputSnapshot, sdkObject, metadata, element);
|
|
@@ -312,10 +312,10 @@ class Tracing extends _instrumentation.SdkObject {
|
|
|
312
312
|
async onAfterCall(sdkObject, metadata) {
|
|
313
313
|
var _this$_state3, _this$_state4, _sdkObject$attributio3;
|
|
314
314
|
if (!((_this$_state3 = this._state) !== null && _this$_state3 !== void 0 && _this$_state3.callIds.has(metadata.id))) return;
|
|
315
|
-
(_this$_state4 = this._state) === null || _this$_state4 === void 0
|
|
315
|
+
(_this$_state4 = this._state) === null || _this$_state4 === void 0 || _this$_state4.callIds.delete(metadata.id);
|
|
316
316
|
const event = createAfterActionTraceEvent(metadata);
|
|
317
317
|
if (!event) return;
|
|
318
|
-
(_sdkObject$attributio3 = sdkObject.attribution.page) === null || _sdkObject$attributio3 === void 0
|
|
318
|
+
(_sdkObject$attributio3 = sdkObject.attribution.page) === null || _sdkObject$attributio3 === void 0 || _sdkObject$attributio3.temporarilyDisableTracingScreencastThrottling();
|
|
319
319
|
event.afterSnapshot = `after@${metadata.id}`;
|
|
320
320
|
this._appendTraceEvent(event);
|
|
321
321
|
return this._captureSnapshot(event.afterSnapshot, sdkObject, metadata);
|
|
@@ -340,7 +340,6 @@ class Tracing extends _instrumentation.SdkObject {
|
|
|
340
340
|
const visited = visitTraceEvent(event, this._state.networkSha1s);
|
|
341
341
|
this._fs.appendFile(this._state.networkFile, JSON.stringify(visited) + '\n', true /* flush */);
|
|
342
342
|
}
|
|
343
|
-
|
|
344
343
|
flushHarEntries() {
|
|
345
344
|
const harLines = [];
|
|
346
345
|
for (const entry of this._pendingHarEntries) {
|
|
@@ -354,7 +353,6 @@ class Tracing extends _instrumentation.SdkObject {
|
|
|
354
353
|
this._pendingHarEntries.clear();
|
|
355
354
|
if (harLines.length) this._fs.appendFile(this._state.networkFile, harLines.join('\n') + '\n', true /* flush */);
|
|
356
355
|
}
|
|
357
|
-
|
|
358
356
|
onContentBlob(sha1, buffer) {
|
|
359
357
|
this._appendResource(sha1, buffer);
|
|
360
358
|
}
|
|
@@ -81,7 +81,7 @@ class InMemorySnapshotter {
|
|
|
81
81
|
var _this$_snapshotReadyP;
|
|
82
82
|
++this._snapshotCount;
|
|
83
83
|
const renderer = this._storage.addFrameSnapshot(snapshot);
|
|
84
|
-
(_this$_snapshotReadyP = this._snapshotReadyPromises.get(snapshot.snapshotName || '')) === null || _this$_snapshotReadyP === void 0
|
|
84
|
+
(_this$_snapshotReadyP = this._snapshotReadyPromises.get(snapshot.snapshotName || '')) === null || _this$_snapshotReadyP === void 0 || _this$_snapshotReadyP.resolve(renderer);
|
|
85
85
|
}
|
|
86
86
|
async resourceContentForTest(sha1) {
|
|
87
87
|
return this._blobs.get(sha1);
|
|
@@ -195,7 +195,7 @@ class StdinServer {
|
|
|
195
195
|
var _this$sendEvent;
|
|
196
196
|
this._traceUrl = url;
|
|
197
197
|
clearTimeout(this._pollTimer);
|
|
198
|
-
(_this$sendEvent = this.sendEvent) === null || _this$sendEvent === void 0
|
|
198
|
+
(_this$sendEvent = this.sendEvent) === null || _this$sendEvent === void 0 || _this$sendEvent.call(this, 'loadTrace', {
|
|
199
199
|
url
|
|
200
200
|
});
|
|
201
201
|
}
|
package/lib/server/transport.js
CHANGED
|
@@ -42,21 +42,21 @@ class WebSocketTransport {
|
|
|
42
42
|
}
|
|
43
43
|
static async _connect(progress, url, headers, redirect, debugLogHeader) {
|
|
44
44
|
const logUrl = stripQueryParams(url);
|
|
45
|
-
progress === null || progress === void 0
|
|
45
|
+
progress === null || progress === void 0 || progress.log(`<ws connecting> ${logUrl}`);
|
|
46
46
|
const transport = new WebSocketTransport(progress, url, logUrl, headers, redirect.follow && redirect.hadRedirects, debugLogHeader);
|
|
47
47
|
let success = false;
|
|
48
|
-
progress === null || progress === void 0
|
|
48
|
+
progress === null || progress === void 0 || progress.cleanupWhenAborted(async () => {
|
|
49
49
|
if (!success) await transport.closeAndWait().catch(e => null);
|
|
50
50
|
});
|
|
51
51
|
const result = await new Promise((fulfill, reject) => {
|
|
52
52
|
transport._ws.on('open', async () => {
|
|
53
|
-
progress === null || progress === void 0
|
|
53
|
+
progress === null || progress === void 0 || progress.log(`<ws connected> ${logUrl}`);
|
|
54
54
|
fulfill({
|
|
55
55
|
transport
|
|
56
56
|
});
|
|
57
57
|
});
|
|
58
58
|
transport._ws.on('error', event => {
|
|
59
|
-
progress === null || progress === void 0
|
|
59
|
+
progress === null || progress === void 0 || progress.log(`<ws connect error> ${logUrl} ${event.message}`);
|
|
60
60
|
reject(new Error('WebSocket error: ' + event.message));
|
|
61
61
|
transport._ws.close();
|
|
62
62
|
});
|
|
@@ -69,14 +69,14 @@ class WebSocketTransport {
|
|
|
69
69
|
return;
|
|
70
70
|
}
|
|
71
71
|
for (let i = 0; i < response.rawHeaders.length; i += 2) {
|
|
72
|
-
if (debugLogHeader && response.rawHeaders[i] === debugLogHeader) progress === null || progress === void 0
|
|
72
|
+
if (debugLogHeader && response.rawHeaders[i] === debugLogHeader) progress === null || progress === void 0 || progress.log(response.rawHeaders[i + 1]);
|
|
73
73
|
}
|
|
74
74
|
const chunks = [];
|
|
75
75
|
const errorPrefix = `${logUrl} ${response.statusCode} ${response.statusMessage}`;
|
|
76
76
|
response.on('data', chunk => chunks.push(chunk));
|
|
77
77
|
response.on('close', () => {
|
|
78
78
|
const error = chunks.length ? `${errorPrefix}\n${Buffer.concat(chunks)}` : errorPrefix;
|
|
79
|
-
progress === null || progress === void 0
|
|
79
|
+
progress === null || progress === void 0 || progress.log(`<ws unexpected response> ${error}`);
|
|
80
80
|
reject(new Error('WebSocket error: ' + error));
|
|
81
81
|
transport._ws.close();
|
|
82
82
|
});
|
|
@@ -120,7 +120,7 @@ class WebSocketTransport {
|
|
|
120
120
|
name: response.rawHeaders[i],
|
|
121
121
|
value: response.rawHeaders[i + 1]
|
|
122
122
|
});
|
|
123
|
-
if (debugLogHeader && response.rawHeaders[i] === debugLogHeader) progress === null || progress === void 0
|
|
123
|
+
if (debugLogHeader && response.rawHeaders[i] === debugLogHeader) progress === null || progress === void 0 || progress.log(response.rawHeaders[i + 1]);
|
|
124
124
|
}
|
|
125
125
|
});
|
|
126
126
|
this._progress = progress;
|
|
@@ -137,7 +137,7 @@ class WebSocketTransport {
|
|
|
137
137
|
parsedJson = JSON.parse(eventData);
|
|
138
138
|
} catch (e) {
|
|
139
139
|
var _this$_progress;
|
|
140
|
-
(_this$_progress = this._progress) === null || _this$_progress === void 0
|
|
140
|
+
(_this$_progress = this._progress) === null || _this$_progress === void 0 || _this$_progress.log(`<closing ws> Closing websocket due to malformed JSON. eventData=${eventData} e=${e === null || e === void 0 ? void 0 : e.message}`);
|
|
141
141
|
this._ws.close();
|
|
142
142
|
return;
|
|
143
143
|
}
|
|
@@ -145,14 +145,14 @@ class WebSocketTransport {
|
|
|
145
145
|
if (this.onmessage) this.onmessage.call(null, parsedJson);
|
|
146
146
|
} catch (e) {
|
|
147
147
|
var _this$_progress2;
|
|
148
|
-
(_this$_progress2 = this._progress) === null || _this$_progress2 === void 0
|
|
148
|
+
(_this$_progress2 = this._progress) === null || _this$_progress2 === void 0 || _this$_progress2.log(`<closing ws> Closing websocket due to failed onmessage callback. eventData=${eventData} e=${e === null || e === void 0 ? void 0 : e.message}`);
|
|
149
149
|
this._ws.close();
|
|
150
150
|
}
|
|
151
151
|
});
|
|
152
152
|
});
|
|
153
153
|
this._ws.addEventListener('close', event => {
|
|
154
154
|
var _this$_progress3;
|
|
155
|
-
(_this$_progress3 = this._progress) === null || _this$_progress3 === void 0
|
|
155
|
+
(_this$_progress3 = this._progress) === null || _this$_progress3 === void 0 || _this$_progress3.log(`<ws disconnected> ${logUrl} code=${event.code} reason=${event.reason}`);
|
|
156
156
|
if (this.onclose) this.onclose.call(null);
|
|
157
157
|
});
|
|
158
158
|
// Prevent Error: read ECONNRESET.
|
|
@@ -166,7 +166,7 @@ class WebSocketTransport {
|
|
|
166
166
|
}
|
|
167
167
|
close() {
|
|
168
168
|
var _this$_progress5;
|
|
169
|
-
(_this$_progress5 = this._progress) === null || _this$_progress5 === void 0
|
|
169
|
+
(_this$_progress5 = this._progress) === null || _this$_progress5 === void 0 || _this$_progress5.log(`<ws disconnecting> ${this._logUrl}`);
|
|
170
170
|
this._ws.close();
|
|
171
171
|
}
|
|
172
172
|
async closeAndWait() {
|
|
@@ -12,8 +12,8 @@ var network = _interopRequireWildcard(require("../network"));
|
|
|
12
12
|
var _wkConnection = require("./wkConnection");
|
|
13
13
|
var _wkPage = require("./wkPage");
|
|
14
14
|
var _errors = require("../errors");
|
|
15
|
-
function _getRequireWildcardCache(
|
|
16
|
-
function _interopRequireWildcard(
|
|
15
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
16
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
17
17
|
/**
|
|
18
18
|
* Copyright 2017 Google Inc. All rights reserved.
|
|
19
19
|
* Modifications copyright (c) Microsoft Corporation.
|
|
@@ -120,7 +120,7 @@ class WKBrowser extends _browser.Browser {
|
|
|
120
120
|
}
|
|
121
121
|
_onScreencastFinished(payload) {
|
|
122
122
|
var _this$_takeVideo;
|
|
123
|
-
(_this$_takeVideo = this._takeVideo(payload.screencastId)) === null || _this$_takeVideo === void 0
|
|
123
|
+
(_this$_takeVideo = this._takeVideo(payload.screencastId)) === null || _this$_takeVideo === void 0 || _this$_takeVideo.reportFinished();
|
|
124
124
|
}
|
|
125
125
|
_onPageProxyCreated(event) {
|
|
126
126
|
const pageProxyId = event.pageProxyId;
|
|
@@ -7,8 +7,8 @@ exports.WKExecutionContext = void 0;
|
|
|
7
7
|
var js = _interopRequireWildcard(require("../javascript"));
|
|
8
8
|
var _utilityScriptSerializers = require("../isomorphic/utilityScriptSerializers");
|
|
9
9
|
var _protocolError = require("../protocolError");
|
|
10
|
-
function _getRequireWildcardCache(
|
|
11
|
-
function _interopRequireWildcard(
|
|
10
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
11
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
12
12
|
/**
|
|
13
13
|
* Copyright 2017 Google Inc. All rights reserved.
|
|
14
14
|
* Modifications copyright (c) Microsoft Corporation.
|