@browserless.io/browserless 2.2.0-beta-8 → 2.2.0
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/CHANGELOG.md +21 -2
- package/bin/browserless.js +1 -1
- package/bin/scaffold/README.md +8 -7
- package/build/browserless.js +7 -6
- package/build/browsers/chrome.cdp.d.ts +6 -0
- package/build/browsers/chrome.cdp.js +6 -0
- package/build/browsers/chrome.playwright.d.ts +6 -0
- package/build/browsers/chrome.playwright.js +6 -0
- package/build/browsers/{cdp-chromium.d.ts → chromium.cdp.d.ts} +3 -2
- package/build/browsers/{cdp-chromium.js → chromium.cdp.js} +16 -10
- package/build/browsers/{playwright-chromium.d.ts → chromium.playwright.d.ts} +3 -2
- package/build/browsers/{playwright-chromium.js → chromium.playwright.js} +6 -5
- package/build/browsers/{playwright-firefox.d.ts → firefox.playwright.d.ts} +2 -2
- package/build/browsers/{playwright-firefox.js → firefox.playwright.js} +4 -4
- package/build/browsers/index.d.ts +20 -10
- package/build/browsers/index.js +110 -11
- package/build/browsers/{playwright-webkit.d.ts → webkit.playwright.d.ts} +2 -2
- package/build/browsers/{playwright-webkit.js → webkit.playwright.js} +4 -4
- package/build/data/selectors.json +1 -1
- package/build/exports.d.ts +6 -4
- package/build/exports.js +6 -4
- package/build/hooks.d.ts +4 -5
- package/build/hooks.js +4 -6
- package/build/http.d.ts +22 -1
- package/build/http.js +21 -0
- package/build/router.js +19 -3
- package/build/routes/{chromium/http/content-post.body.json → chrome/http/content.post.body.json} +8 -8
- package/build/routes/chrome/http/content.post.d.ts +7 -0
- package/build/routes/chrome/http/content.post.js +6 -0
- package/build/routes/chrome/http/download.post.d.ts +7 -0
- package/build/routes/chrome/http/download.post.js +6 -0
- package/build/routes/chrome/http/function.post.d.ts +7 -0
- package/build/routes/chrome/http/function.post.js +6 -0
- package/build/routes/chrome/http/json-list.get.d.ts +1 -0
- package/build/routes/chrome/http/json-list.get.js +1 -0
- package/build/routes/chrome/http/json-new.put.d.ts +1 -0
- package/build/routes/chrome/http/json-new.put.js +1 -0
- package/build/routes/chrome/http/json-protocol.get.d.ts +1 -0
- package/build/routes/chrome/http/json-protocol.get.js +1 -0
- package/build/routes/chrome/http/json-version.get.d.ts +1 -0
- package/build/routes/chrome/http/json-version.get.js +1 -0
- package/build/routes/chrome/http/json-version.get.response.json +44 -0
- package/build/routes/{chromium/http/pdf-post.body.json → chrome/http/pdf.post.body.json} +8 -8
- package/build/routes/chrome/http/pdf.post.d.ts +7 -0
- package/build/routes/chrome/http/pdf.post.js +6 -0
- package/build/routes/chrome/http/performance.post.d.ts +7 -0
- package/build/routes/chrome/http/performance.post.js +6 -0
- package/build/routes/{chromium/http/scrape-post.body.json → chrome/http/scrape.post.body.json} +8 -8
- package/build/routes/chrome/http/scrape.post.d.ts +7 -0
- package/build/routes/chrome/http/scrape.post.js +6 -0
- package/build/routes/{chromium/http/screenshot-post.body.json → chrome/http/screenshot.post.body.json} +8 -8
- package/build/routes/chrome/http/screenshot.post.d.ts +7 -0
- package/build/routes/chrome/http/screenshot.post.js +6 -0
- package/build/routes/chrome/tests/content.spec.js +311 -0
- package/build/routes/chrome/tests/download.spec.js +67 -0
- package/build/routes/chrome/tests/function.spec.d.ts +1 -0
- package/build/routes/chrome/tests/function.spec.js +245 -0
- package/build/routes/chrome/tests/json-version.spec.d.ts +1 -0
- package/build/routes/chrome/tests/json-version.spec.js +37 -0
- package/build/routes/chrome/tests/page-websocket.spec.d.ts +1 -0
- package/build/routes/chrome/tests/page-websocket.spec.js +97 -0
- package/build/routes/chrome/tests/pdf.spec.d.ts +1 -0
- package/build/routes/chrome/tests/pdf.spec.js +333 -0
- package/build/routes/chrome/tests/performance.spec.d.ts +1 -0
- package/build/routes/chrome/tests/performance.spec.js +124 -0
- package/build/routes/chrome/tests/scrape.spec.d.ts +1 -0
- package/build/routes/chrome/tests/scrape.spec.js +354 -0
- package/build/routes/chrome/tests/screenshot.spec.d.ts +1 -0
- package/build/routes/chrome/tests/screenshot.spec.js +339 -0
- package/build/routes/chrome/tests/websocket.spec.d.ts +1 -0
- package/build/routes/chrome/tests/websocket.spec.js +371 -0
- package/build/routes/chrome/ws/browser.d.ts +6 -0
- package/build/routes/chrome/ws/browser.js +5 -0
- package/build/routes/chrome/ws/cdp.d.ts +7 -0
- package/build/routes/chrome/ws/cdp.js +6 -0
- package/build/routes/chrome/ws/cdp.query.json +120 -0
- package/build/routes/chrome/ws/page.d.ts +6 -0
- package/build/routes/chrome/ws/page.js +5 -0
- package/build/routes/chrome/ws/page.query.json +120 -0
- package/build/routes/chrome/ws/playwright.d.ts +7 -0
- package/build/routes/chrome/ws/playwright.js +6 -0
- package/build/routes/chromium/http/content.post.body.json +510 -0
- package/build/routes/chromium/http/content.post.d.ts +1 -0
- package/build/routes/chromium/http/content.post.js +1 -0
- package/build/routes/chromium/http/content.post.query.json +183 -0
- package/build/routes/chromium/http/content.post.response.json +5 -0
- package/build/routes/chromium/http/download.post.body.json +32 -0
- package/build/routes/chromium/http/download.post.d.ts +1 -0
- package/build/routes/chromium/http/download.post.js +1 -0
- package/build/routes/chromium/http/download.post.query.json +120 -0
- package/build/routes/chromium/http/download.post.response.json +4 -0
- package/build/routes/chromium/http/function.post.body.json +32 -0
- package/build/routes/chromium/http/function.post.d.ts +1 -0
- package/build/routes/chromium/http/function.post.js +1 -0
- package/build/routes/chromium/http/function.post.query.json +120 -0
- package/build/routes/chromium/http/function.post.response.json +4 -0
- package/build/routes/chromium/http/json-list.get.d.ts +1 -0
- package/build/routes/chromium/http/json-list.get.js +1 -0
- package/build/routes/chromium/http/json-list.get.response.json +52 -0
- package/build/routes/chromium/http/json-new.put.d.ts +1 -0
- package/build/routes/chromium/http/json-new.put.js +1 -0
- package/build/routes/chromium/http/json-new.put.response.json +44 -0
- package/build/routes/chromium/http/json-protocol.get.d.ts +1 -0
- package/build/routes/chromium/http/json-protocol.get.js +1 -0
- package/build/routes/chromium/http/json-protocol.get.response.json +6 -0
- package/build/routes/chromium/http/json-version.get.d.ts +1 -0
- package/build/routes/chromium/http/json-version.get.js +1 -0
- package/build/routes/chromium/http/json-version.get.response.json +44 -0
- package/build/routes/chromium/http/pdf.post.body.json +654 -0
- package/build/routes/chromium/http/pdf.post.d.ts +1 -0
- package/build/routes/chromium/http/pdf.post.js +1 -0
- package/build/routes/chromium/http/pdf.post.query.json +120 -0
- package/build/routes/chromium/http/pdf.post.response.json +5 -0
- package/build/routes/chromium/http/performance.post.body.json +26 -0
- package/build/routes/chromium/http/performance.post.d.ts +1 -0
- package/build/routes/chromium/http/performance.post.js +1 -0
- package/build/routes/chromium/http/performance.post.query.json +120 -0
- package/build/routes/chromium/http/performance.post.response.json +7 -0
- package/build/routes/chromium/http/scrape.post.body.json +557 -0
- package/build/routes/chromium/http/scrape.post.d.ts +1 -0
- package/build/routes/chromium/http/scrape.post.js +1 -0
- package/build/routes/chromium/http/scrape.post.query.json +183 -0
- package/build/routes/chromium/http/scrape.post.response.json +309 -0
- package/build/routes/chromium/http/screenshot.post.body.json +600 -0
- package/build/routes/chromium/http/screenshot.post.d.ts +1 -0
- package/build/routes/chromium/http/screenshot.post.js +1 -0
- package/build/routes/chromium/http/screenshot.post.query.json +120 -0
- package/build/routes/chromium/http/screenshot.post.response.json +5 -0
- package/build/routes/chromium/tests/content.spec.js +16 -16
- package/build/routes/chromium/tests/download.spec.js +3 -3
- package/build/routes/chromium/tests/function.spec.js +10 -10
- package/build/routes/chromium/tests/page-websocket.spec.d.ts +1 -0
- package/build/routes/chromium/tests/page-websocket.spec.js +97 -0
- package/build/routes/chromium/tests/pdf.spec.js +16 -16
- package/build/routes/chromium/tests/performance.spec.js +7 -7
- package/build/routes/chromium/tests/scrape.spec.js +15 -15
- package/build/routes/chromium/tests/screenshot.spec.js +17 -17
- package/build/routes/chromium/tests/websocket.spec.js +31 -37
- package/build/routes/chromium/ws/browser.d.ts +1 -16
- package/build/routes/chromium/ws/browser.js +1 -10
- package/build/routes/chromium/ws/cdp.d.ts +1 -0
- package/build/routes/chromium/ws/cdp.js +1 -0
- package/build/routes/chromium/ws/cdp.query.json +120 -0
- package/build/routes/chromium/ws/page.d.ts +1 -16
- package/build/routes/chromium/ws/page.js +1 -10
- package/build/routes/chromium/ws/playwright.d.ts +1 -0
- package/build/routes/chromium/ws/playwright.js +1 -0
- package/build/routes/firefox/ws/{playwright-firefox.d.ts → playwright.d.ts} +5 -5
- package/build/routes/firefox/ws/{playwright-firefox.js → playwright.js} +4 -4
- package/build/routes/management/http/{sessions-get.response.json → sessions.get.response.json} +11 -1
- package/build/routes/management/http/{static-get.js → static.get.js} +2 -2
- package/build/routes/webkit/ws/{playwright-webkit.d.ts → playwright.d.ts} +5 -5
- package/build/routes/webkit/ws/{playwright-webkit.js → playwright.js} +4 -4
- package/build/routes/webkit/ws/playwright.query.json +100 -0
- package/build/{routes/chromium/ws/cdp-chromium.d.ts → shared/browser.ws.d.ts} +4 -4
- package/build/shared/browser.ws.js +12 -0
- package/build/{routes/chromium/ws/playwright-chromium.d.ts → shared/chromium.playwright.ws.d.ts} +4 -4
- package/build/{routes/chromium/ws/playwright-chromium.js → shared/chromium.playwright.ws.js} +6 -3
- package/build/shared/chromium.ws.d.ts +16 -0
- package/build/shared/chromium.ws.js +10 -0
- package/build/{routes/chromium/http/content-post.d.ts → shared/content.http.d.ts} +3 -3
- package/build/{routes/chromium/http/content-post.js → shared/content.http.js} +3 -3
- package/build/{routes/chromium/http/download-post.d.ts → shared/download.http.d.ts} +3 -3
- package/build/{routes/chromium/http/download-post.js → shared/download.http.js} +4 -4
- package/build/{routes/chromium/http/function-post.d.ts → shared/function.http.d.ts} +3 -3
- package/build/{routes/chromium/http/function-post.js → shared/function.http.js} +4 -4
- package/build/{routes/chromium/http/json-new.d.ts → shared/json-list.http.d.ts} +2 -3
- package/build/{routes/chromium/http/json-list.js → shared/json-list.http.js} +5 -8
- package/build/{routes/chromium/http/json-list.d.ts → shared/json-new.http.d.ts} +2 -3
- package/build/shared/json-new.http.js +34 -0
- package/build/{routes/chromium/http/json-protocol-get.js → shared/json-protocol.http.js} +2 -2
- package/build/{routes/chromium/http/json-version-get.js → shared/json-version.http.js} +3 -3
- package/build/shared/page.ws.d.ts +16 -0
- package/build/shared/page.ws.js +13 -0
- package/build/{routes/chromium/http/pdf-post.d.ts → shared/pdf.http.d.ts} +3 -3
- package/build/{routes/chromium/http/pdf-post.js → shared/pdf.http.js} +3 -3
- package/build/{routes/chromium/http/performance.d.ts → shared/performance.http.d.ts} +3 -3
- package/build/{routes/chromium/http/performance.js → shared/performance.http.js} +4 -4
- package/build/{routes/chromium/http/scrape-post.d.ts → shared/scrape.http.d.ts} +3 -3
- package/build/{routes/chromium/http/scrape-post.js → shared/scrape.http.js} +3 -3
- package/build/{routes/chromium/http/screenshot-post.d.ts → shared/screenshot.http.d.ts} +3 -3
- package/build/{routes/chromium/http/screenshot-post.js → shared/screenshot.http.js} +3 -3
- package/build/shared/utils/performance/child.d.ts +1 -0
- package/build/{routes/chromium → shared}/utils/performance/main.js +1 -1
- package/build/shared/utils/performance/types.js +1 -0
- package/build/shim.js +2 -1
- package/build/types.d.ts +10 -8
- package/build/utils.d.ts +8 -3
- package/build/utils.js +24 -11
- package/docker/base/Dockerfile +1 -1
- package/docker/chrome/Dockerfile +4 -4
- package/docker/chromium/.dockerignore +16 -0
- package/docker/chromium/Dockerfile +40 -0
- package/docker/firefox/Dockerfile +1 -1
- package/docker/multi/Dockerfile +13 -1
- package/docker/webkit/Dockerfile +1 -1
- package/extensions/ublock/3p-filters.html +1 -1
- package/extensions/ublock/_locales/ar/messages.json +4 -0
- package/extensions/ublock/_locales/az/messages.json +4 -0
- package/extensions/ublock/_locales/be/messages.json +4 -0
- package/extensions/ublock/_locales/bg/messages.json +5 -1
- package/extensions/ublock/_locales/bn/messages.json +4 -0
- package/extensions/ublock/_locales/br_FR/messages.json +6 -2
- package/extensions/ublock/_locales/bs/messages.json +4 -0
- package/extensions/ublock/_locales/ca/messages.json +4 -0
- package/extensions/ublock/_locales/cs/messages.json +4 -0
- package/extensions/ublock/_locales/cv/messages.json +4 -0
- package/extensions/ublock/_locales/cy/messages.json +1294 -0
- package/extensions/ublock/_locales/da/messages.json +4 -0
- package/extensions/ublock/_locales/de/messages.json +5 -1
- package/extensions/ublock/_locales/el/messages.json +4 -0
- package/extensions/ublock/_locales/en/messages.json +4 -0
- package/extensions/ublock/_locales/en_GB/messages.json +4 -0
- package/extensions/ublock/_locales/eo/messages.json +9 -5
- package/extensions/ublock/_locales/es/messages.json +4 -0
- package/extensions/ublock/_locales/et/messages.json +4 -0
- package/extensions/ublock/_locales/eu/messages.json +8 -4
- package/extensions/ublock/_locales/fa/messages.json +4 -0
- package/extensions/ublock/_locales/fi/messages.json +4 -0
- package/extensions/ublock/_locales/fil/messages.json +4 -0
- package/extensions/ublock/_locales/fr/messages.json +4 -0
- package/extensions/ublock/_locales/fy/messages.json +4 -0
- package/extensions/ublock/_locales/gl/messages.json +4 -0
- package/extensions/ublock/_locales/gu/messages.json +4 -0
- package/extensions/ublock/_locales/he/messages.json +4 -0
- package/extensions/ublock/_locales/hi/messages.json +4 -0
- package/extensions/ublock/_locales/hr/messages.json +4 -0
- package/extensions/ublock/_locales/hu/messages.json +4 -0
- package/extensions/ublock/_locales/hy/messages.json +4 -0
- package/extensions/ublock/_locales/id/messages.json +5 -1
- package/extensions/ublock/_locales/it/messages.json +4 -0
- package/extensions/ublock/_locales/ja/messages.json +4 -0
- package/extensions/ublock/_locales/ka/messages.json +34 -30
- package/extensions/ublock/_locales/kk/messages.json +4 -0
- package/extensions/ublock/_locales/kn/messages.json +4 -0
- package/extensions/ublock/_locales/ko/messages.json +4 -0
- package/extensions/ublock/_locales/ku/messages.json +4 -0
- package/extensions/ublock/_locales/lt/messages.json +4 -0
- package/extensions/ublock/_locales/lv/messages.json +4 -0
- package/extensions/ublock/_locales/mk/messages.json +4 -0
- package/extensions/ublock/_locales/ml/messages.json +4 -0
- package/extensions/ublock/_locales/mr/messages.json +4 -0
- package/extensions/ublock/_locales/ms/messages.json +13 -9
- package/extensions/ublock/_locales/nb/messages.json +4 -0
- package/extensions/ublock/_locales/nl/messages.json +4 -0
- package/extensions/ublock/_locales/no/messages.json +4 -0
- package/extensions/ublock/_locales/oc/messages.json +4 -0
- package/extensions/ublock/_locales/pa/messages.json +4 -0
- package/extensions/ublock/_locales/pl/messages.json +5 -1
- package/extensions/ublock/_locales/pt_BR/messages.json +4 -0
- package/extensions/ublock/_locales/pt_PT/messages.json +4 -0
- package/extensions/ublock/_locales/ro/messages.json +5 -1
- package/extensions/ublock/_locales/ru/messages.json +4 -0
- package/extensions/ublock/_locales/si/messages.json +4 -0
- package/extensions/ublock/_locales/sk/messages.json +4 -0
- package/extensions/ublock/_locales/sl/messages.json +4 -0
- package/extensions/ublock/_locales/so/messages.json +4 -0
- package/extensions/ublock/_locales/sq/messages.json +4 -0
- package/extensions/ublock/_locales/sr/messages.json +4 -0
- package/extensions/ublock/_locales/sv/messages.json +4 -0
- package/extensions/ublock/_locales/sw/messages.json +4 -0
- package/extensions/ublock/_locales/ta/messages.json +4 -0
- package/extensions/ublock/_locales/te/messages.json +4 -0
- package/extensions/ublock/_locales/th/messages.json +12 -8
- package/extensions/ublock/_locales/tr/messages.json +4 -0
- package/extensions/ublock/_locales/uk/messages.json +4 -0
- package/extensions/ublock/_locales/ur/messages.json +4 -0
- package/extensions/ublock/_locales/vi/messages.json +4 -0
- package/extensions/ublock/_locales/zh_CN/messages.json +6 -2
- package/extensions/ublock/_locales/zh_TW/messages.json +6 -2
- package/extensions/ublock/assets/assets.json +11 -11
- package/extensions/ublock/assets/resources/scriptlets.js +660 -378
- package/extensions/ublock/assets/thirdparties/easylist/easylist.txt +7173 -3455
- package/extensions/ublock/assets/thirdparties/easylist/easyprivacy.txt +18829 -1918
- package/extensions/ublock/assets/thirdparties/pgl.yoyo.org/as/serverlist +21 -26
- package/extensions/ublock/assets/thirdparties/publicsuffix.org/list/effective_tld_names.dat +118 -46
- package/extensions/ublock/assets/thirdparties/urlhaus-filter/urlhaus-filter-online.txt +710 -1117
- package/extensions/ublock/assets/ublock/badlists.txt +0 -4
- package/extensions/ublock/assets/ublock/badware.min.txt +116 -105
- package/extensions/ublock/assets/ublock/filters.min.txt +1443 -1097
- package/extensions/ublock/assets/ublock/privacy.min.txt +50 -31
- package/extensions/ublock/assets/ublock/quick-fixes.min.txt +97 -108
- package/extensions/ublock/assets/ublock/unbreak.min.txt +64 -21
- package/extensions/ublock/css/1p-filters.css +4 -0
- package/extensions/ublock/css/3p-filters.css +6 -4
- package/extensions/ublock/css/common.css +1 -1
- package/extensions/ublock/css/fa-icons.css +1 -0
- package/extensions/ublock/css/logger-ui.css +72 -52
- package/extensions/ublock/css/popup-fenix.css +1 -1
- package/extensions/ublock/img/fontawesome/fontawesome-defs.svg +1 -0
- package/extensions/ublock/js/3p-filters.js +3 -3
- package/extensions/ublock/js/assets.js +7 -4
- package/extensions/ublock/js/background.js +1 -3
- package/extensions/ublock/js/benchmarks.js +1 -0
- package/extensions/ublock/js/broadcast.js +12 -0
- package/extensions/ublock/js/click2load.js +2 -3
- package/extensions/ublock/js/codemirror/ubo-static-filtering.js +1 -0
- package/extensions/ublock/js/commands.js +10 -0
- package/extensions/ublock/js/contentscript-extra.js +13 -11
- package/extensions/ublock/js/contentscript.js +0 -31
- package/extensions/ublock/js/contextmenu.js +5 -1
- package/extensions/ublock/js/dyna-rules.js +83 -52
- package/extensions/ublock/js/fa-icons.js +1 -0
- package/extensions/ublock/js/filtering-context.js +0 -2
- package/extensions/ublock/js/i18n.js +1 -5
- package/extensions/ublock/js/logger-ui.js +71 -38
- package/extensions/ublock/js/logger.js +18 -14
- package/extensions/ublock/js/messaging.js +17 -5
- package/extensions/ublock/js/popup-fenix.js +6 -6
- package/extensions/ublock/js/scriptlet-filtering-core.js +14 -12
- package/extensions/ublock/js/scriptlet-filtering.js +149 -53
- package/extensions/ublock/js/scriptlets/scriptlet-loglevel-1.js +49 -0
- package/extensions/ublock/js/scriptlets/scriptlet-loglevel-2.js +49 -0
- package/extensions/ublock/js/scriptlets/should-inject-contentscript.js +1 -1
- package/extensions/ublock/js/static-dnr-filtering.js +4 -2
- package/extensions/ublock/js/static-filtering-parser.js +14 -8
- package/extensions/ublock/js/static-net-filtering.js +32 -30
- package/extensions/ublock/js/storage.js +18 -4
- package/extensions/ublock/js/traffic.js +3 -3
- package/extensions/ublock/js/ublock.js +1 -1
- package/extensions/ublock/js/vapi-background.js +15 -7
- package/extensions/ublock/logger-ui.html +18 -10
- package/extensions/ublock/manifest.json +4 -1
- package/extensions/ublock/web_accessible_resources/chartbeat.js +3 -0
- package/package.json +12 -11
- package/scripts/build-function.js +1 -1
- package/scripts/build-open-api.js +3 -2
- package/scripts/clean.js +6 -1
- package/scripts/install-debugger.js +20 -0
- package/scripts/install-devtools.js +40 -0
- package/src/browserless.ts +11 -9
- package/src/browsers/chrome.cdp.ts +10 -0
- package/src/browsers/chrome.playwright.ts +10 -0
- package/src/browsers/{cdp-chromium.ts → chromium.cdp.ts} +20 -13
- package/src/browsers/{playwright-chromium.ts → chromium.playwright.ts} +7 -6
- package/src/browsers/{playwright-firefox.ts → firefox.playwright.ts} +5 -5
- package/src/browsers/index.ts +160 -23
- package/src/browsers/{playwright-webkit.ts → webkit.playwright.ts} +5 -5
- package/src/exports.ts +6 -4
- package/src/hooks.ts +4 -12
- package/src/http.ts +21 -0
- package/src/router.ts +21 -5
- package/src/routes/chrome/http/content.post.ts +14 -0
- package/src/routes/chrome/http/download.post.ts +14 -0
- package/src/routes/chrome/http/function.post.ts +14 -0
- package/src/routes/chrome/http/json-list.get.ts +1 -0
- package/src/routes/chrome/http/json-new.put.ts +1 -0
- package/src/routes/chrome/http/json-protocol.get.ts +1 -0
- package/src/routes/chrome/http/json-version.get.ts +1 -0
- package/src/routes/chrome/http/pdf.post.ts +14 -0
- package/src/routes/chrome/http/performance.post.ts +14 -0
- package/src/routes/chrome/http/scrape.post.ts +14 -0
- package/src/routes/chrome/http/screenshot.post.ts +14 -0
- package/src/routes/chrome/tests/content.spec.ts +375 -0
- package/src/routes/chrome/tests/download.spec.ts +77 -0
- package/src/routes/chrome/tests/function.spec.ts +282 -0
- package/src/routes/chrome/tests/json-version.spec.ts +52 -0
- package/src/routes/chrome/tests/page-websocket.spec.ts +129 -0
- package/src/routes/chrome/tests/pdf.spec.ts +380 -0
- package/src/routes/chrome/tests/performance.spec.ts +155 -0
- package/src/routes/chrome/tests/scrape.spec.ts +417 -0
- package/src/routes/chrome/tests/screenshot.spec.ts +387 -0
- package/src/routes/chrome/tests/websocket.spec.ts +491 -0
- package/src/routes/chrome/ws/browser.ts +8 -0
- package/src/routes/chrome/ws/cdp.ts +12 -0
- package/src/routes/chrome/ws/page.ts +8 -0
- package/src/routes/chrome/ws/playwright.ts +12 -0
- package/src/routes/chromium/http/content.post.ts +6 -0
- package/src/routes/chromium/http/download.post.ts +6 -0
- package/src/routes/chromium/http/function.post.ts +6 -0
- package/src/routes/chromium/http/json-list.get.ts +1 -0
- package/src/routes/chromium/http/json-new.put.ts +1 -0
- package/src/routes/chromium/http/json-protocol.get.ts +1 -0
- package/src/routes/chromium/http/json-version.get.ts +1 -0
- package/src/routes/chromium/http/pdf.post.ts +6 -0
- package/src/routes/chromium/http/performance.post.ts +6 -0
- package/src/routes/chromium/http/scrape.post.ts +6 -0
- package/src/routes/chromium/http/screenshot.post.ts +6 -0
- package/src/routes/chromium/tests/content.spec.ts +36 -28
- package/src/routes/chromium/tests/download.spec.ts +3 -3
- package/src/routes/chromium/tests/function.spec.ts +18 -15
- package/src/routes/chromium/tests/page-websocket.spec.ts +129 -0
- package/src/routes/chromium/tests/pdf.spec.ts +31 -26
- package/src/routes/chromium/tests/performance.spec.ts +46 -34
- package/src/routes/chromium/tests/scrape.spec.ts +23 -20
- package/src/routes/chromium/tests/screenshot.spec.ts +24 -24
- package/src/routes/chromium/tests/websocket.spec.ts +31 -40
- package/src/routes/chromium/ws/browser.ts +1 -29
- package/src/routes/chromium/ws/cdp.ts +1 -0
- package/src/routes/chromium/ws/page.ts +1 -29
- package/src/routes/chromium/ws/playwright.ts +4 -0
- package/src/routes/firefox/ws/{playwright-firefox.ts → playwright.ts} +5 -5
- package/src/routes/management/http/{static-get.ts → static.get.ts} +2 -2
- package/src/routes/webkit/ws/{playwright-webkit.ts → playwright.ts} +5 -5
- package/src/shared/browser.ws.ts +34 -0
- package/src/{routes/chromium/ws/playwright-chromium.ts → shared/chromium.playwright.ws.ts} +7 -4
- package/src/{routes/chromium/ws/cdp-chromium.ts → shared/chromium.ws.ts} +6 -6
- package/src/{routes/chromium/http/content-post.ts → shared/content.http.ts} +4 -4
- package/src/{routes/chromium/http/download-post.ts → shared/download.http.ts} +4 -4
- package/src/{routes/chromium/http/function-post.ts → shared/function.http.ts} +4 -4
- package/src/shared/json-list.http.ts +35 -0
- package/src/{routes/chromium/http/json-new.ts → shared/json-new.http.ts} +23 -7
- package/src/{routes/chromium/http/json-protocol-get.ts → shared/json-protocol.http.ts} +3 -5
- package/src/{routes/chromium/http/json-version-get.ts → shared/json-version.http.ts} +4 -5
- package/src/shared/page.ws.ts +35 -0
- package/src/{routes/chromium/http/pdf-post.ts → shared/pdf.http.ts} +4 -4
- package/src/{routes/chromium/http/performance.ts → shared/performance.http.ts} +4 -4
- package/src/{routes/chromium/http/scrape-post.ts → shared/scrape.http.ts} +4 -4
- package/src/{routes/chromium/http/screenshot-post.ts → shared/screenshot.http.ts} +4 -4
- package/src/{routes/chromium → shared}/utils/function/handler.ts +2 -2
- package/src/{routes/chromium → shared}/utils/performance/main.ts +1 -2
- package/src/shim.ts +2 -1
- package/src/types.ts +27 -20
- package/src/utils.ts +32 -14
- package/static/devtools/Images/accelerometer-back.svg +1 -0
- package/static/devtools/Images/accelerometer-bottom.png +0 -0
- package/static/devtools/Images/accelerometer-front.svg +1 -0
- package/static/devtools/Images/accelerometer-left.png +0 -0
- package/static/devtools/Images/accelerometer-right.png +0 -0
- package/static/devtools/Images/accelerometer-top.png +0 -0
- package/static/devtools/Images/baseline-icon.svg +1 -0
- package/static/devtools/Images/breaking_change_icon.svg +1 -0
- package/static/devtools/Images/checkboxCheckmark.svg +1 -0
- package/static/devtools/Images/checker.png +0 -0
- package/static/devtools/Images/chevrons.svg +1 -0
- package/static/devtools/Images/chromeDisabledSelect.png +0 -0
- package/static/devtools/Images/chromeDisabledSelect_2x.png +0 -0
- package/static/devtools/Images/chromeLeft.avif +0 -0
- package/static/devtools/Images/chromeMiddle.avif +0 -0
- package/static/devtools/Images/chromeRight.avif +0 -0
- package/static/devtools/Images/chromeSelect.svg +1 -0
- package/static/devtools/Images/chromeSelectDark.svg +1 -0
- package/static/devtools/Images/cssoverview_icons_2x.avif +0 -0
- package/static/devtools/Images/dropdown_7x6_icon.svg +1 -0
- package/static/devtools/Images/elements_panel_icon.svg +1 -0
- package/static/devtools/Images/errorWave.svg +1 -0
- package/static/devtools/Images/error_icon.svg +1 -0
- package/static/devtools/Images/feedback_thin_16x16_icon.svg +1 -0
- package/static/devtools/Images/flex-align-content-center-icon.svg +1 -0
- package/static/devtools/Images/flex-align-content-end-icon.svg +1 -0
- package/static/devtools/Images/flex-align-content-space-around-icon.svg +1 -0
- package/static/devtools/Images/flex-align-content-space-between-icon.svg +1 -0
- package/static/devtools/Images/flex-align-content-space-evenly-icon.svg +1 -0
- package/static/devtools/Images/flex-align-content-start-icon.svg +1 -0
- package/static/devtools/Images/flex-align-content-stretch-icon.svg +1 -0
- package/static/devtools/Images/flex-align-items-center-icon.svg +1 -0
- package/static/devtools/Images/flex-align-items-flex-end-icon.svg +1 -0
- package/static/devtools/Images/flex-align-items-flex-start-icon.svg +1 -0
- package/static/devtools/Images/flex-align-items-stretch-icon.svg +1 -0
- package/static/devtools/Images/flex-align-self-center-icon.svg +1 -0
- package/static/devtools/Images/flex-align-self-flex-end-icon.svg +1 -0
- package/static/devtools/Images/flex-align-self-flex-start-icon.svg +1 -0
- package/static/devtools/Images/flex-align-self-stretch-icon.svg +1 -0
- package/static/devtools/Images/flex-direction-icon.svg +1 -0
- package/static/devtools/Images/flex-justify-content-center-icon.svg +1 -0
- package/static/devtools/Images/flex-justify-content-flex-end-icon.svg +1 -0
- package/static/devtools/Images/flex-justify-content-flex-start-icon.svg +1 -0
- package/static/devtools/Images/flex-justify-content-space-around-icon.svg +1 -0
- package/static/devtools/Images/flex-justify-content-space-between-icon.svg +1 -0
- package/static/devtools/Images/flex-justify-content-space-evenly-icon.svg +1 -0
- package/static/devtools/Images/ic_checkmark_16x16.svg +3 -0
- package/static/devtools/Images/ic_delete_filter.svg +1 -0
- package/static/devtools/Images/ic_delete_list.svg +1 -0
- package/static/devtools/Images/ic_info_black_18dp.svg +1 -0
- package/static/devtools/Images/ic_page_next_16x16_icon.svg +1 -0
- package/static/devtools/Images/ic_page_prev_16x16_icon.svg +1 -0
- package/static/devtools/Images/ic_redo_16x16_icon.svg +1 -0
- package/static/devtools/Images/ic_show_node_16x16.svg +4 -0
- package/static/devtools/Images/ic_suggest_color.svg +6 -0
- package/static/devtools/Images/ic_undo_16x16_icon.svg +1 -0
- package/static/devtools/Images/ic_warning_black_18dp.svg +1 -0
- package/static/devtools/Images/issue-text-icon.svg +1 -0
- package/static/devtools/Images/largeIcons.svg +1 -0
- package/static/devtools/Images/lighthouse_logo.svg +1 -0
- package/static/devtools/Images/link_icon.svg +1 -0
- package/static/devtools/Images/mediumIcons.svg +1 -0
- package/static/devtools/Images/navigationControls.png +0 -0
- package/static/devtools/Images/navigationControls_2x.png +0 -0
- package/static/devtools/Images/network_panel_icon.svg +1 -0
- package/static/devtools/Images/nodeIcon.avif +0 -0
- package/static/devtools/Images/node_search_icon.svg +1 -0
- package/static/devtools/Images/popoverArrows.png +0 -0
- package/static/devtools/Images/profileGroupIcon.png +0 -0
- package/static/devtools/Images/profileIcon.png +0 -0
- package/static/devtools/Images/profileSmallIcon.png +0 -0
- package/static/devtools/Images/radioDot-dark-theme.png +0 -0
- package/static/devtools/Images/radioDot.png +0 -0
- package/static/devtools/Images/refresh_12x12_icon.svg +1 -0
- package/static/devtools/Images/resizeDiagonal.svg +1 -0
- package/static/devtools/Images/resizeHorizontal.svg +1 -0
- package/static/devtools/Images/resizeVertical.svg +1 -0
- package/static/devtools/Images/resourceCSSIcon.png +0 -0
- package/static/devtools/Images/resourceDocumentIcon.png +0 -0
- package/static/devtools/Images/resourceDocumentIconSmall.png +0 -0
- package/static/devtools/Images/resourceJSIcon.png +0 -0
- package/static/devtools/Images/resourcePlainIcon.png +0 -0
- package/static/devtools/Images/resourcePlainIconSmall.png +0 -0
- package/static/devtools/Images/resourcesTimeGraphIcon.avif +0 -0
- package/static/devtools/Images/searchNext.png +0 -0
- package/static/devtools/Images/searchPrev.png +0 -0
- package/static/devtools/Images/securityIcons.svg +1 -0
- package/static/devtools/Images/settings_14x14_icon.svg +1 -0
- package/static/devtools/Images/smallIcons.svg +1 -0
- package/static/devtools/Images/sources_panel_icon.svg +1 -0
- package/static/devtools/Images/speech.png +0 -0
- package/static/devtools/Images/toolbarResizerVertical.png +0 -0
- package/static/devtools/Images/touchCursor.png +0 -0
- package/static/devtools/Images/touchCursor_2x.png +0 -0
- package/static/devtools/Images/treeoutlineTriangles.svg +1 -0
- package/static/devtools/Images/warning_icon.svg +1 -0
- package/static/devtools/Images/whatsnew.avif +0 -0
- package/static/devtools/Tests.js +1654 -0
- package/static/devtools/accessibility/accessibility-legacy.js +1 -0
- package/static/devtools/accessibility/accessibility-meta.js +1 -0
- package/static/devtools/accessibility/accessibility.js +1 -0
- package/static/devtools/accessibility/accessibility_module.js +1 -0
- package/static/devtools/accessibility_test_runner/accessibility_test_runner.js +77 -0
- package/static/devtools/accessibility_test_runner/accessibility_test_runner_module.js +0 -0
- package/static/devtools/animation/animation-legacy.js +1 -0
- package/static/devtools/animation/animation-meta.js +1 -0
- package/static/devtools/animation/animation.js +1 -0
- package/static/devtools/animation/animation_module.js +1 -0
- package/static/devtools/application_test_runner/AppcacheTestRunner.js +220 -0
- package/static/devtools/application_test_runner/CacheStorageTestRunner.js +286 -0
- package/static/devtools/application_test_runner/IndexedDBTestRunner.js +476 -0
- package/static/devtools/application_test_runner/ResourceTreeTestRunner.js +99 -0
- package/static/devtools/application_test_runner/ResourcesTestRunner.js +167 -0
- package/static/devtools/application_test_runner/ServiceWorkersTestRunner.js +131 -0
- package/static/devtools/application_test_runner/application_test_runner.js +10 -0
- package/static/devtools/application_test_runner/application_test_runner_module.js +0 -0
- package/static/devtools/axe_core_test_runner/axe_core_test_runner.js +174 -0
- package/static/devtools/axe_core_test_runner/axe_core_test_runner_module.js +0 -0
- package/static/devtools/bindings/bindings-legacy.js +1 -0
- package/static/devtools/bindings/bindings.js +1 -0
- package/static/devtools/bindings_test_runner/AutomappingTestRunner.js +130 -0
- package/static/devtools/bindings_test_runner/BindingsTestRunner.js +238 -0
- package/static/devtools/bindings_test_runner/IsolatedFilesystemTestRunner.js +287 -0
- package/static/devtools/bindings_test_runner/OverridesTestRunner.js +26 -0
- package/static/devtools/bindings_test_runner/PersistenceTestRunner.js +109 -0
- package/static/devtools/bindings_test_runner/bindings_test_runner.js +9 -0
- package/static/devtools/bindings_test_runner/bindings_test_runner_module.js +0 -0
- package/static/devtools/browser_debugger/browser_debugger-legacy.js +1 -0
- package/static/devtools/browser_debugger/browser_debugger-meta.js +1 -0
- package/static/devtools/browser_debugger/browser_debugger.js +1 -0
- package/static/devtools/browser_debugger/browser_debugger_module.js +1 -0
- package/static/devtools/browser_sdk/browser_sdk-meta.js +1 -0
- package/static/devtools/browser_sdk/browser_sdk.js +1 -0
- package/static/devtools/changes/changes-legacy.js +1 -0
- package/static/devtools/changes/changes-meta.js +1 -0
- package/static/devtools/changes/changes.js +1 -0
- package/static/devtools/changes/changes_module.js +1 -0
- package/static/devtools/client_variations/client_variations.js +1 -0
- package/static/devtools/client_variations/client_variations_module.js +0 -0
- package/static/devtools/cm/cm.js +1 -0
- package/static/devtools/cm/cm_module.js +1 -0
- package/static/devtools/cm_headless/cm_headless.js +1 -0
- package/static/devtools/color_picker/color_picker-legacy.js +1 -0
- package/static/devtools/color_picker/color_picker.js +1 -0
- package/static/devtools/color_picker/color_picker_module.js +1 -0
- package/static/devtools/common/common-legacy.js +1 -0
- package/static/devtools/common/common.js +1 -0
- package/static/devtools/component_helpers/component_helpers.js +1 -0
- package/static/devtools/components/components-legacy.js +1 -0
- package/static/devtools/components/components.js +1 -0
- package/static/devtools/console/console-legacy.js +1 -0
- package/static/devtools/console/console-meta.js +1 -0
- package/static/devtools/console/console.js +6 -0
- package/static/devtools/console/console_module.js +1 -0
- package/static/devtools/console_counters/console_counters-legacy.js +1 -0
- package/static/devtools/console_counters/console_counters.js +1 -0
- package/static/devtools/console_test_runner/console_test_runner.js +696 -0
- package/static/devtools/console_test_runner/console_test_runner_module.js +0 -0
- package/static/devtools/cookie_table/cookie_table-legacy.js +1 -0
- package/static/devtools/cookie_table/cookie_table.js +1 -0
- package/static/devtools/cookie_table/cookie_table_module.js +1 -0
- package/static/devtools/coverage/coverage-legacy.js +1 -0
- package/static/devtools/coverage/coverage-meta.js +1 -0
- package/static/devtools/coverage/coverage.js +1 -0
- package/static/devtools/coverage/coverage_module.js +1 -0
- package/static/devtools/coverage_test_runner/coverage_test_runner.js +151 -0
- package/static/devtools/coverage_test_runner/coverage_test_runner_module.js +0 -0
- package/static/devtools/cpu_profiler_test_runner/cpu_profiler_test_runner.js +72 -0
- package/static/devtools/cpu_profiler_test_runner/cpu_profiler_test_runner_module.js +0 -0
- package/static/devtools/css_overview/css_overview-meta.js +1 -0
- package/static/devtools/css_overview/css_overview.js +146 -0
- package/static/devtools/css_overview/css_overview_module.js +1 -0
- package/static/devtools/data_grid/data_grid-legacy.js +1 -0
- package/static/devtools/data_grid/data_grid.js +1 -0
- package/static/devtools/data_grid/data_grid_module.js +1 -0
- package/static/devtools/data_grid_test_runner/data_grid_test_runner.js +78 -0
- package/static/devtools/data_grid_test_runner/data_grid_test_runner_module.js +0 -0
- package/static/devtools/developer_resources/developer_resources-legacy.js +1 -0
- package/static/devtools/developer_resources/developer_resources-meta.js +1 -0
- package/static/devtools/developer_resources/developer_resources.js +1 -0
- package/static/devtools/developer_resources/developer_resources_module.js +1 -0
- package/static/devtools/device_mode_test_runner/device_mode_test_runner.js +45 -0
- package/static/devtools/device_mode_test_runner/device_mode_test_runner_module.js +0 -0
- package/static/devtools/devtools_app.html +20 -0
- package/static/devtools/devtools_app.js +1 -0
- package/static/devtools/devtools_compatibility.js +1546 -0
- package/static/devtools/diff/diff-legacy.js +1 -0
- package/static/devtools/diff/diff.js +1 -0
- package/static/devtools/diff/diff_module.js +0 -0
- package/static/devtools/dom_extension/dom_extension.js +1 -0
- package/static/devtools/elements/elements-legacy.js +1 -0
- package/static/devtools/elements/elements-meta.js +1 -0
- package/static/devtools/elements/elements.js +469 -0
- package/static/devtools/elements/elements_module.js +1 -0
- package/static/devtools/elements_test_runner/EditDOMTestRunner.js +78 -0
- package/static/devtools/elements_test_runner/ElementsPanelShadowSelectionOnRefreshTestRunner.js +39 -0
- package/static/devtools/elements_test_runner/ElementsTestRunner.js +1280 -0
- package/static/devtools/elements_test_runner/SetOuterHTMLTestRunner.js +115 -0
- package/static/devtools/elements_test_runner/StylesUpdateLinksTestRunner.js +134 -0
- package/static/devtools/elements_test_runner/elements_test_runner.js +9 -0
- package/static/devtools/elements_test_runner/elements_test_runner_module.js +0 -0
- package/static/devtools/emulated_devices/emulated_devices_module.js +0 -0
- package/static/devtools/emulated_devices/optimized/MotoG4-landscape.avif +0 -0
- package/static/devtools/emulated_devices/optimized/MotoG4-portrait.avif +0 -0
- package/static/devtools/emulated_devices/optimized/Nexus5X-landscape.avif +0 -0
- package/static/devtools/emulated_devices/optimized/Nexus5X-portrait.avif +0 -0
- package/static/devtools/emulated_devices/optimized/Nexus6P-landscape.avif +0 -0
- package/static/devtools/emulated_devices/optimized/Nexus6P-portrait.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5-horizontal-default-1x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5-horizontal-default-2x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5-horizontal-keyboard-1x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5-horizontal-keyboard-2x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5-horizontal-navigation-1x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5-horizontal-navigation-2x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5-vertical-default-1x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5-vertical-default-2x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5-vertical-keyboard-1x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5-vertical-keyboard-2x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5-vertical-navigation-1x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5-vertical-navigation-2x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5x-horizontal-default-1x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5x-horizontal-default-2x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5x-horizontal-keyboard-1x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5x-horizontal-keyboard-2x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5x-horizontal-navigation-1x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5x-horizontal-navigation-2x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5x-vertical-default-1x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5x-vertical-default-2x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5x-vertical-keyboard-1x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5x-vertical-keyboard-2x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5x-vertical-navigation-1x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5x-vertical-navigation-2x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/iPad-landscape.avif +0 -0
- package/static/devtools/emulated_devices/optimized/iPad-portrait.avif +0 -0
- package/static/devtools/emulated_devices/optimized/iPhone5-landscape.avif +0 -0
- package/static/devtools/emulated_devices/optimized/iPhone5-portrait.avif +0 -0
- package/static/devtools/emulated_devices/optimized/iPhone6-landscape.avif +0 -0
- package/static/devtools/emulated_devices/optimized/iPhone6-portrait.avif +0 -0
- package/static/devtools/emulated_devices/optimized/iPhone6Plus-landscape.avif +0 -0
- package/static/devtools/emulated_devices/optimized/iPhone6Plus-portrait.avif +0 -0
- package/static/devtools/emulation/emulation-legacy.js +1 -0
- package/static/devtools/emulation/emulation-meta.js +1 -0
- package/static/devtools/emulation/emulation.js +1 -0
- package/static/devtools/event_listeners/event_listeners-legacy.js +1 -0
- package/static/devtools/event_listeners/event_listeners.js +1 -0
- package/static/devtools/event_listeners/event_listeners_module.js +1 -0
- package/static/devtools/extensions/extensions-legacy.js +1 -0
- package/static/devtools/extensions/extensions.js +1 -0
- package/static/devtools/extensions_test_runner/ExtensionsNetworkTestRunner.js +27 -0
- package/static/devtools/extensions_test_runner/ExtensionsTestRunner.js +68 -0
- package/static/devtools/extensions_test_runner/extensions_test_runner.js +6 -0
- package/static/devtools/extensions_test_runner/extensions_test_runner_module.js +0 -0
- package/static/devtools/formatter/formatter-legacy.js +1 -0
- package/static/devtools/formatter/formatter.js +1 -0
- package/static/devtools/formatter/formatter_module.js +0 -0
- package/static/devtools/formatter_worker/FormatterActions.js +1 -0
- package/static/devtools/formatter_worker/formatter_worker-entrypoint.js +1 -0
- package/static/devtools/formatter_worker/formatter_worker.js +1 -0
- package/static/devtools/har_importer/har_importer-legacy.js +1 -0
- package/static/devtools/har_importer/har_importer.js +1 -0
- package/static/devtools/har_importer/har_importer_module.js +0 -0
- package/static/devtools/heap_profiler_test_runner/heap_profiler_test_runner.js +740 -0
- package/static/devtools/heap_profiler_test_runner/heap_profiler_test_runner_module.js +0 -0
- package/static/devtools/heap_snapshot_model/heap_snapshot_model-legacy.js +1 -0
- package/static/devtools/heap_snapshot_model/heap_snapshot_model.js +1 -0
- package/static/devtools/heap_snapshot_model/heap_snapshot_model_module.js +0 -0
- package/static/devtools/heap_snapshot_worker/heap_snapshot_worker-entrypoint.js +1 -0
- package/static/devtools/heap_snapshot_worker/heap_snapshot_worker-legacy.js +1 -0
- package/static/devtools/heap_snapshot_worker/heap_snapshot_worker.js +1 -0
- package/static/devtools/heap_snapshot_worker/heap_snapshot_worker_module.js +0 -0
- package/static/devtools/help/help-legacy.js +1 -0
- package/static/devtools/help/help-meta.js +1 -0
- package/static/devtools/help/help.js +1 -0
- package/static/devtools/help/help_module.js +1 -0
- package/static/devtools/host/host-legacy.js +1 -0
- package/static/devtools/host/host.js +1 -0
- package/static/devtools/i18n/i18n.js +1 -0
- package/static/devtools/i18n/i18n_locales-tsconfig.json +8 -0
- package/static/devtools/i18n/locales/en-US.json +3566 -0
- package/static/devtools/inline_editor/inline_editor-legacy.js +1 -0
- package/static/devtools/inline_editor/inline_editor.js +203 -0
- package/static/devtools/inline_editor/inline_editor_module.js +1 -0
- package/static/devtools/input/input-legacy.js +1 -0
- package/static/devtools/input/input-meta.js +1 -0
- package/static/devtools/input/input.js +1 -0
- package/static/devtools/input/input_module.js +1 -0
- package/static/devtools/inspector.html +20 -0
- package/static/devtools/inspector.js +1 -0
- package/static/devtools/inspector_main/inspector_main-legacy.js +1 -0
- package/static/devtools/inspector_main/inspector_main-meta.js +1 -0
- package/static/devtools/inspector_main/inspector_main.js +1 -0
- package/static/devtools/integration_test_runner.html +14 -0
- package/static/devtools/integration_test_runner.js +2 -0
- package/static/devtools/issues/issues-legacy.js +1 -0
- package/static/devtools/issues/issues-meta.js +1 -0
- package/static/devtools/issues/issues.js +67 -0
- package/static/devtools/issues/issues_module.js +1 -0
- package/static/devtools/javascript_metadata/javascript_metadata-legacy.js +1 -0
- package/static/devtools/javascript_metadata/javascript_metadata.js +1 -0
- package/static/devtools/javascript_metadata/javascript_metadata_module.js +0 -0
- package/static/devtools/js_app.html +20 -0
- package/static/devtools/js_app.js +1 -0
- package/static/devtools/js_main/js_main-legacy.js +1 -0
- package/static/devtools/js_main/js_main.js +1 -0
- package/static/devtools/js_profiler/js_profiler-meta.js +1 -0
- package/static/devtools/js_profiler/js_profiler.js +1 -0
- package/static/devtools/js_profiler/js_profiler_module.js +0 -0
- package/static/devtools/layer_viewer/layer_viewer-legacy.js +1 -0
- package/static/devtools/layer_viewer/layer_viewer.js +1 -0
- package/static/devtools/layer_viewer/layer_viewer_module.js +1 -0
- package/static/devtools/layers/layers-legacy.js +1 -0
- package/static/devtools/layers/layers-meta.js +1 -0
- package/static/devtools/layers/layers.js +1 -0
- package/static/devtools/layers/layers_module.js +0 -0
- package/static/devtools/layers_test_runner/layers_test_runner.js +156 -0
- package/static/devtools/layers_test_runner/layers_test_runner_module.js +0 -0
- package/static/devtools/lighthouse/lighthouse-legacy.js +1 -0
- package/static/devtools/lighthouse/lighthouse-meta.js +1 -0
- package/static/devtools/lighthouse/lighthouse.js +70 -0
- package/static/devtools/lighthouse/lighthouse_module.js +1 -0
- package/static/devtools/lighthouse_test_runner/lighthouse_test_runner.js +136 -0
- package/static/devtools/lighthouse_test_runner/lighthouse_test_runner_module.js +0 -0
- package/static/devtools/lighthouse_worker/LighthouseService.js +195 -0
- package/static/devtools/lighthouse_worker/lighthouse_worker.js +6 -0
- package/static/devtools/lighthouse_worker.js +1 -0
- package/static/devtools/linear_memory_inspector/linear_memory_inspector-legacy.js +1 -0
- package/static/devtools/linear_memory_inspector/linear_memory_inspector-meta.js +1 -0
- package/static/devtools/linear_memory_inspector/linear_memory_inspector.js +399 -0
- package/static/devtools/linear_memory_inspector/linear_memory_inspector_module.js +0 -0
- package/static/devtools/main/main-legacy.js +1 -0
- package/static/devtools/main/main.js +1 -0
- package/static/devtools/media/media-legacy.js +1 -0
- package/static/devtools/media/media-meta.js +1 -0
- package/static/devtools/media/media.js +1 -0
- package/static/devtools/media/media_module.js +1 -0
- package/static/devtools/mobile_throttling/mobile_throttling-legacy.js +1 -0
- package/static/devtools/mobile_throttling/mobile_throttling-meta.js +1 -0
- package/static/devtools/mobile_throttling/mobile_throttling.js +1 -0
- package/static/devtools/ndb_app.html +20 -0
- package/static/devtools/ndb_app.js +1 -0
- package/static/devtools/network/network-legacy.js +1 -0
- package/static/devtools/network/network-meta.js +1 -0
- package/static/devtools/network/network.js +72 -0
- package/static/devtools/network/network_module.js +1 -0
- package/static/devtools/network_test_runner/network_test_runner.js +280 -0
- package/static/devtools/network_test_runner/network_test_runner_module.js +0 -0
- package/static/devtools/node_app.html +20 -0
- package/static/devtools/node_app.js +1 -0
- package/static/devtools/node_debugger/node_debugger-meta.js +1 -0
- package/static/devtools/node_debugger/node_debugger.js +1 -0
- package/static/devtools/node_debugger/node_debugger_module.js +0 -0
- package/static/devtools/node_main/node_main-legacy.js +1 -0
- package/static/devtools/node_main/node_main-meta.js +1 -0
- package/static/devtools/node_main/node_main.js +1 -0
- package/static/devtools/object_ui/object_ui-legacy.js +1 -0
- package/static/devtools/object_ui/object_ui.js +3 -0
- package/static/devtools/object_ui/object_ui_module.js +1 -0
- package/static/devtools/perf_ui/perf_ui-legacy.js +1 -0
- package/static/devtools/perf_ui/perf_ui.js +152 -0
- package/static/devtools/perf_ui/perf_ui_module.js +1 -0
- package/static/devtools/performance_monitor/performance_monitor-legacy.js +1 -0
- package/static/devtools/performance_monitor/performance_monitor-meta.js +1 -0
- package/static/devtools/performance_monitor/performance_monitor.js +1 -0
- package/static/devtools/performance_monitor/performance_monitor_module.js +1 -0
- package/static/devtools/performance_test_runner/TimelineDataTestRunner.js +5375 -0
- package/static/devtools/performance_test_runner/TimelineTestRunner.js +446 -0
- package/static/devtools/performance_test_runner/performance_test_runner.js +6 -0
- package/static/devtools/performance_test_runner/performance_test_runner_module.js +0 -0
- package/static/devtools/persistence/persistence-legacy.js +1 -0
- package/static/devtools/persistence/persistence-meta.js +1 -0
- package/static/devtools/persistence/persistence.js +1 -0
- package/static/devtools/platform/platform.js +1 -0
- package/static/devtools/profiler/profiler-legacy.js +1 -0
- package/static/devtools/profiler/profiler-meta.js +1 -0
- package/static/devtools/profiler/profiler.js +8 -0
- package/static/devtools/profiler/profiler_module.js +1 -0
- package/static/devtools/protocol_client/protocol_client-legacy.js +1 -0
- package/static/devtools/protocol_client/protocol_client.js +1 -0
- package/static/devtools/protocol_monitor/protocol_monitor-legacy.js +1 -0
- package/static/devtools/protocol_monitor/protocol_monitor-meta.js +1 -0
- package/static/devtools/protocol_monitor/protocol_monitor.js +1 -0
- package/static/devtools/protocol_monitor/protocol_monitor_module.js +1 -0
- package/static/devtools/quick_open/quick_open-legacy.js +1 -0
- package/static/devtools/quick_open/quick_open.js +1 -0
- package/static/devtools/quick_open/quick_open_module.js +1 -0
- package/static/devtools/recorder/recorder.js +1 -0
- package/static/devtools/resources/resources-legacy.js +1 -0
- package/static/devtools/resources/resources-meta.js +1 -0
- package/static/devtools/resources/resources.js +28 -0
- package/static/devtools/resources/resources_module.js +1 -0
- package/static/devtools/root/root-legacy.js +1 -0
- package/static/devtools/root/root.js +1 -0
- package/static/devtools/screencast/screencast-legacy.js +1 -0
- package/static/devtools/screencast/screencast.js +1 -0
- package/static/devtools/sdk/sdk-legacy.js +1 -0
- package/static/devtools/sdk/sdk.js +2 -0
- package/static/devtools/sdk_test_runner/sdk_test_runner.js +297 -0
- package/static/devtools/sdk_test_runner/sdk_test_runner_module.js +0 -0
- package/static/devtools/search/search-legacy.js +1 -0
- package/static/devtools/search/search.js +1 -0
- package/static/devtools/search/search_module.js +1 -0
- package/static/devtools/security/security-legacy.js +1 -0
- package/static/devtools/security/security-meta.js +1 -0
- package/static/devtools/security/security.js +1 -0
- package/static/devtools/security/security_module.js +1 -0
- package/static/devtools/security_test_runner/security_test_runner.js +32 -0
- package/static/devtools/security_test_runner/security_test_runner_module.js +0 -0
- package/static/devtools/services/services-legacy.js +1 -0
- package/static/devtools/services/services.js +1 -0
- package/static/devtools/settings/settings-legacy.js +1 -0
- package/static/devtools/settings/settings-meta.js +1 -0
- package/static/devtools/settings/settings.js +1 -0
- package/static/devtools/settings/settings_module.js +1 -0
- package/static/devtools/shell.js +1 -0
- package/static/devtools/snippets/snippets-legacy.js +1 -0
- package/static/devtools/snippets/snippets.js +1 -0
- package/static/devtools/snippets/snippets_module.js +0 -0
- package/static/devtools/source_frame/source_frame-legacy.js +1 -0
- package/static/devtools/source_frame/source_frame.js +1 -0
- package/static/devtools/source_frame/source_frame_module.js +1 -0
- package/static/devtools/sources/sources-legacy.js +1 -0
- package/static/devtools/sources/sources-meta.js +1 -0
- package/static/devtools/sources/sources.js +13 -0
- package/static/devtools/sources/sources_module.js +1 -0
- package/static/devtools/sources_test_runner/AutocompleteTestRunner.js +46 -0
- package/static/devtools/sources_test_runner/DebuggerTestRunner.js +895 -0
- package/static/devtools/sources_test_runner/EditorTestRunner.js +237 -0
- package/static/devtools/sources_test_runner/LiveEditTestRunner.js +33 -0
- package/static/devtools/sources_test_runner/SearchTestRunner.js +158 -0
- package/static/devtools/sources_test_runner/SourcesTestRunner.js +173 -0
- package/static/devtools/sources_test_runner/sources_test_runner.js +10 -0
- package/static/devtools/sources_test_runner/sources_test_runner_module.js +0 -0
- package/static/devtools/startup/startup.js +1 -0
- package/static/devtools/test_runner/test_runner.js +1 -0
- package/static/devtools/text_editor/text_editor-legacy.js +1 -0
- package/static/devtools/text_editor/text_editor.js +1 -0
- package/static/devtools/text_editor/text_editor_module.js +1 -0
- package/static/devtools/text_utils/text_utils-legacy.js +1 -0
- package/static/devtools/text_utils/text_utils.js +1 -0
- package/static/devtools/theme_support/theme_support.js +1 -0
- package/static/devtools/third_party/acorn/acorn-tsconfig.json +8 -0
- package/static/devtools/third_party/acorn/acorn.js +1 -0
- package/static/devtools/third_party/acorn/package/dist/acorn.d.ts +209 -0
- package/static/devtools/third_party/acorn/package/dist/acorn.mjs +5261 -0
- package/static/devtools/third_party/acorn/package/dist/acorn.mjs.d.ts +2 -0
- package/static/devtools/third_party/acorn/package/dist/acorn.mjs.map +1 -0
- package/static/devtools/third_party/acorn-loose/acorn-loose-tsconfig.json +8 -0
- package/static/devtools/third_party/acorn-loose/package/dist/acorn-loose.d.ts +16 -0
- package/static/devtools/third_party/acorn-loose/package/dist/acorn-loose.mjs +1418 -0
- package/static/devtools/third_party/axe-core/axe.js +16423 -0
- package/static/devtools/third_party/chromium/chromium-tsconfig.json +8 -0
- package/static/devtools/third_party/chromium/client-variations/ClientVariations.d.ts +13 -0
- package/static/devtools/third_party/chromium/client-variations/ClientVariations.js +27 -0
- package/static/devtools/third_party/codemirror/codemirror-tsconfig.json +72 -0
- package/static/devtools/third_party/codemirror/package/addon/comment/comment.d.ts +4 -0
- package/static/devtools/third_party/codemirror/package/addon/comment/comment.js +211 -0
- package/static/devtools/third_party/codemirror/package/addon/edit/closebrackets.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/addon/edit/closebrackets.js +201 -0
- package/static/devtools/third_party/codemirror/package/addon/edit/matchbrackets.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/addon/edit/matchbrackets.js +158 -0
- package/static/devtools/third_party/codemirror/package/addon/fold/brace-fold.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/addon/fold/brace-fold.js +105 -0
- package/static/devtools/third_party/codemirror/package/addon/fold/foldcode.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/addon/fold/foldcode.js +157 -0
- package/static/devtools/third_party/codemirror/package/addon/fold/foldgutter.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/addon/fold/foldgutter.js +163 -0
- package/static/devtools/third_party/codemirror/package/addon/mode/multiplex.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/addon/mode/multiplex.js +131 -0
- package/static/devtools/third_party/codemirror/package/addon/mode/overlay.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/addon/mode/overlay.js +90 -0
- package/static/devtools/third_party/codemirror/package/addon/mode/simple.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/addon/mode/simple.js +216 -0
- package/static/devtools/third_party/codemirror/package/addon/runmode/runmode-standalone.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/addon/runmode/runmode-standalone.js +333 -0
- package/static/devtools/third_party/codemirror/package/addon/selection/active-line.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/addon/selection/active-line.js +72 -0
- package/static/devtools/third_party/codemirror/package/addon/selection/mark-selection.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/addon/selection/mark-selection.js +119 -0
- package/static/devtools/third_party/codemirror/package/lib/codemirror.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/lib/codemirror.js +9800 -0
- package/static/devtools/third_party/codemirror/package/mode/clike/clike.d.ts +4 -0
- package/static/devtools/third_party/codemirror/package/mode/clike/clike.js +935 -0
- package/static/devtools/third_party/codemirror/package/mode/clojure/clojure.d.ts +4 -0
- package/static/devtools/third_party/codemirror/package/mode/clojure/clojure.js +292 -0
- package/static/devtools/third_party/codemirror/package/mode/coffeescript/coffeescript.d.ts +4 -0
- package/static/devtools/third_party/codemirror/package/mode/coffeescript/coffeescript.js +359 -0
- package/static/devtools/third_party/codemirror/package/mode/css/css.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/mode/css/css.js +864 -0
- package/static/devtools/third_party/codemirror/package/mode/htmlembedded/htmlembedded.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/mode/htmlembedded/htmlembedded.js +37 -0
- package/static/devtools/third_party/codemirror/package/mode/htmlmixed/htmlmixed.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/mode/htmlmixed/htmlmixed.js +153 -0
- package/static/devtools/third_party/codemirror/package/mode/javascript/javascript.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/mode/javascript/javascript.js +942 -0
- package/static/devtools/third_party/codemirror/package/mode/jsx/jsx.d.ts +4 -0
- package/static/devtools/third_party/codemirror/package/mode/jsx/jsx.js +148 -0
- package/static/devtools/third_party/codemirror/package/mode/livescript/livescript.d.ts +4 -0
- package/static/devtools/third_party/codemirror/package/mode/livescript/livescript.js +280 -0
- package/static/devtools/third_party/codemirror/package/mode/markdown/markdown.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/mode/markdown/markdown.js +886 -0
- package/static/devtools/third_party/codemirror/package/mode/php/php.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/mode/php/php.js +234 -0
- package/static/devtools/third_party/codemirror/package/mode/python/python.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/mode/python/python.js +399 -0
- package/static/devtools/third_party/codemirror/package/mode/shell/shell.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/mode/shell/shell.js +168 -0
- package/static/devtools/third_party/codemirror/package/mode/wast/wast.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/mode/wast/wast.js +41 -0
- package/static/devtools/third_party/codemirror/package/mode/xml/xml.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/mode/xml/xml.js +413 -0
- package/static/devtools/third_party/i18n/bundle-tsconfig.json +8 -0
- package/static/devtools/third_party/i18n/i18n.d.ts +108 -0
- package/static/devtools/third_party/i18n/i18n.js +4336 -0
- package/static/devtools/third_party/lighthouse/lighthouse-dt-bundle.d.ts +1 -0
- package/static/devtools/third_party/lighthouse/lighthouse-dt-bundle.js +1140 -0
- package/static/devtools/third_party/lighthouse/lighthouse-tsconfig.json +10 -0
- package/static/devtools/third_party/lighthouse/locales/ar-XB.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/ar.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/bg.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/ca.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/cs.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/da.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/de.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/el.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/en-GB.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/en-US.json +2297 -0
- package/static/devtools/third_party/lighthouse/locales/en-XA.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/en-XL.json +2297 -0
- package/static/devtools/third_party/lighthouse/locales/es-419.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/es.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/fi.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/fil.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/fr.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/he.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/hi.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/hr.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/hu.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/id.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/it.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/ja.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/ko.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/lt.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/lv.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/nl.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/no.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/pl.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/pt-PT.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/pt.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/ro.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/ru.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/sk.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/sl.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/sr-Latn.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/sr.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/sv.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/ta.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/te.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/th.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/tr.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/uk.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/vi.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/zh-HK.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/zh-TW.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/zh.json +2066 -0
- package/static/devtools/third_party/lighthouse/report-assets/report-generator.d.ts +1 -0
- package/static/devtools/third_party/lighthouse/report-assets/report-generator.js +167 -0
- package/static/devtools/third_party/lighthouse/report-assets/report.d.ts +1 -0
- package/static/devtools/third_party/lighthouse/report-assets/report.js +5032 -0
- package/static/devtools/third_party/lit-html/lit-html-tsconfig.json +22 -0
- package/static/devtools/third_party/lit-html/lit-html.js +120 -0
- package/static/devtools/third_party/lit-html/package/directives/class-map.d.ts +28 -0
- package/static/devtools/third_party/lit-html/package/directives/class-map.js +101 -0
- package/static/devtools/third_party/lit-html/package/directives/class-map.js.map +1 -0
- package/static/devtools/third_party/lit-html/package/directives/if-defined.d.ts +22 -0
- package/static/devtools/third_party/lit-html/package/directives/if-defined.js +37 -0
- package/static/devtools/third_party/lit-html/package/directives/if-defined.js.map +1 -0
- package/static/devtools/third_party/lit-html/package/directives/live.d.ts +38 -0
- package/static/devtools/third_party/lit-html/package/directives/live.js +73 -0
- package/static/devtools/third_party/lit-html/package/directives/live.js.map +1 -0
- package/static/devtools/third_party/lit-html/package/directives/repeat.d.ts +37 -0
- package/static/devtools/third_party/lit-html/package/directives/repeat.js +415 -0
- package/static/devtools/third_party/lit-html/package/directives/repeat.js.map +1 -0
- package/static/devtools/third_party/lit-html/package/directives/style-map.d.ts +36 -0
- package/static/devtools/third_party/lit-html/package/directives/style-map.js +78 -0
- package/static/devtools/third_party/lit-html/package/directives/style-map.js.map +1 -0
- package/static/devtools/third_party/lit-html/package/lib/default-template-processor.d.ts +39 -0
- package/static/devtools/third_party/lit-html/package/lib/default-template-processor.js +52 -0
- package/static/devtools/third_party/lit-html/package/lib/default-template-processor.js.map +1 -0
- package/static/devtools/third_party/lit-html/package/lib/directive.d.ts +59 -0
- package/static/devtools/third_party/lit-html/package/lib/directive.js +63 -0
- package/static/devtools/third_party/lit-html/package/lib/directive.js.map +1 -0
- package/static/devtools/third_party/lit-html/package/lib/dom.d.ts +29 -0
- package/static/devtools/third_party/lit-html/package/lib/dom.js +44 -0
- package/static/devtools/third_party/lit-html/package/lib/dom.js.map +1 -0
- package/static/devtools/third_party/lit-html/package/lib/part.d.ts +46 -0
- package/static/devtools/third_party/lit-html/package/lib/part.js +23 -0
- package/static/devtools/third_party/lit-html/package/lib/part.js.map +1 -0
- package/static/devtools/third_party/lit-html/package/lib/parts.d.ts +148 -0
- package/static/devtools/third_party/lit-html/package/lib/parts.js +476 -0
- package/static/devtools/third_party/lit-html/package/lib/parts.js.map +1 -0
- package/static/devtools/third_party/lit-html/package/lib/render.d.ts +33 -0
- package/static/devtools/third_party/lit-html/package/lib/render.js +43 -0
- package/static/devtools/third_party/lit-html/package/lib/render.js.map +1 -0
- package/static/devtools/third_party/lit-html/package/lib/template-factory.d.ts +57 -0
- package/static/devtools/third_party/lit-html/package/lib/template-factory.js +48 -0
- package/static/devtools/third_party/lit-html/package/lib/template-factory.js.map +1 -0
- package/static/devtools/third_party/lit-html/package/lib/template-instance.d.ts +30 -0
- package/static/devtools/third_party/lit-html/package/lib/template-instance.js +134 -0
- package/static/devtools/third_party/lit-html/package/lib/template-instance.js.map +1 -0
- package/static/devtools/third_party/lit-html/package/lib/template-result.d.ts +42 -0
- package/static/devtools/third_party/lit-html/package/lib/template-result.js +131 -0
- package/static/devtools/third_party/lit-html/package/lib/template-result.js.map +1 -0
- package/static/devtools/third_party/lit-html/package/lib/template.d.ts +92 -0
- package/static/devtools/third_party/lit-html/package/lib/template.js +215 -0
- package/static/devtools/third_party/lit-html/package/lib/template.js.map +1 -0
- package/static/devtools/third_party/lit-html/package/lit-html.d.ts +42 -0
- package/static/devtools/third_party/lit-html/package/lit-html.js +59 -0
- package/static/devtools/third_party/lit-html/package/lit-html.js.map +1 -0
- package/static/devtools/third_party/marked/marked-tsconfig.json +8 -0
- package/static/devtools/third_party/marked/marked.js +1 -0
- package/static/devtools/third_party/marked/package/lib/marked.esm.d.ts +1 -0
- package/static/devtools/third_party/marked/package/lib/marked.esm.js +2584 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/api-docs-entry.d.ts +53 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/api-docs-entry.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/api-docs-entry.js +64 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Accessibility.d.ts +176 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Accessibility.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Accessibility.js +356 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/AriaQueryHandler.d.ts +21 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/AriaQueryHandler.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/AriaQueryHandler.js +81 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.d.ts +423 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.js +516 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.d.ts +39 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.js +76 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserWebSocketTransport.d.ts +26 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserWebSocketTransport.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserWebSocketTransport.js +30 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Connection.d.ts +120 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Connection.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Connection.js +266 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectionTransport.d.ts +22 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectionTransport.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectionTransport.js +15 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.d.ts +72 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.js +60 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Coverage.d.ts +181 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Coverage.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Coverage.js +316 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.d.ts +174 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.js +647 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Debug.d.ts +53 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Debug.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Debug.js +77 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/DeviceDescriptors.d.ts +33 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/DeviceDescriptors.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/DeviceDescriptors.js +873 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Dialog.d.ts +76 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Dialog.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Dialog.js +92 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/EmulationManager.d.ts +25 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/EmulationManager.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/EmulationManager.js +33 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Errors.d.ts +34 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Errors.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Errors.js +37 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/EvalTypes.d.ts +59 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/EvalTypes.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/EvalTypes.js +15 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/EventEmitter.d.ts +89 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/EventEmitter.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/EventEmitter.js +109 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Events.d.ts +82 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Events.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Events.js +83 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/ExecutionContext.d.ts +189 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/ExecutionContext.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/ExecutionContext.js +313 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/FileChooser.d.ts +60 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/FileChooser.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/FileChooser.js +66 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.d.ts +735 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.js +962 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.d.ts +276 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.js +421 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPResponse.d.ts +128 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPResponse.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPResponse.js +150 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Input.d.ts +322 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Input.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Input.js +463 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.d.ts +439 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.js +724 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/LifecycleWatcher.d.ts +62 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/LifecycleWatcher.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/LifecycleWatcher.js +145 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.d.ts +80 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.js +262 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/PDFOptions.d.ts +152 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/PDFOptions.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/PDFOptions.js +31 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.d.ts +910 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.js +1343 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Product.d.ts +21 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Product.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Product.js +15 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Puppeteer.d.ts +135 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Puppeteer.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Puppeteer.js +133 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/PuppeteerViewport.d.ts +24 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/PuppeteerViewport.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/PuppeteerViewport.js +0 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/QueryHandler.d.ts +66 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/QueryHandler.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/QueryHandler.js +157 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/SecurityDetails.d.ts +61 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/SecurityDetails.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/SecurityDetails.js +72 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Target.d.ts +98 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Target.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Target.js +137 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/TimeoutSettings.d.ts +28 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/TimeoutSettings.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/TimeoutSettings.js +43 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Tracing.d.ts +47 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Tracing.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Tracing.js +94 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/USKeyboardLayout.d.ts +40 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/USKeyboardLayout.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/USKeyboardLayout.js +403 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/WebWorker.d.ts +102 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/WebWorker.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/WebWorker.js +109 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/assert.d.ts +22 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/assert.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/assert.js +24 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/fetch.d.ts +17 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/fetch.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/fetch.js +20 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/helper.d.ts +66 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/helper.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/helper.js +288 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/environment.d.ts +17 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/environment.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/environment.js +16 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/initialize-node.d.ts +18 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/initialize-node.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/initialize-node.js +39 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/initialize-web.d.ts +18 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/initialize-web.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/initialize-web.js +22 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserFetcher.d.ts +132 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserFetcher.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserFetcher.js +468 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.d.ts +40 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.js +197 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/LaunchOptions.d.ts +42 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/LaunchOptions.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/LaunchOptions.js +0 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/Launcher.d.ts +16 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/Launcher.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/Launcher.js +469 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/NodeWebSocketTransport.d.ts +29 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/NodeWebSocketTransport.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/NodeWebSocketTransport.js +34 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/PipeTransport.d.ts +31 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/PipeTransport.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/PipeTransport.js +61 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/Puppeteer.d.ts +156 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/Puppeteer.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/Puppeteer.js +183 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/install.d.ts +18 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/install.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/install.js +151 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node-puppeteer-core.d.ts +18 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node-puppeteer-core.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node-puppeteer-core.js +23 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node.d.ts +18 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node.js +22 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +22 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +19 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/web.d.ts +18 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/web.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/web.js +22 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/vendor/mitt/src/index.d.ts +22 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/vendor/mitt/src/index.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/vendor/mitt/src/index.js +53 -0
- package/static/devtools/third_party/puppeteer/puppeteer-tsconfig.json +58 -0
- package/static/devtools/third_party/puppeteer/puppeteer.js +1 -0
- package/static/devtools/third_party/wasmparser/package/dist/esm/WasmDis.js +1595 -0
- package/static/devtools/third_party/wasmparser/package/dist/esm/WasmParser.js +3120 -0
- package/static/devtools/third_party/wasmparser/wasmparser-tsconfig.json +9 -0
- package/static/devtools/timeline/timeline-legacy.js +1 -0
- package/static/devtools/timeline/timeline-meta.js +1 -0
- package/static/devtools/timeline/timeline.js +1 -0
- package/static/devtools/timeline/timeline_module.js +1 -0
- package/static/devtools/timeline_model/timeline_model-legacy.js +1 -0
- package/static/devtools/timeline_model/timeline_model.js +1 -0
- package/static/devtools/timeline_model/timeline_model_module.js +0 -0
- package/static/devtools/toolbox.html +20 -0
- package/static/devtools/toolbox.js +1 -0
- package/static/devtools/toolbox_bootstrap/toolbox_bootstrap.js +1 -0
- package/static/devtools/ui/components/components.js +378 -0
- package/static/devtools/ui/ui-legacy.js +1 -0
- package/static/devtools/ui/ui.js +3 -0
- package/static/devtools/ui/utils/utils.js +1 -0
- package/static/devtools/wasmparser_worker/wasmparser_worker-entrypoint.js +1 -0
- package/static/devtools/wasmparser_worker/wasmparser_worker.js +1 -0
- package/static/devtools/web_audio/graph_visualizer/graph_visualizer.js +1 -0
- package/static/devtools/web_audio/web_audio-legacy.js +1 -0
- package/static/devtools/web_audio/web_audio-meta.js +1 -0
- package/static/devtools/web_audio/web_audio.js +23 -0
- package/static/devtools/web_audio/web_audio_module.js +1 -0
- package/static/devtools/webauthn/webauthn-legacy.js +1 -0
- package/static/devtools/webauthn/webauthn-meta.js +1 -0
- package/static/devtools/webauthn/webauthn.js +6 -0
- package/static/devtools/webauthn/webauthn_module.js +1 -0
- package/static/devtools/worker_app.html +20 -0
- package/static/devtools/worker_app.js +1 -0
- package/static/devtools/worker_main/worker_main-legacy.js +1 -0
- package/static/devtools/worker_main/worker_main.js +1 -0
- package/static/devtools/worker_service/worker_service.js +1 -0
- package/static/devtools/workspace/workspace-legacy.js +1 -0
- package/static/devtools/workspace/workspace.js +1 -0
- package/static/devtools/workspace_diff/workspace_diff-legacy.js +1 -0
- package/static/devtools/workspace_diff/workspace_diff.js +1 -0
- package/static/devtools/workspace_diff/workspace_diff_module.js +0 -0
- package/static/docs/swagger.json +2337 -279
- package/static/function/client.js +1037 -992
- package/build/routes/chromium/http/json-new.js +0 -23
- package/build/routes/chromium/http/json-version-get.response.json +0 -37
- package/build/routes/chromium/utils/cdp.d.ts +0 -2
- package/build/routes/chromium/utils/cdp.js +0 -14
- package/build/routes/chromium/ws/cdp-chromium.js +0 -10
- package/src/routes/chromium/http/json-list.ts +0 -50
- package/src/routes/chromium/utils/cdp.ts +0 -19
- package/build/routes/{chromium/http/content-post.query.json → chrome/http/content.post.query.json} +0 -0
- package/build/routes/{chromium/http/content-post.response.json → chrome/http/content.post.response.json} +0 -0
- package/build/routes/{chromium/http/download-post.body.json → chrome/http/download.post.body.json} +0 -0
- package/build/routes/{chromium/http/download-post.query.json → chrome/http/download.post.query.json} +0 -0
- package/build/routes/{chromium/http/download-post.response.json → chrome/http/download.post.response.json} +0 -0
- package/build/routes/{chromium/http/function-post.body.json → chrome/http/function.post.body.json} +0 -0
- package/build/routes/{chromium/http/function-post.query.json → chrome/http/function.post.query.json} +0 -0
- package/build/routes/{chromium/http/function-post.response.json → chrome/http/function.post.response.json} +0 -0
- package/build/routes/{chromium/http/json-list.response.json → chrome/http/json-list.get.response.json} +0 -0
- package/build/routes/{chromium/http/json-new.response.json → chrome/http/json-new.put.response.json} +0 -0
- package/build/routes/{chromium/http/json-protocol-get.response.json → chrome/http/json-protocol.get.response.json} +0 -0
- package/build/routes/{chromium/http/pdf-post.query.json → chrome/http/pdf.post.query.json} +0 -0
- package/build/routes/{chromium/http/pdf-post.response.json → chrome/http/pdf.post.response.json} +0 -0
- package/build/routes/{chromium/http/performance.body.json → chrome/http/performance.post.body.json} +0 -0
- package/build/routes/{chromium/http/performance.query.json → chrome/http/performance.post.query.json} +0 -0
- package/build/routes/{chromium/http/performance.response.json → chrome/http/performance.post.response.json} +0 -0
- package/build/routes/{chromium/http/scrape-post.query.json → chrome/http/scrape.post.query.json} +0 -0
- package/build/routes/{chromium/http/scrape-post.response.json → chrome/http/scrape.post.response.json} +0 -0
- package/build/routes/{chromium/http/screenshot-post.query.json → chrome/http/screenshot.post.query.json} +0 -0
- package/build/routes/{chromium/http/screenshot-post.response.json → chrome/http/screenshot.post.response.json} +0 -0
- package/build/routes/{chromium/utils/performance/child.d.ts → chrome/tests/content.spec.d.ts} +0 -0
- package/build/routes/{chromium/utils/performance/types.js → chrome/tests/download.spec.d.ts} +0 -0
- package/build/routes/{chromium/ws/cdp-chromium.query.json → chrome/ws/browser.query.json} +0 -0
- package/build/routes/{chromium/ws/playwright-chromium.query.json → chrome/ws/playwright.query.json} +0 -0
- package/build/routes/{firefox/ws/playwright-firefox.query.json → chromium/ws/playwright.query.json} +0 -0
- package/build/routes/{webkit/ws/playwright-webkit.query.json → firefox/ws/playwright.query.json} +0 -0
- package/build/routes/management/http/{config-get.d.ts → config.get.d.ts} +0 -0
- package/build/routes/management/http/{config-get.js → config.get.js} +0 -0
- package/build/routes/management/http/{config-get.response.json → config.get.response.json} +0 -0
- package/build/routes/management/http/{metrics-total-get.d.ts → metrics-total.get.d.ts} +0 -0
- package/build/routes/management/http/{metrics-total-get.js → metrics-total.get.js} +0 -0
- package/build/routes/management/http/{metrics-total-get.response.json → metrics-total.get.response.json} +0 -0
- package/build/routes/management/http/{metrics-get.d.ts → metrics.get.d.ts} +0 -0
- package/build/routes/management/http/{metrics-get.js → metrics.get.js} +0 -0
- package/build/routes/management/http/{metrics-get.response.json → metrics.get.response.json} +0 -0
- package/build/routes/management/http/{sessions-get.d.ts → sessions.get.d.ts} +0 -0
- package/build/routes/management/http/{sessions-get.js → sessions.get.js} +0 -0
- package/build/routes/management/http/{static-get.d.ts → static.get.d.ts} +0 -0
- package/build/{routes/chromium/http/json-protocol-get.d.ts → shared/json-protocol.http.d.ts} +1 -1
- package/build/{routes/chromium/http/json-version-get.d.ts → shared/json-version.http.d.ts} +1 -1
- /package/build/{routes/chromium → shared}/utils/function/client.d.ts +0 -0
- /package/build/{routes/chromium → shared}/utils/function/client.js +0 -0
- /package/build/{routes/chromium → shared}/utils/function/handler.d.ts +0 -0
- /package/build/{routes/chromium → shared}/utils/function/handler.js +0 -0
- /package/build/{routes/chromium → shared}/utils/performance/child.js +0 -0
- /package/build/{routes/chromium → shared}/utils/performance/main.d.ts +0 -0
- /package/build/{routes/chromium → shared}/utils/performance/types.d.ts +0 -0
- /package/src/routes/management/http/{config-get.ts → config.get.ts} +0 -0
- /package/src/routes/management/http/{metrics-total-get.ts → metrics-total.get.ts} +0 -0
- /package/src/routes/management/http/{metrics-get.ts → metrics.get.ts} +0 -0
- /package/src/routes/management/http/{sessions-get.ts → sessions.get.ts} +0 -0
- /package/src/{routes/chromium → shared}/utils/function/client.ts +0 -0
- /package/src/{routes/chromium → shared}/utils/performance/child.ts +0 -0
- /package/src/{routes/chromium → shared}/utils/performance/types.ts +0 -0
|
@@ -0,0 +1,1654 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2010 Google Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Redistribution and use in source and binary forms, with or without
|
|
5
|
+
* modification, are permitted provided that the following conditions are
|
|
6
|
+
* met:
|
|
7
|
+
*
|
|
8
|
+
* * Redistributions of source code must retain the above copyright
|
|
9
|
+
* notice, this list of conditions and the following disclaimer.
|
|
10
|
+
* * Redistributions in binary form must reproduce the above
|
|
11
|
+
* copyright notice, this list of conditions and the following disclaimer
|
|
12
|
+
* in the documentation and/or other materials provided with the
|
|
13
|
+
* distribution.
|
|
14
|
+
* * Neither the name of Google Inc. nor the names of its
|
|
15
|
+
* contributors may be used to endorse or promote products derived from
|
|
16
|
+
* this software without specific prior written permission.
|
|
17
|
+
*
|
|
18
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
19
|
+
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
20
|
+
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
21
|
+
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
22
|
+
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
23
|
+
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
24
|
+
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
25
|
+
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
26
|
+
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
27
|
+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
28
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
29
|
+
*/
|
|
30
|
+
/* eslint-disable indent */
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* @fileoverview This file contains small testing framework along with the
|
|
34
|
+
* test suite for the frontend. These tests are a part of the continues build
|
|
35
|
+
* and are executed by the devtools_sanity_unittest.cc as a part of the
|
|
36
|
+
* Interactive UI Test suite.
|
|
37
|
+
* FIXME: change field naming style to use trailing underscore.
|
|
38
|
+
*/
|
|
39
|
+
|
|
40
|
+
(function createTestSuite(window) {
|
|
41
|
+
|
|
42
|
+
const TestSuite = class {
|
|
43
|
+
/**
|
|
44
|
+
* Test suite for interactive UI tests.
|
|
45
|
+
* @param {Object} domAutomationController DomAutomationController instance.
|
|
46
|
+
*/
|
|
47
|
+
constructor(domAutomationController) {
|
|
48
|
+
this.domAutomationController_ = domAutomationController;
|
|
49
|
+
this.controlTaken_ = false;
|
|
50
|
+
this.timerId_ = -1;
|
|
51
|
+
this._asyncInvocationId = 0;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Key event with given key identifier.
|
|
56
|
+
*/
|
|
57
|
+
static createKeyEvent(key) {
|
|
58
|
+
return new KeyboardEvent('keydown', {bubbles: true, cancelable: true, key: key});
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Reports test failure.
|
|
64
|
+
* @param {string} message Failure description.
|
|
65
|
+
*/
|
|
66
|
+
TestSuite.prototype.fail = function(message) {
|
|
67
|
+
if (this.controlTaken_) {
|
|
68
|
+
this.reportFailure_(message);
|
|
69
|
+
} else {
|
|
70
|
+
throw message;
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Equals assertion tests that expected === actual.
|
|
76
|
+
* @param {!Object|boolean} expected Expected object.
|
|
77
|
+
* @param {!Object|boolean} actual Actual object.
|
|
78
|
+
* @param {string} opt_message User message to print if the test fails.
|
|
79
|
+
*/
|
|
80
|
+
TestSuite.prototype.assertEquals = function(expected, actual, opt_message) {
|
|
81
|
+
if (expected !== actual) {
|
|
82
|
+
let message = 'Expected: \'' + expected + '\', but was \'' + actual + '\'';
|
|
83
|
+
if (opt_message) {
|
|
84
|
+
message = opt_message + '(' + message + ')';
|
|
85
|
+
}
|
|
86
|
+
this.fail(message);
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* True assertion tests that value == true.
|
|
92
|
+
* @param {!Object} value Actual object.
|
|
93
|
+
* @param {string} opt_message User message to print if the test fails.
|
|
94
|
+
*/
|
|
95
|
+
TestSuite.prototype.assertTrue = function(value, opt_message) {
|
|
96
|
+
this.assertEquals(true, Boolean(value), opt_message);
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Takes control over execution.
|
|
101
|
+
*/
|
|
102
|
+
TestSuite.prototype.takeControl = function() {
|
|
103
|
+
this.controlTaken_ = true;
|
|
104
|
+
// Set up guard timer.
|
|
105
|
+
const self = this;
|
|
106
|
+
this.timerId_ = setTimeout(function() {
|
|
107
|
+
self.reportFailure_('Timeout exceeded: 20 sec');
|
|
108
|
+
}, 20000);
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Releases control over execution.
|
|
113
|
+
*/
|
|
114
|
+
TestSuite.prototype.releaseControl = function() {
|
|
115
|
+
if (this.timerId_ !== -1) {
|
|
116
|
+
clearTimeout(this.timerId_);
|
|
117
|
+
this.timerId_ = -1;
|
|
118
|
+
}
|
|
119
|
+
this.controlTaken_ = false;
|
|
120
|
+
this.reportOk_();
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Async tests use this one to report that they are completed.
|
|
125
|
+
*/
|
|
126
|
+
TestSuite.prototype.reportOk_ = function() {
|
|
127
|
+
this.domAutomationController_.send('[OK]');
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Async tests use this one to report failures.
|
|
132
|
+
*/
|
|
133
|
+
TestSuite.prototype.reportFailure_ = function(error) {
|
|
134
|
+
if (this.timerId_ !== -1) {
|
|
135
|
+
clearTimeout(this.timerId_);
|
|
136
|
+
this.timerId_ = -1;
|
|
137
|
+
}
|
|
138
|
+
this.domAutomationController_.send('[FAILED] ' + error);
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Run specified test on a fresh instance of the test suite.
|
|
143
|
+
* @param {Array<string>} args method name followed by its parameters.
|
|
144
|
+
*/
|
|
145
|
+
TestSuite.prototype.dispatchOnTestSuite = function(args) {
|
|
146
|
+
const methodName = args.shift();
|
|
147
|
+
try {
|
|
148
|
+
this[methodName].apply(this, args);
|
|
149
|
+
if (!this.controlTaken_) {
|
|
150
|
+
this.reportOk_();
|
|
151
|
+
}
|
|
152
|
+
} catch (e) {
|
|
153
|
+
this.reportFailure_(e);
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Wrap an async method with TestSuite.{takeControl(), releaseControl()}
|
|
159
|
+
* and invoke TestSuite.reportOk_ upon completion.
|
|
160
|
+
* @param {Array<string>} args method name followed by its parameters.
|
|
161
|
+
*/
|
|
162
|
+
TestSuite.prototype.waitForAsync = function(var_args) {
|
|
163
|
+
const args = Array.prototype.slice.call(arguments);
|
|
164
|
+
this.takeControl();
|
|
165
|
+
args.push(this.releaseControl.bind(this));
|
|
166
|
+
this.dispatchOnTestSuite(args);
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Overrides the method with specified name until it's called first time.
|
|
171
|
+
* @param {!Object} receiver An object whose method to override.
|
|
172
|
+
* @param {string} methodName Name of the method to override.
|
|
173
|
+
* @param {!Function} override A function that should be called right after the
|
|
174
|
+
* overridden method returns.
|
|
175
|
+
* @param {?boolean} opt_sticky Whether restore original method after first run
|
|
176
|
+
* or not.
|
|
177
|
+
*/
|
|
178
|
+
TestSuite.prototype.addSniffer = function(receiver, methodName, override, opt_sticky) {
|
|
179
|
+
const orig = receiver[methodName];
|
|
180
|
+
if (typeof orig !== 'function') {
|
|
181
|
+
this.fail('Cannot find method to override: ' + methodName);
|
|
182
|
+
}
|
|
183
|
+
const test = this;
|
|
184
|
+
receiver[methodName] = function(var_args) {
|
|
185
|
+
let result;
|
|
186
|
+
try {
|
|
187
|
+
result = orig.apply(this, arguments);
|
|
188
|
+
} finally {
|
|
189
|
+
if (!opt_sticky) {
|
|
190
|
+
receiver[methodName] = orig;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
// In case of exception the override won't be called.
|
|
194
|
+
try {
|
|
195
|
+
override.apply(this, arguments);
|
|
196
|
+
} catch (e) {
|
|
197
|
+
test.fail('Exception in overriden method \'' + methodName + '\': ' + e);
|
|
198
|
+
}
|
|
199
|
+
return result;
|
|
200
|
+
};
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Waits for current throttler invocations, if any.
|
|
205
|
+
* @param {!Common.Throttler} throttler
|
|
206
|
+
* @param {function()} callback
|
|
207
|
+
*/
|
|
208
|
+
TestSuite.prototype.waitForThrottler = function(throttler, callback) {
|
|
209
|
+
const test = this;
|
|
210
|
+
let scheduleShouldFail = true;
|
|
211
|
+
test.addSniffer(throttler, 'schedule', onSchedule);
|
|
212
|
+
|
|
213
|
+
function hasSomethingScheduled() {
|
|
214
|
+
return throttler._isRunningProcess || throttler._process;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
function checkState() {
|
|
218
|
+
if (!hasSomethingScheduled()) {
|
|
219
|
+
scheduleShouldFail = false;
|
|
220
|
+
callback();
|
|
221
|
+
return;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
test.addSniffer(throttler, '_processCompletedForTests', checkState);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
function onSchedule() {
|
|
228
|
+
if (scheduleShouldFail) {
|
|
229
|
+
test.fail('Unexpected Throttler.schedule');
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
checkState();
|
|
234
|
+
};
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* @param {string} panelName Name of the panel to show.
|
|
238
|
+
*/
|
|
239
|
+
TestSuite.prototype.showPanel = function(panelName) {
|
|
240
|
+
return self.UI.inspectorView.showPanel(panelName);
|
|
241
|
+
};
|
|
242
|
+
|
|
243
|
+
// UI Tests
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* Tests that scripts tab can be open and populated with inspected scripts.
|
|
247
|
+
*/
|
|
248
|
+
TestSuite.prototype.testShowScriptsTab = function() {
|
|
249
|
+
const test = this;
|
|
250
|
+
this.showPanel('sources').then(function() {
|
|
251
|
+
// There should be at least main page script.
|
|
252
|
+
this._waitUntilScriptsAreParsed(['debugger_test_page.html'], function() {
|
|
253
|
+
test.releaseControl();
|
|
254
|
+
});
|
|
255
|
+
}.bind(this));
|
|
256
|
+
// Wait until all scripts are added to the debugger.
|
|
257
|
+
this.takeControl();
|
|
258
|
+
};
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* Tests that scripts tab is populated with inspected scripts even if it
|
|
262
|
+
* hadn't been shown by the moment inspected paged refreshed.
|
|
263
|
+
* @see http://crbug.com/26312
|
|
264
|
+
*/
|
|
265
|
+
TestSuite.prototype.testScriptsTabIsPopulatedOnInspectedPageRefresh = function() {
|
|
266
|
+
const test = this;
|
|
267
|
+
const debuggerModel = self.SDK.targetManager.mainTarget().model(SDK.DebuggerModel);
|
|
268
|
+
debuggerModel.addEventListener(SDK.DebuggerModel.Events.GlobalObjectCleared, waitUntilScriptIsParsed);
|
|
269
|
+
|
|
270
|
+
this.showPanel('elements').then(function() {
|
|
271
|
+
// Reload inspected page. It will reset the debugger agent.
|
|
272
|
+
test.evaluateInConsole_('window.location.reload(true);', function(resultText) {});
|
|
273
|
+
});
|
|
274
|
+
|
|
275
|
+
function waitUntilScriptIsParsed() {
|
|
276
|
+
debuggerModel.removeEventListener(SDK.DebuggerModel.Events.GlobalObjectCleared, waitUntilScriptIsParsed);
|
|
277
|
+
test.showPanel('sources').then(function() {
|
|
278
|
+
test._waitUntilScriptsAreParsed(['debugger_test_page.html'], function() {
|
|
279
|
+
test.releaseControl();
|
|
280
|
+
});
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
// Wait until all scripts are added to the debugger.
|
|
285
|
+
this.takeControl();
|
|
286
|
+
};
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* Tests that scripts list contains content scripts.
|
|
290
|
+
*/
|
|
291
|
+
TestSuite.prototype.testContentScriptIsPresent = function() {
|
|
292
|
+
const test = this;
|
|
293
|
+
this.showPanel('sources').then(function() {
|
|
294
|
+
test._waitUntilScriptsAreParsed(['page_with_content_script.html', 'simple_content_script.js'], function() {
|
|
295
|
+
test.releaseControl();
|
|
296
|
+
});
|
|
297
|
+
});
|
|
298
|
+
|
|
299
|
+
// Wait until all scripts are added to the debugger.
|
|
300
|
+
this.takeControl();
|
|
301
|
+
};
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
* Tests that scripts are not duplicaed on Scripts tab switch.
|
|
305
|
+
*/
|
|
306
|
+
TestSuite.prototype.testNoScriptDuplicatesOnPanelSwitch = function() {
|
|
307
|
+
const test = this;
|
|
308
|
+
|
|
309
|
+
function switchToElementsTab() {
|
|
310
|
+
test.showPanel('elements').then(function() {
|
|
311
|
+
setTimeout(switchToScriptsTab, 0);
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
function switchToScriptsTab() {
|
|
316
|
+
test.showPanel('sources').then(function() {
|
|
317
|
+
setTimeout(checkScriptsPanel, 0);
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
function checkScriptsPanel() {
|
|
322
|
+
test.assertTrue(test._scriptsAreParsed(['debugger_test_page.html']), 'Some scripts are missing.');
|
|
323
|
+
checkNoDuplicates();
|
|
324
|
+
test.releaseControl();
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
function checkNoDuplicates() {
|
|
328
|
+
const uiSourceCodes = test.nonAnonymousUISourceCodes_();
|
|
329
|
+
for (let i = 0; i < uiSourceCodes.length; i++) {
|
|
330
|
+
for (let j = i + 1; j < uiSourceCodes.length; j++) {
|
|
331
|
+
test.assertTrue(
|
|
332
|
+
uiSourceCodes[i].url() !== uiSourceCodes[j].url(),
|
|
333
|
+
'Found script duplicates: ' + test.uiSourceCodesToString_(uiSourceCodes));
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
this.showPanel('sources').then(function() {
|
|
339
|
+
test._waitUntilScriptsAreParsed(['debugger_test_page.html'], function() {
|
|
340
|
+
checkNoDuplicates();
|
|
341
|
+
setTimeout(switchToElementsTab, 0);
|
|
342
|
+
});
|
|
343
|
+
});
|
|
344
|
+
|
|
345
|
+
// Wait until all scripts are added to the debugger.
|
|
346
|
+
this.takeControl();
|
|
347
|
+
};
|
|
348
|
+
|
|
349
|
+
// Tests that debugger works correctly if pause event occurs when DevTools
|
|
350
|
+
// frontend is being loaded.
|
|
351
|
+
TestSuite.prototype.testPauseWhenLoadingDevTools = function() {
|
|
352
|
+
const debuggerModel = self.SDK.targetManager.mainTarget().model(SDK.DebuggerModel);
|
|
353
|
+
if (debuggerModel.debuggerPausedDetails) {
|
|
354
|
+
return;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
this.showPanel('sources').then(function() {
|
|
358
|
+
// Script execution can already be paused.
|
|
359
|
+
|
|
360
|
+
this._waitForScriptPause(this.releaseControl.bind(this));
|
|
361
|
+
}.bind(this));
|
|
362
|
+
|
|
363
|
+
this.takeControl();
|
|
364
|
+
};
|
|
365
|
+
|
|
366
|
+
// Tests that pressing "Pause" will pause script execution if the script
|
|
367
|
+
// is already running.
|
|
368
|
+
TestSuite.prototype.testPauseWhenScriptIsRunning = function() {
|
|
369
|
+
this.showPanel('sources').then(function() {
|
|
370
|
+
this.evaluateInConsole_('setTimeout("handleClick()", 0)', didEvaluateInConsole.bind(this));
|
|
371
|
+
}.bind(this));
|
|
372
|
+
|
|
373
|
+
function didEvaluateInConsole(resultText) {
|
|
374
|
+
this.assertTrue(!isNaN(resultText), 'Failed to get timer id: ' + resultText);
|
|
375
|
+
// Wait for some time to make sure that inspected page is running the
|
|
376
|
+
// infinite loop.
|
|
377
|
+
setTimeout(testScriptPause.bind(this), 300);
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
function testScriptPause() {
|
|
381
|
+
// The script should be in infinite loop. Click "Pause" button to
|
|
382
|
+
// pause it and wait for the result.
|
|
383
|
+
UI.panels.sources._togglePause();
|
|
384
|
+
|
|
385
|
+
this._waitForScriptPause(this.releaseControl.bind(this));
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
this.takeControl();
|
|
389
|
+
};
|
|
390
|
+
|
|
391
|
+
/**
|
|
392
|
+
* Tests network size.
|
|
393
|
+
*/
|
|
394
|
+
TestSuite.prototype.testNetworkSize = function() {
|
|
395
|
+
const test = this;
|
|
396
|
+
|
|
397
|
+
function finishRequest(request, finishTime) {
|
|
398
|
+
test.assertEquals(25, request.resourceSize, 'Incorrect total data length');
|
|
399
|
+
test.releaseControl();
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
this.addSniffer(SDK.NetworkDispatcher.prototype, '_finishNetworkRequest', finishRequest);
|
|
403
|
+
|
|
404
|
+
// Reload inspected page to sniff network events
|
|
405
|
+
test.evaluateInConsole_('window.location.reload(true);', function(resultText) {});
|
|
406
|
+
|
|
407
|
+
this.takeControl();
|
|
408
|
+
};
|
|
409
|
+
|
|
410
|
+
/**
|
|
411
|
+
* Tests network sync size.
|
|
412
|
+
*/
|
|
413
|
+
TestSuite.prototype.testNetworkSyncSize = function() {
|
|
414
|
+
const test = this;
|
|
415
|
+
|
|
416
|
+
function finishRequest(request, finishTime) {
|
|
417
|
+
test.assertEquals(25, request.resourceSize, 'Incorrect total data length');
|
|
418
|
+
test.releaseControl();
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
this.addSniffer(SDK.NetworkDispatcher.prototype, '_finishNetworkRequest', finishRequest);
|
|
422
|
+
|
|
423
|
+
// Send synchronous XHR to sniff network events
|
|
424
|
+
test.evaluateInConsole_(
|
|
425
|
+
'let xhr = new XMLHttpRequest(); xhr.open("GET", "chunked", false); xhr.send(null);', function() {});
|
|
426
|
+
|
|
427
|
+
this.takeControl();
|
|
428
|
+
};
|
|
429
|
+
|
|
430
|
+
/**
|
|
431
|
+
* Tests network raw headers text.
|
|
432
|
+
*/
|
|
433
|
+
TestSuite.prototype.testNetworkRawHeadersText = function() {
|
|
434
|
+
const test = this;
|
|
435
|
+
|
|
436
|
+
function finishRequest(request, finishTime) {
|
|
437
|
+
if (!request.responseHeadersText) {
|
|
438
|
+
test.fail('Failure: resource does not have response headers text');
|
|
439
|
+
}
|
|
440
|
+
const index = request.responseHeadersText.indexOf('Date:');
|
|
441
|
+
test.assertEquals(
|
|
442
|
+
112, request.responseHeadersText.substring(index).length, 'Incorrect response headers text length');
|
|
443
|
+
test.releaseControl();
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
this.addSniffer(SDK.NetworkDispatcher.prototype, '_finishNetworkRequest', finishRequest);
|
|
447
|
+
|
|
448
|
+
// Reload inspected page to sniff network events
|
|
449
|
+
test.evaluateInConsole_('window.location.reload(true);', function(resultText) {});
|
|
450
|
+
|
|
451
|
+
this.takeControl();
|
|
452
|
+
};
|
|
453
|
+
|
|
454
|
+
/**
|
|
455
|
+
* Tests network timing.
|
|
456
|
+
*/
|
|
457
|
+
TestSuite.prototype.testNetworkTiming = function() {
|
|
458
|
+
const test = this;
|
|
459
|
+
|
|
460
|
+
function finishRequest(request, finishTime) {
|
|
461
|
+
// Setting relaxed expectations to reduce flakiness.
|
|
462
|
+
// Server sends headers after 100ms, then sends data during another 100ms.
|
|
463
|
+
// We expect these times to be measured at least as 70ms.
|
|
464
|
+
test.assertTrue(
|
|
465
|
+
request.timing.receiveHeadersEnd - request.timing.connectStart >= 70,
|
|
466
|
+
'Time between receiveHeadersEnd and connectStart should be >=70ms, but was ' +
|
|
467
|
+
'receiveHeadersEnd=' + request.timing.receiveHeadersEnd + ', connectStart=' +
|
|
468
|
+
request.timing.connectStart + '.');
|
|
469
|
+
test.assertTrue(
|
|
470
|
+
request.responseReceivedTime - request.startTime >= 0.07,
|
|
471
|
+
'Time between responseReceivedTime and startTime should be >=0.07s, but was ' +
|
|
472
|
+
'responseReceivedTime=' + request.responseReceivedTime + ', startTime=' + request.startTime + '.');
|
|
473
|
+
test.assertTrue(
|
|
474
|
+
request.endTime - request.startTime >= 0.14,
|
|
475
|
+
'Time between endTime and startTime should be >=0.14s, but was ' +
|
|
476
|
+
'endtime=' + request.endTime + ', startTime=' + request.startTime + '.');
|
|
477
|
+
|
|
478
|
+
test.releaseControl();
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
this.addSniffer(SDK.NetworkDispatcher.prototype, '_finishNetworkRequest', finishRequest);
|
|
482
|
+
|
|
483
|
+
// Reload inspected page to sniff network events
|
|
484
|
+
test.evaluateInConsole_('window.location.reload(true);', function(resultText) {});
|
|
485
|
+
|
|
486
|
+
this.takeControl();
|
|
487
|
+
};
|
|
488
|
+
|
|
489
|
+
TestSuite.prototype.testPushTimes = function(url) {
|
|
490
|
+
const test = this;
|
|
491
|
+
let pendingRequestCount = 2;
|
|
492
|
+
|
|
493
|
+
function finishRequest(request, finishTime) {
|
|
494
|
+
test.assertTrue(
|
|
495
|
+
typeof request.timing.pushStart === 'number' && request.timing.pushStart > 0,
|
|
496
|
+
`pushStart is invalid: ${request.timing.pushStart}`);
|
|
497
|
+
test.assertTrue(typeof request.timing.pushEnd === 'number', `pushEnd is invalid: ${request.timing.pushEnd}`);
|
|
498
|
+
test.assertTrue(request.timing.pushStart < request.startTime, 'pushStart should be before startTime');
|
|
499
|
+
if (request.url().endsWith('?pushUseNullEndTime')) {
|
|
500
|
+
test.assertTrue(request.timing.pushEnd === 0, `pushEnd should be 0 but is ${request.timing.pushEnd}`);
|
|
501
|
+
} else {
|
|
502
|
+
test.assertTrue(
|
|
503
|
+
request.timing.pushStart < request.timing.pushEnd,
|
|
504
|
+
`pushStart should be before pushEnd (${request.timing.pushStart} >= ${request.timing.pushEnd})`);
|
|
505
|
+
// The below assertion is just due to the way we generate times in the moch URLRequestJob and is not generally an invariant.
|
|
506
|
+
test.assertTrue(request.timing.pushEnd < request.endTime, 'pushEnd should be before endTime');
|
|
507
|
+
test.assertTrue(request.startTime < request.timing.pushEnd, 'pushEnd should be after startTime');
|
|
508
|
+
}
|
|
509
|
+
if (!--pendingRequestCount) {
|
|
510
|
+
test.releaseControl();
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
this.addSniffer(SDK.NetworkDispatcher.prototype, '_finishNetworkRequest', finishRequest, true);
|
|
515
|
+
|
|
516
|
+
test.evaluateInConsole_('addImage(\'' + url + '\')', function(resultText) {});
|
|
517
|
+
test.evaluateInConsole_('addImage(\'' + url + '?pushUseNullEndTime\')', function(resultText) {});
|
|
518
|
+
this.takeControl();
|
|
519
|
+
};
|
|
520
|
+
|
|
521
|
+
TestSuite.prototype.testConsoleOnNavigateBack = function() {
|
|
522
|
+
|
|
523
|
+
function filteredMessages() {
|
|
524
|
+
return self.SDK.consoleModel.messages().filter(a => a.source !== SDK.ConsoleMessage.MessageSource.Violation);
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
if (filteredMessages().length === 1) {
|
|
528
|
+
firstConsoleMessageReceived.call(this, null);
|
|
529
|
+
} else {
|
|
530
|
+
self.SDK.consoleModel.addEventListener(SDK.ConsoleModel.Events.MessageAdded, firstConsoleMessageReceived, this);
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
|
|
534
|
+
function firstConsoleMessageReceived(event) {
|
|
535
|
+
if (event && event.data.source === SDK.ConsoleMessage.MessageSource.Violation) {
|
|
536
|
+
return;
|
|
537
|
+
}
|
|
538
|
+
self.SDK.consoleModel.removeEventListener(
|
|
539
|
+
SDK.ConsoleModel.Events.MessageAdded, firstConsoleMessageReceived, this);
|
|
540
|
+
this.evaluateInConsole_('clickLink();', didClickLink.bind(this));
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
function didClickLink() {
|
|
544
|
+
// Check that there are no new messages(command is not a message).
|
|
545
|
+
this.assertEquals(3, filteredMessages().length);
|
|
546
|
+
this.evaluateInConsole_('history.back();', didNavigateBack.bind(this));
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
function didNavigateBack() {
|
|
550
|
+
// Make sure navigation completed and possible console messages were pushed.
|
|
551
|
+
this.evaluateInConsole_('void 0;', didCompleteNavigation.bind(this));
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
function didCompleteNavigation() {
|
|
555
|
+
this.assertEquals(7, filteredMessages().length);
|
|
556
|
+
this.releaseControl();
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
this.takeControl();
|
|
560
|
+
};
|
|
561
|
+
|
|
562
|
+
TestSuite.prototype.testSharedWorker = function() {
|
|
563
|
+
function didEvaluateInConsole(resultText) {
|
|
564
|
+
this.assertEquals('2011', resultText);
|
|
565
|
+
this.releaseControl();
|
|
566
|
+
}
|
|
567
|
+
this.evaluateInConsole_('globalVar', didEvaluateInConsole.bind(this));
|
|
568
|
+
this.takeControl();
|
|
569
|
+
};
|
|
570
|
+
|
|
571
|
+
TestSuite.prototype.testPauseInSharedWorkerInitialization1 = function() {
|
|
572
|
+
// Make sure the worker is loaded.
|
|
573
|
+
this.takeControl();
|
|
574
|
+
this._waitForTargets(1, callback.bind(this));
|
|
575
|
+
|
|
576
|
+
function callback() {
|
|
577
|
+
ProtocolClient.test.deprecatedRunAfterPendingDispatches(this.releaseControl.bind(this));
|
|
578
|
+
}
|
|
579
|
+
};
|
|
580
|
+
|
|
581
|
+
TestSuite.prototype.testPauseInSharedWorkerInitialization2 = function() {
|
|
582
|
+
this.takeControl();
|
|
583
|
+
this._waitForTargets(1, callback.bind(this));
|
|
584
|
+
|
|
585
|
+
function callback() {
|
|
586
|
+
const debuggerModel = self.SDK.targetManager.models(SDK.DebuggerModel)[0];
|
|
587
|
+
if (debuggerModel.isPaused()) {
|
|
588
|
+
self.SDK.consoleModel.addEventListener(SDK.ConsoleModel.Events.MessageAdded, onConsoleMessage, this);
|
|
589
|
+
debuggerModel.resume();
|
|
590
|
+
return;
|
|
591
|
+
}
|
|
592
|
+
this._waitForScriptPause(callback.bind(this));
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
function onConsoleMessage(event) {
|
|
596
|
+
const message = event.data.messageText;
|
|
597
|
+
if (message !== 'connected') {
|
|
598
|
+
this.fail('Unexpected message: ' + message);
|
|
599
|
+
}
|
|
600
|
+
this.releaseControl();
|
|
601
|
+
}
|
|
602
|
+
};
|
|
603
|
+
|
|
604
|
+
TestSuite.prototype.testSharedWorkerNetworkPanel = function() {
|
|
605
|
+
this.takeControl();
|
|
606
|
+
this.showPanel('network').then(() => {
|
|
607
|
+
if (!document.querySelector('#network-container')) {
|
|
608
|
+
this.fail('unable to find #network-container');
|
|
609
|
+
}
|
|
610
|
+
this.releaseControl();
|
|
611
|
+
});
|
|
612
|
+
};
|
|
613
|
+
|
|
614
|
+
TestSuite.prototype.enableTouchEmulation = function() {
|
|
615
|
+
const deviceModeModel = new Emulation.DeviceModeModel(function() {});
|
|
616
|
+
deviceModeModel._target = self.SDK.targetManager.mainTarget();
|
|
617
|
+
deviceModeModel._applyTouch(true, true);
|
|
618
|
+
};
|
|
619
|
+
|
|
620
|
+
TestSuite.prototype.waitForDebuggerPaused = function() {
|
|
621
|
+
const debuggerModel = self.SDK.targetManager.mainTarget().model(SDK.DebuggerModel);
|
|
622
|
+
if (debuggerModel.debuggerPausedDetails) {
|
|
623
|
+
return;
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
this.takeControl();
|
|
627
|
+
this._waitForScriptPause(this.releaseControl.bind(this));
|
|
628
|
+
};
|
|
629
|
+
|
|
630
|
+
TestSuite.prototype.switchToPanel = function(panelName) {
|
|
631
|
+
this.showPanel(panelName).then(this.releaseControl.bind(this));
|
|
632
|
+
this.takeControl();
|
|
633
|
+
};
|
|
634
|
+
|
|
635
|
+
// Regression test for crbug.com/370035.
|
|
636
|
+
TestSuite.prototype.testDeviceMetricsOverrides = function() {
|
|
637
|
+
function dumpPageMetrics() {
|
|
638
|
+
return JSON.stringify(
|
|
639
|
+
{width: window.innerWidth, height: window.innerHeight, deviceScaleFactor: window.devicePixelRatio});
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
const test = this;
|
|
643
|
+
|
|
644
|
+
async function testOverrides(params, metrics, callback) {
|
|
645
|
+
await self.SDK.targetManager.mainTarget().emulationAgent().invoke_setDeviceMetricsOverride(params);
|
|
646
|
+
test.evaluateInConsole_('(' + dumpPageMetrics.toString() + ')()', checkMetrics);
|
|
647
|
+
|
|
648
|
+
function checkMetrics(consoleResult) {
|
|
649
|
+
test.assertEquals(
|
|
650
|
+
'"' + JSON.stringify(metrics) + '"', consoleResult, 'Wrong metrics for params: ' + JSON.stringify(params));
|
|
651
|
+
callback();
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
function step1() {
|
|
656
|
+
testOverrides(
|
|
657
|
+
{width: 1200, height: 1000, deviceScaleFactor: 1, mobile: false, fitWindow: true},
|
|
658
|
+
{width: 1200, height: 1000, deviceScaleFactor: 1}, step2);
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
function step2() {
|
|
662
|
+
testOverrides(
|
|
663
|
+
{width: 1200, height: 1000, deviceScaleFactor: 1, mobile: false, fitWindow: false},
|
|
664
|
+
{width: 1200, height: 1000, deviceScaleFactor: 1}, step3);
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
function step3() {
|
|
668
|
+
testOverrides(
|
|
669
|
+
{width: 1200, height: 1000, deviceScaleFactor: 3, mobile: false, fitWindow: true},
|
|
670
|
+
{width: 1200, height: 1000, deviceScaleFactor: 3}, step4);
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
function step4() {
|
|
674
|
+
testOverrides(
|
|
675
|
+
{width: 1200, height: 1000, deviceScaleFactor: 3, mobile: false, fitWindow: false},
|
|
676
|
+
{width: 1200, height: 1000, deviceScaleFactor: 3}, finish);
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
function finish() {
|
|
680
|
+
test.releaseControl();
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
test.takeControl();
|
|
684
|
+
step1();
|
|
685
|
+
};
|
|
686
|
+
|
|
687
|
+
TestSuite.prototype.testDispatchKeyEventShowsAutoFill = function() {
|
|
688
|
+
const test = this;
|
|
689
|
+
let receivedReady = false;
|
|
690
|
+
|
|
691
|
+
function signalToShowAutofill() {
|
|
692
|
+
self.SDK.targetManager.mainTarget().inputAgent().invoke_dispatchKeyEvent(
|
|
693
|
+
{type: 'rawKeyDown', key: 'Down', windowsVirtualKeyCode: 40, nativeVirtualKeyCode: 40});
|
|
694
|
+
self.SDK.targetManager.mainTarget().inputAgent().invoke_dispatchKeyEvent(
|
|
695
|
+
{type: 'keyUp', key: 'Down', windowsVirtualKeyCode: 40, nativeVirtualKeyCode: 40});
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
function selectTopAutoFill() {
|
|
699
|
+
self.SDK.targetManager.mainTarget().inputAgent().invoke_dispatchKeyEvent(
|
|
700
|
+
{type: 'rawKeyDown', key: 'Enter', windowsVirtualKeyCode: 13, nativeVirtualKeyCode: 13});
|
|
701
|
+
self.SDK.targetManager.mainTarget().inputAgent().invoke_dispatchKeyEvent(
|
|
702
|
+
{type: 'keyUp', key: 'Enter', windowsVirtualKeyCode: 13, nativeVirtualKeyCode: 13});
|
|
703
|
+
|
|
704
|
+
test.evaluateInConsole_('document.getElementById("name").value', onResultOfInput);
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
function onResultOfInput(value) {
|
|
708
|
+
// Console adds "" around the response.
|
|
709
|
+
test.assertEquals('"Abbf"', value);
|
|
710
|
+
test.releaseControl();
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
function onConsoleMessage(event) {
|
|
714
|
+
const message = event.data.messageText;
|
|
715
|
+
if (message === 'ready' && !receivedReady) {
|
|
716
|
+
receivedReady = true;
|
|
717
|
+
signalToShowAutofill();
|
|
718
|
+
}
|
|
719
|
+
// This log comes from the browser unittest code.
|
|
720
|
+
if (message === 'didShowSuggestions') {
|
|
721
|
+
selectTopAutoFill();
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
|
|
725
|
+
this.takeControl();
|
|
726
|
+
|
|
727
|
+
// It is possible for the ready console messagage to be already received but not handled
|
|
728
|
+
// or received later. This ensures we can catch both cases.
|
|
729
|
+
self.SDK.consoleModel.addEventListener(SDK.ConsoleModel.Events.MessageAdded, onConsoleMessage, this);
|
|
730
|
+
|
|
731
|
+
const messages = self.SDK.consoleModel.messages();
|
|
732
|
+
if (messages.length) {
|
|
733
|
+
const text = messages[0].messageText;
|
|
734
|
+
this.assertEquals('ready', text);
|
|
735
|
+
signalToShowAutofill();
|
|
736
|
+
}
|
|
737
|
+
};
|
|
738
|
+
|
|
739
|
+
TestSuite.prototype.testKeyEventUnhandled = function() {
|
|
740
|
+
function onKeyEventUnhandledKeyDown(event) {
|
|
741
|
+
this.assertEquals('keydown', event.data.type);
|
|
742
|
+
this.assertEquals('F8', event.data.key);
|
|
743
|
+
this.assertEquals(119, event.data.keyCode);
|
|
744
|
+
this.assertEquals(0, event.data.modifiers);
|
|
745
|
+
this.assertEquals('', event.data.code);
|
|
746
|
+
Host.InspectorFrontendHost.events.removeEventListener(
|
|
747
|
+
Host.InspectorFrontendHostAPI.Events.KeyEventUnhandled, onKeyEventUnhandledKeyDown, this);
|
|
748
|
+
Host.InspectorFrontendHost.events.addEventListener(
|
|
749
|
+
Host.InspectorFrontendHostAPI.Events.KeyEventUnhandled, onKeyEventUnhandledKeyUp, this);
|
|
750
|
+
self.SDK.targetManager.mainTarget().inputAgent().invoke_dispatchKeyEvent(
|
|
751
|
+
{type: 'keyUp', key: 'F8', code: 'F8', windowsVirtualKeyCode: 119, nativeVirtualKeyCode: 119});
|
|
752
|
+
}
|
|
753
|
+
function onKeyEventUnhandledKeyUp(event) {
|
|
754
|
+
this.assertEquals('keyup', event.data.type);
|
|
755
|
+
this.assertEquals('F8', event.data.key);
|
|
756
|
+
this.assertEquals(119, event.data.keyCode);
|
|
757
|
+
this.assertEquals(0, event.data.modifiers);
|
|
758
|
+
this.assertEquals('F8', event.data.code);
|
|
759
|
+
this.releaseControl();
|
|
760
|
+
}
|
|
761
|
+
this.takeControl();
|
|
762
|
+
Host.InspectorFrontendHost.events.addEventListener(
|
|
763
|
+
Host.InspectorFrontendHostAPI.Events.KeyEventUnhandled, onKeyEventUnhandledKeyDown, this);
|
|
764
|
+
self.SDK.targetManager.mainTarget().inputAgent().invoke_dispatchKeyEvent(
|
|
765
|
+
{type: 'rawKeyDown', key: 'F8', windowsVirtualKeyCode: 119, nativeVirtualKeyCode: 119});
|
|
766
|
+
};
|
|
767
|
+
|
|
768
|
+
// Tests that the keys that are forwarded from the browser update
|
|
769
|
+
// when their shortcuts change
|
|
770
|
+
TestSuite.prototype.testForwardedKeysChanged = function() {
|
|
771
|
+
this.takeControl();
|
|
772
|
+
|
|
773
|
+
this.addSniffer(self.UI.shortcutRegistry, '_registerBindings', () => {
|
|
774
|
+
self.SDK.targetManager.mainTarget().inputAgent().invoke_dispatchKeyEvent(
|
|
775
|
+
{type: 'rawKeyDown', key: 'F1', windowsVirtualKeyCode: 112, nativeVirtualKeyCode: 112});
|
|
776
|
+
});
|
|
777
|
+
this.addSniffer(self.UI.shortcutRegistry, 'handleKey', key => {
|
|
778
|
+
this.assertEquals(112, key);
|
|
779
|
+
this.releaseControl();
|
|
780
|
+
});
|
|
781
|
+
|
|
782
|
+
self.Common.settings.moduleSetting('activeKeybindSet').set('vsCode');
|
|
783
|
+
};
|
|
784
|
+
|
|
785
|
+
TestSuite.prototype.testDispatchKeyEventDoesNotCrash = function() {
|
|
786
|
+
self.SDK.targetManager.mainTarget().inputAgent().invoke_dispatchKeyEvent(
|
|
787
|
+
{type: 'rawKeyDown', windowsVirtualKeyCode: 0x23, key: 'End'});
|
|
788
|
+
self.SDK.targetManager.mainTarget().inputAgent().invoke_dispatchKeyEvent(
|
|
789
|
+
{type: 'keyUp', windowsVirtualKeyCode: 0x23, key: 'End'});
|
|
790
|
+
};
|
|
791
|
+
|
|
792
|
+
// Check that showing the certificate viewer does not crash, crbug.com/954874
|
|
793
|
+
TestSuite.prototype.testShowCertificate = function() {
|
|
794
|
+
Host.InspectorFrontendHost.showCertificateViewer([
|
|
795
|
+
'MIIFIDCCBAigAwIBAgIQE0TsEu6R8FUHQv+9fE7j8TANBgkqhkiG9w0BAQsF' +
|
|
796
|
+
'ADBUMQswCQYDVQQGEwJVUzEeMBwGA1UEChMVR29vZ2xlIFRydXN0IFNlcnZp' +
|
|
797
|
+
'Y2VzMSUwIwYDVQQDExxHb29nbGUgSW50ZXJuZXQgQXV0aG9yaXR5IEczMB4X' +
|
|
798
|
+
'DTE5MDMyNjEzNDEwMVoXDTE5MDYxODEzMjQwMFowZzELMAkGA1UEBhMCVVMx' +
|
|
799
|
+
'EzARBgNVBAgMCkNhbGlmb3JuaWExFjAUBgNVBAcMDU1vdW50YWluIFZpZXcx' +
|
|
800
|
+
'EzARBgNVBAoMCkdvb2dsZSBMTEMxFjAUBgNVBAMMDSouYXBwc3BvdC5jb20w' +
|
|
801
|
+
'ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCwca7hj0kyoJVxcvyA' +
|
|
802
|
+
'a8zNKMIXcoPM3aU1KVe7mxZITtwC6/D/D/q4Oe8fBQLeZ3c6qR5Sr3M+611k' +
|
|
803
|
+
'Ab15AcGUgh1Xi0jZqERvd/5+P0aVCFJYeoLrPBzwSMZBStkoiO2CwtV8x06e' +
|
|
804
|
+
'X7qUz7Hvr3oeG+Ma9OUMmIebl//zHtC82mE0mCRBQAW0MWEgT5nOWey74tJR' +
|
|
805
|
+
'GRqUEI8ftV9grAshD5gY8kxxUoMfqrreaXVqcRF58ZPiwUJ0+SbtC5q9cJ+K' +
|
|
806
|
+
'MuYM4TCetEuk/WQsa+1EnSa40dhGRtZjxbwEwQAJ1vLOcIA7AVR/Ck22Uj8X' +
|
|
807
|
+
'UOECercjUrKdDyaAPcLp2TThAgMBAAGjggHZMIIB1TATBgNVHSUEDDAKBggr' +
|
|
808
|
+
'BgEFBQcDATCBrwYDVR0RBIGnMIGkgg0qLmFwcHNwb3QuY29tggsqLmEucnVu' +
|
|
809
|
+
'LmFwcIIVKi50aGlua3dpdGhnb29nbGUuY29tghAqLndpdGhnb29nbGUuY29t' +
|
|
810
|
+
'ghEqLndpdGh5b3V0dWJlLmNvbYILYXBwc3BvdC5jb22CB3J1bi5hcHCCE3Ro' +
|
|
811
|
+
'aW5rd2l0aGdvb2dsZS5jb22CDndpdGhnb29nbGUuY29tgg93aXRoeW91dHVi' +
|
|
812
|
+
'ZS5jb20waAYIKwYBBQUHAQEEXDBaMC0GCCsGAQUFBzAChiFodHRwOi8vcGtp' +
|
|
813
|
+
'Lmdvb2cvZ3NyMi9HVFNHSUFHMy5jcnQwKQYIKwYBBQUHMAGGHWh0dHA6Ly9v' +
|
|
814
|
+
'Y3NwLnBraS5nb29nL0dUU0dJQUczMB0GA1UdDgQWBBTGkpE5o0H9+Wjc05rF' +
|
|
815
|
+
'hNQiYDjBFjAMBgNVHRMBAf8EAjAAMB8GA1UdIwQYMBaAFHfCuFCaZ3Z2sS3C' +
|
|
816
|
+
'htCDoH6mfrpLMCEGA1UdIAQaMBgwDAYKKwYBBAHWeQIFAzAIBgZngQwBAgIw' +
|
|
817
|
+
'MQYDVR0fBCowKDAmoCSgIoYgaHR0cDovL2NybC5wa2kuZ29vZy9HVFNHSUFH' +
|
|
818
|
+
'My5jcmwwDQYJKoZIhvcNAQELBQADggEBALqoYGqWtJW/6obEzY+ehsgfyXb+' +
|
|
819
|
+
'qNIuV09wt95cRF93HlLbBlSZ/Iz8HXX44ZT1/tGAkwKnW0gDKSSab3I8U+e9' +
|
|
820
|
+
'LHbC9VXrgAFENzu89MNKNmK5prwv+MPA2HUQPu4Pad3qXmd4+nKc/EUjtg1d' +
|
|
821
|
+
'/xKGK1Vn6JX3i5ly/rduowez3LxpSAJuIwseum331aQaKC2z2ri++96B8MPU' +
|
|
822
|
+
'KFXzvV2gVGOe3ZYqmwPaG8y38Tba+OzEh59ygl8ydJJhoI6+R3itPSy0aXUU' +
|
|
823
|
+
'lMvvAbfCobXD5kBRQ28ysgbDSDOPs3fraXpAKL92QUjsABs58XBz5vka4swu' +
|
|
824
|
+
'gg/u+ZxaKOqfIm8=',
|
|
825
|
+
'MIIEXDCCA0SgAwIBAgINAeOpMBz8cgY4P5pTHTANBgkqhkiG9w0BAQsFADBM' +
|
|
826
|
+
'MSAwHgYDVQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMjETMBEGA1UEChMK' +
|
|
827
|
+
'R2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2lnbjAeFw0xNzA2MTUwMDAw' +
|
|
828
|
+
'NDJaFw0yMTEyMTUwMDAwNDJaMFQxCzAJBgNVBAYTAlVTMR4wHAYDVQQKExVH' +
|
|
829
|
+
'b29nbGUgVHJ1c3QgU2VydmljZXMxJTAjBgNVBAMTHEdvb2dsZSBJbnRlcm5l' +
|
|
830
|
+
'dCBBdXRob3JpdHkgRzMwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB' +
|
|
831
|
+
'AQDKUkvqHv/OJGuo2nIYaNVWXQ5IWi01CXZaz6TIHLGp/lOJ+600/4hbn7vn' +
|
|
832
|
+
'6AAB3DVzdQOts7G5pH0rJnnOFUAK71G4nzKMfHCGUksW/mona+Y2emJQ2N+a' +
|
|
833
|
+
'icwJKetPKRSIgAuPOB6Aahh8Hb2XO3h9RUk2T0HNouB2VzxoMXlkyW7XUR5m' +
|
|
834
|
+
'w6JkLHnA52XDVoRTWkNty5oCINLvGmnRsJ1zouAqYGVQMc/7sy+/EYhALrVJ' +
|
|
835
|
+
'EA8KbtyX+r8snwU5C1hUrwaW6MWOARa8qBpNQcWTkaIeoYvy/sGIJEmjR0vF' +
|
|
836
|
+
'EwHdp1cSaWIr6/4g72n7OqXwfinu7ZYW97EfoOSQJeAzAgMBAAGjggEzMIIB' +
|
|
837
|
+
'LzAOBgNVHQ8BAf8EBAMCAYYwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUF' +
|
|
838
|
+
'BwMCMBIGA1UdEwEB/wQIMAYBAf8CAQAwHQYDVR0OBBYEFHfCuFCaZ3Z2sS3C' +
|
|
839
|
+
'htCDoH6mfrpLMB8GA1UdIwQYMBaAFJviB1dnHB7AagbeWbSaLd/cGYYuMDUG' +
|
|
840
|
+
'CCsGAQUFBwEBBCkwJzAlBggrBgEFBQcwAYYZaHR0cDovL29jc3AucGtpLmdv' +
|
|
841
|
+
'b2cvZ3NyMjAyBgNVHR8EKzApMCegJaAjhiFodHRwOi8vY3JsLnBraS5nb29n' +
|
|
842
|
+
'L2dzcjIvZ3NyMi5jcmwwPwYDVR0gBDgwNjA0BgZngQwBAgIwKjAoBggrBgEF' +
|
|
843
|
+
'BQcCARYcaHR0cHM6Ly9wa2kuZ29vZy9yZXBvc2l0b3J5LzANBgkqhkiG9w0B' +
|
|
844
|
+
'AQsFAAOCAQEAHLeJluRT7bvs26gyAZ8so81trUISd7O45skDUmAge1cnxhG1' +
|
|
845
|
+
'P2cNmSxbWsoiCt2eux9LSD+PAj2LIYRFHW31/6xoic1k4tbWXkDCjir37xTT' +
|
|
846
|
+
'NqRAMPUyFRWSdvt+nlPqwnb8Oa2I/maSJukcxDjNSfpDh/Bd1lZNgdd/8cLd' +
|
|
847
|
+
'sE3+wypufJ9uXO1iQpnh9zbuFIwsIONGl1p3A8CgxkqI/UAih3JaGOqcpcda' +
|
|
848
|
+
'CIzkBaR9uYQ1X4k2Vg5APRLouzVy7a8IVk6wuy6pm+T7HT4LY8ibS5FEZlfA' +
|
|
849
|
+
'FLSW8NwsVz9SBK2Vqn1N0PIMn5xA6NZVc7o835DLAFshEWfC7TIe3g==',
|
|
850
|
+
'MIIDujCCAqKgAwIBAgILBAAAAAABD4Ym5g0wDQYJKoZIhvcNAQEFBQAwTDEg' +
|
|
851
|
+
'MB4GA1UECxMXR2xvYmFsU2lnbiBSb290IENBIC0gUjIxEzARBgNVBAoTCkds' +
|
|
852
|
+
'b2JhbFNpZ24xEzARBgNVBAMTCkdsb2JhbFNpZ24wHhcNMDYxMjE1MDgwMDAw' +
|
|
853
|
+
'WhcNMjExMjE1MDgwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxTaWduIFJvb3Qg' +
|
|
854
|
+
'Q0EgLSBSMjETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFs' +
|
|
855
|
+
'U2lnbjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKbPJA6+Lm8o' +
|
|
856
|
+
'mUVCxKs+IVSbC9N/hHD6ErPLv4dfxn+G07IwXNb9rfF73OX4YJYJkhD10FPe' +
|
|
857
|
+
'+3t+c4isUoh7SqbKSaZeqKeMWhG8eoLrvozps6yWJQeXSpkqBy+0Hne/ig+1' +
|
|
858
|
+
'AnwblrjFuTosvNYSuetZfeLQBoZfXklqtTleiDTsvHgMCJiEbKjNS7SgfQx5' +
|
|
859
|
+
'TfC4LcshytVsW33hoCmEofnTlEnLJGKRILzdC9XZzPnqJworc5HGnRusyMvo' +
|
|
860
|
+
'4KD0L5CLTfuwNhv2GXqF4G3yYROIXJ/gkwpRl4pazq+r1feqCapgvdzZX99y' +
|
|
861
|
+
'qWATXgAByUr6P6TqBwMhAo6CygPCm48CAwEAAaOBnDCBmTAOBgNVHQ8BAf8E' +
|
|
862
|
+
'BAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUm+IHV2ccHsBqBt5Z' +
|
|
863
|
+
'tJot39wZhi4wNgYDVR0fBC8wLTAroCmgJ4YlaHR0cDovL2NybC5nbG9iYWxz' +
|
|
864
|
+
'aWduLm5ldC9yb290LXIyLmNybDAfBgNVHSMEGDAWgBSb4gdXZxwewGoG3lm0' +
|
|
865
|
+
'mi3f3BmGLjANBgkqhkiG9w0BAQUFAAOCAQEAmYFThxxol4aR7OBKuEQLq4Gs' +
|
|
866
|
+
'J0/WwbgcQ3izDJr86iw8bmEbTUsp9Z8FHSbBuOmDAGJFtqkIk7mpM0sYmsL4' +
|
|
867
|
+
'h4hO291xNBrBVNpGP+DTKqttVCL1OmLNIG+6KYnX3ZHu01yiPqFbQfXf5WRD' +
|
|
868
|
+
'LenVOavSot+3i9DAgBkcRcAtjOj4LaR0VknFBbVPFd5uRHg5h6h+u/N5GJG7' +
|
|
869
|
+
'9G+dwfCMNYxdAfvDbbnvRG15RjF+Cv6pgsH/76tuIMRQyV+dTZsXjAzlAcmg' +
|
|
870
|
+
'QWpzU/qlULRuJQ/7TBj0/VLZjmmx6BEP3ojY+x1J96relc8geMJgEtslQIxq' +
|
|
871
|
+
'/H5COEBkEveegeGTLg=='
|
|
872
|
+
]);
|
|
873
|
+
};
|
|
874
|
+
|
|
875
|
+
// Simple sanity check to make sure network throttling is wired up
|
|
876
|
+
// See crbug.com/747724
|
|
877
|
+
TestSuite.prototype.testOfflineNetworkConditions = async function() {
|
|
878
|
+
const test = this;
|
|
879
|
+
self.SDK.multitargetNetworkManager.setNetworkConditions(SDK.NetworkManager.OfflineConditions);
|
|
880
|
+
|
|
881
|
+
function finishRequest(request) {
|
|
882
|
+
test.assertEquals(
|
|
883
|
+
'net::ERR_INTERNET_DISCONNECTED', request.localizedFailDescription, 'Request should have failed');
|
|
884
|
+
test.releaseControl();
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
this.addSniffer(SDK.NetworkDispatcher.prototype, '_finishNetworkRequest', finishRequest);
|
|
888
|
+
|
|
889
|
+
test.takeControl();
|
|
890
|
+
test.evaluateInConsole_('window.location.reload(true);', function(resultText) {});
|
|
891
|
+
};
|
|
892
|
+
|
|
893
|
+
TestSuite.prototype.testEmulateNetworkConditions = function() {
|
|
894
|
+
const test = this;
|
|
895
|
+
|
|
896
|
+
function testPreset(preset, messages, next) {
|
|
897
|
+
function onConsoleMessage(event) {
|
|
898
|
+
const index = messages.indexOf(event.data.messageText);
|
|
899
|
+
if (index === -1) {
|
|
900
|
+
test.fail('Unexpected message: ' + event.data.messageText);
|
|
901
|
+
return;
|
|
902
|
+
}
|
|
903
|
+
|
|
904
|
+
messages.splice(index, 1);
|
|
905
|
+
if (!messages.length) {
|
|
906
|
+
self.SDK.consoleModel.removeEventListener(SDK.ConsoleModel.Events.MessageAdded, onConsoleMessage, this);
|
|
907
|
+
next();
|
|
908
|
+
}
|
|
909
|
+
}
|
|
910
|
+
|
|
911
|
+
self.SDK.consoleModel.addEventListener(SDK.ConsoleModel.Events.MessageAdded, onConsoleMessage, this);
|
|
912
|
+
self.SDK.multitargetNetworkManager.setNetworkConditions(preset);
|
|
913
|
+
}
|
|
914
|
+
|
|
915
|
+
test.takeControl();
|
|
916
|
+
step1();
|
|
917
|
+
|
|
918
|
+
function step1() {
|
|
919
|
+
testPreset(
|
|
920
|
+
MobileThrottling.networkPresets[2],
|
|
921
|
+
[
|
|
922
|
+
'offline event: online = false', 'connection change event: type = none; downlinkMax = 0; effectiveType = 4g'
|
|
923
|
+
],
|
|
924
|
+
step2);
|
|
925
|
+
}
|
|
926
|
+
|
|
927
|
+
function step2() {
|
|
928
|
+
testPreset(
|
|
929
|
+
MobileThrottling.networkPresets[1],
|
|
930
|
+
[
|
|
931
|
+
'online event: online = true',
|
|
932
|
+
'connection change event: type = cellular; downlinkMax = 0.3814697265625; effectiveType = 2g'
|
|
933
|
+
],
|
|
934
|
+
step3);
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
function step3() {
|
|
938
|
+
testPreset(
|
|
939
|
+
MobileThrottling.networkPresets[0],
|
|
940
|
+
['connection change event: type = cellular; downlinkMax = 1.373291015625; effectiveType = 3g'],
|
|
941
|
+
test.releaseControl.bind(test));
|
|
942
|
+
}
|
|
943
|
+
};
|
|
944
|
+
|
|
945
|
+
TestSuite.prototype.testScreenshotRecording = function() {
|
|
946
|
+
const test = this;
|
|
947
|
+
|
|
948
|
+
function performActionsInPage(callback) {
|
|
949
|
+
let count = 0;
|
|
950
|
+
const div = document.createElement('div');
|
|
951
|
+
div.setAttribute('style', 'left: 0px; top: 0px; width: 100px; height: 100px; position: absolute;');
|
|
952
|
+
document.body.appendChild(div);
|
|
953
|
+
requestAnimationFrame(frame);
|
|
954
|
+
function frame() {
|
|
955
|
+
const color = [0, 0, 0];
|
|
956
|
+
color[count % 3] = 255;
|
|
957
|
+
div.style.backgroundColor = 'rgb(' + color.join(',') + ')';
|
|
958
|
+
if (++count > 10) {
|
|
959
|
+
requestAnimationFrame(callback);
|
|
960
|
+
} else {
|
|
961
|
+
requestAnimationFrame(frame);
|
|
962
|
+
}
|
|
963
|
+
}
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
const captureFilmStripSetting = self.Common.settings.createSetting('timelineCaptureFilmStrip', false);
|
|
967
|
+
captureFilmStripSetting.set(true);
|
|
968
|
+
test.evaluateInConsole_(performActionsInPage.toString(), function() {});
|
|
969
|
+
test.invokeAsyncWithTimeline_('performActionsInPage', onTimelineDone);
|
|
970
|
+
|
|
971
|
+
function onTimelineDone() {
|
|
972
|
+
captureFilmStripSetting.set(false);
|
|
973
|
+
const filmStripModel = UI.panels.timeline._performanceModel.filmStripModel();
|
|
974
|
+
const frames = filmStripModel.frames();
|
|
975
|
+
test.assertTrue(frames.length > 4 && typeof frames.length === 'number');
|
|
976
|
+
loadFrameImages(frames);
|
|
977
|
+
}
|
|
978
|
+
|
|
979
|
+
function loadFrameImages(frames) {
|
|
980
|
+
const readyImages = [];
|
|
981
|
+
for (const frame of frames) {
|
|
982
|
+
frame.imageDataPromise().then(onGotImageData);
|
|
983
|
+
}
|
|
984
|
+
|
|
985
|
+
function onGotImageData(data) {
|
|
986
|
+
const image = new Image();
|
|
987
|
+
test.assertTrue(Boolean(data), 'No image data for frame');
|
|
988
|
+
image.addEventListener('load', onLoad);
|
|
989
|
+
image.src = 'data:image/jpg;base64,' + data;
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
function onLoad(event) {
|
|
993
|
+
readyImages.push(event.target);
|
|
994
|
+
if (readyImages.length === frames.length) {
|
|
995
|
+
validateImagesAndCompleteTest(readyImages);
|
|
996
|
+
}
|
|
997
|
+
}
|
|
998
|
+
}
|
|
999
|
+
|
|
1000
|
+
function validateImagesAndCompleteTest(images) {
|
|
1001
|
+
let redCount = 0;
|
|
1002
|
+
let greenCount = 0;
|
|
1003
|
+
let blueCount = 0;
|
|
1004
|
+
|
|
1005
|
+
const canvas = document.createElement('canvas');
|
|
1006
|
+
const ctx = canvas.getContext('2d');
|
|
1007
|
+
for (const image of images) {
|
|
1008
|
+
test.assertTrue(image.naturalWidth > 10);
|
|
1009
|
+
test.assertTrue(image.naturalHeight > 10);
|
|
1010
|
+
canvas.width = image.naturalWidth;
|
|
1011
|
+
canvas.height = image.naturalHeight;
|
|
1012
|
+
ctx.drawImage(image, 0, 0);
|
|
1013
|
+
const data = ctx.getImageData(0, 0, 1, 1);
|
|
1014
|
+
const color = Array.prototype.join.call(data.data, ',');
|
|
1015
|
+
if (data.data[0] > 200) {
|
|
1016
|
+
redCount++;
|
|
1017
|
+
} else if (data.data[1] > 200) {
|
|
1018
|
+
greenCount++;
|
|
1019
|
+
} else if (data.data[2] > 200) {
|
|
1020
|
+
blueCount++;
|
|
1021
|
+
} else {
|
|
1022
|
+
test.fail('Unexpected color: ' + color);
|
|
1023
|
+
}
|
|
1024
|
+
}
|
|
1025
|
+
test.assertTrue(redCount && greenCount && blueCount, 'Color sanity check failed');
|
|
1026
|
+
test.releaseControl();
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
test.takeControl();
|
|
1030
|
+
};
|
|
1031
|
+
|
|
1032
|
+
TestSuite.prototype.testSettings = function() {
|
|
1033
|
+
const test = this;
|
|
1034
|
+
|
|
1035
|
+
createSettings();
|
|
1036
|
+
test.takeControl();
|
|
1037
|
+
setTimeout(reset, 0);
|
|
1038
|
+
|
|
1039
|
+
function createSettings() {
|
|
1040
|
+
const localSetting = self.Common.settings.createLocalSetting('local', undefined);
|
|
1041
|
+
localSetting.set({s: 'local', n: 1});
|
|
1042
|
+
const globalSetting = self.Common.settings.createSetting('global', undefined);
|
|
1043
|
+
globalSetting.set({s: 'global', n: 2});
|
|
1044
|
+
}
|
|
1045
|
+
|
|
1046
|
+
function reset() {
|
|
1047
|
+
Root.Runtime.experiments.clearForTest();
|
|
1048
|
+
Host.InspectorFrontendHost.getPreferences(gotPreferences);
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1051
|
+
function gotPreferences(prefs) {
|
|
1052
|
+
Main.Main._instanceForTest._createSettings(prefs);
|
|
1053
|
+
|
|
1054
|
+
const localSetting = self.Common.settings.createLocalSetting('local', undefined);
|
|
1055
|
+
test.assertEquals('object', typeof localSetting.get());
|
|
1056
|
+
test.assertEquals('local', localSetting.get().s);
|
|
1057
|
+
test.assertEquals(1, localSetting.get().n);
|
|
1058
|
+
const globalSetting = self.Common.settings.createSetting('global', undefined);
|
|
1059
|
+
test.assertEquals('object', typeof globalSetting.get());
|
|
1060
|
+
test.assertEquals('global', globalSetting.get().s);
|
|
1061
|
+
test.assertEquals(2, globalSetting.get().n);
|
|
1062
|
+
test.releaseControl();
|
|
1063
|
+
}
|
|
1064
|
+
};
|
|
1065
|
+
|
|
1066
|
+
TestSuite.prototype.testWindowInitializedOnNavigateBack = function() {
|
|
1067
|
+
const test = this;
|
|
1068
|
+
test.takeControl();
|
|
1069
|
+
const messages = self.SDK.consoleModel.messages();
|
|
1070
|
+
if (messages.length === 1) {
|
|
1071
|
+
checkMessages();
|
|
1072
|
+
} else {
|
|
1073
|
+
self.SDK.consoleModel.addEventListener(SDK.ConsoleModel.Events.MessageAdded, checkMessages.bind(this), this);
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1076
|
+
function checkMessages() {
|
|
1077
|
+
const messages = self.SDK.consoleModel.messages();
|
|
1078
|
+
test.assertEquals(1, messages.length);
|
|
1079
|
+
test.assertTrue(messages[0].messageText.indexOf('Uncaught') === -1);
|
|
1080
|
+
test.releaseControl();
|
|
1081
|
+
}
|
|
1082
|
+
};
|
|
1083
|
+
|
|
1084
|
+
TestSuite.prototype.testConsoleContextNames = function() {
|
|
1085
|
+
const test = this;
|
|
1086
|
+
test.takeControl();
|
|
1087
|
+
this.showPanel('console').then(() => this._waitForExecutionContexts(2, onExecutionContexts.bind(this)));
|
|
1088
|
+
|
|
1089
|
+
function onExecutionContexts() {
|
|
1090
|
+
const consoleView = Console.ConsoleView.instance();
|
|
1091
|
+
const selector = consoleView._consoleContextSelector;
|
|
1092
|
+
const values = [];
|
|
1093
|
+
for (const item of selector._items) {
|
|
1094
|
+
values.push(selector.titleFor(item));
|
|
1095
|
+
}
|
|
1096
|
+
test.assertEquals('top', values[0]);
|
|
1097
|
+
test.assertEquals('Simple content script', values[1]);
|
|
1098
|
+
test.releaseControl();
|
|
1099
|
+
}
|
|
1100
|
+
};
|
|
1101
|
+
|
|
1102
|
+
TestSuite.prototype.testRawHeadersWithHSTS = function(url) {
|
|
1103
|
+
const test = this;
|
|
1104
|
+
test.takeControl();
|
|
1105
|
+
self.SDK.targetManager.addModelListener(
|
|
1106
|
+
SDK.NetworkManager, SDK.NetworkManager.Events.ResponseReceived, onResponseReceived);
|
|
1107
|
+
|
|
1108
|
+
this.evaluateInConsole_(`
|
|
1109
|
+
let img = document.createElement('img');
|
|
1110
|
+
img.src = "${url}";
|
|
1111
|
+
document.body.appendChild(img);
|
|
1112
|
+
`, () => {});
|
|
1113
|
+
|
|
1114
|
+
let count = 0;
|
|
1115
|
+
function onResponseReceived(event) {
|
|
1116
|
+
const networkRequest = event.data.request;
|
|
1117
|
+
if (!networkRequest.url().startsWith('http')) {
|
|
1118
|
+
return;
|
|
1119
|
+
}
|
|
1120
|
+
switch (++count) {
|
|
1121
|
+
case 1: // Original redirect
|
|
1122
|
+
test.assertEquals(301, networkRequest.statusCode);
|
|
1123
|
+
test.assertEquals('Moved Permanently', networkRequest.statusText);
|
|
1124
|
+
test.assertTrue(url.endsWith(networkRequest.responseHeaderValue('Location')));
|
|
1125
|
+
break;
|
|
1126
|
+
|
|
1127
|
+
case 2: // HSTS internal redirect
|
|
1128
|
+
test.assertTrue(networkRequest.url().startsWith('http://'));
|
|
1129
|
+
test.assertEquals(307, networkRequest.statusCode);
|
|
1130
|
+
test.assertEquals('Internal Redirect', networkRequest.statusText);
|
|
1131
|
+
test.assertEquals('HSTS', networkRequest.responseHeaderValue('Non-Authoritative-Reason'));
|
|
1132
|
+
test.assertTrue(networkRequest.responseHeaderValue('Location').startsWith('https://'));
|
|
1133
|
+
break;
|
|
1134
|
+
|
|
1135
|
+
case 3: // Final response
|
|
1136
|
+
test.assertTrue(networkRequest.url().startsWith('https://'));
|
|
1137
|
+
test.assertTrue(networkRequest.requestHeaderValue('Referer').startsWith('http://127.0.0.1'));
|
|
1138
|
+
test.assertEquals(200, networkRequest.statusCode);
|
|
1139
|
+
test.assertEquals('OK', networkRequest.statusText);
|
|
1140
|
+
test.assertEquals('132', networkRequest.responseHeaderValue('Content-Length'));
|
|
1141
|
+
test.releaseControl();
|
|
1142
|
+
}
|
|
1143
|
+
}
|
|
1144
|
+
};
|
|
1145
|
+
|
|
1146
|
+
TestSuite.prototype.testDOMWarnings = function() {
|
|
1147
|
+
const messages = self.SDK.consoleModel.messages();
|
|
1148
|
+
this.assertEquals(1, messages.length);
|
|
1149
|
+
const expectedPrefix = '[DOM] Found 2 elements with non-unique id #dup:';
|
|
1150
|
+
this.assertTrue(messages[0].messageText.startsWith(expectedPrefix));
|
|
1151
|
+
};
|
|
1152
|
+
|
|
1153
|
+
TestSuite.prototype.waitForTestResultsInConsole = function() {
|
|
1154
|
+
const messages = self.SDK.consoleModel.messages();
|
|
1155
|
+
for (let i = 0; i < messages.length; ++i) {
|
|
1156
|
+
const text = messages[i].messageText;
|
|
1157
|
+
if (text === 'PASS') {
|
|
1158
|
+
return;
|
|
1159
|
+
}
|
|
1160
|
+
if (/^FAIL/.test(text)) {
|
|
1161
|
+
this.fail(text);
|
|
1162
|
+
} // This will throw.
|
|
1163
|
+
}
|
|
1164
|
+
// Neither PASS nor FAIL, so wait for more messages.
|
|
1165
|
+
function onConsoleMessage(event) {
|
|
1166
|
+
const text = event.data.messageText;
|
|
1167
|
+
if (text === 'PASS') {
|
|
1168
|
+
this.releaseControl();
|
|
1169
|
+
} else if (/^FAIL/.test(text)) {
|
|
1170
|
+
this.fail(text);
|
|
1171
|
+
}
|
|
1172
|
+
}
|
|
1173
|
+
|
|
1174
|
+
self.SDK.consoleModel.addEventListener(SDK.ConsoleModel.Events.MessageAdded, onConsoleMessage, this);
|
|
1175
|
+
this.takeControl();
|
|
1176
|
+
};
|
|
1177
|
+
|
|
1178
|
+
TestSuite.prototype.waitForTestResultsAsMessage = function() {
|
|
1179
|
+
const onMessage = event => {
|
|
1180
|
+
if (!event.data.testOutput) {
|
|
1181
|
+
return;
|
|
1182
|
+
}
|
|
1183
|
+
top.removeEventListener('message', onMessage);
|
|
1184
|
+
const text = event.data.testOutput;
|
|
1185
|
+
if (text === 'PASS') {
|
|
1186
|
+
this.releaseControl();
|
|
1187
|
+
} else {
|
|
1188
|
+
this.fail(text);
|
|
1189
|
+
}
|
|
1190
|
+
};
|
|
1191
|
+
top.addEventListener('message', onMessage);
|
|
1192
|
+
this.takeControl();
|
|
1193
|
+
};
|
|
1194
|
+
|
|
1195
|
+
TestSuite.prototype._overrideMethod = function(receiver, methodName, override) {
|
|
1196
|
+
const original = receiver[methodName];
|
|
1197
|
+
if (typeof original !== 'function') {
|
|
1198
|
+
this.fail(`TestSuite._overrideMethod: ${methodName} is not a function`);
|
|
1199
|
+
return;
|
|
1200
|
+
}
|
|
1201
|
+
receiver[methodName] = function() {
|
|
1202
|
+
let value;
|
|
1203
|
+
try {
|
|
1204
|
+
value = original.apply(receiver, arguments);
|
|
1205
|
+
} finally {
|
|
1206
|
+
receiver[methodName] = original;
|
|
1207
|
+
}
|
|
1208
|
+
override.apply(original, arguments);
|
|
1209
|
+
return value;
|
|
1210
|
+
};
|
|
1211
|
+
};
|
|
1212
|
+
|
|
1213
|
+
TestSuite.prototype.startTimeline = function(callback) {
|
|
1214
|
+
const test = this;
|
|
1215
|
+
this.showPanel('timeline').then(function() {
|
|
1216
|
+
const timeline = UI.panels.timeline;
|
|
1217
|
+
test._overrideMethod(timeline, '_recordingStarted', callback);
|
|
1218
|
+
timeline._toggleRecording();
|
|
1219
|
+
});
|
|
1220
|
+
};
|
|
1221
|
+
|
|
1222
|
+
TestSuite.prototype.stopTimeline = function(callback) {
|
|
1223
|
+
const timeline = UI.panels.timeline;
|
|
1224
|
+
this._overrideMethod(timeline, 'loadingComplete', callback);
|
|
1225
|
+
timeline._toggleRecording();
|
|
1226
|
+
};
|
|
1227
|
+
|
|
1228
|
+
TestSuite.prototype.invokePageFunctionAsync = function(functionName, opt_args, callback_is_always_last) {
|
|
1229
|
+
const callback = arguments[arguments.length - 1];
|
|
1230
|
+
const doneMessage = `DONE: ${functionName}.${++this._asyncInvocationId}`;
|
|
1231
|
+
const argsString = arguments.length < 3 ?
|
|
1232
|
+
'' :
|
|
1233
|
+
Array.prototype.slice.call(arguments, 1, -1).map(arg => JSON.stringify(arg)).join(',') + ',';
|
|
1234
|
+
this.evaluateInConsole_(
|
|
1235
|
+
`${functionName}(${argsString} function() { console.log('${doneMessage}'); });`, function() {});
|
|
1236
|
+
self.SDK.consoleModel.addEventListener(SDK.ConsoleModel.Events.MessageAdded, onConsoleMessage);
|
|
1237
|
+
|
|
1238
|
+
function onConsoleMessage(event) {
|
|
1239
|
+
const text = event.data.messageText;
|
|
1240
|
+
if (text === doneMessage) {
|
|
1241
|
+
self.SDK.consoleModel.removeEventListener(SDK.ConsoleModel.Events.MessageAdded, onConsoleMessage);
|
|
1242
|
+
callback();
|
|
1243
|
+
}
|
|
1244
|
+
}
|
|
1245
|
+
};
|
|
1246
|
+
|
|
1247
|
+
TestSuite.prototype.invokeAsyncWithTimeline_ = function(functionName, callback) {
|
|
1248
|
+
const test = this;
|
|
1249
|
+
|
|
1250
|
+
this.startTimeline(onRecordingStarted);
|
|
1251
|
+
|
|
1252
|
+
function onRecordingStarted() {
|
|
1253
|
+
test.invokePageFunctionAsync(functionName, pageActionsDone);
|
|
1254
|
+
}
|
|
1255
|
+
|
|
1256
|
+
function pageActionsDone() {
|
|
1257
|
+
test.stopTimeline(callback);
|
|
1258
|
+
}
|
|
1259
|
+
};
|
|
1260
|
+
|
|
1261
|
+
TestSuite.prototype.enableExperiment = function(name) {
|
|
1262
|
+
Root.Runtime.experiments.enableForTest(name);
|
|
1263
|
+
};
|
|
1264
|
+
|
|
1265
|
+
TestSuite.prototype.checkInputEventsPresent = function() {
|
|
1266
|
+
const expectedEvents = new Set(arguments);
|
|
1267
|
+
const model = UI.panels.timeline._performanceModel.timelineModel();
|
|
1268
|
+
const asyncEvents = model.virtualThreads().find(thread => thread.isMainFrame).asyncEventsByGroup;
|
|
1269
|
+
const input = asyncEvents.get(TimelineModel.TimelineModel.AsyncEventGroup.input) || [];
|
|
1270
|
+
const prefix = 'InputLatency::';
|
|
1271
|
+
for (const e of input) {
|
|
1272
|
+
if (!e.name.startsWith(prefix)) {
|
|
1273
|
+
continue;
|
|
1274
|
+
}
|
|
1275
|
+
if (e.steps.length < 2) {
|
|
1276
|
+
continue;
|
|
1277
|
+
}
|
|
1278
|
+
if (e.name.startsWith(prefix + 'Mouse') &&
|
|
1279
|
+
typeof TimelineModel.TimelineData.forEvent(e.steps[0]).timeWaitingForMainThread !== 'number') {
|
|
1280
|
+
throw `Missing timeWaitingForMainThread on ${e.name}`;
|
|
1281
|
+
}
|
|
1282
|
+
expectedEvents.delete(e.name.substr(prefix.length));
|
|
1283
|
+
}
|
|
1284
|
+
if (expectedEvents.size) {
|
|
1285
|
+
throw 'Some expected events are not found: ' + Array.from(expectedEvents.keys()).join(',');
|
|
1286
|
+
}
|
|
1287
|
+
};
|
|
1288
|
+
|
|
1289
|
+
TestSuite.prototype.testInspectedElementIs = async function(nodeName) {
|
|
1290
|
+
this.takeControl();
|
|
1291
|
+
await self.runtime.loadModulePromise('elements');
|
|
1292
|
+
if (!Elements.ElementsPanel._firstInspectElementNodeNameForTest) {
|
|
1293
|
+
await new Promise(f => this.addSniffer(Elements.ElementsPanel, '_firstInspectElementCompletedForTest', f));
|
|
1294
|
+
}
|
|
1295
|
+
this.assertEquals(nodeName, Elements.ElementsPanel._firstInspectElementNodeNameForTest);
|
|
1296
|
+
this.releaseControl();
|
|
1297
|
+
};
|
|
1298
|
+
|
|
1299
|
+
TestSuite.prototype.testDisposeEmptyBrowserContext = async function(url) {
|
|
1300
|
+
this.takeControl();
|
|
1301
|
+
const targetAgent = self.SDK.targetManager.mainTarget().targetAgent();
|
|
1302
|
+
const {browserContextId} = await targetAgent.invoke_createBrowserContext();
|
|
1303
|
+
const response1 = await targetAgent.invoke_getBrowserContexts();
|
|
1304
|
+
this.assertEquals(response1.browserContextIds.length, 1);
|
|
1305
|
+
await targetAgent.invoke_disposeBrowserContext({browserContextId});
|
|
1306
|
+
const response2 = await targetAgent.invoke_getBrowserContexts();
|
|
1307
|
+
this.assertEquals(response2.browserContextIds.length, 0);
|
|
1308
|
+
this.releaseControl();
|
|
1309
|
+
};
|
|
1310
|
+
|
|
1311
|
+
TestSuite.prototype.testNewWindowFromBrowserContext = async function(url) {
|
|
1312
|
+
this.takeControl();
|
|
1313
|
+
// Create a BrowserContext.
|
|
1314
|
+
const targetAgent = self.SDK.targetManager.mainTarget().targetAgent();
|
|
1315
|
+
const {browserContextId} = await targetAgent.invoke_createBrowserContext();
|
|
1316
|
+
|
|
1317
|
+
// Cause a Browser to be created with the temp profile.
|
|
1318
|
+
const {targetId} =
|
|
1319
|
+
await targetAgent.invoke_createTarget({url: 'data:text/html,', browserContextId, newWindow: true});
|
|
1320
|
+
await targetAgent.invoke_attachToTarget({targetId, flatten: true});
|
|
1321
|
+
|
|
1322
|
+
// Destroy the temp profile.
|
|
1323
|
+
await targetAgent.invoke_disposeBrowserContext({browserContextId});
|
|
1324
|
+
|
|
1325
|
+
this.releaseControl();
|
|
1326
|
+
};
|
|
1327
|
+
|
|
1328
|
+
TestSuite.prototype.testCreateBrowserContext = async function(url) {
|
|
1329
|
+
this.takeControl();
|
|
1330
|
+
const browserContextIds = [];
|
|
1331
|
+
const targetAgent = self.SDK.targetManager.mainTarget().targetAgent();
|
|
1332
|
+
|
|
1333
|
+
const target1 = await createIsolatedTarget(url);
|
|
1334
|
+
const target2 = await createIsolatedTarget(url);
|
|
1335
|
+
|
|
1336
|
+
const response = await targetAgent.invoke_getBrowserContexts();
|
|
1337
|
+
this.assertEquals(response.browserContextIds.length, 2);
|
|
1338
|
+
this.assertTrue(response.browserContextIds.includes(browserContextIds[0]));
|
|
1339
|
+
this.assertTrue(response.browserContextIds.includes(browserContextIds[1]));
|
|
1340
|
+
|
|
1341
|
+
await evalCode(target1, 'localStorage.setItem("page1", "page1")');
|
|
1342
|
+
await evalCode(target2, 'localStorage.setItem("page2", "page2")');
|
|
1343
|
+
|
|
1344
|
+
this.assertEquals(await evalCode(target1, 'localStorage.getItem("page1")'), 'page1');
|
|
1345
|
+
this.assertEquals(await evalCode(target1, 'localStorage.getItem("page2")'), null);
|
|
1346
|
+
this.assertEquals(await evalCode(target2, 'localStorage.getItem("page1")'), null);
|
|
1347
|
+
this.assertEquals(await evalCode(target2, 'localStorage.getItem("page2")'), 'page2');
|
|
1348
|
+
|
|
1349
|
+
const removedTargets = [];
|
|
1350
|
+
self.SDK.targetManager.observeTargets(
|
|
1351
|
+
{targetAdded: () => {}, targetRemoved: target => removedTargets.push(target)});
|
|
1352
|
+
await Promise.all([disposeBrowserContext(browserContextIds[0]), disposeBrowserContext(browserContextIds[1])]);
|
|
1353
|
+
this.assertEquals(removedTargets.length, 2);
|
|
1354
|
+
this.assertEquals(removedTargets.indexOf(target1) !== -1, true);
|
|
1355
|
+
this.assertEquals(removedTargets.indexOf(target2) !== -1, true);
|
|
1356
|
+
|
|
1357
|
+
this.releaseControl();
|
|
1358
|
+
|
|
1359
|
+
/**
|
|
1360
|
+
* @param {string} url
|
|
1361
|
+
* @return {!Promise<!SDK.Target>}
|
|
1362
|
+
*/
|
|
1363
|
+
async function createIsolatedTarget(url) {
|
|
1364
|
+
const {browserContextId} = await targetAgent.invoke_createBrowserContext();
|
|
1365
|
+
browserContextIds.push(browserContextId);
|
|
1366
|
+
|
|
1367
|
+
const {targetId} = await targetAgent.invoke_createTarget({url: 'about:blank', browserContextId});
|
|
1368
|
+
await targetAgent.invoke_attachToTarget({targetId, flatten: true});
|
|
1369
|
+
|
|
1370
|
+
const target = self.SDK.targetManager.targets().find(target => target.id() === targetId);
|
|
1371
|
+
const pageAgent = target.pageAgent();
|
|
1372
|
+
await pageAgent.invoke_enable();
|
|
1373
|
+
await pageAgent.invoke_navigate({url});
|
|
1374
|
+
return target;
|
|
1375
|
+
}
|
|
1376
|
+
|
|
1377
|
+
async function disposeBrowserContext(browserContextId) {
|
|
1378
|
+
const targetAgent = self.SDK.targetManager.mainTarget().targetAgent();
|
|
1379
|
+
await targetAgent.invoke_disposeBrowserContext({browserContextId});
|
|
1380
|
+
}
|
|
1381
|
+
|
|
1382
|
+
async function evalCode(target, code) {
|
|
1383
|
+
return (await target.runtimeAgent().invoke_evaluate({expression: code})).result.value;
|
|
1384
|
+
}
|
|
1385
|
+
};
|
|
1386
|
+
|
|
1387
|
+
TestSuite.prototype.testInputDispatchEventsToOOPIF = async function() {
|
|
1388
|
+
this.takeControl();
|
|
1389
|
+
|
|
1390
|
+
await new Promise(callback => this._waitForTargets(2, callback));
|
|
1391
|
+
|
|
1392
|
+
async function takeLogs(target) {
|
|
1393
|
+
const code = `
|
|
1394
|
+
(function() {
|
|
1395
|
+
var result = window.logs.join(' ');
|
|
1396
|
+
window.logs = [];
|
|
1397
|
+
return result;
|
|
1398
|
+
})()
|
|
1399
|
+
`;
|
|
1400
|
+
return (await target.runtimeAgent().invoke_evaluate({expression: code})).result.value;
|
|
1401
|
+
}
|
|
1402
|
+
|
|
1403
|
+
let parentFrameOutput;
|
|
1404
|
+
let childFrameOutput;
|
|
1405
|
+
|
|
1406
|
+
const inputAgent = self.SDK.targetManager.mainTarget().inputAgent();
|
|
1407
|
+
const runtimeAgent = self.SDK.targetManager.mainTarget().runtimeAgent();
|
|
1408
|
+
await inputAgent.invoke_dispatchMouseEvent({type: 'mousePressed', button: 'left', clickCount: 1, x: 10, y: 10});
|
|
1409
|
+
await inputAgent.invoke_dispatchMouseEvent({type: 'mouseMoved', button: 'left', clickCount: 1, x: 10, y: 20});
|
|
1410
|
+
await inputAgent.invoke_dispatchMouseEvent({type: 'mouseReleased', button: 'left', clickCount: 1, x: 10, y: 20});
|
|
1411
|
+
await inputAgent.invoke_dispatchMouseEvent({type: 'mousePressed', button: 'left', clickCount: 1, x: 230, y: 140});
|
|
1412
|
+
await inputAgent.invoke_dispatchMouseEvent({type: 'mouseMoved', button: 'left', clickCount: 1, x: 230, y: 150});
|
|
1413
|
+
await inputAgent.invoke_dispatchMouseEvent({type: 'mouseReleased', button: 'left', clickCount: 1, x: 230, y: 150});
|
|
1414
|
+
parentFrameOutput = 'Event type: mousedown button: 0 x: 10 y: 10 Event type: mouseup button: 0 x: 10 y: 20';
|
|
1415
|
+
this.assertEquals(parentFrameOutput, await takeLogs(self.SDK.targetManager.targets()[0]));
|
|
1416
|
+
childFrameOutput = 'Event type: mousedown button: 0 x: 30 y: 40 Event type: mouseup button: 0 x: 30 y: 50';
|
|
1417
|
+
this.assertEquals(childFrameOutput, await takeLogs(self.SDK.targetManager.targets()[1]));
|
|
1418
|
+
|
|
1419
|
+
|
|
1420
|
+
await inputAgent.invoke_dispatchKeyEvent({type: 'keyDown', key: 'a'});
|
|
1421
|
+
await runtimeAgent.invoke_evaluate({expression: "document.querySelector('iframe').focus()"});
|
|
1422
|
+
await inputAgent.invoke_dispatchKeyEvent({type: 'keyDown', key: 'a'});
|
|
1423
|
+
parentFrameOutput = 'Event type: keydown';
|
|
1424
|
+
this.assertEquals(parentFrameOutput, await takeLogs(self.SDK.targetManager.targets()[0]));
|
|
1425
|
+
childFrameOutput = 'Event type: keydown';
|
|
1426
|
+
this.assertEquals(childFrameOutput, await takeLogs(self.SDK.targetManager.targets()[1]));
|
|
1427
|
+
|
|
1428
|
+
await inputAgent.invoke_dispatchTouchEvent({type: 'touchStart', touchPoints: [{x: 10, y: 10}]});
|
|
1429
|
+
await inputAgent.invoke_dispatchTouchEvent({type: 'touchEnd', touchPoints: []});
|
|
1430
|
+
await inputAgent.invoke_dispatchTouchEvent({type: 'touchStart', touchPoints: [{x: 230, y: 140}]});
|
|
1431
|
+
await inputAgent.invoke_dispatchTouchEvent({type: 'touchEnd', touchPoints: []});
|
|
1432
|
+
parentFrameOutput = 'Event type: touchstart touch x: 10 touch y: 10';
|
|
1433
|
+
this.assertEquals(parentFrameOutput, await takeLogs(self.SDK.targetManager.targets()[0]));
|
|
1434
|
+
childFrameOutput = 'Event type: touchstart touch x: 30 touch y: 40';
|
|
1435
|
+
this.assertEquals(childFrameOutput, await takeLogs(self.SDK.targetManager.targets()[1]));
|
|
1436
|
+
|
|
1437
|
+
this.releaseControl();
|
|
1438
|
+
};
|
|
1439
|
+
|
|
1440
|
+
TestSuite.prototype.testLoadResourceForFrontend = async function(baseURL, fileURL) {
|
|
1441
|
+
const test = this;
|
|
1442
|
+
const loggedHeaders = new Set(['cache-control', 'pragma']);
|
|
1443
|
+
function testCase(url, headers, expectedStatus, expectedHeaders, expectedContent) {
|
|
1444
|
+
return new Promise(fulfill => {
|
|
1445
|
+
Host.ResourceLoader.load(url, headers, callback);
|
|
1446
|
+
|
|
1447
|
+
function callback(success, headers, content, errorDescription) {
|
|
1448
|
+
test.assertEquals(expectedStatus, errorDescription.statusCode);
|
|
1449
|
+
|
|
1450
|
+
const headersArray = [];
|
|
1451
|
+
for (const name in headers) {
|
|
1452
|
+
const nameLower = name.toLowerCase();
|
|
1453
|
+
if (loggedHeaders.has(nameLower)) {
|
|
1454
|
+
headersArray.push(nameLower);
|
|
1455
|
+
}
|
|
1456
|
+
}
|
|
1457
|
+
headersArray.sort();
|
|
1458
|
+
test.assertEquals(expectedHeaders.join(', '), headersArray.join(', '));
|
|
1459
|
+
test.assertEquals(expectedContent, content);
|
|
1460
|
+
fulfill();
|
|
1461
|
+
}
|
|
1462
|
+
});
|
|
1463
|
+
}
|
|
1464
|
+
|
|
1465
|
+
this.takeControl();
|
|
1466
|
+
await testCase(baseURL + 'non-existent.html', undefined, 404, [], '');
|
|
1467
|
+
await testCase(baseURL + 'hello.html', undefined, 200, [], '<!doctype html>\n<p>hello</p>\n');
|
|
1468
|
+
await testCase(baseURL + 'echoheader?x-devtools-test', {'x-devtools-test': 'Foo'}, 200, ['cache-control'], 'Foo');
|
|
1469
|
+
await testCase(baseURL + 'set-header?pragma:%20no-cache', undefined, 200, ['pragma'], 'pragma: no-cache');
|
|
1470
|
+
|
|
1471
|
+
await self.SDK.targetManager.mainTarget().runtimeAgent().invoke_evaluate({
|
|
1472
|
+
expression: `fetch("/set-cookie?devtools-test-cookie=Bar",
|
|
1473
|
+
{credentials: 'include'})`,
|
|
1474
|
+
awaitPromise: true
|
|
1475
|
+
});
|
|
1476
|
+
await testCase(baseURL + 'echoheader?Cookie', undefined, 200, ['cache-control'], 'devtools-test-cookie=Bar');
|
|
1477
|
+
|
|
1478
|
+
await self.SDK.targetManager.mainTarget().runtimeAgent().invoke_evaluate({
|
|
1479
|
+
expression: `fetch("/set-cookie?devtools-test-cookie=same-site-cookie;SameSite=Lax",
|
|
1480
|
+
{credentials: 'include'})`,
|
|
1481
|
+
awaitPromise: true
|
|
1482
|
+
});
|
|
1483
|
+
await testCase(
|
|
1484
|
+
baseURL + 'echoheader?Cookie', undefined, 200, ['cache-control'], 'devtools-test-cookie=same-site-cookie');
|
|
1485
|
+
await testCase('data:text/html,<body>hello</body>', undefined, 200, [], '<body>hello</body>');
|
|
1486
|
+
await testCase(fileURL, undefined, 200, [], '<html>\n<body>\nDummy page.\n</body>\n</html>\n');
|
|
1487
|
+
await testCase(fileURL + 'thisfileshouldnotbefound', undefined, 404, [], '');
|
|
1488
|
+
|
|
1489
|
+
this.releaseControl();
|
|
1490
|
+
};
|
|
1491
|
+
|
|
1492
|
+
TestSuite.prototype.testExtensionWebSocketUserAgentOverride = async function(websocketPort) {
|
|
1493
|
+
this.takeControl();
|
|
1494
|
+
|
|
1495
|
+
const testUserAgent = 'test user agent';
|
|
1496
|
+
self.SDK.multitargetNetworkManager.setUserAgentOverride(testUserAgent);
|
|
1497
|
+
|
|
1498
|
+
function onRequestUpdated(event) {
|
|
1499
|
+
const request = event.data;
|
|
1500
|
+
if (request.resourceType() !== Common.resourceTypes.WebSocket) {
|
|
1501
|
+
return;
|
|
1502
|
+
}
|
|
1503
|
+
if (!request.requestHeadersText()) {
|
|
1504
|
+
return;
|
|
1505
|
+
}
|
|
1506
|
+
|
|
1507
|
+
let actualUserAgent = 'no user-agent header';
|
|
1508
|
+
for (const {name, value} of request.requestHeaders()) {
|
|
1509
|
+
if (name.toLowerCase() === 'user-agent') {
|
|
1510
|
+
actualUserAgent = value;
|
|
1511
|
+
}
|
|
1512
|
+
}
|
|
1513
|
+
this.assertEquals(testUserAgent, actualUserAgent);
|
|
1514
|
+
this.releaseControl();
|
|
1515
|
+
}
|
|
1516
|
+
self.SDK.targetManager.addModelListener(
|
|
1517
|
+
SDK.NetworkManager, SDK.NetworkManager.Events.RequestUpdated, onRequestUpdated.bind(this));
|
|
1518
|
+
|
|
1519
|
+
this.evaluateInConsole_(`new WebSocket('ws://127.0.0.1:${websocketPort}')`, () => {});
|
|
1520
|
+
};
|
|
1521
|
+
|
|
1522
|
+
/**
|
|
1523
|
+
* Serializes array of uiSourceCodes to string.
|
|
1524
|
+
* @param {!Array.<!Workspace.UISourceCode>} uiSourceCodes
|
|
1525
|
+
* @return {string}
|
|
1526
|
+
*/
|
|
1527
|
+
TestSuite.prototype.uiSourceCodesToString_ = function(uiSourceCodes) {
|
|
1528
|
+
const names = [];
|
|
1529
|
+
for (let i = 0; i < uiSourceCodes.length; i++) {
|
|
1530
|
+
names.push('"' + uiSourceCodes[i].url() + '"');
|
|
1531
|
+
}
|
|
1532
|
+
return names.join(',');
|
|
1533
|
+
};
|
|
1534
|
+
|
|
1535
|
+
/**
|
|
1536
|
+
* Returns all loaded non anonymous uiSourceCodes.
|
|
1537
|
+
* @return {!Array.<!Workspace.UISourceCode>}
|
|
1538
|
+
*/
|
|
1539
|
+
TestSuite.prototype.nonAnonymousUISourceCodes_ = function() {
|
|
1540
|
+
/**
|
|
1541
|
+
* @param {!Workspace.UISourceCode} uiSourceCode
|
|
1542
|
+
*/
|
|
1543
|
+
function filterOutService(uiSourceCode) {
|
|
1544
|
+
return !uiSourceCode.project().isServiceProject();
|
|
1545
|
+
}
|
|
1546
|
+
|
|
1547
|
+
const uiSourceCodes = self.Workspace.workspace.uiSourceCodes();
|
|
1548
|
+
return uiSourceCodes.filter(filterOutService);
|
|
1549
|
+
};
|
|
1550
|
+
|
|
1551
|
+
/*
|
|
1552
|
+
* Evaluates the code in the console as if user typed it manually and invokes
|
|
1553
|
+
* the callback when the result message is received and added to the console.
|
|
1554
|
+
* @param {string} code
|
|
1555
|
+
* @param {function(string)} callback
|
|
1556
|
+
*/
|
|
1557
|
+
TestSuite.prototype.evaluateInConsole_ = function(code, callback) {
|
|
1558
|
+
function innerEvaluate() {
|
|
1559
|
+
self.UI.context.removeFlavorChangeListener(SDK.ExecutionContext, showConsoleAndEvaluate, this);
|
|
1560
|
+
const consoleView = Console.ConsoleView.instance();
|
|
1561
|
+
consoleView._prompt._appendCommand(code);
|
|
1562
|
+
|
|
1563
|
+
this.addSniffer(Console.ConsoleView.prototype, '_consoleMessageAddedForTest', function(viewMessage) {
|
|
1564
|
+
callback(viewMessage.toMessageElement().deepTextContent());
|
|
1565
|
+
}.bind(this));
|
|
1566
|
+
}
|
|
1567
|
+
|
|
1568
|
+
function showConsoleAndEvaluate() {
|
|
1569
|
+
self.Common.console.showPromise().then(innerEvaluate.bind(this));
|
|
1570
|
+
}
|
|
1571
|
+
|
|
1572
|
+
if (!self.UI.context.flavor(SDK.ExecutionContext)) {
|
|
1573
|
+
self.UI.context.addFlavorChangeListener(SDK.ExecutionContext, showConsoleAndEvaluate, this);
|
|
1574
|
+
return;
|
|
1575
|
+
}
|
|
1576
|
+
showConsoleAndEvaluate.call(this);
|
|
1577
|
+
};
|
|
1578
|
+
|
|
1579
|
+
/**
|
|
1580
|
+
* Checks that all expected scripts are present in the scripts list
|
|
1581
|
+
* in the Scripts panel.
|
|
1582
|
+
* @param {!Array.<string>} expected Regular expressions describing
|
|
1583
|
+
* expected script names.
|
|
1584
|
+
* @return {boolean} Whether all the scripts are in "scripts-files" select
|
|
1585
|
+
* box
|
|
1586
|
+
*/
|
|
1587
|
+
TestSuite.prototype._scriptsAreParsed = function(expected) {
|
|
1588
|
+
const uiSourceCodes = this.nonAnonymousUISourceCodes_();
|
|
1589
|
+
// Check that at least all the expected scripts are present.
|
|
1590
|
+
const missing = expected.slice(0);
|
|
1591
|
+
for (let i = 0; i < uiSourceCodes.length; ++i) {
|
|
1592
|
+
for (let j = 0; j < missing.length; ++j) {
|
|
1593
|
+
if (uiSourceCodes[i].name().search(missing[j]) !== -1) {
|
|
1594
|
+
missing.splice(j, 1);
|
|
1595
|
+
break;
|
|
1596
|
+
}
|
|
1597
|
+
}
|
|
1598
|
+
}
|
|
1599
|
+
return missing.length === 0;
|
|
1600
|
+
};
|
|
1601
|
+
|
|
1602
|
+
/**
|
|
1603
|
+
* Waits for script pause, checks expectations, and invokes the callback.
|
|
1604
|
+
* @param {function():void} callback
|
|
1605
|
+
*/
|
|
1606
|
+
TestSuite.prototype._waitForScriptPause = function(callback) {
|
|
1607
|
+
this.addSniffer(SDK.DebuggerModel.prototype, '_pausedScript', callback);
|
|
1608
|
+
};
|
|
1609
|
+
|
|
1610
|
+
/**
|
|
1611
|
+
* Waits until all the scripts are parsed and invokes the callback.
|
|
1612
|
+
*/
|
|
1613
|
+
TestSuite.prototype._waitUntilScriptsAreParsed = function(expectedScripts, callback) {
|
|
1614
|
+
const test = this;
|
|
1615
|
+
|
|
1616
|
+
function waitForAllScripts() {
|
|
1617
|
+
if (test._scriptsAreParsed(expectedScripts)) {
|
|
1618
|
+
callback();
|
|
1619
|
+
} else {
|
|
1620
|
+
test.addSniffer(UI.panels.sources.sourcesView(), '_addUISourceCode', waitForAllScripts);
|
|
1621
|
+
}
|
|
1622
|
+
}
|
|
1623
|
+
|
|
1624
|
+
waitForAllScripts();
|
|
1625
|
+
};
|
|
1626
|
+
|
|
1627
|
+
TestSuite.prototype._waitForTargets = function(n, callback) {
|
|
1628
|
+
checkTargets.call(this);
|
|
1629
|
+
|
|
1630
|
+
function checkTargets() {
|
|
1631
|
+
if (self.SDK.targetManager.targets().length >= n) {
|
|
1632
|
+
callback.call(null);
|
|
1633
|
+
} else {
|
|
1634
|
+
this.addSniffer(SDK.TargetManager.prototype, 'createTarget', checkTargets.bind(this));
|
|
1635
|
+
}
|
|
1636
|
+
}
|
|
1637
|
+
};
|
|
1638
|
+
|
|
1639
|
+
TestSuite.prototype._waitForExecutionContexts = function(n, callback) {
|
|
1640
|
+
const runtimeModel = self.SDK.targetManager.mainTarget().model(SDK.RuntimeModel);
|
|
1641
|
+
checkForExecutionContexts.call(this);
|
|
1642
|
+
|
|
1643
|
+
function checkForExecutionContexts() {
|
|
1644
|
+
if (runtimeModel.executionContexts().length >= n) {
|
|
1645
|
+
callback.call(null);
|
|
1646
|
+
} else {
|
|
1647
|
+
this.addSniffer(SDK.RuntimeModel.prototype, '_executionContextCreated', checkForExecutionContexts.bind(this));
|
|
1648
|
+
}
|
|
1649
|
+
}
|
|
1650
|
+
};
|
|
1651
|
+
|
|
1652
|
+
|
|
1653
|
+
window.uiTests = new TestSuite(window.domAutomationController);
|
|
1654
|
+
})(window);
|