Commit graph

306 commits

Author SHA1 Message Date
Birunthan Mohanathas
7d2226e05e Let Chromium manage document.visibilityState and document.hidden
Chromium already includes the necessary plumbing to manage the
visibility properties and `visibilitychange` event so this gets rid of
most of our custom logic for `BrowserWindow` and `BrowserView`.

Note that `webview` remains unchanged and is still affected by the issues
listed below.

User facing changes:

- The `document` visibility properties and `visibilitychange` event are
  now also updated/fired in response to occlusion changes on macOS. In
  other words, `document.visibilityState` will now be `hidden` on macOS
  if the window is occluded by another window.

- Previously, `visibilitychange` was also fired by *both* Electron and
  Chromium in some cases (e.g. when hiding the window). Now it is only
  fired by Chromium so you no longer get duplicate events.

- The visiblity state of `BrowserWindow`s created with `{ show: false }`
  is now initially `visible` until the window is shown and hidden.

- The visibility state of `BrowserWindow`s with `backgroundThrottling`
  disabled is now permanently `visible`.

This should also fix #6860 (but not for `webview`).
2017-06-06 15:16:01 -07:00
Kevin Sawicki
9f49b71b89 Add cross-origin frame webview spec 2017-05-26 10:10:36 -07:00
Kevin Sawicki
36989e19f8 Add spec for cross-origin blockage 2017-05-26 10:10:36 -07:00
Kevin Sawicki
f5cf6d4ddd Add spec for native window.open from iframe 2017-05-26 10:10:36 -07:00
Kevin Sawicki
a0571e3c72 Add failing spec for native window.open returning null without allowpopups 2017-05-26 10:10:36 -07:00
Kevin Sawicki
fd782706b2 Add explicit spec for removing preload from webview 2017-05-17 13:47:00 -07:00
Kevin Sawicki
e817dbf50a Add failing spec for webviewTag inheritance 2017-05-17 13:27:28 -07:00
Thiago de Arruda
5654ff0d43 Add test for #9387 2017-05-16 09:07:41 -03:00
Ryohei Ikegami
7ac93045b7 Merge branch 'master' into native-window-open 2017-05-11 13:51:43 +09:00
Kevin Sawicki
8c856922f3 Merge pull request #9292 from 22222/issue8911
Fix #8911
2017-05-09 09:06:26 -07:00
Kevin Sawicki
70e199e255 Merge pull request #9333 from electron/process-memory-info-sandbox
Expose `process.get{System,Process}MemoryInfo` to sandbox
2017-05-04 14:17:44 -07:00
22222
042b511a27 Fix #8911 2017-05-03 12:47:00 -05:00
Kevin Sawicki
56a4a69dee Add more non-matching target origins 2017-05-01 08:45:38 -07:00
Kevin Sawicki
efc62629ef Fix typo in fixture comment 2017-05-01 08:45:38 -07:00
Kevin Sawicki
3c58d50f87 Add failing spec for targetOrigin handling 2017-05-01 08:45:38 -07:00
Thiago de Arruda
a8640fb8a3 Add test to verify memory is released after sandboxed popup is closed 2017-05-01 11:30:07 -03:00
Ryohei Ikegami
da97150fc9 Fix JS style in test HTMLs 2017-04-30 19:43:21 +09:00
Ryohei Ikegami
0034b306f5 Add test for nativeWindowOpen + contextIsolation 2017-04-30 19:33:40 +09:00
Ryohei Ikegami
edeac2f59e Split test HTML file into separate ones 2017-04-30 18:54:08 +09:00
Ryohei Ikegami
1d73e84a29 Merge branch 'master' into native-window-open 2017-04-27 12:03:55 +09:00
Kevin Sawicki
cee0507090 Add failing spec for inheriting Javascript web preference 2017-04-25 12:57:53 -07:00
Kevin Sawicki
de62f1ea6c Restart crash service in each spec 2017-04-19 16:37:24 -07:00
Ryohei Ikegami
8dff29185b Merge branch 'master' into native-window-open 2017-04-18 21:59:22 +09:00
Kevin Sawicki
bfb9388191 Add failing spec for app.exit with >2 windows 2017-04-11 09:09:17 -07:00
Ryohei Ikegami
349ea3a15a Add test for native addon after reload 2017-04-06 11:43:57 +09:00
Thiago de Arruda
ce1a5e3c9c Fix sandboxed crashReporter for windows.
- Use `path` module from browser process in sandboxed renderer. This is required
  because the return value of `path.join` is platform-specific, and this is an
  assumtion of crash-reporter.js which is shared between sandboxed and
  non-sandboxed renderers.
