Граф коммитов

117 Коммитов

Автор SHA1 Сообщение Дата
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
Aleksei Kuzmin cf749a8e18 Explicitly skip tests that should be skipped 2017-11-20 14:43:23 +01:00
Ted Kim 71c16ad76f lint 2017-11-20 10:17:34 +09:00
Ted Kim 1660fc8d13 Fix getLoginItemSettings timing issue 2017-11-20 10:15:45 +09:00
Ted Kim d9481430df Fix test failure 2017-11-17 10:53:21 +09:00
Shelley Vohr e4214a6cbe
[WIP] Upgrade more specs (#10945)
Finish upgrading specs to ES6
2017-10-27 16:45:58 -04:00
Cheng Zhao d87ea5713d spec: It is not certain which process starts first 2017-09-25 11:19:25 +09:00
Cheng Zhao 5940231b76 spec: Do not assume which process exits first in singleton test 2017-09-25 10:49:54 +09:00
Cheng Zhao b4075bed87 spec: Add test case for app.makeSingleInstance 2017-09-20 11:58:32 +09:00
Samuel Attard 6b010614e2 Implement moveToApplicationsFolder (#10142)
* Implement moveToApplicationsFolder

* Fix tabs / spaces

* Fix linting

* Use Browser::Quit, instead of exit

* Update documentation as per feedback

* Fix spec
2017-08-31 10:37:12 -04:00
Cheng Zhao 5510d8cfb1 Revert "Revert "spec: Suppress the select-client-certificate test""
This reverts commit 8e989170f1.
2017-08-29 14:19:22 +09:00
Cheng Zhao 68e0fbfd60 Revert "Revert "spec: Suppress the app.importCertificate test""
This reverts commit a7cb89aeb5.
2017-08-29 14:19:21 +09:00
Kevin Sawicki 8e989170f1 Revert "spec: Suppress the select-client-certificate test"
This reverts commit dc1269615a.
2017-08-07 12:57:01 -07:00
Kevin Sawicki a7cb89aeb5 Revert "spec: Suppress the app.importCertificate test"
This reverts commit 5ccae79ea7.
2017-08-07 12:56:54 -07:00
Cheng Zhao dc1269615a spec: Suppress the select-client-certificate test
Not sure why it is not working
2017-08-02 16:07:46 +09:00
Cheng Zhao 5ccae79ea7 spec: Suppress the app.importCertificate test
I have no idea why it failed, somehow the page can not load with the
provided certificated.
2017-08-02 15:17:18 +09:00
Kevin Sawicki 48f5a66f87 Merge pull request #9983 from electron/devtools-mixed-sandbox
Fix devtools open in mixed sandbox
2017-07-14 09:41:56 -07:00
Birunthan Mohanathas 812b529881 Add app.disableDomainBlockingFor3DAPIs()
By default, Chromium disables 3D APIs (e.g. WebGL) until restart on a
per domain basis if the GPU processes crashes too frequently. This
function disables that behaviour.
2017-07-14 01:41:43 +03:00
Hari Juturu 80bd6a3e91 🎨 2017-07-11 18:36:01 -07:00
Hari Juturu 9a3b78d9fe Fix devtools open in mixed sandbox mode 2017-07-11 18:36:00 -07:00
Kevin Sawicki e37fc0e30a Mark mixed sandbox as macOS/Windows only 2017-06-28 14:36:34 -07:00
Kevin Sawicki 523fbe2df9 Send messages between app via socket connection 2017-06-28 09:27:19 -07:00
Kevin Sawicki 7fcc00f137 Add spec for app.enableMixedSandbox() 2017-06-28 08:33:11 -07:00
Kevin Sawicki 55fcb286a5 Run getGPUFeatureStatus spec on all platforms 2017-05-31 08:10:55 -07:00
Kevin Sawicki 4a5831a733 Add initial getGPUFeatureStatus spec 2017-05-30 13:00:00 -07:00
Kevin Sawicki edd840fcc0 Only assert GPU process on macOS 2017-05-26 10:10:56 -07:00
Kevin Sawicki 8b14df143a Don't assert GPU process on Linux 2017-05-26 09:14:17 -07:00
Kevin Sawicki 1e4dd9b163 Store process type as int 2017-05-26 08:53:26 -07:00
Kevin Sawicki b5879b7399 🎨 Minor formatting/doc changes 2017-05-26 07:51:17 -07:00
Hari Juturu de5eaf9336 Remove .only 2017-05-24 21:07:35 -07:00
Hari Juturu 939747945e Adding CPU & Memory metrics for App 2017-05-24 21:07:35 -07:00
Kevin Sawicki 3b3e7cc14e Assert memory info for all returned processes 2017-05-04 13:43:45 -07:00
HariJ 88ad28b2a5 Removing describe.only 2017-04-27 14:06:53 -07:00