Commit graph

154 commits

Author SHA1 Message Date
Cheng Zhao
cde0c1d418 Print detailed error for serviceWorker test (#12186) 2018-03-08 21:06:29 -05: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
Cheng Zhao
90bd1fd7e9 Native confirm/alert throws differently 2018-03-06 14:06:29 +09:00
Aleksei Kuzmin
dcb369ee46 Fail "navigator.serviceWorker" tests if WebContents crashes 2018-02-23 10:21:24 +09:00
Shelley Vohr
1e090b9ee7
remove .only 2018-02-08 13:50:44 -05:00
Shelley Vohr
f6d389b159
fix child process import 2018-02-08 13:50:19 -05:00
Shelley Vohr
e10b5e13e9
move spec to chromium_spec 2018-02-08 13:00:41 -05:00
deepak1556
fd297722a8 Note about incorrect usage of blink::SchemeRegistry methods 2018-01-02 16:37:10 +09:00
John Kleinschmidt
0ef8f58090 Remove Travis references 2017-11-30 15:39:32 -05:00
Felix Rieseberg
9f0df695ca 🔧 Spec: Fix style issues 2017-11-23 14:22:58 -08:00
Aleksei Kuzmin
cf749a8e18 Explicitly skip tests that should be skipped 2017-11-20 14:43:23 +01:00
Cheng Zhao
79414d4822 Do not open devtools in tests 2017-11-20 11:05:38 +09:00
Ahmed Mohamed Ali
ff707a0f3d Fix issues in the file for the tests. 2017-11-13 21:13:19 +01:00
Ahmed Mohamed Ali
1e9942c1bf Fix js coding style errors 2017-10-20 08:46:41 +02:00
Ahmed Mohamed Ali
44f91e12e1 Add tests for fix described in #10793 2017-10-19 16:15:02 +02:00
Boik
01d021e6a3 add a new spec for https://github.com/electron/electron/pull/10008 2017-07-15 15:00:30 +08:00
Kevin Sawicki
6d2a5145c9 Assert loaded state 2017-06-28 13:01:22 -07:00
Kevin Sawicki
9f0d2cd39d Use pdf-loaded event in specs 2017-06-28 12:57:05 -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
Kevin Sawicki
af1d0c45ca Load URL after registering listener 2017-06-05 14:47:11 -07:00
Kevin Sawicki
777b5b17de Move pushState spec chromium-spec with other history specs 2017-06-05 14:45:45 -07:00
Kevin Sawicki
647e88da5a Delete mock.pdf after download completes 2017-05-22 14:24:28 -07:00
rreimann
25015c4c63 Fix naming and formatting 2017-05-22 14:14:59 -07:00
rreimann
13665090d5 Add new test and enable plugins for existing tests 2017-05-22 14:14:59 -07:00
Kevin Sawicki
e817dbf50a Add failing spec for webviewTag inheritance 2017-05-17 13:27:28 -07:00
Kevin Sawicki
4fdb884feb Fix windows path in service worker spec 2017-05-11 15:33:56 -07:00
deepak1556
3c88447be6 protocol: provide default response code for custom request jobs 2017-05-11 15:33:56 -07:00
Kevin Sawicki
56a4a69dee Add more non-matching target origins 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
Kevin Sawicki
775753c3d7 Add spec for invalid window.history.go offset 2017-04-26 12:37:16 -07:00
Kevin Sawicki
7726c7c6c4 Add spec for webPreferences in features string 2017-04-26 10:56:53 -07:00
Kevin Sawicki
9643b2a5c5 Add specs for window.open frameName argument 2017-04-26 10:14:11 -07:00
Kevin Sawicki
246937a372 Convert targetOrigin to string in render process 2017-04-26 09:08:47 -07:00
Kevin Sawicki
7e285711ca Add spec for window.open toString errors 2017-04-26 09:08:47 -07:00
Kevin Sawicki
3f88eb2f86 Add spec for chrome-devtools URL with no node integration 2017-04-25 13:36:08 -07:00
Kevin Sawicki
cee0507090 Add failing spec for inheriting Javascript web preference 2017-04-25 12:57:53 -07:00
Kevin Sawicki
a00d36fb07 Add spec for alert/confirm toString errors 2017-04-24 09:15:01 -07:00
Kevin Sawicki
5153c1f353 Disable media device specs on CI where they may not be available 2017-04-18 16:16:08 -07:00
Kevin Sawicki
f891df55d4 Call done callback with Error 2017-04-18 16:06:10 -07:00
Kevin Sawicki
4af44b1be6 Consolidate window closing 2017-04-18 16:04:27 -07:00
Cheng Zhao
40b35a991f Fix js lint 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
a35cce5f7a Enable takeHeapSnapshot spec 2017-03-17 09:14:17 -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
eda413861a update spec 2017-03-14 00:26:27 +05:30
Cheng Zhao
210f40dd53 Convert "\" to "/" in file:// url 2017-03-14 00:26:27 +05:30
deepak1556
a4400dc549 add basic spec 2017-03-14 00:26:27 +05:30
Kevin Sawicki
37b7dda3c5 Remove use of now private guestId 2017-01-16 12:38:16 -08:00
Kevin Sawicki
fbcbfbda6a Add back BrowserWindowProxy location property 2017-01-16 12:38:16 -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
b942c54bea Use closeWindow helper 2017-01-06 09:58:40 -08:00
Kevin Sawicki
04e873f78e Make deviceIds const 2016-12-12 13:33:18 -08:00
Kevin Sawicki
04da9257ef Catch any close window errors 2016-12-12 13:32:27 -08:00
deepak1556
e043dabcb8 add spec 2016-12-04 00:22:57 +05:30
Kevin Sawicki
f5f790863d Use 1 or 2 minute timeout for long specs 2016-11-29 14:31:57 -08:00
Kevin Sawicki
10386edea5 Default timeout to 30 seconds on CI and 10 seconds locally 2016-11-29 14:29:35 -08:00
Kevin Sawicki
77fa7ce977 Run more crashReporter specs on CI 2016-11-29 14:18:42 -08:00
Kevin Sawicki
145e40c2f6 Add more origin comparison specs 2016-11-28 10:56:23 -08:00
Kevin Sawicki
41dea03007 window.opener location should be webview src URL 2016-11-28 10:56:23 -08:00
Kevin Sawicki
0799317ff5 Add failing specs window.opener from <webview> opened window 2016-11-23 12:01:09 -08:00
Kevin Sawicki
aa2824621a Make scheme const 2016-11-16 08:03:07 -08:00
Kevin Sawicki
04c68745db Always call done callback in before block 2016-11-16 07:50:30 -08:00
Cheng Zhao
81f2e76e36 Fix standard linting errors 2016-11-16 07:50:30 -08:00
Cheng Zhao
a1dfdbdde4 spec: Should check origin before accessing window.opener 2016-11-16 07:50:30 -08:00
deepak1556
7ba947aee9 add spec 2016-09-22 00:15:25 +05:30
Kevin Sawicki
9829baed46 Open about:blank when window.open is called with no URL 2016-09-08 16:10:21 -07:00
Cheng Zhao
103fea5cdf Use scoped policy for micro tasks 2016-08-22 19:34:59 +09:00
Cheng Zhao
9bc6302aea spec: Add test case for fetch 2016-08-22 19:26:07 +09:00
Kevin Sawicki
916920844e Use once instead of on 2016-08-03 16:23:39 -07:00
Kevin Sawicki
197ec98800 Remove standard linter warnings 2016-06-29 09:46:16 -07:00
Cheng Zhao
4373dc1eac Merge pull request #5972 from electron/non-writeable-guest-id
Make guestId on BrowserWindowProxy non-writeable
2016-06-10 12:02:07 +00:00
Kevin Sawicki
39180e6539 Get webContents from guestId 2016-06-09 13:50:42 -07:00
Kevin Sawicki
2f88bec177 Add guestId non-writeable assertions 2016-06-09 13:45:09 -07:00
Kevin Sawicki
c8180ab301 Update spec description 2016-06-09 12:06:49 -07:00
Kevin Sawicki
a184b6afb3 Add spec for window.open from <webview> 2016-06-09 12:02:01 -07:00
Cheng Zhao
c682ccd9d0 Suppress the window.open tests on travis CI's mac machine 2016-05-08 15:15:16 +09:00
Cheng Zhao
f65f8918c9 Fix specs on Windows when running without desktop session 2016-04-30 21:03:22 +09:00
Cheng Zhao
214eb0430c Fix a few failing tests on Windows 2016-04-30 18:21:18 +09:00
Kevin Sawicki
4890734f66 Add missing title param 2016-04-01 16:42:53 -07:00
Kevin Sawicki
9e66df23d0 Add clearer assertion of process being undefined 2016-04-01 16:40:33 -07:00
Kevin Sawicki
d7b1792503 Use template strings 2016-04-01 16:39:31 -07:00
Kevin Sawicki
2713580d09 Remove stray log 2016-04-01 16:39:31 -07:00
Kevin Sawicki
777704e659 Add failing spec for nodeIntegration inheritance 2016-04-01 16:39:06 -07:00
Cheng Zhao
b35f4c1805 spec: Fix failing test due to path delimiter 2016-04-01 16:42:44 +09:00
Zeke Sikelianos
7c58f7fb02 eradicate all per-file eslint globals 2016-03-30 17:00:34 -07:00
Zeke Sikelianos
c5f70c8d99 dance around error checking with this one weird trick 2016-03-30 17:00:32 -07:00
Zeke Sikelianos
5e4696f4a7 standardize more 2016-03-30 17:00:32 -07:00
Zeke Sikelianos
9db733a4ff mostly more 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
2acfb8ad82 node-integration -> nodeIntegration 2016-03-17 13:37:07 -07:00
Todd Wolfson
7569d180c9 Added support for window.location on window.open windows 2016-03-12 18:05:01 -06:00
Kevin Sawicki
20e9a87158 Don't run mediaDevices spec on Linux CI 2016-03-04 13:23:12 -08:00
Kevin Sawicki
a4e04e6083 Always call done callback 2016-03-04 12:29:50 -08:00
Robo
fce641aab6 browser: allow enumeration of media device labels 2016-02-26 16:31:20 +05:30
Kevin Sawicki
31028ab636 Update var declarations 2016-02-17 09:27:25 -08:00
Kevin Sawicki
8a9395101e Remove unused results 2016-02-17 09:08:34 -08:00