electron/spec/fixtures/api
Devraj Mehta 8c71e2adc9
feat: add net module to utility process (#40017)
* chore: initial prototype of net api from utility process

* chore: update url loader to work on both browser and utility processes

* chore: add net files to utility process bundle

* chore: re-add app ready check but only on main process

* chore: replace browser thread dcheck's with sequence checker

* refactor: move url loader from browser to common

* refactor: move net-client-request.ts from browser to common

* docs: add utility process to net api docs

* refactor: move net module app ready check to browser only

* refactor: switch import from main to common after moving to common

* test: add basic net module test for utility process

* refactor: switch browser pid with utility pid

* refactor: move electron_api_net from browser to common

* chore: add fetch to utility net module

* chore: add isOnline and online to utility net module

* refactor: move net spec helpers into helper file

* refactor: break apart net module tests

Adds two additional net module test files: `api-net-session-spec.ts` for
tests that depend on a session being available (aka depend on running on
the main process) and `api-net-custom-protocols-spec.ts` for custom
protocol tests. This enables running `api-net-spec.ts` in the utility
process.

* test: add utility process mocha runner to run net module tests

* docs: add utility process to net module classes

* refactor: update imports in lib/utility to use electron/utility

* chore: check browser context before using in main process

Since the browser context supplied to the SimpleURLLoaderWrapper can now
be null for use in the UtilityProcess, adding a null check for the main
process before use to get a more sensible error if something goes wrong.

Co-authored-by: Cheng Zhao <github@zcbenz.com>

* chore: remove test debugging

* chore: remove unnecessary header include

* docs: add utility process net module limitations

* test: run net module tests in utility process individually

* refactor: clean up prior utility process net tests

* chore: add resolveHost to utility process net module

* chore: replace resolve host dcheck with sequence checker

* test: add net module tests for net.resolveHost

* docs: remove utility process limitation for resolveHost

---------

Co-authored-by: deepak1556 <hop2deep@gmail.com>
Co-authored-by: Cheng Zhao <github@zcbenz.com>
2024-01-04 16:20:37 -05:00
..
app-path ci: cleanup up test app directories (#25145) 2020-08-31 14:07:12 -04:00
command-line ci: cleanup up test app directories (#25145) 2020-08-31 14:07:12 -04:00
context-bridge chore: cleanup unusued variables + enable linting (#38898) 2023-06-26 02:51:54 -07:00
cookie-app chore: bump chromium to 104.0.5073.0 (main) (#34272) 2022-06-01 08:12:47 +02:00
default-menu refactor: use optional catch binding (#39232) 2023-07-27 10:53:45 -04:00
electron-main-module test: drop now-empty remote runner (#35343) 2022-08-16 15:23:13 -04:00
exit-closes-all-windows-app build: enable JS semicolons (#22783) 2020-03-20 13:28:31 -07:00
first-party-sets test: add first-party-set chromium tests (#34827) 2022-07-07 15:14:53 -04:00
ipc-main-listeners test: drop now-empty remote runner (#35343) 2022-08-16 15:23:13 -04:00
locale-check feat: add app.getPreferredSystemLanguages() API (#36035) 2022-11-09 10:50:43 -05:00
mixed-sandbox-app refactor: use node scheme imports in spec (#38487) 2023-06-15 10:42:27 -04:00
net-log test: drop now-empty remote runner (#35343) 2022-08-16 15:23:13 -04:00
quit-app test: make test apps' name prefixed with electron-test- (#33511) 2022-03-30 13:17:34 -04:00
relaunch refactor: use node scheme imports in spec (#38487) 2023-06-15 10:42:27 -04:00
safe-storage feat: expose safestorage backend information on linux (#38873) 2023-07-13 11:14:33 +02:00
service-workers chore: cleanup unusued variables + enable linting (#38898) 2023-06-26 02:51:54 -07:00
shared-worker build: enable JS semicolons (#22783) 2020-03-20 13:28:31 -07:00
singleton chore: cleanup unusued variables + enable linting (#38898) 2023-06-26 02:51:54 -07:00
singleton-data revert: add first-instance-ack event to the app.requestSingleInstanceLock() flow (#34297) 2022-05-22 22:20:54 -07:00
singleton-userdata refactor: use node scheme imports in spec (#38487) 2023-06-15 10:42:27 -04:00
test-menu-null test: drop now-empty remote runner (#35343) 2022-08-16 15:23:13 -04:00
test-menu-visibility test: drop now-empty remote runner (#35343) 2022-08-16 15:23:13 -04:00
utility-process feat: add net module to utility process (#40017) 2024-01-04 16:20:37 -05:00
window-all-closed ci: cleanup up test app directories (#25145) 2020-08-31 14:07:12 -04:00
beforeunload-empty-string.html test: drop now-empty remote runner (#35343) 2022-08-16 15:23:13 -04:00
beforeunload-false-prevent3.html test: drop now-empty remote runner (#35343) 2022-08-16 15:23:13 -04:00
beforeunload-false.html test: drop now-empty remote runner (#35343) 2022-08-16 15:23:13 -04:00
beforeunload-undefined.html test: drop now-empty remote runner (#35343) 2022-08-16 15:23:13 -04:00
blank.html
close.html refactor: use node scheme imports in spec (#38487) 2023-06-15 10:42:27 -04:00
custom-protocol-shutdown.js test: drop now-empty remote runner (#35343) 2022-08-16 15:23:13 -04:00
did-fail-load-iframe.html
fork-with-node-options.js fix: ignore all NODE_ envs from foreign parent in node process (#40770) 2024-01-04 16:34:08 +09:00
frame-subscriber.html chore: update line endings on HTML files (#37755) 2023-03-29 15:02:13 -04:00
globals.html fix: ensure no node globals passively leak when nodeIntegration is disabled (#21342) 2019-12-02 10:09:47 -08:00
gpu-info.js chore: bump chromium to 93.0.4550.0 (main) (#29751) 2021-06-22 12:17:16 -07:00
isolated-fetch-preload.js build: enable JS semicolons (#22783) 2020-03-20 13:28:31 -07:00
isolated-preload.js build: enable JS semicolons (#22783) 2020-03-20 13:28:31 -07:00
isolated-process.js chore: rename process.contextIsolation to process.contextIsolated (#28259) 2021-03-18 14:00:19 -07:00
isolated.html chore: refactor context isolation spec (#14394) 2018-09-01 08:51:29 +12:00
loaded-from-dataurl.js feat: enable context isolation by default (#26890) 2021-03-01 16:52:29 -05:00
localstorage.html test: move several session specs to the main runner (#18433) 2019-05-28 14:12:59 -07:00
native-window-open-blank.html Add spec for native window.open from iframe 2017-05-26 10:10:36 -07:00
native-window-open-child.html
native-window-open-cross-origin.html Use an existing host name so that it resolves quickly and tests don't time out. 2017-11-24 10:58:53 +09:00
native-window-open-file.html Fix JS style in test HTMLs 2017-04-30 19:43:21 +09:00
native-window-open-iframe.html Add spec for native window.open from iframe 2017-05-26 10:10:36 -07:00
native-window-open-isolated-preload.js build: enable JS semicolons (#22783) 2020-03-20 13:28:31 -07:00
native-window-open-isolated.html Fix JS style in test HTMLs 2017-04-30 19:43:21 +09:00
native-window-open-native-addon.html test: drop now-empty remote runner (#35343) 2022-08-16 15:23:13 -04:00
native-window-open-no-allowpopups.html Add failing spec for native window.open returning null without allowpopups 2017-05-26 10:10:36 -07:00
native-window-open-noopener.html fix: crash when clicking links with target=_blank from webview (#29874) 2021-06-29 18:10:18 -07:00
new-window-preload.js chore: cleanup unusued variables + enable linting (#38898) 2023-06-26 02:51:54 -07:00
new-window-webview-preload.js build: enable JS semicolons (#22783) 2020-03-20 13:28:31 -07:00
new-window-webview.html fix: <webview> not working in scriptable popups (#19198) 2019-07-11 20:56:04 -05:00
new-window.html Add spec for configuring web preferences from sandboxed new-window event 2017-07-17 11:55:15 -07:00
no-leak.html fix: ensure the sandboxed preloads globals do not leak (#17712) 2019-04-16 10:57:02 -07:00
offscreen-rendering.html chore: update line endings on HTML files (#37755) 2023-03-29 15:02:13 -04:00
picture-in-picture.html feat: enable picture-in-picture mode for video tags (#17686) 2019-08-22 19:17:50 +09:00
preload.html spec: add test for syncronous access to blink APIs (#14637) 2018-09-25 10:40:15 +12:00
print-to-pdf-large.html test: more robust PDF specs (#35979) 2022-10-12 10:15:49 -04:00
print-to-pdf-small.html test: more robust PDF specs (#35979) 2022-10-12 10:15:49 -04:00
sandbox.html test: drop now-empty remote runner (#35343) 2022-08-16 15:23:13 -04:00
send-sync-message.html test: drop now-empty remote runner (#35343) 2022-08-16 15:23:13 -04:00
unhandled-rejection-handled.js fix: don't double-log unhandled rejections (#37464) 2023-03-06 11:04:43 +01:00
unhandled-rejection.js fix: don't double-log unhandled rejections (#37464) 2023-03-06 11:04:43 +01:00
unload.html refactor: use node scheme imports in spec (#38487) 2023-06-15 10:42:27 -04:00
webrequest.html test: drop now-empty remote runner (#35343) 2022-08-16 15:23:13 -04:00
window-open-location-change.html Add spec for reloading opened window cross-origin 2017-07-17 11:55:15 -07:00
window-open-location-final.html Add spec for reloading opened window cross-origin 2017-07-17 11:55:15 -07:00
window-open-location-open.html Add spec for reloading opened window cross-origin 2017-07-17 11:55:15 -07:00
window-open-preload.js test: drop now-empty remote runner (#35343) 2022-08-16 15:23:13 -04:00