Commit graph

168 commits

Author SHA1 Message Date
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
Hari Juturu
704af29543 Exposing process.env status (#12166) 2018-03-14 12:01:40 +09:00
Felix Rieseberg
d586ef2f39 feature: Hot security tips (#11810)
* 🔧 Add security issue detection (and logs)

* 🔧 Check for it on load

* 👷 Add some tests

* 👷 Make the linter happy

* 🔧 Allow them to be enabled by force

* 📝 Make message slightly prettier

* 🔧 Fix a typo in the code comment

* 🔧 Classic mistake

* 🚀 Optimize things a bit more

* 👷 Add tests, fix tests

* 📝 Document things

* 🔧 Make linter happy

* 🔧 One more piece of cleanup
2018-02-03 07:50:12 -07:00
Cheng Zhao
2e3d940749 Fix "test.py -g Menu" not working 2018-01-01 15:46:39 +09:00
Felix Rieseberg
5f4b62b6c8 feat: Allow testing of single spec modules (#11409)
* 🔧 ES6 for the spec

* 👷 Allow testing of single modules

* ❤️ Implement feedback

* 📝 Add a testing doc

* 📝 Link to it

* 📝 Cleanup
2017-12-28 06:18:33 -05:00
Felix Rieseberg
9f0df695ca 🔧 Spec: Fix style issues 2017-11-23 14:22:58 -08:00
Felix Rieseberg
3311e0bd67 👷 This calls for tests 2017-11-18 00:51:27 -08:00
John Kleinschmidt
d9d557dcc5 CircleCI updates (#10647)
* Update CircleCi for release and test

* Update test storage dir
2017-09-28 13:05:42 -04:00
Cheng Zhao
4b46eca329 spec: Always run crash-reporter at last
So when a test crashed we can always see the stack trace.
2017-07-31 16:36:52 +09:00
Cheng Zhao
9ced85d860 Terminate tests when renderer process crashed 2017-07-31 16:24:23 +09:00
Kevin Sawicki
0c8f773dec Remove debug logging 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
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
Kevin Sawicki
5cf4995f2e DRY up logic to check if native modules should be loaded 2017-05-30 09:15:38 -07:00
Kevin Sawicki
fd782706b2 Add explicit spec for removing preload from webview 2017-05-17 13:47:00 -07:00
22222
4044548f3e Add 'will-prevent-unload' event. 2017-05-11 06:35:35 -05:00
deepak1556
e4524ce42e add spec 2017-05-01 16:53:55 +09:00
Kevin Sawicki
35a627fd60 Log all crashes during specs 2017-04-24 09:26:24 -07:00
Kevin Sawicki
de62f1ea6c Restart crash service in each spec 2017-04-19 16:37:24 -07:00
Kevin Sawicki
6fcb784f6e Add failing spec for no callback 2017-03-06 10:49:23 -08:00
deepak1556
90885d1d8c simply spec 2017-03-06 00:22:20 +05:30
deepak1556
eb827eb020 update spec 2017-03-06 00:10:46 +05:30
deepak1556
763b9ab8d8 add zoom spec 2017-02-18 01:34:32 +05:30
Kevin Sawicki
a7c050107b Remove guest from will-attach-webview event 2017-02-09 11:47:45 -08:00
Kevin Sawicki
acff2f6baf Adjust src from will-attach-webview 2017-02-09 11:45:07 -08:00
Kevin Sawicki
46f1a49594 new-webview -> will-attach-webview 2017-02-09 11:45:07 -08:00
Kevin Sawicki
706b9f6cbf Add new-webview specs 2017-02-09 11:45:07 -08:00
Kevin Sawicki
1004d205d8 Add spec for unhandledRejection event in main process 2017-01-26 14:46:50 -08:00
Kevin Sawicki
24fb560a9d Add failing spec for uncaught main process errors 2017-01-26 14:46:50 -08:00
Kevin Sawicki
330ac5f266 Fix standard linting error 2017-01-25 12:36:55 -08:00
Kevin Sawicki
56a8eb3a94 Check that sender is a WebContents instance 2017-01-25 12:36:55 -08:00
Charlie Hess
f6410d3b77 Assert that listener count decreases after a remove event. 2017-01-25 12:36:55 -08:00
Charlie Hess
c213971a2d Write a warning instead of crashing. 2017-01-25 12:36:55 -08:00
Kevin Sawicki
45986405b8 Assert remote event names 2017-01-25 12:36:55 -08:00
Kevin Sawicki
97dd680b32 Remove linter errors 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
1f07977f09 Remove lint errors 2017-01-06 09:58:40 -08:00
Kevin Sawicki
fd23c7bf76 Assert duplicate objects are supported 2017-01-06 09:58:40 -08:00
Kevin Sawicki
1944fdc962 Track visited parents and null out cycles 2017-01-06 09:58:40 -08:00
Kevin Sawicki
12382f064b Add failing spec for cycle in options 2017-01-06 09:58:40 -08:00
Kevin Sawicki
abea1196de Add spec for closing from will-navigate listener 2016-12-28 13:40:07 -08:00
Kevin Sawicki
2a8b36c761 Merge pull request #8134 from deepak1556/empty_client_certificate_patch
app: select-client-certificate event callback can accept certificate optionally
2016-12-15 08:31:12 -08:00
Kevin Sawicki
7a5ec96d53 Prevent input event from main process 2016-12-13 15:54:13 -08:00
Paul Frazee
99ea50649a finish implementation of {secure:true} opt on protocol.registerStandardScehesm, and add working test 2016-12-12 12:49:57 -08:00
deepak1556
f124732431 add spec 2016-12-09 09:37:46 -08:00
deepak1556
cbddbdb296 fix code style 2016-12-07 15:33:56 +05:30
deepak1556
1c45285fe3 add spec 2016-12-07 13:26:06 +05:30
Kevin Sawicki
10386edea5 Default timeout to 30 seconds on CI and 10 seconds locally 2016-11-29 14:29:35 -08:00
Kevin Sawicki
89965aa5db Check runner.hasOnly for focused spec check 2016-11-22 13:06:18 -08:00
Samuel Attard
857e1da6a3 Make executeJavaScript return a Promise so that caught errors can be sent to the caller 2016-11-03 09:33:47 -07:00
ali.ibrahim
c198828e58 Adding gc tests: fixing a memory leak with C++ URLRequest objects. 2016-10-17 19:02:25 +02:00
ali.ibrahim
9b4e9c642a Making test code run directly in main browser context to avoid rpc persistent handles. 2016-10-17 11:51:20 +02:00
Kevin Sawicki
b3b856f476 Set productName in main process on Linux 2016-10-06 09:02:02 -07:00
Kevin Sawicki
d407eab0ff Set crashReporter productName in specs 2016-09-08 11:52:29 -07:00
Kevin Sawicki
10d39f673a Add failing spec for duplicate references over IPC 2016-08-25 09:25:13 -07:00
Kevin Sawicki
dfb6a9b07d Show window when not on CI 2016-08-17 14:25:42 -07:00
Kevin Sawicki
ad07a20d9a Use electabul to instrument and report coverage 2016-08-03 16:23:39 -07:00
Kevin Sawicki
300bf24241 Save coverage data when browser windows are destroyed 2016-08-03 16:23:38 -07:00
Kevin Sawicki
491f69df80 Add ability to run tests with coverage report 2016-08-03 16:23:38 -07:00
Kevin Sawicki
5b5d51ecf4 Add helper to instrument electron.asar 2016-08-03 16:23:38 -07:00
Kevin Sawicki
afdff69482 Add initial code coverage reporting 2016-08-03 16:23:37 -07:00
Kevin Sawicki
55d6e0de1a Assert save path of download item 2016-07-27 17:52:36 -07:00
Kevin Sawicki
197ec98800 Remove standard linter warnings 2016-06-29 09:46:16 -07:00
Kevin Sawicki
110f1f8b75 Tweak error message 2016-06-09 17:00:32 -07:00
Kevin Sawicki
55a4e2589b Log/exit when only called in specs on CI 2016-06-09 16:56:25 -07:00
deepak1556
0f2ae385ed allow protocol module initialization before app ready.
* ensure registerStandardSchemes can only be called before app ready
 * ensure other protocol methods can only be used after app ready
2016-05-08 01:36:34 +05:30
Cheng Zhao
8aa88067ca Do not write to stdout in Electron when running on win32 CI machine
This makes Electron crash on CI machine somehow.
2016-04-30 17:08:51 +09:00
Cheng Zhao
2f6796bd7f Disable throttling in tests 2016-04-08 15:57:14 +09:00
Cheng Zhao
19a172f2f5 Remove the hacks because of transparent background 2016-04-02 21:21:30 +09:00
Cheng Zhao
247b3f3605 Fix the background color in test app 2016-04-01 16:35:19 +09:00
Zeke Sikelianos
9db733a4ff mostly more globals 2016-03-30 17:00:32 -07:00
Zeke Sikelianos
c4b6cf4a8e do more manual cleanup and specify globals 2016-03-30 17:00:32 -07:00
Zeke Sikelianos
f35f362272 autoformat more files 2016-03-30 17:00:31 -07:00
Kevin Sawicki
5c9b19b508 web-preferences -> webPreferences 2016-03-17 13:37:07 -07:00
Robo
8386baf267 add spec 2016-02-25 11:46:30 +05:30
cesine
2aff0c47d0 ⬆️ 👕 updated to eslint 2.1.0
Verified migration doc (nothing to be done)
http://eslint.org/docs/user-guide/migrating-to-2.0.0

And made sure the eslint tasks passed
2016-02-15 22:30:29 -05:00
Kevin Sawicki
3ab14e14e9 Add initial auto updater specs 2016-02-09 14:54:18 -08:00
Robo
2819af9586 fix lifetime of downloadItem class when defaultdownload canceled 2016-02-02 15:54:51 +05:30
Cheng Zhao
d0587a9c52 spec: process.stdout.write 2016-01-26 20:26:42 +08:00
ragingwind
63ae73b281 Using strict comparation 2016-01-22 09:04:59 +09:00
Kevin Sawicki
61af98cf94 Remove CoffeeScript register in specs 2016-01-12 16:24:06 -08:00
Kevin Sawicki
dd902c61fa Expect .js specs 2016-01-12 16:24:06 -08:00
Kevin Sawicki
d863fd5c6c Set process.throwDeprecation as early as possible 2015-12-15 17:02:33 -08:00
Kevin Sawicki
aedfd3bf0e Add specs for companyName/submitURL being required 2015-12-15 16:44:38 -08:00
Kevin Sawicki
065887e712 Pass through mocha invert option from test CLI 2015-12-10 10:42:07 -08:00
Kevin Sawicki
69c0a33c85 Pass mocha grep command line option through to spec app 2015-12-10 10:33:43 -08:00
Kevin Sawicki
a42fa5d5c2 Parse spec arguments using yargs library 2015-12-10 10:33:18 -08:00
Cheng Zhao
fbb8e61958 Replace "Url" in API names with "URL" 2015-11-13 16:03:40 +08:00
Cheng Zhao
1d1f911b09 Use require('electron') in Electron's code 2015-11-12 20:29:30 +08:00
Cheng Zhao
05611f5e60 spec: Use multiparty instead of formidable
The latter is buggy and affects our specs.
2015-11-10 16:21:08 +08:00
Cheng Zhao
751af25f37 Use ipcMain in Electron's code 2015-11-10 16:04:34 +08:00
Cheng Zhao
6515a445a0 Use ipcRenderer in Electron's code 2015-11-10 15:29:43 +08:00
Haojian Wu
1879392c7b Reimplement downloadItem.getFilename API.
Previously, the suggested file name(Always 'empty') returned by
'download_item->GetSuggestedFilename' is not the same with the default one saved
in local disk.

The patch reimplement this API allowing it to return the default file name, which
is more expected from user.
2015-09-24 16:39:02 +08:00
Haojian Wu
0861d5d44b Redefine 'will-download' design. 2015-09-24 16:04:44 +08:00
Cheng Zhao
ae2f754d10 No need to set menu in spec window 2015-09-10 16:01:04 +08:00
Cheng Zhao
d7ec0b99fd spec: process.stdout should not throw exception 2015-09-07 21:37:17 +08:00
Cheng Zhao
f75458f78d Write output directly to stderr 2015-09-03 17:39:06 +09:00
Cheng Zhao
467ba6b7a9 Rename protocol.isHandledProtocol to protocol.isProtocolHandled 2015-08-13 21:29:23 +08:00
Cheng Zhao
13c1b078f9 Fix refreshing test window 2015-06-05 19:48:58 +08:00