Commit graph

2087 commits

Author SHA1 Message Date
Milan Burda
702cc84bd3 Don't pass preloadPath via ELECTRON_BROWSER_SANDBOX_LOAD for security reasons (#13031) 2018-08-10 17:19:49 -05:00
Husayn
19cb5bad94 feat: Add creationTime function to process (#13542)
* Add process creation time

* Making docs clear for process creation time

* Address comments for process creation time

* Add process info cc file

* fixing comments around documentation

* Update doc for return val

* Capitalize number in docs

* chore: bump electron-typescript-definitions
2018-08-10 09:03:30 -05:00
Shelley Vohr
7c7543cb39 spec: re-enable app.getAppMetric API (#13962) 2018-08-09 13:35:29 -05:00
Milan Burda
9a1ad2b93f fix: ipcRemote.sendSync regression after moving away from JSON for return values (#13941) 2018-08-09 19:45:10 +10:00
Dominic
a7052efaf4 fix: make menu.popup options optional (#13977)
* add empty object as default param for options

* update docs

* add spec for optional options

* fix: add null check for options
2018-08-08 17:38:52 -05:00
Jeremy Apthorp
e6e621515f chore: disable flaky isCurrentlyAudible test (#13970) 2018-08-07 14:23:48 -05:00
Milan Burda
f904057104 fix: add missing "simple" property in several APIs to prevent proxying of return values (#13905)
* fix: add missing "simple" property in several APIs to prevent proxying of return values

* add tests
2018-08-03 12:07:27 -07:00
Jeremy Apthorp
c068bc7d3d test: make nativeImage relative path test robust to different cwd 2018-08-01 15:19:26 -07:00
Jeremy Apthorp
a4f02724bf refactor: use env var to skip native module tests on win32/debug (#13890) 2018-08-01 13:33:13 +10:00
Samuel Attard
4990b3990b
spec: add more assertions to help smoke out the close all window failures (#13868) 2018-08-01 13:32:07 +10:00
Milan Burda
c52b3d921e fix: some APIs modified for ASAR support cannot be util.promisify'ed (#13845) 2018-08-01 13:06:48 +10:00
Jeremy Apthorp
3bdff2d238
feat: allow setting window shape (#13789)
This binds Widget::SetShape, an API that already exists in Chromium (for
Windows and Linux). It's a more reliable method of having some parts of
your window be "click-through" than the current `setIgnoreMouseEvents`
API, which messes around with the `WS_EX_LAYERED` window style on
Windows, causing strange bugs and incompatibility with hardware
acceleration.
2018-07-30 13:37:40 -07:00
Alexey Kuzmin
69f6bd921b chore(tests): allow usage of deprecated APIs in tests (#13659) 2018-07-30 11:27:58 +10:00
Milan Burda
39c5c200ba fix: util.promisify(setTimeout) (#13840) 2018-07-30 11:14:04 +10:00
Milan Burda
db38c8b620 Fix process.execPath returning parent process path instead of the helper in sandboxed renderer (#13839) 2018-07-30 11:13:42 +10:00
Birunthan Mohanathas
a42ca9eecc feat: Add BrowserWindow.setWindowButtonVisibility()
Fixes #12701 and supersedes #13131.

Ideally we would have added `setTitleBarStyle()`, but that is a
significantly more involved change. For example, consider the case where
we switch from `hidden` to `normal`. We would not only have to show the
traffic light buttons, we would also have to switch the window from a
frameless to a framed window and deal with various other window state.
Lets instead implement a simple solution for #12701.
2018-07-25 10:12:27 -07:00
Aleksei Kuzmin
ea16445be7 chore: [tests] update some BrowserWindow tests
- manually close an existing windows before creating a new one.
  We have to do it because the `afterEach` hook doesn't get called
  if a test fails.
- add some async/await goodies
2018-07-24 10:02:54 -07:00
Cheng Zhao
305e3aad40
refactor: remove private webContents.getId() API (#13674) 2018-07-23 18:08:36 +09:00
Cheng Zhao
a88cdf2d1f
spec: suppress mixed-sandbox test in Windows CI (#13769) 2018-07-23 18:08:06 +09:00
Cheng Zhao
9d6f1a372e
fix: create WebContents for webview on request (#13713) 2018-07-21 11:11:28 +09:00
John Kleinschmidt
613b03c3c7 build: disable found-in-page event test
On Windows release builds, the found-in-page event test causes the test suite to hang.  If the test is run individually, it works fine, but running it as part of the whole test suite causes the test suite to hang.  This works around the issue in #13704 by temporarily disabling that test.
2018-07-18 14:59:46 -04:00
Samuel Attard
777d0113d5
fix: create a window capturer correctly (#13689)
* fix: create a window capturer correctly

We were incorrectly creating two screen capturers instead of a window
capturer

* spec: ensure dc tests pass

* spec: enable all tests after verifying dc tests work
2018-07-17 14:20:50 +10:00
Cheng Zhao
222291631d spec: openDevTools should not crash for frameless window 2018-07-16 10:23:43 +09:00
PalmerAL
ffc15e02a6 fix: add native function to create preload script (#13032)
* add native function to create preload script

* add tests

* fix formatting

* fix tests

* rerun CI
2018-07-13 11:17:11 +09:00
John Kleinschmidt
facb210f64
Merge pull request #13494 from electron/expect-short-specs
chore(spec): convert smaller specs to expect
2018-07-12 08:45:34 -04:00
Felix Rieseberg
deedf6c3f4 feat: Add isCurrentlyAudible() to WebContents (#13614)
* 🔧 Add isCurrentlyAudible() to WebContents

* ❤️ Implement feedback, use await to wait for event

* 👷 Add missing imports
2018-07-12 21:35:11 +10:00
Jeremy Apthorp
bdceea6aca fix: enable spell checking, which broke in upgrade to ch66
Chromium commit [03563dd163][1] changed the way that the
spellcheck-enabled status was checked, defaulting to false.

Added the first (!) test for spellchecking, too.

Fixes #13608.

[1]: 03563dd163
2018-07-11 10:27:56 -07:00
Shelley Vohr
d5d76c56ed
address feedback 2018-07-10 14:20:03 -07:00
Tomas Rycl
9b6a37ead7 test: Better path compare than just strings (#13548)
* Better path comparision than just strings

* Linter fix

* Resolving paths first to always obtain absolute path so path.relative() can work

* Using assert.ok which better fits the test

* No need to resolve parameters of path.resolve

* Added assertion to type of returned path for download item
2018-07-10 21:38:11 +10:00
Cheng Zhao
35b867ff7d Fix failed devtools tests due to fs.statSyncNoException not working (#13584)
* Revert "spec: disable the i18nString test"

This reverts commit 86c79653de.

* update node to fix fs.statSyncNoException
2018-07-09 09:38:48 -05:00
Jeremy Apthorp
f50f8e3f3d chore: [gn] fix CSP warning in debugger API test (#13541)
There's an attempt to suppress the warning in `spec/static/main.js`, which
sets `process.env.ELECTRON_DISABLE_SECURITY_WARNINGS`. However, it sets the
variable too late in the boot process: by the time that line in main.js has
run, a child zygote has already been booted. `test.py` works around this by
setting that environment variable outside of the test process, to ensure that
it gets propagated to all children.

I've been running the GN tests directly with `./out/Default/electron
electron/spec`, rather than through the wrapper script, and the
`api-debugger-spec.js` tests were failing, because they depend on a particular
log message being the first one emitted, and the CSP warning was causing that
test to fail, since it wasn't being correctly suppressed.

Instead of writing another wrapper script, this just fixes the underlying thing
that the warning is complaining about, which I think is reasonable because the
test's pass/fail depends on this specific behaviour.
2018-07-06 15:01:33 -04:00
Cheng Zhao
86c79653de spec: disable the i18nString test
It is failed because of fs.statSyncNoException, I'll fix it in another
PR.
2018-07-06 09:07:56 +09:00
Cheng Zhao
56c24406d6 spec: enable back devtools tests 2018-07-06 09:07:56 +09:00
Hari Juturu
eb223f8bc3 Enable webview in sandbox renderer (#13435)
* Enable webview in sandbox renderer
Security: Inherit embedder prefs onto webview

* cache lastwebprefs
2018-07-03 02:06:26 +10:00
Shelley Vohr
42d173b343
spec: convert menu specs to expect (#13485)
* spec: convert menu-item spec to expect

* spec: convert menu spec to expect
2018-06-30 00:25:28 -07:00
Cheng Zhao
e42c6d3eb7
fix the crash when loading site with jquery (#13475) 2018-06-29 09:42:04 +09:00
Shelley Vohr
9489401e7d
spec: convert smaller specs to expect 2018-06-28 15:40:30 -07:00
Shelley Vohr
fa0704665f
test: temporarily disable failing specs (#13470) 2018-06-27 14:15:24 -07:00
Shelley Vohr
f9e2ec43d0
fix: deprecate properties in app.getAppMetrics() (#13446)
* fix: deprecate properties in app.getAppMetrics()

* address feedback from review

* fix deprecated property location

* simplify test
2018-06-26 23:47:01 -07:00
Cheng Zhao
44aad039c6 fix: do not expose Node's external strings (#13438) 2018-06-27 10:18:09 +10:00
Alexey Kuzmin
f4039d82c3 spec: rewrite and enable a webview's disableguestresize attr test (#13428) 2018-06-26 08:38:04 -07:00
Alexey Kuzmin
10a174fc6a spec: refactor helper closeWindow() function (#13337) 2018-06-22 00:43:15 +10:00
Alexey Kuzmin
b9da1575f0 spec: enable a disabled test (#13346) 2018-06-22 00:42:55 +10:00
Felix Rieseberg
562eddf0e9 test: Upgrade spec dependencies (#13310)
* 📦 Update mocha, mocha-junit-reporter

* 📦 Update graceful-fs, multiparty, q, walkdir

* 📦 Update basic-auth

* 📦 Update ws

* 📦 Update dbus-native

* 📦 Upgrade yargs

* 🔒 Run `npm audit fix`

* 🔧 Fix websocket API change
2018-06-20 17:18:24 +10:00
John Kleinschmidt
fc12b5cab3
Merge pull request #13283 from jack-teng1/fix-asar-pack-cant-find-module
fix: can't load module error when app is packaged
2018-06-19 14:58:37 -04:00
Heilig Benedek
f643ce4f66 revert: frame subscriber deprecation and re-enable tests 2018-06-19 19:49:44 +02:00
Jack Teng
3044607746 spec: fix asar spec due to change in node.js
node.js rename the internalModuleReadFile to internalModuleReadJSON
change spec to reflect this change
2018-06-19 10:42:21 -07:00
John Kleinschmidt
36c1e4cd75
Merge pull request #13267 from electron/expect-debugger-spec
spec: convert debugger spec to expect
2018-06-19 11:22:47 -04:00
John Kleinschmidt
faef453df5
Merge branch 'master' into expect-debugger-spec 2018-06-19 11:22:25 -04:00
Shelley Vohr
cba3a9fcce spec: convert deprecations to expect (#13268)
* spec: convert deprecations to expect

* address feedback from review
2018-06-19 10:22:08 -05:00