Unfortunately the interaction of WebAudio's pull model and MediaStream's
push model ends up requiring a high priority thread to pump WebAudio. In
most cases the AudioOutputDevice provides this thread, but in the MS
case audio is redirected to the MS and only silent audio is delivered to
the actual output device. After 30s the SilentSinkSuspender kicks in to
avoid wasting power on an unused output device; which can be up to 25%
improvement.
SilentSinkSuspender runs on the media thread though, which in addition
to being normal priority, is generally running tasks which may take
longer than the audio time slice (~2ms in the worst on macOS) to run.
As such we can get glitches in the audio flowing out of the MS.
As such, lets give the SilentSinkSuspender a display priority thread and
see if that's sufficient to allow us to keep the power gains as well as
solve the glitching issues.
R=hongchan
Bug: 766198, 1030950
Change-Id: Id1f8b9fef052490fcd15b6b2e923b42e80f0ed2c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2176259
Commit-Queue: Dale Curtis <dalecurtis@chromium.org>
Commit-Queue: Hongchan Choi <hongchan@chromium.org>
Auto-Submit: Dale Curtis <dalecurtis@chromium.org>
Reviewed-by: Hongchan Choi <hongchan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#764816}
Added trace events to BrowserContext, RenderProcessHostImpl,
and ProfileDestroyer to make it easier to visualize the
lifetime of these objects and observe their behavior during
shutdown.
Bug: 1076101
Change-Id: Iaaf9e96a6094801f0042e47bf0af28a92382eab7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2171463
Commit-Queue: Charlie Reis <creis@chromium.org>
Reviewed-by: Charlie Reis <creis@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Auto-Submit: Aaron Colwell <acolwell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#764809}
Add image/avif to the HTTP Accept headers for navigation requests if the
AVIF feature is enabled. This is done by effectively inserting
"image/avif" into network::kFrameAcceptHeaderValue.
AV1 Image File Format (AVIF) is a new image format:
https://aomediacodec.github.io/av1-avif/
The AVIF image decoder is based on the AV1 video decoder, which is
available in Chrome if the ENABLE_AV1_DECODER build flag is set. In
addition, AVIF support is enabled by the AVIF feature flag. Therefore,
it requires a combination of a compile-time check and a run-time check
to detect if AVIF is enabled.
Websites can check the presence of image/avif in the HTTP Accept header
to determine if they can serve AVIF images to the Web browser.
Tested:
browser_tests --gtest_filter=*ChromeAcceptHeaderTest*
browser_tests --gtest_filter=*ChromeAcceptHeaderTest* --enable-features=AVIF
content_browsertests --gtest_filter=*AcceptHeaderTest*:*ServiceWorkerURLLoaderThrottleTest*:*SignedExchangeAcceptHeaderBrowserTest*
content_browsertests --gtest_filter=*AcceptHeaderTest*:*ServiceWorkerURLLoaderThrottleTest*:*SignedExchangeAcceptHeaderBrowserTest* --enable-features=AVIF
Bug: 1073107
Change-Id: I90a485fe19e063339243fe4e06388e15b839e117
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2173797
Reviewed-by: Matt Menke <mmenke@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Yoav Weiss <yoavweiss@chromium.org>
Commit-Queue: Wan-Teh Chang <wtc@google.com>
Cr-Commit-Position: refs/heads/master@{#764797}
Such link is displayed in about:gpu for affected users to
take action.
Also, disable accelerated video decode on AMD driver 8.17.10.*
This is the first try to get rid of this crash. If it doesn't
help, step two is to also disable gpu rasterization; step
three is to disable all GPU acceleration.
BUG=1069262
R=dalecurtis@chromium.org,kbr@chromium.org
Change-Id: I37168feaf2d1a8bfa492234262b21b83d89d3386
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2174879
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Zhenyao Mo <zmo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#764773}
This reverts commit 2c4473afd6.
Reason for revert: Causing content_unittest failures in multiple platforms, see https://ci.chromium.org/p/chromium/builders/ci/android-pie-arm64-rel/4800 for an example failure.
Original change's description:
> appcache: bump manifest version to force token read
>
> Currently, there's a timing issue with adding Origin-Trial to a
> manifest. If a user hasn't upgraded to M84 and gets the new manifest,
> the token_expires will not be correctly set on their cache. This change
> makes it so that so long as a user has visited a site with an origin
> trial token in the manifest, even if they are on a previous version of
> Chrome, we will reparse the manifest and look at the token even if the
> remote manifest is unchanged.
>
> Bug: 582750
> Change-Id: I6d15aa75093c6594a8ad9e668955c82d9dafc437
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2173594
> Commit-Queue: enne <enne@chromium.org>
> Reviewed-by: Chase Phillips <cmp@chromium.org>
> Reviewed-by: Marijn Kruisselbrink <mek@chromium.org>
> Reviewed-by: Victor Costan <pwnall@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#764699}
TBR=cmp@chromium.org,mek@chromium.org,enne@chromium.org,pwnall@chromium.org
Change-Id: Ia740584483c4fd08c5bab73cfe324b94abac38b1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 582750
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2174734
Reviewed-by: Adithya Srinivasan <adithyas@chromium.org>
Commit-Queue: Adithya Srinivasan <adithyas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#764761}
This CL adds two histograms:
- Conversions.ExtraReportDelay: Records the extra (non-scheduled) time
a conversion report was delayed beyond the scheduled delay the browser
imposes. This extra delay is due to things like the browser being closed
when a report is scheduled to be sent.
- Conversions.ReportStatus: A simple 3-valued enum about the status of
the conversion report network request, separating out the error case into
two (internal error or external error). This status could help inform
us whether implementing retries is useful.
Bug: 1054127
Change-Id: Iddf08673f457112a2ce88650ec658b27057c215d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2167003
Reviewed-by: John Delaney <johnidel@chromium.org>
Commit-Queue: Charlie Harrison <csharrison@chromium.org>
Cr-Commit-Position: refs/heads/master@{#764759}
In addition to doing a global walk of the session history to find
existing instances of an origin that is opting in to isolation (see
https://chromium-review.googlesource.com/c/chromium/src/+/2018252), we
must also look for that origin in the FrameTreeNodes. This looks at
committed origins as well as navigations that are pending commit.
The FrameTree walk is necessary since some frames may be missing
FrameNavigationEntries, and also since pending navigations will contain
information not yet in the session history.
Bug: 1042415, 1062719
Change-Id: I802c1f391037471a698e7eb7795a367bd0604f5b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2136703
Reviewed-by: Charlie Reis <creis@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Commit-Queue: James MacLean <wjmaclean@chromium.org>
Cr-Commit-Position: refs/heads/master@{#764730}
Update tests under //content/browser (not including subdirectories) to
use WebContentsConsoleObserver instead of ConsoleObserverDelegate. This
allows us to observe console messages added without overriding the
existing delegate of the WebContents.
Bug: 1034150
Change-Id: Icae6452f3b7753cf6fa8da4caab8a5756687164d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2173343
Commit-Queue: Devlin <rdevlin.cronin@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#764726}
Drops the SetFocusAndActivate() test code from RenderViewImpl and the
plumbing over to it. Instead, pretend to receive the focus/activate
IPCs that the browser sends in production.
window.focus() on another window goes through the browser process in
production, but had a synchronous override in web tests, that allowed
tests to pass even though we should need to wait to see the focus occur
asynchronously in chrome.
It also denies the request unless there is a user action present, but in
web tests we dropped that requirement. This CL removes the web test
override there, and adds user gestures to the tests that are performing
a window.focus() on another window.
Drop the focus of the main frame when navigating to about:blank between
tests. The browser already sends a Focus() IPC to the main frame of the
about:blank at the start of a test. This was causing the test windows to
lie about being focused - they would all claim to be focused! It caused
an error in one sensor test, where it runs code in the secondary
inspector window that expects the window to be focused. So a mojom
method is added to mojom::WebTestControlHost to move focus to that
window for the test.
Remove all the other extraneous focus-moving that was happening in the
WebTestControlHost and friends browser code. That code was moving focus
on Linux but does nothing on Mac, because on Mac headless mode the
RenderWidgetHostView::Focus() method asks the OS to focus a window that
isn't visible so it does nothing.
Rename the testRunner.setWindowIsKey(bool) to setWindowFocus(bool) and
remove comments explaining that the method is actually setting window
focus. It would be nice to remove this entirely and use a separate
window to move focus around, but that doesn't work for some tests, which
is a bit interesting but not addressed by this CL.
Drop the "previously focused window" tracking in TestRunner, which would
keep around invalid (UAF-prone) pointers. Instead, iterate through the
windows (actually, RenderViews) and blur the focused one there.
The http/tests/serviceworker/clients-openwindow.html test expectations
are adjusted as the renderer no longer marks the main frame as focused
on navigation, so the service worker no longer reports the opened
window as focused.
Filed bug 1074482 and bug 1076129 for WPT tests that fail after this
change. The former because it's either/both expecting run_web_tests.py
to focus newly recreated windows and we don't, and it was calling
window.focus() of another window, which had test-only synchronous code
which we have removed. The latter because it seems to have a bug in how
its written that this CL has uncovered.
R=nasko@chromium.org
Bug: 866140, 1069111, 1074482, 1076129
Change-Id: I9d7ed8f9c41a75fc8afaf6bb0bfc3e5772e1297c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2165248
Commit-Queue: danakj <danakj@chromium.org>
Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org>
Reviewed-by: Mustaq Ahmed <mustaq@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#764725}
Currently, there's a timing issue with adding Origin-Trial to a
manifest. If a user hasn't upgraded to M84 and gets the new manifest,
the token_expires will not be correctly set on their cache. This change
makes it so that so long as a user has visited a site with an origin
trial token in the manifest, even if they are on a previous version of
Chrome, we will reparse the manifest and look at the token even if the
remote manifest is unchanged.
Bug: 582750
Change-Id: I6d15aa75093c6594a8ad9e668955c82d9dafc437
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2173594
Commit-Queue: enne <enne@chromium.org>
Reviewed-by: Chase Phillips <cmp@chromium.org>
Reviewed-by: Marijn Kruisselbrink <mek@chromium.org>
Reviewed-by: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#764699}
Problems:
- RPHW continues to observe the RPH after it crashes. If the RPH crashes
a second time, the quit_closure is invalid when it is called again (e.g.
https://crrev.com/c/2169460, described in attached bug).
- RHPW remove their RPH observer in the destructor. RPHWs are often
scoped to the whole test and there is no guarantee that the reference
is still valid at that point.
Fix:
- remove the observer and clear the reference when the quit closure
is run making the RPHW insert from then on.
Bug: 1076014
Change-Id: I3cd8e96243c198312c8874c9a6a46ee9204f0198
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2173917
Commit-Queue: Fergal Daly <fergal@chromium.org>
Reviewed-by: Łukasz Anforowicz <lukasza@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Auto-Submit: Fergal Daly <fergal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#764695}
CreateAndOpenTemporaryStreamInDir will soon return an exclusive handle
to the created file on Windows. In that case, DeleteFile will fail while
handles are still open. While this isn't a problem here, let's use a
"best practice" style and close the handle before attempting a possible
delete.
BUG=none
R=kenrb@chromium.org
Change-Id: I33871a0618387efca2b932b31f1eac71f2e88604
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2173070
Commit-Queue: Ken Buchanan <kenrb@chromium.org>
Auto-Submit: Greg Thompson <grt@chromium.org>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#764665}
This CL adds a new class called "ElasticOverscrollController". This
will serve as a base class for InputScrollElasticityController and for
OverscrollBounceController (which is the overbounce version of Windows
style overscrolling).
Bug: 1058071
Change-Id: I0ae1b999f3a21a9c56482e6bf037e0886730649c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2172343
Commit-Queue: Rahul Arakeri <arakeri@microsoft.com>
Reviewed-by: David Bokan <bokan@chromium.org>
Reviewed-by: Stefan Zager <szager@chromium.org>
Reviewed-by: Daniel Libby <dlibby@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#764609}
Previously when we refactored ShouldSwapBrowsingInstancesForNavigation
in crrev.com/c/2081728 we changed some method calls that used the
original destination URL to use the destination's effective URL instead,
causing us to swap BrowsingInstances on same-document navigations.
This CL makes sure we're only using the effective URL for methods
that previously also used effective URL.
Bug: 1073540
Change-Id: Iba9d1f88a254f4dc60ea338176a15cabeb534698
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2174097
Commit-Queue: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#764566}
Asynchronous API that's implemented as a readback on
RenderWidgetHostView. Screenshot height is reduced by the the amount
of top browser control. Converting to java bitmap is done on a
background thread since it involves a copy.
Try to ensure the callback is never dropped by reusing old
CompositorImpl implementation that forces a draw before unsetting
Surface. It was recently removed in
https://chromium-review.googlesource.com/c/chromium/src/+/2171318
It ensures the callback is executed for edge cases like becoming
in visible, losing surface, or being destroyed.
Add a test that ensures callback executes even if fragment is
destroyed immediately calling capture. Also add a basic test to
ensure the bitmap indeed captures the contents of the page.
Bug: 1076100
Change-Id: I2d782d497349a0af8d528c715e62c8b0a9fbbb41
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2170425
Commit-Queue: Bo <boliu@chromium.org>
Reviewed-by: Khushal <khushalsagar@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#764548}
Update tests in blocked_scheme_navigation_browsertest.cc and
web_contents_impl_browsertest.cc to use WebContentsConsoleObserver
instead of ConsoleObserverDelegate. This allows us to observe console
messages added without overriding the existing delegate of the
WebContents.
This also lets us simplify some of the bespoke log monitoring done in
BlockedSchemeNavigationBrowserTest.
Bug: 1034150
Change-Id: Idc59ceda3c6c8ebf4ec5153816d3d71509d714df
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2173650
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Commit-Queue: Devlin <rdevlin.cronin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#764547}
Re-adds an optimization in the brute force optimizer for GPU inexact
matching where we'll skip any further maximum different pixel
increases once we've found a good maximum per-channel delta sum value
for a given Sobel filter edge threshold.
Bug: 1074130
Change-Id: I77dc433da8040513122fa1722bfa232843ca9f2b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2174914
Auto-Submit: Brian Sheedy <bsheedy@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#764524}
This change adds a FrameToken to RenderFrameProxyHost and passes
the existing RenderFrameHostImpl token along the construction IPCs.
This FrameToken provides a mapping between
RenderFrameHostImpl <--> blink::LocalFrame
RenderFrameProxyHost <--> blink::RemoteFrame
This allows blink to provide a handle to another frame on some of the IPCs.
It is the similar to the routing_id use to identify the mapping:
RenderFrameHostImpl <--> RenderFrameImpl
RenderFrameProxyHost <--> RenderFrameProxy
but it isn't dependent on routing IDs and can be passed into blink because
it is unguessable token.
For detailed explanation of current tokens:
https://docs.google.com/document/d/1SRJY_k0l8YhGTlRl2yIWlPsEB5BMJBigV9Ez4U_n8vo/edit
BUG=1045014
Change-Id: I2077d62164c4aa34fa6b5367482f83daae192342
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2140202
Commit-Queue: Nasko Oskov <nasko@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#764510}
Instead of using a raw ServiceWorkerVersion*, this CL wraps it
in scoped_refptr<> from
ServiceWorkerContextWrapper::FinishedExternalRequest before
calling methods on ServiceWorkerVersion.
This causes the crash from
ExtensionServiceWorkerMessageFilter::OnDecrementServiceWorkerActivity
to be fixed in various //extensions tests.
The idea was harvested from failures logs, with stacktrace:
ExtensionServiceWorkerMessageFilter::OnDecrementServiceWorkerActivity
content::ServiceWorkerContextWrapper::FinishedExternalRequest
content::ServiceWorkerVersion::FinishRequest()
content::ServiceWorkerVersion::FinishExternalRequest()
base::IDMap<>::IsEmpty()
base::SequenceCheckerImpl::CalledOnValidSequence()
base::internal::LockImpl::Lock()
--
FATAL:lock_impl_posix.cc(103)] Check failed: rv == 0 (22 vs. 0). Invalid argument. Hint: This is often related to a use-after-free.
Bug: 850786
Test: Locally running a flaky test no longer hits mentioned Check failure.
Change-Id: I18f7ef2d1ec214150901773d00e10839c18f106b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2169340
Commit-Queue: Istiaque Ahmed <lazyboy@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#764505}
Currently Chrome doesn’t support iframes and window.open() inside a Web
Bundle file. To support them, this CL changes RenderFrameHostImpl to
check the existence of WebBundleHandle of the parent frame (or the
opener’s frame) in the beginning of the navigation. If the frame has a
WebBundleHandle, a WebBundleHandleTracker is created from the handle and
will be passed to the NavigationRequest of the navigation.
NavigationRequest::OnStartChecksComplete() will call
WebBundleHandleTracker::MaybeCreateWebBundleHandle() which creates a new
WebBundleHandle if the web bundle contains the page, and the page will
be loaded from the web bundle.
Bug: 1040800
Change-Id: I308d85d8192345e82dcf943c499fc15b0529d459
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2160633
Commit-Queue: Tsuyoshi Horo <horo@chromium.org>
Reviewed-by: Kunihiko Sakamoto <ksakamoto@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#764486}
For WebLayer, we want to allow changing the user-agent override during
DidStartNavigation(). Doing this currently triggers a reload (and most
likely a crash). This patch adds the logic to detect the user agent override
and update the client hint related headers.
BUG=1033029
TEST=WebContentsImplBrowserTest.SetUserAgentOverrideFromDidStartNavigation
Change-Id: I43c776f0e7e69a7eb45d80cf2004a3b8221447fc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2163164
Commit-Queue: Scott Violet <sky@chromium.org>
Reviewed-by: Maksim Orlovich <morlovich@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Yoav Weiss <yoavweiss@chromium.org>
Cr-Commit-Position: refs/heads/master@{#764448}
Don't set a default resource for Web UIs in
SetupWebUIDataSource()/SetupBundledWebUIDataSource(). Instead, set the
resource passed in as default as the resource for the empty path.
In WebUIDataSource, for sources without a default resource, return
the empty path resource (if it exists) if the request is for a path
that doesn't have a mime type and isn't HTML.
Bug: None
Change-Id: I92875670d790231e0cfb6fbb254bcfb7ffac1a6e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2173380
Commit-Queue: Rebekah Potter <rbpotter@chromium.org>
Reviewed-by: dpapad <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#764439}
GetAndroidOSInfo is currently also appending the model information to
the result, which caused a leak of that model information in UA-CH
platformVersion, which relied in it.
This CL refactors that function to make sure it doesn't do that in
instances where it's not desired. It also adds unit tests to the
User-Agent string, to make sure it's not broken by this change, and to
avoid issues like https://crbug.com/1061132 in the future.
Bug: 1072460
Change-Id: Id788a51f2cdf01e84c45e53885d3e8e1edd9c815
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2166164
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Richard Coles <torne@chromium.org>
Reviewed-by: Maksim Orlovich <morlovich@chromium.org>
Reviewed-by: Aaron Tagliaboschi <aarontag@chromium.org>
Commit-Queue: Yoav Weiss <yoavweiss@chromium.org>
Cr-Commit-Position: refs/heads/master@{#764428}
Adds a script to find optimal values for inexact matching in the GPU
pixel tests and enables inexact matching on several problematic tests
that could benefit from it.
Bug: 1074130
Change-Id: If4597bbda1a94fdc4dd28f87ca59ea86489c2ac1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2173415
Commit-Queue: Brian Sheedy <bsheedy@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#764424}
This change expands TrustTokenRequestHelperFactory to construct issuance
and redemption helpers for requests bearing the corresponding Trust
Tokens parameters. (This still only happens when the kTrustTokens
base::Feature is enabled.)
After this, I plan to write out a more thorough test plan enumerating
maybe ~20 cases for the end-to-end functionality and expanding the
browser tests (and the browser test fixture) to include these, too.
Examples of cases those additional tests will cover include:
- failure cases (e.g. server rejects a correct issuance/redemption)
- no key available
- multiple keys for same server, multiple servers
R=csharrison
for TrustTokenRequestHelperFactory and NetworkContext to reflect the
changes.
Test: crrev.com/c/2163845's browser tests pass; also, updates unit tests
Fixed: 1068678, 1068677, 1063140
Change-Id: I27e7ff4a9eeefa52028814c102dfdb8958b00a7d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2163847
Reviewed-by: Matt Menke <mmenke@chromium.org>
Reviewed-by: Charlie Harrison <csharrison@chromium.org>
Commit-Queue: David Van Cleve <davidvc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#764413}
Recently the clipboard was moved from being owned by the render process
host to being owned by the render frame host:
https://chromium-review.googlesource.com/c/chromium/src/+/1877532
The above CL did not update the PDF viewer implementation so broke
support for cut amd paste in PDF files.
The clipboard handing code was consolidated into WebPluginContainerImpl
whereas before it was splite between that class and PepperWebPluginImpl,
so should be easier to follow. This also does not require changing the
WebPlugin interface in order to pass more data from the container to
properly implement paste.
Bug: 1072737
Change-Id: Ibfb305688cc55287d6bbcf0f0c522fb6b1641ec8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2168838
Commit-Queue: Roger Tawa <rogerta@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#764403}
This CL moves this message out of frame_messages.h and adds a new
method in blink::mojom::LocalFrame, implemented by blink::LocalFrame,
to request the renderer to stop a load if there's any in progress.
Unfortunately, due to a dependency in PepperURLLoaderHost::Close(),
we can not get rid entirely of having a StopLoading() method in
Blink's public API. Therefore, a WebLocalFrame::StopLoading() still
needs to be added to satisfy that dependency, even though calls to
this StopLoading() method from the browser process will now be routed
directly to Blink.
Bug: 1064344
Change-Id: I3030d136c07715aae8c52854b901e9b7f43bb645
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2170232
Commit-Queue: Mario Sanchez Prada <mario@igalia.com>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#764399}
Let's test-what-we-ship - this CL removes the
BrowserTestBase::AllowFileAccessFromFiles method so that by default
browser tests do not use the --allow-file-access-from-files command line
switch. This makes the browser tests behave (by default) in the same
way as the product does (by default, without the switch).
The CL adjusts tests by:
1. Moving tests from file: to http:
2. Temporarily disabling file: coverage via
MediaTest.VideoErrorNoSupportedStreams
(while retaining the http coverage).
https://crbug.com/1071473 has been filed to follow-up.
3. Explicitly opting into --allow-file-access-from-files only where needed:
- CorsFileOriginBrowserTestWithAllowFileAccessFromFiles
- PPAPITestBase
- WorkerTestWithAllowFileAccessFromFiles
Bug: 1068375, 1071473
Change-Id: I24235bc5e7f07eed25ccf7a946acd618356f5844
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2138498
Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org>
Reviewed-by: Luke Halliwell (slow) <halliwell@chromium.org>
Reviewed-by: Devlin <rdevlin.cronin@chromium.org>
Reviewed-by: Ahmed Fakhry <afakhry@chromium.org>
Reviewed-by: Chris Hamilton <chrisha@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Reviewed-by: Matthew Wolenetz <wolenetz@chromium.org>
Reviewed-by: Xiaohan Wang <xhwang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#764372}
The CSP directive treat-as-public-address was parsed from the raw
headers in the navigation_request.cc function: CalculateIPAddressSpace
The patch moves it to the network CSP parser.
Why:
1) Parsing this CSP directive inside the CSP parser makes sense on its
own.
2) The network CSP parser is going to be wired with OriginPolicy (see
bug https://crbug.com/1041379). It means we will get support for
OriginPolicy as a result, for free.
3) Stop parsing the whole CSP header in the browser processeach time
NavigationRequest::CalculateIpAddressSpace is called. This is
slightly better regarding //docs/security/rule-of-2.md
See also:
https://wicg.github.io/cors-rfc1918/#csp
Bug: 1042164
Change-Id: I4537f0a6f7be64812804a60387076f05153eca3b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2000705
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Camille Lamy <clamy@chromium.org>
Reviewed-by: Mike West <mkwst@chromium.org>
Cr-Commit-Position: refs/heads/master@{#764355}
This moves the implementation from TestRunnerForSpecificView over to
TestRunnerBindings for:
- execCommand
- triggerTestInspectorIssue
- setTabKeyCyclesThroughElements
For the first two, we also change them from acting on the focused frame
to on the frame the testRunner is bound to. This allows them to be more
OOPIF friendly, as the focused frame may not be in the local renderer's
frame tree fragment. To deal with this, tests that are running lambdas
against a child frame need to have the testRunner given to them.
R=avi@chromium.org
Bug: 866140, 1069111
Change-Id: I43abfad2bdd70d492aa1e34e91e9d70f400fa4e4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2173350
Commit-Queue: danakj <danakj@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#764343}