diff --git a/DEPS b/DEPS index 88f1e10b..56c1458 100644 --- a/DEPS +++ b/DEPS
@@ -310,11 +310,11 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling V8 # and whatever else without interference from each other. - 'src_internal_revision': '66c70f7165712e360b0cd864b15a4875fff95137', + 'src_internal_revision': 'e687f229d6a4923d5fee04492f32b7b0154df210', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling Skia # and whatever else without interference from each other. - 'skia_revision': 'b961fc35371508346c7552cb8f79651f154f10c3', + 'skia_revision': '90302ab19d5d81486cd460e2b36e41c8ffb91607', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling V8 # and whatever else without interference from each other. @@ -365,7 +365,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling freetype # and whatever else without interference from each other. - 'freetype_revision': '49781ab72b2dfd0f78172023921d08d08f323ade', + 'freetype_revision': 'e0e5b838e508aa4043c0e27d8403ab7be2a46153', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling freetype # and whatever else without interference from each other. @@ -385,7 +385,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling catapult # and whatever else without interference from each other. - 'catapult_revision': '7c462e0d55cd87448af2c1ba66ce223e5294fe0c', + 'catapult_revision': '0a5cbdd2203b8766328beb3f715db830cac8cbd0', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling chromium_variations # and whatever else without interference from each other. @@ -405,7 +405,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling devtools-frontend # and whatever else without interference from each other. - 'devtools_frontend_revision': 'a2fe80db51e2111d5043181671e2ae52b8b2d79d', + 'devtools_frontend_revision': '862a31efb285b114ce760b52d681d4295e65cc75', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling libprotobuf-mutator # and whatever else without interference from each other. @@ -445,7 +445,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling feed # and whatever else without interference from each other. - 'dawn_revision': 'dc5ac88f77bb62fe15111f355751055fd16e0c62', + 'dawn_revision': '550366adce6142eb563c4e2f78087e8888579022', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling feed # and whatever else without interference from each other. @@ -845,7 +845,7 @@ 'src/clank': { 'url': Var('chrome_git') + '/clank/internal/apps.git' + '@' + - 'da219a17d5eabce16b35e68f276e7d265377236b', + 'bdb6cb2c765bd7bc614f73346215c6e45c722e99', 'condition': 'checkout_android and checkout_src_internal', }, @@ -1295,13 +1295,13 @@ }, 'src/third_party/depot_tools': - Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + '0827dd28f1c4d25f3cd90776f7e221cba6243c2f', + Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + 'd95084e85101b865a8f1d213b6fbe3c11384e82f', 'src/third_party/devtools-frontend/src': Var('chromium_git') + '/devtools/devtools-frontend' + '@' + Var('devtools_frontend_revision'), 'src/third_party/devtools-frontend-internal': { - 'url': Var('chrome_git') + '/devtools/devtools-internal.git' + '@' + 'e0aad9e4d829ac0dd9f1ee4a2e67c10650a7d266', + 'url': Var('chrome_git') + '/devtools/devtools-internal.git' + '@' + '9ac22f6c6053321814e07cf62149bc56d7f462ae', 'condition': 'checkout_src_internal', }, @@ -1790,7 +1790,7 @@ Var('pdfium_git') + '/pdfium.git' + '@' + Var('pdfium_revision'), 'src/third_party/perfetto': - Var('android_git') + '/platform/external/perfetto.git' + '@' + 'c478eb8ffb74aa961c2320efb2c901a5d1d69cba', + Var('android_git') + '/platform/external/perfetto.git' + '@' + 'f92196dfb6d701a3e0f7b9ea4042b193c4487e15', 'src/third_party/perl': { 'url': Var('chromium_git') + '/chromium/deps/perl.git' + '@' + '6f3e5028eb65d0b4c5fdd792106ac4c84eee1eb3', @@ -1972,7 +1972,7 @@ Var('chromium_git') + '/external/khronosgroup/webgl.git' + '@' + 'f4bf599a8b575df685c31d9c4729a70a04e377ed', 'src/third_party/webgpu-cts/src': - Var('chromium_git') + '/external/github.com/gpuweb/cts.git' + '@' + 'a50d0906eedac478595363ad1342787a581f9e2e', + Var('chromium_git') + '/external/github.com/gpuweb/cts.git' + '@' + '121e6711d9f3d84c2c537791fd49de317a6046f6', 'src/third_party/webrtc': Var('webrtc_git') + '/src.git' + '@' + '7892f05411d93fe9a2b876daccd817286ca43182', @@ -4116,7 +4116,7 @@ 'packages' : [ { 'package': 'chromeos_internal/inputs/orca', - 'version': 'niY9cIHJOohRrb2PgKnUOn3JtuPlMevwlFgb0AtF_0oC' + 'version': 'mpIGp4HC43b7xAaGHyYvzGJUJf8lgGswVQf2B0GGozMC' } ], 'condition': 'checkout_chromeos and checkout_src_internal', @@ -5718,7 +5718,7 @@ }, # Configure remote exec cfg files { - 'name': 'configure_reclient_cfgs', + 'name': 'download_and_configure_reclient_cfgs', 'pattern': '.', 'condition': 'download_remoteexec_cfg', 'action': ['python3', @@ -5732,6 +5732,22 @@ '--quiet', ], }, + { + 'name': 'configure_reclient_cfgs', + 'pattern': '.', + 'condition': 'not download_remoteexec_cfg', + 'action': ['python3', + 'src/buildtools/reclient_cfgs/configure_reclient_cfgs.py', + '--rbe_instance', + Var('rbe_instance'), + '--reproxy_cfg_template', + 'reproxy.cfg.template', + '--rewrapper_cfg_project', + Var('rewrapper_cfg_project'), + '--skip_remoteexec_cfg_fetch', + '--quiet', + ], + }, # Configure Siso for developer builds. { 'name': 'configure_siso',
diff --git a/android_webview/browser/aw_content_browser_client.cc b/android_webview/browser/aw_content_browser_client.cc index f907d18..9de3d61 100644 --- a/android_webview/browser/aw_content_browser_client.cc +++ b/android_webview/browser/aw_content_browser_client.cc
@@ -1234,13 +1234,61 @@ return false; // WebView does not support web-only attribution. } -bool AwContentBrowserClient::ShouldUseOsWebSourceAttributionReporting() { - // WebView should register sources as from the app instead of the web. - // Web registration APIs currently require a special registration - // from the app in Android for registering sources. The more common case - // for a webview is that the app does not have this registration, - // so we instead register attribution events against the embedding app. - return false; +bool AwContentBrowserClient::ShouldUseOsWebSourceAttributionReporting( + content::RenderFrameHost* rfh) { + // Attribution reporting can register a source to either the top level origin + // or the app. For WebView the default is to register sources against the app + // as: + // 1. WebViews are often used in cases where for sources the top level origin + // is not as relevant as the app context. + // 2. Web registration APIs currently require a special registration from the + // app in Android for registering sources and the more common case is that the + // app does not have this registration. Note: This behaviour can be switched + // to registering against the top level origin via an AndroidX API + + WebContents* web_contents = content::WebContents::FromRenderFrameHost(rfh); + AwSettings* aw_settings = AwSettings::FromWebContents(web_contents); + AwSettings::AttributionBehavior attribution_behavior = + aw_settings->GetAttributionBehavior(); + + switch (attribution_behavior) { + case AwSettings::AttributionBehavior::WEB_SOURCE_AND_WEB_TRIGGER: + return true; + case AwSettings::AttributionBehavior::APP_SOURCE_AND_WEB_TRIGGER: + case AwSettings::AttributionBehavior::APP_SOURCE_AND_APP_TRIGGER: + return false; + default: + break; + } + + NOTREACHED_NORETURN(); +} + +bool AwContentBrowserClient::ShouldUseOsWebTriggerAttributionReporting( + content::RenderFrameHost* rfh) { + // Attribution reporting can register a trigger to either the top level origin + // or the app. For WebView the default is to register triggers against the top + // level origin as: + // 1. WebViews are mostly used in cases where for triggers the app context is + // not as relevant as the top level origin. Note: This behaviour can be + // switched to registering against the app via an AndroidX API + + WebContents* web_contents = content::WebContents::FromRenderFrameHost(rfh); + AwSettings* aw_settings = AwSettings::FromWebContents(web_contents); + AwSettings::AttributionBehavior attribution_behavior = + aw_settings->GetAttributionBehavior(); + + switch (attribution_behavior) { + case AwSettings::AttributionBehavior::WEB_SOURCE_AND_WEB_TRIGGER: + case AwSettings::AttributionBehavior::APP_SOURCE_AND_WEB_TRIGGER: + return true; + case AwSettings::AttributionBehavior::APP_SOURCE_AND_APP_TRIGGER: + return false; + default: + break; + } + + NOTREACHED_NORETURN(); } } // namespace android_webview
diff --git a/android_webview/browser/aw_content_browser_client.h b/android_webview/browser/aw_content_browser_client.h index ead324f..2f7830bb 100644 --- a/android_webview/browser/aw_content_browser_client.h +++ b/android_webview/browser/aw_content_browser_client.h
@@ -274,7 +274,10 @@ const url::Origin* destination_origin, const url::Origin* reporting_origin) override; bool IsWebAttributionReportingAllowed() override; - bool ShouldUseOsWebSourceAttributionReporting() override; + bool ShouldUseOsWebSourceAttributionReporting( + content::RenderFrameHost* rfh) override; + bool ShouldUseOsWebTriggerAttributionReporting( + content::RenderFrameHost* rfh) override; blink::mojom::OriginTrialsSettingsPtr GetOriginTrialsSettings() override; AwFeatureListCreator* aw_feature_list_creator() {
diff --git a/android_webview/browser/aw_settings.cc b/android_webview/browser/aw_settings.cc index 48de82d4..2c4f460 100644 --- a/android_webview/browser/aw_settings.cc +++ b/android_webview/browser/aw_settings.cc
@@ -135,6 +135,10 @@ return mixed_content_mode_; } +AwSettings::AttributionBehavior AwSettings::GetAttributionBehavior() { + return attribution_behavior_; +} + void AwSettings::Destroy(JNIEnv* env, const JavaParamRef<jobject>& obj) { delete this; } @@ -210,6 +214,7 @@ UpdateJavaScriptPolicyLocked(env, obj); UpdateAllowFileAccessLocked(env, obj); UpdateMixedContentModeLocked(env, obj); + UpdateAttributionBehaviorLocked(env, obj); } void AwSettings::UpdateUserAgentLocked(JNIEnv* env, @@ -415,6 +420,17 @@ Java_AwSettings_getMixedContentMode(env, obj)); } +void AwSettings::UpdateAttributionBehaviorLocked( + JNIEnv* env, + const JavaParamRef<jobject>& obj) { + if (!web_contents()) { + return; + } + + attribution_behavior_ = static_cast<AttributionBehavior>( + Java_AwSettings_getAttributionBehavior(env, obj)); +} + void AwSettings::RenderViewHostChanged(content::RenderViewHost* old_host, content::RenderViewHost* new_host) { DCHECK_EQ(new_host, web_contents()->GetRenderViewHost());
diff --git a/android_webview/browser/aw_settings.h b/android_webview/browser/aw_settings.h index bd107fa..e102253d 100644 --- a/android_webview/browser/aw_settings.h +++ b/android_webview/browser/aw_settings.h
@@ -50,6 +50,13 @@ COUNT, }; + // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.android_webview.settings + enum AttributionBehavior { + APP_SOURCE_AND_WEB_TRIGGER = 0, + WEB_SOURCE_AND_WEB_TRIGGER = 1, + APP_SOURCE_AND_APP_TRIGGER = 2, + }; + static AwSettings* FromWebContents(content::WebContents* web_contents); static bool GetAllowSniffingFileUrls(); @@ -64,6 +71,7 @@ bool GetJavaScriptCanOpenWindowsAutomatically(); bool GetAllowThirdPartyCookies(); MixedContentMode GetMixedContentMode(); + AttributionBehavior GetAttributionBehavior(); // Called from Java. Methods with "Locked" suffix require that the settings // access lock is held during their execution. @@ -109,6 +117,9 @@ void UpdateMixedContentModeLocked( JNIEnv* env, const base::android::JavaParamRef<jobject>& obj); + void UpdateAttributionBehaviorLocked( + JNIEnv* env, + const base::android::JavaParamRef<jobject>& obj); void PopulateWebPreferences(blink::web_pref::WebPreferences* web_prefs); bool GetAllowFileAccess(); @@ -152,6 +163,7 @@ // default false from next Android version(Maybe Android U). bool enterprise_authentication_app_link_policy_enabled_{true}; MixedContentMode mixed_content_mode_; + AttributionBehavior attribution_behavior_; scoped_refptr<AwContentsOriginMatcher> xrw_allowlist_matcher_;
diff --git a/android_webview/java/src/org/chromium/android_webview/AwSettings.java b/android_webview/java/src/org/chromium/android_webview/AwSettings.java index 4be56c4..5b8fe841 100644 --- a/android_webview/java/src/org/chromium/android_webview/AwSettings.java +++ b/android_webview/java/src/org/chromium/android_webview/AwSettings.java
@@ -22,6 +22,7 @@ import org.chromium.android_webview.common.AwFeatures; import org.chromium.android_webview.common.Lifetime; import org.chromium.android_webview.safe_browsing.AwSafeBrowsingConfigHelper; +import org.chromium.android_webview.settings.AttributionBehavior; import org.chromium.android_webview.settings.ForceDarkBehavior; import org.chromium.android_webview.settings.ForceDarkMode; import org.chromium.base.ContextUtils; @@ -140,6 +141,7 @@ private boolean mSpatialNavigationEnabled; // Default depends on device features. private boolean mEnableSupportedHardwareAcceleratedFeatures; private int mMixedContentMode = WebSettings.MIXED_CONTENT_NEVER_ALLOW; + private int mAttributionBehavior = AttributionBehavior.APP_SOURCE_AND_WEB_TRIGGER; private boolean mCSSHexAlphaColorEnabled; private boolean mScrollTopLeftInteropEnabled; private boolean mWillSuppressErrorPage; @@ -1821,6 +1823,23 @@ } } + public void setAttributionBehavior(@AttributionBehavior int behavior) { + synchronized (mAwSettingsLock) { + if (mAttributionBehavior != behavior) { + mAttributionBehavior = behavior; + mEventHandler.updateWebkitPreferencesLocked(); + } + } + } + + @CalledByNative + @AttributionBehavior + public int getAttributionBehavior() { + synchronized (mAwSettingsLock) { + return mAttributionBehavior; + } + } + @ForceDarkMode public int getForceDarkMode() { synchronized (mAwSettingsLock) {
diff --git a/android_webview/java/src/org/chromium/android_webview/common/ProductionSupportedFlagList.java b/android_webview/java/src/org/chromium/android_webview/common/ProductionSupportedFlagList.java index d4909cf..58e994b 100644 --- a/android_webview/java/src/org/chromium/android_webview/common/ProductionSupportedFlagList.java +++ b/android_webview/java/src/org/chromium/android_webview/common/ProductionSupportedFlagList.java
@@ -179,7 +179,7 @@ "When enabled, form submissions are reported to AutofillManager iff the form " + "global ids match."), Flag.baseFeature( - AndroidAutofillFeatures.ANDROID_AUTOFILL_FORM_SUBMISSION_CHECK_BY_ID_NAME, + AndroidAutofillFeatures.ANDROID_AUTOFILL_SUPPORT_VISIBILITY_CHANGES_NAME, "Enables communicating visibility changes of form fields of a form in an " + "ongoing Autofill session to Android AutofillManager."), Flag.baseFeature(
diff --git a/android_webview/javatests/DEPS b/android_webview/javatests/DEPS index d518e879..88a4136 100644 --- a/android_webview/javatests/DEPS +++ b/android_webview/javatests/DEPS
@@ -14,6 +14,7 @@ "-content/public/android/java", "+content/public/android/java/src/org/chromium/content_public", + "+content/public/android/java/src/org/chromium/content/browser/AttributionOsLevelManager.java", "-content/public/android/javatests", "+content/public/test/android/javatests",
diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/AttributionReportingTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/AttributionReportingTest.java new file mode 100644 index 0000000..1a8fdcd --- /dev/null +++ b/android_webview/javatests/src/org/chromium/android_webview/test/AttributionReportingTest.java
@@ -0,0 +1,251 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +package org.chromium.android_webview.test; + +import static org.junit.Assert.assertEquals; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.never; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; + +import android.net.Uri; +import android.os.Build; +import android.util.Pair; + +import androidx.privacysandbox.ads.adservices.java.measurement.MeasurementManagerFutures; +import androidx.privacysandbox.ads.adservices.measurement.WebSourceParams; +import androidx.privacysandbox.ads.adservices.measurement.WebSourceRegistrationRequest; +import androidx.privacysandbox.ads.adservices.measurement.WebTriggerParams; +import androidx.privacysandbox.ads.adservices.measurement.WebTriggerRegistrationRequest; +import androidx.test.filters.LargeTest; + +import com.google.common.util.concurrent.Futures; + +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.Mock; +import org.mockito.MockitoAnnotations; + +import org.chromium.android_webview.AwContents; +import org.chromium.android_webview.AwSettings; +import org.chromium.android_webview.settings.AttributionBehavior; +import org.chromium.android_webview.test.AwActivityTestRule.TestDependencyFactory; +import org.chromium.base.test.util.Batch; +import org.chromium.base.test.util.CallbackHelper; +import org.chromium.base.test.util.CommandLineFlags; +import org.chromium.base.test.util.MinAndroidSdkLevel; +import org.chromium.content.browser.AttributionOsLevelManager; +import org.chromium.content_public.browser.test.util.TestCallbackHelperContainer.OnPageFinishedHelper; +import org.chromium.content_public.common.ContentFeatures; +import org.chromium.net.test.util.TestWebServer; +import org.chromium.services.network.NetworkServiceFeatures; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +@RunWith(AwJUnit4ClassRunner.class) +@Batch(Batch.PER_CLASS) +public class AttributionReportingTest { + private static final String OS_SOURCE_RESPONSE_HEADER = + "Attribution-Reporting-Register-OS-Source"; + private static final String OS_TRIGGER_RESPONSE_HEADER = + "Attribution-Reporting-Register-OS-Trigger"; + private static final String SOURCE_REGISTRATION_URL = "https://adtech.example/register/source"; + private static final String TRIGGER_REGISTRATION_URL = + "https://adtech.example/register/trigger"; + + @Rule + public AwActivityTestRule mActivityTestRule = new AwActivityTestRule(); + + @Mock + private MeasurementManagerFutures mMockAttributionManager; + + private CallbackHelper mMockCallbackHelper; + + private TestAwContentsClient mContentsClient; + private AwContents mAwContents; + private AwSettings mSettings; + + private TestWebServer mWebServer; + private TestWebServer mAttributionServer; + private String mTestPage; + + @Before + public void setUp() throws Exception { + MockitoAnnotations.initMocks(this); + mMockCallbackHelper = new CallbackHelper(); + + when(mMockAttributionManager.registerWebSourceAsync( + any(WebSourceRegistrationRequest.class))) + .thenAnswer(invocation -> { + mMockCallbackHelper.notifyCalled(); + return Futures.immediateFuture(null); + }); + when(mMockAttributionManager.registerSourceAsync(any(Uri.class), eq(null))) + .thenAnswer(invocation -> { + mMockCallbackHelper.notifyCalled(); + return Futures.immediateFuture(null); + }); + when(mMockAttributionManager.registerWebTriggerAsync( + any(WebTriggerRegistrationRequest.class))) + .thenAnswer(invocation -> { + mMockCallbackHelper.notifyCalled(); + return Futures.immediateFuture(null); + }); + when(mMockAttributionManager.registerTriggerAsync(any(Uri.class))) + .thenAnswer(invocation -> { + mMockCallbackHelper.notifyCalled(); + return Futures.immediateFuture(null); + }); + + AttributionOsLevelManager.setManagerForTesting(mMockAttributionManager); + + mContentsClient = new TestAwContentsClient(); + AwTestContainerView testContainerView = + mActivityTestRule.createAwTestContainerViewOnMainSync( + mContentsClient, false, new TestDependencyFactory()); + mAwContents = testContainerView.getAwContents(); + mSettings = mActivityTestRule.getAwSettingsOnUiThread(mAwContents); + + mWebServer = TestWebServer.start(); + mAttributionServer = TestWebServer.startAdditional(); + mTestPage = mWebServer.setResponse("/test", createTestPage(), null); + } + + @After + public void tearDown() { + mWebServer.shutdown(); + mAttributionServer.shutdown(); + } + + @LargeTest + @Test + @MinAndroidSdkLevel(Build.VERSION_CODES.TIRAMISU) + @CommandLineFlags.Add("enable-features=" + ContentFeatures.PRIVACY_SANDBOX_ADS_AP_IS_OVERRIDE + + "," + NetworkServiceFeatures.ATTRIBUTION_REPORTING_CROSS_APP_WEB) + public void + testAppSourceAndWebTriggerBehavior() throws Exception { + mSettings.setAttributionBehavior(AttributionBehavior.APP_SOURCE_AND_WEB_TRIGGER); + assertEquals( + AttributionBehavior.APP_SOURCE_AND_WEB_TRIGGER, mSettings.getAttributionBehavior()); + + int callBackCount = mMockCallbackHelper.getCallCount(); + loadUrlSync(mTestPage); + // waiting for one source and one trigger event + mMockCallbackHelper.waitForCallback(callBackCount, 2); + + verify(mMockAttributionManager, never()) + .registerWebSourceAsync(new WebSourceRegistrationRequest( + Arrays.asList( + new WebSourceParams(Uri.parse(SOURCE_REGISTRATION_URL), false)), + Uri.parse(mWebServer.getBaseUrl()), null, null, null, null)); + verify(mMockAttributionManager, times(1)) + .registerSourceAsync(eq(Uri.parse(SOURCE_REGISTRATION_URL)), eq(null)); + verify(mMockAttributionManager, times(1)) + .registerWebTriggerAsync(eq(new WebTriggerRegistrationRequest( + Arrays.asList( + new WebTriggerParams(Uri.parse(TRIGGER_REGISTRATION_URL), false)), + (Uri.parse(mWebServer.getBaseUrl()))))); + verify(mMockAttributionManager, never()) + .registerTriggerAsync(Uri.parse(TRIGGER_REGISTRATION_URL)); + } + + @LargeTest + @Test + @MinAndroidSdkLevel(Build.VERSION_CODES.TIRAMISU) + @CommandLineFlags.Add("enable-features=" + ContentFeatures.PRIVACY_SANDBOX_ADS_AP_IS_OVERRIDE + + "," + NetworkServiceFeatures.ATTRIBUTION_REPORTING_CROSS_APP_WEB) + public void + testWebSourceAndWebTriggerBehavior() throws Exception { + mSettings.setAttributionBehavior(AttributionBehavior.WEB_SOURCE_AND_WEB_TRIGGER); + assertEquals( + AttributionBehavior.WEB_SOURCE_AND_WEB_TRIGGER, mSettings.getAttributionBehavior()); + + int callBackCount = mMockCallbackHelper.getCallCount(); + loadUrlSync(mTestPage); + // waiting for one source and one trigger event + mMockCallbackHelper.waitForCallback(callBackCount, 2); + + verify(mMockAttributionManager, times(1)) + .registerWebSourceAsync(new WebSourceRegistrationRequest( + Arrays.asList( + new WebSourceParams(Uri.parse(SOURCE_REGISTRATION_URL), false)), + Uri.parse(mWebServer.getBaseUrl()), null, null, null, null)); + verify(mMockAttributionManager, never()) + .registerSourceAsync(eq(Uri.parse(SOURCE_REGISTRATION_URL)), eq(null)); + verify(mMockAttributionManager, times(1)) + .registerWebTriggerAsync(eq(new WebTriggerRegistrationRequest( + Arrays.asList( + new WebTriggerParams(Uri.parse(TRIGGER_REGISTRATION_URL), false)), + (Uri.parse(mWebServer.getBaseUrl()))))); + verify(mMockAttributionManager, never()) + .registerTriggerAsync(Uri.parse(TRIGGER_REGISTRATION_URL)); + } + + @LargeTest + @Test + @MinAndroidSdkLevel(Build.VERSION_CODES.TIRAMISU) + @CommandLineFlags.Add("enable-features=" + ContentFeatures.PRIVACY_SANDBOX_ADS_AP_IS_OVERRIDE + + "," + NetworkServiceFeatures.ATTRIBUTION_REPORTING_CROSS_APP_WEB) + public void + testAppSourceAndAppTriggerBehavior() throws Exception { + mSettings.setAttributionBehavior(AttributionBehavior.APP_SOURCE_AND_APP_TRIGGER); + assertEquals( + AttributionBehavior.APP_SOURCE_AND_APP_TRIGGER, mSettings.getAttributionBehavior()); + + int callBackCount = mMockCallbackHelper.getCallCount(); + loadUrlSync(mTestPage); + // waiting for one source and one trigger event + mMockCallbackHelper.waitForCallback(callBackCount, 2); + + verify(mMockAttributionManager, never()) + .registerWebSourceAsync(new WebSourceRegistrationRequest( + Arrays.asList( + new WebSourceParams(Uri.parse(SOURCE_REGISTRATION_URL), false)), + Uri.parse(mWebServer.getBaseUrl()), null, null, null, null)); + verify(mMockAttributionManager, times(1)) + .registerSourceAsync(eq(Uri.parse(SOURCE_REGISTRATION_URL)), eq(null)); + verify(mMockAttributionManager, never()) + .registerWebTriggerAsync(eq(new WebTriggerRegistrationRequest( + Arrays.asList( + new WebTriggerParams(Uri.parse(TRIGGER_REGISTRATION_URL), false)), + (Uri.parse(mWebServer.getBaseUrl()))))); + verify(mMockAttributionManager, times(1)) + .registerTriggerAsync(Uri.parse(TRIGGER_REGISTRATION_URL)); + } + + private List<Pair<String, String>> getAttributionResponseHeaders(String header, String value) { + List<Pair<String, String>> headers = new ArrayList<Pair<String, String>>(); + headers.add(Pair.create(header, "\"" + value + "\"")); + return headers; + } + + private String createTestPage() { + String sourceUrl = mAttributionServer.setResponse("/source", "", + getAttributionResponseHeaders(OS_SOURCE_RESPONSE_HEADER, SOURCE_REGISTRATION_URL)); + String triggerUrl = mAttributionServer.setResponse("/trigger", "", + getAttributionResponseHeaders( + OS_TRIGGER_RESPONSE_HEADER, TRIGGER_REGISTRATION_URL)); + + StringBuilder sb = new StringBuilder(); + sb.append("<html><head></head><body>Hello world!"); + sb.append("<img attributionsrc='").append(sourceUrl).append("'>"); + sb.append("<img attributionsrc='").append(triggerUrl).append("'>"); + sb.append("</body></html>"); + return sb.toString(); + } + + private void loadUrlSync(String requestUrl) throws Exception { + OnPageFinishedHelper onPageFinishedHelper = mContentsClient.getOnPageFinishedHelper(); + mActivityTestRule.loadUrlSync(mAwContents, onPageFinishedHelper, requestUrl); + Assert.assertEquals(requestUrl, onPageFinishedHelper.getUrl()); + } +}
diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/MultiProfileTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/MultiProfileTest.java index 1485935..3dc0570 100644 --- a/android_webview/javatests/src/org/chromium/android_webview/test/MultiProfileTest.java +++ b/android_webview/javatests/src/org/chromium/android_webview/test/MultiProfileTest.java
@@ -4,6 +4,8 @@ package org.chromium.android_webview.test; +import static org.junit.Assert.assertEquals; + import static org.chromium.android_webview.test.OnlyRunIn.ProcessMode.MULTI_PROCESS; import android.util.Pair; @@ -25,6 +27,7 @@ import org.chromium.base.ThreadUtils; import org.chromium.base.test.util.DoNotBatch; import org.chromium.base.test.util.Feature; +import org.chromium.content_public.browser.test.util.RenderProcessHostUtils; import org.chromium.net.test.util.TestWebServer; import java.util.ArrayList; @@ -143,8 +146,8 @@ public void testGetName() throws Throwable { final AwBrowserContext defaultProfile = AwBrowserContext.getDefault(); final AwBrowserContext profile1 = getContextSync("AwesomeProfile", true); - Assert.assertEquals("Default", defaultProfile.getName()); - Assert.assertEquals("AwesomeProfile", profile1.getName()); + assertEquals("Default", defaultProfile.getName()); + assertEquals("AwesomeProfile", profile1.getName()); } @Test @@ -154,9 +157,9 @@ final AwBrowserContext defaultProfile = AwBrowserContext.getDefault(); final AwBrowserContext myCoolProfile = getContextSync("MyCoolProfile", true); final AwBrowserContext myOtherCoolProfile = getContextSync("MyOtherCoolProfile", true); - Assert.assertEquals("Default", defaultProfile.getRelativePathForTesting()); - Assert.assertEquals("Profile 1", myCoolProfile.getRelativePathForTesting()); - Assert.assertEquals("Profile 2", myOtherCoolProfile.getRelativePathForTesting()); + assertEquals("Default", defaultProfile.getRelativePathForTesting()); + assertEquals("Profile 1", myCoolProfile.getRelativePathForTesting()); + assertEquals("Profile 2", myOtherCoolProfile.getRelativePathForTesting()); } @Test @@ -170,23 +173,21 @@ final AwBrowserContext myCoolProfile = getContextSync("MyCoolProfile", true); final AwBrowserContext myOtherCoolProfile = getContextSync("MyOtherCoolProfile", true); final AwBrowserContext myCoolProfileCopy = getContextSync("MyCoolProfile", true); - Assert.assertEquals("WebViewProfilePrefsDefault_MyDataDirSuffix", + assertEquals("WebViewProfilePrefsDefault_MyDataDirSuffix", defaultProfile.getSharedPrefsNameForTesting()); - Assert.assertEquals("WebViewProfilePrefsProfile 1_MyDataDirSuffix", + assertEquals("WebViewProfilePrefsProfile 1_MyDataDirSuffix", myCoolProfile.getSharedPrefsNameForTesting()); - Assert.assertEquals("WebViewProfilePrefsProfile 2_MyDataDirSuffix", + assertEquals("WebViewProfilePrefsProfile 2_MyDataDirSuffix", myOtherCoolProfile.getSharedPrefsNameForTesting()); - Assert.assertEquals(myCoolProfile.getSharedPrefsNameForTesting(), + assertEquals(myCoolProfile.getSharedPrefsNameForTesting(), myCoolProfileCopy.getSharedPrefsNameForTesting()); AwBrowserProcess.setProcessDataDirSuffixForTesting(null); - Assert.assertEquals( - "WebViewProfilePrefsDefault", defaultProfile.getSharedPrefsNameForTesting()); - Assert.assertEquals( - "WebViewProfilePrefsProfile 1", myCoolProfile.getSharedPrefsNameForTesting()); - Assert.assertEquals( + assertEquals("WebViewProfilePrefsDefault", defaultProfile.getSharedPrefsNameForTesting()); + assertEquals("WebViewProfilePrefsProfile 1", myCoolProfile.getSharedPrefsNameForTesting()); + assertEquals( "WebViewProfilePrefsProfile 2", myOtherCoolProfile.getSharedPrefsNameForTesting()); - Assert.assertEquals(myCoolProfile.getSharedPrefsNameForTesting(), + assertEquals(myCoolProfile.getSharedPrefsNameForTesting(), myCoolProfileCopy.getSharedPrefsNameForTesting()); } @@ -378,6 +379,67 @@ webServer.shutdown(); } + @Test + @MediumTest + @OnlyRunIn(MULTI_PROCESS) + @Feature({"AndroidWebView"}) + public void testSeparateProfilesHaveSeparateRenderProcesses() throws Throwable { + mActivityTestRule.startBrowserProcess(); + final AwBrowserContext profile = getContextSync("my-profile", true); + final AwContents firstAwContents = + mActivityTestRule.createAwTestContainerViewOnMainSync(mContentsClient) + .getAwContents(); + final AwContents secondAwContents = + mActivityTestRule.createAwTestContainerViewOnMainSync(mContentsClient) + .getAwContents(); + setBrowserContextSync(secondAwContents, profile); + + TestWebServer webServer = TestWebServer.start(); + String path = "/cookie_test.html"; + String responseStr = "<html><head><title>TEST!</title></head><body>HELLO!</body></html>"; + String url = webServer.setResponse(path, responseStr, new ArrayList<>()); + + mActivityTestRule.loadUrlSync( + firstAwContents, mContentsClient.getOnPageFinishedHelper(), url); + assertEquals(1, RenderProcessHostUtils.getCurrentRenderProcessCount()); + + mActivityTestRule.loadUrlSync( + secondAwContents, mContentsClient.getOnPageFinishedHelper(), url); + assertEquals(2, RenderProcessHostUtils.getCurrentRenderProcessCount()); + webServer.shutdown(); + } + + @Test + @MediumTest + @OnlyRunIn(MULTI_PROCESS) + @Feature({"AndroidWebView"}) + public void testAwContentsWithSameProfileShareRenderProcess() throws Throwable { + mActivityTestRule.startBrowserProcess(); + final AwBrowserContext profile = getContextSync("my-profile", true); + final AwContents firstAwContents = + mActivityTestRule.createAwTestContainerViewOnMainSync(mContentsClient) + .getAwContents(); + final AwContents secondAwContents = + mActivityTestRule.createAwTestContainerViewOnMainSync(mContentsClient) + .getAwContents(); + setBrowserContextSync(firstAwContents, profile); + setBrowserContextSync(secondAwContents, profile); + + TestWebServer webServer = TestWebServer.start(); + String path = "/cookie_test.html"; + String responseStr = "<html><head><title>TEST!</title></head><body>HELLO!</body></html>"; + String url = webServer.setResponse(path, responseStr, new ArrayList<>()); + + mActivityTestRule.loadUrlSync( + firstAwContents, mContentsClient.getOnPageFinishedHelper(), url); + assertEquals(1, RenderProcessHostUtils.getCurrentRenderProcessCount()); + + mActivityTestRule.loadUrlSync( + secondAwContents, mContentsClient.getOnPageFinishedHelper(), url); + assertEquals(1, RenderProcessHostUtils.getCurrentRenderProcessCount()); + webServer.shutdown(); + } + private void validateCookies( AwCookieManager cookieManager, String url, String... expectedCookieNames) { final String responseCookie = cookieManager.getCookie(url); @@ -389,7 +451,7 @@ } Set<String> expectedCookieNamesSet = new HashSet<String>(Arrays.asList(expectedCookieNames)); - Assert.assertEquals("Found cookies list differs from expected list", expectedCookieNamesSet, + assertEquals("Found cookies list differs from expected list", expectedCookieNamesSet, foundCookieNamesSet); } }
diff --git a/android_webview/test/BUILD.gn b/android_webview/test/BUILD.gn index e96d45365..898f77d 100644 --- a/android_webview/test/BUILD.gn +++ b/android_webview/test/BUILD.gn
@@ -353,6 +353,7 @@ "//net/android:net_java_test_support", "//services/device/public/java:geolocation_java", "//services/device/public/java:geolocation_java_test_support", + "//services/network/public:features_java", "//third_party/android_deps:com_google_code_findbugs_jsr305_java", "//third_party/android_deps:com_google_guava_failureaccess_java", "//third_party/android_deps:com_google_guava_listenablefuture_java", @@ -364,6 +365,8 @@ "//third_party/androidx:androidx_annotation_annotation_java", "//third_party/androidx:androidx_core_core_java", "//third_party/androidx:androidx_fragment_fragment_java", + "//third_party/androidx:androidx_privacysandbox_ads_ads_adservices_java", + "//third_party/androidx:androidx_privacysandbox_ads_ads_adservices_java_java", "//third_party/androidx:androidx_test_core_java", "//third_party/androidx:androidx_test_monitor_java", "//third_party/androidx:androidx_test_runner_java", @@ -389,6 +392,7 @@ "../javatests/src/org/chromium/android_webview/test/AndroidScrollIntegrationTest.java", "../javatests/src/org/chromium/android_webview/test/AndroidViewIntegrationTest.java", "../javatests/src/org/chromium/android_webview/test/ArchiveTest.java", + "../javatests/src/org/chromium/android_webview/test/AttributionReportingTest.java", "../javatests/src/org/chromium/android_webview/test/AwActivityTestRule.java", "../javatests/src/org/chromium/android_webview/test/AwAutofillTest.java", "../javatests/src/org/chromium/android_webview/test/AwBrowserContextFormDataTest.java",
diff --git a/ash/components/arc/metrics/arc_metrics_service.cc b/ash/components/arc/metrics/arc_metrics_service.cc index 42cbf3a..fb1e5f9 100644 --- a/ash/components/arc/metrics/arc_metrics_service.cc +++ b/ash/components/arc/metrics/arc_metrics_service.cc
@@ -921,6 +921,16 @@ prefs_->SetBoolean(prefs::kWebViewProcessStarted, true); } +void ArcMetricsService::ReportNewQosSocketCount(int count) { + DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); + base::UmaHistogramCounts100000("Arc.Qos.NewQosSocketCount", count); +} + +void ArcMetricsService::ReportQosSocketPercentage(int perc) { + DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); + base::UmaHistogramCounts100("Arc.Qos.QosSocketPercentage", perc); +} + void ArcMetricsService::OnWindowActivated( wm::ActivationChangeObserver::ActivationReason reason, aura::Window* gained_active,
diff --git a/ash/components/arc/metrics/arc_metrics_service.h b/ash/components/arc/metrics/arc_metrics_service.h index c092befc..d7c45c1 100644 --- a/ash/components/arc/metrics/arc_metrics_service.h +++ b/ash/components/arc/metrics/arc_metrics_service.h
@@ -142,6 +142,8 @@ mojom::LowLatencyStylusLibPredictionTargetPtr prediction_target) override; void ReportVpnServiceBuilderCompatApiUsage( mojom::VpnServiceBuilderCompatApiId api_id) override; + void ReportNewQosSocketCount(int count) override; + void ReportQosSocketPercentage(int perc) override; void ReportEntireFixupMetrics(base::TimeDelta duration, uint32_t number_of_directories, uint32_t number_of_failures) override;
diff --git a/ash/components/arc/mojom/metrics.mojom b/ash/components/arc/mojom/metrics.mojom index 722fe84..30a7cf10 100644 --- a/ash/components/arc/mojom/metrics.mojom +++ b/ash/components/arc/mojom/metrics.mojom
@@ -1,7 +1,7 @@ // Copyright 2016 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Next MinVersion: 30 +// Next MinVersion: 31 module arc.mojom; import "mojo/public/mojom/base/time.mojom"; @@ -389,7 +389,7 @@ }; // Deprecated method IDs: 25 -// Next method ID: 33 +// Next method ID: 35 interface MetricsHost { // Reports boot progress events from ARC instance. ReportBootProgress@0(array<BootProgressEvent> events, @@ -531,6 +531,20 @@ // Reports api usage of vpn exclude route. [MinVersion=29] ReportVpnServiceBuilderCompatApiUsage@32 (VpnServiceBuilderCompatApiId api_id); + + // Reports count of newly opened QoS socket connections during a poll for all + // socket connections in ARC. Use int for uint value for the same reason as + // ReportQosSocketPercentage. + [MinVersion=30] ReportNewQosSocketCount@33(int32 count); + + // Reports percentage of QoS socket connections during a poll for all socket + // connections in ARC. The reason for using int for uint percentage field is: + // Mojo uint values are byte cast when deserialized in Java, the practical + // and safe solution is to pick the next signed type that includes the whole + // unsigned range of possible values. Otherwise it forces writing error-prone + // conversion code at the entry or exit of mojo data. + // Range of perc arg will be [0, 100]. + [MinVersion=30] ReportQosSocketPercentage@34(int32 perc); }; // Deprecated method IDs: 0
diff --git a/ash/constants/ash_features.cc b/ash/constants/ash_features.cc index 13843fc9..5191b4a 100644 --- a/ash/constants/ash_features.cc +++ b/ash/constants/ash_features.cc
@@ -2114,6 +2114,9 @@ "PipPinchToResize", base::FEATURE_DISABLED_BY_DEFAULT); +// Enables or disables the tilt feature for Picture in Picture. +BASE_FEATURE(kPipTilt, "PipTilt", base::FEATURE_DISABLED_BY_DEFAULT); + // Controls whether policy provided trust anchors are allowed at the lock // screen. BASE_FEATURE(kPolicyProvidedTrustAnchorsAllowedAtLockScreen, @@ -3876,6 +3879,10 @@ return base::FeatureList::IsEnabled(kPipPinchToResize); } +bool IsPipTiltEnabled() { + return base::FeatureList::IsEnabled(kPipTilt); +} + bool IsLocalPrinterObservingEnabled() { return base::FeatureList::IsEnabled(kLocalPrinterObserving); }
diff --git a/ash/constants/ash_features.h b/ash/constants/ash_features.h index 22058e7..ea8c781 100644 --- a/ash/constants/ash_features.h +++ b/ash/constants/ash_features.h
@@ -635,6 +635,8 @@ COMPONENT_EXPORT(ASH_CONSTANTS) COMPONENT_EXPORT(ASH_CONSTANTS) BASE_DECLARE_FEATURE(kPipPinchToResize); COMPONENT_EXPORT(ASH_CONSTANTS) +COMPONENT_EXPORT(ASH_CONSTANTS) BASE_DECLARE_FEATURE(kPipTilt); +COMPONENT_EXPORT(ASH_CONSTANTS) BASE_DECLARE_FEATURE(kPolicyProvidedTrustAnchorsAllowedAtLockScreen); COMPONENT_EXPORT(ASH_CONSTANTS) BASE_DECLARE_FEATURE(kPreferConstantFrameRate); COMPONENT_EXPORT(ASH_CONSTANTS) @@ -1090,6 +1092,7 @@ COMPONENT_EXPORT(ASH_CONSTANTS) bool IsPinAutosubmitFeatureEnabled(); COMPONENT_EXPORT(ASH_CONSTANTS) bool IsPipDoubleTapToResizeEnabled(); COMPONENT_EXPORT(ASH_CONSTANTS) bool IsPipPinchToResizeEnabled(); +COMPONENT_EXPORT(ASH_CONSTANTS) bool IsPipTiltEnabled(); COMPONENT_EXPORT(ASH_CONSTANTS) bool IsPrivacyIndicatorsEnabled(); COMPONENT_EXPORT(ASH_CONSTANTS) bool IsLocalPrinterObservingEnabled(); COMPONENT_EXPORT(ASH_CONSTANTS) bool IsPrinterSettingsPrinterStatusEnabled();
diff --git a/ash/webui/camera_app_ui/resources/js/main.ts b/ash/webui/camera_app_ui/resources/js/main.ts index 10ead8d..f6f95cd 100644 --- a/ash/webui/camera_app_ui/resources/js/main.ts +++ b/ash/webui/camera_app_ui/resources/js/main.ts
@@ -28,6 +28,7 @@ import {GalleryButton} from './gallerybutton.js'; import {Intent} from './intent.js'; import * as Comlink from './lib/comlink.js'; +import {startMeasuringMemoryUsage} from './memory_usage.js'; import * as metrics from './metrics.js'; import * as filesystem from './models/file_system.js'; import * as loadTimeData from './models/load_time_data.js'; @@ -589,6 +590,11 @@ PerfEvent.LAUNCHING_FROM_WINDOW_CREATION, {hasError: !cameraStartSuccessful}); + // Start the memory measurement when the camera preview is ready. The first + // measurement is performed immediately. The following measurements are + // performed periodically, or triggered by specific behaviors. + startMeasuringMemoryUsage(); + await window.appWindow?.onAppLaunched(); metrics.sendOpenCameraEvent(cameraManager.getVidPid());
diff --git a/ash/webui/camera_app_ui/resources/js/memory_usage.ts b/ash/webui/camera_app_ui/resources/js/memory_usage.ts index f6a09bbc..cf03dfe 100644 --- a/ash/webui/camera_app_ui/resources/js/memory_usage.ts +++ b/ash/webui/camera_app_ui/resources/js/memory_usage.ts
@@ -3,6 +3,9 @@ // found in the LICENSE file. import {assert} from './assert.js'; +import {AsyncJobQueue} from './async_job_queue.js'; +import * as state from './state.js'; +import {Mode} from './type.js'; import {measureUntrustedScriptsMemory} from './untrusted_scripts.js'; export interface CCAMemoryMeasurement { @@ -13,7 +16,7 @@ /** * Measures memory usage from trusted and untrusted frames. */ -export async function memoryAppMemoryUsage(): Promise<CCAMemoryMeasurement> { +export async function measureAppMemoryUsage(): Promise<CCAMemoryMeasurement> { assert(self.crossOriginIsolated); const usages = await Promise.all([ performance.measureUserAgentSpecificMemory(), @@ -24,3 +27,104 @@ untrusted: usages[1], }; } + +const MEASUREMENT_INTERVAL_MS = 30000; + +enum SessionBehavior { + TAKE_NORMAL_PHOTO = 1 << 0, + TAKE_PORTRAIT_PHOTO = 1 << 1, + SCAN_BARCODE = 1 << 2, + SCAN_DOCUMENT = 1 << 3, + RECORD_NORMAL_VIDEO = 1 << 4, + RECORD_GIF_VIDEO = 1 << 5, + RECORD_TIME_LAPSE_VIDEO = 1 << 6, +} + +class MemoryMeasurementHelper { + /** + * A job queue for measuring memory usage. + */ + private readonly jobQueue = new AsyncJobQueue('keepLatest'); + + /** + * Maximum memory usage in the current session, in bytes. + */ + private maxUsage: number|null = null; + + /** + * A number represented boolean bit flags for each |SessionBehavior|. The + * value is updated in |measureWithSessionBehavior|. + */ + // TODO(b/291854531): Remove the exceptions once the metric is sent. + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + private sessionBehavior = 0; + + constructor() { + this.jobQueue.push(() => this.collectMemoryUsage()); + + // Schedule the measurement every |MEASUREMENT_INTERVAL_MS| milliseconds. + setInterval(() => { + this.jobQueue.push(() => this.collectMemoryUsage()); + }, MEASUREMENT_INTERVAL_MS); + + // Measure memory usage when session behaviors are triggered. + state.addEnabledStateObserver(state.State.TAKING, () => { + if (state.get(Mode.PHOTO)) { + this.measureWithSessionBehavior(SessionBehavior.TAKE_NORMAL_PHOTO); + } else if (state.get(Mode.PORTRAIT)) { + this.measureWithSessionBehavior(SessionBehavior.TAKE_PORTRAIT_PHOTO); + } + }); + + const observeScanBehavior = () => { + if (state.get(Mode.SCAN)) { + if (state.get(state.State.ENABLE_SCAN_BARCODE)) { + this.measureWithSessionBehavior(SessionBehavior.SCAN_BARCODE); + } else { + this.measureWithSessionBehavior(SessionBehavior.SCAN_DOCUMENT); + } + } + }; + + state.addEnabledStateObserver(Mode.SCAN, observeScanBehavior); + state.addObserver(state.State.ENABLE_SCAN_BARCODE, observeScanBehavior); + + state.addEnabledStateObserver(state.State.RECORDING, () => { + if (state.get(state.State.RECORD_TYPE_NORMAL)) { + this.measureWithSessionBehavior(SessionBehavior.RECORD_NORMAL_VIDEO); + } else if (state.get(state.State.RECORD_TYPE_GIF)) { + this.measureWithSessionBehavior(SessionBehavior.RECORD_GIF_VIDEO); + } else if (state.get(state.State.RECORD_TYPE_TIME_LAPSE)) { + this.measureWithSessionBehavior( + SessionBehavior.RECORD_TIME_LAPSE_VIDEO); + } + }); + } + + private async collectMemoryUsage(): Promise<void> { + const usage = await measureAppMemoryUsage(); + const totalUsage = usage.main.bytes + usage.untrusted.bytes; + if (this.maxUsage === null || totalUsage > this.maxUsage) { + this.maxUsage = totalUsage; + // TODO(b/291854531): Send the max usage to untrusted_ga_helpers, to let + // it send at the end of the session. + } + } + + private measureWithSessionBehavior(behavior: SessionBehavior): void { + this.sessionBehavior |= behavior; + this.jobQueue.push(() => this.collectMemoryUsage()); + } +} + +let helper: MemoryMeasurementHelper|null = null; + +/** + * Starts scheduling memory measurement throughout the session. + */ +export function startMeasuringMemoryUsage(): void { + if (helper === null) { + helper = new MemoryMeasurementHelper(); + } +}
diff --git a/ash/webui/camera_app_ui/resources/js/state.ts b/ash/webui/camera_app_ui/resources/js/state.ts index 3150fd10..4bbaea7 100644 --- a/ash/webui/camera_app_ui/resources/js/state.ts +++ b/ash/webui/camera_app_ui/resources/js/state.ts
@@ -114,6 +114,24 @@ } /** + * Adds observer function to be called when the state value is changed to true. + * Returns the wrapped observer in case it needs to be removed later. + * + * @param state State to be observed. + * @param observer Observer function called with newly changed value. + */ +export function addEnabledStateObserver( + state: StateUnion, observer: StateObserver): StateObserver { + const wrappedObserver: StateObserver = (val, perfInfo) => { + if (val) { + observer(val, perfInfo); + } + }; + addObserver(state, wrappedObserver); + return wrappedObserver; +} + +/** * Adds one-time observer function to be called on any state change. * * @param state State to be observed.
diff --git a/ash/webui/camera_app_ui/resources/js/untrusted_ga_helper.ts b/ash/webui/camera_app_ui/resources/js/untrusted_ga_helper.ts index c9f60a3..06c8efb68 100644 --- a/ash/webui/camera_app_ui/resources/js/untrusted_ga_helper.ts +++ b/ash/webui/camera_app_ui/resources/js/untrusted_ga_helper.ts
@@ -126,6 +126,7 @@ RESOLUTION_LEVEL = 'resolution_level', SCHEMA_VERSION = 'schema_version', SCREEN_RESOLUTION = 'screen_resolution', + SESSION_LENGTH = 'session_length', SHOULD_DOWN_SCALE = 'should_down_scale', SHOULD_HANDLE_RESULT = 'should_handle_result', SHUTTER_TYPE = 'shutter_type', @@ -286,7 +287,7 @@ sendGa4Event({ name: 'end_session', eventParams: { - duration: window.performance.now().toFixed(), + [Ga4MetricDimension.SESSION_LENGTH]: window.performance.now().toFixed(), }, beacon: true, }); @@ -323,7 +324,7 @@ interface SendGa4EventParams { name: string; - eventParams: Record<string, number|string>; + eventParams: Ga4EventParams; beacon?: boolean; }
diff --git a/ash/webui/os_feedback_ui/resources/search_page.html b/ash/webui/os_feedback_ui/resources/search_page.html index f995dc79..1b21365 100644 --- a/ash/webui/os_feedback_ui/resources/search_page.html +++ b/ash/webui/os_feedback_ui/resources/search_page.html
@@ -140,7 +140,7 @@ <div> <iframe on-load="resolveIframeLoaded_" src="chrome-untrusted://os-feedback/untrusted_index.html" - scrolling="no"> + scrolling="no" hidden$="[[isOobeOrLoginScreen_(feedbackContext)]]"> </iframe> </div> <div id="shadowShield"></div>
diff --git a/ash/webui/os_feedback_ui/resources/search_page.js b/ash/webui/os_feedback_ui/resources/search_page.js index e896f96..331d0ff2 100644 --- a/ash/webui/os_feedback_ui/resources/search_page.js +++ b/ash/webui/os_feedback_ui/resources/search_page.js
@@ -2,10 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +import 'chrome://resources/cr_elements/cr_button/cr_button.js'; import './help_content.js'; import './help_resources_icons.js'; import './os_feedback_shared_css.js'; -import 'chrome://resources/cr_elements/cr_button/cr_button.js'; import {I18nBehavior, I18nBehaviorInterface} from 'chrome://resources/ash/common/i18n_behavior.js'; import {stringToMojoString16} from 'chrome://resources/js/mojo_type_util.js'; @@ -308,6 +308,16 @@ } /** + * When the feedback app is launched from OOBE or the login screen, the + * categoryTag is set to "Login". + * @returns {boolean} true if the categoryTag is Login. + * @protected + */ + isOobeOrLoginScreen_() { + return this.feedbackContext && this.feedbackContext.categoryTag === 'Login'; + } + + /** * Fetches help content/popular search and notifies iframe if querySeqNo is * greater than previous. * @param {string} query
diff --git a/base/fuchsia/test.test-fidl b/base/fuchsia/test.test-fidl index 69f0e9ae..8d2df64 100644 --- a/base/fuchsia/test.test-fidl +++ b/base/fuchsia/test.test-fidl
@@ -5,8 +5,8 @@ library base.testfidl; @discoverable -protocol TestInterface { - Add(struct { +closed protocol TestInterface { + strict Add(struct { a int32; b int32; }) -> (struct {
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn index 6e5b0c6..5efd652 100644 --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn
@@ -15,7 +15,6 @@ import("//build/config/gclient_args.gni") import("//build/config/host_byteorder.gni") import("//build/config/rust.gni") -import("//build/config/sanitizers/sanitizers.gni") import("//build/config/ui.gni") import("//build/config/unwind.gni") import("//build/toolchain/cc_wrapper.gni") @@ -86,6 +85,10 @@ # the needed gcov profiling data. auto_profile_path = "" + # Optimize for coverage guided fuzzing (balance between speed and number of + # branches) + optimize_for_fuzzing = false + # Path to an AFDO profile to use while building with clang, if any. Empty # implies none. clang_sample_profile_path = ""
diff --git a/build/config/sanitizers/BUILD.gn b/build/config/sanitizers/BUILD.gn index db57be04..5d8ba62c 100644 --- a/build/config/sanitizers/BUILD.gn +++ b/build/config/sanitizers/BUILD.gn
@@ -286,7 +286,7 @@ # odr-violation errors in rust code, and link failures for cros/asan. # Clang recently turned it on by default for all ELF targets (it was # already on for Fuchsia). Pass the flag to turn it back off. - cflags += ["-fno-sanitize-address-globals-dead-stripping"] + cflags += [ "-fno-sanitize-address-globals-dead-stripping" ] } if (is_win) { if (!defined(asan_win_blocklist_path)) { @@ -550,7 +550,7 @@ } config("fuzzing_build_mode") { - if (use_fuzzing_engine && optimize_for_fuzzing) { + if (use_fuzzing_engine) { defines = [ "FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION" ] } }
diff --git a/build/config/sanitizers/sanitizers.gni b/build/config/sanitizers/sanitizers.gni index 91d8256..954d7d1d 100644 --- a/build/config/sanitizers/sanitizers.gni +++ b/build/config/sanitizers/sanitizers.gni
@@ -86,10 +86,6 @@ # Not for client use. disable_libfuzzer = false - # Optimize for coverage guided fuzzing (balance between speed and number of - # branches). Can be also used to remove non-determinism and other issues. - optimize_for_fuzzing = false - # Value for -fsanitize-coverage flag. Setting this causes # use_sanitizer_coverage to be enabled. # This flag is not used for libFuzzer (use_libfuzzer=true). Instead, we use:
diff --git a/buildtools/reclient_cfgs/configure_reclient_cfgs.py b/buildtools/reclient_cfgs/configure_reclient_cfgs.py index bb6e46f..38409c1 100755 --- a/buildtools/reclient_cfgs/configure_reclient_cfgs.py +++ b/buildtools/reclient_cfgs/configure_reclient_cfgs.py
@@ -165,6 +165,9 @@ parser.add_argument('--cipd_prefix', help='cipd package name prefix', default='infra_internal/rbe/reclient_cfgs') + parser.add_argument('--skip_remoteexec_cfg_fetch', + help='skip downloading reclient cfgs from CIPD server', + action='store_true') parser.add_argument( '--quiet', help='Suppresses info logs', @@ -194,6 +197,9 @@ args.reproxy_cfg_template, args.rbe_instance, rbe_project): return 1 + if args.skip_remoteexec_cfg_fetch: + return 0 + logging.info('fetch reclient_cfgs for RBE project %s...' % rbe_project) cipd_prefix = posixpath.join(args.cipd_prefix, rbe_project)
diff --git a/chrome/app/app_management_strings.grdp b/chrome/app/app_management_strings.grdp index 81c1b2d..f2cae8f 100644 --- a/chrome/app/app_management_strings.grdp +++ b/chrome/app/app_management_strings.grdp
@@ -109,9 +109,6 @@ <message name="IDS_APP_MANAGEMENT_APP_DETAILS_TITLE" desc="Title for App Details Section"> App details </message> - <message name="IDS_APP_MANAGEMENT_APP_DETAILS_TOOLTIP_CROS_SYSTEM" desc="Text for ChromeOS System app tooltip"> - This app is preinstalled on your device - </message> <message name="IDS_APP_MANAGEMENT_APP_DETAILS_TYPE_ANDROID" desc="Text for Android app type"> Android App </message> @@ -136,6 +133,9 @@ <message name="IDS_APP_MANAGEMENT_APP_DETAILS_TYPE_AND_SOURCE_COMBINED" desc="Full text for installation source and app type line"> <ph name="APP_TYPE">$1<ex>Web App</ex></ph> installed from <ph name="BEGIN_LINK"><a href="#"></ph><ph name="INSTALL_SOURCE">$2<ex>Google Play Store</ex></ph><ph name="END_LINK"></a></ph> </message> + <message name="IDS_APP_MANAGEMENT_APP_DETAILS_TYPE_AND_SOURCE_PREINSTALLED_APP" desc="Explanation text for the installation source of an app, describing the type of the app, and that it came automatically installed with the device (preinstalled)."> + <ph name="APP_TYPE">$1<ex>ChromeOS System App</ex></ph> preinstalled on your <ph name="DEVICE_TYPE">$2<ex>Chromebook</ex></ph> + </message> <message name="IDS_APP_MANAGEMENT_APP_DETAILS_VERSION" desc="Text for application version"> Version: <ph name="APP_VERSION">$1<ex>17.2</ex></ph> </message>
diff --git a/chrome/app/app_management_strings_grdp/IDS_APP_MANAGEMENT_APP_DETAILS_TOOLTIP_CROS_SYSTEM.png.sha1 b/chrome/app/app_management_strings_grdp/IDS_APP_MANAGEMENT_APP_DETAILS_TOOLTIP_CROS_SYSTEM.png.sha1 deleted file mode 100644 index 835a4387..0000000 --- a/chrome/app/app_management_strings_grdp/IDS_APP_MANAGEMENT_APP_DETAILS_TOOLTIP_CROS_SYSTEM.png.sha1 +++ /dev/null
@@ -1 +0,0 @@ -b1f03212f8910cc70d478e7858c527d95a8be2f8 \ No newline at end of file
diff --git a/chrome/app/app_management_strings_grdp/IDS_APP_MANAGEMENT_APP_DETAILS_TYPE_AND_SOURCE_PREINSTALLED_APP.png.sha1 b/chrome/app/app_management_strings_grdp/IDS_APP_MANAGEMENT_APP_DETAILS_TYPE_AND_SOURCE_PREINSTALLED_APP.png.sha1 new file mode 100644 index 0000000..6e4fcca7 --- /dev/null +++ b/chrome/app/app_management_strings_grdp/IDS_APP_MANAGEMENT_APP_DETAILS_TYPE_AND_SOURCE_PREINSTALLED_APP.png.sha1
@@ -0,0 +1 @@ +c70cd2ae378fdeb0e267f1dd1823608abf373eb0 \ No newline at end of file
diff --git a/chrome/app/settings_strings.grdp b/chrome/app/settings_strings.grdp index cfe148a..ad7fe5d 100644 --- a/chrome/app/settings_strings.grdp +++ b/chrome/app/settings_strings.grdp
@@ -4399,4 +4399,7 @@ =1 {Permissions removed from 1 unused site} other {Permissions removed from {NUM_SITES} sites}} </message> + <message name="IDS_SETTINGS_SAFETY_HUB_VERSION_CARD_SUBHEADER_RESTART" desc="Safety Hub settings page (chrome://settings/safetyHub) gives users an overview over their safety status. The version card, which this text is a part of, informs the user whether their Chrome is up to date. This text is shown when Chrome is not up to date but there is an update available and the user needs to restart their browser to finish the update. Shown below the title 'Chrome is out of date'."> + Relaunch to finish update. Your tabs will reopen. + </message> </grit-part>
diff --git a/chrome/app/settings_strings_grdp/IDS_SETTINGS_SAFETY_HUB_VERSION_CARD_SUBHEADER_RESTART.png.sha1 b/chrome/app/settings_strings_grdp/IDS_SETTINGS_SAFETY_HUB_VERSION_CARD_SUBHEADER_RESTART.png.sha1 new file mode 100644 index 0000000..356fa74 --- /dev/null +++ b/chrome/app/settings_strings_grdp/IDS_SETTINGS_SAFETY_HUB_VERSION_CARD_SUBHEADER_RESTART.png.sha1
@@ -0,0 +1 @@ +703a1631e837cd2afc1b967b660b5b9c0a002453 \ No newline at end of file
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn index 3c9e806..c08bf3e 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn
@@ -6891,6 +6891,10 @@ ] } if (is_chromeos) { + sources += [ + "printing/pdf_blob_data_flattener.cc", + "printing/pdf_blob_data_flattener.h", + ] deps += [ "//chrome/browser/chromeos/extensions/telemetry/api:keyed_service_factory", "//chromeos/crosapi/mojom",
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc index 855c2292..9fc836d5 100644 --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc
@@ -7812,6 +7812,10 @@ flag_descriptions::kPipPinchToResizeDescription, kOsCrOS, FEATURE_VALUE_TYPE(ash::features::kPipPinchToResize)}, + {"enable-pip-tilt", flag_descriptions::kPipTiltName, + flag_descriptions::kPipTiltDescription, kOsCrOS, + FEATURE_VALUE_TYPE(ash::features::kPipTilt)}, + #endif // BUILDFLAG(IS_CHROMEOS_ASH) {"enable-fenced-frames", flag_descriptions::kEnableFencedFramesName,
diff --git a/chrome/browser/apps/app_service/publishers/arc_apps.cc b/chrome/browser/apps/app_service/publishers/arc_apps.cc index dd6cef89..17ab057 100644 --- a/chrome/browser/apps/app_service/publishers/arc_apps.cc +++ b/chrome/browser/apps/app_service/publishers/arc_apps.cc
@@ -78,6 +78,8 @@ namespace { +absl::optional<int> g_test_arc_version_; + apps::PermissionType GetPermissionType( arc::mojom::AppPermission arc_permission_type) { switch (arc_permission_type) { @@ -477,10 +479,19 @@ return apps::InstallReason::kUser; } +bool ArcVersionEligibleForPromiseIcons() { + return g_test_arc_version_.value_or(arc::GetArcAndroidSdkVersionAsInt()) >= + arc::kArcVersionR; +} + } // namespace namespace apps { +void ArcApps::SetArcVersionForTesting(int version) { + g_test_arc_version_ = version; +} + // static ArcApps* ArcApps::Get(Profile* profile) { return ArcAppsFactory::GetForProfile(profile); @@ -1466,7 +1477,8 @@ } void ArcApps::OnInstallationStarted(const std::string& package_name) { - if (ash::features::ArePromiseIconsEnabled()) { + if (ash::features::ArePromiseIconsEnabled() && + ArcVersionEligibleForPromiseIcons()) { PromiseAppPtr promise_app = AppPublisher::MakePromiseApp(PackageId(AppType::kArc, package_name)); @@ -1520,7 +1532,8 @@ void ArcApps::OnInstallationFinished(const std::string& package_name, bool success) { - if (ash::features::ArePromiseIconsEnabled()) { + if (ash::features::ArePromiseIconsEnabled() && + ArcVersionEligibleForPromiseIcons()) { // Remove the promise app of any failed installation. if (success) { return;
diff --git a/chrome/browser/apps/app_service/publishers/arc_apps.h b/chrome/browser/apps/app_service/publishers/arc_apps.h index 26a50c5..da557d19 100644 --- a/chrome/browser/apps/app_service/publishers/arc_apps.h +++ b/chrome/browser/apps/app_service/publishers/arc_apps.h
@@ -75,6 +75,8 @@ WebApkManager* GetWebApkManagerForTesting() { return web_apk_manager_.get(); } + static void SetArcVersionForTesting(int version); + private: friend class ArcAppsFactory; friend class PublisherTest;
diff --git a/chrome/browser/apps/app_service/publishers/arc_apps_unittest.cc b/chrome/browser/apps/app_service/publishers/arc_apps_unittest.cc index 7174a26..7aa7096 100644 --- a/chrome/browser/apps/app_service/publishers/arc_apps_unittest.cc +++ b/chrome/browser/apps/app_service/publishers/arc_apps_unittest.cc
@@ -7,6 +7,7 @@ #include <functional> #include <memory> +#include "ash/components/arc/arc_util.h" #include "ash/components/arc/mojom/app.mojom.h" #include "ash/components/arc/mojom/intent_helper.mojom.h" #include "ash/components/arc/session/arc_bridge_service.h" @@ -783,6 +784,56 @@ EXPECT_FALSE(promise_app_result); } +TEST_F(ArcAppsPublisherTest, PromiseAppsAreSuppressedForPiArc) { + base::test::ScopedFeatureList feature_list_; + feature_list_.InitAndEnableFeature(ash::features::kPromiseIcons); + app_service_proxy()->ReinitializeForTesting(profile()); + apps::PromiseAppRegistryCache* cache = + app_service_proxy()->PromiseAppRegistryCache(); + + // Set ARC version to P, which we should not create promise apps for. + apps::ArcApps::SetArcVersionForTesting(arc::kArcVersionP); + + std::string package_name = "com.example.this"; + apps::PackageId package_id = + apps::PackageId(apps::AppType::kArc, package_name); + + // Verify that the promise app is not registered to begin with. + EXPECT_FALSE(cache->HasPromiseApp(package_id)); + + // Trigger an installation event notification. + arc_test()->app_instance()->SendInstallationStarted(package_name); + + // Verify that the promise app still isn't registered. + EXPECT_FALSE(cache->HasPromiseApp(package_id)); +} + +TEST_F(ArcAppsPublisherTest, PromiseAppsAreCreatedForRvcArc) { + base::test::ScopedFeatureList feature_list_; + feature_list_.InitAndEnableFeature(ash::features::kPromiseIcons); + app_service_proxy()->ReinitializeForTesting(profile()); + apps::PromiseAppRegistryCache* cache = + app_service_proxy()->PromiseAppRegistryCache(); + apps::PromiseAppService* service = app_service_proxy()->PromiseAppService(); + service->SetSkipAlmanacForTesting(true); + + // Set ARC version to R, which should allow promise apps to be created. + apps::ArcApps::SetArcVersionForTesting(arc::kArcVersionR); + + std::string package_name = "com.example.this"; + apps::PackageId package_id = + apps::PackageId(apps::AppType::kArc, package_name); + + // Verify that the promise app is not registered to begin with. + EXPECT_FALSE(cache->HasPromiseApp(package_id)); + + // Trigger an installation event notification. + arc_test()->app_instance()->SendInstallationStarted(package_name); + + // Verify that the promise app is registered. + EXPECT_TRUE(cache->HasPromiseApp(package_id)); +} + // Verifies that only valid intent filters will be published from ARC. TEST_F(ArcAppsPublisherTest, OnlyValidFilterIsPublished) { const GURL kTestUrl("https://www.example.com");
diff --git a/chrome/browser/ash/BUILD.gn b/chrome/browser/ash/BUILD.gn index 3a97f27..e73d557b 100644 --- a/chrome/browser/ash/BUILD.gn +++ b/chrome/browser/ash/BUILD.gn
@@ -4039,7 +4039,6 @@ "//chromeos/ash/components/scalable_iph:constants", "//chromeos/ash/components/scalable_iph:iph_session", "//chromeos/ash/components/scalable_iph:logger", - "//chromeos/ash/components/scalable_iph:scalable_iph", "//chromeos/ash/components/scalable_iph:scalable_iph_delegate", "//chromeos/ash/components/standalone_browser", "//chromeos/ash/components/sync_wifi",
diff --git a/chrome/browser/ash/app_list/search/app_search_provider_unittest.cc b/chrome/browser/ash/app_list/search/app_search_provider_unittest.cc index 870e331..e566df6 100644 --- a/chrome/browser/ash/app_list/search/app_search_provider_unittest.cc +++ b/chrome/browser/ash/app_list/search/app_search_provider_unittest.cc
@@ -338,7 +338,7 @@ } TEST_F(AppSearchProviderTest, WebApp) { - const web_app::AppId app_id = web_app::test::InstallDummyWebApp( + const webapps::AppId app_id = web_app::test::InstallDummyWebApp( testing_profile(), kWebAppName, GURL(kWebAppUrl)); // Allow async callbacks to run.
diff --git a/chrome/browser/ash/app_list/search/help_app_search_browsertest.cc b/chrome/browser/ash/app_list/search/help_app_search_browsertest.cc index fc09d757..f7992c4 100644 --- a/chrome/browser/ash/app_list/search/help_app_search_browsertest.cc +++ b/chrome/browser/ash/app_list/search/help_app_search_browsertest.cc
@@ -25,12 +25,12 @@ #include "chrome/browser/ui/browser_window.h" #include "chrome/browser/web_applications/test/web_app_install_test_utils.h" #include "chrome/browser/web_applications/test/with_crosapi_param.h" -#include "chrome/browser/web_applications/web_app_id.h" #include "chrome/browser/web_applications/web_app_id_constants.h" #include "chrome/browser/web_applications/web_app_provider.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/pref_names.h" #include "chromeos/strings/grit/chromeos_strings.h" +#include "components/webapps/common/web_app_id.h" using web_app::test::CrosapiParam; using web_app::test::WithCrosapiParam; @@ -376,7 +376,7 @@ IN_PROC_BROWSER_TEST_P(HelpAppSwaSearchBrowserTest, Launch) { Profile* profile = browser()->profile(); ash::SystemWebAppManager::GetForTest(profile)->InstallSystemAppsForTesting(); - const web_app::AppId app_id = web_app::kHelpAppId; + const webapps::AppId app_id = web_app::kHelpAppId; ShowAppListAndWaitForZeroStateResults( {ash::AppListSearchResultType::kZeroStateHelpApp,
diff --git a/chrome/browser/ash/chrome_browser_main_parts_ash.cc b/chrome/browser/ash/chrome_browser_main_parts_ash.cc index f77077d..42cb379d 100644 --- a/chrome/browser/ash/chrome_browser_main_parts_ash.cc +++ b/chrome/browser/ash/chrome_browser_main_parts_ash.cc
@@ -353,6 +353,13 @@ } #endif // !defined(USE_REAL_DBUS_CLIENTS) +void ShillSetPropertyErrorCallback(std::string_view property_name, + const std::string& error_name, + const std::string& error_message) { + NET_LOG(ERROR) << "Failed to set shill property " << property_name + << ", error:" << error_name << ", message: " << error_message; +} + } // namespace namespace internal { @@ -1296,16 +1303,19 @@ shill::kEnableRFC8925Property, base::Value(base::FeatureList::IsEnabled(features::kEnableRFC8925)), base::DoNothing(), - base::BindOnce([](const std::string& error_name, - const std::string& error_message) { - NET_LOG(ERROR) << "Fail to set EnableRFC8925 shill property, error:" - << error_name << ", message: " << error_message; - })); + base::BindOnce(ShillSetPropertyErrorCallback, + shill::kEnableRFC8925Property)); - // Notify patchpanel about QoS feature enabled flag. + // Notify patchpanel and shill about QoS feature enabled flag. + const bool wifi_qos_enabled = + base::FeatureList::IsEnabled(features::kEnableWifiQos); ash::PatchPanelClient::Get()->SetFeatureFlag( - patchpanel::SetFeatureFlagRequest::WIFI_QOS, - base::FeatureList::IsEnabled(features::kEnableWifiQos)); + patchpanel::SetFeatureFlagRequest::WIFI_QOS, wifi_qos_enabled); + ash::ShillManagerClient::Get()->SetProperty( + shill::kEnableDHCPQoSProperty, base::Value(wifi_qos_enabled), + base::DoNothing(), + base::BindOnce(ShillSetPropertyErrorCallback, + shill::kEnableDHCPQoSProperty)); } ChromeBrowserMainPartsLinux::PostProfileInit(profile, is_initial_profile);
diff --git a/chrome/browser/ash/crosapi/browser_manager.cc b/chrome/browser/ash/crosapi/browser_manager.cc index 25123b4..9ac1cc5 100644 --- a/chrome/browser/ash/crosapi/browser_manager.cc +++ b/chrome/browser/ash/crosapi/browser_manager.cc
@@ -1083,11 +1083,11 @@ return; } - // If the user is already logged in and we are inside the session, - // call |RecordDataverForPrimaryUser| now. + // If we are not launching at the login screen, we must be inside a + // user session, so call `RecordDataVerForPrimaryUser` now. // Otherwise, if we're pre-launching at login screen, this will be // done later, once the user logs in and the session is started. - if (user_manager::UserManager::Get()->IsUserLoggedIn()) { + if (!launching_at_login_screen) { RecordDataVerForPrimaryUser(); }
diff --git a/chrome/browser/ash/file_manager/file_manager_policy_browsertest.cc b/chrome/browser/ash/file_manager/file_manager_policy_browsertest.cc index a4d9e1c..a0b65c2 100644 --- a/chrome/browser/ash/file_manager/file_manager_policy_browsertest.cc +++ b/chrome/browser/ash/file_manager/file_manager_policy_browsertest.cc
@@ -274,14 +274,19 @@ auto cb = base::BindLambdaForTesting( [task_id, warning_files, action, profile]( const dlp::CheckFilesTransferRequest, - chromeos::DlpClient::CheckFilesTransferCallback) { + chromeos::DlpClient::CheckFilesTransferCallback daemon_callback) { + auto warning_callback = base::BindOnce( + [](chromeos::DlpClient::CheckFilesTransferCallback daemon_cb, + absl::optional<std::u16string> justification, + bool should_proceed) { std::move(daemon_cb).Run({}); }, + std::move(daemon_callback)); policy::FilesPolicyNotificationManager* fpnm = policy::FilesPolicyNotificationManagerFactory:: GetForBrowserContext(profile); ASSERT_TRUE(fpnm); ASSERT_TRUE(fpnm->HasIOTask(task_id.value())); // Call FPNM to show the warning, which pauses the task. - fpnm->ShowDlpWarning(base::DoNothing(), task_id, + fpnm->ShowDlpWarning(std::move(warning_callback), task_id, std::move(warning_files), policy::DlpFileDestination(), action); }); @@ -972,6 +977,79 @@ StartTest(); } +// A version of FilesAppBrowserTest that supports DLP and Enterprise Connectors +// files restrictions. +class DlpAndEnterpriseConnectorsFilesAppBrowserTest + : public FileManagerBrowserTestBase, + public ::testing::WithParamInterface<file_manager::test::TestCase>, + public DlpFilesAppBrowserTestBase, + public FileTransferConnectorFilesAppBrowserTestBase { + public: + DlpAndEnterpriseConnectorsFilesAppBrowserTest( + const DlpAndEnterpriseConnectorsFilesAppBrowserTest&) = delete; + DlpAndEnterpriseConnectorsFilesAppBrowserTest& operator=( + const DlpAndEnterpriseConnectorsFilesAppBrowserTest&) = delete; + + protected: + DlpAndEnterpriseConnectorsFilesAppBrowserTest() = default; + ~DlpAndEnterpriseConnectorsFilesAppBrowserTest() override = default; + + void SetUpOnMainThread() override { + FileManagerBrowserTestBase::SetUpOnMainThread(); + policy::DlpRulesManagerFactory::GetInstance()->SetTestingFactory( + profile(), + base::BindRepeating(&DlpFilesAppBrowserTestBase::SetDlpRulesManager, + base::Unretained(this))); + FileTransferConnectorFilesAppBrowserTestBase::SetUpOnMainThread(profile()); + } + + void TearDownOnMainThread() override { + // The files controller must be destroyed before the profile since it's + // holding a pointer to it. + files_controller_.reset(); + FileManagerBrowserTestBase::TearDownOnMainThread(); + } + + bool HandleDlpCommands(const std::string& name, + const base::Value::Dict& value, + std::string* output) override { + return DlpFilesAppBrowserTestBase::HandleDlpCommands(profile(), name, value, + output); + } + + bool HandleEnterpriseConnectorCommands(const std::string& name, + const base::Value::Dict& value, + std::string* output) override { + return FileTransferConnectorFilesAppBrowserTestBase:: + HandleEnterpriseConnectorCommands(profile(), GetOptions(), name, value, + output); + } + + const char* GetTestCaseName() const override { return GetParam().name; } + + std::string GetFullTestCaseName() const override { + return GetParam().GetFullName(); + } + + const char* GetTestExtensionManifestName() const override { + return "file_manager_test_manifest.json"; + } + + FileManagerBrowserTestBase::Options GetOptions() const override { + return GetParam().options; + } +}; + +IN_PROC_BROWSER_TEST_P(DlpAndEnterpriseConnectorsFilesAppBrowserTest, Test) { + ASSERT_TRUE(policy::DlpRulesManagerFactory::GetForPrimaryProfile()); + ON_CALL(*mock_rules_manager_, IsRestricted) + .WillByDefault(::testing::Return(policy::DlpRulesManager::Level::kAllow)); + ON_CALL(*mock_rules_manager_, GetReportingManager) + .WillByDefault(::testing::Return(nullptr)); + + StartTest(); +} + WRAPPED_INSTANTIATE_TEST_SUITE_P( DLP, /* dlp.js */ DlpFilesAppBrowserTest, @@ -1070,6 +1148,11 @@ FILE_TRANSFER_TEST_CASE_NEW_UX( "transferConnectorFromUsbToDownloadsDeepWarnCancelNewUX"))); +WRAPPED_INSTANTIATE_TEST_SUITE_P( + DlpEntrepriseConnectors, /* dlp_enterprise_connectors.js */ + DlpAndEnterpriseConnectorsFilesAppBrowserTest, + ::testing::Values(FILE_TRANSFER_TEST_CASE_NEW_UX("twoWarningsProceeded"))); + #undef FILE_TRANSFER_TEST_CASE #undef FILE_TRANSFER_TEST_CASE_NEW_UX
diff --git a/chrome/browser/ash/login/screens/tpm_error_screen.h b/chrome/browser/ash/login/screens/tpm_error_screen.h index 3a5405ae..8d5a8d8 100644 --- a/chrome/browser/ash/login/screens/tpm_error_screen.h +++ b/chrome/browser/ash/login/screens/tpm_error_screen.h
@@ -32,6 +32,10 @@ exit_callback_ = callback; } + const ScreenExitCallback& get_exit_callback_for_testing() { + return exit_callback_; + } + static std::string GetResultString(Result result); private:
diff --git a/chrome/browser/ash/login/screens/tpm_error_screen_browsertest.cc b/chrome/browser/ash/login/screens/tpm_error_screen_browsertest.cc index 0eac5d3d..dacdf81 100644 --- a/chrome/browser/ash/login/screens/tpm_error_screen_browsertest.cc +++ b/chrome/browser/ash/login/screens/tpm_error_screen_browsertest.cc
@@ -31,6 +31,7 @@ TpmErrorScreen* tpm_error_screen = WizardController::default_controller()->GetScreen<TpmErrorScreen>(); + original_callback_ = tpm_error_screen->get_exit_callback_for_testing(); tpm_error_screen->set_exit_callback_for_testing( screen_result_waiter_.GetRepeatingCallback()); OobeBaseTest::SetUpOnMainThread(); @@ -51,11 +52,14 @@ } TpmErrorScreen::Result WaitForScreenExitResult() { - return screen_result_waiter_.Take(); + TpmErrorScreen::Result result = screen_result_waiter_.Take(); + original_callback_.Run(result); + return result; } private: base::test::TestFuture<TpmErrorScreen::Result> screen_result_waiter_; + TpmErrorScreen::ScreenExitCallback original_callback_; }; IN_PROC_BROWSER_TEST_F(TpmErrorScreenTest, NoSkipOptionOnTpmDbusError) { @@ -80,6 +84,8 @@ TpmErrorScreen::Result result = WaitForScreenExitResult(); EXPECT_EQ(result, TpmErrorScreen::Result::kSkip); + + OobeScreenWaiter(UserCreationView::kScreenId).Wait(); } } // namespace ash
diff --git a/chrome/browser/ash/login/wizard_controller.cc b/chrome/browser/ash/login/wizard_controller.cc index bfe9668..317d9c575 100644 --- a/chrome/browser/ash/login/wizard_controller.cc +++ b/chrome/browser/ash/login/wizard_controller.cc
@@ -1328,7 +1328,7 @@ // but the TPM is owned by a previous OS. Users can either try restarting the // device to reconfigure TPM in BIOS or continue using the device without // enrollment. This is a non-blocking error. - AdvanceToScreen(UserCreationView::kScreenId); + SetCurrentScreen(GetScreen(UserCreationView::kScreenId)); } void WizardController::OnLocalPasswordSetupScreenExit(
diff --git a/chrome/browser/ash/policy/core/device_policy_decoder.cc b/chrome/browser/ash/policy/core/device_policy_decoder.cc index 3bbf6f59..270ee9ff 100644 --- a/chrome/browser/ash/policy/core/device_policy_decoder.cc +++ b/chrome/browser/ash/policy/core/device_policy_decoder.cc
@@ -10,13 +10,13 @@ #include <utility> #include "ash/system/privacy_hub/privacy_hub_controller.h" +#include "base/containers/fixed_flat_map.h" #include "base/functional/callback.h" #include "base/json/json_reader.h" #include "base/logging.h" #include "base/strings/stringprintf.h" #include "base/strings/utf_string_conversions.h" #include "base/syslog_logging.h" -#include "base/values.h" #include "chrome/browser/ash/policy/core/device_local_account.h" #include "chrome/browser/ash/policy/off_hours/off_hours_proto_parser.h" #include "chrome/browser/ash/tpm_firmware_update.h" @@ -32,7 +32,6 @@ #include "components/policy/core/common/policy_types.h" #include "components/policy/core/common/schema.h" #include "components/policy/policy_constants.h" -#include "components/policy/proto/chrome_device_policy.pb.h" #include "components/strings/grit/components_strings.h" #include "third_party/abseil-cpp/absl/types/optional.h" #include "third_party/cros_system_api/dbus/service_constants.h" @@ -77,6 +76,33 @@ } } +base::Value::List ProtoToList(const RepeatedPtrField<std::string>& strings) { + base::Value::List result = base::Value::List::with_capacity(strings.size()); + for (const auto& value : strings) { + result.Append(value); + } + return result; +} + +void SetDeviceDlcPredownloadListPolicy( + const RepeatedPtrField<std::string>& raw_policy_value, + PolicyMap* policies) { + std::string error; + absl::optional<base::Value::List> decoded_dlc_list = + DecodeDeviceDlcPredownloadListPolicy(raw_policy_value, &error); + base::Value::List value_to_set = decoded_dlc_list.has_value() + ? std::move(decoded_dlc_list.value()) + : ProtoToList(raw_policy_value); + policies->Set(key::kDeviceDlcPredownloadList, POLICY_LEVEL_MANDATORY, + POLICY_SCOPE_MACHINE, POLICY_SOURCE_CLOUD, + base::Value(std::move(value_to_set)), nullptr); + if (!error.empty()) { + policies->AddMessage( + key::kDeviceDlcPredownloadList, PolicyMap::MessageType::kError, + IDS_POLICY_PROTO_PARSING_ERROR, {base::UTF8ToUTF16(error)}); + } +} + // Returns true and sets |level| to a PolicyLevel if the policy has been set // at that level. Returns false if the policy has been set at the level of // PolicyOptions::UNSET. @@ -2282,6 +2308,11 @@ nullptr); } } + + if (policy.has_device_dlc_predownload_list()) { + SetDeviceDlcPredownloadListPolicy( + policy.device_dlc_predownload_list().value().entries(), policies); + } } } // namespace @@ -2328,6 +2359,34 @@ return root; } +// TODO (b/297008279): move this function to the class that will manage pre +// downloading DLCs. +absl::optional<base::Value::List> DecodeDeviceDlcPredownloadListPolicy( + const RepeatedPtrField<std::string>& raw_policy_value, + std::string* error) { + constexpr auto policy_value_to_dlc_id = + base::MakeFixedFlatMap<absl::string_view, absl::string_view>( + {{"scanner_drivers", "sane-backends-extras-dlc"}}); + + base::Value::List dlcs_to_predownload = + base::Value::List::with_capacity(raw_policy_value.size()); + for (const auto& dlc_to_predownload : raw_policy_value) { + // TODO (b/297008279): handle case when there is an invalid value. In this + // case we should return an info message and skip this particular DLC + // without failing. + if (policy_value_to_dlc_id.contains(dlc_to_predownload)) { + const absl::string_view& dlc_id = + policy_value_to_dlc_id.at(dlc_to_predownload); + if (!base::Contains(dlcs_to_predownload, dlc_id)) { + // Silently ignore duplicate values. + dlcs_to_predownload.Append(dlc_id); + } + } + } + + return dlcs_to_predownload; +} + void DecodeDevicePolicy( const em::ChromeDeviceSettingsProto& policy, base::WeakPtr<ExternalDataManager> external_data_manager,
diff --git a/chrome/browser/ash/policy/core/device_policy_decoder.h b/chrome/browser/ash/policy/core/device_policy_decoder.h index f5f2769..ddbe1897 100644 --- a/chrome/browser/ash/policy/core/device_policy_decoder.h +++ b/chrome/browser/ash/policy/core/device_policy_decoder.h
@@ -8,7 +8,9 @@ #include <string> #include "base/memory/weak_ptr.h" +#include "base/values.h" #include "third_party/abseil-cpp/absl/types/optional.h" +#include "third_party/protobuf/src/google/protobuf/repeated_ptr_field.h" namespace enterprise_management { class ChromeDeviceSettingsProto; @@ -38,6 +40,15 @@ const std::string& policy_name, std::string* error); +// Decode a list of DLCs that should be pre downloaded to the device from +// human-readable strings to DLC IDs. Returns nullptr if any string in the list +// doesn't match with a DLC ID that can be pre downloaded. Any warning or error +// messages from the decoding and schema validation process are stored in +// |error|. +absl::optional<base::Value::List> DecodeDeviceDlcPredownloadListPolicy( + const google::protobuf::RepeatedPtrField<std::string>& raw_policy_value, + std::string* error); + // Decodes device policy in ChromeDeviceSettingsProto representation into the a // PolicyMap. void DecodeDevicePolicy(
diff --git a/chrome/browser/ash/printing/cups_print_job_manager_impl.cc b/chrome/browser/ash/printing/cups_print_job_manager_impl.cc index d10275c..2991b96 100644 --- a/chrome/browser/ash/printing/cups_print_job_manager_impl.cc +++ b/chrome/browser/ash/printing/cups_print_job_manager_impl.cc
@@ -35,9 +35,7 @@ #include "chrome/browser/printing/print_job_manager.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile_manager.h" -#include "chrome/browser/scalable_iph/scalable_iph_factory.h" #include "chrome/grit/generated_resources.h" -#include "chromeos/ash/components/scalable_iph/scalable_iph.h" #include "chromeos/printing/printing_constants.h" #include "content/public/browser/browser_context.h" #include "content/public/browser/browser_task_traits.h" @@ -201,14 +199,6 @@ return false; } - // Record print job with scalable IPH framework. - scalable_iph::ScalableIph* scalable_iph = - ScalableIphFactory::GetForBrowserContext(profile); - if (scalable_iph) { - scalable_iph->RecordEvent( - scalable_iph::ScalableIph::Event::kPrintJobCreated); - } - // Create a new print job. auto cpj = std::make_unique<CupsPrintJob>(*printer, job_id, title, total_page_number, source,
diff --git a/chrome/browser/ash/scalable_iph/scalable_iph_browsertest.cc b/chrome/browser/ash/scalable_iph/scalable_iph_browsertest.cc index 0fbc9c2..2c31beb 100644 --- a/chrome/browser/ash/scalable_iph/scalable_iph_browsertest.cc +++ b/chrome/browser/ash/scalable_iph/scalable_iph_browsertest.cc
@@ -20,9 +20,6 @@ #include "chrome/browser/ash/login/lock/screen_locker_tester.h" #include "chrome/browser/ash/login/test/device_state_mixin.h" #include "chrome/browser/ash/login/wizard_controller.h" -#include "chrome/browser/ash/printing/cups_print_job.h" -#include "chrome/browser/ash/printing/cups_print_job_manager.h" -#include "chrome/browser/ash/printing/cups_print_job_manager_factory.h" #include "chrome/browser/ash/printing/synced_printers_manager.h" #include "chrome/browser/ash/printing/synced_printers_manager_factory.h" #include "chrome/browser/ash/scalable_iph/customizable_test_env_browser_test_base.h" @@ -162,35 +159,6 @@ app_list_model_updater_observation_{this}; }; -class CupsPrintJobManagerWaiter : public ash::CupsPrintJobManager::Observer { - public: - CupsPrintJobManagerWaiter(ash::CupsPrintJobManager* print_job_manager, - int job_id) - : print_job_manager_(print_job_manager), job_id_(job_id) { - CHECK(print_job_manager_); - print_job_manager_observation_.Observe(print_job_manager_); - } - - void Wait() { run_loop_.Run(); } - - void OnPrintJobCreated(base::WeakPtr<ash::CupsPrintJob> job) override { - if (job->job_id() == job_id_) { - CHECK(run_loop_.IsRunningOnCurrentThread()) - << "Observed expected print job id before run_loop_ is running: " - << job_id_; - run_loop_.Quit(); - } - } - - private: - base::ScopedObservation<ash::CupsPrintJobManager, - ash::CupsPrintJobManager::Observer> - print_job_manager_observation_{this}; - raw_ptr<ash::CupsPrintJobManager> print_job_manager_; - base::RunLoop run_loop_; - int job_id_; -}; - class ScalableIphBrowserTestDebugOff : public ScalableIphBrowserTest { public: ScalableIphBrowserTestDebugOff() { enable_scalable_iph_debug_ = false; } @@ -757,23 +725,6 @@ ash::SystemWebAppType::PERSONALIZATION); } -// TODO(b/301006258): Migrate to use observer pattern, then enable the test. -IN_PROC_BROWSER_TEST_F(ScalableIphBrowserTest, DISABLED_PrintJobCreated) { - EXPECT_CALL(*mock_tracker(), - NotifyEvent(scalable_iph::kEventNamePrintJobCreated)); - - ash::CupsPrintJobManager* print_job_manager = - ash::CupsPrintJobManagerFactory::GetForBrowserContext( - browser()->profile()); - CupsPrintJobManagerWaiter print_job_manager_waiter(print_job_manager, - /*job_id=*/0); - print_job_manager->CreatePrintJob( - "test-printer-id", "title", /*job_id=*/0, /*total_page_number=*/1, - ::printing::PrintJob::Source::kPrintPreview, /*source_id=*/"", - ash::printing::proto::PrintSettings()); - print_job_manager_waiter.Wait(); -} - // Logging feature is on by default in `ScalableIphBrowserTest`. IN_PROC_BROWSER_TEST_F(ScalableIphBrowserTest, Log) { constexpr char kTestFileNamePattern[] = "*scalable_iph_browsertest.cc*";
diff --git a/chrome/browser/ash/settings/device_settings_provider.cc b/chrome/browser/ash/settings/device_settings_provider.cc index e272b82..5fd810d 100644 --- a/chrome/browser/ash/settings/device_settings_provider.cc +++ b/chrome/browser/ash/settings/device_settings_provider.cc
@@ -82,6 +82,7 @@ kDeviceDisabled, kDeviceDisabledMessage, kDeviceDisplayResolution, + kDeviceDlcPredownloadList, kDeviceDockMacAddressSource, kDeviceEncryptedReportingPipelineEnabled, kDeviceHindiInscriptLayoutEnabled, @@ -187,7 +188,7 @@ constexpr char InvalidCombinationsOfAllowedUsersPoliciesHistogram[] = "Login.InvalidCombinationsOfAllowedUsersPolicies"; -// Re-use the DecodeJsonStringAndNormalize from device_policy_decoder.h +// Re-use the DecodeJsonStringAndNormalize() from device_policy_decoder.h // here to decode the json string and validate it against |policy_name|'s // schema. If the json string is valid, the decoded base::Value will be stored // as |setting_name| in |pref_value_map|. The error can be ignored here since it @@ -204,6 +205,22 @@ } } +// Re-use the DecodeDeviceDlcPredownloadListPolicy() from +// device_policy_decoder.h here to decode the list of DLCs that should be pre +// downloaded to the device. The error can be ignored here since it is already +// reported during decoding in device_policy_decoder.cc. +void SetDeviceDlcPredownloadListSetting( + const RepeatedPtrField<std::string>& raw_policy_value, + PrefValueMap* pref_value_map) { + std::string error; + absl::optional<base::Value::List> decoded_dlc_list = + policy::DecodeDeviceDlcPredownloadListPolicy(raw_policy_value, &error); + if (decoded_dlc_list.has_value()) { + pref_value_map->SetValue(kDeviceDlcPredownloadList, + base::Value(std::move(decoded_dlc_list.value()))); + } +} + // Puts the policy value into the settings store if only it matches the regex // pattern. void SetSettingWithValidatingRegex(const std::string& policy_name, @@ -1307,6 +1324,12 @@ base::Value(container.enabled())); } } + + if (policy.has_device_dlc_predownload_list()) { + SetDeviceDlcPredownloadListSetting( + policy.device_dlc_predownload_list().value().entries(), + new_values_cache); + } } void DecodeLogUploadPolicies(const em::ChromeDeviceSettingsProto& policy,
diff --git a/chrome/browser/ash/settings/device_settings_provider_unittest.cc b/chrome/browser/ash/settings/device_settings_provider_unittest.cc index 35d281f..2ebc4b3 100644 --- a/chrome/browser/ash/settings/device_settings_provider_unittest.cc +++ b/chrome/browser/ash/settings/device_settings_provider_unittest.cc
@@ -222,15 +222,22 @@ void VerifyPolicyValue(const char* policy_key, const base::Value* ptr_to_expected_value) { // The pointer might be null, so check before dereferencing. - if (ptr_to_expected_value) - EXPECT_EQ(*ptr_to_expected_value, *provider_->Get(policy_key)); - else - EXPECT_EQ(nullptr, provider_->Get(policy_key)); + const base::Value* value = provider_->Get(policy_key); + if (ptr_to_expected_value) { + // This prevents tests from crashing if provider returns nullptr. + ASSERT_TRUE(value); + EXPECT_EQ(*ptr_to_expected_value, *value); + } else { + EXPECT_EQ(nullptr, value); + } } void VerifyPolicyList(const char* policy_key, const base::Value::List& expected_value) { - EXPECT_TRUE(provider_->Get(policy_key)->is_list()); + const base::Value* value = provider_->Get(policy_key); + // This prevents tests from crashing if provider returns nullptr. + ASSERT_TRUE(value); + EXPECT_TRUE(value->is_list()); EXPECT_EQ(expected_value, provider_->Get(policy_key)->GetList()); } @@ -1371,4 +1378,62 @@ *provider_->Get(kDeviceHindiInscriptLayoutEnabled)); } +TEST_F(DeviceSettingsProviderTest, DeviceDlcPredownloadListUnset) { + // Device setting must be unset if the policy is not set. + VerifyPolicyValue(kDeviceDlcPredownloadList, nullptr); +} + +TEST_F(DeviceSettingsProviderTest, DeviceDlcPredownloadListEmpty) { + // Device setting must be unset if there are no DLCs to pre download. + device_policy_->payload().clear_device_dlc_predownload_list(); + BuildAndInstallDevicePolicy(); + VerifyPolicyValue(kDeviceDlcPredownloadList, nullptr); +} + +TEST_F(DeviceSettingsProviderTest, DeviceDlcPredownloadListNonempty) { + device_policy_->payload() + .mutable_device_dlc_predownload_list() + ->mutable_value() + ->add_entries("scanner_drivers"); + + BuildAndInstallDevicePolicy(); + + VerifyPolicyList(kDeviceDlcPredownloadList, + base::Value::List().Append("sane-backends-extras-dlc")); +} + +TEST_F(DeviceSettingsProviderTest, DeviceDlcPredownloadListInvalidDlc) { + device_policy_->payload() + .mutable_device_dlc_predownload_list() + ->mutable_value() + ->add_entries("scanner_drivers"); + device_policy_->payload() + .mutable_device_dlc_predownload_list() + ->mutable_value() + ->add_entries("invalid_dlc_name"); + + BuildAndInstallDevicePolicy(); + + // Device setting must contain only the valid DLCs that can be pre downloaded. + VerifyPolicyList(kDeviceDlcPredownloadList, + base::Value::List().Append("sane-backends-extras-dlc")); +} + +TEST_F(DeviceSettingsProviderTest, DeviceDlcPredownloadListDuplicateDlc) { + device_policy_->payload() + .mutable_device_dlc_predownload_list() + ->mutable_value() + ->add_entries("scanner_drivers"); + device_policy_->payload() + .mutable_device_dlc_predownload_list() + ->mutable_value() + ->add_entries("scanner_drivers"); + + BuildAndInstallDevicePolicy(); + + // Device setting must not contain any duplicate values. + VerifyPolicyList(kDeviceDlcPredownloadList, + base::Value::List().Append("sane-backends-extras-dlc")); +} + } // namespace ash
diff --git a/chrome/browser/ash/system_web_apps/apps/camera_app/chrome_camera_app_ui_delegate.cc b/chrome/browser/ash/system_web_apps/apps/camera_app/chrome_camera_app_ui_delegate.cc index 86cf9c4..d455973 100644 --- a/chrome/browser/ash/system_web_apps/apps/camera_app/chrome_camera_app_ui_delegate.cc +++ b/chrome/browser/ash/system_web_apps/apps/camera_app/chrome_camera_app_ui_delegate.cc
@@ -301,7 +301,7 @@ return; } - absl::optional<web_app::AppId> app_id = + absl::optional<webapps::AppId> app_id = swa_manager->GetAppIdForSystemApp(ash::SystemWebAppType::CAMERA); if (!app_id.has_value()) { return;
diff --git a/chrome/browser/background_sync/periodic_background_sync_permission_context_unittest.cc b/chrome/browser/background_sync/periodic_background_sync_permission_context_unittest.cc index fde53c5..ba7f7d9be 100644 --- a/chrome/browser/background_sync/periodic_background_sync_permission_context_unittest.cc +++ b/chrome/browser/background_sync/periodic_background_sync_permission_context_unittest.cc
@@ -9,7 +9,6 @@ #include "base/test/scoped_feature_list.h" #include "build/build_config.h" #include "chrome/browser/content_settings/host_content_settings_map_factory.h" -#include "chrome/browser/web_applications/web_app_install_info.h" #include "chrome/test/base/chrome_render_view_host_test_harness.h" #include "chrome/test/base/testing_profile.h" #include "components/content_settings/core/browser/host_content_settings_map.h"
diff --git a/chrome/browser/chrome_browser_interface_binders.cc b/chrome/browser/chrome_browser_interface_binders.cc index 50e0249..1623473 100644 --- a/chrome/browser/chrome_browser_interface_binders.cc +++ b/chrome/browser/chrome_browser_interface_binders.cc
@@ -39,7 +39,6 @@ #include "chrome/browser/ui/side_panel/companion/companion_utils.h" #include "chrome/browser/ui/ui_features.h" #include "chrome/browser/ui/web_applications/draggable_region_host_impl.h" -#include "chrome/browser/ui/web_applications/sub_apps_service_impl.h" #include "chrome/browser/ui/webui/browsing_topics/browsing_topics_internals_ui.h" #include "chrome/browser/ui/webui/engagement/site_engagement_ui.h" #include "chrome/browser/ui/webui/internals/internals_ui.h" @@ -220,10 +219,12 @@ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ BUILDFLAG(IS_CHROMEOS) +#include "chrome/browser/ui/web_applications/sub_apps_service_impl.h" #include "chrome/browser/ui/webui/discards/discards.mojom.h" #include "chrome/browser/ui/webui/discards/discards_ui.h" #include "chrome/browser/ui/webui/discards/site_data.mojom.h" -#endif +#endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || + // BUILDFLAG(IS_CHROMEOS) #if !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_ANDROID) #include "chrome/browser/ui/webui/app_home/app_home.mojom.h" @@ -973,8 +974,8 @@ } #endif -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ + BUILDFLAG(IS_CHROMEOS) if (base::FeatureList::IsEnabled(blink::features::kDesktopPWAsSubApps) && !render_frame_host->GetParentOrOuterDocument()) { // The service binder will reject non-primary main frames, but we still need @@ -983,7 +984,8 @@ map->Add<blink::mojom::SubAppsService>( base::BindRepeating(&web_app::SubAppsServiceImpl::CreateIfAllowed)); } -#endif +#endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || + // BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) if (features::IsPdfOcrEnabled()) {
diff --git a/chrome/browser/chromeos/extensions/login_screen/login/cleanup/web_app_cleanup_handler_browsertest.cc b/chrome/browser/chromeos/extensions/login_screen/login/cleanup/web_app_cleanup_handler_browsertest.cc index 6e7858c3..6170057 100644 --- a/chrome/browser/chromeos/extensions/login_screen/login/cleanup/web_app_cleanup_handler_browsertest.cc +++ b/chrome/browser/chromeos/extensions/login_screen/login/cleanup/web_app_cleanup_handler_browsertest.cc
@@ -17,13 +17,13 @@ #include "chrome/browser/web_applications/test/web_app_test_observers.h" #include "chrome/browser/web_applications/web_app.h" #include "chrome/browser/web_applications/web_app_helpers.h" -#include "chrome/browser/web_applications/web_app_id.h" #include "chrome/browser/web_applications/web_app_install_info.h" #include "chrome/browser/web_applications/web_app_provider.h" #include "chrome/browser/web_applications/web_app_registrar.h" #include "chrome/common/pref_names.h" #include "components/prefs/scoped_user_pref_update.h" #include "components/webapps/browser/installable/installable_metrics.h" +#include "components/webapps/common/web_app_id.h" #include "content/public/test/browser_test.h" #include "url/gurl.h" @@ -54,10 +54,10 @@ PreinstalledWebAppManager::SkipStartupForTesting()) {} ~WebAppCleanupHandlerBrowserTest() override = default; - AppId InstallWebApp(std::u16string title, - GURL start_url, - GURL install_url, - webapps::WebappInstallSource install_source) { + webapps::AppId InstallWebApp(std::u16string title, + GURL start_url, + GURL install_url, + webapps::WebappInstallSource install_source) { auto app_info = std::make_unique<WebAppInstallInfo>( GenerateManifestIdFromStartUrlOnly(start_url)); app_info->title = title; @@ -68,7 +68,7 @@ install_source); } - AppId InstallWebAppFromPolicy(const std::string& install_url) { + webapps::AppId InstallWebAppFromPolicy(const std::string& install_url) { WebAppTestInstallWithOsHooksObserver observer(profile()); observer.BeginListening(); { @@ -76,7 +76,7 @@ prefs::kWebAppInstallForceList); update->Append(base::Value::Dict().Set(web_app::kUrlKey, install_url)); } - AppId app_id = observer.Wait(); + webapps::AppId app_id = observer.Wait(); return app_id; } @@ -88,10 +88,10 @@ IN_PROC_BROWSER_TEST_F(WebAppCleanupHandlerBrowserTest, NoUserInstalledWebApps) { - AppId app_id1 = + webapps::AppId app_id1 = InstallWebApp(kApp1Title, GURL(kApp1StartURL), GURL(kApp1InstallURL), webapps::WebappInstallSource::EXTERNAL_DEFAULT); - AppId app_id2 = InstallWebAppFromPolicy(kApp2InstallURL); + webapps::AppId app_id2 = InstallWebAppFromPolicy(kApp2InstallURL); EXPECT_TRUE(registrar_unsafe().IsInstalled(app_id1)); EXPECT_TRUE(registrar_unsafe().IsInstalled(app_id2)); @@ -106,16 +106,16 @@ IN_PROC_BROWSER_TEST_F(WebAppCleanupHandlerBrowserTest, UninstallsUserInstalledWebApps) { - AppId app_id1 = + webapps::AppId app_id1 = InstallWebApp(kApp1Title, GURL(kApp1StartURL), GURL(kApp1InstallURL), webapps::WebappInstallSource::EXTERNAL_DEFAULT); - AppId app_id2 = InstallWebAppFromPolicy(kApp2InstallURL); + webapps::AppId app_id2 = InstallWebAppFromPolicy(kApp2InstallURL); // User-installed apps. - AppId app_id3 = + webapps::AppId app_id3 = InstallWebApp(kApp3Title, GURL(kApp3StartURL), GURL(kApp3InstallURL), webapps::WebappInstallSource::AUTOMATIC_PROMPT_BROWSER_TAB); - AppId app_id4 = + webapps::AppId app_id4 = InstallWebApp(kApp4Title, GURL(kApp4StartURL), GURL(kApp4InstallURL), webapps::WebappInstallSource::SYNC); @@ -136,20 +136,20 @@ IN_PROC_BROWSER_TEST_F(WebAppCleanupHandlerBrowserTest, DoesNotUninstallUserAndPolicyInstalledApp) { - AppId app_id1 = + webapps::AppId app_id1 = InstallWebApp(kApp1Title, GURL(kApp1StartURL), GURL(kApp1InstallURL), webapps::WebappInstallSource::EXTERNAL_DEFAULT); - AppId app_id2 = InstallWebAppFromPolicy(kApp2InstallURL); + webapps::AppId app_id2 = InstallWebAppFromPolicy(kApp2InstallURL); // App that is both installed by the user and by policy. - AppId app_id3 = + webapps::AppId app_id3 = InstallWebApp(kApp3Title, GURL(kApp3InstallURL), GURL(kApp3InstallURL), webapps::WebappInstallSource::SYNC); - AppId policy_app_id = InstallWebAppFromPolicy(kApp3InstallURL); + webapps::AppId policy_app_id = InstallWebAppFromPolicy(kApp3InstallURL); EXPECT_EQ(policy_app_id, app_id3); // User-installed app. - AppId app_id4 = + webapps::AppId app_id4 = InstallWebApp(kApp4Title, GURL(kApp4StartURL), GURL(kApp4InstallURL), webapps::WebappInstallSource::AUTOMATIC_PROMPT_BROWSER_TAB);
diff --git a/chrome/browser/component_updater/tpcd_metadata_component_installer.cc b/chrome/browser/component_updater/tpcd_metadata_component_installer.cc index f745d6a..2ee3cb5 100644 --- a/chrome/browser/component_updater/tpcd_metadata_component_installer.cc +++ b/chrome/browser/component_updater/tpcd_metadata_component_installer.cc
@@ -9,11 +9,13 @@ #include "base/files/file_util.h" #include "base/functional/bind.h" #include "base/logging.h" +#include "base/metrics/histogram_functions.h" #include "base/path_service.h" #include "base/task/task_traits.h" #include "base/task/thread_pool.h" #include "base/version.h" #include "components/component_updater/component_updater_service.h" +#include "components/content_settings/core/common/content_settings_pattern.h" #include "components/tpcd/metadata/parser.h" #include "content/public/browser/browser_thread.h" #include "net/base/features.h" @@ -108,24 +110,49 @@ } } +void WriteMetrics(TpcdMetadataInstallationResult result) { + base::UmaHistogramEnumeration( + "Navigation.TpcdMitigations.MetadataInstallationResult", result); +} + // Called during startup and installation before ComponentReady(). bool TpcdMetadataComponentInstaller::VerifyInstallation( const base::Value::Dict& manifest, const base::FilePath& install_dir) const { if (!base::PathExists(GetComponentPath(install_dir))) { + WriteMetrics(TpcdMetadataInstallationResult::kMissingMetadataFile); return false; } std::string contents; if (!base::ReadFileToString(GetComponentPath(install_dir), &contents)) { + WriteMetrics(TpcdMetadataInstallationResult::kReadingMetadataFileFailed); return false; } tpcd::metadata::Metadata metadata; if (!metadata.ParseFromString(contents)) { + WriteMetrics(TpcdMetadataInstallationResult::kParsingToProtoFailed); return false; } + for (const auto& me : metadata.metadata_entries()) { + if (!me.has_primary_pattern_spec() || + !ContentSettingsPattern::FromString(me.primary_pattern_spec()) + .IsValid()) { + WriteMetrics(TpcdMetadataInstallationResult::kErroneousSpec); + return false; + } + + if (!me.has_secondary_pattern_spec() || + !ContentSettingsPattern::FromString(me.secondary_pattern_spec()) + .IsValid()) { + WriteMetrics(TpcdMetadataInstallationResult::kErroneousSpec); + return false; + } + } + + WriteMetrics(TpcdMetadataInstallationResult::kSuccessful); return true; }
diff --git a/chrome/browser/component_updater/tpcd_metadata_component_installer.h b/chrome/browser/component_updater/tpcd_metadata_component_installer.h index d86d6507..af32111 100644 --- a/chrome/browser/component_updater/tpcd_metadata_component_installer.h +++ b/chrome/browser/component_updater/tpcd_metadata_component_installer.h
@@ -17,6 +17,22 @@ } // namespace base namespace component_updater { +// These values are persisted to logs. Entries should not be renumbered and +// numeric values should never be reused. +enum class TpcdMetadataInstallationResult { + // The metadata component was successfully . + kSuccessful = 0, + // The component file wasn't present. + kMissingMetadataFile = 1, + // Reading from the component file failed. + kReadingMetadataFileFailed = 2, + // The raw metadata string was unable to be parsed into the proto. + kParsingToProtoFailed = 3, + // One or more of the specs are erroneous or missing. + kErroneousSpec = 4, + kMaxValue = kErroneousSpec, +}; + class TpcdMetadataComponentInstaller : public ComponentInstallerPolicy { public: using OnTpcdMetadataComponentReadyCallback =
diff --git a/chrome/browser/component_updater/tpcd_metadata_component_installer_unittest.cc b/chrome/browser/component_updater/tpcd_metadata_component_installer_unittest.cc index 8de0f7f..77a55bd 100644 --- a/chrome/browser/component_updater/tpcd_metadata_component_installer_unittest.cc +++ b/chrome/browser/component_updater/tpcd_metadata_component_installer_unittest.cc
@@ -10,6 +10,7 @@ #include "base/files/scoped_temp_dir.h" #include "base/notreached.h" #include "base/test/bind.h" +#include "base/test/metrics/histogram_tester.h" #include "base/test/scoped_feature_list.h" #include "components/component_updater/mock_component_updater_service.h" #include "components/tpcd/metadata/parser_test_helper.h" @@ -24,6 +25,9 @@ const base::FilePath::CharType kComponentFileName[] = FILE_PATH_LITERAL("metadata.pb"); + +const char* kTpcdMetadataInstallationResult = + "Navigation.TpcdMitigations.MetadataInstallationResult"; } // namespace class TpcdMetadataComponentInstallerTest @@ -79,21 +83,88 @@ TEST_P(TpcdMetadataComponentInstallerTest, VerifyInstallation_InvalidInstallDir) { + base::HistogramTester histogram_tester; + EXPECT_FALSE(policy()->VerifyInstallation( base::Value::Dict(), install_dir().Append(FILE_PATH_LITERAL("x")))); + + histogram_tester.ExpectBucketCount( + kTpcdMetadataInstallationResult, + TpcdMetadataInstallationResult::kMissingMetadataFile, 1); } TEST_P(TpcdMetadataComponentInstallerTest, VerifyInstallation_RejectsMissingFile) { + base::HistogramTester histogram_tester; + EXPECT_FALSE( policy()->VerifyInstallation(base::Value::Dict(), install_dir())); + + histogram_tester.ExpectBucketCount( + kTpcdMetadataInstallationResult, + TpcdMetadataInstallationResult::kMissingMetadataFile, 1); } TEST_P(TpcdMetadataComponentInstallerTest, VerifyInstallation_RejectsNotProtoFile) { ExecFakeComponentInstallation("clearly not a proto"); + + base::HistogramTester histogram_tester; EXPECT_FALSE( policy()->VerifyInstallation(base::Value::Dict(), install_dir())); + histogram_tester.ExpectBucketCount( + kTpcdMetadataInstallationResult, + TpcdMetadataInstallationResult::kParsingToProtoFailed, 1); +} + +TEST_P(TpcdMetadataComponentInstallerTest, + FeatureEnabled_ComponentReady_ErroneousPrimarySpec) { + if (!GetParam()) { + GTEST_SKIP_("Reason: Test parameter instance N/A"); + } + + const std::string primary_pattern_spec = "[*]bar.com"; + const std::string secondary_pattern_spec = "[*.]foo.com"; + + std::vector<tpcd::metadata::MetadataPair> metadata_pairs; + metadata_pairs.emplace_back(primary_pattern_spec, secondary_pattern_spec); + tpcd::metadata::Metadata metadata = + tpcd::metadata::MakeMetadataProtoFromVectorOfPair(metadata_pairs); + ASSERT_EQ(metadata.metadata_entries_size(), 1); + + ExecFakeComponentInstallation(metadata.SerializeAsString()); + + base::HistogramTester histogram_tester; + ASSERT_FALSE( + policy()->VerifyInstallation(base::Value::Dict(), install_dir())); + histogram_tester.ExpectBucketCount( + kTpcdMetadataInstallationResult, + TpcdMetadataInstallationResult::kErroneousSpec, 1); +} + +TEST_P(TpcdMetadataComponentInstallerTest, + FeatureEnabled_ComponentReady_ErroneousSecondarySpec) { + if (!GetParam()) { + GTEST_SKIP_("Reason: Test parameter instance N/A"); + } + + const std::string primary_pattern_spec = "[*.]bar.com"; + const std::string secondary_pattern_spec = "[*]foo.com"; + + std::vector<tpcd::metadata::MetadataPair> metadata_pairs; + metadata_pairs.emplace_back(primary_pattern_spec, secondary_pattern_spec); + tpcd::metadata::Metadata metadata = + tpcd::metadata::MakeMetadataProtoFromVectorOfPair(metadata_pairs); + ASSERT_EQ(metadata.metadata_entries_size(), 1); + + ExecFakeComponentInstallation(metadata.SerializeAsString()); + + base::HistogramTester histogram_tester; + ASSERT_FALSE( + policy()->VerifyInstallation(base::Value::Dict(), install_dir())); + histogram_tester.ExpectBucketCount( + kTpcdMetadataInstallationResult, + TpcdMetadataInstallationResult::kErroneousSpec, 1); } TEST_P(TpcdMetadataComponentInstallerTest, @@ -121,7 +192,13 @@ EXPECT_EQ(raw_metadata, metadata.SerializeAsString()); run_loop.Quit(); })); + + base::HistogramTester histogram_tester; ASSERT_TRUE(policy->VerifyInstallation(base::Value::Dict(), install_dir())); + histogram_tester.ExpectBucketCount( + kTpcdMetadataInstallationResult, + TpcdMetadataInstallationResult::kSuccessful, 1); + policy->ComponentReady(base::Version(), install_dir(), base::Value::Dict()); run_loop.Run(); @@ -150,7 +227,13 @@ std::make_unique<TpcdMetadataComponentInstaller>( base::BindLambdaForTesting( [&](std::string raw_metadata) { NOTREACHED_NORETURN(); })); + + base::HistogramTester histogram_tester; ASSERT_TRUE(policy->VerifyInstallation(base::Value::Dict(), install_dir())); + histogram_tester.ExpectBucketCount( + kTpcdMetadataInstallationResult, + TpcdMetadataInstallationResult::kSuccessful, 1); + policy->ComponentReady(base::Version(), install_dir(), base::Value::Dict()); run_loop.RunUntilIdle();
diff --git a/chrome/browser/extensions/api/printing/print_job_submitter.cc b/chrome/browser/extensions/api/printing/print_job_submitter.cc index a4b5ca08..9fcbaaa 100644 --- a/chrome/browser/extensions/api/printing/print_job_submitter.cc +++ b/chrome/browser/extensions/api/printing/print_job_submitter.cc
@@ -11,28 +11,23 @@ #include "base/containers/contains.h" #include "base/functional/bind.h" #include "base/functional/callback.h" +#include "base/functional/callback_helpers.h" #include "base/strings/utf_string_conversions.h" #include "base/task/sequenced_task_runner.h" #include "base/values.h" #include "chrome/browser/extensions/api/printing/print_job_controller.h" #include "chrome/browser/extensions/api/printing/printing_api_utils.h" -#include "chrome/browser/pdf/pdf_pref_names.h" -#include "chrome/browser/printing/printing_service.h" +#include "chrome/browser/printing/pdf_blob_data_flattener.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/extensions/extensions_dialogs.h" #include "chrome/common/pref_names.h" -#include "chrome/services/printing/public/mojom/pdf_flattener.mojom.h" -#include "chrome/services/printing/public/mojom/printing_service.mojom.h" #include "chromeos/crosapi/mojom/local_printer.mojom.h" -#include "chromeos/printing/printer_configuration.h" #include "components/prefs/pref_service.h" #include "content/public/browser/browser_context.h" #include "content/public/browser/browser_thread.h" -#include "extensions/browser/blob_reader.h" #include "extensions/browser/extension_registry.h" #include "extensions/browser/image_loader.h" #include "extensions/common/extension.h" -#include "printing/backend/print_backend.h" #include "printing/metafile_skia.h" #include "printing/print_settings.h" #include "printing/printing_utils.h" @@ -57,11 +52,6 @@ constexpr int kIconSize = 64; -// We want to have an ability to disable PDF flattening for unit tests as -// printing::mojom::PdfFlattener requires real browser instance to be able to -// handle requests. -bool g_disable_pdf_flattening_for_testing = false; - // There is no easy way to interact with UI dialogs, so we want to have an // ability to skip this stage for browser tests. bool g_skip_confirmation_dialog_for_testing = false; @@ -84,23 +74,17 @@ gfx::NativeWindow native_window, content::BrowserContext* browser_context, PrintJobController* print_job_controller, - mojo::Remote<printing::mojom::PdfFlattener>* pdf_flattener, + printing::PdfBlobDataFlattener* pdf_blob_data_flattener, scoped_refptr<const extensions::Extension> extension, api::printing::SubmitJobRequest request, -#if BUILDFLAG(IS_CHROMEOS_LACROS) - int local_printer_version, -#endif crosapi::mojom::LocalPrinter* local_printer, SubmitJobCallback callback) : native_window_(native_window), browser_context_(browser_context), print_job_controller_(print_job_controller), - pdf_flattener_(pdf_flattener), + pdf_blob_data_flattener_(*pdf_blob_data_flattener), extension_(extension), request_(std::move(request)), -#if BUILDFLAG(IS_CHROMEOS_LACROS) - local_printer_version_(local_printer_version), -#endif local_printer_(local_printer), callback_(std::move(callback)) { DCHECK(extension); @@ -119,10 +103,9 @@ DCHECK_CURRENTLY_ON(content::BrowserThread::UI); DCHECK(submitter->callback_); PrintJobSubmitter* ptr = submitter.get(); - ptr->callback_ = - std::move(ptr->callback_) - .Then(base::BindOnce([](std::unique_ptr<PrintJobSubmitter>) {}, - std::move(submitter))); + ptr->callback_ = std::move(ptr->callback_) + .Then(base::OnceClosure( + base::DoNothingWithBoundArgs(std::move(submitter)))); ptr->Start(); } @@ -184,67 +167,21 @@ } void PrintJobSubmitter::ReadDocumentData() { - DCHECK(request_.document_blob_uuid); - BlobReader::Read( + CHECK(request_.document_blob_uuid); + pdf_blob_data_flattener_->ReadAndFlattenPdf( browser_context_->GetBlobRemote(*request_.document_blob_uuid), - base::BindOnce(&PrintJobSubmitter::OnDocumentDataRead, + base::BindOnce(&PrintJobSubmitter::OnPdfReadAndFlattened, weak_ptr_factory_.GetWeakPtr())); } -void PrintJobSubmitter::OnDocumentDataRead(std::unique_ptr<std::string> data, - int64_t total_blob_length) { - if (!data || !printing::LooksLikePdf(*data)) { +void PrintJobSubmitter::OnPdfReadAndFlattened( + std::unique_ptr<printing::MetafileSkia> flattened_pdf) { + if (!flattened_pdf) { FireErrorCallback(kInvalidData); return; } - base::MappedReadOnlyRegion memory = - base::ReadOnlySharedMemoryRegion::Create(data->length()); - if (!memory.IsValid()) { - FireErrorCallback(kInvalidData); - return; - } - memcpy(memory.mapping.memory(), data->data(), data->length()); - - if (g_disable_pdf_flattening_for_testing) { - OnPdfFlattened(std::move(memory.region)); - return; - } - - if (!pdf_flattener_->is_bound()) { - GetPrintingService()->BindPdfFlattener( - pdf_flattener_->BindNewPipeAndPassReceiver()); - pdf_flattener_->set_disconnect_handler( - base::BindOnce(&PrintJobSubmitter::OnPdfFlattenerDisconnected, - weak_ptr_factory_.GetWeakPtr())); - const PrefService* prefs = - Profile::FromBrowserContext(browser_context_)->GetPrefs(); - if (prefs && - prefs->IsManagedPreference(prefs::kPdfUseSkiaRendererEnabled)) { - (*pdf_flattener_) - ->SetUseSkiaRendererPolicy( - prefs->GetBoolean(prefs::kPdfUseSkiaRendererEnabled)); - } - } - (*pdf_flattener_) - ->FlattenPdf(std::move(memory.region), - base::BindOnce(&PrintJobSubmitter::OnPdfFlattened, - weak_ptr_factory_.GetWeakPtr())); -} - -void PrintJobSubmitter::OnPdfFlattenerDisconnected() { - FireErrorCallback(kInvalidData); -} - -void PrintJobSubmitter::OnPdfFlattened( - base::ReadOnlySharedMemoryRegion flattened_pdf) { - auto mapping = flattened_pdf.Map(); - if (!mapping.IsValid()) { - FireErrorCallback(kInvalidData); - return; - } - - flattened_pdf_mapping_ = std::move(mapping); + flattened_pdf_ = std::move(flattened_pdf); // Directly submit the job if the extension is allowed. if (!IsUserConfirmationRequired(browser_context_, extension_->id())) { @@ -290,14 +227,12 @@ } void PrintJobSubmitter::StartPrintJob() { - DCHECK(extension_); - DCHECK(settings_); - auto metafile = std::make_unique<printing::MetafileSkia>(); - CHECK(metafile->InitFromData( - flattened_pdf_mapping_.GetMemoryAsSpan<const uint8_t>())); + CHECK(extension_); + CHECK(settings_); CHECK(!print_job_); + CHECK(flattened_pdf_); print_job_ = print_job_controller_->StartPrintJob( - extension_->id(), std::move(metafile), std::move(settings_)); + extension_->id(), std::move(flattened_pdf_), std::move(settings_)); print_job_->AddObserver(*this); } @@ -322,7 +257,7 @@ // static base::AutoReset<bool> PrintJobSubmitter::DisablePdfFlatteningForTesting() { - return base::AutoReset<bool>(&g_disable_pdf_flattening_for_testing, true); + return printing::PdfBlobDataFlattener::DisablePdfFlatteningForTesting(); } // static
diff --git a/chrome/browser/extensions/api/printing/print_job_submitter.h b/chrome/browser/extensions/api/printing/print_job_submitter.h index 9fa0b77..65b4f53 100644 --- a/chrome/browser/extensions/api/printing/print_job_submitter.h +++ b/chrome/browser/extensions/api/printing/print_job_submitter.h
@@ -11,37 +11,30 @@ #include "base/auto_reset.h" #include "base/functional/callback.h" #include "base/memory/raw_ptr.h" -#include "base/memory/read_only_shared_memory_region.h" +#include "base/memory/raw_ref.h" #include "base/memory/scoped_refptr.h" #include "base/memory/weak_ptr.h" -#include "build/chromeos_buildflags.h" #include "chrome/browser/printing/print_job.h" #include "chrome/common/extensions/api/printing.h" #include "chromeos/crosapi/mojom/local_printer.mojom-forward.h" -#include "mojo/public/cpp/bindings/remote.h" #include "third_party/abseil-cpp/absl/types/optional.h" #include "ui/gfx/native_widget_types.h" -namespace base { -class ReadOnlySharedMemoryRegion; -} // namespace base - namespace content { class BrowserContext; } // namespace content namespace gfx { class Image; -} +} // namespace gfx namespace views { class NativeWindowTracker; -} +} // namespace views namespace printing { -namespace mojom { -class PdfFlattener; -} // namespace mojom +class MetafileSkia; +class PdfBlobDataFlattener; class PrintedDocument; class PrintSettings; } // namespace printing @@ -67,12 +60,9 @@ PrintJobSubmitter(gfx::NativeWindow native_window, content::BrowserContext* browser_context, PrintJobController* print_job_controller, - mojo::Remote<printing::mojom::PdfFlattener>* pdf_flattener, + printing::PdfBlobDataFlattener* pdf_blob_data_flattener, scoped_refptr<const extensions::Extension> extension, api::printing::SubmitJobRequest request, -#if BUILDFLAG(IS_CHROMEOS_LACROS) - int local_printer_version, -#endif crosapi::mojom::LocalPrinter* local_printer, SubmitJobCallback callback); @@ -107,9 +97,8 @@ void OnDocumentDataRead(std::unique_ptr<std::string> data, int64_t total_blob_length); - void OnPdfFlattenerDisconnected(); - - void OnPdfFlattened(base::ReadOnlySharedMemoryRegion flattened_pdf); + void OnPdfReadAndFlattened( + std::unique_ptr<printing::MetafileSkia> flattened_pdf); void ShowPrintJobConfirmationDialog(const gfx::Image& extension_icon); @@ -127,7 +116,7 @@ // These objects are owned by PrintingAPIHandler. const raw_ptr<PrintJobController> print_job_controller_; - const raw_ptr<mojo::Remote<printing::mojom::PdfFlattener>> pdf_flattener_; + const raw_ref<printing::PdfBlobDataFlattener> pdf_blob_data_flattener_; // TODO(crbug.com/996785): Consider tracking extension being unloaded instead // of storing scoped_refptr. @@ -137,11 +126,9 @@ api::printing::SubmitJobRequest request_; std::unique_ptr<printing::PrintSettings> settings_; std::u16string printer_name_; - base::ReadOnlySharedMemoryMapping flattened_pdf_mapping_; -#if BUILDFLAG(IS_CHROMEOS_LACROS) - const int local_printer_version_; -#endif + std::unique_ptr<printing::MetafileSkia> flattened_pdf_; + const raw_ptr<crosapi::mojom::LocalPrinter> local_printer_; SubmitJobCallback callback_; base::WeakPtrFactory<PrintJobSubmitter> weak_ptr_factory_{this};
diff --git a/chrome/browser/extensions/api/printing/printing_api_handler.cc b/chrome/browser/extensions/api/printing/printing_api_handler.cc index e1344d5e..31257e2 100644 --- a/chrome/browser/extensions/api/printing/printing_api_handler.cc +++ b/chrome/browser/extensions/api/printing/printing_api_handler.cc
@@ -25,6 +25,7 @@ #include "chrome/browser/extensions/api/printing/print_job_controller.h" #include "chrome/browser/extensions/api/printing/print_job_submitter.h" #include "chrome/browser/extensions/api/printing/printing_api_utils.h" +#include "chrome/browser/printing/pdf_blob_data_flattener.h" #include "chrome/browser/printing/print_job.h" #include "chrome/browser/printing/print_preview_sticky_settings.h" #include "chrome/browser/profiles/profile.h" @@ -37,7 +38,6 @@ #include "content/public/browser/browser_thread.h" #include "extensions/browser/event_router.h" #include "extensions/browser/extension_registry.h" -#include "printing/backend/print_backend.h" #include "printing/print_settings.h" #include "printing/printed_document.h" @@ -121,6 +121,8 @@ extension_registry_(extension_registry), print_job_controller_(std::move(print_job_controller)), cups_wrapper_(std::move(cups_wrapper)), + pdf_blob_data_flattener_(std::make_unique<printing::PdfBlobDataFlattener>( + Profile::FromBrowserContext(browser_context))), local_printer_(local_printer) {} PrintingAPIHandler::~PrintingAPIHandler() = default; @@ -162,11 +164,8 @@ // member variables. PrintJobSubmitter::Run(std::make_unique<PrintJobSubmitter>( native_window, browser_context_, print_job_controller_.get(), - &pdf_flattener_, std::move(extension), std::move(params->request), -#if BUILDFLAG(IS_CHROMEOS_LACROS) - local_printer_version_, -#endif - local_printer_, + pdf_blob_data_flattener_.get(), std::move(extension), + std::move(params->request), local_printer_, base::BindOnce(&PrintingAPIHandler::OnPrintJobSubmitted, weak_ptr_factory_.GetWeakPtr(), std::move(callback)))); }
diff --git a/chrome/browser/extensions/api/printing/printing_api_handler.h b/chrome/browser/extensions/api/printing/printing_api_handler.h index 53d5d1d4..f07c9fd 100644 --- a/chrome/browser/extensions/api/printing/printing_api_handler.h +++ b/chrome/browser/extensions/api/printing/printing_api_handler.h
@@ -12,15 +12,12 @@ #include "base/functional/callback.h" #include "base/memory/raw_ptr.h" #include "base/memory/weak_ptr.h" -#include "base/task/sequenced_task_runner.h" #include "build/chromeos_buildflags.h" #include "chrome/common/extensions/api/printing.h" -#include "chrome/services/printing/public/mojom/pdf_flattener.mojom.h" #include "chromeos/crosapi/mojom/local_printer.mojom.h" #include "extensions/browser/browser_context_keyed_api_factory.h" #include "extensions/browser/event_router_factory.h" #include "mojo/public/cpp/bindings/receiver.h" -#include "mojo/public/cpp/bindings/remote.h" #include "third_party/abseil-cpp/absl/types/optional.h" #include "ui/gfx/native_widget_types.h" @@ -41,6 +38,7 @@ namespace printing { struct PrinterStatus; +class PdfBlobDataFlattener; class PrintJob; class PrintedDocument; } // namespace printing @@ -168,8 +166,8 @@ std::unique_ptr<PrintJobController> print_job_controller_; std::unique_ptr<chromeos::CupsWrapper> cups_wrapper_; - // Remote interface used to flatten a PDF. - mojo::Remote<printing::mojom::PdfFlattener> pdf_flattener_; + const std::unique_ptr<printing::PdfBlobDataFlattener> + pdf_blob_data_flattener_; // Stores mapping from job id to PrintJobInfo object. // This is needed to cancel print jobs.
diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json index 96d71ff2..84e5f2e 100644 --- a/chrome/browser/flag-metadata.json +++ b/chrome/browser/flag-metadata.json
@@ -3317,6 +3317,11 @@ "expiry_milestone": 123 }, { + "name": "enable-pip-tilt", + "owners": ["massan", "takise"], + "expiry_milestone": 124 + }, + { "name": "enable-pixel-canvas-recording", "owners": [ "malaykeshav", "oshima" ], "expiry_milestone": 116
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc index ef9bb838..c50f07e 100644 --- a/chrome/browser/flag_descriptions.cc +++ b/chrome/browser/flag_descriptions.cc
@@ -1337,6 +1337,11 @@ "Enables pinch gesture on existing PiP windows to move and " "resize them."; +const char kPipTiltName[] = "Enable tilt for PiP windows"; +const char kPipTiltDescription[] = + "Enables window tilting using pinch gesture on existing PiP windows. " + "This requires #enable-pip-pinch-to-resize to also be enabled."; + const char kPrivateNetworkAccessSendPreflightsName[] = "Send Private Network Access preflights"; const char kPrivateNetworkAccessSendPreflightsDescription[] =
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h index 832aa8f..b3ab396 100644 --- a/chrome/browser/flag_descriptions.h +++ b/chrome/browser/flag_descriptions.h
@@ -692,6 +692,9 @@ extern const char kPipPinchToResizeName[]; extern const char kPipPinchToResizeDescription[]; +extern const char kPipTiltName[]; +extern const char kPipTiltDescription[]; + extern const char kPrivateNetworkAccessSendPreflightsName[]; extern const char kPrivateNetworkAccessSendPreflightsDescription[];
diff --git a/chrome/browser/notifications/chrome_ash_message_center_client_browsertest.cc b/chrome/browser/notifications/chrome_ash_message_center_client_browsertest.cc index b701425..490d952 100644 --- a/chrome/browser/notifications/chrome_ash_message_center_client_browsertest.cc +++ b/chrome/browser/notifications/chrome_ash_message_center_client_browsertest.cc
@@ -12,9 +12,9 @@ #include "chrome/browser/notifications/notifier_settings_test_observer.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/web_applications/test/web_app_install_test_utils.h" -#include "chrome/browser/web_applications/web_app_id.h" #include "chrome/browser/web_applications/web_app_install_info.h" #include "chrome/test/base/in_process_browser_test.h" +#include "components/webapps/common/web_app_id.h" #include "content/public/test/browser_test.h" namespace { @@ -50,7 +50,7 @@ ash::NotifierSettingsController::Get()->GetNotifiers(); } - void SetNotifierEnabled(web_app::AppId app_id, bool enabled) { + void SetNotifierEnabled(webapps::AppId app_id, bool enabled) { ash::NotifierSettingsController::Get()->SetNotifierEnabled( message_center::NotifierId(message_center::NotifierType::APPLICATION, app_id), @@ -70,7 +70,7 @@ Profile* profile = browser()->profile(); // Install a PWA and wait for app service to see it. - web_app::AppId app_id = + webapps::AppId app_id = web_app::test::InstallWebApp(profile, std::move(web_app_install_info)); // Inform notifier controller it should begin observing |profile|'s' // AppRegistryCache.
diff --git a/chrome/browser/notifications/mac_notification_provider_factory.cc b/chrome/browser/notifications/mac_notification_provider_factory.cc index 7141c96..22fc3009 100644 --- a/chrome/browser/notifications/mac_notification_provider_factory.cc +++ b/chrome/browser/notifications/mac_notification_provider_factory.cc
@@ -57,7 +57,7 @@ MacNotificationProviderFactory::MacNotificationProviderFactory( mac_notifications::NotificationStyle notification_style, - const web_app::AppId& web_app_id) + const webapps::AppId& web_app_id) : notification_style_(notification_style), web_app_id_(web_app_id) { CHECK_NE( notification_style_ == mac_notifications::NotificationStyle::kAppShim,
diff --git a/chrome/browser/notifications/mac_notification_provider_factory.h b/chrome/browser/notifications/mac_notification_provider_factory.h index a529779c..1a24dae 100644 --- a/chrome/browser/notifications/mac_notification_provider_factory.h +++ b/chrome/browser/notifications/mac_notification_provider_factory.h
@@ -5,16 +5,16 @@ #ifndef CHROME_BROWSER_NOTIFICATIONS_MAC_NOTIFICATION_PROVIDER_FACTORY_H_ #define CHROME_BROWSER_NOTIFICATIONS_MAC_NOTIFICATION_PROVIDER_FACTORY_H_ -#include "chrome/browser/web_applications/web_app_id.h" #include "chrome/services/mac_notifications/public/cpp/notification_style.h" #include "chrome/services/mac_notifications/public/mojom/mac_notifications.mojom-forward.h" +#include "components/webapps/common/web_app_id.h" #include "mojo/public/cpp/bindings/remote.h" class MacNotificationProviderFactory { public: explicit MacNotificationProviderFactory( mac_notifications::NotificationStyle notification_style, - const web_app::AppId& web_app_id = {}); + const webapps::AppId& web_app_id = {}); MacNotificationProviderFactory(const MacNotificationProviderFactory&) = delete; MacNotificationProviderFactory& operator=( @@ -31,7 +31,7 @@ private: const mac_notifications::NotificationStyle notification_style_; - const web_app::AppId web_app_id_; + const webapps::AppId web_app_id_; }; #endif // CHROME_BROWSER_NOTIFICATIONS_MAC_NOTIFICATION_PROVIDER_FACTORY_H_
diff --git a/chrome/browser/notifications/notification_platform_bridge_mac.cc b/chrome/browser/notifications/notification_platform_bridge_mac.cc index 21daa99d..291ad5e 100644 --- a/chrome/browser/notifications/notification_platform_bridge_mac.cc +++ b/chrome/browser/notifications/notification_platform_bridge_mac.cc
@@ -47,7 +47,7 @@ std::make_unique<MacNotificationProviderFactory>( mac_notifications::NotificationStyle::kAlert)); auto create_dispatcher_for_web_app = - base::BindRepeating([](const web_app::AppId& web_app_id) + base::BindRepeating([](const webapps::AppId& web_app_id) -> std::unique_ptr<NotificationDispatcherMac> { return std::make_unique<NotificationDispatcherMojo>( std::make_unique<MacNotificationProviderFactory>(
diff --git a/chrome/browser/notifications/notification_platform_bridge_mac.h b/chrome/browser/notifications/notification_platform_bridge_mac.h index 0daa927..869ea80 100644 --- a/chrome/browser/notifications/notification_platform_bridge_mac.h +++ b/chrome/browser/notifications/notification_platform_bridge_mac.h
@@ -10,7 +10,7 @@ #include "chrome/browser/notifications/notification_common.h" #include "chrome/browser/notifications/notification_platform_bridge.h" -#include "chrome/browser/web_applications/web_app_id.h" +#include "components/webapps/common/web_app_id.h" class NotificationDispatcherMac; @@ -24,7 +24,7 @@ public: using WebAppDispatcherFactory = base::RepeatingCallback<std::unique_ptr<NotificationDispatcherMac>( - const web_app::AppId& web_app_id)>; + const webapps::AppId& web_app_id)>; NotificationPlatformBridgeMac( std::unique_ptr<NotificationDispatcherMac> banner_dispatcher, @@ -67,7 +67,7 @@ // The objects in charge of dispatching per-app notifications. // TODO(https://crbug.com/938661): Implement some logic for cleaning up no // longer needed dispatchers. - std::map<web_app::AppId, std::unique_ptr<NotificationDispatcherMac>> + std::map<webapps::AppId, std::unique_ptr<NotificationDispatcherMac>> app_specific_dispatchers_; WebAppDispatcherFactory web_app_dispatcher_factory_; };
diff --git a/chrome/browser/notifications/notification_platform_bridge_mac_unittest.cc b/chrome/browser/notifications/notification_platform_bridge_mac_unittest.cc index e2b21b5..b2b9e55 100644 --- a/chrome/browser/notifications/notification_platform_bridge_mac_unittest.cc +++ b/chrome/browser/notifications/notification_platform_bridge_mac_unittest.cc
@@ -135,7 +135,7 @@ NotificationPlatformBridgeMac::WebAppDispatcherFactory CreateWebAppDispatcherFactory() { return base::BindLambdaForTesting( - [&](const web_app::AppId& web_app_id) + [&](const webapps::AppId& web_app_id) -> std::unique_ptr<NotificationDispatcherMac> { auto dispatcher = std::make_unique<StubNotificationDispatcherMac>(); web_app_dispatchers_[web_app_id] = dispatcher->AsWeakPtr(); @@ -152,7 +152,7 @@ } StubNotificationDispatcherMac* dispatcher_for_web_app( - const web_app::AppId& web_app_id) { + const webapps::AppId& web_app_id) { auto it = web_app_dispatchers_.find(web_app_id); if (it == web_app_dispatchers_.end()) { return nullptr; @@ -168,7 +168,7 @@ raw_ptr<TestingProfile> profile_ = nullptr; base::WeakPtr<StubNotificationDispatcherMac> banner_dispatcher_; base::WeakPtr<StubNotificationDispatcherMac> alert_dispatcher_; - std::map<web_app::AppId, base::WeakPtr<StubNotificationDispatcherMac>> + std::map<webapps::AppId, base::WeakPtr<StubNotificationDispatcherMac>> web_app_dispatchers_; };
diff --git a/chrome/browser/notifications/platform_notification_service_impl.cc b/chrome/browser/notifications/platform_notification_service_impl.cc index 21683b9..44bfde5 100644 --- a/chrome/browser/notifications/platform_notification_service_impl.cc +++ b/chrome/browser/notifications/platform_notification_service_impl.cc
@@ -464,7 +464,7 @@ // triggered from workers (where `web_app_hint_url` is always blank) but also // for persistent notifications triggered from web pages (where the page url // might be a better "hint" than the service worker scope). - absl::optional<web_app::AppId> web_app_id = FindWebAppId(web_app_hint_url); + absl::optional<webapps::AppId> web_app_id = FindWebAppId(web_app_hint_url); absl::optional<WebAppIconAndTitle> web_app_icon_and_title; #if BUILDFLAG(IS_CHROMEOS) @@ -594,7 +594,7 @@ return std::u16string(); } -absl::optional<web_app::AppId> PlatformNotificationServiceImpl::FindWebAppId( +absl::optional<webapps::AppId> PlatformNotificationServiceImpl::FindWebAppId( const GURL& web_app_hint_url) const { #if !BUILDFLAG(IS_ANDROID) web_app::WebAppProvider* web_app_provider = @@ -615,7 +615,7 @@ web_app::WebAppProvider* web_app_provider = web_app::WebAppProvider::GetForLocalAppsUnchecked(profile_); if (web_app_provider) { - const absl::optional<web_app::AppId> app_id = + const absl::optional<webapps::AppId> app_id = web_app_provider->registrar_unsafe().FindAppWithUrlInScope( web_app_hint_url); if (app_id) { @@ -647,7 +647,7 @@ return false; } - const absl::optional<web_app::AppId> app_id = + const absl::optional<webapps::AppId> app_id = web_app_provider->registrar_unsafe().FindAppWithUrlInScope(web_app_url); return app_id.has_value() && web_app_provider->registrar_unsafe().IsActivelyInstalled(
diff --git a/chrome/browser/notifications/platform_notification_service_impl.h b/chrome/browser/notifications/platform_notification_service_impl.h index 4ffd662..448d286 100644 --- a/chrome/browser/notifications/platform_notification_service_impl.h +++ b/chrome/browser/notifications/platform_notification_service_impl.h
@@ -17,10 +17,10 @@ #include "chrome/browser/notifications/notification_common.h" #include "chrome/browser/notifications/notification_trigger_scheduler.h" #include "chrome/browser/profiles/profile.h" -#include "chrome/browser/web_applications/web_app_id.h" #include "chrome/common/buildflags.h" #include "components/content_settings/core/browser/content_settings_observer.h" #include "components/keyed_service/core/keyed_service.h" +#include "components/webapps/common/web_app_id.h" #include "content/public/browser/platform_notification_service.h" #include "services/metrics/public/cpp/ukm_source_id.h" #include "third_party/abseil-cpp/absl/types/optional.h" @@ -139,7 +139,7 @@ // Finds the AppId associated with |web_app_hint_url| when this is part of // an installed experience, and the notification can be attributed as such. - absl::optional<web_app::AppId> FindWebAppId( + absl::optional<webapps::AppId> FindWebAppId( const GURL& web_app_hint_url) const; // Finds the icon and title associated with |web_app_id| when this
diff --git a/chrome/browser/notifications/platform_notification_service_interactive_uitest.cc b/chrome/browser/notifications/platform_notification_service_interactive_uitest.cc index 100722f1..4a27646 100644 --- a/chrome/browser/notifications/platform_notification_service_interactive_uitest.cc +++ b/chrome/browser/notifications/platform_notification_service_interactive_uitest.cc
@@ -1117,7 +1117,7 @@ // Install the web app. const GURL web_app_url = TestPageUrl(); - const web_app::AppId app_id = web_app::test::InstallDummyWebApp( + const webapps::AppId app_id = web_app::test::InstallDummyWebApp( browser()->profile(), "Web App Title", web_app_url); EXPECT_EQ("ok", @@ -1195,7 +1195,7 @@ // Install the web app. const GURL web_app_url = TestPageUrl(); - const web_app::AppId app_id = web_app::test::InstallDummyWebApp( + const webapps::AppId app_id = web_app::test::InstallDummyWebApp( browser()->profile(), "Web App Title", web_app_url); EXPECT_EQ("ok", RunScript("DisplayIncomingCallNotification()"));
diff --git a/chrome/browser/notifications/platform_notification_service_unittest.cc b/chrome/browser/notifications/platform_notification_service_unittest.cc index fbf2f006..201851aa 100644 --- a/chrome/browser/notifications/platform_notification_service_unittest.cc +++ b/chrome/browser/notifications/platform_notification_service_unittest.cc
@@ -25,7 +25,6 @@ #include "chrome/browser/notifications/notification_display_service_tester.h" #include "chrome/browser/notifications/platform_notification_service_factory.h" #include "chrome/browser/notifications/platform_notification_service_impl.h" -#include "chrome/browser/web_applications/test/web_app_install_test_utils.h" #include "chrome/common/chrome_features.h" #include "chrome/test/base/testing_profile.h" #include "components/history/core/browser/history_service.h" @@ -57,6 +56,7 @@ #if !BUILDFLAG(IS_ANDROID) #include "chrome/browser/web_applications/test/fake_web_app_provider.h" #include "chrome/browser/web_applications/test/web_app_icon_test_utils.h" +#include "chrome/browser/web_applications/test/web_app_install_test_utils.h" #include "chrome/browser/web_applications/test/web_app_test_utils.h" #include "chrome/browser/web_applications/web_app.h" #include "chrome/browser/web_applications/web_app_icon_generator.h" @@ -371,7 +371,7 @@ // installed web app for the provided URL. std::unique_ptr<web_app::WebApp> web_app = web_app::test::CreateWebApp(); const GURL installed_web_app_url = web_app->start_url(); - const web_app::AppId app_id = web_app->app_id(); + const webapps::AppId app_id = web_app->app_id(); web_app->SetName("Web App Title"); provider->GetRegistrarMutable().registry().emplace(app_id, @@ -435,9 +435,9 @@ const PlatformNotificationData kNotificationData = CreateDummyNotificationData(); - web_app::AppId installed_app_id; - web_app::AppId nested_installed_app_id; - web_app::AppId not_installed_app_id; + webapps::AppId installed_app_id; + webapps::AppId nested_installed_app_id; + webapps::AppId not_installed_app_id; }; TEST_F(PlatformNotificationServiceTest_WebApps, PopulateWebAppId_MatchesScope) { @@ -579,7 +579,7 @@ std::unique_ptr<web_app::WebApp> web_app = web_app::test::CreateWebApp(); const GURL web_app_url = web_app->start_url(); - const web_app::AppId app_id = web_app->app_id(); + const webapps::AppId app_id = web_app->app_id(); web_app->SetName("Web App Title"); IconManagerWriteGeneratedIcons(icon_manager, app_id, @@ -595,7 +595,7 @@ base::RunLoop run_loop; icon_manager.SetFaviconMonochromeReadCallbackForTesting( base::BindLambdaForTesting( - [&](const web_app::AppId& cached_app_id) { run_loop.Quit(); })); + [&](const webapps::AppId& cached_app_id) { run_loop.Quit(); })); icon_manager.Start(); run_loop.Run();
diff --git a/chrome/browser/optimization_guide/page_content_annotations_service_browsertest.cc b/chrome/browser/optimization_guide/page_content_annotations_service_browsertest.cc index 1a84ce7..75dd5ac 100644 --- a/chrome/browser/optimization_guide/page_content_annotations_service_browsertest.cc +++ b/chrome/browser/optimization_guide/page_content_annotations_service_browsertest.cc
@@ -586,7 +586,10 @@ // enabled. scoped_feature_list_.InitWithFeaturesAndParameters( {{features::kOptimizationHints, {}}, - {features::kRemotePageMetadata, {{"min_page_category_score", "80"}}}}, + {features::kRemotePageMetadata, + {{"min_page_category_score", "80"}, + {"supported_countries", "*"}, + {"supported_locales", "*"}}}}, /*disabled_features=*/{{features::kPageContentAnnotations}}); set_load_model_on_startup(false); } @@ -722,7 +725,8 @@ scoped_feature_list_.InitWithFeaturesAndParameters( {{features::kOptimizationHints, {}}, {features::kPageContentAnnotations, {}}, - {features::kPageContentAnnotationsPersistSalientImageMetadata, {}}}, + {features::kPageContentAnnotationsPersistSalientImageMetadata, + {{"supported_countries", "*"}, {"supported_locales", "*"}}}}, /*disabled_features=*/{}); set_load_model_on_startup(false); }
diff --git a/chrome/browser/optimization_guide/page_content_annotations_service_factory.cc b/chrome/browser/optimization_guide/page_content_annotations_service_factory.cc index 68a18ee4..ba3b81b 100644 --- a/chrome/browser/optimization_guide/page_content_annotations_service_factory.cc +++ b/chrome/browser/optimization_guide/page_content_annotations_service_factory.cc
@@ -30,6 +30,7 @@ #include "components/optimization_guide/content/browser/page_content_annotations_service.h" #include "components/optimization_guide/core/optimization_guide_features.h" #include "components/search_engines/template_url_service.h" +#include "components/variations/service/variations_service.h" #include "content/public/browser/browser_context.h" #include "content/public/browser/storage_partition.h" @@ -134,9 +135,14 @@ ZeroSuggestCacheService* zero_suggest_cache_service = ZeroSuggestCacheServiceFactory::GetForProfile(profile); if (optimization_guide_keyed_service && history_service) { + std::string country_code; + if (g_browser_process->variations_service()) { + country_code = + g_browser_process->variations_service()->GetStoredPermanentCountry(); + } return std::make_unique<optimization_guide::PageContentAnnotationsService>( std::make_unique<ChromeAutocompleteProviderClient>(profile), - g_browser_process->GetApplicationLocale(), + g_browser_process->GetApplicationLocale(), country_code, optimization_guide_keyed_service, history_service, template_url_service, zero_suggest_cache_service, proto_db_provider, profile_path, optimization_guide_keyed_service->GetOptimizationGuideLogger(),
diff --git a/chrome/browser/page_load_metrics/observers/preview_page_load_metrics_observer.cc b/chrome/browser/page_load_metrics/observers/preview_page_load_metrics_observer.cc index f255cb2..db0456e 100644 --- a/chrome/browser/page_load_metrics/observers/preview_page_load_metrics_observer.cc +++ b/chrome/browser/page_load_metrics/observers/preview_page_load_metrics_observer.cc
@@ -9,36 +9,6 @@ #include "components/page_load_metrics/browser/page_load_metrics_util.h" #include "content/public/browser/navigation_handle.h" -namespace { - -// These values are persisted to logs. Entries should not be renumbered and -// numeric values should never be reused. -// As we don't identify client redirect cases, kPassingVisit may be -// overestimated a little. -enum class PageVisitType { - kIndependentVisit = 0, - kOriginVisit = 1, - kPassingVisit = 2, - kTerminalVisit = 3, - kMaxValue = kTerminalVisit, -}; - -PageVisitType RecordPageVisitType( - const page_load_metrics::PageLoadMetricsObserverDelegate& delegate) { - PageVisitType type; - if (delegate.IsOriginVisit()) { - type = delegate.IsTerminalVisit() ? PageVisitType::kIndependentVisit - : PageVisitType::kOriginVisit; - } else { - type = delegate.IsTerminalVisit() ? PageVisitType::kTerminalVisit - : PageVisitType::kPassingVisit; - } - base::UmaHistogramEnumeration("PageLoad.Experimental.PageVisitType", type); - return type; -} - -} // namespace - PreviewPageLoadMetricsObserver::ObservePolicy PreviewPageLoadMetricsObserver::OnStart( content::NavigationHandle* navigation_handle, @@ -48,6 +18,8 @@ last_time_shown_ = navigation_handle->NavigationStart(); } currently_in_foreground_ = started_in_foreground; + is_history_navigation_ = + navigation_handle->GetPageTransition() & ui::PAGE_TRANSITION_FORWARD_BACK; return CONTINUE_OBSERVING; } @@ -63,6 +35,8 @@ PreviewPageLoadMetricsObserver::OnPrerenderStart( content::NavigationHandle* navigation_handle, const GURL& currently_committed_url) { + is_history_navigation_ = + navigation_handle->GetPageTransition() & ui::PAGE_TRANSITION_FORWARD_BACK; return CONTINUE_OBSERVING; } @@ -95,8 +69,27 @@ RecordMetrics(); } +PreviewPageLoadMetricsObserver::PageVisitType +PreviewPageLoadMetricsObserver::RecordPageVisitType() { + PageVisitType type; + const page_load_metrics::PageLoadMetricsObserverDelegate& delegate = + GetDelegate(); + + if (is_history_navigation_) { + type = PageVisitType::kHistoryVisit; + } else if (delegate.IsOriginVisit()) { + type = delegate.IsTerminalVisit() ? PageVisitType::kIndependentVisit + : PageVisitType::kOriginVisit; + } else { + type = delegate.IsTerminalVisit() ? PageVisitType::kTerminalVisit + : PageVisitType::kPassingVisit; + } + base::UmaHistogramEnumeration("PageLoad.Experimental.PageVisitType", type); + return type; +} + void PreviewPageLoadMetricsObserver::RecordMetrics() { - PageVisitType page_visit_type = RecordPageVisitType(GetDelegate()); + PageVisitType page_visit_type = RecordPageVisitType(); if (currently_in_foreground_ && !last_time_shown_.is_null()) { total_foreground_duration_ += base::TimeTicks::Now() - last_time_shown_; } @@ -124,5 +117,10 @@ "PageLoad.Experimental.TotalForegroundDuration.TerminalVisit", total_foreground_duration_); break; + case PageVisitType::kHistoryVisit: + PAGE_LOAD_LONG_HISTOGRAM( + "PageLoad.Experimental.TotalForegroundDuration.HistoryVisit", + total_foreground_duration_); + break; } }
diff --git a/chrome/browser/page_load_metrics/observers/preview_page_load_metrics_observer.h b/chrome/browser/page_load_metrics/observers/preview_page_load_metrics_observer.h index b2ba827..e1f5b61 100644 --- a/chrome/browser/page_load_metrics/observers/preview_page_load_metrics_observer.h +++ b/chrome/browser/page_load_metrics/observers/preview_page_load_metrics_observer.h
@@ -17,6 +17,19 @@ class PreviewPageLoadMetricsObserver : public page_load_metrics::PageLoadMetricsObserver { public: + // These values are persisted to logs. Entries should not be renumbered and + // numeric values should never be reused. + // As we don't identify client redirect cases, kPassingVisit may be + // overestimated a little. + enum class PageVisitType { + kIndependentVisit = 0, + kOriginVisit = 1, + kPassingVisit = 2, + kTerminalVisit = 3, + kHistoryVisit = 4, + kMaxValue = kHistoryVisit, + }; + PreviewPageLoadMetricsObserver() = default; PreviewPageLoadMetricsObserver(const PreviewPageLoadMetricsObserver&) = delete; @@ -42,9 +55,11 @@ const page_load_metrics::mojom::PageLoadTiming& timing) override; private: + PageVisitType RecordPageVisitType(); void RecordMetrics(); bool currently_in_foreground_ = false; + bool is_history_navigation_ = false; base::TimeTicks last_time_shown_; base::TimeDelta total_foreground_duration_; };
diff --git a/chrome/browser/page_load_metrics/observers/preview_page_load_metrics_observer_browsertest.cc b/chrome/browser/page_load_metrics/observers/preview_page_load_metrics_observer_browsertest.cc index f85f179..750d848 100644 --- a/chrome/browser/page_load_metrics/observers/preview_page_load_metrics_observer_browsertest.cc +++ b/chrome/browser/page_load_metrics/observers/preview_page_load_metrics_observer_browsertest.cc
@@ -6,8 +6,10 @@ #include "base/test/metrics/histogram_tester.h" #include "chrome/browser/ui/browser.h" +#include "chrome/browser/ui/tabs/tab_strip_model.h" #include "chrome/test/base/in_process_browser_test.h" #include "chrome/test/base/ui_test_utils.h" +#include "content/public/browser/back_forward_cache.h" #include "content/public/test/browser_test.h" #include "content/public/test/browser_test_utils.h" #include "net/dns/mock_host_resolver.h" @@ -38,14 +40,17 @@ } void NavigateToOriginPathFromRenderer(const std::string& path) { - ASSERT_TRUE(content::NavigateToURLFromRenderer(browser() - ->tab_strip_model() - ->GetActiveWebContents() - ->GetPrimaryMainFrame(), - GetOriginURL(path))); + ASSERT_TRUE(content::NavigateToURLFromRenderer( + GetWebContents()->GetPrimaryMainFrame(), GetOriginURL(path))); base::RunLoop().RunUntilIdle(); } + void NavigateBack() { + content::WebContents* web_contents = GetWebContents(); + web_contents->GetController().GoBack(); + content::WaitForLoadStop(web_contents); + } + void NavigateAway() { ASSERT_TRUE( ui_test_utils::NavigateToURL(browser(), GURL(url::kAboutBlankURL))); @@ -56,51 +61,173 @@ return embedded_test_server()->GetURL("origin.com", path); } + void DisableBackForwardCache() { + GetWebContents()->GetController().GetBackForwardCache().DisableForTesting( + content::BackForwardCache::TEST_REQUIRES_NO_CACHING); + } + base::HistogramTester& histogram_tester() { return *histogram_tester_; } private: + content::WebContents* GetWebContents() { + return browser()->tab_strip_model()->GetActiveWebContents(); + } + absl::optional<base::HistogramTester> histogram_tester_; }; IN_PROC_BROWSER_TEST_F(PreviewPageLoadMetricsObserverBrowserTest, - PageVisitType) { - // Constants defined in ukm_page_load_metrics_observer.cc. - const int kIndependentPageVisitType = 0; - const int kOriginPageVisitType = 1; - const int kPassingPageVisitType = 2; - const int kTerminalPageVisitType = 3; - + IndependentVisit) { // Disables BFCache to make the page lifecycle management easy in testing. - browser() - ->tab_strip_model() - ->GetActiveWebContents() - ->GetController() - .GetBackForwardCache() - .DisableForTesting(content::BackForwardCache::TEST_REQUIRES_NO_CACHING); + DisableBackForwardCache(); // Runs a single browser initiated navigation. NavigateToOriginPath("/title1.html"); NavigateAway(); - histogram_tester().ExpectUniqueSample("PageLoad.Experimental.PageVisitType", - kIndependentPageVisitType, 1); + histogram_tester().ExpectUniqueSample( + "PageLoad.Experimental.PageVisitType", + PreviewPageLoadMetricsObserver::PageVisitType::kIndependentVisit, 1); + histogram_tester().ExpectTotalCount( + "PageLoad.Experimental.TotalForegroundDuration.IndependentVisit", 1); + histogram_tester().ExpectTotalCount( + "PageLoad.Experimental.TotalForegroundDuration.AllVisit", 1); +} + +IN_PROC_BROWSER_TEST_F(PreviewPageLoadMetricsObserverBrowserTest, + SequentialVisits) { + // Disables BFCache to make the page lifecycle management easy in testing. + DisableBackForwardCache(); // Runs a series of navigation. NavigateToOriginPath("/title1.html"); NavigateToOriginPathFromRenderer("/title2.html"); - histogram_tester().ExpectBucketCount("PageLoad.Experimental.PageVisitType", - kOriginPageVisitType, 1); + histogram_tester().ExpectBucketCount( + "PageLoad.Experimental.PageVisitType", + PreviewPageLoadMetricsObserver::PageVisitType::kOriginVisit, 1); + histogram_tester().ExpectTotalCount( + "PageLoad.Experimental.TotalForegroundDuration.OriginVisit", 1); + histogram_tester().ExpectTotalCount( + "PageLoad.Experimental.TotalForegroundDuration.AllVisit", 1); NavigateToOriginPathFromRenderer("/title3.html"); - histogram_tester().ExpectBucketCount("PageLoad.Experimental.PageVisitType", - kPassingPageVisitType, 1); + histogram_tester().ExpectBucketCount( + "PageLoad.Experimental.PageVisitType", + PreviewPageLoadMetricsObserver::PageVisitType::kPassingVisit, 1); + histogram_tester().ExpectTotalCount( + "PageLoad.Experimental.TotalForegroundDuration.PassingVisit", 1); + histogram_tester().ExpectTotalCount( + "PageLoad.Experimental.TotalForegroundDuration.AllVisit", 2); NavigateAway(); - histogram_tester().ExpectBucketCount("PageLoad.Experimental.PageVisitType", - kTerminalPageVisitType, 1); + histogram_tester().ExpectBucketCount( + "PageLoad.Experimental.PageVisitType", + PreviewPageLoadMetricsObserver::PageVisitType::kTerminalVisit, 1); + histogram_tester().ExpectTotalCount( + "PageLoad.Experimental.TotalForegroundDuration.TerminalVisit", 1); + histogram_tester().ExpectTotalCount( + "PageLoad.Experimental.TotalForegroundDuration.AllVisit", 3); } -// TODO(b:299566150): Add more cases that have back navigation and branching. +IN_PROC_BROWSER_TEST_F(PreviewPageLoadMetricsObserverBrowserTest, + ComplexNavigationWithoutBFCache) { + // Disables BFCache to make the page lifecycle management easy in testing. + DisableBackForwardCache(); + + // Runs a series of navigation. + NavigateToOriginPath("/title1.html"); + NavigateToOriginPathFromRenderer("/title2.html"); + + histogram_tester().ExpectBucketCount( + "PageLoad.Experimental.PageVisitType", + PreviewPageLoadMetricsObserver::PageVisitType::kOriginVisit, 1); + histogram_tester().ExpectTotalCount( + "PageLoad.Experimental.TotalForegroundDuration.OriginVisit", 1); + histogram_tester().ExpectTotalCount( + "PageLoad.Experimental.TotalForegroundDuration.AllVisit", 1); + + // Back navigation. + // It marks title2.html as a terminal visit, and goes back to the title1.html. + NavigateBack(); + + histogram_tester().ExpectBucketCount( + "PageLoad.Experimental.PageVisitType", + PreviewPageLoadMetricsObserver::PageVisitType::kTerminalVisit, 1); + histogram_tester().ExpectTotalCount( + "PageLoad.Experimental.TotalForegroundDuration.TerminalVisit", 1); + histogram_tester().ExpectTotalCount( + "PageLoad.Experimental.TotalForegroundDuration.AllVisit", 2); + + // Make another navigation that makes a history branch. + NavigateToOriginPathFromRenderer("/title3.html"); + + histogram_tester().ExpectBucketCount( + "PageLoad.Experimental.PageVisitType", + PreviewPageLoadMetricsObserver::PageVisitType::kHistoryVisit, 1); + histogram_tester().ExpectTotalCount( + "PageLoad.Experimental.TotalForegroundDuration.HistoryVisit", 1); + histogram_tester().ExpectTotalCount( + "PageLoad.Experimental.TotalForegroundDuration.AllVisit", 3); + + // Wrap up. + NavigateAway(); + + histogram_tester().ExpectBucketCount( + "PageLoad.Experimental.PageVisitType", + PreviewPageLoadMetricsObserver::PageVisitType::kTerminalVisit, 2); + histogram_tester().ExpectTotalCount( + "PageLoad.Experimental.TotalForegroundDuration.TerminalVisit", 2); + histogram_tester().ExpectTotalCount( + "PageLoad.Experimental.TotalForegroundDuration.AllVisit", 4); +} + +IN_PROC_BROWSER_TEST_F(PreviewPageLoadMetricsObserverBrowserTest, + ComplexNavigationWithBFCache) { + if (!content::BackForwardCache::IsBackForwardCacheFeatureEnabled()) { + // Disabled on low-end bots or linux-bfcache-rel. + return; + } + + // Runs a series of navigation. + NavigateToOriginPath("/title1.html"); + NavigateToOriginPathFromRenderer("/title2.html"); + + histogram_tester().ExpectBucketCount( + "PageLoad.Experimental.PageVisitType", + PreviewPageLoadMetricsObserver::PageVisitType::kOriginVisit, 1); + histogram_tester().ExpectTotalCount( + "PageLoad.Experimental.TotalForegroundDuration.OriginVisit", 1); + histogram_tester().ExpectTotalCount( + "PageLoad.Experimental.TotalForegroundDuration.AllVisit", 1); + + // Back navigation. + // title1.html is restored from BFCache, and doesn't create a new observer. + NavigateBack(); + histogram_tester().ExpectBucketCount( + "PageLoad.Experimental.PageVisitType", + PreviewPageLoadMetricsObserver::PageVisitType::kTerminalVisit, 1); + histogram_tester().ExpectTotalCount( + "PageLoad.Experimental.TotalForegroundDuration.TerminalVisit", 1); + histogram_tester().ExpectTotalCount( + "PageLoad.Experimental.TotalForegroundDuration.AllVisit", 2); + + // Make another navigation that makes a history branch. + NavigateToOriginPathFromRenderer("/title3.html"); + + histogram_tester().ExpectTotalCount( + "PageLoad.Experimental.TotalForegroundDuration.AllVisit", 2); + + // Wrap up. + // No new metrics are recorded because of the BFCache restoration. + NavigateAway(); + histogram_tester().ExpectBucketCount( + "PageLoad.Experimental.PageVisitType", + PreviewPageLoadMetricsObserver::PageVisitType::kTerminalVisit, 2); + histogram_tester().ExpectTotalCount( + "PageLoad.Experimental.TotalForegroundDuration.TerminalVisit", 2); + histogram_tester().ExpectTotalCount( + "PageLoad.Experimental.TotalForegroundDuration.AllVisit", 3); +} } // namespace
diff --git a/chrome/browser/printing/pdf_blob_data_flattener.cc b/chrome/browser/printing/pdf_blob_data_flattener.cc new file mode 100644 index 0000000..8421162 --- /dev/null +++ b/chrome/browser/printing/pdf_blob_data_flattener.cc
@@ -0,0 +1,103 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/printing/pdf_blob_data_flattener.h" + +#include <cstring> +#include <utility> + +#include "base/check_is_test.h" +#include "base/memory/read_only_shared_memory_region.h" +#include "base/memory/shared_memory_mapping.h" +#include "chrome/browser/pdf/pdf_pref_names.h" +#include "chrome/browser/printing/printing_service.h" +#include "chrome/browser/profiles/profile.h" +#include "chrome/services/printing/public/mojom/printing_service.mojom.h" +#include "components/prefs/pref_service.h" +#include "extensions/browser/blob_reader.h" +#include "mojo/public/cpp/bindings/callback_helpers.h" +#include "printing/metafile_skia.h" +#include "printing/printing_utils.h" + +namespace printing { + +namespace { +bool g_disable_pdf_flattening_for_testing = false; +} // namespace + +PdfBlobDataFlattener::PdfBlobDataFlattener(Profile* profile) + : profile_(*profile) {} + +PdfBlobDataFlattener::~PdfBlobDataFlattener() = default; + +// static +base::AutoReset<bool> PdfBlobDataFlattener::DisablePdfFlatteningForTesting() { + return base::AutoReset<bool>(&g_disable_pdf_flattening_for_testing, true); +} + +void PdfBlobDataFlattener::ReadAndFlattenPdf( + mojo::PendingRemote<blink::mojom::Blob> blob, + ReadAndFlattenPdfCallback callback) { + BlobReader::Read( + std::move(blob), + base::BindOnce(&PdfBlobDataFlattener::OnPdfRead, + weak_factory_.GetWeakPtr(), std::move(callback))); +} + +void PdfBlobDataFlattener::OnPdfRead(ReadAndFlattenPdfCallback callback, + std::unique_ptr<std::string> data, + int64_t /*blob_total_size*/) { + if (!data || !LooksLikePdf(*data)) { + std::move(callback).Run(/*flattened_pdf=*/nullptr); + return; + } + + base::MappedReadOnlyRegion memory = + base::ReadOnlySharedMemoryRegion::Create(data->size()); + if (!memory.IsValid()) { + std::move(callback).Run(/*flattened_pdf=*/nullptr); + return; + } + memcpy(memory.mapping.memory(), data->data(), data->size()); + + if (g_disable_pdf_flattening_for_testing) { + CHECK_IS_TEST(); + OnPdfFlattened(std::move(callback), std::move(memory.region)); + return; + } + + if (!flattener_.is_bound()) { + GetPrintingService()->BindPdfFlattener( + flattener_.BindNewPipeAndPassReceiver()); + auto* prefs = profile_->GetPrefs(); + if (prefs && + prefs->IsManagedPreference(prefs::kPdfUseSkiaRendererEnabled)) { + flattener_->SetUseSkiaRendererPolicy( + prefs->GetBoolean(prefs::kPdfUseSkiaRendererEnabled)); + } + } + + auto flatten_callback = + base::BindOnce(&PdfBlobDataFlattener::OnPdfFlattened, + weak_factory_.GetWeakPtr(), std::move(callback)); + flattener_->FlattenPdf( + std::move(memory.region), + mojo::WrapCallbackWithDefaultInvokeIfNotRun( + std::move(flatten_callback), base::ReadOnlySharedMemoryRegion())); +} + +void PdfBlobDataFlattener::OnPdfFlattened( + ReadAndFlattenPdfCallback callback, + base::ReadOnlySharedMemoryRegion flattened_pdf) { + auto mapping = flattened_pdf.Map(); + if (!mapping.IsValid()) { + std::move(callback).Run(/*flattened_pdf=*/nullptr); + return; + } + auto metafile = std::make_unique<MetafileSkia>(); + CHECK(metafile->InitFromData(mapping.GetMemoryAsSpan<const uint8_t>())); + std::move(callback).Run(std::move(metafile)); +} + +} // namespace printing
diff --git a/chrome/browser/printing/pdf_blob_data_flattener.h b/chrome/browser/printing/pdf_blob_data_flattener.h new file mode 100644 index 0000000..2284d0189 --- /dev/null +++ b/chrome/browser/printing/pdf_blob_data_flattener.h
@@ -0,0 +1,63 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_BROWSER_PRINTING_PDF_BLOB_DATA_FLATTENER_H_ +#define CHROME_BROWSER_PRINTING_PDF_BLOB_DATA_FLATTENER_H_ + +#include <memory> + +#include "base/auto_reset.h" +#include "base/functional/callback_forward.h" +#include "base/memory/read_only_shared_memory_region.h" +#include "base/memory/weak_ptr.h" +#include "chrome/services/printing/public/mojom/pdf_flattener.mojom.h" +#include "mojo/public/cpp/bindings/pending_remote.h" +#include "mojo/public/cpp/bindings/remote.h" +#include "third_party/blink/public/mojom/blob/blob.mojom.h" + +class Profile; + +namespace printing { + +class MetafileSkia; + +// PdfBlobDataFlattener is responsible for reading and flattening PDF files from +// Blob objects into instances of MetafileSkia. This class is only built on +// ChromeOS; however, there are no technical limitations in expanding it to +// other platforms too. +class PdfBlobDataFlattener { + public: + using ReadAndFlattenPdfCallback = + base::OnceCallback<void(std::unique_ptr<MetafileSkia> flattened_pdf)>; + + explicit PdfBlobDataFlattener(Profile* profile); + ~PdfBlobDataFlattener(); + + // We want to have an ability to disable PDF flattening for unit tests as + // printing::mojom::PdfFlattener requires real browser instance to be able to + // handle requests. + static base::AutoReset<bool> DisablePdfFlatteningForTesting(); + + // Runs `callback` with a MetafileSkia with the contents of the flattened PDF, + // or `nullptr` if an error has been encountered. + // `this` is guaranteed to outlive `callback`. + void ReadAndFlattenPdf(mojo::PendingRemote<blink::mojom::Blob> blob, + ReadAndFlattenPdfCallback callback); + + private: + void OnPdfRead(ReadAndFlattenPdfCallback callback, + std::unique_ptr<std::string> data, + int64_t blob_total_size); + void OnPdfFlattened(ReadAndFlattenPdfCallback callback, + base::ReadOnlySharedMemoryRegion flattened_pdf); + + const raw_ref<Profile> profile_; + mojo::Remote<mojom::PdfFlattener> flattener_; + + base::WeakPtrFactory<PdfBlobDataFlattener> weak_factory_{this}; +}; + +} // namespace printing + +#endif // CHROME_BROWSER_PRINTING_PDF_BLOB_DATA_FLATTENER_H_
diff --git a/chrome/browser/resources/ash/settings/os_apps_page/app_management_page/app_details_item.html b/chrome/browser/resources/ash/settings/os_apps_page/app_management_page/app_details_item.html index 3cee15f..e72c897 100644 --- a/chrome/browser/resources/ash/settings/os_apps_page/app_management_page/app_details_item.html +++ b/chrome/browser/resources/ash/settings/os_apps_page/app_management_page/app_details_item.html
@@ -42,7 +42,13 @@ [[getTypeAndSourceString_(app)]] <!-- Do not delete for testing purposes --> </localized-link> <template is="dom-if" if="[[shouldShowLaunchIcon_(app)]]"> - <cr-icon-button id="launchIcon" on-click="onStoreLinkClicked_"> + <!-- The following button is solely for visual representation and does not + need to be shown to a11y. --> + <cr-icon-button + id="launchIcon" + on-click="onStoreLinkClicked_" + aria-hidden="true" + tabindex="-1"> </cr-icon-button> </template> <template is="dom-if" if="[[shouldShowInfoIcon_(app)]]" restamp>
diff --git a/chrome/browser/resources/ash/settings/os_apps_page/app_management_page/app_details_item.ts b/chrome/browser/resources/ash/settings/os_apps_page/app_management_page/app_details_item.ts index f19490e4..44055200 100644 --- a/chrome/browser/resources/ash/settings/os_apps_page/app_management_page/app_details_item.ts +++ b/chrome/browser/resources/ash/settings/os_apps_page/app_management_page/app_details_item.ts
@@ -97,12 +97,10 @@ return Boolean(app.dataSize); } /** - * The info icon is only shown for System apps and apps installed from the - * Chrome browser. + * The info icon is only shown for apps installed from the Chrome browser. */ private shouldShowInfoIcon_(app: App): boolean { - return app.installSource === InstallSource.kBrowser || - app.installReason === InstallReason.kSystem; + return app.installSource === InstallSource.kBrowser; } /** @@ -115,6 +113,12 @@ } private getTypeString_(app: App): string { + // When installReason = kSystem, the system has determined that the app + // needs to be installed. This includes apps such as Chrome and the Play + // Store. + if (app.installReason === InstallReason.kSystem) { + return this.i18n('appManagementAppDetailsTypeCrosSystem'); + } switch (app.type) { case AppType.kArc: return this.i18n('appManagementAppDetailsTypeAndroid'); @@ -144,29 +148,32 @@ } private getTypeAndSourceString_(app: App): string { - // When installReason = kSystem, the system has determined that the app - // needs to be installed. This includes apps such as Chrome and the Play - // Store. - if (app.installReason === InstallReason.kSystem) { - return this.i18n('appManagementAppDetailsTypeCrosSystem'); - } switch (app.installSource) { case InstallSource.kPlayStore: case InstallSource.kChromeWebStore: return this .i18nAdvanced('appManagementAppDetailsTypeAndSourceCombined', { substitutions: [ - String(this.getTypeString_(app)), - String(this.getInstallSourceString_(app)), + this.getTypeString_(app), + this.getInstallSourceString_(app), ], }) .toString(); case InstallSource.kBrowser: return this.i18n('appManagementAppDetailsInstallSourceBrowser'); + case InstallSource.kSystem: + return this + .i18nAdvanced( + 'appManagementAppDetailsTypeAndSourcePreinstalledApp', { + substitutions: [ + this.getTypeString_(app), + loadTimeData.getString('appManagementDeviceName'), + ], + }) + .toString(); case InstallSource.kUnknown: return this.getTypeString_(app); default: - console.error('Install source not recognised.'); return this.getTypeString_(app); } } @@ -186,13 +193,10 @@ } /** - * Returns the sanitized URL for apps downloaded from the Chrome browser, or a - * message for system apps, to be shown in the tooltip. + * Returns the sanitized URL for apps downloaded from the Chrome browser, to + * be shown in the tooltip. */ private getTooltipText_(app: App): string { - if (app.installReason === InstallReason.kSystem) { - return this.i18n('appManagementAppDetailsTooltipCrosSystem'); - } switch (app.installSource) { case InstallSource.kBrowser: return app.publisherId.replace(/\?.*$/g, '');
diff --git a/chrome/browser/resources/nearby_internals/cross_device_internals.js b/chrome/browser/resources/nearby_internals/cross_device_internals.js index 33beee8..cf9e769 100644 --- a/chrome/browser/resources/nearby_internals/cross_device_internals.js +++ b/chrome/browser/resources/nearby_internals/cross_device_internals.js
@@ -19,6 +19,7 @@ import {getTemplate} from './cross_device_internals.html.js'; import {NearbyLogsBrowserProxy} from './cross_device_logs_browser_proxy.js'; +import {NearbyPrefsBrowserProxy} from './nearby_prefs_browser_proxy.js'; import {NearbyPresenceBrowserProxy} from './nearby_presence_browser_proxy.js'; import {ActionValues, FeatureValues, LogMessage, LogProvider, PresenceDevice, SelectOption, Severity} from './types.js'; @@ -62,7 +63,10 @@ ], /** @private {?NearbyPresenceBrowserProxy} */ - browserProxy_: null, + nearbyPresenceBrowserProxy_: null, + + /** @private {?NearbyPrefsBrowserProxy}*/ + prefsBrowserProxy_: null, properties: { /** @private {!Array<!PresenceDevice>} */ @@ -107,7 +111,9 @@ /** @private {!Array<!SelectOption>} */ nearbyShareActionList: { type: Array, - value: [], + value: [ + {name: 'Reset Nearby Share', value: ActionValues.RESETNEARBYSHARE}, + ], }, /** @private {!Array<!SelectOption>} */ @@ -177,7 +183,8 @@ logProvider_: null, created() { - this.browserProxy_ = NearbyPresenceBrowserProxy.getInstance(); + this.nearbyPresenceBrowserProxy_ = NearbyPresenceBrowserProxy.getInstance(); + this.prefsBrowserProxy_ = NearbyPrefsBrowserProxy.getInstance(); }, /** @@ -186,7 +193,7 @@ * @override */ attached() { - this.browserProxy_.initialize(); + this.nearbyPresenceBrowserProxy_.initialize(); this.addWebUIListener( 'presence-device-found', device => this.onPresenceDeviceFound_(device)); this.addWebUIListener( @@ -213,10 +220,6 @@ logs => this.onGetLogMessages_(logs)); }, - onStartScanClicked() { - this.browserProxy_.SendStartScan(); - }, - updateActionsSelect() { switch (Number(this.$.actionGroup.value)) { case FeatureValues.NearbyPresence: @@ -237,35 +240,25 @@ perform_action() { switch (Number(this.$.actionSelect.value)) { case ActionValues.STARTSCAN: - this.browserProxy_.SendStartScan(); + this.nearbyPresenceBrowserProxy_.SendStartScan(); break; case ActionValues.STOPSCAN: - this.browserProxy_.SendStopScan(); + this.nearbyPresenceBrowserProxy_.SendStopScan(); break; case ActionValues.SYNCCREDENTIALS: - this.browserProxy_.SendSyncCredentials(); + this.nearbyPresenceBrowserProxy_.SendSyncCredentials(); break; case ActionValues.FIRSTTIMEFLOW: - this.browserProxy_.SendFirstTimeFlow(); + this.nearbyPresenceBrowserProxy_.SendFirstTimeFlow(); + break; + case ActionValues.RESETNEARBYSHARE: + this.prefsBrowserProxy_.clearNearbyPrefs(); break; default: break; } }, - - onStopScanClicked() { - this.browserProxy_.SendStopScan(); - }, - - onSyncCredentialsClicked() { - this.browserProxy_.SendSyncCredentials(); - }, - - onFirstTimeFlowClicked() { - this.browserProxy_.SendFirstTimeFlow(); - }, - onPresenceDeviceFound_(device) { const type = device['type']; const endpointId = device['endpoint_id'];
diff --git a/chrome/browser/resources/nearby_internals/types.js b/chrome/browser/resources/nearby_internals/types.js index 09355b1..62af965 100644 --- a/chrome/browser/resources/nearby_internals/types.js +++ b/chrome/browser/resources/nearby_internals/types.js
@@ -24,6 +24,7 @@ STOPSCAN: 1, SYNCCREDENTIALS: 2, FIRSTTIMEFLOW: 3, + RESETNEARBYSHARE: 4, }; /**
diff --git a/chrome/browser/resources/settings/privacy_page/privacy_page.html b/chrome/browser/resources/settings/privacy_page/privacy_page.html index 74c1366d..3fa3fca9 100644 --- a/chrome/browser/resources/settings/privacy_page/privacy_page.html +++ b/chrome/browser/resources/settings/privacy_page/privacy_page.html
@@ -317,7 +317,7 @@ <template is="dom-if" route-path="/trackingProtection"> <settings-subpage id="trackingProtection" page-title="$i18n{trackingProtectionPageTitle}" - learn-more-url="$i18n{cookiesSettingsHelpCenterURL}" + learn-more-url="$i18n{trackingProtectionHelpCenterURL}" search-label="$i18n{siteSettingsAllSitesSearch}" search-term="{{searchFilter_}}" associated-control="[[$$('#trackingProtectionLinkRow')]]">
diff --git a/chrome/browser/resources/settings/safety_hub/safety_hub_browser_proxy.ts b/chrome/browser/resources/settings/safety_hub/safety_hub_browser_proxy.ts index cde746f..bcc13e1 100644 --- a/chrome/browser/resources/settings/safety_hub/safety_hub_browser_proxy.ts +++ b/chrome/browser/resources/settings/safety_hub/safety_hub_browser_proxy.ts
@@ -187,12 +187,7 @@ } getVersionCardData() { - // TODO(crbug.com/1443466): Replace dummy response with handler response. - return Promise.resolve({ - header: 'dummy header', - subheader: 'dummy subheader', - state: CardState.SAFE, - }); + return sendWithPromise('getVersionCardData'); } getNumberOfExtensionsThatNeedReview() {
diff --git a/chrome/browser/sync/test/integration/sync_disabled_checker.cc b/chrome/browser/sync/test/integration/sync_disabled_checker.cc index 295d40d..920225d 100644 --- a/chrome/browser/sync/test/integration/sync_disabled_checker.cc +++ b/chrome/browser/sync/test/integration/sync_disabled_checker.cc
@@ -4,27 +4,16 @@ #include "chrome/browser/sync/test/integration/sync_disabled_checker.h" -#include "build/build_config.h" - SyncDisabledChecker::SyncDisabledChecker(syncer::SyncServiceImpl* service) : SingleClientStatusChangeChecker(service) {} SyncDisabledChecker::~SyncDisabledChecker() = default; bool SyncDisabledChecker::IsExitConditionSatisfied(std::ostream* os) { - // TODO(crbug.com/1445931): Revisit condition below to simplify and/or unify - // across platforms. -#if BUILDFLAG(IS_CHROMEOS_ASH) - *os << "Waiting until sync is disabled via dashboard."; - return service()->IsSyncFeatureDisabledViaDashboard(); -#else // BUILDFLAG(IS_CHROMEOS_ASH) *os << "Waiting until sync is disabled." << " IsSetupInProgress:" << service()->IsSetupInProgress() - << " IsInitialSyncFeatureSetupComplete:" - << service()->GetUserSettings()->IsInitialSyncFeatureSetupComplete(); - return !service()->IsSetupInProgress() && - !service()->GetUserSettings()->IsInitialSyncFeatureSetupComplete(); -#endif // BUILDFLAG(IS_CHROMEOS_ASH) + << " IsSyncFeatureEnabled: " << service()->IsSyncFeatureEnabled(); + return !service()->IsSetupInProgress() && !service()->IsSyncFeatureEnabled(); } void SyncDisabledChecker::WaitDone() {
diff --git a/chrome/browser/ui/ash/in_session_auth_dialog_client.cc b/chrome/browser/ui/ash/in_session_auth_dialog_client.cc index 83cddfe..f4d94cb 100644 --- a/chrome/browser/ui/ash/in_session_auth_dialog_client.cc +++ b/chrome/browser/ui/ash/in_session_auth_dialog_client.cc
@@ -247,8 +247,8 @@ // in this `user_context`. CHECK(user_context_); - const cryptohome::AuthFactor* password_factor = - user_context_->GetAuthFactorsData().FindOnlinePasswordFactor(); + const auto* password_factor = + user_context_->GetAuthFactorsData().FindAnyPasswordFactor(); if (!password_factor) { LOG(ERROR) << "Could not find password key"; std::move(pending_auth_state_->callback).Run(false);
diff --git a/chrome/browser/ui/browser_dialogs.h b/chrome/browser/ui/browser_dialogs.h index b6214fc..92da0a7 100644 --- a/chrome/browser/ui/browser_dialogs.h +++ b/chrome/browser/ui/browser_dialogs.h
@@ -15,11 +15,6 @@ #include "build/build_config.h" #include "build/chromeos_buildflags.h" #include "chrome/browser/ui/bookmarks/bookmark_editor.h" -#include "chrome/browser/web_applications/web_app_callback_app_identity.h" -#include "chrome/browser/web_applications/web_app_install_info.h" -#include "chrome/browser/web_applications/web_app_uninstall_dialog_user_options.h" -#include "components/webapps/browser/installable/installable_metrics.h" -#include "components/webapps/common/web_app_id.h" #include "content/public/browser/bluetooth_delegate.h" #include "content/public/browser/login_delegate.h" #include "extensions/buildflags/buildflags.h" @@ -30,6 +25,16 @@ #include "ui/base/models/dialog_model.h" #include "ui/gfx/native_widget_types.h" +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) +#include "chrome/browser/web_applications/web_app_callback_app_identity.h" +#include "chrome/browser/web_applications/web_app_id.h" +#include "chrome/browser/web_applications/web_app_install_info.h" +#include "chrome/browser/web_applications/web_app_uninstall_dialog_user_options.h" +#include "components/webapps/browser/installable/installable_metrics.h" +#endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || + // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + class Browser; class GURL; class LoginHandler; @@ -78,14 +83,14 @@ class Widget; } // namespace views +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) namespace webapps { class MlInstallOperationTracker; struct Screenshot; } // namespace webapps - -namespace web_app { -struct WebAppInstallInfo; -} // namespace web_app +#endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || + // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) namespace chrome { @@ -156,6 +161,8 @@ content::BluetoothDelegate::PairPromptCallback close_callback); #endif // PAIR_BLUETOOTH_ON_DEMAND() +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) // Callback used to indicate whether a user has accepted the installation of a // web app. The boolean parameter is true when the user accepts the dialog. The // WebAppInstallInfo parameter contains the information about the app, @@ -214,7 +221,6 @@ std::map<SquareSizePx, SkBitmap> icon_bitmaps, web_app::UninstallDialogCallback uninstall_dialog_result_callback); -#if !BUILDFLAG(IS_ANDROID) // Callback used to indicate whether a user has accepted the launch of a // web app. The |allowed| is true when the user allows the app to launch. // |remember_user_choice| is true if the user wants to persist the decision. @@ -235,8 +241,6 @@ Profile* profile, const webapps::AppId& app_id, WebAppLaunchAcceptanceCallback close_callback); -#endif // !BUILDFLAG(IS_ANDROID) - // Sets whether |ShowWebAppDialog| should accept immediately without any // user interaction. |auto_open_in_window| sets whether the open in window // checkbox is checked. @@ -283,6 +287,9 @@ // user interaction. void SetAutoAcceptPWAInstallConfirmationForTesting(bool auto_accept); +#endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || + // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + #if BUILDFLAG(IS_MAC) // Bridging methods that show/hide the toolkit-views based Task Manager on Mac.
diff --git a/chrome/browser/ui/views/editor_menu/editor_menu_view.cc b/chrome/browser/ui/views/editor_menu/editor_menu_view.cc index ec01864..fa19514 100644 --- a/chrome/browser/ui/views/editor_menu/editor_menu_view.cc +++ b/chrome/browser/ui/views/editor_menu/editor_menu_view.cc
@@ -59,7 +59,7 @@ constexpr gfx::Insets kTitleContainerInsets = gfx::Insets::TLBR(10, 16, 10, 10); -constexpr char16_t kBadgeText[] = u"New"; +constexpr char16_t kBadgeText[] = u"Experiment"; constexpr gfx::Insets kBadgeInsets = gfx::Insets::VH(0, 8); constexpr int kBadgeHorizontalPaddingDip = 8; constexpr int kBadgeVerticalPaddingDip = 8;
diff --git a/chrome/browser/ui/views/supervised_user/parent_permission_extension_flow_view_browsertest.cc b/chrome/browser/ui/views/supervised_user/parent_permission_extension_flow_view_browsertest.cc index 3b9e059..b770703 100644 --- a/chrome/browser/ui/views/supervised_user/parent_permission_extension_flow_view_browsertest.cc +++ b/chrome/browser/ui/views/supervised_user/parent_permission_extension_flow_view_browsertest.cc
@@ -15,8 +15,6 @@ #include "base/path_service.h" #include "base/test/metrics/histogram_tester.h" #include "base/test/scoped_feature_list.h" -#include "chrome/browser/ash/login/test/device_state_mixin.h" -#include "chrome/browser/ash/login/test/logged_in_user_mixin.h" #include "chrome/browser/extensions/chrome_test_extension_loader.h" #include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/extensions/extension_util.h" @@ -35,6 +33,7 @@ #include "chrome/test/base/fake_gaia_mixin.h" #include "chrome/test/base/mixin_based_in_process_browser_test.h" #include "chrome/test/base/ui_test_utils.h" +#include "chrome/test/supervised_user/supervision_mixin.h" #include "components/signin/public/identity_manager/identity_test_environment.h" #include "components/supervised_user/core/browser/supervised_user_service.h" #include "components/supervised_user/core/common/features.h" @@ -65,16 +64,23 @@ ExtensionEnableFlowTestSupervised() : TestParentPermissionDialogViewObserver(this) { - // This UI is only used in V1 extensions approvals flow, so to test it V2 - // flow needs to be disabled. - feature_list_.InitAndDisableFeature( - supervised_user::kLocalExtensionApprovalsV2); + feature_list_.InitWithFeatureStates( + {// Enable extensions for supervised users in Desktop platforms. + {supervised_user::kFilterWebsitesForSupervisedUsersOnDesktopAndIOS, + true}, + {supervised_user:: + kEnableExtensionsPermissionsForSupervisedUsersOnDesktop, + true}, + // This UI is only used in V1 extensions approvals flow, so to test it + // V2 flow needs to be disabled. + {supervised_user::kLocalExtensionApprovalsV2, false}}); } ExtensionEnableFlowTestSupervised(const ExtensionEnableFlowTestSupervised&) = delete; ExtensionEnableFlowTestSupervised& operator=( const ExtensionEnableFlowTestSupervised&) = delete; + ~ExtensionEnableFlowTestSupervised() override { feature_list_.Reset(); } void OnParentPermissionDialogDone(ParentPermissionDialog::Result result) { result_ = result; @@ -89,9 +95,13 @@ } view_ = view; - view_->SetIdentityManagerForTesting(identity_test_env_->identity_manager()); + view_->SetIdentityManagerForTesting( + supervision_mixin_.GetIdentityTestEnvironment()->identity_manager()); view_->SetRepromptAfterIncorrectCredential(false); + if (!next_dialog_action_.has_value()) { + return; + } if (next_dialog_action_) { switch (next_dialog_action_.value()) { case NextDialogAction::kCancel: @@ -100,28 +110,14 @@ case NextDialogAction::kAccept: view_->AcceptDialog(); break; + default: + NOTREACHED_NORETURN(); } } } - void InitializeFamilyData() { - // Set up the child user's custodians. - ASSERT_TRUE(browser()); - supervised_user_test_util::AddCustodians(browser()->profile()); - - // Set up the identity test environment, which provides fake - // OAuth refresh tokens. - identity_test_env_ = std::make_unique<signin::IdentityTestEnvironment>(); - identity_test_env_->MakeAccountAvailable(FakeGaiaMixin::kFakeUserEmail); - identity_test_env_->SetPrimaryAccount(FakeGaiaMixin::kFakeUserEmail, - signin::ConsentLevel::kSync); - identity_test_env_->SetRefreshTokenForPrimaryAccount(); - identity_test_env_->SetAutomaticIssueOfAccessTokens(true); - } - void SetUpOnMainThread() override { MixinBasedInProcessBrowserTest::SetUpOnMainThread(); - logged_in_user_mixin_.LogInUser(/*issue_any_scope_token=*/true); supervised_user_test_util:: SetSupervisedUserExtensionsMayRequestPermissionsPref( @@ -130,10 +126,6 @@ std::make_unique<extensions::SupervisedUserExtensionsDelegateImpl>( browser()->profile()); - if (browser()->profile()->IsChild()) { - InitializeFamilyData(); - } - test_extension_ = extensions::ExtensionBuilder("test extension").Build(); extension_service()->AddExtension(test_extension_.get()); extension_service()->DisableExtension( @@ -148,8 +140,7 @@ void set_next_reauth_status( const GaiaAuthConsumer::ReAuthProofTokenStatus next_status) { - logged_in_user_mixin_.GetFakeGaiaMixin()->fake_gaia()->SetNextReAuthStatus( - next_status); + supervision_mixin_.SetNextReAuthStatus(next_status); } void set_next_dialog_action(NextDialogAction action) { @@ -175,25 +166,20 @@ private: base::test::ScopedFeatureList feature_list_; - raw_ptr<ParentPermissionDialogView, DanglingUntriaged | ExperimentalAsh> view_ = nullptr; std::unique_ptr<ParentPermissionDialog> parent_permission_dialog_; ParentPermissionDialog::Result result_; - // Emulate consumer ownership (create public owner key file, install - // attributes file, etc) so Chrome doesn't need to do it. The current setup is - // not sufficient to go through the ownership flow successfully and it's not - // essential to the logic under test. - ash::DeviceStateMixin device_state_{ - &mixin_host_, - ash::DeviceStateMixin::State::OOBE_COMPLETED_CONSUMER_OWNED}; - ash::LoggedInUserMixin logged_in_user_mixin_{ - &mixin_host_, - // Simulate Gellerization / Adding Supervision to load extensions. - content::IsPreTest() ? ash::LoggedInUserMixin::LogInType::kRegular - : ash::LoggedInUserMixin::LogInType::kChild, - embedded_test_server(), this}; + supervised_user::SupervisionMixin supervision_mixin_{ + mixin_host_, + this, + embedded_test_server(), + {.consent_level = signin::ConsentLevel::kSync, + .sign_in_mode = + content::IsPreTest() + ? supervised_user::SupervisionMixin::SignInMode::kRegular + : supervised_user::SupervisionMixin::SignInMode::kSupervised}}; // Closure that is triggered once the dialog is shown. base::OnceClosure dialog_shown_closure_; @@ -203,7 +189,6 @@ scoped_refptr<const extensions::Extension> test_extension_; - std::unique_ptr<signin::IdentityTestEnvironment> identity_test_env_; absl::optional<NextDialogAction> next_dialog_action_; }; @@ -222,7 +207,10 @@ ExtensionEnableFlowTestDelegate delegate; ExtensionEnableFlow enable_flow(browser()->profile(), test_extension()->id(), &delegate); - enable_flow.Start(); + + content::WebContents* web_contents = + browser()->tab_strip_model()->GetActiveWebContents(); + enable_flow.StartForWebContents(web_contents); delegate.Wait(); ASSERT_TRUE(delegate.result()); @@ -265,7 +253,9 @@ ExtensionEnableFlowTestDelegate delegate; ExtensionEnableFlow enable_flow(browser()->profile(), test_extension()->id(), &delegate); - enable_flow.Start(); + content::WebContents* web_contents = + browser()->tab_strip_model()->GetActiveWebContents(); + enable_flow.StartForWebContents(web_contents); delegate.Wait(); ASSERT_TRUE(delegate.result()); @@ -318,7 +308,9 @@ ExtensionEnableFlowTestDelegate delegate; ExtensionEnableFlow enable_flow(browser()->profile(), test_extension()->id(), &delegate); - enable_flow.Start(); + content::WebContents* web_contents = + browser()->tab_strip_model()->GetActiveWebContents(); + enable_flow.StartForWebContents(web_contents); delegate.Wait(); ASSERT_TRUE(delegate.result());
diff --git a/chrome/browser/ui/webui/ash/settings/pages/apps/apps_section.cc b/chrome/browser/ui/webui/ash/settings/pages/apps/apps_section.cc index 8ba13257..33843a02 100644 --- a/chrome/browser/ui/webui/ash/settings/pages/apps/apps_section.cc +++ b/chrome/browser/ui/webui/ash/settings/pages/apps/apps_section.cc
@@ -202,8 +202,6 @@ webui::LocalizedString kLocalizedStrings[] = { {"appManagementAppDetailsTitle", IDS_APP_MANAGEMENT_APP_DETAILS_TITLE}, - {"appManagementAppDetailsTooltipCrosSystem", - IDS_APP_MANAGEMENT_APP_DETAILS_TOOLTIP_CROS_SYSTEM}, {"appManagementAppDetailsTypeAndroid", IDS_APP_MANAGEMENT_APP_DETAILS_TYPE_ANDROID}, {"appManagementAppDetailsTypeChrome", @@ -218,6 +216,8 @@ IDS_APP_MANAGEMENT_APP_DETAILS_INSTALL_SOURCE_PLAY_STORE}, {"appManagementAppDetailsInstallSourceBrowser", IDS_APP_MANAGEMENT_APP_DETAILS_INSTALL_SOURCE_BROWSER}, + {"appManagementAppDetailsTypeAndSourcePreinstalledApp", + IDS_APP_MANAGEMENT_APP_DETAILS_TYPE_AND_SOURCE_PREINSTALLED_APP}, {"appManagementAppDetailsTypeAndSourceCombined", IDS_APP_MANAGEMENT_APP_DETAILS_TYPE_AND_SOURCE_COMBINED}, {"appManagementAppDetailsVersion", @@ -474,6 +474,9 @@ html_source->AddBoolean("appManagementArcReadOnlyPermissions", arc::IsReadOnlyPermissionsEnabled()); + html_source->AddString("appManagementDeviceName", + ui::GetChromeOSDeviceName()); + html_source->AddString("appNotificationsBrowserSettingsURL", chrome::kAppNotificationsBrowserSettingsURL);
diff --git a/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc b/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc index f8f8da8..00b805f 100644 --- a/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc +++ b/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
@@ -326,7 +326,7 @@ l10n_util::GetStringUTF8(IDS_NEW_TAB_OTR_THIRD_PARTY_BLOCKED_COOKIE); replacements["cookieControlsDescription"] = l10n_util::GetStringFUTF8( IDS_NEW_TAB_OTR_THIRD_PARTY_BLOCKED_COOKIE_SUBLABEL, - base::ASCIIToUTF16(chrome::kCookiesSettingsHelpCenterURL)); + base::ASCIIToUTF16(chrome::kUserBypassHelpCenterURL)); } else { replacements["hideBlockCookiesToggle"] = "";
diff --git a/chrome/browser/ui/webui/settings/safety_hub_handler.cc b/chrome/browser/ui/webui/settings/safety_hub_handler.cc index db09e15..6380014 100644 --- a/chrome/browser/ui/webui/settings/safety_hub_handler.cc +++ b/chrome/browser/ui/webui/settings/safety_hub_handler.cc
@@ -13,6 +13,7 @@ #include "base/time/default_clock.h" #include "base/time/time.h" #include "base/values.h" +#include "chrome/browser/browser_process.h" #include "chrome/browser/content_settings/host_content_settings_map_factory.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/signin/identity_manager_factory.h" @@ -24,7 +25,10 @@ #include "chrome/browser/ui/safety_hub/unused_site_permissions_service.h" #include "chrome/browser/ui/safety_hub/unused_site_permissions_service_factory.h" #include "chrome/browser/ui/webui/settings/site_settings_helper.h" +#include "chrome/browser/ui/webui/version/version_ui.h" +#include "chrome/browser/upgrade_detector/build_state.h" #include "chrome/common/chrome_features.h" +#include "chrome/grit/branded_strings.h" #include "chrome/grit/generated_resources.h" #include "components/content_settings/core/browser/host_content_settings_map.h" #include "components/content_settings/core/common/content_settings.h" @@ -446,6 +450,35 @@ ResolveJavascriptCallback(callback_id, base::Value(std::move(result))); } +void SafetyHubHandler::HandleGetVersionCardData(const base::Value::List& args) { + AllowJavascript(); + + CHECK_EQ(1U, args.size()); + const base::Value& callback_id = args[0]; + + base::Value::Dict result; + if (g_browser_process->GetBuildState()->update_type() == + BuildState::UpdateType::kNone) { + result.Set(safety_hub::kCardHeaderKey, + l10n_util::GetStringUTF16(IDS_SETTINGS_UPGRADE_UP_TO_DATE)); + result.Set(safety_hub::kCardSubheaderKey, + VersionUI::GetAnnotatedVersionStringForUi()); + result.Set(safety_hub::kCardStateKey, + static_cast<int>(safety_hub::SafetyHubCardState::kSafe)); + } else { + // TODO(1443466): Handle rare states such as version rollbacks. + result.Set(safety_hub::kCardHeaderKey, + l10n_util::GetStringUTF16(IDS_RECOVERY_BUBBLE_TITLE)); + result.Set(safety_hub::kCardSubheaderKey, + l10n_util ::GetStringUTF16( + IDS_SETTINGS_SAFETY_HUB_VERSION_CARD_SUBHEADER_RESTART)); + result.Set(safety_hub::kCardStateKey, + static_cast<int>(safety_hub::SafetyHubCardState::kWarning)); + } + + ResolveJavascriptCallback(callback_id, base::Value(std::move(result))); +} + void SafetyHubHandler::RegisterMessages() { // Usage of base::Unretained(this) is safe, because web_ui() owns `this` and // won't release ownership until destruction. @@ -514,6 +547,10 @@ "getPasswordCardData", base::BindRepeating(&SafetyHubHandler::HandleGetPasswordCardData, base::Unretained(this))); + web_ui()->RegisterMessageCallback( + "getVersionCardData", + base::BindRepeating(&SafetyHubHandler::HandleGetVersionCardData, + base::Unretained(this))); } void SafetyHubHandler::SendUnusedSitePermissionsReviewList() {
diff --git a/chrome/browser/ui/webui/settings/safety_hub_handler.h b/chrome/browser/ui/webui/settings/safety_hub_handler.h index 9a72e57..d363d36 100644 --- a/chrome/browser/ui/webui/settings/safety_hub_handler.h +++ b/chrome/browser/ui/webui/settings/safety_hub_handler.h
@@ -68,6 +68,8 @@ FRIEND_TEST_ALL_PREFIXES(SafetyHubHandlerParameterizedTest, PasswordCardState); FRIEND_TEST_ALL_PREFIXES(SafetyHubHandlerTest, PasswordCardCheckTime); + FRIEND_TEST_ALL_PREFIXES(SafetyHubHandlerTest, VersionCardUpToDate); + FRIEND_TEST_ALL_PREFIXES(SafetyHubHandlerTest, VersionCardOutOfDate); // SettingsPageUIHandler implementation. void OnJavascriptAllowed() override; @@ -141,6 +143,9 @@ // Returns the data for the password card. void HandleGetPasswordCardData(const base::Value::List& args); + // Returns the data for the version card. + void HandleGetVersionCardData(const base::Value::List& args); + // Sends the list of notification permissions to review to the WebUI. void SendNotificationPermissionReviewList();
diff --git a/chrome/browser/ui/webui/settings/safety_hub_handler_unittest.cc b/chrome/browser/ui/webui/settings/safety_hub_handler_unittest.cc index 5e1061c..26650c5d 100644 --- a/chrome/browser/ui/webui/settings/safety_hub_handler_unittest.cc +++ b/chrome/browser/ui/webui/settings/safety_hub_handler_unittest.cc
@@ -6,10 +6,12 @@ #include <memory> #include "base/memory/scoped_refptr.h" +#include "base/strings/utf_string_conversions.h" #include "base/test/gtest_util.h" #include "base/test/simple_test_clock.h" #include "base/time/clock.h" #include "base/time/time.h" +#include "chrome/browser/browser_process.h" #include "chrome/browser/content_settings/host_content_settings_map_factory.h" #include "chrome/browser/history/history_service_factory.h" #include "chrome/browser/ui/safety_hub/notification_permission_review_service_factory.h" @@ -17,7 +19,11 @@ #include "chrome/browser/ui/safety_hub/unused_site_permissions_service.h" #include "chrome/browser/ui/webui/settings/safety_hub_handler.h" #include "chrome/browser/ui/webui/settings/site_settings_helper.h" +#include "chrome/browser/ui/webui/version/version_ui.h" +#include "chrome/browser/upgrade_detector/build_state.h" #include "chrome/common/chrome_features.h" +#include "chrome/common/chrome_version.h" +#include "chrome/grit/branded_strings.h" #include "chrome/grit/generated_resources.h" #include "chrome/test/base/testing_profile.h" #include "components/content_settings/core/browser/content_settings_registry.h" @@ -538,3 +544,43 @@ } } } + +TEST_F(SafetyHubHandlerTest, VersionCardUpToDate) { + base::Value::List args; + args.Append("getVersionCardData"); + handler()->HandleGetVersionCardData(args); + + const content::TestWebUI::CallData& data = *web_ui()->call_data().back(); + ASSERT_TRUE(data.arg3()->is_dict()); + + EXPECT_EQ(l10n_util::GetStringUTF16(IDS_SETTINGS_UPGRADE_UP_TO_DATE), + base::UTF8ToUTF16(*data.arg3()->GetDict().FindString("header"))); + EXPECT_EQ(VersionUI::GetAnnotatedVersionStringForUi(), + base::UTF8ToUTF16(*data.arg3()->GetDict().FindString("subheader"))); + EXPECT_EQ(static_cast<int>(SafetyHubCardState::kSafe), + *data.arg3()->GetDict().FindInt("state")); +} + +TEST_F(SafetyHubHandlerTest, VersionCardOutOfDate) { + // An update is available, the version card should let the user know. + g_browser_process->GetBuildState()->SetUpdate( + BuildState::UpdateType::kNormalUpdate, + base::Version({CHROME_VERSION_MAJOR, CHROME_VERSION_MINOR, + CHROME_VERSION_BUILD, CHROME_VERSION_PATCH + 1}), + absl::nullopt); + + base::Value::List args; + args.Append("getVersionCardData"); + handler()->HandleGetVersionCardData(args); + + const content::TestWebUI::CallData& data = *web_ui()->call_data().back(); + ASSERT_TRUE(data.arg3()->is_dict()); + + EXPECT_EQ(l10n_util::GetStringUTF16(IDS_RECOVERY_BUBBLE_TITLE), + base::UTF8ToUTF16(*data.arg3()->GetDict().FindString("header"))); + EXPECT_EQ(l10n_util ::GetStringUTF16( + IDS_SETTINGS_SAFETY_HUB_VERSION_CARD_SUBHEADER_RESTART), + base::UTF8ToUTF16(*data.arg3()->GetDict().FindString("subheader"))); + EXPECT_EQ(static_cast<int>(SafetyHubCardState::kWarning), + *data.arg3()->GetDict().FindInt("state")); +}
diff --git a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc index 94d2959b..3a65448 100644 --- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc +++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
@@ -1730,6 +1730,9 @@ html_source->AddString("cookiesSettingsHelpCenterURL", chrome::kCookiesSettingsHelpCenterURL); + html_source->AddString("trackingProtectionHelpCenterURL", + chrome::kTrackingProtectionHelpCenterURL); + html_source->AddString("firstPartySetsLearnMoreURL", chrome::kFirstPartySetsLearnMoreURL); @@ -3272,9 +3275,9 @@ "trackingProtectionBulletTwoDescription", l10n_util::GetStringFUTF16( IDS_SETTINGS_TRACKING_PROTECTION_BULLET_TWO_DESCRIPTION, - base::ASCIIToUTF16(chrome::kCookiesSettingsHelpCenterURL))); + base::ASCIIToUTF16(chrome::kTrackingProtectionHelpCenterURL))); html_source->AddString("trackingProtectionThirdPartyCookiesLearnMoreUrl", - chrome::kCookiesSettingsHelpCenterURL); + chrome::kUserBypassHelpCenterURL); // These ones cannot be constexpr because we need to check base::FeatureList. static webui::LocalizedString kSensorsLocalizedStrings[] = {
diff --git a/chrome/browser/vr/ui_scene_creator.cc b/chrome/browser/vr/ui_scene_creator.cc index bc47435c..7045659 100644 --- a/chrome/browser/vr/ui_scene_creator.cc +++ b/chrome/browser/vr/ui_scene_creator.cc
@@ -354,16 +354,6 @@ #endif } -NOINLINE void CrashIntentionally() { - LOG(ERROR) << "Crashing VR browser"; - - static int static_variable_to_make_this_function_unique = 0; - base::debug::Alias(&static_variable_to_make_this_function_unique); - - volatile int* zero = nullptr; - *zero = 0; -} - } // namespace UiSceneCreator::UiSceneCreator(UiBrowserInterface* browser,
diff --git a/chrome/browser/web_applications/app_service/BUILD.gn b/chrome/browser/web_applications/app_service/BUILD.gn index 4ed08ed..7422833 100644 --- a/chrome/browser/web_applications/app_service/BUILD.gn +++ b/chrome/browser/web_applications/app_service/BUILD.gn
@@ -88,6 +88,7 @@ "//chrome/test:test_support", "//components/services/app_service", "//components/webapps/browser", + "//components/webapps/common", "//content/public/common", "//testing/gtest", ] @@ -107,6 +108,15 @@ "//content/test:test_support", ] } + + if (!is_chromeos_lacros) { + sources += [ "web_apps_unittest.cc" ] + deps += [ + "//chrome/browser/apps/app_service", + "//chrome/browser/apps/app_service:app_registry_cache_waiter", + "//chrome/browser/apps/app_service:test_support", + ] + } } source_set("test_support") {
diff --git a/chrome/browser/web_applications/app_service/browser_shortcuts.cc b/chrome/browser/web_applications/app_service/browser_shortcuts.cc index c323ca7e..e992b9d 100644 --- a/chrome/browser/web_applications/app_service/browser_shortcuts.cc +++ b/chrome/browser/web_applications/app_service/browser_shortcuts.cc
@@ -7,7 +7,6 @@ #include <memory> #include <utility> -#include "base/feature_list.h" #include "base/no_destructor.h" #include "chrome/browser/apps/app_service/app_icon/app_icon_factory.h" #include "chrome/browser/apps/app_service/app_icon/icon_effects.h" @@ -20,7 +19,6 @@ #include "chrome/browser/web_applications/web_app_provider.h" #include "chrome/browser/web_applications/web_app_registrar.h" #include "chrome/browser/web_applications/web_app_utils.h" -#include "chrome/common/chrome_features.h" #include "components/app_constants/constants.h" #include "components/services/app_service/public/cpp/app_types.h" #include "components/services/app_service/public/cpp/icon_types.h" @@ -82,17 +80,9 @@ } } -bool BrowserShortcuts::IsShortcut(const webapps::AppId& app_id) { - if (base::FeatureList::IsEnabled(features::kCrosWebAppShortcutUiUpdate)) { - return provider_->registrar_unsafe().IsShortcutApp(app_id); - } else { - return false; - } -} - void BrowserShortcuts::MaybePublishBrowserShortcut(const webapps::AppId& app_id, bool raw_icon_updated) { - if (!IsShortcut(app_id)) { + if (!IsAppServiceShortcut(app_id, *provider_)) { return; } const WebApp* web_app = provider_->registrar_unsafe().GetAppById(app_id); @@ -125,7 +115,7 @@ void BrowserShortcuts::RemoveShortcut(const std::string& host_app_id, const std::string& local_shortcut_id, apps::UninstallSource uninstall_source) { - if (!IsShortcut(local_shortcut_id)) { + if (!IsAppServiceShortcut(local_shortcut_id, *provider_)) { return; } @@ -172,7 +162,7 @@ void BrowserShortcuts::OnWebAppUninstalled( const webapps::AppId& app_id, webapps::WebappUninstallSource uninstall_source) { - if (!IsShortcut(app_id)) { + if (!IsAppServiceShortcut(app_id, *provider_)) { return; } apps::ShortcutPublisher::ShortcutRemoved(
diff --git a/chrome/browser/web_applications/app_service/browser_shortcuts.h b/chrome/browser/web_applications/app_service/browser_shortcuts.h index 05c364f..fc427dc4 100644 --- a/chrome/browser/web_applications/app_service/browser_shortcuts.h +++ b/chrome/browser/web_applications/app_service/browser_shortcuts.h
@@ -11,7 +11,6 @@ #include "chrome/browser/apps/app_service/app_icon/icon_key_util.h" #include "chrome/browser/apps/app_service/app_service_proxy_forward.h" #include "chrome/browser/apps/app_service/publishers/shortcut_publisher.h" -#include "chrome/browser/web_applications/web_app_id.h" #include "chrome/browser/web_applications/web_app_install_manager.h" #include "chrome/browser/web_applications/web_app_install_manager_observer.h" #include "chrome/browser/web_applications/web_app_registrar.h" @@ -47,8 +46,6 @@ void InitBrowserShortcuts(); - bool IsShortcut(const webapps::AppId& app_id); - // Publish web app identified by `app_id` as browser shortcut to the // AppService if the web app is considered as shortcut in ChromeOS. // `raw_icon_updated` should be set when the manifest raw icon has
diff --git a/chrome/browser/web_applications/app_service/publisher_helper.cc b/chrome/browser/web_applications/app_service/publisher_helper.cc index aa4211a..2a8370b 100644 --- a/chrome/browser/web_applications/app_service/publisher_helper.cc +++ b/chrome/browser/web_applications/app_service/publisher_helper.cc
@@ -4,6 +4,12 @@ #include "chrome/browser/web_applications/app_service/publisher_helper.h" +#include "base/feature_list.h" + +#include "chrome/browser/web_applications/web_app_id.h" +#include "chrome/browser/web_applications/web_app_provider.h" +#include "chrome/browser/web_applications/web_app_registrar.h" +#include "chrome/common/chrome_features.h" #include "components/services/app_service/public/cpp/app_types.h" #include "components/webapps/browser/installable/installable_metrics.h" @@ -24,4 +30,20 @@ return webapps::WebappUninstallSource::kUnknown; } } + +bool IsAppServiceShortcut(const webapps::AppId& web_app_id, + const WebAppProvider& provider) { +// TODO(crbug.com/1412708): Support Lacros. +// Currently, we will only treat shortcuts differently in ash. Lacros support +// will be added later, and we will send the flag value over to Lacros to +// determine whether we publish shortcut differently, so that there will be only +// one flag controlling the shortcut feature. On non-ChromeOS platforms, +// shortcuts will still be published as web apps. +#if BUILDFLAG(IS_CHROMEOS_ASH) + if (base::FeatureList::IsEnabled(features::kCrosWebAppShortcutUiUpdate)) { + return provider.registrar_unsafe().IsShortcutApp(web_app_id); + } +#endif + return false; +} } // namespace web_app
diff --git a/chrome/browser/web_applications/app_service/publisher_helper.h b/chrome/browser/web_applications/app_service/publisher_helper.h index 0c8857d..9872fc0b 100644 --- a/chrome/browser/web_applications/app_service/publisher_helper.h +++ b/chrome/browser/web_applications/app_service/publisher_helper.h
@@ -7,11 +7,18 @@ #include "components/services/app_service/public/cpp/app_types.h" #include "components/webapps/browser/installable/installable_metrics.h" +#include "components/webapps/common/web_app_id.h" namespace web_app { +class WebAppProvider; + // Converts |uninstall_source| to a |WebappUninstallSource|. webapps::WebappUninstallSource ConvertUninstallSourceToWebAppUninstallSource( apps::UninstallSource uninstall_source); + +bool IsAppServiceShortcut(const webapps::AppId& web_app_id, + const WebAppProvider& provider); + } // namespace web_app #endif // CHROME_BROWSER_WEB_APPLICATIONS_APP_SERVICE_PUBLISHER_HELPER_H_
diff --git a/chrome/browser/web_applications/app_service/web_app_publisher_helper.cc b/chrome/browser/web_applications/app_service/web_app_publisher_helper.cc index 3def943..f8200ecd 100644 --- a/chrome/browser/web_applications/app_service/web_app_publisher_helper.cc +++ b/chrome/browser/web_applications/app_service/web_app_publisher_helper.cc
@@ -491,6 +491,9 @@ if (!publisher_helper_) { return; } + if (IsAppServiceShortcut(app_id, *publisher_helper_->provider_)) { + return; + } apps::AppPtr app = publisher_helper_->app_notifications_.CreateAppWithHasBadgeStatus( publisher_helper_->app_type(), app_id); @@ -1364,6 +1367,9 @@ void WebAppPublisherHelper::OnWebAppFileHandlerApprovalStateChanged( const webapps::AppId& app_id) { + if (IsAppServiceShortcut(app_id, *provider_)) { + return; + } const WebApp* web_app = GetWebApp(app_id); if (web_app) { delegate_->PublishWebApp(CreateWebApp(web_app)); @@ -1371,6 +1377,9 @@ } void WebAppPublisherHelper::OnWebAppInstalled(const webapps::AppId& app_id) { + if (IsAppServiceShortcut(app_id, *provider_)) { + return; + } const WebApp* web_app = GetWebApp(app_id); if (web_app) { delegate_->PublishWebApp(CreateWebApp(web_app)); @@ -1379,6 +1388,9 @@ void WebAppPublisherHelper::OnWebAppInstalledWithOsHooks( const webapps::AppId& app_id) { + if (IsAppServiceShortcut(app_id, *provider_)) { + return; + } const WebApp* web_app = GetWebApp(app_id); if (web_app) { delegate_->PublishWebApp(CreateWebApp(web_app)); @@ -1387,6 +1399,9 @@ void WebAppPublisherHelper::OnWebAppManifestUpdated( const webapps::AppId& app_id) { + if (IsAppServiceShortcut(app_id, *provider_)) { + return; + } const WebApp* web_app = GetWebApp(app_id); if (web_app) { auto app = CreateWebApp(web_app); @@ -1402,6 +1417,9 @@ void WebAppPublisherHelper::OnWebAppUninstalled( const webapps::AppId& app_id, webapps::WebappUninstallSource uninstall_source) { + if (IsAppServiceShortcut(app_id, *provider_)) { + return; + } #if BUILDFLAG(IS_CHROMEOS) paused_apps_.MaybeRemoveApp(app_id); @@ -1426,6 +1444,9 @@ void WebAppPublisherHelper::OnWebAppLastLaunchTimeChanged( const std::string& app_id, const base::Time& last_launch_time) { + if (IsAppServiceShortcut(app_id, *provider_)) { + return; + } const WebApp* web_app = GetWebApp(app_id); if (!web_app) { return; @@ -1437,6 +1458,9 @@ void WebAppPublisherHelper::OnWebAppUserDisplayModeChanged( const webapps::AppId& app_id, mojom::UserDisplayMode user_display_mode) { + if (IsAppServiceShortcut(app_id, *provider_)) { + return; + } PublishWindowModeUpdate(app_id, registrar().GetAppEffectiveDisplayMode(app_id)); } @@ -1444,6 +1468,9 @@ void WebAppPublisherHelper::OnWebAppRunOnOsLoginModeChanged( const webapps::AppId& app_id, RunOnOsLoginMode run_on_os_login_mode) { + if (IsAppServiceShortcut(app_id, *provider_)) { + return; + } PublishRunOnOsLoginModeUpdate(app_id, run_on_os_login_mode); } @@ -1453,6 +1480,9 @@ void WebAppPublisherHelper::OnWebAppDisabledStateChanged( const webapps::AppId& app_id, bool is_disabled) { + if (IsAppServiceShortcut(app_id, *provider_)) { + return; + } const WebApp* web_app = GetWebApp(app_id); if (!web_app) { return; @@ -1482,6 +1512,9 @@ // called and this method will update visibility and readiness of the newly // enabled app. if (provider_->policy_manager().IsWebAppInDisabledList(id)) { + if (IsAppServiceShortcut(id, *provider_)) { + continue; + } const WebApp* web_app = GetWebApp(id); if (!web_app) { continue; @@ -1516,6 +1549,9 @@ app_notifications_.RemoveNotification(notification_id); for (const auto& app_id : app_ids) { + if (IsAppServiceShortcut(app_id, *provider_)) { + continue; + } auto app = app_notifications_.CreateAppWithHasBadgeStatus(app_type(), app_id); DCHECK(app->has_badge.has_value()); @@ -1537,7 +1573,9 @@ if (!app_id) { return; } - + if (IsAppServiceShortcut(*app_id, *provider_)) { + return; + } auto result = media_requests_.UpdateCameraState(*app_id, web_contents, is_capturing_video); delegate_->ModifyWebAppCapabilityAccess(*app_id, result.camera, @@ -1551,7 +1589,9 @@ if (!app_id) { return; } - + if (IsAppServiceShortcut(*app_id, *provider_)) { + return; + } auto result = media_requests_.UpdateMicrophoneState(*app_id, web_contents, is_capturing_audio); delegate_->ModifyWebAppCapabilityAccess(*app_id, result.camera, @@ -1571,6 +1611,9 @@ } for (const WebApp& web_app : registrar().GetApps()) { + if (IsAppServiceShortcut(web_app.app_id(), *provider_)) { + continue; + } if (primary_pattern.Matches(web_app.start_url())) { auto app = std::make_unique<apps::App>(app_type(), web_app.app_id()); app->permissions = CreatePermissions(&web_app); @@ -1581,10 +1624,13 @@ void WebAppPublisherHelper::OnWebAppSettingsPolicyChanged() { DCHECK(!IsShuttingDown()); - // TODO(crbug.com/1293961): when more features are added to policy manager, we - // need to remove per-feature updates in favor of a full refresh, as each + // TODO(crbug.com/1293961): when more fseatures are added to policy manager, + // we need to remove per-feature updates in favor of a full refresh, as each // feature multiplicatively increases the complexity of this operation. for (const WebApp& web_app : registrar().GetApps()) { + if (IsAppServiceShortcut(web_app.app_id(), *provider_)) { + continue; + } const auto login_mode = registrar().GetAppRunOnOsLoginMode(web_app.app_id()); @@ -1660,6 +1706,9 @@ const WebApp* WebAppPublisherHelper::GetWebApp( const webapps::AppId& app_id) const { + if (IsAppServiceShortcut(app_id, *provider_)) { + return nullptr; + } return registrar().GetAppById(app_id); } @@ -1783,6 +1832,9 @@ bool WebAppPublisherHelper::MaybeAddNotification( const std::string& app_id, const std::string& notification_id) { + if (IsAppServiceShortcut(app_id, *provider_)) { + return false; + } const WebApp* web_app = GetWebApp(app_id); if (!web_app) { return false;
diff --git a/chrome/browser/web_applications/app_service/web_app_publisher_helper_unittest.cc b/chrome/browser/web_applications/app_service/web_app_publisher_helper_unittest.cc index f1b7f76..292eab4 100644 --- a/chrome/browser/web_applications/app_service/web_app_publisher_helper_unittest.cc +++ b/chrome/browser/web_applications/app_service/web_app_publisher_helper_unittest.cc
@@ -16,6 +16,7 @@ #include "base/traits_bag.h" #include "build/buildflag.h" #include "build/chromeos_buildflags.h" +#include "chrome/browser/content_settings/host_content_settings_map_factory.h" #include "chrome/browser/web_applications/test/web_app_install_test_utils.h" #include "chrome/browser/web_applications/test/web_app_test_utils.h" #include "chrome/browser/web_applications/web_app.h" @@ -25,6 +26,7 @@ #include "chrome/browser/web_applications/web_app_provider.h" #include "chrome/browser/web_applications/web_app_registrar.h" #include "chrome/browser/web_applications/web_app_registry_update.h" +#include "chrome/common/chrome_features.h" #include "chrome/test/base/testing_profile.h" #include "components/account_id/account_id.h" #include "components/services/app_service/public/cpp/app_types.h" @@ -34,23 +36,38 @@ #include "components/services/app_service/public/cpp/intent_filter.h" #include "components/services/app_service/public/cpp/intent_util.h" #include "components/webapps/browser/installable/installable_metrics.h" +#include "components/webapps/common/web_app_id.h" #include "content/public/common/content_features.h" #include "content/public/test/browser_task_environment.h" #include "testing/gtest/include/gtest/gtest.h" #include "url/gurl.h" +#if BUILDFLAG(IS_CHROMEOS) +#include "chrome/browser/badging/badge_manager.h" +#include "chrome/browser/badging/badge_manager_factory.h" +#include "chrome/browser/notifications/notification_display_service_factory.h" +#include "chrome/browser/notifications/notification_display_service_tester.h" +#include "chrome/browser/notifications/stub_notification_display_service.h" +#include "components/ukm/test_ukm_recorder.h" +#endif + namespace web_app { namespace { class NoOpWebAppPublisherDelegate : public WebAppPublisherHelper::Delegate { + public: + int num_publish_called() { return num_publish_called_; } + + private: // WebAppPublisherHelper::Delegate: void PublishWebApps(std::vector<apps::AppPtr> apps) override {} - void PublishWebApp(apps::AppPtr app) override {} + void PublishWebApp(apps::AppPtr app) override { num_publish_called_++; } void ModifyWebAppCapabilityAccess( const std::string& app_id, absl::optional<bool> accessing_camera, absl::optional<bool> accessing_microphone) override {} + int num_publish_called_ = 0; }; bool HandlesIntent(const apps::AppPtr& app, const apps::IntentPtr& intent) { @@ -88,6 +105,22 @@ Profile* profile() { return profile_.get(); } + webapps::AppId CreateShortcut(const GURL& shortcut_url, + const std::string& shortcut_name) { + // Create a web app entry without scope, which would be recognised + // as ShortcutApp in the web app system. + auto web_app_info = std::make_unique<WebAppInstallInfo>(); + web_app_info->title = base::UTF8ToUTF16(shortcut_name); + web_app_info->start_url = shortcut_url; + + webapps::AppId app_id = + test::InstallWebApp(profile(), std::move(web_app_info)); + CHECK( + WebAppProvider::GetForTest(profile())->registrar_unsafe().IsShortcutApp( + app_id)); + return app_id; + } + content::BrowserTaskEnvironment task_environment_; std::unique_ptr<TestingProfile> profile_; NoOpWebAppPublisherDelegate no_op_delegate_; @@ -331,6 +364,207 @@ EXPECT_EQ(app->install_reason, apps::InstallReason::kSync); } +#if BUILDFLAG(IS_CHROMEOS_ASH) +TEST_F(WebAppPublisherHelperTest, UpdateShortcutDoesNotPublishDelta) { + base::test::ScopedFeatureList scoped_feature_list; + scoped_feature_list.InitAndEnableFeature( + features::kCrosWebAppShortcutUiUpdate); + EXPECT_EQ(0, no_op_delegate_.num_publish_called()); + GURL shortcut_url("https://example-shortcut.com/"); + auto shortcut_id = CreateShortcut(shortcut_url, "Shortcut"); + EXPECT_EQ(0, no_op_delegate_.num_publish_called()); + + provider_->install_manager().NotifyWebAppInstalled(shortcut_id); + EXPECT_EQ(0, no_op_delegate_.num_publish_called()); + + provider_->install_manager().NotifyWebAppInstalledWithOsHooks(shortcut_id); + EXPECT_EQ(0, no_op_delegate_.num_publish_called()); + + provider_->install_manager().NotifyWebAppSourceRemoved(shortcut_id); + EXPECT_EQ(0, no_op_delegate_.num_publish_called()); + + provider_->install_manager().NotifyWebAppUninstalled( + shortcut_id, webapps::WebappUninstallSource::kUnknown); + EXPECT_EQ(0, no_op_delegate_.num_publish_called()); + + provider_->install_manager().NotifyWebAppManifestUpdated(shortcut_id); + EXPECT_EQ(0, no_op_delegate_.num_publish_called()); + + provider_->registrar_unsafe().NotifyWebAppFileHandlerApprovalStateChanged( + shortcut_id); + EXPECT_EQ(0, no_op_delegate_.num_publish_called()); + + provider_->registrar_unsafe().NotifyWebAppDisabledStateChanged(shortcut_id, + false); + EXPECT_EQ(0, no_op_delegate_.num_publish_called()); + + // TODO(crbug.com/1412708): Test OnWebAppsDisabledModeChanged; + + provider_->registrar_unsafe().NotifyWebAppLastLaunchTimeChanged(shortcut_id, + base::Time()); + EXPECT_EQ(0, no_op_delegate_.num_publish_called()); + + provider_->registrar_unsafe().NotifyWebAppUserDisplayModeChanged( + shortcut_id, mojom::UserDisplayMode::kBrowser); + EXPECT_EQ(0, no_op_delegate_.num_publish_called()); + + provider_->registrar_unsafe().NotifyWebAppRunOnOsLoginModeChanged( + shortcut_id, RunOnOsLoginMode::kNotRun); + EXPECT_EQ(0, no_op_delegate_.num_publish_called()); + + provider_->registrar_unsafe().NotifyWebAppSettingsPolicyChanged(); + EXPECT_EQ(0, no_op_delegate_.num_publish_called()); + + // Stub notification service doesn't notify display, use the real one for + // testing. + auto* notification_display_service_ = + NotificationDisplayServiceFactory::GetForProfile(profile()); + const GURL origin = shortcut_url.DeprecatedGetOriginAsURL(); + const std::string notification_id = "notification-id"; + auto notification = std::make_unique<message_center::Notification>( + message_center::NOTIFICATION_TYPE_SIMPLE, notification_id, + std::u16string(), std::u16string(), ui::ImageModel(), + base::UTF8ToUTF16(origin.host()), origin, + message_center::NotifierId(origin), + message_center::RichNotificationData(), nullptr); + auto metadata = std::make_unique<PersistentNotificationMetadata>(); + metadata->service_worker_scope = shortcut_url.GetWithoutFilename(); + notification_display_service_->Display( + NotificationHandler::Type::WEB_PERSISTENT, *notification, + std::move(metadata)); + EXPECT_EQ(0, no_op_delegate_.num_publish_called()); + + auto* stub_display_service = static_cast<StubNotificationDisplayService*>( + NotificationDisplayServiceFactory::GetInstance()->SetTestingFactoryAndUse( + profile(), base::BindRepeating( + &StubNotificationDisplayService::FactoryForTests))); + stub_display_service->AddObserver(publisher_.get()); + stub_display_service->Display(NotificationHandler::Type::WEB_PERSISTENT, + *notification, nullptr); + stub_display_service->ProcessNotificationOperation( + NotificationOperation::kClose, NotificationHandler::Type::WEB_PERSISTENT, + origin, notification_id, absl::nullopt, absl::nullopt, true); + EXPECT_EQ(0, no_op_delegate_.num_publish_called()); + stub_display_service->RemoveObserver(publisher_.get()); + + HostContentSettingsMap* content_settings_map = + HostContentSettingsMapFactory::GetForProfile(profile()); + content_settings_map->SetContentSettingDefaultScope( + shortcut_url, shortcut_url, ContentSettingsType::MEDIASTREAM_CAMERA, + CONTENT_SETTING_ALLOW); + EXPECT_EQ(0, no_op_delegate_.num_publish_called()); + + ukm::TestUkmRecorder test_recorder; + badging::BadgeManagerFactory::GetForProfile(profile())->SetBadgeForTesting( + shortcut_id, 1, &test_recorder); + EXPECT_EQ(0, no_op_delegate_.num_publish_called()); +} +#endif + +// For non ChromeOS platforms or when the kCrosWebAppShortcutUiUpdate is off, +// we still want to publish shortcuts as web app. This is checking old behaviour +// does not break. +TEST_F(WebAppPublisherHelperTest, UpdateShortcutDoesPublishDelta) { +#if BUILDFLAG(IS_CHROMEOS_ASH) + base::test::ScopedFeatureList scoped_feature_list; + scoped_feature_list.InitAndDisableFeature( + features::kCrosWebAppShortcutUiUpdate); +#endif // BUILDFLAG(IS_CHROMEOS_ASH) + + int expected_called_num = 0; + EXPECT_EQ(expected_called_num, no_op_delegate_.num_publish_called()); + GURL shortcut_url("https://example-shortcut.com/"); + auto shortcut_id = CreateShortcut(shortcut_url, "Shortcut"); + EXPECT_EQ(++expected_called_num, no_op_delegate_.num_publish_called()); + + provider_->install_manager().NotifyWebAppInstalled(shortcut_id); + EXPECT_EQ(++expected_called_num, no_op_delegate_.num_publish_called()); + + provider_->install_manager().NotifyWebAppInstalledWithOsHooks(shortcut_id); + EXPECT_EQ(++expected_called_num, no_op_delegate_.num_publish_called()); + + provider_->install_manager().NotifyWebAppUninstalled( + shortcut_id, webapps::WebappUninstallSource::kUnknown); + EXPECT_EQ(++expected_called_num, no_op_delegate_.num_publish_called()); + + provider_->install_manager().NotifyWebAppManifestUpdated(shortcut_id); + EXPECT_EQ(++expected_called_num, no_op_delegate_.num_publish_called()); + + provider_->registrar_unsafe().NotifyWebAppFileHandlerApprovalStateChanged( + shortcut_id); + EXPECT_EQ(++expected_called_num, no_op_delegate_.num_publish_called()); + +#if BUILDFLAG(IS_CHROMEOS) + provider_->registrar_unsafe().NotifyWebAppDisabledStateChanged(shortcut_id, + false); + EXPECT_EQ(++expected_called_num, no_op_delegate_.num_publish_called()); + // TODO(crbug.com/1412708): Test OnWebAppsDisabledModeChanged; +#endif // BUILDFLAG(IS_CHROMEOS) + + provider_->registrar_unsafe().NotifyWebAppLastLaunchTimeChanged(shortcut_id, + base::Time()); + EXPECT_EQ(++expected_called_num, no_op_delegate_.num_publish_called()); + + provider_->registrar_unsafe().NotifyWebAppUserDisplayModeChanged( + shortcut_id, mojom::UserDisplayMode::kBrowser); + EXPECT_EQ(++expected_called_num, no_op_delegate_.num_publish_called()); + + provider_->registrar_unsafe().NotifyWebAppRunOnOsLoginModeChanged( + shortcut_id, RunOnOsLoginMode::kNotRun); + EXPECT_EQ(++expected_called_num, no_op_delegate_.num_publish_called()); + + provider_->registrar_unsafe().NotifyWebAppSettingsPolicyChanged(); + EXPECT_EQ(++expected_called_num, no_op_delegate_.num_publish_called()); + +#if BUILDFLAG(IS_CHROMEOS) + // Stub notification service doesn't notify display, use the real one for + // testing. + auto* notification_display_service_ = + NotificationDisplayServiceFactory::GetForProfile(profile()); + const GURL origin = shortcut_url.DeprecatedGetOriginAsURL(); + const std::string notification_id = "notification-id"; + auto notification = std::make_unique<message_center::Notification>( + message_center::NOTIFICATION_TYPE_SIMPLE, notification_id, + std::u16string(), std::u16string(), ui::ImageModel(), + base::UTF8ToUTF16(origin.host()), origin, + message_center::NotifierId(origin), + message_center::RichNotificationData(), nullptr); + auto metadata = std::make_unique<PersistentNotificationMetadata>(); + metadata->service_worker_scope = shortcut_url.GetWithoutFilename(); + notification_display_service_->Display( + NotificationHandler::Type::WEB_PERSISTENT, *notification, + std::move(metadata)); + EXPECT_EQ(++expected_called_num, no_op_delegate_.num_publish_called()); + + auto* stub_display_service = static_cast<StubNotificationDisplayService*>( + NotificationDisplayServiceFactory::GetInstance()->SetTestingFactoryAndUse( + profile(), base::BindRepeating( + &StubNotificationDisplayService::FactoryForTests))); + stub_display_service->AddObserver(publisher_.get()); + stub_display_service->Display(NotificationHandler::Type::WEB_PERSISTENT, + *notification, nullptr); + stub_display_service->ProcessNotificationOperation( + NotificationOperation::kClose, NotificationHandler::Type::WEB_PERSISTENT, + origin, notification_id, absl::nullopt, absl::nullopt, true); + EXPECT_EQ(++expected_called_num, no_op_delegate_.num_publish_called()); + stub_display_service->RemoveObserver(publisher_.get()); +#endif // BUILDFLAG(IS_CHROMEOS) + + HostContentSettingsMap* content_settings_map = + HostContentSettingsMapFactory::GetForProfile(profile()); + content_settings_map->SetContentSettingDefaultScope( + shortcut_url, shortcut_url, ContentSettingsType::MEDIASTREAM_CAMERA, + CONTENT_SETTING_ALLOW); + EXPECT_EQ(++expected_called_num, no_op_delegate_.num_publish_called()); + +#if BUILDFLAG(IS_CHROMEOS) + ukm::TestUkmRecorder test_recorder; + badging::BadgeManagerFactory::GetForProfile(profile())->SetBadgeForTesting( + shortcut_id, 1, &test_recorder); + EXPECT_EQ(++expected_called_num, no_op_delegate_.num_publish_called()); +#endif // BUILDFLAG(IS_CHROMEOS) +} + class WebAppPublisherHelperTest_WebLockScreenApi : public WebAppPublisherHelperTest { base::test::ScopedFeatureList features{features::kWebLockScreenApi};
diff --git a/chrome/browser/web_applications/app_service/web_apps.cc b/chrome/browser/web_applications/app_service/web_apps.cc index ffe78f2..9f04e34 100644 --- a/chrome/browser/web_applications/app_service/web_apps.cc +++ b/chrome/browser/web_applications/app_service/web_apps.cc
@@ -14,6 +14,7 @@ #include "chrome/browser/apps/app_service/app_launch_params.h" #include "chrome/browser/apps/app_service/app_service_proxy.h" #include "chrome/browser/profiles/profile.h" +#include "chrome/browser/web_applications/app_service/publisher_helper.h" #include "chrome/browser/web_applications/web_app.h" #include "chrome/browser/web_applications/web_app_command_scheduler.h" #include "chrome/browser/web_applications/web_app_provider.h" @@ -256,7 +257,11 @@ if (apps.empty()) { return; } - + // Make sure none of the shortcuts that are supposed to be published as + // apps::Shortcut instead of apps::App get published here. + for (auto& app : apps) { + CHECK(!IsAppServiceShortcut(app->app_id, *provider_)); + } #if BUILDFLAG(IS_CHROMEOS_ASH) // This is for prototyping and testing only. It is to provide an easy way to // simulate web app promise icon behaviour for the UI/ client development of @@ -286,7 +291,9 @@ if (!is_ready_) { return; } - + // Make sure none of the shortcuts that are supposed to be published as + // apps::Shortcut instead of apps::App get published here. + CHECK(!IsAppServiceShortcut(app->app_id, *provider_)); #if BUILDFLAG(IS_CHROMEOS_ASH) bool is_projector = app->app_id == ash::kChromeUIUntrustedProjectorSwaAppId; @@ -316,6 +323,7 @@ const std::string& app_id, absl::optional<bool> accessing_camera, absl::optional<bool> accessing_microphone) { + CHECK(!IsAppServiceShortcut(app_id, *provider_)); apps::AppPublisher::ModifyCapabilityAccess( app_id, std::move(accessing_camera), std::move(accessing_microphone)); } @@ -325,6 +333,9 @@ std::vector<apps::AppPtr> apps; for (const WebApp& web_app : provider_->registrar_unsafe().GetApps()) { + if (IsAppServiceShortcut(web_app.app_id(), *provider_)) { + continue; + } apps.push_back(publisher_helper().CreateWebApp(&web_app)); } return apps;
diff --git a/chrome/browser/web_applications/app_service/web_apps_unittest.cc b/chrome/browser/web_applications/app_service/web_apps_unittest.cc new file mode 100644 index 0000000..635a13e3 --- /dev/null +++ b/chrome/browser/web_applications/app_service/web_apps_unittest.cc
@@ -0,0 +1,141 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +#include "chrome/browser/web_applications/app_service/web_apps.h" + +#include "base/functional/callback.h" +#include "base/run_loop.h" +#include "base/scoped_observation.h" +#include "base/test/scoped_feature_list.h" +#include "base/test/test_future.h" +#include "chrome/browser/apps/app_service/app_registry_cache_waiter.h" +#include "chrome/browser/apps/app_service/app_service_proxy.h" +#include "chrome/browser/apps/app_service/app_service_proxy_factory.h" +#include "chrome/browser/apps/app_service/app_service_test.h" +#include "chrome/browser/profiles/profile.h" +#include "chrome/browser/web_applications/test/fake_web_app_provider.h" +#include "chrome/browser/web_applications/test/web_app_install_test_utils.h" +#include "chrome/common/chrome_features.h" +#include "chrome/test/base/testing_profile.h" +#include "content/public/test/browser_task_environment.h" +#include "testing/gtest/include/gtest/gtest.h" + +namespace web_app { + +class WebAppsTest : public testing::Test { + public: + // testing::Test implementation. + void SetUp() override { + profile_ = std::make_unique<TestingProfile>(); + test::AwaitStartWebAppProviderAndSubsystems(profile()); + } + + std::string CreateShortcut(const GURL& shortcut_url, + const std::string& shortcut_name) { + // Create a web app entry without scope, which would be recognised + // as ShortcutApp in the web app system. + auto web_app_info = std::make_unique<WebAppInstallInfo>(); + web_app_info->title = base::UTF8ToUTF16(shortcut_name); + web_app_info->start_url = shortcut_url; + + std::string app_id = + test::InstallWebApp(profile(), std::move(web_app_info)); + CHECK( + WebAppProvider::GetForTest(profile())->registrar_unsafe().IsShortcutApp( + app_id)); + return app_id; + } + + std::string CreateWebApp(const GURL& app_url, const std::string& app_name) { + // Create a web app entry with scope, which would be recognised + // as normal web app in the web app system. + auto web_app_info = std::make_unique<WebAppInstallInfo>(); + web_app_info->title = base::UTF8ToUTF16(app_name); + web_app_info->start_url = app_url; + web_app_info->scope = app_url; + + std::string app_id = + test::InstallWebApp(profile(), std::move(web_app_info)); + CHECK(!WebAppProvider::GetForTest(profile()) + ->registrar_unsafe() + .IsShortcutApp(app_id)); + return app_id; + } + + void InitializeWebAppPublisher() { + apps::AppServiceTest app_service_test; + app_service_test.SetUp(profile()); + } + + Profile* profile() { return profile_.get(); } + + private: + content::BrowserTaskEnvironment task_environment_; + + std::unique_ptr<TestingProfile> profile_; +}; + +#if BUILDFLAG(IS_CHROMEOS_ASH) +TEST_F(WebAppsTest, ShortcutNotPublishedAsWebApp) { + base::test::ScopedFeatureList scoped_feature_list; + scoped_feature_list.InitAndEnableFeature( + features::kCrosWebAppShortcutUiUpdate); + auto app_id = CreateWebApp(GURL("https://example.com/"), "App"); + auto shortcut_id = + CreateShortcut(GURL("https://example-shortcut.com/"), "Shortcut"); + + // Reinitialize web app publisher to verify web app initialization only + // publish web apps. + apps::AppUpdateWaiter waiter(profile(), app_id); + InitializeWebAppPublisher(); + waiter.Wait(); + + apps::AppRegistryCache& cache = + apps::AppServiceProxyFactory::GetForProfile(profile()) + ->AppRegistryCache(); + size_t num_app_after_web_app_init = cache.GetAllApps().size(); + + // Install new web app and verify only web app get published. + auto new_app_id = CreateWebApp(GURL("https://new-example.com/"), "NewApp"); + auto new_shortcut_id = + CreateShortcut(GURL("https://new-example-shortcut.com/"), "NewShortcut"); + EXPECT_EQ(num_app_after_web_app_init + 1, cache.GetAllApps().size()); + EXPECT_EQ(cache.GetAppType(new_app_id), apps::AppType::kWeb); +} +#endif + +// For non ChromeOS platforms or when the kCrosWebAppShortcutUiUpdate is off, +// we still want to publish shortcuts as web app. This is checking old behaviour +// does not break. +TEST_F(WebAppsTest, ShortcutPublishedAsWebApp) { +#if BUILDFLAG(IS_CHROMEOS_ASH) + base::test::ScopedFeatureList scoped_feature_list; + scoped_feature_list.InitAndDisableFeature( + features::kCrosWebAppShortcutUiUpdate); +#endif + auto app_id = CreateWebApp(GURL("https://example.com/"), "App"); + auto shortcut_id = + CreateShortcut(GURL("https://example-shortcut.com/"), "Shortcut"); + + // Reinitialize web app publisher to verify web app initialization only + // publish web apps. + apps::AppUpdateWaiter waiter(profile(), app_id); + apps::AppUpdateWaiter shortcut_waiter(profile(), shortcut_id); + InitializeWebAppPublisher(); + waiter.Wait(); + shortcut_waiter.Wait(); + + apps::AppRegistryCache& cache = + apps::AppServiceProxyFactory::GetForProfile(profile()) + ->AppRegistryCache(); + size_t num_app_after_web_app_init = cache.GetAllApps().size(); + + // Install new web app and verify only web app get published. + auto new_app_id = CreateWebApp(GURL("https://new-example.com/"), "NewApp"); + auto new_shortcut_id = + CreateShortcut(GURL("https://new-example-shortcut.com/"), "NewShortcut"); + EXPECT_EQ(num_app_after_web_app_init + 2, cache.GetAllApps().size()); + EXPECT_EQ(cache.GetAppType(new_shortcut_id), apps::AppType::kWeb); + EXPECT_EQ(cache.GetAppType(new_app_id), apps::AppType::kWeb); +} +} // namespace web_app
diff --git a/chrome/browser/web_applications/web_app_install_info.h b/chrome/browser/web_applications/web_app_install_info.h index 61e6d39..7592ae4 100644 --- a/chrome/browser/web_applications/web_app_install_info.h +++ b/chrome/browser/web_applications/web_app_install_info.h
@@ -33,6 +33,9 @@ #include "ui/gfx/geometry/size.h" #include "url/gurl.h" +static_assert(BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)); + class SkBitmap; // A map of icon urls to the bitmaps provided by that url.
diff --git a/chrome/build/android-arm32.pgo.txt b/chrome/build/android-arm32.pgo.txt index c070a50..9dcea0f 100644 --- a/chrome/build/android-arm32.pgo.txt +++ b/chrome/build/android-arm32.pgo.txt
@@ -1 +1 @@ -chrome-android32-main-1695686089-b818f7a4fcae1d2b71c52ee1f97f971820511889.profdata +chrome-android32-main-1695707450-edde4dfa3dcc28ace617bbbbf0e5f268cffc362a.profdata
diff --git a/chrome/build/android-arm64.pgo.txt b/chrome/build/android-arm64.pgo.txt index 0b44a4d4..b32f1508 100644 --- a/chrome/build/android-arm64.pgo.txt +++ b/chrome/build/android-arm64.pgo.txt
@@ -1 +1 @@ -chrome-android64-main-1695686089-a6031d3e58908d65dd7fefdce8f0b2098db364bc.profdata +chrome-android64-main-1695707450-232bda16de13fa05a047cbda6c827e99437fe990.profdata
diff --git a/chrome/build/linux.pgo.txt b/chrome/build/linux.pgo.txt index bf03b4c..ac41f53 100644 --- a/chrome/build/linux.pgo.txt +++ b/chrome/build/linux.pgo.txt
@@ -1 +1 @@ -chrome-linux-main-1695686089-0abd28a7afeaef1d74538bbcc14446034bd7b354.profdata +chrome-linux-main-1695707450-2612bb6a2dc072fb8ad8e811c6e3086b2d20d5b9.profdata
diff --git a/chrome/build/mac-arm.pgo.txt b/chrome/build/mac-arm.pgo.txt index 9222e24..d288c46 100644 --- a/chrome/build/mac-arm.pgo.txt +++ b/chrome/build/mac-arm.pgo.txt
@@ -1 +1 @@ -chrome-mac-arm-main-1695693373-77f2c3286f859d095bc135cf979a9d6e010879fd.profdata +chrome-mac-arm-main-1695715152-8bb0af27a8b9a98049e5ac528c230bf80c716d1b.profdata
diff --git a/chrome/build/mac.pgo.txt b/chrome/build/mac.pgo.txt index d8879133..e80ec22 100644 --- a/chrome/build/mac.pgo.txt +++ b/chrome/build/mac.pgo.txt
@@ -1 +1 @@ -chrome-mac-main-1695686089-8fd56b66cc0077094ecfa2e27104a8bbedfca19a.profdata +chrome-mac-main-1695707450-5b8ccb61396ec2a48857951bab119d6f5da68238.profdata
diff --git a/chrome/build/win-arm64.pgo.txt b/chrome/build/win-arm64.pgo.txt index 70add03..f0340aa8 100644 --- a/chrome/build/win-arm64.pgo.txt +++ b/chrome/build/win-arm64.pgo.txt
@@ -1 +1 @@ -chrome-win-arm64-main-1695686089-11b243d8de9ed5002dc9eafb6dde8b25ae27d744.profdata +chrome-win-arm64-main-1695707450-94bdf2aaa3fb876b7b02dc13f27c56c879d477b4.profdata
diff --git a/chrome/build/win32.pgo.txt b/chrome/build/win32.pgo.txt index 3911c5f9..cfb3995 100644 --- a/chrome/build/win32.pgo.txt +++ b/chrome/build/win32.pgo.txt
@@ -1 +1 @@ -chrome-win32-main-1695675537-45bcc26294e0efde5935dacba75e40fd4623b1d2.profdata +chrome-win32-main-1695696990-189651c439acf01a010074a2802ac4028bef0a73.profdata
diff --git a/chrome/build/win64.pgo.txt b/chrome/build/win64.pgo.txt index 8ce5675..21a8af9 100644 --- a/chrome/build/win64.pgo.txt +++ b/chrome/build/win64.pgo.txt
@@ -1 +1 @@ -chrome-win64-main-1695686089-a6ed345156e0ae859891b7437ada3ba756544b29.profdata +chrome-win64-main-1695707450-367d7c26f85b524fd9ea2af759b9c1a748103dc6.profdata
diff --git a/chrome/common/url_constants.cc b/chrome/common/url_constants.cc index 39e002f..6801b8c6 100644 --- a/chrome/common/url_constants.cc +++ b/chrome/common/url_constants.cc
@@ -207,6 +207,9 @@ const char kLearnMoreReportingURL[] = "https://support.google.com/chrome/?p=ui_usagestat"; +const char kManage3pcHelpCenterURL[] = + "https://support.google.com/chrome/?p=manage_tp_cookies"; + const char kManagedUiLearnMoreUrl[] = #if BUILDFLAG(IS_CHROMEOS_ASH) "https://support.google.com/chromebook/?p=is_chrome_managed"; @@ -344,6 +347,12 @@ const char kSyncTrustedVaultLearnMoreURL[] = "https://support.google.com/accounts?p=settings_password_ode"; +const char kTrackingProtectionHelpCenterURL[] = + "https://support.google.com/chrome/?p=tracking_protection"; + +const char kUserBypassHelpCenterURL[] = + "https://support.google.com/chrome/?p=user_bypass"; + const char kUpgradeHelpCenterBaseURL[] = "https://support.google.com/installer/?product=" "{8A69D345-D564-463c-AFF1-A69D9E530F96}&error=";
diff --git a/chrome/common/url_constants.h b/chrome/common/url_constants.h index ac67ad5..c08f814 100644 --- a/chrome/common/url_constants.h +++ b/chrome/common/url_constants.h
@@ -219,6 +219,9 @@ // first run dialog. extern const char kLearnMoreReportingURL[]; +// The URL for the Help Center page about managing third-party cookies. +extern const char kManage3pcHelpCenterURL[]; + // The URL for the Learn More page about policies and enterprise enrollment. extern const char kManagedUiLearnMoreUrl[]; @@ -318,6 +321,12 @@ // The URL for the "Learn more" link for the trusted vault sync passphrase. extern const char kSyncTrustedVaultLearnMoreURL[]; +// The URL for the Help Center page about Tracking Protection settings. +extern const char kTrackingProtectionHelpCenterURL[]; + +// The URL for the Help Center page about User Bypass. +extern const char kUserBypassHelpCenterURL[]; + extern const char kUpgradeHelpCenterBaseURL[]; // The URL for the "Learn more" link for nearby share.
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn index f0ca99d..7fbd8fc 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn
@@ -4007,7 +4007,6 @@ } } - # TODO(https://crbug.com/1218633): Fix the mixin and enable tests on LaCrOS and desktop. if (enable_supervised_users) { sources += [ "../browser/supervised_user/supervised_user_navigation_throttle_browsertest.cc", @@ -4021,10 +4020,8 @@ "../browser/supervised_user/supervised_user_extension_browsertest.cc", "../browser/ui/views/supervised_user/extension_install_blocked_by_parent_dialog_browsertest.cc", "../browser/ui/views/supervised_user/parent_permission_dialog_view_browsertest.cc", + "../browser/ui/views/supervised_user/parent_permission_extension_flow_view_browsertest.cc", ] - if (is_chromeos_ash) { - sources += [ "../browser/ui/views/supervised_user/parent_permission_extension_flow_view_browsertest.cc" ] - } } deps += [
diff --git a/chrome/test/chromedriver/chrome/web_view_impl.cc b/chrome/test/chromedriver/chrome/web_view_impl.cc index f18205c..1da047f 100644 --- a/chrome/test/chromedriver/chrome/web_view_impl.cc +++ b/chrome/test/chromedriver/chrome/web_view_impl.cc
@@ -748,9 +748,14 @@ params.Set("uniqueContextId", context_id); } params.Set("arguments", std::move(nodes)); - params.Set("generateWebDriverValue", true); params.Set("awaitPromise", true); params.Set("objectGroup", object_group.name()); + + base::Value::Dict serialization_options; + serialization_options.Set("serialization", "deep"); + + params.Set("serializationOptions", std::move(serialization_options)); + base::Value::Dict cmd_result; status = client_->SendCommandAndGetResultWithTimeout( @@ -770,24 +775,24 @@ } base::Value::List* maybe_received_list = - cmd_result.FindListByDottedPath("result.webDriverValue.value"); + cmd_result.FindListByDottedPath("result.deepSerializedValue.value"); if (!maybe_received_list || maybe_received_list->empty()) { return Status(kUnknownError, - "result.webdriverValue.value list is missing or empty in " - "Runtime.callFunctionOn response"); + "result.deepSerializedValue.value list is missing or empty " + "in Runtime.callFunctionOn response"); } base::Value::List& received_list = *maybe_received_list; if (!received_list[0].is_dict()) { return Status(kUnknownError, - "first element in result.webDriverValue.value list must be " - "a dictionary"); + "first element in result.deepSerializedValue.value list must " + "be a dictionary"); } std::string* serialized_value = received_list[0].GetDict().FindString("value"); if (!serialized_value) { return Status(kUnknownError, - "first element in result.webDriverValue.value list must " + "first element in result.deepSerializedValue.value list must " "contain a string"); } absl::optional<base::Value> maybe_call_result =
diff --git a/chrome/test/chromedriver/chrome/web_view_impl_unittest.cc b/chrome/test/chromedriver/chrome/web_view_impl_unittest.cc index c4201d26..751dbde 100644 --- a/chrome/test/chromedriver/chrome/web_view_impl_unittest.cc +++ b/chrome/test/chromedriver/chrome/web_view_impl_unittest.cc
@@ -95,7 +95,7 @@ serialized_list.Append(std::move(dict)); serialized_list.Append(std::move(node)); base::Value::Dict response; - response.SetByDottedPath("result.webDriverValue.value", + response.SetByDottedPath("result.deepSerializedValue.value", std::move(serialized_list)); return response; } @@ -131,7 +131,7 @@ } base::Value::Dict response; - response.SetByDottedPath("result.webDriverValue.value", + response.SetByDottedPath("result.deepSerializedValue.value", std::move(serialized_list)); return response; } @@ -999,7 +999,7 @@ serialized_list.Append(std::move(node)); serialized_list.Append(std::move(weak_ref)); base::Value::Dict response; - response.SetByDottedPath("result.webDriverValue.value", + response.SetByDottedPath("result.deepSerializedValue.value", std::move(serialized_list)); std::unique_ptr<FakeDevToolsClient> client_uptr = @@ -1040,7 +1040,7 @@ serialized_list.Append(std::move(weak_ref)); serialized_list.Append(std::move(node)); base::Value::Dict response; - response.SetByDottedPath("result.webDriverValue.value", + response.SetByDottedPath("result.deepSerializedValue.value", std::move(serialized_list)); std::unique_ptr<FakeDevToolsClient> client_uptr = @@ -1078,7 +1078,7 @@ serialized_list.Append(std::move(dict)); serialized_list.Append(std::move(weak_ref)); base::Value::Dict response; - response.SetByDottedPath("result.webDriverValue.value", + response.SetByDottedPath("result.deepSerializedValue.value", std::move(serialized_list)); std::unique_ptr<FakeDevToolsClient> client_uptr =
diff --git a/chrome/test/data/webui/chromeos/os_feedback_ui/search_page_test.js b/chrome/test/data/webui/chromeos/os_feedback_ui/search_page_test.js index 69fb8a4..fcba2b1 100644 --- a/chrome/test/data/webui/chromeos/os_feedback_ui/search_page_test.js +++ b/chrome/test/data/webui/chromeos/os_feedback_ui/search_page_test.js
@@ -439,6 +439,32 @@ assertEquals(FeedbackFlowState.SEARCH, actualCurrentState); }); + /** + * Test that when the app is opened on oobe or login screen, the help content + * section is hidden. + */ + test('HideHelpContentSection_oobe_or_login_screen', async () => { + await initializePage(); + fakeFeedbackContext.categoryTag = 'Login'; + page.feedbackContext = fakeFeedbackContext; + assertEquals('Login', page.feedbackContext.categoryTag); + + assertFalse(isVisible(getElement('iframe'))); + }); + + /** + * Test that when the app is not opened on oobe or login screen, the help + * content section is visible. + */ + test('ShowHelpContentSection_if_not_oobe_or_login_screen', async () => { + await initializePage(); + fakeFeedbackContext.categoryTag = 'MediaAPp'; + page.feedbackContext = fakeFeedbackContext; + assertNotEquals('Login', page.feedbackContext.categoryTag); + + assertTrue(isVisible(getElement('iframe'))); + }); + test('typingBluetoothWithInternalAccountShowsQuestionnaire', async () => { let textAreaElement = null; await initializePage();
diff --git a/chrome/test/data/webui/settings/chromeos/os_apps_page/app_management_page/app_details_item_test.ts b/chrome/test/data/webui/settings/chromeos/os_apps_page/app_management_page/app_details_item_test.ts index 4c54d52..ef35882 100644 --- a/chrome/test/data/webui/settings/chromeos/os_apps_page/app_management_page/app_details_item_test.ts +++ b/chrome/test/data/webui/settings/chromeos/os_apps_page/app_management_page/app_details_item_test.ts
@@ -7,6 +7,7 @@ import {AppManagementAppDetailsItem} from 'chrome://os-settings/lazy_load.js'; import {AppManagementStore, updateSelectedAppId} from 'chrome://os-settings/os_settings.js'; import {App, AppType, InstallReason, InstallSource} from 'chrome://resources/cr_components/app_management/app_management.mojom-webui.js'; +import {loadTimeData} from 'chrome://resources/js/load_time_data.js'; import {assertEquals, assertNull, assertTrue} from 'chrome://webui-test/chai_assert.js'; import {flushTasks} from 'chrome://webui-test/polymer_test_util.js'; @@ -21,6 +22,8 @@ fakeHandler = setupFakeHandler(); replaceStore(); + loadTimeData.overrideValues({appManagementDeviceName: 'Chromebook'}); + appDetailsItem = document.createElement('app-management-app-details-item'); replaceBody(appDetailsItem); @@ -29,6 +32,7 @@ teardown(() => { appDetailsItem.remove(); + loadTimeData.overrideValues({appManagementDeviceName: 'Chrome device'}); }); async function addApp(appOptions: Partial<App>, appName: string = 'app') { @@ -160,21 +164,15 @@ test('System install source', async function() { await addApp({ installReason: InstallReason.kSystem, + installSource: InstallSource.kSystem, }); const typeAndSourceText = appDetailsItem.shadowRoot!.querySelector('#typeAndSourceText'); assertTrue(!!typeAndSourceText); - assertEquals('ChromeOS System App', typeAndSourceText.textContent!.trim()); - - const infoIconTooltip = - appDetailsItem.shadowRoot!.querySelector('#infoIconTooltip'); - assertTrue(!!infoIconTooltip); - const tooltipText = infoIconTooltip.querySelector('#tooltipText'); - assertTrue(!!tooltipText); assertEquals( - 'This app is preinstalled on your device', - tooltipText.textContent!.trim()); + 'ChromeOS System App preinstalled on your Chromebook', + typeAndSourceText.textContent!.trim()); }); test('Chrome app version', async () => {
diff --git a/chrome/test/fuzzing/BUILD.gn b/chrome/test/fuzzing/BUILD.gn index 70769d3..3513e9d 100644 --- a/chrome/test/fuzzing/BUILD.gn +++ b/chrome/test/fuzzing/BUILD.gn
@@ -45,7 +45,7 @@ proto_source = "kombucha_in_process_fuzzer.proto" - deps = [] + deps = [ "//chrome:packed_resources" ] # Used for UI controls if (use_aura) {
diff --git a/chromeos/ash/components/scalable_iph/scalable_iph.cc b/chromeos/ash/components/scalable_iph/scalable_iph.cc index ca9ef8c..70031c6 100644 --- a/chromeos/ash/components/scalable_iph/scalable_iph.cc +++ b/chromeos/ash/components/scalable_iph/scalable_iph.cc
@@ -72,7 +72,6 @@ kEventNameShelfItemActivationGooglePhotosAndroid}, {ScalableIph::Event::kShelfItemActivationGooglePlay, kEventNameShelfItemActivationGooglePlay}, - {ScalableIph::Event::kPrintJobCreated, kEventNamePrintJobCreated}, }); return *event_names_map; } @@ -1008,8 +1007,6 @@ return out << "ShelfItemActivationGooglePhotosAndroid"; case ScalableIph::Event::kShelfItemActivationGooglePlay: return out << "ShelfItemActivationGooglePlay"; - case ScalableIph::Event::kPrintJobCreated: - return out << "PrintJobCreated"; } }
diff --git a/chromeos/ash/components/scalable_iph/scalable_iph.h b/chromeos/ash/components/scalable_iph/scalable_iph.h index 0c7e419..88db356 100644 --- a/chromeos/ash/components/scalable_iph/scalable_iph.h +++ b/chromeos/ash/components/scalable_iph/scalable_iph.h
@@ -93,7 +93,6 @@ kShelfItemActivationGooglePhotosWeb, kShelfItemActivationGooglePhotosAndroid, kShelfItemActivationGooglePlay, - kPrintJobCreated, }; ScalableIph(feature_engagement::Tracker* tracker,
diff --git a/chromeos/ash/components/scalable_iph/scalable_iph_constants.h b/chromeos/ash/components/scalable_iph/scalable_iph_constants.h index e5161c5f..5a32f9416 100644 --- a/chromeos/ash/components/scalable_iph/scalable_iph_constants.h +++ b/chromeos/ash/components/scalable_iph/scalable_iph_constants.h
@@ -116,8 +116,6 @@ // Recorded when the personalization hub app is opened. inline constexpr char kEventNameOpenPersonalizationApp[] = "ScalableIphOpenPersonalizationApp"; -// Recorded when a print job is created. -constexpr char kEventNamePrintJobCreated[] = "ScalableIphPrintJobCreated"; // `FiveMinTick` event is recorded every five minutes after OOBE completion. inline constexpr char kEventNameFiveMinTick[] = "ScalableIphFiveMinTick";
diff --git a/chromeos/ash/components/settings/cros_settings_names.cc b/chromeos/ash/components/settings/cros_settings_names.cc index e7556cc..d553703 100644 --- a/chromeos/ash/components/settings/cros_settings_names.cc +++ b/chromeos/ash/components/settings/cros_settings_names.cc
@@ -615,4 +615,9 @@ const char kDeviceHindiInscriptLayoutEnabled[] = "cros.device.hindi_inscript_layout_enabled"; +// A list of strings representing DLC identifiers to be pre downloaded on the +// device. +const char kDeviceDlcPredownloadList[] = + "cros.device.device_dlc_predownload_list"; + } // namespace ash
diff --git a/chromeos/ash/components/settings/cros_settings_names.h b/chromeos/ash/components/settings/cros_settings_names.h index 5c82307d..9d36f78 100644 --- a/chromeos/ash/components/settings/cros_settings_names.h +++ b/chromeos/ash/components/settings/cros_settings_names.h
@@ -396,6 +396,9 @@ COMPONENT_EXPORT(CHROMEOS_ASH_COMPONENTS_SETTINGS) extern const char kDeviceHindiInscriptLayoutEnabled[]; +COMPONENT_EXPORT(CHROMEOS_ASH_COMPONENTS_SETTINGS) +extern const char kDeviceDlcPredownloadList[]; + } // namespace ash namespace chromeos {
diff --git a/clank b/clank index da219a1..bdb6cb2 160000 --- a/clank +++ b/clank
@@ -1 +1 @@ -Subproject commit da219a17d5eabce16b35e68f276e7d265377236b +Subproject commit bdb6cb2c765bd7bc614f73346215c6e45c722e99
diff --git a/components/exo/client_controlled_shell_surface.cc b/components/exo/client_controlled_shell_surface.cc index 7f3983e1..441f7a3 100644 --- a/components/exo/client_controlled_shell_surface.cc +++ b/components/exo/client_controlled_shell_surface.cc
@@ -508,22 +508,30 @@ ash::Shell::Get()->toplevel_window_event_handler(); aura::Window* mouse_pressed_handler = target->GetHost()->dispatcher()->mouse_pressed_handler(); - // Start dragging only if ... - // 1) touch guesture is in progres. + // Start dragging only if: + // 1) touch guesture is in progress or // 2) mouse was pressed on the target or its subsurfaces. - if (toplevel_handler->gesture_target() || - (mouse_pressed_handler && target->Contains(mouse_pressed_handler))) { - gfx::PointF point_in_root(location); + // If neither condition is met, we do not start the drag. + gfx::PointF point_in_root; + if (toplevel_handler->gesture_target()) { + point_in_root = toplevel_handler->event_location_in_gesture_target(); + aura::Window::ConvertPointToTarget( + toplevel_handler->gesture_target(), + widget_->GetNativeWindow()->GetRootWindow(), &point_in_root); + } else if (mouse_pressed_handler && target->Contains(mouse_pressed_handler)) { + point_in_root = location; if (use_default_scale_cancellation_) { // When default scale cancellation is enabled, the client sends the // location in screen coordinates. Otherwise, the location should already // be in the display's coordinates. wm::ConvertPointFromScreen(target->GetRootWindow(), &point_in_root); } - toplevel_handler->AttemptToStartDrag( - target, point_in_root, component, - ash::ToplevelWindowEventHandler::EndClosure()); + } else { + return; } + toplevel_handler->AttemptToStartDrag( + target, point_in_root, component, + ash::ToplevelWindowEventHandler::EndClosure()); } bool ClientControlledShellSurface::IsDragging() {
diff --git a/components/exo/wayland/zcr_remote_shell_impl.cc b/components/exo/wayland/zcr_remote_shell_impl.cc index 806d9e2d..3a382c5d 100644 --- a/components/exo/wayland/zcr_remote_shell_impl.cc +++ b/components/exo/wayland/zcr_remote_shell_impl.cc
@@ -1570,6 +1570,15 @@ display_handler->id(), gfx::Rect(x, y, width, height)); } +void toast_surface_set_scale_factor(wl_client* client, + wl_resource* resource, + uint scale_factor_as_uint) { + static_assert(sizeof(uint32_t) == sizeof(float), + "Sizes must match for reinterpret cast to be meaningful"); + float scale_factor = *reinterpret_cast<float*>(&scale_factor_as_uint); + GetUserDataAs<ToastSurface>(resource)->SetScaleFactor(scale_factor); +} + //////////////////////////////////////////////////////////////////////////////// // remote_shell_interface:
diff --git a/components/exo/wayland/zcr_remote_shell_impl.h b/components/exo/wayland/zcr_remote_shell_impl.h index 1f4d09f9..97fa53d 100644 --- a/components/exo/wayland/zcr_remote_shell_impl.h +++ b/components/exo/wayland/zcr_remote_shell_impl.h
@@ -473,6 +473,10 @@ int32_t width, int32_t height); +void toast_surface_set_scale_factor(wl_client* client, + wl_resource* resource, + uint scale_factor_as_uint); + //////////////////////////////////////////////////////////////////////////////// // remote_shell_interface:
diff --git a/components/exo/wayland/zcr_remote_shell_v2.cc b/components/exo/wayland/zcr_remote_shell_v2.cc index 69300d4..ae2f54e 100644 --- a/components/exo/wayland/zcr_remote_shell_v2.cc +++ b/components/exo/wayland/zcr_remote_shell_v2.cc
@@ -132,6 +132,7 @@ wl_resource_destroy(resource); }, zcr_remote_shell::toast_surface_set_bounds_in_output, + zcr_remote_shell::toast_surface_set_scale_factor, }; const struct zcr_remote_output_v2_interface remote_output_implementation_v2 = {
diff --git a/components/metrics/demographics/demographic_metrics_provider_unittest.cc b/components/metrics/demographics/demographic_metrics_provider_unittest.cc index 6da7e8f..5106731 100644 --- a/components/metrics/demographics/demographic_metrics_provider_unittest.cc +++ b/components/metrics/demographics/demographic_metrics_provider_unittest.cc
@@ -105,11 +105,9 @@ sync_service_ = std::make_unique<syncer::TestSyncService>(); sync_service_->SetSyncFeatureDisabledViaDashboard(true); - // On ChromeOS Ash, IsInitialSyncFeatureSetupComplete gets cleared - // temporarily but immediately afterwards, it gets set again with - // ENGINE_INITIALIZED_WITH_AUTO_START. And yet, IsSyncFeatureEnabled() - // stays false because the user needs to manually resume sync the - // feature. + // On ChromeOS Ash, IsInitialSyncFeatureSetupComplete always returns + // true but IsSyncFeatureEnabled() stays false because the user needs to + // manually resume sync the feature. CHECK(sync_service_->GetUserSettings() ->IsInitialSyncFeatureSetupComplete()); CHECK(!sync_service_->IsSyncFeatureEnabled());
diff --git a/components/optimization_guide/content/browser/page_content_annotations_service.cc b/components/optimization_guide/content/browser/page_content_annotations_service.cc index 8861f0b..35132b6 100644 --- a/components/optimization_guide/content/browser/page_content_annotations_service.cc +++ b/components/optimization_guide/content/browser/page_content_annotations_service.cc
@@ -172,6 +172,7 @@ PageContentAnnotationsService::PageContentAnnotationsService( std::unique_ptr<AutocompleteProviderClient> autocomplete_provider_client, const std::string& application_locale, + const std::string& country_code, OptimizationGuideModelProvider* optimization_guide_model_provider, history::HistoryService* history_service, TemplateURLService* template_url_service, @@ -231,11 +232,16 @@ } #endif + is_remote_page_metadata_fetching_enabled_ = + features::RemotePageMetadataEnabled(application_locale, country_code); + is_salient_image_metadata_fetching_enabled_ = + features::ShouldPersistSalientImageMetadata(application_locale, + country_code); std::vector<proto::OptimizationType> optimization_types; - if (features::RemotePageMetadataEnabled()) { + if (is_remote_page_metadata_fetching_enabled_) { optimization_types.emplace_back(proto::PAGE_ENTITIES); } - if (features::ShouldPersistSalientImageMetadata()) { + if (is_salient_image_metadata_fetching_enabled_) { optimization_types.emplace_back(proto::SALIENT_IMAGE); } if (optimization_guide_decider_ && !optimization_types.empty()) { @@ -858,7 +864,8 @@ return; } - if (features::RemotePageMetadataEnabled() && optimization_guide_decider_) { + if (is_remote_page_metadata_fetching_enabled_ && + optimization_guide_decider_) { optimization_guide_decider_->CanApplyOptimization( url_row.url(), proto::PAGE_ENTITIES, base::BindOnce( @@ -866,7 +873,7 @@ weak_ptr_factory_.GetWeakPtr(), history_visit, proto::PAGE_ENTITIES)); } - if (features::ShouldPersistSalientImageMetadata() && + if (is_salient_image_metadata_fetching_enabled_ && optimization_guide_decider_) { optimization_guide_decider_->CanApplyOptimization( url_row.url(), proto::SALIENT_IMAGE,
diff --git a/components/optimization_guide/content/browser/page_content_annotations_service.h b/components/optimization_guide/content/browser/page_content_annotations_service.h index 09ee484c8..536a8709 100644 --- a/components/optimization_guide/content/browser/page_content_annotations_service.h +++ b/components/optimization_guide/content/browser/page_content_annotations_service.h
@@ -130,6 +130,7 @@ PageContentAnnotationsService( std::unique_ptr<AutocompleteProviderClient> autocomplete_provider_client, const std::string& application_locale, + const std::string& country_code, OptimizationGuideModelProvider* optimization_guide_model_provider, history::HistoryService* history_service, TemplateURLService* template_url_service, @@ -435,6 +436,12 @@ raw_ptr<OptimizationGuideLogger> optimization_guide_logger_ = nullptr; + // Whether fetching for remote page metadata enabled. + bool is_remote_page_metadata_fetching_enabled_ = false; + + // Whether fetching for salient image metadata is enabled. + bool is_salient_image_metadata_fetching_enabled_ = false; + // Not owned and must outlive |this|. raw_ptr<OptimizationGuideDecider> optimization_guide_decider_;
diff --git a/components/optimization_guide/content/browser/page_content_annotations_service_unittest.cc b/components/optimization_guide/content/browser/page_content_annotations_service_unittest.cc index 29063af..a94cfa6 100644 --- a/components/optimization_guide/content/browser/page_content_annotations_service_unittest.cc +++ b/components/optimization_guide/content/browser/page_content_annotations_service_unittest.cc
@@ -149,7 +149,7 @@ // Instantiate service. service_ = std::make_unique<PageContentAnnotationsService>( - /*autocomplete_provider_client=*/nullptr, "en-US", + /*autocomplete_provider_client=*/nullptr, "en-US", "us", optimization_guide_model_provider_.get(), history_service_.get(), template_url_service_.get(), /*zero_suggest_cache_service=*/nullptr, @@ -363,8 +363,8 @@ RegistersTypeWhenFeatureEnabled) { std::vector<proto::OptimizationType> registered_optimization_types = optimization_guide_decider()->registered_optimization_types(); - EXPECT_EQ(registered_optimization_types.size(), 1u); - EXPECT_EQ(registered_optimization_types[0], proto::PAGE_ENTITIES); + EXPECT_TRUE( + base::Contains(registered_optimization_types, proto::PAGE_ENTITIES)); } TEST_F(PageContentAnnotationsServiceRemotePageMetadataTest, @@ -406,8 +406,8 @@ RegistersTypeWhenFeatureEnabled) { std::vector<proto::OptimizationType> registered_optimization_types = optimization_guide_decider()->registered_optimization_types(); - EXPECT_EQ(registered_optimization_types.size(), 1u); - EXPECT_EQ(registered_optimization_types[0], proto::SALIENT_IMAGE); + EXPECT_TRUE( + base::Contains(registered_optimization_types, proto::SALIENT_IMAGE)); } TEST_F(PageContentAnnotationsServiceSalientImageMetadataTest,
diff --git a/components/optimization_guide/content/browser/page_content_annotations_web_contents_observer_unittest.cc b/components/optimization_guide/content/browser/page_content_annotations_web_contents_observer_unittest.cc index e2b1a578..416c0b22 100644 --- a/components/optimization_guide/content/browser/page_content_annotations_web_contents_observer_unittest.cc +++ b/components/optimization_guide/content/browser/page_content_annotations_web_contents_observer_unittest.cc
@@ -127,6 +127,7 @@ : PageContentAnnotationsService( std::make_unique<FakeAutocompleteProviderClient>(), "en-US", + "us", optimization_guide_model_provider, history_service, template_url_service,
diff --git a/components/optimization_guide/content/browser/test_page_content_annotations_service.cc b/components/optimization_guide/content/browser/test_page_content_annotations_service.cc index 9655794..30b98af2 100644 --- a/components/optimization_guide/content/browser/test_page_content_annotations_service.cc +++ b/components/optimization_guide/content/browser/test_page_content_annotations_service.cc
@@ -68,6 +68,7 @@ history::HistoryService* history_service) : PageContentAnnotationsService(/*autocomplete_provider_client=*/nullptr, /*application_locale=*/"en-US", + /*country_code=*/"US", optimization_guide_model_provider, history_service, /*template_url_service=*/nullptr,
diff --git a/components/optimization_guide/core/optimization_guide_features.cc b/components/optimization_guide/core/optimization_guide_features.cc index 715b902..4dfd81b7 100644 --- a/components/optimization_guide/core/optimization_guide_features.cc +++ b/components/optimization_guide/core/optimization_guide_features.cc
@@ -94,6 +94,38 @@ base::Contains(supported_locales, locale_language); } +bool IsSupportedCountryForFeature(const std::string& country_code, + const base::Feature& feature, + const std::string& default_value) { + if (!base::FeatureList::IsEnabled(feature)) { + return false; + } + + std::string value = + base::GetFieldTrialParamValueByFeature(feature, "supported_countries"); + if (value.empty()) { + // The default list of supported countries for optimization guide features. + value = default_value; + } else if (value == "*") { + // Still provide a way to enable all countries remotely via the '*' + // character. + return true; + } + + std::vector<std::string> supported_countries = base::SplitString( + value, ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY); + // An empty allowlist admits any country. + if (supported_countries.empty()) { + return true; + } + + return base::ranges::any_of( + supported_countries, [&country_code](const auto& supported_country_code) { + return base::EqualsCaseInsensitiveASCII(supported_country_code, + country_code); + }); +} + } // namespace // Enables the syncing of the Optimization Hints component, which provides @@ -140,7 +172,7 @@ // Enables fetching page metadata from the remote Optimization Guide service. BASE_FEATURE(kRemotePageMetadata, "RemotePageMetadata", - base::FEATURE_DISABLED_BY_DEFAULT); + enabled_by_default_desktop_only); // Enables the page entities model to be annotated on every page load. BASE_FEATURE(kPageEntitiesPageContentAnnotations, @@ -226,7 +258,7 @@ BASE_FEATURE(kPageContentAnnotationsPersistSalientImageMetadata, "PageContentAnnotationsPersistSalientImageMetadata", - base::FEATURE_DISABLED_BY_DEFAULT); + enabled_by_default_desktop_only); // Killswitch for fetching on search results from a remote Optimization Guide // Service. @@ -676,8 +708,11 @@ kTextEmbeddingPageContentAnnotations); } -bool RemotePageMetadataEnabled() { - return base::FeatureList::IsEnabled(kRemotePageMetadata); +bool RemotePageMetadataEnabled(const std::string& locale, + const std::string& country_code) { + return base::FeatureList::IsEnabled(kRemotePageMetadata) && + IsSupportedLocaleForFeature(locale, kRemotePageMetadata, "en-US") && + IsSupportedCountryForFeature(country_code, kRemotePageMetadata, "us"); } int GetMinimumPageCategoryScoreToPersist() { @@ -816,9 +851,16 @@ return base::FeatureList::IsEnabled(kOptimizationGuideInstallWideModelStore); } -bool ShouldPersistSalientImageMetadata() { +bool ShouldPersistSalientImageMetadata(const std::string& locale, + const std::string& country_code) { return base::FeatureList::IsEnabled( - kPageContentAnnotationsPersistSalientImageMetadata); + kPageContentAnnotationsPersistSalientImageMetadata) && + IsSupportedLocaleForFeature( + locale, kPageContentAnnotationsPersistSalientImageMetadata, + "en-US") && + IsSupportedCountryForFeature( + country_code, kPageContentAnnotationsPersistSalientImageMetadata, + "us"); } bool ShouldDropFragmentsForURLKeyedHintCacheKey() {
diff --git a/components/optimization_guide/core/optimization_guide_features.h b/components/optimization_guide/core/optimization_guide_features.h index 4520386..7cdf1d4 100644 --- a/components/optimization_guide/core/optimization_guide_features.h +++ b/components/optimization_guide/core/optimization_guide_features.h
@@ -287,7 +287,8 @@ // Returns whether page metadata should be retrieved from the remote // Optimization Guide service. -bool RemotePageMetadataEnabled(); +bool RemotePageMetadataEnabled(const std::string& locale, + const std::string& country_code); // Returns the minimum score associated with a category for it to be persisted. // Will be a value from 0 to 100, inclusive. @@ -350,7 +351,8 @@ bool IsInstallWideModelStoreEnabled(); // Whether to persist salient image metadata for each visit. -bool ShouldPersistSalientImageMetadata(); +bool ShouldPersistSalientImageMetadata(const std::string& locale, + const std::string& country_code); // Whether to drop fragments for the URL-keyed hint cache key. bool ShouldDropFragmentsForURLKeyedHintCacheKey();
diff --git a/components/optimization_guide/core/optimization_guide_features_unittest.cc b/components/optimization_guide/core/optimization_guide_features_unittest.cc index 29dc72e2..b93d2d96 100644 --- a/components/optimization_guide/core/optimization_guide_features_unittest.cc +++ b/components/optimization_guide/core/optimization_guide_features_unittest.cc
@@ -152,6 +152,35 @@ features::ShouldExecutePageVisibilityModelOnPageContent("zh-CN")); } +TEST(OptimizationGuideFeaturesTest, RemotePageMetadataEnabled) { + base::test::ScopedFeatureList scoped_feature_list; + + scoped_feature_list.InitAndEnableFeatureWithParameters( + features::kRemotePageMetadata, + {{"supported_locales", "en-US,en-CA"}, {"supported_countries", "US,CA"}}); + + EXPECT_TRUE(features::RemotePageMetadataEnabled("en-US", "CA")); + EXPECT_FALSE(features::RemotePageMetadataEnabled("", "")); + EXPECT_FALSE(features::RemotePageMetadataEnabled("en-US", "badcountry")); + EXPECT_FALSE(features::RemotePageMetadataEnabled("badlocale", "US")); +} + +TEST(OptimizationGuideFeaturesTest, ShouldPersistSalientImageMetadata) { + base::test::ScopedFeatureList scoped_feature_list; + + scoped_feature_list.InitAndEnableFeatureWithParameters( + features::kPageContentAnnotationsPersistSalientImageMetadata, + {{"supported_locales", "en-US,en-CA"}, {"supported_countries", "US,CA"}}); + + EXPECT_TRUE(features::ShouldPersistSalientImageMetadata("en-US", "CA")); + // Tests case-insensitivity. + EXPECT_TRUE(features::ShouldPersistSalientImageMetadata("en-US", "cA")); + EXPECT_FALSE(features::ShouldPersistSalientImageMetadata("", "")); + EXPECT_FALSE( + features::ShouldPersistSalientImageMetadata("en-US", "badcountry")); + EXPECT_FALSE(features::ShouldPersistSalientImageMetadata("badlocale", "US")); +} + TEST(OptimizationGuideFeaturesTest, OptimizationGuidePersonalizedFetchingScopes) { {
diff --git a/components/policy/proto/chrome_device_policy.proto b/components/policy/proto/chrome_device_policy.proto index 3752a1eb..f7aa42e 100644 --- a/components/policy/proto/chrome_device_policy.proto +++ b/components/policy/proto/chrome_device_policy.proto
@@ -2029,4 +2029,5 @@ optional StringListPolicyProto device_authentication_url_allowlist = 152; optional DeviceSwitchFunctionKeysBehaviorEnabledProto device_switch_function_keys_behavior_enabled = 153; + optional StringListPolicyProto device_dlc_predownload_list = 154; }
diff --git a/components/policy/resources/templates/device_policy_proto_map.yaml b/components/policy/resources/templates/device_policy_proto_map.yaml index ed7d5d1..50d2803 100644 --- a/components/policy/resources/templates/device_policy_proto_map.yaml +++ b/components/policy/resources/templates/device_policy_proto_map.yaml
@@ -221,3 +221,4 @@ DeviceReportNetworkEvents: device_reporting.report_network_events DeviceLowBatterySoundEnabled: device_low_battery_sound.enabled DeviceChargingSoundsEnabled: device_charging_sounds.enabled +DeviceDlcPredownloadList: device_dlc_predownload_list.value
diff --git a/components/policy/resources/templates/policies.yaml b/components/policy/resources/templates/policies.yaml index 7d1a4c8bc..9eb9ebf7 100644 --- a/components/policy/resources/templates/policies.yaml +++ b/components/policy/resources/templates/policies.yaml
@@ -1158,6 +1158,7 @@ 1157: SafeBrowsingDeepScanningEnabled 1158: DriveFileSyncAvailable 1159: DeviceSwitchFunctionKeysBehaviorEnabled + 1160: DeviceDlcPredownloadList atomic_groups: 1: Homepage 2: RemoteAccess
diff --git a/components/policy/resources/templates/policy_definitions/DeviceUpdate/DeviceUpdateHttpDownloadsEnabled.yaml b/components/policy/resources/templates/policy_definitions/DeviceUpdate/DeviceUpdateHttpDownloadsEnabled.yaml index 5b96000..c14da8f 100644 --- a/components/policy/resources/templates/policy_definitions/DeviceUpdate/DeviceUpdateHttpDownloadsEnabled.yaml +++ b/components/policy/resources/templates/policy_definitions/DeviceUpdate/DeviceUpdateHttpDownloadsEnabled.yaml
@@ -15,6 +15,7 @@ value: false owners: - mpolzer@google.com +- vsavu@google.com - chromeos-commercial-remote-management@google.com schema: type: boolean
diff --git a/components/policy/resources/templates/policy_definitions/Miscellaneous/DeviceDlcPredownloadList.yaml b/components/policy/resources/templates/policy_definitions/Miscellaneous/DeviceDlcPredownloadList.yaml new file mode 100644 index 0000000..66b5126 --- /dev/null +++ b/components/policy/resources/templates/policy_definitions/Miscellaneous/DeviceDlcPredownloadList.yaml
@@ -0,0 +1,28 @@ +owners: +- nedol@google.com +- ust@google.com +- file://chromeos/printing/OWNERS +caption: Select DLCs (Downloadable Content) that need to be pre downloaded +desc: |- + This policy allows to set a list of DLCs (Downloadable Content) to be downloaded as soon as possible. Downloaded DLCs are then available for all users on the device. + + This is useful when the administrator knows that a feature that requires the presence of the DLC will likely be used by the users of the device. +future_on: ['chrome_os'] +device_only: true +features: + dynamic_refresh: true + per_profile: false +type: string-enum-list +schema: + items: + enum: + - scanner_drivers + type: string + type: array +items: +- caption: Scanner drivers + name: scanner_drivers + value: scanner_drivers +example_value: +- scanner_drivers +tags: [] \ No newline at end of file
diff --git a/components/policy/test/data/policy_test_cases.json b/components/policy/test/data/policy_test_cases.json index e77dfaf..3ef1a03 100644 --- a/components/policy/test/data/policy_test_cases.json +++ b/components/policy/test/data/policy_test_cases.json
@@ -24872,5 +24872,8 @@ } } ] + }, + "DeviceDlcPredownloadList": { + "reason_for_missing_test": "Maps into CrosSettings" } }
diff --git a/components/safe_browsing/content/browser/browser_url_loader_throttle.cc b/components/safe_browsing/content/browser/browser_url_loader_throttle.cc index 7a0896c..3b5f462 100644 --- a/components/safe_browsing/content/browser/browser_url_loader_throttle.cc +++ b/components/safe_browsing/content/browser/browser_url_loader_throttle.cc
@@ -357,6 +357,22 @@ return; } + if (request->destination != network::mojom::RequestDestination::kDocument && + base::FeatureList::IsEnabled(kSafeBrowsingSkipSubresources)) { + VLOG(2) << __func__ << " : Skipping: " << request->url << " : " + << request->destination; + base::UmaHistogramEnumeration( + "SafeBrowsing.BrowserThrottle.RequestDestination.Skipped", + request->destination); + skip_checks_ = true; + + return; + } + + base::UmaHistogramEnumeration( + "SafeBrowsing.BrowserThrottle.RequestDestination.Checked", + request->destination); + pending_checks_++; start_request_time_ = base::TimeTicks::Now(); is_start_request_called_ = true;
diff --git a/components/safe_browsing/content/browser/browser_url_loader_throttle_unittest.cc b/components/safe_browsing/content/browser/browser_url_loader_throttle_unittest.cc index e79f994..7c2f486 100644 --- a/components/safe_browsing/content/browser/browser_url_loader_throttle_unittest.cc +++ b/components/safe_browsing/content/browser/browser_url_loader_throttle_unittest.cc
@@ -10,10 +10,12 @@ #include "base/memory/raw_ptr.h" #include "base/test/metrics/histogram_tester.h" #include "base/test/mock_callback.h" +#include "base/test/scoped_feature_list.h" #include "base/time/time.h" #include "components/safe_browsing/core/browser/hashprefix_realtime/hash_realtime_utils.h" #include "components/safe_browsing/core/browser/safe_browsing_url_checker_impl.h" #include "components/safe_browsing/core/browser/url_checker_delegate.h" +#include "components/safe_browsing/core/common/features.h" #include "content/public/test/browser_task_environment.h" #include "net/base/net_errors.h" #include "net/traffic_annotation/network_traffic_annotation_test_helper.h" @@ -271,7 +273,9 @@ class SBBrowserUrlLoaderThrottleTest : public ::testing::Test { protected: - SBBrowserUrlLoaderThrottleTest() = default; + SBBrowserUrlLoaderThrottleTest() { + feature_list_.InitAndEnableFeature(kSafeBrowsingSkipSubresources); + } scoped_refptr<UrlCheckerDelegate> GetUrlCheckerDelegate() { return url_checker_delegate_; @@ -330,15 +334,22 @@ } // This function returns the value of |defer| after the function is called. - bool CallWillStartRequest() { + bool CallWillStartRequestWithDestination( + network::mojom::RequestDestination destination) { bool defer = false; network::ResourceRequest request; request.url = url_; + request.destination = destination; throttle_->WillStartRequest(&request, &defer); task_environment_.RunUntilIdle(); return defer; } + bool CallWillStartRequest() { + return CallWillStartRequestWithDestination( + network::mojom::RequestDestination::kDocument); + } + // This function returns the value of |defer| after the function is called. bool CallWillRedirectRequest() { bool defer = false; @@ -392,6 +403,7 @@ base::Milliseconds(200), 1); } + base::test::ScopedFeatureList feature_list_; content::BrowserTaskEnvironment task_environment_{ base::test::TaskEnvironment::TimeSource::MOCK_TIME}; GURL url_; @@ -407,7 +419,8 @@ std::unique_ptr<MockThrottleDelegate> throttle_delegate_; }; -TEST_F(SBBrowserUrlLoaderThrottleTest, VerifyDefer_DoesNotDeferOnSafeUrl) { +TEST_F(SBBrowserUrlLoaderThrottleTest, + VerifyDefer_DoesNotDeferOnSafeDocumentUrl) { SetUpTest(); url_checker_->AddCallbackInfo(/*should_proceed=*/true, /*should_show_interstitial=*/false, @@ -421,7 +434,7 @@ EXPECT_FALSE(defer); } -TEST_F(SBBrowserUrlLoaderThrottleTest, VerifyDefer_DeferOnUnSafeUrl) { +TEST_F(SBBrowserUrlLoaderThrottleTest, VerifyDefer_DeferOnUnSafeDocumentUrl) { SetUpTest(); url_checker_->AddCallbackInfo(/*should_proceed=*/false, /*should_show_interstitial=*/true, @@ -438,6 +451,22 @@ EXPECT_TRUE(defer); } +TEST_F(SBBrowserUrlLoaderThrottleTest, + VerifyDefer_DoesNotDeferOnUnsafeIframeUrl) { + SetUpTest(); + url_checker_->AddCallbackInfo(/*should_proceed=*/false, + /*should_show_interstitial=*/true, + /*should_delay_callback=*/false); + + bool defer = CallWillStartRequestWithDestination( + network::mojom::RequestDestination::kIframe); + EXPECT_FALSE(defer); + EXPECT_EQ(throttle_delegate_->GetErrorCode(), 0); + + defer = CallWillProcessResponse(); + EXPECT_FALSE(defer); +} + TEST_F(SBBrowserUrlLoaderThrottleTest, VerifyDefer_DeferIfRedirectUrlIsUnsafe) { SetUpTest(); url_checker_->AddCallbackInfo(/*should_proceed=*/true, @@ -462,7 +491,8 @@ /*should_delay_callback=*/false); url_checker_delegate_->EnableSkipRequestCheck(); - CallWillStartRequest(); + CallWillStartRequestWithDestination( + network::mojom::RequestDestination::kEmpty); bool defer = CallWillProcessResponse(); // The loader is not deferred because the check has skipped. @@ -718,4 +748,71 @@ "SafeBrowsing.BrowserThrottle.TotalDelay2.MockFullUrlLookup"); } +class SBBrowserUrlLoaderThrottleDisableSkipSubresourcesTest + : public SBBrowserUrlLoaderThrottleTest { + public: + SBBrowserUrlLoaderThrottleDisableSkipSubresourcesTest() { + feature_list_.InitAndDisableFeature(kSafeBrowsingSkipSubresources); + } + + protected: + base::test::ScopedFeatureList feature_list_; +}; + +TEST_F(SBBrowserUrlLoaderThrottleDisableSkipSubresourcesTest, + VerifyDefer_DoesNotDeferOnUnSafeDocumentUrl) { + SetUpTest(); + url_checker_->AddCallbackInfo(/*should_proceed=*/false, + /*should_show_interstitial=*/true, + /*should_delay_callback=*/false); + + bool defer = CallWillStartRequestWithDestination( + network::mojom::RequestDestination::kIframe); + // Safe Browsing and URL loader are performed in parallel. Safe Browsing + // doesn't defer the start of the request. + EXPECT_FALSE(defer); + EXPECT_EQ(throttle_delegate_->GetErrorCode(), net::ERR_BLOCKED_BY_CLIENT); + EXPECT_EQ(throttle_delegate_->GetCustomReason(), "SafeBrowsing"); + + defer = CallWillProcessResponse(); + EXPECT_TRUE(defer); +} + +TEST_F(SBBrowserUrlLoaderThrottleDisableSkipSubresourcesTest, + VerifyDefer_DefersOnUnSafeDocumentUrl) { + SetUpTest(); + url_checker_->AddCallbackInfo(/*should_proceed=*/false, + /*should_show_interstitial=*/true, + /*should_delay_callback=*/false); + + bool defer = CallWillStartRequest(); + // Safe Browsing and URL loader are performed in parallel. Safe Browsing + // doesn't defer the start of the request. + EXPECT_FALSE(defer); + EXPECT_EQ(throttle_delegate_->GetErrorCode(), net::ERR_BLOCKED_BY_CLIENT); + EXPECT_EQ(throttle_delegate_->GetCustomReason(), "SafeBrowsing"); + + defer = CallWillProcessResponse(); + EXPECT_TRUE(defer); +} + +TEST_F(SBBrowserUrlLoaderThrottleDisableSkipSubresourcesTest, + VerifyDefer_DefersOnUnSafeIframeUrl) { + SetUpTest(); + url_checker_->AddCallbackInfo(/*should_proceed=*/false, + /*should_show_interstitial=*/true, + /*should_delay_callback=*/false); + + bool defer = CallWillStartRequestWithDestination( + network::mojom::RequestDestination::kIframe); + // Safe Browsing and URL loader are performed in parallel. Safe Browsing + // doesn't defer the start of the request. + EXPECT_FALSE(defer); + EXPECT_EQ(throttle_delegate_->GetErrorCode(), net::ERR_BLOCKED_BY_CLIENT); + EXPECT_EQ(throttle_delegate_->GetCustomReason(), "SafeBrowsing"); + + defer = CallWillProcessResponse(); + EXPECT_TRUE(defer); +} + } // namespace safe_browsing
diff --git a/components/safe_browsing/content/renderer/renderer_url_loader_throttle.cc b/components/safe_browsing/content/renderer/renderer_url_loader_throttle.cc index 9783cab..f56ac66 100644 --- a/components/safe_browsing/content/renderer/renderer_url_loader_throttle.cc +++ b/components/safe_browsing/content/renderer/renderer_url_loader_throttle.cc
@@ -115,12 +115,24 @@ request_destinations_to_skip{{network::mojom::RequestDestination::kStyle, network::mojom::RequestDestination::kImage, network::mojom::RequestDestination::kFont}}; - if (base::Contains(*request_destinations_to_skip, request->destination) && - base::FeatureList::IsEnabled(kSafeBrowsingSkipImageCssFont)) { + if (base::FeatureList::IsEnabled(kSafeBrowsingSkipSubresources) || + (base::Contains(*request_destinations_to_skip, request->destination) && + base::FeatureList::IsEnabled(kSafeBrowsingSkipImageCssFont))) { + VLOG(2) << __func__ << " : Skipping: " << request->url << " : " + << request->destination; + DCHECK_NE(request->destination, + network::mojom::RequestDestination::kDocument); LogTotalDelay3Metrics(base::TimeDelta()); + base::UmaHistogramEnumeration( + "SafeBrowsing.RendererThrottle.RequestDestination.Skipped", + request->destination); return; } + base::UmaHistogramEnumeration( + "SafeBrowsing.RendererThrottle.RequestDestination.Checked", + request->destination); + if (safe_browsing_pending_remote_.is_valid()) { // Bind the pipe created in DetachFromCurrentSequence to the current // sequence.
diff --git a/components/safe_browsing/content/renderer/renderer_url_loader_throttle.h b/components/safe_browsing/content/renderer/renderer_url_loader_throttle.h index 8e6263d..70920d2 100644 --- a/components/safe_browsing/content/renderer/renderer_url_loader_throttle.h +++ b/components/safe_browsing/content/renderer/renderer_url_loader_throttle.h
@@ -49,21 +49,26 @@ FRIEND_TEST_ALL_PREFIXES(SBRendererUrlLoaderThrottleTest, DoesNotDeferHttpsImageUrl); FRIEND_TEST_ALL_PREFIXES(SBRendererUrlLoaderThrottleTest, + DoesNotDeferHttpsScriptUrl); + FRIEND_TEST_ALL_PREFIXES(SBRendererUrlLoaderThrottleTest, DoesNotDeferChromeUrl); FRIEND_TEST_ALL_PREFIXES(SBRendererUrlLoaderThrottleTest, VerifyTotalDelayHistograms_DoesNotDefer); FRIEND_TEST_ALL_PREFIXES(SBRendererUrlLoaderThrottleTest, VerifyTotalDelayHistograms_DoesNotDeferFromCache); FRIEND_TEST_ALL_PREFIXES(SBRendererUrlLoaderThrottleTest, - VerifyTotalDelayHistograms_Defer); - FRIEND_TEST_ALL_PREFIXES(SBRendererUrlLoaderThrottleTest, - VerifyTotalDelayHistograms_DeferFromCache); - FRIEND_TEST_ALL_PREFIXES(SBRendererUrlLoaderThrottleTest, VerifyTotalDelayHistograms_SkipChromeUrl); FRIEND_TEST_ALL_PREFIXES(SBRendererUrlLoaderThrottleTest, VerifyTotalDelayHistograms_SkipImageUrl); + FRIEND_TEST_ALL_PREFIXES(SBRendererUrlLoaderThrottleTest, + VerifyTotalDelayHistograms_SkipScriptUrl); + FRIEND_TEST_ALL_PREFIXES(SBRendererUrlLoaderThrottleTest, + VerifyTotalDelayHistograms_SkipIframeUrl); FRIEND_TEST_ALL_PREFIXES( - SBRendererUrlLoaderThrottleDisableSkipImageCssFontTest, + SBRendererUrlLoaderThrottleDisableSkipSubresourcesTest, + DefersHttpsScriptUrl); + FRIEND_TEST_ALL_PREFIXES( + SBRendererUrlLoaderThrottleDisableSkipSubresourcesTest, DefersHttpsImageUrl); // blink::URLLoaderThrottle implementation.
diff --git a/components/safe_browsing/content/renderer/renderer_url_loader_throttle_unittest.cc b/components/safe_browsing/content/renderer/renderer_url_loader_throttle_unittest.cc index d572442d..3d7e30d5 100644 --- a/components/safe_browsing/content/renderer/renderer_url_loader_throttle_unittest.cc +++ b/components/safe_browsing/content/renderer/renderer_url_loader_throttle_unittest.cc
@@ -50,13 +50,6 @@ NOTREACHED(); } - void RestartDelayedCallback() { - ASSERT_TRUE(should_delay_callback_); - std::move(pending_callback_) - .Run(/*slow_check_notifier=*/mojo::NullReceiver(), - /*proceed=*/true, /*show_interstitial=*/false); - } - void EnableDelayCallback() { should_delay_callback_ = true; } private: @@ -77,7 +70,7 @@ class SBRendererUrlLoaderThrottleTest : public ::testing::Test { protected: SBRendererUrlLoaderThrottleTest() : mojo_receiver_(&safe_browsing_) { - feature_list_.InitAndEnableFeature(kSafeBrowsingSkipImageCssFont); + feature_list_.InitAndEnableFeature(kSafeBrowsingSkipSubresources); mojo_receiver_.Bind(safe_browsing_remote_.BindNewPipeAndPassReceiver()); throttle_delegate_ = std::make_unique<MockThrottleDelegate>(); throttle_ = std::make_unique<RendererURLLoaderThrottle>( @@ -104,21 +97,8 @@ std::unique_ptr<MockThrottleDelegate> throttle_delegate_; }; -TEST_F(SBRendererUrlLoaderThrottleTest, DefersHttpsUrl) { - safe_browsing_.EnableDelayCallback(); - GURL url("https://example.com/"); - bool defer = false; - network::ResourceRequest request = - GetResourceRequest(url, network::mojom::RequestDestination::kScript); - throttle_->WillStartRequest(&request, &defer); - message_loop_.RunUntilIdle(); - - auto response_head = network::mojom::URLResponseHead::New(); - throttle_->WillProcessResponse(url, response_head.get(), &defer); - EXPECT_TRUE(defer); -} - TEST_F(SBRendererUrlLoaderThrottleTest, DoesNotDeferHttpsImageUrl) { + base::HistogramTester histograms; safe_browsing_.EnableDelayCallback(); GURL url("https://example.com/"); bool defer = false; @@ -130,9 +110,33 @@ auto response_head = network::mojom::URLResponseHead::New(); throttle_->WillProcessResponse(url, response_head.get(), &defer); EXPECT_FALSE(defer); + histograms.ExpectTotalCount( + "SafeBrowsing.RendererThrottle.RequestDestination.Checked", 0); + histograms.ExpectTotalCount( + "SafeBrowsing.RendererThrottle.RequestDestination.Skipped", 1); +} + +TEST_F(SBRendererUrlLoaderThrottleTest, DoesNotDeferHttpsScriptUrl) { + base::HistogramTester histograms; + safe_browsing_.EnableDelayCallback(); + GURL url("https://example.com/"); + bool defer = false; + network::ResourceRequest request = + GetResourceRequest(url, network::mojom::RequestDestination::kScript); + throttle_->WillStartRequest(&request, &defer); + message_loop_.RunUntilIdle(); + + auto response_head = network::mojom::URLResponseHead::New(); + throttle_->WillProcessResponse(url, response_head.get(), &defer); + EXPECT_FALSE(defer); + histograms.ExpectTotalCount( + "SafeBrowsing.RendererThrottle.RequestDestination.Checked", 0); + histograms.ExpectTotalCount( + "SafeBrowsing.RendererThrottle.RequestDestination.Skipped", 1); } TEST_F(SBRendererUrlLoaderThrottleTest, DoesNotDeferChromeUrl) { + base::HistogramTester histograms; GURL url("chrome://settings/"); bool defer = false; network::ResourceRequest request = @@ -142,6 +146,10 @@ auto response_head = network::mojom::URLResponseHead::New(); throttle_->WillProcessResponse(url, response_head.get(), &defer); EXPECT_FALSE(defer); + histograms.ExpectTotalCount( + "SafeBrowsing.RendererThrottle.RequestDestination.Checked", 0); + histograms.ExpectTotalCount( + "SafeBrowsing.RendererThrottle.RequestDestination.Skipped", 0); } TEST_F(SBRendererUrlLoaderThrottleTest, @@ -160,9 +168,8 @@ histograms.ExpectUniqueTimeSample("SafeBrowsing.RendererThrottle.TotalDelay3", base::Milliseconds(0), 1); - histograms.ExpectUniqueTimeSample( - "SafeBrowsing.RendererThrottle.TotalDelay2.FromNetwork", - base::Milliseconds(0), 1); + histograms.ExpectTotalCount( + "SafeBrowsing.RendererThrottle.TotalDelay2.FromNetwork", 0); histograms.ExpectTotalCount( "SafeBrowsing.RendererThrottle.TotalDelay2.FromCache", 0); } @@ -186,70 +193,13 @@ histograms.ExpectUniqueTimeSample("SafeBrowsing.RendererThrottle.TotalDelay3", base::Milliseconds(0), 1); - histograms.ExpectUniqueTimeSample( - "SafeBrowsing.RendererThrottle.TotalDelay2.FromCache", - base::Milliseconds(0), 1); histograms.ExpectTotalCount( "SafeBrowsing.RendererThrottle.TotalDelay2.FromNetwork", 0); -} - -TEST_F(SBRendererUrlLoaderThrottleTest, VerifyTotalDelayHistograms_Defer) { - base::HistogramTester histograms; - safe_browsing_.EnableDelayCallback(); - GURL url("https://example.com/"); - bool defer = false; - network::ResourceRequest request = - GetResourceRequest(url, network::mojom::RequestDestination::kScript); - throttle_->WillStartRequest(&request, &defer); - message_loop_.RunUntilIdle(); - - auto response_head = network::mojom::URLResponseHead::New(); - throttle_->WillProcessResponse(url, response_head.get(), &defer); - - message_loop_.FastForwardBy(base::Milliseconds(200)); - safe_browsing_.RestartDelayedCallback(); - message_loop_.RunUntilIdle(); - - histograms.ExpectUniqueTimeSample("SafeBrowsing.RendererThrottle.TotalDelay3", - base::Milliseconds(200), 1); - histograms.ExpectUniqueTimeSample( - "SafeBrowsing.RendererThrottle.TotalDelay2.FromNetwork", - base::Milliseconds(200), 1); histograms.ExpectTotalCount( "SafeBrowsing.RendererThrottle.TotalDelay2.FromCache", 0); } TEST_F(SBRendererUrlLoaderThrottleTest, - VerifyTotalDelayHistograms_DeferFromCache) { - base::HistogramTester histograms; - safe_browsing_.EnableDelayCallback(); - GURL url("https://example.com/"); - bool defer = false; - network::ResourceRequest request = - GetResourceRequest(url, network::mojom::RequestDestination::kScript); - throttle_->WillStartRequest(&request, &defer); - message_loop_.RunUntilIdle(); - - auto response_head = network::mojom::URLResponseHead::New(); - // Set up a "cache" response. - response_head->was_fetched_via_cache = true; - response_head->network_accessed = false; - throttle_->WillProcessResponse(url, response_head.get(), &defer); - - message_loop_.FastForwardBy(base::Milliseconds(200)); - safe_browsing_.RestartDelayedCallback(); - message_loop_.RunUntilIdle(); - - histograms.ExpectUniqueTimeSample("SafeBrowsing.RendererThrottle.TotalDelay3", - base::Milliseconds(200), 1); - histograms.ExpectUniqueTimeSample( - "SafeBrowsing.RendererThrottle.TotalDelay2.FromCache", - base::Milliseconds(200), 1); - histograms.ExpectTotalCount( - "SafeBrowsing.RendererThrottle.TotalDelay2.FromNetwork", 0); -} - -TEST_F(SBRendererUrlLoaderThrottleTest, VerifyTotalDelayHistograms_SkipChromeUrl) { base::HistogramTester histograms; GURL url("chrome://settings/"); @@ -259,6 +209,10 @@ throttle_->WillStartRequest(&request, &defer); histograms.ExpectUniqueTimeSample("SafeBrowsing.RendererThrottle.TotalDelay3", base::Milliseconds(0), 1); + histograms.ExpectTotalCount( + "SafeBrowsing.RendererThrottle.TotalDelay2.FromNetwork", 0); + histograms.ExpectTotalCount( + "SafeBrowsing.RendererThrottle.TotalDelay2.FromCache", 0); } TEST_F(SBRendererUrlLoaderThrottleTest, @@ -271,20 +225,71 @@ throttle_->WillStartRequest(&request, &defer); histograms.ExpectUniqueTimeSample("SafeBrowsing.RendererThrottle.TotalDelay3", base::Milliseconds(0), 1); + histograms.ExpectTotalCount( + "SafeBrowsing.RendererThrottle.TotalDelay2.FromNetwork", 0); + histograms.ExpectTotalCount( + "SafeBrowsing.RendererThrottle.TotalDelay2.FromCache", 0); } -class SBRendererUrlLoaderThrottleDisableSkipImageCssFontTest +TEST_F(SBRendererUrlLoaderThrottleTest, + VerifyTotalDelayHistograms_SkipScriptUrl) { + base::HistogramTester histograms; + GURL url("https://example.com/"); + bool defer = false; + network::ResourceRequest request = + GetResourceRequest(url, network::mojom::RequestDestination::kScript); + throttle_->WillStartRequest(&request, &defer); + histograms.ExpectUniqueTimeSample("SafeBrowsing.RendererThrottle.TotalDelay3", + base::Milliseconds(0), 1); + histograms.ExpectTotalCount( + "SafeBrowsing.RendererThrottle.TotalDelay2.FromNetwork", 0); + histograms.ExpectTotalCount( + "SafeBrowsing.RendererThrottle.TotalDelay2.FromCache", 0); +} + +TEST_F(SBRendererUrlLoaderThrottleTest, + VerifyTotalDelayHistograms_SkipIframeUrl) { + base::HistogramTester histograms; + GURL url("https://example.com/"); + bool defer = false; + network::ResourceRequest request = + GetResourceRequest(url, network::mojom::RequestDestination::kIframe); + throttle_->WillStartRequest(&request, &defer); + histograms.ExpectUniqueTimeSample("SafeBrowsing.RendererThrottle.TotalDelay3", + base::Milliseconds(0), 1); + histograms.ExpectTotalCount( + "SafeBrowsing.RendererThrottle.TotalDelay2.FromNetwork", 0); + histograms.ExpectTotalCount( + "SafeBrowsing.RendererThrottle.TotalDelay2.FromCache", 0); +} + +class SBRendererUrlLoaderThrottleDisableSkipSubresourcesTest : public SBRendererUrlLoaderThrottleTest { public: - SBRendererUrlLoaderThrottleDisableSkipImageCssFontTest() { - feature_list_.InitAndDisableFeature(kSafeBrowsingSkipImageCssFont); + SBRendererUrlLoaderThrottleDisableSkipSubresourcesTest() { + feature_list_.InitAndDisableFeature(kSafeBrowsingSkipSubresources); } protected: base::test::ScopedFeatureList feature_list_; }; -TEST_F(SBRendererUrlLoaderThrottleDisableSkipImageCssFontTest, +TEST_F(SBRendererUrlLoaderThrottleDisableSkipSubresourcesTest, + DefersHttpsScriptUrl) { + safe_browsing_.EnableDelayCallback(); + GURL url("https://example.com/"); + bool defer = false; + network::ResourceRequest request = + GetResourceRequest(url, network::mojom::RequestDestination::kScript); + throttle_->WillStartRequest(&request, &defer); + message_loop_.RunUntilIdle(); + + auto response_head = network::mojom::URLResponseHead::New(); + throttle_->WillProcessResponse(url, response_head.get(), &defer); + EXPECT_TRUE(defer); +} + +TEST_F(SBRendererUrlLoaderThrottleDisableSkipSubresourcesTest, DefersHttpsImageUrl) { safe_browsing_.EnableDelayCallback(); GURL url("https://example.com/");
diff --git a/components/safe_browsing/core/common/features.cc b/components/safe_browsing/core/common/features.cc index 7616802..ceb941a 100644 --- a/components/safe_browsing/core/common/features.cc +++ b/components/safe_browsing/core/common/features.cc
@@ -276,6 +276,10 @@ #endif ); +BASE_FEATURE(kSafeBrowsingSkipSubresources, + "SafeBrowsingSkipSubResources", + base::FEATURE_DISABLED_BY_DEFAULT); + BASE_FEATURE(kSevenZipEvaluationEnabled, "SafeBrowsingSevenZipEvaluationEnabled", base::FEATURE_ENABLED_BY_DEFAULT); @@ -381,6 +385,8 @@ {&kSafeBrowsingCsbrrNewDownloadTrigger, true}, {&kSafeBrowsingLookupMechanismExperiment, true}, {&kSafeBrowsingRemoveCookiesInAuthRequests, true}, + {&kSafeBrowsingSkipImageCssFont, true}, + {&kSafeBrowsingSkipSubresources, true}, {&kSevenZipEvaluationEnabled, true}, {&kSimplifiedUrlDisplay, true}, {&kStrictDownloadTimeout, true},
diff --git a/components/safe_browsing/core/common/features.h b/components/safe_browsing/core/common/features.h index fbfefd9..77721b7 100644 --- a/components/safe_browsing/core/common/features.h +++ b/components/safe_browsing/core/common/features.h
@@ -258,6 +258,10 @@ // renderer URL loader throttle. BASE_DECLARE_FEATURE(kSafeBrowsingSkipImageCssFont); +// Controls whether to skip Safe Browsing checks on all subresource URLs in +// renderer and browser URL loader throttles. +BASE_DECLARE_FEATURE(kSafeBrowsingSkipSubresources); + // Controls whether the new 7z evaluation is performed on downloads. BASE_DECLARE_FEATURE(kSevenZipEvaluationEnabled);
diff --git a/components/search_engines/prepopulated_engines.json b/components/search_engines/prepopulated_engines.json index 8ff1dd0..8bc20a6 100644 --- a/components/search_engines/prepopulated_engines.json +++ b/components/search_engines/prepopulated_engines.json
@@ -23,12 +23,12 @@ // When adding new engines, increment this number and use it as the new // max ID. This is used by UMA stats and must be updated to include the full // range or else not all engines will be counted in stats. - "kMaxPrepopulatedEngineID": 102, + "kMaxPrepopulatedEngineID": 110, // Increment this if you change the data in ways that mean users with // existing data should get a new version. Otherwise, existing data may // continue to be used and updates made here will not always appear. - "kCurrentDataVersion": 140 + "kCurrentDataVersion": 141 }, // The following engines are included in country lists and are added to the @@ -72,6 +72,16 @@ "id": 3 }, + "brave": { + "name": "Brave Search", + "keyword": "search.brave.com", + "favicon_url": "https://cdn.search.brave.com/serp/v1/static/brand/eebf5f2ce06b0b0ee6bbd72d7e18621d4618b9663471d42463c692d019068072-brave-lion-favicon.png", + "search_url": "https://search.brave.com/search?q={searchTerms}", + "suggest_url": "https://search.brave.com/api/suggest?q={searchTerms}", + "type": "SEARCH_ENGINE_BRAVE", + "id": 109 + }, + "coccoc": { "name": "Cốc Cốc", "keyword": "coccoc.com", @@ -141,6 +151,25 @@ "id": 1 }, + "karma": { + "name": "Karma Search", + "keyword": "karmasearch.org", + "favicon_url": "https://karmasearch.org/favicon.ico", + "search_url": "https://karmasearch.org/search?q={searchTerms}", + "suggest_url": "https://api.karmasearch.org/search/autosuggest?q={searchTerms}", + "type": "SEARCH_ENGINE_KARMA", + "id": 110 + }, + + "lilo": { + "name": "Lilo", + "keyword": "lilo.org", + "favicon_url": "https://www.lilo.org/wp-content/themes/jarvis_wp/ajans/assets/favicon.ico", + "search_url": "https://search.lilo.org/?q={searchTerms}", + "suggest_url": "https://search.lilo.org/api/?service=suggestions&action=suggest&q={searchTerms}&f=chr", + "id": 106 + }, + "mail_ru": { "name": "@MAIL.RU", "keyword": "mail.ru", @@ -155,6 +184,15 @@ "id": 83 }, + "mojeek": { + "name": "Mojeek", + "keyword": "mojeek.com", + "favicon_url": "https://www.mojeek.com/favicon.ico", + "search_url": "https://www.mojeek.com/search?q={searchTerms}", + "type": "SEARCH_ENGINE_MOJEEK", + "id": 103 + }, + "naver": { "name": "\ub124\uc774\ubc84", "keyword": "naver.com", @@ -165,6 +203,26 @@ "id": 67 }, + "nona": { + "name": "Nona", + "keyword": "nona.de", + "favicon_url": "https://www.nona.de/favicon.ico", + "search_url": "https://www.nona.de/?q={searchTerms}", + "suggest_url": "https://www.nona.de/autocomplete/?q={searchTerms}", + "type": "SEARCH_ENGINE_NONA", + "id": 107 + }, + + "panda": { + "name": "Panda Search", + "keyword": "panda-search.org", + "favicon_url": "https://panda-search.org/favicon.ico", + "search_url": "https://panda-search.org/search/?q={searchTerms}", + "suggest_url": "https://suggest.panda-search.org/suggest?rtag=pandaomn&rsrc=po&q={searchTerms}&fmt=cr", + "type": "SEARCH_ENGINE_PANDASEARCH", + "id": 104 + }, + "petal_search": { "name": "Petal Search", "keyword": "petalsearch.com", @@ -174,6 +232,26 @@ "id": 102 }, + "presearch": { + "name": "Presearch", + "keyword": "presearch.com", + "favicon_url": "https://presearch.com/favicon.ico", + "search_url": "https://presearch.com/search?q={searchTerms}&src=c", + "suggest_url": "https://presearch.com/api/suggest?q={searchTerms}&src=c", + "type": "SEARCH_ENGINE_PRESEARCH", + "id": 105 + }, + + "quendu": { + "name": "Quendu.com", + "keyword": "quendu.com", + "favicon_url": "https://quendu.com/assets/favicon-48x48.png", + "search_url": "https://www.quendu.com/search?q={searchTerms}", + "suggest_url": "https://www.quendu.com/suggest?query={searchTerms}", + "type": "SEARCH_ENGINE_QUENDU", + "id": 108 + }, + "qwant": { "name": "Qwant", "keyword": "qwant.com", @@ -632,6 +710,15 @@ "id": 15 }, + "yep": { + "name": "Yep", + "keyword": "yep.com", + "favicon_url": "https://yep.com/assets/opensearch-64x64.png", + "search_url": "https://yep.com/web?q={searchTerms}", + "suggest_url": "https://api.yep.com/ac/?query={searchTerms}&os=true", + "type": "SEARCH_ENGINE_YEP", + "id": 106 + }, // UMA-only engines ////////////////////////////////////////////////////////
diff --git a/components/search_engines/search_engine_type.h b/components/search_engines/search_engine_type.h index ab07896..0bee0b5f 100644 --- a/components/search_engines/search_engine_type.h +++ b/components/search_engines/search_engine_type.h
@@ -78,6 +78,14 @@ SEARCH_ENGINE_STARTER_PACK_BOOKMARKS = 61, SEARCH_ENGINE_STARTER_PACK_HISTORY = 62, SEARCH_ENGINE_STARTER_PACK_TABS = 63, + SEARCH_ENGINE_MOJEEK = 64, + SEARCH_ENGINE_PANDASEARCH = 65, + SEARCH_ENGINE_PRESEARCH = 66, + SEARCH_ENGINE_YEP = 67, + SEARCH_ENGINE_NONA = 68, + SEARCH_ENGINE_QUENDU = 69, + SEARCH_ENGINE_BRAVE = 70, + SEARCH_ENGINE_KARMA = 71, SEARCH_ENGINE_MAX // Bounding value needed for UMA histogram macro. };
diff --git a/components/services/storage/service_worker/service_worker_database.cc b/components/services/storage/service_worker/service_worker_database.cc index 71e5cb0..4de4d928 100644 --- a/components/services/storage/service_worker/service_worker_database.cc +++ b/components/services/storage/service_worker/service_worker_database.cc
@@ -17,16 +17,16 @@ #include "base/strings/string_util.h" #include "base/strings/stringprintf.h" #include "components/services/storage/filesystem_proxy_factory.h" +#include "components/services/storage/public/mojom/service_worker_database.mojom-forward.h" #include "components/services/storage/service_worker/service_worker_database.pb.h" #include "services/network/public/cpp/web_sandbox_flags.h" -#include "services/network/public/mojom/cross_origin_embedder_policy.mojom-shared.h" -#include "services/network/public/mojom/cross_origin_opener_policy.mojom-shared.h" #include "services/network/public/mojom/ip_address_space.mojom-shared.h" +#include "services/network/public/mojom/referrer_policy.mojom.h" #include "services/network/public/mojom/web_sandbox_flags.mojom-shared.h" #include "third_party/abseil-cpp/absl/types/optional.h" +#include "third_party/blink/public/common/service_worker/service_worker_router_rule.h" #include "third_party/blink/public/common/storage_key/storage_key.h" #include "third_party/blink/public/mojom/service_worker/service_worker_ancestor_frame_type.mojom.h" -#include "third_party/blink/public/mojom/service_worker/service_worker_database.mojom.h" #include "third_party/leveldatabase/env_chromium.h" #include "third_party/leveldatabase/leveldb_chrome.h" #include "third_party/leveldatabase/src/include/leveldb/db.h" @@ -412,8 +412,7 @@ return absl::nullopt; case ServiceWorkerRegistrationData::RouterRules::RuleV1::Condition:: kUrlPattern: { - ret.type = - blink::ServiceWorkerRouterCondition::ConditionType::kUrlPattern; + ret.type = blink::ServiceWorkerRouterCondition::Type::kUrlPattern; blink::SafeUrlPattern url_pattern; if (condition.url_pattern().legacy_pathname_size() == 0) { if (condition.url_pattern().protocol_size() > 0) { @@ -514,7 +513,7 @@ } case ServiceWorkerRegistrationData::RouterRules::RuleV1::Condition:: kRequest: { - ret.type = blink::ServiceWorkerRouterCondition::ConditionType::kRequest; + ret.type = blink::ServiceWorkerRouterCondition::Type::kRequest; blink::ServiceWorkerRouterRequestCondition request; if (condition.request().has_method()) { request.method = condition.request().method(); @@ -661,8 +660,7 @@ } case ServiceWorkerRegistrationData::RouterRules::RuleV1::Condition:: kRunningStatus: { - ret.type = - blink::ServiceWorkerRouterCondition::ConditionType::kRunningStatus; + ret.type = blink::ServiceWorkerRouterCondition::Type::kRunningStatus; blink::ServiceWorkerRouterRunningStatusCondition running_status; if (!condition.has_running_status() || !condition.running_status().has_status()) { @@ -685,6 +683,28 @@ ret.running_status = running_status; break; } + case ServiceWorkerRegistrationData::RouterRules::RuleV1::Condition::kOr: { + ret.type = blink::ServiceWorkerRouterCondition::Type::kOr; + if (!condition.has_or_()) { + return absl::nullopt; + } + blink::ServiceWorkerRouterOrCondition or_condition; + + const auto& pb_conditions = condition.or_().conditions(); + or_condition.conditions.reserve(pb_conditions.size()); + for (const auto& pb_c : pb_conditions) { + absl::optional<blink::ServiceWorkerRouterCondition> c = + ConvertToBlinkCondition(pb_c); + if (c) { + or_condition.conditions.emplace_back(std::move(*c)); + } else { + return absl::nullopt; + } + } + + ret.or_condition = std::move(or_condition); + break; + } } return ret; @@ -694,7 +714,7 @@ const blink::ServiceWorkerRouterCondition& condition, ServiceWorkerRegistrationData::RouterRules::RuleV1::Condition* out) { switch (condition.type) { - case blink::ServiceWorkerRouterCondition::ConditionType::kUrlPattern: { + case blink::ServiceWorkerRouterCondition::Type::kUrlPattern: { ServiceWorkerRegistrationData::RouterRules::RuleV1::Condition::URLPattern* mutable_url_pattern = out->mutable_url_pattern(); CHECK(!condition.url_pattern->protocol.empty() || @@ -741,7 +761,7 @@ condition.url_pattern->options.ignore_case); break; } - case blink::ServiceWorkerRouterCondition::ConditionType::kRequest: { + case blink::ServiceWorkerRouterCondition::Type::kRequest: { ServiceWorkerRegistrationData::RouterRules::RuleV1::Condition::Request* request = out->mutable_request(); if (condition.request->method) { @@ -903,7 +923,7 @@ } break; } - case blink::ServiceWorkerRouterCondition::ConditionType::kRunningStatus: { + case blink::ServiceWorkerRouterCondition::Type::kRunningStatus: { ServiceWorkerRegistrationData::RouterRules::RuleV1::Condition:: RunningStatus* running_status = out->mutable_running_status(); switch (condition.running_status->status) { @@ -922,6 +942,16 @@ } break; } + case blink::ServiceWorkerRouterCondition::Type::kOr: { + const auto& conditions = condition.or_condition->conditions; + auto* pb_conditions = out->mutable_or_()->mutable_conditions(); + pb_conditions->Reserve(conditions.size()); + for (auto&& c : conditions) { + auto* e_out = pb_conditions->Add(); + WriteConditionToProto(c, e_out); + } + break; + } } }
diff --git a/components/services/storage/service_worker/service_worker_database.proto b/components/services/storage/service_worker/service_worker_database.proto index 9679dd7..eac90832 100644 --- a/components/services/storage/service_worker/service_worker_database.proto +++ b/components/services/storage/service_worker/service_worker_database.proto
@@ -176,6 +176,9 @@ } optional Status status = 1; } + message Or { + repeated Condition conditions = 1; + } oneof condition { // Used for representing URLPattern. URLPattern url_pattern = 1; @@ -183,6 +186,8 @@ Request request = 2; // Used for representing running status. RunningStatus running_status = 3; + // Used for representing 'or' condition. + Or or = 4; } } message Source {
diff --git a/components/services/storage/service_worker/service_worker_database_unittest.cc b/components/services/storage/service_worker/service_worker_database_unittest.cc index 4ae2b8db..67f130e0 100644 --- a/components/services/storage/service_worker/service_worker_database_unittest.cc +++ b/components/services/storage/service_worker/service_worker_database_unittest.cc
@@ -23,8 +23,8 @@ #include "services/network/public/mojom/fetch_api.mojom-shared.h" #include "services/network/public/mojom/referrer_policy.mojom-shared.h" #include "services/network/public/mojom/web_sandbox_flags.mojom-shared.h" -#include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" +#include "third_party/blink/public/common/service_worker/service_worker_router_rule.h" #include "third_party/blink/public/mojom/frame/policy_container.mojom.h" #include "third_party/blink/public/mojom/service_worker/service_worker_object.mojom.h" #include "third_party/blink/public/mojom/service_worker/service_worker_registration.mojom.h" @@ -3594,8 +3594,7 @@ blink::ServiceWorkerRouterRules router_rules; blink::ServiceWorkerRouterRule rule; blink::ServiceWorkerRouterCondition condition; - condition.type = - blink::ServiceWorkerRouterCondition::ConditionType::kUrlPattern; + condition.type = blink::ServiceWorkerRouterCondition::Type::kUrlPattern; blink::SafeUrlPattern url_pattern; url_pattern.protocol.emplace_back(liburlpattern::PartType::kFixed, "https", liburlpattern::Modifier::kNone); @@ -3636,8 +3635,7 @@ blink::ServiceWorkerRouterRule rule; { blink::ServiceWorkerRouterCondition condition; - condition.type = - blink::ServiceWorkerRouterCondition::ConditionType::kUrlPattern; + condition.type = blink::ServiceWorkerRouterCondition::Type::kUrlPattern; blink::SafeUrlPattern url_pattern; url_pattern.protocol.emplace_back(liburlpattern::PartType::kFixed, "https", @@ -3666,8 +3664,7 @@ { // test with full data. blink::ServiceWorkerRouterCondition condition; - condition.type = - blink::ServiceWorkerRouterCondition::ConditionType::kRequest; + condition.type = blink::ServiceWorkerRouterCondition::Type::kRequest; blink::ServiceWorkerRouterRequestCondition request; request.method = "GET"; request.mode = network::mojom::RequestMode::kNavigate; @@ -3678,8 +3675,7 @@ { // test with empty data. blink::ServiceWorkerRouterCondition condition; - condition.type = - blink::ServiceWorkerRouterCondition::ConditionType::kRequest; + condition.type = blink::ServiceWorkerRouterCondition::Type::kRequest; blink::ServiceWorkerRouterRequestCondition request; condition.request = request; rule.conditions.push_back(condition); @@ -3688,13 +3684,29 @@ // test for running status. blink::ServiceWorkerRouterCondition condition; condition.type = - blink::ServiceWorkerRouterCondition::ConditionType::kRunningStatus; + blink::ServiceWorkerRouterCondition::Type::kRunningStatus; blink::ServiceWorkerRouterRunningStatusCondition running_status; running_status.status = blink::ServiceWorkerRouterRunningStatusCondition:: RunningStatusEnum::kRunning; condition.running_status = running_status; rule.conditions.push_back(condition); } + { + // test for `or` condition + blink::ServiceWorkerRouterCondition condition; + condition.type = blink::ServiceWorkerRouterCondition::Type::kOr; + blink::ServiceWorkerRouterOrCondition or_condition; + + blink::ServiceWorkerRouterCondition fake; + fake.type = blink::ServiceWorkerRouterCondition::Type::kRequest; + blink::ServiceWorkerRouterRequestCondition request; + fake.request = request; + + or_condition.conditions = std::vector(3, fake); + condition.or_condition = or_condition; + + rule.conditions.push_back(condition); + } blink::ServiceWorkerRouterSource source; source.type = blink::ServiceWorkerRouterSource::SourceType::kNetwork; @@ -3710,8 +3722,7 @@ blink::ServiceWorkerRouterRules router_rules; blink::ServiceWorkerRouterRule rule; blink::ServiceWorkerRouterCondition condition; - condition.type = - blink::ServiceWorkerRouterCondition::ConditionType::kUrlPattern; + condition.type = blink::ServiceWorkerRouterCondition::Type::kUrlPattern; blink::SafeUrlPattern url_pattern; url_pattern.pathname.emplace_back(liburlpattern::PartType::kFixed, "/test_data", @@ -3742,8 +3753,7 @@ blink::ServiceWorkerRouterRules router_rules; blink::ServiceWorkerRouterRule rule; blink::ServiceWorkerRouterCondition condition; - condition.type = - blink::ServiceWorkerRouterCondition::ConditionType::kUrlPattern; + condition.type = blink::ServiceWorkerRouterCondition::Type::kUrlPattern; blink::SafeUrlPattern url_pattern; url_pattern.hostname.emplace_back(liburlpattern::PartType::kFixed, "example.com", @@ -3774,8 +3784,7 @@ blink::ServiceWorkerRouterRules router_rules; blink::ServiceWorkerRouterRule rule; blink::ServiceWorkerRouterCondition condition; - condition.type = - blink::ServiceWorkerRouterCondition::ConditionType::kUrlPattern; + condition.type = blink::ServiceWorkerRouterCondition::Type::kUrlPattern; blink::SafeUrlPattern url_pattern; url_pattern.hostname.emplace_back(liburlpattern::PartType::kFixed, "example.com", @@ -3828,8 +3837,7 @@ blink::ServiceWorkerRouterRules router_rules; blink::ServiceWorkerRouterRule rule; blink::ServiceWorkerRouterCondition condition; - condition.type = - blink::ServiceWorkerRouterCondition::ConditionType::kUrlPattern; + condition.type = blink::ServiceWorkerRouterCondition::Type::kUrlPattern; blink::SafeUrlPattern url_pattern; url_pattern.pathname.emplace_back(liburlpattern::PartType::kFixed, "/test_data",
diff --git a/components/stylus_handwriting/android/java/src/org/chromium/components/stylus_handwriting/AndroidStylusWritingHandler.java b/components/stylus_handwriting/android/java/src/org/chromium/components/stylus_handwriting/AndroidStylusWritingHandler.java index c4801ee0..a83ff28 100644 --- a/components/stylus_handwriting/android/java/src/org/chromium/components/stylus_handwriting/AndroidStylusWritingHandler.java +++ b/components/stylus_handwriting/android/java/src/org/chromium/components/stylus_handwriting/AndroidStylusWritingHandler.java
@@ -56,9 +56,17 @@ InputMethodManager inputMethodManager = context.getSystemService(InputMethodManager.class); List<InputMethodInfo> inputMethods = inputMethodManager.getInputMethodList(); - ComponentName defaultImePackage = - ComponentName.unflattenFromString(Settings.Secure.getString( - context.getContentResolver(), Settings.Secure.DEFAULT_INPUT_METHOD)); + String defaultIme = Settings.Secure.getString( + context.getContentResolver(), Settings.Secure.DEFAULT_INPUT_METHOD); + + if (defaultIme == null) { + Log.d(TAG, + "Stylus handwriting feature is not supported as " + + "default IME could not be fetched."); + return false; + } + + ComponentName defaultImePackage = ComponentName.unflattenFromString(defaultIme); for (InputMethodInfo inputMethod : inputMethods) { if (!inputMethod.getComponent().equals(defaultImePackage)) continue;
diff --git a/content/browser/attribution_reporting/attribution_data_host_manager_impl.cc b/content/browser/attribution_reporting/attribution_data_host_manager_impl.cc index 037fe5c..4f2592b 100644 --- a/content/browser/attribution_reporting/attribution_data_host_manager_impl.cc +++ b/content/browser/attribution_reporting/attribution_data_host_manager_impl.cc
@@ -762,11 +762,10 @@ input_event = context->navigation()->input_event(); } for (auto& item : registration_items) { - attribution_manager_->HandleOsRegistration( - OsRegistration(std::move(item.url), item.debug_reporting, - context->context_origin(), input_event, - context->is_within_fenced_frame()), - context->render_frame_id()); + attribution_manager_->HandleOsRegistration(OsRegistration( + std::move(item.url), item.debug_reporting, context->context_origin(), + input_event, context->is_within_fenced_frame(), + context->render_frame_id())); } } @@ -779,12 +778,10 @@ } for (auto& item : registration_items) { - attribution_manager_->HandleOsRegistration( - OsRegistration(std::move(item.url), item.debug_reporting, - context->context_origin(), - /*input_event=*/absl::nullopt, - context->is_within_fenced_frame()), - context->render_frame_id()); + attribution_manager_->HandleOsRegistration(OsRegistration( + std::move(item.url), item.debug_reporting, context->context_origin(), + /*input_event=*/absl::nullopt, context->is_within_fenced_frame(), + context->render_frame_id())); } } @@ -958,8 +955,8 @@ attribution_manager_->HandleOsRegistration( OsRegistration(std::move(item.url), item.debug_reporting, registrations->source_origin(), input_event, - registrations->is_within_fenced_frame()), - registrations->render_frame_id()); + registrations->is_within_fenced_frame(), + registrations->render_frame_id())); } } else { const auto& pending_decode = registrations->pending_os_decodes().front();
diff --git a/content/browser/attribution_reporting/attribution_data_host_manager_impl_unittest.cc b/content/browser/attribution_reporting/attribution_data_host_manager_impl_unittest.cc index efa233c5..fa5b2d2 100644 --- a/content/browser/attribution_reporting/attribution_data_host_manager_impl_unittest.cc +++ b/content/browser/attribution_reporting/attribution_data_host_manager_impl_unittest.cc
@@ -1109,13 +1109,11 @@ const GURL reporter_url("https://report.test"); const auto source_site = *SuitableOrigin::Deserialize("https://source.test"); - EXPECT_CALL( - mock_manager_, - HandleOsRegistration( - OsRegistration(GURL("https://r.test/x"), /*debug_reporting=*/false, - *source_site, AttributionInputEvent(), - /*is_within_fenced_frame=*/false), - kFrameId)); + EXPECT_CALL(mock_manager_, + HandleOsRegistration(OsRegistration( + GURL("https://r.test/x"), /*debug_reporting=*/false, + *source_site, AttributionInputEvent(), + /*is_within_fenced_frame=*/false, kFrameId))); auto headers = base::MakeRefCounted<net::HttpResponseHeaders>(""); headers->SetHeader(kAttributionReportingRegisterOsSourceHeader, @@ -1176,20 +1174,16 @@ { InSequence seq; - EXPECT_CALL( - mock_manager_, - HandleOsRegistration( - OsRegistration(GURL("https://b.test/"), /*debug_reporting=*/true, - *source_site, AttributionInputEvent(), - /*is_within_fenced_frame=*/false), - kFrameId)); - EXPECT_CALL( - mock_manager_, - HandleOsRegistration( - OsRegistration(GURL("https://a.test/"), /*debug_reporting=*/false, - *source_site, AttributionInputEvent(), - /*is_within_fenced_frame=*/true), - kFrameId)); + EXPECT_CALL(mock_manager_, + HandleOsRegistration(OsRegistration( + GURL("https://b.test/"), /*debug_reporting=*/true, + *source_site, AttributionInputEvent(), + /*is_within_fenced_frame=*/false, kFrameId))); + EXPECT_CALL(mock_manager_, + HandleOsRegistration(OsRegistration( + GURL("https://a.test/"), /*debug_reporting=*/false, + *source_site, AttributionInputEvent(), + /*is_within_fenced_frame=*/true, kFrameId))); } const blink::AttributionSrcToken attribution_src_token; @@ -1923,13 +1917,11 @@ auto reporting_url = GURL("https://report.test"); auto source_origin = *SuitableOrigin::Deserialize("https://source.test"); - EXPECT_CALL( - mock_manager_, - HandleOsRegistration( - OsRegistration(GURL("https://r.test/x"), /*debug_reporting=*/false, - *source_origin, AttributionInputEvent(), - /*is_within_fenced_frame=*/false), - kFrameId)); + EXPECT_CALL(mock_manager_, + HandleOsRegistration(OsRegistration( + GURL("https://r.test/x"), /*debug_reporting=*/false, + *source_origin, AttributionInputEvent(), + /*is_within_fenced_frame=*/false, kFrameId))); auto headers = base::MakeRefCounted<net::HttpResponseHeaders>(""); headers->SetHeader(kAttributionReportingRegisterOsSourceHeader, @@ -2398,12 +2390,10 @@ const auto kTopLevelOrigin = *SuitableOrigin::Deserialize("https://a.test"); const GURL kRegistrationUrl("https://b.test/x"); - EXPECT_CALL(mock_manager_, - HandleOsRegistration( - OsRegistration(kRegistrationUrl, /*debug_reporting=*/true, + EXPECT_CALL(mock_manager_, HandleOsRegistration(OsRegistration( + kRegistrationUrl, /*debug_reporting=*/true, *kTopLevelOrigin, AttributionInputEvent(), - /*is_within_fenced_frame=*/true), - kFrameId)); + /*is_within_fenced_frame=*/true, kFrameId))); mojo::Remote<blink::mojom::AttributionDataHost> data_host_remote; data_host_manager_.RegisterDataHost( @@ -2422,13 +2412,11 @@ const auto kTopLevelOrigin = *SuitableOrigin::Deserialize("https://a.test"); const GURL kRegistrationUrl("https://b.test/x"); - EXPECT_CALL( - mock_manager_, - HandleOsRegistration( - OsRegistration( - kRegistrationUrl, /*debug_reporting=*/true, *kTopLevelOrigin, - /*input_event=*/absl::nullopt, /*is_within_fenced_frame=*/true), - kFrameId)); + EXPECT_CALL(mock_manager_, + HandleOsRegistration(OsRegistration( + kRegistrationUrl, /*debug_reporting=*/true, *kTopLevelOrigin, + /*input_event=*/absl::nullopt, + /*is_within_fenced_frame=*/true, kFrameId))); mojo::Remote<blink::mojom::AttributionDataHost> data_host_remote; data_host_manager_.RegisterDataHost(
diff --git a/content/browser/attribution_reporting/attribution_debug_report_unittest.cc b/content/browser/attribution_reporting/attribution_debug_report_unittest.cc index c5cdf0c..6214a92 100644 --- a/content/browser/attribution_reporting/attribution_debug_report_unittest.cc +++ b/content/browser/attribution_reporting/attribution_debug_report_unittest.cc
@@ -954,7 +954,9 @@ /*registration_url=*/GURL("https://a.test/x"), /*debug_reporting=*/true, /*top_level_origin=*/url::Origin::Create(GURL("https://b.test")), - AttributionInputEvent(), /*is_within_fenced_frame=*/false), + AttributionInputEvent(), + /*is_within_fenced_frame=*/false, + /*render_frame_id=*/GlobalRenderFrameHostId()), R"json([{ "body": { "context_site": "https://b.test", @@ -969,7 +971,8 @@ /*registration_url=*/GURL("https://a.test/x"), /*debug_reporting=*/true, /*top_level_origin=*/url::Origin::Create(GURL("https://b.test")), - /*input_event=*/absl::nullopt, /*is_within_fenced_frame=*/false), + /*input_event=*/absl::nullopt, /*is_within_fenced_frame=*/false, + /*render_frame_id=*/GlobalRenderFrameHostId()), R"json([{ "body": { "context_site": "https://b.test", @@ -984,7 +987,8 @@ /*registration_url=*/GURL("https://a.test/x"), /*debug_reporting=*/false, /*top_level_origin=*/url::Origin::Create(GURL("https://b.test")), - /*input_event=*/absl::nullopt, /*is_within_fenced_frame=*/false), + /*input_event=*/absl::nullopt, /*is_within_fenced_frame=*/false, + /*render_frame_id=*/GlobalRenderFrameHostId()), nullptr, }, { @@ -993,7 +997,8 @@ /*registration_url=*/GURL("https://a.test/x"), /*debug_reporting=*/true, /*top_level_origin=*/url::Origin::Create(GURL("https://b.test")), - /*input_event=*/absl::nullopt, /*is_within_fenced_frame=*/true), + /*input_event=*/absl::nullopt, /*is_within_fenced_frame=*/true, + /*render_frame_id=*/GlobalRenderFrameHostId()), nullptr, }, { @@ -1002,7 +1007,8 @@ /*registration_url=*/GURL("http://a.test/x"), /*debug_reporting=*/true, /*top_level_origin=*/url::Origin::Create(GURL("https://b.test")), - /*input_event=*/absl::nullopt, /*is_within_fenced_frame=*/false), + /*input_event=*/absl::nullopt, /*is_within_fenced_frame=*/false, + /*render_frame_id=*/GlobalRenderFrameHostId()), nullptr, }, };
diff --git a/content/browser/attribution_reporting/attribution_internals_browsertest.cc b/content/browser/attribution_reporting/attribution_internals_browsertest.cc index 8446669..8f881aa 100644 --- a/content/browser/attribution_reporting/attribution_internals_browsertest.cc +++ b/content/browser/attribution_reporting/attribution_internals_browsertest.cc
@@ -453,7 +453,8 @@ manager()->NotifyOsRegistration( OsRegistration(GURL("https://a.test"), /*debug_reporting=*/false, url::Origin::Create(GURL("https://b.test")), - AttributionInputEvent(), /*is_within_fenced_frame=*/false), + AttributionInputEvent(), /*is_within_fenced_frame=*/false, + /*render_frame_id=*/GlobalRenderFrameHostId()), /*is_debug_key_allowed=*/false, attribution_reporting::mojom::OsRegistrationResult::kPassedToOs); EXPECT_EQ(kCompleteTitle, title_watcher.WaitAndGetTitle());
diff --git a/content/browser/attribution_reporting/attribution_manager.h b/content/browser/attribution_reporting/attribution_manager.h index 7f172674..09692ee4 100644 --- a/content/browser/attribution_reporting/attribution_manager.h +++ b/content/browser/attribution_reporting/attribution_manager.h
@@ -62,9 +62,7 @@ virtual void HandleTrigger(AttributionTrigger trigger, GlobalRenderFrameHostId render_frame_id) = 0; - virtual void HandleOsRegistration( - OsRegistration, - GlobalRenderFrameHostId render_frame_id) = 0; + virtual void HandleOsRegistration(OsRegistration) = 0; // Get all sources that are currently stored in this partition. Used for // populating WebUI.
diff --git a/content/browser/attribution_reporting/attribution_manager_impl.cc b/content/browser/attribution_reporting/attribution_manager_impl.cc index 6a4a68a..21214e4 100644 --- a/content/browser/attribution_reporting/attribution_manager_impl.cc +++ b/content/browser/attribution_reporting/attribution_manager_impl.cc
@@ -1376,9 +1376,7 @@ } } -void AttributionManagerImpl::HandleOsRegistration( - OsRegistration registration, - GlobalRenderFrameHostId render_frame_id) { +void AttributionManagerImpl::HandleOsRegistration(OsRegistration registration) { if (!network::HasAttributionOsSupport(GetSupport())) { NotifyOsRegistration(registration, /*is_debug_key_allowed=*/false, @@ -1414,7 +1412,7 @@ } if (!IsOperationAllowed(*storage_partition_, operation, - RenderFrameHost::FromID(render_frame_id), + RenderFrameHost::FromID(registration.render_frame_id), source_origin, destination_origin, /*reporting_origin=*/®istration_origin)) { NotifyOsRegistration(registration,
diff --git a/content/browser/attribution_reporting/attribution_manager_impl.h b/content/browser/attribution_reporting/attribution_manager_impl.h index 305d704..2b89e80 100644 --- a/content/browser/attribution_reporting/attribution_manager_impl.h +++ b/content/browser/attribution_reporting/attribution_manager_impl.h
@@ -138,8 +138,7 @@ void RemoveAttributionDataByDataKey(const DataKey& data_key, base::OnceClosure callback) override; - void HandleOsRegistration(OsRegistration, - GlobalRenderFrameHostId render_frame_id) override; + void HandleOsRegistration(OsRegistration) override; void NotifyOsRegistration(const OsRegistration&, bool is_debug_key_allowed,
diff --git a/content/browser/attribution_reporting/attribution_manager_impl_unittest.cc b/content/browser/attribution_reporting/attribution_manager_impl_unittest.cc index c29a5be6..d5d6005 100644 --- a/content/browser/attribution_reporting/attribution_manager_impl_unittest.cc +++ b/content/browser/attribution_reporting/attribution_manager_impl_unittest.cc
@@ -1087,14 +1087,14 @@ const OsRegistration registration1( kRegistrationUrl1, /*debug_reporting=*/false, kTopLevelOrigin1, - AttributionInputEvent(), /*is_within_fenced_frame=*/false); + AttributionInputEvent(), /*is_within_fenced_frame=*/false, kFrameId); EXPECT_CALL(*os_level_manager_, Register(registration1, /*is_debug_key_allowed=*/true, _)) .WillOnce(base::test::RunOnceCallback<2>(registration1, true)); const OsRegistration registration2( kRegistrationUrl2, /*debug_reporting=*/false, kTopLevelOrigin2, - AttributionInputEvent(), /*is_within_fenced_frame=*/false); + AttributionInputEvent(), /*is_within_fenced_frame=*/false, kFrameId); EXPECT_CALL(*os_level_manager_, Register(registration2, /*is_debug_key_allowed=*/false, _)) .WillOnce(base::test::RunOnceCallback<2>(registration2, false)); @@ -1105,7 +1105,7 @@ *os_level_manager_, Register(OsRegistration(kRegistrationUrl3, /*debug_reporting=*/false, kTopLevelOrigin3, AttributionInputEvent(), - /*is_within_fenced_frame=*/false), + /*is_within_fenced_frame=*/false, kFrameId), _, _)) .Times(0); @@ -1114,25 +1114,22 @@ *os_level_manager_, Register(OsRegistration(kRegistrationUrl4, /*debug_reporting=*/false, kTopLevelOrigin4, AttributionInputEvent(), - /*is_within_fenced_frame=*/false), + /*is_within_fenced_frame=*/false, kFrameId), _, _)) .Times(0); attribution_manager_->HandleOsRegistration( OsRegistration(kRegistrationUrl1, /*debug_reporting=*/false, kTopLevelOrigin1, AttributionInputEvent(), - /*is_within_fenced_frame=*/false), - kFrameId); + /*is_within_fenced_frame=*/false, kFrameId)); attribution_manager_->HandleOsRegistration( OsRegistration(kRegistrationUrl2, /*debug_reporting=*/false, kTopLevelOrigin2, AttributionInputEvent(), - /*is_within_fenced_frame=*/false), - kFrameId); + /*is_within_fenced_frame=*/false, kFrameId)); attribution_manager_->HandleOsRegistration( OsRegistration(kRegistrationUrl3, /*debug_reporting=*/false, kTopLevelOrigin3, AttributionInputEvent(), - /*is_within_fenced_frame=*/false), - kFrameId); + /*is_within_fenced_frame=*/false, kFrameId)); MockAttributionReportingContentBrowserClient browser_client; EXPECT_CALL( @@ -1147,8 +1144,7 @@ attribution_manager_->HandleOsRegistration( OsRegistration(kRegistrationUrl4, /*debug_reporting=*/false, kTopLevelOrigin4, AttributionInputEvent(), - /*is_within_fenced_frame=*/false), - kFrameId); + /*is_within_fenced_frame=*/false, kFrameId)); EXPECT_THAT( histograms.GetAllSamples("Conversions.OsRegistrationResult.Source"), @@ -1183,14 +1179,16 @@ const OsRegistration registration1( kRegistrationUrl1, /*debug_reporting=*/false, kTopLevelOrigin1, - /*input_event=*/absl::nullopt, /*is_within_fenced_frame=*/false); + /*input_event=*/absl::nullopt, /*is_within_fenced_frame=*/false, + kFrameId); EXPECT_CALL(*os_level_manager_, Register(registration1, /*is_debug_key_allowed=*/true, _)) .WillOnce(base::test::RunOnceCallback<2>(registration1, true)); const OsRegistration registration2( kRegistrationUrl2, /*debug_reporting=*/false, kTopLevelOrigin2, - /*input_event=*/absl::nullopt, /*is_within_fenced_frame=*/false); + /*input_event=*/absl::nullopt, /*is_within_fenced_frame=*/false, + kFrameId); EXPECT_CALL(*os_level_manager_, Register(registration2, /*is_debug_key_allowed=*/false, _)) .WillOnce(base::test::RunOnceCallback<2>(registration2, false)); @@ -1202,7 +1200,7 @@ Register(OsRegistration(kRegistrationUrl3, /*debug_reporting=*/false, kTopLevelOrigin3, /*input_event=*/absl::nullopt, - /*is_within_fenced_frame=*/false), + /*is_within_fenced_frame=*/false, kFrameId), _, _)) .Times(0); @@ -1212,28 +1210,22 @@ Register(OsRegistration(kRegistrationUrl4, /*debug_reporting=*/false, kTopLevelOrigin4, /*input_event=*/absl::nullopt, - /*is_within_fenced_frame=*/false), + /*is_within_fenced_frame=*/false, kFrameId), _, _)) .Times(0); - attribution_manager_->HandleOsRegistration( - OsRegistration(kRegistrationUrl1, /*debug_reporting=*/false, - kTopLevelOrigin1, - /*input_event=*/absl::nullopt, - /*is_within_fenced_frame=*/false), - kFrameId); - attribution_manager_->HandleOsRegistration( - OsRegistration(kRegistrationUrl2, /*debug_reporting=*/false, - kTopLevelOrigin2, - /*input_event=*/absl::nullopt, - /*is_within_fenced_frame=*/false), - kFrameId); - attribution_manager_->HandleOsRegistration( - OsRegistration(kRegistrationUrl3, /*debug_reporting=*/false, - kTopLevelOrigin3, - /*input_event=*/absl::nullopt, - /*is_within_fenced_frame=*/false), - kFrameId); + attribution_manager_->HandleOsRegistration(OsRegistration( + kRegistrationUrl1, /*debug_reporting=*/false, kTopLevelOrigin1, + /*input_event=*/absl::nullopt, + /*is_within_fenced_frame=*/false, kFrameId)); + attribution_manager_->HandleOsRegistration(OsRegistration( + kRegistrationUrl2, /*debug_reporting=*/false, kTopLevelOrigin2, + /*input_event=*/absl::nullopt, + /*is_within_fenced_frame=*/false, kFrameId)); + attribution_manager_->HandleOsRegistration(OsRegistration( + kRegistrationUrl3, /*debug_reporting=*/false, kTopLevelOrigin3, + /*input_event=*/absl::nullopt, + /*is_within_fenced_frame=*/false, kFrameId)); MockAttributionReportingContentBrowserClient browser_client; EXPECT_CALL( @@ -1245,12 +1237,10 @@ .WillOnce(Return(false)); ScopedContentBrowserClientSetting setting(&browser_client); - attribution_manager_->HandleOsRegistration( - OsRegistration(kRegistrationUrl4, /*debug_reporting=*/false, - kTopLevelOrigin4, - /*input_event=*/absl::nullopt, - /*is_within_fenced_frame=*/false), - kFrameId); + attribution_manager_->HandleOsRegistration(OsRegistration( + kRegistrationUrl4, /*debug_reporting=*/false, kTopLevelOrigin4, + /*input_event=*/absl::nullopt, + /*is_within_fenced_frame=*/false, kFrameId)); EXPECT_THAT( histograms.GetAllSamples("Conversions.OsRegistrationResult.Trigger"), @@ -3299,14 +3289,14 @@ is_os_source ? absl::make_optional<AttributionInputEvent>( AttributionInputEvent()) : absl::nullopt, - /*is_within_fenced_frame=*/false); + /*is_within_fenced_frame=*/false, kFrameId); EXPECT_CALL(*os_level_manager_, Register) .WillOnce(base::test::RunOnceCallback<2>(registration, true)); EXPECT_CALL(*report_sender_, SendReport(_, _)); - attribution_manager_->HandleOsRegistration(registration, kFrameId); + attribution_manager_->HandleOsRegistration(registration); histograms.ExpectUniqueSample( kSentVerboseDebugReportTypeMetric, @@ -3334,7 +3324,7 @@ is_os_source ? absl::make_optional<AttributionInputEvent>( AttributionInputEvent()) : absl::nullopt, - /*is_within_fenced_frame=*/false); + /*is_within_fenced_frame=*/false, kFrameId); EXPECT_CALL(*report_sender_, SendReport(_, _)).Times(0); @@ -3364,7 +3354,7 @@ EXPECT_CALL(*os_level_manager_, Register) .WillOnce(base::test::RunOnceCallback<2>(registration, false)); - attribution_manager_->HandleOsRegistration(registration, kFrameId); + attribution_manager_->HandleOsRegistration(registration); histograms.ExpectTotalCount(kSentVerboseDebugReportTypeMetric, 0); }
diff --git a/content/browser/attribution_reporting/attribution_os_level_manager.cc b/content/browser/attribution_reporting/attribution_os_level_manager.cc index 35ffe6f..68408c28a 100644 --- a/content/browser/attribution_reporting/attribution_os_level_manager.cc +++ b/content/browser/attribution_reporting/attribution_os_level_manager.cc
@@ -14,6 +14,8 @@ #include "base/time/time.h" #include "content/browser/attribution_reporting/os_registration.h" #include "content/public/browser/content_browser_client.h" +#include "content/public/browser/global_routing_id.h" +#include "content/public/browser/render_frame_host.h" #include "content/public/browser/render_process_host.h" #include "content/public/common/content_client.h" #include "services/network/public/mojom/attribution.mojom.h" @@ -62,10 +64,21 @@ } // static -bool AttributionOsLevelManager::ShouldUseOsWebSource() { +bool AttributionOsLevelManager::ShouldUseOsWebSource( + GlobalRenderFrameHostId render_frame_id) { return GetContentClient() ->browser() - ->ShouldUseOsWebSourceAttributionReporting(); + ->ShouldUseOsWebSourceAttributionReporting( + RenderFrameHost::FromID(render_frame_id)); +} + +// static +bool AttributionOsLevelManager::ShouldUseOsWebTrigger( + GlobalRenderFrameHostId render_frame_id) { + return GetContentClient() + ->browser() + ->ShouldUseOsWebTriggerAttributionReporting( + RenderFrameHost::FromID(render_frame_id)); } // static
diff --git a/content/browser/attribution_reporting/attribution_os_level_manager.h b/content/browser/attribution_reporting/attribution_os_level_manager.h index 1139940..174421fd 100644 --- a/content/browser/attribution_reporting/attribution_os_level_manager.h +++ b/content/browser/attribution_reporting/attribution_os_level_manager.h
@@ -11,6 +11,7 @@ #include "base/functional/callback_forward.h" #include "content/common/content_export.h" #include "content/public/browser/browsing_data_filter_builder.h" +#include "content/public/browser/global_routing_id.h" #include "services/network/public/mojom/attribution.mojom-forward.h" #include "third_party/abseil-cpp/absl/types/optional.h" @@ -25,6 +26,7 @@ namespace content { struct OsRegistration; +struct GlobalRenderFrameHostId; // Interface between the browser's Attribution Reporting implementation and the // operating system's. @@ -77,7 +79,10 @@ protected: [[nodiscard]] static bool ShouldInitializeApiState(); - [[nodiscard]] static bool ShouldUseOsWebSource(); + [[nodiscard]] static bool ShouldUseOsWebSource( + GlobalRenderFrameHostId render_frame_id); + [[nodiscard]] static bool ShouldUseOsWebTrigger( + GlobalRenderFrameHostId render_frame_id); }; class CONTENT_EXPORT NoOpAttributionOsLevelManager
diff --git a/content/browser/attribution_reporting/attribution_os_level_manager_android.cc b/content/browser/attribution_reporting/attribution_os_level_manager_android.cc index 81c575ca..bc0389de 100644 --- a/content/browser/attribution_reporting/attribution_os_level_manager_android.cc +++ b/content/browser/attribution_reporting/attribution_os_level_manager_android.cc
@@ -138,6 +138,7 @@ JNIEnv* env = base::android::AttachCurrentThread(); attribution_reporting::mojom::RegistrationType type = registration.GetType(); + GlobalRenderFrameHostId render_frame_id = registration.render_frame_id; auto registration_url = url::GURLAndroid::FromNativeGURL(env, registration.registration_url); auto top_level_origin = url::GURLAndroid::FromNativeGURL( @@ -151,7 +152,7 @@ switch (type) { case attribution_reporting::mojom::RegistrationType::kSource: DCHECK(input_event.has_value()); - if (AttributionOsLevelManager::ShouldUseOsWebSource()) { + if (AttributionOsLevelManager::ShouldUseOsWebSource(render_frame_id)) { Java_AttributionOsLevelManager_registerWebAttributionSource( env, jobj_, request_id, registration_url, top_level_origin, is_debug_key_allowed, input_event->input_event); @@ -161,9 +162,14 @@ } break; case attribution_reporting::mojom::RegistrationType::kTrigger: - Java_AttributionOsLevelManager_registerWebAttributionTrigger( - env, jobj_, request_id, registration_url, top_level_origin, - is_debug_key_allowed); + if (AttributionOsLevelManager::ShouldUseOsWebTrigger(render_frame_id)) { + Java_AttributionOsLevelManager_registerWebAttributionTrigger( + env, jobj_, request_id, registration_url, top_level_origin, + is_debug_key_allowed); + } else { + Java_AttributionOsLevelManager_registerAttributionTrigger( + env, jobj_, request_id, registration_url); + } break; } }
diff --git a/content/browser/attribution_reporting/attribution_os_level_manager_android_unittest.cc b/content/browser/attribution_reporting/attribution_os_level_manager_android_unittest.cc index a422a25..7bb9d46f 100644 --- a/content/browser/attribution_reporting/attribution_os_level_manager_android_unittest.cc +++ b/content/browser/attribution_reporting/attribution_os_level_manager_android_unittest.cc
@@ -62,7 +62,8 @@ SCOPED_TRACE(test_case.desc); MockAttributionReportingContentBrowserClient browser_client; - EXPECT_CALL(browser_client, ShouldUseOsWebSourceAttributionReporting()) + EXPECT_CALL(browser_client, + ShouldUseOsWebSourceAttributionReporting(testing::_)) .WillRepeatedly(testing::Return(test_case.should_use_os_web_source)); ScopedContentBrowserClientSetting setting(&browser_client); @@ -71,7 +72,8 @@ manager_->Register( OsRegistration(GURL("https://r.test"), /*debug_reporting=*/false, url::Origin::Create(GURL("https://o.test")), - test_case.input_event, /*is_within_fenced_frame=*/false), + test_case.input_event, /*is_within_fenced_frame=*/false, + /*render_frame_id=*/GlobalRenderFrameHostId()), /*is_debug_key_allowed=*/false, base::BindLambdaForTesting([&](const OsRegistration&, bool success) { // We don't check `success` here because the measurement API may or
diff --git a/content/browser/attribution_reporting/os_registration.cc b/content/browser/attribution_reporting/os_registration.cc index 4312fc4..1a930b7 100644 --- a/content/browser/attribution_reporting/os_registration.cc +++ b/content/browser/attribution_reporting/os_registration.cc
@@ -8,6 +8,7 @@ #include "content/browser/attribution_reporting/attribution_input_event.h" #include "content/browser/attribution_reporting/attribution_reporting.mojom.h" +#include "content/public/browser/global_routing_id.h" #include "third_party/abseil-cpp/absl/types/optional.h" #include "url/gurl.h" #include "url/origin.h" @@ -19,12 +20,14 @@ bool debug_reporting, url::Origin top_level_origin, absl::optional<AttributionInputEvent> input_event, - bool is_within_fenced_frame) + bool is_within_fenced_frame, + GlobalRenderFrameHostId render_frame_id) : registration_url(std::move(registration_url)), debug_reporting(debug_reporting), top_level_origin(std::move(top_level_origin)), input_event(std::move(input_event)), - is_within_fenced_frame(is_within_fenced_frame) {} + is_within_fenced_frame(is_within_fenced_frame), + render_frame_id(render_frame_id) {} OsRegistration::~OsRegistration() = default;
diff --git a/content/browser/attribution_reporting/os_registration.h b/content/browser/attribution_reporting/os_registration.h index 7e323be..e7178e6 100644 --- a/content/browser/attribution_reporting/os_registration.h +++ b/content/browser/attribution_reporting/os_registration.h
@@ -8,6 +8,7 @@ #include "content/browser/attribution_reporting/attribution_input_event.h" #include "content/browser/attribution_reporting/attribution_reporting.mojom-forward.h" #include "content/common/content_export.h" +#include "content/public/browser/global_routing_id.h" #include "third_party/abseil-cpp/absl/types/optional.h" #include "url/gurl.h" #include "url/origin.h" @@ -22,12 +23,14 @@ // source. absl::optional<AttributionInputEvent> input_event; bool is_within_fenced_frame; + GlobalRenderFrameHostId render_frame_id; OsRegistration(GURL registration_url, bool debug_reporting, url::Origin top_level_origin, absl::optional<AttributionInputEvent> input_event, - bool is_within_fenced_frame); + bool is_within_fenced_frame, + GlobalRenderFrameHostId render_frame_id); ~OsRegistration();
diff --git a/content/browser/attribution_reporting/test/mock_attribution_manager.h b/content/browser/attribution_reporting/test/mock_attribution_manager.h index 32f534a8..77413e4d 100644 --- a/content/browser/attribution_reporting/test/mock_attribution_manager.h +++ b/content/browser/attribution_reporting/test/mock_attribution_manager.h
@@ -90,10 +90,7 @@ (const DataKey&, base::OnceClosure done), (override)); - MOCK_METHOD(void, - HandleOsRegistration, - (OsRegistration, GlobalRenderFrameHostId), - (override)); + MOCK_METHOD(void, HandleOsRegistration, (OsRegistration), (override)); MOCK_METHOD(void, SetDebugMode,
diff --git a/content/browser/attribution_reporting/test/mock_content_browser_client.h b/content/browser/attribution_reporting/test/mock_content_browser_client.h index 1dd4bc5..3676bec 100644 --- a/content/browser/attribution_reporting/test/mock_content_browser_client.h +++ b/content/browser/attribution_reporting/test/mock_content_browser_client.h
@@ -34,7 +34,15 @@ MOCK_METHOD(bool, IsWebAttributionReportingAllowed, (), (override)); - MOCK_METHOD(bool, ShouldUseOsWebSourceAttributionReporting, (), (override)); + MOCK_METHOD(bool, + ShouldUseOsWebSourceAttributionReporting, + (RenderFrameHost * rfh), + (override)); + + MOCK_METHOD(bool, + ShouldUseOsWebTriggerAttributionReporting, + (RenderFrameHost * rfh), + (override)); MOCK_METHOD(bool, IsPrivacySandboxReportingDestinationAttested,
diff --git a/content/common/service_worker/service_worker_router_evaluator.cc b/content/common/service_worker/service_worker_router_evaluator.cc index 2c42b579..3e954d2e 100644 --- a/content/common/service_worker/service_worker_router_evaluator.cc +++ b/content/common/service_worker/service_worker_router_evaluator.cc
@@ -12,6 +12,7 @@ #include "base/strings/stringprintf.h" #include "services/network/public/cpp/request_destination.h" #include "services/network/public/cpp/request_mode.h" +#include "third_party/blink/public/common/service_worker/service_worker_router_rule.h" #include "third_party/liburlpattern/options.h" #include "third_party/liburlpattern/pattern.h" #include "third_party/liburlpattern/utils.h" @@ -167,15 +168,18 @@ bool IsValidCondition(const blink::ServiceWorkerRouterCondition& condition) { switch (condition.type) { - case blink::ServiceWorkerRouterCondition::ConditionType::kUrlPattern: + case blink::ServiceWorkerRouterCondition::Type::kUrlPattern: return condition.url_pattern.has_value(); - case blink::ServiceWorkerRouterCondition::ConditionType::kRequest: + case blink::ServiceWorkerRouterCondition::Type::kRequest: return condition.request.has_value() && (condition.request->method.has_value() || condition.request->mode.has_value() || condition.request->destination.has_value()); - case blink::ServiceWorkerRouterCondition::ConditionType::kRunningStatus: + case blink::ServiceWorkerRouterCondition::Type::kRunningStatus: return condition.running_status.has_value(); + case blink::ServiceWorkerRouterCondition::Type::kOr: + NOTIMPLEMENTED(); + NOTREACHED_NORETURN(); } } @@ -328,10 +332,10 @@ return false; } if (condition.type != - blink::ServiceWorkerRouterCondition::ConditionType::kUrlPattern) { + blink::ServiceWorkerRouterCondition::Type::kUrlPattern) { non_url_pattern_conditions_.push_back(condition); if (condition.type == - blink::ServiceWorkerRouterCondition::ConditionType::kRunningStatus) { + blink::ServiceWorkerRouterCondition::Type::kRunningStatus) { need_running_status_ = true; } continue; @@ -418,20 +422,23 @@ absl::optional<blink::EmbeddedWorkerStatus> running_status) const { for (const auto& c : non_url_pattern_conditions_) { switch (c.type) { - case blink::ServiceWorkerRouterCondition::ConditionType::kUrlPattern: + case blink::ServiceWorkerRouterCondition::Type::kUrlPattern: NOTREACHED_NORETURN() << "UrlPattern should be separated in the compile time."; - case blink::ServiceWorkerRouterCondition::ConditionType::kRequest: + case blink::ServiceWorkerRouterCondition::Type::kRequest: if (!IsMatchedRequest(*c.request, request)) { return false; } break; - case blink::ServiceWorkerRouterCondition::ConditionType::kRunningStatus: + case blink::ServiceWorkerRouterCondition::Type::kRunningStatus: if (running_status && !IsMatchedRunningCondition(*c.running_status, *running_status)) { return false; } break; + case blink::ServiceWorkerRouterCondition::Type::kOr: + NOTIMPLEMENTED(); + break; } } return true; @@ -495,7 +502,7 @@ base::Value::List source; for (const auto& c : r.conditions) { switch (c.type) { - case blink::ServiceWorkerRouterCondition::ConditionType::kUrlPattern: { + case blink::ServiceWorkerRouterCondition::Type::kUrlPattern: { base::Value::Dict out_c; base::Value out_value; const blink::SafeUrlPattern& url_pattern = *c.url_pattern; @@ -518,19 +525,22 @@ condition.Append(std::move(out_c)); break; } - case blink::ServiceWorkerRouterCondition::ConditionType::kRequest: { + case blink::ServiceWorkerRouterCondition::Type::kRequest: { base::Value::Dict out_c; out_c.Set("request", RequestToValue(*c.request)); condition.Append(std::move(out_c)); break; } - case blink::ServiceWorkerRouterCondition::ConditionType:: - kRunningStatus: { + case blink::ServiceWorkerRouterCondition::Type::kRunningStatus: { base::Value::Dict out_c; out_c.Set("running_status", RunningStatusToString(*c.running_status)); condition.Append(std::move(out_c)); break; } + case blink::ServiceWorkerRouterCondition::Type::kOr: { + NOTIMPLEMENTED(); + break; + } } } for (const auto& s : r.sources) {
diff --git a/content/common/service_worker/service_worker_router_evaluator.h b/content/common/service_worker/service_worker_router_evaluator.h index 42909a2f..ee6ff4b 100644 --- a/content/common/service_worker/service_worker_router_evaluator.h +++ b/content/common/service_worker/service_worker_router_evaluator.h
@@ -6,7 +6,6 @@ #define CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_ROUTER_EVALUATOR_H_ #include <memory> -#include <utility> #include "base/values.h" #include "content/common/content_export.h"
diff --git a/content/common/service_worker/service_worker_router_evaluator_unittest.cc b/content/common/service_worker/service_worker_router_evaluator_unittest.cc index 663f08a..53448c5 100644 --- a/content/common/service_worker/service_worker_router_evaluator_unittest.cc +++ b/content/common/service_worker/service_worker_router_evaluator_unittest.cc
@@ -57,8 +57,7 @@ blink::ServiceWorkerRouterRule rule; { blink::ServiceWorkerRouterCondition condition; - condition.type = - blink::ServiceWorkerRouterCondition::ConditionType::kUrlPattern; + condition.type = blink::ServiceWorkerRouterCondition::Type::kUrlPattern; blink::SafeUrlPattern url_pattern = DefaultURLPattern(); auto parse_result = liburlpattern::Parse( "/test/*", @@ -95,8 +94,7 @@ blink::ServiceWorkerRouterRule rule; { blink::ServiceWorkerRouterCondition condition; - condition.type = - blink::ServiceWorkerRouterCondition::ConditionType::kUrlPattern; + condition.type = blink::ServiceWorkerRouterCondition::Type::kUrlPattern; blink::SafeUrlPattern url_pattern = DefaultURLPattern(); auto parse_result = liburlpattern::Parse( "/test/page.html", @@ -133,8 +131,7 @@ blink::ServiceWorkerRouterRule rule; { blink::ServiceWorkerRouterCondition condition; - condition.type = - blink::ServiceWorkerRouterCondition::ConditionType::kUrlPattern; + condition.type = blink::ServiceWorkerRouterCondition::Type::kUrlPattern; blink::SafeUrlPattern url_pattern = DefaultURLPattern(); auto parse_result = liburlpattern::Parse( "/test/*", @@ -171,8 +168,7 @@ blink::ServiceWorkerRouterRule rule; { blink::ServiceWorkerRouterCondition condition; - condition.type = - blink::ServiceWorkerRouterCondition::ConditionType::kUrlPattern; + condition.type = blink::ServiceWorkerRouterCondition::Type::kUrlPattern; blink::SafeUrlPattern url_pattern = DefaultURLPattern(); auto parse_result = liburlpattern::Parse( "/test/*", @@ -184,8 +180,7 @@ } { blink::ServiceWorkerRouterCondition condition; - condition.type = - blink::ServiceWorkerRouterCondition::ConditionType::kUrlPattern; + condition.type = blink::ServiceWorkerRouterCondition::Type::kUrlPattern; blink::SafeUrlPattern url_pattern = DefaultURLPattern(); auto parse_result = liburlpattern::Parse( "/notmatch/*", @@ -222,8 +217,7 @@ blink::ServiceWorkerRouterRule rule; { blink::ServiceWorkerRouterCondition condition; - condition.type = - blink::ServiceWorkerRouterCondition::ConditionType::kUrlPattern; + condition.type = blink::ServiceWorkerRouterCondition::Type::kUrlPattern; blink::SafeUrlPattern url_pattern = DefaultURLPattern(); auto parse_result = liburlpattern::Parse( "/test/*", @@ -235,8 +229,7 @@ } { blink::ServiceWorkerRouterCondition condition; - condition.type = - blink::ServiceWorkerRouterCondition::ConditionType::kUrlPattern; + condition.type = blink::ServiceWorkerRouterCondition::Type::kUrlPattern; blink::SafeUrlPattern url_pattern = DefaultURLPattern(); auto parse_result = liburlpattern::Parse( "*.html", [](base::StringPiece input) { return std::string(input); }); @@ -272,8 +265,7 @@ blink::ServiceWorkerRouterRule rule; { blink::ServiceWorkerRouterCondition condition; - condition.type = - blink::ServiceWorkerRouterCondition::ConditionType::kUrlPattern; + condition.type = blink::ServiceWorkerRouterCondition::Type::kUrlPattern; blink::SafeUrlPattern url_pattern = DefaultURLPattern(); auto parse_result = liburlpattern::Parse( "*.html", [](base::StringPiece input) { return std::string(input); }); @@ -294,8 +286,7 @@ blink::ServiceWorkerRouterRule rule; { blink::ServiceWorkerRouterCondition condition; - condition.type = - blink::ServiceWorkerRouterCondition::ConditionType::kUrlPattern; + condition.type = blink::ServiceWorkerRouterCondition::Type::kUrlPattern; blink::SafeUrlPattern url_pattern = DefaultURLPattern(); auto parse_result = liburlpattern::Parse( "*.css", [](base::StringPiece input) { return std::string(input); }); @@ -334,8 +325,7 @@ blink::ServiceWorkerRouterRule rule; { blink::ServiceWorkerRouterCondition condition; - condition.type = - blink::ServiceWorkerRouterCondition::ConditionType::kUrlPattern; + condition.type = blink::ServiceWorkerRouterCondition::Type::kUrlPattern; blink::SafeUrlPattern url_pattern = DefaultURLPattern(); auto parse_result = liburlpattern::Parse( "*.example.com", @@ -372,8 +362,7 @@ blink::ServiceWorkerRouterRule rule; { blink::ServiceWorkerRouterCondition condition; - condition.type = - blink::ServiceWorkerRouterCondition::ConditionType::kUrlPattern; + condition.type = blink::ServiceWorkerRouterCondition::Type::kUrlPattern; blink::SafeUrlPattern url_pattern = DefaultURLPattern(); auto parse_result = liburlpattern::Parse( "www.example.com", @@ -410,8 +399,7 @@ blink::ServiceWorkerRouterRule rule; { blink::ServiceWorkerRouterCondition condition; - condition.type = - blink::ServiceWorkerRouterCondition::ConditionType::kUrlPattern; + condition.type = blink::ServiceWorkerRouterCondition::Type::kUrlPattern; blink::SafeUrlPattern url_pattern = DefaultURLPattern(); auto parse_result = liburlpattern::Parse( "*.example.com", @@ -448,8 +436,7 @@ blink::ServiceWorkerRouterRule rule; { blink::ServiceWorkerRouterCondition condition; - condition.type = - blink::ServiceWorkerRouterCondition::ConditionType::kUrlPattern; + condition.type = blink::ServiceWorkerRouterCondition::Type::kUrlPattern; blink::SafeUrlPattern url_pattern; { auto parse_result = liburlpattern::Parse( @@ -538,8 +525,7 @@ blink::ServiceWorkerRouterRule rule; { blink::ServiceWorkerRouterCondition condition; - condition.type = - blink::ServiceWorkerRouterCondition::ConditionType::kUrlPattern; + condition.type = blink::ServiceWorkerRouterCondition::Type::kUrlPattern; condition.url_pattern = DefaultURLPattern(); rule.conditions.push_back(condition); } @@ -572,8 +558,7 @@ blink::ServiceWorkerRouterRule rule; { blink::ServiceWorkerRouterCondition condition; - condition.type = - blink::ServiceWorkerRouterCondition::ConditionType::kUrlPattern; + condition.type = blink::ServiceWorkerRouterCondition::Type::kUrlPattern; blink::SafeUrlPattern url_pattern = DefaultURLPattern(); { auto parse_result = liburlpattern::Parse( @@ -613,8 +598,7 @@ blink::ServiceWorkerRouterRule rule; { blink::ServiceWorkerRouterCondition condition; - condition.type = - blink::ServiceWorkerRouterCondition::ConditionType::kUrlPattern; + condition.type = blink::ServiceWorkerRouterCondition::Type::kUrlPattern; blink::SafeUrlPattern url_pattern = DefaultURLPattern(); { auto parse_result = liburlpattern::Parse( @@ -655,8 +639,7 @@ blink::ServiceWorkerRouterRule rule; { blink::ServiceWorkerRouterCondition condition; - condition.type = - blink::ServiceWorkerRouterCondition::ConditionType::kUrlPattern; + condition.type = blink::ServiceWorkerRouterCondition::Type::kUrlPattern; blink::SafeUrlPattern url_pattern = DefaultURLPattern(); { auto parse_result = liburlpattern::Parse( @@ -697,8 +680,7 @@ blink::ServiceWorkerRouterRule rule; { blink::ServiceWorkerRouterCondition condition; - condition.type = - blink::ServiceWorkerRouterCondition::ConditionType::kUrlPattern; + condition.type = blink::ServiceWorkerRouterCondition::Type::kUrlPattern; blink::SafeUrlPattern url_pattern = DefaultURLPattern(); { auto parse_result = liburlpattern::Parse( @@ -738,8 +720,7 @@ blink::ServiceWorkerRouterRule rule; { blink::ServiceWorkerRouterCondition condition; - condition.type = - blink::ServiceWorkerRouterCondition::ConditionType::kUrlPattern; + condition.type = blink::ServiceWorkerRouterCondition::Type::kUrlPattern; blink::SafeUrlPattern url_pattern = DefaultURLPattern(); { auto parse_result = liburlpattern::Parse( @@ -780,8 +761,7 @@ blink::ServiceWorkerRouterRule rule; { blink::ServiceWorkerRouterCondition condition; - condition.type = - blink::ServiceWorkerRouterCondition::ConditionType::kUrlPattern; + condition.type = blink::ServiceWorkerRouterCondition::Type::kUrlPattern; blink::SafeUrlPattern url_pattern = DefaultURLPattern(); { auto parse_result = liburlpattern::Parse( @@ -842,8 +822,7 @@ blink::ServiceWorkerRouterRule rule; { blink::ServiceWorkerRouterCondition condition; - condition.type = - blink::ServiceWorkerRouterCondition::ConditionType::kUrlPattern; + condition.type = blink::ServiceWorkerRouterCondition::Type::kUrlPattern; blink::SafeUrlPattern url_pattern = DefaultURLPattern(); auto parse_result = liburlpattern::Parse( "/test/*", @@ -869,8 +848,7 @@ blink::ServiceWorkerRouterRule rule; { blink::ServiceWorkerRouterCondition condition; - condition.type = - blink::ServiceWorkerRouterCondition::ConditionType::kUrlPattern; + condition.type = blink::ServiceWorkerRouterCondition::Type::kUrlPattern; blink::SafeUrlPattern url_pattern = DefaultURLPattern(); auto parse_result = liburlpattern::Parse( "/test/*", @@ -905,7 +883,7 @@ { blink::ServiceWorkerRouterCondition condition; condition.type = - blink::ServiceWorkerRouterCondition::ConditionType::kRequest; + blink::ServiceWorkerRouterCondition::Type::kRequest; condition.request = request_condition; rule.conditions.push_back(condition); } @@ -990,7 +968,7 @@ { blink::ServiceWorkerRouterCondition condition; condition.type = - blink::ServiceWorkerRouterCondition::ConditionType::kRunningStatus; + blink::ServiceWorkerRouterCondition::Type::kRunningStatus; condition.running_status = running_status_condition; rule.conditions.push_back(condition); } @@ -1072,15 +1050,13 @@ blink::ServiceWorkerRouterRule rule; { blink::ServiceWorkerRouterCondition condition; - condition.type = - blink::ServiceWorkerRouterCondition::ConditionType::kUrlPattern; + condition.type = blink::ServiceWorkerRouterCondition::Type::kUrlPattern; condition.url_pattern = DefaultURLPattern(); rule.conditions.push_back(condition); } { blink::ServiceWorkerRouterCondition condition; - condition.type = - blink::ServiceWorkerRouterCondition::ConditionType::kRequest; + condition.type = blink::ServiceWorkerRouterCondition::Type::kRequest; blink::ServiceWorkerRouterRequestCondition request; request.method = "GET"; request.mode = network::mojom::RequestMode::kCors; @@ -1091,7 +1067,7 @@ { blink::ServiceWorkerRouterCondition condition; condition.type = - blink::ServiceWorkerRouterCondition::ConditionType::kRunningStatus; + blink::ServiceWorkerRouterCondition::Type::kRunningStatus; blink::ServiceWorkerRouterRunningStatusCondition running_status; running_status.status = blink::ServiceWorkerRouterRunningStatusCondition:: RunningStatusEnum::kRunning; @@ -1101,7 +1077,7 @@ { blink::ServiceWorkerRouterCondition condition; condition.type = - blink::ServiceWorkerRouterCondition::ConditionType::kRunningStatus; + blink::ServiceWorkerRouterCondition::Type::kRunningStatus; blink::ServiceWorkerRouterRunningStatusCondition running_status; running_status.status = blink::ServiceWorkerRouterRunningStatusCondition:: RunningStatusEnum::kNotRunning; @@ -1217,8 +1193,7 @@ blink::ServiceWorkerRouterRule rule; { blink::ServiceWorkerRouterCondition condition; - condition.type = - blink::ServiceWorkerRouterCondition::ConditionType::kUrlPattern; + condition.type = blink::ServiceWorkerRouterCondition::Type::kUrlPattern; blink::SafeUrlPattern url_pattern; { auto parse_result = liburlpattern::Parse( @@ -1330,8 +1305,7 @@ blink::ServiceWorkerRouterRule rule; { blink::ServiceWorkerRouterCondition condition; - condition.type = - blink::ServiceWorkerRouterCondition::ConditionType::kUrlPattern; + condition.type = blink::ServiceWorkerRouterCondition::Type::kUrlPattern; condition.url_pattern.emplace(); rule.conditions.push_back(condition); }
diff --git a/content/public/android/java/src/org/chromium/content/browser/AttributionOsLevelManager.java b/content/public/android/java/src/org/chromium/content/browser/AttributionOsLevelManager.java index 56b8902..7f890e4 100644 --- a/content/public/android/java/src/org/chromium/content/browser/AttributionOsLevelManager.java +++ b/content/public/android/java/src/org/chromium/content/browser/AttributionOsLevelManager.java
@@ -26,11 +26,14 @@ import org.chromium.base.ContextUtils; import org.chromium.base.Log; +import org.chromium.base.ResettersForTesting; import org.chromium.base.ThreadUtils; import org.chromium.base.annotations.CalledByNative; import org.chromium.base.annotations.JNINamespace; import org.chromium.base.annotations.NativeMethods; import org.chromium.base.metrics.RecordHistogram; +import org.chromium.base.task.PostTask; +import org.chromium.base.task.TaskTraits; import org.chromium.url.GURL; import java.io.IOException; @@ -41,7 +44,6 @@ import java.util.Arrays; import java.util.Locale; import java.util.concurrent.TimeoutException; - /** * Handles passing registrations with Web Attribution Reporting API to the underlying native * library. @@ -52,6 +54,10 @@ // TODO: replace with constant in android.Manifest.permission once it becomes available in U. private static final String PERMISSION_ACCESS_ADSERVICES_ATTRIBUTION = "android.permission.ACCESS_ADSERVICES_ATTRIBUTION"; + + // Used for testing + private static MeasurementManagerFutures sManagerForTesting; + private long mNativePtr; private MeasurementManagerFutures mManager; @@ -91,7 +97,12 @@ } private MeasurementManagerFutures getManager() { - if (mManager != null) return mManager; + if (sManagerForTesting != null) { + return sManagerForTesting; + } + if (mManager != null) { + return mManager; + } if (Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU) { return null; } @@ -236,6 +247,28 @@ addRegistrationFutureCallback(requestId, RegistrationType.TRIGGER, future); } + /** + * Registers an attribution trigger with native, see `registerTriggerAsync()`: + * https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/java/measurement/MeasurementManagerFutures. + */ + @CalledByNative + private void registerAttributionTrigger(int requestId, GURL registrationUrl) { + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU) { + onRegistrationCompleted( + requestId, RegistrationType.TRIGGER, RegistrationResult.ERROR_INTERNAL); + return; + } + + MeasurementManagerFutures mm = getManager(); + if (mm == null) { + onRegistrationCompleted( + requestId, RegistrationType.TRIGGER, RegistrationResult.ERROR_INTERNAL); + return; + } + ListenableFuture<?> future = mm.registerTriggerAsync(Uri.parse(registrationUrl.getSpec())); + addRegistrationFutureCallback(requestId, RegistrationType.TRIGGER, future); + } + private void onDataDeletionCompleted(int requestId) { if (mNativePtr != 0) { AttributionOsLevelManagerJni.get().onDataDeletionCompleted(mNativePtr, requestId); @@ -339,6 +372,11 @@ private static void getMeasurementApiStatus() { ThreadUtils.assertOnBackgroundThread(); + if (sManagerForTesting != null) { + AttributionOsLevelManagerJni.get().onMeasurementStateReturned(1); + return; + } + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU) { AttributionOsLevelManagerJni.get().onMeasurementStateReturned(0); return; @@ -389,6 +427,17 @@ mNativePtr = 0; } + public static void setManagerForTesting(MeasurementManagerFutures manager) { + sManagerForTesting = manager; + PostTask.postTask( + TaskTraits.BEST_EFFORT, () -> AttributionOsLevelManager.getMeasurementApiStatus()); + ResettersForTesting.register(() -> { + sManagerForTesting = null; + PostTask.postTask(TaskTraits.BEST_EFFORT, + () -> AttributionOsLevelManager.getMeasurementApiStatus()); + }); + } + @NativeMethods interface Natives { void onDataDeletionCompleted(long nativeAttributionOsLevelManagerAndroid, int requestId);
diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc index ecbd03a..2b42df4 100644 --- a/content/public/browser/content_browser_client.cc +++ b/content/public/browser/content_browser_client.cc
@@ -563,7 +563,13 @@ return true; } -bool ContentBrowserClient::ShouldUseOsWebSourceAttributionReporting() { +bool ContentBrowserClient::ShouldUseOsWebSourceAttributionReporting( + content::RenderFrameHost* rfh) { + return true; +} + +bool ContentBrowserClient::ShouldUseOsWebTriggerAttributionReporting( + content::RenderFrameHost* rfh) { return true; }
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h index fb6b64a..f6dc568a9 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h
@@ -949,10 +949,17 @@ // This method must be idempotent. virtual bool IsWebAttributionReportingAllowed(); - // Allows the embedder to control if an Os source event should register as - // a Web Os or Os (App) source. + // Allows the embedder to control if an OS source event should register as + // a Web OS or OS (App) source. // This method must be idempotent. - virtual bool ShouldUseOsWebSourceAttributionReporting(); + virtual bool ShouldUseOsWebSourceAttributionReporting( + content::RenderFrameHost* rfh); + + // Allows the embedder to control if an OS trigger event should register as + // a Web OS or OS (App) trigger. + // This method must be idempotent. + virtual bool ShouldUseOsWebTriggerAttributionReporting( + content::RenderFrameHost* rfh); // Allows the embedder to control if Shared Storage API operations can happen // in a given context.
diff --git a/content/test/content_test_bundle_data.filelist b/content/test/content_test_bundle_data.filelist index eaf5bfa2..eeca3f3c 100644 --- a/content/test/content_test_bundle_data.filelist +++ b/content/test/content_test_bundle_data.filelist
@@ -5846,6 +5846,7 @@ data/gpu/pixel_webgl_context_restored.html data/gpu/pixel_webgl_copy_image.html data/gpu/pixel_webgl_display_p3.html +data/gpu/pixel_webgl_drawingbuffer_srgb.html data/gpu/pixel_webgl_float.html data/gpu/pixel_webgl_fullscreen_quad.js data/gpu/pixel_webgl_high_to_low_power.html
diff --git a/content/test/data/gpu/pixel_webgl_drawingbuffer_srgb.html b/content/test/data/gpu/pixel_webgl_drawingbuffer_srgb.html new file mode 100644 index 0000000..aaf096c --- /dev/null +++ b/content/test/data/gpu/pixel_webgl_drawingbuffer_srgb.html
@@ -0,0 +1,205 @@ +<!DOCTYPE html> +<html> +<!-- +Creates 8 WebGL canvases with the cross-product of WebGL version, anti-aliasing, +and premultiplied alpha. Uses drawingBufferStorage to ensure these canvases are +sRGB encoded. Draws a color that will match rgba(255, 128, 0, 0.5); + +The result should be a rectangle of a solid color. + +If a sub-test can't run (e.g, because WebGL, WebGL 2, or EXT_sRGB is not +present), then that sub-test will report a passing result (by setting its +background color to the expected color). +--> +<head> +<script> +function sendResult(status) { + if (window.domAutomationController) { + window.domAutomationController.send(status); + } else { + console.log(status); + } +} + +var g_swapsBeforeAck = 15; +function waitForFinish() { + if (g_swapsBeforeAck == 0) { + sendResult("SUCCESS"); + } else { + g_swapsBeforeAck--; + window.requestAnimationFrame(waitForFinish); + } +} + +function drawQuad(elementId, contextType, contextOptions, color, expected) { + let testSkipColor = 'rgba(255, 128, 0, 0.5019607843137255)'; + let element = document.getElementById(elementId); + let gl = element.getContext(contextType, contextOptions); + if (!gl) { + sendResult("FAILURE", "Failed to create WebGL context"); + return; + } + + let format = null; + if (contextType == 'webgl') { + let ext = gl.getExtension('EXT_sRGB'); + if (!ext) { + sendResult("FAILURE", "EXT_sRGB not present"); + return; + } + format = ext.SRGB8_ALPHA8_EXT; + } else + if (contextType == 'webgl2') { + format = gl.SRGB8_ALPHA8; + } + + gl.drawingBufferStorage(format, + gl.drawingBufferWidth, + gl.drawingBufferHeight); + + // Create the program to draw a point sprite. + let program = null; + { + let compileShader = function(gl, vertCode, fragCode) { + let vertShader = gl.createShader(gl.VERTEX_SHADER); + gl.shaderSource(vertShader, vertCode); + gl.compileShader(vertShader); + if (!gl.getShaderParameter(vertShader, gl.COMPILE_STATUS)) + throw new Error(gl.getShaderInfoLog(vertShader)); + + let fragShader = gl.createShader(gl.FRAGMENT_SHADER); + gl.shaderSource(fragShader, fragCode); + gl.compileShader(fragShader); + if (!gl.getShaderParameter(fragShader, gl.COMPILE_STATUS)) + throw new Error(gl.getShaderInfoLog(fragShader)); + + let shaderProgram = gl.createProgram(); + gl.attachShader(shaderProgram, vertShader); + gl.attachShader(shaderProgram, fragShader); + gl.linkProgram(shaderProgram); + if (!gl.getProgramParameter(shaderProgram, gl.LINK_STATUS)) + throw new Error(gl.getProgramInfoLog(program)); + + return shaderProgram; + } + let vs = `attribute vec2 position; + void main() { + gl_Position = vec4(position, 0.0, 1.0); + }`; + let fs = `precision mediump float; + uniform vec4 color; + void main() { + gl_FragColor = color; + }`; + program = compileShader(gl, vs, fs); + } + gl.useProgram(program); + + // Draw using that program. + { + let vertices = gl.createBuffer(); + gl.bindBuffer(gl.ARRAY_BUFFER, vertices); + gl.bufferData(gl.ARRAY_BUFFER, + new Float32Array([-1,-1, 1,-1, 1,1, -1,1]), + gl.STATIC_DRAW); + + let indices = gl.createBuffer(); + gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, indices); + gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, + new Uint16Array([0,1,2, 0,2,3]), + gl.STATIC_DRAW); + + let positionLocation = gl.getAttribLocation(program, 'position'); + gl.vertexAttribPointer(positionLocation, 2, gl.FLOAT, false, 0, 0); + gl.enableVertexAttribArray(positionLocation); + + gl.uniform4fv(gl.getUniformLocation(program, 'color'), color); + gl.drawElements(gl.TRIANGLES, 6, gl.UNSIGNED_SHORT, 0); + } + + // Ensure that we can read back the values and get the expected results. + let pixels = new Uint8Array(4); + gl.readPixels(0, 0, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, pixels); + for (let c = 0; c < 4; ++c) { + const epsilon = 6; + if (Math.abs(pixels[c] - expected[c]) > epsilon) { + const failureText = "Incorrect result from readPixels." + + " Expected:" + expected + + " Actual:" + pixels; + sendResult("FAILURE", failureText); + return; + } + } +} + +function main() { + let srgbToLinear = function(x) { + if (x < 0.0) + return 0.0; + if (x < 0.04045) + return x / 12.92; + if (x < 1.0) { + return Math.pow((x + 0.055)/1.055, 2.4); + } + return 1.0; + } + + let colorPremul = new Float32Array([ + srgbToLinear(128/255), srgbToLinear(64/255), 0.0, 128/255]); + let expectedPremul = new Uint8Array([ + 128, 64, 0,128]); + let colorUnmul = new Float32Array([ + 1.0, srgbToLinear(128/255), 0.0, 128/255]); + let expectedUnmul = new Uint8Array([ + 255, 128, 0, 128]); + + drawQuad('c0', 'webgl', {premultipliedAlpha: true, antialias:false}, + colorPremul, expectedPremul); + drawQuad('c1', 'webgl', {premultipliedAlpha: true, antialias:true}, + colorPremul, expectedPremul); + drawQuad('c2', 'webgl', {premultipliedAlpha: false, antialias:false}, + colorUnmul, expectedUnmul); + drawQuad('c3', 'webgl', {premultipliedAlpha: false, antialias:true}, + colorUnmul, expectedUnmul); + drawQuad('c4', 'webgl2', {premultipliedAlpha: true, antialias:false}, + colorPremul, expectedPremul); + drawQuad('c5', 'webgl2', {premultipliedAlpha: true, antialias:true}, + colorPremul, expectedPremul); + drawQuad('c6', 'webgl2', {premultipliedAlpha: false, antialias:false}, + colorUnmul, expectedUnmul); + drawQuad('c7', 'webgl2', {premultipliedAlpha: false, antialias:true}, + colorUnmul, expectedUnmul); + + waitForFinish(); +} +</script> +</head> +<body onload='main()'> + <p style='width:160px; height:32px; + background-color:rgba(255, 128, 0, 0.5019607843137255); + position:absolute; left:8px; top: 8px;'></p> + + <p style='width:160px; height:32px; + background-color:rgba(255, 128, 0, 0.5019607843137255); + position:absolute; left:8px; top:72px;'></p> + + <canvas id='c0' width='20' height='32' + style='position:absolute; left: 8px; top:56px;'></canvas> + <canvas id='c1' width='20' height='32' + style='position:absolute; left: 28px; top:56px;'></canvas> + <canvas id='c2' width='20' height='32' + style='position:absolute; left: 48px; top:56px;'></canvas> + <canvas id='c3' width='20' height='32' + style='position:absolute; left: 68px; top:56px;'></canvas> + <canvas id='c4' width='20' height='32' + style='position:absolute; left: 88px; top:56px;'></canvas> + <canvas id='c5' width='20' height='32' + style='position:absolute; left:108px; top:56px;'></canvas> + <canvas id='c6' width='20' height='32' + style='position:absolute; left:128px; top:56px;'></canvas> + <canvas id='c7' width='20' height='32' + style='position:absolute; left:148px; top:56px;'></canvas> + +</body> +</html> +
diff --git a/docs/enterprise/add_new_policy.md b/docs/enterprise/add_new_policy.md index 00f6b06..513df9a 100644 --- a/docs/enterprise/add_new_policy.md +++ b/docs/enterprise/add_new_policy.md
@@ -144,9 +144,12 @@ - Most policies that are used by the browser can be shared between desktop and ChromeOS. However, you need a few additional steps for a device policy on ChromeOS. - - Add a message for your policy in + - Add a field for your policy in `components/policy/proto/chrome_device_policy.proto`. Please note that all proto fields are optional. + - Update `components/policy/resources/templates/device_policy_proto_map.yaml` + with a mapping from the policy name to the `chrome_device_policy` proto + field you added. - Update `chrome/browser/ash/policy/core/device_policy_decoder.{h,cc}` for the new policy.
diff --git a/fuchsia_web/runners/cast/fidl/api_bindings.fidl b/fuchsia_web/runners/cast/fidl/api_bindings.fidl index a351f12..6d82a012 100644 --- a/fuchsia_web/runners/cast/fidl/api_bindings.fidl +++ b/fuchsia_web/runners/cast/fidl/api_bindings.fidl
@@ -10,16 +10,16 @@ /// Provides Cast platform API binding scripts and methods for connecting those /// scripts with Agent backends. @discoverable -protocol ApiBindings { +closed protocol ApiBindings { /// Gets the list of bindings to early-inject into the page at load time. /// The returned ApiBindings must be evaluated in order. - GetAll() -> (resource struct { + strict GetAll() -> (resource struct { bindings vector<ApiBinding>; }); /// Should be invoked when a connecting a named MessagePort to a native /// bindings backend. - Connect(resource struct { + strict Connect(resource struct { port_name string; message_port client_end:fuchsia.web.MessagePort; });
diff --git a/fuchsia_web/runners/cast/fidl/application_config.fidl b/fuchsia_web/runners/cast/fidl/application_config.fidl index 4e2957fb..b19f44d 100644 --- a/fuchsia_web/runners/cast/fidl/application_config.fidl +++ b/fuchsia_web/runners/cast/fidl/application_config.fidl
@@ -62,9 +62,9 @@ /// Service interface for working with application configurations. @discoverable -protocol ApplicationConfigManager { +closed protocol ApplicationConfigManager { /// Returns the ApplicationConfig for the specified application Id. - GetConfig(struct { + strict GetConfig(struct { id string; }) -> (resource struct { config ApplicationConfig;
diff --git a/fuchsia_web/runners/cast/fidl/application_context.fidl b/fuchsia_web/runners/cast/fidl/application_context.fidl index dc8ce91..b72ba5b 100644 --- a/fuchsia_web/runners/cast/fidl/application_context.fidl +++ b/fuchsia_web/runners/cast/fidl/application_context.fidl
@@ -5,17 +5,17 @@ library chromium.cast; @discoverable -protocol ApplicationContext { +closed protocol ApplicationContext { /// Returns `session_id` to use in the AudioConsumer API. May return 0 /// if there is no media session associated with the app. In this case /// audio will be rendered through AudioRenderer. - GetMediaSessionId() -> (struct { + strict GetMediaSessionId() -> (struct { media_session_id uint64; }); /// Used by the Agent to receive a controller from the Cast Runner. /// Can only be called at most one time for the lifetime of the Component. - SetApplicationController(resource struct { + strict SetApplicationController(resource struct { controller client_end:ApplicationController; }); @@ -24,7 +24,7 @@ /// Values less than or equal to zero are `zx.Status` codes. /// May be called at most once, immediately prior to termination. @transitional - OnApplicationExit(struct { + strict OnApplicationExit(struct { exit_code int64; }); };
diff --git a/fuchsia_web/runners/cast/fidl/application_controller.fidl b/fuchsia_web/runners/cast/fidl/application_controller.fidl index a555d20..2d7ae90 100644 --- a/fuchsia_web/runners/cast/fidl/application_controller.fidl +++ b/fuchsia_web/runners/cast/fidl/application_controller.fidl
@@ -8,26 +8,26 @@ /// Allows clients to access and modify certain aspects of the Cast receiver /// application runtime. -protocol ApplicationController { +closed protocol ApplicationController { /// Enables or disables touch event processing. - SetTouchInputEnabled(struct { + strict SetTouchInputEnabled(struct { enable bool; }); /// Sets whether to block all HTMLMediaElements in the frame from fetching and /// loading media resources. /// See fuchsia.web.Frame for usage details. - SetBlockMediaLoading(struct { + strict SetBlockMediaLoading(struct { blocked bool; }); /// Connects to the application's media control & observation API. - GetMediaPlayer(resource struct { + strict GetMediaPlayer(resource struct { request server_end:fuchsia.media.sessions2.Player; }); /// Gets the private memory footprint of the application's main frame. - GetPrivateMemorySize() -> (struct { + strict GetPrivateMemorySize() -> (struct { size_bytes uint64; }); };
diff --git a/fuchsia_web/runners/cast/fidl/cors_exempt_headers.fidl b/fuchsia_web/runners/cast/fidl/cors_exempt_headers.fidl index 52fd479..6491bcb 100644 --- a/fuchsia_web/runners/cast/fidl/cors_exempt_headers.fidl +++ b/fuchsia_web/runners/cast/fidl/cors_exempt_headers.fidl
@@ -9,8 +9,8 @@ /// Provides a list of header names that should be exempted from CORS preflight /// security checks for all Cast apps. @discoverable -protocol CorsExemptHeaderProvider { - GetCorsExemptHeaderNames() -> (struct { +closed protocol CorsExemptHeaderProvider { + strict GetCorsExemptHeaderNames() -> (struct { header_names vector<vector<uint8>:fuchsia.web.MAX_HEADERS_COUNT>:MAX; }); };
diff --git a/fuchsia_web/runners/cast/fidl/data_reset.fidl b/fuchsia_web/runners/cast/fidl/data_reset.fidl index e9a955f..c4d410c5 100644 --- a/fuchsia_web/runners/cast/fidl/data_reset.fidl +++ b/fuchsia_web/runners/cast/fidl/data_reset.fidl
@@ -7,7 +7,7 @@ // Used to request that persistent data for components hosted by the Runner is // deleted. @discoverable -protocol DataReset { +closed protocol DataReset { // Deletes all persistent data stored by the Runner. // // Active components hosted by the Runner will be terminated @@ -18,7 +18,7 @@ // on behalf of components apps was successfully deleted, and false if // the request could not be completed (for example, due to an I/O error). @transitional - DeletePersistentData() -> (struct { + strict DeletePersistentData() -> (struct { succeeded bool; }); };
diff --git a/fuchsia_web/runners/cast/fidl/url_request_rewriter.fidl b/fuchsia_web/runners/cast/fidl/url_request_rewriter.fidl index 7948602..b07e202 100644 --- a/fuchsia_web/runners/cast/fidl/url_request_rewriter.fidl +++ b/fuchsia_web/runners/cast/fidl/url_request_rewriter.fidl
@@ -8,11 +8,11 @@ /// Provides URL request rewriting rules from the Agent. @discoverable -protocol UrlRequestRewriteRulesProvider { +closed protocol UrlRequestRewriteRulesProvider { /// Returns a set of URL request rewriting rules. The first call must always /// return immediately with a potentially empty set of rules. On subsequent /// calls, the callback will only be invoked when the rules have changed. - GetUrlRequestRewriteRules() -> (struct { + strict GetUrlRequestRewriteRules() -> (struct { rules vector<fuchsia.web.UrlRequestRewriteRule>; }); };
diff --git a/infra/config/generated/builders/goma/ios-device-goma-rbe-canary-clobber/properties.json b/infra/config/generated/builders/goma/ios-device-goma-rbe-canary-clobber/properties.json index f8dba81..6b84db8 100644 --- a/infra/config/generated/builders/goma/ios-device-goma-rbe-canary-clobber/properties.json +++ b/infra/config/generated/builders/goma/ios-device-goma-rbe-canary-clobber/properties.json
@@ -54,5 +54,5 @@ }, "builder_group": "chromium.goma.fyi", "recipe": "chromium", - "xcode_build_version": "14c18" + "xcode_build_version": "15a240d" } \ No newline at end of file
diff --git a/infra/config/generated/luci/cr-buildbucket.cfg b/infra/config/generated/luci/cr-buildbucket.cfg index 5b8b6e1..7035e30 100644 --- a/infra/config/generated/luci/cr-buildbucket.cfg +++ b/infra/config/generated/luci/cr-buildbucket.cfg
@@ -58565,8 +58565,8 @@ '}' execution_timeout_secs: 36000 caches { - name: "xcode_ios_14c18" - path: "xcode_ios_14c18.app" + name: "xcode_ios_15a240d" + path: "xcode_ios_15a240d.app" } build_numbers: YES service_account: "goma-release-testing@chops-service-accounts.iam.gserviceaccount.com"
diff --git a/infra/config/generated/testing/variants.pyl b/infra/config/generated/testing/variants.pyl index 849417e..e0c5372 100644 --- a/infra/config/generated/testing/variants.pyl +++ b/infra/config/generated/testing/variants.pyl
@@ -70,16 +70,16 @@ }, 'LACROS_VERSION_SKEW_CANARY': { 'identifier': 'Lacros version skew testing ash canary', - 'description': 'Run with ash-chrome version 119.0.6030.0', + 'description': 'Run with ash-chrome version 119.0.6031.0', 'args': [ - '--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6030.0/test_ash_chrome', + '--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6031.0/test_ash_chrome', ], 'swarming': { 'cipd_packages': [ { 'cipd_package': 'chromium/testing/linux-ash-chromium/x86_64/ash.zip', - 'location': 'lacros_version_skew_tests_v119.0.6030.0', - 'revision': 'version:119.0.6030.0', + 'location': 'lacros_version_skew_tests_v119.0.6031.0', + 'revision': 'version:119.0.6031.0', }, ], }, @@ -434,7 +434,6 @@ 'cros_board': 'brya', 'cros_img': 'brya-release/R119-15622.0.0', 'autotest_name': 'tast.chrome-from-gcs', - 'dut_pool': 'chrome', }, }, 'CROS_BRYA_RELEASE_LKGM': { @@ -799,7 +798,6 @@ 'cros_board': 'volteer', 'cros_img': 'volteer-release/R119-15623.0.0', 'autotest_name': 'tast.chrome-from-gcs', - 'dut_pool': 'chrome', }, }, 'LACROS_AMD64_GENERIC': {
diff --git a/infra/config/subprojects/goma/goma.star b/infra/config/subprojects/goma/goma.star index 9f768de..97e08797 100644 --- a/infra/config/subprojects/goma/goma.star +++ b/infra/config/subprojects/goma/goma.star
@@ -205,7 +205,7 @@ ), cores = None, os = os.MAC_DEFAULT, - xcode = xcode.x14main, + xcode = xcode.x15main, ) fyi_goma_rbe_canary_builder(
diff --git a/infra/config/targets/cros-skylab-variants.json b/infra/config/targets/cros-skylab-variants.json index 0cce1d13..cc60819 100644 --- a/infra/config/targets/cros-skylab-variants.json +++ b/infra/config/targets/cros-skylab-variants.json
@@ -4,7 +4,6 @@ "cros_board": "brya", "cros_chrome_version": "119.0.6018.0", "cros_img": "brya-release/R119-15622.0.0", - "dut_pool": "chrome", "autotest_name": "tast.chrome-from-gcs" }, "identifier": "BRYA_RELEASE_LKGM" @@ -457,7 +456,6 @@ "cros_board": "volteer", "cros_chrome_version": "119.0.6020.0", "cros_img": "volteer-release/R119-15623.0.0", - "dut_pool": "chrome", "autotest_name": "tast.chrome-from-gcs" }, "identifier": "VOLTEER_RELEASE_LKGM"
diff --git a/infra/config/targets/lacros-version-skew-variants.json b/infra/config/targets/lacros-version-skew-variants.json index b0af595..60cdfced 100644 --- a/infra/config/targets/lacros-version-skew-variants.json +++ b/infra/config/targets/lacros-version-skew-variants.json
@@ -1,16 +1,16 @@ { "LACROS_VERSION_SKEW_CANARY": { "args": [ - "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6030.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6031.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 119.0.6030.0", + "description": "Run with ash-chrome version 119.0.6031.0", "identifier": "Lacros version skew testing ash canary", "swarming": { "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v119.0.6030.0", - "revision": "version:119.0.6030.0" + "location": "lacros_version_skew_tests_v119.0.6031.0", + "revision": "version:119.0.6031.0" } ] }
diff --git a/internal b/internal index 66c70f7..e687f22 160000 --- a/internal +++ b/internal
@@ -1 +1 @@ -Subproject commit 66c70f7165712e360b0cd864b15a4875fff95137 +Subproject commit e687f229d6a4923d5fee04492f32b7b0154df210
diff --git a/ios/chrome/app/strings/ios_strings.grd b/ios/chrome/app/strings/ios_strings.grd index 1a48d1e..761042b 100644 --- a/ios/chrome/app/strings/ios_strings.grd +++ b/ios/chrome/app/strings/ios_strings.grd
@@ -2173,7 +2173,7 @@ Tab Suggestions </message> <message name="IDS_IOS_OPTIONS_TAB_PICKUP_SCREEN_FOOTER" desc="Footer for the screen setting displaying tab suggestion settings."> - Gives you tab suggestions based on your browsing activity on your other devices using your Google account. Your devices must be signed in and synced using the same Google account. + Gives you tab suggestions based on your browsing activity on your other devices using your Google Account. Your devices must be signed in and synced using the same Google Account. </message> <message name="IDS_IOS_PARCEL_TRACKING_INFOBAR_ASK_TO_TRACK_TITLE" desc="Text for the title string of the infobar that is displayed to prompt user to track a package."> {COUNT, plural, @@ -3078,6 +3078,9 @@ <message name="IDS_IOS_LOCAL_PASSWORD_ACCESSIBILITY_LABEL" desc="Screenreader label when a password is saved only locally and not backed up to any account."> Password saved only on this device </message> + <message name="IDS_IOS_LOCAL_ADDRESS_ACCESSIBILITY_LABEL" desc="Screenreader label when an address is saved only locally"> + Address saved only on this device + </message> <message name="IDS_IOS_PASSWORD_SETTINGS_SAVE_BUTTON" desc="Save button text for adding a new credential manually via settings [Length: 10em]"> Save </message>
diff --git a/ios/chrome/app/strings/ios_strings_grd/IDS_IOS_LOCAL_ADDRESS_ACCESSIBILITY_LABEL.png.sha1 b/ios/chrome/app/strings/ios_strings_grd/IDS_IOS_LOCAL_ADDRESS_ACCESSIBILITY_LABEL.png.sha1 new file mode 100644 index 0000000..7977fd61 --- /dev/null +++ b/ios/chrome/app/strings/ios_strings_grd/IDS_IOS_LOCAL_ADDRESS_ACCESSIBILITY_LABEL.png.sha1
@@ -0,0 +1 @@ +57c129a657ecb4fa93dcde68e130466580b3dbee \ No newline at end of file
diff --git a/ios/chrome/app/strings/ios_strings_grd/IDS_IOS_OPTIONS_TAB_PICKUP_SCREEN_FOOTER.png.sha1 b/ios/chrome/app/strings/ios_strings_grd/IDS_IOS_OPTIONS_TAB_PICKUP_SCREEN_FOOTER.png.sha1 index 1dd7c24..9edaa1b 100644 --- a/ios/chrome/app/strings/ios_strings_grd/IDS_IOS_OPTIONS_TAB_PICKUP_SCREEN_FOOTER.png.sha1 +++ b/ios/chrome/app/strings/ios_strings_grd/IDS_IOS_OPTIONS_TAB_PICKUP_SCREEN_FOOTER.png.sha1
@@ -1 +1 @@ -3c3b909ce23125da96846bd2cb711cfd4faf4719 \ No newline at end of file +5df447efee001d9237aa411fccd9a7968afbbca0 \ No newline at end of file
diff --git a/ios/chrome/browser/supervised_user/supervised_user_error_container.mm b/ios/chrome/browser/supervised_user/supervised_user_error_container.mm index cdd9dd9..c1de15f 100644 --- a/ios/chrome/browser/supervised_user/supervised_user_error_container.mm +++ b/ios/chrome/browser/supervised_user/supervised_user_error_container.mm
@@ -129,13 +129,15 @@ CHECK(blocking_tab_helper); security_interstitials::IOSSecurityInterstitialPage* blocking_page = blocking_tab_helper->GetCurrentBlockingPage(); - if (blocking_page and + + // Early exit if the blocking page is not a supervised user interstitial. + if (blocking_page && blocking_page->GetInterstitialType() != kSupervisedUserInterstitialType) { return; } bool is_showing_supervised_user_interstitial_for_url = false; - bool reload_main_frame = true; + bool is_main_frame = true; if (blocking_page) { // If a blocking_page exists here, then it has the right type. @@ -143,9 +145,9 @@ static_cast<SupervisedUserInterstitialBlockingPage*>(blocking_page); is_showing_supervised_user_interstitial_for_url = supervised_user_blocking_page->interstitial().url() == url; - reload_main_frame = supervised_user_blocking_page->interstitial() - .web_content_handler() - ->IsMainFrame(); + is_main_frame = supervised_user_blocking_page->interstitial() + .web_content_handler() + ->IsMainFrame(); } bool should_show_interstitial = @@ -154,14 +156,11 @@ if (is_showing_supervised_user_interstitial_for_url != should_show_interstitial) { - // TODO (b/279766168): Implement interstitial refresh for sub frame. - if (reload_main_frame) { + // The present interstitial framework on iOS supports main frames only. + // It it is not possible to obtain or refresh a subframe interstitial. + if (is_main_frame && web_state_->IsRealized()) { web_state_->GetNavigationManager()->Reload(web::ReloadType::NORMAL, /*check_for_repost=*/true); - } else { - // The present interstitial framework on iOS supports main frames only. - // It it is not possible to obtain or refresh a subframe interstitial. - NOTREACHED_NORETURN(); } } }
diff --git a/ios/chrome/browser/ui/authentication/signin/consistency_promo_signin/BUILD.gn b/ios/chrome/browser/ui/authentication/signin/consistency_promo_signin/BUILD.gn index 5715a03..543e6f5 100644 --- a/ios/chrome/browser/ui/authentication/signin/consistency_promo_signin/BUILD.gn +++ b/ios/chrome/browser/ui/authentication/signin/consistency_promo_signin/BUILD.gn
@@ -6,8 +6,6 @@ source_set("consistency_promo_signin") { sources = [ - "account_cookie_waiter.h", - "account_cookie_waiter.mm", "consistency_promo_signin_coordinator.h", "consistency_promo_signin_coordinator.mm", "consistency_promo_signin_mediator.h",
diff --git a/ios/chrome/browser/ui/authentication/signin/consistency_promo_signin/account_cookie_waiter.h b/ios/chrome/browser/ui/authentication/signin/consistency_promo_signin/account_cookie_waiter.h deleted file mode 100644 index 9dc36c6..0000000 --- a/ios/chrome/browser/ui/authentication/signin/consistency_promo_signin/account_cookie_waiter.h +++ /dev/null
@@ -1,55 +0,0 @@ -// Copyright 2023 The Chromium Authors -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef IOS_CHROME_BROWSER_UI_AUTHENTICATION_SIGNIN_CONSISTENCY_PROMO_SIGNIN_ACCOUNT_COOKIE_WAITER_H_ -#define IOS_CHROME_BROWSER_UI_AUTHENTICATION_SIGNIN_CONSISTENCY_PROMO_SIGNIN_ACCOUNT_COOKIE_WAITER_H_ - -#import "base/functional/callback_forward.h" -#import "base/memory/raw_ptr.h" -#import "base/timer/timer.h" -#import "components/signin/public/identity_manager/identity_manager.h" -#import "google_apis/gaia/core_account_id.h" - -// Helper to wait for a Gaia cookie to be populated. -class AccountCookieWaiter : public signin::IdentityManager::Observer { - public: - enum class Result { - kSuccess, - kAuthError, - kTimeout, - }; - - explicit AccountCookieWaiter(signin::IdentityManager* identity_manager); - - AccountCookieWaiter(const AccountCookieWaiter&) = delete; - AccountCookieWaiter& operator=(const AccountCookieWaiter&) = delete; - - // If `Wait()` is ongoing, aborts without invoking the callback. - ~AccountCookieWaiter() override; - - // Waits for `account_id` to be present in the cookie jar and invokes - // `callback` with the outcome. Must not be called again before the previous - // wait finishes, i.e. before `callback` is invoked. - void Wait(CoreAccountId account_id, - base::OnceCallback<void(Result)> callback); - - // signin::IdentityManager::Observer implementation. - void OnAccountsInCookieUpdated( - const signin::AccountsInCookieJarInfo& accounts_in_cookie_jar_info, - const GoogleServiceAuthError& error) override; - - private: - // Called once the timer runs out. - void OnTimeout(); - - const raw_ptr<signin::IdentityManager> identity_manager_; - // Timer to wait for the cookies. - base::OneShotTimer timer_; - // Set on every Wait(). - CoreAccountId account_id_; - // Set on every Wait(). - base::OnceCallback<void(Result)> callback_; -}; - -#endif // IOS_CHROME_BROWSER_UI_AUTHENTICATION_SIGNIN_CONSISTENCY_PROMO_SIGNIN_ACCOUNT_COOKIE_WAITER_H_
diff --git a/ios/chrome/browser/ui/authentication/signin/consistency_promo_signin/account_cookie_waiter.mm b/ios/chrome/browser/ui/authentication/signin/consistency_promo_signin/account_cookie_waiter.mm deleted file mode 100644 index 96e3b88..0000000 --- a/ios/chrome/browser/ui/authentication/signin/consistency_promo_signin/account_cookie_waiter.mm +++ /dev/null
@@ -1,70 +0,0 @@ -// Copyright 2023 The Chromium Authors -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#import "ios/chrome/browser/ui/authentication/signin/consistency_promo_signin/account_cookie_waiter.h" - -#import "base/check.h" -#import "base/containers/contains.h" -#import "base/functional/callback.h" -#import "base/location.h" -#import "base/time/time.h" -#import "base/timer/timer.h" -#import "components/signin/public/identity_manager/accounts_in_cookie_jar_info.h" -#import "google_apis/gaia/gaia_auth_util.h" -#import "google_apis/gaia/google_service_auth_error.h" - -namespace { - -// Sign-in time out duration. -constexpr base::TimeDelta kSigninTimeout = base::Seconds(10); - -} // namespace - -AccountCookieWaiter::AccountCookieWaiter( - signin::IdentityManager* identity_manager) - : identity_manager_(identity_manager) { - identity_manager_->AddObserver(this); -} - -AccountCookieWaiter::~AccountCookieWaiter() { - identity_manager_->RemoveObserver(this); -} - -void AccountCookieWaiter::Wait(CoreAccountId account_id, - base::OnceCallback<void(Result)> callback) { - CHECK(!timer_.IsRunning()) - << "Wait() musn't be called before previous call finished"; - - account_id_ = account_id; - callback_ = std::move(callback); - - // Unretained() is safe because `this` outlives `timer_`. - timer_.Start( - FROM_HERE, kSigninTimeout, - base::BindOnce(&AccountCookieWaiter::OnTimeout, base::Unretained(this))); -} - -void AccountCookieWaiter::OnAccountsInCookieUpdated( - const signin::AccountsInCookieJarInfo& accounts_in_cookie_jar_info, - const GoogleServiceAuthError& error) { - if (!timer_.IsRunning()) { - // No waiting ongoing. - return; - } - - if (error.state() != GoogleServiceAuthError::State::NONE) { - timer_.Stop(); - std::move(callback_).Run(Result::kAuthError); - } else if (base::Contains(accounts_in_cookie_jar_info.signed_in_accounts, - account_id_, &gaia::ListedAccount::id)) { - timer_.Stop(); - std::move(callback_).Run(Result::kSuccess); - } else { - // Keep waiting. - } -} - -void AccountCookieWaiter::OnTimeout() { - std::move(callback_).Run(Result::kTimeout); -}
diff --git a/ios/chrome/browser/ui/authentication/signin/consistency_promo_signin/consistency_promo_signin_coordinator.mm b/ios/chrome/browser/ui/authentication/signin/consistency_promo_signin/consistency_promo_signin_coordinator.mm index 89ecfdf2..4d97a4c 100644 --- a/ios/chrome/browser/ui/authentication/signin/consistency_promo_signin/consistency_promo_signin_coordinator.mm +++ b/ios/chrome/browser/ui/authentication/signin/consistency_promo_signin/consistency_promo_signin_coordinator.mm
@@ -4,8 +4,6 @@ #import "ios/chrome/browser/ui/authentication/signin/consistency_promo_signin/consistency_promo_signin_coordinator.h" -#import <memory> - #import "base/metrics/user_metrics.h" #import "components/prefs/pref_service.h" #import "components/signin/public/base/signin_metrics.h" @@ -23,7 +21,6 @@ #import "ios/chrome/browser/signin/identity_manager_factory.h" #import "ios/chrome/browser/signin/system_identity.h" #import "ios/chrome/browser/ui/authentication/authentication_flow.h" -#import "ios/chrome/browser/ui/authentication/signin/consistency_promo_signin/account_cookie_waiter.h" #import "ios/chrome/browser/ui/authentication/signin/consistency_promo_signin/consistency_account_chooser/consistency_account_chooser_coordinator.h" #import "ios/chrome/browser/ui/authentication/signin/consistency_promo_signin/consistency_default_account/consistency_default_account_coordinator.h" #import "ios/chrome/browser/ui/authentication/signin/consistency_promo_signin/consistency_layout_delegate.h" @@ -137,8 +134,7 @@ self.consistencyPromoSigninMediator = [[ConsistencyPromoSigninMediator alloc] initWithAccountManagerService:accountManagerService authenticationService:authenticationService - accountCookieWaiter:std::make_unique<AccountCookieWaiter>( - identityManager) + identityManager:identityManager userPrefService:browserState->GetPrefs() accessPoint:self.accessPoint]; self.consistencyPromoSigninMediator.delegate = self; @@ -492,7 +488,6 @@ (ConsistencyPromoSigninMediatorError)error { NSString* errorTitle = l10n_util::GetNSString(IDS_IOS_WEBSIGN_ERROR_TITLE); NSString* errorMessage = nil; - NSLog(@"create error %@", errorTitle); switch (error) { case ConsistencyPromoSigninMediatorErrorGeneric: case ConsistencyPromoSigninMediatorErrorFailedToSignin:
diff --git a/ios/chrome/browser/ui/authentication/signin/consistency_promo_signin/consistency_promo_signin_mediator.h b/ios/chrome/browser/ui/authentication/signin/consistency_promo_signin/consistency_promo_signin_mediator.h index f6851b6..4fb9d5d 100644 --- a/ios/chrome/browser/ui/authentication/signin/consistency_promo_signin/consistency_promo_signin_mediator.h +++ b/ios/chrome/browser/ui/authentication/signin/consistency_promo_signin/consistency_promo_signin_mediator.h
@@ -6,12 +6,10 @@ #define IOS_CHROME_BROWSER_UI_AUTHENTICATION_SIGNIN_CONSISTENCY_PROMO_SIGNIN_CONSISTENCY_PROMO_SIGNIN_MEDIATOR_H_ #import <Foundation/Foundation.h> -#import <memory> #import "base/ios/block_types.h" #import "ios/chrome/browser/ui/authentication/signin/signin_constants.h" -class AccountCookieWaiter; @class AuthenticationFlow; class AuthenticationService; class ChromeAccountManagerService; @@ -20,6 +18,10 @@ @class SigninCompletionInfo; @protocol SystemIdentity; +namespace signin { +class IdentityManager; +} // signin + namespace signin_metrics { enum class AccessPoint : int; } @@ -67,8 +69,7 @@ initWithAccountManagerService: (ChromeAccountManagerService*)accountManagerService authenticationService:(AuthenticationService*)authenticationService - accountCookieWaiter: - (std::unique_ptr<AccountCookieWaiter>)accountCookieWaiter + identityManager:(signin::IdentityManager*)identityManager userPrefService:(PrefService*)userPrefService accessPoint:(signin_metrics::AccessPoint)accessPoint;
diff --git a/ios/chrome/browser/ui/authentication/signin/consistency_promo_signin/consistency_promo_signin_mediator.mm b/ios/chrome/browser/ui/authentication/signin/consistency_promo_signin/consistency_promo_signin_mediator.mm index 7e00177..6d28e4c 100644 --- a/ios/chrome/browser/ui/authentication/signin/consistency_promo_signin/consistency_promo_signin_mediator.mm +++ b/ios/chrome/browser/ui/authentication/signin/consistency_promo_signin/consistency_promo_signin_mediator.mm
@@ -4,21 +4,36 @@ #import "ios/chrome/browser/ui/authentication/signin/consistency_promo_signin/consistency_promo_signin_mediator.h" -#import "base/strings/sys_string_conversions.h" +#import "base/cancelable_callback.h" +#import "base/task/single_thread_task_runner.h" #import "components/prefs/pref_service.h" #import "components/signin/public/base/signin_metrics.h" #import "components/signin/public/identity_manager/accounts_in_cookie_jar_info.h" +#import "components/signin/public/identity_manager/objc/identity_manager_observer_bridge.h" #import "ios/chrome/browser/shared/model/prefs/pref_names.h" #import "ios/chrome/browser/signin/authentication_service.h" #import "ios/chrome/browser/signin/chrome_account_manager_service.h" #import "ios/chrome/browser/signin/system_identity.h" #import "ios/chrome/browser/ui/authentication/authentication_flow.h" -#import "ios/chrome/browser/ui/authentication/signin/consistency_promo_signin/account_cookie_waiter.h" #import "ios/chrome/browser/ui/authentication/signin/signin_completion_info.h" -@interface ConsistencyPromoSigninMediator () { - // See waiter docs. Only used if the access point is web sign-in. - std::unique_ptr<AccountCookieWaiter> _accountCookieWaiter; +namespace { + +// Sign-in time out duration. +constexpr base::TimeDelta kSigninTimeout = base::Seconds(10); + +} // namespace + +@interface ConsistencyPromoSigninMediator () < + IdentityManagerObserverBridgeDelegate> { + // Observer for changes to the user's Google identities. + std::unique_ptr<signin::IdentityManagerObserverBridge> + _identityManagerObserverBridge; + // Closure to trigger the sign-in time out error. This closure exists to make + // sure the user doesn't wait too long before to get the cookies available + // on the web. This is used only when `_accessPoint` is equal to + // `ACCESS_POINT_WEB_SIGNIN`. + base::CancelableOnceClosure _cookieTimeoutClosure; AuthenticationFlow* _authenticationFlow; // True if the mediator was initialized with no existing account on device. // Kept for metrics reasons. @@ -31,6 +46,7 @@ // Manager for user's Google identities. @property(nonatomic, assign) ChromeAccountManagerService* accountManagerService; @property(nonatomic, assign) AuthenticationService* authenticationService; +@property(nonatomic, assign) signin::IdentityManager* identityManager; @property(nonatomic, assign) PrefService* userPrefService; @property(nonatomic, assign, readonly) signin_metrics::AccessPoint accessPoint; // Identity for the sign-in in progress. @@ -44,18 +60,19 @@ initWithAccountManagerService: (ChromeAccountManagerService*)accountManagerService authenticationService:(AuthenticationService*)authenticationService - accountCookieWaiter: - (std::unique_ptr<AccountCookieWaiter>)accountCookieWaiter + identityManager:(signin::IdentityManager*)identityManager userPrefService:(PrefService*)userPrefService accessPoint:(signin_metrics::AccessPoint)accessPoint { self = [super init]; if (self) { _accountManagerService = accountManagerService; _authenticationService = authenticationService; - _accountCookieWaiter = std::move(accountCookieWaiter); + _identityManager = identityManager; _userPrefService = userPrefService; _accessPoint = accessPoint; _addedGaiaIDs = [[NSMutableSet alloc] init]; + _identityManagerObserverBridge.reset( + new signin::IdentityManagerObserverBridge(self.identityManager, self)); _initializedWithDefaultAccount = self.accountManagerService->HasIdentities(); @@ -74,11 +91,14 @@ - (void)dealloc { DCHECK(!self.accountManagerService && !self.authenticationService && - !_accountCookieWaiter && !self.userPrefService) + !self.identityManager && !self.userPrefService && + !_identityManagerObserverBridge.get()) << "self.accountManagerService: " << self.accountManagerService << ", self.authenticationService: " << self.authenticationService + << ", self.identityManager: " << self.identityManager << ", self.userPrefService: " << self.userPrefService - << ", _accountCookieWaiter: " << _accountCookieWaiter; + << ", _identityManagerObserverBridge: " + << _identityManagerObserverBridge.get(); } - (void)disconnectWithResult:(SigninCoordinatorResult)signinResult { @@ -130,11 +150,12 @@ break; } } - // Abort any ongoing wait. - _accountCookieWaiter.reset(); + _cookieTimeoutClosure.Cancel(); self.accountManagerService = nullptr; self.authenticationService = nullptr; + self.identityManager = nullptr; self.userPrefService = nullptr; + _identityManagerObserverBridge.reset(); } - (void)systemIdentityAdded:(id<SystemIdentity>)identity { @@ -166,25 +187,21 @@ ConsistencyPromoSigninMediatorErrorFailedToSignin]; return; } - - if (_accessPoint != signin_metrics::AccessPoint::ACCESS_POINT_WEB_SIGNIN) { - // Other entry points don't need to wait for the account cookie, done. - [self.delegate - consistencyPromoSigninMediatorSignInDone:self - withIdentity:self.signingIdentity]; + if (_accessPoint == signin_metrics::AccessPoint::ACCESS_POINT_WEB_SIGNIN) { + // `-[ConsistencyPromoSigninMediator onAccountsInCookieUpdated:error:]` will + // be called when the cookies will be ready, and then the sign-in can be + // finished. Or `_cookieTimeoutClosure` will be called if it takes too long. + __weak __typeof(self) weakSelf = self; + _cookieTimeoutClosure.Reset(base::BindOnce(^{ + [weakSelf + cancelSigninWithError:ConsistencyPromoSigninMediatorErrorTimeout]; + })); + base::SingleThreadTaskRunner::GetCurrentDefault()->PostDelayedTask( + FROM_HERE, _cookieTimeoutClosure.callback(), kSigninTimeout); return; } - - // Wait for the account cookie to arrive, or an error, or timeout. - __weak __typeof(self) weakSelf = self; - auto callback = base::BindOnce( - [](__typeof(self) strongSelf, AccountCookieWaiter::Result result) { - [strongSelf onCookieWaitDoneWithResult:result]; - }, - weakSelf); - _accountCookieWaiter->Wait(CoreAccountId::FromGaiaId(base::SysNSStringToUTF8( - self.signingIdentity.gaiaID)), - std::move(callback)); + [self.delegate consistencyPromoSigninMediatorSignInDone:self + withIdentity:self.signingIdentity]; } // Cancels sign-in and calls the delegate to display the error. @@ -218,25 +235,67 @@ }); } -- (void)onCookieWaitDoneWithResult:(AccountCookieWaiter::Result)result { - switch (result) { - case AccountCookieWaiter::Result::kAuthError: - [self cancelSigninWithError:ConsistencyPromoSigninMediatorErrorGeneric]; +#pragma mark - IdentityManagerObserverBridgeDelegate + +- (void)onPrimaryAccountChanged: + (const signin::PrimaryAccountChangeEvent&)event { + switch (event.GetEventTypeFor(signin::ConsentLevel::kSignin)) { + case signin::PrimaryAccountChangeEvent::Type::kSet: { + // Since sign-in UI blocks all other Chrome screens until it is dismissed + // an account change event must come from the consistency sheet. + // TODO(crbug.com/1081764): Update if sign-in UI becomes non-blocking. + DCHECK(self.signingIdentity); + id<SystemIdentity> signedInIdentity = + self.authenticationService->GetPrimaryIdentity( + signin::ConsentLevel::kSignin); + DCHECK([signedInIdentity isEqual:self.signingIdentity]); break; - case AccountCookieWaiter::Result::kTimeout: - [self cancelSigninWithError:ConsistencyPromoSigninMediatorErrorTimeout]; - break; - case AccountCookieWaiter::Result::kSuccess: - if (self.accessPoint == - signin_metrics::AccessPoint::ACCESS_POINT_WEB_SIGNIN) { - self.userPrefService->SetInteger(prefs::kSigninWebSignDismissalCount, - 0); - } - [self.delegate - consistencyPromoSigninMediatorSignInDone:self - withIdentity:self.signingIdentity]; - break; + } + case signin::PrimaryAccountChangeEvent::Type::kCleared: + // Sign out can be triggered from `onAccountsInCookieUpdated:error:`, + // if there is cookie fetch error. + return; + case signin::PrimaryAccountChangeEvent::Type::kNone: + return; } } +- (void)onAccountsInCookieUpdated: + (const signin::AccountsInCookieJarInfo&)accountsInCookieJarInfo + error:(const GoogleServiceAuthError&)error { + if (_authenticationFlow || + _accessPoint != signin_metrics::AccessPoint::ACCESS_POINT_WEB_SIGNIN) { + // Ignore if `_authenticationFlow` is in progress since + // `onAccountsInCookieUpdated` may be called when data is cleared on + // sign-in. + // Ignore if the access point is different than WebSignin. Only the web + // sign-in needs to wait for the cookies. + return; + } + id<SystemIdentity> signingIdentity = self.signingIdentity; + if (!signingIdentity) { + // TODO(crbug.com/1204528): This case should not happen, but + // `onAccountsInCookieUpdated:error:` can be called twice when there is an + // error. Once this bug is fixed, this `if` should be replaced with + // `DCHECK(!self.alertCoordinator)`. + return; + } + DCHECK(!_authenticationFlow); + _cookieTimeoutClosure.Cancel(); + if (error.state() == GoogleServiceAuthError::State::NONE && + self.authenticationService->GetPrimaryIdentity( + signin::ConsentLevel::kSignin) && + accountsInCookieJarInfo.signed_in_accounts.size() > 0) { + // Reset dismissal count. + if (self.accessPoint == + signin_metrics::AccessPoint::ACCESS_POINT_WEB_SIGNIN) { + self.userPrefService->SetInteger(prefs::kSigninWebSignDismissalCount, 0); + } + [self.delegate consistencyPromoSigninMediatorSignInDone:self + withIdentity:signingIdentity]; + return; + } + [self cancelSigninWithError:ConsistencyPromoSigninMediatorErrorGeneric]; +} + @end
diff --git a/ios/chrome/browser/ui/authentication/signin/consistency_promo_signin/consistency_promo_signin_mediator_unittest.mm b/ios/chrome/browser/ui/authentication/signin/consistency_promo_signin/consistency_promo_signin_mediator_unittest.mm index f56e2261..b9dd49a 100644 --- a/ios/chrome/browser/ui/authentication/signin/consistency_promo_signin/consistency_promo_signin_mediator_unittest.mm +++ b/ios/chrome/browser/ui/authentication/signin/consistency_promo_signin/consistency_promo_signin_mediator_unittest.mm
@@ -23,7 +23,6 @@ #import "ios/chrome/browser/signin/fake_system_identity_manager.h" #import "ios/chrome/browser/signin/identity_manager_factory.h" #import "ios/chrome/browser/ui/authentication/authentication_flow.h" -#import "ios/chrome/browser/ui/authentication/signin/consistency_promo_signin/account_cookie_waiter.h" #import "ios/chrome/browser/ui/authentication/signin/signin_completion_info.h" #import "ios/chrome/test/ios_chrome_scoped_testing_local_state.h" #import "ios/web/public/test/web_task_environment.h" @@ -79,14 +78,13 @@ browser_state_.get()); AuthenticationService* auth_service = AuthenticationServiceFactory::GetForBrowserState(browser_state_.get()); - auto cookie_waiter = std::make_unique<AccountCookieWaiter>( - IdentityManagerFactory::GetForBrowserState(browser_state_.get())); - cookie_waiter_ = cookie_waiter.get(); + signin::IdentityManager* identity_manager = + IdentityManagerFactory::GetForBrowserState(browser_state_.get()); ConsistencyPromoSigninMediator* mediator = [[ConsistencyPromoSigninMediator alloc] initWithAccountManagerService:chrome_account_manager_service authenticationService:auth_service - accountCookieWaiter:std::move(cookie_waiter) + identityManager:identity_manager userPrefService:GetPrefService() accessPoint:access_point]; mediator.delegate = mediator_delegate_mock_; @@ -98,22 +96,26 @@ gaia::ListedAccount account; account.id = CoreAccountId::FromGaiaId(base::SysNSStringToUTF8(identity.gaiaID)); - cookie_waiter_->OnAccountsInCookieUpdated( - signin::AccountsInCookieJarInfo( - /*accounts_are_fresh_param=*/true, - /*signed_in_accounts_param=*/{account}, - /*signed_out_accounts_param=*/{}), - GoogleServiceAuthError(GoogleServiceAuthError::State::NONE)); + signin::AccountsInCookieJarInfo cookie_jar_info( + /*accounts_are_fresh_param=*/true, + /*signed_in_accounts_param=*/{account}, + /*signed_out_accounts_param=*/{}); + [(id<IdentityManagerObserverBridgeDelegate>)mediator + onAccountsInCookieUpdated:cookie_jar_info + error:GoogleServiceAuthError( + GoogleServiceAuthError::State::NONE)]; } void SimulateCookieFetchError(ConsistencyPromoSigninMediator* mediator) { - cookie_waiter_->OnAccountsInCookieUpdated( - signin::AccountsInCookieJarInfo( - /*accounts_are_fresh_param=*/false, - /*signed_in_accounts_param=*/{}, - /*signed_out_accounts_param=*/{}), - GoogleServiceAuthError( - GoogleServiceAuthError::State::INVALID_GAIA_CREDENTIALS)); + signin::AccountsInCookieJarInfo cookie_jar_info( + /*accounts_are_fresh_param=*/false, + /*signed_in_accounts_param=*/{}, + /*signed_out_accounts_param=*/{}); + [(id<IdentityManagerObserverBridgeDelegate>)mediator + onAccountsInCookieUpdated:cookie_jar_info + error:GoogleServiceAuthError( + GoogleServiceAuthError::State:: + INVALID_GAIA_CREDENTIALS)]; } void SimulateCookieFetchTimeout() { @@ -146,9 +148,6 @@ OCMStrictClassMock([AuthenticationFlow class]); id<ConsistencyPromoSigninMediatorDelegate> mediator_delegate_mock_ = OCMStrictProtocolMock(@protocol(ConsistencyPromoSigninMediatorDelegate)); - // Owned by the mediator. This pointer must be reset before the mediator is - // disconnected, otherwise it will be dangling. - raw_ptr<AccountCookieWaiter> cookie_waiter_ = nullptr; private: // Needed for test browser state. @@ -166,7 +165,6 @@ ConsistencyPromoSigninMediator* mediator = BuildConsistencyPromoSigninMediator( signin_metrics::AccessPoint::ACCESS_POINT_WEB_SIGNIN); - cookie_waiter_ = nullptr; [mediator disconnectWithResult:SigninCoordinatorResultCanceledByUser]; histogram_tester.ExpectTotalCount( @@ -188,7 +186,6 @@ ConsistencyPromoSigninMediator* mediator = BuildConsistencyPromoSigninMediator( signin_metrics::AccessPoint::ACCESS_POINT_WEB_SIGNIN); - cookie_waiter_ = nullptr; [mediator disconnectWithResult:SigninCoordinatorResultInterrupted]; histogram_tester.ExpectTotalCount( @@ -224,7 +221,6 @@ SimulateCookieFetchSuccess(mediator, kDefaultIdentity); - cookie_waiter_ = nullptr; [mediator disconnectWithResult:SigninCoordinatorResultSuccess]; EXPECT_EQ(0, @@ -262,7 +258,6 @@ SimulateCookieFetchSuccess(mediator, kNonDefaultIdentity); - cookie_waiter_ = nullptr; [mediator disconnectWithResult:SigninCoordinatorResultSuccess]; histogram_tester.ExpectTotalCount( @@ -303,7 +298,6 @@ SimulateCookieFetchSuccess(mediator, new_identity); - cookie_waiter_ = nullptr; [mediator disconnectWithResult:SigninCoordinatorResultSuccess]; histogram_tester.ExpectTotalCount( @@ -349,7 +343,6 @@ error_wait_loop->Run(); - cookie_waiter_ = nullptr; [mediator disconnectWithResult:SigninCoordinatorResultCanceledByUser]; histogram_tester.ExpectTotalCount( @@ -399,7 +392,6 @@ error_wait_loop->Run(); - cookie_waiter_ = nullptr; [mediator disconnectWithResult:SigninCoordinatorResultCanceledByUser]; histogram_tester.ExpectTotalCount( @@ -448,7 +440,6 @@ error_wait_loop->Run(); - cookie_waiter_ = nullptr; [mediator disconnectWithResult:SigninCoordinatorResultCanceledByUser]; histogram_tester.ExpectTotalCount( @@ -486,7 +477,6 @@ withIdentity:kDefaultIdentity]); [mediator signinWithAuthenticationFlow:authentication_flow_]; - cookie_waiter_ = nullptr; [mediator disconnectWithResult:SigninCoordinatorResultSuccess]; EXPECT_EQ(1,
diff --git a/ios/chrome/browser/ui/fullscreen/scoped_fullscreen_disabler.mm b/ios/chrome/browser/ui/fullscreen/scoped_fullscreen_disabler.mm index 1fffdbf9..8502198 100644 --- a/ios/chrome/browser/ui/fullscreen/scoped_fullscreen_disabler.mm +++ b/ios/chrome/browser/ui/fullscreen/scoped_fullscreen_disabler.mm
@@ -19,5 +19,7 @@ void ScopedFullscreenDisabler::FullscreenControllerWillShutDown( FullscreenController* controller) { + DCHECK(scoped_observer_.IsObservingSource(controller)); + scoped_observer_.Reset(); controller_ = nullptr; }
diff --git a/ios/chrome/browser/ui/safe_mode/BUILD.gn b/ios/chrome/browser/ui/safe_mode/BUILD.gn index 4ce8ed8..3663a9a 100644 --- a/ios/chrome/browser/ui/safe_mode/BUILD.gn +++ b/ios/chrome/browser/ui/safe_mode/BUILD.gn
@@ -66,9 +66,6 @@ "//ios/testing:block_swizzler", "//ios/testing/earl_grey:eg_test_support+eg2", "//ui/base", - - # TODO(crbug.com/1484597): Remove this when the issue is fixed. - "//components/sync/base:features", ] frameworks = [ "UIKit.framework" ] }
diff --git a/ios/chrome/browser/ui/safe_mode/safe_mode_egtest.mm b/ios/chrome/browser/ui/safe_mode/safe_mode_egtest.mm index ac9e4c7..b7ba2b1 100644 --- a/ios/chrome/browser/ui/safe_mode/safe_mode_egtest.mm +++ b/ios/chrome/browser/ui/safe_mode/safe_mode_egtest.mm
@@ -22,9 +22,6 @@ #import "ios/testing/scoped_block_swizzler.h" #import "ui/base/l10n/l10n_util.h" -// TODO(crbug.com/1484597): Remove this when the issue is fixed. -#import "components/sync/base/features.h" - using chrome_test_util::ButtonWithAccessibilityLabel; namespace { @@ -72,14 +69,6 @@ @implementation SafeModeTestCase -// TODO(crbug.com/1484597): Remove this when the issue is fixed. -- (AppLaunchConfiguration)appConfigurationForTestCase { - AppLaunchConfiguration config; - config.features_disabled.push_back( - syncer::kReplaceSyncPromosWithSignInPromos); - return config; -} - // Tests that Safe Mode crash upload screen is displayed when there are crash // reports to upload. - (void)testSafeModeSendingCrashReport {
diff --git a/ios/chrome/browser/ui/settings/autofill/autofill_profile_settings_egtest.mm b/ios/chrome/browser/ui/settings/autofill/autofill_profile_settings_egtest.mm index 3c67b9fe..fdbd448 100644 --- a/ios/chrome/browser/ui/settings/autofill/autofill_profile_settings_egtest.mm +++ b/ios/chrome/browser/ui/settings/autofill/autofill_profile_settings_egtest.mm
@@ -646,7 +646,12 @@ [SigninEarlGreyUI signinWithFakeIdentity:[FakeSystemIdentity fakeIdentity1] enableSync:NO]; [AutofillAppInterface saveExampleProfile]; - [self openEditProfile:kProfileLabel]; + [self + openEditProfile: + [NSString + stringWithFormat:@"%@, %@", kProfileLabel, + l10n_util::GetNSString( + IDS_IOS_LOCAL_ADDRESS_ACCESSIBILITY_LABEL)]]; if ([ChromeEarlGrey isIPadIdiom]) { // Scroll to the bottom for ipad. @@ -710,7 +715,12 @@ enableSync:NO]; [AutofillAppInterface saveExampleProfile]; - [self openEditProfile:kProfileLabel]; + [self + openEditProfile: + [NSString + stringWithFormat:@"%@, %@", kProfileLabel, + l10n_util::GetNSString( + IDS_IOS_LOCAL_ADDRESS_ACCESSIBILITY_LABEL)]]; // Switch on edit mode. [[EarlGrey selectElementWithMatcher:NavigationBarEditButton()] performAction:grey_tap()];
diff --git a/ios/chrome/browser/ui/settings/autofill/autofill_profile_table_view_controller.mm b/ios/chrome/browser/ui/settings/autofill/autofill_profile_table_view_controller.mm index 04dad3a..c17d85c 100644 --- a/ios/chrome/browser/ui/settings/autofill/autofill_profile_table_view_controller.mm +++ b/ios/chrome/browser/ui/settings/autofill/autofill_profile_table_view_controller.mm
@@ -250,6 +250,7 @@ item.accessibilityIdentifier = title; item.GUID = guid; item.showMigrateToAccountButton = NO; + item.localProfileIconShown = NO; if (autofillProfile.source() == autofill::AutofillProfile::Source::kAccount) { item.autofillProfileSource = AutofillAddressProfileSource::AutofillAccountProfile; @@ -262,6 +263,7 @@ item.showMigrateToAccountButton = YES; item.image = CustomSymbolTemplateWithPointSize( kCloudSlashSymbol, kCloudSlashSymbolPointSize); + item.localProfileIconShown = YES; } } return item;
diff --git a/ios/chrome/browser/ui/settings/autofill/cells/BUILD.gn b/ios/chrome/browser/ui/settings/autofill/cells/BUILD.gn index 6864731..3941bed 100644 --- a/ios/chrome/browser/ui/settings/autofill/cells/BUILD.gn +++ b/ios/chrome/browser/ui/settings/autofill/cells/BUILD.gn
@@ -14,12 +14,14 @@ deps = [ "//base", "//base:i18n", + "//ios/chrome/app/strings", "//ios/chrome/browser/shared/ui/table_view:styler", "//ios/chrome/browser/shared/ui/table_view/cells", "//ios/chrome/browser/shared/ui/util", "//ios/chrome/browser/ui/autofill:autofill_ui_type", "//ios/chrome/common/ui/colors", "//ios/chrome/common/ui/table_view:cells_constants", + "//ui/base", ] }
diff --git a/ios/chrome/browser/ui/settings/autofill/cells/autofill_profile_item.h b/ios/chrome/browser/ui/settings/autofill/cells/autofill_profile_item.h index 138956ed..8a5d66f9 100644 --- a/ios/chrome/browser/ui/settings/autofill/cells/autofill_profile_item.h +++ b/ios/chrome/browser/ui/settings/autofill/cells/autofill_profile_item.h
@@ -33,6 +33,9 @@ // profile to Account. @property(nonatomic, assign) BOOL showMigrateToAccountButton; +// YES, if the cloud off icon representing local profile is shown. +@property(nonatomic, assign) BOOL localProfileIconShown; + @end @interface AutofillProfileCell : TableViewCell @@ -43,6 +46,8 @@ @property(nonatomic, readonly, strong) UILabel* textLabel; // The cell detail text. @property(nonatomic, readonly, strong) UILabel* detailTextLabel; +// YES, if the cloud off icon representing local profile is shown. +@property(nonatomic, assign) BOOL localProfileIconShown; @end
diff --git a/ios/chrome/browser/ui/settings/autofill/cells/autofill_profile_item.mm b/ios/chrome/browser/ui/settings/autofill/cells/autofill_profile_item.mm index a69b81d87..96c23ec 100644 --- a/ios/chrome/browser/ui/settings/autofill/cells/autofill_profile_item.mm +++ b/ios/chrome/browser/ui/settings/autofill/cells/autofill_profile_item.mm
@@ -10,6 +10,8 @@ #import "ios/chrome/browser/shared/ui/util/uikit_ui_util.h" #import "ios/chrome/common/ui/colors/semantic_color_names.h" #import "ios/chrome/common/ui/table_view/table_view_cells_constants.h" +#import "ios/chrome/grit/ios_strings.h" +#import "ui/base/l10n/l10n_util.h" @implementation AutofillProfileItem @@ -38,6 +40,7 @@ cell.textLabel.text = self.title; cell.detailTextLabel.text = self.detailText; + cell.localProfileIconShown = self.localProfileIconShown; } @end @@ -128,16 +131,24 @@ [super prepareForReuse]; self.textLabel.text = nil; self.detailTextLabel.text = nil; + self.localProfileIconShown = NO; } #pragma mark - UIAccessibility - (NSString*)accessibilityLabel { + NSString* label = self.textLabel.text; if (self.detailTextLabel.text) { - return [NSString stringWithFormat:@"%@, %@", self.textLabel.text, - self.detailTextLabel.text]; + label = + [NSString stringWithFormat:@"%@, %@", label, self.detailTextLabel.text]; } - return self.textLabel.text; + if (self.localProfileIconShown) { + label = [NSString + stringWithFormat:@"%@, %@", label, + l10n_util::GetNSString( + IDS_IOS_LOCAL_ADDRESS_ACCESSIBILITY_LABEL)]; + } + return label; } @end
diff --git a/ios/chrome/test/scoped_eg_traits_overrider.h b/ios/chrome/test/scoped_eg_traits_overrider.h index 3546e520..6a8f06a9 100644 --- a/ios/chrome/test/scoped_eg_traits_overrider.h +++ b/ios/chrome/test/scoped_eg_traits_overrider.h
@@ -24,7 +24,9 @@ void SetContentSizeCategory(UIContentSizeCategory new_content_size_category); private: +#if defined(__IPHONE_17_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_17_0 UIContentSizeCategory original_content_size_category_; +#endif UIViewController* top_view_controller_; };
diff --git a/media/base/mac/video_capture_device_avfoundation_helpers.mm b/media/base/mac/video_capture_device_avfoundation_helpers.mm index 4689337a..c1bbff15 100644 --- a/media/base/mac/video_capture_device_avfoundation_helpers.mm +++ b/media/base/mac/video_capture_device_avfoundation_helpers.mm
@@ -4,23 +4,42 @@ #include "media/base/mac/video_capture_device_avfoundation_helpers.h" +#include "base/feature_list.h" #include "build/build_config.h" namespace media { +BASE_FEATURE(kUseAVCaptureDeviceTypeExternal, + "UseAVCaptureDeviceTypeExternal", + base::FEATURE_ENABLED_BY_DEFAULT); + NSArray<AVCaptureDevice*>* GetVideoCaptureDevices() { - // Query for all camera device types available on apple platform. The - // others in the enum are only supported on iOS/iPadOS. - NSArray* captureDeviceType = @[ - AVCaptureDeviceTypeBuiltInWideAngleCamera, + // Camera device types available on all apple platforms. + NSArray* captureDeviceTypes = @[ AVCaptureDeviceTypeBuiltInWideAngleCamera ]; + #if BUILDFLAG(IS_MAC) - AVCaptureDeviceTypeExternalUnknown + // MacOS has an additional 'external' device type we want to include. + // AVCaptureDeviceTypeExternal since 14.0, AVCaptureDeviceTypeExternalUnknown + // before. See crbug.com/1484830. + if (@available(macOS 14.0, *)) { + if (base::FeatureList::IsEnabled(kUseAVCaptureDeviceTypeExternal)) { + captureDeviceTypes = + [captureDeviceTypes arrayByAddingObject:AVCaptureDeviceTypeExternal]; + } else { + // @available needs to be alone in an if statement, so we need to + // duplicate the else case here. + captureDeviceTypes = [captureDeviceTypes + arrayByAddingObject:AVCaptureDeviceTypeExternalUnknown]; + } + } else { + captureDeviceTypes = [captureDeviceTypes + arrayByAddingObject:AVCaptureDeviceTypeExternalUnknown]; + } #endif - ]; AVCaptureDeviceDiscoverySession* deviceDiscoverySession = [AVCaptureDeviceDiscoverySession - discoverySessionWithDeviceTypes:captureDeviceType + discoverySessionWithDeviceTypes:captureDeviceTypes mediaType:AVMediaTypeVideo position:AVCaptureDevicePositionUnspecified]; return deviceDiscoverySession.devices;
diff --git a/media/video/software_video_encoder_test.cc b/media/video/software_video_encoder_test.cc index b0c3573..f4136c2 100644 --- a/media/video/software_video_encoder_test.cc +++ b/media/video/software_video_encoder_test.cc
@@ -344,6 +344,7 @@ }; class H264VideoEncoderTest : public SoftwareVideoEncoderTest {}; +class VpxVideoEncoderTest : public SoftwareVideoEncoderTest {}; class SVCVideoEncoderTest : public SoftwareVideoEncoderTest {}; TEST_P(SoftwareVideoEncoderTest, StopCallbackWrapping) { @@ -752,6 +753,44 @@ EXPECT_EQ(chunks.size(), total_frames_count); } +TEST_P(VpxVideoEncoderTest, ReconfigureWithResize) { + int outputs_count = 0; + VideoEncoder::Options options; + options.frame_size = gfx::Size(1024, 1024); + + VideoEncoder::OutputCB output_cb = base::BindLambdaForTesting( + [&](VideoEncoderOutput output, + absl::optional<VideoEncoder::CodecDescription> desc) { + outputs_count++; + }); + + encoder_->Initialize(profile_, options, /*info_cb=*/base::DoNothing(), + std::move(output_cb), ValidatingStatusCB()); + + auto frame0 = CreateFrame(options.frame_size, pixel_format_, {}); + encoder_->Encode(frame0, VideoEncoder::EncodeOptions(false), + ValidatingStatusCB()); + + options.frame_size = gfx::Size(1000, 608); + encoder_->ChangeOptions(options, VideoEncoder::OutputCB(), + ValidatingStatusCB()); + + auto frame1 = CreateFrame(options.frame_size, pixel_format_, {}); + encoder_->Encode(frame1, VideoEncoder::EncodeOptions(false), + ValidatingStatusCB()); + + options.frame_size = gfx::Size(16, 720); + encoder_->ChangeOptions(options, VideoEncoder::OutputCB(), + ValidatingStatusCB()); + + auto frame2 = CreateFrame(options.frame_size, pixel_format_, {}); + encoder_->Encode(frame2, VideoEncoder::EncodeOptions(false), + ValidatingStatusCB(/* quit_run_loop_on_call */ true)); + + RunUntilQuit(); + EXPECT_EQ(outputs_count, 3); +} + TEST_P(H264VideoEncoderTest, ReconfigureWithResize) { VideoEncoder::Options options; gfx::Size size1(320, 200), size2(400, 240); @@ -1116,6 +1155,11 @@ {VideoCodec::kVP8, VP8PROFILE_ANY, PIXEL_FORMAT_I420}, {VideoCodec::kVP8, VP8PROFILE_ANY, PIXEL_FORMAT_XRGB}}; +INSTANTIATE_TEST_SUITE_P(VpxSpecific, + VpxVideoEncoderTest, + ::testing::ValuesIn(kVpxParams), + PrintTestParams); + INSTANTIATE_TEST_SUITE_P(VpxGeneric, SoftwareVideoEncoderTest, ::testing::ValuesIn(kVpxParams), @@ -1175,6 +1219,7 @@ #endif // ENABLE_LIBAOM GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(H264VideoEncoderTest); +GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(VpxVideoEncoderTest); GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(SVCVideoEncoderTest); GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(SoftwareVideoEncoderTest);
diff --git a/media/video/vpx_video_encoder.cc b/media/video/vpx_video_encoder.cc index 5209dd5..371bf50 100644 --- a/media/video/vpx_video_encoder.cc +++ b/media/video/vpx_video_encoder.cc
@@ -643,6 +643,10 @@ return; } + // libvpx doesn't support adjusting the number of threads + // midway through an encoding session. More details: crbug.com/1486441 + new_config.g_threads = codec_config_.g_threads; + status = ReallocateVpxImageIfNeeded(&vpx_image_, vpx_image_.fmt, options.frame_size.width(), options.frame_size.height());
diff --git a/services/network/public/cpp/features.cc b/services/network/public/cpp/features.cc index 4937c00..e57b7f6 100644 --- a/services/network/public/cpp/features.cc +++ b/services/network/public/cpp/features.cc
@@ -433,6 +433,6 @@ "VisibilityAwareResourceScheduler", base::FEATURE_DISABLED_BY_DEFAULT); -BASE_FEATURE(kSharedZstd, "SharedZstd", base::FEATURE_DISABLED_BY_DEFAULT); +BASE_FEATURE(kSharedZstd, "SharedZstd", base::FEATURE_ENABLED_BY_DEFAULT); } // namespace network::features
diff --git a/services/webnn/dml/graph_impl.cc b/services/webnn/dml/graph_impl.cc index e08fe501..6b9705e 100644 --- a/services/webnn/dml/graph_impl.cc +++ b/services/webnn/dml/graph_impl.cc
@@ -245,6 +245,14 @@ return input_iterator->second; } +const NodeOutputInfo& GetNodeOutputInfo( + const IdToNodeOutputMap& id_to_node_output_map, + uint64_t operand_id) { + const auto input_iterator = id_to_node_output_map.find(operand_id); + CHECK(input_iterator != id_to_node_output_map.end()); + return input_iterator->second; +} + const TensorDesc GetOutputTensorDesc(const OperatorPtr& operation, const IdToOperandMap& id_to_operand_map, uint32_t index = 0) { @@ -258,6 +266,13 @@ output_operand->dimensions); } +const TensorDesc CreateOutputTensorDesc(const IdToOperandMap& id_to_operand_map, + uint64_t output_id) { + const OperandPtr& output_operand = id_to_operand_map.at(output_id); + return TensorDesc(GetTensorDataType(output_operand->data_type), + output_operand->dimensions); +} + void CreateNodeOutput(const OperatorPtr& operation, GraphBuilder& graph_builder, const NodeInfo& operator_node, @@ -577,21 +592,19 @@ base::expected<void, mojom::ErrorPtr> CreateOperatorNodeForPool2d( const IdToOperandMap& id_to_operand_map, - const OperatorPtr& operation, + const mojom::Pool2dPtr& pool2d, GraphBuilder& graph_builder, IdToNodeOutputMap& id_to_node_output_map) { const auto& input_node_output_info = - GetInputNodeOutputInfo(operation, id_to_node_output_map); + GetNodeOutputInfo(id_to_node_output_map, pool2d->input_operand_id); auto input_tensor_desc = graph_builder.GetNodeOutput(input_node_output_info).tensor_desc; - auto output_tensor_desc = GetOutputTensorDesc(operation, id_to_operand_map); + uint64_t output_id = pool2d->output_operand_id; + auto output_tensor_desc = + CreateOutputTensorDesc(id_to_operand_map, output_id); - CHECK(operation->attributes); - auto& pool2d_attributes = operation->attributes->get_pool2d(); - CHECK(pool2d_attributes); - - switch (pool2d_attributes->layout) { + switch (pool2d->layout) { case mojom::InputOperandLayout::kChannelsFirst: { break; } @@ -617,24 +630,21 @@ } } - std::array<uint32_t, 2> strides = {pool2d_attributes->strides->height, - pool2d_attributes->strides->width}; - std::array<uint32_t, 2> dilations = {pool2d_attributes->dilations->height, - pool2d_attributes->dilations->width}; + std::array<uint32_t, 2> strides = {pool2d->strides->height, + pool2d->strides->width}; + std::array<uint32_t, 2> dilations = {pool2d->dilations->height, + pool2d->dilations->width}; std::array<uint32_t, 2> window_dimensions = { - pool2d_attributes->window_dimensions->height, - pool2d_attributes->window_dimensions->width}; - std::array<uint32_t, 2> start_padding = { - pool2d_attributes->padding->beginning->height, - pool2d_attributes->padding->beginning->width}; - std::array<uint32_t, 2> end_padding = { - pool2d_attributes->padding->ending->height, - pool2d_attributes->padding->ending->width}; + pool2d->window_dimensions->height, pool2d->window_dimensions->width}; + std::array<uint32_t, 2> start_padding = {pool2d->padding->beginning->height, + pool2d->padding->beginning->width}; + std::array<uint32_t, 2> end_padding = {pool2d->padding->ending->height, + pool2d->padding->ending->width}; NodeInfo pool2d_node_info; - switch (operation->kind) { + switch (pool2d->kind) { // TODO(crbug.com/1273291): Add L2Pool2d operator. - case mojom::Operator::Kind::kAveragePool2d: { + case mojom::Pool2d::Kind::kAveragePool2d: { // TODO(crbug.com/1273291): Work around dilation support for L2 and // average pooling. According to WebNN spec: // https://www.w3.org/TR/webnn/#api-mlgraphbuilder-pool2d, dilations are @@ -666,7 +676,7 @@ {input_node_output_info}); break; } - case mojom::Operator::Kind::kMaxPool2d: { + case mojom::Pool2d::Kind::kMaxPool2d: { DML_MAX_POOLING2_OPERATOR_DESC max_pooling_desc = { .InputTensor = &input_tensor_desc.GetDMLTensorDesc(), .OutputTensor = &output_tensor_desc.GetDMLTensorDesc(), @@ -693,13 +703,14 @@ mojom::Error::New(mojom::Error::Code::kUnknownError, "Failed to create pooling operator.")); } - if (pool2d_attributes->layout == mojom::InputOperandLayout::kChannelsLast) { + if (pool2d->layout == mojom::InputOperandLayout::kChannelsLast) { // Transpose the output tensor from nchw to nhwc layout. output_tensor_desc.Transpose(kNchwToNhwcPermutation); } - CreateNodeOutput(operation, graph_builder, pool2d_node_info, - output_tensor_desc, id_to_node_output_map); + CHECK(id_to_node_output_map.find(output_id) == id_to_node_output_map.end()); + id_to_node_output_map[output_id] = graph_builder.CreateNodeOutput( + pool2d_node_info, std::move(output_tensor_desc), 0); return base::ok(); } @@ -865,6 +876,66 @@ return base::ok(); } +// TODO(crbug.com/1273291): Removes this function when all operators are +// implemented in the `union Operation`. +base::expected<void, mojom::ErrorPtr> CreateGenericOperator( + const IdToOperandMap& id_to_operand_map, + const OperatorPtr& operation, + GraphBuilder& graph_builder, + IdToNodeOutputMap& id_to_node_output_map) { + // For operators that deal with DML API, there is a chance that operator + // creation will fail. Use `mojom::ErrorPtr` to hold the given error + // message. + base::expected<void, mojom::ErrorPtr> create_operator_result; + switch (operation->kind) { + case Operator::Kind::kClamp: { + create_operator_result = CreateOperatorNodeForClamp( + id_to_operand_map, operation, graph_builder, id_to_node_output_map); + break; + } + case Operator::Kind::kConv2d: { + create_operator_result = CreateOperatorNodeForConv2d( + id_to_operand_map, operation, graph_builder, id_to_node_output_map); + break; + } + case Operator::Kind::kAdd: + case Operator::Kind::kDiv: + case Operator::Kind::kMax: + case Operator::Kind::kMin: + case Operator::Kind::kMul: + case Operator::Kind::kPow: + case Operator::Kind::kSub: { + create_operator_result = CreateOperatorNodeForBinary( + id_to_operand_map, operation, graph_builder, id_to_node_output_map); + break; + } + case Operator::Kind::kRelu: + case Operator::Kind::kSoftmax: { + create_operator_result = CreateOperatorNodeForUnary( + id_to_operand_map, operation, graph_builder, id_to_node_output_map); + break; + } + case Operator::Kind::kReshape: { + CreateNodeOutputForReshape(id_to_operand_map, operation, graph_builder, + id_to_node_output_map); + break; + } + case Operator::Kind::kGemm: { + create_operator_result = CreateOperatorNodeForGemm( + id_to_operand_map, operation, graph_builder, id_to_node_output_map); + break; + } + default: + DLOG(ERROR) << "This operator kind (" + OpKindToString(operation->kind) + + ") is not supported."; + create_operator_result = base::unexpected(mojom::Error::New( + mojom::Error::Code::kNotSupportedError, + "This operator (" + OpKindToString(operation->kind) + + ") is not supported.")); + } + return create_operator_result; +} + } // namespace GraphImpl::GraphBufferBindingInfo::GraphBufferBindingInfo() = default; @@ -1124,63 +1195,24 @@ } // Add operations. - for (auto& operation : graph_info->operators) { + for (auto& operation : graph_info->operations) { // For operators that deal with DML API, there is a chance that operator // creation will fail. Use `mojom::ErrorPtr` to hold the given error // message. base::expected<void, mojom::ErrorPtr> create_operator_result; - switch (operation->kind) { - case Operator::Kind::kClamp: { - create_operator_result = CreateOperatorNodeForClamp( - id_to_operand_map, operation, graph_builder, id_to_node_output_map); - break; - } - case Operator::Kind::kConv2d: { - create_operator_result = CreateOperatorNodeForConv2d( - id_to_operand_map, operation, graph_builder, id_to_node_output_map); - break; - } - case Operator::Kind::kAveragePool2d: - case Operator::Kind::kMaxPool2d: { + switch (operation->which()) { + case mojom::Operation::Tag::kPool2d: { create_operator_result = CreateOperatorNodeForPool2d( - id_to_operand_map, operation, graph_builder, id_to_node_output_map); + id_to_operand_map, operation->get_pool2d(), graph_builder, + id_to_node_output_map); break; } - case Operator::Kind::kAdd: - case Operator::Kind::kDiv: - case Operator::Kind::kMax: - case Operator::Kind::kMin: - case Operator::Kind::kMul: - case Operator::Kind::kPow: - case Operator::Kind::kSub: { - create_operator_result = CreateOperatorNodeForBinary( - id_to_operand_map, operation, graph_builder, id_to_node_output_map); + case mojom::Operation::Tag::kGenericOperator: { + create_operator_result = CreateGenericOperator( + id_to_operand_map, operation->get_generic_operator(), graph_builder, + id_to_node_output_map); break; } - case Operator::Kind::kRelu: - case Operator::Kind::kSoftmax: { - create_operator_result = CreateOperatorNodeForUnary( - id_to_operand_map, operation, graph_builder, id_to_node_output_map); - break; - } - case Operator::Kind::kReshape: { - CreateNodeOutputForReshape(id_to_operand_map, operation, graph_builder, - id_to_node_output_map); - break; - } - case Operator::Kind::kGemm: { - create_operator_result = CreateOperatorNodeForGemm( - id_to_operand_map, operation, graph_builder, id_to_node_output_map); - break; - } - default: - DLOG(ERROR) << "This operator kind (" + - OpKindToString(operation->kind) + - ") is not supported."; - create_operator_result = base::unexpected(mojom::Error::New( - mojom::Error::Code::kNotSupportedError, - "This operator (" + OpKindToString(operation->kind) + - ") is not supported.")); } if (!create_operator_result.has_value()) { std::move(callback).Run(mojom::CreateGraphResult::NewError(
diff --git a/services/webnn/dml/graph_impl_test.cc b/services/webnn/dml/graph_impl_test.cc index f19c97e..7064efd 100644 --- a/services/webnn/dml/graph_impl_test.cc +++ b/services/webnn/dml/graph_impl_test.cc
@@ -605,18 +605,19 @@ } } +struct Pool2dAttributes { + std::vector<uint32_t> window_dimensions; + std::vector<uint32_t> padding; + std::vector<uint32_t> strides; + std::vector<uint32_t> dilations; + mojom::InputOperandLayout layout; +}; + template <typename T> struct Pool2dTester { OperandInfo<T> input; - struct Pool2dAttributes { - std::vector<uint32_t> window_dimensions; - std::vector<uint32_t> padding; - std::vector<uint32_t> strides; - std::vector<uint32_t> dilations; - mojom::InputOperandLayout layout; - }; Pool2dAttributes attributes; - mojom::Operator::Kind kind; + mojom::Pool2d::Kind kind; OperandInfo<T> output; void Test() { @@ -626,24 +627,8 @@ builder.BuildInput("input", input.dimensions, input.type); uint64_t output_operand_id = builder.BuildOutput("output", output.dimensions, output.type); - mojom::Pool2dAttributesPtr mojo_attributes = mojom::Pool2dAttributes::New(); - mojo_attributes->window_dimensions = mojom::Size2d::New( - attributes.window_dimensions[0], attributes.window_dimensions[1]); - mojo_attributes->padding = mojom::Padding2d::New( - mojom::Size2d::New(attributes.padding[0], - attributes.padding[2]) /*beginning padding*/, - mojom::Size2d::New(attributes.padding[1], - attributes.padding[3]) /*ending padding*/); - mojo_attributes->strides = - mojom::Size2d::New(attributes.strides[0], attributes.strides[1]); - mojo_attributes->dilations = - mojom::Size2d::New(attributes.dilations[0], attributes.dilations[1]); - mojo_attributes->layout = attributes.layout; - mojom::OperatorAttributesPtr pool2d_attributes = - mojom::OperatorAttributes::NewPool2d(std::move(mojo_attributes)); - - builder.BuildOperator(kind, {input_operand_id}, {output_operand_id}, - std::move(pool2d_attributes)); + builder.BuildPool2d(kind, input_operand_id, output_operand_id, + std::move(attributes)); base::flat_map<std::string, mojo_base::BigBuffer> named_inputs; named_inputs.insert({"input", VectorToBigBuffer(input.values)}); @@ -674,7 +659,7 @@ .strides = {1, 1}, .dilations = {1, 1}, .layout = mojom::InputOperandLayout::kChannelsFirst}, - .kind = mojom::Operator::Kind::kAveragePool2d, + .kind = mojom::Pool2d::Kind::kAveragePool2d, .output = {.type = mojom::Operand::DataType::kFloat32, .dimensions = {1, 2, 2, 2}, .values = {3, 4, 6, 7, 12, 13, 15, 16}}} @@ -692,7 +677,7 @@ .strides = {1, 1}, .dilations = {1, 1}, .layout = mojom::InputOperandLayout::kChannelsLast}, - .kind = mojom::Operator::Kind::kAveragePool2d, + .kind = mojom::Pool2d::Kind::kAveragePool2d, .output = {.type = mojom::Operand::DataType::kFloat32, .dimensions = {1, 2, 2, 2}, .values = {3, 12, 4, 13, 6, 15, 7, 16}}} @@ -715,7 +700,7 @@ .strides = {1, 1}, .dilations = {1, 1}, .layout = mojom::InputOperandLayout::kChannelsFirst}, - .kind = mojom::Operator::Kind::kMaxPool2d, + .kind = mojom::Pool2d::Kind::kMaxPool2d, .output = {.type = mojom::Operand::DataType::kFloat32, .dimensions = {1, 2, 2, 2}, .values = {5, 6, 8, 9, 14, 15, 17, 18}}} @@ -1366,4 +1351,165 @@ std::vector<float>({30, 30, 70, 70})); } +// Test building a DML graph in the following topology. +// [input_a] [input_b] +// \ / +// add +// | +// relu +// | +// max pooling +TEST_F(WebNNGraphDMLImplTest, BuildMaxPooingAsThirdOperator) { + // DML_GEMM_OPERATOR_DESC support for 2 dimensions was introduced in + // DML_FEATURE_LEVEL_4_0. + SKIP_TEST_IF(!adapter_->IsDMLFeatureLevelSupported(DML_FEATURE_LEVEL_4_0)); + // Build the mojom graph info. + GraphInfoBuilder builder; + uint64_t input_a_operand_id = builder.BuildInput( + "input_a", {1, 1, 2, 2}, mojom::Operand::DataType::kFloat32); + uint64_t input_b_operand_id = builder.BuildInput( + "input_b", {1, 1, 2, 2}, mojom::Operand::DataType::kFloat32); + uint64_t intermediate_1_operand_id = builder.BuildIntermediateOperand( + {1, 1, 2, 2}, mojom::Operand::DataType::kFloat32); + builder.BuildOperator(mojom::Operator::Kind::kAdd, + {input_a_operand_id, input_b_operand_id}, + {intermediate_1_operand_id}); + + // Relu. + uint64_t intermediate_2_operand_id = builder.BuildIntermediateOperand( + {1, 1, 2, 2}, mojom::Operand::DataType::kFloat32); + builder.BuildOperator(mojom::Operator::Kind::kRelu, + {intermediate_1_operand_id}, + {intermediate_2_operand_id}); + + // Max pooling. + uint64_t output_operand_id = builder.BuildOutput( + "output", {1, 1, 2, 2}, mojom::Operand::DataType::kFloat32); + builder.BuildPool2d( + mojom::Pool2d::Kind::kMaxPool2d, intermediate_2_operand_id, + output_operand_id, + Pool2dAttributes{.window_dimensions = {1, 1}, + .padding = {0, 0, 0, 0}, + .strides = {1, 1}, + .dilations = {1, 1}, + .layout = mojom::InputOperandLayout::kChannelsFirst}); + + base::flat_map<std::string, mojo_base::BigBuffer> named_inputs; + std::vector<float> input_data = {1, 1, 1, 1}; + named_inputs.insert({"input_a", VectorToBigBuffer(input_data)}); + named_inputs.insert({"input_b", VectorToBigBuffer(input_data)}); + base::flat_map<std::string, mojo_base::BigBuffer> named_outputs; + BuildAndCompute(builder.CloneGraphInfo(), std::move(named_inputs), + named_outputs); + EXPECT_EQ(BigBufferToVector<float>(std::move(named_outputs["output"])), + std::vector<float>({2, 2, 2, 2})); +} + +// Test building a DML graph in the following topology. +// [input_a] [input_b] +// \ / +// add +// | +// max pooling +// | +// relu +TEST_F(WebNNGraphDMLImplTest, BuildMaxPooingAsSecondOperator) { + // DML_GEMM_OPERATOR_DESC support for 2 dimensions was introduced in + // DML_FEATURE_LEVEL_4_0. + SKIP_TEST_IF(!adapter_->IsDMLFeatureLevelSupported(DML_FEATURE_LEVEL_4_0)); + // Build the mojom graph info. + GraphInfoBuilder builder; + uint64_t input_a_operand_id = builder.BuildInput( + "input_a", {1, 1, 2, 2}, mojom::Operand::DataType::kFloat32); + uint64_t input_b_operand_id = builder.BuildInput( + "input_b", {1, 1, 2, 2}, mojom::Operand::DataType::kFloat32); + uint64_t intermediate_1_operand_id = builder.BuildIntermediateOperand( + {1, 1, 2, 2}, mojom::Operand::DataType::kFloat32); + builder.BuildOperator(mojom::Operator::Kind::kAdd, + {input_a_operand_id, input_b_operand_id}, + {intermediate_1_operand_id}); + + // Max pooling. + uint64_t intermediate_2_operand_id = builder.BuildIntermediateOperand( + {1, 1, 2, 2}, mojom::Operand::DataType::kFloat32); + builder.BuildPool2d( + mojom::Pool2d::Kind::kMaxPool2d, intermediate_1_operand_id, + intermediate_2_operand_id, + Pool2dAttributes{.window_dimensions = {1, 1}, + .padding = {0, 0, 0, 0}, + .strides = {1, 1}, + .dilations = {1, 1}, + .layout = mojom::InputOperandLayout::kChannelsFirst}); + + // Relu. + uint64_t output_operand_id = builder.BuildOutput( + "output", {1, 1, 2, 2}, mojom::Operand::DataType::kFloat32); + builder.BuildOperator(mojom::Operator::Kind::kRelu, + {intermediate_2_operand_id}, {output_operand_id}); + + base::flat_map<std::string, mojo_base::BigBuffer> named_inputs; + std::vector<float> input_data = {1, 1, 1, 1}; + named_inputs.insert({"input_a", VectorToBigBuffer(input_data)}); + named_inputs.insert({"input_b", VectorToBigBuffer(input_data)}); + base::flat_map<std::string, mojo_base::BigBuffer> named_outputs; + BuildAndCompute(builder.CloneGraphInfo(), std::move(named_inputs), + named_outputs); + EXPECT_EQ(BigBufferToVector<float>(std::move(named_outputs["output"])), + std::vector<float>({2, 2, 2, 2})); +} + +// Test building a DML graph in the following topology. +// [input_a] +// | +// max pooling +// [input_b] +// \ / +// add +// | +// relu +TEST_F(WebNNGraphDMLImplTest, BuildMaxPooingAsFirstOperator) { + // DML_GEMM_OPERATOR_DESC support for 2 dimensions was introduced in + // DML_FEATURE_LEVEL_4_0. + SKIP_TEST_IF(!adapter_->IsDMLFeatureLevelSupported(DML_FEATURE_LEVEL_4_0)); + // Build the mojom graph info. + GraphInfoBuilder builder; + uint64_t input_a_operand_id = builder.BuildInput( + "input_a", {1, 1, 2, 2}, mojom::Operand::DataType::kFloat32); + uint64_t intermediate_1_operand_id = builder.BuildIntermediateOperand( + {1, 1, 2, 2}, mojom::Operand::DataType::kFloat32); + builder.BuildPool2d( + mojom::Pool2d::Kind::kMaxPool2d, input_a_operand_id, + intermediate_1_operand_id, + Pool2dAttributes{.window_dimensions = {1, 1}, + .padding = {0, 0, 0, 0}, + .strides = {1, 1}, + .dilations = {1, 1}, + .layout = mojom::InputOperandLayout::kChannelsFirst}); + + // Add operation. + uint64_t input_b_operand_id = builder.BuildInput( + "input_b", {1, 1, 2, 2}, mojom::Operand::DataType::kFloat32); + uint64_t intermediate_2_operand_id = builder.BuildIntermediateOperand( + {1, 1, 2, 2}, mojom::Operand::DataType::kFloat32); + builder.BuildOperator(mojom::Operator::Kind::kAdd, + {intermediate_1_operand_id, input_b_operand_id}, + {intermediate_2_operand_id}); + + // Relu. + uint64_t output_operand_id = builder.BuildOutput( + "output", {1, 1, 2, 2}, mojom::Operand::DataType::kFloat32); + builder.BuildOperator(mojom::Operator::Kind::kRelu, + {intermediate_2_operand_id}, {output_operand_id}); + + base::flat_map<std::string, mojo_base::BigBuffer> named_inputs; + std::vector<float> input_data = {1, 1, 1, 1}; + named_inputs.insert({"input_a", VectorToBigBuffer(input_data)}); + named_inputs.insert({"input_b", VectorToBigBuffer(input_data)}); + base::flat_map<std::string, mojo_base::BigBuffer> named_outputs; + BuildAndCompute(builder.CloneGraphInfo(), std::move(named_inputs), + named_outputs); + EXPECT_EQ(BigBufferToVector<float>(std::move(named_outputs["output"])), + std::vector<float>({2, 2, 2, 2})); +} + } // namespace webnn::dml
diff --git a/services/webnn/public/mojom/webnn_graph.mojom b/services/webnn/public/mojom/webnn_graph.mojom index 6ae28bf..c3baefa 100644 --- a/services/webnn/public/mojom/webnn_graph.mojom +++ b/services/webnn/public/mojom/webnn_graph.mojom
@@ -85,11 +85,26 @@ Operator? activation; }; -// Contains the attributes of pool2d operator. -// The `roundingType` and `outputSizes` array in MLPool2dOptions are not -// included because they are used to calculate the output dimensions of poo2d in -// blink side. -struct Pool2dAttributes { +// Represents an average or max pooling operation across all the elements with +// moving window over the input tensor. +// This struct also contains the attributes of pool2d operator, but the +// `roundingType` and `outputSizes` array in MLPool2dOptions are not included +// because they are used to calculate the output dimensions of pool2d in blink +// side. +struct Pool2d { + enum Kind { + kAveragePool2d, + kMaxPool2d, + }; + + Kind kind; + // The id of input operand is used to get the `Operand` description from + // `GraphInfo.id_to_operand_map`. + uint64 input_operand_id; + // The id of output operand is used to get the `Operand` description from + // `GraphInfo.id_to_operand_map`. + uint64 output_operand_id; + // The dimensions of the sliding window which is supplied by user or the // element of input operand height and width. Size2d window_dimensions; @@ -125,7 +140,6 @@ ClampAttributes clamp; Conv2dAttributes conv2d; GemmAttributes gemm; - Pool2dAttributes pool2d; }; // Represents the operations defined in `MLGraphBuilder` that describes the @@ -143,8 +157,6 @@ kMin, kPow, kGemm, - kAveragePool2d, - kMaxPool2d, kRelu, kReshape, kSoftmax, @@ -162,18 +174,26 @@ OperatorAttributes? attributes; }; +// Holds one of operator. +union Operation { + Pool2d pool2d; + + // TODO(crbug.com/1273291): The `generic_operator` will be removed. + Operator generic_operator; +}; + // Describes an entire WebNN graph information. struct GraphInfo { // A map of all operands used in this `GraphInfo`, the key is the operand id. map<uint64, Operand> id_to_operand_map; - // The id array from the `GraphInfo.operands` is used to identify the input - // operands of this graph. + // The id array from the `GraphInfo.id_to_operand_map` is used to identify the + // input operands of this graph. array<uint64> input_operands; - // The id array from the `GraphInfo.operands` is used to identify the output - // operands of this graph. + // The id array from the `GraphInfo.id_to_operand_map` is used to identify the + // output operands of this graph. array<uint64> output_operands; - // The operators are sorted in the topological order. - array<Operator> operators; + // The operations are sorted in the topological order. + array<Operation> operations; // The constant weight data specified through the MLGraphBuilder.constant() // method defined in the WebIDL, the key is the constant operand id. map<uint64, mojo_base.mojom.BigBuffer> constant_id_to_buffer_map;
diff --git a/services/webnn/webnn_graph_impl.cc b/services/webnn/webnn_graph_impl.cc index b7aba99..5251473 100644 --- a/services/webnn/webnn_graph_impl.cc +++ b/services/webnn/webnn_graph_impl.cc
@@ -172,41 +172,26 @@ return component_attributes; } -absl::optional<webnn::Pool2dAttributes> ConvertToPool2dAttributes( - const webnn::mojom::OperatorAttributesPtr& attributes, +webnn::Pool2dAttributes ConvertToPool2dAttributes( + const webnn::mojom::Pool2dPtr& pool2d, const mojom::Operand* output) { - if (!attributes->is_pool2d()) { - // The type of attribute is not pool2d. - return absl::nullopt; - } - auto& mojo_attributes = attributes->get_pool2d(); - if (!mojo_attributes) { - // The attributes of pool2d were not configured. - return absl::nullopt; - } - if (output->dimensions.size() != 4) { - // The element of output dimensions should be 4. - return absl::nullopt; - } - webnn::Pool2dAttributes component_attributes; - auto& window_dimensions = mojo_attributes->window_dimensions; + auto& window_dimensions = pool2d->window_dimensions; component_attributes.window_dimensions = webnn::Size2d{ .height = window_dimensions->height, .width = window_dimensions->width}; - auto& mojo_padding = mojo_attributes->padding; + auto& mojo_padding = pool2d->padding; component_attributes.padding = webnn::Padding2d{ .beginning = webnn::Size2d{.height = mojo_padding->beginning->height, .width = mojo_padding->beginning->width}, .ending = webnn::Size2d{.height = mojo_padding->ending->height, .width = mojo_padding->ending->width}}; - component_attributes.strides = - webnn::Size2d{.height = mojo_attributes->strides->height, - .width = mojo_attributes->strides->width}; - component_attributes.dilations = - webnn::Size2d{.height = mojo_attributes->dilations->height, - .width = mojo_attributes->dilations->width}; + component_attributes.strides = webnn::Size2d{ + .height = pool2d->strides->height, .width = pool2d->strides->width}; + component_attributes.dilations = webnn::Size2d{ + .height = pool2d->dilations->height, .width = pool2d->dilations->width}; component_attributes.layout = - MojoInputOperandLayoutToComponent(mojo_attributes->layout); + MojoInputOperandLayoutToComponent(pool2d->layout); + CHECK_EQ(output->dimensions.size(), 4u); switch (component_attributes.layout) { case webnn::InputOperandLayout::kNchw: component_attributes.output_sizes = webnn::Size2d{ @@ -250,6 +235,7 @@ return component_attributes; } +// TODO(crbug.com/1273291): This function will replaced by `operation` const mojom::Operand* GetMojoOperand( const IdToOperandMap& id_to_operand_map, const std::vector<uint64_t>& operand_id_array, @@ -266,6 +252,16 @@ return id_to_operand_map.at(operand_id).get(); } +const mojom::Operand* GetMojoOperand(const IdToOperandMap& id_to_operand_map, + uint64_t operand_id) { + const auto operand_iterator = id_to_operand_map.find(operand_id); + if (operand_iterator == id_to_operand_map.end()) { + // There is no operand for the id. + return nullptr; + } + return operand_iterator->second.get(); +} + bool ValidateClamp(const IdToOperandMap& id_to_operand_map, const mojom::OperatorPtr& operation) { auto* input = GetMojoOperand(id_to_operand_map, operation->input_operands); @@ -374,21 +370,21 @@ } bool ValidatePool2d(const IdToOperandMap& id_to_operand_map, - const mojom::OperatorPtr& operation) { - auto* input = GetMojoOperand(id_to_operand_map, operation->input_operands); - auto* output = GetMojoOperand(id_to_operand_map, operation->output_operands); - if (!input || !output || !operation->attributes) { + const mojom::Pool2dPtr& pool2d) { + auto* input = GetMojoOperand(id_to_operand_map, pool2d->input_operand_id); + auto* output = GetMojoOperand(id_to_operand_map, pool2d->output_operand_id); + if (!input || !output) { // The pool2d operator is invalid. return false; } - auto component_attributes = - ConvertToPool2dAttributes(operation->attributes, output); - if (!component_attributes) { - // Failed to convert the attributes of pool2d. + + if (output->dimensions.size() != 4) { + // The element of output dimensions should be 4. return false; } - auto validated_output = ValidatePool2dAndInferOutput( - ConvertToComponentOperand(input), component_attributes.value()); + auto validated_output = + ValidatePool2dAndInferOutput(ConvertToComponentOperand(input), + ConvertToPool2dAttributes(pool2d, output)); if (!validated_output.has_value()) { return false; } @@ -467,8 +463,8 @@ return true; } -bool ValidateOperator(const IdToOperandMap& id_to_operand_map, - const mojom::OperatorPtr& operation) { +bool ValidateGenericOperator(const IdToOperandMap& id_to_operand_map, + const mojom::OperatorPtr& operation) { switch (operation->kind) { case mojom::Operator::Kind::kClamp: return ValidateClamp(id_to_operand_map, operation); @@ -484,9 +480,6 @@ return ValidateElementWiseBinary(id_to_operand_map, operation); case mojom::Operator::Kind::kGemm: return ValidateGemm(id_to_operand_map, operation); - case mojom::Operator::Kind::kAveragePool2d: - case mojom::Operator::Kind::kMaxPool2d: - return ValidatePool2d(id_to_operand_map, operation); case mojom::Operator::Kind::kRelu: return ValidateRelu(id_to_operand_map, operation); case mojom::Operator::Kind::kReshape: @@ -517,6 +510,18 @@ return name_to_byte_length_map; } +bool ValidateOperation(const IdToOperandMap& id_to_operand_map, + const mojom::OperationPtr& operation) { + switch (operation->which()) { + case mojom::Operation::Tag::kPool2d: + return ValidatePool2d(id_to_operand_map, operation->get_pool2d()); + case mojom::Operation::Tag::kGenericOperator: + return ValidateGenericOperator(id_to_operand_map, + operation->get_generic_operator()); + } + NOTREACHED_NORETURN(); +} + } // namespace WebNNGraphImpl::ComputeResourceInfo::ComputeResourceInfo( @@ -541,7 +546,7 @@ bool WebNNGraphImpl::ValidateGraph(const mojom::GraphInfoPtr& graph_info) { // The input operands of graph can be empty. - if (graph_info->id_to_operand_map.empty() || graph_info->operators.empty() || + if (graph_info->id_to_operand_map.empty() || graph_info->operations.empty() || graph_info->output_operands.empty()) { return false; } @@ -619,9 +624,9 @@ return false; } - // Validate the operators which are sorted in the topological order. - for (auto& operation : graph_info->operators) { - if (!ValidateOperator(graph_info->id_to_operand_map, operation)) { + // Validate the operations which are sorted in the topological order. + for (auto& operation : graph_info->operations) { + if (!ValidateOperation(graph_info->id_to_operand_map, operation)) { return false; } }
diff --git a/services/webnn/webnn_graph_impl_unittest.cc b/services/webnn/webnn_graph_impl_unittest.cc index df96dfd..0888b3e2b 100644 --- a/services/webnn/webnn_graph_impl_unittest.cc +++ b/services/webnn/webnn_graph_impl_unittest.cc
@@ -804,35 +804,19 @@ bool expected; void Test() { - Test(mojom::Operator::Kind::kAveragePool2d); - Test(mojom::Operator::Kind::kMaxPool2d); + Test(mojom::Pool2d::Kind::kAveragePool2d); + Test(mojom::Pool2d::Kind::kMaxPool2d); } - void Test(mojom::Operator::Kind kind) { + void Test(mojom::Pool2d::Kind kind) { // Build the graph with mojo type. GraphInfoBuilder builder; uint64_t input_operand_id = builder.BuildInput("input", input.dimensions, input.type); uint64_t output_operand_id = builder.BuildOutput("output", output.dimensions, output.type); - mojom::Pool2dAttributesPtr mojo_attributes = mojom::Pool2dAttributes::New(); - auto& window_dimensions = attributes.window_dimensions; - CHECK_EQ(window_dimensions.size(), 2u); - mojo_attributes->window_dimensions = - mojom::Size2d::New(window_dimensions[0], window_dimensions[1]); - mojo_attributes->padding = mojom::Padding2d::New( - mojom::Size2d::New(attributes.padding[0], - attributes.padding[2]) /* beginning padding*/, - mojom::Size2d::New(attributes.padding[1], - attributes.padding[3]) /* ending padding*/); - mojo_attributes->strides = - mojom::Size2d::New(attributes.strides[0], attributes.strides[1]); - mojo_attributes->dilations = - mojom::Size2d::New(attributes.dilations[0], attributes.dilations[1]); - mojo_attributes->layout = attributes.layout; - builder.BuildOperator( - kind, {input_operand_id}, {output_operand_id}, - mojom::OperatorAttributes::NewPool2d(std::move(mojo_attributes))); + builder.BuildPool2d(kind, input_operand_id, output_operand_id, + std::move(attributes)); EXPECT_EQ(WebNNGraphImpl::ValidateGraph(builder.GetGraphInfo()), expected); } };
diff --git a/services/webnn/webnn_test_utils.cc b/services/webnn/webnn_test_utils.cc index 457b017..e407629 100644 --- a/services/webnn/webnn_test_utils.cc +++ b/services/webnn/webnn_test_utils.cc
@@ -73,7 +73,8 @@ operation->input_operands = inputs; operation->output_operands = outputs; operation->attributes = std::move(operator_attributes); - graph_info_->operators.push_back(std::move(operation)); + graph_info_->operations.push_back( + mojom::Operation::NewGenericOperator(std::move(operation))); } mojom::GraphInfoPtr GraphInfoBuilder::CloneGraphInfo() const { @@ -84,9 +85,9 @@ } cloned_graph_info->input_operands = graph_info_->input_operands; cloned_graph_info->output_operands = graph_info_->output_operands; - cloned_graph_info->operators.reserve(graph_info_->operators.size()); - for (auto& operation : graph_info_->operators) { - cloned_graph_info->operators.push_back(operation.Clone()); + cloned_graph_info->operations.reserve(graph_info_->operations.size()); + for (auto& operation : graph_info_->operations) { + cloned_graph_info->operations.push_back(operation.Clone()); } for (auto& [constant_id, constant_buffer] : graph_info_->constant_id_to_buffer_map) {
diff --git a/services/webnn/webnn_test_utils.h b/services/webnn/webnn_test_utils.h index 5da93b1..1f757aef 100644 --- a/services/webnn/webnn_test_utils.h +++ b/services/webnn/webnn_test_utils.h
@@ -45,6 +45,36 @@ const std::vector<uint64_t>& outputs, mojom::OperatorAttributesPtr operator_attributes = nullptr); + // The generic type `T` is the pool2d attributes from different unit test. + template <typename T> + void BuildPool2d(mojom::Pool2d::Kind kind, + uint64_t input_operand_id, + uint64_t output_operand_id, + const T& attributes) { + mojom::Pool2dPtr pool2d = mojom::Pool2d::New(); + pool2d->kind = kind; + pool2d->input_operand_id = input_operand_id; + pool2d->output_operand_id = output_operand_id; + + auto& window_dimensions = attributes.window_dimensions; + CHECK_EQ(window_dimensions.size(), 2u); + pool2d->window_dimensions = + mojom::Size2d::New(window_dimensions[0], window_dimensions[1]); + pool2d->padding = mojom::Padding2d::New( + mojom::Size2d::New(attributes.padding[0], + attributes.padding[2]) /* beginning padding*/, + mojom::Size2d::New(attributes.padding[1], + attributes.padding[3]) /* ending padding*/); + pool2d->strides = + mojom::Size2d::New(attributes.strides[0], attributes.strides[1]); + pool2d->dilations = + mojom::Size2d::New(attributes.dilations[0], attributes.dilations[1]); + pool2d->layout = attributes.layout; + + graph_info_->operations.push_back( + mojom::Operation::NewPool2d(std::move(pool2d))); + } + const mojom::GraphInfoPtr& GetGraphInfo() const { return graph_info_; } // Get a clone of internal graph info. This is used by
diff --git a/testing/buildbot/chrome.json b/testing/buildbot/chrome.json index 4da613a..e458fbd 100644 --- a/testing/buildbot/chrome.json +++ b/testing/buildbot/chrome.json
@@ -1178,7 +1178,6 @@ "autotest_name": "tast.chrome-from-gcs", "cros_board": "brya", "cros_img": "brya-release/R119-15622.0.0", - "dut_pool": "chrome", "name": "chrome_all_tast_tests BRYA_RELEASE_LKGM", "shards": 10, "tast_expr": "STUB_STRING_TO_RUN_TAST_TESTS", @@ -1192,7 +1191,6 @@ "autotest_name": "tast.chrome-from-gcs", "cros_board": "brya", "cros_img": "brya-release/R119-15622.0.0", - "dut_pool": "chrome", "experiment_percentage": 100, "name": "chrome_criticalstaging_tast_tests BRYA_RELEASE_LKGM", "shards": 3, @@ -1207,7 +1205,6 @@ "autotest_name": "tast.chrome-from-gcs", "cros_board": "brya", "cros_img": "brya-release/R119-15622.0.0", - "dut_pool": "chrome", "experiment_percentage": 100, "name": "chrome_disabled_tast_tests BRYA_RELEASE_LKGM", "shards": 2, @@ -1570,7 +1567,6 @@ "autotest_name": "tast.chrome-from-gcs", "cros_board": "volteer", "cros_img": "volteer-release/R119-15623.0.0", - "dut_pool": "chrome", "name": "chrome_all_tast_tests VOLTEER_RELEASE_LKGM", "shards": 10, "tast_expr": "STUB_STRING_TO_RUN_TAST_TESTS", @@ -1584,7 +1580,6 @@ "autotest_name": "tast.chrome-from-gcs", "cros_board": "volteer", "cros_img": "volteer-release/R119-15623.0.0", - "dut_pool": "chrome", "experiment_percentage": 100, "name": "chrome_criticalstaging_tast_tests VOLTEER_RELEASE_LKGM", "shards": 3, @@ -1599,7 +1594,6 @@ "autotest_name": "tast.chrome-from-gcs", "cros_board": "volteer", "cros_img": "volteer-release/R119-15623.0.0", - "dut_pool": "chrome", "experiment_percentage": 100, "name": "chrome_disabled_tast_tests VOLTEER_RELEASE_LKGM", "shards": 2,
diff --git a/testing/buildbot/chromium.chromiumos.json b/testing/buildbot/chromium.chromiumos.json index d52cc0ee..8c1f828e 100644 --- a/testing/buildbot/chromium.chromiumos.json +++ b/testing/buildbot/chromium.chromiumos.json
@@ -5038,9 +5038,9 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6030.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6031.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 119.0.6030.0", + "description": "Run with ash-chrome version 119.0.6031.0", "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -5050,8 +5050,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v119.0.6030.0", - "revision": "version:119.0.6030.0" + "location": "lacros_version_skew_tests_v119.0.6031.0", + "revision": "version:119.0.6031.0" } ], "dimensions": { @@ -5186,9 +5186,9 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6030.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6031.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 119.0.6030.0", + "description": "Run with ash-chrome version 119.0.6031.0", "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -5198,8 +5198,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v119.0.6030.0", - "revision": "version:119.0.6030.0" + "location": "lacros_version_skew_tests_v119.0.6031.0", + "revision": "version:119.0.6031.0" } ], "dimensions": { @@ -5318,9 +5318,9 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6030.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6031.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 119.0.6030.0", + "description": "Run with ash-chrome version 119.0.6031.0", "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -5330,8 +5330,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v119.0.6030.0", - "revision": "version:119.0.6030.0" + "location": "lacros_version_skew_tests_v119.0.6031.0", + "revision": "version:119.0.6031.0" } ], "dimensions": {
diff --git a/testing/buildbot/chromium.coverage.json b/testing/buildbot/chromium.coverage.json index b7d94d05..95521d8 100644 --- a/testing/buildbot/chromium.coverage.json +++ b/testing/buildbot/chromium.coverage.json
@@ -25384,9 +25384,9 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6030.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6031.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 119.0.6030.0", + "description": "Run with ash-chrome version 119.0.6031.0", "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -25396,8 +25396,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v119.0.6030.0", - "revision": "version:119.0.6030.0" + "location": "lacros_version_skew_tests_v119.0.6031.0", + "revision": "version:119.0.6031.0" } ], "dimensions": { @@ -25532,9 +25532,9 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6030.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6031.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 119.0.6030.0", + "description": "Run with ash-chrome version 119.0.6031.0", "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -25544,8 +25544,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v119.0.6030.0", - "revision": "version:119.0.6030.0" + "location": "lacros_version_skew_tests_v119.0.6031.0", + "revision": "version:119.0.6031.0" } ], "dimensions": { @@ -25664,9 +25664,9 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6030.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6031.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 119.0.6030.0", + "description": "Run with ash-chrome version 119.0.6031.0", "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -25676,8 +25676,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v119.0.6030.0", - "revision": "version:119.0.6030.0" + "location": "lacros_version_skew_tests_v119.0.6031.0", + "revision": "version:119.0.6031.0" } ], "dimensions": {
diff --git a/testing/buildbot/chromium.fyi.json b/testing/buildbot/chromium.fyi.json index 8e85a1a..a026fab 100644 --- a/testing/buildbot/chromium.fyi.json +++ b/testing/buildbot/chromium.fyi.json
@@ -43455,9 +43455,9 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6030.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6031.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 119.0.6030.0", + "description": "Run with ash-chrome version 119.0.6031.0", "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, @@ -43466,8 +43466,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v119.0.6030.0", - "revision": "version:119.0.6030.0" + "location": "lacros_version_skew_tests_v119.0.6031.0", + "revision": "version:119.0.6031.0" } ], "dimensions": { @@ -43603,9 +43603,9 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6030.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6031.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 119.0.6030.0", + "description": "Run with ash-chrome version 119.0.6031.0", "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, @@ -43614,8 +43614,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v119.0.6030.0", - "revision": "version:119.0.6030.0" + "location": "lacros_version_skew_tests_v119.0.6031.0", + "revision": "version:119.0.6031.0" } ], "dimensions": { @@ -43735,9 +43735,9 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6030.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6031.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 119.0.6030.0", + "description": "Run with ash-chrome version 119.0.6031.0", "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, @@ -43746,8 +43746,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v119.0.6030.0", - "revision": "version:119.0.6030.0" + "location": "lacros_version_skew_tests_v119.0.6031.0", + "revision": "version:119.0.6031.0" } ], "dimensions": { @@ -45059,9 +45059,9 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6030.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6031.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 119.0.6030.0", + "description": "Run with ash-chrome version 119.0.6031.0", "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, @@ -45070,8 +45070,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v119.0.6030.0", - "revision": "version:119.0.6030.0" + "location": "lacros_version_skew_tests_v119.0.6031.0", + "revision": "version:119.0.6031.0" } ], "dimensions": { @@ -45207,9 +45207,9 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6030.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6031.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 119.0.6030.0", + "description": "Run with ash-chrome version 119.0.6031.0", "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, @@ -45218,8 +45218,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v119.0.6030.0", - "revision": "version:119.0.6030.0" + "location": "lacros_version_skew_tests_v119.0.6031.0", + "revision": "version:119.0.6031.0" } ], "dimensions": { @@ -45339,9 +45339,9 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6030.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6031.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 119.0.6030.0", + "description": "Run with ash-chrome version 119.0.6031.0", "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, @@ -45350,8 +45350,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v119.0.6030.0", - "revision": "version:119.0.6030.0" + "location": "lacros_version_skew_tests_v119.0.6031.0", + "revision": "version:119.0.6031.0" } ], "dimensions": { @@ -46049,9 +46049,9 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6030.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6031.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 119.0.6030.0", + "description": "Run with ash-chrome version 119.0.6031.0", "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, @@ -46060,8 +46060,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v119.0.6030.0", - "revision": "version:119.0.6030.0" + "location": "lacros_version_skew_tests_v119.0.6031.0", + "revision": "version:119.0.6031.0" } ], "dimensions": {
diff --git a/testing/buildbot/chromium.memory.json b/testing/buildbot/chromium.memory.json index e77dddf..33f09d3 100644 --- a/testing/buildbot/chromium.memory.json +++ b/testing/buildbot/chromium.memory.json
@@ -16364,12 +16364,12 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6030.0/test_ash_chrome", + "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6031.0/test_ash_chrome", "--test-launcher-print-test-stdio=always", "--combine-ash-logs-on-bots", "--asan-symbolize-output" ], - "description": "Run with ash-chrome version 119.0.6030.0", + "description": "Run with ash-chrome version 119.0.6031.0", "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -16379,8 +16379,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v119.0.6030.0", - "revision": "version:119.0.6030.0" + "location": "lacros_version_skew_tests_v119.0.6031.0", + "revision": "version:119.0.6031.0" } ], "dimensions": { @@ -16532,12 +16532,12 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6030.0/test_ash_chrome", + "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6031.0/test_ash_chrome", "--test-launcher-print-test-stdio=always", "--combine-ash-logs-on-bots", "--asan-symbolize-output" ], - "description": "Run with ash-chrome version 119.0.6030.0", + "description": "Run with ash-chrome version 119.0.6031.0", "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -16547,8 +16547,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v119.0.6030.0", - "revision": "version:119.0.6030.0" + "location": "lacros_version_skew_tests_v119.0.6031.0", + "revision": "version:119.0.6031.0" } ], "dimensions": { @@ -16679,12 +16679,12 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6030.0/test_ash_chrome", + "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6031.0/test_ash_chrome", "--test-launcher-print-test-stdio=always", "--combine-ash-logs-on-bots", "--asan-symbolize-output" ], - "description": "Run with ash-chrome version 119.0.6030.0", + "description": "Run with ash-chrome version 119.0.6031.0", "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -16694,8 +16694,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v119.0.6030.0", - "revision": "version:119.0.6030.0" + "location": "lacros_version_skew_tests_v119.0.6031.0", + "revision": "version:119.0.6031.0" } ], "dimensions": {
diff --git a/testing/buildbot/internal.chromeos.fyi.json b/testing/buildbot/internal.chromeos.fyi.json index fe1a64e..768d37e8 100644 --- a/testing/buildbot/internal.chromeos.fyi.json +++ b/testing/buildbot/internal.chromeos.fyi.json
@@ -1119,7 +1119,6 @@ "autotest_name": "tast.chrome-from-gcs", "cros_board": "brya", "cros_img": "brya-release/R119-15622.0.0", - "dut_pool": "chrome", "name": "chrome_all_tast_tests BRYA_RELEASE_LKGM", "shards": 10, "tast_expr": "STUB_STRING_TO_RUN_TAST_TESTS", @@ -1133,7 +1132,6 @@ "autotest_name": "tast.chrome-from-gcs", "cros_board": "brya", "cros_img": "brya-release/R119-15622.0.0", - "dut_pool": "chrome", "experiment_percentage": 100, "name": "chrome_criticalstaging_tast_tests BRYA_RELEASE_LKGM", "shards": 3, @@ -1148,7 +1146,6 @@ "autotest_name": "tast.chrome-from-gcs", "cros_board": "brya", "cros_img": "brya-release/R119-15622.0.0", - "dut_pool": "chrome", "experiment_percentage": 100, "name": "chrome_disabled_tast_tests BRYA_RELEASE_LKGM", "shards": 2,
diff --git a/testing/buildbot/variants.pyl b/testing/buildbot/variants.pyl index 849417e..e0c5372 100644 --- a/testing/buildbot/variants.pyl +++ b/testing/buildbot/variants.pyl
@@ -70,16 +70,16 @@ }, 'LACROS_VERSION_SKEW_CANARY': { 'identifier': 'Lacros version skew testing ash canary', - 'description': 'Run with ash-chrome version 119.0.6030.0', + 'description': 'Run with ash-chrome version 119.0.6031.0', 'args': [ - '--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6030.0/test_ash_chrome', + '--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6031.0/test_ash_chrome', ], 'swarming': { 'cipd_packages': [ { 'cipd_package': 'chromium/testing/linux-ash-chromium/x86_64/ash.zip', - 'location': 'lacros_version_skew_tests_v119.0.6030.0', - 'revision': 'version:119.0.6030.0', + 'location': 'lacros_version_skew_tests_v119.0.6031.0', + 'revision': 'version:119.0.6031.0', }, ], }, @@ -434,7 +434,6 @@ 'cros_board': 'brya', 'cros_img': 'brya-release/R119-15622.0.0', 'autotest_name': 'tast.chrome-from-gcs', - 'dut_pool': 'chrome', }, }, 'CROS_BRYA_RELEASE_LKGM': { @@ -799,7 +798,6 @@ 'cros_board': 'volteer', 'cros_img': 'volteer-release/R119-15623.0.0', 'autotest_name': 'tast.chrome-from-gcs', - 'dut_pool': 'chrome', }, }, 'LACROS_AMD64_GENERIC': {
diff --git a/testing/iossim/iossim.mm b/testing/iossim/iossim.mm index 03814ec3..21d8747 100644 --- a/testing/iossim/iossim.mm +++ b/testing/iossim/iossim.mm
@@ -29,7 +29,8 @@ " -c Specifies command line flags to pass to application.\n" " -p Print the device's home directory, does not run a test.\n" " -s Specifies the SDK version to use (e.g '9.3'). Will use system " - "default if not specified.\n"); + "default if not specified.\n" + " -v Be more verbose, showing all the xcrun commands we call\n"); } // Exit status codes. @@ -59,7 +60,8 @@ // Wrap boiler plate calls to xcrun NSTasks. @interface XCRunTask : NSObject - (instancetype)initWithArguments:(NSArray*)arguments; -- (void)run; +- (void)run:(bool)verbose; +- (void)launch:(bool)verbose; - (void)setStandardOutput:(id)output; - (void)setStandardError:(id)error; - (int)terminationStatus; @@ -92,12 +94,18 @@ return _task.terminationStatus; } -- (void)run { +- (void)run:(bool)verbose { + if (verbose) { + NSLog(@"Running xcrun %@", [_task.arguments componentsJoinedByString:@" "]); + } [_task launch]; [_task waitUntilExit]; } -- (void)launch { +- (void)launch:(bool)verbose { + if (verbose) { + NSLog(@"Running xcrun %@", [_task.arguments componentsJoinedByString:@" "]); + } [_task launch]; } @@ -140,7 +148,7 @@ } // Get list of devices, runtimes, etc from sim_ctl. -NSDictionary* GetSimulatorList() { +NSDictionary* GetSimulatorList(bool verbose) { XCRunTask* task = [[XCRunTask alloc] initWithArguments:@[ @"simctl", @"list", @"-j" ]]; NSPipe* out = [NSPipe pipe]; @@ -151,7 +159,7 @@ // on some swarming slaves this led to a hang on simctl's pipe. Since the // output of simctl is so instant, reading it before exit seems to work, and // seems to avoid the hang. - [task launch]; + [task launch:verbose]; NSData* data = [out.fileHandleForReading readDataToEndOfFile]; [task waitUntilExit]; @@ -228,13 +236,15 @@ } // Create and return a device udid of |device| and |sdk_version|. -NSString* CreateDeviceBySDKAndName(NSString* device, NSString* sdk_version) { +NSString* CreateDeviceBySDKAndName(NSString* device, + NSString* sdk_version, + bool verbose) { NSString* sdk = [@"iOS" stringByAppendingString:sdk_version]; XCRunTask* create = [[XCRunTask alloc] initWithArguments:@[ @"simctl", @"create", device, device, sdk ]]; - [create run]; + [create run:verbose]; - NSDictionary* simctl_list = GetSimulatorList(); + NSDictionary* simctl_list = GetSimulatorList(verbose); return GetDeviceBySDKAndName(simctl_list, device, sdk_version); } @@ -253,31 +263,31 @@ // Prints the HOME environment variable for a device. Used by the bots to // package up all the test data. -void PrintDeviceHome(NSString* udid) { +void PrintDeviceHome(NSString* udid, bool verbose) { XCRunTask* task = [[XCRunTask alloc] initWithArguments:@[ @"simctl", @"getenv", udid, @"HOME" ]]; - [task run]; + [task run:verbose]; } // Erase a device, used by the bots before a clean test run. -void WipeDevice(NSString* udid) { +void WipeDevice(NSString* udid, bool verbose) { XCRunTask* shutdown = [[XCRunTask alloc] initWithArguments:@[ @"simctl", @"shutdown", udid ]]; shutdown.standardOutput = nil; shutdown.standardError = nil; - [shutdown run]; + [shutdown run:verbose]; XCRunTask* erase = [[XCRunTask alloc] initWithArguments:@[ @"simctl", @"erase", udid ]]; - [erase run]; + [erase run:verbose]; } -void KillSimulator() { +void KillSimulator(bool verbose) { XCRunTask* task = [[XCRunTask alloc] initWithArguments:@[ @"killall", @"Simulator" ]]; task.standardOutput = nil; task.standardError = nil; - [task run]; + [task run:verbose]; } NSString* GetBundleIdentifierFromPath(NSString* app_path) { @@ -294,18 +304,21 @@ return bundle_identifier; } -void PrepareWebTests(NSString* udid, NSString* app_path) { +void PrepareWebTests(NSString* udid, NSString* app_path, bool verbose) { NSString* bundle_identifier = GetBundleIdentifierFromPath(app_path); XCRunTask* uninstall_task = [[XCRunTask alloc] initWithArguments:@[ @"simctl", @"uninstall", udid, bundle_identifier ]]; - [uninstall_task run]; + [uninstall_task run:verbose]; XCRunTask* install_task = [[XCRunTask alloc] initWithArguments:@[ @"simctl", @"install", udid, app_path ]]; - [install_task run]; + [install_task run:verbose]; } -int RunWebTest(NSString* app_path, NSString* udid, NSMutableArray* cmd_args) { +int RunWebTest(NSString* app_path, + NSString* udid, + NSMutableArray* cmd_args, + bool verbose) { NSMutableArray* arguments = [NSMutableArray array]; [arguments addObject:@"simctl"]; [arguments addObject:@"launch"]; @@ -338,7 +351,7 @@ }; task.standardError = stderr_pipe; - [task run]; + [task run:verbose]; return [task terminationStatus]; } @@ -347,7 +360,8 @@ NSString* udid, NSMutableDictionary* app_env, NSMutableArray* cmd_args, - NSMutableArray* tests_filter) { + NSMutableArray* tests_filter, + bool verbose) { NSString* tempFilePath = [NSTemporaryDirectory() stringByAppendingPathComponent:NSUUID.UUID.UUIDString]; [NSFileManager.defaultManager createFileAtPath:tempFilePath @@ -431,7 +445,7 @@ }; task.standardError = stderr_pipe; } - [task run]; + [task run:verbose]; return [task terminationStatus]; } @@ -449,9 +463,10 @@ NSMutableDictionary* app_env = [NSMutableDictionary dictionary]; NSMutableArray* cmd_args = [NSMutableArray array]; NSMutableArray* tests_filter = [NSMutableArray array]; + bool verbose_commands = false; int c; - while ((c = getopt(argc, argv, "hs:d:u:t:e:c:pwl")) != -1) { + while ((c = getopt(argc, argv, "hs:d:u:t:e:c:pwlv")) != -1) { switch (c) { case 's': sdk_version = @(optarg); @@ -491,6 +506,9 @@ case 'l': wants_print_supported_devices = true; break; + case 'v': + verbose_commands = true; + break; case 'h': PrintUsage(); exit(kExitSuccess); @@ -500,7 +518,7 @@ } } - NSDictionary* simctl_list = GetSimulatorList(); + NSDictionary* simctl_list = GetSimulatorList(verbose_commands); if (wants_print_supported_devices) { PrintSupportedDevices(simctl_list); @@ -535,7 +553,8 @@ if (udid == nil) { udid = GetDeviceBySDKAndName(simctl_list, device_name, sdk_version); if (udid == nil) { - udid = CreateDeviceBySDKAndName(device_name, sdk_version); + udid = + CreateDeviceBySDKAndName(device_name, sdk_version, verbose_commands); if (udid == nil) { LogError(@"Unable to find a device %@ with SDK %@.", device_name, sdk_version); @@ -554,18 +573,18 @@ } if (wants_print_home) { - PrintDeviceHome(udid); + PrintDeviceHome(udid, verbose_commands); exit(kExitSuccess); } // To run the web test, the simulator should work. So we do not kill the // simulator when running the web tests. if (!run_web_test && !prepare_web_test) { - KillSimulator(); + KillSimulator(verbose_commands); } if (wants_wipe) { - WipeDevice(udid); + WipeDevice(udid, verbose_commands); printf("Device wiped.\n"); exit(kExitSuccess); } @@ -599,20 +618,20 @@ } if (prepare_web_test) { - PrepareWebTests(udid, app_path); + PrepareWebTests(udid, app_path, verbose_commands); exit(kExitSuccess); } int return_code = -1; if (run_web_test) { - return_code = RunWebTest(app_path, udid, cmd_args); + return_code = RunWebTest(app_path, udid, cmd_args, verbose_commands); } else { return_code = RunApplication(app_path, xctest_path, udid, app_env, cmd_args, - tests_filter); + tests_filter, verbose_commands); } if (!run_web_test) { - KillSimulator(); + KillSimulator(verbose_commands); } return return_code;
diff --git a/testing/variations/fieldtrial_testing_config.json b/testing/variations/fieldtrial_testing_config.json index 102b55a..f2078f93 100644 --- a/testing/variations/fieldtrial_testing_config.json +++ b/testing/variations/fieldtrial_testing_config.json
@@ -1567,9 +1567,6 @@ }, "enable_features": [ "AutofillParsingPatternProvider" - ], - "disable_features": [ - "AutofillPageLanguageDetection" ] } ] @@ -2529,6 +2526,52 @@ ] } ], + "BrowserThreadPoolAdjustmentForAndroid": [ + { + "platforms": [ + "android" + ], + "experiments": [ + { + "name": "thread_pool_default_20230920", + "params": { + "BrowserThreadPoolCoresMultiplier": "0.6", + "BrowserThreadPoolMax": "8", + "BrowserThreadPoolMin": "6", + "BrowserThreadPoolOffset": "0" + }, + "enable_features": [ + "BrowserThreadPoolAdjustment" + ] + } + ] + } + ], + "BrowserThreadPoolAdjustmentForDesktop": [ + { + "platforms": [ + "chromeos", + "chromeos_lacros", + "linux", + "mac", + "windows" + ], + "experiments": [ + { + "name": "thread_pool_default_20230920", + "params": { + "BrowserThreadPoolCoresMultiplier": "0.6", + "BrowserThreadPoolMax": "32", + "BrowserThreadPoolMin": "16", + "BrowserThreadPoolOffset": "0" + }, + "enable_features": [ + "BrowserThreadPoolAdjustment" + ] + } + ] + } + ], "BrowsingTopicsParameters": [ { "platforms": [ @@ -2552,6 +2595,29 @@ ] } ], + "BufferSizeForFilterSourceStream": [ + { + "platforms": [ + "android", + "chromeos", + "chromeos_lacros", + "linux", + "mac", + "windows" + ], + "experiments": [ + { + "name": "buffer_size_0032k_20230919", + "params": { + "BufferSizeForFilterSourceStream": "32768" + }, + "enable_features": [ + "BufferSizeForFilterSourceStreamFeature" + ] + } + ] + } + ], "CCTRealTimeEngagementSignalsAlternativeImpl": [ { "platforms": [ @@ -4656,6 +4722,30 @@ ] } ], + "DecodedImageWorkingSetBudget": [ + { + "platforms": [ + "android", + "chromeos", + "chromeos_lacros", + "linux", + "mac", + "windows" + ], + "experiments": [ + { + "name": "budget_default_128M_256M_20230921", + "params": { + "DecodedImageWorkingSetBudgetBytesForAboveThreshold": "268435456", + "DefaultDecodedImageWorkingSetBudgetBytes": "134217728" + }, + "enable_features": [ + "ImageDecodeConfigurableFeature" + ] + } + ] + } + ], "DecreaseProcessingAudioFifoSize": [ { "platforms": [ @@ -4691,6 +4781,29 @@ ] } ], + "DefaultGpuDiskCacheSize": [ + { + "platforms": [ + "android", + "chromeos", + "chromeos_lacros", + "linux", + "mac", + "windows" + ], + "experiments": [ + { + "name": "max_cache_6M_20230913", + "params": { + "GpuDefaultMaxProgramCacheMemoryBytes": "6291456" + }, + "enable_features": [ + "DefaultGpuDiskCacheSize" + ] + } + ] + } + ], "DefaultOfflineExperience": [ { "platforms": [ @@ -4706,6 +4819,29 @@ ] } ], + "DefaultOpenSSLBufferSizeFeature": [ + { + "platforms": [ + "android", + "chromeos", + "chromeos_lacros", + "linux", + "mac", + "windows" + ], + "experiments": [ + { + "name": "ssl_buffer_size_17K_20230920", + "params": { + "DefaultOpenSSLBufferSize": "17408" + }, + "enable_features": [ + "DefaultOpenSSLBufferSizeFeature" + ] + } + ] + } + ], "DefaultPassthroughCommandDecoder": [ { "platforms": [ @@ -10103,6 +10239,29 @@ ] } ], + "MojoLargerDataPipeAllocationSize": [ + { + "platforms": [ + "android", + "chromeos", + "chromeos_lacros", + "linux", + "mac", + "windows" + ], + "experiments": [ + { + "name": "data_pipe_2048k_20230922", + "params": { + "LargerDataPipeAllocationSize": "2097152" + }, + "enable_features": [ + "LargerDataPipeAllocationSizeFeature" + ] + } + ] + } + ], "MsaaSettingsMac": [ { "platforms": [ @@ -10197,6 +10356,29 @@ ] } ], + "NetAdapterMaxBufSize": [ + { + "platforms": [ + "android", + "chromeos", + "chromeos_lacros", + "linux", + "mac", + "windows" + ], + "experiments": [ + { + "name": "max_buf_size_064k_20230922", + "params": { + "NetAdapterMaxBufSize": "65536" + }, + "enable_features": [ + "NetAdapterMaxBufSizeFeature" + ] + } + ] + } + ], "NetworkServiceSandboxLinuxAndChromeOS": [ { "platforms": [ @@ -10318,6 +10500,29 @@ ] } ], + "NormalMaxItemsInCacheForSoftware": [ + { + "platforms": [ + "android", + "chromeos", + "chromeos_lacros", + "linux", + "mac", + "windows" + ], + "experiments": [ + { + "name": "ImageCache_1000_20230914", + "params": { + "NormalMaxItemsInCacheForSoftware": "1000" + }, + "enable_features": [ + "NormalMaxItemsInCacheForSoftwareFeature" + ] + } + ] + } + ], "NormalPriorityImageDecoding": [ { "platforms": [ @@ -11412,6 +11617,29 @@ ] } ], + "PaintCacheBudget": [ + { + "platforms": [ + "android", + "chromeos", + "chromeos_lacros", + "linux", + "mac", + "windows" + ], + "experiments": [ + { + "name": "paint_cache_budget_04M_20230913", + "params": { + "NormalPaintCacheBudgetBytes": "4194304" + }, + "enable_features": [ + "PaintCacheBudgetConfigurableFeature" + ] + } + ] + } + ], "PaintHoldingCrossOrigin": [ { "platforms": [ @@ -11563,8 +11791,11 @@ ], "experiments": [ { - "name": "Control_20230925", - "disable_features": [ + "name": "size_android_512_20230925", + "params": { + "PartitionAllocLargeThreadCacheSizeValueForLowRAMAndroid": "512" + }, + "enable_features": [ "PartitionAllocLargeThreadCacheSize" ] } @@ -11582,8 +11813,11 @@ ], "experiments": [ { - "name": "Control_20230925", - "disable_features": [ + "name": "size_32768_20230925", + "params": { + "PartitionAllocLargeThreadCacheSizeValue": "32768" + }, + "enable_features": [ "PartitionAllocLargeThreadCacheSize" ] } @@ -14179,6 +14413,26 @@ ] } ], + "SafeBrowsingSkipSubresources": [ + { + "platforms": [ + "android", + "chromeos", + "chromeos_lacros", + "linux", + "mac", + "windows" + ], + "experiments": [ + { + "name": "Enabled", + "enable_features": [ + "SafeBrowsingSkipSubresources" + ] + } + ] + } + ], "SafetyCheckNotificationPermissions": [ { "platforms": [
diff --git a/third_party/abseil-cpp/BUILD.gn b/third_party/abseil-cpp/BUILD.gn index b3254284..c1ec371 100644 --- a/third_party/abseil-cpp/BUILD.gn +++ b/third_party/abseil-cpp/BUILD.gn
@@ -198,6 +198,7 @@ # TODO(mbonadei): Fix issue with EXPECT_DEATH and uncomment. # "absl/container:btree_test", "absl/container:common_policy_traits_test", + "absl/container:fixed_array_test", "absl/container:flat_hash_set_test", "absl/container:inlined_vector_test", "absl/container:node_slot_policy_test", @@ -236,6 +237,7 @@ "absl/profiling:periodic_sampler_test", "absl/status:status_test", "absl/status:statusor_test", + "absl/strings:has_absl_stringify_test", "absl/strings:ascii_test", "absl/strings:char_formatting_test", "absl/strings:charset_test",
diff --git a/third_party/abseil-cpp/CMake/AbseilDll.cmake b/third_party/abseil-cpp/CMake/AbseilDll.cmake index b801932..2d605f7 100644 --- a/third_party/abseil-cpp/CMake/AbseilDll.cmake +++ b/third_party/abseil-cpp/CMake/AbseilDll.cmake
@@ -74,7 +74,6 @@ "container/internal/common_policy_traits.h" "container/internal/compressed_tuple.h" "container/internal/container_memory.h" - "container/internal/counting_allocator.h" "container/internal/hash_function_defaults.h" "container/internal/hash_policy_traits.h" "container/internal/hashtable_debug.h" @@ -249,6 +248,7 @@ "random/uniform_real_distribution.h" "random/zipf_distribution.h" "status/internal/status_internal.h" + "status/internal/status_internal.cc" "status/internal/statusor_internal.h" "status/status.h" "status/status.cc" @@ -305,6 +305,7 @@ "strings/internal/stringify_sink.h" "strings/internal/stringify_sink.cc" "strings/internal/has_absl_stringify.h" + "strings/has_absl_stringify.h" "strings/match.cc" "strings/match.h" "strings/numbers.cc"
diff --git a/third_party/abseil-cpp/README.chromium b/third_party/abseil-cpp/README.chromium index a3ace148..0dd6ac6 100644 --- a/third_party/abseil-cpp/README.chromium +++ b/third_party/abseil-cpp/README.chromium
@@ -4,7 +4,7 @@ License: Apache 2.0 License File: LICENSE Version: 0 -Revision: f5b19acb907305a942f455154b85563ba34990cb +Revision: d91f39ab5b910ee208bf8d7dec6a65cfa0b879ba Security Critical: yes Shipped: yes
diff --git a/third_party/abseil-cpp/absl/base/log_severity.h b/third_party/abseil-cpp/absl/base/log_severity.h index c8bcd2f..d0795a2d 100644 --- a/third_party/abseil-cpp/absl/base/log_severity.h +++ b/third_party/abseil-cpp/absl/base/log_severity.h
@@ -99,13 +99,13 @@ // Returns the all-caps string representation (e.g. "INFO") of the specified // severity level if it is one of the standard levels and "UNKNOWN" otherwise. constexpr const char* LogSeverityName(absl::LogSeverity s) { - return s == absl::LogSeverity::kInfo - ? "INFO" - : s == absl::LogSeverity::kWarning - ? "WARNING" - : s == absl::LogSeverity::kError - ? "ERROR" - : s == absl::LogSeverity::kFatal ? "FATAL" : "UNKNOWN"; + switch (s) { + case absl::LogSeverity::kInfo: return "INFO"; + case absl::LogSeverity::kWarning: return "WARNING"; + case absl::LogSeverity::kError: return "ERROR"; + case absl::LogSeverity::kFatal: return "FATAL"; + default: return "UNKNOWN"; + } } // NormalizeLogSeverity() @@ -113,9 +113,10 @@ // Values less than `kInfo` normalize to `kInfo`; values greater than `kFatal` // normalize to `kError` (**NOT** `kFatal`). constexpr absl::LogSeverity NormalizeLogSeverity(absl::LogSeverity s) { - return s < absl::LogSeverity::kInfo - ? absl::LogSeverity::kInfo - : s > absl::LogSeverity::kFatal ? absl::LogSeverity::kError : s; + absl::LogSeverity n = s; + if (n < absl::LogSeverity::kInfo) n = absl::LogSeverity::kInfo; + if (n > absl::LogSeverity::kFatal) n = absl::LogSeverity::kError; + return n; } constexpr absl::LogSeverity NormalizeLogSeverity(int s) { return absl::NormalizeLogSeverity(static_cast<absl::LogSeverity>(s));
diff --git a/third_party/abseil-cpp/absl/container/BUILD.bazel b/third_party/abseil-cpp/absl/container/BUILD.bazel index 5131837..5be58b1 100644 --- a/third_party/abseil-cpp/absl/container/BUILD.bazel +++ b/third_party/abseil-cpp/absl/container/BUILD.bazel
@@ -73,8 +73,8 @@ copts = ABSL_TEST_COPTS, linkopts = ABSL_DEFAULT_LINKOPTS, deps = [ - ":counting_allocator", ":fixed_array", + ":test_allocator", "//absl/base:config", "//absl/base:exception_testing", "//absl/hash:hash_testing", @@ -139,9 +139,9 @@ ) cc_library( - name = "counting_allocator", + name = "test_allocator", testonly = 1, - hdrs = ["internal/counting_allocator.h"], + hdrs = ["internal/test_allocator.h"], copts = ABSL_DEFAULT_COPTS, linkopts = ABSL_DEFAULT_LINKOPTS, visibility = ["//visibility:private"], @@ -154,8 +154,8 @@ copts = ABSL_TEST_COPTS, linkopts = ABSL_DEFAULT_LINKOPTS, deps = [ - ":counting_allocator", ":inlined_vector", + ":test_allocator", ":test_instance_tracker", "//absl/base:config", "//absl/base:core_headers", @@ -656,6 +656,7 @@ ":hash_policy_testing", ":hashtable_debug", ":raw_hash_set", + ":test_allocator", "//absl/base", "//absl/base:config", "//absl/base:core_headers", @@ -993,7 +994,7 @@ deps = [ ":btree", ":btree_test_common", - ":counting_allocator", + ":test_allocator", ":test_instance_tracker", "//absl/algorithm:container", "//absl/base:core_headers",
diff --git a/third_party/abseil-cpp/absl/container/BUILD.gn b/third_party/abseil-cpp/absl/container/BUILD.gn index 882d6f1..45e91b81 100644 --- a/third_party/abseil-cpp/absl/container/BUILD.gn +++ b/third_party/abseil-cpp/absl/container/BUILD.gn
@@ -22,6 +22,19 @@ ] } +absl_test("fixed_array_test") { + sources = [ "fixed_array_test.cc" ] + deps = [ + ":fixed_array", + ":test_allocator", + ":test_instance_tracker", + "//third_party/abseil-cpp/absl/base:config", + "//third_party/abseil-cpp/absl/base:exception_testing", + "//third_party/abseil-cpp/absl/hash:hash_testing", + "//third_party/abseil-cpp/absl/memory", + ] +} + absl_source_set("inlined_vector_internal") { public = [ "internal/inlined_vector.h" ] deps = [ @@ -45,9 +58,9 @@ ] } -absl_source_set("counting_allocator") { +absl_source_set("test_allocator") { testonly = true - public = [ "internal/counting_allocator.h" ] + public = [ "internal/test_allocator.h" ] deps = [ "//third_party/abseil-cpp/absl/base:config" ] visibility = [ ":*" ] } @@ -55,7 +68,7 @@ absl_test("inlined_vector_test") { sources = [ "inlined_vector_test.cc" ] deps = [ - ":counting_allocator", + ":test_allocator", ":inlined_vector", ":test_instance_tracker", "//third_party/abseil-cpp/absl/base:config", @@ -465,7 +478,7 @@ # deps = [ # ":btree", # ":btree_test_common", -# ":counting_allocator", +# ":test_allocator", # ":test_instance_tracker", # "//third_party/abseil-cpp/absl/algorithm:container", # "//third_party/abseil-cpp/absl/base:core_headers",
diff --git a/third_party/abseil-cpp/absl/container/CMakeLists.txt b/third_party/abseil-cpp/absl/container/CMakeLists.txt index f5ef0ddb..bfe0634b 100644 --- a/third_party/abseil-cpp/absl/container/CMakeLists.txt +++ b/third_party/abseil-cpp/absl/container/CMakeLists.txt
@@ -77,13 +77,13 @@ absl::btree_test_common absl::compare absl::core_headers - absl::counting_allocator absl::flags absl::hash_testing absl::optional absl::random_random absl::raw_logging_internal absl::strings + absl::test_allocator absl::test_instance_tracker GTest::gmock_main ) @@ -145,11 +145,11 @@ ${ABSL_TEST_COPTS} DEPS absl::fixed_array - absl::counting_allocator absl::config absl::exception_testing absl::hash_testing absl::memory + absl::test_allocator GTest::gmock_main ) @@ -204,9 +204,9 @@ # Internal-only target, do not depend on directly. absl_cc_library( NAME - counting_allocator + test_allocator HDRS - "internal/counting_allocator.h" + "internal/test_allocator.h" COPTS ${ABSL_DEFAULT_COPTS} DEPS @@ -224,12 +224,12 @@ absl::check absl::config absl::core_headers - absl::counting_allocator absl::exception_testing absl::hash_testing absl::inlined_vector absl::memory absl::strings + absl::test_allocator absl::test_instance_tracker GTest::gmock_main ) @@ -747,6 +747,7 @@ absl::prefetch absl::raw_hash_set absl::strings + absl::test_allocator GTest::gmock_main )
diff --git a/third_party/abseil-cpp/absl/container/btree_test.cc b/third_party/abseil-cpp/absl/container/btree_test.cc index a204c6d5..1f4e368 100644 --- a/third_party/abseil-cpp/absl/container/btree_test.cc +++ b/third_party/abseil-cpp/absl/container/btree_test.cc
@@ -37,7 +37,7 @@ #include "absl/base/macros.h" #include "absl/container/btree_map.h" #include "absl/container/btree_set.h" -#include "absl/container/internal/counting_allocator.h" +#include "absl/container/internal/test_allocator.h" #include "absl/container/internal/test_instance_tracker.h" #include "absl/flags/flag.h" #include "absl/hash/hash_testing.h" @@ -667,25 +667,10 @@ DoTest("identical: ", &container, identical_values); } -template <typename T> -struct PropagatingCountingAlloc : public CountingAllocator<T> { - using propagate_on_container_copy_assignment = std::true_type; - using propagate_on_container_move_assignment = std::true_type; - using propagate_on_container_swap = std::true_type; - - using Base = CountingAllocator<T>; - using Base::Base; - - template <typename U> - explicit PropagatingCountingAlloc(const PropagatingCountingAlloc<U> &other) - : Base(other.bytes_used_) {} - - template <typename U> - struct rebind { - using other = PropagatingCountingAlloc<U>; - }; -}; - +// TODO(ezb): get rid of BtreeAllocatorTest and replace with test cases using +// specific propagating allocs (e.g. CopyAssignPropagatingCountingAlloc) and +// also a test for MinimumAlignmentAlloc. Motivation is better test coverage and +// faster compilation time. template <typename T> void BtreeAllocatorTest() { using value_type = typename T::value_type; @@ -2530,14 +2515,14 @@ InstanceTracker tracker; int64_t bytes1 = 0, bytes2 = 0; - PropagatingCountingAlloc<MovableOnlyInstance> allocator1(&bytes1); - PropagatingCountingAlloc<MovableOnlyInstance> allocator2(&bytes2); + MoveAssignPropagatingCountingAlloc<MovableOnlyInstance> allocator1(&bytes1); + MoveAssignPropagatingCountingAlloc<MovableOnlyInstance> allocator2(&bytes2); std::less<MovableOnlyInstance> cmp; // Test propagating allocator_type. { absl::btree_set<MovableOnlyInstance, std::less<MovableOnlyInstance>, - PropagatingCountingAlloc<MovableOnlyInstance>> + MoveAssignPropagatingCountingAlloc<MovableOnlyInstance>> set1(cmp, allocator1), set2(cmp, allocator2); for (int i = 0; i < 100; ++i) set1.insert(MovableOnlyInstance(i));
diff --git a/third_party/abseil-cpp/absl/container/fixed_array_test.cc b/third_party/abseil-cpp/absl/container/fixed_array_test.cc index 9dbf2a8..2421b5f 100644 --- a/third_party/abseil-cpp/absl/container/fixed_array_test.cc +++ b/third_party/abseil-cpp/absl/container/fixed_array_test.cc
@@ -30,7 +30,7 @@ #include "absl/base/config.h" #include "absl/base/internal/exception_testing.h" #include "absl/base/options.h" -#include "absl/container/internal/counting_allocator.h" +#include "absl/container/internal/test_allocator.h" #include "absl/hash/hash_testing.h" #include "absl/memory/memory.h"
diff --git a/third_party/abseil-cpp/absl/container/inlined_vector_test.cc b/third_party/abseil-cpp/absl/container/inlined_vector_test.cc index b9a79f5..241389ae 100644 --- a/third_party/abseil-cpp/absl/container/inlined_vector_test.cc +++ b/third_party/abseil-cpp/absl/container/inlined_vector_test.cc
@@ -33,7 +33,7 @@ #include "absl/base/internal/exception_testing.h" #include "absl/base/macros.h" #include "absl/base/options.h" -#include "absl/container/internal/counting_allocator.h" +#include "absl/container/internal/test_allocator.h" #include "absl/container/internal/test_instance_tracker.h" #include "absl/hash/hash_testing.h" #include "absl/log/check.h"
diff --git a/third_party/abseil-cpp/absl/container/internal/btree.h b/third_party/abseil-cpp/absl/container/internal/btree.h index 419a535..ef630ae 100644 --- a/third_party/abseil-cpp/absl/container/internal/btree.h +++ b/third_party/abseil-cpp/absl/container/internal/btree.h
@@ -2423,7 +2423,7 @@ using std::swap; if (absl::allocator_traits< - allocator_type>::propagate_on_container_copy_assignment::value) { + allocator_type>::propagate_on_container_move_assignment::value) { swap(root_, other.root_); // Note: `rightmost_` also contains the allocator and the key comparator. swap(rightmost_, other.rightmost_);
diff --git a/third_party/abseil-cpp/absl/container/internal/counting_allocator.h b/third_party/abseil-cpp/absl/container/internal/counting_allocator.h deleted file mode 100644 index 66068a5a..0000000 --- a/third_party/abseil-cpp/absl/container/internal/counting_allocator.h +++ /dev/null
@@ -1,122 +0,0 @@ -// Copyright 2018 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef ABSL_CONTAINER_INTERNAL_COUNTING_ALLOCATOR_H_ -#define ABSL_CONTAINER_INTERNAL_COUNTING_ALLOCATOR_H_ - -#include <cstdint> -#include <memory> - -#include "absl/base/config.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace container_internal { - -// This is a stateful allocator, but the state lives outside of the -// allocator (in whatever test is using the allocator). This is odd -// but helps in tests where the allocator is propagated into nested -// containers - that chain of allocators uses the same state and is -// thus easier to query for aggregate allocation information. -template <typename T> -class CountingAllocator { - public: - using Allocator = std::allocator<T>; - using AllocatorTraits = std::allocator_traits<Allocator>; - using value_type = typename AllocatorTraits::value_type; - using pointer = typename AllocatorTraits::pointer; - using const_pointer = typename AllocatorTraits::const_pointer; - using size_type = typename AllocatorTraits::size_type; - using difference_type = typename AllocatorTraits::difference_type; - - CountingAllocator() = default; - explicit CountingAllocator(int64_t* bytes_used) : bytes_used_(bytes_used) {} - CountingAllocator(int64_t* bytes_used, int64_t* instance_count) - : bytes_used_(bytes_used), instance_count_(instance_count) {} - - template <typename U> - CountingAllocator(const CountingAllocator<U>& x) - : bytes_used_(x.bytes_used_), instance_count_(x.instance_count_) {} - - pointer allocate( - size_type n, - typename AllocatorTraits::const_void_pointer hint = nullptr) { - Allocator allocator; - pointer ptr = AllocatorTraits::allocate(allocator, n, hint); - if (bytes_used_ != nullptr) { - *bytes_used_ += n * sizeof(T); - } - return ptr; - } - - void deallocate(pointer p, size_type n) { - Allocator allocator; - AllocatorTraits::deallocate(allocator, p, n); - if (bytes_used_ != nullptr) { - *bytes_used_ -= n * sizeof(T); - } - } - - template <typename U, typename... Args> - void construct(U* p, Args&&... args) { - Allocator allocator; - AllocatorTraits::construct(allocator, p, std::forward<Args>(args)...); - if (instance_count_ != nullptr) { - *instance_count_ += 1; - } - } - - template <typename U> - void destroy(U* p) { - Allocator allocator; - // Ignore GCC warning bug. -#if ABSL_INTERNAL_HAVE_MIN_GNUC_VERSION(12, 0) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wuse-after-free" -#endif - AllocatorTraits::destroy(allocator, p); -#if ABSL_INTERNAL_HAVE_MIN_GNUC_VERSION(12, 0) -#pragma GCC diagnostic pop -#endif - if (instance_count_ != nullptr) { - *instance_count_ -= 1; - } - } - - template <typename U> - class rebind { - public: - using other = CountingAllocator<U>; - }; - - friend bool operator==(const CountingAllocator& a, - const CountingAllocator& b) { - return a.bytes_used_ == b.bytes_used_ && - a.instance_count_ == b.instance_count_; - } - - friend bool operator!=(const CountingAllocator& a, - const CountingAllocator& b) { - return !(a == b); - } - - int64_t* bytes_used_ = nullptr; - int64_t* instance_count_ = nullptr; -}; - -} // namespace container_internal -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_CONTAINER_INTERNAL_COUNTING_ALLOCATOR_H_
diff --git a/third_party/abseil-cpp/absl/container/internal/raw_hash_set_test.cc b/third_party/abseil-cpp/absl/container/internal/raw_hash_set_test.cc index 55c6f62e..7588120 100644 --- a/third_party/abseil-cpp/absl/container/internal/raw_hash_set_test.cc +++ b/third_party/abseil-cpp/absl/container/internal/raw_hash_set_test.cc
@@ -48,6 +48,7 @@ #include "absl/container/internal/hash_function_defaults.h" #include "absl/container/internal/hash_policy_testing.h" #include "absl/container/internal/hashtable_debug.h" +#include "absl/container/internal/test_allocator.h" #include "absl/log/log.h" #include "absl/strings/string_view.h" @@ -441,34 +442,6 @@ using Base::Base; }; -// Tries to allocate memory at the minimum alignment even when the default -// allocator uses a higher alignment. -template <typename T> -struct MinimumAlignmentAlloc : std::allocator<T> { - MinimumAlignmentAlloc() = default; - - template <typename U> - explicit MinimumAlignmentAlloc(const MinimumAlignmentAlloc<U>& /*other*/) {} - - template <class U> - struct rebind { - using other = MinimumAlignmentAlloc<U>; - }; - - T* allocate(size_t n) { - T* ptr = std::allocator<T>::allocate(n + 1); - char* cptr = reinterpret_cast<char*>(ptr); - cptr += alignof(T); - return reinterpret_cast<T*>(cptr); - } - - void deallocate(T* ptr, size_t n) { - char* cptr = reinterpret_cast<char*>(ptr); - cptr -= alignof(T); - std::allocator<T>::deallocate(reinterpret_cast<T*>(cptr), n + 1); - } -}; - struct MinimumAlignmentUint8Table : raw_hash_set<Uint8Policy, container_internal::hash_default_hash<uint8_t>, std::equal_to<uint8_t>, MinimumAlignmentAlloc<uint8_t>> {
diff --git a/third_party/abseil-cpp/absl/container/internal/test_allocator.h b/third_party/abseil-cpp/absl/container/internal/test_allocator.h new file mode 100644 index 0000000..153da42 --- /dev/null +++ b/third_party/abseil-cpp/absl/container/internal/test_allocator.h
@@ -0,0 +1,225 @@ +// Copyright 2018 The Abseil Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef ABSL_CONTAINER_INTERNAL_TEST_ALLOCATOR_H_ +#define ABSL_CONTAINER_INTERNAL_TEST_ALLOCATOR_H_ + +#include <cstddef> +#include <cstdint> +#include <memory> +#include <type_traits> + +#include "absl/base/config.h" + +namespace absl { +ABSL_NAMESPACE_BEGIN +namespace container_internal { + +// This is a stateful allocator, but the state lives outside of the +// allocator (in whatever test is using the allocator). This is odd +// but helps in tests where the allocator is propagated into nested +// containers - that chain of allocators uses the same state and is +// thus easier to query for aggregate allocation information. +template <typename T> +class CountingAllocator { + public: + using Allocator = std::allocator<T>; + using AllocatorTraits = std::allocator_traits<Allocator>; + using value_type = typename AllocatorTraits::value_type; + using pointer = typename AllocatorTraits::pointer; + using const_pointer = typename AllocatorTraits::const_pointer; + using size_type = typename AllocatorTraits::size_type; + using difference_type = typename AllocatorTraits::difference_type; + + CountingAllocator() = default; + explicit CountingAllocator(int64_t* bytes_used) : bytes_used_(bytes_used) {} + CountingAllocator(int64_t* bytes_used, int64_t* instance_count) + : bytes_used_(bytes_used), instance_count_(instance_count) {} + + template <typename U> + CountingAllocator(const CountingAllocator<U>& x) + : bytes_used_(x.bytes_used_), instance_count_(x.instance_count_) {} + + pointer allocate( + size_type n, + typename AllocatorTraits::const_void_pointer hint = nullptr) { + Allocator allocator; + pointer ptr = AllocatorTraits::allocate(allocator, n, hint); + if (bytes_used_ != nullptr) { + *bytes_used_ += n * sizeof(T); + } + return ptr; + } + + void deallocate(pointer p, size_type n) { + Allocator allocator; + AllocatorTraits::deallocate(allocator, p, n); + if (bytes_used_ != nullptr) { + *bytes_used_ -= n * sizeof(T); + } + } + + template <typename U, typename... Args> + void construct(U* p, Args&&... args) { + Allocator allocator; + AllocatorTraits::construct(allocator, p, std::forward<Args>(args)...); + if (instance_count_ != nullptr) { + *instance_count_ += 1; + } + } + + template <typename U> + void destroy(U* p) { + Allocator allocator; + // Ignore GCC warning bug. +#if ABSL_INTERNAL_HAVE_MIN_GNUC_VERSION(12, 0) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wuse-after-free" +#endif + AllocatorTraits::destroy(allocator, p); +#if ABSL_INTERNAL_HAVE_MIN_GNUC_VERSION(12, 0) +#pragma GCC diagnostic pop +#endif + if (instance_count_ != nullptr) { + *instance_count_ -= 1; + } + } + + template <typename U> + class rebind { + public: + using other = CountingAllocator<U>; + }; + + friend bool operator==(const CountingAllocator& a, + const CountingAllocator& b) { + return a.bytes_used_ == b.bytes_used_ && + a.instance_count_ == b.instance_count_; + } + + friend bool operator!=(const CountingAllocator& a, + const CountingAllocator& b) { + return !(a == b); + } + + int64_t* bytes_used_ = nullptr; + int64_t* instance_count_ = nullptr; +}; + +template <typename T> +struct CopyAssignPropagatingCountingAlloc : public CountingAllocator<T> { + using propagate_on_container_copy_assignment = std::true_type; + + using Base = CountingAllocator<T>; + using Base::Base; + + template <typename U> + explicit CopyAssignPropagatingCountingAlloc( + const CopyAssignPropagatingCountingAlloc<U>& other) + : Base(other.bytes_used_, other.instance_count_) {} + + template <typename U> + struct rebind { + using other = CopyAssignPropagatingCountingAlloc<U>; + }; +}; + +template <typename T> +struct MoveAssignPropagatingCountingAlloc : public CountingAllocator<T> { + using propagate_on_container_move_assignment = std::true_type; + + using Base = CountingAllocator<T>; + using Base::Base; + + template <typename U> + explicit MoveAssignPropagatingCountingAlloc( + const MoveAssignPropagatingCountingAlloc<U>& other) + : Base(other.bytes_used_, other.instance_count_) {} + + template <typename U> + struct rebind { + using other = MoveAssignPropagatingCountingAlloc<U>; + }; +}; + +template <typename T> +struct SwapPropagatingCountingAlloc : public CountingAllocator<T> { + using propagate_on_container_swap = std::true_type; + + using Base = CountingAllocator<T>; + using Base::Base; + + template <typename U> + explicit SwapPropagatingCountingAlloc( + const SwapPropagatingCountingAlloc<U>& other) + : Base(other.bytes_used_, other.instance_count_) {} + + template <typename U> + struct rebind { + using other = SwapPropagatingCountingAlloc<U>; + }; +}; + +template <typename T> +struct PropagatingCountingAlloc : public CountingAllocator<T> { + using propagate_on_container_copy_assignment = std::true_type; + using propagate_on_container_move_assignment = std::true_type; + using propagate_on_container_swap = std::true_type; + + using Base = CountingAllocator<T>; + using Base::Base; + + template <typename U> + explicit PropagatingCountingAlloc(const PropagatingCountingAlloc<U> &other) + : Base(other.bytes_used_, other.instance_count_) {} + + template <typename U> + struct rebind { + using other = PropagatingCountingAlloc<U>; + }; +}; + +// Tries to allocate memory at the minimum alignment even when the default +// allocator uses a higher alignment. +template <typename T> +struct MinimumAlignmentAlloc : std::allocator<T> { + MinimumAlignmentAlloc() = default; + + template <typename U> + explicit MinimumAlignmentAlloc(const MinimumAlignmentAlloc<U>& /*other*/) {} + + template <class U> + struct rebind { + using other = MinimumAlignmentAlloc<U>; + }; + + T* allocate(size_t n) { + T* ptr = std::allocator<T>::allocate(n + 1); + char* cptr = reinterpret_cast<char*>(ptr); + cptr += alignof(T); + return reinterpret_cast<T*>(cptr); + } + + void deallocate(T* ptr, size_t n) { + char* cptr = reinterpret_cast<char*>(ptr); + cptr -= alignof(T); + std::allocator<T>::deallocate(reinterpret_cast<T*>(cptr), n + 1); + } +}; + +} // namespace container_internal +ABSL_NAMESPACE_END +} // namespace absl + +#endif // ABSL_CONTAINER_INTERNAL_TEST_ALLOCATOR_H_
diff --git a/third_party/abseil-cpp/absl/crc/internal/crc32_x86_arm_combined_simd.h b/third_party/abseil-cpp/absl/crc/internal/crc32_x86_arm_combined_simd.h index deae763..d2fc621 100644 --- a/third_party/abseil-cpp/absl/crc/internal/crc32_x86_arm_combined_simd.h +++ b/third_party/abseil-cpp/absl/crc/internal/crc32_x86_arm_combined_simd.h
@@ -274,7 +274,7 @@ template <int imm> inline uint64_t V128_Extract64(const V128 l) { - return vgetq_lane_u64(vreinterpretq_u64_s64(l), imm); + return vgetq_lane_u64(l, imm); } inline int64_t V128_Low64(const V128 l) {
diff --git a/third_party/abseil-cpp/absl/functional/function_ref.h b/third_party/abseil-cpp/absl/functional/function_ref.h index 2b9139d3..96cece55 100644 --- a/third_party/abseil-cpp/absl/functional/function_ref.h +++ b/third_party/abseil-cpp/absl/functional/function_ref.h
@@ -137,6 +137,14 @@ absl::functional_internal::Invoker<R, Args...> invoker_; }; +// Allow const qualified function signatures. Since FunctionRef requires +// constness anyway we can just make this a no-op. +template <typename R, typename... Args> +class FunctionRef<R(Args...) const> : public FunctionRef<R(Args...)> { + public: + using FunctionRef<R(Args...)>::FunctionRef; +}; + ABSL_NAMESPACE_END } // namespace absl
diff --git a/third_party/abseil-cpp/absl/functional/function_ref_test.cc b/third_party/abseil-cpp/absl/functional/function_ref_test.cc index c61117eb..c0211135 100644 --- a/third_party/abseil-cpp/absl/functional/function_ref_test.cc +++ b/third_party/abseil-cpp/absl/functional/function_ref_test.cc
@@ -47,6 +47,11 @@ EXPECT_EQ(1337, ref()); } +TEST(FunctionRefTest, ConstFunction) { + FunctionRef<int() const> ref(Function); + EXPECT_EQ(1337, ref()); +} + int NoExceptFunction() noexcept { return 1337; } // TODO(jdennett): Add a test for noexcept member functions.
diff --git a/third_party/abseil-cpp/absl/log/BUILD.bazel b/third_party/abseil-cpp/absl/log/BUILD.bazel index 2f39355..cf49ea3 100644 --- a/third_party/abseil-cpp/absl/log/BUILD.bazel +++ b/third_party/abseil-cpp/absl/log/BUILD.bazel
@@ -550,6 +550,7 @@ "//absl/base:strerror", "//absl/flags:program_name", "//absl/log/internal:test_helpers", + "//absl/status", "//absl/strings", "//absl/strings:str_format", "@com_google_googletest//:gtest_main",
diff --git a/third_party/abseil-cpp/absl/log/BUILD.gn b/third_party/abseil-cpp/absl/log/BUILD.gn index 0e56bff..629e1d6 100644 --- a/third_party/abseil-cpp/absl/log/BUILD.gn +++ b/third_party/abseil-cpp/absl/log/BUILD.gn
@@ -384,6 +384,7 @@ "//third_party/abseil-cpp/absl/base:strerror", "//third_party/abseil-cpp/absl/flags:program_name", "//third_party/abseil-cpp/absl/log/internal:test_helpers", + "//third_party/abseil-cpp/absl/status", "//third_party/abseil-cpp/absl/strings", "//third_party/abseil-cpp/absl/strings:str_format", "//third_party/abseil-cpp/absl/strings:string_view",
diff --git a/third_party/abseil-cpp/absl/log/CMakeLists.txt b/third_party/abseil-cpp/absl/log/CMakeLists.txt index 1ca35a1..8316b686 100644 --- a/third_party/abseil-cpp/absl/log/CMakeLists.txt +++ b/third_party/abseil-cpp/absl/log/CMakeLists.txt
@@ -1020,6 +1020,7 @@ absl::log absl::log_internal_test_helpers absl::log_severity + absl::status absl::strerror absl::strings absl::str_format
diff --git a/third_party/abseil-cpp/absl/log/initialize.cc b/third_party/abseil-cpp/absl/log/initialize.cc index a3f6d6c..ef5d31469a9 100644 --- a/third_party/abseil-cpp/absl/log/initialize.cc +++ b/third_party/abseil-cpp/absl/log/initialize.cc
@@ -21,14 +21,18 @@ namespace absl { ABSL_NAMESPACE_BEGIN -void InitializeLog() { +namespace { +void InitializeLogImpl(absl::TimeZone time_zone) { // This comes first since it is used by RAW_LOG. - absl::log_internal::SetTimeZone(absl::LocalTimeZone()); + absl::log_internal::SetTimeZone(time_zone); // Note that initialization is complete, so logs can now be sent to their // proper destinations rather than stderr. log_internal::SetInitialized(); } +} // namespace + +void InitializeLog() { InitializeLogImpl(absl::LocalTimeZone()); } ABSL_NAMESPACE_END } // namespace absl
diff --git a/third_party/abseil-cpp/absl/log/internal/check_op.h b/third_party/abseil-cpp/absl/log/internal/check_op.h index 20b01b5e..a75d463 100644 --- a/third_party/abseil-cpp/absl/log/internal/check_op.h +++ b/third_party/abseil-cpp/absl/log/internal/check_op.h
@@ -65,6 +65,7 @@ ::absl::log_internal::GetReferenceableValue(val2), \ ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text \ " " #op " " val2_text))) \ + ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true) \ ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream() #define ABSL_LOG_INTERNAL_QCHECK_OP(name, op, val1, val1_text, val2, \ val2_text) \ @@ -74,6 +75,7 @@ ::absl::log_internal::GetReferenceableValue(val2), \ ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL( \ val1_text " " #op " " val2_text))) \ + ABSL_LOG_INTERNAL_CONDITION_QFATAL(STATELESS, true) \ ABSL_LOG_INTERNAL_QCHECK(*absl_log_internal_qcheck_op_result).InternalStream() #define ABSL_LOG_INTERNAL_CHECK_STROP(func, op, expected, s1, s1_text, s2, \ s2_text) \ @@ -82,6 +84,7 @@ (s1), (s2), \ ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(s1_text " " #op \ " " s2_text))) \ + ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true) \ ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_strop_result) \ .InternalStream() #define ABSL_LOG_INTERNAL_QCHECK_STROP(func, op, expected, s1, s1_text, s2, \ @@ -91,6 +94,7 @@ (s1), (s2), \ ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(s1_text " " #op \ " " s2_text))) \ + ABSL_LOG_INTERNAL_CONDITION_QFATAL(STATELESS, true) \ ABSL_LOG_INTERNAL_QCHECK(*absl_log_internal_qcheck_strop_result) \ .InternalStream() // This one is tricky: @@ -113,6 +117,10 @@ // * As usual, no braces so we can stream into the expansion with `operator<<`. // * Also as usual, it must expand to a single (partial) statement with no // ambiguous-else problems. +// * When stripped by `ABSL_MIN_LOG_LEVEL`, we must discard the `<expr> is OK` +// string literal and abort without doing any streaming. We don't need to +// strip the call to stringify the non-ok `Status` as long as we don't log it; +// dropping the `Status`'s message text is out of scope. #define ABSL_LOG_INTERNAL_CHECK_OK(val, val_text) \ for (::std::pair<const ::absl::Status*, ::std::string*> \ absl_log_internal_check_ok_goo; \ @@ -126,22 +134,24 @@ ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val_text \ " is OK")), \ !ABSL_PREDICT_TRUE(absl_log_internal_check_ok_goo.first->ok());) \ + ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true) \ ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_ok_goo.second) \ .InternalStream() -#define ABSL_LOG_INTERNAL_QCHECK_OK(val, val_text) \ - for (::std::pair<const ::absl::Status*, ::std::string*> \ - absl_log_internal_check_ok_goo; \ - absl_log_internal_check_ok_goo.first = \ - ::absl::log_internal::AsStatus(val), \ - absl_log_internal_check_ok_goo.second = \ - ABSL_PREDICT_TRUE(absl_log_internal_check_ok_goo.first->ok()) \ - ? nullptr \ - : ::absl::status_internal::MakeCheckFailString( \ - absl_log_internal_check_ok_goo.first, \ - ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val_text \ - " is OK")), \ - !ABSL_PREDICT_TRUE(absl_log_internal_check_ok_goo.first->ok());) \ - ABSL_LOG_INTERNAL_QCHECK(*absl_log_internal_check_ok_goo.second) \ +#define ABSL_LOG_INTERNAL_QCHECK_OK(val, val_text) \ + for (::std::pair<const ::absl::Status*, ::std::string*> \ + absl_log_internal_qcheck_ok_goo; \ + absl_log_internal_qcheck_ok_goo.first = \ + ::absl::log_internal::AsStatus(val), \ + absl_log_internal_qcheck_ok_goo.second = \ + ABSL_PREDICT_TRUE(absl_log_internal_qcheck_ok_goo.first->ok()) \ + ? nullptr \ + : ::absl::status_internal::MakeCheckFailString( \ + absl_log_internal_qcheck_ok_goo.first, \ + ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val_text \ + " is OK")), \ + !ABSL_PREDICT_TRUE(absl_log_internal_qcheck_ok_goo.first->ok());) \ + ABSL_LOG_INTERNAL_CONDITION_QFATAL(STATELESS, true) \ + ABSL_LOG_INTERNAL_QCHECK(*absl_log_internal_qcheck_ok_goo.second) \ .InternalStream() namespace absl { @@ -152,8 +162,8 @@ class StatusOr; namespace status_internal { -std::string* MakeCheckFailString(const absl::Status* status, - const char* prefix); +ABSL_ATTRIBUTE_PURE_FUNCTION std::string* MakeCheckFailString( + const absl::Status* status, const char* prefix); } // namespace status_internal namespace log_internal {
diff --git a/third_party/abseil-cpp/absl/log/internal/conditions.h b/third_party/abseil-cpp/absl/log/internal/conditions.h index 41f6721..45a17b0 100644 --- a/third_party/abseil-cpp/absl/log/internal/conditions.h +++ b/third_party/abseil-cpp/absl/log/internal/conditions.h
@@ -68,7 +68,7 @@ !(condition) ? (void)0 : ::absl::log_internal::Voidify()&& // `ABSL_LOG_INTERNAL_STATEFUL_CONDITION` applies a condition like -// `ABSL_LOG_INTERNAL_CONDITION` but adds to that a series of variable +// `ABSL_LOG_INTERNAL_STATELESS_CONDITION` but adds to that a series of variable // declarations, including a local static object which stores the state needed // to implement the stateful macros like `LOG_EVERY_N`. // @@ -147,20 +147,20 @@ (::absl::kLogDebugFatal == ::absl::LogSeverity::kFatal && \ (::absl::log_internal::AbortQuietly(), false))))) -#define ABSL_LOG_INTERNAL_CONDITION_LEVEL(severity) \ - for (int log_internal_severity_loop = 1; log_internal_severity_loop; \ - log_internal_severity_loop = 0) \ - for (const absl::LogSeverity log_internal_severity = \ - ::absl::NormalizeLogSeverity(severity); \ - log_internal_severity_loop; log_internal_severity_loop = 0) \ +#define ABSL_LOG_INTERNAL_CONDITION_LEVEL(severity) \ + for (int absl_log_internal_severity_loop = 1; \ + absl_log_internal_severity_loop; absl_log_internal_severity_loop = 0) \ + for (const absl::LogSeverity absl_log_internal_severity = \ + ::absl::NormalizeLogSeverity(severity); \ + absl_log_internal_severity_loop; absl_log_internal_severity_loop = 0) \ ABSL_LOG_INTERNAL_CONDITION_LEVEL_IMPL -#define ABSL_LOG_INTERNAL_CONDITION_LEVEL_IMPL(type, condition) \ - ABSL_LOG_INTERNAL_##type##_CONDITION( \ - (condition) && \ - (log_internal_severity >= \ - static_cast<::absl::LogSeverity>(ABSL_MIN_LOG_LEVEL) || \ - (log_internal_severity == ::absl::LogSeverity::kFatal && \ - (::absl::log_internal::AbortQuietly(), false)))) +#define ABSL_LOG_INTERNAL_CONDITION_LEVEL_IMPL(type, condition) \ + ABSL_LOG_INTERNAL_##type##_CONDITION(( \ + (condition) && \ + (absl_log_internal_severity >= \ + static_cast<::absl::LogSeverity>(ABSL_MIN_LOG_LEVEL) || \ + (absl_log_internal_severity == ::absl::LogSeverity::kFatal && \ + (::absl::log_internal::AbortQuietly(), false))))) #else // ndef ABSL_MIN_LOG_LEVEL #define ABSL_LOG_INTERNAL_CONDITION_INFO(type, condition) \ ABSL_LOG_INTERNAL_##type##_CONDITION(condition) @@ -174,12 +174,12 @@ ABSL_LOG_INTERNAL_##type##_CONDITION(condition) #define ABSL_LOG_INTERNAL_CONDITION_DFATAL(type, condition) \ ABSL_LOG_INTERNAL_##type##_CONDITION(condition) -#define ABSL_LOG_INTERNAL_CONDITION_LEVEL(severity) \ - for (int log_internal_severity_loop = 1; log_internal_severity_loop; \ - log_internal_severity_loop = 0) \ - for (const absl::LogSeverity log_internal_severity = \ - ::absl::NormalizeLogSeverity(severity); \ - log_internal_severity_loop; log_internal_severity_loop = 0) \ +#define ABSL_LOG_INTERNAL_CONDITION_LEVEL(severity) \ + for (int absl_log_internal_severity_loop = 1; \ + absl_log_internal_severity_loop; absl_log_internal_severity_loop = 0) \ + for (const absl::LogSeverity absl_log_internal_severity = \ + ::absl::NormalizeLogSeverity(severity); \ + absl_log_internal_severity_loop; absl_log_internal_severity_loop = 0) \ ABSL_LOG_INTERNAL_CONDITION_LEVEL_IMPL #define ABSL_LOG_INTERNAL_CONDITION_LEVEL_IMPL(type, condition) \ ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
diff --git a/third_party/abseil-cpp/absl/log/internal/log_message.h b/third_party/abseil-cpp/absl/log/internal/log_message.h index 4693772..c94d0530 100644 --- a/third_party/abseil-cpp/absl/log/internal/log_message.h +++ b/third_party/abseil-cpp/absl/log/internal/log_message.h
@@ -40,7 +40,7 @@ #include "absl/log/internal/nullguard.h" #include "absl/log/log_entry.h" #include "absl/log/log_sink.h" -#include "absl/strings/internal/has_absl_stringify.h" +#include "absl/strings/has_absl_stringify.h" #include "absl/strings/string_view.h" #include "absl/time/time.h" @@ -170,15 +170,13 @@ // Types that support `AbslStringify()` are serialized that way. template <typename T, - typename std::enable_if< - strings_internal::HasAbslStringify<T>::value, int>::type = 0> + typename std::enable_if<HasAbslStringify<T>::value, int>::type = 0> LogMessage& operator<<(const T& v) ABSL_ATTRIBUTE_NOINLINE; // Types that don't support `AbslStringify()` but do support streaming into a // `std::ostream&` are serialized that way. template <typename T, - typename std::enable_if< - !strings_internal::HasAbslStringify<T>::value, int>::type = 0> + typename std::enable_if<!HasAbslStringify<T>::value, int>::type = 0> LogMessage& operator<<(const T& v) ABSL_ATTRIBUTE_NOINLINE; // Note: We explicitly do not support `operator<<` for non-const references @@ -283,8 +281,7 @@ // Note: the following is declared `ABSL_ATTRIBUTE_NOINLINE` template <typename T, - typename std::enable_if<strings_internal::HasAbslStringify<T>::value, - int>::type> + typename std::enable_if<HasAbslStringify<T>::value, int>::type> LogMessage& LogMessage::operator<<(const T& v) { StringifySink sink(*this); // Replace with public API. @@ -294,8 +291,7 @@ // Note: the following is declared `ABSL_ATTRIBUTE_NOINLINE` template <typename T, - typename std::enable_if<!strings_internal::HasAbslStringify<T>::value, - int>::type> + typename std::enable_if<!HasAbslStringify<T>::value, int>::type> LogMessage& LogMessage::operator<<(const T& v) { OstreamView view(*data_); view.stream() << log_internal::NullGuard<T>().Guard(v);
diff --git a/third_party/abseil-cpp/absl/log/internal/strip.h b/third_party/abseil-cpp/absl/log/internal/strip.h index adc86ffd..f8d27869 100644 --- a/third_party/abseil-cpp/absl/log/internal/strip.h +++ b/third_party/abseil-cpp/absl/log/internal/strip.h
@@ -37,7 +37,7 @@ #define ABSL_LOGGING_INTERNAL_LOG_DFATAL \ ::absl::log_internal::NullStreamMaybeFatal(::absl::kLogDebugFatal) #define ABSL_LOGGING_INTERNAL_LOG_LEVEL(severity) \ - ::absl::log_internal::NullStreamMaybeFatal(log_internal_severity) + ::absl::log_internal::NullStreamMaybeFatal(absl_log_internal_severity) #define ABSL_LOG_INTERNAL_CHECK(failure_message) ABSL_LOGGING_INTERNAL_LOG_FATAL #define ABSL_LOG_INTERNAL_QCHECK(failure_message) \ ABSL_LOGGING_INTERNAL_LOG_QFATAL @@ -57,8 +57,9 @@ ::absl::log_internal::LogMessageQuietlyFatal(__FILE__, __LINE__) #define ABSL_LOGGING_INTERNAL_LOG_DFATAL \ ::absl::log_internal::LogMessage(__FILE__, __LINE__, ::absl::kLogDebugFatal) -#define ABSL_LOGGING_INTERNAL_LOG_LEVEL(severity) \ - ::absl::log_internal::LogMessage(__FILE__, __LINE__, log_internal_severity) +#define ABSL_LOGGING_INTERNAL_LOG_LEVEL(severity) \ + ::absl::log_internal::LogMessage(__FILE__, __LINE__, \ + absl_log_internal_severity) // These special cases dispatch to special-case constructors that allow us to // avoid an extra function call and shrink non-LTO binaries by a percent or so. #define ABSL_LOG_INTERNAL_CHECK(failure_message) \
diff --git a/third_party/abseil-cpp/absl/log/stripping_test.cc b/third_party/abseil-cpp/absl/log/stripping_test.cc index 35357039..271fae1d 100644 --- a/third_party/abseil-cpp/absl/log/stripping_test.cc +++ b/third_party/abseil-cpp/absl/log/stripping_test.cc
@@ -54,6 +54,7 @@ #include "absl/log/check.h" #include "absl/log/internal/test_helpers.h" #include "absl/log/log.h" +#include "absl/status/status.h" #include "absl/strings/escaping.h" #include "absl/strings/str_format.h" #include "absl/strings/string_view.h" @@ -414,4 +415,88 @@ } } +TEST_F(StrippingTest, CheckOp) { + // See `StrippingTest.Check` for some hairy implementation notes. + const std::string var_needle1 = + absl::Base64Escape("StrippingTestCheckOpVar1"); + const std::string var_needle2 = + absl::Base64Escape("StrippingTestCheckOpVar2"); + const std::string msg_needle = absl::Base64Escape("StrippingTest.CheckOp"); + volatile int U3RyaXBwaW5nVGVzdENoZWNrT3BWYXIx = 0xFEED; + volatile int U3RyaXBwaW5nVGVzdENoZWNrT3BWYXIy = 0xCAFE; + if (kReallyDie) { + CHECK_EQ(U3RyaXBwaW5nVGVzdENoZWNrT3BWYXIx, U3RyaXBwaW5nVGVzdENoZWNrT3BWYXIy) + << "U3RyaXBwaW5nVGVzdC5DaGVja09w"; + } + + std::unique_ptr<FILE, std::function<void(FILE*)>> exe = OpenTestExecutable(); + ASSERT_THAT(exe, NotNull()); + + if (absl::LogSeverity::kFatal >= kAbslMinLogLevel) { + EXPECT_THAT(exe.get(), FileHasSubstr(var_needle1)); + EXPECT_THAT(exe.get(), FileHasSubstr(var_needle2)); + EXPECT_THAT(exe.get(), FileHasSubstr(msg_needle)); + } else { + EXPECT_THAT(exe.get(), Not(FileHasSubstr(var_needle1))); + EXPECT_THAT(exe.get(), Not(FileHasSubstr(var_needle2))); + EXPECT_THAT(exe.get(), Not(FileHasSubstr(msg_needle))); + } +} + +TEST_F(StrippingTest, CheckStrOp) { + // See `StrippingTest.Check` for some hairy implementation notes. + const std::string var_needle1 = + absl::Base64Escape("StrippingTestCheckStrOpVar1"); + const std::string var_needle2 = + absl::Base64Escape("StrippingTestCheckStrOpVar2"); + const std::string msg_needle = absl::Base64Escape("StrippingTest.CheckStrOp"); + const char *volatile U3RyaXBwaW5nVGVzdENoZWNrU3RyT3BWYXIx = "FEED"; + const char *volatile U3RyaXBwaW5nVGVzdENoZWNrU3RyT3BWYXIy = "CAFE"; + if (kReallyDie) { + CHECK_STREQ(U3RyaXBwaW5nVGVzdENoZWNrU3RyT3BWYXIx, + U3RyaXBwaW5nVGVzdENoZWNrU3RyT3BWYXIy) + << "U3RyaXBwaW5nVGVzdC5DaGVja1N0ck9w"; + } + + std::unique_ptr<FILE, std::function<void(FILE*)>> exe = OpenTestExecutable(); + ASSERT_THAT(exe, NotNull()); + + if (absl::LogSeverity::kFatal >= kAbslMinLogLevel) { + EXPECT_THAT(exe.get(), FileHasSubstr(var_needle1)); + EXPECT_THAT(exe.get(), FileHasSubstr(var_needle2)); + EXPECT_THAT(exe.get(), FileHasSubstr(msg_needle)); + } else { + EXPECT_THAT(exe.get(), Not(FileHasSubstr(var_needle1))); + EXPECT_THAT(exe.get(), Not(FileHasSubstr(var_needle2))); + EXPECT_THAT(exe.get(), Not(FileHasSubstr(msg_needle))); + } +} + +TEST_F(StrippingTest, CheckOk) { + // See `StrippingTest.Check` for some hairy implementation notes. + const std::string var_needle = absl::Base64Escape("StrippingTestCheckOkVar1"); + const std::string msg_needle = absl::Base64Escape("StrippingTest.CheckOk"); + volatile bool x = false; + auto U3RyaXBwaW5nVGVzdENoZWNrT2tWYXIx = absl::OkStatus(); + if (x) { + U3RyaXBwaW5nVGVzdENoZWNrT2tWYXIx = + absl::InvalidArgumentError("Stripping this is not my job!"); + } + if (kReallyDie) { + CHECK_OK(U3RyaXBwaW5nVGVzdENoZWNrT2tWYXIx) + << "U3RyaXBwaW5nVGVzdC5DaGVja09r"; + } + + std::unique_ptr<FILE, std::function<void(FILE*)>> exe = OpenTestExecutable(); + ASSERT_THAT(exe, NotNull()); + + if (absl::LogSeverity::kFatal >= kAbslMinLogLevel) { + EXPECT_THAT(exe.get(), FileHasSubstr(var_needle)); + EXPECT_THAT(exe.get(), FileHasSubstr(msg_needle)); + } else { + EXPECT_THAT(exe.get(), Not(FileHasSubstr(var_needle))); + EXPECT_THAT(exe.get(), Not(FileHasSubstr(msg_needle))); + } +} + } // namespace
diff --git a/third_party/abseil-cpp/absl/numeric/bits.h b/third_party/abseil-cpp/absl/numeric/bits.h index 4b90d3f..c76454c8 100644 --- a/third_party/abseil-cpp/absl/numeric/bits.h +++ b/third_party/abseil-cpp/absl/numeric/bits.h
@@ -54,11 +54,8 @@ // libc++ had the wrong signature for std::rotl and std::rotr // prior to libc++ 18.0. // -// b/289016048 requires a workaround for _LIBCPP_GOOGLE3. -#if (defined(__cpp_lib_bitops) && __cpp_lib_bitops >= 201907L) && \ - (!defined(_LIBCPP_VERSION) || _LIBCPP_VERSION >= 180000) && \ - !defined(_LIBCPP_GOOGLE3) - +#if (defined(__cpp_lib_bitops) && __cpp_lib_bitops >= 201907L) && \ + (!defined(_LIBCPP_VERSION) || _LIBCPP_VERSION >= 180000) using std::rotl; using std::rotr; @@ -81,9 +78,11 @@ #endif -// b/289016048 requires a workaround for _LIBCPP_GOOGLE3. -#if (defined(__cpp_lib_bitops) && __cpp_lib_bitops >= 201907L) && \ - !defined(_LIBCPP_GOOGLE3) +// https://github.com/llvm/llvm-project/issues/64544 +// libc++ had the wrong signature for std::rotl and std::rotr +// prior to libc++ 18.0. +// +#if (defined(__cpp_lib_bitops) && __cpp_lib_bitops >= 201907L) using std::countl_one; using std::countl_zero; @@ -137,9 +136,7 @@ #endif -// b/289016048 requires a workaround for _LIBCPP_GOOGLE3. -#if (defined(__cpp_lib_int_pow2) && __cpp_lib_int_pow2 >= 202002L) && \ - !defined(_LIBCPP_GOOGLE3) +#if (defined(__cpp_lib_int_pow2) && __cpp_lib_int_pow2 >= 202002L) using std::bit_ceil; using std::bit_floor;
diff --git a/third_party/abseil-cpp/absl/status/BUILD.bazel b/third_party/abseil-cpp/absl/status/BUILD.bazel index 6a6fb29..5be5c21 100644 --- a/third_party/abseil-cpp/absl/status/BUILD.bazel +++ b/third_party/abseil-cpp/absl/status/BUILD.bazel
@@ -31,6 +31,7 @@ cc_library( name = "status", srcs = [ + "internal/status_internal.cc", "internal/status_internal.h", "status.cc", "status_payload_printer.cc",
diff --git a/third_party/abseil-cpp/absl/status/BUILD.gn b/third_party/abseil-cpp/absl/status/BUILD.gn index 73aa269..891baaf2 100644 --- a/third_party/abseil-cpp/absl/status/BUILD.gn +++ b/third_party/abseil-cpp/absl/status/BUILD.gn
@@ -10,6 +10,7 @@ "status_payload_printer.h", ] sources = [ + "internal/status_internal.cc", "internal/status_internal.h", "status.cc", "status_payload_printer.cc",
diff --git a/third_party/abseil-cpp/absl/status/CMakeLists.txt b/third_party/abseil-cpp/absl/status/CMakeLists.txt index ed2e384..f369e341 100644 --- a/third_party/abseil-cpp/absl/status/CMakeLists.txt +++ b/third_party/abseil-cpp/absl/status/CMakeLists.txt
@@ -20,6 +20,7 @@ "status.h" SRCS "internal/status_internal.h" + "internal/status_internal.cc" "status.cc" "status_payload_printer.h" "status_payload_printer.cc"
diff --git a/third_party/abseil-cpp/absl/status/internal/status_internal.cc b/third_party/abseil-cpp/absl/status/internal/status_internal.cc new file mode 100644 index 0000000..2307579 --- /dev/null +++ b/third_party/abseil-cpp/absl/status/internal/status_internal.cc
@@ -0,0 +1,246 @@ +// Copyright 2023 The Abseil Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "absl/status/internal/status_internal.h" + +#include <atomic> +#include <cassert> +#include <cstddef> +#include <cstdint> +#include <cstdio> +#include <cstring> +#include <memory> +#include <string> +#include <utility> + +#include "absl/base/attributes.h" +#include "absl/base/config.h" +#include "absl/base/macros.h" +#include "absl/debugging/stacktrace.h" +#include "absl/debugging/symbolize.h" +#include "absl/memory/memory.h" +#include "absl/status/status.h" +#include "absl/status/status_payload_printer.h" +#include "absl/strings/cord.h" +#include "absl/strings/escaping.h" +#include "absl/strings/str_cat.h" +#include "absl/strings/str_format.h" +#include "absl/strings/str_split.h" +#include "absl/strings/string_view.h" +#include "absl/types/optional.h" + +namespace absl { +ABSL_NAMESPACE_BEGIN +namespace status_internal { + +void StatusRep::Unref() const { + // Fast path: if ref==1, there is no need for a RefCountDec (since + // this is the only reference and therefore no other thread is + // allowed to be mucking with r). + if (ref_.load(std::memory_order_acquire) == 1 || + ref_.fetch_sub(1, std::memory_order_acq_rel) - 1 == 0) { + delete this; + } +} + +static absl::optional<size_t> FindPayloadIndexByUrl( + const Payloads* payloads, absl::string_view type_url) { + if (payloads == nullptr) return absl::nullopt; + + for (size_t i = 0; i < payloads->size(); ++i) { + if ((*payloads)[i].type_url == type_url) return i; + } + + return absl::nullopt; +} + +absl::optional<absl::Cord> StatusRep::GetPayload( + absl::string_view type_url) const { + absl::optional<size_t> index = + status_internal::FindPayloadIndexByUrl(payloads_.get(), type_url); + if (index.has_value()) return (*payloads_)[index.value()].payload; + + return absl::nullopt; +} + +void StatusRep::SetPayload(absl::string_view type_url, absl::Cord payload) { + if (payloads_ == nullptr) { + payloads_ = absl::make_unique<status_internal::Payloads>(); + } + + absl::optional<size_t> index = + status_internal::FindPayloadIndexByUrl(payloads_.get(), type_url); + if (index.has_value()) { + (*payloads_)[index.value()].payload = std::move(payload); + return; + } + + payloads_->push_back({std::string(type_url), std::move(payload)}); +} + +StatusRep::EraseResult StatusRep::ErasePayload(absl::string_view type_url) { + absl::optional<size_t> index = + status_internal::FindPayloadIndexByUrl(payloads_.get(), type_url); + if (!index.has_value()) return {false, Status::PointerToRep(this)}; + payloads_->erase(payloads_->begin() + index.value()); + if (payloads_->empty() && message_.empty()) { + // Special case: If this can be represented inlined, it MUST be inlined + // (== depends on this behavior). + EraseResult result = {true, Status::CodeToInlinedRep(code_)}; + Unref(); + return result; + } + return {true, Status::PointerToRep(this)}; +} + +void StatusRep::ForEachPayload( + absl::FunctionRef<void(absl::string_view, const absl::Cord&)> visitor) + const { + if (auto* payloads = payloads_.get()) { + bool in_reverse = + payloads->size() > 1 && reinterpret_cast<uintptr_t>(payloads) % 13 > 6; + + for (size_t index = 0; index < payloads->size(); ++index) { + const auto& elem = + (*payloads)[in_reverse ? payloads->size() - 1 - index : index]; + +#ifdef NDEBUG + visitor(elem.type_url, elem.payload); +#else + // In debug mode invalidate the type url to prevent users from relying on + // this string lifetime. + + // NOLINTNEXTLINE intentional extra conversion to force temporary. + visitor(std::string(elem.type_url), elem.payload); +#endif // NDEBUG + } + } +} + +std::string StatusRep::ToString(StatusToStringMode mode) const { + std::string text; + absl::StrAppend(&text, absl::StatusCodeToString(code()), ": ", message()); + + const bool with_payload = (mode & StatusToStringMode::kWithPayload) == + StatusToStringMode::kWithPayload; + + if (with_payload) { + status_internal::StatusPayloadPrinter printer = + status_internal::GetStatusPayloadPrinter(); + this->ForEachPayload([&](absl::string_view type_url, + const absl::Cord& payload) { + absl::optional<std::string> result; + if (printer) result = printer(type_url, payload); + absl::StrAppend( + &text, " [", type_url, "='", + result.has_value() ? *result : absl::CHexEscape(std::string(payload)), + "']"); + }); + } + + return text; +} + +bool StatusRep::operator==(const StatusRep& other) const { + assert(this != &other); + if (code_ != other.code_) return false; + if (message_ != other.message_) return false; + const status_internal::Payloads* this_payloads = payloads_.get(); + const status_internal::Payloads* other_payloads = other.payloads_.get(); + + const status_internal::Payloads no_payloads; + const status_internal::Payloads* larger_payloads = + this_payloads ? this_payloads : &no_payloads; + const status_internal::Payloads* smaller_payloads = + other_payloads ? other_payloads : &no_payloads; + if (larger_payloads->size() < smaller_payloads->size()) { + std::swap(larger_payloads, smaller_payloads); + } + if ((larger_payloads->size() - smaller_payloads->size()) > 1) return false; + // Payloads can be ordered differently, so we can't just compare payload + // vectors. + for (const auto& payload : *larger_payloads) { + + bool found = false; + for (const auto& other_payload : *smaller_payloads) { + if (payload.type_url == other_payload.type_url) { + if (payload.payload != other_payload.payload) { + return false; + } + found = true; + break; + } + } + if (!found) return false; + } + return true; +} + +StatusRep* StatusRep::CloneAndUnref() const { + // Optimization: no need to create a clone if we already have a refcount of 1. + if (ref_.load(std::memory_order_acquire) == 1) { + // All StatusRep instances are heap allocated and mutable, therefore this + // const_cast will never cast away const from a stack instance. + // + // CloneAndUnref is the only method that doesn't involve an external cast to + // get a mutable StatusRep* from the uintptr_t rep stored in Status. + return const_cast<StatusRep*>(this); + } + std::unique_ptr<status_internal::Payloads> payloads; + if (payloads_) { + payloads = absl::make_unique<status_internal::Payloads>(*payloads_); + } + auto* new_rep = new StatusRep(code_, message_, std::move(payloads)); + Unref(); + return new_rep; +} + +// Convert canonical code to a value known to this binary. +absl::StatusCode MapToLocalCode(int value) { + absl::StatusCode code = static_cast<absl::StatusCode>(value); + switch (code) { + case absl::StatusCode::kOk: + case absl::StatusCode::kCancelled: + case absl::StatusCode::kUnknown: + case absl::StatusCode::kInvalidArgument: + case absl::StatusCode::kDeadlineExceeded: + case absl::StatusCode::kNotFound: + case absl::StatusCode::kAlreadyExists: + case absl::StatusCode::kPermissionDenied: + case absl::StatusCode::kResourceExhausted: + case absl::StatusCode::kFailedPrecondition: + case absl::StatusCode::kAborted: + case absl::StatusCode::kOutOfRange: + case absl::StatusCode::kUnimplemented: + case absl::StatusCode::kInternal: + case absl::StatusCode::kUnavailable: + case absl::StatusCode::kDataLoss: + case absl::StatusCode::kUnauthenticated: + return code; + default: + return absl::StatusCode::kUnknown; + } +} + +std::string* MakeCheckFailString(const absl::Status* status, + const char* prefix) { + return new std::string( + absl::StrCat(prefix, " (", + status->ToString(StatusToStringMode::kWithEverything), ")")); +} + +} // namespace status_internal + +ABSL_NAMESPACE_END +} // namespace absl
diff --git a/third_party/abseil-cpp/absl/status/internal/status_internal.h b/third_party/abseil-cpp/absl/status/internal/status_internal.h index 6198e726..a445ce3 100644 --- a/third_party/abseil-cpp/absl/status/internal/status_internal.h +++ b/third_party/abseil-cpp/absl/status/internal/status_internal.h
@@ -14,13 +14,18 @@ #ifndef ABSL_STATUS_INTERNAL_STATUS_INTERNAL_H_ #define ABSL_STATUS_INTERNAL_STATUS_INTERNAL_H_ +#include <atomic> +#include <cstdint> #include <memory> #include <string> #include <utility> #include "absl/base/attributes.h" +#include "absl/base/config.h" #include "absl/container/inlined_vector.h" #include "absl/strings/cord.h" +#include "absl/strings/string_view.h" +#include "absl/types/optional.h" #ifndef SWIG // Disabled for SWIG as it doesn't parse attributes correctly. @@ -44,6 +49,7 @@ ABSL_NAMESPACE_BEGIN enum class StatusCode : int; +enum class StatusToStringMode : int; namespace status_internal { @@ -56,22 +62,54 @@ using Payloads = absl::InlinedVector<Payload, 1>; // Reference-counted representation of Status data. -struct StatusRep { +class StatusRep { + public: StatusRep(absl::StatusCode code_arg, absl::string_view message_arg, std::unique_ptr<status_internal::Payloads> payloads_arg) - : ref(int32_t{1}), - code(code_arg), - message(message_arg), - payloads(std::move(payloads_arg)) {} + : ref_(int32_t{1}), + code_(code_arg), + message_(message_arg), + payloads_(std::move(payloads_arg)) {} - std::atomic<int32_t> ref; - absl::StatusCode code; + absl::StatusCode code() const { return code_; } + const std::string& message() const { return message_; } + + // Ref and unref are const to allow access through a const pointer, and are + // used during copying operations. + void Ref() const { ref_.fetch_add(1, std::memory_order_relaxed); } + void Unref() const; + + // Payload methods correspond to the same methods in absl::Status. + absl::optional<absl::Cord> GetPayload(absl::string_view type_url) const; + void SetPayload(absl::string_view type_url, absl::Cord payload); + struct EraseResult { + bool erased; + uintptr_t new_rep; + }; + EraseResult ErasePayload(absl::string_view type_url); + void ForEachPayload( + absl::FunctionRef<void(absl::string_view, const absl::Cord&)> visitor) + const; + + std::string ToString(StatusToStringMode mode) const; + + bool operator==(const StatusRep& other) const; + bool operator!=(const StatusRep& other) const { return !(*this == other); } + + // Returns an equivalent heap allocated StatusRep with refcount 1. + // + // `this` is not safe to be used after calling as it may have been deleted. + StatusRep* CloneAndUnref() const; + + private: + mutable std::atomic<int32_t> ref_; + absl::StatusCode code_; // As an internal implementation detail, we guarantee that if status.message() // is non-empty, then the resulting string_view is null terminated. // This is required to implement 'StatusMessageAsCStr(...)' - std::string message; - std::unique_ptr<status_internal::Payloads> payloads; + std::string message_; + std::unique_ptr<status_internal::Payloads> payloads_; }; absl::StatusCode MapToLocalCode(int value); @@ -80,6 +118,7 @@ // suitable for output as an error message in assertion/`CHECK()` failures. // // This is an internal implementation detail for Abseil logging. +ABSL_ATTRIBUTE_PURE_FUNCTION std::string* MakeCheckFailString(const absl::Status* status, const char* prefix);
diff --git a/third_party/abseil-cpp/absl/status/status.cc b/third_party/abseil-cpp/absl/status/status.cc index 911f4b2..7eb5d66 100644 --- a/third_party/abseil-cpp/absl/status/status.cc +++ b/third_party/abseil-cpp/absl/status/status.cc
@@ -22,7 +22,6 @@ #include <memory> #include <ostream> #include <string> -#include <utility> #include "absl/base/attributes.h" #include "absl/base/config.h" @@ -31,17 +30,12 @@ #include "absl/base/macros.h" #include "absl/debugging/stacktrace.h" #include "absl/debugging/symbolize.h" -#include "absl/functional/function_ref.h" -#include "absl/memory/memory.h" #include "absl/status/internal/status_internal.h" -#include "absl/status/status_payload_printer.h" -#include "absl/strings/escaping.h" #include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include "absl/strings/str_split.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" -#include "absl/types/span.h" namespace absl { ABSL_NAMESPACE_BEGIN @@ -95,120 +89,6 @@ return os << StatusCodeToString(code); } -namespace status_internal { - -static absl::optional<size_t> FindPayloadIndexByUrl( - const Payloads* payloads, absl::string_view type_url) { - if (payloads == nullptr) return absl::nullopt; - - for (size_t i = 0; i < payloads->size(); ++i) { - if ((*payloads)[i].type_url == type_url) return i; - } - - return absl::nullopt; -} - -// Convert canonical code to a value known to this binary. -absl::StatusCode MapToLocalCode(int value) { - absl::StatusCode code = static_cast<absl::StatusCode>(value); - switch (code) { - case absl::StatusCode::kOk: - case absl::StatusCode::kCancelled: - case absl::StatusCode::kUnknown: - case absl::StatusCode::kInvalidArgument: - case absl::StatusCode::kDeadlineExceeded: - case absl::StatusCode::kNotFound: - case absl::StatusCode::kAlreadyExists: - case absl::StatusCode::kPermissionDenied: - case absl::StatusCode::kResourceExhausted: - case absl::StatusCode::kFailedPrecondition: - case absl::StatusCode::kAborted: - case absl::StatusCode::kOutOfRange: - case absl::StatusCode::kUnimplemented: - case absl::StatusCode::kInternal: - case absl::StatusCode::kUnavailable: - case absl::StatusCode::kDataLoss: - case absl::StatusCode::kUnauthenticated: - return code; - default: - return absl::StatusCode::kUnknown; - } -} -} // namespace status_internal - -absl::optional<absl::Cord> Status::GetPayload( - absl::string_view type_url) const { - const auto* payloads = GetPayloads(); - absl::optional<size_t> index = - status_internal::FindPayloadIndexByUrl(payloads, type_url); - if (index.has_value()) return (*payloads)[index.value()].payload; - - return absl::nullopt; -} - -void Status::SetPayload(absl::string_view type_url, absl::Cord payload) { - if (ok()) return; - - PrepareToModify(); - - status_internal::StatusRep* rep = RepToPointer(rep_); - if (!rep->payloads) { - rep->payloads = absl::make_unique<status_internal::Payloads>(); - } - - absl::optional<size_t> index = - status_internal::FindPayloadIndexByUrl(rep->payloads.get(), type_url); - if (index.has_value()) { - (*rep->payloads)[index.value()].payload = std::move(payload); - return; - } - - rep->payloads->push_back({std::string(type_url), std::move(payload)}); -} - -bool Status::ErasePayload(absl::string_view type_url) { - absl::optional<size_t> index = - status_internal::FindPayloadIndexByUrl(GetPayloads(), type_url); - if (index.has_value()) { - PrepareToModify(); - GetPayloads()->erase(GetPayloads()->begin() + index.value()); - if (GetPayloads()->empty() && message().empty()) { - // Special case: If this can be represented inlined, it MUST be - // inlined (EqualsSlow depends on this behavior). - StatusCode c = static_cast<StatusCode>(raw_code()); - Unref(rep_); - rep_ = CodeToInlinedRep(c); - } - return true; - } - - return false; -} - -void Status::ForEachPayload( - absl::FunctionRef<void(absl::string_view, const absl::Cord&)> visitor) - const { - if (auto* payloads = GetPayloads()) { - bool in_reverse = - payloads->size() > 1 && reinterpret_cast<uintptr_t>(payloads) % 13 > 6; - - for (size_t index = 0; index < payloads->size(); ++index) { - const auto& elem = - (*payloads)[in_reverse ? payloads->size() - 1 - index : index]; - -#ifdef NDEBUG - visitor(elem.type_url, elem.payload); -#else - // In debug mode invalidate the type url to prevent users from relying on - // this string lifetime. - - // NOLINTNEXTLINE intentional extra conversion to force temporary. - visitor(std::string(elem.type_url), elem.payload); -#endif // NDEBUG - } - } -} - const std::string* Status::EmptyString() { static union EmptyString { std::string str; @@ -226,17 +106,6 @@ return moved_from_string; } -void Status::UnrefNonInlined(uintptr_t rep) { - status_internal::StatusRep* r = RepToPointer(rep); - // Fast path: if ref==1, there is no need for a RefCountDec (since - // this is the only reference and therefore no other thread is - // allowed to be mucking with r). - if (r->ref.load(std::memory_order_acquire) == 1 || - r->ref.fetch_sub(1, std::memory_order_acq_rel) - 1 == 0) { - delete r; - } -} - Status::Status(absl::StatusCode code, absl::string_view msg) : rep_(CodeToInlinedRep(code)) { if (code != absl::StatusCode::kOk && !msg.empty()) { @@ -244,97 +113,19 @@ } } -int Status::raw_code() const { - if (IsInlined(rep_)) { - return static_cast<int>(InlinedRepToCode(rep_)); +status_internal::StatusRep* Status::PrepareToModify(uintptr_t rep) { + if (IsInlined(rep)) { + return new status_internal::StatusRep(InlinedRepToCode(rep), + absl::string_view(), nullptr); } - status_internal::StatusRep* rep = RepToPointer(rep_); - return static_cast<int>(rep->code); + return RepToPointer(rep)->CloneAndUnref(); } -absl::StatusCode Status::code() const { - return status_internal::MapToLocalCode(raw_code()); -} - -void Status::PrepareToModify() { - ABSL_RAW_CHECK(!ok(), "PrepareToModify shouldn't be called on OK status."); - if (IsInlined(rep_)) { - rep_ = PointerToRep(new status_internal::StatusRep( - static_cast<absl::StatusCode>(raw_code()), absl::string_view(), - nullptr)); - return; +std::string Status::ToStringSlow(uintptr_t rep, StatusToStringMode mode) { + if (IsInlined(rep)) { + return absl::StrCat(absl::StatusCodeToString(InlinedRepToCode(rep)), ": "); } - - uintptr_t rep_i = rep_; - status_internal::StatusRep* rep = RepToPointer(rep_); - if (rep->ref.load(std::memory_order_acquire) != 1) { - std::unique_ptr<status_internal::Payloads> payloads; - if (rep->payloads) { - payloads = absl::make_unique<status_internal::Payloads>(*rep->payloads); - } - status_internal::StatusRep* const new_rep = new status_internal::StatusRep( - rep->code, message(), std::move(payloads)); - rep_ = PointerToRep(new_rep); - UnrefNonInlined(rep_i); - } -} - -bool Status::EqualsSlow(const absl::Status& a, const absl::Status& b) { - if (IsInlined(a.rep_) != IsInlined(b.rep_)) return false; - if (a.message() != b.message()) return false; - if (a.raw_code() != b.raw_code()) return false; - if (a.GetPayloads() == b.GetPayloads()) return true; - - const status_internal::Payloads no_payloads; - const status_internal::Payloads* larger_payloads = - a.GetPayloads() ? a.GetPayloads() : &no_payloads; - const status_internal::Payloads* smaller_payloads = - b.GetPayloads() ? b.GetPayloads() : &no_payloads; - if (larger_payloads->size() < smaller_payloads->size()) { - std::swap(larger_payloads, smaller_payloads); - } - if ((larger_payloads->size() - smaller_payloads->size()) > 1) return false; - // Payloads can be ordered differently, so we can't just compare payload - // vectors. - for (const auto& payload : *larger_payloads) { - - bool found = false; - for (const auto& other_payload : *smaller_payloads) { - if (payload.type_url == other_payload.type_url) { - if (payload.payload != other_payload.payload) { - return false; - } - found = true; - break; - } - } - if (!found) return false; - } - return true; -} - -std::string Status::ToStringSlow(StatusToStringMode mode) const { - std::string text; - absl::StrAppend(&text, absl::StatusCodeToString(code()), ": ", message()); - - const bool with_payload = (mode & StatusToStringMode::kWithPayload) == - StatusToStringMode::kWithPayload; - - if (with_payload) { - status_internal::StatusPayloadPrinter printer = - status_internal::GetStatusPayloadPrinter(); - this->ForEachPayload([&](absl::string_view type_url, - const absl::Cord& payload) { - absl::optional<std::string> result; - if (printer) result = printer(type_url, payload); - absl::StrAppend( - &text, " [", type_url, "='", - result.has_value() ? *result : absl::CHexEscape(std::string(payload)), - "']"); - }); - } - - return text; + return RepToPointer(rep)->ToString(mode); } std::ostream& operator<<(std::ostream& os, const Status& x) { @@ -623,17 +414,6 @@ MessageForErrnoToStatus(error_number, message)); } -namespace status_internal { - -std::string* MakeCheckFailString(const absl::Status* status, - const char* prefix) { - return new std::string( - absl::StrCat(prefix, " (", - status->ToString(StatusToStringMode::kWithEverything), ")")); -} - -} // namespace status_internal - const char* StatusMessageAsCStr(const Status& status) { // As an internal implementation detail, we guarantee that if status.message() // is non-empty, then the resulting string_view is null terminated.
diff --git a/third_party/abseil-cpp/absl/status/status.h b/third_party/abseil-cpp/absl/status/status.h index 805e4fb4..2f03bb64 100644 --- a/third_party/abseil-cpp/absl/status/status.h +++ b/third_party/abseil-cpp/absl/status/status.h
@@ -59,17 +59,15 @@ #include "absl/base/attributes.h" #include "absl/base/config.h" +#include "absl/base/macros.h" #include "absl/base/optimization.h" #include "absl/functional/function_ref.h" #include "absl/status/internal/status_internal.h" #include "absl/strings/cord.h" +#include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" -// TODO: danilchap - Remove include below when other third_party libraries -// stop silently rely on it. -#include "absl/strings/str_cat.h" - namespace absl { ABSL_NAMESPACE_BEGIN @@ -611,18 +609,15 @@ // code, and an empty error message. explicit Status(absl::StatusCode code); - static void UnrefNonInlined(uintptr_t rep); + // Underlying constructor for status from a rep_. + explicit Status(uintptr_t rep) : rep_(rep) {} + static void Ref(uintptr_t rep); static void Unref(uintptr_t rep); // REQUIRES: !ok() - // Ensures rep_ is not shared with any other Status. - void PrepareToModify(); - - const status_internal::Payloads* GetPayloads() const; - status_internal::Payloads* GetPayloads(); - - static bool EqualsSlow(const absl::Status& a, const absl::Status& b); + // Ensures rep is not inlined or shared with any other Status. + static status_internal::StatusRep* PrepareToModify(uintptr_t rep); // MSVC 14.0 limitation requires the const. static constexpr const char kMovedFromString[] = @@ -633,24 +628,24 @@ // Returns whether rep contains an inlined representation. // See rep_ for details. - static bool IsInlined(uintptr_t rep); + static constexpr bool IsInlined(uintptr_t rep); // Indicates whether this Status was the rhs of a move operation. See rep_ // for details. - static bool IsMovedFrom(uintptr_t rep); - static uintptr_t MovedFromRep(); + static constexpr bool IsMovedFrom(uintptr_t rep); + static constexpr uintptr_t MovedFromRep(); // Convert between error::Code and the inlined uintptr_t representation used // by rep_. See rep_ for details. - static uintptr_t CodeToInlinedRep(absl::StatusCode code); - static absl::StatusCode InlinedRepToCode(uintptr_t rep); + static constexpr uintptr_t CodeToInlinedRep(absl::StatusCode code); + static constexpr absl::StatusCode InlinedRepToCode(uintptr_t rep); // Converts between StatusRep* and the external uintptr_t representation used // by rep_. See rep_ for details. static uintptr_t PointerToRep(status_internal::StatusRep* r); - static status_internal::StatusRep* RepToPointer(uintptr_t r); + static const status_internal::StatusRep* RepToPointer(uintptr_t r); - std::string ToStringSlow(StatusToStringMode mode) const; + static std::string ToStringSlow(uintptr_t rep, StatusToStringMode mode); // Status supports two different representations. // - When the low bit is set it is an inlined representation. @@ -661,6 +656,8 @@ // In this case all the data comes from a heap allocated Rep object. // rep_ is a status_internal::StatusRep* pointer to that structure. uintptr_t rep_; + + friend class status_internal::StatusRep; }; // OkStatus() @@ -764,11 +761,11 @@ // Implementation details follow //------------------------------------------------------------------------------ -inline Status::Status() : rep_(CodeToInlinedRep(absl::StatusCode::kOk)) {} +inline Status::Status() : Status(absl::StatusCode::kOk) {} -inline Status::Status(absl::StatusCode code) : rep_(CodeToInlinedRep(code)) {} +inline Status::Status(absl::StatusCode code) : Status(CodeToInlinedRep(code)) {} -inline Status::Status(const Status& x) : rep_(x.rep_) { Ref(rep_); } +inline Status::Status(const Status& x) : Status(x.rep_) { Ref(rep_); } inline Status& Status::operator=(const Status& x) { uintptr_t old_rep = rep_; @@ -780,7 +777,7 @@ return *this; } -inline Status::Status(Status&& x) noexcept : rep_(x.rep_) { +inline Status::Status(Status&& x) noexcept : Status(x.rep_) { x.rep_ = MovedFromRep(); } @@ -812,15 +809,27 @@ return rep_ == CodeToInlinedRep(absl::StatusCode::kOk); } +inline absl::StatusCode Status::code() const { + return status_internal::MapToLocalCode(raw_code()); +} + +inline int Status::raw_code() const { + if (IsInlined(rep_)) return static_cast<int>(InlinedRepToCode(rep_)); + return static_cast<int>(RepToPointer(rep_)->code()); +} + inline absl::string_view Status::message() const { return !IsInlined(rep_) - ? RepToPointer(rep_)->message + ? RepToPointer(rep_)->message() : (IsMovedFrom(rep_) ? absl::string_view(kMovedFromString) : absl::string_view()); } inline bool operator==(const Status& lhs, const Status& rhs) { - return lhs.rep_ == rhs.rep_ || Status::EqualsSlow(lhs, rhs); + if (lhs.rep_ == rhs.rep_) return true; + if (Status::IsInlined(lhs.rep_)) return false; + if (Status::IsInlined(rhs.rep_)) return false; + return *Status::RepToPointer(lhs.rep_) == *Status::RepToPointer(rhs.rep_); } inline bool operator!=(const Status& lhs, const Status& rhs) { @@ -828,7 +837,7 @@ } inline std::string Status::ToString(StatusToStringMode mode) const { - return ok() ? "OK" : ToStringSlow(mode); + return ok() ? "OK" : ToStringSlow(rep_, mode); } inline void Status::IgnoreError() const { @@ -840,34 +849,54 @@ swap(a.rep_, b.rep_); } -inline const status_internal::Payloads* Status::GetPayloads() const { - return IsInlined(rep_) ? nullptr : RepToPointer(rep_)->payloads.get(); +inline absl::optional<absl::Cord> Status::GetPayload( + absl::string_view type_url) const { + if (IsInlined(rep_)) return absl::nullopt; + return RepToPointer(rep_)->GetPayload(type_url); } -inline status_internal::Payloads* Status::GetPayloads() { - return IsInlined(rep_) ? nullptr : RepToPointer(rep_)->payloads.get(); +inline void Status::SetPayload(absl::string_view type_url, absl::Cord payload) { + if (ok()) return; + status_internal::StatusRep* rep = PrepareToModify(rep_); + rep->SetPayload(type_url, std::move(payload)); + rep_ = PointerToRep(rep); } -inline bool Status::IsInlined(uintptr_t rep) { return (rep & 1) != 0; } - -inline bool Status::IsMovedFrom(uintptr_t rep) { return (rep & 2) != 0; } - -inline uintptr_t Status::MovedFromRep() { - return CodeToInlinedRep(absl::StatusCode::kInternal) | 2; +inline bool Status::ErasePayload(absl::string_view type_url) { + if (IsInlined(rep_)) return false; + status_internal::StatusRep* rep = PrepareToModify(rep_); + auto res = rep->ErasePayload(type_url); + rep_ = res.new_rep; + return res.erased; } -inline uintptr_t Status::CodeToInlinedRep(absl::StatusCode code) { +inline void Status::ForEachPayload( + absl::FunctionRef<void(absl::string_view, const absl::Cord&)> visitor) + const { + if (IsInlined(rep_)) return; + RepToPointer(rep_)->ForEachPayload(visitor); +} + +constexpr bool Status::IsInlined(uintptr_t rep) { return (rep & 1) != 0; } + +constexpr bool Status::IsMovedFrom(uintptr_t rep) { return (rep & 2) != 0; } + +constexpr uintptr_t Status::CodeToInlinedRep(absl::StatusCode code) { return (static_cast<uintptr_t>(code) << 2) + 1; } -inline absl::StatusCode Status::InlinedRepToCode(uintptr_t rep) { - assert(IsInlined(rep)); +constexpr absl::StatusCode Status::InlinedRepToCode(uintptr_t rep) { + ABSL_ASSERT(IsInlined(rep)); return static_cast<absl::StatusCode>(rep >> 2); } -inline status_internal::StatusRep* Status::RepToPointer(uintptr_t rep) { +constexpr uintptr_t Status::MovedFromRep() { + return CodeToInlinedRep(absl::StatusCode::kInternal) | 2; +} + +inline const status_internal::StatusRep* Status::RepToPointer(uintptr_t rep) { assert(!IsInlined(rep)); - return reinterpret_cast<status_internal::StatusRep*>(rep); + return reinterpret_cast<const status_internal::StatusRep*>(rep); } inline uintptr_t Status::PointerToRep(status_internal::StatusRep* rep) { @@ -875,15 +904,11 @@ } inline void Status::Ref(uintptr_t rep) { - if (!IsInlined(rep)) { - RepToPointer(rep)->ref.fetch_add(1, std::memory_order_relaxed); - } + if (!IsInlined(rep)) RepToPointer(rep)->Ref(); } inline void Status::Unref(uintptr_t rep) { - if (!IsInlined(rep)) { - UnrefNonInlined(rep); - } + if (!IsInlined(rep)) RepToPointer(rep)->Unref(); } inline Status OkStatus() { return Status(); }
diff --git a/third_party/abseil-cpp/absl/strings/BUILD.bazel b/third_party/abseil-cpp/absl/strings/BUILD.bazel index e226a27..6d0ed698 100644 --- a/third_party/abseil-cpp/absl/strings/BUILD.bazel +++ b/third_party/abseil-cpp/absl/strings/BUILD.bazel
@@ -70,6 +70,7 @@ "ascii.h", "charconv.h", "escaping.h", + "has_absl_stringify.h", "internal/damerau_levenshtein_distance.h", "internal/has_absl_stringify.h", "internal/string_constant.h", @@ -180,6 +181,18 @@ ) cc_test( + name = "has_absl_stringify_test", + size = "small", + srcs = ["has_absl_stringify_test.cc"], + copts = ABSL_TEST_COPTS, + visibility = ["//visibility:private"], + deps = [ + ":strings", + "@com_google_googletest//:gtest_main", + ], +) + +cc_test( name = "ascii_test", size = "small", srcs = ["ascii_test.cc"],
diff --git a/third_party/abseil-cpp/absl/strings/BUILD.gn b/third_party/abseil-cpp/absl/strings/BUILD.gn index f0c2e2a..f92495a0 100644 --- a/third_party/abseil-cpp/absl/strings/BUILD.gn +++ b/third_party/abseil-cpp/absl/strings/BUILD.gn
@@ -44,6 +44,7 @@ "ascii.h", "charconv.h", "escaping.h", + "has_absl_stringify.h", "internal/damerau_levenshtein_distance.h", "internal/has_absl_stringify.h", "internal/string_constant.h", @@ -569,6 +570,13 @@ deps = [ "//third_party/abseil-cpp/absl/base:config" ] } +absl_test("has_absl_stringify_test") { + sources = [ "has_absl_stringify_test.cc" ] + deps = [ + ":strings", + ] +} + absl_test("ascii_test") { sources = [ "ascii_test.cc" ] deps = [
diff --git a/third_party/abseil-cpp/absl/strings/CMakeLists.txt b/third_party/abseil-cpp/absl/strings/CMakeLists.txt index 8bd93271a..ebf085db 100644 --- a/third_party/abseil-cpp/absl/strings/CMakeLists.txt +++ b/third_party/abseil-cpp/absl/strings/CMakeLists.txt
@@ -38,6 +38,7 @@ "ascii.h" "charconv.h" "escaping.h" + "has_absl_stringify.h" "internal/damerau_levenshtein_distance.h" "internal/string_constant.h" "internal/has_absl_stringify.h" @@ -156,6 +157,18 @@ absl_cc_test( NAME + has_absl_stringify_test + SRCS + "has_absl_stringify_test.cc" + COPTS + ${ABSL_TEST_COPTS} + DEPS + absl::strings + GTest::gmock_main +) + +absl_cc_test( + NAME ascii_test SRCS "ascii_test.cc"
diff --git a/third_party/abseil-cpp/absl/strings/cord.h b/third_party/abseil-cpp/absl/strings/cord.h index dbfca80..1d30fde8 100644 --- a/third_party/abseil-cpp/absl/strings/cord.h +++ b/third_party/abseil-cpp/absl/strings/cord.h
@@ -853,7 +853,6 @@ explicit constexpr InlineRep(absl::string_view sv, CordRep* rep); void Swap(InlineRep* rhs); - bool empty() const; size_t size() const; const char* data() const; // Returns nullptr if holding pointer void set_data(const char* data, size_t n); // Discards pointer, if any @@ -1170,8 +1169,6 @@ } } -inline bool Cord::InlineRep::empty() const { return data_.is_empty(); } - inline size_t Cord::InlineRep::size() const { return is_tree() ? as_tree()->length : inline_size(); }
diff --git a/third_party/abseil-cpp/absl/strings/has_absl_stringify.h b/third_party/abseil-cpp/absl/strings/has_absl_stringify.h new file mode 100644 index 0000000..274a786 --- /dev/null +++ b/third_party/abseil-cpp/absl/strings/has_absl_stringify.h
@@ -0,0 +1,63 @@ +// Copyright 2022 The Abseil Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef ABSL_STRINGS_HAS_ABSL_STRINGIFY_H_ +#define ABSL_STRINGS_HAS_ABSL_STRINGIFY_H_ + +#include <type_traits> +#include <utility> + +#include "absl/strings/string_view.h" + +namespace absl { +ABSL_NAMESPACE_BEGIN + +namespace strings_internal { + +// This is an empty class not intended to be used. It exists so that +// `HasAbslStringify` can reference a universal class rather than needing to be +// copied for each new sink. +class UnimplementedSink { + public: + void Append(size_t count, char ch); + + void Append(string_view v); + + // Support `absl::Format(&sink, format, args...)`. + friend void AbslFormatFlush(UnimplementedSink* sink, absl::string_view v); +}; + +} // namespace strings_internal + +// `HasAbslStringify<T>` detects if type `T` supports the `AbslStringify()` +// customization point (see +// https://abseil.io/docs/cpp/guides/format#abslstringify for the +// documentation). +// +// Note that there are types that can be `StrCat`-ed that do not use the +// `AbslStringify` customization point (for example, `int`). + +template <typename T, typename = void> +struct HasAbslStringify : std::false_type {}; + +template <typename T> +struct HasAbslStringify< + T, std::enable_if_t<std::is_void<decltype(AbslStringify( + std::declval<strings_internal::UnimplementedSink&>(), + std::declval<const T&>()))>::value>> : std::true_type {}; + +ABSL_NAMESPACE_END +} // namespace absl + +#endif // ABSL_STRINGS_HAS_ABSL_STRINGIFY_H_
diff --git a/third_party/abseil-cpp/absl/strings/has_absl_stringify_test.cc b/third_party/abseil-cpp/absl/strings/has_absl_stringify_test.cc new file mode 100644 index 0000000..e9915c6 --- /dev/null +++ b/third_party/abseil-cpp/absl/strings/has_absl_stringify_test.cc
@@ -0,0 +1,37 @@ +// Copyright 2023 The Abseil Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "absl/strings/has_absl_stringify.h" + +#include <string> + +#include "gtest/gtest.h" + +namespace { + +struct TypeWithoutAbslStringify {}; + +struct TypeWithAbslStringify { + template <typename Sink> + friend void AbslStringify(Sink&, const TypeWithAbslStringify&) {} +}; + +TEST(HasAbslStringifyTest, Works) { + EXPECT_FALSE(absl::HasAbslStringify<int>::value); + EXPECT_FALSE(absl::HasAbslStringify<std::string>::value); + EXPECT_FALSE(absl::HasAbslStringify<TypeWithoutAbslStringify>::value); + EXPECT_TRUE(absl::HasAbslStringify<TypeWithAbslStringify>::value); +} + +} // namespace
diff --git a/third_party/abseil-cpp/absl/strings/internal/has_absl_stringify.h b/third_party/abseil-cpp/absl/strings/internal/has_absl_stringify.h index 55a0850..5eaddad1 100644 --- a/third_party/abseil-cpp/absl/strings/internal/has_absl_stringify.h +++ b/third_party/abseil-cpp/absl/strings/internal/has_absl_stringify.h
@@ -18,31 +18,20 @@ #include <type_traits> #include <utility> -#include "absl/strings/string_view.h" +#include "absl/base/attributes.h" +#include "absl/strings/has_absl_stringify.h" namespace absl { ABSL_NAMESPACE_BEGIN namespace strings_internal { -// This is an empty class not intended to be used. It exists so that -// `HasAbslStringify` can reference a universal class rather than needing to be -// copied for each new sink. -class UnimplementedSink { - public: - void Append(size_t count, char ch); - - void Append(string_view v); - - // Support `absl::Format(&sink, format, args...)`. - friend void AbslFormatFlush(UnimplementedSink* sink, absl::string_view v); -}; - template <typename T, typename = void> -struct HasAbslStringify : std::false_type {}; +struct ABSL_DEPRECATED("Use absl::HasAbslStringify") HasAbslStringify + : std::false_type {}; template <typename T> -struct HasAbslStringify< +struct ABSL_DEPRECATED("Use absl::HasAbslStringify") HasAbslStringify< T, std::enable_if_t<std::is_void<decltype(AbslStringify( std::declval<strings_internal::UnimplementedSink&>(), std::declval<const T&>()))>::value>> : std::true_type {};
diff --git a/third_party/abseil-cpp/absl/strings/internal/str_format/arg.h b/third_party/abseil-cpp/absl/strings/internal/str_format/arg.h index 3ce30feb..2e017549 100644 --- a/third_party/abseil-cpp/absl/strings/internal/str_format/arg.h +++ b/third_party/abseil-cpp/absl/strings/internal/str_format/arg.h
@@ -31,7 +31,7 @@ #include "absl/base/port.h" #include "absl/meta/type_traits.h" #include "absl/numeric/int128.h" -#include "absl/strings/internal/has_absl_stringify.h" +#include "absl/strings/has_absl_stringify.h" #include "absl/strings/internal/str_format/extension.h" #include "absl/strings/string_view.h" @@ -333,7 +333,7 @@ template <typename T> typename std::enable_if<std::is_enum<T>::value && !HasUserDefinedConvert<T>::value && - !strings_internal::HasAbslStringify<T>::value, + !HasAbslStringify<T>::value, IntegralConvertResult>::type FormatConvertImpl(T v, FormatConversionSpecImpl conv, FormatSinkImpl* sink); @@ -447,7 +447,7 @@ struct DecayType { static constexpr bool kHasUserDefined = str_format_internal::HasUserDefinedConvert<T>::value || - strings_internal::HasAbslStringify<T>::value; + HasAbslStringify<T>::value; using type = typename std::conditional< !kHasUserDefined && std::is_convertible<T, const char*>::value, const char*, @@ -456,11 +456,10 @@ VoidPtr, const T&>::type>::type; }; template <typename T> - struct DecayType<T, - typename std::enable_if< - !str_format_internal::HasUserDefinedConvert<T>::value && - !strings_internal::HasAbslStringify<T>::value && - std::is_enum<T>::value>::type> { + struct DecayType< + T, typename std::enable_if< + !str_format_internal::HasUserDefinedConvert<T>::value && + !HasAbslStringify<T>::value && std::is_enum<T>::value>::type> { using type = decltype(+typename std::underlying_type<T>::type()); };
diff --git a/third_party/abseil-cpp/absl/strings/str_cat.h b/third_party/abseil-cpp/absl/strings/str_cat.h index 554c89d..e782368 100644 --- a/third_party/abseil-cpp/absl/strings/str_cat.h +++ b/third_party/abseil-cpp/absl/strings/str_cat.h
@@ -102,7 +102,7 @@ #include "absl/base/attributes.h" #include "absl/base/port.h" #include "absl/meta/type_traits.h" -#include "absl/strings/internal/has_absl_stringify.h" +#include "absl/strings/has_absl_stringify.h" #include "absl/strings/internal/resize_uninitialized.h" #include "absl/strings/internal/stringify_sink.h" #include "absl/strings/numbers.h" @@ -357,7 +357,7 @@ : piece_(pc) {} template <typename T, typename = typename std::enable_if< - strings_internal::HasAbslStringify<T>::value>::type> + HasAbslStringify<T>::value>::type> AlphaNum( // NOLINT(runtime/explicit) const T& v ABSL_ATTRIBUTE_LIFETIME_BOUND, strings_internal::StringifySink&& sink ABSL_ATTRIBUTE_LIFETIME_BOUND = {}) @@ -384,17 +384,17 @@ template <typename T, typename = typename std::enable_if< std::is_enum<T>{} && std::is_convertible<T, int>{} && - !strings_internal::HasAbslStringify<T>::value>::type> + !HasAbslStringify<T>::value>::type> AlphaNum(T e) // NOLINT(runtime/explicit) : AlphaNum(+e) {} // This overload matches scoped enums. We must explicitly cast to the // underlying type, but use integral promotion for the same reason as above. template <typename T, - typename std::enable_if< - std::is_enum<T>{} && !std::is_convertible<T, int>{} && - !strings_internal::HasAbslStringify<T>::value, - char*>::type = nullptr> + typename std::enable_if<std::is_enum<T>{} && + !std::is_convertible<T, int>{} && + !HasAbslStringify<T>::value, + char*>::type = nullptr> AlphaNum(T e) // NOLINT(runtime/explicit) : AlphaNum(+static_cast<typename std::underlying_type<T>::type>(e)) {}
diff --git a/third_party/abseil-cpp/absl/strings/str_cat_benchmark.cc b/third_party/abseil-cpp/absl/strings/str_cat_benchmark.cc index e54a923..b0a86171 100644 --- a/third_party/abseil-cpp/absl/strings/str_cat_benchmark.cc +++ b/third_party/abseil-cpp/absl/strings/str_cat_benchmark.cc
@@ -188,6 +188,35 @@ BENCHMARK(BM_StrAppend)->Apply(StrAppendConfig); +template <typename... Chunks> +void BM_StrCatImpl(benchmark::State& state, + Chunks... chunks) { + for (auto s : state) { + std::string result = absl::StrCat(chunks...); + benchmark::DoNotOptimize(result); + } +} + +void BM_StrCat(benchmark::State& state) { + const int chunks_at_a_time = state.range(0); + const absl::string_view kChunk = "0123456789"; + + switch (chunks_at_a_time) { + case 1: + return BM_StrCatImpl(state, kChunk); + case 2: + return BM_StrCatImpl(state, kChunk, kChunk); + case 3: + return BM_StrCatImpl(state, kChunk, kChunk, kChunk); + case 4: + return BM_StrCatImpl(state, kChunk, kChunk, kChunk, kChunk); + default: + std::abort(); + } +} + +BENCHMARK(BM_StrCat)->Arg(1)->Arg(2)->Arg(3)->Arg(4); + void BM_StrCat_int(benchmark::State& state) { int i = 0; for (auto s : state) {
diff --git a/third_party/abseil-cpp/absl/strings/substitute.h b/third_party/abseil-cpp/absl/strings/substitute.h index d6a5a69..0d6cb7c7 100644 --- a/third_party/abseil-cpp/absl/strings/substitute.h +++ b/third_party/abseil-cpp/absl/strings/substitute.h
@@ -176,7 +176,7 @@ : piece_(value ? "true" : "false") {} template <typename T, typename = typename std::enable_if< - strings_internal::HasAbslStringify<T>::value>::type> + HasAbslStringify<T>::value>::type> Arg( // NOLINT(google-explicit-constructor) const T& v, strings_internal::StringifySink&& sink = {}) : piece_(strings_internal::ExtractStringification(sink, v)) {} @@ -204,7 +204,7 @@ template <typename T, typename = typename std::enable_if< std::is_enum<T>{} && !std::is_convertible<T, int>{} && - !strings_internal::HasAbslStringify<T>::value>::type> + !HasAbslStringify<T>::value>::type> Arg(T value) // NOLINT(google-explicit-constructor) : Arg(static_cast<typename std::underlying_type<T>::type>(value)) {}
diff --git a/third_party/abseil-cpp/absl/synchronization/mutex.cc b/third_party/abseil-cpp/absl/synchronization/mutex.cc index ea0d96c..5d1a516 100644 --- a/third_party/abseil-cpp/absl/synchronization/mutex.cc +++ b/third_party/abseil-cpp/absl/synchronization/mutex.cc
@@ -129,11 +129,12 @@ struct ABSL_CACHELINE_ALIGNED MutexGlobals { absl::once_flag once; - int spinloop_iterations = 0; int32_t mutex_sleep_spins[2] = {}; absl::Duration mutex_sleep_time; }; +std::atomic<int> spinloop_iterations{-1}; + absl::Duration MeasureTimeToYield() { absl::Time before = absl::Now(); ABSL_INTERNAL_C_SYMBOL(AbslInternalMutexYield)(); @@ -144,12 +145,11 @@ ABSL_CONST_INIT static MutexGlobals data; absl::base_internal::LowLevelCallOnce(&data.once, [&]() { if (absl::base_internal::NumCPUs() > 1) { - // If this is multiprocessor, allow spinning. If the mode is - // aggressive then spin many times before yielding. If the mode is - // gentle then spin only a few times before yielding. Aggressive spinning - // is used to ensure that an Unlock() call, which must get the spin lock - // for any thread to make progress gets it without undue delay. - data.spinloop_iterations = 1500; + // If the mode is aggressive then spin many times before yielding. + // If the mode is gentle then spin only a few times before yielding. + // Aggressive spinning is used to ensure that an Unlock() call, + // which must get the spin lock for any thread to make progress gets it + // without undue delay. data.mutex_sleep_spins[AGGRESSIVE] = 5000; data.mutex_sleep_spins[GENTLE] = 250; data.mutex_sleep_time = absl::Microseconds(10); @@ -157,7 +157,6 @@ // If this a uniprocessor, only yield/sleep. Real-time threads are often // unable to yield, so the sleep time needs to be long enough to keep // the calling thread asleep until scheduling happens. - data.spinloop_iterations = 0; data.mutex_sleep_spins[AGGRESSIVE] = 0; data.mutex_sleep_spins[GENTLE] = 0; data.mutex_sleep_time = MeasureTimeToYield() * 5; @@ -960,8 +959,7 @@ } while (s->priority <= advance_to->priority); // termination guaranteed because s->priority > head->priority // and head is the end of a skip chain - } else if (waitp->how == kExclusive && - Condition::GuaranteedEqual(waitp->cond, nullptr)) { + } else if (waitp->how == kExclusive && waitp->cond == nullptr) { // An unlocker could be scanning the queue, but we know it will recheck // the queue front for writers that have no condition, which is what s // is, so an insert at front is safe. @@ -992,6 +990,24 @@ if (MuEquivalentWaiter(s, s->next)) { // s->may_skip is known to be true s->skip = s->next; // s may skip to its successor } + } else if ((flags & kMuHasBlocked) && + (s->priority >= head->next->priority) && + (!head->maybe_unlocking || + (waitp->how == kExclusive && + Condition::GuaranteedEqual(waitp->cond, nullptr)))) { + // This thread has already waited, then was woken, then failed to acquire + // the mutex and now tries to requeue. Try to requeue it at head, + // otherwise it can suffer bad latency (wait whole qeueue several times). + // However, we need to be conservative. First, we need to ensure that we + // respect priorities. Then, we need to be careful to not break wait + // queue invariants: we require either that unlocker is not scanning + // the queue or that the current thread is a writer with no condition + // (unlocker will recheck the queue for such waiters). + s->next = head->next; + head->next = s; + if (MuEquivalentWaiter(s, s->next)) { // s->may_skip is known to be true + s->skip = s->next; // s may skip to its successor + } } else { // enqueue not done any other way, so // we're inserting s at the back // s will become new head; copy data from head into it @@ -1470,7 +1486,7 @@ // Attempt to acquire *mu, and return whether successful. The implementation // may spin for a short while if the lock cannot be acquired immediately. static bool TryAcquireWithSpinning(std::atomic<intptr_t>* mu) { - int c = GetMutexGlobals().spinloop_iterations; + int c = spinloop_iterations.load(std::memory_order_relaxed); do { // do/while somewhat faster on AMD intptr_t v = mu->load(std::memory_order_relaxed); if ((v & (kMuReader | kMuEvent)) != 0) { @@ -1490,11 +1506,12 @@ GraphId id = DebugOnlyDeadlockCheck(this); intptr_t v = mu_.load(std::memory_order_relaxed); // try fast acquire, then spin loop - if ((v & (kMuWriter | kMuReader | kMuEvent)) != 0 || - !mu_.compare_exchange_strong(v, kMuWriter | v, std::memory_order_acquire, - std::memory_order_relaxed)) { + if (ABSL_PREDICT_FALSE((v & (kMuWriter | kMuReader | kMuEvent)) != 0) || + ABSL_PREDICT_FALSE(!mu_.compare_exchange_strong( + v, kMuWriter | v, std::memory_order_acquire, + std::memory_order_relaxed))) { // try spin acquire, then slow loop - if (!TryAcquireWithSpinning(&this->mu_)) { + if (ABSL_PREDICT_FALSE(!TryAcquireWithSpinning(&this->mu_))) { this->LockSlow(kExclusive, nullptr, 0); } } @@ -1542,15 +1559,11 @@ SynchWaitParams waitp(how, &cond, t, nullptr /*no cvmu*/, Synch_GetPerThreadAnnotated(this), nullptr /*no cv_word*/); - int flags = kMuHasBlocked; - if (!Condition::GuaranteedEqual(&cond, nullptr)) { - flags |= kMuIsCond; - } this->UnlockSlow(&waitp); this->Block(waitp.thread); ABSL_TSAN_MUTEX_POST_UNLOCK(this, TsanFlags(how)); ABSL_TSAN_MUTEX_PRE_LOCK(this, TsanFlags(how)); - this->LockSlowLoop(&waitp, flags); + this->LockSlowLoop(&waitp, kMuHasBlocked | kMuIsCond); bool res = waitp.cond != nullptr || // => cond known true from LockSlowLoop EvalConditionAnnotated(&cond, this, true, false, how == kShared); ABSL_TSAN_MUTEX_POST_LOCK(this, TsanFlags(how), 0); @@ -1733,6 +1746,16 @@ // Internal version of LockWhen(). See LockSlowWithDeadline() ABSL_ATTRIBUTE_NOINLINE void Mutex::LockSlow(MuHow how, const Condition* cond, int flags) { + if (ABSL_PREDICT_FALSE(spinloop_iterations.load(std::memory_order_relaxed) < + 0)) { + if (absl::base_internal::NumCPUs() > 1) { + // If this is multiprocessor, allow spinning. + spinloop_iterations.store(1500, std::memory_order_relaxed); + } else { + // If this a uniprocessor, only yield/sleep. + spinloop_iterations.store(0, std::memory_order_relaxed); + } + } ABSL_RAW_CHECK( this->LockSlowWithDeadline(how, cond, KernelTimeout::Never(), flags), "condition untrue on return from LockSlow"); @@ -1834,7 +1857,7 @@ SynchWaitParams waitp(how, cond, t, nullptr /*no cvmu*/, Synch_GetPerThreadAnnotated(this), nullptr /*no cv_word*/); - if (!Condition::GuaranteedEqual(cond, nullptr)) { + if (cond != nullptr) { flags |= kMuIsCond; } if (unlock) { @@ -2024,7 +2047,6 @@ // head of the list searched previously, or zero PerThreadSynch* old_h = nullptr; // a condition that's known to be false. - const Condition* known_false = nullptr; PerThreadSynch* wake_list = kPerThreadSynchNull; // list of threads to wake intptr_t wr_wait = 0; // set to kMuWrWait if we wake a reader and a // later writer could have acquired the lock @@ -2128,7 +2150,7 @@ } } if (h->next->waitp->how == kExclusive && - Condition::GuaranteedEqual(h->next->waitp->cond, nullptr)) { + h->next->waitp->cond == nullptr) { // easy case: writer with no condition; no need to search pw = h; // wake w, the successor of h (=pw) w = h->next; @@ -2211,10 +2233,8 @@ w_walk->wake = false; if (w_walk->waitp->cond == nullptr || // no condition => vacuously true OR - (w_walk->waitp->cond != known_false && - // this thread's condition is not known false, AND - // is in fact true - EvalConditionIgnored(this, w_walk->waitp->cond))) { + // this thread's condition is true + EvalConditionIgnored(this, w_walk->waitp->cond)) { if (w == nullptr) { w_walk->wake = true; // can wake this waiter w = w_walk; @@ -2228,8 +2248,6 @@ } else { // writer with true condition wr_wait = kMuWrWait; } - } else { // can't wake; condition false - known_false = w_walk->waitp->cond; // remember last false condition } if (w_walk->wake) { // we're waking reader w_walk pw_walk = w_walk; // don't skip similar waiters @@ -2335,10 +2353,10 @@ int c = 0; ABSL_RAW_CHECK(w->waitp->cond == nullptr, "Mutex::Fer while waiting on Condition"); - ABSL_RAW_CHECK(!w->waitp->timeout.has_timeout(), - "Mutex::Fer while in timed wait"); ABSL_RAW_CHECK(w->waitp->cv_word == nullptr, "Mutex::Fer with pending CondVar queueing"); + // The CondVar timeout is not relevant for the Mutex wait. + w->waitp->timeout = {}; for (;;) { intptr_t v = mu_.load(std::memory_order_relaxed); // Note: must not queue if the mutex is unlocked (nobody will wake it). @@ -2581,23 +2599,6 @@ return rc; } -// Wake thread w -// If it was a timed wait, w will be waiting on w->cv -// Otherwise, if it was not a Mutex mutex, w will be waiting on w->sem -// Otherwise, w is transferred to the Mutex mutex via Mutex::Fer(). -void CondVar::Wakeup(PerThreadSynch* w) { - if (w->waitp->timeout.has_timeout()) { - // The waiting thread only needs to observe "w->state == kAvailable" to be - // released, we must cache "cvmu" before clearing "next". - Mutex* mu = w->waitp->cvmu; - w->next = nullptr; - w->state.store(PerThreadSynch::kAvailable, std::memory_order_release); - Mutex::IncrementSynchSem(mu, w); - } else { - w->waitp->cvmu->Fer(w); - } -} - void CondVar::Signal() { SchedulingGuard::ScopedDisable disable_rescheduling; ABSL_TSAN_MUTEX_PRE_SIGNAL(nullptr, 0); @@ -2622,7 +2623,7 @@ cv_.store((v & kCvEvent) | reinterpret_cast<intptr_t>(h), std::memory_order_release); if (w != nullptr) { - CondVar::Wakeup(w); // wake waiter, if there was one + w->waitp->cvmu->Fer(w); // wake waiter, if there was one cond_var_tracer("Signal wakeup", this); } if ((v & kCvEvent) != 0) { @@ -2658,7 +2659,7 @@ do { // for every thread, wake it up w = n; n = n->next; - CondVar::Wakeup(w); + w->waitp->cvmu->Fer(w); } while (w != h); cond_var_tracer("SignalAll wakeup", this); } @@ -2722,17 +2723,11 @@ StoreCallback(dereference); } -bool Condition::Eval() const { - // eval_ == null for kTrue - return (this->eval_ == nullptr) || (*this->eval_)(this); -} +bool Condition::Eval() const { return (*this->eval_)(this); } bool Condition::GuaranteedEqual(const Condition* a, const Condition* b) { - // kTrue logic. - if (a == nullptr || a->eval_ == nullptr) { - return b == nullptr || b->eval_ == nullptr; - } else if (b == nullptr || b->eval_ == nullptr) { - return false; + if (a == nullptr || b == nullptr) { + return a == b; } // Check equality of the representative fields. return a->eval_ == b->eval_ && a->arg_ == b->arg_ &&
diff --git a/third_party/abseil-cpp/absl/synchronization/mutex.h b/third_party/abseil-cpp/absl/synchronization/mutex.h index ff4747b..d146b066 100644 --- a/third_party/abseil-cpp/absl/synchronization/mutex.h +++ b/third_party/abseil-cpp/absl/synchronization/mutex.h
@@ -859,8 +859,10 @@ std::memcpy(callback, callback_, sizeof(*callback)); } + static bool AlwaysTrue(const Condition*) { return true; } + // Used only to create kTrue. - constexpr Condition() = default; + constexpr Condition() : eval_(AlwaysTrue), arg_(nullptr) {} }; // ----------------------------------------------------------------------------- @@ -972,7 +974,6 @@ private: bool WaitCommon(Mutex* mutex, synchronization_internal::KernelTimeout t); void Remove(base_internal::PerThreadSynch* s); - void Wakeup(base_internal::PerThreadSynch* w); std::atomic<intptr_t> cv_; // Condition variable state. CondVar(const CondVar&) = delete; CondVar& operator=(const CondVar&) = delete;
diff --git a/third_party/abseil-cpp/absl/synchronization/mutex_test.cc b/third_party/abseil-cpp/absl/synchronization/mutex_test.cc index 0bca46c..6c38c07c 100644 --- a/third_party/abseil-cpp/absl/synchronization/mutex_test.cc +++ b/third_party/abseil-cpp/absl/synchronization/mutex_test.cc
@@ -1025,6 +1025,19 @@ } } +TEST(Mutex, ConditionSwap) { + // Ensure that Conditions can be swap'ed. + bool b1 = true; + absl::Condition c1(&b1); + bool b2 = false; + absl::Condition c2(&b2); + EXPECT_TRUE(c1.Eval()); + EXPECT_FALSE(c2.Eval()); + std::swap(c1, c2); + EXPECT_FALSE(c1.Eval()); + EXPECT_TRUE(c2.Eval()); +} + // -------------------------------------------------------- // Test for bug with pattern of readers using a condvar. The bug was that if a // reader went to sleep on a condition variable while one or more other readers
diff --git a/third_party/abseil-cpp/symbols_arm64_dbg.def b/third_party/abseil-cpp/symbols_arm64_dbg.def index 7fc720a..e92e9ff 100644 --- a/third_party/abseil-cpp/symbols_arm64_dbg.def +++ b/third_party/abseil-cpp/symbols_arm64_dbg.def
@@ -110,6 +110,8 @@ ??$?0AEAV?$allocator@UTransition@cctz@time_internal@absl@@@__Cr@std@@X@?$__compressed_pair_elem@AEAV?$allocator@UTransition@cctz@time_internal@absl@@@__Cr@std@@$00$0A@@__Cr@std@@QEAA@AEAV?$allocator@UTransition@cctz@time_internal@absl@@@12@@Z ??$?0AEAV?$allocator@UTransitionType@cctz@time_internal@absl@@@__Cr@std@@X@?$__compressed_pair_elem@AEAV?$allocator@UTransitionType@cctz@time_internal@absl@@@__Cr@std@@$00$0A@@__Cr@std@@QEAA@AEAV?$allocator@UTransitionType@cctz@time_internal@absl@@@12@@Z ??$?0AEAV?$allocator@UViableSubstitution@strings_internal@absl@@@__Cr@std@@X@?$__compressed_pair_elem@AEAV?$allocator@UViableSubstitution@strings_internal@absl@@@__Cr@std@@$00$0A@@__Cr@std@@QEAA@AEAV?$allocator@UViableSubstitution@strings_internal@absl@@@12@@Z + ??$?0AEAVCord@absl@@$0A@@?$optional@VCord@absl@@@absl@@QEAA@AEAVCord@1@@Z + ??$?0AEAVCord@absl@@@?$optional_data_dtor_base@VCord@absl@@$0A@@optional_internal@absl@@IEAA@Uin_place_t@2@AEAVCord@2@@Z ??$?0AEBV?$allocator@UPayload@status_internal@absl@@@__Cr@std@@@?$Storage@V?$allocator@UPayload@status_internal@absl@@@__Cr@std@@$0A@$00@internal_compressed_tuple@container_internal@absl@@QEAA@Uin_place_t@3@AEBV?$allocator@UPayload@status_internal@absl@@@__Cr@std@@@Z ??$?0AEBV?$allocator@UPayload@status_internal@absl@@@__Cr@std@@I$00@?$CompressedTuple@V?$allocator@UPayload@status_internal@absl@@@__Cr@std@@_K@container_internal@absl@@QEAA@AEBV?$allocator@UPayload@status_internal@absl@@@__Cr@std@@$$QEAI@Z ??$?0AEBV?$allocator@UPayload@status_internal@absl@@@__Cr@std@@I@?$CompressedTupleImpl@V?$CompressedTuple@V?$allocator@UPayload@status_internal@absl@@@__Cr@std@@_K@container_internal@absl@@U?$integer_sequence@_K$0A@$00@3@$00@internal_compressed_tuple@container_internal@absl@@QEAA@Uin_place_t@3@AEBV?$allocator@UPayload@status_internal@absl@@@__Cr@std@@$$QEAI@Z @@ -118,8 +120,6 @@ ??$?0AEBV?$allocator@VFormatArgImpl@str_format_internal@absl@@@__Cr@std@@I@?$CompressedTupleImpl@V?$CompressedTuple@V?$allocator@VFormatArgImpl@str_format_internal@absl@@@__Cr@std@@_K@container_internal@absl@@U?$integer_sequence@_K$0A@$00@3@$00@internal_compressed_tuple@container_internal@absl@@QEAA@Uin_place_t@3@AEBV?$allocator@VFormatArgImpl@str_format_internal@absl@@@__Cr@std@@$$QEAI@Z ??$?0AEBV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@$$Z$$V$$Z$0A@$$Z$S@?$pair@$$CBV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@PEBVImpl@time_zone@cctz@time_internal@absl@@@__Cr@std@@AEAA@Upiecewise_construct_t@12@AEAV?$tuple@AEBV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@@12@AEAV?$tuple@$$V@12@U?$__tuple_indices@$0A@@12@U?$__tuple_indices@$S@12@@Z ??$?0AEBV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@$$Z$$V@?$pair@$$CBV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@PEBVImpl@time_zone@cctz@time_internal@absl@@@__Cr@std@@QEAA@Upiecewise_construct_t@12@V?$tuple@AEBV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@@12@V?$tuple@$$V@12@@Z - ??$?0AEBVCord@absl@@$0A@@?$optional@VCord@absl@@@absl@@QEAA@AEBVCord@1@@Z - ??$?0AEBVCord@absl@@@?$optional_data_dtor_base@VCord@absl@@$0A@@optional_internal@absl@@IEAA@Uin_place_t@2@AEBVCord@2@@Z ??$?0D@FormatArgImpl@str_format_internal@absl@@QEAA@AEBD@Z ??$?0H@FormatArgImpl@str_format_internal@absl@@QEAA@AEBH@Z ??$?0HU__default_init_tag@__Cr@std@@@?$__compressed_pair@_KU?$hash@PEBUCordRep@cord_internal@absl@@@__Cr@std@@@__Cr@std@@QEAA@$$QEAH$$QEAU__default_init_tag@12@@Z @@ -283,6 +283,7 @@ ??$?8PEAUTransitionType@cctz@time_internal@absl@@@__Cr@std@@YA_NAEBV?$__wrap_iter@PEAUTransitionType@cctz@time_internal@absl@@@01@0@Z ??$?8PEBQEAVLogSink@absl@@PEAPEAV01@@__Cr@std@@YA_NAEBV?$__wrap_iter@PEBQEAVLogSink@absl@@@01@AEBV?$__wrap_iter@PEAPEAVLogSink@absl@@@01@@Z ??$?8PEBUConversionItem@ParsedFormatBase@str_format_internal@absl@@@__Cr@std@@YA_NAEBV?$__wrap_iter@PEBUConversionItem@ParsedFormatBase@str_format_internal@absl@@@01@0@Z + ??$?8V?$InlinedVector@UPayload@status_internal@absl@@$00V?$allocator@UPayload@status_internal@absl@@@__Cr@std@@@absl@@U?$default_delete@V?$InlinedVector@UPayload@status_internal@absl@@$00V?$allocator@UPayload@status_internal@absl@@@__Cr@std@@@absl@@@__Cr@std@@@__Cr@std@@YA_NAEBV?$unique_ptr@V?$InlinedVector@UPayload@status_internal@absl@@$00V?$allocator@UPayload@status_internal@absl@@@__Cr@std@@@absl@@U?$default_delete@V?$InlinedVector@UPayload@status_internal@absl@@$00V?$allocator@UPayload@status_internal@absl@@@__Cr@std@@@absl@@@__Cr@std@@@01@$$T@Z ??$?8VZoneInfoSource@cctz@time_internal@absl@@U?$default_delete@VZoneInfoSource@cctz@time_internal@absl@@@__Cr@std@@@__Cr@std@@YA_NAEBV?$unique_ptr@VZoneInfoSource@cctz@time_internal@absl@@U?$default_delete@VZoneInfoSource@cctz@time_internal@absl@@@__Cr@std@@@01@$$T@Z ??$?9PEAPEAVCordzHandle@cord_internal@absl@@@__Cr@std@@YA_NAEBV?$__wrap_iter@PEAPEAVCordzHandle@cord_internal@absl@@@01@0@Z ??$?9PEAPEAVCordzHandle@cord_internal@absl@@PEAPEAV012@@__Cr@std@@YA_NAEBV?$reverse_iterator@PEAPEAVCordzHandle@cord_internal@absl@@@01@0@Z @@ -1039,9 +1040,9 @@ ??$forward@AEAV?$allocator@PEAUCordRep@cord_internal@absl@@@__Cr@std@@@absl@@YAAEAV?$allocator@PEAUCordRep@cord_internal@absl@@@__Cr@std@@AEAV123@@Z ??$forward@AEAV?$allocator@PEAVLogSink@absl@@@__Cr@std@@@absl@@YAAEAV?$allocator@PEAVLogSink@absl@@@__Cr@std@@AEAV123@@Z ??$forward@AEAV?$allocator@UPayload@status_internal@absl@@@__Cr@std@@@absl@@YAAEAV?$allocator@UPayload@status_internal@absl@@@__Cr@std@@AEAV123@@Z + ??$forward@AEAVCord@absl@@@absl@@YAAEAVCord@0@AEAV10@@Z ??$forward@AEBV?$allocator@UPayload@status_internal@absl@@@__Cr@std@@@absl@@YAAEBV?$allocator@UPayload@status_internal@absl@@@__Cr@std@@AEBV123@@Z ??$forward@AEBV?$allocator@VFormatArgImpl@str_format_internal@absl@@@__Cr@std@@@absl@@YAAEBV?$allocator@VFormatArgImpl@str_format_internal@absl@@@__Cr@std@@AEBV123@@Z - ??$forward@AEBVCord@absl@@@absl@@YAAEBVCord@0@AEBV10@@Z ??$forward@H@absl@@YA$$QEAHAEAH@Z ??$forward@I@absl@@YA$$QEAIAEAI@Z ??$forward@V?$allocator@H@__Cr@std@@@absl@@YA$$QEAV?$allocator@H@__Cr@std@@AEAV123@@Z @@ -1546,6 +1547,7 @@ ??0SpinLock@base_internal@absl@@QEAA@W4SchedulingMode@12@@Z ??0SpinLock@base_internal@absl@@QEAA@XZ ??0SpinLockHolder@base_internal@absl@@QEAA@PEAVSpinLock@12@@Z + ??0Status@absl@@AEAA@_K@Z ??0Status@absl@@QEAA@$$QEAV01@@Z ??0Status@absl@@QEAA@AEBV01@@Z ??0Status@absl@@QEAA@W4StatusCode@1@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@Z @@ -1793,6 +1795,7 @@ ??8CharIterator@Cord@absl@@QEBA_NAEBV012@@Z ??8ChunkIterator@Cord@absl@@QEBA_NAEBV012@@Z ??8GraphId@synchronization_internal@absl@@QEBA_NAEBU012@@Z + ??8StatusRep@status_internal@absl@@QEBA_NAEBV012@@Z ??8__Cr@std@@YA_NAEBU__deque_range@?$deque@UPrefixCrc@CrcCordState@crc_internal@absl@@V?$allocator@UPrefixCrc@CrcCordState@crc_internal@absl@@@__Cr@std@@@01@0@Z ??8__Cr@std@@YA_NAEBV?$__deque_iterator@UPrefixCrc@CrcCordState@crc_internal@absl@@PEAU1234@AEAU1234@PEAPEAU1234@_J$0A@@01@0@Z ??8__Cr@std@@YA_NAEBV?$__deque_iterator@UPrefixCrc@CrcCordState@crc_internal@absl@@PEBU1234@AEBU1234@PEBQEBU1234@_J$0A@@01@0@Z @@ -1975,6 +1978,7 @@ ??R<lambda_1>@?0??CompareSlowPath@Cord@absl@@AEBAHAEBV23@_K1@Z@QEBA?A?<auto>@@PEAVChunkIterator@23@PEAV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@Z ??R<lambda_1>@?0??CompareSlowPath@Cord@absl@@AEBAHV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@_K1@Z@QEBA?A?<auto>@@PEAVChunkIterator@23@PEAV456@@Z ??R<lambda_1>@?0??InitFrom@?$Storage@UPayload@status_internal@absl@@$00V?$allocator@UPayload@status_internal@absl@@@__Cr@std@@@inlined_vector_internal@absl@@QEAAXAEBV234@@Z@QEBA?A?<auto>@@XZ + ??R<lambda_1>@?0??InlinedRepToCode@Status@absl@@CA?AW4StatusCode@3@_K@Z@QEBA?A?<auto>@@XZ ??R<lambda_1>@?0??SetLength@CordBuffer@absl@@QEAAX_K@Z@QEBA?A?<auto>@@XZ ??R<lambda_1>@?0??SubtractSize@?$Storage@H$0CP@V?$allocator@H@__Cr@std@@@inlined_vector_internal@absl@@QEAAX_K@Z@QEBA?A?<auto>@@XZ ??R<lambda_1>@?0??SubtractSize@?$Storage@PEAUCordRep@cord_internal@absl@@$01V?$allocator@PEAUCordRep@cord_internal@absl@@@__Cr@std@@@inlined_vector_internal@absl@@QEAAX_K@Z@QEBA?A?<auto>@@XZ @@ -2118,6 +2122,7 @@ ?AllocatedSizeToTag@cord_internal@absl@@YAE_K@Z ?AllocatedSizeToTagUnchecked@cord_internal@absl@@YAE_K@Z ?AlreadyExistsError@absl@@YA?AVStatus@1@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@Z + ?AlwaysTrue@Condition@absl@@CA_NPEBV12@@Z ?Append@?$AppendUninitializedTraits@V?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@X@strings_internal@absl@@SAXPEAV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@_K@Z ?Append@Cord@absl@@QEAAX$$QEAV12@@Z ?Append@Cord@absl@@QEAAXAEBV12@@Z @@ -2202,6 +2207,7 @@ ?ClearCurrentThreadIdentity@base_internal@absl@@YAXXZ ?ClearLogBacktraceLocation@absl@@YAXXZ ?ClearTimeZoneMapTestOnly@Impl@time_zone@cctz@time_internal@absl@@SAXXZ + ?CloneAndUnref@StatusRep@status_internal@absl@@QEBAPEAV123@XZ ?CodeToInlinedRep@Status@absl@@CA_KW4StatusCode@2@@Z ?CombineContiguousImpl@MixingHashState@hash_internal@absl@@CA_K_KPEBE0U?$integral_constant@H$03@__Cr@std@@@Z ?CombineContiguousImpl@MixingHashState@hash_internal@absl@@CA_K_KPEBE0U?$integral_constant@H$07@__Cr@std@@@Z @@ -2382,11 +2388,10 @@ ?EqualsIgnoreCase@absl@@YA_NV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@0@Z ?EqualsImpl@Cord@absl@@AEBA_NAEBV12@_K@Z ?EqualsImpl@Cord@absl@@AEBA_NV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@_K@Z - ?EqualsSlow@Status@absl@@CA_NAEBV12@0@Z ?EquivTransitions@TimeZoneInfo@cctz@time_internal@absl@@AEBA_NEE@Z ?Erase@?$Storage@UPayload@status_internal@absl@@$00V?$allocator@UPayload@status_internal@absl@@@__Cr@std@@@inlined_vector_internal@absl@@QEAAPEAUPayload@status_internal@3@PEBU453@0@Z ?EraseMetaOnly@container_internal@absl@@YAXAEAVCommonFields@12@PEAW4ctrl_t@12@_K@Z - ?ErasePayload@Status@absl@@QEAA_NV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@Z + ?ErasePayload@StatusRep@status_internal@absl@@QEAA?AUEraseResult@123@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@Z ?ErrnoToStatus@absl@@YA?AVStatus@1@HV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@Z ?ErrnoToStatusCode@absl@@YA?AW4StatusCode@1@H@Z ?Eval@Condition@absl@@QEBA_NXZ @@ -2451,7 +2456,7 @@ ?FlushLogSinks@absl@@YAXXZ ?FlushLogSinks@log_internal@absl@@YAXXZ ?ForEachChunkAux@Cord@absl@@CAXPEAUCordRep@cord_internal@2@V?$FunctionRef@$$A6AXV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@Z@2@@Z - ?ForEachPayload@Status@absl@@QEBAXV?$FunctionRef@$$A6AXV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@AEBVCord@absl@@@Z@2@@Z + ?ForEachPayload@StatusRep@status_internal@absl@@QEBAXV?$FunctionRef@$$A6AXV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@AEBVCord@absl@@@Z@3@@Z ?ForVar1@CheckOpMessageBuilder@log_internal@absl@@QEAAAEAV?$basic_ostream@DU?$char_traits@D@__Cr@std@@@__Cr@std@@XZ ?ForVar2@CheckOpMessageBuilder@log_internal@absl@@QEAAAEAV?$basic_ostream@DU?$char_traits@D@__Cr@std@@@__Cr@std@@XZ ?ForgetDeadlockInfo@Mutex@absl@@QEAAXXZ @@ -2596,9 +2601,7 @@ ?GetOrCreateCurrentThreadIdentity@synchronization_internal@absl@@YAPEAUThreadIdentity@base_internal@2@XZ ?GetParentMethod@CordzInfo@cord_internal@absl@@CA?AW4MethodIdentifier@CordzUpdateTracker@23@PEBV123@@Z ?GetParentStack@CordzInfo@cord_internal@absl@@QEBA?AV?$Span@QEAX@3@XZ - ?GetPayload@Status@absl@@QEBA?AV?$optional@VCord@absl@@@2@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@Z - ?GetPayloads@Status@absl@@AEAAPEAV?$InlinedVector@UPayload@status_internal@absl@@$00V?$allocator@UPayload@status_internal@absl@@@__Cr@std@@@2@XZ - ?GetPayloads@Status@absl@@AEBAPEBV?$InlinedVector@UPayload@status_internal@absl@@$00V?$allocator@UPayload@status_internal@absl@@@__Cr@std@@@2@XZ + ?GetPayload@StatusRep@status_internal@absl@@QEBA?AV?$optional@VCord@absl@@@3@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@Z ?GetProgramCounter@debugging_internal@absl@@YAPEAXQEAX@Z ?GetRepHi@time_internal@absl@@YA_JVDuration@2@@Z ?GetRepLo@time_internal@absl@@YAIVDuration@2@@Z @@ -2920,7 +2923,7 @@ ?PermissionDeniedError@absl@@YA?AVStatus@1@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@Z ?Piece@AlphaNum@absl@@QEBA?AV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@XZ ?PiecewiseChunkSize@hash_internal@absl@@YA_KXZ - ?PointerToRep@Status@absl@@CA_KPEAUStatusRep@status_internal@2@@Z + ?PointerToRep@Status@absl@@CA_KPEAVStatusRep@status_internal@2@@Z ?Poison@CrcCordState@crc_internal@absl@@QEAAXXZ ?Poke@StdcppWaiter@synchronization_internal@absl@@QEAAXXZ ?Poke@Win32Waiter@synchronization_internal@absl@@QEAAXXZ @@ -2929,7 +2932,7 @@ ?Post@Win32Waiter@synchronization_internal@absl@@QEAAXXZ ?PrepareForSampling@HashtablezInfo@container_internal@absl@@QEAAX_J_K@Z ?PrepareToDie@LogMessage@log_internal@absl@@AEAAXXZ - ?PrepareToModify@Status@absl@@AEAAXXZ + ?PrepareToModify@Status@absl@@CAPEAVStatusRep@status_internal@2@_K@Z ?Prepend@Cord@absl@@QEAAXAEBV12@@Z ?Prepend@Cord@absl@@QEAAXV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@Z ?Prepend@CordRepBtree@cord_internal@absl@@SAPEAV123@PEAV123@PEAUCordRep@23@@Z @@ -2984,6 +2987,7 @@ ?Ref@CordRep@cord_internal@absl@@SAPEAU123@PEAU123@@Z ?Ref@CrcCordState@crc_internal@absl@@CAXPEAURefcountedRep@123@@Z ?Ref@Status@absl@@CAX_K@Z + ?Ref@StatusRep@status_internal@absl@@QEBAXXZ ?RefCordRep@CordzInfo@cord_internal@absl@@QEBAPEAUCordRep@23@XZ ?RefSharedEmptyRep@CrcCordState@crc_internal@absl@@CAPEAURefcountedRep@123@XZ ?Register@CycleClockSource@base_internal@absl@@CAXP6A_JXZ@Z @@ -3012,7 +3016,7 @@ ?RemovePrefix@Cord@absl@@QEAAX_K@Z ?RemoveSuffix@Cord@absl@@QEAAX_K@Z ?RemoveSuffix@CordRepBtree@cord_internal@absl@@SAPEAUCordRep@23@PEAV123@_K@Z - ?RepToPointer@Status@absl@@CAPEAUStatusRep@status_internal@2@_K@Z + ?RepToPointer@Status@absl@@CAPEBVStatusRep@status_internal@2@_K@Z ?Reset@?$AllocationTransaction@V?$allocator@PEAUCordRep@cord_internal@absl@@@__Cr@std@@@inlined_vector_internal@absl@@AEAAXXZ ?Reset@?$AllocationTransaction@V?$allocator@PEAVLogSink@absl@@@__Cr@std@@@inlined_vector_internal@absl@@AEAAXXZ ?Reset@?$AllocationTransaction@V?$allocator@UPayload@status_internal@absl@@@__Cr@std@@@inlined_vector_internal@absl@@AEAAXXZ @@ -3072,7 +3076,7 @@ ?SetMaxSamples@?$SampleRecorder@UHashtablezInfo@container_internal@absl@@@profiling_internal@absl@@QEAAX_K@Z ?SetMinLogLevel@absl@@YAXW4LogSeverityAtLeast@1@@Z ?SetMutexDeadlockDetectionMode@absl@@YAXW4OnDeadlockCycle@1@@Z - ?SetPayload@Status@absl@@QEAAXV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@VCord@2@@Z + ?SetPayload@StatusRep@status_internal@absl@@QEAAXV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@VCord@3@@Z ?SetPrecision@FormatConversionSpecImplFriend@str_format_internal@absl@@SAXHPEAVFormatConversionSpecImpl@23@@Z ?SetStackUnwinder@absl@@YAXP6AHPEAPEAXPEAHHHPEBX1@Z@Z ?SetStatusPayloadPrinter@status_internal@absl@@YAXP6A?AV?$optional@V?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@@2@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@AEBVCord@2@@Z@Z @@ -3244,9 +3248,10 @@ ?ToString@?$BigUnsigned@$03@strings_internal@absl@@QEBA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@XZ ?ToString@?$BigUnsigned@$0FE@@strings_internal@absl@@QEBA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@XZ ?ToString@Status@absl@@QEBA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@W4StatusToStringMode@2@@Z + ?ToString@StatusRep@status_internal@absl@@QEBA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@W4StatusToStringMode@3@@Z ?ToString@int128@absl@@AEBA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@XZ ?ToString@uint128@absl@@AEBA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@XZ - ?ToStringSlow@Status@absl@@AEBA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@W4StatusToStringMode@2@@Z + ?ToStringSlow@Status@absl@@CA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@_KW4StatusToStringMode@2@@Z ?ToTM@absl@@YA?AUtm@@VTime@1@VTimeZone@1@@Z ?ToTimeT@absl@@YA_JVTime@1@@Z ?ToTimespec@absl@@YA?AUtimespec@@VDuration@1@@Z @@ -3303,7 +3308,7 @@ ?Unref@CordRepBtree@cord_internal@absl@@SAXV?$Span@QEAUCordRep@cord_internal@absl@@@3@@Z ?Unref@CrcCordState@crc_internal@absl@@CAXPEAURefcountedRep@123@@Z ?Unref@Status@absl@@CAX_K@Z - ?UnrefNonInlined@Status@absl@@CAX_K@Z + ?Unref@StatusRep@status_internal@absl@@QEBAXXZ ?UnrefTree@InlineRep@Cord@absl@@AEAAXXZ ?Unregister@?$SampleRecorder@UHashtablezInfo@container_internal@absl@@@profiling_internal@absl@@QEAAXPEAUHashtablezInfo@container_internal@3@@Z ?UnsafeSetCordRep@CordzInfo@cord_internal@absl@@AEAAXPEAUCordRep@23@@Z @@ -3348,7 +3353,6 @@ ?WaitForNotification@Notification@absl@@QEBAXXZ ?WaitForNotificationWithDeadline@Notification@absl@@QEBA_NVTime@2@@Z ?WaitForNotificationWithTimeout@Notification@absl@@QEBA_NVDuration@2@@Z - ?Wakeup@CondVar@absl@@AEAAXPEAUPerThreadSynch@base_internal@2@@Z ?Wakeup@Mutex@absl@@AEAAPEAUPerThreadSynch@base_internal@2@PEAU342@@Z ?WebSafeBase64Escape@absl@@YA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@34@@Z ?WebSafeBase64Escape@absl@@YAXV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@PEAV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@34@@Z @@ -3915,6 +3919,7 @@ ?clear@InlineRep@Cord@absl@@QEAAPEAUCordRep@cord_internal@3@XZ ?clear_cordz_info@InlineData@cord_internal@absl@@QEAAXXZ ?code@Status@absl@@QEBA?AW4StatusCode@2@XZ + ?code@StatusRep@status_internal@absl@@QEBA?AW4StatusCode@3@XZ ?combine@?$HashStateBase@VMixingHashState@hash_internal@absl@@@hash_internal@absl@@SA?AVMixingHashState@23@V423@@Z ?combine_contiguous@MixingHashState@hash_internal@absl@@SA?AV123@V123@PEBE_K@Z ?compare_exchange_strong@?$__atomic_base@PEAVTimeZone@absl@@$0A@@__Cr@std@@QEAA_NAEAPEAVTimeZone@absl@@PEAV45@W4memory_order@23@2@Z @@ -4257,6 +4262,7 @@ ?max_size@?$vector@UViableSubstitution@strings_internal@absl@@V?$allocator@UViableSubstitution@strings_internal@absl@@@__Cr@std@@@__Cr@std@@QEBA_KXZ ?memcasecmp@strings_internal@absl@@YAHPEBD0_K@Z ?message@Status@absl@@QEBA?AV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@XZ + ?message@StatusRep@status_internal@absl@@QEBAAEBV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@XZ ?min@?$RandenPool@E@random_internal@absl@@SAEXZ ?min@?$RandenPool@G@random_internal@absl@@SAGXZ ?min@?$RandenPool@I@random_internal@absl@@SAIXZ
diff --git a/third_party/abseil-cpp/symbols_arm64_rel.def b/third_party/abseil-cpp/symbols_arm64_rel.def index dc71903..54b1c66 100644 --- a/third_party/abseil-cpp/symbols_arm64_rel.def +++ b/third_party/abseil-cpp/symbols_arm64_rel.def
@@ -1,6 +1,6 @@ EXPORTS ?$TSS0@?1??CrcAndCopy@CrcMemcpy@crc_internal@absl@@SA?AVcrc32c_t@3@PEIAXPEIBX_KV43@_N@Z@4HA - ??$?0AEBVCord@absl@@@?$optional_data_dtor_base@VCord@absl@@$0A@@optional_internal@absl@@IEAA@Uin_place_t@2@AEBVCord@2@@Z + ??$?0AEAVCord@absl@@@?$optional_data_dtor_base@VCord@absl@@$0A@@optional_internal@absl@@IEAA@Uin_place_t@2@AEAVCord@2@@Z ??$?0V?$allocator@D@__Cr@std@@@AlphaNum@absl@@QEAA@AEBV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@@Z ??$?0V?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@$0A@@Cord@absl@@QEAA@$$QEAV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@@Z ??$?6C$0A@@LogMessage@log_internal@absl@@QEAAAEAV012@AEBC@Z @@ -312,6 +312,7 @@ ??6time_internal@absl@@YAAEAV?$basic_ostream@DU?$char_traits@D@__Cr@std@@@__Cr@std@@AEAV234@V?$civil_time@Umonth_tag@time_internal@absl@@@detail@cctz@01@@Z ??6time_internal@absl@@YAAEAV?$basic_ostream@DU?$char_traits@D@__Cr@std@@@__Cr@std@@AEAV234@V?$civil_time@Usecond_tag@time_internal@absl@@@detail@cctz@01@@Z ??6time_internal@absl@@YAAEAV?$basic_ostream@DU?$char_traits@D@__Cr@std@@@__Cr@std@@AEAV234@V?$civil_time@Uyear_tag@time_internal@absl@@@detail@cctz@01@@Z + ??8StatusRep@status_internal@absl@@QEBA_NAEBV012@@Z ??A?$vector@UTransition@cctz@time_internal@absl@@V?$allocator@UTransition@cctz@time_internal@absl@@@__Cr@std@@@__Cr@std@@QEAAAEAUTransition@cctz@time_internal@absl@@_K@Z ??A?$vector@UTransitionType@cctz@time_internal@absl@@V?$allocator@UTransitionType@cctz@time_internal@absl@@@__Cr@std@@@__Cr@std@@QEAAAEAUTransitionType@cctz@time_internal@absl@@_K@Z ??ACord@absl@@QEBAD_K@Z @@ -374,6 +375,7 @@ ?Allocate@?$MallocAdapter@V?$allocator@UPayload@status_internal@absl@@@__Cr@std@@$0A@@inlined_vector_internal@absl@@SA?AU?$Allocation@V?$allocator@UPayload@status_internal@absl@@@__Cr@std@@@23@AEAV?$allocator@UPayload@status_internal@absl@@@__Cr@std@@_K@Z ?Allocate@?$MallocAdapter@V?$allocator@VFormatArgImpl@str_format_internal@absl@@@__Cr@std@@$0A@@inlined_vector_internal@absl@@SA?AU?$Allocation@V?$allocator@VFormatArgImpl@str_format_internal@absl@@@__Cr@std@@@23@AEAV?$allocator@VFormatArgImpl@str_format_internal@absl@@@__Cr@std@@_K@Z ?AlreadyExistsError@absl@@YA?AVStatus@1@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@Z + ?AlwaysTrue@Condition@absl@@CA_NPEBV12@@Z ?Append@?$AppendUninitializedTraits@V?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@X@strings_internal@absl@@SAXPEAV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@_K@Z ?Append@Cord@absl@@QEAAX$$QEAV12@@Z ?Append@Cord@absl@@QEAAXAEBV12@@Z @@ -440,6 +442,7 @@ ?ClearCurrentThreadIdentity@base_internal@absl@@YAXXZ ?ClearLogBacktraceLocation@absl@@YAXXZ ?ClearTimeZoneMapTestOnly@Impl@time_zone@cctz@time_internal@absl@@SAXXZ + ?CloneAndUnref@StatusRep@status_internal@absl@@QEBAPEAV123@XZ ?CombineContiguousImpl@MixingHashState@hash_internal@absl@@CA_K_KPEBE0U?$integral_constant@H$03@__Cr@std@@@Z ?CombineContiguousImpl@MixingHashState@hash_internal@absl@@CA_K_KPEBE0U?$integral_constant@H$07@__Cr@std@@@Z ?CombineLargeContiguousImpl32@MixingHashState@hash_internal@absl@@CA_K_KPEBE0@Z @@ -539,11 +542,10 @@ ?EqualsIgnoreCase@absl@@YA_NV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@0@Z ?EqualsImpl@Cord@absl@@AEBA_NAEBV12@_K@Z ?EqualsImpl@Cord@absl@@AEBA_NV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@_K@Z - ?EqualsSlow@Status@absl@@CA_NAEBV12@0@Z ?EquivTransitions@TimeZoneInfo@cctz@time_internal@absl@@AEBA_NEE@Z ?Erase@?$Storage@UPayload@status_internal@absl@@$00V?$allocator@UPayload@status_internal@absl@@@__Cr@std@@@inlined_vector_internal@absl@@QEAAPEAUPayload@status_internal@3@PEBU453@0@Z ?EraseMetaOnly@container_internal@absl@@YAXAEAVCommonFields@12@PEAW4ctrl_t@12@_K@Z - ?ErasePayload@Status@absl@@QEAA_NV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@Z + ?ErasePayload@StatusRep@status_internal@absl@@QEAA?AUEraseResult@123@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@Z ?ErrnoToStatus@absl@@YA?AVStatus@1@HV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@Z ?ErrnoToStatusCode@absl@@YA?AW4StatusCode@1@H@Z ?Eval@Condition@absl@@QEBA_NXZ @@ -601,7 +603,7 @@ ?Flush@LogSink@absl@@UEAAXXZ ?FlushLogSinks@log_internal@absl@@YAXXZ ?ForEachChunkAux@Cord@absl@@CAXPEAUCordRep@cord_internal@2@V?$FunctionRef@$$A6AXV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@Z@2@@Z - ?ForEachPayload@Status@absl@@QEBAXV?$FunctionRef@$$A6AXV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@AEBVCord@absl@@@Z@2@@Z + ?ForEachPayload@StatusRep@status_internal@absl@@QEBAXV?$FunctionRef@$$A6AXV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@AEBVCord@absl@@@Z@3@@Z ?ForVar2@CheckOpMessageBuilder@log_internal@absl@@QEAAAEAV?$basic_ostream@DU?$char_traits@D@__Cr@std@@@__Cr@std@@XZ ?ForgetDeadlockInfo@Mutex@absl@@QEAAXXZ ?FormatCivilTime@absl@@YA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@V?$civil_time@Uday_tag@time_internal@absl@@@detail@cctz@time_internal@1@@Z @@ -673,7 +675,7 @@ ?GetMorePreciseMemoryUsage@cord_internal@absl@@YA_KPEBUCordRep@12@@Z ?GetParentMethod@CordzInfo@cord_internal@absl@@CA?AW4MethodIdentifier@CordzUpdateTracker@23@PEBV123@@Z ?GetParentStack@CordzInfo@cord_internal@absl@@QEBA?AV?$Span@QEAX@3@XZ - ?GetPayload@Status@absl@@QEBA?AV?$optional@VCord@absl@@@2@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@Z + ?GetPayload@StatusRep@status_internal@absl@@QEBA?AV?$optional@VCord@absl@@@3@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@Z ?GetProgramCounter@debugging_internal@absl@@YAPEAXQEAX@Z ?GetSaltMaterial@random_internal@absl@@YA?AV?$optional@I@2@XZ ?GetSkipCount@ExponentialBiased@profiling_internal@absl@@QEAA_J_J@Z @@ -849,7 +851,7 @@ ?Post@Win32Waiter@synchronization_internal@absl@@QEAAXXZ ?PrepareForSampling@HashtablezInfo@container_internal@absl@@QEAAX_J_K@Z ?PrepareToDie@LogMessage@log_internal@absl@@AEAAXXZ - ?PrepareToModify@Status@absl@@AEAAXXZ + ?PrepareToModify@Status@absl@@CAPEAVStatusRep@status_internal@2@_K@Z ?Prepend@Cord@absl@@QEAAXAEBV12@@Z ?Prepend@CordRepBtree@cord_internal@absl@@SAPEAV123@PEAV123@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@_K@Z ?PrependArray@Cord@absl@@AEAAXV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@W4MethodIdentifier@CordzUpdateTracker@cord_internal@2@@Z @@ -940,7 +942,7 @@ ?SetMaxFramesInLogStackTrace@log_internal@absl@@YAXH@Z ?SetMinLogLevel@absl@@YAXW4LogSeverityAtLeast@1@@Z ?SetMutexDeadlockDetectionMode@absl@@YAXW4OnDeadlockCycle@1@@Z - ?SetPayload@Status@absl@@QEAAXV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@VCord@2@@Z + ?SetPayload@StatusRep@status_internal@absl@@QEAAXV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@VCord@3@@Z ?SetStackUnwinder@absl@@YAXP6AHPEAPEAXPEAHHHPEBX1@Z@Z ?SetStatusPayloadPrinter@status_internal@absl@@YAXP6A?AV?$optional@V?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@@2@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@AEBVCord@2@@Z@Z ?SetStderrThreshold@absl@@YAXW4LogSeverityAtLeast@1@@Z @@ -1054,9 +1056,10 @@ ?ToString@?$BigUnsigned@$03@strings_internal@absl@@QEBA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@XZ ?ToString@?$BigUnsigned@$0FE@@strings_internal@absl@@QEBA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@XZ ?ToString@Status@absl@@QEBA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@W4StatusToStringMode@2@@Z + ?ToString@StatusRep@status_internal@absl@@QEBA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@W4StatusToStringMode@3@@Z ?ToString@int128@absl@@AEBA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@XZ ?ToString@uint128@absl@@AEBA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@XZ - ?ToStringSlow@Status@absl@@AEBA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@W4StatusToStringMode@2@@Z + ?ToStringSlow@Status@absl@@CA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@_KW4StatusToStringMode@2@@Z ?ToTM@absl@@YA?AUtm@@VTime@1@VTimeZone@1@@Z ?ToTimeT@absl@@YA_JVTime@1@@Z ?ToTimespec@absl@@YA?AUtimespec@@VDuration@1@@Z @@ -1093,7 +1096,7 @@ ?UnparseFlag@absl@@YA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@VDuration@1@@Z ?UnparseFlag@absl@@YA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@VTime@1@@Z ?Unref@CrcCordState@crc_internal@absl@@CAXPEAURefcountedRep@123@@Z - ?UnrefNonInlined@Status@absl@@CAX_K@Z + ?Unref@StatusRep@status_internal@absl@@QEBAXXZ ?UnrefTree@InlineRep@Cord@absl@@AEAAXXZ ?UnsampleSlow@container_internal@absl@@YAXPEAUHashtablezInfo@12@@Z ?Unscramble@CRC32@crc_internal@absl@@UEBAXPEAI@Z @@ -1111,7 +1114,6 @@ ?WaitForNotification@Notification@absl@@QEBAXXZ ?WaitForNotificationWithDeadline@Notification@absl@@QEBA_NVTime@2@@Z ?WaitForNotificationWithTimeout@Notification@absl@@QEBA_NVDuration@2@@Z - ?Wakeup@CondVar@absl@@AEAAXPEAUPerThreadSynch@base_internal@2@@Z ?Wakeup@Mutex@absl@@AEAAPEAUPerThreadSynch@base_internal@2@PEAU342@@Z ?WebSafeBase64Escape@absl@@YA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@34@@Z ?WebSafeBase64Escape@absl@@YAXV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@PEAV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@34@@Z @@ -1158,7 +1160,6 @@ ?clear@?$__split_buffer@UTransition@cctz@time_internal@absl@@AEAV?$allocator@UTransition@cctz@time_internal@absl@@@__Cr@std@@@__Cr@std@@QEAAXXZ ?clear@?$__split_buffer@UTransitionType@cctz@time_internal@absl@@AEAV?$allocator@UTransitionType@cctz@time_internal@absl@@@__Cr@std@@@__Cr@std@@QEAAXXZ ?clear@?$__split_buffer@UViableSubstitution@strings_internal@absl@@AEAV?$allocator@UViableSubstitution@strings_internal@absl@@@__Cr@std@@@__Cr@std@@QEAAXXZ - ?code@Status@absl@@QEBA?AW4StatusCode@2@XZ ?cycle_clock_source_@CycleClock@base_internal@absl@@0U?$atomic@P6A_JXZ@__Cr@std@@A ?day_difference@impl@detail@cctz@time_internal@absl@@YA_J_JCC0CC@Z ?description@time_zone@cctz@time_internal@absl@@QEBA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@XZ @@ -1212,7 +1213,6 @@ ?push_front@?$__split_buffer@PEAPEBVImpl@time_zone@cctz@time_internal@absl@@V?$allocator@PEAPEBVImpl@time_zone@cctz@time_internal@absl@@@__Cr@std@@@__Cr@std@@QEAAX$$QEAPEAPEBVImpl@time_zone@cctz@time_internal@absl@@@Z ?push_front@?$__split_buffer@PEAUPrefixCrc@CrcCordState@crc_internal@absl@@AEAV?$allocator@PEAUPrefixCrc@CrcCordState@crc_internal@absl@@@__Cr@std@@@__Cr@std@@QEAAXAEBQEAUPrefixCrc@CrcCordState@crc_internal@absl@@@Z ?push_front@?$__split_buffer@PEAUPrefixCrc@CrcCordState@crc_internal@absl@@V?$allocator@PEAUPrefixCrc@CrcCordState@crc_internal@absl@@@__Cr@std@@@__Cr@std@@QEAAX$$QEAPEAUPrefixCrc@CrcCordState@crc_internal@absl@@@Z - ?raw_code@Status@absl@@QEBAHXZ ?reserve@?$vector@UTransition@cctz@time_internal@absl@@V?$allocator@UTransition@cctz@time_internal@absl@@@__Cr@std@@@__Cr@std@@QEAAX_K@Z ?reserve@?$vector@UTransitionType@cctz@time_internal@absl@@V?$allocator@UTransitionType@cctz@time_internal@absl@@@__Cr@std@@@__Cr@std@@QEAAX_K@Z ?reserve@?$vector@UViableSubstitution@strings_internal@absl@@V?$allocator@UViableSubstitution@strings_internal@absl@@@__Cr@std@@@__Cr@std@@QEAAX_K@Z
diff --git a/third_party/abseil-cpp/symbols_x64_dbg.def b/third_party/abseil-cpp/symbols_x64_dbg.def index eedc839..09abf36 100644 --- a/third_party/abseil-cpp/symbols_x64_dbg.def +++ b/third_party/abseil-cpp/symbols_x64_dbg.def
@@ -110,6 +110,8 @@ ??$?0AEAV?$allocator@UTransition@cctz@time_internal@absl@@@__Cr@std@@X@?$__compressed_pair_elem@AEAV?$allocator@UTransition@cctz@time_internal@absl@@@__Cr@std@@$00$0A@@__Cr@std@@QEAA@AEAV?$allocator@UTransition@cctz@time_internal@absl@@@12@@Z ??$?0AEAV?$allocator@UTransitionType@cctz@time_internal@absl@@@__Cr@std@@X@?$__compressed_pair_elem@AEAV?$allocator@UTransitionType@cctz@time_internal@absl@@@__Cr@std@@$00$0A@@__Cr@std@@QEAA@AEAV?$allocator@UTransitionType@cctz@time_internal@absl@@@12@@Z ??$?0AEAV?$allocator@UViableSubstitution@strings_internal@absl@@@__Cr@std@@X@?$__compressed_pair_elem@AEAV?$allocator@UViableSubstitution@strings_internal@absl@@@__Cr@std@@$00$0A@@__Cr@std@@QEAA@AEAV?$allocator@UViableSubstitution@strings_internal@absl@@@12@@Z + ??$?0AEAVCord@absl@@$0A@@?$optional@VCord@absl@@@absl@@QEAA@AEAVCord@1@@Z + ??$?0AEAVCord@absl@@@?$optional_data_dtor_base@VCord@absl@@$0A@@optional_internal@absl@@IEAA@Uin_place_t@2@AEAVCord@2@@Z ??$?0AEBV?$allocator@UPayload@status_internal@absl@@@__Cr@std@@@?$Storage@V?$allocator@UPayload@status_internal@absl@@@__Cr@std@@$0A@$00@internal_compressed_tuple@container_internal@absl@@QEAA@Uin_place_t@3@AEBV?$allocator@UPayload@status_internal@absl@@@__Cr@std@@@Z ??$?0AEBV?$allocator@UPayload@status_internal@absl@@@__Cr@std@@I$00@?$CompressedTuple@V?$allocator@UPayload@status_internal@absl@@@__Cr@std@@_K@container_internal@absl@@QEAA@AEBV?$allocator@UPayload@status_internal@absl@@@__Cr@std@@$$QEAI@Z ??$?0AEBV?$allocator@UPayload@status_internal@absl@@@__Cr@std@@I@?$CompressedTupleImpl@V?$CompressedTuple@V?$allocator@UPayload@status_internal@absl@@@__Cr@std@@_K@container_internal@absl@@U?$integer_sequence@_K$0A@$00@3@$00@internal_compressed_tuple@container_internal@absl@@QEAA@Uin_place_t@3@AEBV?$allocator@UPayload@status_internal@absl@@@__Cr@std@@$$QEAI@Z @@ -118,8 +120,6 @@ ??$?0AEBV?$allocator@VFormatArgImpl@str_format_internal@absl@@@__Cr@std@@I@?$CompressedTupleImpl@V?$CompressedTuple@V?$allocator@VFormatArgImpl@str_format_internal@absl@@@__Cr@std@@_K@container_internal@absl@@U?$integer_sequence@_K$0A@$00@3@$00@internal_compressed_tuple@container_internal@absl@@QEAA@Uin_place_t@3@AEBV?$allocator@VFormatArgImpl@str_format_internal@absl@@@__Cr@std@@$$QEAI@Z ??$?0AEBV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@$$Z$$V$$Z$0A@$$Z$S@?$pair@$$CBV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@PEBVImpl@time_zone@cctz@time_internal@absl@@@__Cr@std@@AEAA@Upiecewise_construct_t@12@AEAV?$tuple@AEBV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@@12@AEAV?$tuple@$$V@12@U?$__tuple_indices@$0A@@12@U?$__tuple_indices@$S@12@@Z ??$?0AEBV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@$$Z$$V@?$pair@$$CBV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@PEBVImpl@time_zone@cctz@time_internal@absl@@@__Cr@std@@QEAA@Upiecewise_construct_t@12@V?$tuple@AEBV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@@12@V?$tuple@$$V@12@@Z - ??$?0AEBVCord@absl@@$0A@@?$optional@VCord@absl@@@absl@@QEAA@AEBVCord@1@@Z - ??$?0AEBVCord@absl@@@?$optional_data_dtor_base@VCord@absl@@$0A@@optional_internal@absl@@IEAA@Uin_place_t@2@AEBVCord@2@@Z ??$?0D@FormatArgImpl@str_format_internal@absl@@QEAA@AEBD@Z ??$?0H@FormatArgImpl@str_format_internal@absl@@QEAA@AEBH@Z ??$?0HU__default_init_tag@__Cr@std@@@?$__compressed_pair@_KU?$hash@PEBUCordRep@cord_internal@absl@@@__Cr@std@@@__Cr@std@@QEAA@$$QEAH$$QEAU__default_init_tag@12@@Z @@ -283,6 +283,7 @@ ??$?8PEAUTransitionType@cctz@time_internal@absl@@@__Cr@std@@YA_NAEBV?$__wrap_iter@PEAUTransitionType@cctz@time_internal@absl@@@01@0@Z ??$?8PEBQEAVLogSink@absl@@PEAPEAV01@@__Cr@std@@YA_NAEBV?$__wrap_iter@PEBQEAVLogSink@absl@@@01@AEBV?$__wrap_iter@PEAPEAVLogSink@absl@@@01@@Z ??$?8PEBUConversionItem@ParsedFormatBase@str_format_internal@absl@@@__Cr@std@@YA_NAEBV?$__wrap_iter@PEBUConversionItem@ParsedFormatBase@str_format_internal@absl@@@01@0@Z + ??$?8V?$InlinedVector@UPayload@status_internal@absl@@$00V?$allocator@UPayload@status_internal@absl@@@__Cr@std@@@absl@@U?$default_delete@V?$InlinedVector@UPayload@status_internal@absl@@$00V?$allocator@UPayload@status_internal@absl@@@__Cr@std@@@absl@@@__Cr@std@@@__Cr@std@@YA_NAEBV?$unique_ptr@V?$InlinedVector@UPayload@status_internal@absl@@$00V?$allocator@UPayload@status_internal@absl@@@__Cr@std@@@absl@@U?$default_delete@V?$InlinedVector@UPayload@status_internal@absl@@$00V?$allocator@UPayload@status_internal@absl@@@__Cr@std@@@absl@@@__Cr@std@@@01@$$T@Z ??$?8VZoneInfoSource@cctz@time_internal@absl@@U?$default_delete@VZoneInfoSource@cctz@time_internal@absl@@@__Cr@std@@@__Cr@std@@YA_NAEBV?$unique_ptr@VZoneInfoSource@cctz@time_internal@absl@@U?$default_delete@VZoneInfoSource@cctz@time_internal@absl@@@__Cr@std@@@01@$$T@Z ??$?9PEAPEAVCordzHandle@cord_internal@absl@@@__Cr@std@@YA_NAEBV?$__wrap_iter@PEAPEAVCordzHandle@cord_internal@absl@@@01@0@Z ??$?9PEAPEAVCordzHandle@cord_internal@absl@@PEAPEAV012@@__Cr@std@@YA_NAEBV?$reverse_iterator@PEAPEAVCordzHandle@cord_internal@absl@@@01@0@Z @@ -1038,9 +1039,9 @@ ??$forward@AEAV?$allocator@PEAUCordRep@cord_internal@absl@@@__Cr@std@@@absl@@YAAEAV?$allocator@PEAUCordRep@cord_internal@absl@@@__Cr@std@@AEAV123@@Z ??$forward@AEAV?$allocator@PEAVLogSink@absl@@@__Cr@std@@@absl@@YAAEAV?$allocator@PEAVLogSink@absl@@@__Cr@std@@AEAV123@@Z ??$forward@AEAV?$allocator@UPayload@status_internal@absl@@@__Cr@std@@@absl@@YAAEAV?$allocator@UPayload@status_internal@absl@@@__Cr@std@@AEAV123@@Z + ??$forward@AEAVCord@absl@@@absl@@YAAEAVCord@0@AEAV10@@Z ??$forward@AEBV?$allocator@UPayload@status_internal@absl@@@__Cr@std@@@absl@@YAAEBV?$allocator@UPayload@status_internal@absl@@@__Cr@std@@AEBV123@@Z ??$forward@AEBV?$allocator@VFormatArgImpl@str_format_internal@absl@@@__Cr@std@@@absl@@YAAEBV?$allocator@VFormatArgImpl@str_format_internal@absl@@@__Cr@std@@AEBV123@@Z - ??$forward@AEBVCord@absl@@@absl@@YAAEBVCord@0@AEBV10@@Z ??$forward@H@absl@@YA$$QEAHAEAH@Z ??$forward@I@absl@@YA$$QEAIAEAI@Z ??$forward@V?$allocator@H@__Cr@std@@@absl@@YA$$QEAV?$allocator@H@__Cr@std@@AEAV123@@Z @@ -1544,6 +1545,7 @@ ??0SpinLock@base_internal@absl@@QEAA@W4SchedulingMode@12@@Z ??0SpinLock@base_internal@absl@@QEAA@XZ ??0SpinLockHolder@base_internal@absl@@QEAA@PEAVSpinLock@12@@Z + ??0Status@absl@@AEAA@_K@Z ??0Status@absl@@QEAA@$$QEAV01@@Z ??0Status@absl@@QEAA@AEBV01@@Z ??0Status@absl@@QEAA@W4StatusCode@1@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@Z @@ -1791,6 +1793,7 @@ ??8CharIterator@Cord@absl@@QEBA_NAEBV012@@Z ??8ChunkIterator@Cord@absl@@QEBA_NAEBV012@@Z ??8GraphId@synchronization_internal@absl@@QEBA_NAEBU012@@Z + ??8StatusRep@status_internal@absl@@QEBA_NAEBV012@@Z ??8__Cr@std@@YA_NAEBU__deque_range@?$deque@UPrefixCrc@CrcCordState@crc_internal@absl@@V?$allocator@UPrefixCrc@CrcCordState@crc_internal@absl@@@__Cr@std@@@01@0@Z ??8__Cr@std@@YA_NAEBV?$__deque_iterator@UPrefixCrc@CrcCordState@crc_internal@absl@@PEAU1234@AEAU1234@PEAPEAU1234@_J$0A@@01@0@Z ??8__Cr@std@@YA_NAEBV?$__deque_iterator@UPrefixCrc@CrcCordState@crc_internal@absl@@PEBU1234@AEBU1234@PEBQEBU1234@_J$0A@@01@0@Z @@ -1973,6 +1976,7 @@ ??R<lambda_1>@?0??CompareSlowPath@Cord@absl@@AEBAHAEBV23@_K1@Z@QEBA?A?<auto>@@PEAVChunkIterator@23@PEAV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@Z ??R<lambda_1>@?0??CompareSlowPath@Cord@absl@@AEBAHV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@_K1@Z@QEBA?A?<auto>@@PEAVChunkIterator@23@PEAV456@@Z ??R<lambda_1>@?0??InitFrom@?$Storage@UPayload@status_internal@absl@@$00V?$allocator@UPayload@status_internal@absl@@@__Cr@std@@@inlined_vector_internal@absl@@QEAAXAEBV234@@Z@QEBA?A?<auto>@@XZ + ??R<lambda_1>@?0??InlinedRepToCode@Status@absl@@CA?AW4StatusCode@3@_K@Z@QEBA?A?<auto>@@XZ ??R<lambda_1>@?0??SetLength@CordBuffer@absl@@QEAAX_K@Z@QEBA?A?<auto>@@XZ ??R<lambda_1>@?0??SubtractSize@?$Storage@H$0CP@V?$allocator@H@__Cr@std@@@inlined_vector_internal@absl@@QEAAX_K@Z@QEBA?A?<auto>@@XZ ??R<lambda_1>@?0??SubtractSize@?$Storage@PEAUCordRep@cord_internal@absl@@$01V?$allocator@PEAUCordRep@cord_internal@absl@@@__Cr@std@@@inlined_vector_internal@absl@@QEAAX_K@Z@QEBA?A?<auto>@@XZ @@ -2116,6 +2120,7 @@ ?AllocatedSizeToTag@cord_internal@absl@@YAE_K@Z ?AllocatedSizeToTagUnchecked@cord_internal@absl@@YAE_K@Z ?AlreadyExistsError@absl@@YA?AVStatus@1@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@Z + ?AlwaysTrue@Condition@absl@@CA_NPEBV12@@Z ?Append@?$AppendUninitializedTraits@V?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@X@strings_internal@absl@@SAXPEAV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@_K@Z ?Append@Cord@absl@@QEAAX$$QEAV12@@Z ?Append@Cord@absl@@QEAAXAEBV12@@Z @@ -2200,6 +2205,7 @@ ?ClearCurrentThreadIdentity@base_internal@absl@@YAXXZ ?ClearLogBacktraceLocation@absl@@YAXXZ ?ClearTimeZoneMapTestOnly@Impl@time_zone@cctz@time_internal@absl@@SAXXZ + ?CloneAndUnref@StatusRep@status_internal@absl@@QEBAPEAV123@XZ ?CodeToInlinedRep@Status@absl@@CA_KW4StatusCode@2@@Z ?CombineContiguousImpl@MixingHashState@hash_internal@absl@@CA_K_KPEBE0U?$integral_constant@H$03@__Cr@std@@@Z ?CombineContiguousImpl@MixingHashState@hash_internal@absl@@CA_K_KPEBE0U?$integral_constant@H$07@__Cr@std@@@Z @@ -2380,11 +2386,10 @@ ?EqualsIgnoreCase@absl@@YA_NV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@0@Z ?EqualsImpl@Cord@absl@@AEBA_NAEBV12@_K@Z ?EqualsImpl@Cord@absl@@AEBA_NV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@_K@Z - ?EqualsSlow@Status@absl@@CA_NAEBV12@0@Z ?EquivTransitions@TimeZoneInfo@cctz@time_internal@absl@@AEBA_NEE@Z ?Erase@?$Storage@UPayload@status_internal@absl@@$00V?$allocator@UPayload@status_internal@absl@@@__Cr@std@@@inlined_vector_internal@absl@@QEAAPEAUPayload@status_internal@3@PEBU453@0@Z ?EraseMetaOnly@container_internal@absl@@YAXAEAVCommonFields@12@PEAW4ctrl_t@12@_K@Z - ?ErasePayload@Status@absl@@QEAA_NV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@Z + ?ErasePayload@StatusRep@status_internal@absl@@QEAA?AUEraseResult@123@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@Z ?ErrnoToStatus@absl@@YA?AVStatus@1@HV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@Z ?ErrnoToStatusCode@absl@@YA?AW4StatusCode@1@H@Z ?Eval@Condition@absl@@QEBA_NXZ @@ -2449,7 +2454,7 @@ ?FlushLogSinks@absl@@YAXXZ ?FlushLogSinks@log_internal@absl@@YAXXZ ?ForEachChunkAux@Cord@absl@@CAXPEAUCordRep@cord_internal@2@V?$FunctionRef@$$A6AXV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@Z@2@@Z - ?ForEachPayload@Status@absl@@QEBAXV?$FunctionRef@$$A6AXV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@AEBVCord@absl@@@Z@2@@Z + ?ForEachPayload@StatusRep@status_internal@absl@@QEBAXV?$FunctionRef@$$A6AXV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@AEBVCord@absl@@@Z@3@@Z ?ForVar1@CheckOpMessageBuilder@log_internal@absl@@QEAAAEAV?$basic_ostream@DU?$char_traits@D@__Cr@std@@@__Cr@std@@XZ ?ForVar2@CheckOpMessageBuilder@log_internal@absl@@QEAAAEAV?$basic_ostream@DU?$char_traits@D@__Cr@std@@@__Cr@std@@XZ ?ForgetDeadlockInfo@Mutex@absl@@QEAAXXZ @@ -2594,9 +2599,7 @@ ?GetOrCreateCurrentThreadIdentity@synchronization_internal@absl@@YAPEAUThreadIdentity@base_internal@2@XZ ?GetParentMethod@CordzInfo@cord_internal@absl@@CA?AW4MethodIdentifier@CordzUpdateTracker@23@PEBV123@@Z ?GetParentStack@CordzInfo@cord_internal@absl@@QEBA?AV?$Span@QEAX@3@XZ - ?GetPayload@Status@absl@@QEBA?AV?$optional@VCord@absl@@@2@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@Z - ?GetPayloads@Status@absl@@AEAAPEAV?$InlinedVector@UPayload@status_internal@absl@@$00V?$allocator@UPayload@status_internal@absl@@@__Cr@std@@@2@XZ - ?GetPayloads@Status@absl@@AEBAPEBV?$InlinedVector@UPayload@status_internal@absl@@$00V?$allocator@UPayload@status_internal@absl@@@__Cr@std@@@2@XZ + ?GetPayload@StatusRep@status_internal@absl@@QEBA?AV?$optional@VCord@absl@@@3@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@Z ?GetProgramCounter@debugging_internal@absl@@YAPEAXQEAX@Z ?GetRepHi@time_internal@absl@@YA_JVDuration@2@@Z ?GetRepLo@time_internal@absl@@YAIVDuration@2@@Z @@ -2918,7 +2921,7 @@ ?PermissionDeniedError@absl@@YA?AVStatus@1@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@Z ?Piece@AlphaNum@absl@@QEBA?AV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@XZ ?PiecewiseChunkSize@hash_internal@absl@@YA_KXZ - ?PointerToRep@Status@absl@@CA_KPEAUStatusRep@status_internal@2@@Z + ?PointerToRep@Status@absl@@CA_KPEAVStatusRep@status_internal@2@@Z ?Poison@CrcCordState@crc_internal@absl@@QEAAXXZ ?Poke@StdcppWaiter@synchronization_internal@absl@@QEAAXXZ ?Poke@Win32Waiter@synchronization_internal@absl@@QEAAXXZ @@ -2927,7 +2930,7 @@ ?Post@Win32Waiter@synchronization_internal@absl@@QEAAXXZ ?PrepareForSampling@HashtablezInfo@container_internal@absl@@QEAAX_J_K@Z ?PrepareToDie@LogMessage@log_internal@absl@@AEAAXXZ - ?PrepareToModify@Status@absl@@AEAAXXZ + ?PrepareToModify@Status@absl@@CAPEAVStatusRep@status_internal@2@_K@Z ?Prepend@Cord@absl@@QEAAXAEBV12@@Z ?Prepend@Cord@absl@@QEAAXV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@Z ?Prepend@CordRepBtree@cord_internal@absl@@SAPEAV123@PEAV123@PEAUCordRep@23@@Z @@ -2982,6 +2985,7 @@ ?Ref@CordRep@cord_internal@absl@@SAPEAU123@PEAU123@@Z ?Ref@CrcCordState@crc_internal@absl@@CAXPEAURefcountedRep@123@@Z ?Ref@Status@absl@@CAX_K@Z + ?Ref@StatusRep@status_internal@absl@@QEBAXXZ ?RefCordRep@CordzInfo@cord_internal@absl@@QEBAPEAUCordRep@23@XZ ?RefSharedEmptyRep@CrcCordState@crc_internal@absl@@CAPEAURefcountedRep@123@XZ ?Register@CycleClockSource@base_internal@absl@@CAXP6A_JXZ@Z @@ -3010,7 +3014,7 @@ ?RemovePrefix@Cord@absl@@QEAAX_K@Z ?RemoveSuffix@Cord@absl@@QEAAX_K@Z ?RemoveSuffix@CordRepBtree@cord_internal@absl@@SAPEAUCordRep@23@PEAV123@_K@Z - ?RepToPointer@Status@absl@@CAPEAUStatusRep@status_internal@2@_K@Z + ?RepToPointer@Status@absl@@CAPEBVStatusRep@status_internal@2@_K@Z ?Reset@?$AllocationTransaction@V?$allocator@PEAUCordRep@cord_internal@absl@@@__Cr@std@@@inlined_vector_internal@absl@@AEAAXXZ ?Reset@?$AllocationTransaction@V?$allocator@PEAVLogSink@absl@@@__Cr@std@@@inlined_vector_internal@absl@@AEAAXXZ ?Reset@?$AllocationTransaction@V?$allocator@UPayload@status_internal@absl@@@__Cr@std@@@inlined_vector_internal@absl@@AEAAXXZ @@ -3070,7 +3074,7 @@ ?SetMaxSamples@?$SampleRecorder@UHashtablezInfo@container_internal@absl@@@profiling_internal@absl@@QEAAX_K@Z ?SetMinLogLevel@absl@@YAXW4LogSeverityAtLeast@1@@Z ?SetMutexDeadlockDetectionMode@absl@@YAXW4OnDeadlockCycle@1@@Z - ?SetPayload@Status@absl@@QEAAXV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@VCord@2@@Z + ?SetPayload@StatusRep@status_internal@absl@@QEAAXV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@VCord@3@@Z ?SetPrecision@FormatConversionSpecImplFriend@str_format_internal@absl@@SAXHPEAVFormatConversionSpecImpl@23@@Z ?SetStackUnwinder@absl@@YAXP6AHPEAPEAXPEAHHHPEBX1@Z@Z ?SetStatusPayloadPrinter@status_internal@absl@@YAXP6A?AV?$optional@V?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@@2@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@AEBVCord@2@@Z@Z @@ -3242,9 +3246,10 @@ ?ToString@?$BigUnsigned@$03@strings_internal@absl@@QEBA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@XZ ?ToString@?$BigUnsigned@$0FE@@strings_internal@absl@@QEBA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@XZ ?ToString@Status@absl@@QEBA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@W4StatusToStringMode@2@@Z + ?ToString@StatusRep@status_internal@absl@@QEBA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@W4StatusToStringMode@3@@Z ?ToString@int128@absl@@AEBA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@XZ ?ToString@uint128@absl@@AEBA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@XZ - ?ToStringSlow@Status@absl@@AEBA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@W4StatusToStringMode@2@@Z + ?ToStringSlow@Status@absl@@CA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@_KW4StatusToStringMode@2@@Z ?ToTM@absl@@YA?AUtm@@VTime@1@VTimeZone@1@@Z ?ToTimeT@absl@@YA_JVTime@1@@Z ?ToTimespec@absl@@YA?AUtimespec@@VDuration@1@@Z @@ -3301,7 +3306,7 @@ ?Unref@CordRepBtree@cord_internal@absl@@SAXV?$Span@QEAUCordRep@cord_internal@absl@@@3@@Z ?Unref@CrcCordState@crc_internal@absl@@CAXPEAURefcountedRep@123@@Z ?Unref@Status@absl@@CAX_K@Z - ?UnrefNonInlined@Status@absl@@CAX_K@Z + ?Unref@StatusRep@status_internal@absl@@QEBAXXZ ?UnrefTree@InlineRep@Cord@absl@@AEAAXXZ ?Unregister@?$SampleRecorder@UHashtablezInfo@container_internal@absl@@@profiling_internal@absl@@QEAAXPEAUHashtablezInfo@container_internal@3@@Z ?UnsafeSetCordRep@CordzInfo@cord_internal@absl@@AEAAXPEAUCordRep@23@@Z @@ -3346,7 +3351,6 @@ ?WaitForNotification@Notification@absl@@QEBAXXZ ?WaitForNotificationWithDeadline@Notification@absl@@QEBA_NVTime@2@@Z ?WaitForNotificationWithTimeout@Notification@absl@@QEBA_NVDuration@2@@Z - ?Wakeup@CondVar@absl@@AEAAXPEAUPerThreadSynch@base_internal@2@@Z ?Wakeup@Mutex@absl@@AEAAPEAUPerThreadSynch@base_internal@2@PEAU342@@Z ?WebSafeBase64Escape@absl@@YA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@34@@Z ?WebSafeBase64Escape@absl@@YAXV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@PEAV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@34@@Z @@ -3914,6 +3918,7 @@ ?clear@InlineRep@Cord@absl@@QEAAPEAUCordRep@cord_internal@3@XZ ?clear_cordz_info@InlineData@cord_internal@absl@@QEAAXXZ ?code@Status@absl@@QEBA?AW4StatusCode@2@XZ + ?code@StatusRep@status_internal@absl@@QEBA?AW4StatusCode@3@XZ ?combine@?$HashStateBase@VMixingHashState@hash_internal@absl@@@hash_internal@absl@@SA?AVMixingHashState@23@V423@@Z ?combine_contiguous@MixingHashState@hash_internal@absl@@SA?AV123@V123@PEBE_K@Z ?compare_exchange_strong@?$__atomic_base@PEAVTimeZone@absl@@$0A@@__Cr@std@@QEAA_NAEAPEAVTimeZone@absl@@PEAV45@W4memory_order@23@2@Z @@ -4256,6 +4261,7 @@ ?max_size@?$vector@UViableSubstitution@strings_internal@absl@@V?$allocator@UViableSubstitution@strings_internal@absl@@@__Cr@std@@@__Cr@std@@QEBA_KXZ ?memcasecmp@strings_internal@absl@@YAHPEBD0_K@Z ?message@Status@absl@@QEBA?AV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@XZ + ?message@StatusRep@status_internal@absl@@QEBAAEBV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@XZ ?min@?$RandenPool@E@random_internal@absl@@SAEXZ ?min@?$RandenPool@G@random_internal@absl@@SAGXZ ?min@?$RandenPool@I@random_internal@absl@@SAIXZ
diff --git a/third_party/abseil-cpp/symbols_x64_rel.def b/third_party/abseil-cpp/symbols_x64_rel.def index 65c41b3..58d9a84 100644 --- a/third_party/abseil-cpp/symbols_x64_rel.def +++ b/third_party/abseil-cpp/symbols_x64_rel.def
@@ -1,6 +1,6 @@ EXPORTS ?$TSS0@?1??CrcAndCopy@CrcMemcpy@crc_internal@absl@@SA?AVcrc32c_t@3@PEIAXPEIBX_KV43@_N@Z@4HA - ??$?0AEBVCord@absl@@@?$optional_data_dtor_base@VCord@absl@@$0A@@optional_internal@absl@@IEAA@Uin_place_t@2@AEBVCord@2@@Z + ??$?0AEAVCord@absl@@@?$optional_data_dtor_base@VCord@absl@@$0A@@optional_internal@absl@@IEAA@Uin_place_t@2@AEAVCord@2@@Z ??$?0V?$allocator@D@__Cr@std@@@AlphaNum@absl@@QEAA@AEBV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@@Z ??$?0V?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@$0A@@Cord@absl@@QEAA@$$QEAV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@@Z ??$?6C$0A@@LogMessage@log_internal@absl@@QEAAAEAV012@AEBC@Z @@ -308,6 +308,7 @@ ??6time_internal@absl@@YAAEAV?$basic_ostream@DU?$char_traits@D@__Cr@std@@@__Cr@std@@AEAV234@V?$civil_time@Umonth_tag@time_internal@absl@@@detail@cctz@01@@Z ??6time_internal@absl@@YAAEAV?$basic_ostream@DU?$char_traits@D@__Cr@std@@@__Cr@std@@AEAV234@V?$civil_time@Usecond_tag@time_internal@absl@@@detail@cctz@01@@Z ??6time_internal@absl@@YAAEAV?$basic_ostream@DU?$char_traits@D@__Cr@std@@@__Cr@std@@AEAV234@V?$civil_time@Uyear_tag@time_internal@absl@@@detail@cctz@01@@Z + ??8StatusRep@status_internal@absl@@QEBA_NAEBV012@@Z ??A?$vector@UTransition@cctz@time_internal@absl@@V?$allocator@UTransition@cctz@time_internal@absl@@@__Cr@std@@@__Cr@std@@QEAAAEAUTransition@cctz@time_internal@absl@@_K@Z ??A?$vector@UTransitionType@cctz@time_internal@absl@@V?$allocator@UTransitionType@cctz@time_internal@absl@@@__Cr@std@@@__Cr@std@@QEAAAEAUTransitionType@cctz@time_internal@absl@@_K@Z ??ACord@absl@@QEBAD_K@Z @@ -370,6 +371,7 @@ ?AdvanceBytesBtree@ChunkIterator@Cord@absl@@AEAAX_K@Z ?AllocWithArena@LowLevelAlloc@base_internal@absl@@SAPEAX_KPEAUArena@123@@Z ?AlreadyExistsError@absl@@YA?AVStatus@1@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@Z + ?AlwaysTrue@Condition@absl@@CA_NPEBV12@@Z ?Append@?$AppendUninitializedTraits@V?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@X@strings_internal@absl@@SAXPEAV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@_K@Z ?Append@Cord@absl@@QEAAX$$QEAV12@@Z ?Append@Cord@absl@@QEAAXAEBV12@@Z @@ -436,6 +438,7 @@ ?ClearCurrentThreadIdentity@base_internal@absl@@YAXXZ ?ClearLogBacktraceLocation@absl@@YAXXZ ?ClearTimeZoneMapTestOnly@Impl@time_zone@cctz@time_internal@absl@@SAXXZ + ?CloneAndUnref@StatusRep@status_internal@absl@@QEBAPEAV123@XZ ?CombineContiguousImpl@MixingHashState@hash_internal@absl@@CA_K_KPEBE0U?$integral_constant@H$03@__Cr@std@@@Z ?CombineContiguousImpl@MixingHashState@hash_internal@absl@@CA_K_KPEBE0U?$integral_constant@H$07@__Cr@std@@@Z ?CombineLargeContiguousImpl32@MixingHashState@hash_internal@absl@@CA_K_KPEBE0@Z @@ -536,11 +539,10 @@ ?EqualsIgnoreCase@absl@@YA_NV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@0@Z ?EqualsImpl@Cord@absl@@AEBA_NAEBV12@_K@Z ?EqualsImpl@Cord@absl@@AEBA_NV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@_K@Z - ?EqualsSlow@Status@absl@@CA_NAEBV12@0@Z ?EquivTransitions@TimeZoneInfo@cctz@time_internal@absl@@AEBA_NEE@Z ?Erase@?$Storage@UPayload@status_internal@absl@@$00V?$allocator@UPayload@status_internal@absl@@@__Cr@std@@@inlined_vector_internal@absl@@QEAAPEAUPayload@status_internal@3@PEBU453@0@Z ?EraseMetaOnly@container_internal@absl@@YAXAEAVCommonFields@12@PEAW4ctrl_t@12@_K@Z - ?ErasePayload@Status@absl@@QEAA_NV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@Z + ?ErasePayload@StatusRep@status_internal@absl@@QEAA?AUEraseResult@123@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@Z ?ErrnoToStatus@absl@@YA?AVStatus@1@HV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@Z ?ErrnoToStatusCode@absl@@YA?AW4StatusCode@1@H@Z ?Eval@Condition@absl@@QEBA_NXZ @@ -597,7 +599,7 @@ ?Flush@LogSink@absl@@UEAAXXZ ?FlushLogSinks@log_internal@absl@@YAXXZ ?ForEachChunkAux@Cord@absl@@CAXPEAUCordRep@cord_internal@2@V?$FunctionRef@$$A6AXV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@Z@2@@Z - ?ForEachPayload@Status@absl@@QEBAXV?$FunctionRef@$$A6AXV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@AEBVCord@absl@@@Z@2@@Z + ?ForEachPayload@StatusRep@status_internal@absl@@QEBAXV?$FunctionRef@$$A6AXV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@AEBVCord@absl@@@Z@3@@Z ?ForVar2@CheckOpMessageBuilder@log_internal@absl@@QEAAAEAV?$basic_ostream@DU?$char_traits@D@__Cr@std@@@__Cr@std@@XZ ?ForgetDeadlockInfo@Mutex@absl@@QEAAXXZ ?FormatCivilTime@absl@@YA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@V?$civil_time@Uday_tag@time_internal@absl@@@detail@cctz@time_internal@1@@Z @@ -669,7 +671,7 @@ ?GetMorePreciseMemoryUsage@cord_internal@absl@@YA_KPEBUCordRep@12@@Z ?GetParentMethod@CordzInfo@cord_internal@absl@@CA?AW4MethodIdentifier@CordzUpdateTracker@23@PEBV123@@Z ?GetParentStack@CordzInfo@cord_internal@absl@@QEBA?AV?$Span@QEAX@3@XZ - ?GetPayload@Status@absl@@QEBA?AV?$optional@VCord@absl@@@2@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@Z + ?GetPayload@StatusRep@status_internal@absl@@QEBA?AV?$optional@VCord@absl@@@3@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@Z ?GetProgramCounter@debugging_internal@absl@@YAPEAXQEAX@Z ?GetSaltMaterial@random_internal@absl@@YA?AV?$optional@I@2@XZ ?GetSkipCount@ExponentialBiased@profiling_internal@absl@@QEAA_J_J@Z @@ -843,7 +845,7 @@ ?Post@Win32Waiter@synchronization_internal@absl@@QEAAXXZ ?PrepareForSampling@HashtablezInfo@container_internal@absl@@QEAAX_J_K@Z ?PrepareToDie@LogMessage@log_internal@absl@@AEAAXXZ - ?PrepareToModify@Status@absl@@AEAAXXZ + ?PrepareToModify@Status@absl@@CAPEAVStatusRep@status_internal@2@_K@Z ?Prepend@Cord@absl@@QEAAXAEBV12@@Z ?Prepend@CordRepBtree@cord_internal@absl@@SAPEAV123@PEAV123@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@_K@Z ?PrependArray@Cord@absl@@AEAAXV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@W4MethodIdentifier@CordzUpdateTracker@cord_internal@2@@Z @@ -934,7 +936,7 @@ ?SetMaxFramesInLogStackTrace@log_internal@absl@@YAXH@Z ?SetMinLogLevel@absl@@YAXW4LogSeverityAtLeast@1@@Z ?SetMutexDeadlockDetectionMode@absl@@YAXW4OnDeadlockCycle@1@@Z - ?SetPayload@Status@absl@@QEAAXV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@VCord@2@@Z + ?SetPayload@StatusRep@status_internal@absl@@QEAAXV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@VCord@3@@Z ?SetStackUnwinder@absl@@YAXP6AHPEAPEAXPEAHHHPEBX1@Z@Z ?SetStatusPayloadPrinter@status_internal@absl@@YAXP6A?AV?$optional@V?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@@2@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@AEBVCord@2@@Z@Z ?SetStderrThreshold@absl@@YAXW4LogSeverityAtLeast@1@@Z @@ -1048,9 +1050,10 @@ ?ToString@?$BigUnsigned@$03@strings_internal@absl@@QEBA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@XZ ?ToString@?$BigUnsigned@$0FE@@strings_internal@absl@@QEBA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@XZ ?ToString@Status@absl@@QEBA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@W4StatusToStringMode@2@@Z + ?ToString@StatusRep@status_internal@absl@@QEBA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@W4StatusToStringMode@3@@Z ?ToString@int128@absl@@AEBA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@XZ ?ToString@uint128@absl@@AEBA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@XZ - ?ToStringSlow@Status@absl@@AEBA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@W4StatusToStringMode@2@@Z + ?ToStringSlow@Status@absl@@CA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@_KW4StatusToStringMode@2@@Z ?ToTM@absl@@YA?AUtm@@VTime@1@VTimeZone@1@@Z ?ToTimeT@absl@@YA_JVTime@1@@Z ?ToTimespec@absl@@YA?AUtimespec@@VDuration@1@@Z @@ -1087,7 +1090,7 @@ ?UnparseFlag@absl@@YA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@VDuration@1@@Z ?UnparseFlag@absl@@YA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@VTime@1@@Z ?Unref@CrcCordState@crc_internal@absl@@CAXPEAURefcountedRep@123@@Z - ?UnrefNonInlined@Status@absl@@CAX_K@Z + ?Unref@StatusRep@status_internal@absl@@QEBAXXZ ?UnrefTree@InlineRep@Cord@absl@@AEAAXXZ ?UnsampleSlow@container_internal@absl@@YAXPEAUHashtablezInfo@12@@Z ?Unscramble@CRC32@crc_internal@absl@@UEBAXPEAI@Z @@ -1105,7 +1108,6 @@ ?WaitForNotification@Notification@absl@@QEBAXXZ ?WaitForNotificationWithDeadline@Notification@absl@@QEBA_NVTime@2@@Z ?WaitForNotificationWithTimeout@Notification@absl@@QEBA_NVDuration@2@@Z - ?Wakeup@CondVar@absl@@AEAAXPEAUPerThreadSynch@base_internal@2@@Z ?Wakeup@Mutex@absl@@AEAAPEAUPerThreadSynch@base_internal@2@PEAU342@@Z ?WebSafeBase64Escape@absl@@YA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@34@@Z ?WebSafeBase64Escape@absl@@YAXV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@PEAV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@34@@Z @@ -1152,7 +1154,6 @@ ?clear@?$__split_buffer@UTransition@cctz@time_internal@absl@@AEAV?$allocator@UTransition@cctz@time_internal@absl@@@__Cr@std@@@__Cr@std@@QEAAXXZ ?clear@?$__split_buffer@UTransitionType@cctz@time_internal@absl@@AEAV?$allocator@UTransitionType@cctz@time_internal@absl@@@__Cr@std@@@__Cr@std@@QEAAXXZ ?clear@?$__split_buffer@UViableSubstitution@strings_internal@absl@@AEAV?$allocator@UViableSubstitution@strings_internal@absl@@@__Cr@std@@@__Cr@std@@QEAAXXZ - ?code@Status@absl@@QEBA?AW4StatusCode@2@XZ ?combine_contiguous@MixingHashState@hash_internal@absl@@SA?AV123@V123@PEBE_K@Z ?cycle_clock_source_@CycleClock@base_internal@absl@@0U?$atomic@P6A_JXZ@__Cr@std@@A ?day_difference@impl@detail@cctz@time_internal@absl@@YA_J_JCC0CC@Z @@ -1204,7 +1205,6 @@ ?push_front@?$__split_buffer@PEAPEBVImpl@time_zone@cctz@time_internal@absl@@V?$allocator@PEAPEBVImpl@time_zone@cctz@time_internal@absl@@@__Cr@std@@@__Cr@std@@QEAAX$$QEAPEAPEBVImpl@time_zone@cctz@time_internal@absl@@@Z ?push_front@?$__split_buffer@PEAUPrefixCrc@CrcCordState@crc_internal@absl@@AEAV?$allocator@PEAUPrefixCrc@CrcCordState@crc_internal@absl@@@__Cr@std@@@__Cr@std@@QEAAXAEBQEAUPrefixCrc@CrcCordState@crc_internal@absl@@@Z ?push_front@?$__split_buffer@PEAUPrefixCrc@CrcCordState@crc_internal@absl@@V?$allocator@PEAUPrefixCrc@CrcCordState@crc_internal@absl@@@__Cr@std@@@__Cr@std@@QEAAX$$QEAPEAUPrefixCrc@CrcCordState@crc_internal@absl@@@Z - ?raw_code@Status@absl@@QEBAHXZ ?reserve@?$vector@UTransition@cctz@time_internal@absl@@V?$allocator@UTransition@cctz@time_internal@absl@@@__Cr@std@@@__Cr@std@@QEAAX_K@Z ?reserve@?$vector@UTransitionType@cctz@time_internal@absl@@V?$allocator@UTransitionType@cctz@time_internal@absl@@@__Cr@std@@@__Cr@std@@QEAAX_K@Z ?reserve@?$vector@UViableSubstitution@strings_internal@absl@@V?$allocator@UViableSubstitution@strings_internal@absl@@@__Cr@std@@@__Cr@std@@QEAAX_K@Z
diff --git a/third_party/abseil-cpp/symbols_x64_rel_asan.def b/third_party/abseil-cpp/symbols_x64_rel_asan.def index 613ed1e..3dad1b8 100644 --- a/third_party/abseil-cpp/symbols_x64_rel_asan.def +++ b/third_party/abseil-cpp/symbols_x64_rel_asan.def
@@ -1,6 +1,6 @@ EXPORTS ?$TSS0@?1??CrcAndCopy@CrcMemcpy@crc_internal@absl@@SA?AVcrc32c_t@3@PEIAXPEIBX_KV43@_N@Z@4HA - ??$?0AEBVCord@absl@@@?$optional_data_dtor_base@VCord@absl@@$0A@@optional_internal@absl@@IEAA@Uin_place_t@2@AEBVCord@2@@Z + ??$?0AEAVCord@absl@@@?$optional_data_dtor_base@VCord@absl@@$0A@@optional_internal@absl@@IEAA@Uin_place_t@2@AEAVCord@2@@Z ??$?0V?$allocator@D@__Cr@std@@@AlphaNum@absl@@QEAA@AEBV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@@Z ??$?0V?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@$0A@@Cord@absl@@QEAA@$$QEAV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@@Z ??$?6C$0A@@LogMessage@log_internal@absl@@QEAAAEAV012@AEBC@Z @@ -314,6 +314,7 @@ ??6time_internal@absl@@YAAEAV?$basic_ostream@DU?$char_traits@D@__Cr@std@@@__Cr@std@@AEAV234@V?$civil_time@Umonth_tag@time_internal@absl@@@detail@cctz@01@@Z ??6time_internal@absl@@YAAEAV?$basic_ostream@DU?$char_traits@D@__Cr@std@@@__Cr@std@@AEAV234@V?$civil_time@Usecond_tag@time_internal@absl@@@detail@cctz@01@@Z ??6time_internal@absl@@YAAEAV?$basic_ostream@DU?$char_traits@D@__Cr@std@@@__Cr@std@@AEAV234@V?$civil_time@Uyear_tag@time_internal@absl@@@detail@cctz@01@@Z + ??8StatusRep@status_internal@absl@@QEBA_NAEBV012@@Z ??8cord_internal@absl@@YA_NAEBVInlineData@01@0@Z ??A?$vector@UTransition@cctz@time_internal@absl@@V?$allocator@UTransition@cctz@time_internal@absl@@@__Cr@std@@@__Cr@std@@QEAAAEAUTransition@cctz@time_internal@absl@@_K@Z ??A?$vector@UTransitionType@cctz@time_internal@absl@@V?$allocator@UTransitionType@cctz@time_internal@absl@@@__Cr@std@@@__Cr@std@@QEAAAEAUTransitionType@cctz@time_internal@absl@@_K@Z @@ -377,6 +378,7 @@ ?AdvanceBytesBtree@ChunkIterator@Cord@absl@@AEAAX_K@Z ?AllocWithArena@LowLevelAlloc@base_internal@absl@@SAPEAX_KPEAUArena@123@@Z ?AlreadyExistsError@absl@@YA?AVStatus@1@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@Z + ?AlwaysTrue@Condition@absl@@CA_NPEBV12@@Z ?Append@?$AppendUninitializedTraits@V?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@X@strings_internal@absl@@SAXPEAV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@_K@Z ?Append@Cord@absl@@QEAAX$$QEAV12@@Z ?Append@Cord@absl@@QEAAXAEBV12@@Z @@ -443,6 +445,7 @@ ?ClearCurrentThreadIdentity@base_internal@absl@@YAXXZ ?ClearLogBacktraceLocation@absl@@YAXXZ ?ClearTimeZoneMapTestOnly@Impl@time_zone@cctz@time_internal@absl@@SAXXZ + ?CloneAndUnref@StatusRep@status_internal@absl@@QEBAPEAV123@XZ ?CombineContiguousImpl@MixingHashState@hash_internal@absl@@CA_K_KPEBE0U?$integral_constant@H$03@__Cr@std@@@Z ?CombineContiguousImpl@MixingHashState@hash_internal@absl@@CA_K_KPEBE0U?$integral_constant@H$07@__Cr@std@@@Z ?CombineLargeContiguousImpl32@MixingHashState@hash_internal@absl@@CA_K_KPEBE0@Z @@ -542,11 +545,10 @@ ?EqualsIgnoreCase@absl@@YA_NV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@0@Z ?EqualsImpl@Cord@absl@@AEBA_NAEBV12@_K@Z ?EqualsImpl@Cord@absl@@AEBA_NV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@_K@Z - ?EqualsSlow@Status@absl@@CA_NAEBV12@0@Z ?EquivTransitions@TimeZoneInfo@cctz@time_internal@absl@@AEBA_NEE@Z ?Erase@?$Storage@UPayload@status_internal@absl@@$00V?$allocator@UPayload@status_internal@absl@@@__Cr@std@@@inlined_vector_internal@absl@@QEAAPEAUPayload@status_internal@3@PEBU453@0@Z ?EraseMetaOnly@container_internal@absl@@YAXAEAVCommonFields@12@PEAW4ctrl_t@12@_K@Z - ?ErasePayload@Status@absl@@QEAA_NV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@Z + ?ErasePayload@StatusRep@status_internal@absl@@QEAA?AUEraseResult@123@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@Z ?ErrnoToStatus@absl@@YA?AVStatus@1@HV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@Z ?ErrnoToStatusCode@absl@@YA?AW4StatusCode@1@H@Z ?Eval@Condition@absl@@QEBA_NXZ @@ -603,7 +605,7 @@ ?Flush@LogSink@absl@@UEAAXXZ ?FlushLogSinks@log_internal@absl@@YAXXZ ?ForEachChunkAux@Cord@absl@@CAXPEAUCordRep@cord_internal@2@V?$FunctionRef@$$A6AXV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@Z@2@@Z - ?ForEachPayload@Status@absl@@QEBAXV?$FunctionRef@$$A6AXV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@AEBVCord@absl@@@Z@2@@Z + ?ForEachPayload@StatusRep@status_internal@absl@@QEBAXV?$FunctionRef@$$A6AXV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@AEBVCord@absl@@@Z@3@@Z ?ForVar2@CheckOpMessageBuilder@log_internal@absl@@QEAAAEAV?$basic_ostream@DU?$char_traits@D@__Cr@std@@@__Cr@std@@XZ ?ForgetDeadlockInfo@Mutex@absl@@QEAAXXZ ?FormatCivilTime@absl@@YA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@V?$civil_time@Uday_tag@time_internal@absl@@@detail@cctz@time_internal@1@@Z @@ -675,7 +677,7 @@ ?GetMorePreciseMemoryUsage@cord_internal@absl@@YA_KPEBUCordRep@12@@Z ?GetParentMethod@CordzInfo@cord_internal@absl@@CA?AW4MethodIdentifier@CordzUpdateTracker@23@PEBV123@@Z ?GetParentStack@CordzInfo@cord_internal@absl@@QEBA?AV?$Span@QEAX@3@XZ - ?GetPayload@Status@absl@@QEBA?AV?$optional@VCord@absl@@@2@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@Z + ?GetPayload@StatusRep@status_internal@absl@@QEBA?AV?$optional@VCord@absl@@@3@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@Z ?GetProgramCounter@debugging_internal@absl@@YAPEAXQEAX@Z ?GetSaltMaterial@random_internal@absl@@YA?AV?$optional@I@2@XZ ?GetSkipCount@ExponentialBiased@profiling_internal@absl@@QEAA_J_J@Z @@ -849,7 +851,7 @@ ?Post@Win32Waiter@synchronization_internal@absl@@QEAAXXZ ?PrepareForSampling@HashtablezInfo@container_internal@absl@@QEAAX_J_K@Z ?PrepareToDie@LogMessage@log_internal@absl@@AEAAXXZ - ?PrepareToModify@Status@absl@@AEAAXXZ + ?PrepareToModify@Status@absl@@CAPEAVStatusRep@status_internal@2@_K@Z ?Prepend@Cord@absl@@QEAAXAEBV12@@Z ?Prepend@CordRepBtree@cord_internal@absl@@SAPEAV123@PEAV123@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@_K@Z ?PrependArray@Cord@absl@@AEAAXV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@W4MethodIdentifier@CordzUpdateTracker@cord_internal@2@@Z @@ -943,7 +945,7 @@ ?SetMaxFramesInLogStackTrace@log_internal@absl@@YAXH@Z ?SetMinLogLevel@absl@@YAXW4LogSeverityAtLeast@1@@Z ?SetMutexDeadlockDetectionMode@absl@@YAXW4OnDeadlockCycle@1@@Z - ?SetPayload@Status@absl@@QEAAXV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@VCord@2@@Z + ?SetPayload@StatusRep@status_internal@absl@@QEAAXV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@VCord@3@@Z ?SetStackUnwinder@absl@@YAXP6AHPEAPEAXPEAHHHPEBX1@Z@Z ?SetStatusPayloadPrinter@status_internal@absl@@YAXP6A?AV?$optional@V?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@@2@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@AEBVCord@2@@Z@Z ?SetStderrThreshold@absl@@YAXW4LogSeverityAtLeast@1@@Z @@ -1057,9 +1059,10 @@ ?ToString@?$BigUnsigned@$03@strings_internal@absl@@QEBA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@XZ ?ToString@?$BigUnsigned@$0FE@@strings_internal@absl@@QEBA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@XZ ?ToString@Status@absl@@QEBA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@W4StatusToStringMode@2@@Z + ?ToString@StatusRep@status_internal@absl@@QEBA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@W4StatusToStringMode@3@@Z ?ToString@int128@absl@@AEBA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@XZ ?ToString@uint128@absl@@AEBA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@XZ - ?ToStringSlow@Status@absl@@AEBA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@W4StatusToStringMode@2@@Z + ?ToStringSlow@Status@absl@@CA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@_KW4StatusToStringMode@2@@Z ?ToTM@absl@@YA?AUtm@@VTime@1@VTimeZone@1@@Z ?ToTimeT@absl@@YA_JVTime@1@@Z ?ToTimespec@absl@@YA?AUtimespec@@VDuration@1@@Z @@ -1096,7 +1099,7 @@ ?UnparseFlag@absl@@YA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@VDuration@1@@Z ?UnparseFlag@absl@@YA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@VTime@1@@Z ?Unref@CrcCordState@crc_internal@absl@@CAXPEAURefcountedRep@123@@Z - ?UnrefNonInlined@Status@absl@@CAX_K@Z + ?Unref@StatusRep@status_internal@absl@@QEBAXXZ ?UnrefTree@InlineRep@Cord@absl@@AEAAXXZ ?UnsampleSlow@container_internal@absl@@YAXPEAUHashtablezInfo@12@@Z ?Unscramble@CRC32@crc_internal@absl@@UEBAXPEAI@Z @@ -1114,7 +1117,6 @@ ?WaitForNotification@Notification@absl@@QEBAXXZ ?WaitForNotificationWithDeadline@Notification@absl@@QEBA_NVTime@2@@Z ?WaitForNotificationWithTimeout@Notification@absl@@QEBA_NVDuration@2@@Z - ?Wakeup@CondVar@absl@@AEAAXPEAUPerThreadSynch@base_internal@2@@Z ?Wakeup@Mutex@absl@@AEAAPEAUPerThreadSynch@base_internal@2@PEAU342@@Z ?WebSafeBase64Escape@absl@@YA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@34@@Z ?WebSafeBase64Escape@absl@@YAXV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@PEAV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@34@@Z @@ -1200,7 +1202,6 @@ ?clear@?$__split_buffer@UTransitionType@cctz@time_internal@absl@@AEAV?$allocator@UTransitionType@cctz@time_internal@absl@@@__Cr@std@@@__Cr@std@@QEAAXXZ ?clear@?$__split_buffer@UViableSubstitution@strings_internal@absl@@AEAV?$allocator@UViableSubstitution@strings_internal@absl@@@__Cr@std@@@__Cr@std@@QEAAXXZ ?clear@?$deque@UPrefixCrc@CrcCordState@crc_internal@absl@@V?$allocator@UPrefixCrc@CrcCordState@crc_internal@absl@@@__Cr@std@@@__Cr@std@@QEAAXXZ - ?code@Status@absl@@QEBA?AW4StatusCode@2@XZ ?combine_contiguous@MixingHashState@hash_internal@absl@@SA?AV123@V123@PEBE_K@Z ?cycle_clock_source_@CycleClock@base_internal@absl@@0U?$atomic@P6A_JXZ@__Cr@std@@A ?day_difference@impl@detail@cctz@time_internal@absl@@YA_J_JCC0CC@Z @@ -1254,7 +1255,6 @@ ?push_front@?$__split_buffer@PEAPEBVImpl@time_zone@cctz@time_internal@absl@@V?$allocator@PEAPEBVImpl@time_zone@cctz@time_internal@absl@@@__Cr@std@@@__Cr@std@@QEAAX$$QEAPEAPEBVImpl@time_zone@cctz@time_internal@absl@@@Z ?push_front@?$__split_buffer@PEAUPrefixCrc@CrcCordState@crc_internal@absl@@AEAV?$allocator@PEAUPrefixCrc@CrcCordState@crc_internal@absl@@@__Cr@std@@@__Cr@std@@QEAAXAEBQEAUPrefixCrc@CrcCordState@crc_internal@absl@@@Z ?push_front@?$__split_buffer@PEAUPrefixCrc@CrcCordState@crc_internal@absl@@V?$allocator@PEAUPrefixCrc@CrcCordState@crc_internal@absl@@@__Cr@std@@@__Cr@std@@QEAAX$$QEAPEAUPrefixCrc@CrcCordState@crc_internal@absl@@@Z - ?raw_code@Status@absl@@QEBAHXZ ?remaining_inline_capacity@InlineRep@Cord@absl@@QEBA_KXZ ?reserve@?$vector@UTransition@cctz@time_internal@absl@@V?$allocator@UTransition@cctz@time_internal@absl@@@__Cr@std@@@__Cr@std@@QEAAX_K@Z ?reserve@?$vector@UTransitionType@cctz@time_internal@absl@@V?$allocator@UTransitionType@cctz@time_internal@absl@@@__Cr@std@@@__Cr@std@@QEAAX_K@Z
diff --git a/third_party/abseil-cpp/symbols_x86_dbg.def b/third_party/abseil-cpp/symbols_x86_dbg.def index 5af3ca8..5434f12 100644 --- a/third_party/abseil-cpp/symbols_x86_dbg.def +++ b/third_party/abseil-cpp/symbols_x86_dbg.def
@@ -110,6 +110,8 @@ ??$?0AAV?$allocator@UTransition@cctz@time_internal@absl@@@__Cr@std@@X@?$__compressed_pair_elem@AAV?$allocator@UTransition@cctz@time_internal@absl@@@__Cr@std@@$00$0A@@__Cr@std@@QAE@AAV?$allocator@UTransition@cctz@time_internal@absl@@@12@@Z ??$?0AAV?$allocator@UTransitionType@cctz@time_internal@absl@@@__Cr@std@@X@?$__compressed_pair_elem@AAV?$allocator@UTransitionType@cctz@time_internal@absl@@@__Cr@std@@$00$0A@@__Cr@std@@QAE@AAV?$allocator@UTransitionType@cctz@time_internal@absl@@@12@@Z ??$?0AAV?$allocator@UViableSubstitution@strings_internal@absl@@@__Cr@std@@X@?$__compressed_pair_elem@AAV?$allocator@UViableSubstitution@strings_internal@absl@@@__Cr@std@@$00$0A@@__Cr@std@@QAE@AAV?$allocator@UViableSubstitution@strings_internal@absl@@@12@@Z + ??$?0AAVCord@absl@@$0A@@?$optional@VCord@absl@@@absl@@QAE@AAVCord@1@@Z + ??$?0AAVCord@absl@@@?$optional_data_dtor_base@VCord@absl@@$0A@@optional_internal@absl@@IAE@Uin_place_t@2@AAVCord@2@@Z ??$?0ABV?$allocator@UPayload@status_internal@absl@@@__Cr@std@@@?$Storage@V?$allocator@UPayload@status_internal@absl@@@__Cr@std@@$0A@$00@internal_compressed_tuple@container_internal@absl@@QAE@Uin_place_t@3@ABV?$allocator@UPayload@status_internal@absl@@@__Cr@std@@@Z ??$?0ABV?$allocator@UPayload@status_internal@absl@@@__Cr@std@@I$00@?$CompressedTuple@V?$allocator@UPayload@status_internal@absl@@@__Cr@std@@I@container_internal@absl@@QAE@ABV?$allocator@UPayload@status_internal@absl@@@__Cr@std@@$$QAI@Z ??$?0ABV?$allocator@UPayload@status_internal@absl@@@__Cr@std@@I@?$CompressedTupleImpl@V?$CompressedTuple@V?$allocator@UPayload@status_internal@absl@@@__Cr@std@@I@container_internal@absl@@U?$integer_sequence@I$0A@$00@3@$00@internal_compressed_tuple@container_internal@absl@@QAE@Uin_place_t@3@ABV?$allocator@UPayload@status_internal@absl@@@__Cr@std@@$$QAI@Z @@ -118,8 +120,6 @@ ??$?0ABV?$allocator@VFormatArgImpl@str_format_internal@absl@@@__Cr@std@@I@?$CompressedTupleImpl@V?$CompressedTuple@V?$allocator@VFormatArgImpl@str_format_internal@absl@@@__Cr@std@@I@container_internal@absl@@U?$integer_sequence@I$0A@$00@3@$00@internal_compressed_tuple@container_internal@absl@@QAE@Uin_place_t@3@ABV?$allocator@VFormatArgImpl@str_format_internal@absl@@@__Cr@std@@$$QAI@Z ??$?0ABV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@$$Z$$V$$Z$0A@$$Z$S@?$pair@$$CBV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@PBVImpl@time_zone@cctz@time_internal@absl@@@__Cr@std@@AAE@Upiecewise_construct_t@12@AAV?$tuple@ABV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@@12@AAV?$tuple@$$V@12@U?$__tuple_indices@$0A@@12@U?$__tuple_indices@$S@12@@Z ??$?0ABV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@$$Z$$V@?$pair@$$CBV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@PBVImpl@time_zone@cctz@time_internal@absl@@@__Cr@std@@QAE@Upiecewise_construct_t@12@V?$tuple@ABV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@@12@V?$tuple@$$V@12@@Z - ??$?0ABVCord@absl@@$0A@@?$optional@VCord@absl@@@absl@@QAE@ABVCord@1@@Z - ??$?0ABVCord@absl@@@?$optional_data_dtor_base@VCord@absl@@$0A@@optional_internal@absl@@IAE@Uin_place_t@2@ABVCord@2@@Z ??$?0D@FormatArgImpl@str_format_internal@absl@@QAE@ABD@Z ??$?0H@FormatArgImpl@str_format_internal@absl@@QAE@ABH@Z ??$?0HU__default_init_tag@__Cr@std@@@?$__compressed_pair@IU?$hash@PBUCordRep@cord_internal@absl@@@__Cr@std@@@__Cr@std@@QAE@$$QAH$$QAU__default_init_tag@12@@Z @@ -281,6 +281,7 @@ ??$?8PAUTransitionType@cctz@time_internal@absl@@@__Cr@std@@YA_NABV?$__wrap_iter@PAUTransitionType@cctz@time_internal@absl@@@01@0@Z ??$?8PBQAVLogSink@absl@@PAPAV01@@__Cr@std@@YA_NABV?$__wrap_iter@PBQAVLogSink@absl@@@01@ABV?$__wrap_iter@PAPAVLogSink@absl@@@01@@Z ??$?8PBUConversionItem@ParsedFormatBase@str_format_internal@absl@@@__Cr@std@@YA_NABV?$__wrap_iter@PBUConversionItem@ParsedFormatBase@str_format_internal@absl@@@01@0@Z + ??$?8V?$InlinedVector@UPayload@status_internal@absl@@$00V?$allocator@UPayload@status_internal@absl@@@__Cr@std@@@absl@@U?$default_delete@V?$InlinedVector@UPayload@status_internal@absl@@$00V?$allocator@UPayload@status_internal@absl@@@__Cr@std@@@absl@@@__Cr@std@@@__Cr@std@@YA_NABV?$unique_ptr@V?$InlinedVector@UPayload@status_internal@absl@@$00V?$allocator@UPayload@status_internal@absl@@@__Cr@std@@@absl@@U?$default_delete@V?$InlinedVector@UPayload@status_internal@absl@@$00V?$allocator@UPayload@status_internal@absl@@@__Cr@std@@@absl@@@__Cr@std@@@01@$$T@Z ??$?8VZoneInfoSource@cctz@time_internal@absl@@U?$default_delete@VZoneInfoSource@cctz@time_internal@absl@@@__Cr@std@@@__Cr@std@@YA_NABV?$unique_ptr@VZoneInfoSource@cctz@time_internal@absl@@U?$default_delete@VZoneInfoSource@cctz@time_internal@absl@@@__Cr@std@@@01@$$T@Z ??$?9PAPAVCordzHandle@cord_internal@absl@@@__Cr@std@@YA_NABV?$__wrap_iter@PAPAVCordzHandle@cord_internal@absl@@@01@0@Z ??$?9PAPAVCordzHandle@cord_internal@absl@@PAPAV012@@__Cr@std@@YA_NABV?$reverse_iterator@PAPAVCordzHandle@cord_internal@absl@@@01@0@Z @@ -1036,9 +1037,9 @@ ??$forward@AAV?$allocator@PAUCordRep@cord_internal@absl@@@__Cr@std@@@absl@@YAAAV?$allocator@PAUCordRep@cord_internal@absl@@@__Cr@std@@AAV123@@Z ??$forward@AAV?$allocator@PAVLogSink@absl@@@__Cr@std@@@absl@@YAAAV?$allocator@PAVLogSink@absl@@@__Cr@std@@AAV123@@Z ??$forward@AAV?$allocator@UPayload@status_internal@absl@@@__Cr@std@@@absl@@YAAAV?$allocator@UPayload@status_internal@absl@@@__Cr@std@@AAV123@@Z + ??$forward@AAVCord@absl@@@absl@@YAAAVCord@0@AAV10@@Z ??$forward@ABV?$allocator@UPayload@status_internal@absl@@@__Cr@std@@@absl@@YAABV?$allocator@UPayload@status_internal@absl@@@__Cr@std@@ABV123@@Z ??$forward@ABV?$allocator@VFormatArgImpl@str_format_internal@absl@@@__Cr@std@@@absl@@YAABV?$allocator@VFormatArgImpl@str_format_internal@absl@@@__Cr@std@@ABV123@@Z - ??$forward@ABVCord@absl@@@absl@@YAABVCord@0@ABV10@@Z ??$forward@H@absl@@YA$$QAHAAH@Z ??$forward@I@absl@@YA$$QAIAAI@Z ??$forward@V?$allocator@H@__Cr@std@@@absl@@YA$$QAV?$allocator@H@__Cr@std@@AAV123@@Z @@ -1537,6 +1538,7 @@ ??0SpinLock@base_internal@absl@@QAE@W4SchedulingMode@12@@Z ??0SpinLock@base_internal@absl@@QAE@XZ ??0SpinLockHolder@base_internal@absl@@QAE@PAVSpinLock@12@@Z + ??0Status@absl@@AAE@I@Z ??0Status@absl@@QAE@$$QAV01@@Z ??0Status@absl@@QAE@ABV01@@Z ??0Status@absl@@QAE@W4StatusCode@1@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@Z @@ -1784,6 +1786,7 @@ ??8CharIterator@Cord@absl@@QBE_NABV012@@Z ??8ChunkIterator@Cord@absl@@QBE_NABV012@@Z ??8GraphId@synchronization_internal@absl@@QBE_NABU012@@Z + ??8StatusRep@status_internal@absl@@QBE_NABV012@@Z ??8__Cr@std@@YA_NABU__deque_range@?$deque@UPrefixCrc@CrcCordState@crc_internal@absl@@V?$allocator@UPrefixCrc@CrcCordState@crc_internal@absl@@@__Cr@std@@@01@0@Z ??8__Cr@std@@YA_NABV?$__deque_iterator@UPrefixCrc@CrcCordState@crc_internal@absl@@PAU1234@AAU1234@PAPAU1234@H$0A@@01@0@Z ??8__Cr@std@@YA_NABV?$__deque_iterator@UPrefixCrc@CrcCordState@crc_internal@absl@@PBU1234@ABU1234@PBQBU1234@H$0A@@01@0@Z @@ -1966,6 +1969,7 @@ ??R<lambda_1>@?0??CompareSlowPath@Cord@absl@@ABEHABV23@II@Z@QBE?A?<auto>@@PAVChunkIterator@23@PAV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@Z ??R<lambda_1>@?0??CompareSlowPath@Cord@absl@@ABEHV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@II@Z@QBE?A?<auto>@@PAVChunkIterator@23@PAV456@@Z ??R<lambda_1>@?0??InitFrom@?$Storage@UPayload@status_internal@absl@@$00V?$allocator@UPayload@status_internal@absl@@@__Cr@std@@@inlined_vector_internal@absl@@QAEXABV234@@Z@QBE?A?<auto>@@XZ + ??R<lambda_1>@?0??InlinedRepToCode@Status@absl@@CA?AW4StatusCode@3@I@Z@QBE?A?<auto>@@XZ ??R<lambda_1>@?0??SetLength@CordBuffer@absl@@QAEXI@Z@QBE?A?<auto>@@XZ ??R<lambda_1>@?0??SubtractSize@?$Storage@H$0CP@V?$allocator@H@__Cr@std@@@inlined_vector_internal@absl@@QAEXI@Z@QBE?A?<auto>@@XZ ??R<lambda_1>@?0??SubtractSize@?$Storage@PAUCordRep@cord_internal@absl@@$01V?$allocator@PAUCordRep@cord_internal@absl@@@__Cr@std@@@inlined_vector_internal@absl@@QAEXI@Z@QBE?A?<auto>@@XZ @@ -2109,6 +2113,7 @@ ?AllocatedSizeToTag@cord_internal@absl@@YAEI@Z ?AllocatedSizeToTagUnchecked@cord_internal@absl@@YAEI@Z ?AlreadyExistsError@absl@@YA?AVStatus@1@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@Z + ?AlwaysTrue@Condition@absl@@CA_NPBV12@@Z ?Append@?$AppendUninitializedTraits@V?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@X@strings_internal@absl@@SAXPAV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@I@Z ?Append@Cord@absl@@QAEX$$QAV12@@Z ?Append@Cord@absl@@QAEXABV12@@Z @@ -2193,6 +2198,7 @@ ?ClearCurrentThreadIdentity@base_internal@absl@@YAXXZ ?ClearLogBacktraceLocation@absl@@YAXXZ ?ClearTimeZoneMapTestOnly@Impl@time_zone@cctz@time_internal@absl@@SAXXZ + ?CloneAndUnref@StatusRep@status_internal@absl@@QBEPAV123@XZ ?CodeToInlinedRep@Status@absl@@CAIW4StatusCode@2@@Z ?CombineContiguousImpl@MixingHashState@hash_internal@absl@@CA_K_KPBEIU?$integral_constant@H$03@__Cr@std@@@Z ?CombineContiguousImpl@MixingHashState@hash_internal@absl@@CA_K_KPBEIU?$integral_constant@H$07@__Cr@std@@@Z @@ -2373,11 +2379,10 @@ ?EqualsIgnoreCase@absl@@YA_NV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@0@Z ?EqualsImpl@Cord@absl@@ABE_NABV12@I@Z ?EqualsImpl@Cord@absl@@ABE_NV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@I@Z - ?EqualsSlow@Status@absl@@CA_NABV12@0@Z ?EquivTransitions@TimeZoneInfo@cctz@time_internal@absl@@ABE_NEE@Z ?Erase@?$Storage@UPayload@status_internal@absl@@$00V?$allocator@UPayload@status_internal@absl@@@__Cr@std@@@inlined_vector_internal@absl@@QAEPAUPayload@status_internal@3@PBU453@0@Z ?EraseMetaOnly@container_internal@absl@@YAXAAVCommonFields@12@PAW4ctrl_t@12@I@Z - ?ErasePayload@Status@absl@@QAE_NV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@Z + ?ErasePayload@StatusRep@status_internal@absl@@QAE?AUEraseResult@123@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@Z ?ErrnoToStatus@absl@@YA?AVStatus@1@HV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@Z ?ErrnoToStatusCode@absl@@YA?AW4StatusCode@1@H@Z ?Eval@Condition@absl@@QBE_NXZ @@ -2442,7 +2447,7 @@ ?FlushLogSinks@absl@@YAXXZ ?FlushLogSinks@log_internal@absl@@YAXXZ ?ForEachChunkAux@Cord@absl@@CAXPAUCordRep@cord_internal@2@V?$FunctionRef@$$A6AXV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@Z@2@@Z - ?ForEachPayload@Status@absl@@QBEXV?$FunctionRef@$$A6AXV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@ABVCord@absl@@@Z@2@@Z + ?ForEachPayload@StatusRep@status_internal@absl@@QBEXV?$FunctionRef@$$A6AXV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@ABVCord@absl@@@Z@3@@Z ?ForVar1@CheckOpMessageBuilder@log_internal@absl@@QAEAAV?$basic_ostream@DU?$char_traits@D@__Cr@std@@@__Cr@std@@XZ ?ForVar2@CheckOpMessageBuilder@log_internal@absl@@QAEAAV?$basic_ostream@DU?$char_traits@D@__Cr@std@@@__Cr@std@@XZ ?ForgetDeadlockInfo@Mutex@absl@@QAEXXZ @@ -2587,9 +2592,7 @@ ?GetOrCreateCurrentThreadIdentity@synchronization_internal@absl@@YAPAUThreadIdentity@base_internal@2@XZ ?GetParentMethod@CordzInfo@cord_internal@absl@@CA?AW4MethodIdentifier@CordzUpdateTracker@23@PBV123@@Z ?GetParentStack@CordzInfo@cord_internal@absl@@QBE?AV?$Span@QAX@3@XZ - ?GetPayload@Status@absl@@QBE?AV?$optional@VCord@absl@@@2@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@Z - ?GetPayloads@Status@absl@@AAEPAV?$InlinedVector@UPayload@status_internal@absl@@$00V?$allocator@UPayload@status_internal@absl@@@__Cr@std@@@2@XZ - ?GetPayloads@Status@absl@@ABEPBV?$InlinedVector@UPayload@status_internal@absl@@$00V?$allocator@UPayload@status_internal@absl@@@__Cr@std@@@2@XZ + ?GetPayload@StatusRep@status_internal@absl@@QBE?AV?$optional@VCord@absl@@@3@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@Z ?GetProgramCounter@debugging_internal@absl@@YAPAXQAX@Z ?GetRepHi@time_internal@absl@@YA_JVDuration@2@@Z ?GetRepLo@time_internal@absl@@YAIVDuration@2@@Z @@ -2911,7 +2914,7 @@ ?PermissionDeniedError@absl@@YA?AVStatus@1@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@Z ?Piece@AlphaNum@absl@@QBE?AV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@XZ ?PiecewiseChunkSize@hash_internal@absl@@YAIXZ - ?PointerToRep@Status@absl@@CAIPAUStatusRep@status_internal@2@@Z + ?PointerToRep@Status@absl@@CAIPAVStatusRep@status_internal@2@@Z ?Poison@CrcCordState@crc_internal@absl@@QAEXXZ ?Poke@StdcppWaiter@synchronization_internal@absl@@QAEXXZ ?Poke@Win32Waiter@synchronization_internal@absl@@QAEXXZ @@ -2920,7 +2923,7 @@ ?Post@Win32Waiter@synchronization_internal@absl@@QAEXXZ ?PrepareForSampling@HashtablezInfo@container_internal@absl@@QAEX_JI@Z ?PrepareToDie@LogMessage@log_internal@absl@@AAEXXZ - ?PrepareToModify@Status@absl@@AAEXXZ + ?PrepareToModify@Status@absl@@CAPAVStatusRep@status_internal@2@I@Z ?Prepend@Cord@absl@@QAEXABV12@@Z ?Prepend@Cord@absl@@QAEXV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@Z ?Prepend@CordRepBtree@cord_internal@absl@@SAPAV123@PAV123@PAUCordRep@23@@Z @@ -2975,6 +2978,7 @@ ?Ref@CordRep@cord_internal@absl@@SAPAU123@PAU123@@Z ?Ref@CrcCordState@crc_internal@absl@@CAXPAURefcountedRep@123@@Z ?Ref@Status@absl@@CAXI@Z + ?Ref@StatusRep@status_internal@absl@@QBEXXZ ?RefCordRep@CordzInfo@cord_internal@absl@@QBEPAUCordRep@23@XZ ?RefSharedEmptyRep@CrcCordState@crc_internal@absl@@CAPAURefcountedRep@123@XZ ?Register@CycleClockSource@base_internal@absl@@CAXP6A_JXZ@Z @@ -3003,7 +3007,7 @@ ?RemovePrefix@Cord@absl@@QAEXI@Z ?RemoveSuffix@Cord@absl@@QAEXI@Z ?RemoveSuffix@CordRepBtree@cord_internal@absl@@SAPAUCordRep@23@PAV123@I@Z - ?RepToPointer@Status@absl@@CAPAUStatusRep@status_internal@2@I@Z + ?RepToPointer@Status@absl@@CAPBVStatusRep@status_internal@2@I@Z ?Reset@?$AllocationTransaction@V?$allocator@PAUCordRep@cord_internal@absl@@@__Cr@std@@@inlined_vector_internal@absl@@AAEXXZ ?Reset@?$AllocationTransaction@V?$allocator@PAVLogSink@absl@@@__Cr@std@@@inlined_vector_internal@absl@@AAEXXZ ?Reset@?$AllocationTransaction@V?$allocator@UPayload@status_internal@absl@@@__Cr@std@@@inlined_vector_internal@absl@@AAEXXZ @@ -3063,7 +3067,7 @@ ?SetMaxSamples@?$SampleRecorder@UHashtablezInfo@container_internal@absl@@@profiling_internal@absl@@QAEXI@Z ?SetMinLogLevel@absl@@YAXW4LogSeverityAtLeast@1@@Z ?SetMutexDeadlockDetectionMode@absl@@YAXW4OnDeadlockCycle@1@@Z - ?SetPayload@Status@absl@@QAEXV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@VCord@2@@Z + ?SetPayload@StatusRep@status_internal@absl@@QAEXV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@VCord@3@@Z ?SetPrecision@FormatConversionSpecImplFriend@str_format_internal@absl@@SAXHPAVFormatConversionSpecImpl@23@@Z ?SetStackUnwinder@absl@@YAXP6AHPAPAXPAHHHPBX1@Z@Z ?SetStatusPayloadPrinter@status_internal@absl@@YAXP6A?AV?$optional@V?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@@2@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@ABVCord@2@@Z@Z @@ -3235,9 +3239,10 @@ ?ToString@?$BigUnsigned@$03@strings_internal@absl@@QBE?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@XZ ?ToString@?$BigUnsigned@$0FE@@strings_internal@absl@@QBE?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@XZ ?ToString@Status@absl@@QBE?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@W4StatusToStringMode@2@@Z + ?ToString@StatusRep@status_internal@absl@@QBE?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@W4StatusToStringMode@3@@Z ?ToString@int128@absl@@ABE?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@XZ ?ToString@uint128@absl@@ABE?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@XZ - ?ToStringSlow@Status@absl@@ABE?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@W4StatusToStringMode@2@@Z + ?ToStringSlow@Status@absl@@CA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@IW4StatusToStringMode@2@@Z ?ToTM@absl@@YA?AUtm@@VTime@1@VTimeZone@1@@Z ?ToTimeT@absl@@YA_JVTime@1@@Z ?ToTimespec@absl@@YA?AUtimespec@@VDuration@1@@Z @@ -3294,7 +3299,7 @@ ?Unref@CordRepBtree@cord_internal@absl@@SAXV?$Span@QAUCordRep@cord_internal@absl@@@3@@Z ?Unref@CrcCordState@crc_internal@absl@@CAXPAURefcountedRep@123@@Z ?Unref@Status@absl@@CAXI@Z - ?UnrefNonInlined@Status@absl@@CAXI@Z + ?Unref@StatusRep@status_internal@absl@@QBEXXZ ?UnrefTree@InlineRep@Cord@absl@@AAEXXZ ?Unregister@?$SampleRecorder@UHashtablezInfo@container_internal@absl@@@profiling_internal@absl@@QAEXPAUHashtablezInfo@container_internal@3@@Z ?UnsafeSetCordRep@CordzInfo@cord_internal@absl@@AAEXPAUCordRep@23@@Z @@ -3339,7 +3344,6 @@ ?WaitForNotification@Notification@absl@@QBEXXZ ?WaitForNotificationWithDeadline@Notification@absl@@QBE_NVTime@2@@Z ?WaitForNotificationWithTimeout@Notification@absl@@QBE_NVDuration@2@@Z - ?Wakeup@CondVar@absl@@AAEXPAUPerThreadSynch@base_internal@2@@Z ?Wakeup@Mutex@absl@@AAEPAUPerThreadSynch@base_internal@2@PAU342@@Z ?WebSafeBase64Escape@absl@@YA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@34@@Z ?WebSafeBase64Escape@absl@@YAXV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@PAV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@34@@Z @@ -3907,6 +3911,7 @@ ?clear@InlineRep@Cord@absl@@QAEPAUCordRep@cord_internal@3@XZ ?clear_cordz_info@InlineData@cord_internal@absl@@QAEXXZ ?code@Status@absl@@QBE?AW4StatusCode@2@XZ + ?code@StatusRep@status_internal@absl@@QBE?AW4StatusCode@3@XZ ?combine@?$HashStateBase@VMixingHashState@hash_internal@absl@@@hash_internal@absl@@SA?AVMixingHashState@23@V423@@Z ?combine_contiguous@MixingHashState@hash_internal@absl@@SA?AV123@V123@PBEI@Z ?compare_exchange_strong@?$__atomic_base@PAVTimeZone@absl@@$0A@@__Cr@std@@QAE_NAAPAVTimeZone@absl@@PAV45@W4memory_order@23@2@Z @@ -4249,6 +4254,7 @@ ?max_size@?$vector@UViableSubstitution@strings_internal@absl@@V?$allocator@UViableSubstitution@strings_internal@absl@@@__Cr@std@@@__Cr@std@@QBEIXZ ?memcasecmp@strings_internal@absl@@YAHPBD0I@Z ?message@Status@absl@@QBE?AV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@XZ + ?message@StatusRep@status_internal@absl@@QBEABV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@XZ ?min@?$RandenPool@E@random_internal@absl@@SAEXZ ?min@?$RandenPool@G@random_internal@absl@@SAGXZ ?min@?$RandenPool@I@random_internal@absl@@SAIXZ
diff --git a/third_party/abseil-cpp/symbols_x86_rel.def b/third_party/abseil-cpp/symbols_x86_rel.def index a93db85..fd0434c 100644 --- a/third_party/abseil-cpp/symbols_x86_rel.def +++ b/third_party/abseil-cpp/symbols_x86_rel.def
@@ -1,6 +1,6 @@ EXPORTS ?$TSS0@?1??CrcAndCopy@CrcMemcpy@crc_internal@absl@@SA?AVcrc32c_t@3@PIAXPIBXIV43@_N@Z@4HA - ??$?0ABVCord@absl@@@?$optional_data_dtor_base@VCord@absl@@$0A@@optional_internal@absl@@IAE@Uin_place_t@2@ABVCord@2@@Z + ??$?0AAVCord@absl@@@?$optional_data_dtor_base@VCord@absl@@$0A@@optional_internal@absl@@IAE@Uin_place_t@2@AAVCord@2@@Z ??$?0V?$allocator@D@__Cr@std@@@AlphaNum@absl@@QAE@ABV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@@Z ??$?0V?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@$0A@@Cord@absl@@QAE@$$QAV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@@Z ??$?6C$0A@@LogMessage@log_internal@absl@@QAEAAV012@ABC@Z @@ -312,6 +312,7 @@ ??6time_internal@absl@@YAAAV?$basic_ostream@DU?$char_traits@D@__Cr@std@@@__Cr@std@@AAV234@V?$civil_time@Umonth_tag@time_internal@absl@@@detail@cctz@01@@Z ??6time_internal@absl@@YAAAV?$basic_ostream@DU?$char_traits@D@__Cr@std@@@__Cr@std@@AAV234@V?$civil_time@Usecond_tag@time_internal@absl@@@detail@cctz@01@@Z ??6time_internal@absl@@YAAAV?$basic_ostream@DU?$char_traits@D@__Cr@std@@@__Cr@std@@AAV234@V?$civil_time@Uyear_tag@time_internal@absl@@@detail@cctz@01@@Z + ??8StatusRep@status_internal@absl@@QBE_NABV012@@Z ??A?$vector@UTransition@cctz@time_internal@absl@@V?$allocator@UTransition@cctz@time_internal@absl@@@__Cr@std@@@__Cr@std@@QAEAAUTransition@cctz@time_internal@absl@@I@Z ??A?$vector@UTransitionType@cctz@time_internal@absl@@V?$allocator@UTransitionType@cctz@time_internal@absl@@@__Cr@std@@@__Cr@std@@QAEAAUTransitionType@cctz@time_internal@absl@@I@Z ??ACord@absl@@QBEDI@Z @@ -374,6 +375,7 @@ ?Allocate@?$MallocAdapter@V?$allocator@UPayload@status_internal@absl@@@__Cr@std@@$0A@@inlined_vector_internal@absl@@SA?AU?$Allocation@V?$allocator@UPayload@status_internal@absl@@@__Cr@std@@@23@AAV?$allocator@UPayload@status_internal@absl@@@__Cr@std@@I@Z ?Allocate@?$MallocAdapter@V?$allocator@VFormatArgImpl@str_format_internal@absl@@@__Cr@std@@$0A@@inlined_vector_internal@absl@@SA?AU?$Allocation@V?$allocator@VFormatArgImpl@str_format_internal@absl@@@__Cr@std@@@23@AAV?$allocator@VFormatArgImpl@str_format_internal@absl@@@__Cr@std@@I@Z ?AlreadyExistsError@absl@@YA?AVStatus@1@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@Z + ?AlwaysTrue@Condition@absl@@CA_NPBV12@@Z ?Append@?$AppendUninitializedTraits@V?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@X@strings_internal@absl@@SAXPAV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@I@Z ?Append@Cord@absl@@QAEX$$QAV12@@Z ?Append@Cord@absl@@QAEXABV12@@Z @@ -440,6 +442,7 @@ ?ClearCurrentThreadIdentity@base_internal@absl@@YAXXZ ?ClearLogBacktraceLocation@absl@@YAXXZ ?ClearTimeZoneMapTestOnly@Impl@time_zone@cctz@time_internal@absl@@SAXXZ + ?CloneAndUnref@StatusRep@status_internal@absl@@QBEPAV123@XZ ?CombineContiguousImpl@MixingHashState@hash_internal@absl@@CA_K_KPBEIU?$integral_constant@H$03@__Cr@std@@@Z ?CombineContiguousImpl@MixingHashState@hash_internal@absl@@CA_K_KPBEIU?$integral_constant@H$07@__Cr@std@@@Z ?CombineLargeContiguousImpl32@MixingHashState@hash_internal@absl@@CA_K_KPBEI@Z @@ -540,11 +543,10 @@ ?EqualsIgnoreCase@absl@@YA_NV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@0@Z ?EqualsImpl@Cord@absl@@ABE_NABV12@I@Z ?EqualsImpl@Cord@absl@@ABE_NV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@I@Z - ?EqualsSlow@Status@absl@@CA_NABV12@0@Z ?EquivTransitions@TimeZoneInfo@cctz@time_internal@absl@@ABE_NEE@Z ?Erase@?$Storage@UPayload@status_internal@absl@@$00V?$allocator@UPayload@status_internal@absl@@@__Cr@std@@@inlined_vector_internal@absl@@QAEPAUPayload@status_internal@3@PBU453@0@Z ?EraseMetaOnly@container_internal@absl@@YAXAAVCommonFields@12@PAW4ctrl_t@12@I@Z - ?ErasePayload@Status@absl@@QAE_NV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@Z + ?ErasePayload@StatusRep@status_internal@absl@@QAE?AUEraseResult@123@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@Z ?ErrnoToStatus@absl@@YA?AVStatus@1@HV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@Z ?ErrnoToStatusCode@absl@@YA?AW4StatusCode@1@H@Z ?Eval@Condition@absl@@QBE_NXZ @@ -601,7 +603,7 @@ ?Flush@LogSink@absl@@UAEXXZ ?FlushLogSinks@log_internal@absl@@YAXXZ ?ForEachChunkAux@Cord@absl@@CAXPAUCordRep@cord_internal@2@V?$FunctionRef@$$A6AXV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@Z@2@@Z - ?ForEachPayload@Status@absl@@QBEXV?$FunctionRef@$$A6AXV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@ABVCord@absl@@@Z@2@@Z + ?ForEachPayload@StatusRep@status_internal@absl@@QBEXV?$FunctionRef@$$A6AXV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@ABVCord@absl@@@Z@3@@Z ?ForVar2@CheckOpMessageBuilder@log_internal@absl@@QAEAAV?$basic_ostream@DU?$char_traits@D@__Cr@std@@@__Cr@std@@XZ ?ForgetDeadlockInfo@Mutex@absl@@QAEXXZ ?FormatCivilTime@absl@@YA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@V?$civil_time@Uday_tag@time_internal@absl@@@detail@cctz@time_internal@1@@Z @@ -673,7 +675,7 @@ ?GetMorePreciseMemoryUsage@cord_internal@absl@@YAIPBUCordRep@12@@Z ?GetParentMethod@CordzInfo@cord_internal@absl@@CA?AW4MethodIdentifier@CordzUpdateTracker@23@PBV123@@Z ?GetParentStack@CordzInfo@cord_internal@absl@@QBE?AV?$Span@QAX@3@XZ - ?GetPayload@Status@absl@@QBE?AV?$optional@VCord@absl@@@2@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@Z + ?GetPayload@StatusRep@status_internal@absl@@QBE?AV?$optional@VCord@absl@@@3@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@Z ?GetProgramCounter@debugging_internal@absl@@YAPAXQAX@Z ?GetSaltMaterial@random_internal@absl@@YA?AV?$optional@I@2@XZ ?GetSkipCount@ExponentialBiased@profiling_internal@absl@@QAE_J_J@Z @@ -848,7 +850,7 @@ ?Post@Win32Waiter@synchronization_internal@absl@@QAEXXZ ?PrepareForSampling@HashtablezInfo@container_internal@absl@@QAEX_JI@Z ?PrepareToDie@LogMessage@log_internal@absl@@AAEXXZ - ?PrepareToModify@Status@absl@@AAEXXZ + ?PrepareToModify@Status@absl@@CAPAVStatusRep@status_internal@2@I@Z ?Prepend@Cord@absl@@QAEXABV12@@Z ?Prepend@CordRepBtree@cord_internal@absl@@SAPAV123@PAV123@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@I@Z ?PrependArray@Cord@absl@@AAEXV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@W4MethodIdentifier@CordzUpdateTracker@cord_internal@2@@Z @@ -939,7 +941,7 @@ ?SetMaxFramesInLogStackTrace@log_internal@absl@@YAXH@Z ?SetMinLogLevel@absl@@YAXW4LogSeverityAtLeast@1@@Z ?SetMutexDeadlockDetectionMode@absl@@YAXW4OnDeadlockCycle@1@@Z - ?SetPayload@Status@absl@@QAEXV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@VCord@2@@Z + ?SetPayload@StatusRep@status_internal@absl@@QAEXV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@VCord@3@@Z ?SetStackUnwinder@absl@@YAXP6AHPAPAXPAHHHPBX1@Z@Z ?SetStatusPayloadPrinter@status_internal@absl@@YAXP6A?AV?$optional@V?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@@2@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@ABVCord@2@@Z@Z ?SetStderrThreshold@absl@@YAXW4LogSeverityAtLeast@1@@Z @@ -1053,9 +1055,10 @@ ?ToString@?$BigUnsigned@$03@strings_internal@absl@@QBE?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@XZ ?ToString@?$BigUnsigned@$0FE@@strings_internal@absl@@QBE?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@XZ ?ToString@Status@absl@@QBE?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@W4StatusToStringMode@2@@Z + ?ToString@StatusRep@status_internal@absl@@QBE?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@W4StatusToStringMode@3@@Z ?ToString@int128@absl@@ABE?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@XZ ?ToString@uint128@absl@@ABE?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@XZ - ?ToStringSlow@Status@absl@@ABE?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@W4StatusToStringMode@2@@Z + ?ToStringSlow@Status@absl@@CA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@IW4StatusToStringMode@2@@Z ?ToTM@absl@@YA?AUtm@@VTime@1@VTimeZone@1@@Z ?ToTimeT@absl@@YA_JVTime@1@@Z ?ToTimespec@absl@@YA?AUtimespec@@VDuration@1@@Z @@ -1092,7 +1095,7 @@ ?UnparseFlag@absl@@YA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@VDuration@1@@Z ?UnparseFlag@absl@@YA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@VTime@1@@Z ?Unref@CrcCordState@crc_internal@absl@@CAXPAURefcountedRep@123@@Z - ?UnrefNonInlined@Status@absl@@CAXI@Z + ?Unref@StatusRep@status_internal@absl@@QBEXXZ ?UnrefTree@InlineRep@Cord@absl@@AAEXXZ ?UnsampleSlow@container_internal@absl@@YAXPAUHashtablezInfo@12@@Z ?Unscramble@CRC32@crc_internal@absl@@UBEXPAI@Z @@ -1110,7 +1113,6 @@ ?WaitForNotification@Notification@absl@@QBEXXZ ?WaitForNotificationWithDeadline@Notification@absl@@QBE_NVTime@2@@Z ?WaitForNotificationWithTimeout@Notification@absl@@QBE_NVDuration@2@@Z - ?Wakeup@CondVar@absl@@AAEXPAUPerThreadSynch@base_internal@2@@Z ?Wakeup@Mutex@absl@@AAEPAUPerThreadSynch@base_internal@2@PAU342@@Z ?WebSafeBase64Escape@absl@@YA?AV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@34@@Z ?WebSafeBase64Escape@absl@@YAXV?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@PAV?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@34@@Z @@ -1157,7 +1159,6 @@ ?clear@?$__split_buffer@UTransition@cctz@time_internal@absl@@AAV?$allocator@UTransition@cctz@time_internal@absl@@@__Cr@std@@@__Cr@std@@QAEXXZ ?clear@?$__split_buffer@UTransitionType@cctz@time_internal@absl@@AAV?$allocator@UTransitionType@cctz@time_internal@absl@@@__Cr@std@@@__Cr@std@@QAEXXZ ?clear@?$__split_buffer@UViableSubstitution@strings_internal@absl@@AAV?$allocator@UViableSubstitution@strings_internal@absl@@@__Cr@std@@@__Cr@std@@QAEXXZ - ?code@Status@absl@@QBE?AW4StatusCode@2@XZ ?combine_contiguous@MixingHashState@hash_internal@absl@@SA?AV123@V123@PBEI@Z ?cycle_clock_source_@CycleClock@base_internal@absl@@0U?$atomic@P6A_JXZ@__Cr@std@@A ?day_difference@impl@detail@cctz@time_internal@absl@@YA_J_JCC0CC@Z @@ -1209,7 +1210,6 @@ ?push_front@?$__split_buffer@PAPBVImpl@time_zone@cctz@time_internal@absl@@V?$allocator@PAPBVImpl@time_zone@cctz@time_internal@absl@@@__Cr@std@@@__Cr@std@@QAEX$$QAPAPBVImpl@time_zone@cctz@time_internal@absl@@@Z ?push_front@?$__split_buffer@PAUPrefixCrc@CrcCordState@crc_internal@absl@@AAV?$allocator@PAUPrefixCrc@CrcCordState@crc_internal@absl@@@__Cr@std@@@__Cr@std@@QAEXABQAUPrefixCrc@CrcCordState@crc_internal@absl@@@Z ?push_front@?$__split_buffer@PAUPrefixCrc@CrcCordState@crc_internal@absl@@V?$allocator@PAUPrefixCrc@CrcCordState@crc_internal@absl@@@__Cr@std@@@__Cr@std@@QAEX$$QAPAUPrefixCrc@CrcCordState@crc_internal@absl@@@Z - ?raw_code@Status@absl@@QBEHXZ ?reserve@?$vector@UTransition@cctz@time_internal@absl@@V?$allocator@UTransition@cctz@time_internal@absl@@@__Cr@std@@@__Cr@std@@QAEXI@Z ?reserve@?$vector@UTransitionType@cctz@time_internal@absl@@V?$allocator@UTransitionType@cctz@time_internal@absl@@@__Cr@std@@@__Cr@std@@QAEXI@Z ?reserve@?$vector@UViableSubstitution@strings_internal@absl@@V?$allocator@UViableSubstitution@strings_internal@absl@@@__Cr@std@@@__Cr@std@@QAEXI@Z
diff --git a/third_party/blink/common/service_worker/service_worker_router_rule.cc b/third_party/blink/common/service_worker/service_worker_router_rule.cc index 02efb93..7fb1f34 100644 --- a/third_party/blink/common/service_worker/service_worker_router_rule.cc +++ b/third_party/blink/common/service_worker/service_worker_router_rule.cc
@@ -4,8 +4,6 @@ #include "third_party/blink/public/common/service_worker/service_worker_router_rule.h" -#include "base/notreached.h" - namespace blink { bool ServiceWorkerRouterRequestCondition::operator==( @@ -14,18 +12,25 @@ destination == other.destination; } +bool ServiceWorkerRouterOrCondition::operator==( + const ServiceWorkerRouterOrCondition& other) const { + return conditions == other.conditions; +} + bool ServiceWorkerRouterCondition::operator==( const ServiceWorkerRouterCondition& other) const { if (type != other.type) { return false; } switch (type) { - case ConditionType::kUrlPattern: + case Type::kUrlPattern: return url_pattern == other.url_pattern; - case ConditionType::kRequest: + case Type::kRequest: return request == other.request; - case ConditionType::kRunningStatus: + case Type::kRunningStatus: return running_status == other.running_status; + case Type::kOr: + return or_condition == other.or_condition; } }
diff --git a/third_party/blink/common/service_worker/service_worker_router_rule_mojom_traits.cc b/third_party/blink/common/service_worker/service_worker_router_rule_mojom_traits.cc index dfcf1d6..a36c131 100644 --- a/third_party/blink/common/service_worker/service_worker_router_rule_mojom_traits.cc +++ b/third_party/blink/common/service_worker/service_worker_router_rule_mojom_traits.cc
@@ -3,6 +3,8 @@ // found in the LICENSE file. #include "third_party/blink/public/common/service_worker/service_worker_router_rule_mojom_traits.h" +#include "third_party/blink/public/common/service_worker/service_worker_router_rule.h" +#include "third_party/blink/public/mojom/service_worker/service_worker_router_rule.mojom.h" namespace mojo { @@ -17,6 +19,16 @@ return true; } +bool StructTraits<blink::mojom::ServiceWorkerRouterOrConditionDataView, + blink::ServiceWorkerRouterOrCondition>:: + Read(blink::mojom::ServiceWorkerRouterOrConditionDataView data, + blink::ServiceWorkerRouterOrCondition* out) { + if (!data.ReadConditions(&out->conditions)) { + return false; + } + return true; +} + bool StructTraits<blink::mojom::ServiceWorkerRouterRequestConditionDataView, blink::ServiceWorkerRouterRequestCondition>:: Read(blink::mojom::ServiceWorkerRouterRequestConditionDataView data, @@ -38,12 +50,14 @@ blink::ServiceWorkerRouterCondition>:: GetTag(const blink::ServiceWorkerRouterCondition& data) { switch (data.type) { - case blink::ServiceWorkerRouterCondition::ConditionType::kUrlPattern: + case blink::ServiceWorkerRouterCondition::Type::kUrlPattern: return blink::mojom::ServiceWorkerRouterCondition::Tag::kUrlPattern; - case blink::ServiceWorkerRouterCondition::ConditionType::kRequest: + case blink::ServiceWorkerRouterCondition::Type::kRequest: return blink::mojom::ServiceWorkerRouterCondition::Tag::kRequest; - case blink::ServiceWorkerRouterCondition::ConditionType::kRunningStatus: + case blink::ServiceWorkerRouterCondition::Type::kRunningStatus: return blink::mojom::ServiceWorkerRouterCondition::Tag::kRunningStatus; + case blink::ServiceWorkerRouterCondition::Type::kOr: + return blink::mojom::ServiceWorkerRouterCondition::Tag::kOrCondition; } } @@ -53,25 +67,29 @@ blink::ServiceWorkerRouterCondition* out) { switch (data.tag()) { case blink::mojom::ServiceWorkerRouterCondition::Tag::kUrlPattern: - out->type = - blink::ServiceWorkerRouterCondition::ConditionType::kUrlPattern; + out->type = blink::ServiceWorkerRouterCondition::Type::kUrlPattern; if (!data.ReadUrlPattern(&out->url_pattern)) { return false; } return true; case blink::mojom::ServiceWorkerRouterCondition::Tag::kRequest: - out->type = blink::ServiceWorkerRouterCondition::ConditionType::kRequest; + out->type = blink::ServiceWorkerRouterCondition::Type::kRequest; if (!data.ReadRequest(&out->request)) { return false; } return true; case blink::mojom::ServiceWorkerRouterCondition::Tag::kRunningStatus: - out->type = - blink::ServiceWorkerRouterCondition::ConditionType::kRunningStatus; + out->type = blink::ServiceWorkerRouterCondition::Type::kRunningStatus; if (!data.ReadRunningStatus(&out->running_status)) { return false; } return true; + case blink::mojom::ServiceWorkerRouterCondition::Tag::kOrCondition: + out->type = blink::ServiceWorkerRouterCondition::Type::kOr; + if (!data.ReadOrCondition(&out->or_condition)) { + return false; + } + return true; } return false;
diff --git a/third_party/blink/common/service_worker/service_worker_router_rule_mojom_traits_unittest.cc b/third_party/blink/common/service_worker/service_worker_router_rule_mojom_traits_unittest.cc index f41bac9..56ffa2fe 100644 --- a/third_party/blink/common/service_worker/service_worker_router_rule_mojom_traits_unittest.cc +++ b/third_party/blink/common/service_worker/service_worker_router_rule_mojom_traits_unittest.cc
@@ -7,6 +7,8 @@ #include "mojo/public/cpp/test_support/test_utils.h" #include "services/network/public/mojom/fetch_api.mojom-shared.h" #include "testing/gtest/include/gtest/gtest.h" +#include "third_party/blink/public/common/service_worker/service_worker_router_rule.h" +#include "third_party/blink/public/mojom/service_worker/service_worker_router_rule.mojom.h" #include "third_party/liburlpattern/parse.h" #include "third_party/liburlpattern/pattern.h" @@ -32,8 +34,7 @@ blink::ServiceWorkerRouterRule rule; { blink::ServiceWorkerRouterCondition condition; - condition.type = - blink::ServiceWorkerRouterCondition::ConditionType::kUrlPattern; + condition.type = blink::ServiceWorkerRouterCondition::Type::kUrlPattern; blink::SafeUrlPattern url_pattern; auto parse_result = liburlpattern::Parse( "/test/*", @@ -45,8 +46,7 @@ } { blink::ServiceWorkerRouterCondition condition; - condition.type = - blink::ServiceWorkerRouterCondition::ConditionType::kRequest; + condition.type = blink::ServiceWorkerRouterCondition::Type::kRequest; blink::ServiceWorkerRouterRequestCondition request; request.method = "GET"; request.mode = network::mojom::RequestMode::kNavigate; @@ -56,8 +56,7 @@ } { blink::ServiceWorkerRouterCondition condition; - condition.type = - blink::ServiceWorkerRouterCondition::ConditionType::kRequest; + condition.type = blink::ServiceWorkerRouterCondition::Type::kRequest; blink::ServiceWorkerRouterRequestCondition request; condition.request = request; rule.conditions.push_back(condition); @@ -65,7 +64,7 @@ { blink::ServiceWorkerRouterCondition condition; condition.type = - blink::ServiceWorkerRouterCondition::ConditionType::kRunningStatus; + blink::ServiceWorkerRouterCondition::Type::kRunningStatus; blink::ServiceWorkerRouterRunningStatusCondition running_status; running_status.status = blink::ServiceWorkerRouterRunningStatusCondition:: RunningStatusEnum::kRunning; @@ -73,6 +72,20 @@ rule.conditions.push_back(condition); } { + blink::ServiceWorkerRouterCondition condition; + condition.type = blink::ServiceWorkerRouterCondition::Type::kOr; + blink::ServiceWorkerRouterOrCondition or_condition; + + blink::ServiceWorkerRouterCondition fake; + fake.type = blink::ServiceWorkerRouterCondition::Type::kRequest; + blink::ServiceWorkerRouterRequestCondition request; + fake.request = request; + + or_condition.conditions = std::vector(3, fake); + condition.or_condition = or_condition; + rule.conditions.push_back(condition); + } + { blink::ServiceWorkerRouterSource source; source.type = blink::ServiceWorkerRouterSource::SourceType::kNetwork; source.network_source.emplace();
diff --git a/third_party/blink/public/blink_resources.grd b/third_party/blink/public/blink_resources.grd index 0493ccd..098a268 100644 --- a/third_party/blink/public/blink_resources.grd +++ b/third_party/blink/public/blink_resources.grd
@@ -18,6 +18,7 @@ <if expr="is_macosx"> <include name="IDR_UASTYLE_THEME_MAC_CSS" file="../renderer/core/html/resources/mac.css" type="BINDATA" compress="brotli"/> </if> + <include name="IDR_UASTYLE_PERMISSION_ELEMENT_CSS" file="../renderer/core/html/resources/permission.css" flattenhtml="true" type="BINDATA" compress="brotli"/> <include name="IDR_UASTYLE_THEME_INPUT_MULTIPLE_FIELDS_CSS" file="../renderer/core/html/resources/input_multiple_fields.css" type="BINDATA" compress="brotli"/> <include name="IDR_UASTYLE_THEME_INPUT_MULTIPLE_FIELDS_INLINE_FLEX_CSS" file="../renderer/core/html/resources/input_multiple_fields_inline_flex.css" type="BINDATA" compress="brotli"/> <include name="IDR_UASTYLE_THEME_FORCED_COLORS_CSS" file="../renderer/core/html/resources/forced_colors.css" type="BINDATA" compress="brotli"/>
diff --git a/third_party/blink/public/common/service_worker/service_worker_router_rule.h b/third_party/blink/public/common/service_worker/service_worker_router_rule.h index 5a6ea7d..b6ac8ae 100644 --- a/third_party/blink/public/common/service_worker/service_worker_router_rule.h +++ b/third_party/blink/public/common/service_worker/service_worker_router_rule.h
@@ -20,6 +20,8 @@ namespace blink { +struct ServiceWorkerRouterCondition; + struct ServiceWorkerRouterRequestCondition { // https://fetch.spec.whatwg.org/#concept-request-method // Technically, it can be an arbitrary string, but Chromium would set @@ -50,19 +52,27 @@ } }; +struct ServiceWorkerRouterOrCondition { + std::vector<ServiceWorkerRouterCondition> conditions; + + bool operator==(const ServiceWorkerRouterOrCondition& other) const; +}; + // TODO(crbug.com/1371756): implement other conditions in the proposal. // TODO(crbug.com/1456599): migrate to absl::variant if possible. struct BLINK_COMMON_EXPORT ServiceWorkerRouterCondition { // Type of conditions. - enum class ConditionType { + enum class Type { // URLPattern is used as a condition. kUrlPattern, // Request condition. kRequest, // Running status condition. kRunningStatus, + // Or condition + kOr, }; - ConditionType type; + Type type; // URLPattern to be used for matching. // This field is valid if `type` is `kUrlPattern`. @@ -76,6 +86,11 @@ // This field is valid if `type` is `kRunningStatus`. absl::optional<ServiceWorkerRouterRunningStatusCondition> running_status; + // `Or` condition to be used for matching + // This field is valid if `type` is `kOr` + // We need `_condition` suffix to avoid conflict with reserved keywords in C++ + absl::optional<ServiceWorkerRouterOrCondition> or_condition; + bool operator==(const ServiceWorkerRouterCondition& other) const; };
diff --git a/third_party/blink/public/common/service_worker/service_worker_router_rule_mojom_traits.h b/third_party/blink/public/common/service_worker/service_worker_router_rule_mojom_traits.h index 71a99e5..728b03b89 100644 --- a/third_party/blink/public/common/service_worker/service_worker_router_rule_mojom_traits.h +++ b/third_party/blink/public/common/service_worker/service_worker_router_rule_mojom_traits.h
@@ -9,9 +9,9 @@ #include "services/network/public/mojom/fetch_api.mojom-shared.h" #include "third_party/blink/public/common/common_export.h" +#include "third_party/blink/public/common/safe_url_pattern.h" #include "third_party/blink/public/common/service_worker/service_worker_router_rule.h" -#include "third_party/blink/public/mojom/safe_url_pattern.mojom.h" -#include "third_party/blink/public/mojom/service_worker/service_worker_router_rule.mojom.h" +#include "third_party/blink/public/mojom/service_worker/service_worker_router_rule.mojom-shared.h" namespace mojo { @@ -106,6 +106,19 @@ template <> struct BLINK_COMMON_EXPORT + StructTraits<blink::mojom::ServiceWorkerRouterOrConditionDataView, + blink::ServiceWorkerRouterOrCondition> { + static const std::vector<blink::ServiceWorkerRouterCondition>& conditions( + const blink::ServiceWorkerRouterOrCondition& data) { + return data.conditions; + } + + static bool Read(blink::mojom::ServiceWorkerRouterOrConditionDataView data, + blink::ServiceWorkerRouterOrCondition* out); +}; + +template <> +struct BLINK_COMMON_EXPORT UnionTraits<blink::mojom::ServiceWorkerRouterConditionDataView, blink::ServiceWorkerRouterCondition> { static blink::mojom::ServiceWorkerRouterConditionDataView::Tag GetTag( @@ -126,6 +139,11 @@ return *data.running_status; } + static const blink::ServiceWorkerRouterOrCondition& or_condition( + const blink::ServiceWorkerRouterCondition& data) { + return *data.or_condition; + } + static bool Read(blink::mojom::ServiceWorkerRouterConditionDataView data, blink::ServiceWorkerRouterCondition* out); };
diff --git a/third_party/blink/public/mojom/service_worker/service_worker_router_rule.mojom b/third_party/blink/public/mojom/service_worker/service_worker_router_rule.mojom index ba90475..9d1dd86 100644 --- a/third_party/blink/public/mojom/service_worker/service_worker_router_rule.mojom +++ b/third_party/blink/public/mojom/service_worker/service_worker_router_rule.mojom
@@ -54,6 +54,10 @@ network.mojom.RequestDestination destination; }; +struct ServiceWorkerRouterOrCondition { + array<ServiceWorkerRouterCondition> conditions; +}; + // This represents a condition of the router rule. // https://github.com/yoshisatoyanagisawa/service-worker-static-routing-api // TODO(crbug.com/1371756): implement other conditions in the full picture. @@ -62,6 +66,7 @@ SafeUrlPattern url_pattern; ServiceWorkerRouterRequestCondition request; ServiceWorkerRouterRunningStatusCondition running_status; + ServiceWorkerRouterOrCondition or_condition; }; // This is used for specifying the source is network.
diff --git a/third_party/blink/renderer/core/css/css_default_style_sheets.cc b/third_party/blink/renderer/core/css/css_default_style_sheets.cc index 522632d..d5e3108 100644 --- a/third_party/blink/renderer/core/css/css_default_style_sheets.cc +++ b/third_party/blink/renderer/core/css/css_default_style_sheets.cc
@@ -44,6 +44,7 @@ #include "third_party/blink/renderer/core/html/html_anchor_element.h" #include "third_party/blink/renderer/core/html/html_html_element.h" #include "third_party/blink/renderer/core/html/html_meter_element.h" +#include "third_party/blink/renderer/core/html/html_permission_element.h" #include "third_party/blink/renderer/core/html/html_progress_element.h" #include "third_party/blink/renderer/core/layout/layout_theme.h" #include "third_party/blink/renderer/core/mathml_names.h" @@ -278,6 +279,15 @@ changed_default_style = true; } + if (!permission_element_style_sheet_ && IsA<HTMLPermissionElement>(element)) { + CHECK(RuntimeEnabledFeatures::PermissionElementEnabled()); + permission_element_style_sheet_ = ParseUASheet( + UncompressResourceAsASCIIString(IDR_UASTYLE_PERMISSION_ELEMENT_CSS)); + AddRulesToDefaultStyleSheets(permission_element_style_sheet_, + NamespaceType::kHTML); + changed_default_style = true; + } + if (!text_track_style_sheet_ && IsA<HTMLVideoElement>(element)) { Settings* settings = element.GetDocument().GetSettings(); if (settings) { @@ -458,6 +468,7 @@ visitor->Trace(svg_style_sheet_); visitor->Trace(mathml_style_sheet_); visitor->Trace(media_controls_style_sheet_); + visitor->Trace(permission_element_style_sheet_); visitor->Trace(text_track_style_sheet_); visitor->Trace(forced_colors_style_sheet_); visitor->Trace(fullscreen_style_sheet_);
diff --git a/third_party/blink/renderer/core/css/css_default_style_sheets.h b/third_party/blink/renderer/core/css/css_default_style_sheets.h index beb63581..ac245fe 100644 --- a/third_party/blink/renderer/core/css/css_default_style_sheets.h +++ b/third_party/blink/renderer/core/css/css_default_style_sheets.h
@@ -157,6 +157,7 @@ Member<StyleSheetContents> svg_style_sheet_; Member<StyleSheetContents> mathml_style_sheet_; Member<StyleSheetContents> media_controls_style_sheet_; + Member<StyleSheetContents> permission_element_style_sheet_; Member<StyleSheetContents> text_track_style_sheet_; Member<StyleSheetContents> fullscreen_style_sheet_; Member<StyleSheetContents> selectlist_style_sheet_;
diff --git a/third_party/blink/renderer/core/css/parser/css_variable_parser.cc b/third_party/blink/renderer/core/css/parser/css_variable_parser.cc index aaf336a7..c849b54d5f 100644 --- a/third_party/blink/renderer/core/css/parser/css_variable_parser.cc +++ b/third_party/blink/renderer/core/css/parser/css_variable_parser.cc
@@ -204,10 +204,6 @@ CSSTokenizedValue value, const CSSParserContext& context, bool is_animation_tainted) { - if (value.range.AtEnd()) { - return nullptr; - } - bool has_references; if (!IsValidVariable(value.range, has_references)) { return nullptr;
diff --git a/third_party/blink/renderer/core/html/html_permission_element.cc b/third_party/blink/renderer/core/html/html_permission_element.cc index 930abb8..7123079 100644 --- a/third_party/blink/renderer/core/html/html_permission_element.cc +++ b/third_party/blink/renderer/core/html/html_permission_element.cc
@@ -8,11 +8,15 @@ #include "third_party/blink/public/common/input/web_pointer_properties.h" #include "third_party/blink/renderer/core/dom/element.h" #include "third_party/blink/renderer/core/dom/events/event.h" +#include "third_party/blink/renderer/core/dom/shadow_root.h" #include "third_party/blink/renderer/core/dom/space_split_string.h" #include "third_party/blink/renderer/core/events/mouse_event.h" #include "third_party/blink/renderer/core/execution_context/execution_context.h" +#include "third_party/blink/renderer/core/html/html_div_element.h" +#include "third_party/blink/renderer/core/html/html_span_element.h" #include "third_party/blink/renderer/core/html_names.h" #include "third_party/blink/renderer/core/inspector/console_message.h" +#include "third_party/blink/renderer/platform/heap/garbage_collected.h" namespace blink { @@ -68,6 +72,7 @@ : HTMLElement(html_names::kPermissionTag, document), permission_service_(document.GetExecutionContext()) { DCHECK(RuntimeEnabledFeatures::PermissionElementEnabled()); + EnsureUserAgentShadowRoot(); } HTMLPermissionElement::~HTMLPermissionElement() = default; @@ -78,6 +83,8 @@ void HTMLPermissionElement::Trace(Visitor* visitor) const { visitor->Trace(permission_service_); + visitor->Trace(inner_element_); + visitor->Trace(permission_text_); HTMLElement::Trace(visitor); } @@ -125,6 +132,20 @@ HTMLElement::AttributeChanged(params); } +void HTMLPermissionElement::DidAddUserAgentShadowRoot(ShadowRoot& root) { + CHECK(!inner_element_ && !permission_text_); + inner_element_ = MakeGarbageCollected<HTMLDivElement>(GetDocument()); + inner_element_->SetShadowPseudoId( + AtomicString("-internal-permission-element-inner")); + root.AppendChild(inner_element_); + + permission_text_ = MakeGarbageCollected<HTMLSpanElement>(GetDocument()); + // TODO(crbug.com/1462930): Set string based on permission type + permission_text_->SetShadowPseudoId( + AtomicString("-internal-permission-text")); + inner_element_->AppendChild(permission_text_); +} + void HTMLPermissionElement::DefaultEventHandler(Event& event) { if (event.type() == event_type_names::kDOMActivate) { event.SetDefaultHandled();
diff --git a/third_party/blink/renderer/core/html/html_permission_element.h b/third_party/blink/renderer/core/html/html_permission_element.h index b85b657..dd5d075 100644 --- a/third_party/blink/renderer/core/html/html_permission_element.h +++ b/third_party/blink/renderer/core/html/html_permission_element.h
@@ -51,6 +51,7 @@ // blink::Element implements void AttributeChanged(const AttributeModificationParams& params) override; + void DidAddUserAgentShadowRoot(ShadowRoot&) override; // blink::Node override. void DefaultEventHandler(Event&) override; @@ -97,6 +98,9 @@ // entry will have an expiration time associated with it, which can be // |base::TimeTicks::Max()| if it's indefinite. HashMap<DisableReason, base::TimeTicks> clicking_disabled_reasons_; + + Member<HTMLDivElement> inner_element_; + Member<HTMLSpanElement> permission_text_; }; } // namespace blink
diff --git a/third_party/blink/renderer/core/html/resources/permission.css b/third_party/blink/renderer/core/html/resources/permission.css new file mode 100644 index 0000000..75a5d59 --- /dev/null +++ b/third_party/blink/renderer/core/html/resources/permission.css
@@ -0,0 +1,39 @@ +/* + * Copyright 2023 The Chromium Authors + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + * + * The default style sheet used to render <permission> elements + * (require PermissionElement enabled). + */ + +@namespace "http://www.w3.org/1999/xhtml"; + +permission { + background-color:#efefef; + border-radius: 3px; + color: #000000; + display: inline-block; + height: 1.2em; + opacity: 1 !important; + outline: solid 1px #767676; + width: 188px; + } + +permission::-internal-permission-element-inner { + width: 100%; + height: 100%; +} + +permission::-internal-permission-text { + font-family: monospace; + font-size: inherit; + font-style: normal; + font-weight: 400; + letter-spacing: -0.02em; + opacity: 1 !important; + outline: none; + padding: 2px 4px 2px 4px; + user-select:none !important; + white-space:nowrap !important; +}
diff --git a/third_party/blink/renderer/core/layout/build.gni b/third_party/blink/renderer/core/layout/build.gni index d09462c..4b770c7e 100644 --- a/third_party/blink/renderer/core/layout/build.gni +++ b/third_party/blink/renderer/core/layout/build.gni
@@ -362,8 +362,6 @@ "ng/layout_box_utils.cc", "ng/layout_box_utils.h", "ng/layout_ng_block.h", - "ng/layout_ng_block_flow_mixin.cc", - "ng/layout_ng_block_flow_mixin.h", "ng/layout_ng_mixin.cc", "ng/layout_ng_mixin.h", "ng/layout_ng_view.cc",
diff --git a/third_party/blink/renderer/core/layout/layout_object.h b/third_party/blink/renderer/core/layout/layout_object.h index 8c25ddb8..f747a6c 100644 --- a/third_party/blink/renderer/core/layout/layout_object.h +++ b/third_party/blink/renderer/core/layout/layout_object.h
@@ -2776,8 +2776,7 @@ // There 2 different types of list markers: // * LayoutNGInsideListMarker (LayoutInline): for inside markers - // * LayoutNGOutsideListMarker (LayoutNGBlockFlowMixin<LayoutBlockFlow>): - // for outside markers. + // * LayoutNGOutsideListMarker (LayoutNGBlockFlow): for outside markers. // Any kind of LayoutBox list marker. // TODO(1229581): Remove this function. Just use
diff --git a/third_party/blink/renderer/core/layout/ng/custom/css_layout_definition.cc b/third_party/blink/renderer/core/layout/ng/custom/css_layout_definition.cc index b00951c..b552396 100644 --- a/third_party/blink/renderer/core/layout/ng/custom/css_layout_definition.cc +++ b/third_party/blink/renderer/core/layout/ng/custom/css_layout_definition.cc
@@ -27,6 +27,7 @@ #include "third_party/blink/renderer/core/layout/ng/custom/custom_layout_fragment.h" #include "third_party/blink/renderer/core/layout/ng/custom/custom_layout_scope.h" #include "third_party/blink/renderer/core/layout/ng/ng_block_node.h" +#include "third_party/blink/renderer/core/layout/ng/ng_constraint_space.h" #include "third_party/blink/renderer/core/layout/ng/ng_layout_input_node.h" #include "third_party/blink/renderer/platform/bindings/script_state.h" #include "third_party/blink/renderer/platform/bindings/v8_binding_macros.h"
diff --git a/third_party/blink/renderer/core/layout/ng/grid/ng_grid_item.h b/third_party/blink/renderer/core/layout/ng/grid/ng_grid_item.h index ebddbf9..ebf86f34 100644 --- a/third_party/blink/renderer/core/layout/ng/grid/ng_grid_item.h +++ b/third_party/blink/renderer/core/layout/ng/grid/ng_grid_item.h
@@ -9,6 +9,7 @@ #include "third_party/blink/renderer/core/layout/ng/grid/ng_grid_track_collection.h" #include "third_party/blink/renderer/core/layout/ng/ng_baseline_utils.h" #include "third_party/blink/renderer/core/layout/ng/ng_block_node.h" +#include "third_party/blink/renderer/core/layout/ng/ng_constraint_space.h" #include "third_party/blink/renderer/platform/wtf/vector.h" namespace blink {
diff --git a/third_party/blink/renderer/core/layout/ng/layout_ng_block_flow.cc b/third_party/blink/renderer/core/layout/ng/layout_ng_block_flow.cc index 5dfae2a..966b93f 100644 --- a/third_party/blink/renderer/core/layout/ng/layout_ng_block_flow.cc +++ b/third_party/blink/renderer/core/layout/ng/layout_ng_block_flow.cc
@@ -4,18 +4,157 @@ #include "third_party/blink/renderer/core/layout/ng/layout_ng_block_flow.h" +#include "third_party/blink/renderer/core/editing/position_with_affinity.h" #include "third_party/blink/renderer/core/layout/layout_object.h" +#include "third_party/blink/renderer/core/layout/ng/inline/ng_inline_node_data.h" +#include "third_party/blink/renderer/core/layout/ng/ng_physical_box_fragment.h" +#include "third_party/blink/renderer/core/paint/ng/ng_box_fragment_painter.h" namespace blink { LayoutNGBlockFlow::LayoutNGBlockFlow(ContainerNode* node) - : LayoutNGBlockFlowMixin<LayoutBlockFlow>(node) {} + : LayoutNGMixin<LayoutBlockFlow>(node) {} LayoutNGBlockFlow::~LayoutNGBlockFlow() = default; +void LayoutNGBlockFlow::Trace(Visitor* visitor) const { + visitor->Trace(ng_inline_node_data_); + LayoutNGMixin<LayoutBlockFlow>::Trace(visitor); +} + bool LayoutNGBlockFlow::IsOfType(LayoutObjectType type) const { + NOT_DESTROYED(); return type == kLayoutObjectNGBlockFlow || LayoutNGMixin<LayoutBlockFlow>::IsOfType(type); } +void LayoutNGBlockFlow::StyleDidChange(StyleDifference diff, + const ComputedStyle* old_style) { + NOT_DESTROYED(); + LayoutBlockFlow::StyleDidChange(diff, old_style); + + if (diff.NeedsReshape()) { + SetNeedsCollectInlines(); + } +} + +NGInlineNodeData* LayoutNGBlockFlow::TakeNGInlineNodeData() { + NOT_DESTROYED(); + return ng_inline_node_data_.Release(); +} + +NGInlineNodeData* LayoutNGBlockFlow::GetNGInlineNodeData() const { + NOT_DESTROYED(); + return ng_inline_node_data_; +} + +void LayoutNGBlockFlow::ResetNGInlineNodeData() { + NOT_DESTROYED(); + ng_inline_node_data_ = MakeGarbageCollected<NGInlineNodeData>(); +} + +void LayoutNGBlockFlow::ClearNGInlineNodeData() { + NOT_DESTROYED(); + if (ng_inline_node_data_) { + // ng_inline_node_data_ is not used from now on but exists until GC happens, + // so it is better to eagerly clear HeapVector to improve memory + // utilization. + ng_inline_node_data_->items.clear(); + ng_inline_node_data_.Clear(); + } +} + +void LayoutNGBlockFlow::AddOutlineRects( + OutlineRectCollector& collector, + LayoutObject::OutlineInfo* info, + const PhysicalOffset& additional_offset, + NGOutlineType include_block_overflows) const { + NOT_DESTROYED(); + + // TODO(crbug.com/1145048): Currently |NGBoxPhysicalFragment| does not support + // NG block fragmentation. Fallback to the legacy code path. + if (PhysicalFragmentCount() == 1) { + const NGPhysicalBoxFragment* fragment = GetPhysicalFragment(0); + if (fragment->HasItems()) { + fragment->AddSelfOutlineRects(additional_offset, include_block_overflows, + collector, info); + return; + } + } + + LayoutBlockFlow::AddOutlineRects(collector, info, additional_offset, + include_block_overflows); +} + +bool LayoutNGBlockFlow::NodeAtPoint(HitTestResult& result, + const HitTestLocation& hit_test_location, + const PhysicalOffset& accumulated_offset, + HitTestPhase phase) { + NOT_DESTROYED(); + + // Please see |LayoutNGMixin<Base>::Paint()| for these DCHECKs. + DCHECK(IsMonolithic() || !CanTraversePhysicalFragments() || + !Parent()->CanTraversePhysicalFragments()); + // We may get here in multiple-fragment cases if the object is repeated + // (inside table headers and footers, for instance). + DCHECK(PhysicalFragmentCount() <= 1u || + GetPhysicalFragment(0)->BreakToken()->IsRepeated()); + + if (!MayIntersect(result, hit_test_location, accumulated_offset)) { + return false; + } + + if (PhysicalFragmentCount()) { + const NGPhysicalBoxFragment* fragment = GetPhysicalFragment(0); + DCHECK(fragment); + if (fragment->HasItems() || + // Check descendants of this fragment because floats may be in the + // |NGFragmentItems| of the descendants. + (phase == HitTestPhase::kFloat && + fragment->HasFloatingDescendantsForPaint())) { + return NGBoxFragmentPainter(*fragment).NodeAtPoint( + result, hit_test_location, accumulated_offset, phase); + } + } + + return LayoutBlockFlow::NodeAtPoint(result, hit_test_location, + accumulated_offset, phase); +} + +PositionWithAffinity LayoutNGBlockFlow::PositionForPoint( + const PhysicalOffset& point) const { + NOT_DESTROYED(); + DCHECK_GE(GetDocument().Lifecycle().GetState(), + DocumentLifecycle::kPrePaintClean); + + if (IsAtomicInlineLevel()) { + const PositionWithAffinity atomic_inline_position = + PositionForPointIfOutsideAtomicInlineLevel(point); + if (atomic_inline_position.IsNotNull()) { + return atomic_inline_position; + } + } + + if (!ChildrenInline()) { + return LayoutBlock::PositionForPoint(point); + } + + if (PhysicalFragmentCount()) { + return PositionForPointInFragments(point); + } + + return CreatePositionWithAffinity(0); +} + +void LayoutNGBlockFlow::DirtyLinesFromChangedChild(LayoutObject* child) { + NOT_DESTROYED(); + + // We need to dirty line box fragments only if the child is once laid out in + // LayoutNG inline formatting context. New objects are handled in + // NGInlineNode::MarkLineBoxesDirty(). + if (child->IsInLayoutNGInlineFormattingContext()) { + NGFragmentItems::DirtyLinesFromChangedChild(*child, *this); + } +} + } // namespace blink
diff --git a/third_party/blink/renderer/core/layout/ng/layout_ng_block_flow.h b/third_party/blink/renderer/core/layout/ng/layout_ng_block_flow.h index 0b868ff..f21481c 100644 --- a/third_party/blink/renderer/core/layout/ng/layout_ng_block_flow.h +++ b/third_party/blink/renderer/core/layout/ng/layout_ng_block_flow.h
@@ -7,29 +7,55 @@ #include "third_party/blink/renderer/core/core_export.h" #include "third_party/blink/renderer/core/layout/layout_block_flow.h" -#include "third_party/blink/renderer/core/layout/ng/layout_ng_block_flow_mixin.h" +#include "third_party/blink/renderer/core/layout/ng/layout_ng_block.h" namespace blink { -extern template class CORE_EXTERN_TEMPLATE_EXPORT - LayoutNGBlockFlowMixin<LayoutBlockFlow>; +enum class NGBaselineAlgorithmType; +struct NGInlineNodeData; + extern template class CORE_EXTERN_TEMPLATE_EXPORT LayoutNGMixin<LayoutBlockFlow>; // This overrides the default layout block algorithm to use Layout NG. -class CORE_EXPORT LayoutNGBlockFlow - : public LayoutNGBlockFlowMixin<LayoutBlockFlow> { +class CORE_EXPORT LayoutNGBlockFlow : public LayoutNGMixin<LayoutBlockFlow> { public: explicit LayoutNGBlockFlow(ContainerNode*); ~LayoutNGBlockFlow() override; + void Trace(Visitor*) const override; const char* GetName() const override { NOT_DESTROYED(); return "LayoutNGBlockFlow"; } + bool NodeAtPoint(HitTestResult&, + const HitTestLocation&, + const PhysicalOffset& accumulated_offset, + HitTestPhase) override; + + PositionWithAffinity PositionForPoint(const PhysicalOffset&) const override; + + // LayoutBlockFlow overrides: + NGInlineNodeData* TakeNGInlineNodeData() final; + NGInlineNodeData* GetNGInlineNodeData() const final; + void ResetNGInlineNodeData() final; + void ClearNGInlineNodeData() final; + protected: bool IsOfType(LayoutObjectType) const override; + void StyleDidChange(StyleDifference, const ComputedStyle* old_style) override; + + void AddOutlineRects(OutlineRectCollector&, + LayoutObject::OutlineInfo*, + const PhysicalOffset& additional_offset, + NGOutlineType) const final; + + void DirtyLinesFromChangedChild(LayoutObject* child) final; + + Member<NGInlineNodeData> ng_inline_node_data_; + + friend class NGBaseLayoutAlgorithmTest; }; template <>
diff --git a/third_party/blink/renderer/core/layout/ng/layout_ng_block_flow_mixin.cc b/third_party/blink/renderer/core/layout/ng/layout_ng_block_flow_mixin.cc deleted file mode 100644 index f7fffff..0000000 --- a/third_party/blink/renderer/core/layout/ng/layout_ng_block_flow_mixin.cc +++ /dev/null
@@ -1,189 +0,0 @@ -// Copyright 2019 The Chromium Authors -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "third_party/blink/renderer/core/layout/ng/layout_ng_block_flow_mixin.h" - -#include <memory> -#include <utility> - -#include "third_party/blink/renderer/core/accessibility/ax_object_cache.h" -#include "third_party/blink/renderer/core/core_export.h" -#include "third_party/blink/renderer/core/editing/editing_utilities.h" -#include "third_party/blink/renderer/core/editing/position_with_affinity.h" -#include "third_party/blink/renderer/core/editing/visible_units.h" -#include "third_party/blink/renderer/core/layout/hit_test_location.h" -#include "third_party/blink/renderer/core/layout/ng/inline/ng_inline_cursor.h" -#include "third_party/blink/renderer/core/layout/ng/inline/ng_inline_node_data.h" -#include "third_party/blink/renderer/core/layout/ng/inline/ng_physical_line_box_fragment.h" -#include "third_party/blink/renderer/core/layout/ng/layout_box_utils.h" -#include "third_party/blink/renderer/core/layout/ng/layout_ng_block_flow.h" -#include "third_party/blink/renderer/core/layout/ng/ng_block_break_token.h" -#include "third_party/blink/renderer/core/layout/ng/ng_constraint_space.h" -#include "third_party/blink/renderer/core/layout/ng/ng_layout_result.h" -#include "third_party/blink/renderer/core/layout/ng/ng_layout_utils.h" -#include "third_party/blink/renderer/core/layout/ng/ng_length_utils.h" -#include "third_party/blink/renderer/core/layout/ng/ng_physical_box_fragment.h" -#include "third_party/blink/renderer/core/layout/ng/ng_relative_utils.h" -#include "third_party/blink/renderer/core/layout/ng/table/layout_ng_table_caption.h" -#include "third_party/blink/renderer/core/paint/ng/ng_box_fragment_painter.h" -#include "third_party/blink/renderer/core/paint/paint_layer.h" - -namespace blink { - -template <typename Base> -LayoutNGBlockFlowMixin<Base>::LayoutNGBlockFlowMixin(ContainerNode* node) - : LayoutNGMixin<Base>(node) { - static_assert(std::is_base_of<LayoutBlockFlow, Base>::value, - "Base class of LayoutNGBlockFlowMixin must be LayoutBlockFlow " - "or derived class."); -} - -template <typename Base> -LayoutNGBlockFlowMixin<Base>::~LayoutNGBlockFlowMixin() = default; - -template <typename Base> -void LayoutNGBlockFlowMixin<Base>::StyleDidChange( - StyleDifference diff, - const ComputedStyle* old_style) { - Base::CheckIsNotDestroyed(); - Base::StyleDidChange(diff, old_style); - - if (diff.NeedsReshape()) { - Base::SetNeedsCollectInlines(); - } -} - -template <typename Base> -NGInlineNodeData* LayoutNGBlockFlowMixin<Base>::TakeNGInlineNodeData() { - Base::CheckIsNotDestroyed(); - return ng_inline_node_data_.Release(); -} - -template <typename Base> -NGInlineNodeData* LayoutNGBlockFlowMixin<Base>::GetNGInlineNodeData() const { - Base::CheckIsNotDestroyed(); - return ng_inline_node_data_; -} - -template <typename Base> -void LayoutNGBlockFlowMixin<Base>::ResetNGInlineNodeData() { - Base::CheckIsNotDestroyed(); - ng_inline_node_data_ = MakeGarbageCollected<NGInlineNodeData>(); -} - -template <typename Base> -void LayoutNGBlockFlowMixin<Base>::ClearNGInlineNodeData() { - Base::CheckIsNotDestroyed(); - if (ng_inline_node_data_) { - // ng_inline_node_data_ is not used from now on but exists until GC happens, - // so it is better to eagerly clear HeapVector to improve memory - // utilization. - ng_inline_node_data_->items.clear(); - ng_inline_node_data_.Clear(); - } -} - -template <typename Base> -void LayoutNGBlockFlowMixin<Base>::AddOutlineRects( - OutlineRectCollector& collector, - LayoutObject::OutlineInfo* info, - const PhysicalOffset& additional_offset, - NGOutlineType include_block_overflows) const { - Base::CheckIsNotDestroyed(); - - // TODO(crbug.com/1145048): Currently |NGBoxPhysicalFragment| does not support - // NG block fragmentation. Fallback to the legacy code path. - if (Base::PhysicalFragmentCount() == 1) { - const NGPhysicalBoxFragment* fragment = Base::GetPhysicalFragment(0); - if (fragment->HasItems()) { - fragment->AddSelfOutlineRects(additional_offset, include_block_overflows, - collector, info); - return; - } - } - - Base::AddOutlineRects(collector, info, additional_offset, - include_block_overflows); -} - -template <typename Base> -bool LayoutNGBlockFlowMixin<Base>::NodeAtPoint( - HitTestResult& result, - const HitTestLocation& hit_test_location, - const PhysicalOffset& accumulated_offset, - HitTestPhase phase) { - Base::CheckIsNotDestroyed(); - - // Please see |LayoutNGMixin<Base>::Paint()| for these DCHECKs. - DCHECK(Base::IsMonolithic() || !Base::CanTraversePhysicalFragments() || - !Base::Parent()->CanTraversePhysicalFragments()); - // We may get here in multiple-fragment cases if the object is repeated - // (inside table headers and footers, for instance). - DCHECK(Base::PhysicalFragmentCount() <= 1u || - Base::GetPhysicalFragment(0)->BreakToken()->IsRepeated()); - - if (!Base::MayIntersect(result, hit_test_location, accumulated_offset)) - return false; - - if (Base::PhysicalFragmentCount()) { - const NGPhysicalBoxFragment* fragment = Base::GetPhysicalFragment(0); - DCHECK(fragment); - if (fragment->HasItems() || - // Check descendants of this fragment because floats may be in the - // |NGFragmentItems| of the descendants. - (phase == HitTestPhase::kFloat && - fragment->HasFloatingDescendantsForPaint())) { - return NGBoxFragmentPainter(*fragment).NodeAtPoint( - result, hit_test_location, accumulated_offset, phase); - } - } - - return LayoutBlockFlow::NodeAtPoint(result, hit_test_location, - accumulated_offset, phase); -} - -template <typename Base> -PositionWithAffinity LayoutNGBlockFlowMixin<Base>::PositionForPoint( - const PhysicalOffset& point) const { - Base::CheckIsNotDestroyed(); - DCHECK_GE(Base::GetDocument().Lifecycle().GetState(), - DocumentLifecycle::kPrePaintClean); - - if (Base::IsAtomicInlineLevel()) { - const PositionWithAffinity atomic_inline_position = - Base::PositionForPointIfOutsideAtomicInlineLevel(point); - if (atomic_inline_position.IsNotNull()) - return atomic_inline_position; - } - - if (!Base::ChildrenInline()) - return LayoutBlock::PositionForPoint(point); - - if (Base::PhysicalFragmentCount()) - return Base::PositionForPointInFragments(point); - - return Base::CreatePositionWithAffinity(0); -} - -template <typename Base> -void LayoutNGBlockFlowMixin<Base>::DirtyLinesFromChangedChild( - LayoutObject* child) { - Base::CheckIsNotDestroyed(); - - // We need to dirty line box fragments only if the child is once laid out in - // LayoutNG inline formatting context. New objects are handled in - // NGInlineNode::MarkLineBoxesDirty(). - if (child->IsInLayoutNGInlineFormattingContext()) - NGFragmentItems::DirtyLinesFromChangedChild(*child, *this); -} - -template <typename Base> -void LayoutNGBlockFlowMixin<Base>::Trace(Visitor* visitor) const { - visitor->Trace(ng_inline_node_data_); - LayoutNGMixin<Base>::Trace(visitor); -} - -template class CORE_TEMPLATE_EXPORT LayoutNGBlockFlowMixin<LayoutBlockFlow>; - -} // namespace blink
diff --git a/third_party/blink/renderer/core/layout/ng/layout_ng_block_flow_mixin.h b/third_party/blink/renderer/core/layout/ng/layout_ng_block_flow_mixin.h deleted file mode 100644 index c63ac37..0000000 --- a/third_party/blink/renderer/core/layout/ng/layout_ng_block_flow_mixin.h +++ /dev/null
@@ -1,73 +0,0 @@ -// Copyright 2017 The Chromium Authors -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_NG_LAYOUT_NG_BLOCK_FLOW_MIXIN_H_ -#define THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_NG_LAYOUT_NG_BLOCK_FLOW_MIXIN_H_ - -#include <type_traits> - -#include "third_party/blink/renderer/core/layout/layout_box_model_object.h" -#include "third_party/blink/renderer/core/layout/ng/layout_ng_mixin.h" -#include "third_party/blink/renderer/core/layout/ng/ng_constraint_space.h" - -namespace blink { - -enum class NGBaselineAlgorithmType; -struct NGInlineNodeData; - -// This mixin holds code shared between LayoutNG subclasses of LayoutBlockFlow. -// -// If you'd like to make a LayoutNGFoo class inheriting from -// LayoutNGBlockFlowMixin<LayoutBar>, you need to do: -// * Add the following to the header for LayoutNGFoo. -// extern template class CORE_EXTERN_TEMPLATE_EXPORT -// LayoutNGBlockFlowMixin<LayoutBar>; -// extern template class CORE_EXTERN_TEMPLATE_EXPORT -// LayoutNGMixin<LayoutBar>; -// * Add |#include "header for LayoutNGFoo"| to layout_ng_block_flow_mixin.cc -// and layout_ng_mixin.cc. -// It's the header for LayoutNGFoo, not for LayoutBar. The purpose is to -// include the above |extern template| declarations. -// * Add |template class CORE_TEMPLATE_EXPORT -// LayoutNGBlockFlowMixin<LayoutBar>;| to layout_ng_block_flow_mixin.cc. -// * Add |template class CORE_TEMPLATE_EXPORT LayoutNGMixin<LayoutBar>;| to -// layout_ng_mixin.cc. -template <typename Base> -class LayoutNGBlockFlowMixin : public LayoutNGMixin<Base> { - public: - explicit LayoutNGBlockFlowMixin(ContainerNode*); - ~LayoutNGBlockFlowMixin() override; - - NGInlineNodeData* TakeNGInlineNodeData() final; - NGInlineNodeData* GetNGInlineNodeData() const final; - void ResetNGInlineNodeData() final; - void ClearNGInlineNodeData() final; - - bool NodeAtPoint(HitTestResult&, - const HitTestLocation&, - const PhysicalOffset& accumulated_offset, - HitTestPhase) override; - - PositionWithAffinity PositionForPoint(const PhysicalOffset&) const override; - - void Trace(Visitor*) const override; - - protected: - void StyleDidChange(StyleDifference, const ComputedStyle* old_style) override; - - void AddOutlineRects(OutlineRectCollector&, - LayoutObject::OutlineInfo*, - const PhysicalOffset& additional_offset, - NGOutlineType) const final; - - void DirtyLinesFromChangedChild(LayoutObject* child) final; - - Member<NGInlineNodeData> ng_inline_node_data_; - - friend class NGBaseLayoutAlgorithmTest; -}; - -} // namespace blink - -#endif // THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_NG_LAYOUT_NG_BLOCK_FLOW_MIXIN_H_
diff --git a/third_party/blink/renderer/core/layout/ng/ng_layout_result.h b/third_party/blink/renderer/core/layout/ng/ng_layout_result.h index a12dd888..459196f9 100644 --- a/third_party/blink/renderer/core/layout/ng/ng_layout_result.h +++ b/third_party/blink/renderer/core/layout/ng/ng_layout_result.h
@@ -17,6 +17,7 @@ #include "third_party/blink/renderer/core/layout/ng/grid/layout_ng_grid.h" #include "third_party/blink/renderer/core/layout/ng/ng_block_node.h" #include "third_party/blink/renderer/core/layout/ng/ng_break_appeal.h" +#include "third_party/blink/renderer/core/layout/ng/ng_constraint_space.h" #include "third_party/blink/renderer/core/layout/ng/ng_early_break.h" #include "third_party/blink/renderer/core/layout/ng/ng_floats_utils.h" #include "third_party/blink/renderer/core/layout/ng/ng_fragment.h"
diff --git a/third_party/blink/renderer/core/layout/ng/ng_layout_utils.h b/third_party/blink/renderer/core/layout/ng/ng_layout_utils.h index a9067a4e..8e76296 100644 --- a/third_party/blink/renderer/core/layout/ng/ng_layout_utils.h +++ b/third_party/blink/renderer/core/layout/ng/ng_layout_utils.h
@@ -12,6 +12,7 @@ class NGConstraintSpace; class NGLayoutResult; +struct NGMarginStrut; // NGLayoutCacheStatus indicates what type of cache hit/miss occurred. For // various types of misses we may be able to perform less work than a full
diff --git a/third_party/blink/renderer/core/layout/ng/ng_space_utils.h b/third_party/blink/renderer/core/layout/ng/ng_space_utils.h index ae66123..1ebd73e 100644 --- a/third_party/blink/renderer/core/layout/ng/ng_space_utils.h +++ b/third_party/blink/renderer/core/layout/ng/ng_space_utils.h
@@ -13,6 +13,7 @@ namespace blink { +class NGConstraintSpaceBuilder; struct NGBfcOffset; // Adjusts {@code offset} to the clearance line.
diff --git a/third_party/blink/renderer/core/layout/ng/table/ng_table_layout_algorithm_utils.h b/third_party/blink/renderer/core/layout/ng/table/ng_table_layout_algorithm_utils.h index 93f6a373..eb5f06a7 100644 --- a/third_party/blink/renderer/core/layout/ng/table/ng_table_layout_algorithm_utils.h +++ b/third_party/blink/renderer/core/layout/ng/table/ng_table_layout_algorithm_utils.h
@@ -17,6 +17,7 @@ class NGConstraintSpaceBuilder; class NGTableBorders; enum class NGCacheSlot; +struct NGTableColumnLocation; // Table size distribution algorithms. class NGTableAlgorithmUtils {
diff --git a/third_party/blink/renderer/modules/ml/webnn/ml_graph_mojo.cc b/third_party/blink/renderer/modules/ml/webnn/ml_graph_mojo.cc index b9ed938b..a0c878f 100644 --- a/third_party/blink/renderer/modules/ml/webnn/ml_graph_mojo.cc +++ b/third_party/blink/renderer/modules/ml/webnn/ml_graph_mojo.cc
@@ -102,14 +102,14 @@ operand_to_id_map.insert(operand, operand_id); } - // Create `mojo::Operator` with the id of the input and output operands. - auto operation = - ConvertToMojoOperator(operand_to_id_map, current_operator.Get()); - if (!operation.has_value()) { + // Create `mojo::Operation` with the id of the input and output operands. + auto mojo_operation = + ConvertToMojoOperation(operand_to_id_map, current_operator.Get()); + if (!mojo_operation.has_value()) { // Return here if the operator is not implemented. - return base::unexpected(operation.error()); + return base::unexpected(mojo_operation.error()); } - graph_info->operators.emplace_back(std::move(operation.value())); + graph_info->operations.emplace_back(std::move(mojo_operation.value())); } return graph_info;
diff --git a/third_party/blink/renderer/modules/ml/webnn/ml_graph_test_mojo.cc b/third_party/blink/renderer/modules/ml/webnn/ml_graph_test_mojo.cc index 5f657d8..4c84322 100644 --- a/third_party/blink/renderer/modules/ml/webnn/ml_graph_test_mojo.cc +++ b/third_party/blink/renderer/modules/ml/webnn/ml_graph_test_mojo.cc
@@ -281,10 +281,12 @@ auto graph_info = helper.GetGraphInfo(); // Verify the graph information of mojo are as expected. - ASSERT_EQ(graph_info->operators.size(), 1u); - auto& operation = graph_info->operators[0]; - EXPECT_EQ(operation->kind, blink_mojom::Operator::Kind::kClamp); - auto& clamp_attributes = operation->attributes->get_clamp(); + ASSERT_EQ(graph_info->operations.size(), 1u); + auto& operation = graph_info->operations[0]; + EXPECT_EQ(operation->is_generic_operator(), true); + auto& generic_operator = operation->get_generic_operator(); + EXPECT_EQ(generic_operator->kind, blink_mojom::Operator::Kind::kClamp); + auto& clamp_attributes = generic_operator->attributes->get_clamp(); EXPECT_EQ(clamp_attributes->min_value, expected_attributes.min_value); EXPECT_EQ(clamp_attributes->max_value, expected_attributes.max_value); EXPECT_EQ(graph_info->output_operands.size(), 1u); @@ -457,10 +459,12 @@ auto graph_info = helper.GetGraphInfo(); // Verify the graph information of mojo are as expected. - ASSERT_EQ(graph_info->operators.size(), 1u); - auto& operation = graph_info->operators[0]; - EXPECT_EQ(operation->kind, blink_mojom::Operator::Kind::kConv2d); - auto& conv2d_attributes = operation->attributes->get_conv2d(); + ASSERT_EQ(graph_info->operations.size(), 1u); + auto& operation = graph_info->operations[0]; + EXPECT_EQ(operation->is_generic_operator(), true); + auto& generic_operator = operation->get_generic_operator(); + EXPECT_EQ(generic_operator->kind, blink_mojom::Operator::Kind::kConv2d); + auto& conv2d_attributes = generic_operator->attributes->get_conv2d(); // Validate explicit padding. auto& expected_padding = expected_attributes.padding; EXPECT_EQ(conv2d_attributes->padding->beginning->height, @@ -708,13 +712,15 @@ EXPECT_EQ(output_operand_iter->value->dimensions, expected.dimensions); EXPECT_EQ(output_operand_iter->value->name, "output"); // Verify the `mojo::Operator`. - ASSERT_EQ(graph_info->operators.size(), 1u); - auto& operation = graph_info->operators[0]; - ASSERT_EQ(operation->input_operands.size(), 2u); - EXPECT_EQ(operation->input_operands[0], lhs_operand_id); - EXPECT_EQ(operation->input_operands[1], rhs_operand_id); - ASSERT_EQ(operation->output_operands.size(), 1u); - EXPECT_EQ(operation->output_operands[0], output_operand_id); + ASSERT_EQ(graph_info->operations.size(), 1u); + auto& operation = graph_info->operations[0]; + EXPECT_EQ(operation->is_generic_operator(), true); + auto& generic_operator = operation->get_generic_operator(); + ASSERT_EQ(generic_operator->input_operands.size(), 2u); + EXPECT_EQ(generic_operator->input_operands[0], lhs_operand_id); + EXPECT_EQ(generic_operator->input_operands[1], rhs_operand_id); + ASSERT_EQ(generic_operator->output_operands.size(), 1u); + EXPECT_EQ(generic_operator->output_operands[0], output_operand_id); } }; @@ -837,10 +843,12 @@ auto graph_info = helper.GetGraphInfo(); // Verify the graph information of mojo are as expected. - ASSERT_EQ(graph_info->operators.size(), 1u); - auto& operation = graph_info->operators[0]; - EXPECT_EQ(operation->kind, blink_mojom::Operator::Kind::kGemm); - auto& gemm_attributes = operation->attributes->get_gemm(); + ASSERT_EQ(graph_info->operations.size(), 1u); + auto& operation = graph_info->operations[0]; + EXPECT_EQ(operation->is_generic_operator(), true); + auto& generic_operator = operation->get_generic_operator(); + EXPECT_EQ(generic_operator->kind, blink_mojom::Operator::Kind::kGemm); + auto& gemm_attributes = generic_operator->attributes->get_gemm(); ASSERT_EQ(gemm_attributes.is_null(), false); if (options.c) { auto c_operand_iter = graph_info->id_to_operand_map.find( @@ -1025,43 +1033,38 @@ auto graph_info = helper.GetGraphInfo(); // Verify the graph information of mojo are as expected. - ASSERT_EQ(graph_info->operators.size(), 1u); - auto& operation = graph_info->operators[0]; + ASSERT_EQ(graph_info->operations.size(), 1u); + auto& operation = graph_info->operations[0]; + EXPECT_EQ(operation->is_pool2d(), true); + auto& poo2d_mojo = operation->get_pool2d(); switch (kind) { case Pool2dKind::kAverage: - EXPECT_EQ(operation->kind, blink_mojom::Operator::Kind::kAveragePool2d); + EXPECT_EQ(poo2d_mojo->kind, blink_mojom::Pool2d::Kind::kAveragePool2d); break; case Pool2dKind::kMax: - EXPECT_EQ(operation->kind, blink_mojom::Operator::Kind::kMaxPool2d); + EXPECT_EQ(poo2d_mojo->kind, blink_mojom::Pool2d::Kind::kMaxPool2d); break; default: NOTREACHED(); } - auto& pool2d_attributes = operation->attributes->get_pool2d(); // Validate window dimensions. - EXPECT_EQ(pool2d_attributes->window_dimensions->height, + EXPECT_EQ(poo2d_mojo->window_dimensions->height, expected_attributes.window_dimensions[0]); - EXPECT_EQ(pool2d_attributes->window_dimensions->width, + EXPECT_EQ(poo2d_mojo->window_dimensions->width, expected_attributes.window_dimensions[1]); // Validate explicit padding. auto& expected_padding = expected_attributes.padding; - EXPECT_EQ(pool2d_attributes->padding->beginning->height, - expected_padding[0]); - EXPECT_EQ(pool2d_attributes->padding->ending->height, expected_padding[1]); - EXPECT_EQ(pool2d_attributes->padding->beginning->width, - expected_padding[2]); - EXPECT_EQ(pool2d_attributes->padding->ending->width, expected_padding[3]); + EXPECT_EQ(poo2d_mojo->padding->beginning->height, expected_padding[0]); + EXPECT_EQ(poo2d_mojo->padding->ending->height, expected_padding[1]); + EXPECT_EQ(poo2d_mojo->padding->beginning->width, expected_padding[2]); + EXPECT_EQ(poo2d_mojo->padding->ending->width, expected_padding[3]); // Validate strides - EXPECT_EQ(pool2d_attributes->strides->height, - expected_attributes.strides[0]); - EXPECT_EQ(pool2d_attributes->strides->width, - expected_attributes.strides[1]); + EXPECT_EQ(poo2d_mojo->strides->height, expected_attributes.strides[0]); + EXPECT_EQ(poo2d_mojo->strides->width, expected_attributes.strides[1]); // Validate dilations. - EXPECT_EQ(pool2d_attributes->dilations->height, - expected_attributes.dilations[0]); - EXPECT_EQ(pool2d_attributes->dilations->width, - expected_attributes.dilations[1]); - EXPECT_EQ(pool2d_attributes->layout, expected_attributes.layout); + EXPECT_EQ(poo2d_mojo->dilations->height, expected_attributes.dilations[0]); + EXPECT_EQ(poo2d_mojo->dilations->width, expected_attributes.dilations[1]); + EXPECT_EQ(poo2d_mojo->layout, expected_attributes.layout); EXPECT_EQ(graph_info->output_operands.size(), 1u); auto output_operand_id = graph_info->output_operands[0]; auto output_operand_iter = @@ -1258,13 +1261,15 @@ EXPECT_EQ(output_operand_iter->value->dimensions, expected.dimensions); EXPECT_EQ(output_operand_iter->value->name, "output"); // Verify the `mojo::Operator`. - ASSERT_EQ(graph_info->operators.size(), 1u); - auto& operation = graph_info->operators[0]; - EXPECT_EQ(operation->kind, blink_mojom::Operator::Kind::kRelu); - ASSERT_EQ(operation->input_operands.size(), 1u); - EXPECT_EQ(operation->input_operands[0], input_operand_id); - ASSERT_EQ(operation->output_operands.size(), 1u); - EXPECT_EQ(operation->output_operands[0], output_operand_id); + ASSERT_EQ(graph_info->operations.size(), 1u); + auto& operation = graph_info->operations[0]; + EXPECT_EQ(operation->is_generic_operator(), true); + auto& generic_operator = operation->get_generic_operator(); + EXPECT_EQ(generic_operator->kind, blink_mojom::Operator::Kind::kRelu); + ASSERT_EQ(generic_operator->input_operands.size(), 1u); + EXPECT_EQ(generic_operator->input_operands[0], input_operand_id); + ASSERT_EQ(generic_operator->output_operands.size(), 1u); + EXPECT_EQ(generic_operator->output_operands[0], output_operand_id); } }; @@ -1332,9 +1337,11 @@ auto graph_info = helper.GetGraphInfo(); // Verify the graph information of mojo are as expected. - ASSERT_EQ(graph_info->operators.size(), 1u); - auto& operation = graph_info->operators[0]; - EXPECT_EQ(operation->kind, blink_mojom::Operator::Kind::kReshape); + ASSERT_EQ(graph_info->operations.size(), 1u); + auto& operation = graph_info->operations[0]; + EXPECT_EQ(operation->is_generic_operator(), true); + auto& generic_operator = operation->get_generic_operator(); + EXPECT_EQ(generic_operator->kind, blink_mojom::Operator::Kind::kReshape); EXPECT_EQ(graph_info->output_operands.size(), 1u); auto output_operand_id = graph_info->output_operands[0]; auto output_operand_iter = @@ -1412,9 +1419,11 @@ auto graph_info = helper.GetGraphInfo(); // Verify the graph information of mojo are as expected. - ASSERT_EQ(graph_info->operators.size(), 1u); - auto& operation = graph_info->operators[0]; - EXPECT_EQ(operation->kind, blink_mojom::Operator::Kind::kSoftmax); + ASSERT_EQ(graph_info->operations.size(), 1u); + auto& operation = graph_info->operations[0]; + EXPECT_EQ(operation->is_generic_operator(), true); + auto& generic_operator = operation->get_generic_operator(); + EXPECT_EQ(generic_operator->kind, blink_mojom::Operator::Kind::kSoftmax); EXPECT_EQ(graph_info->output_operands.size(), 1u); auto output_operand_id = graph_info->output_operands[0]; auto output_operand_iter =
diff --git a/third_party/blink/renderer/modules/ml/webnn/ml_graph_type_converter.cc b/third_party/blink/renderer/modules/ml/webnn/ml_graph_type_converter.cc index 9eab7b2..cb69ca68 100644 --- a/third_party/blink/renderer/modules/ml/webnn/ml_graph_type_converter.cc +++ b/third_party/blink/renderer/modules/ml/webnn/ml_graph_type_converter.cc
@@ -15,12 +15,6 @@ namespace mojo { -namespace { - -using webnn::mojom::blink::Size2d; - -} // namespace - webnn::mojom::blink::Operand::DataType BlinkOperandTypeToMojo( blink::V8MLOperandType::Enum type) { switch (type) { @@ -80,17 +74,6 @@ } }; -webnn::mojom::blink::InputOperandLayout BlinkInputOperandLayoutToMojo( - blink::V8MLInputOperandLayout::Enum type) { - switch (type) { - case blink::V8MLInputOperandLayout::Enum::kNchw: - return webnn::mojom::blink::InputOperandLayout::kChannelsFirst; - case blink::V8MLInputOperandLayout::Enum::kNhwc: - return webnn::mojom::blink::InputOperandLayout::kChannelsLast; - } - NOTREACHED_NORETURN(); -} - // Get height and width of input operand. webnn::Size2d GetInputOperandSize2d(const blink::MLOperand* input, blink::V8MLInputOperandLayout::Enum type) { @@ -113,67 +96,17 @@ return {.height = input_height, .width = input_width}; } -template <> -struct TypeConverter<webnn::mojom::blink::Pool2dAttributesPtr, - blink::MLOperator*> { - static webnn::mojom::blink::Pool2dAttributesPtr Convert( - const blink::MLOperator* pool2d) { - const auto* options = - static_cast<const blink::MLPool2dOptions*>(pool2d->Options()); - CHECK(options); - auto attributes = webnn::mojom::blink::Pool2dAttributes::New(); - // If strides is not present, the values are assumed to be [1,1]. - auto strides = options->getStridesOr({1, 1}); - CHECK_EQ(strides.size(), 2u); - attributes->strides = Size2d::New(strides[0], strides[1]); - - // If dilations is not present, the values are assumed to be [1, 1]. - auto dilations = options->getDilationsOr({1, 1}); - CHECK_EQ(dilations.size(), 2u); - attributes->dilations = Size2d::New(dilations[0], dilations[1]); - attributes->layout = - BlinkInputOperandLayoutToMojo(options->layout().AsEnum()); - - // Get height and width of input for calculating padding. - auto input_size = mojo::GetInputOperandSize2d(pool2d->Inputs()[0].Get(), - options->layout().AsEnum()); - // The dimensions of the sliding window are the height and width of input - // operand if they are not supplied by user. - uint32_t window_height = input_size.height; - uint32_t window_width = input_size.width; - if (options->hasWindowDimensions()) { - auto& window_dimensions = options->windowDimensions(); - CHECK_EQ(window_dimensions.size(), 2u); - window_height = window_dimensions[0]; - window_width = window_dimensions[1]; - } - attributes->window_dimensions = Size2d::New(window_height, window_width); - - // Calculate the padding given input sizes, window dimensions, padding, - // strides and dilations. - auto padding = blink::CalculatePadding2D( - options, input_size.height, input_size.width, window_height, - window_width, attributes->strides->height, attributes->strides->width, - attributes->dilations->height, attributes->dilations->width); - // The order of sequence array is [beginning_height, ending_height, - // beginning_width, ending_width]. - attributes->padding = webnn::mojom::blink::Padding2d::New( - Size2d::New(padding.beginning.height, - padding.beginning.width) /* beginning padding*/, - Size2d::New(padding.ending.height, - padding.ending.width) /* ending padding*/); - return attributes; - } -}; - } // namespace mojo namespace blink { namespace { +using webnn::mojom::blink::Operation; +using webnn::mojom::blink::OperationPtr; using webnn::mojom::blink::Operator; using webnn::mojom::blink::OperatorPtr; +using webnn::mojom::blink::Size2d; // Maps MLOperand to its id which is used to identify the `mojo::Operand` across // processes. @@ -197,8 +130,8 @@ return operand_to_id_map.at(output); } -OperatorPtr CreateClampOperator(const OperandToIdMap& operand_to_id_map, - const MLOperator* clamp) { +OperationPtr CreateClampOperator(const OperandToIdMap& operand_to_id_map, + const MLOperator* clamp) { const uint64_t input_operand_id = GetOperatorInputId(clamp, operand_to_id_map); const uint64_t output_operand_id = @@ -212,7 +145,19 @@ CHECK(options); operator_mojo->attributes = webnn::mojom::blink::OperatorAttributes::NewClamp( mojo::ConvertTo<webnn::mojom::blink::ClampAttributesPtr>(options)); - return operator_mojo; + return webnn::mojom::blink::Operation::NewGenericOperator( + std::move(operator_mojo)); +} + +webnn::mojom::blink::InputOperandLayout BlinkInputOperandLayoutToMojo( + blink::V8MLInputOperandLayout::Enum type) { + switch (type) { + case blink::V8MLInputOperandLayout::Enum::kNchw: + return webnn::mojom::blink::InputOperandLayout::kChannelsFirst; + case blink::V8MLInputOperandLayout::Enum::kNhwc: + return webnn::mojom::blink::InputOperandLayout::kChannelsLast; + } + NOTREACHED_NORETURN(); } base::expected<webnn::mojom::blink::Conv2dAttributesPtr, String> @@ -242,7 +187,7 @@ webnn::mojom::blink::Size2d::New(dilations[0], dilations[1]); attributes->groups = options->groups(); attributes->input_layout = - mojo::BlinkInputOperandLayoutToMojo(options->inputLayout().AsEnum()); + BlinkInputOperandLayoutToMojo(options->inputLayout().AsEnum()); if (options->hasBias()) { attributes->bias_operand_id = operand_to_id_map.at(options->bias()); } @@ -321,7 +266,7 @@ return attributes; } -base::expected<OperatorPtr, String> CreateConv2dOperator( +base::expected<OperationPtr, String> CreateConv2dOperator( const OperandToIdMap& operand_to_id_map, const MLOperator* conv2d) { const uint64_t input_operand_id = @@ -342,10 +287,11 @@ operator_mojo->attributes = webnn::mojom::blink::OperatorAttributes::NewConv2d( std::move(conv2d_attributes.value())); - return operator_mojo; + return webnn::mojom::blink::Operation::NewGenericOperator( + std::move(operator_mojo)); } -OperatorPtr CreateElementWiseBinaryOperator( +OperationPtr CreateElementWiseBinaryOperator( const OperandToIdMap& operand_to_id_map, const MLOperator* binary) { const uint64_t lhs_operand_id = @@ -380,7 +326,8 @@ } operator_mojo->input_operands = {lhs_operand_id, rhs_operand_id}; operator_mojo->output_operands = {output_operand_id}; - return operator_mojo; + return webnn::mojom::blink::Operation::NewGenericOperator( + std::move(operator_mojo)); } webnn::mojom::blink::GemmAttributesPtr ConvertToGemmAttributes( @@ -398,8 +345,8 @@ return attributes; } -OperatorPtr CreateGemmOperator(const OperandToIdMap& operand_to_id_map, - const MLOperator* gemm) { +OperationPtr CreateGemmOperator(const OperandToIdMap& operand_to_id_map, + const MLOperator* gemm) { const uint64_t a_operand_id = GetOperatorInputId(gemm, operand_to_id_map, 0); const uint64_t b_operand_id = GetOperatorInputId(gemm, operand_to_id_map, 1); const uint64_t output_operand_id = @@ -413,37 +360,80 @@ CHECK(options); operator_mojo->attributes = webnn::mojom::blink::OperatorAttributes::NewGemm( ConvertToGemmAttributes(operand_to_id_map, options)); - return operator_mojo; + return webnn::mojom::blink::Operation::NewGenericOperator( + std::move(operator_mojo)); } -OperatorPtr CreatePool2dOperator(const OperandToIdMap& operand_to_id_map, - const MLOperator* pool2d) { +OperationPtr CreatePool2dOperation(const OperandToIdMap& operand_to_id_map, + const MLOperator* pool2d) { const uint64_t input_operand_id = GetOperatorInputId(pool2d, operand_to_id_map); const uint64_t output_operand_id = GetOperatorOutputId(pool2d, operand_to_id_map); - auto operator_mojo = webnn::mojom::blink::Operator::New(); + auto pool2d_mojo = webnn::mojom::blink::Pool2d::New(); switch (pool2d->Kind()) { case MLOperator::OperatorKind::kAveragePool2d: - operator_mojo->kind = Operator::Kind::kAveragePool2d; + pool2d_mojo->kind = webnn::mojom::blink::Pool2d::Kind::kAveragePool2d; break; case MLOperator::OperatorKind::kMaxPool2d: - operator_mojo->kind = Operator::Kind::kMaxPool2d; + pool2d_mojo->kind = webnn::mojom::blink::Pool2d::Kind::kMaxPool2d; break; default: NOTREACHED(); } - operator_mojo->input_operands = {input_operand_id}; - operator_mojo->output_operands = {output_operand_id}; - operator_mojo->attributes = - webnn::mojom::blink::OperatorAttributes::NewPool2d( - mojo::ConvertTo<webnn::mojom::blink::Pool2dAttributesPtr>(pool2d)); - return operator_mojo; + pool2d_mojo->input_operand_id = input_operand_id; + pool2d_mojo->output_operand_id = output_operand_id; + + const auto* options = + static_cast<const blink::MLPool2dOptions*>(pool2d->Options()); + CHECK(options); + // If strides is not present, the values are assumed to be [1,1]. + auto strides = options->getStridesOr({1, 1}); + CHECK_EQ(strides.size(), 2u); + pool2d_mojo->strides = Size2d::New(strides[0], strides[1]); + + // If dilations is not present, the values are assumed to be [1, 1]. + auto dilations = options->getDilationsOr({1, 1}); + CHECK_EQ(dilations.size(), 2u); + pool2d_mojo->dilations = Size2d::New(dilations[0], dilations[1]); + pool2d_mojo->layout = + BlinkInputOperandLayoutToMojo(options->layout().AsEnum()); + + // Get height and width of input for calculating padding. + auto input_size = mojo::GetInputOperandSize2d(pool2d->Inputs()[0].Get(), + options->layout().AsEnum()); + // The dimensions of the sliding window are the height and width of input + // operand if they are not supplied by user. + uint32_t window_height = input_size.height; + uint32_t window_width = input_size.width; + if (options->hasWindowDimensions()) { + auto& window_dimensions = options->windowDimensions(); + CHECK_EQ(window_dimensions.size(), 2u); + window_height = window_dimensions[0]; + window_width = window_dimensions[1]; + } + pool2d_mojo->window_dimensions = Size2d::New(window_height, window_width); + + // Calculate the padding given input sizes, window dimensions, padding, + // strides and dilations. + auto padding = blink::CalculatePadding2D( + options, input_size.height, input_size.width, window_height, window_width, + pool2d_mojo->strides->height, pool2d_mojo->strides->width, + pool2d_mojo->dilations->height, pool2d_mojo->dilations->width); + // The order of sequence array is [beginning_height, ending_height, + // beginning_width, ending_width]. + pool2d_mojo->padding = webnn::mojom::blink::Padding2d::New( + Size2d::New(padding.beginning.height, + padding.beginning.width) /* beginning padding*/, + Size2d::New(padding.ending.height, + padding.ending.width) /* ending padding*/); + + return webnn::mojom::blink::Operation::NewPool2d(std::move(pool2d_mojo)); } -OperatorPtr CreateReluOperator(const OperandToIdMap& operand_to_id_map, - const MLOperator* relu) { +OperationPtr CreateReluOperator(const OperandToIdMap& operand_to_id_map, + const MLOperator* relu) { const uint64_t input_operand_id = GetOperatorInputId(relu, operand_to_id_map); const uint64_t output_operand_id = GetOperatorOutputId(relu, operand_to_id_map); @@ -452,11 +442,12 @@ operator_mojo->kind = Operator::Kind::kRelu; operator_mojo->input_operands = {input_operand_id}; operator_mojo->output_operands = {output_operand_id}; - return operator_mojo; + return webnn::mojom::blink::Operation::NewGenericOperator( + std::move(operator_mojo)); } -OperatorPtr CreateReshapeOperator(const OperandToIdMap& operand_to_id_map, - const MLOperator* reshape) { +OperationPtr CreateReshapeOperator(const OperandToIdMap& operand_to_id_map, + const MLOperator* reshape) { const uint64_t input_operand_id = GetOperatorInputId(reshape, operand_to_id_map); const uint64_t output_operand_id = @@ -466,11 +457,12 @@ operator_mojo->kind = Operator::Kind::kReshape; operator_mojo->input_operands = {input_operand_id}; operator_mojo->output_operands = {output_operand_id}; - return operator_mojo; + return webnn::mojom::blink::Operation::NewGenericOperator( + std::move(operator_mojo)); } -OperatorPtr CreateSoftmaxOperator(const OperandToIdMap& operand_to_id_map, - const MLOperator* softmax) { +OperationPtr CreateSoftmaxOperator(const OperandToIdMap& operand_to_id_map, + const MLOperator* softmax) { const uint64_t input_operand_id = GetOperatorInputId(softmax, operand_to_id_map); const uint64_t output_operand_id = @@ -480,12 +472,13 @@ operator_mojo->kind = Operator::Kind::kSoftmax; operator_mojo->input_operands = {input_operand_id}; operator_mojo->output_operands = {output_operand_id}; - return operator_mojo; + return webnn::mojom::blink::Operation::NewGenericOperator( + std::move(operator_mojo)); } } // namespace -base::expected<OperatorPtr, String> ConvertToMojoOperator( +base::expected<OperationPtr, String> ConvertToMojoOperation( const OperandToIdMap& operand_to_id_map, const MLOperator* op) { switch (op->Kind()) { @@ -500,11 +493,11 @@ case MLOperator::OperatorKind::kMin: case MLOperator::OperatorKind::kMax: return CreateElementWiseBinaryOperator(operand_to_id_map, op); - case MLOperator::OperatorKind::kGemm: - return CreateGemmOperator(operand_to_id_map, op); case MLOperator::OperatorKind::kAveragePool2d: case MLOperator::OperatorKind::kMaxPool2d: - return CreatePool2dOperator(operand_to_id_map, op); + return CreatePool2dOperation(operand_to_id_map, op); + case MLOperator::OperatorKind::kGemm: + return CreateGemmOperator(operand_to_id_map, op); case MLOperator::OperatorKind::kRelu: return CreateReluOperator(operand_to_id_map, op); case MLOperator::OperatorKind::kReshape: @@ -530,7 +523,6 @@ case MLOperator::OperatorKind::kSlice: case MLOperator::OperatorKind::kSplit: case MLOperator::OperatorKind::kTanh: - NOTIMPLEMENTED(); return base::unexpected(MLOperator::OperatorKindToString(op->Kind()) + " is not implemented."); }
diff --git a/third_party/blink/renderer/modules/ml/webnn/ml_graph_type_converter.h b/third_party/blink/renderer/modules/ml/webnn/ml_graph_type_converter.h index 412e5e59..48315cb5 100644 --- a/third_party/blink/renderer/modules/ml/webnn/ml_graph_type_converter.h +++ b/third_party/blink/renderer/modules/ml/webnn/ml_graph_type_converter.h
@@ -18,6 +18,11 @@ const HeapHashMap<Member<const MLOperand>, uint64_t>& operand_to_id_map, const MLOperator* op); +base::expected<webnn::mojom::blink::OperationPtr, String> +ConvertToMojoOperation( + const HeapHashMap<Member<const MLOperand>, uint64_t>& operand_to_id_map, + const MLOperator* op); + } // namespace blink namespace mojo {
diff --git a/third_party/blink/renderer/modules/service_worker/service_worker_router_type_converter.cc b/third_party/blink/renderer/modules/service_worker/service_worker_router_type_converter.cc index 5c3f12c..f47b012 100644 --- a/third_party/blink/renderer/modules/service_worker/service_worker_router_type_converter.cc +++ b/third_party/blink/renderer/modules/service_worker/service_worker_router_type_converter.cc
@@ -119,8 +119,7 @@ return absl::nullopt; } blink::ServiceWorkerRouterCondition condition; - condition.type = - blink::ServiceWorkerRouterCondition::ConditionType::kUrlPattern; + condition.type = blink::ServiceWorkerRouterCondition::Type::kUrlPattern; condition.url_pattern = std::move(*url_pattern); return condition; } @@ -152,7 +151,7 @@ return absl::nullopt; } ServiceWorkerRouterCondition condition; - condition.type = ServiceWorkerRouterCondition::ConditionType::kRequest; + condition.type = ServiceWorkerRouterCondition::Type::kRequest; condition.request = std::move(request); return condition; } @@ -179,7 +178,7 @@ break; } ServiceWorkerRouterCondition condition; - condition.type = ServiceWorkerRouterCondition::ConditionType::kRunningStatus; + condition.type = ServiceWorkerRouterCondition::Type::kRunningStatus; condition.running_status = std::move(running_status); return condition; }
diff --git a/third_party/blink/renderer/modules/service_worker/service_worker_router_type_converter_test.cc b/third_party/blink/renderer/modules/service_worker/service_worker_router_type_converter_test.cc index 3660006..4974abe6 100644 --- a/third_party/blink/renderer/modules/service_worker/service_worker_router_type_converter_test.cc +++ b/third_party/blink/renderer/modules/service_worker/service_worker_router_type_converter_test.cc
@@ -85,7 +85,7 @@ blink::ServiceWorkerRouterRule expected_rule; blink::ServiceWorkerRouterCondition expected_condition; expected_condition.type = - blink::ServiceWorkerRouterCondition::ConditionType::kUrlPattern; + blink::ServiceWorkerRouterCondition::Type::kUrlPattern; blink::SafeUrlPattern expected_url_pattern = DefaultStringUrlPattern(); { auto parse_result = liburlpattern::Parse( @@ -130,7 +130,7 @@ blink::ServiceWorkerRouterRule expected_rule; blink::ServiceWorkerRouterCondition expected_condition; expected_condition.type = - blink::ServiceWorkerRouterCondition::ConditionType::kUrlPattern; + blink::ServiceWorkerRouterCondition::Type::kUrlPattern; blink::SafeUrlPattern expected_url_pattern = DefaultURLPatternInitUrlPattern(); { @@ -190,7 +190,7 @@ blink::ServiceWorkerRouterRule expected_rule; blink::ServiceWorkerRouterCondition expected_condition; expected_condition.type = - blink::ServiceWorkerRouterCondition::ConditionType::kUrlPattern; + blink::ServiceWorkerRouterCondition::Type::kUrlPattern; blink::SafeUrlPattern expected_url_pattern = DefaultURLPatternInitUrlPattern(); { @@ -241,7 +241,7 @@ blink::ServiceWorkerRouterRule expected_rule; blink::ServiceWorkerRouterCondition expected_condition; expected_condition.type = - blink::ServiceWorkerRouterCondition::ConditionType::kUrlPattern; + blink::ServiceWorkerRouterCondition::Type::kUrlPattern; expected_condition.url_pattern = DefaultStringUrlPattern(); expected_rule.conditions.emplace_back(expected_condition); blink::ServiceWorkerRouterSource expected_source; @@ -318,7 +318,7 @@ blink::ServiceWorkerRouterRule expected_rule; blink::ServiceWorkerRouterCondition expected_condition; expected_condition.type = - blink::ServiceWorkerRouterCondition::ConditionType::kUrlPattern; + blink::ServiceWorkerRouterCondition::Type::kUrlPattern; blink::SafeUrlPattern expected_url_pattern = DefaultStringUrlPattern(); { auto parse_result = liburlpattern::Parse( @@ -358,7 +358,7 @@ blink::ServiceWorkerRouterRule expected_rule; blink::ServiceWorkerRouterCondition expected_condition; expected_condition.type = - blink::ServiceWorkerRouterCondition::ConditionType::kUrlPattern; + blink::ServiceWorkerRouterCondition::Type::kUrlPattern; blink::SafeUrlPattern expected_url_pattern = DefaultStringUrlPattern(); { auto parse_result = liburlpattern::Parse( @@ -398,8 +398,7 @@ blink::ServiceWorkerRouterRule expected_rule; blink::ServiceWorkerRouterCondition expected_condition; - expected_condition.type = - blink::ServiceWorkerRouterCondition::ConditionType::kRequest; + expected_condition.type = blink::ServiceWorkerRouterCondition::Type::kRequest; blink::ServiceWorkerRouterRequestCondition expected_request; expected_request.method = "FakeRequestMethod"; expected_request.mode = network::mojom::RequestMode::kNavigate; @@ -434,7 +433,7 @@ blink::ServiceWorkerRouterRule expected_rule; blink::ServiceWorkerRouterCondition expected_condition; expected_condition.type = - blink::ServiceWorkerRouterCondition::ConditionType::kRequest; + blink::ServiceWorkerRouterCondition::Type::kRequest; blink::ServiceWorkerRouterRequestCondition expected_request; expected_request.method = expected; expected_condition.request = std::move(expected_request); @@ -478,7 +477,7 @@ blink::ServiceWorkerRouterRule expected_rule; blink::ServiceWorkerRouterCondition expected_condition; expected_condition.type = - blink::ServiceWorkerRouterCondition::ConditionType::kRunningStatus; + blink::ServiceWorkerRouterCondition::Type::kRunningStatus; blink::ServiceWorkerRouterRunningStatusCondition expected_status; expected_status.status = blink_status; expected_condition.running_status = std::move(expected_status); @@ -519,7 +518,7 @@ blink::ServiceWorkerRouterRule expected_rule; blink::ServiceWorkerRouterCondition expected_condition; expected_condition.type = - blink::ServiceWorkerRouterCondition::ConditionType::kUrlPattern; + blink::ServiceWorkerRouterCondition::Type::kUrlPattern; blink::SafeUrlPattern expected_url_pattern = DefaultStringUrlPattern(); { auto parse_result = liburlpattern::Parse( @@ -560,7 +559,7 @@ blink::ServiceWorkerRouterRule expected_rule; blink::ServiceWorkerRouterCondition expected_condition; expected_condition.type = - blink::ServiceWorkerRouterCondition::ConditionType::kUrlPattern; + blink::ServiceWorkerRouterCondition::Type::kUrlPattern; blink::SafeUrlPattern expected_url_pattern = DefaultStringUrlPattern(); { auto parse_result = liburlpattern::Parse(
diff --git a/third_party/blink/renderer/platform/peerconnection/rtc_video_decoder_adapter.cc b/third_party/blink/renderer/platform/peerconnection/rtc_video_decoder_adapter.cc index c0dee11..fdc36a47 100644 --- a/third_party/blink/renderer/platform/peerconnection/rtc_video_decoder_adapter.cc +++ b/third_party/blink/renderer/platform/peerconnection/rtc_video_decoder_adapter.cc
@@ -133,7 +133,7 @@ std::make_unique<EncodedImageExternalMemory>( input_image.GetEncodedData())); DCHECK(buffer); - buffer->set_timestamp(base::Microseconds(input_image.Timestamp())); + buffer->set_timestamp(base::Microseconds(input_image.RtpTimestamp())); buffer->set_is_key_frame(input_image._frameType == webrtc::VideoFrameType::kVideoFrameKey); @@ -687,7 +687,7 @@ bool missing_frames, int64_t render_time_ms) { TRACE_EVENT1("webrtc", "RTCVideoDecoderAdapter::Decode", "timestamp", - base::Microseconds(input_image.Timestamp())); + base::Microseconds(input_image.RtpTimestamp())); DCHECK_CALLED_ON_VALID_SEQUENCE(decoding_sequence_checker_); if (!impl_) return WEBRTC_VIDEO_CODEC_UNINITIALIZED;
diff --git a/third_party/blink/renderer/platform/peerconnection/rtc_video_decoder_adapter_test.cc b/third_party/blink/renderer/platform/peerconnection/rtc_video_decoder_adapter_test.cc index 78c26d1..60ba93d6 100644 --- a/third_party/blink/renderer/platform/peerconnection/rtc_video_decoder_adapter_test.cc +++ b/third_party/blink/renderer/platform/peerconnection/rtc_video_decoder_adapter_test.cc
@@ -350,7 +350,7 @@ } else { input_image._frameType = webrtc::VideoFrameType::kVideoFrameDelta; } - input_image.SetTimestamp(timestamp); + input_image.SetRtpTimestamp(timestamp); return adapter_wrapper_->Decode(input_image, false, 0); } @@ -382,7 +382,7 @@ input_image.SetEncodedData( webrtc::EncodedImageBuffer::Create(data, sizeof(data))); input_image._frameType = webrtc::VideoFrameType::kVideoFrameKey; - input_image.SetTimestamp(timestamp); + input_image.SetRtpTimestamp(timestamp); webrtc::ColorSpace webrtc_color_space; webrtc_color_space.set_primaries_from_uint8(1); webrtc_color_space.set_transfer_from_uint8(1); @@ -400,7 +400,7 @@ input_image.SetEncodedData( webrtc::EncodedImageBuffer::Create(data, sizeof(data))); input_image._frameType = webrtc::VideoFrameType::kVideoFrameKey; - input_image.SetTimestamp(timestamp); + input_image.SetRtpTimestamp(timestamp); // Input image only has 1 spatial layer, but non-zero spatial index. input_image.SetSpatialIndex(kSpatialIndex); input_image.SetSpatialLayerFrameSize(kSpatialIndex, sizeof(data));
diff --git a/third_party/blink/renderer/platform/peerconnection/rtc_video_decoder_stream_adapter.cc b/third_party/blink/renderer/platform/peerconnection/rtc_video_decoder_stream_adapter.cc index 8a4a10e..8e54cde1 100644 --- a/third_party/blink/renderer/platform/peerconnection/rtc_video_decoder_stream_adapter.cc +++ b/third_party/blink/renderer/platform/peerconnection/rtc_video_decoder_stream_adapter.cc
@@ -556,7 +556,7 @@ spatial_layer_frame_size; } pending_buffer->buffer->set_timestamp( - base::Microseconds(input_image.Timestamp())); + base::Microseconds(input_image.RtpTimestamp())); pending_buffer->buffer->set_is_key_frame( input_image._frameType == webrtc::VideoFrameType::kVideoFrameKey);
diff --git a/third_party/blink/renderer/platform/peerconnection/rtc_video_decoder_stream_adapter_test.cc b/third_party/blink/renderer/platform/peerconnection/rtc_video_decoder_stream_adapter_test.cc index fbc1813..ae83ab3 100644 --- a/third_party/blink/renderer/platform/peerconnection/rtc_video_decoder_stream_adapter_test.cc +++ b/third_party/blink/renderer/platform/peerconnection/rtc_video_decoder_stream_adapter_test.cc
@@ -307,7 +307,7 @@ input_image._frameType = is_keyframe ? webrtc::VideoFrameType::kVideoFrameKey : webrtc::VideoFrameType::kVideoFrameDelta; - input_image.SetTimestamp(timestamp); + input_image.SetRtpTimestamp(timestamp); return adapter_->Decode(input_image, missing_frames, 0); } @@ -364,7 +364,7 @@ input_image.SetEncodedData( webrtc::EncodedImageBuffer::Create(data, sizeof(data))); input_image._frameType = webrtc::VideoFrameType::kVideoFrameKey; - input_image.SetTimestamp(timestamp); + input_image.SetRtpTimestamp(timestamp); webrtc::ColorSpace webrtc_color_space; webrtc_color_space.set_primaries_from_uint8(1); webrtc_color_space.set_transfer_from_uint8(1);
diff --git a/third_party/blink/renderer/platform/peerconnection/rtc_video_encoder.cc b/third_party/blink/renderer/platform/peerconnection/rtc_video_encoder.cc index b6831ef..2203dc3 100644 --- a/third_party/blink/renderer/platform/peerconnection/rtc_video_encoder.cc +++ b/third_party/blink/renderer/platform/peerconnection/rtc_video_encoder.cc
@@ -1165,7 +1165,7 @@ auto encoded_size = metadata.encoded_size.value_or(input_visible_size_); image._encodedWidth = encoded_size.width(); image._encodedHeight = encoded_size.height(); - image.SetTimestamp(rtp_timestamp.value()); + image.SetRtpTimestamp(rtp_timestamp.value()); image.capture_time_ms_ = capture_timestamp_ms.value(); image._frameType = (metadata.key_frame ? webrtc::VideoFrameType::kVideoFrameKey
diff --git a/third_party/blink/renderer/platform/peerconnection/rtc_video_encoder_test.cc b/third_party/blink/renderer/platform/peerconnection/rtc_video_encoder_test.cc index f5af5ac..d5f9227 100644 --- a/third_party/blink/renderer/platform/peerconnection/rtc_video_encoder_test.cc +++ b/third_party/blink/renderer/platform/peerconnection/rtc_video_encoder_test.cc
@@ -535,7 +535,7 @@ const webrtc::EncodedImage& encoded_image, const webrtc::CodecSpecificInfo* codec_specific_info) { DVLOG(3) << __func__; - EXPECT_EQ(rtp_timestamp, encoded_image.Timestamp()); + EXPECT_EQ(rtp_timestamp, encoded_image.RtpTimestamp()); EXPECT_EQ(capture_time_ms, encoded_image.capture_time_ms_); } @@ -1159,7 +1159,7 @@ } } - if (encoded_image.Timestamp() == kNumEncodeFrames - 1 && + if (encoded_image.RtpTimestamp() == kNumEncodeFrames - 1 && codec_specific_info->end_of_picture) { waiter_.Signal(); } @@ -2012,7 +2012,7 @@ const webrtc::EncodedImage& encoded_image, const webrtc::CodecSpecificInfo* codec_specific_info) override { last_encoded_image_ = encoded_image.GetEncodedData(); - if (encoded_image.Timestamp() == kNumEncodeFrames - 1 && + if (encoded_image.RtpTimestamp() == kNumEncodeFrames - 1 && codec_specific_info->end_of_picture) { waiter_.Signal(); }
diff --git a/third_party/blink/renderer/platform/peerconnection/stats_collecting_decoder_test.cc b/third_party/blink/renderer/platform/peerconnection/stats_collecting_decoder_test.cc index 35aa359..ef195aa2 100644 --- a/third_party/blink/renderer/platform/peerconnection/stats_collecting_decoder_test.cc +++ b/third_party/blink/renderer/platform/peerconnection/stats_collecting_decoder_test.cc
@@ -72,7 +72,7 @@ int64_t render_time_ms) override { webrtc::VideoFrame video_frame = CreateMockFrame(input_image._encodedWidth, input_image._encodedHeight, - input_image.Timestamp()); + input_image.RtpTimestamp()); callback_->Decoded(video_frame, absl::nullopt, absl::nullopt); return WEBRTC_VIDEO_CODEC_OK; } @@ -170,7 +170,7 @@ webrtc::EncodedImage encoded_frame; encoded_frame._encodedWidth = width; encoded_frame._encodedHeight = height; - encoded_frame.SetTimestamp( + encoded_frame.SetRtpTimestamp( 90000 * frame_counter / frame_rate); // RTP timestamp using 90 kHz clock. encoded_frame._frameType = frame_counter % key_frame_interval == 0
diff --git a/third_party/blink/renderer/platform/peerconnection/stats_collecting_encoder.cc b/third_party/blink/renderer/platform/peerconnection/stats_collecting_encoder.cc index 1c66af3..b745c04 100644 --- a/third_party/blink/renderer/platform/peerconnection/stats_collecting_encoder.cc +++ b/third_party/blink/renderer/platform/peerconnection/stats_collecting_encoder.cc
@@ -198,7 +198,7 @@ base::AutoLock auto_lock(lock_); while (encode_start_info_.size() > 0 && encode_start_info_.front().rtp_timestamp != - encoded_image.Timestamp()) { + encoded_image.RtpTimestamp()) { encode_start_info_.pop_front(); } if (!encode_start_info_.empty())
diff --git a/third_party/blink/renderer/platform/peerconnection/stats_collecting_encoder_test.cc b/third_party/blink/renderer/platform/peerconnection/stats_collecting_encoder_test.cc index d6e5a4b..03729b3a 100644 --- a/third_party/blink/renderer/platform/peerconnection/stats_collecting_encoder_test.cc +++ b/third_party/blink/renderer/platform/peerconnection/stats_collecting_encoder_test.cc
@@ -81,7 +81,7 @@ const webrtc::VideoFrame& frame, const std::vector<webrtc::VideoFrameType>* frame_types) override { webrtc::EncodedImage encoded_frame; - encoded_frame.SetTimestamp(frame.timestamp()); + encoded_frame.SetRtpTimestamp(frame.timestamp()); encoded_frame._frameType = frame_types && !frame_types->empty() ? frame_types->at(0) : webrtc::VideoFrameType::kVideoFrameDelta; @@ -133,7 +133,7 @@ const webrtc::EncodedImage& encoded_image, const webrtc::CodecSpecificInfo* codec_specific_info) override { ++frame_counter_; - return {Result::OK, encoded_image.Timestamp()}; + return {Result::OK, encoded_image.RtpTimestamp()}; } void OnDroppedFrame(DropReason reason) override { ; } int get_frame_counter() const { return frame_counter_; }
diff --git a/third_party/blink/web_tests/external/wpt/css/css-properties-values-api/var-reference-registered-properties-expected.txt b/third_party/blink/web_tests/external/wpt/css/css-properties-values-api/var-reference-registered-properties-expected.txt index 750ffbb..b9de207 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-properties-values-api/var-reference-registered-properties-expected.txt +++ b/third_party/blink/web_tests/external/wpt/css/css-properties-values-api/var-reference-registered-properties-expected.txt
@@ -20,5 +20,6 @@ PASS Invalid fallback is not used [<length>, red] PASS Invalid fallback is not used [<length> | none, nolength] PASS Invalid fallback is not used [<color>, var(--length-1)] +PASS Empty universal custom property can be substituted with var() Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/external/wpt/css/css-properties-values-api/var-reference-registered-properties.html b/third_party/blink/web_tests/external/wpt/css/css-properties-values-api/var-reference-registered-properties.html index ea1b7b3..4fb1a86 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-properties-values-api/var-reference-registered-properties.html +++ b/third_party/blink/web_tests/external/wpt/css/css-properties-values-api/var-reference-registered-properties.html
@@ -221,4 +221,21 @@ test_using_invalid_fallback('<length> | none', 'nolength'); test_using_invalid_fallback('<color>', 'var(--length-1)'); +test(function(t){ + CSS.registerProperty({ + name: '--registered-universal-no-initial', + syntax: '*', + inherits: false + }); + t.add_cleanup(() => { + element.style = ''; + }); + element.style = [ + '--registered-universal-no-initial:;', + 'background-color: var(--registered-universal-no-initial) green', + ].join(';'); + let computedStyle = getComputedStyle(element); + assert_equals(computedStyle.getPropertyValue('background-color'), 'rgb(0, 128, 0)'); +}, 'Empty universal custom property can be substituted with var()'); + </script>
diff --git a/third_party/blink/web_tests/http/tests/devtools/animation/animation-KeyframeEffect-crash.js b/third_party/blink/web_tests/http/tests/devtools/animation/animation-KeyframeEffect-crash.js index 405363a..8b70395c 100644 --- a/third_party/blink/web_tests/http/tests/devtools/animation/animation-KeyframeEffect-crash.js +++ b/third_party/blink/web_tests/http/tests/devtools/animation/animation-KeyframeEffect-crash.js
@@ -8,7 +8,6 @@ (async function() { TestRunner.addResult( `Tests that animations can be created with KeyframeEffect without crashing.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div id="node" style="background-color: red; height: 100px"></div>
diff --git a/third_party/blink/web_tests/http/tests/devtools/animation/animation-after-navigation.js b/third_party/blink/web_tests/http/tests/devtools/animation/animation-after-navigation.js index ed3bf73..ce83adf 100644 --- a/third_party/blink/web_tests/http/tests/devtools/animation/animation-after-navigation.js +++ b/third_party/blink/web_tests/http/tests/devtools/animation/animation-after-navigation.js
@@ -11,7 +11,6 @@ // This loads the animations view on the existing page, which is // somewhere below http://127.0.0.1:8000/. By loading the animations view, // we'll start the InspectorAnimationAgent. - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await UI.viewManager.showView('animations');
diff --git a/third_party/blink/web_tests/http/tests/devtools/animation/animation-empty-web-animations.js b/third_party/blink/web_tests/http/tests/devtools/animation/animation-empty-web-animations.js index 5eab034..538ca509 100644 --- a/third_party/blink/web_tests/http/tests/devtools/animation/animation-empty-web-animations.js +++ b/third_party/blink/web_tests/http/tests/devtools/animation/animation-empty-web-animations.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests the empty web animations do not show up in animation timeline.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div id="node" style="background-color: red; height: 100px"></div>
diff --git a/third_party/blink/web_tests/http/tests/devtools/animation/animation-group-matching-animations.js b/third_party/blink/web_tests/http/tests/devtools/animation/animation-group-matching-animations.js index 5611047..f631d01 100644 --- a/third_party/blink/web_tests/http/tests/devtools/animation/animation-group-matching-animations.js +++ b/third_party/blink/web_tests/http/tests/devtools/animation/animation-group-matching-animations.js
@@ -8,7 +8,6 @@ (async function() { TestRunner.addResult( `Tests the matching performed in AnimationModel of groups composed of animations, which are applied through a variety of selectors.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.loadLegacyModule('animation'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(`
diff --git a/third_party/blink/web_tests/http/tests/devtools/animation/animation-group-matching-transitions.js b/third_party/blink/web_tests/http/tests/devtools/animation/animation-group-matching-transitions.js index db39184d..d2af4a8 100644 --- a/third_party/blink/web_tests/http/tests/devtools/animation/animation-group-matching-transitions.js +++ b/third_party/blink/web_tests/http/tests/devtools/animation/animation-group-matching-transitions.js
@@ -8,7 +8,6 @@ (async function() { TestRunner.addResult( `Tests the matching performed in AnimationModel of groups composed of transitions, which are applied through a variety of selectors.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.loadLegacyModule('animation'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(`
diff --git a/third_party/blink/web_tests/http/tests/devtools/animation/animation-group-matching.js b/third_party/blink/web_tests/http/tests/devtools/animation/animation-group-matching.js index 5b389e86..b0832a5 100644 --- a/third_party/blink/web_tests/http/tests/devtools/animation/animation-group-matching.js +++ b/third_party/blink/web_tests/http/tests/devtools/animation/animation-group-matching.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests the matching of groups in AnimationModel.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.loadLegacyModule('animation'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(`
diff --git a/third_party/blink/web_tests/http/tests/devtools/animation/animation-timeline.js b/third_party/blink/web_tests/http/tests/devtools/animation/animation-timeline.js index b11b55c..ddc8b9c 100644 --- a/third_party/blink/web_tests/http/tests/devtools/animation/animation-timeline.js +++ b/third_party/blink/web_tests/http/tests/devtools/animation/animation-timeline.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests the display of animations on the animation timeline.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/animation/animation-transition-setTiming-crash.js b/third_party/blink/web_tests/http/tests/devtools/animation/animation-transition-setTiming-crash.js index 079e6a09..3f09f43 100644 --- a/third_party/blink/web_tests/http/tests/devtools/animation/animation-transition-setTiming-crash.js +++ b/third_party/blink/web_tests/http/tests/devtools/animation/animation-transition-setTiming-crash.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`This test passes if it does not crash.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/animation/animation-web-anim-negative-start-time.js b/third_party/blink/web_tests/http/tests/devtools/animation/animation-web-anim-negative-start-time.js index 4f22c3f..2187daa 100644 --- a/third_party/blink/web_tests/http/tests/devtools/animation/animation-web-anim-negative-start-time.js +++ b/third_party/blink/web_tests/http/tests/devtools/animation/animation-web-anim-negative-start-time.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that animation with negative start delay gets added.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div id="node" style="background-color: red; height: 100px"></div>
diff --git a/third_party/blink/web_tests/http/tests/devtools/change-iframe-src.js b/third_party/blink/web_tests/http/tests/devtools/change-iframe-src.js index 88e8c7bc..4d1655c 100644 --- a/third_party/blink/web_tests/http/tests/devtools/change-iframe-src.js +++ b/third_party/blink/web_tests/http/tests/devtools/change-iframe-src.js
@@ -9,7 +9,6 @@ (async function() { TestRunner.addResult( `Tests that Elements panel allows to change src attribute on iframes inside inspected page. See bug 41350.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.loadLegacyModule('console'); var messagePromise = new Promise(x => ConsoleTestRunner.addConsoleSniffer(x));
diff --git a/third_party/blink/web_tests/http/tests/devtools/console/command-line-api.js b/third_party/blink/web_tests/http/tests/devtools/console/command-line-api.js index cf2e860..515980d8 100644 --- a/third_party/blink/web_tests/http/tests/devtools/console/command-line-api.js +++ b/third_party/blink/web_tests/http/tests/devtools/console/command-line-api.js
@@ -12,7 +12,6 @@ TestRunner.addResult('Tests that command line api works.\n'); await TestRunner.loadLegacyModule('console'); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('console'); await TestRunner.loadHTML(` <p id='foo'>
diff --git a/third_party/blink/web_tests/http/tests/devtools/console/console-dirxml.js b/third_party/blink/web_tests/http/tests/devtools/console/console-dirxml.js index b140e68..dcfa511 100644 --- a/third_party/blink/web_tests/http/tests/devtools/console/console-dirxml.js +++ b/third_party/blink/web_tests/http/tests/devtools/console/console-dirxml.js
@@ -26,9 +26,7 @@ `); await TestRunner.showPanel('elements'); - TestRunner.loadLegacyModule('elements').then(function() { - TestRunner.evaluateInPage('logToConsole()', onLoggedToConsole); - }); + TestRunner.evaluateInPage('logToConsole()', onLoggedToConsole); function onLoggedToConsole() { ConsoleTestRunner.waitForRemoteObjectsConsoleMessages(onRemoteObjectsLoaded);
diff --git a/third_party/blink/web_tests/http/tests/devtools/console/console-xml-document.js b/third_party/blink/web_tests/http/tests/devtools/console/console-xml-document.js index d9d0d97..4690708 100644 --- a/third_party/blink/web_tests/http/tests/devtools/console/console-xml-document.js +++ b/third_party/blink/web_tests/http/tests/devtools/console/console-xml-document.js
@@ -18,9 +18,7 @@ await TestRunner.showPanel('elements'); // Warm up elements renderer. - TestRunner.loadLegacyModule('elements').then(function() { - ConsoleTestRunner.expandConsoleMessages(callback); - }); + ConsoleTestRunner.expandConsoleMessages(callback); async function callback() { await ConsoleTestRunner.dumpConsoleMessages();
diff --git a/third_party/blink/web_tests/http/tests/devtools/console/shadow-element.js b/third_party/blink/web_tests/http/tests/devtools/console/shadow-element.js index 377ad2d8..32d9eadc 100644 --- a/third_party/blink/web_tests/http/tests/devtools/console/shadow-element.js +++ b/third_party/blink/web_tests/http/tests/devtools/console/shadow-element.js
@@ -11,7 +11,6 @@ (async function() { TestRunner.addResult(`Tests that $0 works with shadow dom.\n`); await TestRunner.loadLegacyModule('console'); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('console'); await TestRunner.loadHTML(` <div><div><div id="host"></div></div></div>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/accessibility/autocomplete-attribute.js b/third_party/blink/web_tests/http/tests/devtools/elements/accessibility/autocomplete-attribute.js index aae63426..28ada76 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/accessibility/autocomplete-attribute.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/accessibility/autocomplete-attribute.js
@@ -8,7 +8,6 @@ (async function() { TestRunner.addResult(`Tests that autocompletions are computed correctly when editing the ARIA pane.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <span id="inspected" aria-checked="true" role="checkbox"></span>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/accessibility/edit-aria-attributes.js b/third_party/blink/web_tests/http/tests/devtools/elements/accessibility/edit-aria-attributes.js index 7eaaec0..cc4b12c 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/accessibility/edit-aria-attributes.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/accessibility/edit-aria-attributes.js
@@ -8,7 +8,6 @@ (async function() { TestRunner.addResult(`Tests that writing an ARIA attribute causes the accessibility node to be updated.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.loadLegacyModule('panels/accessibility'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(`
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/attribute-modified-ns.js b/third_party/blink/web_tests/http/tests/devtools/elements/attribute-modified-ns.js index 02182ce..d5dd465 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/attribute-modified-ns.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/attribute-modified-ns.js
@@ -8,7 +8,6 @@ (async function() { TestRunner.addResult( `Tests that elements panel updates dom tree structure upon changing the attribute with namespace.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <svg>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/bidi-dom-tree.js b/third_party/blink/web_tests/http/tests/devtools/elements/bidi-dom-tree.js index c7d3742..ea6ad7545 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/bidi-dom-tree.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/bidi-dom-tree.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that elements panel correctly displays DOM tree structure for bi-di pages.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <!DOCTYPE html>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/classes-pane-widget.js b/third_party/blink/web_tests/http/tests/devtools/elements/classes-pane-widget.js index 8adf73d..335053d 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/classes-pane-widget.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/classes-pane-widget.js
@@ -10,7 +10,6 @@ (async function() { TestRunner.addResult(`Tests that classes pane widget shows correct suggestions.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(`
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/copy-styles.js b/third_party/blink/web_tests/http/tests/devtools/elements/copy-styles.js index 1f19ce9..c3528c7 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/copy-styles.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/copy-styles.js
@@ -9,7 +9,6 @@ (async function() { TestRunner.addResult(`Tests node xPath construction\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(`
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/css-rule-hover-highlights-selectors.js b/third_party/blink/web_tests/http/tests/devtools/elements/css-rule-hover-highlights-selectors.js index 721e551..19162966 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/css-rule-hover-highlights-selectors.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/css-rule-hover-highlights-selectors.js
@@ -6,7 +6,6 @@ import {ElementsTestRunner} from 'elements_test_runner'; (async function() { - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/css-variables/defined-css-variables.js b/third_party/blink/web_tests/http/tests/devtools/elements/css-variables/defined-css-variables.js index ce04fce..f800bd6 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/css-variables/defined-css-variables.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/css-variables/defined-css-variables.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Verify that CSS variables are defined correctly wrt DOM inheritance`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/css-variables/resolve-css-variables.js b/third_party/blink/web_tests/http/tests/devtools/elements/css-variables/resolve-css-variables.js index 48a592b7..7263241 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/css-variables/resolve-css-variables.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/css-variables/resolve-css-variables.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Verify that CSS variables are resolved inside cascade`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/css-variables/resolve-inherited-css-variables.js b/third_party/blink/web_tests/http/tests/devtools/elements/css-variables/resolve-inherited-css-variables.js index c0f079e4..f8d87752 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/css-variables/resolve-inherited-css-variables.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/css-variables/resolve-inherited-css-variables.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Verify that CSS variables are resolved properly for DOM inheritance`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/distance/node-distances.js b/third_party/blink/web_tests/http/tests/devtools/elements/distance/node-distances.js index 9d17b9f..7ad2fa6 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/distance/node-distances.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/distance/node-distances.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that distance data produced for overlays are correct.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/dom-agent-query-selector.js b/third_party/blink/web_tests/http/tests/devtools/elements/dom-agent-query-selector.js index 3a37dc1..781e401 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/dom-agent-query-selector.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/dom-agent-query-selector.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests DOMAgent.querySelector and DOMAgent.querySelectorAll.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div id="id1" class="foo"></div>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/edit/delete-from-document.js b/third_party/blink/web_tests/http/tests/devtools/elements/edit/delete-from-document.js index e63412ca..b688277 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/edit/delete-from-document.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/edit/delete-from-document.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that removing child from the document is handled properly in the elements panel.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/edit/edit-after-model-changed.js b/third_party/blink/web_tests/http/tests/devtools/elements/edit/edit-after-model-changed.js index 0feb110..504e4e8 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/edit/edit-after-model-changed.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/edit/edit-after-model-changed.js
@@ -9,7 +9,6 @@ (async function() { TestRunner.addResult(`Tests that SSP maintains focus if changes occur while editing\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div id="inspected">Inspected Node</div>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/edit/edit-style-attribute.js b/third_party/blink/web_tests/http/tests/devtools/elements/edit/edit-style-attribute.js index c54c580..2c448a1 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/edit/edit-style-attribute.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/edit/edit-style-attribute.js
@@ -8,7 +8,6 @@ (async function() { TestRunner.addResult( `Tests that style modification generates attribute updated event only when attribute is actually changed.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div id="container">
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/edit/edit-trimmed-attribute-value.js b/third_party/blink/web_tests/http/tests/devtools/elements/edit/edit-trimmed-attribute-value.js index af9afed6..106cdba5 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/edit/edit-trimmed-attribute-value.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/edit/edit-trimmed-attribute-value.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that user can mutate DOM by means of elements panel.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/edit/insert-node-collapsed.js b/third_party/blink/web_tests/http/tests/devtools/elements/edit/insert-node-collapsed.js index 6c7cbfd..f18e0fa 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/edit/insert-node-collapsed.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/edit/insert-node-collapsed.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that elements panel updates hasChildren flag upon adding children to collapsed nodes.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/edit/perform-undo-undo.js b/third_party/blink/web_tests/http/tests/devtools/elements/edit/perform-undo-undo.js index 80cdee4..46682f1 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/edit/perform-undo-undo.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/edit/perform-undo-undo.js
@@ -9,7 +9,6 @@ (async function() { TestRunner.addResult(`Tests that client can call undo multiple times with non-empty history.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div style="display:none" id="container">
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/edit/remove-node.js b/third_party/blink/web_tests/http/tests/devtools/elements/edit/remove-node.js index 779e7dae..1629229b 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/edit/remove-node.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/edit/remove-node.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that elements panel updates dom tree structure upon node removal.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div id="container"><div id="child1">Text</div><div id="child2"></div><div id="child3"></div><div id="child4"></div></div>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/edit/set-attribute-non-html.js b/third_party/blink/web_tests/http/tests/devtools/elements/edit/set-attribute-non-html.js index 4da4231e..abb01040 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/edit/set-attribute-non-html.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/edit/set-attribute-non-html.js
@@ -8,7 +8,6 @@ (async function() { TestRunner.addResult( `Tests that elements panel updates dom tree structure upon setting attribute on non HTML elements. PASSes if there is no crash.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.navigatePromise('resources/set-attribute-non-html.svg');
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/edit/set-attribute.js b/third_party/blink/web_tests/http/tests/devtools/elements/edit/set-attribute.js index 4c75620..24ab5f58 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/edit/set-attribute.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/edit/set-attribute.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that elements panel updates dom tree structure upon setting attribute.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div id="node"></div>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/edit/set-outer-html-2.js b/third_party/blink/web_tests/http/tests/devtools/elements/edit/set-outer-html-2.js index a7ae81c..257171d 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/edit/set-outer-html-2.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/edit/set-outer-html-2.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests DOMAgent.setOuterHTML protocol method (part 2).\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div id="container" style="display:none">
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/edit/set-outer-html-body.js b/third_party/blink/web_tests/http/tests/devtools/elements/edit/set-outer-html-body.js index 7d2c217..577aae2 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/edit/set-outer-html-body.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/edit/set-outer-html-body.js
@@ -8,7 +8,6 @@ (async function() { TestRunner.addResult( `Tests DOMAgent.setOuterHTML invoked on body tag. See https://bugs.webkit.org/show_bug.cgi?id=62272. \n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <iframe src="../resources/set-outer-html-body-iframe.html" onload="runTest()"></iframe>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/edit/set-outer-html-for-xhtml.js b/third_party/blink/web_tests/http/tests/devtools/elements/edit/set-outer-html-for-xhtml.js index b82d4cf..06aac200 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/edit/set-outer-html-for-xhtml.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/edit/set-outer-html-for-xhtml.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests DOMAgent.setOuterHTML protocol method against an XHTML document.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.navigatePromise('resources/set-outer-html-for-xhtml.xhtml');
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/edit/set-outer-html-whitespace.js b/third_party/blink/web_tests/http/tests/devtools/elements/edit/set-outer-html-whitespace.js index a830fbf..beddd05 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/edit/set-outer-html-whitespace.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/edit/set-outer-html-whitespace.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that DOMAgent.setOuterHTML can handle whitespace-only text nodes.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div id="container" style="display:none">
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/edit/set-outer-html.js b/third_party/blink/web_tests/http/tests/devtools/elements/edit/set-outer-html.js index 18978bf..e79a2380 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/edit/set-outer-html.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/edit/set-outer-html.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests DOMAgent.setOuterHTML protocol method.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div id="container" style="display:none">
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/edit/undo-dom-edits-2.js b/third_party/blink/web_tests/http/tests/devtools/elements/edit/undo-dom-edits-2.js index 3fcaaff2..f70c6fd 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/edit/undo-dom-edits-2.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/edit/undo-dom-edits-2.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that DOM modifications done in the Elements panel are undoable (Part 2).\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div style="display:none">
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/edit/undo-dom-edits.js b/third_party/blink/web_tests/http/tests/devtools/elements/edit/undo-dom-edits.js index 0b0db3d..7ac5eb8 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/edit/undo-dom-edits.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/edit/undo-dom-edits.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that DOM modifications done in the Elements panel are undoable.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div style="display:none">
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/edit/undo-set-outer-html-2.js b/third_party/blink/web_tests/http/tests/devtools/elements/edit/undo-set-outer-html-2.js index 7ea74b5..cbfa0dd 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/edit/undo-set-outer-html-2.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/edit/undo-set-outer-html-2.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests undo for the DOMAgent.setOuterHTML protocol method (part 2).\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div id="container" style="display:none">
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/edit/undo-set-outer-html.js b/third_party/blink/web_tests/http/tests/devtools/elements/edit/undo-set-outer-html.js index 0504d24..a9992a6 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/edit/undo-set-outer-html.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/edit/undo-set-outer-html.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests undo for the DOMAgent.setOuterHTML protocol method.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div id="container" style="display:none">
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/elements-child-node-count-mismatch.js b/third_party/blink/web_tests/http/tests/devtools/elements/elements-child-node-count-mismatch.js index 4b80c43..5e82215 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/elements-child-node-count-mismatch.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/elements-child-node-count-mismatch.js
@@ -8,7 +8,6 @@ (async function() { 'use strict'; TestRunner.addResult(`Tests that Elements properly populate and select after immediate updates crbug.com/829884\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <!DOCTYPE HTML">
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/elements-css-path.js b/third_party/blink/web_tests/http/tests/devtools/elements/elements-css-path.js index b72b0f01..dab25ce7 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/elements-css-path.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/elements-css-path.js
@@ -9,7 +9,6 @@ (async function() { TestRunner.addResult(`Tests DOMNode.cssPath()\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <!DOCTYPE html>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/elements-delete-inline-style.js b/third_party/blink/web_tests/http/tests/devtools/elements/elements-delete-inline-style.js index 8488978d..1ebede1 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/elements-delete-inline-style.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/elements-delete-inline-style.js
@@ -8,7 +8,6 @@ (async function() { TestRunner.addResult( `Tests that the "style" attribute removal results in the Styles sidebar pane update (not a crash). Bug 51478\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div id="inspected" style="color: red"></div>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/elements-hide-html-comments.js b/third_party/blink/web_tests/http/tests/devtools/elements/elements-hide-html-comments.js index 10cf409..1deaffe5 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/elements-hide-html-comments.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/elements-hide-html-comments.js
@@ -9,7 +9,6 @@ (async function() { TestRunner.addResult(`Verifies show/hide HTML comments setting.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); // Add the full html so that comments can be inserted between head and body await TestRunner.loadHTML(`
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/elements-iframe-base-url.js b/third_party/blink/web_tests/http/tests/devtools/elements/elements-iframe-base-url.js index f064296..94ca6005 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/elements-iframe-base-url.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/elements-iframe-base-url.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that nodes have correct baseURL, documentURL.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/elements-img-tooltip.js b/third_party/blink/web_tests/http/tests/devtools/elements/elements-img-tooltip.js index 8cb6bc7..afc6a16 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/elements-img-tooltip.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/elements-img-tooltip.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests the tooltip for the image on hover.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.loadLegacyModule('components'); await TestRunner.showPanel('elements'); const imgURL = `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANcAAACuCAIAAAAqMg/rAAAAAXNSR0IArs4c6QAAAU9JREFUeNrt0jERAAAIxDDAv+dHAxNLIqHXTlLwaiTAheBCXAguxIXgQlwILsSF4EJcCC7EheBCXAguxIXgQlwILsSF4EJcCC7EheBCXAguxIXgQlwILsSF4EJcCC7EheBCXAguxIXgQlwILsSF4EJcCC7EheBCXAguxIXgQlwILsSF4EJcCC7EheBCXAguxIXgQlwILsSF4EJcCC7EheBCXAguxIXgQlwILsSF4EJcCC7EheBCXAguxIXgQlwILsSF4EJcCC7EheBCXAguxIXgQlwILsSF4EJcCC7EheBCXAguxIXgQlwILsSF4EJcCC7EheBCXAguxIXgQlwILsSFEuBCcCEuBBfiQnAhLgQX4kJwIS4EF+JCcCEuBBfiQnAhLgQX4kJwIS4EF+JCcCEuBBfiQnAhLgQX4kJwIS4EF+JCcCEuBBfiQnAhLoSDBZXqBFnkRyeqAAAAAElFTkSuQmCC`;
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/elements-inspect-iframe-from-different-domain.js b/third_party/blink/web_tests/http/tests/devtools/elements/elements-inspect-iframe-from-different-domain.js index 085bf723..da486e1 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/elements-inspect-iframe-from-different-domain.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/elements-inspect-iframe-from-different-domain.js
@@ -10,7 +10,6 @@ TestRunner.addResult( `Test that web inspector can select element in an iframe even if the element was created via createElement of document other than iframe's document. Bug 60031\n`); await TestRunner.loadLegacyModule('console'); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <iframe style="width:400px"></iframe>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/elements-js-path.js b/third_party/blink/web_tests/http/tests/devtools/elements/elements-js-path.js index ad42d8c7..614f5d6b 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/elements-js-path.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/elements-js-path.js
@@ -9,7 +9,6 @@ (async function() { TestRunner.addResult(`Tests DOMNode.jsPath()\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <!DOCTYPE html>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/elements-linkify-attributes.js b/third_party/blink/web_tests/http/tests/devtools/elements/elements-linkify-attributes.js index ce1d4bd..e1a31053 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/elements-linkify-attributes.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/elements-linkify-attributes.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that you can click and hover on links in attributes.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <img id="linkify-1" srcset="./1x/googlelogo_color_272x92dp.png 1x, ./2x/googlelogo_color_272x92dp.png 2x">
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/elements-panel-correct-case.js b/third_party/blink/web_tests/http/tests/devtools/elements/elements-panel-correct-case.js index 783f356..4ae420ad 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/elements-panel-correct-case.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/elements-panel-correct-case.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that elements panel shows all types of elements in the correct case.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <!DOCTYPE html>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/elements-panel-limited-children.js b/third_party/blink/web_tests/http/tests/devtools/elements/elements-panel-limited-children.js index e804fc6f..8023748b 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/elements-panel-limited-children.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/elements-panel-limited-children.js
@@ -9,7 +9,6 @@ (async function() { TestRunner.addResult(`Tests that src and href element targets are rewritten properly.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div id="data">
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/elements-panel-reload-assert.js b/third_party/blink/web_tests/http/tests/devtools/elements/elements-panel-reload-assert.js index 89c4e93e..2ad4bf9 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/elements-panel-reload-assert.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/elements-panel-reload-assert.js
@@ -8,7 +8,6 @@ (async function() { TestRunner.addResult( `Tests that the inspected page does not crash in a debug build when reloading a page containing shadow DOM with open inspector. Bug 84154. https://bugs.webkit.org/show_bug.cgi?id=84154\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/elements-panel-restore-selection-when-node-comes-later.js b/third_party/blink/web_tests/http/tests/devtools/elements/elements-panel-restore-selection-when-node-comes-later.js index 3e009ea..40080c6 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/elements-panel-restore-selection-when-node-comes-later.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/elements-panel-restore-selection-when-node-comes-later.js
@@ -11,7 +11,6 @@ (async function() { TestRunner.addResult( `Verify that last selected element is restored properly later, even if it failed to do so once.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.navigatePromise('./resources/elements-panel-restore-selection-when-node-comes-later.html');
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/elements-panel-selection-after-delete.js b/third_party/blink/web_tests/http/tests/devtools/elements/elements-panel-selection-after-delete.js index d0067b6a..d0539fae 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/elements-panel-selection-after-delete.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/elements-panel-selection-after-delete.js
@@ -9,7 +9,6 @@ (async function() { TestRunner.addResult(`Tests that elements panel correctly updates selection on node removal.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <head>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/elements-panel-selection-on-refresh.js b/third_party/blink/web_tests/http/tests/devtools/elements/elements-panel-selection-on-refresh.js index 6e3cee41..908c329eb 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/elements-panel-selection-on-refresh.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/elements-panel-selection-on-refresh.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that elements panel preserves selected node on page refresh.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.navigatePromise('resources/elements-panel-selection-on-refresh.html');
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/elements-panel-structure.js b/third_party/blink/web_tests/http/tests/devtools/elements/elements-panel-structure.js index a9c2d1a..149a5185 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/elements-panel-structure.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/elements-panel-structure.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that elements panel shows DOM tree structure.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <!DOCTYPE html>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/elements-save-to-temp-var.js b/third_party/blink/web_tests/http/tests/devtools/elements/elements-save-to-temp-var.js index 7b31ee5a..8dad5c6 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/elements-save-to-temp-var.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/elements-save-to-temp-var.js
@@ -9,7 +9,6 @@ (async function() { TestRunner.addResult(`Tests saving nodes to temporary variables.\n`); await TestRunner.loadLegacyModule('console'); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(`<div id="node"></div>`);
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/elements-tab-stops.js b/third_party/blink/web_tests/http/tests/devtools/elements/elements-tab-stops.js index 14b9185..19d66ce13 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/elements-tab-stops.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/elements-tab-stops.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests what elements have focus after pressing tab.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <span id="node-to-select"></span>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/elements-treeoutline-copy.js b/third_party/blink/web_tests/http/tests/devtools/elements/elements-treeoutline-copy.js index 04a0362..4a0762a9 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/elements-treeoutline-copy.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/elements-treeoutline-copy.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that nodes can be copied in ElementsTreeOutline.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <span id="node-to-copy">This should be <b>copied</b>.</span>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/event-listener-sidebar-custom-framework-expected.txt b/third_party/blink/web_tests/http/tests/devtools/elements/event-listener-sidebar-custom-framework-expected.txt index c52db350..6c71324 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/event-listener-sidebar-custom-framework-expected.txt +++ b/third_party/blink/web_tests/http/tests/devtools/elements/event-listener-sidebar-custom-framework-expected.txt
@@ -4,7 +4,7 @@ ======== click ======== == Framework -[expanded] button#inspectedNodeRemoveevent-listener-sidebar-custom-framework.js:36 +[expanded] button#inspectedNodeRemoveevent-listener-sidebar-custom-framework.js:35 useCapture: false passive: false once: false @@ -19,7 +19,7 @@ ======== customFirst ======== == FrameworkUser -[expanded] button#inspectedNodeevent-listener-sidebar-custom-framework.js:26 +[expanded] button#inspectedNodeevent-listener-sidebar-custom-framework.js:25 useCapture: true passive: false once: false @@ -30,7 +30,7 @@ ======== customSecond ======== == FrameworkUser -[expanded] button#inspectedNodeevent-listener-sidebar-custom-framework.js:31 +[expanded] button#inspectedNodeevent-listener-sidebar-custom-framework.js:30 useCapture: false passive: false once: false @@ -42,7 +42,7 @@ ======== click ======== == Raw -[expanded] button#inspectedNodeRemoveevent-listener-sidebar-custom-framework.js:36 +[expanded] button#inspectedNodeRemoveevent-listener-sidebar-custom-framework.js:35 useCapture: false passive: false once: false
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/event-listener-sidebar-custom-framework.js b/third_party/blink/web_tests/http/tests/devtools/elements/event-listener-sidebar-custom-framework.js index 58a0476..dc3008aac 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/event-listener-sidebar-custom-framework.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/event-listener-sidebar-custom-framework.js
@@ -10,7 +10,6 @@ (async function() { TestRunner.addResult(`Tests framework event listeners output in the Elements sidebar panel.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.loadLegacyModule('console'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(`
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/event-listener-sidebar-expected.txt b/third_party/blink/web_tests/http/tests/devtools/elements/event-listener-sidebar-expected.txt index 17a3e144..0d794c9 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/event-listener-sidebar-expected.txt +++ b/third_party/blink/web_tests/http/tests/devtools/elements/event-listener-sidebar-expected.txt
@@ -3,43 +3,43 @@ ======== click ======== == Raw -[expanded] documentRemoveevent-listener-sidebar.js:20 +[expanded] documentRemoveevent-listener-sidebar.js:19 useCapture: false passive: false once: false handler: function documentClickHandler(event) { console.log("click - document - attribute"); } == Raw -[expanded] documentRemoveevent-listener-sidebar.js:45 +[expanded] documentRemoveevent-listener-sidebar.js:44 useCapture: true passive: false once: false handler: function() { console.log("click - document - handleEvent"); } == Raw -[expanded] documentRemoveevent-listener-sidebar.js:33 +[expanded] documentRemoveevent-listener-sidebar.js:32 useCapture: true passive: false once: false handler: function(event) { console.log("click - document - capturing"); } == Raw -[expanded] button#nodeRemoveevent-listener-sidebar.js:31 +[expanded] button#nodeRemoveevent-listener-sidebar.js:30 useCapture: false passive: false once: false handler: function(event) { console.log("click - button - bubbling (registered after attribute)"); } == Raw -[expanded] button#nodeRemoveevent-listener-sidebar.js:30 +[expanded] button#nodeRemoveevent-listener-sidebar.js:29 useCapture: false passive: false once: false handler: function(event) { console.log("click - button - attribute"); } == Raw -[expanded] button#nodeRemoveevent-listener-sidebar.js:26 +[expanded] button#nodeRemoveevent-listener-sidebar.js:25 useCapture: false passive: false once: false handler: function clickHandler(event) { console.log("click - button - bubbling (registered before attribute)"); } == Raw -[expanded] button#nodeRemoveevent-listener-sidebar.js:29 +[expanded] button#nodeRemoveevent-listener-sidebar.js:28 useCapture: true passive: false once: false @@ -47,7 +47,7 @@ ======== custom event ======== == Raw -[expanded] bodyRemoveevent-listener-sidebar.js:24 +[expanded] bodyRemoveevent-listener-sidebar.js:23 useCapture: true passive: false once: true @@ -55,7 +55,7 @@ ======== hover ======== == Raw -[expanded] button#nodeRemoveevent-listener-sidebar.js:28 +[expanded] button#nodeRemoveevent-listener-sidebar.js:27 useCapture: false passive: false once: false @@ -63,7 +63,7 @@ ======== wheel ======== == Raw -[expanded] bodyRemoveToggle Passiveevent-listener-sidebar.js:24 +[expanded] bodyRemoveToggle Passiveevent-listener-sidebar.js:23 useCapture: false passive: true once: false
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/event-listener-sidebar-jquery1-expected.txt b/third_party/blink/web_tests/http/tests/devtools/elements/event-listener-sidebar-jquery1-expected.txt index bc51f47..524aba48 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/event-listener-sidebar-jquery1-expected.txt +++ b/third_party/blink/web_tests/http/tests/devtools/elements/event-listener-sidebar-jquery1-expected.txt
@@ -3,19 +3,19 @@ ======== click ======== == FrameworkUser -[expanded] button#nodeRemoveevent-listener-sidebar-jquery1.js:23 +[expanded] button#nodeRemoveevent-listener-sidebar-jquery1.js:22 useCapture: true passive: false once: false handler: function(){ console.log("second jquery"); } == FrameworkUser -[expanded] button#nodeRemoveevent-listener-sidebar-jquery1.js:22 +[expanded] button#nodeRemoveevent-listener-sidebar-jquery1.js:21 useCapture: true passive: false once: false handler: function(){ console.log("first jquery"); } == Raw -[expanded] button#nodeRemoveevent-listener-sidebar-jquery1.js:24 +[expanded] button#nodeRemoveevent-listener-sidebar-jquery1.js:23 useCapture: false passive: false once: false
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/event-listener-sidebar-jquery1.js b/third_party/blink/web_tests/http/tests/devtools/elements/event-listener-sidebar-jquery1.js index 001bb13..8b665a7 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/event-listener-sidebar-jquery1.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/event-listener-sidebar-jquery1.js
@@ -9,7 +9,6 @@ (async function() { TestRunner.addResult(`Tests event listeners output in the Elements sidebar panel.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <button id="node">Inspect Me</button>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/event-listener-sidebar-jquery2-expected.txt b/third_party/blink/web_tests/http/tests/devtools/elements/event-listener-sidebar-jquery2-expected.txt index 1a72963..d9e4cd4 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/event-listener-sidebar-jquery2-expected.txt +++ b/third_party/blink/web_tests/http/tests/devtools/elements/event-listener-sidebar-jquery2-expected.txt
@@ -3,25 +3,25 @@ ======== click ======== == FrameworkUser -[expanded] button#nodeRemoveevent-listener-sidebar-jquery2.js:23 +[expanded] button#nodeRemoveevent-listener-sidebar-jquery2.js:22 useCapture: true passive: false once: false handler: function(){ console.log("second jquery"); } == FrameworkUser -[expanded] button#nodeRemoveevent-listener-sidebar-jquery2.js:22 +[expanded] button#nodeRemoveevent-listener-sidebar-jquery2.js:21 useCapture: true passive: false once: false handler: function(){ console.log("first jquery"); } == Raw -[expanded] button#nodeRemoveevent-listener-sidebar-jquery2.js:25 +[expanded] button#nodeRemoveevent-listener-sidebar-jquery2.js:24 useCapture: false passive: false once: false handler: function() { console.log("onclick"); } == Raw -[expanded] button#nodeRemoveevent-listener-sidebar-jquery2.js:24 +[expanded] button#nodeRemoveevent-listener-sidebar-jquery2.js:23 useCapture: false passive: false once: false
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/event-listener-sidebar-jquery2.js b/third_party/blink/web_tests/http/tests/devtools/elements/event-listener-sidebar-jquery2.js index 76d4b0d..f2f37d9 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/event-listener-sidebar-jquery2.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/event-listener-sidebar-jquery2.js
@@ -9,7 +9,6 @@ (async function() { TestRunner.addResult(`Tests event listeners output in the Elements sidebar panel.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <button id="node">Inspect Me</button>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/event-listener-sidebar-remove-expected.txt b/third_party/blink/web_tests/http/tests/devtools/elements/event-listener-sidebar-remove-expected.txt index c1a2531..2909de12 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/event-listener-sidebar-remove-expected.txt +++ b/third_party/blink/web_tests/http/tests/devtools/elements/event-listener-sidebar-remove-expected.txt
@@ -3,7 +3,7 @@ ======== click ======== == Raw -[expanded] button#nodeRemoveevent-listener-sidebar-remove.js:21 +[expanded] button#nodeRemoveevent-listener-sidebar-remove.js:20 useCapture: false passive: false once: false @@ -11,7 +11,7 @@ ======== mouseover ======== == Raw -[expanded] button#nodeRemoveevent-listener-sidebar-remove.js:21 +[expanded] button#nodeRemoveevent-listener-sidebar-remove.js:20 useCapture: false passive: false once: false @@ -20,7 +20,7 @@ ======== mouseover ======== == Raw -[expanded] button#nodeRemoveevent-listener-sidebar-remove.js:21 +[expanded] button#nodeRemoveevent-listener-sidebar-remove.js:20 useCapture: false passive: false once: false @@ -29,7 +29,7 @@ ======== click ======== == Raw -[expanded] button#node-siblingRemoveevent-listener-sidebar-remove.js:22 +[expanded] button#node-siblingRemoveevent-listener-sidebar-remove.js:21 useCapture: false passive: false once: false @@ -37,7 +37,7 @@ ======== mouseover ======== == Raw -[expanded] button#node-siblingRemoveevent-listener-sidebar-remove.js:22 +[expanded] button#node-siblingRemoveevent-listener-sidebar-remove.js:21 useCapture: false passive: false once: false
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/event-listener-sidebar-remove.js b/third_party/blink/web_tests/http/tests/devtools/elements/event-listener-sidebar-remove.js index efbbf83..581aa44d 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/event-listener-sidebar-remove.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/event-listener-sidebar-remove.js
@@ -9,7 +9,6 @@ (async function() { TestRunner.addResult(`Tests removing event listeners in the Elements sidebar panel.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <button id="node">Inspect Me</button>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/event-listener-sidebar.js b/third_party/blink/web_tests/http/tests/devtools/elements/event-listener-sidebar.js index 0c5ef57e..3eecd464 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/event-listener-sidebar.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/event-listener-sidebar.js
@@ -9,7 +9,6 @@ (async function() { TestRunner.addResult(`Tests event listeners output in the Elements sidebar panel.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <button id="node">Inspect Me</button>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/event-listeners-about-blank-expected.txt b/third_party/blink/web_tests/http/tests/devtools/elements/event-listeners-about-blank-expected.txt index 8153f520..eb80851 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/event-listeners-about-blank-expected.txt +++ b/third_party/blink/web_tests/http/tests/devtools/elements/event-listeners-about-blank-expected.txt
@@ -3,7 +3,7 @@ ======== click ======== == Raw -[expanded] bodyRemoveevent-listeners-about-blank.js:21 +[expanded] bodyRemoveevent-listeners-about-blank.js:20 useCapture: true passive: false once: false @@ -11,7 +11,7 @@ ======== hover ======== == Raw -[expanded] div#div-in-iframeRemoveevent-listeners-about-blank.js:21 +[expanded] div#div-in-iframeRemoveevent-listeners-about-blank.js:20 useCapture: true passive: false once: true @@ -19,7 +19,7 @@ ======== wheel ======== == Raw -[expanded] bodyRemoveToggle Passiveevent-listeners-about-blank.js:21 +[expanded] bodyRemoveToggle Passiveevent-listeners-about-blank.js:20 useCapture: false passive: true once: false
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/event-listeners-about-blank.js b/third_party/blink/web_tests/http/tests/devtools/elements/event-listeners-about-blank.js index 57feb90..80af02d 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/event-listeners-about-blank.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/event-listeners-about-blank.js
@@ -10,7 +10,6 @@ (async function() { TestRunner.addResult( `Tests event listeners output in the Elements sidebar panel when the listeners are added on an element in about:blank page.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <iframe id="myframe"></iframe>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/event-listeners-framework-with-service-worker.js b/third_party/blink/web_tests/http/tests/devtools/elements/event-listeners-framework-with-service-worker.js index d5f5bb8..c02aba48 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/event-listeners-framework-with-service-worker.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/event-listeners-framework-with-service-worker.js
@@ -14,7 +14,6 @@ (async function() { TestRunner.addResult(`Tests framework event listeners output in Sources panel when service worker is present.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.loadLegacyModule('sources'); await TestRunner.loadLegacyModule('console'); await TestRunner.loadLegacyModule('console');
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/expand-recursively.js b/third_party/blink/web_tests/http/tests/devtools/elements/expand-recursively.js index e5572d3..536b3b4 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/expand-recursively.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/expand-recursively.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that expanding elements recursively works.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div id="depth-1">
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/hide-shortcut.js b/third_party/blink/web_tests/http/tests/devtools/elements/hide-shortcut.js index ca33450..1b04d74 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/hide-shortcut.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/hide-shortcut.js
@@ -8,7 +8,6 @@ (async function() { TestRunner.addResult( `Tests the hide shortcut, which toggles visibility:hidden on the node and it's ancestors. Bug 110641\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-flex-alignment.js b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-flex-alignment.js index 31c137e..d6bc03b 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-flex-alignment.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-flex-alignment.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`This test verifies the flex self-alignment value sent by the backend.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-flex-gap.js b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-flex-gap.js index 088dc05a..440d06b 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-flex-gap.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-flex-gap.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`This test verifies the gap information sent to the overlay frontend for flex contains with gaps.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-flex-item.js b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-flex-item.js index 6159c19..fc8a8e5 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-flex-item.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-flex-item.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`This test verifies the base size returned when highlighting flex items.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-flex-multiline.js b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-flex-multiline.js index dd386f23..02cb07d 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-flex-multiline.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-flex-multiline.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`This test verifies the position and size of the highlighted lines and items in a multiline flex container.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-flex-reverse.js b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-flex-reverse.js index cb1d749..494e19c 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-flex-reverse.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-flex-reverse.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`This test verifies that the flex overlay creates the right lines and items for reverse direction flex containers. See crbug.com/1153272.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-flex.js b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-flex.js index 1e7bae4..a257a12 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-flex.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-flex.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`This test verifies the position and size of the highlight rectangles overlayed on an inspected CSS flex div.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-grid-area.js b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-grid-area.js index b22f256..98bbdff 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-grid-area.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-grid-area.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`This test verifies the names, positions and sizes of the highlight rectangles overlayed on CSS Grid areas.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-grid-direction.js b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-grid-direction.js index ea06c8f..4cf52a2 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-grid-direction.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-grid-direction.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`This test verifies that grids with direction rtl and ltr are correctly highlighted.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-grid-huge.js b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-grid-huge.js index 26c50718f..8905ef2d 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-grid-huge.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-grid-huge.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`This test verifies that huge CSS grids can be highlighted.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-grid-line-names.js b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-grid-line-names.js index 2bf7f80..4ed170e 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-grid-line-names.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-grid-line-names.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`This test verifies the names and positions of named grid lines are generated correctly.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-grid-writing-mode.js b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-grid-writing-mode.js index 888dcd6a..dca9a9be 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-grid-writing-mode.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-grid-writing-mode.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`This test verifies that similarly-sized grids with different writing-modes share the same grid information but have a different writingMode value.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-grid.js b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-grid.js index 0b433de..43b43a19 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-grid.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-grid.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`This test verifies the position and size of the highlight rectangles overlayed on an inspected CSS grid div.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-persistent-grid-huge.js b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-persistent-grid-huge.js index b30fa31..a6fa36a 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-persistent-grid-huge.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-persistent-grid-huge.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`This test verifies that huge CSS grids can be highlighted with the grid Highlight Tool.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-persistent-grid-iframe.js b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-persistent-grid-iframe.js index 0457dc5..63f06430 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-persistent-grid-iframe.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-persistent-grid-iframe.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`This test verifies that persistent grid in iframe are positioned correctly.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <!DOCTYPE html>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-shapes-outside-scroll.js b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-shapes-outside-scroll.js index d41676e..71c74e59 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-shapes-outside-scroll.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-shapes-outside-scroll.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Highlight CSS shapes outside scroll.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <!DOCTYPE html>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-shapes-outside.js b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-shapes-outside.js index 1837741b..4541e52 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-shapes-outside.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-css-shapes-outside.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Highlight CSS shapes.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <!DOCTYPE html>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-detached.js b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-detached.js index 7a1b7d53..8b31c2ef 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-detached.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-detached.js
@@ -9,7 +9,6 @@ (async function() { TestRunner.addResult(`Tests that highlighting a detached node does not crash. crbug.com/958958\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); const remoteObject = await TestRunner.evaluateInPageRemoteObject(`
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-display-locked-grid.js b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-display-locked-grid.js index e97ac21..f02c06e 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-display-locked-grid.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-display-locked-grid.js
@@ -8,7 +8,6 @@ (async function() { TestRunner.addResult(`Tests highlights for display locking.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.loadLegacyModule('console'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(`
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-display-locked-in-frame.js b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-display-locked-in-frame.js index 08457358..498473d 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-display-locked-in-frame.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-display-locked-in-frame.js
@@ -8,7 +8,6 @@ (async function() { TestRunner.addResult(`Tests highlights for display locking in a frame.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.loadLegacyModule('console'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(`
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-display-locked.js b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-display-locked.js index e55fb28..c94a3dff 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-display-locked.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-display-locked.js
@@ -8,7 +8,6 @@ (async function() { TestRunner.addResult(`Tests highlights for display locking.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.loadLegacyModule('console'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(`
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-dom-updates.js b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-dom-updates.js index 185b9ae..aec0ac4 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-dom-updates.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-dom-updates.js
@@ -8,7 +8,6 @@ (async function() { TestRunner.addResult(`Tests DOM update highlights in the DOM tree.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.loadLegacyModule('console'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(`
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-multiple-css-grid.js b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-multiple-css-grid.js index 41c790e..de2d21b 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-multiple-css-grid.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-multiple-css-grid.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`This test verifies the position and size of the highlight rectangles overlayed on an inspected CSS grid div.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-node-a11y.js b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-node-a11y.js index 7efbce5..d758a53b 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-node-a11y.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-node-a11y.js
@@ -8,7 +8,6 @@ (async function() { TestRunner.addResult( `This test verifies a11y attributes for a node.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <!DOCTYPE html>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-node-scaled-and-scrolled.js b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-node-scaled-and-scrolled.js index 9f73f4f..eb4db7d 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-node-scaled-and-scrolled.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-node-scaled-and-scrolled.js
@@ -8,7 +8,6 @@ (async function() { TestRunner.addResult(`\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.loadLegacyModule('console'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(`
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-node-scaled.js b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-node-scaled.js index d7a4790..fdcb753 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-node-scaled.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-node-scaled.js
@@ -8,7 +8,6 @@ (async function() { TestRunner.addResult(`\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.loadLegacyModule('console'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(`
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-node-scroll.js b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-node-scroll.js index c96bd719..5cfb9e1 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-node-scroll.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-node-scroll.js
@@ -8,7 +8,6 @@ (async function() { TestRunner.addResult( `This test verifies the position and size of the highlight rectangles overlayed on an inspected div in the scrolled view.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-node-styles.js b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-node-styles.js index 965078f..220cc40 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-node-styles.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-node-styles.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`This test verifies the style info overlaid on an inspected node.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-node-transformed.js b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-node-transformed.js index 6b208ef8..80bca31d7 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-node-transformed.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-node-transformed.js
@@ -8,7 +8,6 @@ (async function() { TestRunner.addResult(`\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.loadLegacyModule('console'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(`
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-node-vertical-rl.js b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-node-vertical-rl.js index ec14d89..39a084e 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-node-vertical-rl.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-node-vertical-rl.js
@@ -8,7 +8,6 @@ (async function() { TestRunner.addResult(`\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.loadLegacyModule('console'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(`
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-node.js b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-node.js index bc54569..cd21e5ef 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-node.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-node.js
@@ -8,7 +8,6 @@ (async function() { TestRunner.addResult( `This test verifies the position and size of the highlight rectangles overlaid on an inspected node.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-svg-content-inside-iframe.js b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-svg-content-inside-iframe.js index 034fd13e..c3d177d 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-svg-content-inside-iframe.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-svg-content-inside-iframe.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-svg-root-zoomed.js b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-svg-root-zoomed.js index 717ed6d..5d004125 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-svg-root-zoomed.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-svg-root-zoomed.js
@@ -8,7 +8,6 @@ (async function() { TestRunner.addResult( `This test verifies the position and size of the highlight rectangles overlayed on an SVG root element when the page is zoomed.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <!DOCTYPE html>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-svg-root.js b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-svg-root.js index 7e1e8e3..00e8de4 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-svg-root.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/highlight/highlight-svg-root.js
@@ -8,7 +8,6 @@ (async function() { TestRunner.addResult( `This test verifies the position and size of the highlight rectangles overlayed on an SVG root element.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <!DOCTYPE html>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/iframe-load-event.js b/third_party/blink/web_tests/http/tests/devtools/elements/iframe-load-event.js index 9a80559..8b492b3 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/iframe-load-event.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/iframe-load-event.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that iframe content is available after iframe's load event fired. See http://webkit.org/b/76552\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.addIframe('resources/iframe-load-event-iframe-1.html', {id: 'myframe'});
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/inline-style-title.js b/third_party/blink/web_tests/http/tests/devtools/elements/inline-style-title.js index 22313e7..11e93bd7 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/inline-style-title.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/inline-style-title.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Verifies that external change of inline style element updates its title.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style id="inline-style">
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/insert-node.js b/third_party/blink/web_tests/http/tests/devtools/elements/insert-node.js index 8de97b0..43c85503 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/insert-node.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/insert-node.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that elements panel updates dom tree structure upon node insertion.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div id="container"><div id="child1"></div><div id="child2"></div><div id="child3"></div></div>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/inspect-limited-children.js b/third_party/blink/web_tests/http/tests/devtools/elements/inspect-limited-children.js index e22fdb8a..4dabe81 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/inspect-limited-children.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/inspect-limited-children.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that elements hidden by "Show more" limit are revealed properly.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/inspect-mode-after-profiling.js b/third_party/blink/web_tests/http/tests/devtools/elements/inspect-mode-after-profiling.js index 2df72c6a..7080c6b 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/inspect-mode-after-profiling.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/inspect-mode-after-profiling.js
@@ -9,7 +9,6 @@ (async function() { TestRunner.addResult(`Tests that inspect mode works after profiling start/stop.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div id="inspected" style="width:100px;height:100px;"></div>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/inspect-mode-shadow-text.js b/third_party/blink/web_tests/http/tests/devtools/elements/inspect-mode-shadow-text.js index ab812bb..9a9ad72 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/inspect-mode-shadow-text.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/inspect-mode-shadow-text.js
@@ -9,7 +9,6 @@ (async function() { TestRunner.addResult(`Test that devtools can inspect text element under shadow root.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div><div><div id="host"></div></div></div>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/inspect-pointer-events-none.js b/third_party/blink/web_tests/http/tests/devtools/elements/inspect-pointer-events-none.js index 336f1bc..7725a55 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/inspect-pointer-events-none.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/inspect-pointer-events-none.js
@@ -9,7 +9,6 @@ (async function() { TestRunner.addResult(`Test that Web Inspector can inspect element with pointer-events:none.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/inspect-pseudo-element.js b/third_party/blink/web_tests/http/tests/devtools/elements/inspect-pseudo-element.js index 15749ec..e156c92 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/inspect-pseudo-element.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/inspect-pseudo-element.js
@@ -10,7 +10,6 @@ (async function() { TestRunner.addResult(`Test\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/modify-chardata.js b/third_party/blink/web_tests/http/tests/devtools/elements/modify-chardata.js index 539983a..d6e2c364 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/modify-chardata.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/modify-chardata.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that elements panel updates dom tree structure upon changes to characters.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div id="node">Foo</div>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/move-node.js b/third_party/blink/web_tests/http/tests/devtools/elements/move-node.js index f01864d..47911e69 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/move-node.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/move-node.js
@@ -9,7 +9,6 @@ (async function() { TestRunner.addResult(`Tests elements drag and drop operation internals, verifies post-move selection.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div id="container">
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/navigate-styles-sidebar-with-arrow-keys.js b/third_party/blink/web_tests/http/tests/devtools/elements/navigate-styles-sidebar-with-arrow-keys.js index 97bf56d..9b006b7 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/navigate-styles-sidebar-with-arrow-keys.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/navigate-styles-sidebar-with-arrow-keys.js
@@ -12,7 +12,6 @@ TestRunner.addResult('Tests that styles sidebar can be navigated with arrow keys.\n'); await TestRunner.showPanel('elements'); - await TestRunner.loadLegacyModule('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/node-reselect-on-append-child.js b/third_party/blink/web_tests/http/tests/devtools/elements/node-reselect-on-append-child.js index 57393cad..2403c97 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/node-reselect-on-append-child.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/node-reselect-on-append-child.js
@@ -10,7 +10,6 @@ (async function() { TestRunner.addResult( `The test verifies that SelectedNodeChanged event is not fired whenever a child gets added to the node.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/node-xpath.js b/third_party/blink/web_tests/http/tests/devtools/elements/node-xpath.js index 73bc4004..57f16c2 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/node-xpath.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/node-xpath.js
@@ -9,7 +9,6 @@ (async function() { TestRunner.addResult(`Tests node xPath construction\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.navigatePromise('resources/node-xpath.xhtml');
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/resolve-node-blocked.js b/third_party/blink/web_tests/http/tests/devtools/elements/resolve-node-blocked.js index f97d23e7..644682a 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/resolve-node-blocked.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/resolve-node-blocked.js
@@ -8,7 +8,6 @@ (async function() { TestRunner.addResult( `Tests that JS object to node resolution still works even if script evals are prohibited by Content-Security-Policy. The test passes if it doesn't crash. Bug 78705.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); var remoteObject = await TestRunner.evaluateInPageRemoteObject('document');
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/reveal-whitespace-text-node.js b/third_party/blink/web_tests/http/tests/devtools/elements/reveal-whitespace-text-node.js index a57f9f7..d9947b9 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/reveal-whitespace-text-node.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/reveal-whitespace-text-node.js
@@ -11,7 +11,6 @@ (async function() { TestRunner.addResult( `This test verifies that revealing a whitespace text node RemoteObject reveals its parentElement DIV.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <p id="description"></p>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/selected-element-changes-execution-context.js b/third_party/blink/web_tests/http/tests/devtools/elements/selected-element-changes-execution-context.js index 06381c89..93fad175 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/selected-element-changes-execution-context.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/selected-element-changes-execution-context.js
@@ -10,7 +10,6 @@ (async function() { TestRunner.addResult(`Tests that the execution context is changed to match new selected node.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <iframe id="iframe-per-se" src="resources/set-outer-html-body-iframe.html""></iframe>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/shadow/create-shadow-root.js b/third_party/blink/web_tests/http/tests/devtools/elements/shadow/create-shadow-root.js index 8159f62..59f336e 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/shadow/create-shadow-root.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/shadow/create-shadow-root.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that elements panel updates dom tree structure upon shadow root creation.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div id="container"><div id="child"></div></div>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/shadow/elements-panel-shadow-selection-on-refresh-1.js b/third_party/blink/web_tests/http/tests/devtools/elements/shadow/elements-panel-shadow-selection-on-refresh-1.js index 0680b91..5e94a49 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/shadow/elements-panel-shadow-selection-on-refresh-1.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/shadow/elements-panel-shadow-selection-on-refresh-1.js
@@ -10,7 +10,6 @@ (async function() { TestRunner.addResult(`Tests that elements panel preserves selected shadow DOM node on page refresh.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.navigatePromise('../resources/elements-panel-shadow-selection-on-refresh.html');
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/shadow/elements-panel-shadow-selection-on-refresh-2.js b/third_party/blink/web_tests/http/tests/devtools/elements/shadow/elements-panel-shadow-selection-on-refresh-2.js index 92540bb..8ebd68b6 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/shadow/elements-panel-shadow-selection-on-refresh-2.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/shadow/elements-panel-shadow-selection-on-refresh-2.js
@@ -10,7 +10,6 @@ (async function() { TestRunner.addResult(`Tests that elements panel preserves selected shadow DOM node on page refresh.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.navigatePromise('../resources/elements-panel-shadow-selection-on-refresh.html');
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/shadow/elements-panel-shadow-selection-on-refresh-3.js b/third_party/blink/web_tests/http/tests/devtools/elements/shadow/elements-panel-shadow-selection-on-refresh-3.js index ded1f11..c4892ef3 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/shadow/elements-panel-shadow-selection-on-refresh-3.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/shadow/elements-panel-shadow-selection-on-refresh-3.js
@@ -10,7 +10,6 @@ (async function() { TestRunner.addResult(`Tests that elements panel preserves selected shadow DOM node on page refresh.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.navigatePromise('../resources/elements-panel-shadow-selection-on-refresh.html');
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/shadow/inspect-deep-shadow-element.js b/third_party/blink/web_tests/http/tests/devtools/elements/shadow/inspect-deep-shadow-element.js index edf01bb..de1c297 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/shadow/inspect-deep-shadow-element.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/shadow/inspect-deep-shadow-element.js
@@ -11,7 +11,6 @@ (async function() { TestRunner.addResult(`Tests that inspect element action works for deep shadow elements.\n`); await TestRunner.loadLegacyModule('console'); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/shadow/inspect-slot-not-in-shadow-tree.js b/third_party/blink/web_tests/http/tests/devtools/elements/shadow/inspect-slot-not-in-shadow-tree.js index 339a5916b..42d220d 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/shadow/inspect-slot-not-in-shadow-tree.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/shadow/inspect-slot-not-in-shadow-tree.js
@@ -9,7 +9,6 @@ (async function() { TestRunner.addResult(`Tests that slots that are not in a shadow tree can be inspected.\n`); await TestRunner.loadLegacyModule('console'); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <p id="description"></p>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/shadow/reveal-shadow-dom-node.js b/third_party/blink/web_tests/http/tests/devtools/elements/shadow/reveal-shadow-dom-node.js index 2212862..b4e79cbf 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/shadow/reveal-shadow-dom-node.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/shadow/reveal-shadow-dom-node.js
@@ -11,7 +11,6 @@ (async function() { TestRunner.addResult( `This test verifies that the correct node is revealed in the DOM tree when asked to reveal a user-agent shadow DOM node.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <p id="description"></p>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/shadow/shadow-host-display-modes.js b/third_party/blink/web_tests/http/tests/devtools/elements/shadow/shadow-host-display-modes.js index 4e7272f..b421cbf 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/shadow/shadow-host-display-modes.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/shadow/shadow-host-display-modes.js
@@ -10,7 +10,6 @@ (async function() { TestRunner.addResult( `Tests that distributed nodes and their updates are correctly shown in different shadow host display modes.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <template id="youngestShadowRootTemplate">
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/shadow/shadow-root.js b/third_party/blink/web_tests/http/tests/devtools/elements/shadow/shadow-root.js index bc3675a..b04c1ad 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/shadow/shadow-root.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/shadow/shadow-root.js
@@ -8,7 +8,6 @@ (async function() { TestRunner.addResult( `This test verifies that author shadow root's #document-fragment is displayed and user-agent one is hidden by default.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <p id="description"></p>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/shadow/shadow-slot-assignment.js b/third_party/blink/web_tests/http/tests/devtools/elements/shadow/shadow-slot-assignment.js index 028dbe65..6562dde 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/shadow/shadow-slot-assignment.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/shadow/shadow-slot-assignment.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that elements panel updates dom tree structure when shadow dom slots are reassigned.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.evaluateInPagePromise(` function createShadowRoot(hostId, slots)
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/shadow/update-shadowdom.js b/third_party/blink/web_tests/http/tests/devtools/elements/shadow/update-shadowdom.js index 9d212a66..248f80be 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/shadow/update-shadowdom.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/shadow/update-shadowdom.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`This test confirms that updating the shadow dom is reflected to the Inspector.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <p id="description"></p>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/add-new-rule-inline-style-csp.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/add-new-rule-inline-style-csp.js index 53724eb9..73b555f 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/add-new-rule-inline-style-csp.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/add-new-rule-inline-style-csp.js
@@ -8,7 +8,6 @@ (async function() { TestRunner.addResult( `Tests that adding a new rule does not crash the renderer and modifying an inline style does not report errors when forbidden by Content-Security-Policy.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div id="inspected">Text</div>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/add-new-rule-invalid-selector.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/add-new-rule-invalid-selector.js index 19c673d..f86577b 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/add-new-rule-invalid-selector.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/add-new-rule-invalid-selector.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that adding a new rule with invalid selector works as expected.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div id="inspected">Text</div>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/add-new-rule-keyboard.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/add-new-rule-keyboard.js index a5a8ff6a..9b7c16f 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/add-new-rule-keyboard.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/add-new-rule-keyboard.js
@@ -10,7 +10,6 @@ (async function() { TestRunner.addResult(`Tests that adding a new rule works properly with user input.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div id="inspected">Text</div>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/add-new-rule-with-style-after-body.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/add-new-rule-with-style-after-body.js index fe132ab..4913cdc2 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/add-new-rule-with-style-after-body.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/add-new-rule-with-style-after-body.js
@@ -8,7 +8,6 @@ (async function() { TestRunner.addResult( `Tests that adding a new rule works when there is a STYLE element after BODY. TIMEOUT SHOULD NOT OCCUR! Bug 111299 https://bugs.webkit.org/show_bug.cgi?id=111299\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div id="inspected" style="font-size: 12px">Text</div>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/cached-sync-computed-styles.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/cached-sync-computed-styles.js index 9293192..26cb7435 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/cached-sync-computed-styles.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/cached-sync-computed-styles.js
@@ -9,7 +9,6 @@ (async function() { TestRunner.addResult(`Tests that computed styles are cached across synchronous requests.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/case-sensitive-suggestions.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/case-sensitive-suggestions.js index 30a9ace..fa925f6 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/case-sensitive-suggestions.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/case-sensitive-suggestions.js
@@ -9,7 +9,6 @@ (async function() { TestRunner.addResult(`Tests that text prompt suggestions' casing follows that of the user input.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div id="inner" style="color:initial;"></div>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/commit-selector-mark-matching.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/commit-selector-mark-matching.js index cf5e5c0..a4fa6c0 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/commit-selector-mark-matching.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/commit-selector-mark-matching.js
@@ -8,7 +8,6 @@ (async function() { TestRunner.addResult( `Tests that matching selectors are marked properly after new rule creation and selector change.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div id="inspected"></div>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/commit-selector.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/commit-selector.js index 3340d56..3fabc42 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/commit-selector.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/commit-selector.js
@@ -8,7 +8,6 @@ (async function() { TestRunner.addResult( `Tests that renaming a selector updates element styles. Bug 70018. https://bugs.webkit.org/show_bug.cgi?id=70018\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/cssom-media-insert-crash.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/cssom-media-insert-crash.js index 40fc9584..89be91ee 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/cssom-media-insert-crash.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/cssom-media-insert-crash.js
@@ -8,7 +8,6 @@ (async function() { TestRunner.addResult( `Tests that the inspected page does not crash after inspecting element with CSSOM added rules. Bug 373508 crbug.com/373508\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/dynamic-style-tag.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/dynamic-style-tag.js index 88090d2..3c9457c 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/dynamic-style-tag.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/dynamic-style-tag.js
@@ -8,7 +8,6 @@ (async function() { TestRunner.addResult( `Tests that different types of inline styles are correctly disambiguated and their sourceURL is correct.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.navigatePromise('resources/dynamic-style-tag.html');
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/edit-inspector-stylesheet.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/edit-inspector-stylesheet.js index 64bd6422..53fefd4 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/edit-inspector-stylesheet.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/edit-inspector-stylesheet.js
@@ -9,7 +9,6 @@ (async function() { TestRunner.addResult( `Tests that adding a new rule creates inspector stylesheet resource and allows its live editing.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.loadLegacyModule('sources'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(`
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/edit-media-text.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/edit-media-text.js index 6123725..f8a9d039 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/edit-media-text.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/edit-media-text.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that editing media text updates element styles.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/edit-name-with-trimmed-value.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/edit-name-with-trimmed-value.js index eecab47..e85902e 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/edit-name-with-trimmed-value.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/edit-name-with-trimmed-value.js
@@ -8,7 +8,6 @@ (async function() { TestRunner.addResult( `Tests that editing a CSS property name in the Styles pane retains its original, non-trimmed value text.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div id="inspected" style="background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYGBgAAgwAAAEAAGbA+oJAAAAAElFTkSuQmCC)">
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/edit-value-inside-property.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/edit-value-inside-property.js index 7f14fb77..b0cf510 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/edit-value-inside-property.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/edit-value-inside-property.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Verifies that property value editing triggers style update in rendering engine.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div id="inspected" style="font-size: 19px"></div>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/edit-value-url-with-color.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/edit-value-url-with-color.js index 22428bf..33bd3f8 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/edit-value-url-with-color.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/edit-value-url-with-color.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that colors are not re-formatted inside url(...) when editing property values.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div id="inspected1" style="background: white">"white" background</div>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/edit-value-with-trimmed-url.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/edit-value-with-trimmed-url.js index fbdbaeae..19d4b22 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/edit-value-with-trimmed-url.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/edit-value-with-trimmed-url.js
@@ -8,7 +8,6 @@ (async function() { TestRunner.addResult( `Tests that editing a CSS property value in the Styles pane restores the original, non-trimmed value text. Bug 107936. https://bugs.webkit.org/show_bug.cgi?id=107936\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div id="inspected" style="background: transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYGBgAAgwAAAEAAGbA+oJAAAAAElFTkSuQmCC) repeat-y 50% top">
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/empty-background-url.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/empty-background-url.js index 0a4e1577..28e72eb 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/empty-background-url.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/empty-background-url.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that empty url in the property value does not break inspector.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/filter-matched-styles.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/filter-matched-styles.js index ab4fcdd..78f1785 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/filter-matched-styles.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-1/filter-matched-styles.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Verifies that filtering in StylesSidebarPane works as expected.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/add-import-rule.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/add-import-rule.js index ba386bef..40cdbd02 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/add-import-rule.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/add-import-rule.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that adding an @import with data URI does not lead to stylesheet collection crbug.com/644719\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <!DOCTYPE html>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/cssom-shorthand-important.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/cssom-shorthand-important.js index 831c95d..d4c7d496 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/cssom-shorthand-important.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/cssom-shorthand-important.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that CSSOM-modified shorthands are reporting their "important" bits.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/filter-matched-styles-hides-separators.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/filter-matched-styles-hides-separators.js index 221b5a1..57eb326 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/filter-matched-styles-hides-separators.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/filter-matched-styles-hides-separators.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Verifies that filtering in StylesSidebarPane hides sidebar separators.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/get-set-stylesheet-text.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/get-set-stylesheet-text.js index d5cee3f7..776c5f8 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/get-set-stylesheet-text.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/get-set-stylesheet-text.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that WebInspector.CSSStyleSheet methods work as expected.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/import-pseudoclass-crash.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/import-pseudoclass-crash.js index b8f30b7..4df6974 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/import-pseudoclass-crash.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/import-pseudoclass-crash.js
@@ -8,7 +8,6 @@ (async function() { TestRunner.addResult( `Tests that modifying stylesheet text with @import and :last-child selector does not crash (Bug 95324).\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/keyframes-rules.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/keyframes-rules.js index 18f2682..887f0c3 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/keyframes-rules.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/keyframes-rules.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that source data is extracted correctly from stylesheets with @keyframes rules.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/media-emulation.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/media-emulation.js index 95d482e..ea503be 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/media-emulation.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/media-emulation.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that emulated CSS media is reflected in the Styles pane.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/media-queries.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/media-queries.js index 1bd1332..a542a1eb 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/media-queries.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/media-queries.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that media query stack is rendered for associated rules.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/media-using-same-url.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/media-using-same-url.js index 80ca323cf..63d7ad58 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/media-using-same-url.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/media-using-same-url.js
@@ -8,7 +8,6 @@ (async function() { TestRunner.addResult( `Tests that media query stack is computed correctly when several stylesheets share the same URL.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/metrics-box-sizing.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/metrics-box-sizing.js index 700d22a..614adf3 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/metrics-box-sizing.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/metrics-box-sizing.js
@@ -8,7 +8,6 @@ (async function() { TestRunner.addResult( `Tests that content-box and border-box content area dimensions are handled property by the Metrics pane.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/mixed-case-color-aware-properties.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/mixed-case-color-aware-properties.js index 57e92fc..3aabdc68 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/mixed-case-color-aware-properties.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/mixed-case-color-aware-properties.js
@@ -9,7 +9,6 @@ (async function() { TestRunner.addResult(`Tests that color-related mix-cased CSS properties are actually color aware.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); var colorAwareProperties = ['bAckground-ColoR', 'COloR', 'Border-coLoR', 'border-right-color', 'BOX-SHADOW'];
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/multiple-imports-edit-crash.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/multiple-imports-edit-crash.js index 2a973287..73485610 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/multiple-imports-edit-crash.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/multiple-imports-edit-crash.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that modifying stylesheet text with multiple @import at-rules does not crash.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <head>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/nested-pseudo-elements.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/nested-pseudo-elements.js index 7fb8605c..99943d4 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/nested-pseudo-elements.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/nested-pseudo-elements.js
@@ -10,7 +10,6 @@ (async function() { TestRunner.addResult(`Tests that nested pseudo elements and their styles are handled properly.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/parse-comments.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/parse-comments.js index dd655c72c..4127775 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/parse-comments.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/parse-comments.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that comments in stylesheets are parsed correctly by the DevTools.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/parse-declaration-unterminated-comment.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/parse-declaration-unterminated-comment.js index ee2c0ef..6c28c2d 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/parse-declaration-unterminated-comment.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/parse-declaration-unterminated-comment.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that CSSParser correctly parses declarations with unterminated comments.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div id="inspected1" style="color: red /* foo: bar;"></div>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/parse-declaration-with-quote.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/parse-declaration-with-quote.js index a01bb77..05df17f 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/parse-declaration-with-quote.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/parse-declaration-with-quote.js
@@ -8,7 +8,6 @@ (async function() { TestRunner.addResult( `Tests that CSSParser correctly parses declarations with unterminated strings. Blink bug 231127\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div id="inspected" style="color: red'foo"></div>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/parse-utf8-bom.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/parse-utf8-bom.js index 20f01a4..5da5290 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/parse-utf8-bom.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/parse-utf8-bom.js
@@ -8,7 +8,6 @@ (async function() { TestRunner.addResult( `Tests that source data are extracted correctly from external stylesheets in UTF-8 with BOM. Bug 59322.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <h1 id="inspected">
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/paste-property.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/paste-property.js index e11cdc11..a5ddd174 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/paste-property.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/paste-property.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that splitting properties when pasting works.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div id="inspected" style="font-size: 12px">Text</div>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/perform-undo-perform-of-mergable-action.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/perform-undo-perform-of-mergable-action.js index 95ebeab0..61eb1275 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/perform-undo-perform-of-mergable-action.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/perform-undo-perform-of-mergable-action.js
@@ -9,7 +9,6 @@ (async function() { TestRunner.addResult(`Tests that perform-undo-perform of the mergeable action does not crash.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/property-ui-location.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/property-ui-location.js index 5ec2cb6..4169cd3 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/property-ui-location.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/property-ui-location.js
@@ -8,7 +8,6 @@ (async function() { TestRunner.addResult(`Verifies Bindings.cssWorkspaceBinding.propertyUILocation functionality\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.loadLegacyModule('sources'); await TestRunner.showPanel('sources'); await TestRunner.showPanel('elements');
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/pseudo-elements.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/pseudo-elements.js index 594daedc3..8ec3788 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/pseudo-elements.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-2/pseudo-elements.js
@@ -9,7 +9,6 @@ (async function() { TestRunner.addResult(`Tests that pseudo elements and their styles are handled properly.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/remove-shadow-host.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/remove-shadow-host.js index a355868..1c6a45e 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/remove-shadow-host.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/remove-shadow-host.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Test remove shadow host.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <!DOCTYPE html>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/selector-list.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/selector-list.js index 5e49dee..eff96ae8 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/selector-list.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/selector-list.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests representation of selector lists in the protocol. Bug 103118.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/selector-source-data.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/selector-source-data.js index 067525e275..4e45a29 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/selector-source-data.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/selector-source-data.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that WebInspector.CSSStyleSheet methods work as expected.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/shadow-dom-rules.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/shadow-dom-rules.js index 2e56ceb..6a90f93 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/shadow-dom-rules.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/shadow-dom-rules.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`This test checks that style sheets hosted inside shadow roots could be inspected.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div id="host"></div>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/simple-selector.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/simple-selector.js index 68dd20dd0..e65b3d1 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/simple-selector.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/simple-selector.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Verifies simple selector behavior.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div id="container" style="display: none">
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/style-autocomplete-swatches.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/style-autocomplete-swatches.js index d09764d3..908cbd14 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/style-autocomplete-swatches.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/style-autocomplete-swatches.js
@@ -9,7 +9,6 @@ (async function() { TestRunner.addResult(`Tests that CSSPropertyPrompt properly builds suggestions.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/style-autocomplete.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/style-autocomplete.js index 224422ec..aeebedb 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/style-autocomplete.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/style-autocomplete.js
@@ -9,7 +9,6 @@ (async function() { TestRunner.addResult(`Tests that autocompletions are computed correctly when editing the Styles pane.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/styles-add-blank-property.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/styles-add-blank-property.js index 3dd98a2b..17e0e4f 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/styles-add-blank-property.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/styles-add-blank-property.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that adding a new blank property works.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div id="inspected" style="font-size: 12px">Text</div>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/styles-add-invalid-property.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/styles-add-invalid-property.js index 90cd86e..5954ccc4 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/styles-add-invalid-property.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/styles-add-invalid-property.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that adding an invalid property retains its syntax.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div id="inspected" style="font-size: 12px">Text</div>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/styles-add-new-rule-colon.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/styles-add-new-rule-colon.js index 95909399..6bbfee8 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/styles-add-new-rule-colon.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/styles-add-new-rule-colon.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that adding a new rule works after switching nodes.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div id="inspected" style="font-size: 12px">Text</div>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/styles-add-new-rule-tab.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/styles-add-new-rule-tab.js index 65a9f5a..70df4a38 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/styles-add-new-rule-tab.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/styles-add-new-rule-tab.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that adding a new rule works after switching nodes.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div id="inspected" style="font-size: 12px">Text</div>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/styles-add-new-rule-to-stylesheet.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/styles-add-new-rule-to-stylesheet.js index ad39ec0..7725ecc 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/styles-add-new-rule-to-stylesheet.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/styles-add-new-rule-to-stylesheet.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that adding new rule in the stylesheet end works as expected.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div class="inspected">Styled element</div>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/styles-add-new-rule.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/styles-add-new-rule.js index 8f0568d0..b61f388 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/styles-add-new-rule.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/styles-add-new-rule.js
@@ -9,7 +9,6 @@ (async function() { TestRunner.addResult(`Tests that adding a new rule works after switching nodes.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div id="inspected" style="font-size: 12px">Text</div>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/styles-change-node-while-editing.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/styles-change-node-while-editing.js index b9c7e65..708cbe42 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/styles-change-node-while-editing.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/styles-change-node-while-editing.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that changing selected node while editing style does update styles sidebar.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div id="inspected" style="color: red">Text</div>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/styles-commit-editing.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/styles-commit-editing.js index 6c28f3f..9cd0b0d 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/styles-commit-editing.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/styles-commit-editing.js
@@ -9,7 +9,6 @@ (async function() { TestRunner.addResult(`Tests that editing is canceled properly after incremental editing.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div id="inspected" style="color: red">Text</div>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/styles-cssom-important-property.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/styles-cssom-important-property.js index 7b4d375..ba209558 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/styles-cssom-important-property.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/styles-cssom-important-property.js
@@ -8,7 +8,6 @@ (async function() { TestRunner.addResult( `Tests that !important modifier is shown for CSSOM-generated properties.`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style id="mycss"></style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/styles-disable-property-after-selector-edit.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/styles-disable-property-after-selector-edit.js index 004f240..4a484795 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/styles-disable-property-after-selector-edit.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/styles-disable-property-after-selector-edit.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Verifies that sequence of setting selector and disabling property works.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/styles-disable-then-change.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/styles-disable-then-change.js index f28b8cb..f6f8c2c 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/styles-disable-then-change.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/styles-disable-then-change.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that changing a disabled property enables it as well.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div id="container" style="font-weight:bold">
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/styles-disable-then-delete.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/styles-disable-then-delete.js index 4c8eb2aa..d9e6600 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/styles-disable-then-delete.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/styles-disable-then-delete.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that removal of property following its disabling works.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div id="container" style="font-weight:bold">
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/styles-disable-then-enable-overriden-ua.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/styles-disable-then-enable-overriden-ua.js index 2bccb99d..f4cd356 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/styles-disable-then-enable-overriden-ua.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/styles-disable-then-enable-overriden-ua.js
@@ -8,7 +8,6 @@ (async function() { TestRunner.addResult( `Tests that disabling shorthand removes the "overriden" mark from the UA shorthand it overrides.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <body id="body-id" style="margin: 10px">
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/styles-disable-then-enable.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/styles-disable-then-enable.js index e07e646..f504244a 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/styles-disable-then-enable.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-3/styles-disable-then-enable.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that disabling style property works.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div id="container" style="font-weight:bold">
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/cssom-constructed.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/cssom-constructed.js index 307a9c2..f52ada15 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/cssom-constructed.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/cssom-constructed.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that constructed stylesheets appear properly.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div id="inspected">Text</div>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/cssom-insert-rule.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/cssom-insert-rule.js index 008dc4d7..bff72aa 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/cssom-insert-rule.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/cssom-insert-rule.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that edited stylesheets appear properly.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/disable-last-property-without-semicolon.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/disable-last-property-without-semicolon.js index c1eb315..475fbb8e 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/disable-last-property-without-semicolon.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/disable-last-property-without-semicolon.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Verifies that formatter adds a semicolon when enabling property.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/do-not-rebuild-styles-on-every-change.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/do-not-rebuild-styles-on-every-change.js index eb3f911a..d1d24200 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/do-not-rebuild-styles-on-every-change.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/do-not-rebuild-styles-on-every-change.js
@@ -9,7 +9,6 @@ (async function() { TestRunner.addResult(`Tests show that ssp isn't rebuild on every dom mutation\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div id="parent">
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/inline-style-sourcemap.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/inline-style-sourcemap.js index bcbdc5f..2ec1bee 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/inline-style-sourcemap.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/inline-style-sourcemap.js
@@ -9,7 +9,6 @@ (async function() { TestRunner.addResult(`Verify that inline style sourceMappingURL is resolved properly.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <body id="inspect">
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/keyframes-source-offsets.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/keyframes-source-offsets.js index abd85fb7..a1cd274 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/keyframes-source-offsets.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/keyframes-source-offsets.js
@@ -9,7 +9,6 @@ (async function() { TestRunner.addResult(`Tests that proper data and start/end offset positions are reported for CSS keyframes.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/style-update-during-selector-edit.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/style-update-during-selector-edit.js index a8d98ac1..686f041 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/style-update-during-selector-edit.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/style-update-during-selector-edit.js
@@ -10,7 +10,6 @@ (async function() { TestRunner.addResult( `Tests that modification of element styles while editing a selector does not commit the editor.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-do-not-detach-sourcemap-on-edits.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-do-not-detach-sourcemap-on-edits.js index a231128a..6318a463 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-do-not-detach-sourcemap-on-edits.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-do-not-detach-sourcemap-on-edits.js
@@ -9,7 +9,6 @@ (async function() { TestRunner.addResult(`Tests that source map is not detached on edits. crbug.com/257778\n`); await TestRunner.loadLegacyModule('sources'); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('sources'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(`
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-edit-property-after-invalid-rule.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-edit-property-after-invalid-rule.js index c7bf735c..2d61967 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-edit-property-after-invalid-rule.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-edit-property-after-invalid-rule.js
@@ -8,7 +8,6 @@ (async function() { TestRunner.addResult( `Tests that proper source lines are reported for the styles after unrecognizer / invalid selector.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-edit-slow-completions.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-edit-slow-completions.js index 500e1f1..50e99088a 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-edit-slow-completions.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-edit-slow-completions.js
@@ -9,7 +9,6 @@ (async function() { TestRunner.addResult(`Tests that slow completions do not interfere with editing styles.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(`<div id="inspected">Text</div>`);
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-formatting.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-formatting.js index a5daa86..d55cf16c 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-formatting.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-formatting.js
@@ -8,7 +8,6 @@ (async function() { TestRunner.addResult( `Tests that InspectorCSSAgent formats the CSS style text based on the CSS model modifications.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-grid-template.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-grid-template.js index c423e5ca..6989c14 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-grid-template.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-grid-template.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that properties defining grid templates are correct.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-iframe.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-iframe.js index b55b3b4f..52e689b 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-iframe.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-iframe.js
@@ -9,7 +9,6 @@ (async function() { TestRunner.addResult( `Tests that proper (and different) styles are returned for body elements of main document and iframe.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.loadLegacyModule('console'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(`
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-inherited-same-source.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-inherited-same-source.js index e561c4ee..8e0855b4 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-inherited-same-source.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-inherited-same-source.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Checks that inherited styles from the same source are not duplicated.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-keyframes-cssom-injected.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-keyframes-cssom-injected.js index 5a6627b..5e239c7a 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-keyframes-cssom-injected.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-keyframes-cssom-injected.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that inspecting keyframes injected via CSSOM doesn't crash.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-keyframes-display-none.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-keyframes-display-none.js index c975e24..3577385 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-keyframes-display-none.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-keyframes-display-none.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that keyframes are shown in styles pane inside display:none.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-keyframes.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-keyframes.js index ea39b264..814a0f8 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-keyframes.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-keyframes.js
@@ -9,7 +9,6 @@ (async function() { TestRunner.addResult(`Tests that keyframes are shown in styles pane.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-live-locations-leak.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-live-locations-leak.js index 746a712..ba5c8ff 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-live-locations-leak.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-live-locations-leak.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that styles sidebar pane does not leak any LiveLocations.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-new-API.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-new-API.js index 32cab47..bab4b5b 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-new-API.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-new-API.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that InspectorCSSAgent API methods work as expected.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <head>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-overloaded-shorthand.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-overloaded-shorthand.js index a0383fe..3461dd6 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-overloaded-shorthand.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-overloaded-shorthand.js
@@ -8,7 +8,6 @@ (async function() { TestRunner.addResult(`Tests that shorthand is marked as overloaded if all its longhands are overloaded.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(`
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-overriden-properties.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-overriden-properties.js index b620054..da9d6c63 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-overriden-properties.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-overriden-properties.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that overriding shorthands within rule are visible.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-properties-overload.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-properties-overload.js index af96319..948fb43 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-properties-overload.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-properties-overload.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Verifies that inspector figures out overloaded properties correctly.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-source-lines-inline.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-source-lines-inline.js index c00ca42..14a413f 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-source-lines-inline.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-source-lines-inline.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that elements panel shows proper inline style locations in the sidebar panel.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.navigatePromise('resources/styles-source-lines-inline-helper.html');
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-source-lines-recovery.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-source-lines-recovery.js index 1aa579f..1a40bbb 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-source-lines-recovery.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-source-lines-recovery.js
@@ -8,7 +8,6 @@ (async function() { TestRunner.addResult( `Tests that invalid rule inside @-rule doesn't break source code matching (http://crbug.com/317499).\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.navigatePromise('resources/styles-source-lines-recovery-helper.html');
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-source-lines.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-source-lines.js index 9827b63d..3169592 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-source-lines.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-source-lines.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that proper source lines are reported for the parsed styles.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.navigatePromise('resources/styles-source-lines-helper.html');
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-source-offsets.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-source-offsets.js index 17abfee..287254e 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-source-offsets.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-source-offsets.js
@@ -8,7 +8,6 @@ (async function() { TestRunner.addResult( `Tests that proper data and start/end offset positions are reported for CSS style declarations and properties.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <head>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-update-from-js.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-update-from-js.js index 4a419a5..b825331 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-update-from-js.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-update-from-js.js
@@ -8,7 +8,6 @@ (async function() { TestRunner.addResult( `Tests that changes to an inline style and ancestor/sibling className from JavaScript are reflected in the Styles pane and Elements tree.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-update-links-1.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-update-links-1.js index 25be2e8..7ec6a69d 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-update-links-1.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-update-links-1.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that links are updated properly when inserting a new property.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-update-links-2.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-update-links-2.js index 03ed9c0..b5fcb2b 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-update-links-2.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-update-links-2.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that links are updated properly when editing selector.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-update-links-3.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-update-links-3.js index 4d26de7..5a87264 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-update-links-3.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-update-links-3.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that links are updated properly after disabling property.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-update-links-4.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-update-links-4.js index 76d2b565..32a76de5 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-update-links-4.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-update-links-4.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that links are updated property when editing pseudo element property.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-url-linkify.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-url-linkify.js index 3305403..e1e692a7 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-url-linkify.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-url-linkify.js
@@ -10,7 +10,6 @@ (async function() { TestRunner.addResult( `Tests that URLs are linked to and completed correctly. Bugs 51663, 53171, 62643, 72373, 79905\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div id="local"></div>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-with-spaces-in-sourceURL.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-with-spaces-in-sourceURL.js index 4ec0e8ea..bf8a511d 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-with-spaces-in-sourceURL.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/styles-with-spaces-in-sourceURL.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Verifies that links for URLs with spaces displayed properly for matched styles.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div id="inspected"></div>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/svg-style.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/svg-style.js index 03b25cf..42842f3 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/svg-style.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/svg-style.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that svg:style does not crash when the related element is inspected.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.navigatePromise('resources/svg-style.xhtml');
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/undo-add-new-rule.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/undo-add-new-rule.js index b6b575b..5f3bb244 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/undo-add-new-rule.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/undo-add-new-rule.js
@@ -9,7 +9,6 @@ (async function() { TestRunner.addResult(`Tests that adding a new rule can be undone.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div class="foo" id="inspected" style="font-size: 12px">Text</div>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/undo-add-property.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/undo-add-property.js index 20d12d1..6f29464 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/undo-add-property.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/undo-add-property.js
@@ -9,7 +9,6 @@ (async function() { TestRunner.addResult(`Tests that adding a property is undone properly.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/undo-add-rule-crash.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/undo-add-rule-crash.js index e1a53a9..2e45484 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/undo-add-rule-crash.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles-4/undo-add-rule-crash.js
@@ -9,7 +9,6 @@ (async function() { TestRunner.addResult(`Tests that the inspected page does not crash after undoing a new rule addition. Bug 104806\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles/cancel-upon-invalid-property.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles/cancel-upon-invalid-property.js index 19e9e29..482e580 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles/cancel-upon-invalid-property.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles/cancel-upon-invalid-property.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Verifies that entering poor property value restores original text.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles/edit-css-with-source-url.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles/edit-css-with-source-url.js index 01e9a588..16d9ef1 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles/edit-css-with-source-url.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles/edit-css-with-source-url.js
@@ -10,7 +10,6 @@ (async function() { TestRunner.addResult(`Tests file system project mappings.\n`); await TestRunner.loadLegacyModule('sources'); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>#inspected {
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles/import-added-through-js-crash.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles/import-added-through-js-crash.js index 36d197f..bbb5061a 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles/import-added-through-js-crash.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles/import-added-through-js-crash.js
@@ -8,7 +8,6 @@ (async function() { TestRunner.addResult( `Tests that adding @import rules into a stylesheet through JavaScript does not crash the inspected page.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles/original-content-provider.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles/original-content-provider.js index 5fcfd4b..275bd543 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles/original-content-provider.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles/original-content-provider.js
@@ -10,7 +10,6 @@ (async function() { TestRunner.addResult( `Verifies that CSSStyleSheetHeader.originalContentProvider() indeed returns original content.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles/selector-line-deprecated.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles/selector-line-deprecated.js index 3e727e1..b5e1e15 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles/selector-line-deprecated.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles/selector-line-deprecated.js
@@ -9,7 +9,6 @@ (async function() { TestRunner.addResult(`Tests that selector line is computed correctly regardless of its start column. Bug 110732.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles/selector-line-sourcemap-header-deprecated.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles/selector-line-sourcemap-header-deprecated.js index bd0483f..df93496b 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles/selector-line-sourcemap-header-deprecated.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles/selector-line-sourcemap-header-deprecated.js
@@ -10,7 +10,6 @@ (async function() { TestRunner.addResult(`Tests that sourcemap is applied correctly when specified by the respective HTTP header.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div id="container">
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles/selector-line-sourcemap-header.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles/selector-line-sourcemap-header.js index 891f29f..a975279 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles/selector-line-sourcemap-header.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles/selector-line-sourcemap-header.js
@@ -8,7 +8,6 @@ (async function() { TestRunner.addResult(`Tests that sourcemap is applied correctly when specified by the respective HTTP header.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.loadLegacyModule('sources'); await TestRunner.showPanel('sources'); await TestRunner.showPanel('elements');
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles/selector-line.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles/selector-line.js index 045f094..7a764b0 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles/selector-line.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles/selector-line.js
@@ -8,7 +8,6 @@ (async function() { TestRunner.addResult(`Tests that selector line is computed correctly regardless of its start column. Bug 110732.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.loadLegacyModule('sources'); await TestRunner.showPanel('elements'); await TestRunner.showPanel('sources');
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles/show-all-properties.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles/show-all-properties.js index 5c08bdca..5e1917dd 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles/show-all-properties.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles/show-all-properties.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Verifies that large rules are truncated and can be fully expanded.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); var ruleText = '\n'; for (var i = 0; i < 200; i++)
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles/styles-do-not-add-inline-stylesheets-in-navigator.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles/styles-do-not-add-inline-stylesheets-in-navigator.js index 63ec0327..73ea707 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles/styles-do-not-add-inline-stylesheets-in-navigator.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles/styles-do-not-add-inline-stylesheets-in-navigator.js
@@ -11,7 +11,6 @@ (async function() { TestRunner.addResult(`Verify that inline stylesheets do not appear in navigator.\n`); await TestRunner.loadLegacyModule('sources'); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles/styles-mouse-test.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles/styles-mouse-test.js index 3d16994..37d396d 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles/styles-mouse-test.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles/styles-mouse-test.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that the styles sidebar can be used with a mouse.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles/styles-parse-invalid-properties.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles/styles-parse-invalid-properties.js index 93c64ae..0d7ec5c 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles/styles-parse-invalid-properties.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles/styles-parse-invalid-properties.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Verifies that invalid css still parses into properties.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles/styles-redirected-css.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles/styles-redirected-css.js index 897e260..bfc09024 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles/styles-redirected-css.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles/styles-redirected-css.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that styles in redirected css are editable.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div id="test_div">test</div>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles/stylesheet-tracking.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles/stylesheet-tracking.js index e0e26ec..55cba56 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles/stylesheet-tracking.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles/stylesheet-tracking.js
@@ -8,7 +8,6 @@ (async function() { TestRunner.addResult( `Tests that the styleSheetAdded and styleSheetRemoved events are reported into the frontend. Bug 105828. https://bugs.webkit.org/show_bug.cgi?id=105828\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.navigatePromise('resources/stylesheet-tracking-main.html'); await TestRunner.addStylesheetTag('stylesheet-tracking.css');
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles/undo-after-cancelled-editing.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles/undo-after-cancelled-editing.js index cd6d5d0..dd844c63 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles/undo-after-cancelled-editing.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles/undo-after-cancelled-editing.js
@@ -9,7 +9,6 @@ (async function() { TestRunner.addResult(`Verifies that cancelling property value editing doesn't affect undo stack.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles/undo-change-property.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles/undo-change-property.js index 20c6c880..4e2b67a9 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles/undo-change-property.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles/undo-change-property.js
@@ -9,7 +9,6 @@ (async function() { TestRunner.addResult(`Tests that changing a property is undone properly.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles/undo-property-toggle.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles/undo-property-toggle.js index 7145b57d..528cb6e 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles/undo-property-toggle.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles/undo-property-toggle.js
@@ -9,7 +9,6 @@ (async function() { TestRunner.addResult(`Tests that disabling style is undone properly.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div id="container" style="font-weight:bold">
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles/undo-set-selector-text.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles/undo-set-selector-text.js index f6a2e83..ffeb9041 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles/undo-set-selector-text.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles/undo-set-selector-text.js
@@ -9,7 +9,6 @@ (async function() { TestRunner.addResult(`Tests that setting selector text can be undone.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles/up-down-numerics-and-colors.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles/up-down-numerics-and-colors.js index 5e4cbdee..7c2823dd 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles/up-down-numerics-and-colors.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles/up-down-numerics-and-colors.js
@@ -9,7 +9,6 @@ (async function() { TestRunner.addResult(`Tests that numeric and color values are incremented/decremented correctly.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles/updates-during-dom-traversal.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles/updates-during-dom-traversal.js index 9f62f977..4fcf1e7 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles/updates-during-dom-traversal.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles/updates-during-dom-traversal.js
@@ -9,7 +9,6 @@ (async function() { TestRunner.addResult(`Tests that style updates are throttled during DOM traversal. Bug 77643.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div></div>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles/updates-throttled.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles/updates-throttled.js index d4800b5..746d145 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles/updates-throttled.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles/updates-throttled.js
@@ -11,7 +11,6 @@ (async function() { TestRunner.addResult(`Tests that Styles sidebar DOM rebuilds are throttled during consecutive updates. Bug 78086.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <div id="inspected"></div>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles/url-multiple-collapsing.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles/url-multiple-collapsing.js index 2c4f638..5089776 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles/url-multiple-collapsing.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles/url-multiple-collapsing.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that multiple URLs which are long are not squashed into a single URL. Bug 590172.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <style>
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/styles/xsl-transformed.js b/third_party/blink/web_tests/http/tests/devtools/elements/styles/xsl-transformed.js index 6760788..297fed2 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/styles/xsl-transformed.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/styles/xsl-transformed.js
@@ -9,7 +9,6 @@ TestRunner.addResult(`Tests that XSL-transformed documents in the main frame are rendered correctly in the Elements panel. https://bugs.webkit.org/show_bug.cgi?id=111313`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.navigatePromise('../styles/resources/xsl-transformed.xml');
diff --git a/third_party/blink/web_tests/http/tests/devtools/elements/user-properties.js b/third_party/blink/web_tests/http/tests/devtools/elements/user-properties.js index 1dcde22..fb47101 100644 --- a/third_party/blink/web_tests/http/tests/devtools/elements/user-properties.js +++ b/third_party/blink/web_tests/http/tests/devtools/elements/user-properties.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that DOMNode properly tracks own and descendants' user properties.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(` <!DOCTYPE html>
diff --git a/third_party/blink/web_tests/http/tests/devtools/inspect-element.js b/third_party/blink/web_tests/http/tests/devtools/inspect-element.js index 0a42a3b6..43798321 100644 --- a/third_party/blink/web_tests/http/tests/devtools/inspect-element.js +++ b/third_party/blink/web_tests/http/tests/devtools/inspect-element.js
@@ -12,7 +12,6 @@ TestRunner.addResult( `Tests that inspect element action works for iframe children (https://bugs.webkit.org/show_bug.cgi?id=76808).\n`); await TestRunner.loadLegacyModule('console'); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.addIframe('resources/inspect-element-iframe.html');
diff --git a/third_party/blink/web_tests/http/tests/devtools/inspect-iframe-from-different-domain.js b/third_party/blink/web_tests/http/tests/devtools/inspect-iframe-from-different-domain.js index e659036..54077d0 100644 --- a/third_party/blink/web_tests/http/tests/devtools/inspect-iframe-from-different-domain.js +++ b/third_party/blink/web_tests/http/tests/devtools/inspect-iframe-from-different-domain.js
@@ -8,7 +8,6 @@ (async function() { TestRunner.addResult( `Tests that style properties of elements in iframes loaded from domain different from the main document domain can be inspected. See bug 31587.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.navigatePromise("http://example.test:8000/devtools/resources/empty.html"); // NOTE: evaluateInPageAsync() waits on the promise at the end of block before // resolving the promise it returned. Other forms of the evaluate including
diff --git a/third_party/blink/web_tests/http/tests/devtools/modify-cross-domain-rule.js b/third_party/blink/web_tests/http/tests/devtools/modify-cross-domain-rule.js index 791fd62..6d2c306a 100644 --- a/third_party/blink/web_tests/http/tests/devtools/modify-cross-domain-rule.js +++ b/third_party/blink/web_tests/http/tests/devtools/modify-cross-domain-rule.js
@@ -9,7 +9,6 @@ 'use strict'; TestRunner.addResult( `Tests that modifying a rule in a stylesheet loaded from a different domain does not crash the renderer.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.loadHTML(` <div id="inspected">Text</div> `);
diff --git a/third_party/blink/web_tests/http/tests/devtools/oopif/oopif-elements-inspect.js b/third_party/blink/web_tests/http/tests/devtools/oopif/oopif-elements-inspect.js index 98dd5b2..1bd5cdc 100644 --- a/third_party/blink/web_tests/http/tests/devtools/oopif/oopif-elements-inspect.js +++ b/third_party/blink/web_tests/http/tests/devtools/oopif/oopif-elements-inspect.js
@@ -11,7 +11,6 @@ (async function() { TestRunner.addResult(`Tests that inspect request works for nested OOPIF elements.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); // Save time on style updates.
diff --git a/third_party/blink/web_tests/http/tests/devtools/oopif/oopif-elements-navigate-in.js b/third_party/blink/web_tests/http/tests/devtools/oopif/oopif-elements-navigate-in.js index 63e1114..5acdb36 100644 --- a/third_party/blink/web_tests/http/tests/devtools/oopif/oopif-elements-navigate-in.js +++ b/third_party/blink/web_tests/http/tests/devtools/oopif/oopif-elements-navigate-in.js
@@ -9,7 +9,6 @@ (async function() { TestRunner.addResult(`Tests that oopif iframes are rendered inline.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); // Save time on style updates.
diff --git a/third_party/blink/web_tests/http/tests/devtools/oopif/oopif-elements-navigate-out.js b/third_party/blink/web_tests/http/tests/devtools/oopif/oopif-elements-navigate-out.js index 2117d36..490337e8 100644 --- a/third_party/blink/web_tests/http/tests/devtools/oopif/oopif-elements-navigate-out.js +++ b/third_party/blink/web_tests/http/tests/devtools/oopif/oopif-elements-navigate-out.js
@@ -9,7 +9,6 @@ (async function() { TestRunner.addResult(`Tests that oopif iframes are rendered inline.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); // Save time on style updates.
diff --git a/third_party/blink/web_tests/http/tests/devtools/oopif/oopif-elements-nesting.js b/third_party/blink/web_tests/http/tests/devtools/oopif/oopif-elements-nesting.js index a4166382..a435f2d 100644 --- a/third_party/blink/web_tests/http/tests/devtools/oopif/oopif-elements-nesting.js +++ b/third_party/blink/web_tests/http/tests/devtools/oopif/oopif-elements-nesting.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that oopif iframes are rendered inline.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); // Save time on style updates.
diff --git a/third_party/blink/web_tests/http/tests/devtools/overlay-frame-crash.js b/third_party/blink/web_tests/http/tests/devtools/overlay-frame-crash.js index 8a77f64..bc4cc5c 100644 --- a/third_party/blink/web_tests/http/tests/devtools/overlay-frame-crash.js +++ b/third_party/blink/web_tests/http/tests/devtools/overlay-frame-crash.js
@@ -8,7 +8,6 @@ (async function() { TestRunner.addResult('Regression test for crbug.com/1058718\n'); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(`<div id='foo'>foo</div>`); await TestRunner.addScriptTag('network/resources/gc.js');
diff --git a/third_party/blink/web_tests/http/tests/devtools/portals/portals-elements-activate.js b/third_party/blink/web_tests/http/tests/devtools/portals/portals-elements-activate.js index c0c0133..8afa0bee 100644 --- a/third_party/blink/web_tests/http/tests/devtools/portals/portals-elements-activate.js +++ b/third_party/blink/web_tests/http/tests/devtools/portals/portals-elements-activate.js
@@ -11,7 +11,6 @@ (async function() { TestRunner.addResult( `Tests that element tree is updated after activation.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); // Save time on style updates.
diff --git a/third_party/blink/web_tests/http/tests/devtools/portals/portals-elements-nesting-after-adoption.js b/third_party/blink/web_tests/http/tests/devtools/portals/portals-elements-nesting-after-adoption.js index 988fff8..8dfe932 100644 --- a/third_party/blink/web_tests/http/tests/devtools/portals/portals-elements-nesting-after-adoption.js +++ b/third_party/blink/web_tests/http/tests/devtools/portals/portals-elements-nesting-after-adoption.js
@@ -10,7 +10,6 @@ (async function() { TestRunner.addResult( `Tests that adopted portal is rendered inline correctly.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); // Save time on style updates.
diff --git a/third_party/blink/web_tests/http/tests/devtools/portals/portals-elements-nesting.js b/third_party/blink/web_tests/http/tests/devtools/portals/portals-elements-nesting.js index acd26897..7e3ad55 100644 --- a/third_party/blink/web_tests/http/tests/devtools/portals/portals-elements-nesting.js +++ b/third_party/blink/web_tests/http/tests/devtools/portals/portals-elements-nesting.js
@@ -7,7 +7,6 @@ (async function() { TestRunner.addResult(`Tests that portals are rendered inline.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('elements'); // Save time on style updates.
diff --git a/third_party/blink/web_tests/http/tests/devtools/reveal-objects.js b/third_party/blink/web_tests/http/tests/devtools/reveal-objects.js index 825ea26..6664b237 100644 --- a/third_party/blink/web_tests/http/tests/devtools/reveal-objects.js +++ b/third_party/blink/web_tests/http/tests/devtools/reveal-objects.js
@@ -13,7 +13,6 @@ (async function() { TestRunner.addResult(`Tests object revelation in the UI.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.loadLegacyModule('sources'); await TestRunner.loadLegacyModule('resources'); await TestRunner.showPanel('elements');
diff --git a/third_party/blink/web_tests/http/tests/devtools/sources/debugger-breakpoints/dom-breakpoints-editing-dom-from-inspector.js b/third_party/blink/web_tests/http/tests/devtools/sources/debugger-breakpoints/dom-breakpoints-editing-dom-from-inspector.js index c4774e7..c0c7b180 100644 --- a/third_party/blink/web_tests/http/tests/devtools/sources/debugger-breakpoints/dom-breakpoints-editing-dom-from-inspector.js +++ b/third_party/blink/web_tests/http/tests/devtools/sources/debugger-breakpoints/dom-breakpoints-editing-dom-from-inspector.js
@@ -9,7 +9,6 @@ (async function() { TestRunner.addResult( `Tests that DOM debugger will not crash when editing DOM nodes from the Web Inspector. Chromium bug 249655\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.loadLegacyModule('sources'); await TestRunner.showPanel('sources'); await TestRunner.loadHTML(`
diff --git a/third_party/blink/web_tests/http/tests/devtools/sources/debugger-breakpoints/dom-breakpoints-reload.js b/third_party/blink/web_tests/http/tests/devtools/sources/debugger-breakpoints/dom-breakpoints-reload.js index 9ba534e2..c782305 100644 --- a/third_party/blink/web_tests/http/tests/devtools/sources/debugger-breakpoints/dom-breakpoints-reload.js +++ b/third_party/blink/web_tests/http/tests/devtools/sources/debugger-breakpoints/dom-breakpoints-reload.js
@@ -8,7 +8,6 @@ (async function() { TestRunner.addResult(`Tests DOM breakpoints.`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.loadLegacyModule('sources'); await TestRunner.loadLegacyModule('panels/browser_debugger'); await TestRunner.showPanel('sources'); await TestRunner.showPanel('elements');
diff --git a/third_party/blink/web_tests/http/tests/devtools/sources/debugger-breakpoints/dom-breakpoints.js b/third_party/blink/web_tests/http/tests/devtools/sources/debugger-breakpoints/dom-breakpoints.js index 6cbdbbe2..7cf8fde 100644 --- a/third_party/blink/web_tests/http/tests/devtools/sources/debugger-breakpoints/dom-breakpoints.js +++ b/third_party/blink/web_tests/http/tests/devtools/sources/debugger-breakpoints/dom-breakpoints.js
@@ -8,7 +8,6 @@ (async function() { TestRunner.addResult(`Tests DOM breakpoints.`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.loadLegacyModule('sources'); await TestRunner.showPanel('sources'); await TestRunner.showPanel('elements');
diff --git a/third_party/blink/web_tests/http/tests/devtools/sources/debugger-frameworks/frameworks-dom-xhr-event-breakpoints-1-expected.txt b/third_party/blink/web_tests/http/tests/devtools/sources/debugger-frameworks/frameworks-dom-xhr-event-breakpoints-1-expected.txt index 029df2b6..1f84674 100644 --- a/third_party/blink/web_tests/http/tests/devtools/sources/debugger-frameworks/frameworks-dom-xhr-event-breakpoints-1-expected.txt +++ b/third_party/blink/web_tests/http/tests/devtools/sources/debugger-frameworks/frameworks-dom-xhr-event-breakpoints-1-expected.txt
@@ -4,7 +4,7 @@ Running: testDOMBreakpoint Call stack: * 0) Framework.appendChild (framework.js:72) - 1) appendElement (frameworks-dom-xhr-event-breakpoints-1.js:28) + 1) appendElement (frameworks-dom-xhr-event-breakpoints-1.js:27) 2) (:1) [setTimeout] 0) (:1) @@ -13,7 +13,7 @@ Running: testXHRBreakpoint Call stack: * 0) Framework.sendXHR (framework.js:79) - 1) sendXHR (frameworks-dom-xhr-event-breakpoints-1.js:33) + 1) sendXHR (frameworks-dom-xhr-event-breakpoints-1.js:32) 2) (:1) [setTimeout] 0) (:1) @@ -21,20 +21,20 @@ Running: testEventListenerBreakpoint Call stack: - 0) testElementClicked (frameworks-dom-xhr-event-breakpoints-1.js:40) + 0) testElementClicked (frameworks-dom-xhr-event-breakpoints-1.js:39) * 1) Framework_bound (framework.js:105) * 2) Framework_eventListener (framework.js:86) - 3) addListenerAndClick (frameworks-dom-xhr-event-breakpoints-1.js:51) + 3) addListenerAndClick (frameworks-dom-xhr-event-breakpoints-1.js:50) 4) (:1) [setTimeout] 0) (:1) Executing Resume... Call stack: - 0) testElementClicked (frameworks-dom-xhr-event-breakpoints-1.js:40) + 0) testElementClicked (frameworks-dom-xhr-event-breakpoints-1.js:39) * 1) Framework_bound (framework.js:105) * 2) Framework_eventListener (framework.js:86) - 3) addListenerAndClick (frameworks-dom-xhr-event-breakpoints-1.js:57) + 3) addListenerAndClick (frameworks-dom-xhr-event-breakpoints-1.js:56) 4) (:1) [setTimeout] 0) (:1)
diff --git a/third_party/blink/web_tests/http/tests/devtools/sources/debugger-frameworks/frameworks-dom-xhr-event-breakpoints-1.js b/third_party/blink/web_tests/http/tests/devtools/sources/debugger-frameworks/frameworks-dom-xhr-event-breakpoints-1.js index 31783f2..925c644 100644 --- a/third_party/blink/web_tests/http/tests/devtools/sources/debugger-frameworks/frameworks-dom-xhr-event-breakpoints-1.js +++ b/third_party/blink/web_tests/http/tests/devtools/sources/debugger-frameworks/frameworks-dom-xhr-event-breakpoints-1.js
@@ -11,7 +11,6 @@ (async function() { TestRunner.addResult( `Tests framework black-boxing on DOM, XHR and Event breakpoints.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.loadLegacyModule('sources'); await TestRunner.showPanel('sources'); await TestRunner.loadHTML(`
diff --git a/third_party/blink/web_tests/http/tests/devtools/sources/debugger-frameworks/frameworks-dom-xhr-event-breakpoints-2-expected.txt b/third_party/blink/web_tests/http/tests/devtools/sources/debugger-frameworks/frameworks-dom-xhr-event-breakpoints-2-expected.txt index 60a9faf..aa4a0dd 100644 --- a/third_party/blink/web_tests/http/tests/devtools/sources/debugger-frameworks/frameworks-dom-xhr-event-breakpoints-2-expected.txt +++ b/third_party/blink/web_tests/http/tests/devtools/sources/debugger-frameworks/frameworks-dom-xhr-event-breakpoints-2-expected.txt
@@ -4,26 +4,26 @@ Running: testSteppingThroughEventListenerBreakpoint Executing StepOver... Call stack: + 0) addListenerAndClick (frameworks-dom-xhr-event-breakpoints-2.js:46) + 1) (:1) + [setTimeout] + 0) (:1) + +Executing StepOver... +Call stack: 0) addListenerAndClick (frameworks-dom-xhr-event-breakpoints-2.js:47) 1) (:1) [setTimeout] 0) (:1) Executing StepOver... -Call stack: - 0) addListenerAndClick (frameworks-dom-xhr-event-breakpoints-2.js:48) - 1) (:1) - [setTimeout] - 0) (:1) - -Executing StepOver... Executing StepOver... Executing StepOver... Call stack: - 0) testElementClicked (frameworks-dom-xhr-event-breakpoints-2.js:40) + 0) testElementClicked (frameworks-dom-xhr-event-breakpoints-2.js:39) * 1) Framework_bound (framework.js:105) * 2) Framework_eventListener (framework.js:86) - 3) addListenerAndClick (frameworks-dom-xhr-event-breakpoints-2.js:51) + 3) addListenerAndClick (frameworks-dom-xhr-event-breakpoints-2.js:50) 4) (:1) [setTimeout] 0) (:1) @@ -34,10 +34,10 @@ Executing StepOver... Executing StepOver... Call stack: - 0) testElementClicked (frameworks-dom-xhr-event-breakpoints-2.js:40) + 0) testElementClicked (frameworks-dom-xhr-event-breakpoints-2.js:39) * 1) Framework_bound (framework.js:105) * 2) Framework_eventListener (framework.js:86) - 3) addListenerAndClick (frameworks-dom-xhr-event-breakpoints-2.js:57) + 3) addListenerAndClick (frameworks-dom-xhr-event-breakpoints-2.js:56) 4) (:1) [setTimeout] 0) (:1) @@ -46,7 +46,7 @@ Executing StepOver... Executing StepOver... Call stack: - 0) addListenerAndClick (frameworks-dom-xhr-event-breakpoints-2.js:59) + 0) addListenerAndClick (frameworks-dom-xhr-event-breakpoints-2.js:58) 1) (:1) [setTimeout] 0) (:1) @@ -56,10 +56,10 @@ Running: testSteppingOutOnEventListenerBreakpoint Executing StepOut... Call stack: - 0) testElementClicked (frameworks-dom-xhr-event-breakpoints-2.js:40) + 0) testElementClicked (frameworks-dom-xhr-event-breakpoints-2.js:39) * 1) Framework_bound (framework.js:105) * 2) Framework_eventListener (framework.js:86) - 3) addListenerAndClick (frameworks-dom-xhr-event-breakpoints-2.js:51) + 3) addListenerAndClick (frameworks-dom-xhr-event-breakpoints-2.js:50) 4) (:1) [setTimeout] 0) (:1) @@ -67,17 +67,17 @@ Executing StepOut... Executing StepOut... Call stack: - 0) testElementClicked (frameworks-dom-xhr-event-breakpoints-2.js:40) + 0) testElementClicked (frameworks-dom-xhr-event-breakpoints-2.js:39) * 1) Framework_bound (framework.js:105) * 2) Framework_eventListener (framework.js:86) - 3) addListenerAndClick (frameworks-dom-xhr-event-breakpoints-2.js:57) + 3) addListenerAndClick (frameworks-dom-xhr-event-breakpoints-2.js:56) 4) (:1) [setTimeout] 0) (:1) Executing StepOut... Call stack: - 0) addListenerAndClick (frameworks-dom-xhr-event-breakpoints-2.js:58) + 0) addListenerAndClick (frameworks-dom-xhr-event-breakpoints-2.js:57) 1) (:1) [setTimeout] 0) (:1) @@ -87,28 +87,28 @@ Running: testSteppingOutOnEventListenerBreakpointAllBlackboxedButOne Executing StepOut... Call stack: - 0) testElementClicked (frameworks-dom-xhr-event-breakpoints-2.js:66) + 0) testElementClicked (frameworks-dom-xhr-event-breakpoints-2.js:65) * 1) Framework.safeRun (framework.js:8) * 2) Framework.safeRun (framework.js:10) * 3) Framework_bound (framework.js:105) * 4) Framework_eventListener (framework.js:86) - 5) inner (frameworks-dom-xhr-event-breakpoints-2.js:78) - 6) addFewBlackboxedListenersAndClick (frameworks-dom-xhr-event-breakpoints-2.js:84) + 5) inner (frameworks-dom-xhr-event-breakpoints-2.js:77) + 6) addFewBlackboxedListenersAndClick (frameworks-dom-xhr-event-breakpoints-2.js:83) 7) (:1) [setTimeout] 0) (:1) Executing StepOut... Call stack: - 0) inner (frameworks-dom-xhr-event-breakpoints-2.js:79) - 1) addFewBlackboxedListenersAndClick (frameworks-dom-xhr-event-breakpoints-2.js:84) + 0) inner (frameworks-dom-xhr-event-breakpoints-2.js:78) + 1) addFewBlackboxedListenersAndClick (frameworks-dom-xhr-event-breakpoints-2.js:83) 2) (:1) [setTimeout] 0) (:1) Executing StepOut... Call stack: - 0) addFewBlackboxedListenersAndClick (frameworks-dom-xhr-event-breakpoints-2.js:84) + 0) addFewBlackboxedListenersAndClick (frameworks-dom-xhr-event-breakpoints-2.js:83) 1) (:1) [setTimeout] 0) (:1)
diff --git a/third_party/blink/web_tests/http/tests/devtools/sources/debugger-frameworks/frameworks-dom-xhr-event-breakpoints-2.js b/third_party/blink/web_tests/http/tests/devtools/sources/debugger-frameworks/frameworks-dom-xhr-event-breakpoints-2.js index 7c4569e..ab7ead3 100644 --- a/third_party/blink/web_tests/http/tests/devtools/sources/debugger-frameworks/frameworks-dom-xhr-event-breakpoints-2.js +++ b/third_party/blink/web_tests/http/tests/devtools/sources/debugger-frameworks/frameworks-dom-xhr-event-breakpoints-2.js
@@ -11,7 +11,6 @@ (async function() { TestRunner.addResult( `Tests framework black-boxing on DOM, XHR and Event breakpoints.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.loadLegacyModule('sources'); await TestRunner.showPanel('sources'); await TestRunner.loadHTML(`
diff --git a/third_party/blink/web_tests/http/tests/devtools/sources/debugger-pause/pause-on-elements-panel.js b/third_party/blink/web_tests/http/tests/devtools/sources/debugger-pause/pause-on-elements-panel.js index 6d88c898..1ec3e1d 100644 --- a/third_party/blink/web_tests/http/tests/devtools/sources/debugger-pause/pause-on-elements-panel.js +++ b/third_party/blink/web_tests/http/tests/devtools/sources/debugger-pause/pause-on-elements-panel.js
@@ -9,7 +9,6 @@ (async function() { TestRunner.addResult( `Tests that debugger pause button works on Elements panel after a DOM node highlighting. Chromium bug 433366\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.loadLegacyModule('sources'); await TestRunner.showPanel('sources'); await TestRunner.loadHTML(`
diff --git a/third_party/blink/web_tests/http/tests/devtools/sources/debugger-pause/skip-pauses-until-reload.js b/third_party/blink/web_tests/http/tests/devtools/sources/debugger-pause/skip-pauses-until-reload.js index 4dcb1a0c..09961913 100644 --- a/third_party/blink/web_tests/http/tests/devtools/sources/debugger-pause/skip-pauses-until-reload.js +++ b/third_party/blink/web_tests/http/tests/devtools/sources/debugger-pause/skip-pauses-until-reload.js
@@ -10,7 +10,6 @@ (async function() { TestRunner.addResult( `Tests that 'skip all pauses' mode blocks breakpoint and gets cancelled right at page reload.`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.loadLegacyModule('sources'); await TestRunner.loadLegacyModule('panels/browser_debugger'); await TestRunner.loadLegacyModule('console'); await TestRunner.showPanel('sources');
diff --git a/third_party/blink/web_tests/http/tests/devtools/sources/debugger-ui/selected-call-frame-after-formatting-source.js b/third_party/blink/web_tests/http/tests/devtools/sources/debugger-ui/selected-call-frame-after-formatting-source.js index 177fd0d0..24968ef8 100644 --- a/third_party/blink/web_tests/http/tests/devtools/sources/debugger-ui/selected-call-frame-after-formatting-source.js +++ b/third_party/blink/web_tests/http/tests/devtools/sources/debugger-ui/selected-call-frame-after-formatting-source.js
@@ -12,7 +12,6 @@ (async function() { TestRunner.addResult(`Tests selected call frame does not change when pretty-print is toggled.\n`); await TestRunner.loadLegacyModule('sources'); - await TestRunner.loadLegacyModule('elements'); await TestRunner.showPanel('sources'); await TestRunner.evaluateInPagePromise(` function testFunction()
diff --git a/third_party/blink/web_tests/http/tests/devtools/sources/debugger-ui/watch-expressions-preserve-expansion.js b/third_party/blink/web_tests/http/tests/devtools/sources/debugger-ui/watch-expressions-preserve-expansion.js index dc3b868ad..6b5e565 100644 --- a/third_party/blink/web_tests/http/tests/devtools/sources/debugger-ui/watch-expressions-preserve-expansion.js +++ b/third_party/blink/web_tests/http/tests/devtools/sources/debugger-ui/watch-expressions-preserve-expansion.js
@@ -12,7 +12,6 @@ (async function() { TestRunner.addResult( `Test that watch expressions expansion state is restored after update.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.loadLegacyModule('sources'); await TestRunner.showPanel('sources'); await TestRunner.evaluateInPagePromise(`
diff --git a/third_party/blink/web_tests/http/tests/devtools/template-content-inspect-crash.js b/third_party/blink/web_tests/http/tests/devtools/template-content-inspect-crash.js index 0cf6c67..ce816c4 100644 --- a/third_party/blink/web_tests/http/tests/devtools/template-content-inspect-crash.js +++ b/third_party/blink/web_tests/http/tests/devtools/template-content-inspect-crash.js
@@ -8,7 +8,6 @@ (async function() { TestRunner.addResult(`This test verifies that template's content DocumentFragment is accessible from DevTools.\n`); - await TestRunner.loadLegacyModule('elements'); await TestRunner.loadLegacyModule('console'); await TestRunner.showPanel('elements'); await TestRunner.loadHTML(`
diff --git a/third_party/blink/web_tests/http/tests/inspector-protocol/prerender/report-prerender-bad-http-cancellation-expected.txt b/third_party/blink/web_tests/http/tests/inspector-protocol/prerender/report-prerender-bad-http-cancellation-expected.txt deleted file mode 100644 index 671842b..0000000 --- a/third_party/blink/web_tests/http/tests/inspector-protocol/prerender/report-prerender-bad-http-cancellation-expected.txt +++ /dev/null
@@ -1,16 +0,0 @@ -Test that prerender navigations reports bad http status failure on triggering -{ - method : Preload.prerenderAttemptCompleted - params : { - finalStatus : NavigationBadHttpStatus - initiatingFrameId : <string> - key : { - action : Prerender - loaderId : <string> - url : http://127.0.0.1:8000/echo?status=204 - } - prerenderingUrl : http://127.0.0.1:8000/echo?status=204 - } - sessionId : <string> -} -
diff --git a/third_party/blink/web_tests/http/tests/inspector-protocol/prerender/report-prerender-bad-http-cancellation.js b/third_party/blink/web_tests/http/tests/inspector-protocol/prerender/report-prerender-bad-http-cancellation.js deleted file mode 100644 index 0a30686..0000000 --- a/third_party/blink/web_tests/http/tests/inspector-protocol/prerender/report-prerender-bad-http-cancellation.js +++ /dev/null
@@ -1,19 +0,0 @@ -(async function(testRunner) { - const {tabTargetSession} = await testRunner.startBlankWithTabTarget( - `Test that prerender navigations reports bad http status failure on triggering`); - - const childTargetManager = - new TestRunner.ChildTargetManager(testRunner, tabTargetSession); - await childTargetManager.startAutoAttach(); - const session1 = childTargetManager.findAttachedSessionPrimaryMainFrame(); - const dp1 = session1.protocol; - await dp1.Preload.enable(); - - // Navigate to speculation rules Prerender Page. - session1.navigate('resources/bad-http-prerender.html'); - testRunner.log( - await dp1.Preload.oncePrerenderAttemptCompleted(), '', - ['loaderId', 'initiatingFrameId', 'sessionId']); - - testRunner.completeTest(); -});
diff --git a/third_party/blink/web_tests/http/tests/inspector-protocol/prerender/report-prerender-cancellation-status-expected.txt b/third_party/blink/web_tests/http/tests/inspector-protocol/prerender/report-prerender-cancellation-status-expected.txt deleted file mode 100644 index 356216c..0000000 --- a/third_party/blink/web_tests/http/tests/inspector-protocol/prerender/report-prerender-cancellation-status-expected.txt +++ /dev/null
@@ -1,16 +0,0 @@ -Test that prerender navigations report the final status -{ - method : Preload.prerenderAttemptCompleted - params : { - finalStatus : TriggerDestroyed - initiatingFrameId : <string> - key : { - action : Prerender - loaderId : <string> - url : http://127.0.0.1:8000/inspector-protocol/prerender/resources/empty.html - } - prerenderingUrl : http://127.0.0.1:8000/inspector-protocol/prerender/resources/empty.html - } - sessionId : <string> -} -
diff --git a/third_party/blink/web_tests/http/tests/inspector-protocol/prerender/report-prerender-cancellation-status.js b/third_party/blink/web_tests/http/tests/inspector-protocol/prerender/report-prerender-cancellation-status.js deleted file mode 100644 index 95b0bc838..0000000 --- a/third_party/blink/web_tests/http/tests/inspector-protocol/prerender/report-prerender-cancellation-status.js +++ /dev/null
@@ -1,25 +0,0 @@ - // This test makes sure that the inspector is notified of the final status when - // prerendering is cancelled for some reasons. To emulate the cancellation, - // this test navigates the prerender trigger page to an unrelated page so that - // prerendering is cancelled with the `Destroyed` final status. - (async function(testRunner) { - const {tabTargetSession} = await testRunner.startBlankWithTabTarget( - `Test that prerender navigations report the final status`); - - const childTargetManager = - new TestRunner.ChildTargetManager(testRunner, tabTargetSession); - await childTargetManager.startAutoAttach(); - const session1 = childTargetManager.findAttachedSessionPrimaryMainFrame(); - const dp1 = session1.protocol; - await dp1.Preload.enable(); - - // Navigate to speculation rules Prerender Page. - await session1.navigate('resources/simple-prerender.html'); - session1.navigate('resources/empty.html?navigateaway'); - - testRunner.log( - await dp1.Preload.oncePrerenderAttemptCompleted(), '', - ['loaderId', 'initiatingFrameId', 'sessionId']); - - testRunner.completeTest(); - });
diff --git a/third_party/blink/web_tests/http/tests/inspector-protocol/prerender/report-prerender-final-status-expected.txt b/third_party/blink/web_tests/http/tests/inspector-protocol/prerender/report-prerender-final-status-expected.txt deleted file mode 100644 index 673c8543..0000000 --- a/third_party/blink/web_tests/http/tests/inspector-protocol/prerender/report-prerender-final-status-expected.txt +++ /dev/null
@@ -1,16 +0,0 @@ -Test that prerender navigations report the final status -{ - method : Preload.prerenderAttemptCompleted - params : { - finalStatus : Activated - initiatingFrameId : <string> - key : { - action : Prerender - loaderId : <string> - url : http://127.0.0.1:8000/inspector-protocol/prerender/resources/empty.html - } - prerenderingUrl : http://127.0.0.1:8000/inspector-protocol/prerender/resources/empty.html - } - sessionId : <string> -} -
diff --git a/third_party/blink/web_tests/http/tests/inspector-protocol/prerender/report-prerender-final-status.js b/third_party/blink/web_tests/http/tests/inspector-protocol/prerender/report-prerender-final-status.js deleted file mode 100644 index 2cdcb4f..0000000 --- a/third_party/blink/web_tests/http/tests/inspector-protocol/prerender/report-prerender-final-status.js +++ /dev/null
@@ -1,26 +0,0 @@ -(async function(testRunner) { - const {tabTargetSession} = await testRunner.startBlankWithTabTarget( - `Test that prerender navigations report the final status`); - - const childTargetManager = - new TestRunner.ChildTargetManager(testRunner, tabTargetSession); - await childTargetManager.startAutoAttach(); - const session1 = childTargetManager.findAttachedSessionPrimaryMainFrame(); - const dp1 = session1.protocol; - await dp1.Preload.enable(); - - // Navigate to speculation rules Prerender Page. - session1.navigate('resources/simple-prerender.html'); - await dp1.Preload.oncePrerenderStatusUpdated(e => e.params.status === 'Ready'); - - const session2 = childTargetManager.findAttachedSessionPrerender(); - const dp2 = session2.protocol; - await dp2.Preload.enable(); - - session1.evaluate(`document.getElementById('link').click()`); - testRunner.log( - await dp2.Preload.oncePrerenderAttemptCompleted(), '', - ['loaderId', 'initiatingFrameId', 'sessionId']); - - testRunner.completeTest(); -});
diff --git a/third_party/blink/web_tests/http/tests/inspector-protocol/prerender/report-prerender-maximum-exceeded-expected.txt b/third_party/blink/web_tests/http/tests/inspector-protocol/prerender/report-prerender-maximum-exceeded-expected.txt deleted file mode 100644 index 06a74a0c..0000000 --- a/third_party/blink/web_tests/http/tests/inspector-protocol/prerender/report-prerender-maximum-exceeded-expected.txt +++ /dev/null
@@ -1,16 +0,0 @@ -Test that prerender navigations reports failure on triggering -{ - method : Preload.prerenderAttemptCompleted - params : { - finalStatus : MaxNumOfRunningEagerPrerendersExceeded - initiatingFrameId : <string> - key : { - action : Prerender - loaderId : <string> - url : http://127.0.0.1:8000/inspector-protocol/prerender/resources/empty.html?exceeded - } - prerenderingUrl : http://127.0.0.1:8000/inspector-protocol/prerender/resources/empty.html?exceeded - } - sessionId : <string> -} -
diff --git a/third_party/blink/web_tests/http/tests/inspector-protocol/prerender/report-prerender-maximum-exceeded.js b/third_party/blink/web_tests/http/tests/inspector-protocol/prerender/report-prerender-maximum-exceeded.js deleted file mode 100644 index 2081c571..0000000 --- a/third_party/blink/web_tests/http/tests/inspector-protocol/prerender/report-prerender-maximum-exceeded.js +++ /dev/null
@@ -1,19 +0,0 @@ -(async function(testRunner) { - const {tabTargetSession} = await testRunner.startBlankWithTabTarget( - `Test that prerender navigations reports failure on triggering`); - - const childTargetManager = - new TestRunner.ChildTargetManager(testRunner, tabTargetSession); - await childTargetManager.startAutoAttach(); - const session1 = childTargetManager.findAttachedSessionPrimaryMainFrame(); - const dp1 = session1.protocol; - await dp1.Preload.enable(); - - // Navigate to speculation rules Prerender Page. - session1.navigate('resources/multiple-prerender.html'); - testRunner.log( - await dp1.Preload.oncePrerenderAttemptCompleted(), '', - ['loaderId', 'initiatingFrameId', 'sessionId']); - - testRunner.completeTest(); -});
diff --git a/third_party/blink/web_tests/http/tests/inspector-protocol/runtime/generate-webdriver-value-expected.txt b/third_party/blink/web_tests/http/tests/inspector-protocol/runtime/generate-webdriver-value-expected.txt deleted file mode 100644 index 88244b39..0000000 --- a/third_party/blink/web_tests/http/tests/inspector-protocol/runtime/generate-webdriver-value-expected.txt +++ /dev/null
@@ -1,306 +0,0 @@ -Tests `generateWebDriverValue` provides proper `webDriverValue` format - -Testing 'undefined': -{ - type : undefined -} - -Testing 'null': -{ - type : null -} - -Testing '"some_string"': -{ - type : string - value : some_string -} - -Testing '"2"': -{ - type : string - value : 2 -} - -Testing 'Number.NaN': -{ - type : number - value : NaN -} - -Testing '-0': -{ - type : number - value : -0 -} - -Testing 'Infinity': -{ - type : number - value : Infinity -} - -Testing '-Infinity': -{ - type : number - value : -Infinity -} - -Testing '3': -{ - type : number - value : 3 -} - -Testing '1.4': -{ - type : number - value : 1.4 -} - -Testing 'true': -{ - type : boolean - value : true -} - -Testing 'false': -{ - type : boolean - value : false -} - -Testing '42n': -{ - type : bigint - value : 42 -} - -Testing 'Symbol("foo")': -{ - type : symbol -} - -Testing '[1, "foo", true, new RegExp(/foo/g), [1]]': -{ - type : array - value : [ - [0] : { - type : number - value : 1 - } - [1] : { - type : string - value : foo - } - [2] : { - type : boolean - value : true - } - [3] : { - type : regexp - value : { - flags : g - pattern : foo - } - } - [4] : { - type : array - } - ] -} - -Testing '({"foo": {"bar": "baz"}, "qux": "quux"})': -{ - type : object - value : [ - [0] : [ - [0] : foo - [1] : { - type : object - } - ] - [1] : [ - [0] : qux - [1] : { - type : string - value : quux - } - ] - ] -} - -Testing '(()=>{})': -{ - type : function -} - -Testing '(function(){})': -{ - type : function -} - -Testing '(async ()=>{})': -{ - type : function -} - -Testing '(async function(){})': -{ - type : function -} - -Testing 'new RegExp(/foo/g)': -{ - type : regexp - value : { - flags : g - pattern : foo - } -} - -Testing 'new Date(1654004849000)': -{ - type : date - value : 2022-05-31T13:47:29.000Z -} - -Testing 'new Map([[1, 2], ["foo", "bar"], [true, false], ["baz", [1]]])': -{ - type : map - value : [ - [0] : [ - [0] : { - type : number - value : 1 - } - [1] : { - type : number - value : 2 - } - ] - [1] : [ - [0] : foo - [1] : { - type : string - value : bar - } - ] - [2] : [ - [0] : { - type : boolean - value : true - } - [1] : { - type : boolean - value : false - } - ] - [3] : [ - [0] : baz - [1] : { - type : array - } - ] - ] -} - -Testing 'new Set([1, "foo", true, [1], new Map([[1,2]])])': -{ - type : set - value : [ - [0] : { - type : number - value : 1 - } - [1] : { - type : string - value : foo - } - [2] : { - type : boolean - value : true - } - [3] : { - type : array - } - [4] : { - type : map - } - ] -} - -Testing 'new WeakMap()': -{ - type : weakmap -} - -Testing 'new WeakSet()': -{ - type : weakset -} - -Testing 'new Error("SOME_ERROR_TEXT")': -{ - type : error -} - -Testing 'Promise.resolve()': -{ - type : promise -} - -Testing 'new Int32Array()': -{ - type : typedarray -} - -Testing 'new ArrayBuffer()': -{ - type : arraybuffer -} - -Testing 'document.body': -{ - type : node - value : { - attributes : { - } - backendNodeId : <number> - childNodeCount : 1 - localName : body - namespaceURI : http://www.w3.org/1999/xhtml - nodeType : 1 - shadowRoot : null - } -} - -Testing 'window': -{ - type : window - value : { - context : <string> - } -} - -Testing 'document.querySelector("body > div")': -{ - type : node - value : { - attributes : { - some_attr_name : some_attr_value - } - backendNodeId : <number> - childNodeCount : 2 - localName : div - namespaceURI : http://www.w3.org/1999/xhtml - nodeType : 1 - shadowRoot : null - } -} - -Testing 'new URL("http://example.com")': -{ - type : platformobject -} -
diff --git a/third_party/blink/web_tests/http/tests/inspector-protocol/runtime/generate-webdriver-value.js b/third_party/blink/web_tests/http/tests/inspector-protocol/runtime/generate-webdriver-value.js deleted file mode 100644 index a8b8082..0000000 --- a/third_party/blink/web_tests/http/tests/inspector-protocol/runtime/generate-webdriver-value.js +++ /dev/null
@@ -1,61 +0,0 @@ -(async function (testRunner) { - const { dp } = await testRunner.startHTML( - '<div some_attr_name="some_attr_value">some text<h2>some another text</h2></div>', - 'Tests `generateWebDriverValue` provides proper `webDriverValue` format'); - - await dp.Runtime.enable(); - - // Test ECMAScript primitives. - await testExpression('undefined'); - await testExpression('null'); - await testExpression('"some_string"'); - await testExpression('"2"'); - await testExpression('Number.NaN'); - await testExpression('-0'); - await testExpression('Infinity'); - await testExpression('-Infinity'); - await testExpression('3'); - await testExpression('1.4'); - await testExpression('true'); - await testExpression('false'); - await testExpression('42n'); - await testExpression('Symbol("foo")'); - // Test ECMAScript non-primitives. - await testExpression('[1, "foo", true, new RegExp(/foo/g), [1]]',); - await testExpression('({"foo": {"bar": "baz"}, "qux": "quux"})',); - await testExpression('(()=>{})'); - await testExpression('(function(){})'); - await testExpression('(async ()=>{})'); - await testExpression('(async function(){})'); - await testExpression('new RegExp(/foo/g)'); - await testExpression('new Date(1654004849000)'); - await testExpression('new Map([[1, 2], ["foo", "bar"], [true, false], ["baz", [1]]])',); - await testExpression('new Set([1, "foo", true, [1], new Map([[1,2]])])'); - await testExpression('new WeakMap()'); - await testExpression('new WeakSet()'); - await testExpression('new Error("SOME_ERROR_TEXT")'); - await testExpression('Promise.resolve()'); - await testExpression('new Int32Array()'); - await testExpression('new ArrayBuffer()'); - // Test non-ECMAScript platform objects. - await testExpression('document.body') - await testExpression('window') - await testExpression('document.querySelector("body > div")') - await testExpression('new URL("http://example.com")') - - testRunner.completeTest(); - - async function testExpression(expression) { - testRunner.log(`\nTesting '${expression}':`); - - const evalResult = await dp.Runtime.evaluate({ - expression: expression, - generateWebDriverValue: true, - }); - testRunner.log( - evalResult.result?.result?.webDriverValue ?? evalResult, - undefined, - TestRunner.extendStabilizeNames(['context']), - ); - } -})
diff --git a/third_party/blink/web_tests/http/tests/inspector-protocol/tracing/prerender.js b/third_party/blink/web_tests/http/tests/inspector-protocol/tracing/prerender.js index 7843ea5f..eb4c848 100644 --- a/third_party/blink/web_tests/http/tests/inspector-protocol/tracing/prerender.js +++ b/third_party/blink/web_tests/http/tests/inspector-protocol/tracing/prerender.js
@@ -30,7 +30,7 @@ primarySession.evaluate(`document.getElementById('link').click()`); await Promise.all([ - pp.Preload.oncePrerenderAttemptCompleted(), + pp.Preload.oncePrerenderStatusUpdated(e => e.params.status === 'Success'), pp.Page.setLifecycleEventsEnabled({ enabled: true }), pp.Page.onceLifecycleEvent(event => event.params.name === 'load'), ]);
diff --git a/third_party/catapult b/third_party/catapult index 7c462e0..0a5cbdd 160000 --- a/third_party/catapult +++ b/third_party/catapult
@@ -1 +1 @@ -Subproject commit 7c462e0d55cd87448af2c1ba66ce223e5294fe0c +Subproject commit 0a5cbdd2203b8766328beb3f715db830cac8cbd0
diff --git a/third_party/dawn b/third_party/dawn index dc5ac88..550366a 160000 --- a/third_party/dawn +++ b/third_party/dawn
@@ -1 +1 @@ -Subproject commit dc5ac88f77bb62fe15111f355751055fd16e0c62 +Subproject commit 550366adce6142eb563c4e2f78087e8888579022
diff --git a/third_party/depot_tools b/third_party/depot_tools index 0827dd2..d95084e 160000 --- a/third_party/depot_tools +++ b/third_party/depot_tools
@@ -1 +1 @@ -Subproject commit 0827dd28f1c4d25f3cd90776f7e221cba6243c2f +Subproject commit d95084e85101b865a8f1d213b6fbe3c11384e82f
diff --git a/third_party/devtools-frontend-internal b/third_party/devtools-frontend-internal index e0aad9e..9ac22f6 160000 --- a/third_party/devtools-frontend-internal +++ b/third_party/devtools-frontend-internal
@@ -1 +1 @@ -Subproject commit e0aad9e4d829ac0dd9f1ee4a2e67c10650a7d266 +Subproject commit 9ac22f6c6053321814e07cf62149bc56d7f462ae
diff --git a/third_party/devtools-frontend/src b/third_party/devtools-frontend/src index a2fe80d..862a31e 160000 --- a/third_party/devtools-frontend/src +++ b/third_party/devtools-frontend/src
@@ -1 +1 @@ -Subproject commit a2fe80db51e2111d5043181671e2ae52b8b2d79d +Subproject commit 862a31efb285b114ce760b52d681d4295e65cc75
diff --git a/third_party/freetype/README.chromium b/third_party/freetype/README.chromium index ec1a2d4..d87f3ee 100644 --- a/third_party/freetype/README.chromium +++ b/third_party/freetype/README.chromium
@@ -1,7 +1,7 @@ Name: FreeType URL: http://www.freetype.org/ -Version: VER-2-13-2-30-g49781ab72 -Revision: 49781ab72b2dfd0f78172023921d08d08f323ade +Version: VER-2-13-2-31-ge0e5b838e +Revision: e0e5b838e508aa4043c0e27d8403ab7be2a46153 CPEPrefix: cpe:/a:freetype:freetype:2.13.2 License: Custom license "inspired by the BSD, Artistic, and IJG (Independent JPEG Group) licenses"
diff --git a/third_party/freetype/src b/third_party/freetype/src index 49781ab..e0e5b838 160000 --- a/third_party/freetype/src +++ b/third_party/freetype/src
@@ -1 +1 @@ -Subproject commit 49781ab72b2dfd0f78172023921d08d08f323ade +Subproject commit e0e5b838e508aa4043c0e27d8403ab7be2a46153
diff --git a/third_party/perfetto b/third_party/perfetto index c478eb8..f92196d 160000 --- a/third_party/perfetto +++ b/third_party/perfetto
@@ -1 +1 @@ -Subproject commit c478eb8ffb74aa961c2320efb2c901a5d1d69cba +Subproject commit f92196dfb6d701a3e0f7b9ea4042b193c4487e15
diff --git a/third_party/skia b/third_party/skia index b961fc3..90302ab1 160000 --- a/third_party/skia +++ b/third_party/skia
@@ -1 +1 @@ -Subproject commit b961fc35371508346c7552cb8f79651f154f10c3 +Subproject commit 90302ab19d5d81486cd460e2b36e41c8ffb91607
diff --git a/third_party/wayland-protocols/unstable/remote-shell/remote-shell-unstable-v2.xml b/third_party/wayland-protocols/unstable/remote-shell/remote-shell-unstable-v2.xml index dec0247..9c6733d6 100644 --- a/third_party/wayland-protocols/unstable/remote-shell/remote-shell-unstable-v2.xml +++ b/third_party/wayland-protocols/unstable/remote-shell/remote-shell-unstable-v2.xml
@@ -934,7 +934,7 @@ </request> </interface> - <interface name="zcr_toast_surface_v2" version="1"> + <interface name="zcr_toast_surface_v2" version="2"> <description summary="A toast window"> An interface that may be implemented by a wl_surface to host toast contents. @@ -968,6 +968,21 @@ <arg name="width" type="int"/> <arg name="height" type="int"/> </request> + + <!-- Version 2 additions --> + <request name="set_scale_factor" since="2"> + <description summary="Allows the client to set the scale factor for the future buffer commits."> + The client has a 32-bit float scale factor that is associated with each + remote surface. This scale factor must be propagated exactly to exo. To + do so we reinterpret_cast into a 32-bit uint and later cast back into a + float. This is because wayland does not support native transport of + floats. As different CPU architectures may use different endian + representations for IEEE 754 floats, this protocol implicitly assumes + that the caller and receiver are the same machine. + This is double buffered state and will be applied in the next commit. + </description> + <arg name="scale_factor_as_uint" type="uint"/> + </request> </interface> <interface name="zcr_remote_output_v2" version="1">
diff --git a/third_party/webgpu-cts/src b/third_party/webgpu-cts/src index a50d090..121e671 160000 --- a/third_party/webgpu-cts/src +++ b/third_party/webgpu-cts/src
@@ -1 +1 @@ -Subproject commit a50d0906eedac478595363ad1342787a581f9e2e +Subproject commit 121e6711d9f3d84c2c537791fd49de317a6046f6
diff --git a/tools/clang/plugins/RawPtrManualPathsToIgnore.h b/tools/clang/plugins/RawPtrManualPathsToIgnore.h index 32f5ee58..d2dddef85 100644 --- a/tools/clang/plugins/RawPtrManualPathsToIgnore.h +++ b/tools/clang/plugins/RawPtrManualPathsToIgnore.h
@@ -96,9 +96,9 @@ // RewriteRawPtrFields.cpp explicitly includes third_party/blink // (because it is in the same git repository as the rest of Chromium), // but we go ahead and exclude most of it below (as Renderer-only code). - "third_party/blink/renderer/core/", - "third_party/blink/renderer/platform/heap/", - "third_party/blink/renderer/platform/wtf/", + "/renderer/", // (e.g. //content/renderer/ or + // //components/visitedlink/renderer/ + // or //third_party/blink/renderer)", "third_party/blink/public/web/", // TODO: Consider renaming this directory // to", // public/renderer?",
diff --git a/tools/mb/mb_config.pyl b/tools/mb/mb_config.pyl index 9b1c61b..508b8bf 100644 --- a/tools/mb/mb_config.pyl +++ b/tools/mb/mb_config.pyl
@@ -2337,7 +2337,7 @@ ], 'chromeos_betty-arc-r_include_unwind_tables_official_use_fake_dbus_clients_reclient': [ 'chromeos_device_reclient', 'betty-arc-r', 'include_unwind_tables', 'official', 'use_fake_dbus_clients', - 'also_build_lacros_chrome_for_architecture_amd64', 'ozone_headless' + 'also_build_lacros_chrome_for_architecture_amd64', 'ozone_headless', ], 'chromeos_betty-pi-arc_cfi_thin_lto_official': [ @@ -2361,13 +2361,16 @@ ], 'chromeos_brya_include_unwind_tables_official_dchecks_skylab_reclient': [ - 'chromeos_device_reclient', 'brya', 'include_unwind_tables', 'official', 'dcheck_always_on', 'is_skylab', 'ozone_headless', + 'chromeos_device_reclient', 'brya', 'include_unwind_tables', 'official', 'dcheck_always_on', 'is_skylab', 'ozone_headless', + 'also_build_lacros_chrome_for_architecture_amd64', ], 'chromeos_brya_include_unwind_tables_official_skylab': [ 'chromeos_device', 'brya', 'include_unwind_tables', 'official', 'is_skylab', 'ozone_headless', + 'also_build_lacros_chrome_for_architecture_amd64', ], 'chromeos_brya_include_unwind_tables_official_skylab_reclient': [ 'chromeos_device_reclient', 'brya', 'include_unwind_tables', 'official', 'is_skylab', 'ozone_headless', + 'also_build_lacros_chrome_for_architecture_amd64', ], 'chromeos_eve-arc-r_include_unwind_tables_official': [ @@ -2398,6 +2401,7 @@ ], 'chromeos_jacuzzi_include_unwind_tables_official_dchecks_skylab_reclient': [ 'chromeos_device_reclient', 'jacuzzi', 'include_unwind_tables', 'official', 'dcheck_always_on', 'is_skylab', + 'also_build_lacros_chrome_for_architecture_arm', ], 'chromeos_jacuzzi_include_unwind_tables_official_reclient': [ 'chromeos_device_reclient', 'jacuzzi', 'include_unwind_tables', 'official', @@ -2408,6 +2412,7 @@ ], 'chromeos_jacuzzi_include_unwind_tables_official_skylab_reclient': [ 'chromeos_device_reclient', 'jacuzzi', 'include_unwind_tables', 'official', 'is_skylab', + 'also_build_lacros_chrome_for_architecture_arm', ], 'chromeos_js_coverage_reclient': [ @@ -2436,10 +2441,12 @@ ], 'chromeos_octopus_include_unwind_tables_official_skylab': [ 'chromeos_device', 'octopus', 'include_unwind_tables', 'official', 'is_skylab', + 'also_build_lacros_chrome_for_architecture_amd64', ], 'chromeos_octopus_include_unwind_tables_official_skylab_reclient': [ 'chromeos_device_reclient', 'octopus', 'include_unwind_tables', 'official', 'is_skylab', + 'also_build_lacros_chrome_for_architecture_amd64', ], 'chromeos_reven_include_unwind_tables_official_dchecks': [ @@ -2453,16 +2460,20 @@ 'chromeos_trogdor_include_unwind_tables_official_skylab': [ 'chromeos_device', 'trogdor', 'include_unwind_tables', 'official', 'is_skylab', + 'also_build_lacros_chrome_for_architecture_arm', ], 'chromeos_trogdor_include_unwind_tables_official_skylab_reclient': [ - 'chromeos_device_reclient', 'trogdor', 'include_unwind_tables', 'official', 'is_skylab', 'ozone_headless' + 'chromeos_device_reclient', 'trogdor', 'include_unwind_tables', 'official', 'is_skylab', 'ozone_headless', + 'also_build_lacros_chrome_for_architecture_arm', ], 'chromeos_volteer_include_unwind_tables_official_skylab': [ 'chromeos_device', 'volteer', 'include_unwind_tables', 'official', 'is_skylab', + 'also_build_lacros_chrome_for_architecture_amd64', ], 'chromeos_volteer_include_unwind_tables_official_skylab_reclient': [ - 'chromeos_device_reclient', 'volteer', 'include_unwind_tables', 'official', 'is_skylab', 'ozone_headless' + 'chromeos_device_reclient', 'volteer', 'include_unwind_tables', 'official', 'is_skylab', 'ozone_headless', + 'also_build_lacros_chrome_for_architecture_amd64', ], 'chromeos_with_codecs_debug_bot_reclient': [
diff --git a/tools/mb/mb_config_expectations/chrome.json b/tools/mb/mb_config_expectations/chrome.json index e7c74fae..6f6bd90 100644 --- a/tools/mb/mb_config_expectations/chrome.json +++ b/tools/mb/mb_config_expectations/chrome.json
@@ -76,6 +76,7 @@ "chromeos-brya-chrome-skylab": { "args_file": "//build/args/chromeos/brya.gni", "gn_args": { + "also_build_lacros_chrome_for_architecture": "amd64", "dcheck_always_on": false, "exclude_unwind_tables": false, "is_chrome_branded": true, @@ -127,6 +128,7 @@ "chromeos-jacuzzi-chrome-skylab": { "args_file": "//build/args/chromeos/jacuzzi.gni", "gn_args": { + "also_build_lacros_chrome_for_architecture": "arm", "dcheck_always_on": false, "exclude_unwind_tables": false, "is_chrome_branded": true, @@ -152,6 +154,7 @@ "chromeos-octopus-chrome-skylab": { "args_file": "//build/args/chromeos/octopus.gni", "gn_args": { + "also_build_lacros_chrome_for_architecture": "amd64", "dcheck_always_on": false, "exclude_unwind_tables": false, "is_chrome_branded": true, @@ -178,6 +181,7 @@ "chromeos-volteer-chrome-skylab": { "args_file": "//build/args/chromeos/volteer.gni", "gn_args": { + "also_build_lacros_chrome_for_architecture": "amd64", "dcheck_always_on": false, "exclude_unwind_tables": false, "is_chrome_branded": true,
diff --git a/tools/mb/mb_config_expectations/internal.chromeos.fyi.json b/tools/mb/mb_config_expectations/internal.chromeos.fyi.json index be28321..9ec8c1ac 100644 --- a/tools/mb/mb_config_expectations/internal.chromeos.fyi.json +++ b/tools/mb/mb_config_expectations/internal.chromeos.fyi.json
@@ -44,6 +44,7 @@ "chromeos-brya-chrome-dchecks-skylab": { "args_file": "//build/args/chromeos/brya.gni", "gn_args": { + "also_build_lacros_chrome_for_architecture": "amd64", "dcheck_always_on": true, "exclude_unwind_tables": false, "is_chrome_branded": true, @@ -57,6 +58,7 @@ "chromeos-jacuzzi-chrome-dchecks-skylab": { "args_file": "//build/args/chromeos/jacuzzi.gni", "gn_args": { + "also_build_lacros_chrome_for_architecture": "arm", "dcheck_always_on": true, "exclude_unwind_tables": false, "is_chrome_branded": true, @@ -69,6 +71,7 @@ "chromeos-octopus-chrome-skylab-fyi": { "args_file": "//build/args/chromeos/octopus.gni", "gn_args": { + "also_build_lacros_chrome_for_architecture": "amd64", "dcheck_always_on": false, "exclude_unwind_tables": false, "is_chrome_branded": true, @@ -81,6 +84,7 @@ "chromeos-trogdor-chrome-skylab-fyi": { "args_file": "//build/args/chromeos/trogdor.gni", "gn_args": { + "also_build_lacros_chrome_for_architecture": "arm", "dcheck_always_on": false, "exclude_unwind_tables": false, "is_chrome_branded": true,
diff --git a/tools/mb/mb_config_expectations/tryserver.chrome.json b/tools/mb/mb_config_expectations/tryserver.chrome.json index 584d07c3..23fc04d 100644 --- a/tools/mb/mb_config_expectations/tryserver.chrome.json +++ b/tools/mb/mb_config_expectations/tryserver.chrome.json
@@ -118,6 +118,7 @@ "chromeos-brya-chrome-dchecks-skylab": { "args_file": "//build/args/chromeos/brya.gni", "gn_args": { + "also_build_lacros_chrome_for_architecture": "amd64", "dcheck_always_on": true, "exclude_unwind_tables": false, "is_chrome_branded": true, @@ -131,6 +132,7 @@ "chromeos-brya-chrome-skylab": { "args_file": "//build/args/chromeos/brya.gni", "gn_args": { + "also_build_lacros_chrome_for_architecture": "amd64", "dcheck_always_on": false, "exclude_unwind_tables": false, "is_chrome_branded": true, @@ -195,6 +197,7 @@ "chromeos-jacuzzi-chrome-dchecks-skylab": { "args_file": "//build/args/chromeos/jacuzzi.gni", "gn_args": { + "also_build_lacros_chrome_for_architecture": "arm", "dcheck_always_on": true, "exclude_unwind_tables": false, "is_chrome_branded": true, @@ -207,6 +210,7 @@ "chromeos-jacuzzi-chrome-skylab": { "args_file": "//build/args/chromeos/jacuzzi.gni", "gn_args": { + "also_build_lacros_chrome_for_architecture": "arm", "dcheck_always_on": false, "exclude_unwind_tables": false, "is_chrome_branded": true, @@ -245,6 +249,7 @@ "chromeos-octopus-chrome-skylab": { "args_file": "//build/args/chromeos/octopus.gni", "gn_args": { + "also_build_lacros_chrome_for_architecture": "amd64", "dcheck_always_on": false, "exclude_unwind_tables": false, "is_chrome_branded": true, @@ -284,6 +289,7 @@ "chromeos-trogdor-chrome-skylab": { "args_file": "//build/args/chromeos/trogdor.gni", "gn_args": { + "also_build_lacros_chrome_for_architecture": "arm", "dcheck_always_on": false, "exclude_unwind_tables": false, "is_chrome_branded": true, @@ -297,6 +303,7 @@ "chromeos-volteer-chrome-skylab": { "args_file": "//build/args/chromeos/volteer.gni", "gn_args": { + "also_build_lacros_chrome_for_architecture": "amd64", "dcheck_always_on": false, "exclude_unwind_tables": false, "is_chrome_branded": true,
diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums.xml index 8aa9254..aa3a1af2 100644 --- a/tools/metrics/histograms/enums.xml +++ b/tools/metrics/histograms/enums.xml
@@ -33866,6 +33866,7 @@ <int value="1157" label="SafeBrowsingDeepScanningEnabled"/> <int value="1158" label="DriveFileSyncAvailable"/> <int value="1159" label="DeviceSwitchFunctionKeysBehaviorEnabled"/> + <int value="1160" label="DeviceDlcPredownloadList"/> </enum> <enum name="EnterprisePoliciesSources"> @@ -63855,6 +63856,7 @@ <int value="-512971943" label="disable-one-copy"/> <int value="-512702391" label="AutofillEnableCardNicknameManagement:disabled"/> + <int value="-511505800" label="PipTilt:disabled"/> <int value="-510488450" label="disable-pnacl"/> <int value="-508488651" label="WebviewAccelerateSmallCanvases:enabled"/> <int value="-508346329" label="TerminalSystemAppLegacySettings:disabled"/> @@ -68910,6 +68912,7 @@ <int value="1979536751" label="lacros-availability-policy"/> <int value="1980011075" label="debug-packed-apps"/> <int value="1980648371" label="PointerEventV1SpecCapturing:enabled"/> + <int value="1981341759" label="PipTilt:enabled"/> <int value="1982576646" label="PanelSelfRefresh2:disabled"/> <int value="1984029104" label="test-third-party-cookie-phaseout:enabled"/> <int value="1985584246" label="PageInfoHistory:enabled"/> @@ -82298,6 +82301,8 @@ <int value="3" label="TerminalVisit; the page is visited by a link navigation, but not followed by any link navigation."/> + <int value="4" + label="HistoryVisit; the page is visited by a history navigation."/> </enum> <enum name="PageWhitelistingInitiatorCheck"> @@ -105926,6 +105931,14 @@ <int value="2" label="Palm"/> </enum> +<enum name="TpcdMetadataInstallationResult"> + <int value="0" label="kSuccessful"/> + <int value="1" label="kMissingMetadataFile"/> + <int value="2" label="kReadingMetadataFileFailed"/> + <int value="3" label="kParsingToProtoFailed"/> + <int value="4" label="kErroneousSpec"/> +</enum> + <enum name="TPM12CommandOrdinal"> <summary>The TPM 1.2 command ordinals.</summary> <int value="10" label="TPM_ORD_OIAP"/>
diff --git a/tools/metrics/histograms/metadata/android/histograms.xml b/tools/metrics/histograms/metadata/android/histograms.xml index 0f17b78..4d5e8f2 100644 --- a/tools/metrics/histograms/metadata/android/histograms.xml +++ b/tools/metrics/histograms/metadata/android/histograms.xml
@@ -3820,7 +3820,7 @@ </histogram> <histogram name="Android.SelectFileDialogUploadMethods" - enum="SelectFileDialogUploadMethods" expires_after="2024-01-07"> + enum="SelectFileDialogUploadMethods" expires_after="2024-03-24"> <owner>finnur@chromium.org</owner> <owner>peter@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/apps/histograms.xml b/tools/metrics/histograms/metadata/apps/histograms.xml index cb7b32dc..021c13a 100644 --- a/tools/metrics/histograms/metadata/apps/histograms.xml +++ b/tools/metrics/histograms/metadata/apps/histograms.xml
@@ -2230,7 +2230,7 @@ </histogram> <histogram name="Apps.MediaApp.Load.OtherOpenWindowCount" units="windows" - expires_after="2024-01-21"> + expires_after="2024-03-24"> <owner>tapted@chromium.org</owner> <owner>patricialor@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/arc/histograms.xml b/tools/metrics/histograms/metadata/arc/histograms.xml index b916065..cfc9cf1 100644 --- a/tools/metrics/histograms/metadata/arc/histograms.xml +++ b/tools/metrics/histograms/metadata/arc/histograms.xml
@@ -1710,6 +1710,26 @@ </summary> </histogram> +<histogram name="Arc.Net.QoS.NewQosSocketCount" units="count" + expires_after="2024-08-31"> + <owner>chuweih@google.com</owner> + <owner>cros-network-metrics@google.com</owner> + <summary> + Records the count of newly opened QoS socket connections in a single poll + every time socket connections information is polled regularly in ARC. + </summary> +</histogram> + +<histogram name="Arc.Net.Qos.QosSocketPercentage" units="%" + expires_after="2024-08-31"> + <owner>chuweih@google.com</owner> + <owner>cros-network-metrics@google.com</owner> + <summary> + Records the percentage of QoS socket connections in a single poll every time + socket connections information is polled regularly in ARC. + </summary> +</histogram> + <histogram name="Arc.Notifications.ActionEnabled" enum="BooleanEnabled" expires_after="2024-02-25"> <owner>yaoqq@google.com</owner>
diff --git a/tools/metrics/histograms/metadata/blink/histograms.xml b/tools/metrics/histograms/metadata/blink/histograms.xml index 0e7e38a..0b29998b 100644 --- a/tools/metrics/histograms/metadata/blink/histograms.xml +++ b/tools/metrics/histograms/metadata/blink/histograms.xml
@@ -2144,7 +2144,7 @@ </histogram> <histogram name="Blink.HTMLParsing.ChunkCount4" units="chunks" - expires_after="2024-01-21"> + expires_after="2024-03-24"> <owner>masonf@chromium.org</owner> <owner>dom-dev@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/bookmarks/histograms.xml b/tools/metrics/histograms/metadata/bookmarks/histograms.xml index b1044a9..feb8780 100644 --- a/tools/metrics/histograms/metadata/bookmarks/histograms.xml +++ b/tools/metrics/histograms/metadata/bookmarks/histograms.xml
@@ -522,7 +522,7 @@ </histogram> <histogram name="Bookmarks.Storage.TimeToLoadAtStartup2{StorageState}" - units="ms" expires_after="2024-01-20"> + units="ms" expires_after="2024-03-24"> <owner>wylieb@chromium.org</owner> <owner>chrome-collections@google.com</owner> <component>UI>Browser>Bookmarks</component> @@ -588,7 +588,7 @@ </histogram> <histogram name="Bookmarks.Times.OnProfileLoad.MostRecentlyUsedBookmarkInDays" - units="days" expires_after="2024-01-20"> + units="days" expires_after="2024-03-24"> <owner>wylieb@chromium.org</owner> <owner>chrome-collections@google.com</owner> <component>UI>Browser>Bookmarks</component>
diff --git a/tools/metrics/histograms/metadata/browser/histograms.xml b/tools/metrics/histograms/metadata/browser/histograms.xml index d70d6b6..27a77c40 100644 --- a/tools/metrics/histograms/metadata/browser/histograms.xml +++ b/tools/metrics/histograms/metadata/browser/histograms.xml
@@ -154,7 +154,7 @@ </histogram> <histogram name="Browser.ERP.EventEnqueueResult" - enum="EnterpriseCloudReportingStatusCode" expires_after="2024-01-21"> + enum="EnterpriseCloudReportingStatusCode" expires_after="2024-03-24"> <owner>lbaraz@chromium.org</owner> <owner>xuhong@chromium.org</owner> <owner>src/components/reporting/OWNERS</owner>
diff --git a/tools/metrics/histograms/metadata/browsing_topics/histograms.xml b/tools/metrics/histograms/metadata/browsing_topics/histograms.xml index c708d40..0b943795 100644 --- a/tools/metrics/histograms/metadata/browsing_topics/histograms.xml +++ b/tools/metrics/histograms/metadata/browsing_topics/histograms.xml
@@ -44,7 +44,7 @@ </histogram> <histogram name="BrowsingTopics.EpochTopicsCalculation.CalculatorResultStatus" - enum="BrowsingTopicsCalculatorResultStatus" expires_after="2024-01-21"> + enum="BrowsingTopicsCalculatorResultStatus" expires_after="2024-03-24"> <owner>yaoxia@chromium.org</owner> <owner>jkarlin@chromium.org</owner> <summary> @@ -80,7 +80,7 @@ <histogram name="BrowsingTopics.EpochTopicsCalculation.ObservationContextDomainsCountPerTopTopic" - units="context domains" expires_after="2024-01-21"> + units="context domains" expires_after="2024-03-24"> <owner>yaoxia@chromium.org</owner> <owner>jkarlin@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/content/histograms.xml b/tools/metrics/histograms/metadata/content/histograms.xml index 976092eb..5b16b34b 100644 --- a/tools/metrics/histograms/metadata/content/histograms.xml +++ b/tools/metrics/histograms/metadata/content/histograms.xml
@@ -2013,7 +2013,7 @@ </histogram> <histogram name="ContentSuggestions.{FeedType}.LoadStreamStatus.Initial" - enum="FeedLoadStreamStatus" expires_after="2024-01-23"> + enum="FeedLoadStreamStatus" expires_after="2024-03-24"> <owner>harringtond@chromium.org</owner> <owner>carlosk@chromium.org</owner> <owner>feed@chromium.org</owner> @@ -2031,7 +2031,7 @@ <histogram name="ContentSuggestions.{FeedType}.LoadStreamStatus.InitialFromStore" - enum="FeedLoadStreamStatus" expires_after="2024-01-23"> + enum="FeedLoadStreamStatus" expires_after="2024-03-24"> <owner>harringtond@chromium.org</owner> <owner>carlosk@chromium.org</owner> <owner>feed@chromium.org</owner>
diff --git a/tools/metrics/histograms/metadata/crostini/histograms.xml b/tools/metrics/histograms/metadata/crostini/histograms.xml index 2ad3fd3..461c4ca 100644 --- a/tools/metrics/histograms/metadata/crostini/histograms.xml +++ b/tools/metrics/histograms/metadata/crostini/histograms.xml
@@ -45,7 +45,7 @@ </histogram> <histogram name="Crostini.AppLaunchResult" enum="CrostiniResult" - expires_after="2024-01-21"> + expires_after="2024-03-24"> <owner>davidmunro@google.com</owner> <owner>clumptini@google.com</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/families/histograms.xml b/tools/metrics/histograms/metadata/families/histograms.xml index 519528a..188c4b63 100644 --- a/tools/metrics/histograms/metadata/families/histograms.xml +++ b/tools/metrics/histograms/metadata/families/histograms.xml
@@ -283,7 +283,7 @@ </histogram> <histogram name="FamilyLinkUser.ClassifyUrlRequest.Latency" units="ms" - expires_after="2024-01-21"> + expires_after="2024-03-24"> <owner>tju@google.com</owner> <owner>chrome-kids-eng@google.com</owner> <summary> @@ -303,7 +303,7 @@ </histogram> <histogram name="FamilyLinkUser.ClassifyUrlRequest.Status" - enum="SupervisedUserProtoFetcherStatus" expires_after="2024-01-21"> + enum="SupervisedUserProtoFetcherStatus" expires_after="2024-03-24"> <owner>tju@google.com</owner> <owner>chrome-kids-eng@google.com</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/google/histograms.xml b/tools/metrics/histograms/metadata/google/histograms.xml index 4fcf209..0fd0db2a 100644 --- a/tools/metrics/histograms/metadata/google/histograms.xml +++ b/tools/metrics/histograms/metadata/google/histograms.xml
@@ -65,7 +65,7 @@ </histogram> <histogram name="GoogleUpdate.UpdateErrorCode" enum="GoogleUpdateErrorCode" - expires_after="2024-01-21"> + expires_after="2024-03-24"> <owner>sorin@chromium.org</owner> <owner>waffles@chromium.org</owner> <summary>The error code for a failed on-demand update check.</summary>
diff --git a/tools/metrics/histograms/metadata/gpu/histograms.xml b/tools/metrics/histograms/metadata/gpu/histograms.xml index 992461f..2f7c4d84 100644 --- a/tools/metrics/histograms/metadata/gpu/histograms.xml +++ b/tools/metrics/histograms/metadata/gpu/histograms.xml
@@ -1984,7 +1984,7 @@ </histogram> <histogram name="Viz.FrameSinkVideoCapturer.I420.CaptureDuration" units="ms" - expires_after="2024-01-21"> + expires_after="2024-03-24"> <owner>bialpio@chromium.org</owner> <owner>media-capture-dev@chromium.org</owner> <summary> @@ -1998,7 +1998,7 @@ </histogram> <histogram name="Viz.FrameSinkVideoCapturer.I420.CaptureSucceeded" - enum="BooleanSuccess" expires_after="2024-01-21"> + enum="BooleanSuccess" expires_after="2024-03-24"> <owner>bialpio@chromium.org</owner> <owner>media-capture-dev@chromium.org</owner> <summary> @@ -2010,7 +2010,7 @@ </histogram> <histogram name="Viz.FrameSinkVideoCapturer.I420.TotalDuration" units="ms" - expires_after="2024-01-21"> + expires_after="2024-03-24"> <owner>bialpio@chromium.org</owner> <owner>media-capture-dev@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/history/histograms.xml b/tools/metrics/histograms/metadata/history/histograms.xml index 2159ada9..d67bad8 100644 --- a/tools/metrics/histograms/metadata/history/histograms.xml +++ b/tools/metrics/histograms/metadata/history/histograms.xml
@@ -1906,7 +1906,7 @@ </histogram> <histogram name="History.DatabaseAdvancedMetricsTime" units="ms" - expires_after="2023-11-05"> + expires_after="2024-03-17"> <owner>sophiechang@chromium.org</owner> <owner>tommycli@chromium.org</owner> <owner>treib@chromium.org</owner>
diff --git a/tools/metrics/histograms/metadata/memory/histograms.xml b/tools/metrics/histograms/metadata/memory/histograms.xml index 76e6868..1ba2dfb8 100644 --- a/tools/metrics/histograms/metadata/memory/histograms.xml +++ b/tools/metrics/histograms/metadata/memory/histograms.xml
@@ -1309,7 +1309,7 @@ </histogram> <histogram name="Memory.Gpu.SharedMemoryFootprint" units="MB" - expires_after="2024-01-21"> + expires_after="2024-03-24"> <owner>erikchen@chromium.org</owner> <owner>ssid@chromium.org</owner> <summary> @@ -2078,7 +2078,7 @@ </histogram> <histogram name="Memory.RenderProcessHost.Count.All" units="processes" - expires_after="2024-01-21"> + expires_after="2024-03-24"> <owner>alexmos@chromium.org</owner> <owner>creis@chromium.org</owner> <owner>lukasza@chromium.org</owner> @@ -2098,7 +2098,7 @@ </histogram> <histogram name="Memory.RenderProcessHost.Count.InitializedAndNotDead" - units="processes" expires_after="2024-01-21"> + units="processes" expires_after="2024-03-24"> <owner>alexmos@chromium.org</owner> <owner>creis@chromium.org</owner> <owner>lukasza@chromium.org</owner> @@ -2459,7 +2459,7 @@ </histogram> <histogram name="Memory.Total.SharedMemoryFootprint" units="MB" - expires_after="2024-01-21"> + expires_after="2024-03-24"> <owner>erikchen@chromium.org</owner> <owner>ssid@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/navigation/histograms.xml b/tools/metrics/histograms/metadata/navigation/histograms.xml index e1e754c..ba41e3c 100644 --- a/tools/metrics/histograms/metadata/navigation/histograms.xml +++ b/tools/metrics/histograms/metadata/navigation/histograms.xml
@@ -1452,6 +1452,19 @@ </summary> </histogram> +<histogram name="Navigation.TpcdMitigations.MetadataInstallationResult" + enum="TpcdMetadataInstallationResult" expires_after="2024-07-01"> + <owner>njeunje@chromium.org</owner> + <owner>src/chrome/browser/tpcd/OWNERS</owner> + <summary> + The outcome from Third Party Cookies Deprecation Metadata component + installation. + + This metric is recorded at most once for every new metadata version + installed. + </summary> +</histogram> + <histogram name="Navigation.UndoCommit.IsSpeculativeRenderFrameLive" enum="BooleanPresent" expires_after="2022-06-30"> <obsolete>
diff --git a/tools/metrics/histograms/metadata/oobe/histograms.xml b/tools/metrics/histograms/metadata/oobe/histograms.xml index 1f9d2a36..13a224c7 100644 --- a/tools/metrics/histograms/metadata/oobe/histograms.xml +++ b/tools/metrics/histograms/metadata/oobe/histograms.xml
@@ -815,8 +815,8 @@ <summary> Whether the sync consent screen was shown, skipped with sync disabled, or skipped with sync enabled. Recorded when the screen is closed. Metrics - Sync.InitialState and OOBE.SyncConsentScreen.SyncEnabled provide more detail - on the state of the sync engine. + Sync.InitialState2 and OOBE.SyncConsentScreen.SyncEnabled provide more + detail on the state of the sync engine. </summary> </histogram>
diff --git a/tools/metrics/histograms/metadata/page/histograms.xml b/tools/metrics/histograms/metadata/page/histograms.xml index 31fdb63..a8dbc131 100644 --- a/tools/metrics/histograms/metadata/page/histograms.xml +++ b/tools/metrics/histograms/metadata/page/histograms.xml
@@ -1208,7 +1208,7 @@ <histogram name="PageLoad.Clients.ThirdParty.Frames.Opaque.NavigationToFirstContentfulPaint" - units="ms" expires_after="2024-01-21"> + units="ms" expires_after="2024-03-24"> <owner>awillia@chromium.org</owner> <owner>djmitche@chromium.org</owner> <summary> @@ -1285,7 +1285,7 @@ <histogram name="PageLoad.Clients.Zstd.PaintTiming.NavigationToFirstContentfulPaint" - units="ms" expires_after="2024-01-23"> + units="ms" expires_after="2024-03-24"> <owner>nidhijaju@chromium.org</owner> <owner>blink-network-stack@google.com</owner> <summary> @@ -1299,7 +1299,7 @@ <histogram name="PageLoad.Clients.Zstd.PaintTiming.NavigationToLargestContentfulPaint" - units="ms" expires_after="2024-01-23"> + units="ms" expires_after="2024-03-24"> <owner>nidhijaju@chromium.org</owner> <owner>blink-network-stack@google.com</owner> <summary> @@ -1972,6 +1972,7 @@ summary="all page visits, recorded in UkmPageLoadMetricsObserver"/> <variant name=".AllVisit" summary="all page visits, recorded in PreviewPageLoadMetricsObserver"/> + <variant name=".HistoryVisit" summary="history page visits"/> <variant name=".IndependentVisit" summary="independent page visits"/> <variant name=".OriginVisit" summary="origin page visits"/> <variant name=".PassingVisit" summary="passing page visits"/> @@ -2569,7 +2570,7 @@ </histogram> <histogram name="PageLoad.LayoutInstability.CumulativeShiftScore" - units="scorex10" expires_after="2024-01-21"> + units="scorex10" expires_after="2024-03-24"> <owner>bmcquade@chromium.org</owner> <owner>skobes@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/power/histograms.xml b/tools/metrics/histograms/metadata/power/histograms.xml index 3c43fc0..30b5b90 100644 --- a/tools/metrics/histograms/metadata/power/histograms.xml +++ b/tools/metrics/histograms/metadata/power/histograms.xml
@@ -2410,7 +2410,7 @@ </histogram> <histogram name="PowerML.SmartDimModel.Result" - enum="PowerMLSmartDimModelResult" expires_after="2024-01-21"> + enum="PowerMLSmartDimModelResult" expires_after="2024-03-24"> <owner>napper@chromium.org</owner> <owner>thanhdng@chromium.org</owner> <summary> @@ -2423,7 +2423,7 @@ </histogram> <histogram name="PowerML.SmartDimParameter.Result" - enum="PowerMLSmartDimParameterResult" expires_after="2024-01-21"> + enum="PowerMLSmartDimParameterResult" expires_after="2024-03-24"> <owner>napper@chromium.org</owner> <owner>thanhdng@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/safe_browsing/histograms.xml b/tools/metrics/histograms/metadata/safe_browsing/histograms.xml index 5b2bc92..b7a61b8 100644 --- a/tools/metrics/histograms/metadata/safe_browsing/histograms.xml +++ b/tools/metrics/histograms/metadata/safe_browsing/histograms.xml
@@ -93,6 +93,12 @@ <variant name=".None" summary="neither consumer nor enterprise"/> </variants> +<variants name="RequestedSkippedOrChecked"> + <variant name="" summary="requested"/> + <variant name="Checked" summary="checked"/> + <variant name="Skipped" summary="skipped"/> +</variants> + <variants name="ThrottleProcess"> <variant name="Browser" summary="Browser"/> <variant name="Renderer" summary="Renderer"/> @@ -253,7 +259,7 @@ </histogram> <histogram name="SafeBrowsing.BrowserThrottle.TotalDelay" units="ms" - expires_after="2024-01-21"> + expires_after="2024-03-24"> <owner>xinghuilu@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary> @@ -2144,7 +2150,7 @@ </histogram> <histogram name="SafeBrowsing.RT.LocalMatch.Result" - enum="SafeBrowsingAllowlistAsyncMatch" expires_after="2024-01-21"> + enum="SafeBrowsingAllowlistAsyncMatch" expires_after="2024-03-24"> <owner>thefrog@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary> @@ -3077,7 +3083,8 @@ </token> </histogram> -<histogram name="SafeBrowsing.{Process}Throttle.RequestDestination" +<histogram + name="SafeBrowsing.{Process}Throttle.RequestDestination{RequestedSkippedOrChecked}" enum="RequestDestination" expires_after="2024-08-16"> <owner>xinghuilu@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> @@ -3086,6 +3093,7 @@ loader throttle. Logged each time WillStartRequest is called. </summary> <token key="Process" variants="ThrottleProcess"/> + <token key="RequestedSkippedOrChecked" variants="RequestedSkippedOrChecked"/> </histogram> <histogram name="SafeBrowsing.{Process}Throttle.TotalDelay2{ResponseType}"
diff --git a/tools/metrics/histograms/metadata/security/histograms.xml b/tools/metrics/histograms/metadata/security/histograms.xml index 14ac483..da36177 100644 --- a/tools/metrics/histograms/metadata/security/histograms.xml +++ b/tools/metrics/histograms/metadata/security/histograms.xml
@@ -206,7 +206,7 @@ <histogram name="Security.HttpsFirstModeWithEngagementHeuristic.AccumulatedHostCount" - units="hostnames" expires_after="2024-01-21"> + units="hostnames" expires_after="2024-03-24"> <owner>meacer@chromium.org</owner> <owner>trusty-transport@chromium.org</owner> <summary> @@ -228,7 +228,7 @@ </histogram> <histogram name="Security.HttpsFirstModeWithEngagementHeuristic.HostCount" - units="hostnames" expires_after="2024-01-21"> + units="hostnames" expires_after="2024-03-24"> <owner>meacer@chromium.org</owner> <owner>trusty-transport@chromium.org</owner> <summary> @@ -240,7 +240,7 @@ <histogram name="Security.HttpsFirstModeWithEngagementHeuristic.NavigationEvent" - enum="HttpsFirstModeNavigationEvent" expires_after="2024-01-21"> + enum="HttpsFirstModeNavigationEvent" expires_after="2024-03-24"> <owner>meacer@chromium.org</owner> <owner>cthomp@chromium.org</owner> <owner>trusty-transport@chromium.org</owner> @@ -252,7 +252,7 @@ </histogram> <histogram name="Security.HttpsFirstModeWithEngagementHeuristic.State" - enum="SiteEngagementHeuristicState" expires_after="2024-01-21"> + enum="SiteEngagementHeuristicState" expires_after="2024-03-24"> <owner>meacer@chromium.org</owner> <owner>trusty-transport@chromium.org</owner> <summary> @@ -294,7 +294,7 @@ </histogram> <histogram name="Security.PageInfo.AboutThisSiteInteraction" - enum="AboutThisSiteInteraction" expires_after="2024-01-21"> + enum="AboutThisSiteInteraction" expires_after="2024-03-24"> <owner>dullweber@chromium.org</owner> <owner>olesiamarukhno@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/sync/histograms.xml b/tools/metrics/histograms/metadata/sync/histograms.xml index b60c36a2f..ff6daa7 100644 --- a/tools/metrics/histograms/metadata/sync/histograms.xml +++ b/tools/metrics/histograms/metadata/sync/histograms.xml
@@ -619,27 +619,6 @@ </summary> </histogram> -<histogram name="Sync.InitialState" enum="SyncInitialState" - expires_after="M110"> - <obsolete> - Replaced in M108 by Sync.InitialState2. - </obsolete> - <owner>treib@chromium.org</owner> - <owner>mastiz@chromium.org</owner> - <component>Services>Sync</component> - <summary> - NOTE: This histogram is also recorded (with value "No signed in - user") for profiles in which Sync will never be able to start, such as - the system profile (used for the profile picker). You probably want to look - at Sync.InitialState2 instead. - - An approximate state of sync at profile startup. Logs a few reasons sync - definitely wouldn't be able to start, or that it probably can start. A - dashboard stop and clear will fall under "turned off and setup not - completed". - </summary> -</histogram> - <histogram name="Sync.InitialState2" enum="SyncInitialState" expires_after="2024-03-17"> <owner>treib@chromium.org</owner> @@ -701,23 +680,6 @@ <summary>The reason for a failure decrypting the keystore Nigori.</summary> </histogram> -<histogram name="Sync.Local.Enabled" enum="BooleanEnabled" expires_after="M110"> - <obsolete> - Replaced in M108 by Sync.Local.Enabled2. - </obsolete> - <owner>igorruvinov@chromium.org</owner> - <owner>pastarmovj@chromium.org</owner> - <component>Services>Sync</component> - <summary> - NOTE: This histogram is also recorded for profiles in which Sync will never - be able to start, such as the system profile (used for the profile picker). - You probably want to look at Sync.Local.Enabled2 instead. - - Tracks the number of times the local sync backend was enabled by the user. - Recorded when the SyncService is created, i.e. during profile startup. - </summary> -</histogram> - <histogram name="Sync.Local.Enabled2" enum="BooleanEnabled" expires_after="2023-12-17"> <owner>igorruvinov@chromium.org</owner> @@ -751,24 +713,6 @@ </summary> </histogram> -<histogram name="Sync.Local.RoamingProfileUnavailable" enum="BooleanError" - expires_after="M110"> - <obsolete> - Replaced in M108 by Sync.Local.RoamingProfileUnavailable2. - </obsolete> - <owner>igorruvinov@chromium.org</owner> - <owner>pastarmovj@chromium.org</owner> - <component>Services>Sync</component> - <summary> - NOTE: This histogram is also recorded for profiles in which Sync will never - be able to start, such as the system profile (used for the profile picker). - You probably want to look at Sync.Local.RoamingProfileUnavailable2 instead. - - Tracks the number of times the Roaming profile cannot be retrieved. Recorded - when the SyncService is created, i.e. during profile startup. - </summary> -</histogram> - <histogram name="Sync.Local.RoamingProfileUnavailable2" enum="BooleanError" expires_after="2024-08-01"> <owner>igorruvinov@chromium.org</owner> @@ -837,7 +781,7 @@ type was cleared due to `WipeModelUponSyncDisabledBehavior::kOnceIfTrackingMetadata`. In practice, this happens only on iOS, when Chrome was just restored from an OS-level - backup. As a denominator, look at e.g. `Sync.InitialState`. + backup. As a denominator, look at e.g. `Sync.InitialState2`. </summary> </histogram>
diff --git a/tools/metrics/histograms/metadata/views/OWNERS b/tools/metrics/histograms/metadata/views/OWNERS new file mode 100644 index 0000000..c3da537 --- /dev/null +++ b/tools/metrics/histograms/metadata/views/OWNERS
@@ -0,0 +1,3 @@ +per-file OWNERS=file://tools/metrics/histograms/metadata/METRIC_REVIEWER_OWNERS + +file://ui/views/OWNERS \ No newline at end of file
diff --git a/tools/metrics/histograms/metadata/views/histograms.xml b/tools/metrics/histograms/metadata/views/histograms.xml index b33c18a..1ae29dd 100644 --- a/tools/metrics/histograms/metadata/views/histograms.xml +++ b/tools/metrics/histograms/metadata/views/histograms.xml
@@ -22,6 +22,64 @@ <histograms> +<variants name="BubbleName"> + <variant name="All" summary="Aggregated metrics for all bubbles"/> +</variants> + +<histogram name="Bubble.{BubbleName}.CloseReason" enum="WidgetClosedReason" + expires_after="2024-09-01"> + <owner>kerenzhu@chromium.org</owner> + <owner>dayeung@chromium.org</owner> + <owner>temao@chromium.org</owner> + <owner>yuhengh@chromium.org</owner> + <owner>tluk@chromium.org</owner> + <owner>robliao@chromium.org</owner> + <summary>Records the reason a bubble was closed.</summary> + <token key="BubbleName" variants="BubbleName"/> +</histogram> + +<histogram name="Bubble.{BubbleName}.CreateToPresentationTime" units="ms" + expires_after="2024-09-01"> + <owner>temao@chromium.org</owner> + <owner>yuhengh@chromium.org</owner> + <owner>kerenzhu@chromium.org</owner> + <owner>dayeung@chromium.org</owner> + <owner>tluk@chromium.org</owner> + <owner>robliao@chromium.org</owner> + <summary> + Records the time it takes from a bubble construction to when the compositor + finishes the first presentation. + </summary> + <token key="BubbleName" variants="BubbleName"/> +</histogram> + +<histogram name="Bubble.{BubbleName}.CreateToVisibleTime" units="ms" + expires_after="2024-09-01"> + <owner>temao@chromium.org</owner> + <owner>yuhengh@chromium.org</owner> + <owner>kerenzhu@chromium.org</owner> + <owner>dayeung@chromium.org</owner> + <owner>tluk@chromium.org</owner> + <owner>robliao@chromium.org</owner> + <summary> + Records the time it takes from a bubble construction to when the bubble + becomes visible. + </summary> + <token key="BubbleName" variants="BubbleName"/> +</histogram> + +<histogram name="Bubble.{BubbleName}.TimeVisible" units="ms" + expires_after="2024-09-01"> + <owner>yuhengh@chromium.org</owner> + <owner>kerenzhu@chromium.org</owner> + <owner>dayeung@chromium.org</owner> + <owner>temao@chromium.org</owner> + <owner>tluk@chromium.org</owner> + <owner>robliao@chromium.org</owner> + <summary>Records the time a bubble is visible.</summary> + <token key="BubbleName" variants="BubbleName"/> +</histogram> + <histogram name="Views.ColorProviderCacheSize" units="entries" expires_after="2024-02-25"> <owner>pkasting@chromium.org</owner>
diff --git a/tools/metrics/histograms/metadata/webapps/histograms.xml b/tools/metrics/histograms/metadata/webapps/histograms.xml index e727bd19..4c5e5c0 100644 --- a/tools/metrics/histograms/metadata/webapps/histograms.xml +++ b/tools/metrics/histograms/metadata/webapps/histograms.xml
@@ -744,7 +744,7 @@ </histogram> <histogram name="WebApp.Install.Result" enum="BooleanSuccess" - expires_after="2024-01-21"> + expires_after="2024-03-24"> <owner>phillis@chromium.org</owner> <owner>desktop-pwas-team@google.com</owner> <summary>
diff --git a/tools/perf/core/perfetto_binary_roller/binary_deps.json b/tools/perf/core/perfetto_binary_roller/binary_deps.json index 9833be1..8457f77a 100644 --- a/tools/perf/core/perfetto_binary_roller/binary_deps.json +++ b/tools/perf/core/perfetto_binary_roller/binary_deps.json
@@ -5,8 +5,8 @@ "full_remote_path": "perfetto-luci-artifacts/v37.0/linux-arm64/trace_processor_shell" }, "win": { - "hash": "19d2164f44c41cb4d9b0fc94828760f78ea68040", - "full_remote_path": "chromium-telemetry/perfetto_binaries/trace_processor_shell/win/c478eb8ffb74aa961c2320efb2c901a5d1d69cba/trace_processor_shell.exe" + "hash": "ff7d8ced28169b856cf585c7cd7e8a30484f8fa5", + "full_remote_path": "chromium-telemetry/perfetto_binaries/trace_processor_shell/win/f92196dfb6d701a3e0f7b9ea4042b193c4487e15/trace_processor_shell.exe" }, "linux_arm": { "hash": "4ad0dc8eeae3ad92d6a1da2f1653a81fb9e3c4c1",
diff --git a/ui/file_manager/file_manager/foreground/js/ui/progress_center_panel.js b/ui/file_manager/file_manager/foreground/js/ui/progress_center_panel.js index 17adb62..72f707e 100644 --- a/ui/file_manager/file_manager/foreground/js/ui/progress_center_panel.js +++ b/ui/file_manager/file_manager/foreground/js/ui/progress_center_panel.js
@@ -73,6 +73,7 @@ info = info || {}; const {source, destination, count} = info; switch (item.state) { + case ProgressItemState.SCANNING: case ProgressItemState.PROGRESSING: // Single items: if (item.itemCount === 1) {
diff --git a/ui/file_manager/integration_tests/file_manager/background.js b/ui/file_manager/integration_tests/file_manager/background.js index b233628..184597a 100644 --- a/ui/file_manager/integration_tests/file_manager/background.js +++ b/ui/file_manager/integration_tests/file_manager/background.js
@@ -11,6 +11,7 @@ import './directory_tree.js'; import './directory_tree_context_menu.js'; import './dlp.js'; +import './dlp_enterprise_connectors.js'; import './drive_specific.js'; import './file_dialog.js'; import './file_display.js';
diff --git a/ui/file_manager/integration_tests/file_manager/dlp_enterprise_connectors.js b/ui/file_manager/integration_tests/file_manager/dlp_enterprise_connectors.js new file mode 100644 index 0000000..3d1d706 --- /dev/null +++ b/ui/file_manager/integration_tests/file_manager/dlp_enterprise_connectors.js
@@ -0,0 +1,145 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import {addEntries, EntryType, RootPath, sendTestMessage, TestEntryInfo} from '../test_util.js'; +import {testcase} from '../testcase.js'; + +import {remoteCall, setupAndWaitUntilReady} from './background.js'; +import {DirectoryTreePageObject} from './page_objects/directory_tree.js'; + +const allowedFileEntry = new TestEntryInfo({ + type: EntryType.FILE, + targetPath: 'a_allowed.jpg', + sourceFileName: 'small.jpg', + mimeType: 'image/jpeg', + lastModifiedTime: 'Jan 18, 2038, 1:02 AM', + nameText: 'a_allowed.jpg', + sizeText: '886 bytes', + typeText: 'JPEG image', +}); + +const warnedFileEntry = new TestEntryInfo({ + type: EntryType.FILE, + targetPath: 'c_warned.jpg', + sourceFileName: 'small.jpg', + mimeType: 'image/jpeg', + lastModifiedTime: 'Jan 18, 2038, 1:02 AM', + nameText: 'c_warned.jpg', + sizeText: '886 bytes', + typeText: 'JPEG image', +}); + +testcase.twoWarningsProceeded = async () => { + // Add entry to Downloads. + await addEntries(['local'], [warnedFileEntry]); + + // Open Files app. + const appId = await setupAndWaitUntilReady( + RootPath.DOWNLOADS, [allowedFileEntry, warnedFileEntry], []); + + // Mount a USB volume. + await sendTestMessage({name: 'mountFakeUsbEmpty'}); + + // Wait for the USB volume to mount. + const directoryTree = await DirectoryTreePageObject.create(appId, remoteCall); + await directoryTree.waitForItemByType('removable'); + + // Set the mock to pause the first task. + await sendTestMessage({ + name: 'setCheckFilesTransferMockToPause', + taskId: 1, + fileNames: [warnedFileEntry.nameText], + action: 'copy', + }); + + // Setup policy. + await sendTestMessage({ + name: 'setupFileTransferPolicy', + source: 'MY_FILES', + destination: 'REMOVABLE', + }); + + // Setup reporting expectations. + await sendTestMessage({ + name: 'expectFileTransferReports', + source_volume: 'MY_FILES', + destination_volume: 'REMOVABLE', + entry_paths: [allowedFileEntry.targetPath, warnedFileEntry.targetPath], + }); + + // Setup the scanning closure to be able to wait for the scanning to be + // complete. + await sendTestMessage({ + name: 'setupScanningRunLoop', + number_of_expected_delegates: 2, + }); + + // Copy and paste the two files to USB. + await directoryTree.navigateToPath('/My files/Downloads'); + await remoteCall.waitForFiles( + appId, + [allowedFileEntry.getExpectedRow(), warnedFileEntry.getExpectedRow()]); + + // Focus the file list. + await remoteCall.focus(appId, ['#file-list:not([hidden])']); + + // Select all files. + const ctrlA = ['#file-list', 'a', true, false, false]; + await remoteCall.fakeKeyDown(appId, ...ctrlA); + // Check: the file-list should be selected. + await remoteCall.waitForElement(appId, '#file-list li[selected]'); + + await remoteCall.callRemoteTestUtil('execCommand', appId, ['copy']); + await directoryTree.navigateToPath('/fake-usb'); + await remoteCall.callRemoteTestUtil('execCommand', appId, ['paste']); + + // DLP warning. + const dlpWarningPanel = await remoteCall.waitForElement( + appId, ['#progress-panel', 'xf-panel-item']); + chrome.test.assertEq( + 'Review is required before copying', + dlpWarningPanel.attributes['primary-text']); + // Proceed DLP warning. + await remoteCall.waitAndClickElement(appId, [ + '#progress-panel', + 'xf-panel-item', + `xf-button#primary-action`, + ]); + + // Scanning Label. + await remoteCall.waitForFeedbackPanelItem( + appId, new RegExp('^Copying.*$'), new RegExp('^Scanning$')); + + // Issue the responses, s.t., the transfer can continue. + await sendTestMessage({name: 'issueFileTransferResponses'}); + + // Expect warning proceeded messages. + await sendTestMessage({ + name: 'expectFileTransferReports', + source_volume: 'MY_FILES', + destination_volume: 'REMOVABLE', + entry_paths: [warnedFileEntry.targetPath], + expect_proceed_warning_reports: true, + }); + + // Enterprise Connectors warning. + const ecWarningPanel = await remoteCall.waitForElement( + appId, ['#progress-panel', 'xf-panel-item']); + chrome.test.assertEq( + 'Review is required before copying', + ecWarningPanel.attributes['primary-text']); + + // Proceed Enterprise Connectors warning. + await remoteCall.waitAndClickElement(appId, [ + '#progress-panel', + 'xf-panel-item', + `xf-button#primary-action`, + ]); + + // Verify that the two files were copied. + await directoryTree.navigateToPath('/fake-usb'); + await remoteCall.waitForFiles( + appId, + [allowedFileEntry.getExpectedRow(), warnedFileEntry.getExpectedRow()]); +};
diff --git a/ui/views/bubble/bubble_dialog_delegate_view.cc b/ui/views/bubble/bubble_dialog_delegate_view.cc index 0061d398..e02fea5 100644 --- a/ui/views/bubble/bubble_dialog_delegate_view.cc +++ b/ui/views/bubble/bubble_dialog_delegate_view.cc
@@ -604,8 +604,9 @@ // focus traversal path. Don't reset kAnchoredDialogKey or we risk detaching // a widget from the traversal path. if (GetAnchorView() && - GetAnchorView()->GetProperty(kAnchoredDialogKey) == this) + GetAnchorView()->GetProperty(kAnchoredDialogKey) == this) { GetAnchorView()->ClearProperty(kAnchoredDialogKey); + } if (base::FeatureList::IsEnabled(::features::kBubbleMetricsApi)) { if (bubble_shown_time_.has_value()) { @@ -614,6 +615,9 @@ } UmaHistogramLongTimes("Bubble.All.TimeVisible", bubble_shown_duration_); } + + base::UmaHistogramEnumeration("Bubble.All.CloseReason", + GetWidget()->closed_reason()); } void BubbleDialogDelegate::OnAnchorWidgetDestroying() {