Commit graph

178 commits

Author SHA1 Message Date
Samuel Attard
186301e126
feat: enable context isolation by default (#26890)
* feat: enable context isolation by default

* chore: set default in ctx iso getter

* spec: make all specs work with the new contextIsolation default

* spec: fix affinity specs

* spec: update tests for new ctx iso default

* spec: update tests for new ctx iso default

* spec: update tests for new ctx iso default

* spec: update tests for new ctx iso default

* chore: move stray prod deps to dev deps

* spec: update tests for new ctx iso default

* turn off contextIsolation for visibility tests

* turn off contextIsolation for <webview> tag nodeintegration attribute loads native modules when navigation happens

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2021-03-01 16:52:29 -05:00
John Kleinschmidt
c5a41defbd
fix: enable navigator.setAppBadge/clearAppBadge (#27067) 2021-01-21 14:45:06 +09:00
Shelley Vohr
f6df79b927
fix: bind fake mojo service for badging (#25294)
* fix: bind fake mojo service for badging

* Add a test
2020-09-08 11:13:56 -04:00
Milan Burda
c6db47182a
test: make sure tests fail properly instead of timing out (#24316) 2020-07-01 00:10:36 +02:00
Shelley Vohr
659e79fc08
refactor: prevent consistent early exception (#24191)
* refactor: prevent consistent early exception

* Use _linkedBinding where possible

* Remove dead electronBinding
2020-06-22 20:32:45 -07:00
Samuel Attard
abe5cf398c
refactor: port window.open and window.opener to use ctx bridge instead of hole punching (#23235)
* refactor: port window.open and window.opener to use ctx bridge instead of hole punching

* refactor: only run the isolated init bundle when webview is enabled
2020-04-27 12:46:04 -07:00
Samuel Attard
5d657dece4
build: enable JS semicolons (#22783) 2020-03-20 13:28:31 -07:00
Samuel Attard
b87b501161
build: update eslint + eslint plugins (#22777)
* build: run eslint --fix

* chore: manually fix all hasOwnProperty errors

* chore: manually fix all void 0 vs undefined errors

* chore: manually fix all async-in-promise errors

* chore: manually fix lexical declaration in case block
2020-03-20 11:12:18 -04:00
Jacob
a7c2f79a94 fix: prevent silent failure when DOM storage quota exceeded (#20899)
* test: update DOM storage quota limits test

* fix: update dom_storage_limits.patch (fixes #13465)

The previous version of this patch did not include
changes required to circumvent the quota enforcement
performed by StorageAreaImpl. Consequently when
the quota was exceeded, things still "appeared to
work" at first but then would later fail silently.
That is, the cache would be updated but the backing
store would not.

This could be fixed by disabling the code below
(from `content/browser/dom_storage/storage_area_impl.cc`)
```
  // Only check quota if the size is increasing, this allows
  // shrinking changes to pre-existing maps that are over budget.
  if (new_item_size > old_item_size && new_storage_used > max_size_) {
    if (map_state_ == MapState::LOADED_KEYS_ONLY) {
      receivers_.ReportBadMessage(
          "The quota in browser cannot exceed when there is only one "
          "renderer.");
    } else {
      std::move(callback).Run(false);
    }
    return;
  }
```

However, since this seems to have some unintended side-effects
(see updated notes in dom_storage_limits.patch) it seems
more prudent to simply increase the quota to a larger
yet still reasonable size rather than attempt to circumvent
the storage quota altogether.
2019-11-22 11:35:54 -08:00
Samuel Attard
24939e8fa4
build: speedy tests on circle by splitting the test files into multiple jobs (#21015)
* build: let circleci divide our test suites in two

* well our tests rely on side affects, thats cool I guess
2019-11-06 16:15:55 -08:00
Electron Bot
b6246dcf12 chore: bump chromium to f5b345dd470f14eef6e44732ccf23 (master) (#20649) 2019-10-28 15:12:35 -07:00
Jeremy Apthorp
221ce70699 test: remove remote usage from chromium spec (#20568)
* test: move & expand webview -> window.open() opener tests

* remove remaining usage of 'protocol' from chromium-spec.js

* remove final usages of remote from chromium-spec

* remove import of window-helpers
2019-10-16 11:12:31 -04:00
Alexey Kuzmin
b085dac15b spec: allow "Yu Gothic" as a Japanese sans-serif font on Windows (#20564) 2019-10-14 14:30:18 -04:00
Jeremy Apthorp
d67f25ce43
test: expand window.opener test and move to main process (#20549) 2019-10-14 09:00:34 -07:00
Jeremy Apthorp
2aa7ab821c
test: remove some remote usage from chromium specs (#20121)
* test: remove remote usage from chromium specs

* disable tts test

* port navigator.mediaDevices tests

* fake camera and microphone

* Update spec-main/chromium-spec.ts

Co-Authored-By: John Kleinschmidt <jkleinsc@github.com>
2019-10-11 13:55:50 -07:00
John Kleinschmidt
7be1905023 fix: resolve crash loading file based serviceworkers (#20132) 2019-09-06 10:01:22 +09:00
Electron Bot
e959137a4b chore: bump chromium to 32e0bab929213da1019992bf31d29 (master) (#19488) 2019-08-02 16:56:46 -07:00
Milan Burda
8a33118e36 fix: refactoring regression in LocationProxy (#19495) 2019-07-29 11:20:19 -07:00
Milan Burda
419ce494e9 refactor: use IPC helpers in window-setup (#17948) 2019-07-09 02:43:49 +03:00
Electron Bot
50b9c7051e chore: bump chromium to f1d9522c04ca8fa0a906f88ababe9 (master) (#18648)
* chore: bump chromium in DEPS to 675d7dc9f3334b15c3ec28c27db3dc19b26bd12e

* chore: update patches

* chore: bump chromium in DEPS to dce3562696f165a324273fcb6893f0e1fef42ab1

* chore: const interfaces are being removed from //content

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/1631749
Bug: https://bugs.chromium.org/p/chromium/issues/detail?id=908139

* chore: update patches

* chore: blink::MediaStreamType is now consistent and deduplicated

* chore: update patches and printing code for ref -> uniq

* chore: bridge_impl() --> GetInProcessNSWindowBridge

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/1642988

* fixme: TotalMarkedObjectSize has been removed

* chore: fix linting

* chore: bump chromium in DEPS to 9503e1a2fcbf17db08094d8caae3e1407e918af3

* chore: fix slightly broken printing patch

* chore: update patches for SiteInstanceImpl changes

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/1612025

* chore: update patches for SiteInstanceImpl changes

* chore: bump chromium in DEPS to 6801e6c1ddd1b7b73e594e97157ddd539ca335d7

* chore: update patches

* chore: bump chromium in DEPS to 27e198912d7c1767052ec785c22e2e88b2cb4d8b

* chore: remove system_request_context

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/1647172

* chore: creation of FtpProtocolHandler needs an auth cache

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/1639683

* fixme: disable marked spec

* chore: bump chromium in DEPS to 3dcd7fe453ad13a22b114b95f05590eba74c5471

* chore: bump chromium in DEPS to bdc24128b75008743d819e298557a53205706e7c

* chore: bump chromium in DEPS to 7da330b58fbe0ba94b9b94abbb8085bead220228

* update patches

* remove TotalMarkedObjectSize

https://chromium-review.googlesource.com/c/chromium/src/+/1631708

* add libvulkan.so to dist zip manifest on linux

* chore: bump chromium in DEPS to 1e85d0f45b52649efd0010cc9dab6d2804f24443

* update patches

* add angle features to gpuinfo

https://chromium-review.googlesource.com/c/chromium/src/+/1638658

* mark 'marked' property as deprecated

* disable webview resize test

* FIXME: disable vulkan on 32-bit arm

* chore: bump chromium in DEPS to cd0297c6a83fdd2b1f6bc312e7d5acca736a3c56

* Revert "FIXME: disable vulkan on 32-bit arm"

This reverts commit 5c1e0ef302a6db1e72231d4e823f91bb08e281af.

* backport from upstream: fix swiftshader build on arm

https://swiftshader-review.googlesource.com/c/SwiftShader/+/32768/

* update patches

* viz: update OutputDeviceWin to new shared memory api

https://chromium-review.googlesource.com/c/chromium/src/+/1649574

* base::Contains{Key,Value} => base::Contains

https://chromium-review.googlesource.com/c/chromium/src/+/1649478

* fixup! viz: update OutputDeviceWin to new shared memory api

* stub out StatusIconLinuxDbus-related delegate methods

https://chromium-review.googlesource.com/c/chromium/src/+/1638180

* chore: bump chromium in DEPS to 964ea3fd4bdc006d62533f5755043076220181f1

* Remove the BrowserContext methods to create URLRequestContexts for main/media partitions when a partition_domain is specified

https://chromium-review.googlesource.com/c/chromium/src/+/1655087

* fixup! stub out StatusIconLinuxDbus-related delegate methods

* add remote_cocoa to chromium_src deps

https://chromium-review.googlesource.com/c/chromium/src/+/1657068

* fixup! stub out StatusIconLinuxDbus-related delegate methods

* attempt at fix linux-debug build

* add swiftshader/libvulkan.so to arm manifest

* chore: bump chromium in DEPS to 28688f76afef27c36631aa274691e333ddecdc22

* update patches

* chore: bump chromium in DEPS to fe7450e1578a9584189f87d59d0d1a8548bf6b90

* chore: bump chromium in DEPS to f304dfd682dc86a755a6c49a16ee6876e0db45fb

* chore: bump chromium in DEPS to f0fd4d6c365aad9edd83bdfff9954c47d271b75c

* Update patches

* Remove no longer needed WOA patch

* Put back IOThread in BrowserProcess

We need this until we enable the network service.

* move atom.ico to inputs

* Update to latest LKGR to fix no template named 'bitset' in namespace 'std'

* fixup! Put back IOThread in BrowserProcess

* chore: bump chromium in DEPS to dcf9662dc9a896a175d791001350324167b1cad3

* Update patches

content_allow_embedder_to_prevent_locking_scheme_registry.patch is no longer necessary as it was upstreamed via https://chromium-review.googlesource.com/c/chromium/src/+/1637040

* Fix renamed enum

* Use newer docker container

Contains updated dependencies

* Try to track down arm test failures

* Fix arm tests

* chore: bump chromium in DEPS to 8cbceef57b37ee14b9c4c3405a3f7663922c5b5d

* Update patches

* Add needed dependencies for testing 32-bit linux

* Remove arm debugging.

* Remove additional debugging

* Fix compiler errors

* Handle new macOS helper

* Fix compile error on Linux

* chore: bump chromium in DEPS to 66a93991ddaff6a9f1b13d110959947cb03a1860

* Add new helper files to manifests

* fix BUILD.gn for macOS

* Fix compile errors

* Add patch to put back colors needed for autofill/datalist

* chore: bump chromium in DEPS to e89617079f11e33f33cdb3924f719a579c73704b

* Updated patches

* Remove no longer needed patch

* Remove no longer needed patch

* Fix compile error with patch

* Really fix the patch

* chore: bump chromium in DEPS to c70f12476a45840408f1d5ff5968e7f7ceaad9d4

* chore: bump chromium in DEPS to 06d2dd7a8933b41545a7c26349c802f570563fd5

* chore: bump chromium in DEPS to b0b9ff8f727deb519ccbec7cf1c8d9ed543d88ab

* Update patches

* Fix compiler errors

* Fix removed ChromeNetLog

* Revert "Fix removed ChromeNetLog"

This reverts commit 426dfd90b5ab0a9c1df415d71c88e8aed2bd5bbe.

* Remove ChromeNetLog.

https://chromium-review.googlesource.com/c/chromium/src/+/1663846

* chore: bump chromium in DEPS to fefcc4926d58dccd59ac95be65eab3a4ebfe2f29

* Update patches

* Update v8 patches

* Fix lint error

* Fix compile errors

* chore: bump chromium in DEPS to 4de815ef92ef2eef515506fe09bdc466526a8fd9

* Use custom protocol to test baseURLForDataURL

* Use newer SDK (10.0.18362) for Windows

* Update patches

* Update arm manifest since swiftshader reenabled.

* Don't delete dir that isn't ever there.

* Fix compile errors.

* Need src dir created

* Update for removed InspectorFrontendAPI.addExtensions

* Revert "Use newer SDK (10.0.18362) for Windows"

This reverts commit 68763a0c88cdc44b971462e49662aecc167d3d99.

* Revert "Need src dir created"

This reverts commit 7daedc29d0844316d4097648dde7f40f1a3848fb.

* Revert "Don't delete dir that isn't ever there."

This reverts commit bf424bc30ffcb23b1d9a634d4df410342536640e.

* chore: bump chromium in DEPS to 97dab6b0124ea53244caf123921b5d14893bcca7

* chore: bump chromium in DEPS to c87d16d49a85dc7122781f6c979d354c20f7f78b

* chore: bump chromium in DEPS to 004bcee2ea336687cedfda8f8a151806ac757d15

* chore: bump chromium in DEPS to 24428b26a9d15a013b2a253e1084ec3cb54b660b

* chore: bump chromium in DEPS to fd25914e875237df88035a6abf89a70bf1360b57

* Update patches

* Update node to fix build error

* Fix compile errors

* chore: bump chromium in DEPS to 3062b7cf090f1d9522c04ca8fa0a906f88ababe9

* chore: update node ref for pushed tags

* chore: update patches for new chromium

* chore: fix printing patches

* Use new (10.0.18362) Windows SDK

* roll node to fix v8 build issues in debug build

* Add support for plugin helper

* fix: add patch to fix gpu info enumeration

Can be removed once CL lands upstream.

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/1685993

* spec: navigator.requestMIDIAccess now requires a secure origin

This test requires a secure origin so we fake one.

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/1657952

* FIXME: temporarily disable SharedWorker tests

* use released version of node-abstractsocket

* fix abstract-socket
2019-07-02 18:22:09 -07:00
Jeremy Apthorp
0a9df1e37d spec: deflake focus handling test (#18809) 2019-06-15 16:15:15 +09:00
Jeremy Apthorp
29decbdd4d
ci: make console.warn work in tests (#18771) 2019-06-13 15:56:58 -07:00
Jeremy Apthorp
e5d1e7b4da fix: move window.open postMessage test to main runner to fix flake (#18735) 2019-06-12 08:35:58 +09:00
Cheng Zhao
3a1d6d2ce1
feat: migrate protocol module to NetworkService (Part 11) (#18706)
* Pipe data into HTTP protocol handlers

* Remove unused parameters

* Remove "sending request of http protocol urls" test

Sending request to "http://" in "file://" violates CORS rules and always
fail, before NetworkService somehow Chromium still sent a request even
though the request failed with CORS error, so the test passes while the
test is not valid. With NetworkService no request is sent at all and the
test jsut fails.

So this is an ancient invalid test, as sending http requests have been
fully covered in other tests, I am removing this test.
2019-06-11 14:07:58 +09:00
Jeremy Apthorp
ac35f41e8d
test: move download-related session specs to main runner (#18508) 2019-05-30 15:05:02 -07:00
Jeremy Apthorp
ca283c74c9 Merge remote-tracking branch 'origin/master' into roller/chromium-ad1b791122c04bd91b825fbfbdf1ff4da82a0edb-1558011686736 2019-05-21 10:07:17 -07:00
Milan Burda
5a7b56b042 chore: finish replacing assert with expect in tests (#18215)
* spec: replace assert with expect in api-browser-view-spec.js

* spec: replace assert with expect in api-touch-bar-spec.js

* spec: replace assert with expect in api-web-frame-spec.js

* spec: replace assert with expect in api-web-contents-view-spec.js

* spec: replace assert with expect in security-warnings-spec.js

* spec: replace assert with expect in api-menu-item-spec.js

* spec: replace assert with expect in api-web-request-spec.js

* spec: replace assert with expect in api-remote-spec.js

* spec: replace assert with expect in api-session-spec.js

* spec: replace assert with expect in api-system-preferences-spec.js

* spec: replace assert with expect in api-browser-window-spec.js

* spec: replace assert with expect in webview-spec.js

* spec: replace assert with expect in api-net-spec.js

* spec: replace assert with expect in api-protocol-spec.js

* spec: replace assert with expect api-web-contents-spec.js

* spec: replace assert with expect in api-shell-spec.js

* spec: replace assert with expect in modules-spec.js

* spec: replace assert with expect in chromium-spec.js

* spec: replace assert with expect in api-crash-reporter-spec.js

* spec: replace assert with expect in asar-spec.js

* spec: rename assert-helpers to expect-helpers

* address PR feedback
2019-05-20 12:04:18 -05:00
Nitish Sakhawalkar
cf5224140b Chrome changed the devtools url
chrome-devtools:// to devtools://
28b21a67f0
2019-05-17 16:16:25 -07:00
Shelley Vohr
d87b3ead76 chore: remove promisification deprecation callbacks (#17907)
* chore: remove promisification deprecation callbacks

* update docs

* fix smoke test

* fix executejs issue

* cleanup leftovers

* fix webContents.executeJavaScript tests

* cleanup WebContents.prototype.takeHeapSnapshot

* fix "sets arbitrary webContents as devtools" test

* fix executeJavaScriptInFrame related tests
2019-04-30 07:08:32 -07:00
Shelley Vohr
38d75010c7
chore: rename atomBinding to electronBinding (#17419) 2019-03-18 12:37:06 -07:00
Shelley Vohr
bbfa63fd9d
feat: promisify session.clearStorageData() (#17249) 2019-03-08 09:02:30 -08:00
Milan Burda
1f458eb177 feat: promisify debugger.sendCommand() (#16861)
* remove duplicate entry for desktopCapturer.getSources

* feat: promisify debugger.sendCommand
2019-02-13 07:23:53 -10:00
Samuel Attard
833daaa2b2
chore: add helper to wait for a window to load in a remote-safe way (#16837) 2019-02-08 12:26:03 -08:00
Jeremy Apthorp
fd8b9450ee
test: untangle a chromium-spec test (#16456) 2019-01-22 13:26:32 -08:00
Milan Burda
6cba2c50a2 feat: make ipc-message and ipc-message-sync events public (#16468) 2019-01-22 08:47:58 -08:00
Robo
52fe92d02e feat: Upgrade to Chromium 71.0.3578.98 (#15966) 2019-01-11 17:00:43 -08:00
Milan Burda
fade3eb679 chore: make "nodeIntegration" and "webviewTag" default to false (#16235) 2019-01-07 22:19:27 +03:00
Cheng Zhao
4ff7976060
fix: add missing require in chromium-spec (#16153) 2018-12-20 16:58:46 +09:00
Pedro Pontes
9c783f53ba fix: do not allow the window to grab focus when tabbing / shift+tabbing (#16042)
* fix: do not allow the window to grab focus when tabbing / shift+tabbing

* test: add tests.
2018-12-18 23:44:51 -07:00
Jeremy Apthorp
ed3e5739dc test: promisify a bunch of tests (#16051)
* test: promisify a bunch of tests

* fix lint

* fix affinity tests

* more cowbell^Wawait

* less done
2018-12-18 23:44:03 -07:00
Pedro Pontes
d5d1fa8290 fix: use appropriate site instance for cross-site nav's (#15821)
* fix: use Chromium's determined new site instance as candidate when navigating.

When navigating to a new address, consider using Chromium's determined site instance
for the new page as it should belong to an existing browsing instance when the
navigation was triggered by window.open().

fixes 8100.

* Revert "fix: use Chromium's determined new site instance as candidate when navigating."

This reverts commit eb95f935654a2c4d4457821297670836c10fdfd5.

* fix: delegate site instance creation back to content when sandboxed.

* fix: ensure site isolation is on

* test: adapt ut for cross-site navigation

* fix: register pending processes during a navigation.

* refactor: dont call loadURL for a window constructed from an existing webContents.

* test: add sandboxed affinity UT's.

* fix: check affinity before deciding if to force a new site instance.

* chore: adapt subsequent patch.

* refactor: constify logically const methods.

* fix: do not reuse site instances when navigation redirects cross-site.

* test: ensure localStorage accessible after x-site redirect.

* test: adapt localStorage acess denied UT for site isolation.

* fix: do not send render-view-deleted for speculative frames.

* chore: amend tests after rebase.

* test: add ut for webContents' render-view-deleted emission

* fix: introduce current-render-view-deleted for current RVH's deletions.

Revert render-view-deleted to being emitted with any RVH's deletion.
current-render-view-deleted is emitted only when the RVH being deleted
is the current one.

* refactor: style and comments fixed.
2018-12-05 17:03:39 +09:00
Cheng Zhao
ca7dec2082 fix: default prop of location should be empty str 2018-12-04 17:11:26 +09:00
Cheng Zhao
fc4e10b6c0 fix: set setter of window.location 2018-12-04 16:23:52 +09:00
deepak1556
00294a5b25 FIXME: disable some specs 2018-12-03 20:07:42 +05:30
Jeremy Apthorp
5d54d42953 test: fix remote-debugging-port test calling done twice (#15857) 2018-11-28 10:59:05 +09:00
Jeremy Apthorp
455f0669e7
fix: add missing shell_resources.pak to repack target (#15844) 2018-11-27 11:18:18 -08:00
Pedro Pontes
57d2ae1aec revert: "fix: window.open site instance should belong to same browsing instance (#15216)" (#15757)
This reverts commit 8f35198bfb.
2018-11-20 21:28:26 +01:00
Pedro Pontes
8f35198bfb fix: window.open site instance should belong to same browsing instance (#15216) 2018-11-12 22:01:43 +01:00
Jacob
b21dbdb20d fix: bypass DOM storage quota (#15596) 2018-11-12 18:19:01 +01:00
Jeremy Apthorp
7e0e12b8a3 fix: match Chrome's font fallback behavior (#15486)
* fix: match Chrome's font fallback behavior

Fixes #15481

* add a cache

* add test

* another test

* fix tests

* arial -> dejavu sans on linux apparently?
2018-11-08 10:51:51 -04:00