Commit graph

401 commits

Author SHA1 Message Date
Hari Juturu
2f4fd3324b Preload doesn't load in sandboxed render if preload path contains special chars (#12037)
* Adding missing headers

* adding ut

* Removing the file path exists check

* fixing test

* exposing window.require in UT
2018-03-07 11:40:00 -05:00
Shelley Vohr
bf491de9fe
fix styling and add spec 2018-02-28 00:22:42 -08:00
shelley vohr
846be03f1d remove support for hidden-inset (#11975) 2018-02-20 11:09:54 -06:00
Samuel Attard
9bd7d53cf8 Handle empty handles (#11598)
* Handle empty handles

* Close and dispose window at end of void test

* Dispose of existing window before running void 0 spec
2018-02-12 14:46:29 -05:00
Samuel Attard
b3234f634b Add ability to set arbitrary arguments in a renderer process (#11850) 2018-02-12 11:54:31 -06:00
Nitish Sakhawalkar
62d2a3472f Fix test BrowserWindow.addTabbedWindow() (#11795)
* Fix test BrowserWindow.addTabbedWindow()

* Address review comments
2018-02-02 19:31:02 -07:00
Cheng Zhao
cb3a9c69ab Add a SessionPreferences to manage session related data
By design the BrowserClient should not be aware of the api:: classes.
2017-12-05 15:59:15 +09:00
Samuel Attard
eaa4b71c24 Remove .only 2017-12-05 11:35:54 +09:00
Samuel Attard
009459bd38 Standard JS 2017-12-05 11:35:54 +09:00
Samuel Attard
3b80ee0655 Move global preload implementation to be session based 2017-12-05 11:35:53 +09:00
Samuel Attard
0ddd078aaf Add ability to set global preload scripts 2017-12-05 11:35:27 +09:00
Cheng Zhao
1c0ea0286e
Merge pull request #11235 from electron/standard-10
infra: Upgrade to StandardJS 10
2017-11-27 15:42:52 +09:00
Felix Rieseberg
9f0df695ca 🔧 Spec: Fix style issues 2017-11-23 14:22:58 -08:00
Felix Rieseberg
0278e380de 🔧 Spec: Don’t use deprecated new Buffer() 2017-11-23 14:22:31 -08:00
Heilig Benedek
62594780e0 run the new test only on windows 2017-11-23 21:25:26 +01:00
Heilig Benedek
710ca230f3 update tests to reflect new behaviour 2017-11-23 21:25:25 +01:00
Felix Rieseberg
b7bc4eb586 👷 Let’s test the undefined case, too 2017-11-22 14:38:08 -08:00
Felix Rieseberg
14db204315 👷 Add a spec 2017-11-22 14:37:46 -08:00
shelley vohr
c7e40a2a64
Merge pull request #11133 from electron/skip-tests-that-should-be-skipped
Explicitly skip tests that should be skipped
2017-11-21 10:13:18 +01:00
Aleksei Kuzmin
cf749a8e18 Explicitly skip tests that should be skipped 2017-11-20 14:43:23 +01:00
Felix Rieseberg
5b18bea7e3 🔧 Alex has good ideas 2017-11-18 10:59:09 -08:00
Felix Rieseberg
3311e0bd67 👷 This calls for tests 2017-11-18 00:51:27 -08:00
Aleksei Kuzmin
2bd44612fd Revert "Merge pull request #10989 from electron/temporary-disable-visibility-state-tests"
This reverts commit f3125358c0, reversing
changes made to 7b9ad5001b.
2017-11-02 03:22:27 +03:00
Aleksei Kuzmin
0df058dc1e Temporary disable "document.visibilityState/hidden" tests
Task to enable them:
https://github.com/electron/electron/issues/10988
2017-11-02 00:06:38 +03:00
Shelley Vohr
28c009fcc0
linting is important 2017-11-01 10:56:53 -04:00
Shelley Vohr
d2e1705c80
convert app and browser spec to ES6 2017-11-01 10:48:09 -04:00
John Kleinschmidt
15bfb86eec Make sure test closes window
Newly added test was leaving window open causing tests to fail
2017-10-04 11:35:41 -04:00
Cheng Zhao
8c5bb5969c Merge pull request #10667 from dittos/window-opacity
Add window opacity support
2017-10-04 15:03:45 +09:00
Daniel Ma
1bb042a661 feat(NativeWindowMac): addTabbedWindow
Add support for the [`NSWindow addTabbedWindow`][nsw] method on MacOSX

This plays nicely with the changes from #9052 and #9725

Usage samples available in [this commit][c] in my fork of
`electron-quick-start`

[nsw]: https://developer.apple.com/documentation/appkit/nswindow/1855947-addtabbedwindow
[c]: 79f06591df
2017-10-03 20:11:16 +09:00
Taeho Kim
7570ec9d39 Add BrowserWindow.getOpacity for consistency 2017-10-03 00:08:10 +09:00
Ted Kim
7f2c4a9e06 Add window opacity support 2017-09-29 17:49:10 +09:00
Cheng Zhao
073583ff3d spec: The parent option should not affect show option 2017-09-14 14:48:42 +09:00
xaviergonz
0d69738bd6 using standard javascript 2017-09-14 14:38:54 +09:00
xaviergonz
0301961c25 Update api-browser-window-spec.js 2017-09-14 14:38:54 +09:00
Vanessa Yuen
9a7d8a0511 merge master into fix-fullscreen-with-resizable-flag. 2017-09-12 18:34:23 -04:00
Cheng Zhao
10ab870237 Merge pull request #10321 from kaylanm/macos-native-tab-api
🍎 Add macOS native tab methods to window API
2017-09-11 18:49:56 +09:00
Cheng Zhao
7f4b74f8c6 spec: Compare id instead of the object
Otherwise it is impossible to see what's wrong.
2017-08-29 15:45:16 +09:00
Cheng Zhao
f0f17fffd8 spec: Do not test window positions
They were too flaky.
2017-08-29 14:23:39 +09:00
sungpark
bf07c5aebd fix contextIsolation issue while webPreference sandbox is on
contextIsolation didn't work while sandbox is on. The fix is contextIsolation picked up while sandbox on
2017-08-23 10:52:02 -07:00
Michael Kaylan
b4428e7e41 🍎 Add macOS native tab methods to window API 2017-08-21 23:24:30 -04:00
Aleksei Kuzmin
8b55e6e2f5 Revert "Disable a failing test"
This reverts commit 9487222726.
2017-08-22 11:49:53 +09:00
Aleksei Kuzmin
c0331673da Revert "Disable a failing test"
This reverts commit 25c0cf0612.
2017-08-21 16:48:24 +09:00
Aleksei Kuzmin
25c0cf0612 Disable a failing test
BrowserWindow module window states resizable state works for a frameless window
2017-08-15 16:19:29 +03:00
Aleksei Kuzmin
9487222726 Disable a failing test
BrowserWindow module "webPreferences" option "sandbox" option can print to PDF
2017-08-15 16:19:29 +03:00
Kevin Sawicki
29dc06c89d Configure spec UI to run in docker container 2017-08-15 16:19:22 +03:00
John Kleinschmidt
ccdff72ee4 Merge pull request #9918 from alexstrat/add-extensions-loading-api
Introduce Chrome extensions management APIs independent of Dev Tools Extensions
2017-08-07 20:06:22 -04:00
Cheng Zhao
28959da2b7 spec: Fix the event test calling done for multiple times 2017-08-02 15:06:06 +09:00
Kevin Sawicki
208be2a542 Set preload script on opened windows 2017-07-17 11:55:16 -07:00
Kevin Sawicki
3925bfde8e Add spec for reloading opened window cross-origin 2017-07-17 11:55:15 -07:00
Kevin Sawicki
9d7c2e2294 Add specs for nativeWindowOpen inheritance and new-window support 2017-07-17 11:55:15 -07:00
Kevin Sawicki
86b1deedfa Inherit enabled-sandbox in opened windows 2017-07-17 11:55:15 -07:00
Kevin Sawicki
c71b0a5441 Add spec for configuring web preferences from sandboxed new-window event 2017-07-17 11:55:15 -07:00
Kevin Sawicki
0a71a9b992 Merge pull request #9695 from shubham2892/alwaysOnTop-window-disappears-when-restored-fix
Fix an issue where alwaysOnTop window disappears when restore…
2017-07-14 10:09:13 -07:00
Kevin Sawicki
4935e8567f Initialize level_ in initWithShell 2017-07-14 10:07:06 -07:00
Alexandre Lachèze
6e3407d4a4 Forgot a describe.only 2017-07-05 19:10:02 +02:00
Alexandre Lachèze
2231673b03 Remove already tested part 2017-07-05 17:36:39 +02:00
Alexandre Lachèze
67cec5fd26 add tests for BrowserWindow.addExtension 2017-07-05 17:21:06 +02:00
Aleksei Kuzmin
120b05e075 Fix error message of assertWithinDelta() 2017-07-04 11:56:21 +02:00
Kevin Sawicki
449776f228 Don't run it statements when OSR is disabled 2017-06-29 12:26:45 -07:00
Aleksei Kuzmin
25e1c5d6e7 Skip "offscreen rendering" tests if OSR is not available 2017-06-28 19:34:57 +02:00
Shubham
1b8963ff6e 🍎 Fix full screen when resizable is set to true 2017-06-20 16:11:28 -04:00
Kevin Sawicki
45dc6fc04f Merge pull request #9645 from dharders/issue6036-fix-windows-fullscreen-startup-toggle
Fix unresponsive app after fullscreen->normal state toggle (Windows)
2017-06-14 14:10:00 -07:00
dharders
909344415e 🎨 Use leave-full-screen event instead of setTimeout() 2017-06-14 11:06:33 +10:00
Shubham
f001377493 🍎 Fix an issue where alwaysOnTop window disappears when restored from the application icon 2017-06-07 12:28:50 -04:00
Kevin Sawicki
c60a9d242e Disable minimize spec on Linux CI 2017-06-06 16:58:28 -07:00
Kevin Sawicki
a53e98c0f3 Add visibilitystate test for showInactive 2017-06-06 16:45:46 -07:00
Kevin Sawicki
52137485f2 Add separate specs for hide/show/minimize visibilitychange events 2017-06-06 16:22:07 -07:00
Kevin Sawicki
28cd973805 Mention document.hidden in spec description 2017-06-06 15:20:08 -07:00
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
deepak1556
50ac7b2edd Revert "Merge pull request #8724 from electron/defer_load_url"
Possible cause for #9121

This reverts commit 886b47e713, reversing
changes made to 479af3c9e2.
2017-06-05 19:04:21 +05:30
dharders
aeb68c2369 Add test for Windows fullscreen state toggle. Fix #6036 2017-06-05 11:39:15 +10:00
Kevin Sawicki
5cf4995f2e DRY up logic to check if native modules should be loaded 2017-05-30 09:15:38 -07:00
Kevin Sawicki
36989e19f8 Add spec for cross-origin blockage 2017-05-26 10:10:36 -07:00
Kevin Sawicki
e735aa7dee web-preferences -> webPreferences 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
92f14f8d52 printerList() -> getPrinters() 2017-05-18 10:14:55 -07:00
Kevin Sawicki
84a9b6a42d Merge remote-tracking branch 'origin/master' into renaesop_master 2017-05-18 10:08:40 -07:00
Cheng Zhao
9bed0ffdbf Merge pull request #9440 from brenca/osr-fixes
Additional small OSR fixes
2017-05-17 17:14:27 +09:00
Thiago de Arruda
5654ff0d43 Add test for #9387 2017-05-16 09:07:41 -03:00
Heilig Benedek
802501fb04 update osr specs 2017-05-13 02:14:30 +02: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
renaesop
dfcc882dcc Add a test for webcontents.printerList. 2017-05-09 10:38:03 +08:00
22222
042b511a27 Fix #8911 2017-05-03 12:47:00 -05: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
deepak1556
5e976be43b remove page-title-updated workaround for #3380 2017-05-01 16:53:55 +09:00
deepak1556
e4524ce42e add spec 2017-05-01 16:53:55 +09:00
Ryohei Ikegami
3c5179b717 Merge branch 'native-window-open' of github.com:seanchas116/electron into native-window-open 2017-04-30 19:37:23 +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
dc8b43901b Merge pull request #9108 from yuya-oc/add-macos-sheet-events
Add sheet-begin and sheet-end events to macOS BrowserWindow
2017-04-20 10:33:31 -07:00
Kevin Sawicki
6b13fab83a Wait for full screen event before leaving kiosk mode 2017-04-19 09:13:26 -07:00
Ryohei Ikegami
91f31506ef Skip native addon test in Windows 2017-04-19 00:11:23 +09:00
Yuya Ochiai
75184046f6 Add events to manage sheets of macOS BrowserWindow 2017-04-15 16:26:45 +09:00
Ryohei Ikegami
659722924d Don't show BrowserWindow in test 2017-04-06 11:44:20 +09:00
Ryohei Ikegami
349ea3a15a Add test for native addon after reload 2017-04-06 11:43:57 +09: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
e699e88b4c Add initial tabbingIdentifier spec 2017-03-30 13:46:58 -07:00
Ryohei Ikegami
3af9f572ac Fix spec description 2017-03-19 20:10:25 +09:00
Ryohei Ikegami
6bbfe89f96 Add spec for useNativeWindowOpen 2017-03-19 18:11:20 +09:00
Kevin Sawicki
6fcb784f6e Add failing spec for no callback 2017-03-06 10:49:23 -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
deepak1556
eb827eb020 update spec 2017-03-06 00:10:46 +05:30
deepak1556
dead1ae1ba webContents: defer url load when there is a pending navigation entry 2017-03-06 00:10:46 +05:30
Nitish Sakhawalkar
d75db0ea1a Fixed js lint issues. 2017-03-02 14:37:09 -08:00
Nitish Sakhawalkar
370562b129 Moving data url test outside post navigation block. Trailing separator comment in the docs. 2017-03-02 12:14:18 -08:00
Nitish Sakhawalkar
e8c0813f46 Changes based on review. 2017-03-02 10:58:39 -08:00
Nitish Sakhawalkar
879082b1a6 Issue #8735:Support base URL option to loadURL for data URLs 2017-02-28 16:49:03 -08:00
Kevin Sawicki
70010fdb8e Add spec for Buffer global 2017-02-14 08:42:34 -08:00
Cheng Zhao
c72438f09f WebInspector has been split up 2017-02-06 10:34:29 -08:00
Kevin Sawicki
dc1c11a841 Merge pull request #8487 from leethomas/feature/osx-relative-window-levels
Feature/macOS relative window levels
2017-01-30 15:34:24 -08:00
leethomas
edbb786fb4 use kCGMinimumWindowLevelKey to get the minimum level 2017-01-26 19:12:10 -08:00
Kevin Sawicki
76e5589a31 Schedule function after executeJavaScript completes 2017-01-26 16:15:10 -08:00
Kevin Sawicki
2cfa67bdff Remove linter warning 2017-01-26 09:59:07 -08:00
Kevin Sawicki
a851695bb9 Clear interval before setting new one 2017-01-26 09:57:53 -08:00
Kevin Sawicki
e2e33a8cf0 Guard against destroyed window or web contents 2017-01-26 09:57:00 -08:00
Kevin Sawicki
515f689814 Use helper function to show last dev tools panel 2017-01-26 09:42:45 -08:00
leethomas
9e189b9d2d fix js lint errors 2017-01-26 07:14:47 -08:00
leethomas
1234b61fa6 spec to ensure an error is thrown when relativeLevel is set out of bounds 2017-01-25 19:39:57 -08:00
Kevin Sawicki
8e39aea34a Merge pull request #8478 from deepak1556/load_url_max_char_patch
WebContents: emit did-fail-load event when url exceeds character limit
2017-01-25 09:46:40 -08:00
deepak1556
d8a16a8ffb fix spec 2017-01-25 14:20:33 +05:30
Kevin Sawicki
6bb331356e Finish spec when full screen is left 2017-01-24 11:55:13 -08:00
Kevin Sawicki
284ca3114b Wait for window to transition before leaving full screen 2017-01-24 11:55:13 -08:00
deepak1556
593a3de850 add spec 2017-01-23 19:57:47 +05:30
Kevin Sawicki
873e6e5e6b Append form to body before submitting 2017-01-19 09:05:59 +02:00
Kevin Sawicki
f7bdf5d04e Merge pull request #8399 from watilde/feature/fixes-8338
save a fullscreen state when Kiosk mode is called
2017-01-17 13:03:51 -08:00
Kevin Sawicki
1d824d4645 Assert document visibility in main context 2017-01-16 13:03:38 -08:00
Kevin Sawicki
3f7b3c4bd7 Implement window overrides in main context 2017-01-16 12:38:16 -08:00
Kevin Sawicki
95054f443f Enable context isolation on child windows 2017-01-16 12:38:16 -08:00
Kevin Sawicki
33b6ab11f2 Assert context state after reload 2017-01-16 12:38:16 -08:00
Kevin Sawicki
802ed62d5b Remove trailing comma 2017-01-16 12:38:16 -08:00
Kevin Sawicki
b348cdeae8 Set page variable using webFrame.executeJavaScript 2017-01-16 12:38:16 -08:00
Kevin Sawicki
ea2273dde5 Assert built-in prototype isolation 2017-01-16 12:38:16 -08:00
Kevin Sawicki
ad3b837ad5 Rename option to contextIsolation 2017-01-16 12:38:16 -08:00
Kevin Sawicki
2928fe5c43 Add initial isolated world spec 2017-01-16 12:38:16 -08:00
Daijiro Wachi
b97db68f0c add tests to fullScreen and Kiosk 2017-01-14 00:05:04 +01:00
Kevin Sawicki
97dd680b32 Remove linter errors 2017-01-12 10:28:08 -08:00
Kevin Sawicki
8098ca3b66 Remove unneeded nextTick and assert array 2017-01-12 10:28:08 -08:00
Kevin Sawicki
c5da330cdf Add failing spec for sandboxed window.open 2017-01-12 10:28:08 -08:00
Kevin Sawicki
d8366115f5 Add spec for resizable frameless window 2017-01-09 10:01:38 -08:00
Kevin Sawicki
abea1196de Add spec for closing from will-navigate listener 2016-12-28 13:40:07 -08:00
Kevin Sawicki
2fa9ca1f6d Merge pull request #8156 from sindresorhus/remove-dock-window-level
🍎 Document that the `dock` window level is deprecated
2016-12-12 09:39:08 -08:00
Kevin Sawicki
1a0fbf84f9 Merge pull request #8165 from geoff-addepar/geoff/fix-sandbox-printing
Fix printing with the sandbox enabled
2016-12-12 09:26:52 -08:00
Sindre Sorhus
3dde669ee8 🍎 Remove deprecated dock window level
According to the Apple docs, the `NSDockWindowLevel` constant is deprecated: https://developer.apple.com/reference/appkit/nsdockwindowlevel?language=objc
2016-12-09 12:46:49 +01:00
Geoff Lywood
5345b08d24 Fix printing with the sandbox enabled
Closes #7984
2016-12-07 17:40:18 -08:00
Kevin Sawicki
03263bb5b6 Add failing BrowserWindow.fromDevToolsWebContents spec 2016-12-06 10:36:59 -08:00
Kevin Sawicki
b0a1e2988b Add spec for BrowserWindow.fromWebContents 2016-12-06 10:36:59 -08:00
Kevin Sawicki
b29f7b9acb Clear interval before assert 2016-12-06 09:25:55 -08:00