Commit Graph

320 Commits

Author SHA1 Message Date
Marshall Greenblatt b065ca8cf4 ceftests: Add support for scaling default test timeout values 2023-01-13 14:01:29 -05:00
Marshall Greenblatt a986b1c226 ceftests: Fix CorsTest.IframeNone failures
The same console message is sometimes output multiple times.
2023-01-04 21:36:29 -05:00
Marshall Greenblatt 7ba45a0451 Mac: Fix implicit type cast errors with Xcode 14.1 2023-01-04 17:58:42 -05:00
Marshall Greenblatt 3af3eab3e4 Update source files for bracket style 2023-01-04 17:47:17 -05:00
Marshall Greenblatt 216e5b31dd tests: Fix CorsTest.Iframe failures (see issue #3348)
Run test initialization after the server has started.
2022-11-17 12:50:15 -05:00
Marshall Greenblatt 47d69a842a Update to Chromium version 109.0.5414.0 (#1070088)
- mac: Xcode 14.0 with macOS SDK 13.0 is now required.
- Remove CefRequestHandler::OnQuotaRequest because persistent quota is no
  longer supported (see https://crbug.com/1208141)
2022-11-17 12:50:15 -05:00
Marshall Greenblatt 09bb643ef6 Support registration of custom preferences.
Custom global and request context preferences can now be registered via
CefBrowserProcessHandler::OnRegisterCustomPreferences. CefRequestContext
now extends CefPreferenceManager and global preferences can be accessed
via CefPreferenceManager::GetGlobalPreferenceManager.
2022-10-26 16:54:33 -04:00
Marshall Greenblatt 07bf5dbacc windows: Configure stack size for executables (fixes issue #3250)
Change the default stack size to 8 MiB for 64-bit and 0.5 MiB for 32-bit.

CEF's main thread needs at least a 1.5 MiB stack size in order to avoid
stack overflow crashes. However, if this is set in the PE file then other
threads get this size as well, leading to address-space exhaustion in 32-bit
CEF. A new CefRunWinMainWithPreferredStackSize function uses fibers to switch
the main thread to a 4 MiB stack (roughly the same effective size as the
64-bit build's 8 MiB stack) before running any other code.

This change additionally moves the existing Windows-only functions
CefSetOSModalLoop and CefEnableHighDPISupport from cef_app.h to cef_win.h.
2022-10-21 14:52:50 -04:00
Marshall Greenblatt 8b45f32b33 Update to Chromium version 108.0.5359.0 (#1058933) 2022-10-18 17:58:41 -04:00
npavlov 485f0b9caf Add screen pixel to screen DIP conversion methods.
On Windows these new CefDisplay methods convert between screen pixel coordinates
and screen DIP coordinates. On macOS and Linux these methods just return a copy
of the input coordinates.
2022-10-14 13:55:07 -04:00
VodBox fa643b269e Add support for native creation and resolution of Promises (fixes issue #3305) 2022-10-11 14:55:12 -04:00
Jelle Bleyaert e0c878df5f Add CefResolveURL function (fixes issue #3402) 2022-10-03 17:46:50 +00:00
Marshall Greenblatt 4d1fd05740 Update to Chromium version 107.0.5304.0 (#1047731) 2022-09-29 13:09:35 -04:00
Marshall Greenblatt 5ea0c141b5 Convert base::size to std::size from C++17 (see issue #3362) 2022-09-05 16:31:47 -04:00
Marshall Greenblatt 37aee4d3a0 Improve the timing of OnLoadEnd (fixes issue #3341)
Use WebContentsDelegate::DidFinishLoad instead of a custom Mojo message.
This fixes flaky OnLoadEnd behavior with NavigationTest.Order.
2022-08-25 18:23:33 -04:00
Marshall Greenblatt 5ec6e62656 tests: Fix DOMTest failure with fractional devicePixelRatio 2022-08-25 14:09:20 -04:00
Marshall Greenblatt bf467e136a tests: Disable HTTPS server reuse between tests (see issue #3348)
We can't currently reuse the HTTPS server between tests due to
https://crrev.com/dd2a57d753 causing certificate registration issues.
2022-08-25 14:09:20 -04:00
Marshall Greenblatt e95d1653ac tests: Fix failures on multiple execution of HSTSRedirectTest.Redirect (see issue #3336) 2022-08-25 14:09:20 -04:00
Marshall Greenblatt a4b8935427 Add missing newline at end of file 2022-08-16 16:23:27 -04:00
Marshall Greenblatt 7fdbb427bc alloy: Fix flaky OnDraggableRegionsChanged behavior (fixes issue #3374)
Disable BackForwardCache globally for the Alloy runtime so that
blink::RuntimeEnabledFeatures::BackForwardCacheEnables reports the
correct value in the renderer process.
2022-08-11 17:25:36 -04:00
Marshall Greenblatt e44f76bbe4 Fix DisplayTest.AutoResize failure 2022-08-11 14:49:54 -04:00
Marshall Greenblatt f8d10289b5 Fix DOMTest failure related to device scaling 2022-08-11 14:20:23 -04:00
Marshall Greenblatt ecb29b7fa5 alloy: Fix OnCertificateError callback for requests redirected to HTTPS (fixes issue #3364)
This change also adds initial unit test coverage for OnCertificateError (see issue #3148).
2022-08-09 13:31:18 -04:00
Marshall Greenblatt 18dac30874 Support configuration of the CefTestServer certificate type (see issue #3348) 2022-08-04 12:37:12 -04:00
Marshall Greenblatt dcd4a0077c Include net test data in the binary distribution (see issue #3348) 2022-08-03 16:28:52 -04:00
Marshall Greenblatt 46e1c4f177 ceftests: Add HSTS redirect test (see issue #3336, see issue #3348) 2022-08-03 12:14:51 -04:00
Marshall Greenblatt 952f2b0829 ceftests: Rename test_server::Observer::OnHttpRequest to OnTestServerRequest (see issue #3348) 2022-08-01 21:14:12 -04:00
Marshall Greenblatt 0b1c3938c6 ceftests: Fix CookieTest failure with --use-test-http-server (see issue #3348) 2022-08-01 21:09:02 -04:00
Marshall Greenblatt a895274add ceftests: Add test_server support for CefTestServer (see issue #3348) 2022-08-01 16:20:04 -04:00
Marshall Greenblatt f24dd61329 Add CefTestServer that supports both HTTP and HTTPS (see issue #3348) 2022-08-01 16:20:03 -04:00
Marshall Greenblatt ce18bb98ab ceftests: Deprecate the use of test_server constants (see issue #3348) 2022-08-01 16:20:03 -04:00
Marshall Greenblatt a4d63010c9 ceftests: Refactor test_server to support both HTTP and HTTPS servers (see issue #3348) 2022-08-01 16:20:03 -04:00
Marshall Greenblatt 68be2b8938 ceftests: Generalize the test_server::Observer interface (see issue #3348)
Don't expose CefServer implementation details to consumers.
2022-08-01 15:14:13 -04:00
Marshall Greenblatt 654f570b6e windows: Fix Views test failures (fixes issue #3365) 2022-07-27 13:57:53 -04:00
Marshall Greenblatt 5e753d211f Run TimeTest.InvalidBaseTimeToTime on Windows only (see issue #2935)
This test is failing on Linux and MacOS.
2022-07-22 13:31:29 -04:00
Marshall Greenblatt 4aef0ada9d Add missing newline at end of file (see issue #3126) 2022-07-19 10:09:35 -04:00
Dmitry Azaraev 27d3089804 Add CefBaseTime and use it instead of CefTime (see issue #2935) 2022-07-19 10:09:35 -04:00
Nik Pavlov 987b932a19 Fix compilation errors from shared message unit tests (see issue #3126) 2022-07-19 14:09:10 +00:00
Marshall Greenblatt f1003df810 chrome: Add support for OnRequestMediaAccessPermission callback (see issue #2582) 2022-07-08 07:40:35 +00:00
Marshall Greenblatt e4b9169221 Add CefPermissionHandler callbacks for permission prompts (see issue #3352) 2022-07-07 10:01:24 +00:00
Nik Pavlov 81e892d19e Add a shared memory variant of CefProcessMessage (fixes issue #3126)
CefSharedProcessMessageBuilder supports creation of a CefProcessMessage
backed by a CefSharedMemoryRegion.

Performance tests comparing the existing ArgumentList approach and the new
SharedMemoryRegion approach have been added to cefclient at
http://tests/ipc_performance.

CefMessageRouter has been updated to use SharedMemoryRegion as transport
for larger message payloads. The threshold is configurable via
|CefMessageRouterConfig.message_size_threshold|.

To test:
run `ceftests --gtest_filter=SendSharedProcessMessageTest.*:SharedProcessMessageTest.*:MessageRouterTest.Threshold*`
2022-07-04 09:49:15 +00:00
Marshall Greenblatt daa89115d5 Add OnMediaAccessChange notification (fixes issue #3310) 2022-06-30 12:22:28 +00:00
Marshall Greenblatt 26e30b3859 Add CefPermissionHandler callback for media access (fixes issue #2582) 2022-06-30 07:31:18 +00:00
Marshall Greenblatt c7ea0c5958 Update to Chromium version 104.0.5112.0 (#1012729)
- Mac: 10.13 is now the minimum required macOS version
2022-06-22 10:56:35 +03:00
JohnKarel d9b764860a alloy: Add touch handle and quick menu support for OSR (fixes issue #3268)
The client is responsible for rendering both as no default implementation
is currently available for OSR.
2022-05-30 10:51:39 +03:00
Marshall Greenblatt 771e5c7c0c ceftests: Replace unicode characters with encoded equivalent 2022-05-30 10:26:12 +03:00
Marshall Greenblatt ee15eca351 ceftests: Minor code cleanup 2022-05-25 16:42:41 +03:00
Marshall Greenblatt 2ea7459a89 Use Chrome file dialogs on all platforms and runtimes (fixes issue #3314)
All file dialogs irrespective of source, platform and runtime will now be
routed through CefFileDialogManager and trigger CefDialogHandler callbacks
(see issue #3293).

Adds Chrome runtime support for CefBrowserHost::RunFileDialog and
CefDialogHandler callbacks.

Adds Alloy runtime support for internal GTK file and print dialogs on Linux
subject to the following limitations:

1. Internal GTK implementation:
   - Cannot be used with multi-threaded-message-loop because Chromium's
     internal GTK implementation is not thread-safe (does not use GDK threads).
   - Dialogs will not be modal to application windows when used with off-screen
     rendering due to lack of access to the client's top-level GtkWindow.
2. Cefclient CefDialogHandler implementation:
   - Cannot be used with Views because it requires a top-level GtkWindow.

Due to the above limitations no dialog implementation is currently provided for
Views + multi-threaded-message-loop on Linux. In cases where both
implementations are supported the cefclient version is now behind an optional
`--use-client-dialogs` command-line flag.

Expressly forbids multiple simultaneous file dialogs with the internal platform
implementation which uses modal dialogs. CefDialogHandler will still be notified
and can optionally handle each request without a modal dialog (see issue #3154).

Removes some RunFileDialog parameters that are not supported by the Chrome file
dialog implementation (selected_accept_filter parameter, cef_file_dialog_mode_t
overwrite/read-only flags).
2022-04-19 18:52:26 -04:00
Marshall Greenblatt 4921dc2213 Fix unintentional state transfer in DetachToUserFree (fixes issue #3309)
Calling DetachToUserFree() on a CefString holding a reference should copy the
value instead of transferring ownership.

A new `StringTest.Ownership` test has been added for this behavior.
2022-04-13 14:33:25 -04:00
Marshall Greenblatt 21cf732e7f chrome: Update expectations with same-site BFCache enabled (fixes issue #3301)
With same-site BFCache enabled every navigation can now potentially be served
via the BFCache. To support this internally a new top-level RenderFrame object
may be created for each new navigation. As a result, OnBrowserCreated may now
be called multiple times with the same browser ID in a given renderer process
(a behavior previously only seen with cross-site navigations and different
renderer processes).

BFCache navigations do not trigger the same Chromium notifications as a normal
load. To avoid breaking CEF API usage expectations we now synthetically
generate the load-related callbacks that would otherwise be missing
(OnLoadingStateChange with isLoading=true, OnLoadStart, OnLoadEnd). The
|httpStatusCode| argument to OnLoadEnd will be 0 in this case.

To test:
- Run `FrameHandlerTest.*:MessageRouterTest.*:NavigationTest.*`
- Run `NavigationTest.LoadSameOriginLoadURL` for OnBrowserCreated behavior.
- Run `NavigationTest.History` for load-related callback behavior.
2022-04-05 15:30:30 -04:00
Marshall Greenblatt 6d7a680187 Add permission callback for user-initated downloads (fixes issue #3183)
This change adds a CefDownloadHandler::CanDownload callback for optionally
blocking user-initiated downloads (e.g. alt + link click or link click that
returns a `Content-Disposition: attachment` response from the server).

To test:
- Run `ceftests --gtest_filter=DownloadTest.*`.
- Run `cefclient --hide-controls`. User-initiated downloads will be blocked.
2022-03-22 17:46:44 -04:00
Marshall Greenblatt 28c7f04001 Delete cef_web_plugin.h and plugin-related APIs (see issue #3047)
This functionality stopped being relevant after the removal of Flash support
in January 2021. The last remaining PPAPI plugin (PDF viewer) will switch to
a non-plugin implementation (PdfUnseasoned) in M100.
2022-02-18 16:23:11 -05:00
Marshall Greenblatt f4d5395c4b Skip GetNewBrowserInfo call for PDF renderer processes (see issue #3047)
With PdfUnseasoned the PDF file will be loaded in a dedicated renderer process.
We identify this process by adding the kPdfRenderer command-line flag (similar
to how kExtensionProcess is used to identify an extension renderer process). We
then avoid calling GetNewBrowserInfo for the PDF renderer process because we
know the request will otherwise time out.
2021-11-29 15:46:39 -05:00
Marshall Greenblatt 6eff48e9ff chrome: Add support for PdfViewerTest ceftests (see issue #3047)
We need to override ChromeMimeHandlerViewGuestDelegate to handle
OnGuestAttached/Detached callbacks in order to account for the guest renderer
process hosting the PDF extension.

Additional work will be required to account for the renderer process hosting the
PDF viewer when using `--enable-features=PdfUnseasoned` (see issue #2969).
2021-11-16 19:17:50 -05:00
Marshall Greenblatt 66648c2343 Update to Chromium version 97.0.4692.0 (#938553)
- Remove CefRequestContextHandler::OnBeforePluginLoad and
  CefRequestContext::PurgePluginListCache (fixes issue #3047). These methods
  stopped being relevant after the removal of Flash support in January 2021.
  The last remaining PPAPI plugin (PDF viewer) will switch to a non-plugin
  implementation in the near future (see https://crbug.com/702993#c58) and
  functionality related to plugin filtering has already been removed in
  https://crrev.com/343ae351c9.
2021-11-15 14:25:16 -05:00
Marshall Greenblatt 4d1c5ebdd2 Fix CefCommandLine character case requirements (fixes issue #1872)
Switch names will now be converted to lowercase ASCII on all platforms.
Switch values will retain the original case and UTF8 encoding.
2021-09-27 16:36:57 +03:00
Marshall Greenblatt cbc5710801 Replace CefRequestCallback with CefCallback (fixes issue #1861)
CefRequestCallback::Continue(false) was the same as Cancel(), so we can just
use CefCallback instead.
2021-09-27 16:22:27 +03:00
Marshall Greenblatt 41b64e428c Rename SendFocusEvent to SetFocus (fixes issue #866)
Also removes CefBrowserHost::SendFocusEvent. Use the existing SetFocus method
instead.
2021-09-27 10:50:12 +03:00
Marshall Greenblatt 5782fdca16 Update to Chromium version 95.0.4638.0 (#920003)
Known issues:
- Windows ARM64 builds are currently failing due to
  https://crbug.com/1242884#c31
2021-09-22 12:08:24 +03:00
Marshall Greenblatt 7a56371b84 Fix draggable region update with BackForwardCache enabled (see issue #2421)
When BackForwardCache is enabled and the user navigates the main frame
back/forward a new RFH may be created for an existing main frame GlobalId value
and CefFrameHostImpl (e.g. an object that was previously Detach()ed after main
frame navigation called SetMainFrame, but for which RenderFrameDeleted was not
subsequently called due to insertion in the BackForwardCache). In this case we
can re-attach the new RFH to the existing main frame CefFrameHostImpl in
RenderFrameHostStateChanged and resume processing of messages.

Swapping back/forward to an existing (already loaded) renderer does not trigger
new notifications for draggable regions (e.g. RenderFrameObserver::
DraggableRegionsChanged is not called by default). We therefore explicitly
request an update of draggable regions by sending the DidStopLoading message to
the renderer.

A new |reattached| parameter is added to CefFrameHandler::OnFrameAttached to
support identification of BackForwardCache usage by the client.

To test with unit tests:
Run `ceftests --gtest_filter=DraggableRegionsTest.DraggableRegionsCrossOrigin
              --enable-features=BackForwardCache`

To test manually:
1. Run `cefclient --enable-features=BackForwardCache --use-views
   --url=http://tests/draggable`, note that draggable regions work.
2. Load https://www.google.com via the address bar, note that draggable regions
   are removed.
3. Go back to http://tests/draggable, note that draggable regions work.
4. Go forward to https://www.google.com, note that draggable regions are
   removed.
2021-09-16 18:25:43 +03:00
Marshall Greenblatt 25c1947f1d Update to Chromium version 94.0.4606.0 (#911515) 2021-08-24 17:43:02 -04:00
Marshall Greenblatt 6f819707b0 chrome: Linux: Fix ceftest DraggableRegionsTest.DraggableRegions failure (see issue #2969) 2021-07-27 19:03:21 -04:00
Marshall Greenblatt 92ec2dcbdd Fix ceftest failures with BackForwardCache enabled (see issue #2421)
When BackForwardCache is enabled the old RFH tree may be cached instead of being
immediately deleted as a result of main frame navigation. If a RFH is cached
then delivery of the CefFrameHandler::OnFrameDetached callback will be delayed
until the the RFH is ejected from the cache (possibly not occurring until the
browser is destroyed). This change in OnFrameDetached timing was causing
FrameHandlerTest.OrderSubCrossOrigin* to fail, and the inclusion of cached
frames in CefBrowserInfo::GetAllFrames was causing
FrameTest.NestedIframesDiffOrigin to fail.

BackForwardCache is currently being tested via field trials (see
https://crbug.com/1171298) and can be explicitly disabled using the
`--disable-back-forward-cache` or `--disable-features=BackForwardCache`
command-line flags.
2021-07-27 19:03:21 -04:00
Marshall Greenblatt b4ea0496e7 Update to Chromium version 93.0.4577.0 (#902210) 2021-07-27 19:03:09 -04:00
Marshall Greenblatt 103fe12b72 Linux: Fix SchemeHandlerTest.Custom*StandardNoResponse test failures 2021-06-24 20:55:29 -04:00
Marshall Greenblatt 7efac13ac1 gtest: Add plugin for TeamCity integration
Automatically report unit tests to the TeamCity server if run within TeamCity.
See tests/gtest/teamcity/README.cef for details.

To test: Set the TEAMCITY_PROJECT_NAME environment variable and run ceftests.
2021-06-24 17:00:21 -04:00
Marshall Greenblatt 9efd3dc8ee Fix compile errors with VS2019 v16.9.3 and GCC v7.5.0 (see issue #3140) 2021-06-23 13:00:34 -04:00
Marshall Greenblatt 529b91bc6e tests: Convert usage of base::Bind to Once or Repeating (see issue #3140) 2021-06-19 17:19:32 -04:00
Marshall Greenblatt cc2759d07e Add base::OnceClosure support in cef_closure_task.h (see issue #3140) 2021-06-18 14:19:11 -04:00
Marshall Greenblatt 3545e20b01 ceftests: Don't use base::Bind in object constructor (see issue #3140)
Fixes the following error:
[FATAL:cef_bind_internal.h(868)] Check failed: receiver->HasAtLeastOneRef().
base::Bind{Once,Repeating}() refuses to create the first reference to ref-counted
objects. That typically happens around PostTask() in their constructor, and such
objects can be destroyed before `new` returns if the task resolves fast enough.
2021-06-18 13:42:32 -04:00
Marshall Greenblatt 17fc2b3e3b Various fixes related to the C++11/14 update (see issue #3140)
- Convert scoped_ptr to std::unique_ptr from <memory>
- Convert arraysize to base::size from include/base/cef_cxx17_backports.h
- Convert NULL to nullptr
- Include include/base/cef_callback.h instead of include/base/cef_bind.h
- Implicit conversion of CefRefPtr<T> or scoped_refptr<T> to T* is gone;
  use .get() instead

See the issue for additional details.
2021-06-18 13:42:31 -04:00
Marshall Greenblatt 6d80ec69d7 Replace OVERRIDE with override (see issue #3140) 2021-06-17 16:16:53 -04:00
Marshall Greenblatt ba46b8c53e Fix CefBrowser::GetMainFrame assumptions in the renderer process (see issue #2421)
ClientAppRenderer::Delegate callbacks are executed for all tests. In this case
CorsTest.IframeAllowScriptsCustomNonStandardSchemeToServer was crashing on Linux
because CefBrowser::GetMainFrame() returns nullptr in the renderer process when
called from a cross-origin sub-frame.
2021-06-10 16:42:45 -04:00
Marshall Greenblatt 5a622c22b5 Mac: Fix flaky ResourceRequestHandlerTest failures
The AbortAfterCreated and AbortBeforeBrowse tests were flaking due to a race
between request handling and browser close. The tests would fail if the request
handling completed first.
2021-06-10 16:42:45 -04:00
Marshall Greenblatt ecbeca36e7 Mac: Fix compile error due to multiply defined type (see issue #2421) 2021-06-10 16:42:44 -04:00
Marshall Greenblatt 00dca9601e Update to Chromium version 92.0.4515.0 (#885287) 2021-06-10 16:42:44 -04:00
Marshall Greenblatt f3ddec372f chrome: Fix ResourceRequestHandlerTest failures (see issue #2969) 2021-05-31 18:58:27 -04:00
Marshall Greenblatt e411b513be Add CefFrameHandler callbacks for tracking CefFrame lifespan (see issue #2421)
See the new cef_frame_handler.h for complete usage documentation.

This change includes the following related enhancements:
- The newly added CefBrowser::IsValid method will return false (in the browser
  process) after CefLifeSpanHandler::OnBeforeClose is called.
- CefBrowser::GetMainFrame will return a valid object (in the browser process)
  until after CefLifeSpanHandler::OnBeforeClose is called.
- The main frame object will change during cross-origin navigation or
  re-navigation after renderer process termination. During that time,
  GetMainFrame will return the new/pending frame (in the browser process) and
  any messages that arrive for the new/pending frame will be correctly
  attributed in OnProcessMessageReceived.
- Commands to be executed in the renderer process that may fail during early
  frame initialization (ExecuteJavaScript, LoadRequest, etc.) will now be
  queued until after the JavaScript context for the frame has been created.
- Logging has been added for any commands that are dropped because they arrived
  after frame detachment.
2021-05-31 18:58:27 -04:00
Marshall Greenblatt 21ac0be8d7 Update process message unit test expectations (see issue #3126)
See related comments in commit f3c513ba.
2021-05-20 14:56:23 -04:00
Marshall Greenblatt ebee84755e Convert legacy IPC messages to Mojo (fixes issue #3123)
This change introduces a few minor CEF API behavior changes:

- A CefProcessMessage object cannot be reused after being passed to
  SendProcessMessage.
- The |extra_info| argument to CefRenderProcessHandler::OnBrowserCreated may
  now be NULL.

Where appropriate, we now utilize the default UTF string encoding format and
shared memory to reduce copies and conversions for the cross-process
transfer of arbitrary-length strings. For example, CefFrame::GetSource/GetText
now involves zero UTF conversions and zero copies in the browser process for
the CefString delivered to CefStringVisitor::Visit().
2021-05-18 21:59:48 -04:00
Marshall Greenblatt 4f0b7b4511 chrome: ceftests: Avoid timeouts of ResourceManagerTest.ManyRequests (see issue #2969) 2021-05-18 15:35:42 -04:00
Marshall Greenblatt 511e10d594 ceftests: Add missing newline at end of file 2021-04-23 21:00:43 -04:00
Marshall Greenblatt ae4f68f695 Update to Chromium version 91.0.4472.0 (#870763) 2021-04-23 11:38:51 -04:00
Marshall Greenblatt 34c63a665d Wait for CefBrowserContext initialization (see issue #2969)
With the Chrome runtime, Profile initialization may be asynchronous. Code that
waited on CefBrowserContext creation now needs to wait on CefBrowserContext
initialization instead.
2021-04-14 21:03:44 -04:00
Marshall Greenblatt fc7f9ff505 Fix crash when navigating to an unregistered scheme (fixes issue #3105)
The policy->CanAccessDataForOrigin CHECK in NavigationRequest::
GetOriginForURLLoaderFactory was failing because unregistered schemes
(which are already considered non-standard schemes) didn't trigger the
registered non-standard scheme allowance that we previously added in
ChildProcessSecurityPolicyImpl::CanAccessDataForOrigin. This change
modifies GetOriginForURLLoaderFactory to always return an opaque/unique
origin for non-standard schemes resulting in unregistered and non-standard
schemes receiving the same treatment.

New test coverage has been added for this condition, and can be run with:
ceftests --gtest_filter=CorsTest.*CustomUnregistered*
2021-04-12 16:18:37 -04:00
Marshall Greenblatt 6d25033822 mac: ceftests: Fix helper app linker errors (see issue #2969) 2021-04-11 20:44:28 -04:00
Marshall Greenblatt 1c04d96468 chrome: Fix FrameTest and RequestHandlerTest failures (see issue #2969) 2021-04-09 22:24:44 -04:00
Marshall Greenblatt 5318dfe252 chrome: Fix PreferenceTest failures (see issue #2969) 2021-04-09 22:00:33 -04:00
Marshall Greenblatt 76642ccafa Move cookieable scheme configuration to settings (see issue #2969)
The Chrome runtime requires that cookieable scheme information be available
at Profile initialization time because it also triggers NetworkContext creation
at the same time. To make this possible, and to avoid various race conditions
when setting state, the cookieable scheme configuration has been added as
|cookieable_schemes_list| and |cookieable_schemes_exclude_defaults| in
CefSettings and CefBrowserContextSettings. The CefCookieManager::
SetSupportedSchemes and CefBrowserProcessHandler::GetCookieableSchemes methods
are no longer required and have been removed.

This change also modifies chrome to delay OffTheRecordProfileImpl initialization
so that |ChromeBrowserContext::profile_| can be set before
ChromeContentBrowserClientCef::ConfigureNetworkContextParams calls
CefBrowserContext::FromBrowserContext to retrieve the ChromeBrowserContext
and associated cookieable scheme information. Otherwise, the
ChromeBrowserContext will not be matched and the NetworkContext will not be
configured correctly.

The CookieTest suite now passes with the Chrome runtime enabled.
2021-04-09 15:04:24 -04:00
Marshall Greenblatt 09fa22898d chrome: Support client-created request contexts (see issue #2969)
RequestContextTest and URLRequestTest suites now pass with the Chrome runtime
enabled.
2021-04-07 18:19:17 -04:00
Marshall Greenblatt 1cddbeb12f chrome: Fix CorsTest.RedirectPost307HttpSchemeToCustomNonStandardScheme failure (see issue #2969) 2021-04-05 14:49:30 -04:00
Marshall Greenblatt 09c6586480 chrome: Fix NavigationTest and ResourceRequestHandlerTest failures (see issue #2969) 2021-04-05 13:50:21 -04:00
Marshall Greenblatt 25701cfa6f chrome: Add support for reparenting of popups with Views (see issue #2969) 2021-04-02 16:53:34 -04:00
Marshall Greenblatt 7876a2f321 Move GetPrintHandler to CefClient (see issue #2196)
This new location is preferred because we now know the associated CefBrowser
for all CefPrintHandler callbacks.
2021-03-30 12:26:57 -04:00
Marshall Greenblatt 91ecc85e93 Fix potential use-after-free of V8TrackArrayBuffer (fixes issue #3074) 2021-03-23 16:02:51 -04:00
Marshall Greenblatt 74db00fc89 Update to Chromium version 90.0.4430.0 (#857950)
- Linux ARM builds require use_vaapi=false (see https://crbug.com/1185348)
- Windows official builds require use_thin_lto=false (see https://crbug.com/1177001)
2021-03-18 11:23:00 -04:00
Marshall Greenblatt 1587d6da03 Update ArrayBuffer to use new BackingStore API (fixes issue #3074) 2021-03-12 12:36:47 -05:00
Marshall Greenblatt 1d39ff720e Mac: Add Views API support (see issue #1749)
The Chrome browser can now be hosted in a Views-based application on Mac
(see issue #2969).

To launch a fully-featured Chrome window using cefsimple:
$ open cefsimple.app --args --enable-chrome-runtime

To launch a minimally-styled Views-hosted window using cefsimple:
$ open cefsimple.app --args --use-views [--enable-chrome-runtime]

To launch a fully-styled Views-hosted window using cefclient:
$ open cefclient.app --args --use-views [--enable-chrome-runtime]

Known issues:
- Some Views unit tests are currently failing on Mac.
2021-02-27 12:31:45 -05:00
Marshall Greenblatt 5ef0fb8ac8 Update to Chromium version 89.0.4389.0 (#843830)
- SSE3 is now required on x86 processors (see https://crbug.com/1123353).
2021-02-08 14:15:38 -05:00
Marshall Greenblatt a584bd187b Update to Chromium version 88.0.4324.0 (#827102)
- Mac: Xcode 12.2 and the MacOS 11.0 SDK are now required for building.
- MacOS 10.10 (Yosemite) is no longer supported (see https://crbug.com/1126056).
- Flash is no longer supported (see https://www.chromium.org/flash-roadmap).
2020-12-04 15:43:33 -05:00