This fixture has been calling process.exit() immediately after writing
to stdout and stderr, which the Node.js docs say is risky behavior:
> Calling process.exit() will force the process to exit as quickly as
> possible even if there are still asynchronous operations pending that
> have not yet completed fully, including I/O operations to
> process.stdout and process.stderr.
This fixture's been around for years without problems (AFAIK).
The writes are very small ('hello\n' and 'world') and finish quickly.
But recently I've been testing on a very slow CI machine. There, I see
this spec flaking when it expects stderr to be 'world' but it gets ''.
This PR changes the fixture to wait for stdout & stderr to flush
before calling process.exit().
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* chore: bump chromium to 134.0.6992.0
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* chore: add BrowserProcessImpl::CreateGlobalFeaturesForTesting() stub
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/6216193
Remove GlobalFeatures from TestingBrowserProcess::Init
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* chore: bump chromium to 134.0.6994.0
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* 6208630: Mac sandbox: don't use protobuf for policy serialization | https://chromium-review.googlesource.com/c/chromium/src/+/6208630
Co-authored-by: alice <alice@makenotion.com>
* Remove HasUnsupportedFeature Mojo interface
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/6220800
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* 6217444: Remove scoped_gdi_object.h type aliases. | https://chromium-review.googlesource.com/c/chromium/src/+/6217444
Co-authored-by: alice <alice@makenotion.com>
* chore: bump chromium to 134.0.6998.10
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* 6221378: Revert [OBC] Exclude Aliasing Cookies in FilterCookiesWithOptions() | https://chromium-review.googlesource.com/c/chromium/src/+/6221378
Co-authored-by: alice <alice@makenotion.com>
* Update ExtensionPrefs::GetDisableReasons to return DisableReasonSet
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/6218840
change copied from 6218840 extensions/shell/browser/shell_extension_loader.cc
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* 6218402: Typemap ui.gfx.DXGIHandle <=> gfx::DXGIHandle | https://chromium-review.googlesource.com/c/chromium/src/+/6218402
Co-authored-by: alice <alice@makenotion.com>
* chore: disable flaky contentTracing test
not new to this roll; it is happening in main as well
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* fixup! chore: disable flaky contentTracing test
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* chore: update patches
* chore: disable flaky content tracing tests on Linux (#45612)
(cherry picked from commit a1e4550c9e5b2b220530a9238795286bd028dbfb)
---------
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: alice <alice@makenotion.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
* fix: close quick look during tests on macOS
Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>
* use longer delay 🤷
Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>
* fix: sharedPreviewPanel being recreated on close
Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>
* test: ensure preview panel gets closed
Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>
---------
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>
* feat: Working navigationHistory.restore with just title/url
Co-authored-by: Felix Rieseberg <fr@makenotion.com>
* feat: Restore page state, too
Co-authored-by: Felix Rieseberg <fr@makenotion.com>
* chore: Docs, lint, tests
Co-authored-by: Felix Rieseberg <fr@makenotion.com>
* Implement feedback
Co-authored-by: Felix Rieseberg <fr@makenotion.com>
* More magic
Co-authored-by: Felix Rieseberg <fr@makenotion.com>
* Make _awaitNextLoad truly private
Co-authored-by: Felix Rieseberg <fr@makenotion.com>
* Implement API group feedback
Co-authored-by: Felix Rieseberg <fr@makenotion.com>
* One more round of feedback
Co-authored-by: Felix Rieseberg <fr@makenotion.com>
---------
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Felix Rieseberg <fr@makenotion.com>
- Prefer GURL() when we want to return a non-reference empty URL.
- In ServiceWorkerMain::GetStorageKey(), use a reference instead
of instantiating a new temporary GURL.
From url/gurl.h:
> // Returns a reference to a singleton empty GURL. This object is for
> // callers who return references but don't have anything to return in
> // some cases. If you just want an empty URL for normal use, prefer
> // GURL().
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* test: disable unexpectedly quit dialog on macOS
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
* test: take screenshot before keyboard lock test
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
* Revert "test: take screenshot before keyboard lock test"
This reverts commit 3ba5c6984f2946b93a74c24fe79ff346af3ea4a4.
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
---------
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
* chore: bump chromium to 134.0.6989.0
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* chore: update patches/chromium/cherry-pick-dd8e2822e507.patch
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* chore: e patches all
Co-authored-by: Charles Kerr <charles@charleskerr.com>
---------
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
refactor: forward v8::Context to v8::MicrotasksScope constructor
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Milan Burda <milan.burda@gmail.com>
When using `views::WebView` on macOS `NativeWidgetMacNSWindowHost`
contains a layer and compositor responsible for drawing web contents.
To trigger drawing `NativeWidgetMacNSWindowHost::OnVisibilityChanged`
needs to be called and `[NSWindow orderFrontRegardless]` does not trigger
`[NSWindow orderWindow:relativeTo:]` which can change
`NativeWidgetMacNSWindowHost` visiblity with stack:
```
views::NativeWidgetMacNSWindowHost::OnVisibilityChanged(bool)
remote_cocoa::NativeWidgetNSWindowBridge::OnVisibilityChanged()
-[ViewsNSWindowDelegate onWindowOrderChanged:]
-[NativeWidgetMacNSWindow orderWindow:relativeTo:]
```
`views::Widget` has method for showing inactive window:
`views::Widget::ShowInactive` which triggers
`NativeWidgetMacNSWindowHost::OnVisibilityChanged` with stack:
```
views::NativeWidgetMacNSWindowHost::OnVisibilityChanged(bool)
remote_cocoa::NativeWidgetNSWindowBridge::SetVisibilityState(remote_cocoa::mojom::WindowVisibilityState)
views::NativeWidgetMacNSWindowHost::SetVisibilityState(remote_cocoa::mojom::WindowVisibilityState)
views::NativeWidgetMac::Show(ui::mojom::WindowShowState, gfx::Rect const&)
views::Widget::ShowInactive() + 168
```
However this call seems to be insufficient to bring window to front,
therefore `[NSWindow orderFrontRegardless]` still needs to be called.
Calling `views::Widget::ShowInactive` ensures that all logic related to
showing Chromium widget will be properly executed, but onfortunately it
does not call `[NSWindow orderWindow:relativeTo:]` which is used to
disabling headless mode by the `ElectronNSWindow`, therefore we need to
trigger it manually through exposed `[ElectronNSWindow disableHeadlessMode]`.
Fixes: #45415
Co-authored-by: Michał Pichliński <michal.pichlinski@here.io>
build: always use python3 in script/lib/get-version.js
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
feat: service worker preload scripts for improved extensions support (#44411)
* feat: preload scripts for service workers
* feat: service worker IPC
* test: service worker preload scripts and ipc