Commit graph

149 commits

Author SHA1 Message Date
Milan Burda
db37ab1039 feat: add remote.require() / remote.getGlobal() filtering (#15014) 2018-10-18 14:36:45 +11: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
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
Milan Burda
5bd6de52e0 feat: add app.enableSandbox() (#14999) 2018-10-10 15:32:09 +11: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
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
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
Aleksei Kuzmin
21f382fcae test: disable the "app.relaunch" test on Linux 2018-10-04 00:21:58 +02: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
60ac03c08f test: disable getGPUInfo() tests on Linux (#14875) 2018-10-01 12:57:38 +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
John Kleinschmidt
8854d9872c test: reenable app moduele > app.exit(exitCode) > closes all windows 2018-09-20 09:32:02 -04:00
Samuel Attard
558fff69e7
chore: update to standard 12 2018-09-14 14:57:01 +10:00
Samuel Attard
dde194d853 Remove the memory property from getAppMetrics
See 03d0bfd593 for more information
2018-09-11 20:24:03 +02:00
Milan Burda
dcd580b6cf chore: remove app.makeSingleInstance / releaseSingleInstance (#14518) 2018-09-10 16:33:36 +10:00
Milan Burda
c63014c256 refactor: use loadFile when appropriate in tests (#14422) 2018-09-04 09:50:53 -05:00
Aleksei Kuzmin
4943f9fc14 tests: disable "app moduele > app.exit(exitCode) > closes all windows" 2018-08-27 16:21:12 +02:00
Aleksei Kuzmin
1293b463ba tests: refactor "app module" tests 2018-08-26 16:54:51 +03:00
Shelley Vohr
590ae5cd29
fix: re-enable mixed-sandbox tests 2018-08-12 21:29:29 -07:00
Shelley Vohr
7c7543cb39 spec: re-enable app.getAppMetric API (#13962) 2018-08-09 13:35:29 -05: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
Cheng Zhao
a88cdf2d1f
spec: suppress mixed-sandbox test in Windows CI (#13769) 2018-07-23 18:08:06 +09:00
Samuel Attard
10160b369b FIXME: getAppMetrics fails on windows CI 2018-06-19 11:49:46 +10:00
Samuel Attard
10e0d9b198 Enable process resource test 2018-06-19 11:49:46 +10:00
Aleksei Kuzmin
de6a5de914 Disable all failing tests 2018-06-19 11:49:45 +10:00
Shelley Vohr
91559191c9
spec: update app spec to assert (#13155)
* convert app spec from assert to expect and add dirty-chai
2018-06-14 09:44:27 -07:00
Aleš Pergl
93bee69266 Remove command line argument black-list (#13039)
* Remove command line argument black-list

Instead block all arguments following a URL.

* Updated tests
2018-05-22 11:51:03 -05:00
Shelley Vohr
daf75dd375
add app.isPackaged (#12656)
* add isPackaged method

* add false test case for app.isPackaged()

* document add.isPackaged()

* check isPackaged() without fs call

* convert to non-method property

* document app.isPackaged as a property

* update tests for app.isPackaged

* remove unused fs require

* clarify docs for isPackaged()
2018-05-07 23:15:31 -07:00
Samuel Attard
5b5c161601
feat: new makeSingleInstance API (#12782)
* Refactor app.makeSingleInstance
* new API `app.isPrimaryInstance()`
* new API `app.isSingleInstance()`
* new event `app.on('second-instance')`
* deprecated old syntax `app.makeSingleInstance(cb)`
* deprecated old syntax of `app.makeSingleInstance() --> bool` in favor
of `app.isPrimaryInstance()`
* Fix spec, we don't need process.nextTick hacks any more
* Make deprecation TODO for the return value of makeSingleInstance
* Refactor makeSingleInstance to requestSingleInstanceLock and add appropriate deprecation comments
* I swear this isn't tricking the linter
* Make const
* Add deprecation warnings for release, and add to planned-breaking-changes

BREAKING CHANGE
2018-05-08 01:29:18 +10:00
Alexey Kuzmin
fcc82ebd35 Add "app.whenReady()" (#12652)
* Make "chai-as-promised" avaialble in tests

* Add "app.whenReady()"

Closes #9561.
2018-04-20 17:09:23 +10:00
Cheng Zhao
cf36fdecbf Skip client-certificate test for Linux (#12189) 2018-03-09 14:43:49 +09:00
Cheng Zhao
cc6bcb6c81 Fix some flaky tests in CI (#12153)
* Guard whole InitPrefs with ScopedAllowIO

Saw a crash:
0 0x7f8d2f7d918d base::debug::StackTrace::StackTrace()
1 0x7f8d2f7d755c base::debug::StackTrace::StackTrace()
2 0x7f8d2f867caa logging::LogMessage::~LogMessage()
3 0x7f8d2fa157c7 base::ThreadRestrictions::AssertIOAllowed()
4 0x7f8d2f83453a base::OpenFile()
5 0x7f8d2f82a967 base::ReadFileToStringWithMaxSize()
6 0x7f8d2f82ad44 base::ReadFileToString()
7 0x7f8d2f846f73 JSONFileValueDeserializer::ReadFileToString()
8 0x7f8d2f84738c JSONFileValueDeserializer::Deserialize()
9 0x7f8d35a5d1f6 <unknown>
10 0x7f8d35a5c217 JsonPrefStore::ReadPrefs()
11 0x7f8d35a87d3e PrefService::InitFromStorage()
12 0x7f8d35a87c60 PrefService::PrefService()
13 0x7f8d35a91a10 PrefServiceFactory::Create()
14 0x000000e86e1b brightray::BrowserContext::InitPrefs()
15 0x000000c2bd64 atom::AtomBrowserContext::AtomBrowserContext()
16 0x000000c320db atom::AtomBrowserContext::From()
17 0x000000b4b8b5 atom::api::Session::FromPartition()

* Fix done being called twice in setInterval test

The callback passed to browser process is called asyncly, so it is
possible that multiple callbacks has already been scheduled before we
can clearInternval.

* Fix failing test when dir name has special chars

The pdfSource is not escaped while parsedURL.search is.

* Call done with Error instead of string

* Fix crash caused by not removing input observer

Solve crash:
0 libcontent.dylib content::RenderWidgetHostImpl::DispatchInputEventWithLatencyInfo(blink::WebInputEvent const&, ui::LatencyInfo*) + 214
1 libcontent.dylib content::RenderWidgetHostImpl::ForwardMouseEventWithLatencyInfo(blink::WebMouseEvent const&, ui::LatencyInfo const&) + 1350
2 libcontent.dylib content::RenderWidgetHostViewMac::ProcessMouseEvent(blink::WebMouseEvent const&, ui::LatencyInfo const&) + 44
3 libcontent.dylib content::RenderWidgetHostInputEventRouter::RouteMouseEvent(content::RenderWidgetHostViewBase*, blink::WebMouseEvent*, ui::LatencyInfo const&) + 1817

* Print detailed error

* Run tests after server is ready
2018-03-07 14:40:27 +09:00
Charles Kerr
65ee977a86 Exit gracefully on linux (#12139)
* Fix timing issue in singleton fixture.

Singleton now sends the "we've started" message out only after it's
received a `'ready'` event from `app`. Previously it sent the message
out immediately, resulting in the parent test trying to manipulate it
before Singleton's event loop was fully bootstrapped.

* Check for graceful exits on Linux, too.

Rewrite the "exits gracefully on macos" spec to run on Linux too.

* Check for graceful exits everywhere.

* Tweak comment

* Better error logging in api-app-spec.js. (#12122)

In the 'exits gracefully' test for app.exit(exitCode),
print the relevant error information if the test fails.

* Run the exit-gracefully test on macOS and Linux.

Windows does not support sending signals, but Node.js offers some
emulation with process.kill(), and subprocess.kill(). Sending signal 0
can be used to test for the existence of a process. Sending SIGINT,
SIGTERM, and SIGKILL cause the unconditional termination of the target
process.

So, we'll need a different approach if we want to test this in win32.
2018-03-06 22:01:17 -05:00
Charles Kerr
e9808d138f
Better error logging in api-app-spec.js. (#12122)
In the 'exits gracefully on macos' test for app.exit(exitCode),
print the relevant error information if the test fails.
2018-03-06 03:13:47 +09:00
Cheng Zhao
35cbe9d140 Fix dockMenu not being referenced in JavaScript (#12062)
* Fix dockMenu not being referenced in JavaScript

* spec: Test garbage collecting dock menu
2018-02-26 22:15:06 -08:00
Shelley Vohr
e10b5e13e9
move spec to chromium_spec 2018-02-08 13:00:41 -05:00
shelley vohr
ca34978e73 add app.setLocale() (#11469)
* infrastructure for setLocale via klang

* add documentation for setLocale

* add test for setLocale

* fix spec

* add spec and update docs

* fix carriage feeds on windows

* SetLocale() sets LC_ALL on Linux

* in SetLocale() on Linux, use g_setenv()

* fix tyop: '#ifdef OSX_POSIX'

* make the linter happy

* improvements from review
2018-02-08 08:26:37 -06:00
Aleš Pergl
c49cb29ddf Disallow launching unknown apps via browser client.
CVE-2018-1000006
2018-01-22 16:49:30 -06:00
Nitish Sakhawalkar
ea2056b513 Replace arrow function 2018-01-17 15:27:11 +09:00
Nitish Sakhawalkar
7aefc73ffd Fix lint 2018-01-17 15:27:11 +09:00
Nitish Sakhawalkar
28f1abcb05 Change macos app termination process 2018-01-17 15:27:11 +09:00
Felix Rieseberg
bd4c7a114a 👷 Fix the last broken test 2017-12-05 17:07:22 -08:00
Felix Rieseberg
bf043c92af 👷 Ugh, whitespace 2017-12-05 13:20:34 -08:00
Felix Rieseberg
e6cbb2f3aa 👷 Cleanup on Windows only 2017-12-05 12:14:19 -08:00
Felix Rieseberg
d519bfc5fb 👷 Linter fascism 2017-12-05 11:38:19 -08:00
Felix Rieseberg
997f3f31d2 👷 Cleanup after the test 2017-12-05 11:31:40 -08:00
Felix Rieseberg
e77751aab5 👷 Test registry interaction 2017-12-05 11:28:39 -08:00
Cheng Zhao
c0e9dbcc00
Merge pull request #11144 from dittos/mas-login-helper-again
Re-land MAS login helper (w/ regression fix)
2017-11-27 17:02:57 +09:00
deepak1556
2fa0b3d33e Enable client certificate tests 2017-11-24 10:58:53 +09:00