Commit graph

2287 commits

Author SHA1 Message Date
Nitish Sakhawalkar
9890d1e251 feat: Implement process.getProcessMemoryInfo to get the process memory usage (#14847)
* feat: Implement process.getMemoryFootprint to get the process memory usage

* Add spec

* fix: must enter node env in callback

* Update function call

* Update spec

* Update API data

* update spec

* Update include

* update test for shared bytes

* Update atom/common/api/atom_bindings.cc

Co-Authored-By: nitsakh <nitsakh@icloud.com>

* Update atom/common/api/atom_bindings.cc

Co-Authored-By: nitsakh <nitsakh@icloud.com>

* Update API

* Update the callback isolate

* Update to work after app ready

* Update docs

* Update docs/api/process.md

Co-Authored-By: nitsakh <nitsakh@icloud.com>

* Update docs/api/process.md

Co-Authored-By: nitsakh <nitsakh@icloud.com>

* Fix crash
2018-11-28 17:57:53 +09:00
Shelley Vohr
41c2685204
feat: promisify win.capturePage() (#15743)
* feat: promisify win.capturePage

* mark optional arg correctly

* Add to breaking changes doc

* properly deprecate win.capturePage

* remove change from api-contract

* document both callback and promise versions

* address docs feedback

* update promisification progress doc
2018-11-27 23:50:53 -05:00
Jeremy Apthorp
5d54d42953 test: fix remote-debugging-port test calling done twice (#15857) 2018-11-28 10:59:05 +09:00
Jeremy Apthorp
455f0669e7
fix: add missing shell_resources.pak to repack target (#15844) 2018-11-27 11:18:18 -08:00
Milan Burda
d63a848011 feat: add activate option to webContents.openDevTools (#13852) 2018-11-27 18:34:44 +09:00
Cheng Zhao
63874da087 test: add test for window.open in BrowserView 2018-11-27 11:10:07 +09:00
Samuel Attard
f02f9ba9fb chore: add spec for --inspect after a -- (#15237) 2018-11-20 16:23:50 -05:00
Ondřej Záruba
de05ff894b feat: Add app.getLocaleCountryCode() method for region detection (#15035)
* Add method to get system´s user region

* Fix linter

* Remove auto types

* Improved detection for POSIX

* Change name, add specs, minor fixes

* Remove left overs

* Fix locale test

* Fix Linux test

* Coding style fixes

* Fix docs

* Add test excaption for Linux

* fix spelling

* Polishing
2018-11-20 15:33:23 -05:00
Pedro Pontes
57d2ae1aec revert: "fix: window.open site instance should belong to same browsing instance (#15216)" (#15757)
This reverts commit 8f35198bfb.
2018-11-20 21:28:26 +01:00
Jeremy Apthorp
0642be296d
fix: crash in sandbox on linux when getting execPath (#15701) 2018-11-15 12:59:01 -08:00
Shelley Vohr
565e4c5910
chore: fix window width in spec for win (#15693) 2018-11-13 11:31:03 -05:00
Pedro Pontes
8f35198bfb fix: window.open site instance should belong to same browsing instance (#15216) 2018-11-12 22:01:43 +01:00
Shelley Vohr
c06f023313
feat: allow partial setting of window bounds (#15677)
Extend the existing win.setBounds functionality by allowing developers to partially update bounds without being forced to pass in all four bounds values. No existing functionality is altere
2018-11-12 15:31:14 -05:00
Jacob
b21dbdb20d fix: bypass DOM storage quota (#15596) 2018-11-12 18:19:01 +01:00
Nitish Sakhawalkar
5994bf6745
fix: Menu accelerators not working (#15094)
This change fixes the regression in the menu accelerators working in linux, on some environments.
2018-11-09 13:54:16 -08:00
John Kleinschmidt
9e2b7dbea5
ci: add testing for mksnapshot (#15627)
* ci: add testing for mksnapshot
2018-11-09 10:54:17 -04:00
Robo
82322968a3 refactor: printing implementation (#15143)
* refactor: basic printing

* move build files to chromium_src/BUILD.gn
* remove dependency on chrome prerender sources

* spec: move printing specs behind feature flag

* build: register pdf compositor service
2018-11-09 14:42:34 +11:00
Cheng Zhao
746beb0d8b fix: destroy WebContents synchronously on shutdown (#15541) 2018-11-08 07:57:28 -08:00
Jeremy Apthorp
7e0e12b8a3 fix: match Chrome's font fallback behavior (#15486)
* fix: match Chrome's font fallback behavior

Fixes #15481

* add a cache

* add test

* another test

* fix tests

* arial -> dejavu sans on linux apparently?
2018-11-08 10:51:51 -04:00
Heilig Benedek
ca2d74e118 feat: add methods to allow customization of save dialog during will-download event (#15497)
* feat: add method to DownloadItem that allows customization of dialog options

* docs: add docs for get/setSaveDialogOptions

* add missing copy constructor for DialogSettings on mac and linux

* fix: don't filter dialog options for mas build, don't return properties

* test: add test for get/setSaveDialogOptions

* fix: remove openDevtools added for debugging

* test: fix failing test because of new event parameter

* docs: use SaveDialogOptions instead of Object
2018-11-08 10:51:06 -04:00
Shelley Vohr
e9ba26f50e
feat: allow registering multiple shortcuts (#15542)
This PR allows for multiple global shortcuts to be registered such that triggering any of them calls the same callback.
2018-11-07 09:40:38 -08:00
Jeremy Apthorp
10969b8c3c
fix: make feature strings more robust to whitespace (#15602)
Fixes #15594
2018-11-06 15:52:06 -08:00
Shelley Vohr
649f04b7bc
chore: add simple set/unset loginitem spec (#15595) 2018-11-06 11:31:32 -08:00
Heilig Benedek
1f5e0c42f3 style: no need for done call in sync tests (#15550) 2018-11-02 10:50:17 -04:00
Jeremy Apthorp
932ffdc1e1
test: fix a possible race condition in sendInputEvent test (#15530) 2018-11-01 10:25:46 -07:00
Cheng Zhao
a8f2646ba6 Fix missing remote object error when calling remote function created in preload script (#15444)
* fix: report wrong context error based on contextId

* fix: destroyed remote renderer warning is now async
2018-10-31 11:26:57 -04:00
Heilig Benedek
aa6f7a5d9f fix: don't append Shift modifier text twice to accelerators (#15400)
* fix: don't append Shift modifier text twice to accelerators

* style: use the new way of creating patches

* test: add menu item accelerator display tests

* fix: allocate accelerator on the stack

* fix: adjust tests to match expected behavior on mac
2018-10-31 10:13:44 -04:00
Shelley Vohr
1d81d1a706 chore: re-enable protocol partition request spec (#15483) 2018-10-31 07:12:32 -05:00
Shelley Vohr
29964079ae chore: re-enable failing netlog spec (#15484) 2018-10-30 17:45:05 -05:00
Shelley Vohr
94f853c654 chore: re-enable execFileSync binary exec spec (#15476) 2018-10-30 15:45:46 -04:00
David Sanders
bae652f46d docs: http protocol handlers can access headers (#15431)
* test: check http protocol handlers can access headers

* docs: http protocol handlers can access headers
2018-10-30 11:37:49 -07:00
Alexey Kuzmin
ec4a0e096f ci: run more Chromium unit tests (#15363)
* test: add an option to native tests runner to run also disabled tests

* ci: run all native tests on clean Chromium

* ci: update the disabled tests list for native unittests
2018-10-25 14:28:50 -04:00
Cheng Zhao
2f3a8ecd42
fix: child window with nativeWindowOpen should disable node integration (#15213)
* fix: child window with nativeWindowOpen should disable node integration

* Revert "fix: do not enable node integration in child window if not enabled (#15076)"

This reverts commit 0252d7686c.

This patch is not needed anymore since we are force disabling node integration
for child windows.
2018-10-25 15:31:07 +09:00
Islam Sharabash
3b6f0d83e1 fix: allow stream protocols to return headers with multiple values (#14887)
* fix: allow stream protocols to return headers with multiple values

This allows stream protocols to return headers with multiple values as
an array of values.

Fixes https://github.com/electron/electron/issues/14778

* Prefer ConvertFromV8

* Cleanup header conversion

1. Deduplicate the code by using a lambda
2. Remove duplicate calls to headers->Get(key)

* Fix broken test

Headers with multiple values are now being converted correctly, this
test asserted the wrong behavior.
2018-10-25 11:34:20 +11:00
Shelley Vohr
1f246229b1 test: convert node spec to expect (#15345) 2018-10-24 11:23:12 +11:00
Shelley Vohr
40874ddec6
fix: update fs methods for options param (#15323)
* fix: update fs methods for options param

* fix: update rest of fs methods with changes
2018-10-23 15:14:05 -07:00
Alexey Kuzmin
5e199152e2 ci: run unittests on clean Chromium (#15125)
* ci: run unittests on clean Chromium

* test: add '--run-only-disabled-tests' flag to "script/native-tests.py"

* ci: add a job to run only disabled unittests

* test: use a different GN config for the native tests

* test: enable blink_common_unittests

* test: disable WeakPtrDeathTest*
2018-10-22 16:12:19 -04:00
Shelley Vohr
939ee94e67
spec: increase MAS timeout for login items (#15291) 2018-10-19 13:11:11 -07:00
Shelley Vohr
f9f34fd628
fix: ability to fetch separators by id (#15290) 2018-10-19 13:09:40 -07:00
Alexey Kuzmin
b3f134de06 test: asyncawaitify one of sandbox related tests (#15252) 2018-10-19 14:28:23 +11:00
Andy Dill
37f2113032 feat: expose setBackgroundThrottling api (#15104) 2018-10-19 11:32:22 +11:00
Michelle Tilley
51f3fb9bde
fix: correctly enable and disable windows on Windows and Linux (#15184) 2018-10-18 14:23:40 -07:00
Nitish Sakhawalkar
a9ca152069 feat: Spellchecker Async Implementation (#14032)
* feat:Spellchecker Async Implementation

* Adhere to chromium style

* Updating dependency to use gh branch

* Update docs and electron-typescript-definitions module

* Fix lint

* Update electron typescript definitions version

* Update spec

* Address review
2018-10-18 11:11:53 -05:00
Milan Burda
db37ab1039 feat: add remote.require() / remote.getGlobal() filtering (#15014) 2018-10-18 14:36:45 +11:00
Milan Burda
508551b81b fix: small refactoring regressions (#15206)
* fix: require('@electron/internal/browser/guest-view-manager')

* fix: add missing crashServicePid used by tests
2018-10-17 12:18:18 -07:00
Jeremy Apthorp
30ccb6aea5
fix: allow renaming electron.exe (#15173) 2018-10-15 17:26:34 -07:00
Nitish Sakhawalkar
0c711f690e fix: add microtask runner and fix promise test (#15071)
* fix: Promise resolution and unit test

* Update to use microtask runner

* Address review
2018-10-16 02:26:47 +11:00
Milan Burda
d3efc52745 feat: add webPreferences.enableRemoteModule option (#13028) 2018-10-13 20:50:07 +03:00
Shelley Vohr
72db5ed7cb fix: split out login item tests (#15135) 2018-10-13 18:52:19 +11:00
Shelley Vohr
6fc2a2a051 fix: natively implement LoginItem functions (#15010) 2018-10-12 15:19:27 -07:00
Heilig Benedek
95696c9456 refactor: move text-to-speech out of chromium_src (#15024)
* chore: add tts patch and buildflag, makes tts work again

* chore: add tts patch and buildflag, makes tts work again

* fix: make things compile

* build: add relevant tts files for linux

* fix: update patch and patch description, should now compile on mac

* build: move chrome specific sources under chromium_src:chrome target

* build: enable_extensions again

We are depending on them, check `//electron/chromium_src:chrome` target
for more info.

* fix: update tts.patch to receive notifications about browser context destruction

* fix: extend browser process from chrome layer

The global state g_browser_process is shared between //chrome
and //electron.

* spec: add basic speech synthesis test

* spec: skip speech tests on ci

* build: fix compilation on windows
2018-10-11 08:52:12 -05:00
Alexey Kuzmin
5788600c46 Revert "FIXME: disable isCurrentlyAudible test to unblock merge" (#15078)
This reverts commit c8a9a3f63c.
2018-10-11 08:26:37 -05:00
Milan Burda
5bd6de52e0 feat: add app.enableSandbox() (#14999) 2018-10-10 15:32:09 +11:00
Samuel Attard
2420cdf027 fix: ensure that the window is focused when testing spellchecker 2018-10-10 14:02:46 +11:00
Jeremy Apthorp
c8a9a3f63c FIXME: disable isCurrentlyAudible test to unblock merge 2018-10-09 14:39:39 -07:00
Jeremy Apthorp
edb96c875e FIXME: disable getGPUInfo test to unblock merge
should be fixed and re-enabled before release
2018-10-09 14:39:39 -07:00
deepak1556
3364c04977 FIXME: disable document.visibilityState/hidden <webview> spec 2018-10-09 14:39:39 -07:00
deepak1556
ba14dbe553 FIXME: disable net log spec 2018-10-09 14:39:39 -07:00
deepak1556
7ec05fb202 spec: update media-started-playing tests based on the autoplay policy 2018-10-09 14:39:39 -07:00
Cheng Zhao
7ba287a05e test: make netLog test pass when app crash on exit 2018-10-09 14:38:00 -07:00
Cheng Zhao
a6256c672a feat: getGPUInfo not longer supports 'complete' on macOS
See https://chromium-review.googlesource.com/c/chromium/src/+/1208362
2018-10-09 14:38:00 -07:00
Charles Kerr
05f4860889
fix: power observer dbus crash (#15030)
* fix: check dbus response for nullptr before using

* chore: use BindOnce for ProxyObject::CallMethod cb

* chore: comment out name of unused argument

* fix: re-enable and fix linux power monitor tests

* fix: change tyop from code comments

* refactor: don't keep unnecessary dbus pointer

* chore: remove the 'TODO: fix this' spec comment
2018-10-09 00:32:19 -05:00
Milan Burda
b50f86ef43 refactor: use separate ipc-renderer-internal / ipc-main-internal APIs for Electron internals (#13940) 2018-10-07 00:48:00 +13:00
Robo
6e5dd735f6 refactor: enable weak ptr unwrap sequence dcheck (#14816)
* refactor: enable weak ptr unwrap sequence dcheck

* spec: remove WeakPtrDeathTest.* from disabled list
2018-10-05 15:29:57 -05:00
Charles Kerr
9d4818c784
fix relaunch on linux (#14975)
* chore: re-enable relaunch test for Linux

* fix: relauncher_linux listening for parent exit
2018-10-04 18:41:37 -05:00
Milan Burda
ae8c0f71b1 chore: remove duplicate code in spec/security-warnings-spec.js (#14967) 2018-10-05 00:24:14 +02:00
Robo
434a6e3561 refactor: create request context from network context (#14656)
* [ci skip] refactor: create request context from network context

* [ci skip] refactor: subscribe to mojo cookiemanager for cookie changes

* [ci skip] refactor: manage the lifetime of custom URLRequestJobFactory

* refactor: use OOP mojo proxy resolver

* revert: add support for kIgnoreCertificateErrorsSPKIList

* build: provide service manifest overlays for content services

* chore: gn format

* fix: log-net-log switch not working as expected

* spec: verify proxy settings are respected from pac script with session.setProxy

* chore: use chrome constants where possible

* fix: initialize request context for global cert fetcher

* refactor: fix destruction of request context getters

* spec: use custom session for proxy tests

* fix: queue up additional stop callbacks while net log is being stopped

* fix: Add CHECK for cookie manager retrieval

* chore: add helper to retrieve logging state for net log module

* fix: ui::ResourceBundle::GetRawDataResourceForScale => GetRawDataResource

* style: comment unused parameters

* build: move //components/certificate_transparency deps from //brightray

* chore: update gritsettings_resource_ids patch

* chore: update api for chromium 68

* fix: net log instance is now a property of session
2018-10-04 13:08:56 -05:00
John Kleinschmidt
038b56e31e
ci: Trigger an arm test on VSTS after CircleCI build (#14898)
* ci: Trigger an arm test on VSTS after CircleCI build
2018-10-04 12:01:16 -04:00
Alexey Kuzmin
f161835fc3 test: disable one test in base_unittests (#14968)
Fails after the Chromium 68 upgrade.
2018-10-04 10:00:30 -04:00
Aleksei Kuzmin
21f382fcae test: disable the "app.relaunch" test on Linux 2018-10-04 00:21:58 +02:00
Jeremy Apthorp
45c2dcddb0 disable failing assert in beginFrameSubscription dirty-rectangle test 2018-10-04 00:15:00 +02:00
Samuel Attard
0ee46cdc26 test: make run-as-node --inspect test more robust on windows 2018-10-04 00:14:59 +02:00
Cheng Zhao
b11b4f2235 test: make before-input-event test more robust 2018-10-04 00:14:59 +02:00
Jeremy Apthorp
09f018ce8c test: fix frame-subscriber test on Mac 2018-10-04 00:14:59 +02:00
Jeremy Apthorp
cc53269231 better crash diagnostics in ffmpeg test 2018-10-04 00:14:59 +02:00
Aleksei Kuzmin
ae95f77d68 test: minor improvements to the Node spec
- reformat some parts
 - better failures reporting with `expect`
 - skip some tests instead of marking them as passed
2018-10-04 00:14:59 +02:00
Milan Burda
5efb0fdff1 feat: add security warnings to sandboxed renderers (#14869)
Also refactor not to use the remote module.
2018-10-03 21:36:12 +02:00
Cheng Zhao
4c4d8c5bfa fix: support ASAR in fs.copyFile (#14942) 2018-10-03 09:36:20 -07:00
Milan Burda
3ad3ade828 refactor: add prefer-const to .eslintrc + fix errors (#14880) 2018-10-02 11:56:31 +10:00
Alexey Kuzmin
c9edf77e8e test: slightly rewrite getGPUInfo() tests (#14863)
Rewrite GPUInfo tests for linux and update `getGPUInfo` functionality for linux.
`basic` and `complete` GPUInfo is same for linux.
2018-10-01 18:34:52 -07:00
Alexey Kuzmin
f1b097024e ci: run more unittests (#14861) 2018-10-01 17:50:52 -05:00
Alexey Kuzmin
60ac03c08f test: disable getGPUInfo() tests on Linux (#14875) 2018-10-01 12:57:38 +10:00
Milan Burda
d48f9bcf7f refactor: implement <webview> methods via dedicated IPCs without the remote module (#14377) 2018-10-01 10:07:50 +09:00
Milan Burda
c61db523c7 refactor: replace var with const / let (#14866) 2018-09-29 09:17:00 +10:00
Samuel Attard
b42493e6e6 test: guarantee the order of webview and devtools creation (#14849) 2018-09-28 12:34:57 -07:00
Samuel Attard
2adb44a402 chore: remove unused files to simply out_dir replacements 2018-09-28 11:16:37 +10:00
Samuel Attard
6be69048e6
fix: handle shortcuts by default if no WebPreferences object exists (#14766)
DevTools webcontents do not have webpreferences

Fixes #14685
2018-09-28 01:41:09 +10:00
Nitish Sakhawalkar
5c108728d6 feat: Implementation of getGPUInfo API. (#13486)
* Implementation of getGPUInfo API.

* Clear promise set

* Changes to promise usage

* Minor fixes

* Fix linux build

* Update spec

* Fix lint (linter didn't run on windows locally)

* Test running single test for CI

* Update spec
2018-09-28 00:59:23 +10:00
Samuel Attard
7dc7cd1d89
fix: send null in debugger callback when no error (#14814)
Fixes #13811
2018-09-27 17:43:45 +10:00
Milan Burda
3df739fa89 refactor: implement crashReporter.start() without the remote module (#14434) 2018-09-26 15:43:34 +10:00
Troy
560b1c17af fix: setMaximizable to be true if window is resizable & maximizable (#14648)
* setMaximizable to be true if window is resizable & maximizable

* Fix linting

* Add regressive test to verify maxmizable state

* Leaves maximizable state of window alone if setResizable is called

* Fix exclusive test

* Fix crashing text

* SetMaximizable unconditionally

* Remember former maximizable state

* Fix accidental mac variable deletion

* Logic modification

* Lint

* Remove unneeded test

* Remove unneeded variable since only Windows is effect
2018-09-26 11:41:40 +10:00
Samuel Attard
50a4a8e9c3
spec: add test for syncronous access to blink APIs (#14637)
This test should ensure we catch a regression of #13787
2018-09-25 10:40:15 +12:00
John Kleinschmidt
8854d9872c test: reenable app moduele > app.exit(exitCode) > closes all windows 2018-09-20 09:32:02 -04:00
Jeremy Apthorp
73d1b76b54
test: runas is not an optional dependency (#14704) 2018-09-19 15:59:37 -07:00
Milan Burda
e22142ef9c feat: add process.takeHeapSnapshot() / webContents.takeHeapSnapshot() (#14456) 2018-09-18 11:00:31 -07:00
Samuel Attard
6d01952e66
chore: replace standard with eslint-config-standard and add custom rules (#14636)
* chore: replace standard with eslint-config-standard

This adds support for --cache so linting JS only takes ~1 second and only lints things that changed

It also allows us to add custom linting rules

* chore: add eslint-plugin-mocha and enable the no-exclusive-tests rule

This will block anyone from pushing / merging a `.only` test or describe
2018-09-16 03:51:23 +10:00
Samuel Attard
7065093869
feat: add will-redirect (#13866)
* feat: add will-redirect to allow people to prevent 30X redirects

* spec: add tests for the will-redirect event

* refactor: implement will-redirect using NavigationThrottle instead of PostTask

This avoids a potential race condition and immediately cancels the
navigation

* docs: add docs for did-redirect-navigation

* refactor: move AtomNavigationThrottle out of net folder

* refactor: update header guard for atom_navigation_throttle.h

* refactor: fix chromium style errors in the GN build

* refactor: update throttle impl to NOTREACHED and std::make_unqique
2018-09-16 01:42:43 +10:00
John Kleinschmidt
838b26ee26 ci: Move Mac builds to Azure Devops (VSTS) (#14588)
* Add support for multiple mocha reporters

Allows us to output to junit file and to console at the same time

* Cleanup VSTS file

Don't install depot_tools everytime as it is already installed.

Only run tests if "RUN_TESTS" environment variable is set
Only notify slack if "NOTIFY_SLACK" environment variable is set

Don't use sccache for release builds

Move CircleCI mac builds to VSTS

* Only build mac PRS from forks

Don't install depot_tools everytime as it is already installed.

Only run tests if "RUN_TESTS" environment variable is set
Only notify slack if "NOTIFY_SLACK" environment variable is set

Don't use sccache for release builds

Move CircleCI mac builds to VSTS

Use sccache helper script

* rename vsts-gn.yml to vsts.yml
Make sure Electron isn't running before starting tests
2018-09-14 11:56:16 -07:00
Samuel Attard
dc2a6c5d71
spec: fix crashReporter upload assertions 2018-09-14 22:23:58 +10:00
Samuel Attard
40f0f049a2
spec: fix final node and chromium specs after assert change 2018-09-14 18:32:17 +10:00