- Set `process.platform` and `process.execPath` in sandboxed renderer
  environment. This is required to spawn the windows crash service from
  sandboxed renderer.
- Use a single temporary directory for all crashReporter tests. This is required
  to make tests more deterministic across platforms(since mac's crashpad doesn't
  support changing the crash dump directory). Also make a few improvements/fixes
  to the `uploadToServer` test.
2017-04-05 18:09:24 -03:00
Kevin Sawicki
e5f70f90a4 Add spec for remote setter with remote object 2017-04-04 11:18:16 -07:00
Ryohei Ikegami
61fa8693d2 Merge branch 'master' into native-window-open 2017-04-04 20:54:37 +09:00
Ryohei Ikegami
051e133ce3 Add test for opeing HTML file 2017-04-04 19:05:13 +09:00
Kevin Sawicki
257f6b142f Add spec for remote setter not surfacing error 2017-04-03 09:10:46 -07:00
Thiago de Arruda
460fb9cdb9 Add tests for uploadToServer option. 2017-03-31 13:48:07 -03:00
Kevin Sawicki
39fdc26921 Time out after 5 minutes 2017-03-30 14:39:48 -07:00
Kevin Sawicki
b85ebb00aa Tweak logged messages 2017-03-30 14:36:52 -07:00
Kevin Sawicki
7873130019 Add comment to codecs app script 2017-03-30 14:36:52 -07:00
Kevin Sawicki
6b8f840da0 Add script to verify ffmpeg without proprietary codecs 2017-03-30 14:36:52 -07:00
Ryohei Ikegami
6f9dbd4e04 Merge branch 'master' into native-window-open 2017-03-24 00:11:43 +09:00
Thiago de Arruda
5ee6205c0a Run the crash reporter specs with sandbox option.
- Create a function that accepts BrowserWindow options and generates a suite
  that contains the renderer-specific tests.
- Run the function twice to execute the tests with and without sandbox option.
2017-03-23 10:01:02 -03:00
Cheng Zhao
940d77b9a0 Fix typos and adjust sentences 2017-03-20 12:52:46 -07:00
Cheng Zhao
033aa16e04 test: Node integration in web workers 2017-03-20 12:52:46 -07:00
Kevin Sawicki
286f529968 Merge pull request #8890 from twolfson/dev/proxy.to.string.sqwished
🐛 Add toString support to remote functions
2017-03-20 09:35:51 -07:00
Ryohei Ikegami
6bbfe89f96 Add spec for useNativeWindowOpen 2017-03-19 18:11:20 +09:00
Kevin Sawicki
648d3324fb Add spec for remote function with toString property 2017-03-17 10:28:23 -07:00
deepak1556
80ce60f644 spec: check if pdf has loaded 2017-03-14 00:26:27 +05:30
deepak1556
6be779c777 update spec with new asset 2017-03-14 00:26:27 +05:30
deepak1556
a4400dc549 add basic spec 2017-03-14 00:26:27 +05:30
Kevin Sawicki
14e8e463b3 Merge pull request #8864 from electron/zoom_controller_webview_patch
browser: track origin zoom with HostZoomMap
2017-03-09 11:27:34 -08:00
Kevin Sawicki
17b70670f8 Add initial NativeImage.addRepresentation specs 2017-03-09 09:56:42 -08:00
deepak1556
224ffe44aa add spec 2017-03-08 19:16:55 +05:30
Kevin Sawicki
8eaf48e552 Add spec for 1x1 PNG data URL 2017-03-07 12:27:55 -08:00
Kevin Sawicki
f549bda9fc Merge pull request #8799 from nitsakh/baseURLForDataURL
Support base URL option to loadURL for data URLs
2017-03-06 10:25:53 -08:00