Commit graph

176 commits

Author SHA1 Message Date
Samuel Attard
40f0f049a2
spec: fix final node and chromium specs after assert change 2018-09-14 18:32:17 +10:00
Samuel Attard
558fff69e7
chore: update to standard 12 2018-09-14 14:57:01 +10:00
Milan Burda
c63014c256 refactor: use loadFile when appropriate in tests (#14422) 2018-09-04 09:50:53 -05:00
Samuel Attard
68da311ed1 feat: add session.setPermissionCheckHandler (#13925)
* feat: add session.setPermissionCheckHandler to handle syncornous permission checks vs requests

* spec: add tests for session.setPermissionCheckHandler

* docs: add docs for session.setPermissionCheckHandler

* feat: add mediaType to media permission checks

* chore: cleanup check impl
2018-08-28 09:05:08 -05:00
Robo
bce5bd87a8 fix: opt into location services once device service has been started (#14253)
* fix: opt into location services once device service has been started

* refactor: provide fake location provider to mock geolocation reponses

* chore: add spec for navigator.geolocation api using fake location provider
2018-08-23 08:51:46 -07:00
Cheng Zhao
dd5b8769be fix: use OOPIF for webview tag (#13869)
* fix: use OOIF for webview tag

* fix: do not call GetNativeView for webview

* fix: OOIPF webview's WebContents is managed by embedder frame

* fix: guest view can not be focused

* fix: clear zoom controller when guest is destroyed

* fix: implement the webview resize event

The webview is no longer a browser plugin with the resize event, use
ResizeObserver instead.

* test: disable failed tests due to OOPIF webview

* fix: embedder can be destroyed earlier than guest

This happens when embedder is manually destroyed.

* fix: don't double attach

* fix: recreate iframe when webview is reattached

* fix: resize event may happen very early

* test: some tests are working after OOPIF webview

* chore: remove unused browser plugin webview code

* fix: get embedder via closure

When the "destroyed" event is emitted, the entry in guestInstances would be
cleared.

* chore: rename browserPluginNode to internalElement

* test: make the visibilityState test more robust

* chore: guestinstance can not work with OOPIF webview

* fix: element could be detached before got response from browser
2018-08-16 15:57:40 -07:00
Cheng Zhao
e42c6d3eb7
fix the crash when loading site with jquery (#13475) 2018-06-29 09:42:04 +09:00
Shelley Vohr
fa0704665f
test: temporarily disable failing specs (#13470) 2018-06-27 14:15:24 -07:00
Cheng Zhao
44aad039c6 fix: do not expose Node's external strings (#13438) 2018-06-27 10:18:09 +10:00
Alexey Kuzmin
b9da1575f0 spec: enable a disabled test (#13346) 2018-06-22 00:42:55 +10:00
Felix Rieseberg
562eddf0e9 test: Upgrade spec dependencies (#13310)
* 📦 Update mocha, mocha-junit-reporter

* 📦 Update graceful-fs, multiparty, q, walkdir

* 📦 Update basic-auth

* 📦 Update ws

* 📦 Update dbus-native

* 📦 Upgrade yargs

* 🔒 Run `npm audit fix`

* 🔧 Fix websocket API change
2018-06-20 17:18:24 +10:00
Aleksei Kuzmin
b70ca6309c Disable a test 2018-06-19 11:49:46 +10:00
Aleksei Kuzmin
10c5141da0 Enable a few tests 2018-06-19 11:49:46 +10:00
Aleksei Kuzmin
e96d8b664d Skip one of the "chromium feature" tests 2018-06-19 11:49:45 +10:00
Nitish Sakhawalkar
fbff355742 Support for navigator.languages (#12419) 2018-04-02 12:47:00 +09:00
deepak1556
e24c0dda5d add features module to detect availability of build time features at runtime 2018-03-20 10:13:17 +03:00
deepak1556
4b39d17e5f move pdf viewer behind feature flag 2018-03-20 10:13:17 +03:00
Aleksei Kuzmin
d5ecbfc539 spec: Do not assume en-US locale to be the current 2018-03-20 10:13:16 +03:00
Charles Kerr
c2673aa970 Set appropriate defaults for webview options (#12271)
* Persist defaults to webPreferences object to JS land can read the inferred values instead of just user defined values

* Test inherited default propogation

* Refactor to remove coupling from fetching values and defaults

* Test description type

* Fix up tests
2018-03-15 13:56:46 +09:00
deepak1556
c3bcb606a9 spec: isolate sw file scheme spec storage with temp partition 2018-03-14 02:03:55 +09:00
Charles Kerr
e400585a0e Apply further ES6 bikeshedding 2018-03-13 17:09:47 +09:00
Charles Kerr
e4d5ae53fc Add tests 2018-03-13 15:55:48 +09:00
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