diff --git a/DEPS b/DEPS index dbf65a30..43df827 100644 --- a/DEPS +++ b/DEPS
@@ -310,19 +310,19 @@ # 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': 'e3a870ecead3c110644eba39accc4031464adb3d', + 'src_internal_revision': '3181fde91ac77714ff320fd41e13147bde8f7fcd', # 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': '322abacca561b5c81c1950213a04676d05c8e68f', + 'skia_revision': 'f0912b21daf21ac010a5999092a2b63896e5f726', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling V8 # and whatever else without interference from each other. - 'v8_revision': '5ad4aa20994468c3773ecdd3b8aef60af1c9ee1f', + 'v8_revision': 'd355ef6eb6fc29c270bdc0b8d7e5abe905343076', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling ANGLE # and whatever else without interference from each other. - 'angle_revision': '120e90eb917674434a5b49dbe871c501aeb31b33', + 'angle_revision': '9ca025d2b54e10fcd6f38d390ac5442a3631302b', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling SwiftShader # and whatever else without interference from each other. @@ -330,7 +330,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling PDFium # and whatever else without interference from each other. - 'pdfium_revision': '1dc2fc9894094165089a60b2fb75164e592bcb8c', + 'pdfium_revision': 'e47319725ba84de9bea195de31c7751b5fd20364', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling BoringSSL # 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': 'df5e9ffed2b0afa906d7169d24dc1250762314a4', + 'devtools_frontend_revision': 'cba3d1f0b8f005be884136dd1015c455789ec590', # 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': 'f67a4b3311d966077996a33a1152111cffe94431', + 'dawn_revision': '39aef37759a479717fd40edb1069f230d15236bf', # 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' + '@' + - '9b02ccffa6e89d606b5364dcea2b78d054903a02', + '9cb3763b57dad6a18fedab649ec129310e52a26e', 'condition': 'checkout_android and checkout_src_internal', }, @@ -1059,7 +1059,7 @@ }, 'src/third_party/androidx_javascriptengine/src': { - 'url': Var('chromium_git') + '/aosp/platform/frameworks/support/javascriptengine/javascriptengine/src.git' + '@' + '30ea6d647887c3bdfc47b04764b3444d0179f61b', + 'url': Var('chromium_git') + '/aosp/platform/frameworks/support/javascriptengine/javascriptengine/src.git' + '@' + 'b925e8051e8de9df7dc71c4c9c790afd463d3da8', 'condition': 'checkout_android', }, @@ -1260,7 +1260,7 @@ # Tools used when building Chrome for Chrome OS. This affects both the Simple # Chrome workflow, as well as the chromeos-chrome ebuild. 'src/third_party/chromite': { - 'url': Var('chromium_git') + '/chromiumos/chromite.git' + '@' + '1bed66f42f424d8bcab90f4bedc39d922492e2d3', + 'url': Var('chromium_git') + '/chromiumos/chromite.git' + '@' + 'de31ec113475ca2a9323fa584b1d49eeeb42563a', 'condition': 'checkout_chromeos', }, @@ -1301,7 +1301,7 @@ Var('chromium_git') + '/devtools/devtools-frontend' + '@' + Var('devtools_frontend_revision'), 'src/third_party/devtools-frontend-internal': { - 'url': Var('chrome_git') + '/devtools/devtools-internal.git' + '@' + '403ea0c7874ee42f06bedbf86a258f57fbe817dd', + 'url': Var('chrome_git') + '/devtools/devtools-internal.git' + '@' + '88a822273e94788edfe19d912122565cc7e8b2d1', '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' + '@' + '90f8e7ccdd9d1c2b32bf6cf9d0accc2cd5e41e96', + Var('android_git') + '/platform/external/perfetto.git' + '@' + '49ef5c5916fc1304549b681a1129a7a85c82db9f', 'src/third_party/perl': { 'url': Var('chromium_git') + '/chromium/deps/perl.git' + '@' + '6f3e5028eb65d0b4c5fdd792106ac4c84eee1eb3', @@ -1972,10 +1972,10 @@ Var('chromium_git') + '/external/khronosgroup/webgl.git' + '@' + 'f4bf599a8b575df685c31d9c4729a70a04e377ed', 'src/third_party/webgpu-cts/src': - Var('chromium_git') + '/external/github.com/gpuweb/cts.git' + '@' + 'b1a998fade8e8689acf1e700baf8a7245a0d58c1', + Var('chromium_git') + '/external/github.com/gpuweb/cts.git' + '@' + 'c2956655378dc2f27ba8e5b5f84cac1f73df3c45', 'src/third_party/webrtc': - Var('webrtc_git') + '/src.git' + '@' + 'e887cbefa32dddb30bed30930e9fddc0df0244ff', + Var('webrtc_git') + '/src.git' + '@' + 'e3e030e54e96d7934dc70428b9fc7cf412c4c748', # Wuffs' canonical repository is at github.com/google/wuffs, but we use # Skia's mirror of Wuffs, the same as in upstream Skia's DEPS file. @@ -2098,7 +2098,7 @@ 'packages': [ { 'package': 'chromeos_internal/apps/help_app/app', - 'version': 'bBECpy2LYvRDHfAj6kcR8JYLXt4m0MjnyXAGjXV-L9YC', + 'version': 'gVeOz6FicU8vsB3X7tFhl6qqgu11yUiE_ojn6EH-Xr4C', }, ], 'condition': 'checkout_chromeos and checkout_src_internal', @@ -2109,7 +2109,7 @@ 'packages': [ { 'package': 'chromeos_internal/apps/media_app/app', - 'version': 'B_d6g84NKJet-X7EFklWjkchyUPTDdAx1ErQsUL2FwMC', + 'version': 'nTY1pg9iE_GeJVYxNjKIC6An-ULcUEUEPKAyP4Hf_NEC', }, ], 'condition': 'checkout_chromeos and checkout_src_internal', @@ -4269,7 +4269,7 @@ 'src/ios_internal': { 'url': Var('chrome_git') + '/chrome/ios_internal.git' + '@' + - 'e0b4fdf6c25c2e766a86064ae1476068fc9946e0', + 'f3fb9720ab7fbddc42c8233fbb88995443589444', 'condition': 'checkout_ios and checkout_src_internal', },
diff --git a/android_webview/java/src/org/chromium/android_webview/common/PlatformServiceBridge.java b/android_webview/java/src/org/chromium/android_webview/common/PlatformServiceBridge.java index 3da8d6c..11df405 100644 --- a/android_webview/java/src/org/chromium/android_webview/common/PlatformServiceBridge.java +++ b/android_webview/java/src/org/chromium/android_webview/common/PlatformServiceBridge.java
@@ -93,6 +93,9 @@ } // Takes an uncompressed, serialized UMA proto and logs it via a platform-specific mechanism. + public void logMetrics(byte[] data) {} + + // TODO(crbug.com/1485663): remove this once downstream lands public void logMetrics(byte[] data, boolean useDefaultUploadQos) {} /** @@ -111,6 +114,13 @@ * - Cancelled: 16 * - API not connected (probably means the API is not available on device): 17 */ + public int logMetricsBlocking(byte[] data) { + // TODO(crbug.com/1248039): remove this once downstream implementation lands. + logMetrics(data, true); + return 0; + } + + // TODO(crbug.com/1485663): remove this once downstream lands public int logMetricsBlocking(byte[] data, boolean useDefaultUploadQos) { // TODO(crbug.com/1248039): remove this once downstream implementation lands. logMetrics(data, useDefaultUploadQos);
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 1f160c6..46b4fd79c 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
@@ -152,6 +152,7 @@ + "security checks."), Flag.baseFeature(AwFeatures.WEBVIEW_BROTLI_SUPPORT, "Enables brotli compression support in WebView."), + Flag.baseFeature(NetFeatures.PRIORITY_HEADER, "Enables the HTTP priority header."), Flag.baseFeature(NetFeatures.ZSTD_CONTENT_ENCODING, "Enables zstd content-encoding support in the browser."), Flag.baseFeature( @@ -199,6 +200,8 @@ "Parse forms asynchronously outside of the UI thread."), Flag.baseFeature(AutofillFeatures.AUTOFILL_PARSING_PATTERN_PROVIDER, "Enables Autofill to use its new method to retrieve parsing patterns."), + Flag.baseFeature(AutofillFeatures.AUTOFILL_PAGE_LANGUAGE_DETECTION, + "Enables Autofill to retrieve the page language for form parsing."), Flag.baseFeature(AutofillFeatures.AUTOFILL_PREFER_LABELS_IN_SOME_COUNTRIES, "When enabled, Autofill will first look at field labels and then at field " + "attributes when classifying address fields in Mexico."),
diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/services/JsSandboxServiceTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/services/JsSandboxServiceTest.java index ee2567fd..9d229875 100644 --- a/android_webview/javatests/src/org/chromium/android_webview/test/services/JsSandboxServiceTest.java +++ b/android_webview/javatests/src/org/chromium/android_webview/test/services/JsSandboxServiceTest.java
@@ -17,7 +17,6 @@ import androidx.javascriptengine.JavaScriptConsoleCallback; import androidx.javascriptengine.JavaScriptIsolate; import androidx.javascriptengine.JavaScriptSandbox; -import androidx.javascriptengine.MemoryLimitExceededException; import androidx.javascriptengine.SandboxDeadException; import androidx.test.filters.LargeTest; import androidx.test.filters.MediumTest; @@ -611,163 +610,6 @@ } @Test - @LargeTest - public void testHeapSizeEnforced() throws Throwable { - final long maxHeapSize = REASONABLE_HEAP_SIZE; - // We need to beat the v8 optimizer to ensure it really allocates the required memory. Note - // that we're allocating an array of elements - not bytes. Filling will ensure that the - // array is not sparsely allocated. - final String oomingCode = "" - + "const array = Array(" + maxHeapSize + ").fill(Math.random(), 0);"; - final String stableCode = "'PASS'"; - final String stableExpected = "PASS"; - final String unresolvedCode = "new Promise((resolve, reject) => {/* never resolve */})"; - Context context = ContextUtils.getApplicationContext(); - - ListenableFuture<JavaScriptSandbox> jsSandboxFuture1 = - JavaScriptSandbox.createConnectedInstanceForTestingAsync(context); - try (JavaScriptSandbox jsSandbox = jsSandboxFuture1.get(5, TimeUnit.SECONDS)) { - Assume.assumeTrue(jsSandbox.isFeatureSupported( - JavaScriptSandbox.JS_FEATURE_ISOLATE_MAX_HEAP_SIZE)); - Assume.assumeTrue( - jsSandbox.isFeatureSupported(JavaScriptSandbox.JS_FEATURE_PROMISE_RETURN)); - IsolateStartupParameters isolateStartupParameters = new IsolateStartupParameters(); - isolateStartupParameters.setMaxHeapSizeBytes(maxHeapSize); - try (JavaScriptIsolate jsIsolate1 = jsSandbox.createIsolate(isolateStartupParameters); - JavaScriptIsolate jsIsolate2 = jsSandbox.createIsolate()) { - ListenableFuture<String> earlyUnresolvedResultFuture = - jsIsolate1.evaluateJavaScriptAsync(unresolvedCode); - ListenableFuture<String> earlyResultFuture = - jsIsolate1.evaluateJavaScriptAsync(stableCode); - ListenableFuture<String> oomResultFuture = - jsIsolate1.evaluateJavaScriptAsync(oomingCode); - - // Wait for jsIsolate2 to fully initialize before using jsIsolate1. - jsIsolate2.evaluateJavaScriptAsync(stableCode).get(5, TimeUnit.SECONDS); - - // Check that the heap limit is enforced and that it reports this was the evaluation - // that exceeded the limit. - try { - // Use a generous timeout for OOM, as it may involve multiple rounds of garbage - // collection. - oomResultFuture.get(60, TimeUnit.SECONDS); - Assert.fail("Should have thrown."); - } catch (ExecutionException e) { - if (!(e.getCause() instanceof MemoryLimitExceededException)) { - throw e; - } - } - - // Check that the previously submitted (but unresolved) promise evaluation reports a - // crash - try { - earlyUnresolvedResultFuture.get(5, TimeUnit.SECONDS); - Assert.fail("Should have thrown."); - } catch (ExecutionException e) { - if (!(e.getCause() instanceof IsolateTerminatedException)) { - throw e; - } - } - - // Check that the previously submitted evaluation which completed before the memory - // limit was exceeded, but for which we haven't yet gotten the result, returns its - // result just fine. - String result = earlyResultFuture.get(5, TimeUnit.SECONDS); - Assert.assertEquals(stableExpected, result); - - // Check that a totally new evaluation reports a crash - ListenableFuture<String> lateResultFuture = - jsIsolate1.evaluateJavaScriptAsync(stableCode); - try { - lateResultFuture.get(5, TimeUnit.SECONDS); - Assert.fail("Should have thrown."); - } catch (ExecutionException e) { - if (!(e.getCause() instanceof IsolateTerminatedException)) { - throw e; - } - } - - // Check that other pre-existing isolates can still be used. - ListenableFuture<String> otherIsolateResultFuture = - jsIsolate2.evaluateJavaScriptAsync(stableCode); - String otherIsolateResult = otherIsolateResultFuture.get(5, TimeUnit.SECONDS); - Assert.assertEquals(stableExpected, otherIsolateResult); - } - } - } - - @Test - @LargeTest - public void testIsolateCreationAfterCrash() throws Throwable { - final long maxHeapSize = REASONABLE_HEAP_SIZE; - // We need to beat the v8 optimizer to ensure it really allocates the required memory. Note - // that we're allocating an array of elements - not bytes. Filling will ensure that the - // array is not sparsely allocated. - final String oomingCode = "" - + "const array = Array(" + maxHeapSize + ").fill(Math.random(), 0);"; - final String stableCode = "'PASS'"; - final String stableExpected = "PASS"; - Context context = ContextUtils.getApplicationContext(); - - ListenableFuture<JavaScriptSandbox> jsSandboxFuture1 = - JavaScriptSandbox.createConnectedInstanceForTestingAsync(context); - try (JavaScriptSandbox jsSandbox = jsSandboxFuture1.get(5, TimeUnit.SECONDS)) { - Assume.assumeTrue(jsSandbox.isFeatureSupported( - JavaScriptSandbox.JS_FEATURE_ISOLATE_MAX_HEAP_SIZE)); - Assume.assumeTrue( - jsSandbox.isFeatureSupported(JavaScriptSandbox.JS_FEATURE_PROMISE_RETURN)); - IsolateStartupParameters isolateStartupParameters = new IsolateStartupParameters(); - isolateStartupParameters.setMaxHeapSizeBytes(maxHeapSize); - try (JavaScriptIsolate jsIsolate1 = jsSandbox.createIsolate(isolateStartupParameters)) { - ListenableFuture<String> oomResultFuture = - jsIsolate1.evaluateJavaScriptAsync(oomingCode); - - // Check that the heap limit is enforced and that it reports this was the evaluation - // that exceeded the limit. - try { - // Use a generous timeout for OOM, as it may involve multiple rounds of garbage - // collection. - oomResultFuture.get(60, TimeUnit.SECONDS); - Assert.fail("Should have thrown."); - } catch (ExecutionException e) { - if (!(e.getCause() instanceof MemoryLimitExceededException)) { - throw e; - } - } - - // Check that other isolates can still be created and used (without closing - // jsIsolate1). - try (JavaScriptIsolate jsIsolate2 = - jsSandbox.createIsolate(isolateStartupParameters)) { - ListenableFuture<String> resultFuture = - jsIsolate2.evaluateJavaScriptAsync(stableCode); - String result = resultFuture.get(5, TimeUnit.SECONDS); - Assert.assertEquals(stableExpected, result); - } - } - - // Check that other isolates can still be created and used (after closing jsIsolate1). - try (JavaScriptIsolate jsIsolate = jsSandbox.createIsolate(isolateStartupParameters)) { - ListenableFuture<String> resultFuture = - jsIsolate.evaluateJavaScriptAsync(stableCode); - String result = resultFuture.get(5, TimeUnit.SECONDS); - Assert.assertEquals(stableExpected, result); - } - } - - // Check that the old sandbox with the "crashed" isolate can be torn down and that a new - // sandbox and isolate can be spun up. - ListenableFuture<JavaScriptSandbox> jsSandboxFuture2 = - JavaScriptSandbox.createConnectedInstanceForTestingAsync(context); - try (JavaScriptSandbox jsSandbox = jsSandboxFuture2.get(5, TimeUnit.SECONDS); - JavaScriptIsolate jsIsolate = jsSandbox.createIsolate()) { - ListenableFuture<String> resultFuture = jsIsolate.evaluateJavaScriptAsync(stableCode); - String result = resultFuture.get(5, TimeUnit.SECONDS); - Assert.assertEquals(stableExpected, result); - } - } - - @Test @MediumTest public void testAsyncPromiseCallbacks() throws Throwable { // Unlike testPromiseReturn and testPromiseEvaluationThrow, this test is guaranteed to
diff --git a/android_webview/js_sandbox/java/src/org/chromium/android_webview/js_sandbox/service/JsSandboxService.java b/android_webview/js_sandbox/java/src/org/chromium/android_webview/js_sandbox/service/JsSandboxService.java index dbee55e..09cd969 100644 --- a/android_webview/js_sandbox/java/src/org/chromium/android_webview/js_sandbox/service/JsSandboxService.java +++ b/android_webview/js_sandbox/java/src/org/chromium/android_webview/js_sandbox/service/JsSandboxService.java
@@ -9,6 +9,7 @@ import android.os.IBinder; import org.chromium.android_webview.js_sandbox.common.IJsSandboxIsolate; +import org.chromium.android_webview.js_sandbox.common.IJsSandboxIsolateClient; import org.chromium.android_webview.js_sandbox.common.IJsSandboxService; import org.chromium.base.library_loader.LibraryLoader; import org.chromium.base.library_loader.LibraryProcessType; @@ -44,6 +45,13 @@ } @Override + public IJsSandboxIsolate createIsolate2( + long maxHeapSizeBytes, IJsSandboxIsolateClient isolateClient) { + // TODO(ashleynewson): Implement this method. + throw new UnsupportedOperationException(); + } + + @Override public IJsSandboxIsolate createIsolateWithMaxHeapSizeBytes(long maxHeapSizeBytes) { return new JsSandboxIsolate(JsSandboxService.this, maxHeapSizeBytes); }
diff --git a/ash/ambient/ambient_controller.cc b/ash/ambient/ambient_controller.cc index cce5626..64ea6a07 100644 --- a/ash/ambient/ambient_controller.cc +++ b/ash/ambient/ambient_controller.cc
@@ -1236,6 +1236,7 @@ void AmbientController::StopScreensaver() { CloseAllWidgets(close_widgets_immediately_); session_metrics_recorder_.reset(); + ui_launcher_init_callback_.Cancel(); ambient_ui_launcher_->Finalize(); } @@ -1256,9 +1257,10 @@ SetUpPreTargetHandler(); - ambient_ui_launcher_->Initialize( + ui_launcher_init_callback_.Reset( base::BindOnce(&AmbientController::OnUiLauncherInitialized, weak_ptr_factory_.GetWeakPtr())); + ambient_ui_launcher_->Initialize(ui_launcher_init_callback_.callback()); } AmbientUiSettings AmbientController::GetCurrentUiSettings() const {
diff --git a/ash/ambient/ambient_controller.h b/ash/ambient/ambient_controller.h index 1f31734..9ad5dc4a 100644 --- a/ash/ambient/ambient_controller.h +++ b/ash/ambient/ambient_controller.h
@@ -26,6 +26,7 @@ #include "ash/session/session_controller_impl.h" #include "ash/system/power/backlights_forced_off_setter.h" #include "ash/system/power/power_status.h" +#include "base/cancelable_callback.h" #include "base/gtest_prod_util.h" #include "base/memory/weak_ptr.h" #include "base/scoped_observation.h" @@ -382,6 +383,7 @@ screensaver_images_policy_handler_; std::unique_ptr<AmbientUiLauncher> ambient_ui_launcher_; + base::CancelableOnceCallback<void(bool)> ui_launcher_init_callback_; base::WeakPtrFactory<AmbientController> weak_ptr_factory_{this}; };
diff --git a/ash/ambient/ambient_controller_unittest.cc b/ash/ambient/ambient_controller_unittest.cc index cf954d0..a65eab2 100644 --- a/ash/ambient/ambient_controller_unittest.cc +++ b/ash/ambient/ambient_controller_unittest.cc
@@ -877,6 +877,19 @@ EXPECT_FALSE(ambient_controller()->ShouldShowAmbientUi()); } +TEST_P(AmbientControllerTestForAnyUiSettings, ShowThenImmediatelyClose) { + // Try to launch ambient mode. It may not finish initialization or start + // rendering. Then close it immediately. Wait a while, and make sure no + // pending tasks run that may launch the UI unexpectedly afterwards. + ambient_controller()->SetUiVisibilityShouldShow(); + ASSERT_TRUE(ambient_controller()->ShouldShowAmbientUi()); + CloseAmbientScreen(); + ASSERT_FALSE(ambient_controller()->ShouldShowAmbientUi()); + task_environment()->FastForwardBy(base::Minutes(1)); + EXPECT_FALSE(ambient_controller()->ShouldShowAmbientUi()); + EXPECT_FALSE(GetContainerView()); +} + TEST_F(AmbientControllerTest, ShouldDismissContainerViewOnKeyEventWhenLockScreenInBackground) { GetSessionControllerClient()->SetShouldLockScreenAutomatically(true);
diff --git a/ash/ambient/ambient_video_ui_launcher.cc b/ash/ambient/ambient_video_ui_launcher.cc index 0e18eaf..e35ea2b6 100644 --- a/ash/ambient/ambient_video_ui_launcher.cc +++ b/ash/ambient/ambient_video_ui_launcher.cc
@@ -71,6 +71,7 @@ } void AmbientVideoUiLauncher::Finalize() { + weak_factory_.InvalidateWeakPtrs(); weather_refresher_.reset(); is_active_ = false; }
diff --git a/ash/app_list/views/app_list_item_view.cc b/ash/app_list/views/app_list_item_view.cc index 14d4e30..2be1b5e 100644 --- a/ash/app_list/views/app_list_item_view.cc +++ b/ash/app_list/views/app_list_item_view.cc
@@ -1829,8 +1829,6 @@ } void AppListItemView::ItemProgressUpdated() { - // TODO(b/297866854): Wire logic to handle updates on app status - // AppStatus::kPending -> AppStatus::kInstalling if (!is_promise_app_ || !features::ArePromiseIconsEnabled()) { return; } @@ -1839,6 +1837,9 @@ progress_indicator_ = ProgressIndicator::CreateDefaultInstance(base::BindRepeating( [](AppListItemView* view) -> absl::optional<float> { + if (view->item()->app_status() == AppStatus::kPending) { + return absl::nullopt; + } // If download is in-progress, return the progress as a decimal. // Otherwise, the progress indicator shouldn't be painted. float progress = view->item()->GetMetadata()->progress;
diff --git a/ash/app_list/views/app_list_item_view_unittest.cc b/ash/app_list/views/app_list_item_view_unittest.cc index 9ea11cc..82680a46 100644 --- a/ash/app_list/views/app_list_item_view_unittest.cc +++ b/ash/app_list/views/app_list_item_view_unittest.cc
@@ -464,6 +464,46 @@ MaybeCheckDragStartedOnControllerCount(1); } +TEST_P(AppListItemViewTest, AppStatusReflectsOnProgressIndicator) { + AppListItem* item = CreatePromiseAppListItem("TestItem 1"); + + auto* helper = GetAppListTestHelper(); + helper->ShowAppList(); + + auto* apps_grid_view = helper->GetScrollableAppsGridView(); + AppListItemView* view = apps_grid_view->GetItemViewAt(0); + + // Promise apps are created with app_status kPending. + ProgressIndicator* progress_indicator = view->GetProgressIndicatorForTest(); + + EXPECT_EQ(view->item()->progress(), -1.0f); + ProgressIndicatorWaiter().WaitForProgress(progress_indicator, absl::nullopt); + + // Change app status to installing and send a progress update. Verify that the + // progress indicator correctly reflects the progress. + item->UpdateAppStatusForTesting(AppStatus::kInstalling); + item->SetProgress(0.3f); + EXPECT_EQ(view->item()->progress(), 0.3f); + ProgressIndicatorWaiter().WaitForProgress(progress_indicator, 0.3f); + + // Change app status back to pending state. Verify that even if the item had + // progress previously associated to it, the progress indicator reflects as + // indeterminate progress since it is pending. + item->UpdateAppStatusForTesting(AppStatus::kPending); + EXPECT_EQ(view->item()->progress(), 0.3f); + ProgressIndicatorWaiter().WaitForProgress(progress_indicator, absl::nullopt); + + // Send another progress update. Since the app status is still pending, the + // progress indicator still be indeterminate + item->SetProgress(0.8f); + EXPECT_EQ(view->item()->progress(), 0.8f); + ProgressIndicatorWaiter().WaitForProgress(progress_indicator, absl::nullopt); + + // Set the last status update to kReady as if the app had finished installing. + item->UpdateAppStatusForTesting(AppStatus::kReady); + ProgressIndicatorWaiter().WaitForProgress(progress_indicator, absl::nullopt); +} + TEST_P(AppListItemViewTest, UpdateProgressOnPromiseIcon) { AppListItem* item = CreatePromiseAppListItem("TestItem 1");
diff --git a/ash/clipboard/clipboard_history_controller_delegate.h b/ash/clipboard/clipboard_history_controller_delegate.h index 9f35b7e..8f38c1a 100644 --- a/ash/clipboard/clipboard_history_controller_delegate.h +++ b/ash/clipboard/clipboard_history_controller_delegate.h
@@ -15,6 +15,10 @@ public: virtual ~ClipboardHistoryControllerDelegate(); + // Performs an explicit paste, which is distinct from an implicit paste via + // a synthetic Ctrl+V event. Returns `true` if successful, otherwise `false`. + virtual bool Paste() const = 0; + protected: ClipboardHistoryControllerDelegate(); };
diff --git a/ash/clipboard/clipboard_history_controller_impl.cc b/ash/clipboard/clipboard_history_controller_impl.cc index f27af28..8633c84f 100644 --- a/ash/clipboard/clipboard_history_controller_impl.cc +++ b/ash/clipboard/clipboard_history_controller_impl.cc
@@ -173,6 +173,42 @@ RecordMenuIndexPastedUserAction(index); } +void SyntheticPaste( + crosapi::mojom::ClipboardHistoryControllerShowSource paste_source) { + auto* host = GetWindowTreeHostForDisplay( + display::Screen::GetScreen()->GetDisplayForNewWindows().id()); + CHECK(host); + + // Because we do not require the user to release Ctrl+V before selecting a + // clipboard history item to paste, the Ctrl+V event we synthesize below may + // be discarded as a perceived continuation of the long press. Preempt this + // scenario by issuing a Ctrl+V release to ensure that the press and release + // below are handled as an independent paste. + // TODO(http://b/283533126): Replace this workaround with a long-term fix. + if (paste_source == crosapi::mojom::ClipboardHistoryControllerShowSource:: + kControlVLongpress) { + ui::KeyEvent v_release(ui::ET_KEY_RELEASED, ui::VKEY_V, + ui::EF_CONTROL_DOWN); + host->DeliverEventToSink(&v_release); + + ui::KeyEvent ctrl_release(ui::ET_KEY_RELEASED, ui::VKEY_CONTROL, + ui::EF_NONE); + host->DeliverEventToSink(&ctrl_release); + } + + ui::KeyEvent ctrl_press(ui::ET_KEY_PRESSED, ui::VKEY_CONTROL, ui::EF_NONE); + host->DeliverEventToSink(&ctrl_press); + + ui::KeyEvent v_press(ui::ET_KEY_PRESSED, ui::VKEY_V, ui::EF_CONTROL_DOWN); + host->DeliverEventToSink(&v_press); + + ui::KeyEvent v_release(ui::ET_KEY_RELEASED, ui::VKEY_V, ui::EF_CONTROL_DOWN); + host->DeliverEventToSink(&v_release); + + ui::KeyEvent ctrl_release(ui::ET_KEY_RELEASED, ui::VKEY_CONTROL, ui::EF_NONE); + host->DeliverEventToSink(&ctrl_release); +} + using ClipboardHistoryPasteType = ClipboardHistoryControllerImpl::ClipboardHistoryPasteType; bool IsPlainTextPaste(ClipboardHistoryPasteType paste_type) { @@ -931,41 +967,13 @@ GetClipboard()->WriteClipboardData(std::move(data_to_paste)); } - auto* host = GetWindowTreeHostForDisplay( - display::Screen::GetScreen()->GetDisplayForNewWindows().id()); - DCHECK(host); - ++pastes_to_be_confirmed_; - if (paste_source == crosapi::mojom::ClipboardHistoryControllerShowSource:: - kControlVLongpress) { - // Because we do not require the user to release Ctrl+V before selecting a - // clipboard history item to paste, the Ctrl+V event we synthesize below may - // be discarded as a perceived continuation of the long press. Preempt this - // scenario by issuing a Ctrl+V release to ensure that the press and release - // below are handled as an independent paste. - // TODO(http://b/283533126): Replace this workaround with a long-term fix. - ui::KeyEvent v_release(ui::ET_KEY_RELEASED, ui::VKEY_V, - ui::EF_CONTROL_DOWN); - host->DeliverEventToSink(&v_release); - - ui::KeyEvent ctrl_release(ui::ET_KEY_RELEASED, ui::VKEY_CONTROL, - ui::EF_NONE); - host->DeliverEventToSink(&ctrl_release); + // Use synthetic pastes as a fallback solution. + if (!delegate_->Paste()) { + SyntheticPaste(paste_source); } - ui::KeyEvent ctrl_press(ui::ET_KEY_PRESSED, ui::VKEY_CONTROL, ui::EF_NONE); - host->DeliverEventToSink(&ctrl_press); - - ui::KeyEvent v_press(ui::ET_KEY_PRESSED, ui::VKEY_V, ui::EF_CONTROL_DOWN); - host->DeliverEventToSink(&v_press); - - ui::KeyEvent v_release(ui::ET_KEY_RELEASED, ui::VKEY_V, ui::EF_CONTROL_DOWN); - host->DeliverEventToSink(&v_release); - - ui::KeyEvent ctrl_release(ui::ET_KEY_RELEASED, ui::VKEY_CONTROL, ui::EF_NONE); - host->DeliverEventToSink(&ctrl_release); - clipboard_history_util::RecordClipboardHistoryItemPasted(item); base::UmaHistogramEnumeration("Ash.ClipboardHistory.PasteType", paste_type); base::UmaHistogramEnumeration("Ash.ClipboardHistory.PasteSource",
diff --git a/ash/clipboard/test_support/test_clipboard_history_controller_delegate_impl.cc b/ash/clipboard/test_support/test_clipboard_history_controller_delegate_impl.cc index 788be98e..df38148 100644 --- a/ash/clipboard/test_support/test_clipboard_history_controller_delegate_impl.cc +++ b/ash/clipboard/test_support/test_clipboard_history_controller_delegate_impl.cc
@@ -12,4 +12,8 @@ TestClipboardHistoryControllerDelegateImpl:: ~TestClipboardHistoryControllerDelegateImpl() = default; +bool TestClipboardHistoryControllerDelegateImpl::Paste() const { + return false; +} + } // namespace ash
diff --git a/ash/clipboard/test_support/test_clipboard_history_controller_delegate_impl.h b/ash/clipboard/test_support/test_clipboard_history_controller_delegate_impl.h index 66aa3066..18890e6 100644 --- a/ash/clipboard/test_support/test_clipboard_history_controller_delegate_impl.h +++ b/ash/clipboard/test_support/test_clipboard_history_controller_delegate_impl.h
@@ -20,6 +20,10 @@ TestClipboardHistoryControllerDelegateImpl& operator=( const TestClipboardHistoryControllerDelegateImpl&) = delete; ~TestClipboardHistoryControllerDelegateImpl() override; + + private: + // ClipboardHistoryControllerDelegate: + bool Paste() const override; }; } // namespace ash
diff --git a/ash/components/arc/BUILD.gn b/ash/components/arc/BUILD.gn index 6f9e26e9..3f5d7ba 100644 --- a/ash/components/arc/BUILD.gn +++ b/ash/components/arc/BUILD.gn
@@ -369,8 +369,6 @@ "test/fake_wallpaper_instance.h", "test/fake_webapk_instance.cc", "test/fake_webapk_instance.h", - "test/test_browser_context.cc", - "test/test_browser_context.h", ] data = [ @@ -394,6 +392,7 @@ "//components/keyed_service/content", "//components/prefs:test_support", "//components/user_prefs", + "//components/user_prefs/test:test_support", "//content/test:test_support", "//mojo/public/cpp/platform", "//mojo/public/cpp/system", @@ -501,6 +500,7 @@ "//components/session_manager/core:core", "//components/user_manager", "//components/user_manager:test_support", + "//components/user_prefs/test:test_support", "//content/public/common", "//content/test:test_support", "//device/bluetooth",
diff --git a/ash/components/arc/appfuse/arc_appfuse_bridge_unittest.cc b/ash/components/arc/appfuse/arc_appfuse_bridge_unittest.cc index 9f607c5e..9922224 100644 --- a/ash/components/arc/appfuse/arc_appfuse_bridge_unittest.cc +++ b/ash/components/arc/appfuse/arc_appfuse_bridge_unittest.cc
@@ -5,8 +5,8 @@ #include "ash/components/arc/appfuse/arc_appfuse_bridge.h" #include "ash/components/arc/session/arc_service_manager.h" -#include "ash/components/arc/test/test_browser_context.h" #include "base/memory/raw_ptr.h" +#include "components/user_prefs/test/test_browser_context_with_prefs.h" #include "content/public/test/browser_task_environment.h" #include "testing/gtest/include/gtest/gtest.h" @@ -26,7 +26,7 @@ private: content::BrowserTaskEnvironment task_environment_; ArcServiceManager arc_service_manager_; - TestBrowserContext context_; + user_prefs::TestBrowserContextWithPrefs context_; const raw_ptr<ArcAppfuseBridge, ExperimentalAsh> bridge_; };
diff --git a/ash/components/arc/audio/arc_audio_bridge_unittest.cc b/ash/components/arc/audio/arc_audio_bridge_unittest.cc index 8e0b0b5..8a4b0353 100644 --- a/ash/components/arc/audio/arc_audio_bridge_unittest.cc +++ b/ash/components/arc/audio/arc_audio_bridge_unittest.cc
@@ -5,9 +5,9 @@ #include "ash/components/arc/audio/arc_audio_bridge.h" #include "ash/components/arc/session/arc_service_manager.h" -#include "ash/components/arc/test/test_browser_context.h" #include "base/memory/raw_ptr.h" #include "chromeos/ash/components/audio/cras_audio_handler.h" +#include "components/user_prefs/test/test_browser_context_with_prefs.h" #include "content/public/test/browser_task_environment.h" #include "testing/gtest/include/gtest/gtest.h" @@ -32,7 +32,7 @@ ash::ScopedCrasAudioHandlerForTesting cras_audio_handler_; content::BrowserTaskEnvironment task_environment_; ArcServiceManager arc_service_manager_; - TestBrowserContext context_; + user_prefs::TestBrowserContextWithPrefs context_; raw_ptr<ArcAudioBridge, ExperimentalAsh> bridge_ = nullptr; };
diff --git a/ash/components/arc/camera/arc_camera_bridge_unittest.cc b/ash/components/arc/camera/arc_camera_bridge_unittest.cc index 11463944..04a0906c 100644 --- a/ash/components/arc/camera/arc_camera_bridge_unittest.cc +++ b/ash/components/arc/camera/arc_camera_bridge_unittest.cc
@@ -5,8 +5,8 @@ #include "ash/components/arc/camera/arc_camera_bridge.h" #include "ash/components/arc/session/arc_service_manager.h" -#include "ash/components/arc/test/test_browser_context.h" #include "base/memory/raw_ptr.h" +#include "components/user_prefs/test/test_browser_context_with_prefs.h" #include "content/public/test/browser_task_environment.h" #include "testing/gtest/include/gtest/gtest.h" @@ -26,7 +26,7 @@ private: content::BrowserTaskEnvironment task_environment_; ArcServiceManager arc_service_manager_; - TestBrowserContext context_; + user_prefs::TestBrowserContextWithPrefs context_; const raw_ptr<ArcCameraBridge, ExperimentalAsh> bridge_; };
diff --git a/ash/components/arc/chrome_feature_flags/arc_chrome_feature_flags_bridge_unittest.cc b/ash/components/arc/chrome_feature_flags/arc_chrome_feature_flags_bridge_unittest.cc index b71cbc5..cbbd199 100644 --- a/ash/components/arc/chrome_feature_flags/arc_chrome_feature_flags_bridge_unittest.cc +++ b/ash/components/arc/chrome_feature_flags/arc_chrome_feature_flags_bridge_unittest.cc
@@ -8,11 +8,11 @@ #include "ash/components/arc/session/arc_bridge_service.h" #include "ash/components/arc/session/arc_service_manager.h" #include "ash/components/arc/test/fake_chrome_feature_flags_instance.h" -#include "ash/components/arc/test/test_browser_context.h" #include "ash/constants/ash_features.h" #include "base/memory/raw_ptr.h" #include "base/test/scoped_feature_list.h" #include "chromeos/constants/chromeos_features.h" +#include "components/user_prefs/test/test_browser_context_with_prefs.h" #include "content/public/test/browser_task_environment.h" #include "testing/gtest/include/gtest/gtest.h" @@ -54,7 +54,7 @@ private: content::BrowserTaskEnvironment task_environment_; ArcServiceManager arc_service_manager_; - TestBrowserContext context_; + user_prefs::TestBrowserContextWithPrefs context_; FakeChromeFeatureFlagsInstance instance_; base::test::ScopedFeatureList scoped_feature_list_; const raw_ptr<ArcChromeFeatureFlagsBridge, ExperimentalAsh> bridge_;
diff --git a/ash/components/arc/crash_collector/arc_crash_collector_bridge_unittest.cc b/ash/components/arc/crash_collector/arc_crash_collector_bridge_unittest.cc index c2397d1..1210ec4 100644 --- a/ash/components/arc/crash_collector/arc_crash_collector_bridge_unittest.cc +++ b/ash/components/arc/crash_collector/arc_crash_collector_bridge_unittest.cc
@@ -7,8 +7,8 @@ #include <unistd.h> #include "ash/components/arc/session/arc_service_manager.h" -#include "ash/components/arc/test/test_browser_context.h" #include "base/memory/raw_ptr.h" +#include "components/user_prefs/test/test_browser_context_with_prefs.h" #include "content/public/test/browser_task_environment.h" #include "mojo/public/cpp/system/platform_handle.h" #include "testing/gtest/include/gtest/gtest.h" @@ -31,7 +31,7 @@ private: content::BrowserTaskEnvironment task_environment_; ArcServiceManager arc_service_manager_; - TestBrowserContext context_; + user_prefs::TestBrowserContextWithPrefs context_; const raw_ptr<ArcCrashCollectorBridge, ExperimentalAsh> bridge_; };
diff --git a/ash/components/arc/disk_quota/arc_disk_quota_bridge_unittest.cc b/ash/components/arc/disk_quota/arc_disk_quota_bridge_unittest.cc index 43089ff..74dcdcb 100644 --- a/ash/components/arc/disk_quota/arc_disk_quota_bridge_unittest.cc +++ b/ash/components/arc/disk_quota/arc_disk_quota_bridge_unittest.cc
@@ -6,7 +6,6 @@ #include "ash/components/arc/arc_util.h" #include "ash/components/arc/session/arc_service_manager.h" -#include "ash/components/arc/test/test_browser_context.h" #include "base/strings/stringprintf.h" #include "base/test/scoped_chromeos_version_info.h" #include "base/test/test_future.h" @@ -14,6 +13,7 @@ #include "chromeos/ash/components/dbus/spaced/spaced_client.h" #include "chromeos/ash/components/dbus/userdataauth/fake_userdataauth_client.h" #include "chromeos/ash/components/dbus/userdataauth/userdataauth_client.h" +#include "components/user_prefs/test/test_browser_context_with_prefs.h" #include "content/public/test/browser_task_environment.h" #include "testing/gtest/include/gtest/gtest.h" @@ -51,7 +51,7 @@ private: content::BrowserTaskEnvironment task_environment_; ArcServiceManager arc_service_manager_; - TestBrowserContext context_; + user_prefs::TestBrowserContextWithPrefs context_; const raw_ptr<ArcDiskQuotaBridge, ExperimentalAsh> bridge_; };
diff --git a/ash/components/arc/lock_screen/arc_lock_screen_bridge_unittest.cc b/ash/components/arc/lock_screen/arc_lock_screen_bridge_unittest.cc index 19b9dac..9099677 100644 --- a/ash/components/arc/lock_screen/arc_lock_screen_bridge_unittest.cc +++ b/ash/components/arc/lock_screen/arc_lock_screen_bridge_unittest.cc
@@ -8,9 +8,9 @@ #include "ash/components/arc/session/arc_service_manager.h" #include "ash/components/arc/test/connection_holder_util.h" #include "ash/components/arc/test/fake_lock_screen_instance.h" -#include "ash/components/arc/test/test_browser_context.h" #include "base/memory/raw_ptr.h" #include "components/session_manager/core/session_manager.h" +#include "components/user_prefs/test/test_browser_context_with_prefs.h" #include "content/public/test/browser_task_environment.h" #include "testing/gtest/include/gtest/gtest.h" @@ -49,7 +49,7 @@ session_manager::SessionManager session_manager_; ArcServiceManager arc_service_manager_; FakeLockScreenInstance lock_screen_instance_; - TestBrowserContext context_; + user_prefs::TestBrowserContextWithPrefs context_; raw_ptr<ArcLockScreenBridge, ExperimentalAsh> bridge_ = nullptr; };
diff --git a/ash/components/arc/media_session/arc_media_session_bridge_unittest.cc b/ash/components/arc/media_session/arc_media_session_bridge_unittest.cc index e24d8501..b495f459 100644 --- a/ash/components/arc/media_session/arc_media_session_bridge_unittest.cc +++ b/ash/components/arc/media_session/arc_media_session_bridge_unittest.cc
@@ -5,8 +5,8 @@ #include "ash/components/arc/media_session/arc_media_session_bridge.h" #include "ash/components/arc/session/arc_service_manager.h" -#include "ash/components/arc/test/test_browser_context.h" #include "base/memory/raw_ptr.h" +#include "components/user_prefs/test/test_browser_context_with_prefs.h" #include "content/public/test/browser_task_environment.h" #include "testing/gtest/include/gtest/gtest.h" @@ -28,7 +28,7 @@ private: content::BrowserTaskEnvironment task_environment_; ArcServiceManager arc_service_manager_; - TestBrowserContext context_; + user_prefs::TestBrowserContextWithPrefs context_; const raw_ptr<ArcMediaSessionBridge, ExperimentalAsh> bridge_; };
diff --git a/ash/components/arc/memory/arc_memory_bridge_unittest.cc b/ash/components/arc/memory/arc_memory_bridge_unittest.cc index a6d1288..a0c9662f 100644 --- a/ash/components/arc/memory/arc_memory_bridge_unittest.cc +++ b/ash/components/arc/memory/arc_memory_bridge_unittest.cc
@@ -9,9 +9,9 @@ #include "ash/components/arc/session/arc_service_manager.h" #include "ash/components/arc/test/connection_holder_util.h" #include "ash/components/arc/test/fake_memory_instance.h" -#include "ash/components/arc/test/test_browser_context.h" #include "base/memory/raw_ptr.h" #include "base/test/bind.h" +#include "components/user_prefs/test/test_browser_context_with_prefs.h" #include "content/public/test/browser_task_environment.h" #include "testing/gtest/include/gtest/gtest.h" #include "third_party/abseil-cpp/absl/types/optional.h" @@ -42,7 +42,7 @@ content::BrowserTaskEnvironment task_environment_; ArcServiceManager arc_service_manager_; FakeMemoryInstance memory_instance_; - TestBrowserContext context_; + user_prefs::TestBrowserContextWithPrefs context_; raw_ptr<ArcMemoryBridge, ExperimentalAsh> bridge_ = nullptr; };
diff --git a/ash/components/arc/memory_pressure/arc_memory_pressure_bridge_unittest.cc b/ash/components/arc/memory_pressure/arc_memory_pressure_bridge_unittest.cc index 6cfa36e..1337d9b7 100644 --- a/ash/components/arc/memory_pressure/arc_memory_pressure_bridge_unittest.cc +++ b/ash/components/arc/memory_pressure/arc_memory_pressure_bridge_unittest.cc
@@ -12,9 +12,9 @@ #include "ash/components/arc/session/arc_bridge_service.h" #include "ash/components/arc/session/arc_service_manager.h" #include "ash/components/arc/test/fake_process_instance.h" -#include "ash/components/arc/test/test_browser_context.h" #include "base/memory/raw_ptr.h" #include "chromeos/ash/components/dbus/resourced/fake_resourced_client.h" +#include "components/user_prefs/test/test_browser_context_with_prefs.h" #include "content/public/test/browser_task_environment.h" #include "mojo/public/cpp/system/platform_handle.h" #include "testing/gtest/include/gtest/gtest.h" @@ -76,7 +76,7 @@ private: static ArcMemoryPressureBridge* GetBridge( - TestBrowserContext& context, + user_prefs::TestBrowserContextWithPrefs& context, TestingPrefServiceSimple& local_state, AppKillObserver& kill_observer) { prefs::RegisterLocalStatePrefs(local_state.registry()); @@ -97,7 +97,7 @@ TestingPrefServiceSimple local_state_; session_manager::SessionManager session_manager_; ArcServiceManager arc_service_manager_; - TestBrowserContext context_; + user_prefs::TestBrowserContextWithPrefs context_; FakeProcessInstance fake_process_instance_; const raw_ptr<ArcMemoryPressureBridge, ExperimentalAsh> bridge_; };
diff --git a/ash/components/arc/metrics/arc_metrics_anr_unittest.cc b/ash/components/arc/metrics/arc_metrics_anr_unittest.cc index 19c2706e..e994a24 100644 --- a/ash/components/arc/metrics/arc_metrics_anr_unittest.cc +++ b/ash/components/arc/metrics/arc_metrics_anr_unittest.cc
@@ -11,10 +11,10 @@ #include <string> #include "ash/components/arc/arc_prefs.h" -#include "ash/components/arc/test/test_browser_context.h" #include "base/metrics/histogram_samples.h" #include "base/test/metrics/histogram_tester.h" #include "components/prefs/testing_pref_service.h" +#include "components/user_prefs/test/test_browser_context_with_prefs.h" #include "content/public/test/browser_task_environment.h" #include "testing/gtest/include/gtest/gtest.h" @@ -69,7 +69,7 @@ protected: ArcMetricsAnrTest() { prefs::RegisterLocalStatePrefs(local_state_.registry()); - context_ = std::make_unique<TestBrowserContext>(); + context_ = std::make_unique<user_prefs::TestBrowserContextWithPrefs>(); prefs::RegisterLocalStatePrefs(context_->pref_registry()); prefs::RegisterProfilePrefs(context_->pref_registry()); } @@ -86,7 +86,7 @@ content::BrowserTaskEnvironment task_environment_{ base::test::TaskEnvironment::TimeSource::MOCK_TIME}; TestingPrefServiceSimple local_state_; - std::unique_ptr<TestBrowserContext> context_; + std::unique_ptr<user_prefs::TestBrowserContextWithPrefs> context_; }; TEST_F(ArcMetricsAnrTest, Basic) {
diff --git a/ash/components/arc/metrics/arc_metrics_service_unittest.cc b/ash/components/arc/metrics/arc_metrics_service_unittest.cc index fc9cff6..83267b6 100644 --- a/ash/components/arc/metrics/arc_metrics_service_unittest.cc +++ b/ash/components/arc/metrics/arc_metrics_service_unittest.cc
@@ -14,7 +14,6 @@ #include "ash/components/arc/metrics/stability_metrics_manager.h" #include "ash/components/arc/session/arc_service_manager.h" #include "ash/components/arc/test/fake_process_instance.h" -#include "ash/components/arc/test/test_browser_context.h" #include "ash/constants/app_types.h" #include "base/command_line.h" #include "base/memory/raw_ptr.h" @@ -27,6 +26,7 @@ #include "chromeos/ash/components/dbus/session_manager/fake_session_manager_client.h" #include "components/prefs/testing_pref_service.h" #include "components/session_manager/core/session_manager.h" +#include "components/user_prefs/test/test_browser_context_with_prefs.h" #include "content/public/test/browser_task_environment.h" #include "testing/gtest/include/gtest/gtest.h" #include "third_party/abseil-cpp/absl/types/optional.h" @@ -84,7 +84,7 @@ mojom::LowMemoryKillCounts::New(0, 0, 0, 0, 0, 0, 0)); ArcServiceManager::Get()->arc_bridge_service()->process()->SetInstance( &fake_process_instance_); - context_ = std::make_unique<TestBrowserContext>(); + context_ = std::make_unique<user_prefs::TestBrowserContextWithPrefs>(); prefs::RegisterLocalStatePrefs(context_->pref_registry()); prefs::RegisterProfilePrefs(context_->pref_registry()); service_ = @@ -154,7 +154,7 @@ session_manager::SessionManager session_manager_; std::unique_ptr<ArcServiceManager> arc_service_manager_; - std::unique_ptr<TestBrowserContext> context_; + std::unique_ptr<user_prefs::TestBrowserContextWithPrefs> context_; raw_ptr<ArcMetricsService, DanglingUntriaged | ExperimentalAsh> service_; std::unique_ptr<aura::Window> fake_arc_window_;
diff --git a/ash/components/arc/midis/arc_midis_bridge_unittest.cc b/ash/components/arc/midis/arc_midis_bridge_unittest.cc index 9234ad5..7a0e1c3 100644 --- a/ash/components/arc/midis/arc_midis_bridge_unittest.cc +++ b/ash/components/arc/midis/arc_midis_bridge_unittest.cc
@@ -5,8 +5,8 @@ #include "ash/components/arc/midis/arc_midis_bridge.h" #include "ash/components/arc/session/arc_service_manager.h" -#include "ash/components/arc/test/test_browser_context.h" #include "base/memory/raw_ptr.h" +#include "components/user_prefs/test/test_browser_context_with_prefs.h" #include "content/public/test/browser_task_environment.h" #include "testing/gtest/include/gtest/gtest.h" @@ -26,7 +26,7 @@ private: content::BrowserTaskEnvironment task_environment_; ArcServiceManager arc_service_manager_; - TestBrowserContext context_; + user_prefs::TestBrowserContextWithPrefs context_; const raw_ptr<ArcMidisBridge, ExperimentalAsh> bridge_; };
diff --git a/ash/components/arc/net/arc_net_host_impl_unittest.cc b/ash/components/arc/net/arc_net_host_impl_unittest.cc index 7b7beb3a..621b057 100644 --- a/ash/components/arc/net/arc_net_host_impl_unittest.cc +++ b/ash/components/arc/net/arc_net_host_impl_unittest.cc
@@ -8,9 +8,9 @@ #include "ash/components/arc/arc_prefs.h" #include "ash/components/arc/session/arc_service_manager.h" -#include "ash/components/arc/test/test_browser_context.h" #include "base/memory/raw_ptr.h" #include "components/prefs/testing_pref_service.h" +#include "components/user_prefs/test/test_browser_context_with_prefs.h" #include "content/public/test/browser_task_environment.h" #include "testing/gtest/include/gtest/gtest.h" @@ -28,7 +28,7 @@ protected: ArcNetHostImplTest() : arc_service_manager_(std::make_unique<ArcServiceManager>()), - context_(std::make_unique<TestBrowserContext>()), + context_(std::make_unique<user_prefs::TestBrowserContextWithPrefs>()), service_( ArcNetHostImpl::GetForBrowserContextForTesting(context_.get())) { arc::prefs::RegisterProfilePrefs(pref_service()->registry()); @@ -48,7 +48,7 @@ content::BrowserTaskEnvironment task_environment_; std::unique_ptr<ArcServiceManager> arc_service_manager_; TestingPrefServiceSimple pref_service_; - std::unique_ptr<TestBrowserContext> context_; + std::unique_ptr<user_prefs::TestBrowserContextWithPrefs> context_; const raw_ptr<ArcNetHostImpl, ExperimentalAsh> service_; };
diff --git a/ash/components/arc/pay/arc_payment_app_bridge_unittest.cc b/ash/components/arc/pay/arc_payment_app_bridge_unittest.cc index 8050e946..cb0ef31 100644 --- a/ash/components/arc/pay/arc_payment_app_bridge_unittest.cc +++ b/ash/components/arc/pay/arc_payment_app_bridge_unittest.cc
@@ -9,7 +9,6 @@ #include "ash/components/arc/session/arc_bridge_service.h" #include "ash/components/arc/session/arc_service_manager.h" #include "ash/components/arc/test/arc_payment_app_bridge_test_support.h" -#include "ash/components/arc/test/test_browser_context.h" #include "chromeos/components/payments/mojom/payment_app_types.mojom.h" #include "content/public/test/browser_task_environment.h" #include "testing/gmock/include/gmock/gmock.h"
diff --git a/ash/components/arc/storage_manager/arc_storage_manager_unittest.cc b/ash/components/arc/storage_manager/arc_storage_manager_unittest.cc index 38c6cc84..8f1e6a1 100644 --- a/ash/components/arc/storage_manager/arc_storage_manager_unittest.cc +++ b/ash/components/arc/storage_manager/arc_storage_manager_unittest.cc
@@ -8,9 +8,9 @@ #include "ash/components/arc/session/arc_service_manager.h" #include "ash/components/arc/test/connection_holder_util.h" #include "ash/components/arc/test/fake_storage_manager_instance.h" -#include "ash/components/arc/test/test_browser_context.h" #include "base/memory/raw_ptr.h" #include "base/test/bind.h" +#include "components/user_prefs/test/test_browser_context_with_prefs.h" #include "content/public/test/browser_task_environment.h" #include "testing/gtest/include/gtest/gtest.h" @@ -41,7 +41,7 @@ content::BrowserTaskEnvironment task_environment_; ArcServiceManager arc_service_manager_; FakeStorageManagerInstance storage_manager_instance_; - TestBrowserContext context_; + user_prefs::TestBrowserContextWithPrefs context_; const raw_ptr<ArcStorageManager, ExperimentalAsh> bridge_; };
diff --git a/ash/components/arc/system_ui/arc_system_ui_bridge_unittest.cc b/ash/components/arc/system_ui/arc_system_ui_bridge_unittest.cc index 6dfe44b..bfce783 100644 --- a/ash/components/arc/system_ui/arc_system_ui_bridge_unittest.cc +++ b/ash/components/arc/system_ui/arc_system_ui_bridge_unittest.cc
@@ -10,13 +10,13 @@ #include "ash/components/arc/session/arc_service_manager.h" #include "ash/components/arc/test/connection_holder_util.h" #include "ash/components/arc/test/fake_system_ui_instance.h" -#include "ash/components/arc/test/test_browser_context.h" #include "ash/style/mojom/color_scheme.mojom-shared.h" #include "base/logging.h" #include "base/memory/raw_ptr.h" #include "base/test/mock_log.h" #include "base/test/scoped_feature_list.h" #include "chromeos/constants/chromeos_features.h" +#include "components/user_prefs/test/test_browser_context_with_prefs.h" #include "content/public/test/browser_task_environment.h" #include "testing/gtest/include/gtest/gtest.h" #include "ui/gfx/color_palette.h" @@ -119,7 +119,7 @@ content::BrowserTaskEnvironment task_environment_; ArcServiceManager arc_service_manager_; - TestBrowserContext context_; + user_prefs::TestBrowserContextWithPrefs context_; FakeSystemUiInstance system_ui_instance_; std::unique_ptr<TestColorPaletteController> test_palette_; const raw_ptr<ArcSystemUIBridge, ExperimentalAsh> bridge_;
diff --git a/ash/components/arc/test/arc_payment_app_bridge_test_support.h b/ash/components/arc/test/arc_payment_app_bridge_test_support.h index e7ecf2f..51ae47b 100644 --- a/ash/components/arc/test/arc_payment_app_bridge_test_support.h +++ b/ash/components/arc/test/arc_payment_app_bridge_test_support.h
@@ -10,11 +10,11 @@ #include "ash/components/arc/pay/arc_payment_app_bridge.h" #include "ash/components/arc/session/arc_service_manager.h" -#include "ash/components/arc/test/test_browser_context.h" #include "base/memory/raw_ptr.h" #include "chromeos/components/payments/mock_payment_app_instance.h" #include "chromeos/components/payments/mojom/payment_app.mojom.h" #include "chromeos/components/payments/mojom/payment_app_types.mojom.h" +#include "components/user_prefs/test/test_browser_context_with_prefs.h" #include "content/public/test/browser_task_environment.h" namespace content { @@ -71,7 +71,7 @@ // Used for retrieving an instance of ArcPaymentAppBridge owned by a // BrowserContext. - TestBrowserContext context_; + user_prefs::TestBrowserContextWithPrefs context_; // The unit test must create an instance of ArcServiceManager for // ArcServiceManager::Get() to work correctly.
diff --git a/ash/components/arc/test/test_browser_context.cc b/ash/components/arc/test/test_browser_context.cc deleted file mode 100644 index 1616af8..0000000 --- a/ash/components/arc/test/test_browser_context.cc +++ /dev/null
@@ -1,22 +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. - -#include "ash/components/arc/test/test_browser_context.h" - -#include "components/keyed_service/content/browser_context_dependency_manager.h" -#include "components/user_prefs/user_prefs.h" - -namespace arc { - -TestBrowserContext::TestBrowserContext() - : browser_context_dependency_manager_( - BrowserContextDependencyManager::GetInstance()) { - user_prefs::UserPrefs::Set(this, &prefs_); -} - -TestBrowserContext::~TestBrowserContext() { - browser_context_dependency_manager_->DestroyBrowserContextServices(this); -} - -} // namespace arc
diff --git a/ash/components/arc/test/test_browser_context.h b/ash/components/arc/test/test_browser_context.h deleted file mode 100644 index ed61a1a..0000000 --- a/ash/components/arc/test/test_browser_context.h +++ /dev/null
@@ -1,38 +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 ASH_COMPONENTS_ARC_TEST_TEST_BROWSER_CONTEXT_H_ -#define ASH_COMPONENTS_ARC_TEST_TEST_BROWSER_CONTEXT_H_ - -#include "base/memory/raw_ptr.h" -#include "components/prefs/testing_pref_service.h" -#include "content/public/test/test_browser_context.h" - -class BrowserContextDependencyManager; - -namespace arc { - -// A browser context for testing that can be used for getting objects -// through ArcBrowserContextKeyedServiceFactoryBase<>. -class TestBrowserContext : public content::TestBrowserContext { - public: - TestBrowserContext(); - - TestBrowserContext(const TestBrowserContext&) = delete; - TestBrowserContext& operator=(const TestBrowserContext&) = delete; - - ~TestBrowserContext() override; - - PrefService* prefs() { return &prefs_; } - PrefRegistrySimple* pref_registry() { return prefs_.registry(); } - - private: - const raw_ptr<BrowserContextDependencyManager, ExperimentalAsh> - browser_context_dependency_manager_; - TestingPrefServiceSimple prefs_; -}; - -} // namespace arc - -#endif // ASH_COMPONENTS_ARC_TEST_TEST_BROWSER_CONTEXT_H_
diff --git a/ash/components/arc/timer/arc_timer_bridge_unittest.cc b/ash/components/arc/timer/arc_timer_bridge_unittest.cc index 562e6e7..16b78d7 100644 --- a/ash/components/arc/timer/arc_timer_bridge_unittest.cc +++ b/ash/components/arc/timer/arc_timer_bridge_unittest.cc
@@ -13,7 +13,6 @@ #include "ash/components/arc/session/connection_holder.h" #include "ash/components/arc/test/connection_holder_util.h" #include "ash/components/arc/test/fake_timer_instance.h" -#include "ash/components/arc/test/test_browser_context.h" #include "ash/components/arc/timer/arc_timer_bridge.h" #include "ash/components/arc/timer/arc_timer_mojom_traits.h" #include "base/files/file_descriptor_watcher_posix.h" @@ -30,6 +29,7 @@ #include "chromeos/ash/components/dbus/upstart/fake_upstart_client.h" #include "chromeos/dbus/power/power_manager_client.h" #include "components/keyed_service/content/browser_context_keyed_service_factory.h" +#include "components/user_prefs/test/test_browser_context_with_prefs.h" #include "content/public/test/browser_task_environment.h" #include "mojo/public/cpp/system/handle.h" #include "mojo/public/cpp/system/platform_handle.h" @@ -140,7 +140,7 @@ content::BrowserTaskEnvironment task_environment_; ArcServiceManager arc_service_manager_; - TestBrowserContext context_; + user_prefs::TestBrowserContextWithPrefs context_; FakeTimerInstance timer_instance_; ArcTimerStore arc_timer_store_;
diff --git a/ash/components/arc/usb/usb_host_bridge_unittest.cc b/ash/components/arc/usb/usb_host_bridge_unittest.cc index b004191..01efc53 100644 --- a/ash/components/arc/usb/usb_host_bridge_unittest.cc +++ b/ash/components/arc/usb/usb_host_bridge_unittest.cc
@@ -5,8 +5,8 @@ #include "ash/components/arc/usb/usb_host_bridge.h" #include "ash/components/arc/session/arc_service_manager.h" -#include "ash/components/arc/test/test_browser_context.h" #include "base/memory/raw_ptr.h" +#include "components/user_prefs/test/test_browser_context_with_prefs.h" #include "content/public/test/browser_task_environment.h" #include "testing/gtest/include/gtest/gtest.h" @@ -26,7 +26,7 @@ private: content::BrowserTaskEnvironment task_environment_; ArcServiceManager arc_service_manager_; - TestBrowserContext context_; + user_prefs::TestBrowserContextWithPrefs context_; const raw_ptr<ArcUsbHostBridge, ExperimentalAsh> bridge_; };
diff --git a/ash/components/arc/volume_mounter/arc_volume_mounter_bridge_unittest.cc b/ash/components/arc/volume_mounter/arc_volume_mounter_bridge_unittest.cc index 71be2d0..a256e5f 100644 --- a/ash/components/arc/volume_mounter/arc_volume_mounter_bridge_unittest.cc +++ b/ash/components/arc/volume_mounter/arc_volume_mounter_bridge_unittest.cc
@@ -12,7 +12,6 @@ #include "ash/components/arc/session/arc_service_manager.h" #include "ash/components/arc/test/connection_holder_util.h" #include "ash/components/arc/test/fake_volume_mounter_instance.h" -#include "ash/components/arc/test/test_browser_context.h" #include "ash/constants/ash_switches.h" #include "base/command_line.h" #include "base/strings/stringprintf.h" @@ -27,6 +26,7 @@ #include "chromeos/ash/components/disks/fake_disk_mount_manager.h" #include "chromeos/components/disks/disks_prefs.h" #include "components/account_id/account_id.h" +#include "components/user_prefs/test/test_browser_context_with_prefs.h" #include "content/public/test/browser_task_environment.h" #include "testing/gtest/include/gtest/gtest.h" #include "third_party/cros_system_api/dbus/cros-disks/dbus-constants.h" @@ -148,7 +148,7 @@ content::BrowserTaskEnvironment task_environment_; ArcServiceManager arc_service_manager_; FakeVolumeMounterInstance volume_mounter_instance_; - TestBrowserContext context_; + user_prefs::TestBrowserContextWithPrefs context_; FakeArcVolumeMounterBridgeDelegate delegate_; std::unique_ptr<ArcVolumeMounterBridge> bridge_; };
diff --git a/ash/constants/ash_features.cc b/ash/constants/ash_features.cc index 70e9ee7..1b38a51 100644 --- a/ash/constants/ash_features.cc +++ b/ash/constants/ash_features.cc
@@ -454,6 +454,12 @@ "ClipboardHistoryUrlTitles", base::FEATURE_DISABLED_BY_DEFAULT); +// If enabled, clipboard history explicitly pastes into `content::WebContents` +// instead of using synthetic key events. +BASE_FEATURE(kClipboardHistoryWebContentsPaste, + "ClipboardHistoryWebContentsPaste", + base::FEATURE_DISABLED_BY_DEFAULT); + // If enabled and account falls under the new deal, will be allowed to toggle // auto updates. BASE_FEATURE(kConsumerAutoUpdateToggleAllowed, @@ -1286,6 +1292,11 @@ "GlanceablesV2ErrorMessage", base::FEATURE_DISABLED_BY_DEFAULT); +// Enables ability to add or edit tasks in tasks glanceable bubble. +BASE_FEATURE(kGlanceablesV2TasksAddEdit, + "GlanceablesV2TasksAddEdit", + base::FEATURE_DISABLED_BY_DEFAULT); + // Enables the Gaia reauth endpoint for all online reauth flows on login screen. // Note that the reauth endpoint is used when the user is a child user or in // potential recovery flows, regardless of the flag value. @@ -1652,6 +1663,12 @@ "LinkCrossDeviceDogFoodFeedback", base::FEATURE_DISABLED_BY_DEFAULT); +// Enables nearby-internals logs to be automatically saved to disk and attached +// to feedback reports. +BASE_FEATURE(kLinkCrossDeviceInternals, + "LinkCrossDeviceInternals", + base::FEATURE_DISABLED_BY_DEFAULT); + // Enables local password as an option for local authentication. // (This feature is only available for consumer users) BASE_FEATURE(kLocalPasswordForConsumers, @@ -3086,6 +3103,10 @@ chromeos::features::IsClipboardHistoryRefreshEnabled(); } +bool IsClipboardHistoryWebContentsPasteEnabled() { + return base::FeatureList::IsEnabled(kClipboardHistoryWebContentsPaste); +} + bool IsContinuousOverviewScrollAnimationEnabled() { return base::FeatureList::IsEnabled(kContinuousOverviewScrollAnimation) && chromeos::features::IsJellyEnabled(); @@ -3551,6 +3572,10 @@ return base::FeatureList::IsEnabled(kLinkCrossDeviceDogfoodFeedback); } +bool IsLinkCrossDeviceInternalsEnabled() { + return base::FeatureList::IsEnabled(kLinkCrossDeviceInternals); +} + bool AreLocalPasswordsEnabledForConsumers() { return base::FeatureList::IsEnabled(kLocalPasswordForConsumers); } @@ -3940,8 +3965,7 @@ } bool IsScalableIphDebugEnabled() { - return IsScalableIphEnabled() && - base::FeatureList::IsEnabled(kScalableIphDebug); + return base::FeatureList::IsEnabled(kScalableIphDebug); } bool IsSeaPenEnabled() {
diff --git a/ash/constants/ash_features.h b/ash/constants/ash_features.h index f20d84c..e318153 100644 --- a/ash/constants/ash_features.h +++ b/ash/constants/ash_features.h
@@ -124,6 +124,8 @@ COMPONENT_EXPORT(ASH_CONSTANTS) BASE_DECLARE_FEATURE(kClipboardHistoryUrlTitles); COMPONENT_EXPORT(ASH_CONSTANTS) +BASE_DECLARE_FEATURE(kClipboardHistoryWebContentsPaste); +COMPONENT_EXPORT(ASH_CONSTANTS) BASE_DECLARE_FEATURE(kConsumerAutoUpdateToggleAllowed); COMPONENT_EXPORT(ASH_CONSTANTS) BASE_DECLARE_FEATURE(kContextualNudges); COMPONENT_EXPORT(ASH_CONSTANTS) @@ -394,6 +396,8 @@ BASE_DECLARE_FEATURE(kGlanceablesV2ClassroomTeacherView); COMPONENT_EXPORT(ASH_CONSTANTS) BASE_DECLARE_FEATURE(kGlanceablesV2ErrorMessage); +COMPONENT_EXPORT(ASH_CONSTANTS) +BASE_DECLARE_FEATURE(kGlanceablesV2TasksAddEdit); COMPONENT_EXPORT(ASH_CONSTANTS) BASE_DECLARE_FEATURE(kGaiaReauthEndpoint); COMPONENT_EXPORT(ASH_CONSTANTS) BASE_DECLARE_FEATURE(kGameDashboard); COMPONENT_EXPORT(ASH_CONSTANTS) @@ -501,6 +505,8 @@ COMPONENT_EXPORT(ASH_CONSTANTS) BASE_DECLARE_FEATURE(kLinkCrossDeviceDogfoodFeedback); COMPONENT_EXPORT(ASH_CONSTANTS) +BASE_DECLARE_FEATURE(kLinkCrossDeviceInternals); +COMPONENT_EXPORT(ASH_CONSTANTS) COMPONENT_EXPORT(ASH_CONSTANTS) BASE_DECLARE_FEATURE(kLocalPasswordForConsumers); BASE_DECLARE_FEATURE(kLockScreenHideSensitiveNotificationsSupport); @@ -873,6 +879,8 @@ COMPONENT_EXPORT(ASH_CONSTANTS) bool IsClipboardHistoryFooterEnabled(); COMPONENT_EXPORT(ASH_CONSTANTS) bool IsClipboardHistoryLongpressEnabled(); COMPONENT_EXPORT(ASH_CONSTANTS) bool IsClipboardHistoryUrlTitlesEnabled(); +COMPONENT_EXPORT(ASH_CONSTANTS) +bool IsClipboardHistoryWebContentsPasteEnabled(); COMPONENT_EXPORT(ASH_CONSTANTS) bool IsConsumerAutoUpdateToggleAllowed(); COMPONENT_EXPORT(ASH_CONSTANTS) bool IsContinuousOverviewScrollAnimationEnabled(); @@ -1005,6 +1013,7 @@ COMPONENT_EXPORT(ASH_CONSTANTS) bool IsLauncherSearchControlEnabled(); COMPONENT_EXPORT(ASH_CONSTANTS) bool IsLicensePackagedOobeFlowEnabled(); COMPONENT_EXPORT(ASH_CONSTANTS) bool IsLinkCrossDeviceDogfoodFeedbackEnabled(); +COMPONENT_EXPORT(ASH_CONSTANTS) bool IsLinkCrossDeviceInternalsEnabled(); COMPONENT_EXPORT(ASH_CONSTANTS) bool AreLocalPasswordsEnabledForConsumers(); COMPONENT_EXPORT(ASH_CONSTANTS) bool IsLockScreenHideSensitiveNotificationsSupported();
diff --git a/ash/display/display_manager_unittest.cc b/ash/display/display_manager_unittest.cc index 3057446f..a64f7d3 100644 --- a/ash/display/display_manager_unittest.cc +++ b/ash/display/display_manager_unittest.cc
@@ -3752,7 +3752,7 @@ .AddMode(MakeDisplayMode()) .SetOrigin({0, 1000}) .Build(); - // "Connectd display" has the current mode. + // "Connected display" has the current mode. external_snapshot->set_current_mode(external_snapshot->native_mode()); outputs.push_back(external_snapshot.get()); @@ -3803,7 +3803,7 @@ .SetNativeMode(MakeDisplayMode()) .AddMode(MakeDisplayMode()) .Build(); - // "Connectd display" has the current mode. + // "Connected display" has the current mode. external_snapshot->set_current_mode(external_snapshot->native_mode()); outputs.push_back(external_snapshot.get());
diff --git a/ash/game_dashboard/game_dashboard_context_unittest.cc b/ash/game_dashboard/game_dashboard_context_unittest.cc index ecd9077e..a56d1108 100644 --- a/ash/game_dashboard/game_dashboard_context_unittest.cc +++ b/ash/game_dashboard/game_dashboard_context_unittest.cc
@@ -165,7 +165,8 @@ auto* game_controls_button = test_api_->GetToolbarGameControlsButton(); if (hint_tile_states[0]) { ASSERT_TRUE(game_controls_button); - EXPECT_EQ(feature_switch_states[1], game_controls_button->toggled()); + EXPECT_EQ(hint_tile_states[1], game_controls_button->GetEnabled()); + EXPECT_EQ(hint_tile_states[2], game_controls_button->toggled()); } else { EXPECT_FALSE(game_controls_button); } @@ -516,8 +517,7 @@ EXPECT_TRUE(switch_button->GetEnabled()); EXPECT_FALSE(switch_button->GetIsOn()); // Toolbar button should also get updated. - EXPECT_TRUE(game_controls_button->GetEnabled()); - EXPECT_FALSE(game_controls_button->toggled()); + EXPECT_FALSE(game_controls_button->GetEnabled()); EXPECT_FALSE(game_dashboard_utils::IsFlagSet( game_window_->GetProperty(kArcGameControlsFlagsKey),
diff --git a/ash/game_dashboard/game_dashboard_main_menu_view.cc b/ash/game_dashboard/game_dashboard_main_menu_view.cc index 0c95a52..26778ca 100644 --- a/ash/game_dashboard/game_dashboard_main_menu_view.cc +++ b/ash/game_dashboard/game_dashboard_main_menu_view.cc
@@ -293,17 +293,15 @@ } void GameDashboardMainMenuView::OnGameControlsTilePressed() { - game_controls_tile_->SetToggled(!game_controls_tile_->IsToggled()); - auto* game_window = context_->game_window(); game_window->SetProperty( kArcGameControlsFlagsKey, game_dashboard_utils::UpdateFlag( game_window->GetProperty(kArcGameControlsFlagsKey), ArcGameControlsFlag::kHint, - /*enable_flag=*/game_controls_tile_->IsToggled())); + /*enable_flag=*/!game_controls_tile_->IsToggled())); - UpdateGameControlsTileTextAndTooltipText(); + UpdateGameControlsTile(); } void GameDashboardMainMenuView::OnGameControlsDetailsPressed() { @@ -321,10 +319,6 @@ // TODO(b/274690042): Replace the strings with localized strings. game_controls_details_->SetSubtitle(is_toggled ? u"On" : u"Off"); - DCHECK(game_controls_tile_); - game_controls_tile_->SetEnabled(is_toggled); - game_controls_tile_->SetToggled(is_toggled); - auto* game_window = context_->game_window(); game_window->SetProperty( kArcGameControlsFlagsKey, @@ -335,10 +329,12 @@ ArcGameControlsFlag::kHint), is_toggled)); - UpdateGameControlsTileTextAndTooltipText(); + UpdateGameControlsTile(); } -void GameDashboardMainMenuView::UpdateGameControlsTileTextAndTooltipText() { +void GameDashboardMainMenuView::UpdateGameControlsTile() { + DCHECK(game_controls_tile_); + const auto flags = game_dashboard_utils::GetGameControlsFlag(context_->game_window()); DCHECK(flags); @@ -350,30 +346,19 @@ bool is_hint_on = game_dashboard_utils::IsFlagSet(*flags, ArcGameControlsFlag::kHint); - if (is_enabled) { - if (is_empty) { - game_controls_tile_->SetSubLabel( - l10n_util::GetStringUTF16(IDS_ASH_GAME_DASHBOARD_GC_TILE_OFF)); - game_controls_tile_->SetTooltipText(l10n_util::GetStringUTF16( - IDS_ASH_GAME_DASHBOARD_GC_TILE_TOOLTIPS_NOT_SETUP)); - } else if (is_hint_on) { - game_controls_tile_->SetSubLabel( - l10n_util::GetStringUTF16(IDS_ASH_GAME_DASHBOARD_GC_TILE_VISIBLE)); - game_controls_tile_->SetTooltipText(l10n_util::GetStringUTF16( - IDS_ASH_GAME_DASHBOARD_GC_TILE_TOOLTIPS_HIDE_CONTROLS)); - } else { - game_controls_tile_->SetSubLabel( - l10n_util::GetStringUTF16(IDS_ASH_GAME_DASHBOARD_GC_TILE_HIDDEN)); - game_controls_tile_->SetTooltipText(l10n_util::GetStringUTF16( - IDS_ASH_GAME_DASHBOARD_GC_TILE_TOOLTIPS_SHOW_CONTROLS)); - } - } else { - game_controls_tile_->SetSubLabel( - l10n_util::GetStringUTF16(IDS_ASH_GAME_DASHBOARD_GC_TILE_OFF)); - game_controls_tile_->SetTooltipText(l10n_util::GetStringUTF16( - IDS_ASH_GAME_DASHBOARD_GC_TILE_TOOLTIPS_NOT_AVAILABLE)); + game_controls_tile_->SetEnabled(is_enabled && !is_empty); + if (game_controls_tile_->GetEnabled()) { + game_controls_tile_->SetToggled(is_hint_on); } + game_dashboard_utils::UpdateGameControlsHintButtonToolTipText( + game_controls_tile_, *flags); + + game_controls_tile_->SetSubLabel(l10n_util::GetStringUTF16( + !is_enabled || is_empty + ? IDS_ASH_GAME_DASHBOARD_GC_TILE_OFF + : (is_hint_on ? IDS_ASH_GAME_DASHBOARD_GC_TILE_VISIBLE + : IDS_ASH_GAME_DASHBOARD_GC_TILE_HIDDEN))); game_controls_tile_->SetSubLabelVisibility(true); } @@ -478,15 +463,7 @@ IDS_ASH_GAME_DASHBOARD_CONTROLS_TILE_BUTTON_TITLE), /*sub_label=*/absl::nullopt)); - game_controls_tile_->SetEnabled( - game_dashboard_utils::IsFlagSet(*flags, ArcGameControlsFlag::kEnabled) && - !game_dashboard_utils::IsFlagSet(*flags, ArcGameControlsFlag::kEmpty)); - if (game_controls_tile_->GetEnabled()) { - game_controls_tile_->SetToggled( - game_dashboard_utils::IsFlagSet(*flags, ArcGameControlsFlag::kHint)); - } - - UpdateGameControlsTileTextAndTooltipText(); + UpdateGameControlsTile(); } void GameDashboardMainMenuView::MaybeAddGameControlsDetailsRow(
diff --git a/ash/game_dashboard/game_dashboard_main_menu_view.h b/ash/game_dashboard/game_dashboard_main_menu_view.h index e9d225e..7e521e42 100644 --- a/ash/game_dashboard/game_dashboard_main_menu_view.h +++ b/ash/game_dashboard/game_dashboard_main_menu_view.h
@@ -64,8 +64,8 @@ void OnGameControlsSetUpButtonPressed(); void OnGameControlsFeatureSwitchButtonPressed(); - // Updates Game Controls tile text and tooltip text. - void UpdateGameControlsTileTextAndTooltipText(); + // Updates the `game_controls_tile_` states, sub-label and tooltip text. + void UpdateGameControlsTile(); // Handles when the Screen Size Settings is pressed. void OnScreenSizeSettingsButtonPressed();
diff --git a/ash/game_dashboard/game_dashboard_toolbar_view.cc b/ash/game_dashboard/game_dashboard_toolbar_view.cc index 148709b9..f79aa3972 100644 --- a/ash/game_dashboard/game_dashboard_toolbar_view.cc +++ b/ash/game_dashboard/game_dashboard_toolbar_view.cc
@@ -13,7 +13,6 @@ #include "ash/game_dashboard/game_dashboard_context.h" #include "ash/game_dashboard/game_dashboard_controller.h" #include "ash/game_dashboard/game_dashboard_utils.h" -#include "ash/public/cpp/arc_game_controls_flag.h" #include "ash/public/cpp/window_properties.h" #include "ash/resources/vector_icons/vector_icons.h" #include "ash/strings/grit/ash_strings.h" @@ -305,8 +304,7 @@ kArcGameControlsFlagsKey, game_dashboard_utils::UpdateFlag( game_window->GetProperty(kArcGameControlsFlagsKey), - static_cast<ArcGameControlsFlag>(ArcGameControlsFlag::kEnabled | - ArcGameControlsFlag::kHint), + static_cast<ArcGameControlsFlag>(ArcGameControlsFlag::kHint), /*enable_flag=*/!game_controls_button_->toggled())); } @@ -386,12 +384,24 @@ l10n_util::GetStringUTF16( IDS_ASH_GAME_DASHBOARD_CONTROLS_TILE_BUTTON_TITLE), /*is_togglable=*/true)); + + UpdateGameControlsButton(*flags); +} + +void GameDashboardToolbarView::UpdateGameControlsButton( + ArcGameControlsFlag flags) { + DCHECK(game_controls_button_); + game_controls_button_->SetEnabled( - !game_dashboard_utils::IsFlagSet(*flags, ArcGameControlsFlag::kEmpty)); + game_dashboard_utils::IsFlagSet(flags, ArcGameControlsFlag::kEnabled) && + !game_dashboard_utils::IsFlagSet(flags, ArcGameControlsFlag::kEmpty)); if (game_controls_button_->GetEnabled()) { game_controls_button_->SetToggled( - game_dashboard_utils::IsFlagSet(*flags, ArcGameControlsFlag::kEnabled)); + game_dashboard_utils::IsFlagSet(flags, ArcGameControlsFlag::kHint)); } + + game_dashboard_utils::UpdateGameControlsHintButtonToolTipText( + game_controls_button_, flags); } void GameDashboardToolbarView::UpdateRecordGameButton( @@ -419,17 +429,11 @@ ArcGameControlsFlag new_flags = window->GetProperty(kArcGameControlsFlagsKey); ArcGameControlsFlag old_flags = static_cast<ash::ArcGameControlsFlag>(old); - if (game_dashboard_utils::IsFlagChanged(new_flags, old_flags, - ArcGameControlsFlag::kEmpty)) { - game_controls_button_->SetEnabled(!game_dashboard_utils::IsFlagSet( - new_flags, ArcGameControlsFlag::kEmpty)); + if (new_flags == old_flags) { + return; } - if (game_dashboard_utils::IsFlagChanged(new_flags, old_flags, - ArcGameControlsFlag::kEnabled)) { - game_controls_button_->SetToggled(game_dashboard_utils::IsFlagSet( - new_flags, ArcGameControlsFlag::kEnabled)); - } + UpdateGameControlsButton(new_flags); } BEGIN_METADATA(GameDashboardToolbarView, views::BoxLayoutView)
diff --git a/ash/game_dashboard/game_dashboard_toolbar_view.h b/ash/game_dashboard/game_dashboard_toolbar_view.h index 96b7e3a5..26533287 100644 --- a/ash/game_dashboard/game_dashboard_toolbar_view.h +++ b/ash/game_dashboard/game_dashboard_toolbar_view.h
@@ -6,6 +6,7 @@ #define ASH_GAME_DASHBOARD_GAME_DASHBOARD_TOOLBAR_VIEW_H_ #include "ash/ash_export.h" +#include "ash/public/cpp/arc_game_controls_flag.h" #include "base/memory/raw_ptr.h" #include "ui/aura/window_observer.h" #include "ui/base/metadata/metadata_header_macros.h" @@ -78,6 +79,10 @@ // Adds Game Controls button if needed. void MayAddGameControlsTile(); + // Updates the `game_controls_button_` states and tooltip text according to + // `flags`. + void UpdateGameControlsButton(ArcGameControlsFlag flags); + // Updates the `record_game_button_` UI. If `is_recording_game_window` is // true, then the button will change to a stop button, otherwise it will show // the default UI.
diff --git a/ash/game_dashboard/game_dashboard_utils.cc b/ash/game_dashboard/game_dashboard_utils.cc index 0608386..65e97ad 100644 --- a/ash/game_dashboard/game_dashboard_utils.cc +++ b/ash/game_dashboard/game_dashboard_utils.cc
@@ -6,7 +6,10 @@ #include "ash/public/cpp/app_types_util.h" #include "ash/public/cpp/window_properties.h" +#include "ash/strings/grit/ash_strings.h" #include "ui/aura/window.h" +#include "ui/base/l10n/l10n_util.h" +#include "ui/views/controls/button/button.h" namespace ash::game_dashboard_utils { @@ -40,4 +43,26 @@ : absl::nullopt; } +void UpdateGameControlsHintButtonToolTipText(views::Button* button, + ArcGameControlsFlag flags) { + DCHECK(button); + + const bool is_enabled = IsFlagSet(flags, ArcGameControlsFlag::kEnabled); + const bool is_empty = IsFlagSet(flags, ArcGameControlsFlag::kEmpty); + const bool is_hint_on = IsFlagSet(flags, ArcGameControlsFlag::kHint); + int tooltip_text_id; + if (is_enabled) { + if (is_empty) { + tooltip_text_id = IDS_ASH_GAME_DASHBOARD_GC_TILE_TOOLTIPS_NOT_SETUP; + } else if (is_hint_on) { + tooltip_text_id = IDS_ASH_GAME_DASHBOARD_GC_TILE_TOOLTIPS_HIDE_CONTROLS; + } else { + tooltip_text_id = IDS_ASH_GAME_DASHBOARD_GC_TILE_TOOLTIPS_SHOW_CONTROLS; + } + } else { + tooltip_text_id = IDS_ASH_GAME_DASHBOARD_GC_TILE_TOOLTIPS_NOT_AVAILABLE; + } + button->SetTooltipText(l10n_util::GetStringUTF16(tooltip_text_id)); +} + } // namespace ash::game_dashboard_utils
diff --git a/ash/game_dashboard/game_dashboard_utils.h b/ash/game_dashboard/game_dashboard_utils.h index 464d3b4..c0bbefd2 100644 --- a/ash/game_dashboard/game_dashboard_utils.h +++ b/ash/game_dashboard/game_dashboard_utils.h
@@ -13,6 +13,10 @@ class Window; } // namespace aura +namespace views { +class Button; +} // namespace views + namespace ash::game_dashboard_utils { // Returns true if `flag` is turned on for `flags`. @@ -33,6 +37,12 @@ // returns nullopt. absl::optional<ArcGameControlsFlag> GetGameControlsFlag(aura::Window* window); +// Updates Game Controls mapping hint button tooltip text. `button` +// refers to `game_controls_tile_` in `GameDashboardMainMenuView` or +// `game_controls_button_` in `GameDashboardToolbarView`. +void UpdateGameControlsHintButtonToolTipText(views::Button* button, + ArcGameControlsFlag flags); + } // namespace ash::game_dashboard_utils #endif // ASH_GAME_DASHBOARD_GAME_DASHBOARD_UTILS_H_
diff --git a/ash/glanceables/tasks/glanceables_task_view.cc b/ash/glanceables/tasks/glanceables_task_view.cc index 3a7f451..d256d94 100644 --- a/ash/glanceables/tasks/glanceables_task_view.cc +++ b/ash/glanceables/tasks/glanceables_task_view.cc
@@ -8,20 +8,22 @@ #include <string> #include <utility> +#include "ash/constants/ash_features.h" #include "ash/glanceables/common/glanceables_view_id.h" #include "ash/glanceables/glanceables_metrics.h" #include "ash/glanceables/glanceables_v2_controller.h" #include "ash/glanceables/tasks/glanceables_tasks_client.h" +#include "ash/glanceables/tasks/glanceables_tasks_types.h" #include "ash/resources/vector_icons/vector_icons.h" #include "ash/shell.h" #include "ash/strings/grit/ash_strings.h" -#include "ash/style/ash_color_id.h" #include "ash/style/typography.h" #include "ash/system/time/calendar_utils.h" #include "ash/system/time/date_helper.h" +#include "base/feature_list.h" +#include "base/functional/bind.h" #include "base/strings/string_util.h" #include "base/types/cxx23_to_underlying.h" -#include "chromeos/constants/chromeos_features.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/metadata/metadata_impl_macros.h" #include "ui/chromeos/styles/cros_tokens_color_mappings.h" @@ -30,8 +32,12 @@ #include "ui/views/accessibility/view_accessibility.h" #include "ui/views/background.h" #include "ui/views/controls/button/button.h" +#include "ui/views/controls/button/image_button.h" +#include "ui/views/controls/button/label_button.h" #include "ui/views/controls/focus_ring.h" #include "ui/views/controls/image_view.h" +#include "ui/views/controls/label.h" +#include "ui/views/layout/box_layout_view.h" namespace ash { namespace { @@ -85,13 +91,8 @@ const gfx::VectorIcon& icon) { auto icon_view = std::make_unique<views::ImageView>(); icon_view->SetProperty(views::kMarginsKey, kSecondRowItemsMargin); - if (chromeos::features::IsJellyEnabled()) { - icon_view->SetImage(ui::ImageModel::FromVectorIcon( - icon, cros_tokens::kCrosSysOnSurfaceVariant)); - } else { - icon_view->SetImage( - ui::ImageModel::FromVectorIcon(icon, kColorAshTextColorSecondary)); - } + icon_view->SetImage(ui::ImageModel::FromVectorIcon( + icon, cros_tokens::kCrosSysOnSurfaceVariant)); return icon_view; } @@ -144,6 +145,41 @@ bool checked_ = false; }; +class GlanceablesTaskView::TaskTitleButton : public views::LabelButton { + public: + TaskTitleButton(const std::u16string& title, PressedCallback pressed_callback) + : views::LabelButton(std::move(pressed_callback), title) { + SetBorder(nullptr); + + label()->SetID(base::to_underlying(GlanceablesViewId::kTaskItemTitleLabel)); + label()->SetLineHeight(TypographyProvider::Get()->ResolveLineHeight( + TypographyToken::kCrosButton2)); + + if (!base::FeatureList::IsEnabled(features::kGlanceablesV2TasksAddEdit)) { + SetFocusBehavior(FocusBehavior::NEVER); + SetState(ButtonState::STATE_DISABLED); + } + + UpdateLabelForState(/*completed=*/false); + } + + void UpdateLabelForState(bool completed) { + const auto color_id = completed ? cros_tokens::kCrosSysSecondary + : cros_tokens::kCrosSysOnSurface; + if (base::FeatureList::IsEnabled(features::kGlanceablesV2TasksAddEdit)) { + SetEnabledTextColorIds(color_id); + } else { + SetTextColorId(ButtonState::STATE_DISABLED, color_id); + } + + label()->SetFontList( + TypographyProvider::Get() + ->ResolveTypographyToken(TypographyToken::kCrosButton2) + .DeriveWithStyle(completed ? gfx::Font::FontStyle::STRIKE_THROUGH + : gfx::Font::FontStyle::NORMAL)); + } +}; + GlanceablesTaskView::GlanceablesTaskView(const std::string& task_list_id, const GlanceablesTask* task) : task_list_id_(task_list_id), task_id_(task->id) { @@ -151,6 +187,8 @@ SetBackground(views::CreateThemedRoundedRectBackground( cros_tokens::kCrosSysSystemOnBase, kBackgroundRadius)); + SetCrossAxisAlignment(views::LayoutAlignment::kStart); + SetOrientation(views::LayoutOrientation::kHorizontal); button_ = AddChildView(std::make_unique<CheckButton>(base::BindRepeating( &GlanceablesTaskView::ButtonPressed, base::Unretained(this)))); @@ -171,13 +209,9 @@ tasks_details_view_->SetCrossAxisAlignment(views::LayoutAlignment::kCenter); tasks_details_view_->SetOrientation(views::LayoutOrientation::kHorizontal); - tasks_label_ = SetupLabel(tasks_title_view_); - tasks_label_->SetText(base::UTF8ToUTF16(task->title)); - tasks_label_->SetLineHeight(TypographyProvider::Get()->ResolveLineHeight( - TypographyToken::kCrosButton2)); - tasks_label_->SetID( - base::to_underlying(GlanceablesViewId::kTaskItemTitleLabel)); - SetupTasksLabel(/*completed=*/false); + task_title_button_ = tasks_title_view_->AddChildView( + std::make_unique<TaskTitleButton>(base::UTF8ToUTF16(task->title), + views::LabelButton::PressedCallback())); std::vector<std::u16string> details; if (task->due.has_value()) { @@ -199,12 +233,7 @@ TypographyToken::kCrosAnnotation1)); due_date_label->SetLineHeight(TypographyProvider::Get()->ResolveLineHeight( TypographyToken::kCrosAnnotation1)); - - if (chromeos::features::IsJellyEnabled()) { - due_date_label->SetEnabledColorId(cros_tokens::kCrosSysOnSurfaceVariant); - } else { - due_date_label->SetEnabledColorId(kColorAshTextColorSecondary); - } + due_date_label->SetEnabledColorId(cros_tokens::kCrosSysOnSurfaceVariant); } if (task->has_subtasks) { @@ -247,13 +276,11 @@ bool target_state = !button_->checked(); // Visually mark the task as completed. button_->SetChecked(target_state); - SetupTasksLabel(/*completed=*/target_state); + task_title_button_->UpdateLabelForState(/*completed=*/target_state); RecordTaskMarkedAsCompleted(target_state); - ash::Shell::Get() - ->glanceables_v2_controller() - ->GetTasksClient() - ->MarkAsCompleted(task_list_id_, task_id_, /*completed=*/target_state); + Shell::Get()->glanceables_v2_controller()->GetTasksClient()->MarkAsCompleted( + task_list_id_, task_id_, /*completed=*/target_state); } const views::ImageButton* GlanceablesTaskView::GetButtonForTest() const { @@ -264,30 +291,6 @@ return button_->checked(); } -void GlanceablesTaskView::SetupTasksLabel(bool completed) { - if (completed) { - tasks_label_->SetFontList( - TypographyProvider::Get() - ->ResolveTypographyToken(TypographyToken::kCrosButton2) - .DeriveWithStyle(gfx::Font::FontStyle::STRIKE_THROUGH)); - if (chromeos::features::IsJellyEnabled()) { - tasks_label_->SetEnabledColorId( - static_cast<ui::ColorId>(cros_tokens::kCrosSysSecondary)); - } else { - tasks_label_->SetEnabledColorId(kColorAshTextColorSecondary); - } - } else { - tasks_label_->SetFontList(TypographyProvider::Get()->ResolveTypographyToken( - TypographyToken::kCrosButton2)); - if (chromeos::features::IsJellyEnabled()) { - tasks_label_->SetEnabledColorId( - static_cast<ui::ColorId>(cros_tokens::kCrosSysOnSurface)); - } else { - tasks_label_->SetEnabledColorId(kColorAshTextColorPrimary); - } - } -} - BEGIN_METADATA(GlanceablesTaskView, views::View) END_METADATA
diff --git a/ash/glanceables/tasks/glanceables_task_view.h b/ash/glanceables/tasks/glanceables_task_view.h index 76cb14e..da64409 100644 --- a/ash/glanceables/tasks/glanceables_task_view.h +++ b/ash/glanceables/tasks/glanceables_task_view.h
@@ -8,18 +8,19 @@ #include <string> #include "ash/ash_export.h" -#include "ash/glanceables/tasks/glanceables_tasks_types.h" #include "base/memory/raw_ptr.h" -#include "base/time/time.h" #include "ui/base/metadata/metadata_header_macros.h" -#include "ui/views/controls/button/image_button.h" -#include "ui/views/controls/label.h" #include "ui/views/layout/flex_layout_view.h" -#include "ui/views/layout/box_layout_view.h" -#include "ui/views/metadata/view_factory.h" + +namespace views { +class BoxLayoutView; +class ImageButton; +} // namespace views namespace ash { +struct GlanceablesTask; + // GlanceablesTaskView uses `views::FlexLayout` to show tasks metadata within // the TasksBubbleView. // +---------------------------------------------------------------+ @@ -52,18 +53,18 @@ private: class CheckButton; - - void SetupTasksLabel(bool completed); + class TaskTitleButton; // Owned by views hierarchy. raw_ptr<CheckButton> button_ = nullptr; raw_ptr<views::FlexLayoutView, ExperimentalAsh> contents_view_ = nullptr; raw_ptr<views::BoxLayoutView, ExperimentalAsh> tasks_title_view_ = nullptr; + raw_ptr<TaskTitleButton, ExperimentalAsh> task_title_button_ = nullptr; raw_ptr<views::FlexLayoutView, ExperimentalAsh> tasks_details_view_ = nullptr; - raw_ptr<views::Label, ExperimentalAsh> tasks_label_ = nullptr; // ID for the task list that owns this task. const std::string task_list_id_; + // ID for the task represented by this view. const std::string task_id_; };
diff --git a/ash/quick_pair/feature_status_tracker/fast_pair_support_utils.cc b/ash/quick_pair/feature_status_tracker/fast_pair_support_utils.cc index 4767727..a83be97 100644 --- a/ash/quick_pair/feature_status_tracker/fast_pair_support_utils.cc +++ b/ash/quick_pair/feature_status_tracker/fast_pair_support_utils.cc
@@ -12,11 +12,17 @@ namespace quick_pair { bool HasHardwareSupport(scoped_refptr<device::BluetoothAdapter> adapter) { - if (!adapter || !adapter->IsPresent()) + if (!base::FeatureList::IsEnabled(features::kAllowCrossDeviceFeatureSuite)) { return false; + } - if (features::IsFastPairSoftwareScanningEnabled()) + if (!adapter || !adapter->IsPresent()) { + return false; + } + + if (features::IsFastPairSoftwareScanningEnabled()) { return true; + } return adapter->GetLowEnergyScanSessionHardwareOffloadingStatus() == device::BluetoothAdapter::
diff --git a/ash/quick_pair/feature_status_tracker/fast_pair_support_utils_unittest.cc b/ash/quick_pair/feature_status_tracker/fast_pair_support_utils_unittest.cc index e0423915..9508600 100644 --- a/ash/quick_pair/feature_status_tracker/fast_pair_support_utils_unittest.cc +++ b/ash/quick_pair/feature_status_tracker/fast_pair_support_utils_unittest.cc
@@ -50,6 +50,14 @@ EXPECT_TRUE(HasHardwareSupport(adapter_)); } +TEST_F(FastPairSupportUtilsTest, DisableAllowCrossDeviceFeatureSuite) { + EXPECT_TRUE(HasHardwareSupport(adapter_)); + + base::test::ScopedFeatureList feature_list; + feature_list.InitAndDisableFeature(features::kAllowCrossDeviceFeatureSuite); + EXPECT_FALSE(HasHardwareSupport(adapter_)); +} + TEST_F(FastPairSupportUtilsTest, HasHardwareSupportFalseForAdapterState) { EXPECT_TRUE(HasHardwareSupport(adapter_));
diff --git a/ash/system/progress_indicator/progress_indicator.h b/ash/system/progress_indicator/progress_indicator.h index 9aa182f..0298428 100644 --- a/ash/system/progress_indicator/progress_indicator.h +++ b/ash/system/progress_indicator/progress_indicator.h
@@ -167,7 +167,7 @@ // Cached progress returned from `CalculateProgress()` just prior to painting. // NOTE: If absent, progress is indeterminate. // NOTE: If present, progress must be >= `0.f` and <= `1.f`. - absl::optional<float> progress_; + absl::optional<float> progress_ = kProgressComplete; // The list of callbacks for which to notify `progress_` changes. base::RepeatingClosureList progress_changed_callback_list_;
diff --git a/ash/system/progress_indicator/progress_indicator_unittest.cc b/ash/system/progress_indicator/progress_indicator_unittest.cc index 5b95bce..12f3c66 100644 --- a/ash/system/progress_indicator/progress_indicator_unittest.cc +++ b/ash/system/progress_indicator/progress_indicator_unittest.cc
@@ -42,7 +42,7 @@ // It should delegate progress calculation to a constructor provided callback // and manage progress animations as needed. TEST_F(ProgressIndicatorTest, CreateDefaultInstance) { - absl::optional<float> progress; + absl::optional<float> progress = ProgressIndicator::kProgressComplete; // Create a default instance of `ProgressIndicator` that paints `progress` // whenever visual state is updated.
diff --git a/ash/system/unified/tasks_bubble_view.cc b/ash/system/unified/tasks_bubble_view.cc index 3a5c370..e08c37e7 100644 --- a/ash/system/unified/tasks_bubble_view.cc +++ b/ash/system/unified/tasks_bubble_view.cc
@@ -247,10 +247,8 @@ } if (num_tasks_shown_ < kMaximumTasks) { - auto* view = task_items_container_view_->AddChildView( + task_items_container_view_->AddChildView( std::make_unique<GlanceablesTaskView>(task_list_id, task.get())); - view->SetCrossAxisAlignment(views::LayoutAlignment::kStart); - view->SetOrientation(views::LayoutOrientation::kHorizontal); ++num_tasks_shown_; } ++num_tasks_;
diff --git a/ash/webui/scanning/OWNERS b/ash/webui/scanning/OWNERS index 187c35c..7f98673 100644 --- a/ash/webui/scanning/OWNERS +++ b/ash/webui/scanning/OWNERS
@@ -2,6 +2,7 @@ gavinwill@chromium.org jimmyxgong@chromium.org zentaro@chromium.org +michaelcheco@google.com # Backup OWNERS khorimoto@chromium.org
diff --git a/ash/wm/desks/desk_bar_view_base.cc b/ash/wm/desks/desk_bar_view_base.cc index 7c8894b..8678f56 100644 --- a/ash/wm/desks/desk_bar_view_base.cc +++ b/ash/wm/desks/desk_bar_view_base.cc
@@ -554,6 +554,14 @@ base::Unretained(this)), /*is_left_arrow=*/false, this)); right_scroll_button_->RemoveFromFocusList(); + // If this is a desk button desk bar, the bar does not paint to a layer, + // therefore, the scroll arrow buttons need to be painted. + if (type_ == Type::kDeskButton) { + left_scroll_button_->SetPaintToLayer(); + left_scroll_button_->layer()->SetFillsBoundsOpaquely(false); + right_scroll_button_->SetPaintToLayer(); + right_scroll_button_->layer()->SetFillsBoundsOpaquely(false); + } // Since we created a `ScrollView` with scrolling with layers enabled, it will // automatically create a layer for our contents.
diff --git a/ash/wm/overview/overview_focus_cycler_unittest.cc b/ash/wm/overview/overview_focus_cycler_unittest.cc index 4d7f1ff..2aff897 100644 --- a/ash/wm/overview/overview_focus_cycler_unittest.cc +++ b/ash/wm/overview/overview_focus_cycler_unittest.cc
@@ -59,14 +59,6 @@ return GetOverviewSession()->focus_cycler(); } - // Press the key repeatedly until a window is focused, i.e. ignoring any - // desk items. - void SendKeyUntilOverviewItemIsFocused(ui::KeyboardCode key) { - do { - SendKey(key); - } while (!GetOverviewFocusedWindow()); - } - // Helper to make tests more readable. bool AreDeskTemplatesEnabled() const { return GetParam().desk_templates_enabled;
diff --git a/ash/wm/overview/overview_group_container_view.cc b/ash/wm/overview/overview_group_container_view.cc index 8db6338..c293b6c 100644 --- a/ash/wm/overview/overview_group_container_view.cc +++ b/ash/wm/overview/overview_group_container_view.cc
@@ -6,6 +6,7 @@ #include "ash/style/style_util.h" #include "ash/wm/overview/overview_constants.h" +#include "ash/wm/overview/overview_group_item.h" #include "ui/base/metadata/metadata_impl_macros.h" #include "ui/views/controls/focus_ring.h" #include "ui/views/controls/highlight_path_generator.h" @@ -20,7 +21,8 @@ } // namespace OverviewGroupContainerView::OverviewGroupContainerView( - OverviewGroupItem* overview_group_item) { + OverviewGroupItem* overview_group_item) + : overview_group_item_(overview_group_item) { SetFocusBehavior(FocusBehavior::NEVER); views::InstallRoundRectHighlightPathGenerator( this, gfx::Insets(kFocusRingHaloInset), kFocusRingRoundedCornerRadius); @@ -40,9 +42,15 @@ return this; } -void OverviewGroupContainerView::MaybeActivateFocusedView() {} +void OverviewGroupContainerView::MaybeActivateFocusedView() { + overview_group_item_->OnFocusedViewActivated(); +} -void OverviewGroupContainerView::MaybeCloseFocusedView(bool primary_action) {} +void OverviewGroupContainerView::MaybeCloseFocusedView(bool primary_action) { + if (primary_action) { + overview_group_item_->OnFocusedViewClosed(); + } +} void OverviewGroupContainerView::MaybeSwapFocusedView(bool right) {}
diff --git a/ash/wm/overview/overview_group_container_view.h b/ash/wm/overview/overview_group_container_view.h index dcece16b..dcecc8d7 100644 --- a/ash/wm/overview/overview_group_container_view.h +++ b/ash/wm/overview/overview_group_container_view.h
@@ -41,6 +41,8 @@ // Shows or hides the focus ring on `this`. void UpdateFocusState(bool focus); + const raw_ptr<OverviewGroupItem> overview_group_item_; + bool is_focused_ = false; };
diff --git a/ash/wm/overview/overview_group_item.cc b/ash/wm/overview/overview_group_item.cc index 36d71a2..db7de189 100644 --- a/ash/wm/overview/overview_group_item.cc +++ b/ash/wm/overview/overview_group_item.cc
@@ -210,10 +210,6 @@ void OverviewGroupItem::HandleGestureEvent(ui::GestureEvent* event) {} -void OverviewGroupItem::OnFocusedViewActivated() {} - -void OverviewGroupItem::OnFocusedViewClosed() {} - void OverviewGroupItem::OnOverviewItemDragStarted(OverviewItemBase* item) {} void OverviewGroupItem::OnOverviewItemDragEnded(bool snap) {}
diff --git a/ash/wm/overview/overview_group_item.h b/ash/wm/overview/overview_group_item.h index 1f765323..f6179e61 100644 --- a/ash/wm/overview/overview_group_item.h +++ b/ash/wm/overview/overview_group_item.h
@@ -67,8 +67,6 @@ void Restack() override; void HandleMouseEvent(const ui::MouseEvent& event) override; void HandleGestureEvent(ui::GestureEvent* event) override; - void OnFocusedViewActivated() override; - void OnFocusedViewClosed() override; void OnOverviewItemDragStarted(OverviewItemBase* item) override; void OnOverviewItemDragEnded(bool snap) override; void OnOverviewItemContinuousScroll(const gfx::Transform& target_transform,
diff --git a/ash/wm/overview/overview_item.cc b/ash/wm/overview/overview_item.cc index c23455d..b8f5bfc6 100644 --- a/ash/wm/overview/overview_item.cc +++ b/ash/wm/overview/overview_item.cc
@@ -920,14 +920,6 @@ } } -void OverviewItem::OnFocusedViewActivated() { - overview_session_->OnFocusedItemActivated(this); -} - -void OverviewItem::OnFocusedViewClosed() { - overview_session_->OnFocusedItemClosed(this); -} - void OverviewItem::OnOverviewItemDragStarted(OverviewItemBase* item) { is_being_dragged_ = (item == this);
diff --git a/ash/wm/overview/overview_item.h b/ash/wm/overview/overview_item.h index 05cdc67..c319c87 100644 --- a/ash/wm/overview/overview_item.h +++ b/ash/wm/overview/overview_item.h
@@ -109,8 +109,6 @@ void CloseWindow() override; void HandleMouseEvent(const ui::MouseEvent& event) override; void HandleGestureEvent(ui::GestureEvent* event) override; - void OnFocusedViewActivated() override; - void OnFocusedViewClosed() override; void OnOverviewItemDragStarted(OverviewItemBase* item) override; void OnOverviewItemDragEnded(bool snap) override; void OnOverviewItemContinuousScroll(const gfx::Transform& target_transform,
diff --git a/ash/wm/overview/overview_item_base.cc b/ash/wm/overview/overview_item_base.cc index 7a7b979..23f53264 100644 --- a/ash/wm/overview/overview_item_base.cc +++ b/ash/wm/overview/overview_item_base.cc
@@ -50,6 +50,14 @@ return overview_session_->GetCurrentDraggedOverviewItem() == this; } +void OverviewItemBase::OnFocusedViewActivated() { + overview_session_->OnFocusedItemActivated(this); +} + +void OverviewItemBase::OnFocusedViewClosed() { + overview_session_->OnFocusedItemClosed(this); +} + views::Widget::InitParams OverviewItemBase::CreateOverviewItemWidgetParams( aura::Window* parent_window, const std::string& widget_name) const {
diff --git a/ash/wm/overview/overview_item_base.h b/ash/wm/overview/overview_item_base.h index 285c32e..eaeb68fb 100644 --- a/ash/wm/overview/overview_item_base.h +++ b/ash/wm/overview/overview_item_base.h
@@ -67,6 +67,10 @@ // Checks if this item is currently being dragged. ASH_EXPORT bool IsDragItem() const; + // Handles focus related events forwarded from the contents view. + void OnFocusedViewActivated(); + void OnFocusedViewClosed(); + void set_should_animate_when_entering(bool should_animate) { should_animate_when_entering_ = should_animate; } @@ -106,6 +110,7 @@ void set_scrolling_bounds(absl::optional<gfx::RectF> scrolling_bounds) { scrolling_bounds_ = scrolling_bounds; } + absl::optional<gfx::RectF> scrolling_bounds() const { return scrolling_bounds_; } @@ -113,6 +118,7 @@ void set_should_use_spawn_animation(bool value) { should_use_spawn_animation_ = value; } + bool should_use_spawn_animation() const { return should_use_spawn_animation_; } @@ -227,8 +233,6 @@ // Handles events forwarded from the contents view. virtual void HandleMouseEvent(const ui::MouseEvent& event) = 0; virtual void HandleGestureEvent(ui::GestureEvent* event) = 0; - virtual void OnFocusedViewActivated() = 0; - virtual void OnFocusedViewClosed() = 0; virtual void OnOverviewItemDragStarted(OverviewItemBase* item) = 0; virtual void OnOverviewItemDragEnded(bool snap) = 0;
diff --git a/ash/wm/overview/overview_session.cc b/ash/wm/overview/overview_session.cc index cbe3dd7..534f713 100644 --- a/ash/wm/overview/overview_session.cc +++ b/ash/wm/overview/overview_session.cc
@@ -50,6 +50,7 @@ #include "base/functional/bind.h" #include "base/metrics/histogram_macros.h" #include "base/metrics/user_metrics.h" +#include "base/notreached.h" #include "base/ranges/algorithm.h" #include "base/task/single_thread_task_runner.h" #include "ui/compositor/layer.h" @@ -75,6 +76,28 @@ return Shell::Get()->overview_controller()->EndOverview(action); } +// Returns the window to be activated when the given `overview_item` is +// selected. +aura::Window* GetWindowForSelection( + OverviewItemBase* overview_item, + const std::vector<aura::Window*>& window_list) { + const auto item_windows = overview_item->GetWindows(); + CHECK(!item_windows.empty()); + if (item_windows.size() == 1u) { + return item_windows[0]; + } + + // When the given `overview_item` is a group item, return the first window in + // the `window_list` that is contained in `item_windows`. + for (auto* window : window_list) { + if (base::Contains(item_windows, window)) { + return window; + } + } + + NOTREACHED_NORETURN(); +} + // A self-deleting window state observer that runs the given callback when its // associated window state has been changed. class AsyncWindowStateChangeObserver : public WindowStateObserver, @@ -400,11 +423,16 @@ } void OverviewSession::SelectWindow(OverviewItemBase* item) { - aura::Window* window = item->GetWindow(); - aura::Window::Windows window_list = - Shell::Get()->mru_window_tracker()->BuildMruWindowList(kActiveDesk); + // `BuildWindowListIgnoreModal()` is used here to make sure the main window is + // included in the `window_list` with the existence of modal transient + // window(s) which makes the main window is not activatable. + const aura::Window::Windows window_list = + Shell::Get()->mru_window_tracker()->BuildWindowListIgnoreModal( + kActiveDesk); + aura::Window* window = GetWindowForSelection(item, window_list); + if (!window_list.empty()) { - // Record WindowSelector_ActiveWindowChanged if the user is selecting a + // Record `WindowSelector_ActiveWindowChanged` if the user is selecting a // window other than the window that was active prior to entering overview // mode (i.e., the window at the front of the MRU list). if (window_list[0] != window) { @@ -413,6 +441,7 @@ Shell::Get()->metrics()->task_switch_metrics_recorder().OnTaskSwitch( TaskSwitchSource::OVERVIEW_MODE); } + const auto it = base::ranges::find(window_list, window); if (it != window_list.end()) { // Record 1-based index so that selecting a top MRU window will record 1. @@ -420,11 +449,14 @@ 1 + it - window_list.begin()); } } + item->EnsureVisible(); + if (window->GetProperty(kPipOriginalWindowKey)) { window_util::ExpandArcPipWindow(); return; } + // If the selected window is a minimized window, un-minimize it first before // activating it so that the window can use the scale-up animation instead of // un-minimizing animation. The activation of the window will happen in an @@ -444,12 +476,14 @@ } wm::ActivateWindow(window_state->window()); })); + // If we are in split mode, use Show() here to delegate un-minimizing to // SplitViewController as it handles auto snapping cases. - if (SplitViewController::Get(window)->InSplitViewMode()) + if (SplitViewController::Get(window)->InSplitViewMode()) { window->Show(); - else + } else { window_state->Unminimize(); + } return; }
diff --git a/ash/wm/overview/overview_test_util.cc b/ash/wm/overview/overview_test_util.cc index 32322ea..2e6cd8fb 100644 --- a/ash/wm/overview/overview_test_util.cc +++ b/ash/wm/overview/overview_test_util.cc
@@ -137,4 +137,10 @@ } } +void SendKeyUntilOverviewItemIsFocused(ui::KeyboardCode key) { + do { + SendKey(key); + } while (!GetOverviewFocusedWindow()); +} + } // namespace ash
diff --git a/ash/wm/overview/overview_test_util.h b/ash/wm/overview/overview_test_util.h index d6db8592..46d26ab 100644 --- a/ash/wm/overview/overview_test_util.h +++ b/ash/wm/overview/overview_test_util.h
@@ -54,6 +54,10 @@ bool by_touch_gestures = false, bool drop = true); +// Press the key repeatedly until a window is focused, i.e. ignoring any +// desk items. +void SendKeyUntilOverviewItemIsFocused(ui::KeyboardCode key); + } // namespace ash #endif // ASH_WM_OVERVIEW_OVERVIEW_TEST_UTIL_H_
diff --git a/ash/wm/snap_group/snap_group_unittest.cc b/ash/wm/snap_group/snap_group_unittest.cc index 02db9761..1a6a959 100644 --- a/ash/wm/snap_group/snap_group_unittest.cc +++ b/ash/wm/snap_group/snap_group_unittest.cc
@@ -938,7 +938,6 @@ OverviewController* overview_controller = Shell::Get()->overview_controller(); overview_controller->StartOverview(OverviewStartAction::kTests, OverviewEnterExitType::kImmediateEnter); - ASSERT_TRUE(overview_controller->InOverviewSession()); const auto* overview_grid = @@ -979,6 +978,54 @@ } } +// Tests the basic functionality of focus cycling in overview through tabbing, +// the overview group item will be focused and activated as a group +TEST_F(SnapGroupEntryPointArm1Test, OverviewGroupItemFocusCycling) { + std::unique_ptr<aura::Window> window0 = CreateAppWindow(); + std::unique_ptr<aura::Window> window1 = CreateAppWindow(); + std::unique_ptr<aura::Window> window2 = CreateAppWindow(gfx::Rect(100, 100)); + SnapTwoTestWindowsInArm1(window0.get(), window1.get()); + EXPECT_TRUE(window_util::IsStackedBelow(window0.get(), window1.get())); + + OverviewController* overview_controller = Shell::Get()->overview_controller(); + overview_controller->StartOverview(OverviewStartAction::kTests, + OverviewEnterExitType::kImmediateEnter); + ASSERT_TRUE(overview_controller->InOverviewSession()); + + const auto* overview_grid = + GetOverviewGridForRoot(Shell::GetPrimaryRootWindow()); + ASSERT_TRUE(overview_grid); + const auto& window_list = overview_grid->window_list(); + ASSERT_EQ(window_list.size(), 2u); + + // Overview items to be cycled: + // [window0, window1], window2 + SendKeyUntilOverviewItemIsFocused(ui::VKEY_TAB); + SendKey(ui::VKEY_TAB); + SendKey(ui::VKEY_RETURN); + EXPECT_FALSE(overview_controller->InOverviewSession()); + MruWindowTracker* mru_window_tracker = Shell::Get()->mru_window_tracker(); + EXPECT_EQ( + window_util::GetTopMostWindow( + mru_window_tracker->BuildMruWindowList(DesksMruType::kActiveDesk)), + window2.get()); + + overview_controller->StartOverview(OverviewStartAction::kTests, + OverviewEnterExitType::kImmediateEnter); + EXPECT_TRUE(overview_controller->InOverviewSession()); + + // Overview items to be cycled: + // window2, [window0, window1] + SendKeyUntilOverviewItemIsFocused(ui::VKEY_TAB); + SendKey(ui::VKEY_TAB); + SendKey(ui::VKEY_RETURN); + EXPECT_FALSE(overview_controller->InOverviewSession()); + EXPECT_EQ( + window_util::GetTopMostWindow( + mru_window_tracker->BuildMruWindowList(DesksMruType::kActiveDesk)), + window1.get()); +} + // Tests that the hit area of the split view divider can be outside of its // bounds with the extra insets whose value is `kSplitViewDividerExtraInset`. TEST_F(SnapGroupEntryPointArm1Test, SplitViewDividerEnlargedHitArea) {
diff --git a/base/BUILD.gn b/base/BUILD.gn index 585f94bb..9de7c5d5 100644 --- a/base/BUILD.gn +++ b/base/BUILD.gn
@@ -4732,6 +4732,7 @@ "android/junit/src/org/chromium/base/BuildInfoTest.java", "android/junit/src/org/chromium/base/CallbackControllerTest.java", "android/junit/src/org/chromium/base/CollectionUtilTest.java", + "android/junit/src/org/chromium/base/CommandLineTest.java", "android/junit/src/org/chromium/base/DiscardableReferencePoolTest.java", "android/junit/src/org/chromium/base/FeatureListUnitTest.java", "android/junit/src/org/chromium/base/FileUtilsTest.java",
diff --git a/base/android/java/src/org/chromium/base/CommandLine.java b/base/android/java/src/org/chromium/base/CommandLine.java index 99cf2270..0890e69 100644 --- a/base/android/java/src/org/chromium/base/CommandLine.java +++ b/base/android/java/src/org/chromium/base/CommandLine.java
@@ -158,8 +158,7 @@ * Resets both the java proxy and the native command lines. This allows the entire * command line initialization to be re-run including the call to onJniLoaded. */ - @VisibleForTesting - public static void reset() { + static void resetForTesting() { setInstance(null); } @@ -243,14 +242,6 @@ } /** - * Set {@link CommandLine} for testing. - * @param commandLine The {@link CommandLine} to use. - */ - public static void setInstanceForTesting(CommandLine commandLine) { - setInstance(commandLine); - } - - /** * @param fileName the file to read in. * @return Array of chars read from the file, or null if the file cannot be read. */ @@ -268,7 +259,8 @@ private CommandLine() {} - private static class JavaCommandLine extends CommandLine { + @VisibleForTesting + static class JavaCommandLine extends CommandLine { private HashMap<String, String> mSwitches = new HashMap<String, String>(); private ArrayList<String> mArgs = new ArrayList<String>();
diff --git a/base/android/javatests/src/org/chromium/base/CommandLineTest.java b/base/android/javatests/src/org/chromium/base/CommandLineTest.java index b8a0bc2..4aece1c7 100644 --- a/base/android/javatests/src/org/chromium/base/CommandLineTest.java +++ b/base/android/javatests/src/org/chromium/base/CommandLineTest.java
@@ -1,39 +1,39 @@ -// Copyright 2017 The Chromium Authors +// Copyright 2013 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.base; -import androidx.test.filters.SmallTest; +import androidx.test.filters.MediumTest; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; +import org.chromium.base.library_loader.LibraryLoader; import org.chromium.base.test.BaseJUnit4ClassRunner; +import org.chromium.base.test.util.DoNotBatch; import org.chromium.base.test.util.Feature; -import java.util.Map; - /** - * Tests for {@link CommandLine}. - * TODO(bauerb): Convert to local JUnit test + * Test class for command lines. */ @RunWith(BaseJUnit4ClassRunner.class) +@DoNotBatch(reason = "Tests java -> native transition") public class CommandLineTest { // A reference command line. Note that switch2 is [brea\d], switch3 is [and "butter"], // and switch4 is [a "quoted" 'food'!] - static final String INIT_SWITCHES[] = { "init_command", "--SWITCH", "Arg", - "--switch2=brea\\d", "--switch3=and \"butter\"", - "--switch4=a \"quoted\" 'food'!", - "--", "--actually_an_arg" }; + static final String[] INIT_SWITCHES = {"init_command", "--switch", "Arg", "--switch2=brea\\d", + "--switch3=and \"butter\"", "--switch4=a \"quoted\" 'food'!", "--", + "--actually_an_arg"}; // The same command line, but in quoted string format. - static final char INIT_SWITCHES_BUFFER[] = - ("init_command --SWITCH Arg --switch2=brea\\d --switch3=\"and \\\"butt\"er\\\" " - + "--switch4='a \"quoted\" \\'food\\'!' " - + "-- --actually_an_arg").toCharArray(); + static final char[] INIT_SWITCHES_BUFFER = + ("init_command --switch Arg --switch2=brea\\d --switch3=\"and \\\"butt\"er\\\" " + + "--switch4='a \"quoted\" \\'food\\'!' " + + "-- --actually_an_arg") + .toCharArray(); static final String CL_ADDED_SWITCH = "zappo-dappo-doggy-trainer"; static final String CL_ADDED_SWITCH_2 = "username"; @@ -41,25 +41,30 @@ @Before public void setUp() { - CommandLine.reset(); + CommandLine.resetForTesting(); + } + + void loadJni() { + Assert.assertFalse(CommandLine.getInstance().isNativeImplementation()); + LibraryLoader.getInstance().ensureInitialized(); + Assert.assertTrue(CommandLine.getInstance().isNativeImplementation()); } void checkInitSwitches() { CommandLine cl = CommandLine.getInstance(); Assert.assertFalse(cl.hasSwitch("init_command")); - Assert.assertFalse(cl.hasSwitch("switch")); - Assert.assertTrue(cl.hasSwitch("SWITCH")); - Assert.assertFalse(cl.hasSwitch("--SWITCH")); - Assert.assertFalse(cl.hasSwitch("Arg")); + Assert.assertTrue(cl.hasSwitch("switch")); + Assert.assertFalse(cl.hasSwitch("--switch")); + Assert.assertFalse(cl.hasSwitch("arg")); Assert.assertFalse(cl.hasSwitch("actually_an_arg")); Assert.assertEquals("brea\\d", cl.getSwitchValue("switch2")); Assert.assertEquals("and \"butter\"", cl.getSwitchValue("switch3")); Assert.assertEquals("a \"quoted\" 'food'!", cl.getSwitchValue("switch4")); - Assert.assertNull(cl.getSwitchValue("SWITCH")); + Assert.assertNull(cl.getSwitchValue("switch")); Assert.assertNull(cl.getSwitchValue("non-existant")); } - void checkSettingThenGettingThenRemoving() { + void checkSettingThenGetting() { CommandLine cl = CommandLine.getInstance(); // Add a plain switch. @@ -71,124 +76,61 @@ Assert.assertFalse(cl.hasSwitch(CL_ADDED_SWITCH_2)); Assert.assertNull(cl.getSwitchValue(CL_ADDED_SWITCH_2)); cl.appendSwitchWithValue(CL_ADDED_SWITCH_2, CL_ADDED_VALUE_2); - Assert.assertEquals(CL_ADDED_VALUE_2, cl.getSwitchValue(CL_ADDED_SWITCH_2)); - - // Update a switch's value. - cl.appendSwitchWithValue(CL_ADDED_SWITCH_2, "updatedValue"); - Assert.assertEquals("updatedValue", cl.getSwitchValue(CL_ADDED_SWITCH_2)); + Assert.assertTrue(CL_ADDED_VALUE_2.equals(cl.getSwitchValue(CL_ADDED_SWITCH_2))); // Append a few new things. - final String switchesAndArgs[] = { "dummy", "--superfast", "--speed=turbo" }; - Assert.assertFalse(cl.hasSwitch("dummy")); + final String[] switchesAndArgs = {"thing", "--superfast", "--speed=turbo"}; + Assert.assertFalse(cl.hasSwitch("thing")); Assert.assertFalse(cl.hasSwitch("superfast")); Assert.assertNull(cl.getSwitchValue("speed")); cl.appendSwitchesAndArguments(switchesAndArgs); - Assert.assertFalse(cl.hasSwitch("dummy")); + Assert.assertFalse(cl.hasSwitch("thing")); Assert.assertFalse(cl.hasSwitch("command")); Assert.assertTrue(cl.hasSwitch("superfast")); - Assert.assertEquals("turbo", cl.getSwitchValue("speed")); - - // Get all switches - Map<String, String> switches = cl.getSwitches(); - Assert.assertTrue(switches.containsKey(CL_ADDED_SWITCH)); - Assert.assertTrue(switches.containsKey(CL_ADDED_SWITCH_2)); - - // Remove a plain switch. - cl.removeSwitch(CL_ADDED_SWITCH); - Assert.assertFalse(cl.hasSwitch(CL_ADDED_SWITCH)); - - // Remove a switch with a value. - cl.removeSwitch(CL_ADDED_SWITCH_2); - Assert.assertFalse(cl.hasSwitch(CL_ADDED_SWITCH_2)); - Assert.assertNull(cl.getSwitchValue(CL_ADDED_SWITCH_2)); - - // Get all switches again to verify it updated. - switches = cl.getSwitches(); - Assert.assertFalse(switches.containsKey(CL_ADDED_SWITCH)); - Assert.assertFalse(switches.containsKey(CL_ADDED_SWITCH_2)); + Assert.assertTrue("turbo".equals(cl.getSwitchValue("speed"))); } - void checkTokenizer(String[] expected, String toParse) { - String[] actual = CommandLine.tokenizeQuotedArguments(toParse.toCharArray()); - Assert.assertEquals(expected.length, actual.length); - for (int i = 0; i < expected.length; ++i) { - Assert.assertEquals("comparing element " + i, expected[i], actual[i]); - } + void checkAppendedSwitchesPassedThrough() { + CommandLine cl = CommandLine.getInstance(); + Assert.assertTrue(cl.hasSwitch(CL_ADDED_SWITCH)); + Assert.assertTrue(cl.hasSwitch(CL_ADDED_SWITCH_2)); + Assert.assertTrue(CL_ADDED_VALUE_2.equals(cl.getSwitchValue(CL_ADDED_SWITCH_2))); } @Test - @SmallTest + @MediumTest @Feature({"Android-AppBase"}) - public void testJavaInitialization() { + public void testJavaNativeTransition() { CommandLine.init(INIT_SWITCHES); checkInitSwitches(); - checkSettingThenGettingThenRemoving(); - } - - @Test - @SmallTest - @Feature({"Android-AppBase"}) - public void testBufferInitialization() { - CommandLine.init(CommandLine.tokenizeQuotedArguments(INIT_SWITCHES_BUFFER)); + loadJni(); checkInitSwitches(); - checkSettingThenGettingThenRemoving(); + checkSettingThenGetting(); } @Test - @SmallTest + @MediumTest @Feature({"Android-AppBase"}) - public void testArgumentTokenizer() { - String toParse = " a\"\\bc de\\\"f g\"\\h ij k\" \"lm"; - String[] expected = { "a\\bc de\"f g\\h", - "ij", - "k lm" }; - checkTokenizer(expected, toParse); - - toParse = ""; - expected = new String[0]; - checkTokenizer(expected, toParse); - - toParse = " \t\n"; - checkTokenizer(expected, toParse); - - toParse = " \"a'b\" 'c\"d' \"e\\\"f\" 'g\\'h' \"i\\'j\" 'k\\\"l'" - + " m\"n\\'o\"p q'r\\\"s't"; - expected = new String[] { "a'b", - "c\"d", - "e\"f", - "g'h", - "i\\'j", - "k\\\"l", - "mn\\'op", - "qr\\\"st"}; - checkTokenizer(expected, toParse); + public void testJavaNativeTransitionAfterAppends() { + CommandLine.init(INIT_SWITCHES); + checkInitSwitches(); + checkSettingThenGetting(); + loadJni(); + checkInitSwitches(); + checkAppendedSwitchesPassedThrough(); } @Test - @SmallTest + @MediumTest @Feature({"Android-AppBase"}) - public void testUpdatingArgList() { + public void testNativeInitialization() { CommandLine.init(null); - CommandLine cl = CommandLine.getInstance(); - cl.appendSwitch(CL_ADDED_SWITCH); - cl.appendSwitchWithValue(CL_ADDED_SWITCH_2, CL_ADDED_VALUE_2); - cl.appendSwitchWithValue(CL_ADDED_SWITCH_2, "updatedValue"); - - final String[] expectedValueForBothSwitches = { - "", - "--" + CL_ADDED_SWITCH, - "--" + CL_ADDED_SWITCH_2 + "=" + CL_ADDED_VALUE_2, - "--" + CL_ADDED_SWITCH_2 + "=updatedValue", - }; - Assert.assertArrayEquals("Appending a switch multiple times should add multiple args", - expectedValueForBothSwitches, CommandLine.getJavaSwitchesOrNull()); - - cl.removeSwitch(CL_ADDED_SWITCH_2); - final String[] expectedValueWithSecondSwitchRemoved = { - "", - "--" + CL_ADDED_SWITCH, - }; - Assert.assertArrayEquals("Removing a switch should remove all its args", - expectedValueWithSecondSwitchRemoved, CommandLine.getJavaSwitchesOrNull()); + loadJni(); + // Drop the program name for use with appendSwitchesAndArguments. + String[] args = new String[INIT_SWITCHES.length - 1]; + System.arraycopy(INIT_SWITCHES, 1, args, 0, args.length); + CommandLine.getInstance().appendSwitchesAndArguments(args); + checkInitSwitches(); + checkSettingThenGetting(); } }
diff --git a/base/android/junit/src/org/chromium/base/CommandLineTest.java b/base/android/junit/src/org/chromium/base/CommandLineTest.java new file mode 100644 index 0000000..641cfe8 --- /dev/null +++ b/base/android/junit/src/org/chromium/base/CommandLineTest.java
@@ -0,0 +1,189 @@ +// 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. + +package org.chromium.base; + +import androidx.test.filters.SmallTest; + +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.robolectric.annotation.Config; + +import org.chromium.base.test.BaseRobolectricTestRunner; +import org.chromium.base.test.util.Feature; + +import java.util.Map; + +/** + * Tests for {@link CommandLine}. + */ +@RunWith(BaseRobolectricTestRunner.class) +@Config(manifest = Config.NONE) +public class CommandLineTest { + // A reference command line. Note that switch2 is [brea\d], switch3 is [and "butter"], + // and switch4 is [a "quoted" 'food'!] + static final String[] INIT_SWITCHES = {"init_command", "--SWITCH", "Arg", "--switch2=brea\\d", + "--switch3=and \"butter\"", "--switch4=a \"quoted\" 'food'!", "--", + "--actually_an_arg"}; + + // The same command line, but in quoted string format. + static final char[] INIT_SWITCHES_BUFFER = + ("init_command --SWITCH Arg --switch2=brea\\d --switch3=\"and \\\"butt\"er\\\" " + + "--switch4='a \"quoted\" \\'food\\'!' " + + "-- --actually_an_arg") + .toCharArray(); + + static final String CL_ADDED_SWITCH = "zappo-dappo-doggy-trainer"; + static final String CL_ADDED_SWITCH_2 = "username"; + static final String CL_ADDED_VALUE_2 = "bozo"; + + private CommandLine mCommandLine; + + @Before + public void setUp() { + mCommandLine = new CommandLine.JavaCommandLine(null); + } + + void checkInitSwitches() { + CommandLine cl = mCommandLine; + Assert.assertFalse(cl.hasSwitch("init_command")); + Assert.assertFalse(cl.hasSwitch("switch")); + Assert.assertTrue(cl.hasSwitch("SWITCH")); + Assert.assertFalse(cl.hasSwitch("--SWITCH")); + Assert.assertFalse(cl.hasSwitch("Arg")); + Assert.assertFalse(cl.hasSwitch("actually_an_arg")); + Assert.assertEquals("brea\\d", cl.getSwitchValue("switch2")); + Assert.assertEquals("and \"butter\"", cl.getSwitchValue("switch3")); + Assert.assertEquals("a \"quoted\" 'food'!", cl.getSwitchValue("switch4")); + Assert.assertNull(cl.getSwitchValue("SWITCH")); + Assert.assertNull(cl.getSwitchValue("non-existant")); + } + + void checkSettingThenGettingThenRemoving() { + CommandLine cl = mCommandLine; + + // Add a plain switch. + Assert.assertFalse(cl.hasSwitch(CL_ADDED_SWITCH)); + cl.appendSwitch(CL_ADDED_SWITCH); + Assert.assertTrue(cl.hasSwitch(CL_ADDED_SWITCH)); + + // Add a switch paired with a value. + Assert.assertFalse(cl.hasSwitch(CL_ADDED_SWITCH_2)); + Assert.assertNull(cl.getSwitchValue(CL_ADDED_SWITCH_2)); + cl.appendSwitchWithValue(CL_ADDED_SWITCH_2, CL_ADDED_VALUE_2); + Assert.assertEquals(CL_ADDED_VALUE_2, cl.getSwitchValue(CL_ADDED_SWITCH_2)); + + // Update a switch's value. + cl.appendSwitchWithValue(CL_ADDED_SWITCH_2, "updatedValue"); + Assert.assertEquals("updatedValue", cl.getSwitchValue(CL_ADDED_SWITCH_2)); + + // Append a few new things. + final String[] switchesAndArgs = {"thing", "--superfast", "--speed=turbo"}; + Assert.assertFalse(cl.hasSwitch("thing")); + Assert.assertFalse(cl.hasSwitch("superfast")); + Assert.assertNull(cl.getSwitchValue("speed")); + cl.appendSwitchesAndArguments(switchesAndArgs); + Assert.assertFalse(cl.hasSwitch("thing")); + Assert.assertFalse(cl.hasSwitch("command")); + Assert.assertTrue(cl.hasSwitch("superfast")); + Assert.assertEquals("turbo", cl.getSwitchValue("speed")); + + // Get all switches + Map<String, String> switches = cl.getSwitches(); + Assert.assertTrue(switches.containsKey(CL_ADDED_SWITCH)); + Assert.assertTrue(switches.containsKey(CL_ADDED_SWITCH_2)); + + // Remove a plain switch. + cl.removeSwitch(CL_ADDED_SWITCH); + Assert.assertFalse(cl.hasSwitch(CL_ADDED_SWITCH)); + + // Remove a switch with a value. + cl.removeSwitch(CL_ADDED_SWITCH_2); + Assert.assertFalse(cl.hasSwitch(CL_ADDED_SWITCH_2)); + Assert.assertNull(cl.getSwitchValue(CL_ADDED_SWITCH_2)); + + // Get all switches again to verify it updated. + switches = cl.getSwitches(); + Assert.assertFalse(switches.containsKey(CL_ADDED_SWITCH)); + Assert.assertFalse(switches.containsKey(CL_ADDED_SWITCH_2)); + } + + void checkTokenizer(String[] expected, String toParse) { + String[] actual = CommandLine.tokenizeQuotedArguments(toParse.toCharArray()); + Assert.assertEquals(expected.length, actual.length); + for (int i = 0; i < expected.length; ++i) { + Assert.assertEquals("comparing element " + i, expected[i], actual[i]); + } + } + + @Test + @SmallTest + @Feature({"Android-AppBase"}) + public void testJavaInitialization() { + mCommandLine = new CommandLine.JavaCommandLine(INIT_SWITCHES); + checkInitSwitches(); + checkSettingThenGettingThenRemoving(); + } + + @Test + @SmallTest + @Feature({"Android-AppBase"}) + public void testBufferInitialization() { + mCommandLine = new CommandLine.JavaCommandLine( + CommandLine.tokenizeQuotedArguments(INIT_SWITCHES_BUFFER)); + checkInitSwitches(); + checkSettingThenGettingThenRemoving(); + } + + @Test + @SmallTest + @Feature({"Android-AppBase"}) + public void testArgumentTokenizer() { + String toParse = " a\"\\bc de\\\"f g\"\\h ij k\" \"lm"; + String[] expected = {"a\\bc de\"f g\\h", "ij", "k lm"}; + checkTokenizer(expected, toParse); + + toParse = ""; + expected = new String[0]; + checkTokenizer(expected, toParse); + + toParse = " \t\n"; + checkTokenizer(expected, toParse); + + toParse = " \"a'b\" 'c\"d' \"e\\\"f\" 'g\\'h' \"i\\'j\" 'k\\\"l'" + + " m\"n\\'o\"p q'r\\\"s't"; + expected = new String[] { + "a'b", "c\"d", "e\"f", "g'h", "i\\'j", "k\\\"l", "mn\\'op", "qr\\\"st"}; + checkTokenizer(expected, toParse); + } + + @Test + @SmallTest + @Feature({"Android-AppBase"}) + public void testUpdatingArgList() { + CommandLine cl = mCommandLine; + cl.appendSwitch(CL_ADDED_SWITCH); + cl.appendSwitchWithValue(CL_ADDED_SWITCH_2, CL_ADDED_VALUE_2); + cl.appendSwitchWithValue(CL_ADDED_SWITCH_2, "updatedValue"); + + final String[] expectedValueForBothSwitches = { + "", + "--" + CL_ADDED_SWITCH, + "--" + CL_ADDED_SWITCH_2 + "=" + CL_ADDED_VALUE_2, + "--" + CL_ADDED_SWITCH_2 + "=updatedValue", + }; + Assert.assertArrayEquals("Appending a switch multiple times should add multiple args", + expectedValueForBothSwitches, mCommandLine.getCommandLineArguments()); + + cl.removeSwitch(CL_ADDED_SWITCH_2); + final String[] expectedValueWithSecondSwitchRemoved = { + "", + "--" + CL_ADDED_SWITCH, + }; + Assert.assertArrayEquals("Removing a switch should remove all its args", + expectedValueWithSecondSwitchRemoved, mCommandLine.getCommandLineArguments()); + } +}
diff --git a/base/hash/hash.cc b/base/hash/hash.cc index 389d50a..7312341 100644 --- a/base/hash/hash.cc +++ b/base/hash/hash.cc
@@ -4,6 +4,8 @@ #include "base/hash/hash.h" +#include <string_view> + #include "base/check_op.h" #include "base/notreached.h" #include "base/rand_util.h" @@ -149,8 +151,8 @@ return PersistentHash(make_span(static_cast<const uint8_t*>(data), length)); } -uint32_t PersistentHash(const std::string& str) { - return PersistentHash(str.data(), str.size()); +uint32_t PersistentHash(std::string_view str) { + return PersistentHash(as_bytes(make_span(str))); } size_t HashInts32(uint32_t value1, uint32_t value2) {
diff --git a/base/hash/hash.h b/base/hash/hash.h index b5b782f..235908a1 100644 --- a/base/hash/hash.h +++ b/base/hash/hash.h
@@ -10,6 +10,7 @@ #include <limits> #include <string> +#include <string_view> #include <utility> #include "base/base_export.h" @@ -48,7 +49,7 @@ // WARNING: This hash function should not be used for any cryptographic purpose. BASE_EXPORT uint32_t PersistentHash(base::span<const uint8_t> data); BASE_EXPORT uint32_t PersistentHash(const void* data, size_t length); -BASE_EXPORT uint32_t PersistentHash(const std::string& str); +BASE_EXPORT uint32_t PersistentHash(std::string_view str); // Hash pairs of 32-bit or 64-bit numbers. BASE_EXPORT size_t HashInts32(uint32_t value1, uint32_t value2);
diff --git a/base/test/BUILD.gn b/base/test/BUILD.gn index e2c25e2c..2919ca5 100644 --- a/base/test/BUILD.gn +++ b/base/test/BUILD.gn
@@ -103,6 +103,7 @@ "power_monitor_test.h", "power_monitor_test_utils.cc", "power_monitor_test_utils.h", + "protobuf_matchers.h", "rectify_callback.h", "rectify_callback_internal.h", "repeating_test_future.h",
diff --git a/base/test/launcher/test_launcher.cc b/base/test/launcher/test_launcher.cc index 581c1e68..b570c71 100644 --- a/base/test/launcher/test_launcher.cc +++ b/base/test/launcher/test_launcher.cc
@@ -9,6 +9,7 @@ #include <algorithm> #include <map> #include <random> +#include <string_view> #include <unordered_map> #include <unordered_set> #include <utility> @@ -2002,9 +2003,9 @@ } bool TestLauncher::ShouldRunInCurrentShard( - const std::string& prefix_stripped_name) const { - CHECK(!StartsWith(prefix_stripped_name, kPreTestPrefix) && - !StartsWith(prefix_stripped_name, kDisabledTestPrefix)); + std::string_view prefix_stripped_name) const { + CHECK(!StartsWith(prefix_stripped_name, kPreTestPrefix)); + CHECK(!StartsWith(prefix_stripped_name, kDisabledTestPrefix)); return PersistentHash(prefix_stripped_name) % total_shards_ == static_cast<uint32_t>(shard_index_); } @@ -2109,11 +2110,10 @@ // `enforced_positive_tests`. Otherwise, fail loudly. if (enforce_exact_postive_filter_) { for (const auto& filter : positive_exact_filter) { - std::string filter_string(filter); - if (!ShouldRunInCurrentShard(filter_string)) { + if (!ShouldRunInCurrentShard(filter)) { continue; } - CHECK(Contains(enforced_positive_tests, filter_string)) + CHECK(Contains(enforced_positive_tests, std::string(filter))) << "Found exact positive filter not enforced: " << filter; } }
diff --git a/base/test/launcher/test_launcher.h b/base/test/launcher/test_launcher.h index ceec9ac..46bde67d 100644 --- a/base/test/launcher/test_launcher.h +++ b/base/test/launcher/test_launcher.h
@@ -11,6 +11,7 @@ #include <memory> #include <set> #include <string> +#include <string_view> #include <unordered_set> #include <vector> @@ -248,7 +249,7 @@ // Helper to tell if the test runs in current shard. // `prefix_stripped_name` is the test name excluding DISABLED_ and // PRE_ prefixes. - bool ShouldRunInCurrentShard(const std::string& prefix_stripped_name) const; + bool ShouldRunInCurrentShard(std::string_view prefix_stripped_name) const; // Helper to check whether only exact positive filter is passed via // a filter file.
diff --git a/base/test/protobuf_matchers.h b/base/test/protobuf_matchers.h new file mode 100644 index 0000000..01480ee --- /dev/null +++ b/base/test/protobuf_matchers.h
@@ -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. + +#ifndef BASE_TEST_PROTOBUF_MATCHERS_H_ +#define BASE_TEST_PROTOBUF_MATCHERS_H_ + +#include <string> + +#include "testing/gmock/include/gmock/gmock-matchers.h" + +namespace base { + +// Matcher that verifies two protobufs contain the same data. +MATCHER_P(EqualsProto, + message, + "Match a proto Message equal to the matcher's argument.") { + std::string expected_serialized; + if (!message.SerializeToString(&expected_serialized)) { + *result_listener << "Expected proto fails to serialize"; + return false; + } + std::string actual_serialized; + if (!arg.SerializeToString(&actual_serialized)) { + *result_listener << "Actual proto fails to serialize"; + return false; + } + if (expected_serialized != actual_serialized) { + *result_listener << "Provided proto did not match the expected proto" + << "\n Serialized Expected Proto: " << expected_serialized + << "\n Serialized Provided Proto: " << actual_serialized; + return false; + } + return true; +} + +} // namespace base + +#endif // BASE_TEST_PROTOBUF_MATCHERS_H_
diff --git a/build/android/bytecode/java/org/chromium/bytecode/FragmentActivityReplacer.java b/build/android/bytecode/java/org/chromium/bytecode/FragmentActivityReplacer.java index 0966be0b..0b992ffa 100644 --- a/build/android/bytecode/java/org/chromium/bytecode/FragmentActivityReplacer.java +++ b/build/android/bytecode/java/org/chromium/bytecode/FragmentActivityReplacer.java
@@ -55,7 +55,7 @@ @Override protected boolean shouldRewriteClass(String classPath) { - return true; + return false; } @Override
diff --git a/build/android/pylib/local/device/local_device_environment.py b/build/android/pylib/local/device/local_device_environment.py index 39b90d0..582e690 100644 --- a/build/android/pylib/local/device/local_device_environment.py +++ b/build/android/pylib/local/device/local_device_environment.py
@@ -86,26 +86,6 @@ return decorator -# TODO(b/293175593): Use PlaceNomediaFile after -# https://crrev.com/c/4877296 lands -def place_nomedia_on_device(dev, device_root, as_root=False): - """Places .nomedia file in test data root. - - This helps to prevent system from scanning media files inside test data. - - Args: - dev: Device to place .nomedia file. - device_root: Base path on device to place .nomedia file. - """ - - dev.RunShellCommand(['mkdir', '-p', device_root], - check_return=True, - as_root=as_root) - dev.WriteFile('%s/.nomedia' % device_root, - 'https://crbug.com/796640', - as_root=as_root) - - # TODO(1262303): After Telemetry is supported by python3 we can re-add # super without arguments in this script. # pylint: disable=super-with-arguments
diff --git a/build/android/pylib/local/device/local_device_gtest_run.py b/build/android/pylib/local/device/local_device_gtest_run.py index 86fe489..0b49651 100644 --- a/build/android/pylib/local/device/local_device_gtest_run.py +++ b/build/android/pylib/local/device/local_device_gtest_run.py
@@ -430,8 +430,7 @@ host_device_tuples_substituted = [ (h, local_device_test_run.SubstituteDeviceRoot(d, device_root)) for h, d in host_device_tuples] - local_device_environment.place_nomedia_on_device( - dev, device_root, as_root=self._env.force_main_user) + dev.PlaceNomediaFile(device_root) dev.PushChangedFiles( host_device_tuples_substituted, delete_device_stale=True,
diff --git a/build/android/pylib/local/device/local_device_instrumentation_test_run.py b/build/android/pylib/local/device/local_device_instrumentation_test_run.py index 6f8c6dd0..bb65d80b 100644 --- a/build/android/pylib/local/device/local_device_instrumentation_test_run.py +++ b/build/android/pylib/local/device/local_device_instrumentation_test_run.py
@@ -445,6 +445,8 @@ def push_test_data(dev): device_root = posixpath.join(dev.GetExternalStoragePath(), 'chromium_tests_root') + if self._env.force_main_user: + device_root = dev.ResolveSpecialPath(device_root) host_device_tuples_substituted = [ (h, local_device_test_run.SubstituteDeviceRoot(d, device_root)) for h, d in host_device_tuples @@ -452,13 +454,17 @@ logging.info('Pushing data dependencies.') for h, d in host_device_tuples_substituted: logging.debug(' %r -> %r', h, d) - local_device_environment.place_nomedia_on_device(dev, device_root) + dev.PlaceNomediaFile(device_root) dev.PushChangedFiles(host_device_tuples_substituted, delete_device_stale=True, as_root=self._env.force_main_user) if not host_device_tuples_substituted: - dev.RunShellCommand(['rm', '-rf', device_root], check_return=True) - dev.RunShellCommand(['mkdir', '-p', device_root], check_return=True) + dev.RunShellCommand(['rm', '-rf', device_root], + check_return=True, + as_root=self._env.force_main_user) + dev.RunShellCommand(['mkdir', '-p', device_root], + check_return=True, + as_root=self._env.force_main_user) @trace_event.traced def create_flag_changer(dev):
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn index 1ddd33c..da2c9d3 100644 --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn
@@ -1837,7 +1837,7 @@ # Some builders, such as Cronet, use a different version of Clang than # Chromium. This can cause minor errors when compiling Chromium changes. We # want to avoid these errors. - if (use_lenient_compiler_flags) { + if (llvm_android_mainline) { cflags += [ "-Wno-error=unknown-warning-option", "-Wno-error=unused-command-line-argument",
diff --git a/build/config/compiler/compiler.gni b/build/config/compiler/compiler.gni index 9840460..d70d2fe 100644 --- a/build/config/compiler/compiler.gni +++ b/build/config/compiler/compiler.gni
@@ -138,7 +138,8 @@ # Set to true to enable using the ML inliner in LLVM. This currently only # enables the ML inliner when targeting Android. # Currently the ML inliner is only supported on linux hosts - use_ml_inliner = host_os == "linux" && is_android + use_ml_inliner = host_os == "linux" && is_android && + !llvm_android_mainline # https://crbug.com/1468680 # Set to true to use the android unwinder V2 implementation. use_android_unwinder_v2 = true
diff --git a/build/config/cronet/config.gni b/build/config/cronet/config.gni index 0687f49..1468ec1 100644 --- a/build/config/cronet/config.gni +++ b/build/config/cronet/config.gni
@@ -7,11 +7,4 @@ # components/cronet/tools/cr_cronet.py as cronet requires specific # gn args to build correctly). is_cronet_build = false - - # Control whether lenient compiler flags should be used. To ensure that minor - # failures in the AOSP Cronet builders do not block Chromium CLs, we will make - # these builders as lenient as possible by not treating some warnings as - # errors. Please refer to go/cronet-builders-with-mainline-clang-design for - # more information. - use_lenient_compiler_flags = false }
diff --git a/build/fuchsia/test/isolate_daemon.py b/build/fuchsia/test/isolate_daemon.py new file mode 100755 index 0000000..2fe7761 --- /dev/null +++ b/build/fuchsia/test/isolate_daemon.py
@@ -0,0 +1,66 @@ +#!/usr/bin/env vpython3 +# 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. +"""Sets up the isolate daemon environment to run test on the bots.""" + +import os +import sys +import tempfile + +from contextlib import AbstractContextManager +from typing import List + +from common import catch_sigterm, set_ffx_isolate_dir, start_ffx_daemon, \ + stop_ffx_daemon, wait_for_sigterm +from ffx_integration import ScopedFfxConfig + + +class IsolateDaemon(AbstractContextManager): + """Sets up the environment of an isolate ffx daemon.""" + class IsolateDir(AbstractContextManager): + """Sets up the ffx isolate dir to a temporary folder.""" + def __init__(self): + self._temp_dir = tempfile.TemporaryDirectory() + + def __enter__(self): + set_ffx_isolate_dir(self._temp_dir.__enter__()) + return self + + def __exit__(self, exc_type, exc_value, traceback): + return self._temp_dir.__exit__(exc_type, exc_value, traceback) + + def __init__(self, extra_inits: List[AbstractContextManager] = None): + self._extra_inits = [ + self.IsolateDir(), + ScopedFfxConfig('repository.server.listen', '"[::]:0"'), + ScopedFfxConfig('daemon.autostart', 'false'), + ScopedFfxConfig('discovery.zedboot.enabled', 'false'), + ScopedFfxConfig('fastboot.reboot.reconnect_timeout', '120'), + ScopedFfxConfig('log.level', 'debug') + ] + extra_inits or [] + + def __enter__(self): + # Updating configurations to meet the requirement of isolate. + os.environ['FUCHSIA_ANALYTICS_DISABLED'] = '1' + stop_ffx_daemon() + for extra_init in self._extra_inits: + extra_init.__enter__() + start_ffx_daemon() + return self + + def __exit__(self, exc_type, exc_value, traceback): + for extra_init in self._extra_inits: + extra_init.__exit__(exc_type, exc_value, traceback) + stop_ffx_daemon() + + +def main(): + """Executes the IsolateDaemon and waits for the sigterm.""" + catch_sigterm() + with IsolateDaemon(): + wait_for_sigterm('shutting down the daemon.') + + +if __name__ == '__main__': + sys.exit(main())
diff --git a/build/fuchsia/test/run_test.py b/build/fuchsia/test/run_test.py index 3210804..a49ba2ca 100755 --- a/build/fuchsia/test/run_test.py +++ b/build/fuchsia/test/run_test.py
@@ -14,11 +14,11 @@ from typing import List from common import register_common_args, register_device_args, \ - register_log_args, resolve_packages, set_ffx_isolate_dir, \ - start_ffx_daemon, stop_ffx_daemon + register_log_args, resolve_packages from compatible_utils import running_unattended from ffx_integration import ScopedFfxConfig, test_connection from flash_device import register_update_args, update +from isolate_daemon import IsolateDaemon from log_manager import LogManager, start_system_log from publish_package import publish_packages, register_package_args from run_blink_test import BlinkTestRunner @@ -88,36 +88,22 @@ runner_args.device = True with ExitStack() as stack: + log_manager = LogManager(runner_args.logs_dir) if running_unattended(): - # Updating configurations to meet the requirement of isolate. - os.environ['FUCHSIA_ANALYTICS_DISABLED'] = '1' - stop_ffx_daemon() if runner_args.extra_path: os.environ['PATH'] += os.pathsep + os.pathsep.join( runner_args.extra_path) - set_ffx_isolate_dir( - stack.enter_context(tempfile.TemporaryDirectory())) - # The following configurations are persistent, they are less - # problematic if ScopedFfxConfig cannot clear them correctly. - stack.enter_context( - ScopedFfxConfig('repository.server.listen', '"[::]:0"')) - stack.enter_context(ScopedFfxConfig('daemon.autostart', 'false')) - stack.enter_context( - ScopedFfxConfig('discovery.zedboot.enabled', 'false')) - stack.enter_context( - ScopedFfxConfig('fastboot.reboot.reconnect_timeout', '120')) - stack.enter_context(ScopedFfxConfig('log.level', 'debug')) + + extra_inits = [log_manager] if runner_args.everlasting: - # Setting the emu.instance_dir to match the named cache, so we - # can keep these files across multiple runs. - stack.enter_context( + # Setting the emu.instance_dir to match the named cache, so + # we can keep these files across multiple runs. + extra_inits.append( ScopedFfxConfig( 'emu.instance_dir', os.path.join(os.environ['HOME'], '.fuchsia_emulator/'))) - log_manager = stack.enter_context(LogManager(runner_args.logs_dir)) - start_ffx_daemon() - stack.callback(stop_ffx_daemon) + stack.enter_context(IsolateDaemon(extra_inits)) else: if runner_args.logs_dir: logging.warning( @@ -125,7 +111,7 @@ 'daemon is started with the logs.dir config ' 'updated. We won\'t restart the daemon randomly' ' anymore.') - log_manager = stack.enter_context(LogManager(runner_args.logs_dir)) + stack.enter_context(log_manager) if runner_args.device: update(runner_args.system_image_dir, runner_args.os_check,
diff --git a/build/toolchain/toolchain.gni b/build/toolchain/toolchain.gni index aad7000..9170959 100644 --- a/build/toolchain/toolchain.gni +++ b/build/toolchain/toolchain.gni
@@ -17,6 +17,12 @@ # `gclient runhooks` is run as well. llvm_force_head_revision = false + # Cronet is shipped in AOSP, where it is built using the Android Mainline + # Clang. Please refer to go/cronet-builders-with-mainline-clang-design for + # more information. + # If this arg is set to true, we use the Android Mainline LLVM. + llvm_android_mainline = false + # Used for binary size analysis. generate_linker_map = is_android && is_official_build @@ -38,7 +44,11 @@ } declare_args() { - clang_version = "18" + if (llvm_android_mainline) { # https://crbug.com/1481060 + clang_version = "17" + } else { + clang_version = "18" + } } # Extension for shared library files (including leading dot).
diff --git a/build/toolchain/win/midl.gni b/build/toolchain/win/midl.gni index 1f3ea40..2d92aa7e 100644 --- a/build/toolchain/win/midl.gni +++ b/build/toolchain/win/midl.gni
@@ -132,6 +132,10 @@ "$out_dir/$header_file", "$out_dir/$interface_identifier_file", ] + if (defined(invoker.dynamic_guids)) { + idl_file = "{{source_name_part}}.idl" + outputs += [ "$out_dir/$idl_file" ] + } # These files are only added to outputs if the invoker so desires, as it # they are not always generated depending on the content of the input idl
diff --git a/cc/metrics/compositor_frame_reporter.cc b/cc/metrics/compositor_frame_reporter.cc index 2df2ee9b2..2743419 100644 --- a/cc/metrics/compositor_frame_reporter.cc +++ b/cc/metrics/compositor_frame_reporter.cc
@@ -175,6 +175,12 @@ constexpr char kTraceCategory[] = "cc,benchmark," TRACE_DISABLED_BY_DEFAULT("devtools.timeline.frame"); +bool IsTracingEnabled() { + bool enabled; + TRACE_EVENT_CATEGORY_GROUP_ENABLED(kTraceCategory, &enabled); + return enabled; +} + base::TimeTicks ComputeSafeDeadlineForFrame(const viz::BeginFrameArgs& args) { return args.frame_time + (args.interval * 1.5); } @@ -1240,6 +1246,10 @@ has_partial_update_); } + if (!IsTracingEnabled()) { + return; + } + const auto trace_track = perfetto::Track(base::trace_event::GetNextGlobalTraceId()); TRACE_EVENT_BEGIN( @@ -1481,11 +1491,6 @@ } void CompositorFrameReporter::ReportEventLatencyTraceEvents() const { - // TODO(mohsen): This function is becoming large and there is concerns about - // having this in the compositor critical path. crbug.com/1072740 is - // considering doing the reporting off-thread, but as a short-term solution, - // we should investigate whether we can skip this function entirely if tracing - // is off and whether that has any positive impact or not. for (const auto& event_metrics : events_metrics_) { EventLatencyTracingRecorder::RecordEventLatencyTraceEvent( event_metrics.get(), frame_termination_time_, &stage_history_,
diff --git a/cc/metrics/event_latency_tracing_recorder.cc b/cc/metrics/event_latency_tracing_recorder.cc index b845980..5dad0ec8 100644 --- a/cc/metrics/event_latency_tracing_recorder.cc +++ b/cc/metrics/event_latency_tracing_recorder.cc
@@ -17,6 +17,13 @@ namespace { constexpr char kTracingCategory[] = "cc,benchmark,input,input.scrolling"; + +bool IsTracingEnabled() { + bool enabled; + TRACE_EVENT_CATEGORY_GROUP_ENABLED(kTracingCategory, &enabled); + return enabled; +} + constexpr base::TimeDelta high_latency_threshold = base::Milliseconds(90); constexpr perfetto::protos::pbzero::EventLatency::EventType ToProtoEnum( @@ -205,6 +212,20 @@ base::TimeTicks termination_time, const std::vector<CompositorFrameReporter::StageData>* stage_history, const CompositorFrameReporter::ProcessedVizBreakdown* viz_breakdown) { + // As there are multiple teardown paths for EventMetrics, we want to denote + // the attempt to trace, even if tracing is currently disabled. + if (IsTracingEnabled()) { + RecordEventLatencyTraceEventInternal(event_metrics, termination_time, + stage_history, viz_breakdown); + } + event_metrics->tracing_recorded(); +} + +void EventLatencyTracingRecorder::RecordEventLatencyTraceEventInternal( + const EventMetrics* event_metrics, + base::TimeTicks termination_time, + const std::vector<CompositorFrameReporter::StageData>* stage_history, + const CompositorFrameReporter::ProcessedVizBreakdown* viz_breakdown) { DCHECK(event_metrics); DCHECK(event_metrics->should_record_tracing()); @@ -235,7 +256,7 @@ event_metrics->trace_id()->value()); } - ScrollUpdateEventMetrics* scroll_update = + const ScrollUpdateEventMetrics* scroll_update = event_metrics->AsScrollUpdate(); if (scroll_update && scroll_update->is_janky_scrolled_frame().has_value()) { @@ -348,8 +369,6 @@ TRACE_EVENT_END(kTracingCategory, trace_track, termination_time); } TRACE_EVENT_END(kTracingCategory, trace_track, termination_time); - - event_metrics->tracing_recorded(); } } // namespace cc
diff --git a/cc/metrics/event_latency_tracing_recorder.h b/cc/metrics/event_latency_tracing_recorder.h index b702a807..4153f88c 100644 --- a/cc/metrics/event_latency_tracing_recorder.h +++ b/cc/metrics/event_latency_tracing_recorder.h
@@ -37,6 +37,15 @@ base::TimeTicks termination_time, const std::vector<CompositorFrameReporter::StageData>* stage_history, const CompositorFrameReporter::ProcessedVizBreakdown* viz_breakdown); + + private: + // We do not want the emitting of traces to have any side-effects, so the + // actual emitting uses `const EventMetrics*`. + static void RecordEventLatencyTraceEventInternal( + const EventMetrics* event_metrics, + base::TimeTicks termination_time, + const std::vector<CompositorFrameReporter::StageData>* stage_history, + const CompositorFrameReporter::ProcessedVizBreakdown* viz_breakdown); }; } // namespace cc
diff --git a/cc/raster/zero_copy_raster_buffer_provider.cc b/cc/raster/zero_copy_raster_buffer_provider.cc index 43ae4728..9284f9c 100644 --- a/cc/raster/zero_copy_raster_buffer_provider.cc +++ b/cc/raster/zero_copy_raster_buffer_provider.cc
@@ -135,13 +135,13 @@ return; } - DCHECK_EQ(1u, gfx::NumberOfPlanesForLinearBufferFormat( - gpu_memory_buffer_->GetFormat())); + CHECK_EQ(1u, gfx::NumberOfPlanesForLinearBufferFormat( + gpu_memory_buffer_->GetFormat())); bool rv = gpu_memory_buffer_->Map(); - DCHECK(rv); - DCHECK(gpu_memory_buffer_->memory(0)); + CHECK(rv); + CHECK(gpu_memory_buffer_->memory(0)); // RasterBufferProvider::PlaybackToMemory only supports unsigned strides. - DCHECK_GE(gpu_memory_buffer_->stride(0), 0); + CHECK_GE(gpu_memory_buffer_->stride(0), 0); // TODO(danakj): Implement partial raster with raster_dirty_rect. RasterBufferProvider::PlaybackToMemory(
diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn index 94edfaa..da5eec2 100644 --- a/chrome/android/BUILD.gn +++ b/chrome/android/BUILD.gn
@@ -1204,6 +1204,7 @@ "//third_party/androidx:androidx_appcompat_appcompat_java", "//third_party/androidx:androidx_browser_browser_java", "//third_party/androidx:androidx_collection_collection_java", + "//third_party/androidx:androidx_coordinatorlayout_coordinatorlayout_java", "//third_party/androidx:androidx_lifecycle_lifecycle_runtime_java", "//third_party/androidx:androidx_mediarouter_mediarouter_java", "//third_party/androidx:androidx_preference_preference_java",
diff --git a/chrome/android/chrome_junit_test_java_sources.gni b/chrome/android/chrome_junit_test_java_sources.gni index 1f12f2f..806b6e3 100644 --- a/chrome/android/chrome_junit_test_java_sources.gni +++ b/chrome/android/chrome_junit_test_java_sources.gni
@@ -332,6 +332,7 @@ "junit/src/org/chromium/chrome/browser/toolbar/adaptive/OptionalNewTabButtonControllerActivityTest.java", "junit/src/org/chromium/chrome/browser/toolbar/top/StartSurfaceToolbarMediatorUnitTest.java", "junit/src/org/chromium/chrome/browser/ui/AppLaunchDrawBlockerUnitTest.java", + "junit/src/org/chromium/chrome/browser/ui/ExpandedSheetHelperImplUnitTest.java", "junit/src/org/chromium/chrome/browser/ui/IncognitoRestoreAppLaunchDrawBlockerUnitTest.java", "junit/src/org/chromium/chrome/browser/ui/fold_transitions/FoldTransitionControllerUnitTest.java", "junit/src/org/chromium/chrome/browser/usage_stats/EventTrackerTest.java",
diff --git a/chrome/android/features/tab_ui/BUILD.gn b/chrome/android/features/tab_ui/BUILD.gn index c73c8ad..5926229 100644 --- a/chrome/android/features/tab_ui/BUILD.gn +++ b/chrome/android/features/tab_ui/BUILD.gn
@@ -50,6 +50,7 @@ "java/res/drawable/tab_grid_card_background.xml", "java/res/drawable/tab_grid_dialog_background.xml", "java/res/drawable/tab_grid_selection_list_icon.xml", + "java/res/drawable/tab_hover_card_background.xml", "java/res/drawable/tab_selection_editor_share_icon.xml", "java/res/drawable/tab_strip_fading_edge_end.xml", "java/res/drawable/tab_strip_fading_edge_start.xml", @@ -72,12 +73,14 @@ "java/res/layout/tab_grid_card_item.xml", "java/res/layout/tab_grid_dialog_layout.xml", "java/res/layout/tab_grid_message_card_item.xml", + "java/res/layout/tab_hover_card_holder.xml", "java/res/layout/tab_list_card_item.xml", "java/res/layout/tab_list_recycler_view_layout.xml", "java/res/layout/tab_selection_editor_action_view.xml", "java/res/layout/tab_selection_editor_layout.xml", "java/res/layout/tab_selection_editor_toolbar.xml", "java/res/layout/tab_strip_item.xml", + "java/res/values-night/dimens.xml", "java/res/values/attrs.xml", "java/res/values/colors.xml", "java/res/values/dimens.xml",
diff --git a/chrome/android/features/tab_ui/java/res/drawable/tab_hover_card_background.xml b/chrome/android/features/tab_ui/java/res/drawable/tab_hover_card_background.xml new file mode 100644 index 0000000..71dae4a --- /dev/null +++ b/chrome/android/features/tab_ui/java/res/drawable/tab_hover_card_background.xml
@@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +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. +--> + +<shape xmlns:android="http://schemas.android.com/apk/res/android" + android:shape="rectangle"> + <solid android:color="@macro/default_bg_color"/> + <corners android:radius="@dimen/tab_hover_card_corner_radius"/> +</shape>
diff --git a/chrome/android/features/tab_ui/java/res/layout/tab_hover_card_holder.xml b/chrome/android/features/tab_ui/java/res/layout/tab_hover_card_holder.xml new file mode 100644 index 0000000..b9e4c7c --- /dev/null +++ b/chrome/android/features/tab_ui/java/res/layout/tab_hover_card_holder.xml
@@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +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. +--> + +<LinearLayout + xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:id="@+id/tab_hover_card_holder" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:padding="@dimen/tab_hover_card_layout_padding" + android:visibility="gone" + android:elevation="@dimen/tab_hover_card_elevation" + android:orientation="vertical" + android:background="@drawable/tab_hover_card_background"> + + <TextView + android:id="@+id/title" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:ellipsize="end" + android:maxLines="2" + android:textDirection="locale" + android:textAppearance="@style/TextAppearance.TextMediumThick.Primary"/> + + <TextView + android:id="@+id/url" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="@dimen/tab_hover_card_url_top_margin" + android:ellipsize="end" + android:maxLines="1" + android:textDirection="locale" + android:textAppearance="@style/TextAppearance.TextSmall.Secondary"/> +</LinearLayout>
diff --git a/chrome/android/features/tab_ui/java/res/values-night/dimens.xml b/chrome/android/features/tab_ui/java/res/values-night/dimens.xml new file mode 100644 index 0000000..09141f1 --- /dev/null +++ b/chrome/android/features/tab_ui/java/res/values-night/dimens.xml
@@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +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. +--> + +<resources> + <!-- Tab hover card dimensions --> + <dimen name="tab_hover_card_bg_color_elev">@dimen/default_elevation_5</dimen> +</resources> \ No newline at end of file
diff --git a/chrome/android/features/tab_ui/java/res/values/dimens.xml b/chrome/android/features/tab_ui/java/res/values/dimens.xml index 3cd81ae..cff0ab0b 100644 --- a/chrome/android/features/tab_ui/java/res/values/dimens.xml +++ b/chrome/android/features/tab_ui/java/res/values/dimens.xml
@@ -84,4 +84,14 @@ <dimen name="tab_selection_editor_action_view_padding">14dp</dimen> <dimen name="tab_selection_editor_longpress_entry_threshold">20dp</dimen> <dimen name="tab_selection_editor_share_sheet_preview_thumbnail_padding">10dp</dimen> + + <!-- Tab hover card dimensions --> + <dimen name="tab_hover_card_width">264dp</dimen> + <dimen name="tab_hover_card_window_horizontal_margin">8dp</dimen> + <dimen name="tab_hover_card_layout_padding">16dp</dimen> + <dimen name="tab_hover_card_url_top_margin">4dp</dimen> + <dimen name="tab_hover_card_bg_color_elev">@dimen/default_elevation_0</dimen> + <dimen name="tab_hover_card_corner_radius">8dp</dimen> + <dimen name="tab_hover_card_elevation">6dp</dimen> + <dimen name="tsr_no_feet_tab_hover_card_x_offset">16dp</dimen> </resources>
diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabUiThemeProvider.java b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabUiThemeProvider.java index 9903285..ecd4dfc 100644 --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabUiThemeProvider.java +++ b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabUiThemeProvider.java
@@ -19,6 +19,7 @@ import com.google.android.material.elevation.ElevationOverlayProvider; import org.chromium.chrome.R; +import org.chromium.components.browser_ui.styles.ChromeColors; import org.chromium.components.browser_ui.styles.SemanticColorUtils; /** @@ -375,6 +376,48 @@ } /** + * Returns the {@link ColorStateList} to use for the strip tab hover card based on the incognito + * mode. + * + * @param context {@link Context} used to retrieve color. + * @param isIncognito Whether the color is used for incognito mode. + * @return The {@link ColorStateList} for the strip tab hover card. + */ + public static ColorStateList getStripTabHoverCardBackgroundTintList( + Context context, boolean isIncognito) { + int backgroundTint = isIncognito + ? ContextCompat.getColor(context, R.color.default_bg_color_dark_elev_5_baseline) + : ChromeColors.getSurfaceColor(context, R.dimen.tab_hover_card_bg_color_elev); + return ColorStateList.valueOf(backgroundTint); + } + + /** + * Returns the text color for the strip tab hover card title based on the incognito mode. + * + * @param context {@link Context} used to retrieve color. + * @param isIncognito Whether the color is used for incognito mode. + * @return The text color for the strip tab hover card title. + */ + public static @ColorInt int getStripTabHoverCardTextColorPrimary( + Context context, boolean isIncognito) { + return isIncognito ? context.getColor(R.color.default_text_color_light) + : SemanticColorUtils.getDefaultTextColor(context); + } + + /** + * Returns the text color for the strip tab hover card URL based on the incognito mode. + * + * @param context {@link Context} used to retrieve color. + * @param isIncognito Whether the color is used for incognito mode. + * @return The text color for the strip tab hover card URL. + */ + public static @ColorInt int getStripTabHoverCardTextColorSecondary( + Context context, boolean isIncognito) { + return isIncognito ? context.getColor(R.color.default_text_color_secondary_light) + : SemanticColorUtils.getDefaultTextColorSecondary(context); + } + + /** * Return the background color used for tab UI toolbar in selection edit mode. * * @param context {@link Context} used to retrieve color.
diff --git a/chrome/android/java/res/layout/improved_bookmark_save_flow.xml b/chrome/android/java/res/layout/improved_bookmark_save_flow.xml index 1f3cc20..485eec8 100644 --- a/chrome/android/java/res/layout/improved_bookmark_save_flow.xml +++ b/chrome/android/java/res/layout/improved_bookmark_save_flow.xml
@@ -17,7 +17,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingTop="18dp" - android:paddingBottom="5dp" + android:paddingBottom="16dp" android:paddingHorizontal="16dp"> <!--
diff --git a/chrome/android/java/res/values-sw600dp/dimens.xml b/chrome/android/java/res/values-sw600dp/dimens.xml index fc2b280..9e11d607 100644 --- a/chrome/android/java/res/values-sw600dp/dimens.xml +++ b/chrome/android/java/res/values-sw600dp/dimens.xml
@@ -32,7 +32,6 @@ <!-- NTP dimensions --> <dimen name="ntp_search_box_transition_length">60dp</dimen> <dimen name="ntp_wide_card_lateral_margins">48dp</dimen> - <dimen name="mvt_container_top_margin_polish">24dp</dimen> <dimen name="mvt_container_lateral_margin_polish">0dp</dimen> <!-- Recent tabs page -->
diff --git a/chrome/android/java/res/values/dimens.xml b/chrome/android/java/res/values/dimens.xml index e08238b6..1fdc7a9 100644 --- a/chrome/android/java/res/values/dimens.xml +++ b/chrome/android/java/res/values/dimens.xml
@@ -154,7 +154,7 @@ <dimen name="mvt_container_top_padding_polish">17dp</dimen> <dimen name="mvt_container_bottom_padding_polish">22dp</dimen> <dimen name="tile_view_title_margin_top_modern_polish">63dp</dimen> - <dimen name="mvt_container_top_margin_polish">31dp</dimen> + <dimen name="mvt_container_top_margin_polish">23dp</dimen> <dimen name="mvt_container_to_ntp_right_extra_margin_two_feed_tablet">16dp</dimen> <dimen name="mvt_container_bottom_margin_tablet">48dp</dimen> <dimen name="tile_grid_layout_landscape_edge_margin_tablet">100dp</dimen>
diff --git a/chrome/android/java/res_app/layout/main.xml b/chrome/android/java/res_app/layout/main.xml index c4003c0..b5e6033b 100644 --- a/chrome/android/java/res_app/layout/main.xml +++ b/chrome/android/java/res_app/layout/main.xml
@@ -127,6 +127,13 @@ android:inflatedId="@+id/tab_switcher_view_holder" android:layout="@layout/tab_switcher_view_holder" /> + <ViewStub + android:id="@+id/tab_hover_card_holder_stub" + android:layout_width="@dimen/tab_hover_card_width" + android:layout_height="wrap_content" + android:inflatedId="@+id/tab_hover_card_holder" + android:layout="@layout/tab_hover_card_holder" /> + <org.chromium.components.messages.MessageContainer android:id="@+id/message_container" android:layout_width="match_parent"
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java index c184da7d..971c7a7 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
@@ -672,6 +672,7 @@ // clang-format off ViewGroup tabSwitcherViewHolder = findViewById(R.id.tab_switcher_view_holder); + ViewStub tabHoverCardViewStub = (ViewStub) findViewById(R.id.tab_hover_card_holder_stub); View toolbarContainerView = findViewById(R.id.toolbar_container); mLayoutManager = new LayoutManagerChromeTablet(compositorViewHolder, mContentContainer, mStartSurfaceSupplier, mTabSwitcherSupplier, getBrowserControlsManager(), @@ -679,7 +680,7 @@ mTabModelStartupInfoSupplier, tabSwitcherViewHolder, mRootUiCoordinator.getScrimCoordinator(), getLifecycleDispatcher(), () -> createAndSetStartSurfaceForTablet(), mMultiInstanceManager, - toolbarContainerView); + toolbarContainerView, tabHoverCardViewStub); mLayoutStateProviderSupplier.set(mLayoutManager); // clang-format on }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerChromeTablet.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerChromeTablet.java index 638260e..89797b9 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerChromeTablet.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerChromeTablet.java
@@ -6,6 +6,9 @@ import android.view.View; import android.view.ViewGroup; +import android.view.ViewStub; + +import androidx.annotation.NonNull; import org.chromium.base.supplier.ObservableSupplier; import org.chromium.base.supplier.Supplier; @@ -79,6 +82,7 @@ * to support tab drag and drop. * @param toolbarContainerView @{link View} passed to @{link StripLayoutHelper} to support tab * drag and drop. + * @param tabHoverCardViewStub The {@link ViewStub} representing the strip tab hover card. */ public LayoutManagerChromeTablet(LayoutManagerHost host, ViewGroup contentContainer, Supplier<StartSurface> startSurfaceSupplier, Supplier<TabSwitcher> tabSwitcherSupplier, @@ -89,7 +93,8 @@ ViewGroup tabSwitcherViewHolder, ScrimCoordinator scrimCoordinator, ActivityLifecycleDispatcher lifecycleDispatcher, Callable<ViewGroup> delayedStartSurfaceCallable, - MultiInstanceManager multiInstanceManager, View toolbarContainerView) { + MultiInstanceManager multiInstanceManager, View toolbarContainerView, + @NonNull ViewStub tabHoverCardViewStub) { super(host, contentContainer, startSurfaceSupplier, tabSwitcherSupplier, browserControlsStateProvider, tabContentManagerSupplier, topUiThemeColorProvider, tabSwitcherViewHolder, scrimCoordinator); @@ -100,7 +105,7 @@ () -> mLayerTitleCache, tabModelStartupInfoSupplier, lifecycleDispatcher, multiInstanceManager, - toolbarContainerView); + toolbarContainerView, tabHoverCardViewStub); mScrimCoordinator = scrimCoordinator; mCreateStartSurfaceCallable = delayedStartSurfaceCallable; addSceneOverlay(mTabStripLayoutHelperManager);
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelper.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelper.java index 2d730e9..7759619 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelper.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelper.java
@@ -19,6 +19,7 @@ import android.os.SystemClock; import android.text.TextUtils; import android.text.format.DateUtils; +import android.util.DisplayMetrics; import android.util.FloatProperty; import android.view.HapticFeedbackConstants; import android.view.MotionEvent; @@ -27,10 +28,13 @@ import android.widget.AdapterView.OnItemClickListener; import android.widget.ArrayAdapter; import android.widget.ListPopupWindow; +import android.widget.TextView; import androidx.annotation.Nullable; import androidx.annotation.StringRes; import androidx.annotation.VisibleForTesting; +import androidx.coordinatorlayout.widget.CoordinatorLayout.LayoutParams; +import androidx.core.view.ViewCompat; import org.chromium.base.MathUtils; import org.chromium.base.metrics.RecordHistogram; @@ -63,6 +67,7 @@ import org.chromium.chrome.browser.tasks.tab_management.TabUiThemeUtil; import org.chromium.components.browser_ui.styles.ChromeColors; import org.chromium.components.browser_ui.styles.SemanticColorUtils; +import org.chromium.components.embedder_support.util.UrlUtilities; import org.chromium.ui.base.LocalizationUtils; import org.chromium.ui.interpolators.Interpolators; import org.chromium.ui.util.ColorUtils; @@ -177,6 +182,9 @@ private static final String PLACEHOLDER_VISIBLE_DURATION_HISTOGRAM_NAME = "Android.TabStrip.PlaceholderStripVisibleDuration"; + // The max width of the tab hover card in terms of the enclosing window width percent. + static final float HOVER_CARD_MAX_WIDTH_PERCENT = 0.9f; + // External influences private final LayoutUpdateHost mUpdateHost; private final LayoutRenderHost mRenderHost; @@ -281,6 +289,8 @@ private StripLayoutTab mLastHoveredTab; private TabDropTarget mTabDropTarget; + private View mTabHoverCardView; + /** * Creates an instance of the {@link StripLayoutHelper}. * @param context The current Android {@link Context}. @@ -1452,9 +1462,8 @@ /** * Called on hover enter event. * @param x The x coordinate of the position of the hover enter event. - * @param y The y coordinate of the position of the hover enter event. */ - public void onHoverEnter(float x, float y) { + public void onHoverEnter(float x) { if (!isPeripheralsSupportForTabStripEnabled()) return; StripLayoutTab hoveredTab = getTabAtPosition(x); // Hovered into a non-tab region on the strip. @@ -1466,9 +1475,8 @@ /** * Called on hover move event. * @param x The x coordinate of the position of the hover move event. - * @param y The y coordinate of the position of the hover move event. */ - public void onHoverMove(float x, float y) { + public void onHoverMove(float x) { if (!isPeripheralsSupportForTabStripEnabled()) return; StripLayoutTab hoveredTab = getTabAtPosition(x); // Hovered into a non-tab region within the strip. @@ -1497,6 +1505,15 @@ mUpdateHost.requestUpdate(); } + @VisibleForTesting + void setTabHoverCardView(View tabHoverCardView) { + mTabHoverCardView = tabHoverCardView; + } + + View getTabHoverCardViewForTesting() { + return mTabHoverCardView; + } + void setLastHoveredTabForTesting(StripLayoutTab tab) { mLastHoveredTab = tab; } @@ -1507,15 +1524,133 @@ private void clearLastHoveredTab() { if (mLastHoveredTab == null) return; + assert mTabHoverCardView != null : "Hover card view should not be null."; // Remove the highlight from the last hovered tab. updateHoveredFolioTabState(mLastHoveredTab, false); + mTabHoverCardView.setVisibility(View.GONE); mLastHoveredTab = null; } - private void updateLastHoveredTab(StripLayoutTab hoveredTab) { + @VisibleForTesting + void updateLastHoveredTab(StripLayoutTab hoveredTab) { if (hoveredTab == null) return; + // Hovered into a drawn tab that is for example, hidden behind the model selector button. + if (isTabCompletelyHidden(hoveredTab)) return; + mLastHoveredTab = hoveredTab; updateHoveredFolioTabState(mLastHoveredTab, true); + + // Show the tab hover card. + // TODO(crbug.com/1485258): Create a TabHoverCardView class to manage view logic. + int hoveredTabIndex = findIndexForTab(mLastHoveredTab.getId()); + Tab tab = mModel.getTabAt(hoveredTabIndex); + if (tab == null) return; + var titleView = (TextView) mTabHoverCardView.findViewById(R.id.title); + var urlView = (TextView) mTabHoverCardView.findViewById(R.id.url); + titleView.setText(tab.getTitle()); + String url = tab.getUrl().getHost(); + // If the URL is a Chrome scheme, display the GURL spec instead of the host. For e.g., use + // chrome://newtab instead of just newtab on the hover card. + if (UrlUtilities.isInternalScheme(tab.getUrl())) { + url = tab.getUrl().getSpec(); + // GURL#getSpec() returns a string with a trailing "/", remove this. + url = url.replaceFirst("/$", ""); + } + urlView.setText(url); + + float[] position = getHoverCardPosition(hoveredTab, hoveredTabIndex == mModel.index()); + mTabHoverCardView.setX(position[0]); + mTabHoverCardView.setY(position[1]); + + mTabHoverCardView.setVisibility(View.VISIBLE); + } + + /** + * Update the hover card background and text colors based on the theme and incognito mode. + */ + public void updateHoverCardColors() { + if (!isPeripheralsSupportForTabStripEnabled()) return; + if (mTabHoverCardView == null) return; + + var titleView = (TextView) mTabHoverCardView.findViewById(R.id.title); + var urlView = (TextView) mTabHoverCardView.findViewById(R.id.url); + titleView.setTextColor( + TabUiThemeProvider.getStripTabHoverCardTextColorPrimary(mContext, mIncognito)); + urlView.setTextColor( + TabUiThemeProvider.getStripTabHoverCardTextColorSecondary(mContext, mIncognito)); + + ViewCompat.setBackgroundTintList(mTabHoverCardView, + TabUiThemeProvider.getStripTabHoverCardBackgroundTintList(mContext, mIncognito)); + } + + /** + * Get the x and y coordinates of the position of the hover card, in px. + * + * @param hoveredTab The {@link StripLayoutTab} that is hovered on. + * @param isSelectedTab Whether the tab is the selected tab, {@code true} if the hovered tab is + * also the selected tab, {@code false} otherwise. + * @return A float array specifying the x (array[0]) and y (array[1]) coordinates of the + * position of the hover card, in px. + */ + @VisibleForTesting + float[] getHoverCardPosition(StripLayoutTab hoveredTab, boolean isSelectedTab) { + boolean isFolioEnabled = TabManagementFieldTrial.isTabStripFolioEnabled(); + boolean isDetachedEnabled = TabManagementFieldTrial.isTabStripDetachedEnabled(); + + // 1. Determine the window width. + DisplayMetrics displayMetrics = mContext.getResources().getDisplayMetrics(); + float displayDensity = displayMetrics.density; + float windowWidthPx = displayMetrics.widthPixels; + float windowWidthDp = windowWidthPx / displayDensity; + + // 2. Determine the hover card width, making adjustments relative to the window width if + // applicable. + float hoverCardWidthPx = mContext.getResources().getDimension(R.dimen.tab_hover_card_width); + // Hover card width should be a maximum of 90% of the window width. + hoverCardWidthPx = Math.min(hoverCardWidthPx, HOVER_CARD_MAX_WIDTH_PERCENT * windowWidthPx); + float hoverCardWidthDp = hoverCardWidthPx / displayDensity; + // Update the card LayoutParams if an adjustment on the original width is required. + if (hoverCardWidthPx + != mContext.getResources().getDimension(R.dimen.tab_hover_card_width)) { + var layoutParams = mTabHoverCardView.getLayoutParams(); + mTabHoverCardView.setLayoutParams( + new LayoutParams(Math.round(hoverCardWidthPx), layoutParams.height)); + } + + // 3. Determine the horizontal position of the hover card. + float hoverCardXDp = LocalizationUtils.isLayoutRtl() + ? (hoveredTab.getDrawX() - (hoverCardWidthDp - hoveredTab.getWidth())) + : hoveredTab.getDrawX(); + // Adjust the TSR detached and inactive folio tab hover card to align with the tab container + // edge. + if (isDetachedEnabled || (isFolioEnabled && !isSelectedTab)) { + hoverCardXDp += + MathUtils.flipSignIf(mContext.getResources().getDimension( + R.dimen.tsr_no_feet_tab_hover_card_x_offset) + / displayDensity, + LocalizationUtils.isLayoutRtl()); + } + + float windowHorizontalMarginDp = mContext.getResources().getDimension( + R.dimen.tab_hover_card_window_horizontal_margin) + / displayDensity; + // Align the hover card at a minimum horizontal margin of 8dp from the window left edge. + if (hoverCardXDp < windowHorizontalMarginDp) { + hoverCardXDp = windowHorizontalMarginDp; + } + // Align the hover card at a minimum horizontal margin of 8dp from the window right edge. + if (hoverCardXDp + hoverCardWidthDp > windowWidthDp - windowHorizontalMarginDp) { + hoverCardXDp = windowWidthDp - hoverCardWidthDp - windowHorizontalMarginDp; + } + + // 4. Determine the vertical position of the hover card. + float hoverCardYDp = mHeight; + // Adjust the TSR detached tab hover card to be at a fixed distance from the tab container. + if (isDetachedEnabled) { + hoverCardYDp += FOLIO_DETACHED_BOTTOM_MARGIN_DP; + } + + return new float[] {hoverCardXDp * displayDensity, hoverCardYDp * displayDensity}; } private void updateHoveredFolioTabState(StripLayoutTab tab, boolean hovered) { @@ -3079,6 +3214,17 @@ } /** + * Determines whether a drawn tab is hidden completely out of view. + * @param tab The {@link StripLayoutTab} whose visibility is determined. + * @return {@code true} if the tab is completely hidden, {@code false} otherwise. + */ + @VisibleForTesting + boolean isTabCompletelyHidden(StripLayoutTab tab) { + return !tab.isVisible() || tab.getDrawX() + tab.getWidth() <= mLeftFadeWidth + || tab.getDrawX() >= mWidth - mRightFadeWidth; + } + + /** * To prevent accidental tab closures, when the close button of a tab is very close to the edge * of the tab strip, we hide the close button. The threshold for hiding is different based on * the length of the fade at the end of the strip.
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelperManager.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelperManager.java index 4489987..fe7a6ac 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelperManager.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelperManager.java
@@ -12,8 +12,10 @@ import android.os.SystemClock; import android.view.MotionEvent; import android.view.View; +import android.view.ViewStub; import androidx.annotation.ColorInt; +import androidx.annotation.NonNull; import androidx.annotation.VisibleForTesting; import androidx.appcompat.content.res.AppCompatResources; @@ -147,6 +149,8 @@ private TabStripEventHandler mTabStripEventHandler; private TabSwitcherLayoutObserver mTabSwitcherLayoutObserver; + private final ViewStub mTabHoverCardViewStub; + private float mModelSelectorWidth; // 3-dots menu button with tab strip end padding private float mMenuButtonPadding; @@ -169,6 +173,8 @@ private class TabStripEventHandler implements MotionEventHandler { @Override public void onDown(float x, float y, boolean fromMouse, int buttons) { + // Clear any persisting tab strip hover state on a down event on the strip. + getActiveStripLayoutHelper().onHoverExit(); if (mModelSelectorButton.onDown(x, y)) return; getActiveStripLayoutHelper().onDown(time(), x, y, fromMouse, buttons); } @@ -217,12 +223,19 @@ @Override public void onHoverEnter(float x, float y) { - getActiveStripLayoutHelper().onHoverEnter(x, y); + // Inflate the hover card ViewStub if not already inflated. + if (ChromeFeatureList.isEnabled( + ChromeFeatureList.ADVANCED_PERIPHERALS_SUPPORT_TAB_STRIP) + && mTabHoverCardViewStub.getParent() != null) { + mTabHoverCardViewStub.inflate(); + // TODO (crbug.com/1483432): Update view background on low-end devices. + } + getActiveStripLayoutHelper().onHoverEnter(x); } @Override public void onHoverMove(float x, float y) { - getActiveStripLayoutHelper().onHoverMove(x, y); + getActiveStripLayoutHelper().onHoverMove(x); } @Override @@ -277,13 +290,15 @@ * @param multiInstanceManager @{link MultiInstanceManager} passed to @{link TabDragSource} for * drag and drop. * @param toolbarContainerView @{link View} passed to @{link TabDragSource} for drag and drop. + * @param tabHoverCardViewStub The {@link ViewStub} representing the strip tab hover card. */ public StripLayoutHelperManager(Context context, LayoutManagerHost managerHost, LayoutUpdateHost updateHost, LayoutRenderHost renderHost, Supplier<LayerTitleCache> layerTitleCacheSupplier, ObservableSupplier<TabModelStartupInfo> tabModelStartupInfoSupplier, ActivityLifecycleDispatcher lifecycleDispatcher, - MultiInstanceManager multiInstanceManager, View toolbarContainerView) { + MultiInstanceManager multiInstanceManager, View toolbarContainerView, + @NonNull ViewStub tabHoverCardViewStub) { mUpdateHost = updateHost; mLayerTitleCacheSupplier = layerTitleCacheSupplier; mTabStripTreeProvider = new TabStripSceneLayer(context); @@ -378,11 +393,18 @@ mBrowserScrimShowing = false; + mTabHoverCardViewStub = tabHoverCardViewStub; mNormalHelper = new StripLayoutHelper(context, managerHost, updateHost, renderHost, false, mModelSelectorButton, multiInstanceManager, toolbarContainerView); mIncognitoHelper = new StripLayoutHelper(context, managerHost, updateHost, renderHost, true, mModelSelectorButton, multiInstanceManager, toolbarContainerView); + tabHoverCardViewStub.setOnInflateListener((viewStub, view) -> { + mNormalHelper.setTabHoverCardView(view); + mIncognitoHelper.setTabHoverCardView(view); + getActiveStripLayoutHelper().updateHoverCardColors(); + }); + if (tabModelStartupInfoSupplier != null) { if (tabModelStartupInfoSupplier.hasValue()) { setTabModelStartupInfo(tabModelStartupInfoSupplier.get()); @@ -445,7 +467,10 @@ } @Override - public void onPauseWithNative() {} + public void onPauseWithNative() { + // Clear any persisting tab strip hover state when the activity is paused. + getActiveStripLayoutHelper().onHoverExit(); + } private void handleModelSelectorButtonClick() { if (mTabModelSelector == null) return; @@ -874,6 +899,11 @@ mNormalHelper.tabModelSelected(!mIsIncognito); updateModelSwitcherButton(); + // Update the tab hover card background and text colors for the active tab model when it is + // selected (provided that the hover card view that is shared across the tab models is + // already inflated), since the colors will be the same for a given tab model, but different + // across tab models. + getActiveStripLayoutHelper().updateHoverCardColors(); mUpdateHost.requestUpdate(); } @@ -925,4 +955,12 @@ void setTabStripTreeProviderForTesting(TabStripSceneLayer tabStripTreeProvider) { mTabStripTreeProvider = tabStripTreeProvider; } + + ViewStub getTabHoverCardViewStubForTesting() { + return mTabHoverCardViewStub; + } + + TabModelSelectorObserver getTabModelSelectorObserverForTesting() { + return mTabModelSelectorObserver; + } }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/device_lock/DeviceLockBridge.java b/chrome/android/java/src/org/chromium/chrome/browser/device_lock/DeviceLockBridge.java index 697661ba..9ea548e4 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/device_lock/DeviceLockBridge.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/device_lock/DeviceLockBridge.java
@@ -13,6 +13,8 @@ import org.chromium.base.ContextUtils; import org.chromium.base.annotations.CalledByNative; import org.chromium.base.annotations.NativeMethods; +import org.chromium.chrome.browser.preferences.ChromePreferenceKeys; +import org.chromium.chrome.browser.preferences.SharedPreferencesManager; import org.chromium.chrome.browser.ui.signin.DeviceLockActivityLauncher; import org.chromium.ui.base.WindowAndroid; @@ -49,7 +51,7 @@ if (context != null) { DeviceLockActivityLauncher deviceLockActivityLauncher = DeviceLockActivityLauncherSupplier.from(windowAndroid).get(); - deviceLockActivityLauncher.launchDeviceLockActivity(context, null, true, windowAndroid, + deviceLockActivityLauncher.launchDeviceLockActivity(context, null, false, windowAndroid, (resultCode, unused) -> DeviceLockBridgeJni.get().onDeviceLockUiFinished( mNativeDeviceLockBridge, resultCode == Activity.RESULT_OK)); @@ -70,6 +72,12 @@ .isDeviceSecure(); } + @CalledByNative + private boolean deviceLockPageHasBeenPassed() { + return SharedPreferencesManager.getInstance().readBoolean( + ChromePreferenceKeys.DEVICE_LOCK_PAGE_HAS_BEEN_PASSED, false); + } + /** * C++ method signatures. */
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java b/chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java index 2b8badc..86d71cf 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java
@@ -238,12 +238,12 @@ public int allocInstanceId(int windowId, int taskId, boolean preferNew) { removeInvalidInstanceData(); + int instanceId = getInstanceByTask(taskId); + // Explicitly specified window ID should be preferred. This comes from user selecting - // a certain instance on UI. This method would never be called if there were an instance - // already mapped to the task. Check it with an assert. When out of range, ignore the ID - // and apply the normal allocation logic below. - if (windowId >= 0 && windowId < mMaxInstances) { - assert getInstanceByTask(taskId) == INVALID_INSTANCE_ID; + // a certain instance on UI when no task is present for it. + // When out of range, ignore the ID and apply the normal allocation logic below. + if (windowId >= 0 && windowId < mMaxInstances && instanceId == INVALID_INSTANCE_ID) { Log.i(TAG_MULTI_INSTANCE, "Existing Instance - selected Id allocated: " + windowId); return windowId; } @@ -251,7 +251,6 @@ // First, see if we have instance-task ID mapping. If we do, use the instance id. This // takes care of a task that had its activity destroyed and comes back to create a // new one. We pair them again. - int instanceId = getInstanceByTask(taskId); if (instanceId != INVALID_INSTANCE_ID) { Log.i(TAG_MULTI_INSTANCE, "Existing Instance - mapped Id allocated: " + instanceId); return instanceId;
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageLayout.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageLayout.java index 41fbda2b..7fe029e 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageLayout.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageLayout.java
@@ -656,7 +656,7 @@ if (mIsNtpAsHomeSurfaceEnabled) { if (isScrollableMvtEnabled()) { marginLayoutParams.topMargin = getResources().getDimensionPixelSize( - shouldShowLogo() ? R.dimen.tile_grid_layout_top_margin + shouldShowLogo() ? R.dimen.mvt_container_top_margin_polish : R.dimen.tile_grid_layout_no_logo_top_margin); } else { // Set a bit more top padding on the tile grid if there is no logo. @@ -1032,7 +1032,8 @@ R.dimen.tile_grid_layout_no_logo_top_margin); } - int resourcesId = R.dimen.tile_grid_layout_top_margin; + int resourcesId = mIsSurfacePolishEnabled ? R.dimen.mvt_container_top_margin_polish + : R.dimen.tile_grid_layout_top_margin; if (FeedPositionUtils.isFeedPushDownLargeEnabled()) { resourcesId = R.dimen.tile_grid_layout_top_margin_push_down_large;
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/suggestions/tile/MostVisitedTilesGridLayout.java b/chrome/android/java/src/org/chromium/chrome/browser/suggestions/tile/MostVisitedTilesGridLayout.java index 19976f8..62372b7 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/suggestions/tile/MostVisitedTilesGridLayout.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/suggestions/tile/MostVisitedTilesGridLayout.java
@@ -187,9 +187,17 @@ gridStart = 0; } } - - assert horizontalSpacing >= mMinHorizontalSpacing; - assert horizontalSpacing <= mMaxHorizontalSpacing; + int screenWidth = getResources().getDisplayMetrics().widthPixels; + int screenHeight = getResources().getDisplayMetrics().heightPixels; + String logMessage = "|horizontalSpacing| = " + horizontalSpacing + + " |numColumns| = " + numColumns + " |availableWidth| = " + availableWidth + + " |screenWidth| = " + screenWidth + " |screenHeight| = " + screenHeight + "."; + assert horizontalSpacing >= mMinHorizontalSpacing + : "Horizontal spacing shouldn't be smaller than minimal horizontal spacing: " + + logMessage; + assert horizontalSpacing <= mMaxHorizontalSpacing + : "Horizontal spacing shouldn't be larger than maximal horizontal spacing: " + + logMessage; return Pair.create(gridStart, Math.round(horizontalSpacing)); }
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/bookmarks/ImprovedBookmarkSaveFlowRenderTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/bookmarks/ImprovedBookmarkSaveFlowRenderTest.java index 279ce8af..b52817e 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/bookmarks/ImprovedBookmarkSaveFlowRenderTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/bookmarks/ImprovedBookmarkSaveFlowRenderTest.java
@@ -64,6 +64,7 @@ @Rule public ChromeRenderTestRule mRenderTestRule = ChromeRenderTestRule.Builder.withPublicCorpus() + .setRevision(1) .setBugComponent(ChromeRenderTestRule.Component.UI_BROWSER_BOOKMARKS) .build();
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/compositor/overlays/strip/TabStripTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/compositor/overlays/strip/TabStripTest.java index e5c5986..0ec629e 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/compositor/overlays/strip/TabStripTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/compositor/overlays/strip/TabStripTest.java
@@ -6,6 +6,7 @@ import android.content.pm.ActivityInfo; import android.view.MotionEvent; +import android.view.View; import androidx.test.filters.LargeTest; import androidx.test.platform.app.InstrumentationRegistry; @@ -33,6 +34,7 @@ import org.chromium.chrome.browser.tabmodel.TabModelSelectorObserver; import org.chromium.chrome.browser.tabmodel.TabModelUtils; import org.chromium.chrome.browser.tasks.tab_management.TabManagementFieldTrial; +import org.chromium.chrome.browser.tasks.tab_management.TabUiThemeProvider; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; import org.chromium.chrome.test.ChromeTabbedActivityTestRule; import org.chromium.chrome.test.batch.BlankCTATabInitialStateRule; @@ -859,8 +861,8 @@ } /** - * Tests hover events associated with a strip tab (with the tab strip redesign folio treatment - * enabled, for maximum coverage). + * Tests hover enter/move/exit events associated with the tab strip (with the tab strip redesign + * folio treatment enabled, for maximum coverage). */ @Test @LargeTest @@ -869,7 +871,7 @@ ChromeFeatureList.TAB_STRIP_REDESIGN}) @Restriction(UiRestriction.RESTRICTION_TYPE_TABLET) public void - testHoverOnTab() throws Exception { + testHoverOnTabStrip() throws Exception { TabManagementFieldTrial.TAB_STRIP_REDESIGN_ENABLE_FOLIO.setForTesting(true); // Open a few regular tabs. ChromeTabUtils.newTabsFromMenu( @@ -887,10 +889,28 @@ // Simulate a hover into tab1. StripLayoutHelperManager stripLayoutHelperManager = TabStripUtils.getStripLayoutHelperManager(sActivityTestRule.getActivity()); + Assert.assertNotNull("Hover card ViewStub should not be inflated before first hover event.", + stripLayoutHelperManager.getTabHoverCardViewStubForTesting().getParent()); float xEnter = tab1.getDrawX() + tab1.getWidth() / 2; float yEnter = tab1.getDrawY() + tab1.getHeight() / 2; - stripLayoutHelperManager.simulateHoverEventForTesting( - MotionEvent.ACTION_HOVER_ENTER, xEnter, yEnter); + TestThreadUtils.runOnUiThreadBlocking( + () + -> stripLayoutHelperManager.simulateHoverEventForTesting( + MotionEvent.ACTION_HOVER_ENTER, xEnter, yEnter)); + + // Verify that the card view is inflated as expected. + View hoverCardView = stripLayoutHelperManager.getActiveStripLayoutHelper() + .getTabHoverCardViewForTesting(); + Assert.assertNotNull("Hover card view should be set in normal StripLayoutHelper instance.", + stripLayoutHelperManager.getStripLayoutHelper(false) + .getTabHoverCardViewForTesting()); + + // Verify that the card view background color is correctly set. + Assert.assertEquals("Hover card background color is incorrect.", + TabUiThemeProvider.getStripTabHoverCardBackgroundTintList( + hoverCardView.getContext(), false), + hoverCardView.getBackgroundTintList()); + StripLayoutTab lastHoveredTab = stripLayoutHelperManager.getActiveStripLayoutHelper().getLastHoveredTab(); Assert.assertEquals("The last hovered tab is not set correctly.", tab1, lastHoveredTab); @@ -902,8 +922,10 @@ // Simulate a subsequent hover into the adjacent tab (tab2). float xMove = tab2.getDrawX() + tab2.getWidth() / 3; float yMove = tab2.getDrawY() + tab2.getHeight() / 3; - stripLayoutHelperManager.simulateHoverEventForTesting( - MotionEvent.ACTION_HOVER_MOVE, xMove, yMove); + TestThreadUtils.runOnUiThreadBlocking( + () + -> stripLayoutHelperManager.simulateHoverEventForTesting( + MotionEvent.ACTION_HOVER_MOVE, xMove, yMove)); lastHoveredTab = stripLayoutHelperManager.getActiveStripLayoutHelper().getLastHoveredTab(); Assert.assertEquals("The last hovered tab is not set correctly.", tab2, lastHoveredTab); Assert.assertFalse( @@ -916,8 +938,10 @@ // Simulate a subsequent hover outside tab2. float xExit = tab2.getDrawX() + 2 * tab2.getWidth(); float yExit = tab2.getDrawY() + 2 * tab2.getHeight(); - stripLayoutHelperManager.simulateHoverEventForTesting( - MotionEvent.ACTION_HOVER_EXIT, xExit, yExit); + TestThreadUtils.runOnUiThreadBlocking( + () + -> stripLayoutHelperManager.simulateHoverEventForTesting( + MotionEvent.ACTION_HOVER_EXIT, xExit, yExit)); lastHoveredTab = stripLayoutHelperManager.getActiveStripLayoutHelper().getLastHoveredTab(); Assert.assertNull("The last hovered tab is not set correctly.", lastHoveredTab); Assert.assertTrue( @@ -925,6 +949,117 @@ } /** + * Tests hover cards shown in standard as well as incognito tab models. + */ + @Test + @LargeTest + @Feature({"TabStrip"}) + @EnableFeatures({ChromeFeatureList.ADVANCED_PERIPHERALS_SUPPORT_TAB_STRIP}) + @Restriction(UiRestriction.RESTRICTION_TYPE_TABLET) + public void testHoverOnTabStrip_switchTabModel() throws Exception { + // Open regular tabs. + ChromeTabUtils.newTabsFromMenu( + InstrumentationRegistry.getInstrumentation(), sActivityTestRule.getActivity(), 2); + + // Select a tab to hover on. + TabModel model = sActivityTestRule.getActivity().getTabModelSelector().getModel(false); + StripLayoutTab standardTab = TabStripUtils.findStripLayoutTab( + sActivityTestRule.getActivity(), false, model.getTabAt(1).getId()); + assertTabVisibility(true, standardTab); + + // Simulate a hover into standardTab. + StripLayoutHelperManager stripLayoutHelperManager = + TabStripUtils.getStripLayoutHelperManager(sActivityTestRule.getActivity()); + float standardXEnter = standardTab.getDrawX() + standardTab.getWidth() / 2; + float standardYEnter = standardTab.getDrawY() + standardTab.getHeight() / 2; + TestThreadUtils.runOnUiThreadBlocking( + () + -> stripLayoutHelperManager.simulateHoverEventForTesting( + MotionEvent.ACTION_HOVER_ENTER, standardXEnter, standardYEnter)); + + // Verify that the card view background color is correctly set. + View hoverCardView = stripLayoutHelperManager.getActiveStripLayoutHelper() + .getTabHoverCardViewForTesting(); + Assert.assertNotNull("Hover card view should be set in normal StripLayoutHelper instance.", + stripLayoutHelperManager.getStripLayoutHelper(false) + .getTabHoverCardViewForTesting()); + Assert.assertEquals("Hover card background color is incorrect.", + TabUiThemeProvider.getStripTabHoverCardBackgroundTintList( + hoverCardView.getContext(), false), + hoverCardView.getBackgroundTintList()); + + // Open an incognito tab from the menu. + Tab tab = sActivityTestRule.newIncognitoTabFromMenu(); + StripLayoutTab incognitoTab = TabStripUtils.findStripLayoutTab( + sActivityTestRule.getActivity(), true, tab.getId()); + assertTabVisibility(true, incognitoTab); + + // Simulate a hover into incognitoTab. + float incognitoXEnter = incognitoTab.getDrawX() + incognitoTab.getWidth() / 2; + float incognitoYEnter = incognitoTab.getDrawY() + incognitoTab.getHeight() / 2; + TestThreadUtils.runOnUiThreadBlocking( + () + -> stripLayoutHelperManager.simulateHoverEventForTesting( + MotionEvent.ACTION_HOVER_ENTER, incognitoXEnter, incognitoYEnter)); + + // Verify that the card view background color is correctly set. + hoverCardView = stripLayoutHelperManager.getActiveStripLayoutHelper() + .getTabHoverCardViewForTesting(); + Assert.assertNotNull( + "Hover card view should be set in incognito StripLayoutHelper instance.", + stripLayoutHelperManager.getStripLayoutHelper(true) + .getTabHoverCardViewForTesting()); + Assert.assertEquals("Hover card background color is incorrect.", + TabUiThemeProvider.getStripTabHoverCardBackgroundTintList( + hoverCardView.getContext(), true), + hoverCardView.getBackgroundTintList()); + } + + /** + * Tests that the tab hover state is cleared when the activity is paused. + */ + @Test + @LargeTest + @Feature({"TabStrip"}) + @EnableFeatures({ChromeFeatureList.ADVANCED_PERIPHERALS_SUPPORT_TAB_STRIP, + ChromeFeatureList.TAB_STRIP_REDESIGN}) + @Restriction(UiRestriction.RESTRICTION_TYPE_TABLET) + public void + testTabHoverStateClearedOnActivityPause() throws Exception { + TabManagementFieldTrial.TAB_STRIP_REDESIGN_ENABLE_FOLIO.setForTesting(true); + + TabModel model = sActivityTestRule.getActivity().getTabModelSelector().getModel(false); + StripLayoutTab tab = TabStripUtils.findStripLayoutTab( + sActivityTestRule.getActivity(), false, model.getTabAt(0).getId()); + assertTabVisibility(true, tab); + + // Simulate a hover into the tab. + StripLayoutHelperManager stripLayoutHelperManager = + TabStripUtils.getStripLayoutHelperManager(sActivityTestRule.getActivity()); + float xEnter = tab.getDrawX() + tab.getWidth() / 2; + float yEnter = tab.getDrawY() + tab.getHeight() / 2; + TestThreadUtils.runOnUiThreadBlocking( + () + -> stripLayoutHelperManager.simulateHoverEventForTesting( + MotionEvent.ACTION_HOVER_ENTER, xEnter, yEnter)); + + // Verify that the card is visible. + View hoverCardView = stripLayoutHelperManager.getActiveStripLayoutHelper() + .getTabHoverCardViewForTesting(); + Assert.assertEquals( + "Hover card should be visible.", View.VISIBLE, hoverCardView.getVisibility()); + + // Simulate activity pause. + TestThreadUtils.runOnUiThreadBlocking( + () -> { sActivityTestRule.getActivity().onPauseWithNative(); }); + + CriteriaHelper.pollInstrumentationThread(() -> { + Criteria.checkThat("Hover card should be hidden.", hoverCardView.getVisibility(), + Matchers.is(View.GONE)); + }); + } + + /** * Take a model index and figure out which index it will be in the TabStrip's view hierarchy. * @param tabCount The number of tabs. * @param selectedIndex The index of the selected tab.
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/page_info/PageInfoViewTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/page_info/PageInfoViewTest.java index 3044655a..d7e8160 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/page_info/PageInfoViewTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/page_info/PageInfoViewTest.java
@@ -118,6 +118,7 @@ Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE, ChromeSwitches.DISABLE_STARTUP_PROMOS, ContentSwitches.HOST_RESOLVER_RULES + "=MAP * 127.0.0.1"}) @Batch(PER_CLASS) +@DisableFeatures(ChromeFeatureList.RED_INTERSTITIAL_FACELIFT) public class PageInfoViewTest { private static final String sSimpleHtml = "/chrome/test/data/android/simple.html"; private static final String sSiteDataHtml = "/content/test/data/browsing_data/site_data.html";
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestFreeShippingTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestFreeShippingTest.java index 8273fcf..6973cc7 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestFreeShippingTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestFreeShippingTest.java
@@ -18,18 +18,17 @@ import org.chromium.base.test.params.ParameterAnnotations; import org.chromium.base.test.params.ParameterizedRunner; import org.chromium.base.test.util.CommandLineFlags; -import org.chromium.base.test.util.DisabledTest; import org.chromium.base.test.util.Feature; import org.chromium.chrome.browser.autofill.AutofillTestHelper; -import org.chromium.chrome.browser.autofill.PersonalDataManager.CreditCard; import org.chromium.chrome.browser.flags.ChromeSwitches; import org.chromium.chrome.browser.night_mode.ChromeNightModeTestUtils; +import org.chromium.chrome.browser.payments.PaymentRequestTestRule.AppPresence; +import org.chromium.chrome.browser.payments.PaymentRequestTestRule.FactorySpeed; import org.chromium.chrome.test.ChromeJUnit4RunnerDelegate; import org.chromium.chrome.test.R; import org.chromium.components.autofill.AutofillProfile; import org.chromium.components.payments.Event; import org.chromium.content_public.browser.test.util.TestThreadUtils; -import org.chromium.ui.modaldialog.ModalDialogProperties; import org.chromium.ui.test.util.NightModeTestUtils; import org.chromium.ui.test.util.RenderTestRule; @@ -76,52 +75,49 @@ @Before public void setUp() throws TimeoutException { + mPaymentRequestTestRule.startMainActivity(); + mPaymentRequestTestRule.setObserversAndWaitForInitialPageLoad(); AutofillTestHelper helper = new AutofillTestHelper(); // The user has a shipping address on disk. - String billingAddressId = helper.setProfile(AutofillProfile.builder() - .setFullName("Jon Doe") - .setCompanyName("Google") - .setStreetAddress("340 Main St") - .setRegion("CA") - .setLocality("Los Angeles") - .setPostalCode("90291") - .setCountryCode("US") - .setPhoneNumber("650-253-0000") - .setLanguageCode("en-US") - .build()); - helper.setCreditCard(new CreditCard("", "https://example.test", true, true, "Jon Doe", - "4111111111111111", "1111", "12", "2050", "amex", R.drawable.amex_card, - billingAddressId, "" /* serverId */)); + helper.setProfile(AutofillProfile.builder() + .setFullName("Jon Doe") + .setCompanyName("Google") + .setStreetAddress("340 Main St") + .setRegion("CA") + .setLocality("Los Angeles") + .setPostalCode("90291") + .setCountryCode("US") + .setPhoneNumber("650-253-0000") + .setLanguageCode("en-US") + .build()); + mPaymentRequestTestRule.addPaymentAppFactory( + AppPresence.HAVE_APPS, FactorySpeed.FAST_FACTORY); } /** Submit the shipping address to the merchant when the user clicks "Pay." */ @Test @MediumTest - @DisabledTest(message = "crbug.com/1182234") @Feature({"Payments", "RenderTest"}) @ParameterAnnotations.UseMethodParameter(NightModeTestUtils.NightModeParams.class) public void testPayWithRender(boolean nightModeEnabled) throws Throwable { - mPaymentRequestTestRule.triggerUIAndWait("buy", mPaymentRequestTestRule.getReadyToPay()); + mPaymentRequestTestRule.runJavaScriptAndWaitForUIEvent( + "buyWithMethods([{supportedMethods: 'https://bobpay.test'}]);", + mPaymentRequestTestRule.getReadyToPay()); mRenderTestRule.render(mPaymentRequestTestRule.getPaymentRequestView(), "free_shipping"); mPaymentRequestTestRule.clickAndWait( - R.id.button_primary, mPaymentRequestTestRule.getReadyForUnmaskInput()); - mRenderTestRule.render(mPaymentRequestTestRule.getCardUnmaskView(), "unmask"); - mPaymentRequestTestRule.setTextInCardUnmaskDialogAndWait( - R.id.card_unmask_input, "123", mPaymentRequestTestRule.getReadyToUnmask()); - mPaymentRequestTestRule.clickCardUnmaskButtonAndWait( - ModalDialogProperties.ButtonType.POSITIVE, mPaymentRequestTestRule.getDismissed()); - mPaymentRequestTestRule.expectResultContains(new String[] {"Jon Doe", "4111111111111111", - "12", "2050", "basic-card", "123", "Google", "340 Main St", "CA", "Los Angeles", - "90291", "US", "en", "freeShippingOption"}); + R.id.button_primary, mPaymentRequestTestRule.getDismissed()); + mPaymentRequestTestRule.expectResultContains(new String[] {"Jon Doe", "Google", + "340 Main St", "CA", "Los Angeles", "90291", "US", "en", "freeShippingOption"}); } /** Attempt to add an invalid address and cancel the transaction. */ @Test @MediumTest - @DisabledTest(message = "crbug.com/673371") @Feature({"Payments"}) public void testAddInvalidAddressAndCancel() throws TimeoutException { - mPaymentRequestTestRule.triggerUIAndWait("buy", mPaymentRequestTestRule.getReadyToPay()); + mPaymentRequestTestRule.runJavaScriptAndWaitForUIEvent( + "buyWithMethods([{supportedMethods: 'https://bobpay.test'}]);", + mPaymentRequestTestRule.getReadyToPay()); mPaymentRequestTestRule.clickInShippingAddressAndWait( R.id.payments_section, mPaymentRequestTestRule.getReadyForInput()); mPaymentRequestTestRule.clickInShippingAddressAndWait( @@ -139,10 +135,11 @@ /** Add a valid address and complete the transaction. */ @Test @MediumTest - @DisabledTest(message = "crbug.com/1182234") @Feature({"Payments"}) public void testAddAddressAndPay() throws TimeoutException { - mPaymentRequestTestRule.triggerUIAndWait("buy", mPaymentRequestTestRule.getReadyToPay()); + mPaymentRequestTestRule.runJavaScriptAndWaitForUIEvent( + "buyWithMethods([{supportedMethods: 'https://bobpay.test'}]);", + mPaymentRequestTestRule.getReadyToPay()); mPaymentRequestTestRule.clickInShippingAddressAndWait( R.id.payments_section, mPaymentRequestTestRule.getReadyForInput()); mPaymentRequestTestRule.clickInShippingAddressAndWait( @@ -154,11 +151,7 @@ mPaymentRequestTestRule.clickInEditorAndWait( R.id.editor_dialog_done_button, mPaymentRequestTestRule.getReadyToPay()); mPaymentRequestTestRule.clickAndWait( - R.id.button_primary, mPaymentRequestTestRule.getReadyForUnmaskInput()); - mPaymentRequestTestRule.setTextInCardUnmaskDialogAndWait( - R.id.card_unmask_input, "123", mPaymentRequestTestRule.getReadyToUnmask()); - mPaymentRequestTestRule.clickCardUnmaskButtonAndWait( - ModalDialogProperties.ButtonType.POSITIVE, mPaymentRequestTestRule.getDismissed()); + R.id.button_primary, mPaymentRequestTestRule.getDismissed()); mPaymentRequestTestRule.expectResultContains(new String[] {"Bob", "Google", "1600 Amphitheatre Pkwy", "Mountain View", "CA", "94043", "+16502530000"}); } @@ -166,16 +159,17 @@ /** Change the country in the spinner, add a valid address, and complete the transaction. */ @Test @MediumTest - @DisabledTest(message = "crbug.com/1182234") @Feature({"Payments"}) public void testChangeCountryAddAddressAndPay() throws TimeoutException { - mPaymentRequestTestRule.triggerUIAndWait("buy", mPaymentRequestTestRule.getReadyToPay()); + mPaymentRequestTestRule.runJavaScriptAndWaitForUIEvent( + "buyWithMethods([{supportedMethods: 'https://bobpay.test'}]);", + mPaymentRequestTestRule.getReadyToPay()); mPaymentRequestTestRule.clickInShippingAddressAndWait( R.id.payments_section, mPaymentRequestTestRule.getReadyForInput()); mPaymentRequestTestRule.clickInShippingAddressAndWait( R.id.payments_add_option_button, mPaymentRequestTestRule.getReadyToEdit()); mPaymentRequestTestRule.setSpinnerSelectionInEditorAndWait( - 0 /* Afghanistan */, mPaymentRequestTestRule.getReadyToEdit()); + 0 /* Afghanistan */, mPaymentRequestTestRule.getEditorTextUpdate()); mPaymentRequestTestRule.setTextInEditorAndWait( new String[] { "Alice", "Supreme Court", "Airport Road", "Kabul", "1043", "020-253-0000"}, @@ -183,11 +177,7 @@ mPaymentRequestTestRule.clickInEditorAndWait( R.id.editor_dialog_done_button, mPaymentRequestTestRule.getReadyToPay()); mPaymentRequestTestRule.clickAndWait( - R.id.button_primary, mPaymentRequestTestRule.getReadyForUnmaskInput()); - mPaymentRequestTestRule.setTextInCardUnmaskDialogAndWait( - R.id.card_unmask_input, "123", mPaymentRequestTestRule.getReadyToUnmask()); - mPaymentRequestTestRule.clickCardUnmaskButtonAndWait( - ModalDialogProperties.ButtonType.POSITIVE, mPaymentRequestTestRule.getDismissed()); + R.id.button_primary, mPaymentRequestTestRule.getDismissed()); mPaymentRequestTestRule.expectResultContains(new String[] { "Alice", "Supreme Court", "Airport Road", "Kabul", "1043", "+93202530000"}); } @@ -195,10 +185,11 @@ /** Quickly pressing on "add address" and then [X] should not crash. */ @Test @MediumTest - @DisabledTest(message = "crbug.com/1182234") @Feature({"Payments"}) public void testQuickAddAddressAndCloseShouldNotCrash() throws TimeoutException { - mPaymentRequestTestRule.triggerUIAndWait("buy", mPaymentRequestTestRule.getReadyToPay()); + mPaymentRequestTestRule.runJavaScriptAndWaitForUIEvent( + "buyWithMethods([{supportedMethods: 'https://bobpay.test'}]);", + mPaymentRequestTestRule.getReadyToPay()); mPaymentRequestTestRule.clickInShippingAddressAndWait( R.id.payments_section, mPaymentRequestTestRule.getReadyForInput()); @@ -227,10 +218,11 @@ /** Quickly pressing on [X] and then "add address" should not crash. */ @Test @MediumTest - @DisabledTest(message = "crbug.com/1182234") @Feature({"Payments"}) public void testQuickCloseAndAddAddressShouldNotCrash() throws TimeoutException { - mPaymentRequestTestRule.triggerUIAndWait("buy", mPaymentRequestTestRule.getReadyToPay()); + mPaymentRequestTestRule.runJavaScriptAndWaitForUIEvent( + "buyWithMethods([{supportedMethods: 'https://bobpay.test'}]);", + mPaymentRequestTestRule.getReadyToPay()); mPaymentRequestTestRule.clickInShippingAddressAndWait( R.id.payments_section, mPaymentRequestTestRule.getReadyForInput()); @@ -255,10 +247,11 @@ /** Quickly pressing on "add address" and then "cancel" should not crash. */ @Test @MediumTest - @DisabledTest(message = "crbug.com/673371") @Feature({"Payments"}) public void testQuickAddAddressAndCancelShouldNotCrash() throws TimeoutException { - mPaymentRequestTestRule.triggerUIAndWait("buy", mPaymentRequestTestRule.getReadyToPay()); + mPaymentRequestTestRule.runJavaScriptAndWaitForUIEvent( + "buyWithMethods([{supportedMethods: 'https://bobpay.test'}]);", + mPaymentRequestTestRule.getReadyToPay()); mPaymentRequestTestRule.clickInShippingAddressAndWait( R.id.payments_section, mPaymentRequestTestRule.getReadyForInput()); @@ -287,10 +280,11 @@ /** Quickly pressing on "cancel" and then "add address" should not crash. */ @Test @MediumTest - @DisabledTest(message = "crbug.com/1182234") @Feature({"Payments"}) public void testQuickCancelAndAddAddressShouldNotCrash() throws TimeoutException { - mPaymentRequestTestRule.triggerUIAndWait("buy", mPaymentRequestTestRule.getReadyToPay()); + mPaymentRequestTestRule.runJavaScriptAndWaitForUIEvent( + "buyWithMethods([{supportedMethods: 'https://bobpay.test'}]);", + mPaymentRequestTestRule.getReadyToPay()); mPaymentRequestTestRule.clickInShippingAddressAndWait( R.id.payments_section, mPaymentRequestTestRule.getReadyForInput()); @@ -318,11 +312,12 @@ */ @Test @MediumTest - @DisabledTest(message = "crbug.com/1182234") @Feature({"Payments"}) public void testPaymentRequestEventsMetric() throws TimeoutException { // Start and abort the Payment Request. - mPaymentRequestTestRule.triggerUIAndWait("buy", mPaymentRequestTestRule.getReadyToPay()); + mPaymentRequestTestRule.runJavaScriptAndWaitForUIEvent( + "buyWithMethods([{supportedMethods: 'https://bobpay.test'}]);", + mPaymentRequestTestRule.getReadyToPay()); mPaymentRequestTestRule.clickAndWait( R.id.close_button, mPaymentRequestTestRule.getDismissed()); mPaymentRequestTestRule.expectResultContains( @@ -330,7 +325,7 @@ int expectedSample = Event.SHOWN | Event.USER_ABORTED | Event.HAD_INITIAL_FORM_OF_PAYMENT | Event.HAD_NECESSARY_COMPLETE_SUGGESTIONS | Event.REQUEST_SHIPPING - | Event.REQUEST_METHOD_BASIC_CARD | Event.AVAILABLE_METHOD_BASIC_CARD; + | Event.REQUEST_METHOD_OTHER | Event.AVAILABLE_METHOD_OTHER; Assert.assertEquals(1, RecordHistogram.getHistogramValueCountForTesting( "PaymentRequest.Events", expectedSample));
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestRetryTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestRetryTest.java index 84fe703b..36250c4 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestRetryTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestRetryTest.java
@@ -13,7 +13,6 @@ import org.junit.runner.RunWith; import org.chromium.base.test.util.CommandLineFlags; -import org.chromium.base.test.util.DisabledTest; import org.chromium.base.test.util.Feature; import org.chromium.chrome.browser.autofill.AutofillTestHelper; import org.chromium.chrome.browser.flags.ChromeSwitches; @@ -23,7 +22,6 @@ import org.chromium.chrome.test.R; import org.chromium.chrome.test.util.ChromeRenderTestRule; import org.chromium.components.autofill.AutofillProfile; -import org.chromium.ui.modaldialog.ModalDialogProperties; import org.chromium.ui.test.util.RenderTestRule; import java.util.concurrent.TimeoutException; @@ -94,17 +92,12 @@ */ @Test @MediumTest - @DisabledTest(message = "crbug.com/1182234") @Feature({"Payments"}) public void testRetryWithDefaultError() throws TimeoutException { - mPaymentRequestTestRule.triggerUIAndWait("buy", mPaymentRequestTestRule.getReadyForInput()); + mPaymentRequestTestRule.triggerUIAndWait( + "buyWithUrlMethod", mPaymentRequestTestRule.getReadyForInput()); mPaymentRequestTestRule.clickAndWait( - R.id.button_primary, mPaymentRequestTestRule.getReadyForUnmaskInput()); - mPaymentRequestTestRule.setTextInCardUnmaskDialogAndWait( - R.id.card_unmask_input, "123", mPaymentRequestTestRule.getReadyToUnmask()); - mPaymentRequestTestRule.clickCardUnmaskButtonAndWait( - ModalDialogProperties.ButtonType.POSITIVE, - mPaymentRequestTestRule.getPaymentResponseReady()); + R.id.button_primary, mPaymentRequestTestRule.getPaymentResponseReady()); mPaymentRequestTestRule.retryPaymentRequest("{}", mPaymentRequestTestRule.getReadyToPay()); @@ -118,17 +111,12 @@ */ @Test @MediumTest - @DisabledTest(message = "crbug.com/1182234") @Feature({"Payments"}) public void testRetryWithCustomError() throws TimeoutException { - mPaymentRequestTestRule.triggerUIAndWait("buy", mPaymentRequestTestRule.getReadyForInput()); + mPaymentRequestTestRule.triggerUIAndWait( + "buyWithUrlMethod", mPaymentRequestTestRule.getReadyForInput()); mPaymentRequestTestRule.clickAndWait( - R.id.button_primary, mPaymentRequestTestRule.getReadyForUnmaskInput()); - mPaymentRequestTestRule.setTextInCardUnmaskDialogAndWait( - R.id.card_unmask_input, "123", mPaymentRequestTestRule.getReadyToUnmask()); - mPaymentRequestTestRule.clickCardUnmaskButtonAndWait( - ModalDialogProperties.ButtonType.POSITIVE, - mPaymentRequestTestRule.getPaymentResponseReady()); + R.id.button_primary, mPaymentRequestTestRule.getPaymentResponseReady()); mPaymentRequestTestRule.retryPaymentRequest("{" + " error: 'ERROR'" @@ -143,17 +131,12 @@ */ @Test @MediumTest - @DisabledTest(message = "crbug.com/1182234") @Feature({"Payments", "RenderTest"}) public void testRetryWithShippingAddressErrors() throws Throwable { - mPaymentRequestTestRule.triggerUIAndWait("buy", mPaymentRequestTestRule.getReadyForInput()); + mPaymentRequestTestRule.triggerUIAndWait( + "buyWithUrlMethod", mPaymentRequestTestRule.getReadyForInput()); mPaymentRequestTestRule.clickAndWait( - R.id.button_primary, mPaymentRequestTestRule.getReadyForUnmaskInput()); - mPaymentRequestTestRule.setTextInCardUnmaskDialogAndWait( - R.id.card_unmask_input, "123", mPaymentRequestTestRule.getReadyToUnmask()); - mPaymentRequestTestRule.clickCardUnmaskButtonAndWait( - ModalDialogProperties.ButtonType.POSITIVE, - mPaymentRequestTestRule.getPaymentResponseReady()); + R.id.button_primary, mPaymentRequestTestRule.getPaymentResponseReady()); mPaymentRequestTestRule.retryPaymentRequest("{" + " shippingAddress: {" @@ -180,7 +163,7 @@ "retry_with_shipping_address_errors"); mPaymentRequestTestRule.setSpinnerSelectionInEditorAndWait( - 0 /* Afghanistan */, mPaymentRequestTestRule.getReadyToEdit()); + 0 /* Afghanistan */, mPaymentRequestTestRule.getEditorTextUpdate()); mPaymentRequestTestRule.setTextInEditorAndWait( new String[] { "Alice", "Supreme Court", "Airport Road", "Kabul", "1043", "020-253-0000"}, @@ -194,17 +177,12 @@ */ @Test @MediumTest - @DisabledTest(message = "crbug.com/1182234") @Feature({"Payments", "RenderTest"}) public void testRetryWithPayerErrors() throws Throwable { - mPaymentRequestTestRule.triggerUIAndWait("buy", mPaymentRequestTestRule.getReadyForInput()); + mPaymentRequestTestRule.triggerUIAndWait( + "buyWithUrlMethod", mPaymentRequestTestRule.getReadyForInput()); mPaymentRequestTestRule.clickAndWait( - R.id.button_primary, mPaymentRequestTestRule.getReadyForUnmaskInput()); - mPaymentRequestTestRule.setTextInCardUnmaskDialogAndWait( - R.id.card_unmask_input, "123", mPaymentRequestTestRule.getReadyToUnmask()); - mPaymentRequestTestRule.clickCardUnmaskButtonAndWait( - ModalDialogProperties.ButtonType.POSITIVE, - mPaymentRequestTestRule.getPaymentResponseReady()); + R.id.button_primary, mPaymentRequestTestRule.getPaymentResponseReady()); mPaymentRequestTestRule.retryPaymentRequest("{" + " payer: {" @@ -237,17 +215,12 @@ */ @Test @MediumTest - @DisabledTest(message = "crbug.com/1182234") @Feature({"Payments"}) public void testRetryWithShippingAddressErrorsAndPayerErrors() throws TimeoutException { - mPaymentRequestTestRule.triggerUIAndWait("buy", mPaymentRequestTestRule.getReadyForInput()); + mPaymentRequestTestRule.triggerUIAndWait( + "buyWithUrlMethod", mPaymentRequestTestRule.getReadyForInput()); mPaymentRequestTestRule.clickAndWait( - R.id.button_primary, mPaymentRequestTestRule.getReadyForUnmaskInput()); - mPaymentRequestTestRule.setTextInCardUnmaskDialogAndWait( - R.id.card_unmask_input, "123", mPaymentRequestTestRule.getReadyToUnmask()); - mPaymentRequestTestRule.clickCardUnmaskButtonAndWait( - ModalDialogProperties.ButtonType.POSITIVE, - mPaymentRequestTestRule.getPaymentResponseReady()); + R.id.button_primary, mPaymentRequestTestRule.getPaymentResponseReady()); mPaymentRequestTestRule.retryPaymentRequest("{" + " shippingAddress: {" @@ -270,7 +243,7 @@ mPaymentRequestTestRule.setTextInEditorAndWait( new String[] {"Jane Doe", "650-253-0000", "jon.doe@gmail.com"}, - mPaymentRequestTestRule.getReadyToEdit()); + mPaymentRequestTestRule.getEditorTextUpdate()); mPaymentRequestTestRule.clickInEditorAndWait( R.id.editor_dialog_done_button, mPaymentRequestTestRule.getReadyToPay()); } @@ -280,17 +253,12 @@ */ @Test @MediumTest - @DisabledTest(message = "crbug.com/1182234") @Feature({"Payments"}) public void testRetryAndPayerDetailChangeEvent() throws TimeoutException { - mPaymentRequestTestRule.triggerUIAndWait("buy", mPaymentRequestTestRule.getReadyForInput()); + mPaymentRequestTestRule.triggerUIAndWait( + "buyWithUrlMethod", mPaymentRequestTestRule.getReadyForInput()); mPaymentRequestTestRule.clickAndWait( - R.id.button_primary, mPaymentRequestTestRule.getReadyForUnmaskInput()); - mPaymentRequestTestRule.setTextInCardUnmaskDialogAndWait( - R.id.card_unmask_input, "123", mPaymentRequestTestRule.getReadyToUnmask()); - mPaymentRequestTestRule.clickCardUnmaskButtonAndWait( - ModalDialogProperties.ButtonType.POSITIVE, - mPaymentRequestTestRule.getPaymentResponseReady()); + R.id.button_primary, mPaymentRequestTestRule.getPaymentResponseReady()); mPaymentRequestTestRule.retryPaymentRequest("{}", mPaymentRequestTestRule.getReadyToPay()); @@ -305,11 +273,7 @@ R.id.editor_dialog_done_button, mPaymentRequestTestRule.getReadyToPay()); mPaymentRequestTestRule.clickAndWait( - R.id.button_primary, mPaymentRequestTestRule.getReadyForUnmaskInput()); - mPaymentRequestTestRule.setTextInCardUnmaskDialogAndWait( - R.id.card_unmask_input, "123", mPaymentRequestTestRule.getReadyToUnmask()); - mPaymentRequestTestRule.clickCardUnmaskButtonAndWait( - ModalDialogProperties.ButtonType.POSITIVE, mPaymentRequestTestRule.getDismissed()); + R.id.button_primary, mPaymentRequestTestRule.getDismissed()); mPaymentRequestTestRule.expectResultContains( new String[] {"Jane Doe", "6502530000", "jane.doe@gmail.com"}); @@ -320,17 +284,12 @@ */ @Test @MediumTest - @DisabledTest(message = "crbug.com/1182234") @Feature({"Payments"}) public void testRetryAndReselectContactDetail() throws TimeoutException { - mPaymentRequestTestRule.triggerUIAndWait("buy", mPaymentRequestTestRule.getReadyForInput()); + mPaymentRequestTestRule.triggerUIAndWait( + "buyWithUrlMethod", mPaymentRequestTestRule.getReadyForInput()); mPaymentRequestTestRule.clickAndWait( - R.id.button_primary, mPaymentRequestTestRule.getReadyForUnmaskInput()); - mPaymentRequestTestRule.setTextInCardUnmaskDialogAndWait( - R.id.card_unmask_input, "123", mPaymentRequestTestRule.getReadyToUnmask()); - mPaymentRequestTestRule.clickCardUnmaskButtonAndWait( - ModalDialogProperties.ButtonType.POSITIVE, - mPaymentRequestTestRule.getPaymentResponseReady()); + R.id.button_primary, mPaymentRequestTestRule.getPaymentResponseReady()); mPaymentRequestTestRule.retryPaymentRequest("{}", mPaymentRequestTestRule.getReadyToPay()); @@ -355,10 +314,6 @@ // Click 'Pay'; This logic should be executed successfully. mPaymentRequestTestRule.clickAndWait( - R.id.button_primary, mPaymentRequestTestRule.getReadyForUnmaskInput()); - mPaymentRequestTestRule.setTextInCardUnmaskDialogAndWait( - R.id.card_unmask_input, "123", mPaymentRequestTestRule.getReadyToUnmask()); - mPaymentRequestTestRule.clickCardUnmaskButtonAndWait( - ModalDialogProperties.ButtonType.POSITIVE, mPaymentRequestTestRule.getDismissed()); + R.id.button_primary, mPaymentRequestTestRule.getDismissed()); } }
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestTestRule.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestTestRule.java index 9e3a4c8..18fb34d4 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestTestRule.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestTestRule.java
@@ -1183,6 +1183,11 @@ public void dismissInstrument() {} } + public void startMainActivity() { + assert mDelayStartActivity; + startMainActivityWithURL(mTestFilePath); + } + @Override public Statement apply(final Statement base, Description description) { return super.apply(new Statement() {
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelperManagerTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelperManagerTest.java index 3656ed9d..4931dd58 100644 --- a/chrome/android/junit/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelperManagerTest.java +++ b/chrome/android/junit/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelperManagerTest.java
@@ -5,15 +5,21 @@ package org.chromium.chrome.browser.compositor.overlays.strip; import static org.junit.Assert.assertEquals; +import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import android.content.Context; +import android.content.res.ColorStateList; import android.graphics.RectF; import android.view.ContextThemeWrapper; import android.view.View; +import android.view.ViewStub; +import android.widget.TextView; import androidx.appcompat.content.res.AppCompatResources; +import androidx.core.content.ContextCompat; import androidx.test.core.app.ApplicationProvider; import org.junit.After; @@ -55,6 +61,7 @@ import org.chromium.chrome.test.util.browser.Features.DisableFeatures; import org.chromium.chrome.test.util.browser.Features.EnableFeatures; import org.chromium.components.browser_ui.styles.ChromeColors; +import org.chromium.components.browser_ui.styles.SemanticColorUtils; import org.chromium.ui.base.LocalizationUtils; /** Tests for {@link StripLayoutHelperManager}. */ @@ -91,11 +98,15 @@ @Mock private TabModelFilterProvider mTabModelFilterProvider; @Mock - private TabModel mTabModel; + private TabModel mStandardTabModel; + @Mock + private TabModel mIncognitoTabModel; @Mock private Tab mSelectedTab; @Mock private StripLayoutTab mHoveredStripTab; + @Mock + private ViewStub mTabHoverCardViewStub; private StripLayoutHelperManager mStripLayoutHelperManager; private Context mContext; @@ -127,7 +138,8 @@ mTabModelStartupInfoSupplier = new ObservableSupplierImpl<>(); mStripLayoutHelperManager = new StripLayoutHelperManager(mContext, mManagerHost, mUpdateHost, mRenderHost, mLayerTitleCacheSupplier, mTabModelStartupInfoSupplier, - mLifecycleDispatcher, mMultiInstanceManager, mToolbarContainerView); + mLifecycleDispatcher, mMultiInstanceManager, mToolbarContainerView, + mTabHoverCardViewStub); mStripLayoutHelperManager.setTabModelSelector(mTabModelSelector, mTabCreatorManager); } @@ -406,9 +418,9 @@ int selectedTabId = 2; mStripLayoutHelperManager.setTabStripTreeProviderForTesting(mTabStripTreeProvider); - when(mTabModelSelector.getCurrentModel()).thenReturn(mTabModel); - when(mTabModel.index()).thenReturn(selectedTabId); - when(mTabModel.getTabAt(selectedTabId)).thenReturn(mSelectedTab); + when(mTabModelSelector.getCurrentModel()).thenReturn(mStandardTabModel); + when(mStandardTabModel.index()).thenReturn(selectedTabId); + when(mStandardTabModel.getTabAt(selectedTabId)).thenReturn(mSelectedTab); when(mSelectedTab.getId()).thenReturn(selectedTabId); when(mHoveredStripTab.getId()).thenReturn(hoveredTabId); @@ -426,4 +438,43 @@ activeLayoutHelper.getStripLayoutTabsToRender(), 0f, selectedTabId, hoveredTabId); } + + @Test + @EnableFeatures(ChromeFeatureList.ADVANCED_PERIPHERALS_SUPPORT_TAB_STRIP) + public void testUpdateHoverCardColorsOnTabModelSelected() { + when(mStandardTabModel.isIncognito()).thenReturn(false); + when(mIncognitoTabModel.isIncognito()).thenReturn(true); + when(mTabModelSelector.getModel(false)).thenReturn(mStandardTabModel); + when(mTabModelSelector.getModel(true)).thenReturn(mIncognitoTabModel); + + var tabHoverCardView = mock(View.class); + var titleView = mock(TextView.class); + var urlView = mock(TextView.class); + when(tabHoverCardView.findViewById(R.id.title)).thenReturn(titleView); + when(tabHoverCardView.findViewById(R.id.url)).thenReturn(urlView); + + mStripLayoutHelperManager.getStripLayoutHelper(false).setTabHoverCardView(tabHoverCardView); + mStripLayoutHelperManager.getStripLayoutHelper(true).setTabHoverCardView(tabHoverCardView); + var tabModelSelectorObserver = + mStripLayoutHelperManager.getTabModelSelectorObserverForTesting(); + + // Standard tab model is currently considered active as + // StripLayoutHelperManager#mIsIncognito is false by default. Switch to the incognito tab + // model. + tabModelSelectorObserver.onTabModelSelected(mIncognitoTabModel, mStandardTabModel); + verify(tabHoverCardView) + .setBackgroundTintList(eq(ColorStateList.valueOf(ContextCompat.getColor( + mContext, R.color.default_bg_color_dark_elev_5_baseline)))); + verify(titleView).setTextColor(eq(mContext.getColor(R.color.default_text_color_light))); + verify(urlView).setTextColor( + eq(mContext.getColor(R.color.default_text_color_secondary_light))); + + // Switch to the regular tab model. + tabModelSelectorObserver.onTabModelSelected(mStandardTabModel, mIncognitoTabModel); + verify(tabHoverCardView) + .setBackgroundTintList(eq(ColorStateList.valueOf(ChromeColors.getSurfaceColor( + mContext, R.dimen.tab_hover_card_bg_color_elev)))); + verify(titleView).setTextColor(eq(SemanticColorUtils.getDefaultTextColor(mContext))); + verify(urlView).setTextColor(eq(SemanticColorUtils.getDefaultTextColorSecondary(mContext))); + } }
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelperTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelperTest.java index 2ab5db52..3f95113d 100644 --- a/chrome/android/junit/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelperTest.java +++ b/chrome/android/junit/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelperTest.java
@@ -36,8 +36,10 @@ import android.view.HapticFeedbackConstants; import android.view.View; import android.view.ViewGroup.MarginLayoutParams; +import android.widget.TextView; import androidx.appcompat.content.res.AppCompatResources; +import androidx.coordinatorlayout.widget.CoordinatorLayout.LayoutParams; import androidx.test.core.app.ApplicationProvider; import org.junit.After; @@ -46,6 +48,7 @@ import org.junit.Test; import org.junit.rules.TestRule; import org.junit.runner.RunWith; +import org.mockito.ArgumentCaptor; import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.MockitoAnnotations; @@ -83,6 +86,7 @@ import org.chromium.chrome.test.util.browser.tabmodel.MockTabModel; import org.chromium.ui.base.LocalizationUtils; import org.chromium.ui.shadows.ShadowAppCompatResources; +import org.chromium.url.JUnitTestGURLs; import java.lang.reflect.Field; import java.util.ArrayList; @@ -120,6 +124,8 @@ private ActivityInfo mActivityInfo; @Mock private PackageManager mPackageManager; + @Mock + private View mTabHoverCardView; private Activity mActivity; private Context mContext; @@ -2508,4 +2514,142 @@ // Cleanup for DragDrop clearTabDragSourceMock(); } + + @Test + public void testUpdateLastHoveredTab() { + initializeTabHoverTest(false, false); + var hoveredTab = mStripLayoutHelper.getStripLayoutTabsForTesting()[1]; + + var titleView = mock(TextView.class); + var urlView = mock(TextView.class); + var url = JUnitTestGURLs.EXAMPLE_URL; + when(mTabHoverCardView.findViewById(R.id.title)).thenReturn(titleView); + when(mTabHoverCardView.findViewById(R.id.url)).thenReturn(urlView); + when(mModel.getTabAt(1).getUrl()).thenReturn(url); + + mStripLayoutHelper.updateLastHoveredTab(hoveredTab); + + verify(titleView).setText(eq(mModel.getTabAt(1).getTitle())); + verify(urlView).setText(eq(mModel.getTabAt(1).getUrl().getHost())); + verify(mTabHoverCardView).setX(anyFloat()); + verify(mTabHoverCardView).setY(anyFloat()); + verify(mTabHoverCardView).setVisibility(eq(View.VISIBLE)); + + // Test chrome:// tab hover card display text. + url = JUnitTestGURLs.NTP_URL; + when(mModel.getTabAt(1).getUrl()).thenReturn(url); + + mStripLayoutHelper.updateLastHoveredTab(hoveredTab); + verify(urlView).setText(eq(mModel.getTabAt(1).getUrl().getSpec().replaceFirst("/$", ""))); + } + + @Test + public void testGetHoverCardPosition() { + // Use TSR detached treatment for additional coverage that includes position adjustments. + TabManagementFieldTrial.TAB_STRIP_REDESIGN_ENABLE_DETACHED.setForTesting(true); + initializeTabHoverTest(false, false); + var hoveredTab = mStripLayoutHelper.getStripLayoutTabsForTesting()[1]; + // Set simulated hovered StripLayoutTab drawX for expected hover card position. + hoveredTab.setDrawX(10f); + + float[] position = mStripLayoutHelper.getHoverCardPosition(hoveredTab, false); + float detachedCardOffset = + mContext.getResources().getDimension(R.dimen.tsr_no_feet_tab_hover_card_x_offset); + assertEquals("Card x position is incorrect.", hoveredTab.getDrawX() + detachedCardOffset, + position[0], 0f); + assertEquals("Card y position is incorrect.", + SCREEN_HEIGHT + StripLayoutHelper.FOLIO_DETACHED_BOTTOM_MARGIN_DP, position[1], 0f); + } + + @Test + public void testGetHoverCardPosition_CardWidthExceedsWindowWidth() { + initializeTabHoverTest(false, false); + var hoveredTab = mStripLayoutHelper.getStripLayoutTabsForTesting()[1]; + + // Set window width to be slightly smaller than the default card width. + float cardWidth = mContext.getResources().getDimension(R.dimen.tab_hover_card_width); + mContext.getResources().getDisplayMetrics().widthPixels = (int) (cardWidth - 1); + // Set simulated hovered StripLayoutTab drawX for expected hover card position. + hoveredTab.setDrawX(10f); + var originalLayoutParams = new LayoutParams((int) cardWidth, 200); + when(mTabHoverCardView.getLayoutParams()).thenReturn(originalLayoutParams); + + float[] position = mStripLayoutHelper.getHoverCardPosition(hoveredTab, false); + ArgumentCaptor<LayoutParams> captor = ArgumentCaptor.forClass(LayoutParams.class); + verify(mTabHoverCardView).setLayoutParams(captor.capture()); + assertEquals("Card width is incorrect.", Math.round(0.9f * (cardWidth - 1)), + captor.getValue().width); + assertEquals("Card x position is incorrect.", hoveredTab.getDrawX(), position[0], 0f); + assertEquals("Card y position is incorrect.", SCREEN_HEIGHT, position[1], 0f); + } + + @Test + public void testGetHoverCardPosition_CardCrossesWindowBounds() { + initializeTabHoverTest(false, false); + var hoveredTab = mStripLayoutHelper.getStripLayoutTabsForTesting()[1]; + float windowHorizontalMargin = mContext.getResources().getDimension( + R.dimen.tab_hover_card_window_horizontal_margin); + + // Assume that the tab's hover card is positioned beyond the left edge of the app window. + hoveredTab.setDrawX(-1f); + float[] position = mStripLayoutHelper.getHoverCardPosition(hoveredTab, false); + assertEquals("Card should maintain a minimum margin from the left edge of the app window.", + windowHorizontalMargin, position[0], 0f); + + // Assume that the tab's hover card extends beyond the right edge of the app window. + int windowWidth = mContext.getResources().getDisplayMetrics().widthPixels; + float cardWidth = mContext.getResources().getDimension(R.dimen.tab_hover_card_width); + hoveredTab.setDrawX(windowWidth - cardWidth + 1); + position = mStripLayoutHelper.getHoverCardPosition(hoveredTab, false); + assertEquals("Card should maintain a minimum margin from the right edge of the app window.", + windowWidth - cardWidth - windowHorizontalMargin, position[0], 0f); + } + + @Test + public void testGetHoverCardPosition_RtlLayout() { + // Use TSR detached treatment for additional coverage that includes position adjustments. + TabManagementFieldTrial.TAB_STRIP_REDESIGN_ENABLE_DETACHED.setForTesting(true); + initializeTabHoverTest(true, false); + var hoveredTab = mStripLayoutHelper.getStripLayoutTabsForTesting()[1]; + + float cardWidth = mContext.getResources().getDimension(R.dimen.tab_hover_card_width); + // Set simulated hovered StripLayoutTab drawX and width for expected hover card position. + hoveredTab.setDrawX(28f); + hoveredTab.setWidth(cardWidth - 2); + + float[] position = mStripLayoutHelper.getHoverCardPosition(hoveredTab, false); + float detachedCardOffset = + mContext.getResources().getDimension(R.dimen.tsr_no_feet_tab_hover_card_x_offset); + assertEquals("Card x position is incorrect.", + hoveredTab.getDrawX() - (cardWidth - hoveredTab.getWidth()) - detachedCardOffset, + position[0], 0f); + } + + @Test + public void testIsTabCompletelyHidden() { + TabManagementFieldTrial.TAB_STRIP_REDESIGN_ENABLE_DETACHED.setForTesting(true); + initializeTabHoverTest(false, false); + var hoveredTab = mStripLayoutHelper.getStripLayoutTabsForTesting()[1]; + + // Set simulated hovered StripLayoutTab drawX and width to assume a position beyond the left + // fade. + hoveredTab.setDrawX(-50f); + hoveredTab.setWidth( + StripLayoutHelperManager.FADE_SHORT_TSR_WIDTH_DP - 1 - hoveredTab.getDrawX()); + assertTrue("Tab should be considered hidden for hover state.", + mStripLayoutHelper.isTabCompletelyHidden(hoveredTab)); + + // Set simulated hovered StripLayoutTab drawX to assume a position beyond the right fade. + hoveredTab.setDrawX(SCREEN_WIDTH - StripLayoutHelperManager.FADE_MEDIUM_TSR_WIDTH_DP + 1); + assertTrue("Tab should be considered hidden for hover state.", + mStripLayoutHelper.isTabCompletelyHidden(hoveredTab)); + } + + private void initializeTabHoverTest(boolean rtl, boolean incognito) { + initializeTest(rtl, incognito, false, 0, 3); + mStripLayoutHelper.onSizeChanged(SCREEN_WIDTH, SCREEN_HEIGHT, false, TIMESTAMP); + mStripLayoutHelper.setTabHoverCardView(mTabHoverCardView); + // For ease of dp/px calculation. + mContext.getResources().getDisplayMetrics().density = 1f; + } }
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/ui/ExpandedSheetHelperImplUnitTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/ui/ExpandedSheetHelperImplUnitTest.java new file mode 100644 index 0000000..4971d07 --- /dev/null +++ b/chrome/android/junit/src/org/chromium/chrome/browser/ui/ExpandedSheetHelperImplUnitTest.java
@@ -0,0 +1,61 @@ +// 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.chrome.browser.ui; + +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.anyInt; +import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.verify; + +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.TestRule; +import org.junit.runner.RunWith; +import org.mockito.Mock; +import org.mockito.junit.MockitoJUnit; +import org.mockito.junit.MockitoRule; +import org.robolectric.annotation.Config; + +import org.chromium.base.test.BaseRobolectricTestRunner; +import org.chromium.chrome.browser.tab.TabObscuringHandler; +import org.chromium.chrome.test.util.browser.Features; +import org.chromium.ui.modaldialog.ModalDialogManager; +import org.chromium.ui.modaldialog.ModalDialogManager.ModalDialogType; + +/** Unit tests for ExpandedSheetHelperImpl. */ +@RunWith(BaseRobolectricTestRunner.class) +@Config(manifest = Config.NONE) +public class ExpandedSheetHelperImplUnitTest { + @Rule + public MockitoRule mMockitoRule = MockitoJUnit.rule(); + @Rule + public TestRule mProcessor = new Features.JUnitProcessor(); + + @Mock + private ModalDialogManager mModalDialogManager; + @Mock + private TabObscuringHandler mTabObscuringHandler; + private ExpandedSheetHelperImpl mExpandedSheetHelperImpl; + + @Before + public void setUp() { + mExpandedSheetHelperImpl = + new ExpandedSheetHelperImpl(() -> mModalDialogManager, mTabObscuringHandler); + } + + @Test + public void testTabObscuredAndDialogSuspended() { + mExpandedSheetHelperImpl.onSheetExpanded(); + verify(mTabObscuringHandler).obscure(eq(TabObscuringHandler.Target.ALL_TABS_AND_TOOLBAR)); + verify(mModalDialogManager).suspendType(eq(ModalDialogType.APP)); + verify(mModalDialogManager).suspendType(eq(ModalDialogType.TAB)); + + mExpandedSheetHelperImpl.onSheetCollapsed(); + verify(mTabObscuringHandler).unobscure(any()); + verify(mModalDialogManager).resumeType(eq(ModalDialogType.APP), anyInt()); + verify(mModalDialogManager).resumeType(eq(ModalDialogType.TAB), anyInt()); + } +}
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/ui/IncognitoRestoreAppLaunchDrawBlockerUnitTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/ui/IncognitoRestoreAppLaunchDrawBlockerUnitTest.java index d989072..06831178 100644 --- a/chrome/android/junit/src/org/chromium/chrome/browser/ui/IncognitoRestoreAppLaunchDrawBlockerUnitTest.java +++ b/chrome/android/junit/src/org/chromium/chrome/browser/ui/IncognitoRestoreAppLaunchDrawBlockerUnitTest.java
@@ -30,10 +30,10 @@ import org.robolectric.annotation.LooperMode; import org.robolectric.annotation.LooperMode.Mode; -import org.chromium.base.CommandLine; import org.chromium.base.supplier.ObservableSupplierImpl; import org.chromium.base.supplier.Supplier; import org.chromium.base.test.BaseRobolectricTestRunner; +import org.chromium.base.test.util.CommandLineFlags; import org.chromium.chrome.browser.IntentHandler; import org.chromium.chrome.browser.crypto.CipherFactory; import org.chromium.chrome.browser.flags.ChromeSwitches; @@ -59,8 +59,6 @@ @Mock private CipherFactory mCipherFactoryMock; @Mock - private CommandLine mCommandLineMock; - @Mock private TabModelSelector mTabModelSelectorMock; @Mock private ActivityLifecycleDispatcher mActivityLifecycleDispatcherMock; @@ -103,7 +101,6 @@ IncognitoReauthManager.setIsIncognitoReauthFeatureAvailableForTesting( /*isAvailable=*/false); CipherFactory.resetInstanceForTesting(mCipherFactoryMock); - CommandLine.setInstanceForTesting(mCommandLineMock); mTabModelSelectorObservableSupplier.set(mTabModelSelectorMock); mIncognitoRestoreAppLaunchDrawBlocker = new IncognitoRestoreAppLaunchDrawBlocker( this::getSavedInstanceStateMock, mTabModelSelectorObservableSupplier, @@ -125,8 +122,7 @@ @After public void tearDown() { verifyNoMoreInteractions(mSavedInstanceStateMock, mIntentMock, mCipherFactoryMock, - mCommandLineMock, mTabModelSelectorMock, mUnblockDrawRunnableMock, - mActivityLifecycleDispatcherMock); + mTabModelSelectorMock, mUnblockDrawRunnableMock, mActivityLifecycleDispatcherMock); } @Test @@ -140,16 +136,14 @@ @Test @SmallTest + @CommandLineFlags.Add({ChromeSwitches.NO_RESTORE_STATE}) public void testShouldNotBlockDraw_WhenNoRestoreStateSwitchIsPresent() { // Premise conditions. IncognitoReauthManager.setIsIncognitoReauthFeatureAvailableForTesting(/*isAvailable=*/true); // Test condition - doReturn(true).when(mCommandLineMock).hasSwitch(ChromeSwitches.NO_RESTORE_STATE); assertFalse( "Shouldn't block draw.", mIncognitoRestoreAppLaunchDrawBlocker.shouldBlockDraw()); - - verify(mCommandLineMock, times(1)).hasSwitch(ChromeSwitches.NO_RESTORE_STATE); } @Test @@ -157,14 +151,12 @@ public void testShouldNotBlockDraw_WhenNoCipherDataIsFound() { // Premise conditions. IncognitoReauthManager.setIsIncognitoReauthFeatureAvailableForTesting(/*isAvailable=*/true); - doReturn(false).when(mCommandLineMock).hasSwitch(ChromeSwitches.NO_RESTORE_STATE); // Test condition doReturn(false).when(mCipherFactoryMock).restoreFromBundle(mSavedInstanceStateMock); assertFalse( "Shouldn't block draw.", mIncognitoRestoreAppLaunchDrawBlocker.shouldBlockDraw()); - verify(mCommandLineMock, times(1)).hasSwitch(ChromeSwitches.NO_RESTORE_STATE); verify(mCipherFactoryMock, times(1)).restoreFromBundle(mSavedInstanceStateMock); } @@ -173,7 +165,6 @@ public void testShouldNotBlockDraw_WhenReauthIsNotPending() { // Premise conditions. IncognitoReauthManager.setIsIncognitoReauthFeatureAvailableForTesting(/*isAvailable=*/true); - doReturn(false).when(mCommandLineMock).hasSwitch(ChromeSwitches.NO_RESTORE_STATE); doReturn(true).when(mCipherFactoryMock).restoreFromBundle(mSavedInstanceStateMock); // Test condition @@ -183,7 +174,6 @@ assertFalse( "Shouldn't block draw.", mIncognitoRestoreAppLaunchDrawBlocker.shouldBlockDraw()); - verify(mCommandLineMock, times(1)).hasSwitch(ChromeSwitches.NO_RESTORE_STATE); verify(mCipherFactoryMock, times(1)).restoreFromBundle(mSavedInstanceStateMock); verify(mSavedInstanceStateMock, times(1)) .getBoolean(IncognitoReauthControllerImpl.KEY_IS_INCOGNITO_REAUTH_PENDING, false); @@ -194,7 +184,6 @@ public void testShouldNotBlockDraw_WhenIntentingToRegularTab_AndLastTabModelWasNotIncognito() { // Premise conditions IncognitoReauthManager.setIsIncognitoReauthFeatureAvailableForTesting(/*isAvailable=*/true); - doReturn(false).when(mCommandLineMock).hasSwitch(ChromeSwitches.NO_RESTORE_STATE); doReturn(true).when(mCipherFactoryMock).restoreFromBundle(mSavedInstanceStateMock); doReturn(true) .when(mSavedInstanceStateMock) @@ -210,7 +199,6 @@ assertFalse( "Shouldn't block draw.", mIncognitoRestoreAppLaunchDrawBlocker.shouldBlockDraw()); - verify(mCommandLineMock, times(1)).hasSwitch(ChromeSwitches.NO_RESTORE_STATE); verify(mCipherFactoryMock, times(1)).restoreFromBundle(mSavedInstanceStateMock); verify(mSavedInstanceStateMock, times(1)) .getBoolean(IncognitoReauthControllerImpl.KEY_IS_INCOGNITO_REAUTH_PENDING, false); @@ -226,7 +214,6 @@ // Premise conditions IncognitoReauthManager.setIsIncognitoReauthFeatureAvailableForTesting(/*isAvailable=*/true); mIncognitoRestoreAppLaunchDrawBlocker.resetIsUnblockDrawRunnableInvokedForTesting(); - doReturn(false).when(mCommandLineMock).hasSwitch(ChromeSwitches.NO_RESTORE_STATE); doReturn(true).when(mCipherFactoryMock).restoreFromBundle(mSavedInstanceStateMock); doReturn(true) .when(mSavedInstanceStateMock) @@ -245,7 +232,6 @@ "Should not block draw.", mIncognitoRestoreAppLaunchDrawBlocker.shouldBlockDraw()); // Verify all the mocks were called. - verify(mCommandLineMock, times(1)).hasSwitch(ChromeSwitches.NO_RESTORE_STATE); verify(mCipherFactoryMock, times(1)).restoreFromBundle(mSavedInstanceStateMock); verify(mSavedInstanceStateMock, times(1)) .getBoolean(IncognitoReauthControllerImpl.KEY_IS_INCOGNITO_REAUTH_PENDING, false); @@ -265,7 +251,6 @@ public void testShouldBlockDraw_WhenTabStateIsNotInitialized_And_NativeIsInitialized() { // Premise conditions IncognitoReauthManager.setIsIncognitoReauthFeatureAvailableForTesting(/*isAvailable=*/true); - doReturn(false).when(mCommandLineMock).hasSwitch(ChromeSwitches.NO_RESTORE_STATE); doReturn(true).when(mCipherFactoryMock).restoreFromBundle(mSavedInstanceStateMock); doReturn(true) .when(mSavedInstanceStateMock) @@ -283,7 +268,6 @@ assertTrue("Should block draw.", mIncognitoRestoreAppLaunchDrawBlocker.shouldBlockDraw()); // Verify all the mocks were called. - verify(mCommandLineMock, times(1)).hasSwitch(ChromeSwitches.NO_RESTORE_STATE); verify(mCipherFactoryMock, times(1)).restoreFromBundle(mSavedInstanceStateMock); verify(mSavedInstanceStateMock, times(1)) .getBoolean(IncognitoReauthControllerImpl.KEY_IS_INCOGNITO_REAUTH_PENDING, false); @@ -300,7 +284,6 @@ public void testShouldBlockDraw_WhenTabStateIsInitialized_And_WhenNativeIsNotInitialized() { // Premise conditions IncognitoReauthManager.setIsIncognitoReauthFeatureAvailableForTesting(/*isAvailable=*/true); - doReturn(false).when(mCommandLineMock).hasSwitch(ChromeSwitches.NO_RESTORE_STATE); doReturn(true).when(mCipherFactoryMock).restoreFromBundle(mSavedInstanceStateMock); doReturn(true) .when(mSavedInstanceStateMock) @@ -318,7 +301,6 @@ mIncognitoRestoreAppLaunchDrawBlocker.shouldBlockDraw()); // Verify all the mocks were called. - verify(mCommandLineMock, times(1)).hasSwitch(ChromeSwitches.NO_RESTORE_STATE); verify(mCipherFactoryMock, times(1)).restoreFromBundle(mSavedInstanceStateMock); verify(mSavedInstanceStateMock, times(1)) .getBoolean(IncognitoReauthControllerImpl.KEY_IS_INCOGNITO_REAUTH_PENDING, false);
diff --git a/chrome/android/modules/readaloud/public/java/src/org/chromium/chrome/modules/readaloud/PlaybackArgs.java b/chrome/android/modules/readaloud/public/java/src/org/chromium/chrome/modules/readaloud/PlaybackArgs.java index c5e469d..124669a2 100644 --- a/chrome/android/modules/readaloud/public/java/src/org/chromium/chrome/modules/readaloud/PlaybackArgs.java +++ b/chrome/android/modules/readaloud/public/java/src/org/chromium/chrome/modules/readaloud/PlaybackArgs.java
@@ -29,7 +29,7 @@ * Description is only relevant for the UI, language and voiceId are required * for the server request. */ - static class PlaybackVoice { + public static class PlaybackVoice { private final String mLanguage; private final String mVoiceId; @Nullable
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd index d1cd624..27fb26d 100644 --- a/chrome/app/generated_resources.grd +++ b/chrome/app/generated_resources.grd
@@ -16036,16 +16036,9 @@ <message name="IDS_PLUS_ADDRESS_MODAL_PROPOSED_PLUS_ADDRESS_PLACEHOLDER" desc="A placeholder for the plus address" translateable="false" formatter_data="android_java"> Lorem Ipsum or whatever </message> - <if expr="not is_android"> - <message name="IDS_PLUS_ADDRESS_MODAL_REGULAR_ADDRESS_LABEL" desc="A label for the regular address in the plus address modal" translateable="false" formatter_data="android_java"> - For <ph name="REGULAR_ADDRESS">$1<ex>test@example.test</ex></ph> - </message> - </if> - <if expr="is_android"> - <message name="IDS_PLUS_ADDRESS_MODAL_REGULAR_ADDRESS_LABEL" desc="A label for the regular address in the plus address modal" translateable="false" formatter_data="android_java"> - For <ph name="REGULAR_ADDRESS">%1$s<ex>test@example.test</ex></ph> - </message> - </if> + <message name="IDS_PLUS_ADDRESS_MODAL_REGULAR_ADDRESS_LABEL" desc="A label for the regular address in the plus address modal" translateable="false"> + For <ph name="REGULAR_ADDRESS">$1<ex>test@example.test</ex></ph> + </message> <message name="IDS_PLUS_ADDRESS_MODAL_PLUS_ADDRESS_DESCRIPTION" desc="An illustrative description of the plus addresses modal" translateable="false" formatter_data="android_java"> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. </message>
diff --git a/chrome/app/settings_strings.grdp b/chrome/app/settings_strings.grdp index 533863d..1435321 100644 --- a/chrome/app/settings_strings.grdp +++ b/chrome/app/settings_strings.grdp
@@ -3239,7 +3239,7 @@ Tracking protection </message> <message name="IDS_SETTINGS_TRACKING_PROTECTION_LINK_ROW_SUB_LABEL" desc="Sub-label for the 'Tracking protection' page entry point." translateable="false"> - Protection from third-party cookie tracking + Manage third-party cookies and other tracking protections </message> <message name="IDS_SETTINGS_TRACKING_PROTECTION_PAGE_TITLE" translateable="false" desc="The title of a new settings page that allows users to manage settings related to tracking, for example third-party cookies. This settings page will replace the existing cookie settings page at chrome://settings/cookies."> Tracking protection
diff --git a/chrome/app/vector_icons/game_controls_single_button.icon b/chrome/app/vector_icons/game_controls_single_button.icon index 3e11630..32dedf5f 100644 --- a/chrome/app/vector_icons/game_controls_single_button.icon +++ b/chrome/app/vector_icons/game_controls_single_button.icon
@@ -2,11 +2,15 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -MOVE_TO, 38, 10, -H_LINE_TO, 10, -R_V_LINE_TO, 28, -R_H_LINE_TO, 28, -V_LINE_TO, 10, +MOVE_TO, 16, 10, +R_H_LINE_TO, 16, +R_ARC_TO, 6, 6, 0, 0, 1, 6, 6, +R_V_LINE_TO, 16, +R_ARC_TO, 6, 6, 0, 0, 1, -6, 6, +R_H_LINE_TO, -16, +R_ARC_TO, 6, 6, 0, 0, 1, -6, -6, +R_V_LINE_TO, -16, +R_ARC_TO, 6, 6, 0, 0, 1, 6, -6, CLOSE, MOVE_TO, 21.81f, 27.93f, R_CUBIC_TO, 0.39f, 0.2f, 0.84f, 0.29f, 1.34f, 0.29f,
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn index d2eee90..0b8a1c6d 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn
@@ -149,6 +149,7 @@ "accessibility/accessibility_state_utils.h", "accessibility/accessibility_ui.cc", "accessibility/accessibility_ui.h", + "accessibility/media_app/ax_media_app.h", "accessibility/media_app/ax_media_app_handler.cc", "accessibility/media_app/ax_media_app_handler.h", "accessibility/media_app/ax_media_app_handler_factory.cc", @@ -1822,6 +1823,10 @@ "tpcd/heuristics/opener_heuristic_tab_helper.h", "tpcd/heuristics/opener_heuristic_utils.cc", "tpcd/heuristics/opener_heuristic_utils.h", + "tpcd/metadata/updater_service.cc", + "tpcd/metadata/updater_service.h", + "tpcd/metadata/updater_service_factory.cc", + "tpcd/metadata/updater_service_factory.h", "tpcd/support/tpcd_support_manager.cc", "tpcd/support/tpcd_support_manager.h", "tracing/background_tracing_field_trial.cc", @@ -4593,6 +4598,7 @@ "//chrome/browser/ui/webui/new_tab_page_third_party:mojo_bindings", "//chrome/browser/ui/webui/side_panel/bookmarks:mojo_bindings", "//chrome/browser/ui/webui/side_panel/customize_chrome:mojo_bindings", + "//chrome/browser/ui/webui/side_panel/performance_controls:mojo_bindings", "//chrome/browser/ui/webui/side_panel/reading_list:mojo_bindings", "//chrome/browser/ui/webui/side_panel/user_notes:mojo_bindings", "//chrome/browser/ui/webui/tab_search:mojo_bindings", @@ -5629,8 +5635,8 @@ "notifications/notification_platform_bridge_delegate.h", "notifications/notification_platform_bridge_lacros.cc", "notifications/notification_platform_bridge_lacros.h", - "performance_manager/policies/oom_score_policy_lacros.cc", - "performance_manager/policies/oom_score_policy_lacros.h", + "performance_manager/policies/oom_score_policy_chromeos.cc", + "performance_manager/policies/oom_score_policy_chromeos.h", "platform_util_lacros.cc", "policy/status_provider/ash_lacros_policy_stack_bridge.cc", "policy/status_provider/ash_lacros_policy_stack_bridge.h",
diff --git a/chrome/browser/DEPS b/chrome/browser/DEPS index 61527045..533cfb91 100644 --- a/chrome/browser/DEPS +++ b/chrome/browser/DEPS
@@ -287,6 +287,7 @@ "+components/safe_browsing/content/common", "+components/safe_browsing/core/browser", "+components/safe_browsing/core/common", + "+components/tpcd/metadata", "+components/safe_search_api", "+components/saved_tab_groups", "+components/schema_org",
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc index 16677fb..3b80f93d3 100644 --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc
@@ -7631,6 +7631,11 @@ flag_descriptions::kAllowCrossDeviceFeatureSuiteDescription, kOsCrOS, FEATURE_VALUE_TYPE(ash::features::kAllowCrossDeviceFeatureSuite)}, + {"link-cross-device-internals", + flag_descriptions::kLinkCrossDeviceInternalsName, + flag_descriptions::kLinkCrossDeviceInternalsDescription, kOsCrOS, + FEATURE_VALUE_TYPE(ash::features::kLinkCrossDeviceInternals)}, + {"allow-repeated-updates", flag_descriptions::kAllowRepeatedUpdatesName, flag_descriptions::kAllowRepeatedUpdatesDescription, kOsCrOS, FEATURE_VALUE_TYPE(ash::features::kAllowRepeatedUpdates)}, @@ -8275,6 +8280,10 @@ flag_descriptions::kClipboardHistoryUrlTitlesName, flag_descriptions::kClipboardHistoryUrlTitlesDescription, kOsCrOS, FEATURE_VALUE_TYPE(ash::features::kClipboardHistoryUrlTitles)}, + {"clipboard-history-web-contents-paste", + flag_descriptions::kClipboardHistoryWebContentsPasteName, + flag_descriptions::kClipboardHistoryWebContentsPasteDescription, kOsCrOS, + FEATURE_VALUE_TYPE(ash::features::kClipboardHistoryWebContentsPaste)}, #endif // BUILDFLAG(IS_CHROMEOS_ASH) #if BUILDFLAG(IS_WIN) @@ -9337,12 +9346,6 @@ kOsAll, FEATURE_VALUE_TYPE(features::kForceGpuMainThreadToNormalPriorityDrDc)}, -#if BUILDFLAG(IS_ANDROID) - {"enable-drdc-vulkan", flag_descriptions::kEnableDrDcVulkanName, - flag_descriptions::kEnableDrDcDescription, kOsAndroid, - FEATURE_VALUE_TYPE(features::kEnableDrDcVulkan)}, -#endif // BUILDFLAG(IS_ANDROID) - #if BUILDFLAG(IS_CHROMEOS_ASH) {"traffic-counters", flag_descriptions::kTrafficCountersEnabledName, flag_descriptions::kTrafficCountersEnabledDescription, kOsCrOS,
diff --git a/chrome/browser/accessibility/accessibility_extension_api_chromeos.cc b/chrome/browser/accessibility/accessibility_extension_api_chromeos.cc index 14ba290f..408455b 100644 --- a/chrome/browser/accessibility/accessibility_extension_api_chromeos.cc +++ b/chrome/browser/accessibility/accessibility_extension_api_chromeos.cc
@@ -26,6 +26,9 @@ #include "chrome/browser/ash/accessibility/accessibility_manager.h" #include "chrome/browser/ash/accessibility/magnification_manager.h" #include "chrome/browser/ash/arc/accessibility/arc_accessibility_helper_bridge.h" +#include "chrome/browser/ash/crosapi/crosapi_ash.h" +#include "chrome/browser/ash/crosapi/crosapi_manager.h" +#include "chrome/browser/ash/crosapi/embedded_accessibility_helper_client_ash.h" #include "chrome/browser/ash/profiles/profile_helper.h" #include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/extensions/extension_tab_util.h" @@ -115,6 +118,18 @@ } // namespace ExtensionFunction::ResponseAction +AccessibilityPrivateClipboardCopyInActiveLacrosGoogleDocFunction::Run() { + EXTENSION_FUNCTION_VALIDATE(args().size() >= 1); + EXTENSION_FUNCTION_VALIDATE(args()[0].is_string()); + std::string url = args()[0].GetString(); + crosapi::CrosapiManager::Get() + ->crosapi_ash() + ->embedded_accessibility_helper_client_ash() + ->ClipboardCopyInActiveGoogleDoc(url); + return RespondNow(NoArguments()); +} + +ExtensionFunction::ResponseAction AccessibilityPrivateDarkenScreenFunction::Run() { EXTENSION_FUNCTION_VALIDATE(args().size() >= 1); EXTENSION_FUNCTION_VALIDATE(args()[0].is_bool());
diff --git a/chrome/browser/accessibility/accessibility_extension_api_chromeos.h b/chrome/browser/accessibility/accessibility_extension_api_chromeos.h index be96563..4972202 100644 --- a/chrome/browser/accessibility/accessibility_extension_api_chromeos.h +++ b/chrome/browser/accessibility/accessibility_extension_api_chromeos.h
@@ -13,6 +13,18 @@ #include "extensions/browser/extension_function.h" #include "third_party/abseil-cpp/absl/types/optional.h" +// API function that is called when the Select-to-Speak wants to perform a +// clipboard copy in a Lacros Google Doc. +class AccessibilityPrivateClipboardCopyInActiveLacrosGoogleDocFunction + : public ExtensionFunction { + ~AccessibilityPrivateClipboardCopyInActiveLacrosGoogleDocFunction() override { + } + ResponseAction Run() override; + DECLARE_EXTENSION_FUNCTION( + "accessibilityPrivate.clipboardCopyInActiveLacrosGoogleDoc", + ACCESSIBILITY_PRIVATE_CLIPBOARDCOPYINACTIVELACROSGOOGLEDOC) +}; + // API function that darkens or undarkens the screen. class AccessibilityPrivateDarkenScreenFunction : public ExtensionFunction { ~AccessibilityPrivateDarkenScreenFunction() override {}
diff --git a/chrome/browser/accessibility/media_app/ax_media_app.h b/chrome/browser/accessibility/media_app/ax_media_app.h new file mode 100644 index 0000000..4308b94 --- /dev/null +++ b/chrome/browser/accessibility/media_app/ax_media_app.h
@@ -0,0 +1,34 @@ +// 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_ACCESSIBILITY_MEDIA_APP_AX_MEDIA_APP_H_ +#define CHROME_BROWSER_ACCESSIBILITY_MEDIA_APP_AX_MEDIA_APP_H_ + +#include <stdint.h> + +#include "third_party/skia/include/core/SkBitmap.h" +#include "ui/gfx/geometry/insets.h" + +namespace ash { + +// The interface that is implemented by the Media App (AKA Backlight) which is +// used by the accessibility layer to talk to it. +class AXMediaApp { + public: + AXMediaApp(const AXMediaApp&) = delete; + AXMediaApp& operator=(const AXMediaApp&) = delete; + virtual ~AXMediaApp() = default; + + virtual void OcrServiceEnabledChanged(bool enabled) = 0; + virtual void AccessibilityEnabledChanged(bool enabled) = 0; + virtual SkBitmap RequestBitmap(uint64_t page_index) = 0; + virtual void SetViewport(const gfx::Insets& viewport_box) = 0; + + protected: + AXMediaApp() = default; +}; + +} // namespace ash + +#endif // CHROME_BROWSER_ACCESSIBILITY_MEDIA_APP_AX_MEDIA_APP_H_
diff --git a/chrome/browser/accessibility/media_app/ax_media_app_handler.cc b/chrome/browser/accessibility/media_app/ax_media_app_handler.cc index f2cb06ee..91823a1 100644 --- a/chrome/browser/accessibility/media_app/ax_media_app_handler.cc +++ b/chrome/browser/accessibility/media_app/ax_media_app_handler.cc
@@ -6,17 +6,89 @@ #include <utility> +#include "base/check_op.h" +#include "base/notreached.h" +#include "chrome/browser/accessibility/accessibility_state_utils.h" +#include "ui/accessibility/accessibility_features.h" + namespace ash { -AXMediaAppHandler::AXMediaAppHandler() = default; -AXMediaAppHandler::~AXMediaAppHandler() = default; +#if BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) +using screen_ai::ScreenAIInstallState; +#endif // BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) -bool AXMediaAppHandler::IsOcrServiceEnabled() const { - return true; +AXMediaAppHandler::AXMediaAppHandler(AXMediaApp* media_app) + : media_app_(media_app) { + CHECK(media_app_); + if (features::IsBacklightOcrEnabled()) { +#if BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) + CHECK(ScreenAIInstallState::GetInstance()) + << "`ScreenAIInstallState` should always be created on browser " + "startup."; + screen_ai_component_state_observer_.Observe( + ScreenAIInstallState::GetInstance()); +#endif // BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) + + // `BrowserAccessibilityState` needs to be constructed for `AXModeObserver`s + // to work. + auto* ax_state = content::BrowserAccessibilityState::GetInstance(); + if (!ax_state) { + NOTREACHED_NORETURN(); + } + ui::AXPlatformNode::AddAXModeObserver(this); + } } +AXMediaAppHandler::~AXMediaAppHandler() { + ui::AXPlatformNode::RemoveAXModeObserver(this); +} + +bool AXMediaAppHandler::IsOcrServiceEnabled() const { + if (!features::IsBacklightOcrEnabled()) { + return false; + } +#if BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) + CHECK(ScreenAIInstallState::GetInstance()) + << "`ScreenAIInstallState` should always be created on browser startup."; + ScreenAIInstallState::State install_state = + ScreenAIInstallState::GetInstance()->get_state(); + switch (install_state) { + case ScreenAIInstallState::State::kNotDownloaded: + ScreenAIInstallState::GetInstance()->DownloadComponent(); + [[fallthrough]]; + case ScreenAIInstallState::State::kFailed: + case ScreenAIInstallState::State::kDownloading: + return false; + case ScreenAIInstallState::State::kDownloaded: + case ScreenAIInstallState::State::kReady: + return true; + } +#else + return false; +#endif // BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) +} + +#if BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) +void AXMediaAppHandler::StateChanged(ScreenAIInstallState::State state) { + CHECK(features::IsBacklightOcrEnabled()); + ScreenAIInstallState::State new_state = + ScreenAIInstallState::GetInstance()->get_state(); + if (previous_ocr_install_state_ != new_state) { + previous_ocr_install_state_ = new_state; + media_app_->OcrServiceEnabledChanged(IsOcrServiceEnabled()); + } +} +#endif // BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) + bool AXMediaAppHandler::IsAccessibilityEnabled() const { - return true; + return features::IsBacklightOcrEnabled() && + accessibility_state_utils::IsScreenReaderEnabled(); +} + +void AXMediaAppHandler::OnAXModeAdded(ui::AXMode mode) { + CHECK(features::IsBacklightOcrEnabled()); + media_app_->AccessibilityEnabledChanged( + accessibility_state_utils::IsScreenReaderEnabled()); } void AXMediaAppHandler::DocumentUpdated(
diff --git a/chrome/browser/accessibility/media_app/ax_media_app_handler.h b/chrome/browser/accessibility/media_app/ax_media_app_handler.h index 3132381..1ab1de2 100644 --- a/chrome/browser/accessibility/media_app/ax_media_app_handler.h +++ b/chrome/browser/accessibility/media_app/ax_media_app_handler.h
@@ -9,22 +9,60 @@ #include <vector> +#include "base/memory/raw_ptr.h" +#include "base/scoped_observation.h" +#include "chrome/browser/accessibility/media_app/ax_media_app.h" +#include "components/services/screen_ai/buildflags/buildflags.h" +#include "content/public/browser/browser_accessibility_state.h" +#include "ui/accessibility/ax_mode.h" +#include "ui/accessibility/ax_mode_observer.h" +#include "ui/accessibility/platform/ax_platform_node.h" #include "ui/gfx/geometry/insets.h" +#if BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) +#include "chrome/browser/screen_ai/screen_ai_install_state.h" +#endif // BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) + namespace ash { -class AXMediaAppHandler { +class AXMediaAppHandler final + : private ui::AXModeObserver +#if BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) + , + private screen_ai::ScreenAIInstallState::Observer +#endif // BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) +{ public: - AXMediaAppHandler(); + explicit AXMediaAppHandler(AXMediaApp* media_app); AXMediaAppHandler(const AXMediaAppHandler&) = delete; AXMediaAppHandler& operator=(const AXMediaAppHandler&) = delete; - virtual ~AXMediaAppHandler(); + ~AXMediaAppHandler() override; bool IsOcrServiceEnabled() const; bool IsAccessibilityEnabled() const; void DocumentUpdated(const std::vector<gfx::Insets>& page_locations, const std::vector<uint64_t>& dirty_pages); void ViewportUpdated(const gfx::Insets& viewport_box, float scaleFactor); + +#if BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) + // ScreenAIInstallState::Observer: + void StateChanged(screen_ai::ScreenAIInstallState::State state) override; +#endif // BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) + + // ui::AXModeObserver: + void OnAXModeAdded(ui::AXMode mode) override; + + private: + // `AXMediaApp` should outlive this handler. + raw_ptr<AXMediaApp> media_app_; + +#if BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) + screen_ai::ScreenAIInstallState::State previous_ocr_install_state_ = + screen_ai::ScreenAIInstallState::State::kNotDownloaded; + base::ScopedObservation<screen_ai::ScreenAIInstallState, + screen_ai::ScreenAIInstallState::Observer> + screen_ai_component_state_observer_{this}; +#endif // BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) }; } // namespace ash
diff --git a/chrome/browser/accessibility/media_app/ax_media_app_handler_factory.cc b/chrome/browser/accessibility/media_app/ax_media_app_handler_factory.cc index a459d279..acf9457b 100644 --- a/chrome/browser/accessibility/media_app/ax_media_app_handler_factory.cc +++ b/chrome/browser/accessibility/media_app/ax_media_app_handler_factory.cc
@@ -15,10 +15,10 @@ AXMediaAppHandlerFactory::AXMediaAppHandlerFactory() = default; AXMediaAppHandlerFactory::~AXMediaAppHandlerFactory() = default; -AXMediaAppHandler& AXMediaAppHandlerFactory::CreateAXMediaAppHandler() { - auto handler = std::make_unique<AXMediaAppHandler>(); - handlers_.push_back(std::move(handler)); - return *(handlers_[handlers_.size() - 1u].get()); +std::unique_ptr<AXMediaAppHandler> +AXMediaAppHandlerFactory::CreateAXMediaAppHandler(AXMediaApp* media_app) { + CHECK(media_app); + return std::make_unique<AXMediaAppHandler>(media_app); } } // namespace ash
diff --git a/chrome/browser/accessibility/media_app/ax_media_app_handler_factory.h b/chrome/browser/accessibility/media_app/ax_media_app_handler_factory.h index aa6f559..05b4b894 100644 --- a/chrome/browser/accessibility/media_app/ax_media_app_handler_factory.h +++ b/chrome/browser/accessibility/media_app/ax_media_app_handler_factory.h
@@ -9,12 +9,13 @@ #include <vector> #include "base/no_destructor.h" +#include "chrome/browser/accessibility/media_app/ax_media_app.h" #include "chrome/browser/accessibility/media_app/ax_media_app_handler.h" namespace ash { // Factory to create an instance of `AXMediaAppHandler` used by the Media App -// (AKA Backlight) to communicate with the accessibility code. +// (AKA Backlight) to communicate with the accessibility layer. class AXMediaAppHandlerFactory final { public: static AXMediaAppHandlerFactory* GetInstance(); @@ -23,18 +24,13 @@ AXMediaAppHandlerFactory& operator=(const AXMediaAppHandlerFactory&) = delete; ~AXMediaAppHandlerFactory(); - const std::vector<std::unique_ptr<AXMediaAppHandler>>& handlers() const { - return handlers_; - } - - AXMediaAppHandler& CreateAXMediaAppHandler(); + std::unique_ptr<AXMediaAppHandler> CreateAXMediaAppHandler( + AXMediaApp* media_app); private: friend base::NoDestructor<AXMediaAppHandlerFactory>; AXMediaAppHandlerFactory(); - - std::vector<std::unique_ptr<AXMediaAppHandler>> handlers_; }; } // namespace ash
diff --git a/chrome/browser/accessibility/media_app/ax_media_app_handler_unittest.cc b/chrome/browser/accessibility/media_app/ax_media_app_handler_unittest.cc new file mode 100644 index 0000000..4298ba0c --- /dev/null +++ b/chrome/browser/accessibility/media_app/ax_media_app_handler_unittest.cc
@@ -0,0 +1,105 @@ +// 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/accessibility/media_app/ax_media_app_handler.h" + +#include <memory> + +#include "base/test/scoped_feature_list.h" +#include "chrome/browser/accessibility/accessibility_state_utils.h" +#include "chrome/browser/accessibility/media_app/ax_media_app.h" +#include "chrome/browser/accessibility/media_app/ax_media_app_handler.h" +#include "chrome/browser/accessibility/media_app/ax_media_app_handler_factory.h" +#include "chrome/browser/accessibility/media_app/test/fake_ax_media_app.h" +#include "components/services/screen_ai/buildflags/buildflags.h" +#include "content/public/browser/browser_accessibility_state.h" +#include "content/public/test/browser_task_environment.h" +#include "testing/gtest/include/gtest/gtest.h" +#include "ui/accessibility/accessibility_features.h" +#include "ui/accessibility/ax_mode.h" +#include "ui/accessibility/platform/ax_platform_node.h" + +#if BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) +#include "chrome/browser/screen_ai/screen_ai_install_state.h" +#endif // BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) + +namespace ash::test { + +namespace { + +#if BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) +class TestScreenAIInstallState : public screen_ai::ScreenAIInstallState { + public: + TestScreenAIInstallState() = default; + TestScreenAIInstallState(const TestScreenAIInstallState&) = delete; + TestScreenAIInstallState& operator=(const TestScreenAIInstallState&) = delete; + ~TestScreenAIInstallState() override = default; + + void SetLastUsageTime() override {} + void DownloadComponentInternal() override {} +}; +#endif // BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) + +class AXMediaAppHandlerTest : public testing::Test { + public: + AXMediaAppHandlerTest() : feature_list_(features::kBacklightOcr) {} + AXMediaAppHandlerTest(const AXMediaAppHandlerTest&) = delete; + AXMediaAppHandlerTest& operator=(const AXMediaAppHandlerTest&) = delete; + ~AXMediaAppHandlerTest() override = default; + + void SetUp() override { +#if BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) + ASSERT_NE(nullptr, screen_ai::ScreenAIInstallState::GetInstance()); +#endif // BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) + ASSERT_NE(nullptr, content::BrowserAccessibilityState::GetInstance()); + ASSERT_NE(nullptr, AXMediaAppHandlerFactory::GetInstance()); + handler_ = AXMediaAppHandlerFactory::GetInstance()->CreateAXMediaAppHandler( + &fake_media_app_); + ASSERT_NE(nullptr, handler_.get()); + } + + protected: +#if BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) + TestScreenAIInstallState install_state; +#endif // BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) + FakeAXMediaApp fake_media_app_; + std::unique_ptr<AXMediaAppHandler> handler_; + + private: + base::test::ScopedFeatureList feature_list_; + content::BrowserTaskEnvironment task_environment_; +}; + +} // namespace + +#if BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) +TEST_F(AXMediaAppHandlerTest, IsOcrServiceEnabled) { + EXPECT_FALSE(handler_->IsOcrServiceEnabled()); + EXPECT_FALSE(fake_media_app_.IsOcrServiceEnabled()); + + screen_ai::ScreenAIInstallState::GetInstance()->SetState( + screen_ai::ScreenAIInstallState::State::kReady); + EXPECT_TRUE(handler_->IsOcrServiceEnabled()); + EXPECT_TRUE(fake_media_app_.IsOcrServiceEnabled()); + + screen_ai::ScreenAIInstallState::GetInstance()->SetState( + screen_ai::ScreenAIInstallState::State::kNotDownloaded); + EXPECT_FALSE(handler_->IsOcrServiceEnabled()); + EXPECT_FALSE(fake_media_app_.IsOcrServiceEnabled()); +} +#endif // BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) + +TEST_F(AXMediaAppHandlerTest, IsAccessibilityEnabled) { + EXPECT_FALSE(handler_->IsAccessibilityEnabled()); + EXPECT_FALSE(fake_media_app_.IsAccessibilityEnabled()); + + accessibility_state_utils::OverrideIsScreenReaderEnabledForTesting(true); + ui::AXPlatformNode::NotifyAddAXModeFlags(ui::kAXModeComplete); + EXPECT_TRUE(handler_->IsAccessibilityEnabled()); + EXPECT_TRUE(fake_media_app_.IsAccessibilityEnabled()); + // Once enabled, accessibility cannot be disabled. + ui::AXPlatformNode::SetAXMode(ui::AXMode::kNone); +} + +} // namespace ash::test
diff --git a/chrome/browser/accessibility/media_app/test/BUILD.gn b/chrome/browser/accessibility/media_app/test/BUILD.gn index 34d149a..45edb10 100644 --- a/chrome/browser/accessibility/media_app/test/BUILD.gn +++ b/chrome/browser/accessibility/media_app/test/BUILD.gn
@@ -6,6 +6,7 @@ testonly = true sources = [ + "../ax_media_app.h", "fake_ax_media_app.cc", "fake_ax_media_app.h", ]
diff --git a/chrome/browser/accessibility/media_app/test/fake_ax_media_app.h b/chrome/browser/accessibility/media_app/test/fake_ax_media_app.h index ef910c5..b3859513 100644 --- a/chrome/browser/accessibility/media_app/test/fake_ax_media_app.h +++ b/chrome/browser/accessibility/media_app/test/fake_ax_media_app.h
@@ -7,27 +7,31 @@ #include <stdint.h> +#include "chrome/browser/accessibility/media_app/ax_media_app.h" #include "third_party/skia/include/core/SkBitmap.h" #include "ui/gfx/geometry/insets.h" namespace ash::test { -class FakeAXMediaApp final { +// Used for testing: A fake Media App (AKA Backlight) that implements only the +// API used by the accessibility layer. +class FakeAXMediaApp final : public ash::AXMediaApp { public: FakeAXMediaApp(); FakeAXMediaApp(const FakeAXMediaApp&) = delete; FakeAXMediaApp& operator=(const FakeAXMediaApp&) = delete; - ~FakeAXMediaApp(); + ~FakeAXMediaApp() override; bool IsOcrServiceEnabled() const { return ocr_service_enabled_; } bool IsAccessibilityEnabled() const { return accessibility_enabled_; } uint64_t GetLastPageIndex() const { return last_page_index_; } const gfx::Insets& GetViewportBox() const { return viewport_box_; } - void OcrServiceEnabledChanged(bool enabled); - void AccessibilityEnabledChanged(bool enabled); - SkBitmap RequestBitmap(uint64_t page_index); - void SetViewport(const gfx::Insets& viewport_box); + // `AXMediaApp`: + void OcrServiceEnabledChanged(bool enabled) override; + void AccessibilityEnabledChanged(bool enabled) override; + SkBitmap RequestBitmap(uint64_t page_index) override; + void SetViewport(const gfx::Insets& viewport_box) override; private: bool ocr_service_enabled_ = false;
diff --git a/chrome/browser/apps/app_service/metrics/website_metrics_browser_test_base.cc b/chrome/browser/apps/app_service/metrics/website_metrics_browser_test_base.cc deleted file mode 100644 index dd8890b..0000000 --- a/chrome/browser/apps/app_service/metrics/website_metrics_browser_test_base.cc +++ /dev/null
@@ -1,144 +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. - -#include "chrome/browser/apps/app_service/metrics/website_metrics_browser_test_base.h" - -#include <utility> - -#include "build/chromeos_buildflags.h" -#include "chrome/browser/apps/app_service/app_service_proxy_factory.h" -#include "chrome/browser/apps/app_service/metrics/website_metrics.h" -#include "chrome/browser/profiles/profile.h" -#include "chrome/browser/profiles/profile_manager.h" -#include "chrome/browser/ui/browser_finder.h" -#include "chrome/browser/ui/browser_navigator.h" -#include "chrome/browser/ui/browser_navigator_params.h" -#include "chrome/browser/ui/browser_window.h" -#include "chrome/common/chrome_switches.h" -#include "chrome/test/base/in_process_browser_test.h" -#include "content/public/browser/web_contents.h" -#include "content/public/test/test_navigation_observer.h" -#include "ui/base/window_open_disposition.h" -#include "ui/wm/public/activation_client.h" -#include "url/gurl.h" - -#if BUILDFLAG(IS_CHROMEOS_ASH) -#include "chrome/browser/apps/app_service/app_service_proxy_ash.h" -#include "chrome/browser/apps/app_service/metrics/app_platform_metrics_service.h" -#endif - -#if BUILDFLAG(IS_CHROMEOS_LACROS) -#include "chrome/browser/apps/app_service/app_service_proxy_lacros.h" -#include "chrome/browser/apps/app_service/metrics/website_metrics_service_lacros.h" -#endif - -namespace apps { - -void WebsiteMetricsBrowserTestBase::SetUpOnMainThread() { - InProcessBrowserTest::SetUpOnMainThread(); - - auto* const app_service_proxy = - ::apps::AppServiceProxyFactory::GetForProfile(profile()); - CHECK(app_service_proxy); -#if BUILDFLAG(IS_CHROMEOS_LACROS) - auto metrics_service = - std::make_unique<WebsiteMetricsServiceLacros>(profile()); - website_metrics_service_ = metrics_service.get(); - app_service_proxy->SetWebsiteMetricsServiceForTesting( - std::move(metrics_service)); - auto website_metrics = - std::make_unique<WebsiteMetrics>(profile(), - /*user_type_by_device_type=*/0); - website_metrics_service_->SetWebsiteMetricsForTesting( - std::move(website_metrics)); - website_metrics_service_->Start(); -#else - auto metrics_service = std::make_unique<AppPlatformMetricsService>(profile()); - app_platform_metrics_service_ = metrics_service.get(); - app_service_proxy->SetAppPlatformMetricsServiceForTesting( - std::move(metrics_service)); - app_platform_metrics_service_->Start(app_service_proxy->AppRegistryCache(), - app_service_proxy->InstanceRegistry()); -#endif -} - -void WebsiteMetricsBrowserTestBase::SetUpCommandLine( - base::CommandLine* command_line) { - InProcessBrowserTest::SetUpCommandLine(command_line); - command_line->AppendSwitch(switches::kNoStartupWindow); -} - -Browser* WebsiteMetricsBrowserTestBase::CreateBrowser() { - Browser::CreateParams params(profile(), /*user_gesture=*/true); - - // Create a new browser instance. The subsequent `BrowserWindow` that was - // created as part of this instantiation will own the browser instance. - Browser* const browser = Browser::Create(params); - browser->window()->Show(); - auto* const window = browser->window()->GetNativeWindow(); - wm::GetActivationClient(window->GetRootWindow())->ActivateWindow(window); - return browser; -} - -::content::WebContents* WebsiteMetricsBrowserTestBase::NavigateAndWait( - Browser* browser, - const std::string& url, - WindowOpenDisposition disposition) { - NavigateParams params(browser, GURL(url), - ::ui::PAGE_TRANSITION_AUTO_TOPLEVEL); - params.disposition = disposition; - Navigate(¶ms); - auto* const contents = params.navigated_or_inserted_contents; - CHECK_EQ(::chrome::FindBrowserWithWebContents( - params.navigated_or_inserted_contents), - browser); - ::content::TestNavigationObserver observer(contents); - observer.Wait(); - return contents; -} - -void WebsiteMetricsBrowserTestBase::NavigateActiveTab(Browser* browser, - const std::string& url) { - NavigateAndWait(browser, url, WindowOpenDisposition::CURRENT_TAB); -} - -::content::WebContents* WebsiteMetricsBrowserTestBase::InsertForegroundTab( - Browser* browser, - const std::string& url) { - return NavigateAndWait(browser, url, - WindowOpenDisposition::NEW_FOREGROUND_TAB); -} - -::content::WebContents* WebsiteMetricsBrowserTestBase::InsertBackgroundTab( - Browser* browser, - const std::string& url) { - return NavigateAndWait(browser, url, - WindowOpenDisposition::NEW_BACKGROUND_TAB); -} - -#if BUILDFLAG(IS_CHROMEOS_LACROS) -WebsiteMetricsServiceLacros* WebsiteMetricsBrowserTestBase::metrics_service() { - return website_metrics_service_; -} -#else -AppPlatformMetricsService* WebsiteMetricsBrowserTestBase::metrics_service() { - return app_platform_metrics_service_; -} -#endif - -WebsiteMetrics* WebsiteMetricsBrowserTestBase::website_metrics() { -#if BUILDFLAG(IS_CHROMEOS_LACROS) - CHECK(website_metrics_service_); - return website_metrics_service_->WebsiteMetrics(); -#else - CHECK(app_platform_metrics_service_); - return app_platform_metrics_service_->WebsiteMetrics(); -#endif -} - -Profile* WebsiteMetricsBrowserTestBase::profile() { - return ProfileManager::GetPrimaryUserProfile(); -} - -} // namespace apps
diff --git a/chrome/browser/apps/app_service/metrics/website_metrics_browser_test_mixin.cc b/chrome/browser/apps/app_service/metrics/website_metrics_browser_test_mixin.cc new file mode 100644 index 0000000..7d7bf8c --- /dev/null +++ b/chrome/browser/apps/app_service/metrics/website_metrics_browser_test_mixin.cc
@@ -0,0 +1,161 @@ +// 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/apps/app_service/metrics/website_metrics_browser_test_mixin.h" + +#include <utility> + +#include "build/chromeos_buildflags.h" +#include "chrome/browser/apps/app_service/app_service_proxy_factory.h" +#include "chrome/browser/apps/app_service/metrics/website_metrics.h" +#include "chrome/browser/profiles/profile.h" +#include "chrome/browser/profiles/profile_manager.h" +#include "chrome/browser/ui/browser_finder.h" +#include "chrome/browser/ui/browser_navigator.h" +#include "chrome/browser/ui/browser_navigator_params.h" +#include "chrome/browser/ui/browser_window.h" +#include "chrome/test/base/mixin_based_in_process_browser_test.h" +#include "content/public/browser/browser_thread.h" +#include "content/public/browser/web_contents.h" +#include "content/public/test/test_navigation_observer.h" +#include "ui/base/window_open_disposition.h" +#include "ui/wm/public/activation_client.h" +#include "url/gurl.h" + +#if BUILDFLAG(IS_CHROMEOS_ASH) +#include "chrome/browser/apps/app_service/app_service_proxy_ash.h" +#include "chrome/browser/apps/app_service/metrics/app_platform_metrics_service.h" +#endif + +#if BUILDFLAG(IS_CHROMEOS_LACROS) +#include "chrome/browser/apps/app_service/app_service_proxy_lacros.h" +#include "chrome/browser/apps/app_service/metrics/website_metrics_service_lacros.h" +#endif + +namespace apps { + +WebsiteMetricsBrowserTestMixin::WebsiteMetricsBrowserTestMixin( + InProcessBrowserTestMixinHost* host) + : InProcessBrowserTestMixin(host) {} + +WebsiteMetricsBrowserTestMixin::~WebsiteMetricsBrowserTestMixin() = default; + +void WebsiteMetricsBrowserTestMixin::SetUpOnMainThread() { + auto* const profile = ProfileManager::GetPrimaryUserProfile(); + if (!::apps::AppServiceProxyFactory::IsAppServiceAvailableForProfile( + profile)) { + // Cannot initialize website metrics for the profile. Return. + return; + } + + auto* const app_service_proxy = + ::apps::AppServiceProxyFactory::GetForProfile(profile); + CHECK(app_service_proxy); +#if BUILDFLAG(IS_CHROMEOS_LACROS) + // Instantiate website metrics service only if one does not exist already. + // This ensures observers continue observing the same source while retrieving + // the initialized website metrics component. + website_metrics_service_ = app_service_proxy->WebsiteMetricsService(); + if (!website_metrics_service_) { + auto metrics_service = + std::make_unique<WebsiteMetricsServiceLacros>(profile); + website_metrics_service_ = metrics_service.get(); + app_service_proxy->SetWebsiteMetricsServiceForTesting( + std::move(metrics_service)); + } + auto website_metrics = + std::make_unique<WebsiteMetrics>(profile, + /*user_type_by_device_type=*/0); + website_metrics_service_->SetWebsiteMetricsForTesting( + std::move(website_metrics)); + website_metrics_service_->Start(); +#else + // Instantiate app platform metrics service only if one does not exist + // already. This ensures observers continue observing the same source while + // retrieving the initialized website metrics component. + app_platform_metrics_service_ = + app_service_proxy->AppPlatformMetricsService(); + if (!app_platform_metrics_service_) { + auto metrics_service = std::make_unique<AppPlatformMetricsService>(profile); + app_platform_metrics_service_ = metrics_service.get(); + app_service_proxy->SetAppPlatformMetricsServiceForTesting( + std::move(metrics_service)); + } + app_platform_metrics_service_->Start(app_service_proxy->AppRegistryCache(), + app_service_proxy->InstanceRegistry()); +#endif +} + +Browser* WebsiteMetricsBrowserTestMixin::CreateBrowser() { + DCHECK_CURRENTLY_ON(::content::BrowserThread::UI); + auto* const profile = ProfileManager::GetPrimaryUserProfile(); + CHECK(profile); + Browser::CreateParams params(profile, /*user_gesture=*/true); + + // Create a new browser instance. The subsequent `BrowserWindow` that was + // created as part of this instantiation will own the browser instance. + Browser* const browser = Browser::Create(params); + browser->window()->Show(); + auto* const window = browser->window()->GetNativeWindow(); + wm::GetActivationClient(window->GetRootWindow())->ActivateWindow(window); + return browser; +} + +::content::WebContents* WebsiteMetricsBrowserTestMixin::NavigateAndWait( + Browser* browser, + const std::string& url, + WindowOpenDisposition disposition) { + NavigateParams params(browser, GURL(url), + ::ui::PAGE_TRANSITION_AUTO_TOPLEVEL); + params.disposition = disposition; + Navigate(¶ms); + auto* const contents = params.navigated_or_inserted_contents; + CHECK_EQ(::chrome::FindBrowserWithWebContents( + params.navigated_or_inserted_contents), + browser); + ::content::TestNavigationObserver observer(contents); + observer.Wait(); + return contents; +} + +void WebsiteMetricsBrowserTestMixin::NavigateActiveTab(Browser* browser, + const std::string& url) { + NavigateAndWait(browser, url, WindowOpenDisposition::CURRENT_TAB); +} + +::content::WebContents* WebsiteMetricsBrowserTestMixin::InsertForegroundTab( + Browser* browser, + const std::string& url) { + return NavigateAndWait(browser, url, + WindowOpenDisposition::NEW_FOREGROUND_TAB); +} + +::content::WebContents* WebsiteMetricsBrowserTestMixin::InsertBackgroundTab( + Browser* browser, + const std::string& url) { + return NavigateAndWait(browser, url, + WindowOpenDisposition::NEW_BACKGROUND_TAB); +} + +#if BUILDFLAG(IS_CHROMEOS_LACROS) +WebsiteMetricsServiceLacros* WebsiteMetricsBrowserTestMixin::metrics_service() { + return website_metrics_service_; +} +#else +AppPlatformMetricsService* WebsiteMetricsBrowserTestMixin::metrics_service() { + return app_platform_metrics_service_; +} +#endif + +WebsiteMetrics* WebsiteMetricsBrowserTestMixin::website_metrics() { +#if BUILDFLAG(IS_CHROMEOS_LACROS) + CHECK(website_metrics_service_); + return website_metrics_service_->WebsiteMetrics(); +#else + CHECK(app_platform_metrics_service_); + return app_platform_metrics_service_->WebsiteMetrics(); +#endif +} + +} // namespace apps
diff --git a/chrome/browser/apps/app_service/metrics/website_metrics_browser_test_base.h b/chrome/browser/apps/app_service/metrics/website_metrics_browser_test_mixin.h similarity index 63% rename from chrome/browser/apps/app_service/metrics/website_metrics_browser_test_base.h rename to chrome/browser/apps/app_service/metrics/website_metrics_browser_test_mixin.h index 9bb55a1..7989d6db 100644 --- a/chrome/browser/apps/app_service/metrics/website_metrics_browser_test_base.h +++ b/chrome/browser/apps/app_service/metrics/website_metrics_browser_test_mixin.h
@@ -2,14 +2,13 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_BROWSER_APPS_APP_SERVICE_METRICS_WEBSITE_METRICS_BROWSER_TEST_BASE_H_ -#define CHROME_BROWSER_APPS_APP_SERVICE_METRICS_WEBSITE_METRICS_BROWSER_TEST_BASE_H_ +#ifndef CHROME_BROWSER_APPS_APP_SERVICE_METRICS_WEBSITE_METRICS_BROWSER_TEST_MIXIN_H_ +#define CHROME_BROWSER_APPS_APP_SERVICE_METRICS_WEBSITE_METRICS_BROWSER_TEST_MIXIN_H_ -#include "base/command_line.h" #include "build/chromeos_buildflags.h" -#include "chrome/browser/profiles/profile.h" +#include "chrome/browser/apps/app_service/metrics/website_metrics.h" #include "chrome/browser/ui/browser.h" -#include "chrome/test/base/in_process_browser_test.h" +#include "chrome/test/base/mixin_based_in_process_browser_test.h" #include "content/public/browser/web_contents.h" #include "ui/base/window_open_disposition.h" @@ -23,17 +22,24 @@ namespace apps { -// Base class with basic browser test environment setup for the `WebsiteMetrics` -// component. Also includes relevant helpers that can be used by browser tests -// for simulating browser window/tab interaction. -class WebsiteMetricsBrowserTestBase : public InProcessBrowserTest { - protected: - // InProcessBrowserTest: - void SetUpOnMainThread() override; - void SetUpCommandLine(base::CommandLine* command_line) override; +// A browser test mixin that can be used to set up the `WebsiteMetrics` +// component for the primary user profile (if supported). The mixin also +// includes relevant accessors and helpers for interacting with the website +// metrics component (if initialized) as well as other browser components. +class WebsiteMetricsBrowserTestMixin : public InProcessBrowserTestMixin { + public: + explicit WebsiteMetricsBrowserTestMixin(InProcessBrowserTestMixinHost* host); + WebsiteMetricsBrowserTestMixin(const WebsiteMetricsBrowserTestMixin&) = + delete; + WebsiteMetricsBrowserTestMixin& operator=( + const WebsiteMetricsBrowserTestMixin&) = delete; + ~WebsiteMetricsBrowserTestMixin() override; - // Creates and activates a browser window. Returns a pointer to the browser - // instance. + // InProcessBrowserTestMixin: + void SetUpOnMainThread() override; + + // Creates and activates a browser window with the primary user profile. + // Returns a pointer to the created browser instance. Browser* CreateBrowser(); // Navigates to a given URL in the specified browser instance using the given @@ -56,20 +62,16 @@ const std::string& url); #if BUILDFLAG(IS_CHROMEOS_LACROS) - // Returns the `WebsiteMetricsServiceLacros` component. + // Returns the `WebsiteMetricsServiceLacros` component if initialized. WebsiteMetricsServiceLacros* metrics_service(); #else - // Returns the `AppPlatformMetricsService` component. + // Returns the `AppPlatformMetricsService` component if initialized. AppPlatformMetricsService* metrics_service(); #endif - // Returns the initialized `WebsiteMetrics` component. + // Returns the `WebsiteMetrics` component if initialized. WebsiteMetrics* website_metrics(); - // Returns a pointer to the main user profile that was used to initialize - // website metric components. - Profile* profile(); - private: #if BUILDFLAG(IS_CHROMEOS_ASH) raw_ptr<AppPlatformMetricsService, DanglingUntriaged | ExperimentalAsh> @@ -81,4 +83,4 @@ } // namespace apps -#endif // CHROME_BROWSER_APPS_APP_SERVICE_METRICS_WEBSITE_METRICS_BROWSER_TEST_BASE_H_ +#endif // CHROME_BROWSER_APPS_APP_SERVICE_METRICS_WEBSITE_METRICS_BROWSER_TEST_MIXIN_H_
diff --git a/chrome/browser/apps/app_service/metrics/website_metrics_browsertest.cc b/chrome/browser/apps/app_service/metrics/website_metrics_browsertest.cc index b6e89716..98bfb380 100644 --- a/chrome/browser/apps/app_service/metrics/website_metrics_browsertest.cc +++ b/chrome/browser/apps/app_service/metrics/website_metrics_browsertest.cc
@@ -5,12 +5,16 @@ #include <memory> #include <set> +#include "base/command_line.h" #include "base/containers/contains.h" #include "base/json/values_util.h" #include "base/run_loop.h" #include "base/time/time.h" #include "build/chromeos_buildflags.h" -#include "chrome/browser/apps/app_service/metrics/website_metrics_browser_test_base.h" +#include "chrome/browser/apps/app_service/metrics/website_metrics.h" +#include "chrome/browser/apps/app_service/metrics/website_metrics_browser_test_mixin.h" +#include "chrome/browser/profiles/profile.h" +#include "chrome/browser/profiles/profile_manager.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_commands.h" #include "chrome/browser/ui/browser_finder.h" @@ -21,10 +25,13 @@ #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_install_info.h" +#include "chrome/common/chrome_switches.h" +#include "chrome/test/base/mixin_based_in_process_browser_test.h" #include "chrome/test/base/ui_test_utils.h" #include "components/history/core/browser/history_types.h" #include "components/ukm/test_ukm_recorder.h" #include "content/public/browser/page_navigator.h" +#include "content/public/browser/web_contents.h" #include "content/public/test/browser_test.h" #include "content/public/test/test_utils.h" #include "testing/gmock/include/gmock/gmock.h" @@ -108,11 +115,10 @@ MOCK_METHOD(void, OnWebsiteMetricsDestroyed, (), (override)); }; -class WebsiteMetricsBrowserTest : public WebsiteMetricsBrowserTestBase { +class WebsiteMetricsBrowserTest : public MixinBasedInProcessBrowserTest { protected: void SetUpOnMainThread() override { - WebsiteMetricsBrowserTestBase::SetUpOnMainThread(); - + MixinBasedInProcessBrowserTest::SetUpOnMainThread(); test_ukm_recorder_ = std::make_unique<ukm::TestAutoSetUkmRecorder>(); embedded_test_server()->ServeFilesFromSourceDirectory( @@ -120,6 +126,14 @@ ASSERT_TRUE(embedded_test_server()->Start()); } + void SetUpCommandLine(base::CommandLine* command_line) override { + command_line->AppendSwitch(::switches::kNoStartupWindow); + } + + Browser* CreateBrowser() { + return website_metrics_browser_test_mixin_.CreateBrowser(); + } + Browser* CreateAppBrowser(const std::string& app_id) { auto params = Browser::CreateParams::CreateForApp( "_crx_" + app_id, true /* trusted_source */, @@ -130,6 +144,22 @@ return browser; } + ::content::WebContents* InsertForegroundTab(Browser* browser, + const std::string& url) { + return website_metrics_browser_test_mixin_.InsertForegroundTab(browser, + url); + } + + ::content::WebContents* InsertBackgroundTab(Browser* browser, + const std::string& url) { + return website_metrics_browser_test_mixin_.InsertBackgroundTab(browser, + url); + } + + void NavigateActiveTab(Browser* browser, const std::string& url) { + return website_metrics_browser_test_mixin_.NavigateActiveTab(browser, url); + } + web_app::AppId InstallWebApp( const std::string& start_url, web_app::mojom::UserDisplayMode user_display_mode) { @@ -226,7 +256,15 @@ return test_ukm_recorder_.get(); } + Profile* profile() { return ProfileManager::GetPrimaryUserProfile(); } + + WebsiteMetrics* website_metrics() { + return website_metrics_browser_test_mixin_.website_metrics(); + } + protected: + WebsiteMetricsBrowserTestMixin website_metrics_browser_test_mixin_{ + &mixin_host_}; std::unique_ptr<ukm::TestAutoSetUkmRecorder> test_ukm_recorder_; }; @@ -387,8 +425,8 @@ auto website_metrics_ptr = std::make_unique<apps::TestWebsiteMetrics>(profile()); auto* const metrics = website_metrics_ptr.get(); - metrics_service()->SetWebsiteMetricsForTesting( - std::move(website_metrics_ptr)); + website_metrics_browser_test_mixin_.metrics_service() + ->SetWebsiteMetricsForTesting(std::move(website_metrics_ptr)); Browser* browser = CreateBrowser(); auto* window = browser->window()->GetNativeWindow(); @@ -447,8 +485,8 @@ auto website_metrics_ptr = std::make_unique<apps::TestWebsiteMetrics>(profile()); auto* const metrics = website_metrics_ptr.get(); - metrics_service()->SetWebsiteMetricsForTesting( - std::move(website_metrics_ptr)); + website_metrics_browser_test_mixin_.metrics_service() + ->SetWebsiteMetricsForTesting(std::move(website_metrics_ptr)); Browser* browser = CreateBrowser(); auto* window = browser->window()->GetNativeWindow(); @@ -521,8 +559,8 @@ auto website_metrics_ptr = std::make_unique<apps::TestWebsiteMetrics>(profile()); auto* const metrics = website_metrics_ptr.get(); - metrics_service()->SetWebsiteMetricsForTesting( - std::move(website_metrics_ptr)); + website_metrics_browser_test_mixin_.metrics_service() + ->SetWebsiteMetricsForTesting(std::move(website_metrics_ptr)); Browser* browser = CreateBrowser(); auto* window = browser->window()->GetNativeWindow(); @@ -712,8 +750,8 @@ auto website_metrics_ptr = std::make_unique<apps::TestWebsiteMetrics>(profile()); auto* const metrics = website_metrics_ptr.get(); - metrics_service()->SetWebsiteMetricsForTesting( - std::move(website_metrics_ptr)); + website_metrics_browser_test_mixin_.metrics_service() + ->SetWebsiteMetricsForTesting(std::move(website_metrics_ptr)); // Create a browser with two tabs. auto* browser1 = CreateBrowser();
diff --git a/chrome/browser/ash/accessibility/spoken_feedback_browsertest.cc b/chrome/browser/ash/accessibility/spoken_feedback_browsertest.cc index 54d75f59..0ff43a61 100644 --- a/chrome/browser/ash/accessibility/spoken_feedback_browsertest.cc +++ b/chrome/browser/ash/accessibility/spoken_feedback_browsertest.cc
@@ -194,14 +194,16 @@ // (http://crbug.com/396507). Work around this by just telling // ChromeVox to not ever play earcons (prerecorded sound effects). extensions::browsertest_util::ExecuteScriptInBackgroundPageNoWait( - browser()->profile(), extension_misc::kChromeVoxExtensionId, + AccessibilityManager::Get()->profile(), + extension_misc::kChromeVoxExtensionId, "ChromeVox.earcons.playEarcon = function() {};"); } void LoggedInSpokenFeedbackTest::ImportJSModuleForChromeVox(std::string name, std::string path) { extensions::browsertest_util::ExecuteScriptInBackgroundPageDeprecated( - browser()->profile(), extension_misc::kChromeVoxExtensionId, + AccessibilityManager::Get()->profile(), + extension_misc::kChromeVoxExtensionId, "import('" + path + "').then(mod => {" "globalThis." +
diff --git a/chrome/browser/ash/arc/DEPS b/chrome/browser/ash/arc/DEPS index a97130d..b4d6d13f 100644 --- a/chrome/browser/ash/arc/DEPS +++ b/chrome/browser/ash/arc/DEPS
@@ -5,5 +5,5 @@ "+services/tracing/public", # Unsafe to use from //chrome. See //chrome/browser/DEPS. - "-ash/components/arc/test/test_browser_context.h", + "-components/user_prefs/test/test_browser_context_with_prefs.h", ]
diff --git a/chrome/browser/ash/crosapi/embedded_accessibility_helper_client_ash.cc b/chrome/browser/ash/crosapi/embedded_accessibility_helper_client_ash.cc index ef6c5208..240d2bc 100644 --- a/chrome/browser/ash/crosapi/embedded_accessibility_helper_client_ash.cc +++ b/chrome/browser/ash/crosapi/embedded_accessibility_helper_client_ash.cc
@@ -4,6 +4,8 @@ #include "chrome/browser/ash/crosapi/embedded_accessibility_helper_client_ash.h" +#include <string> + #include "chrome/browser/ash/accessibility/accessibility_manager.h" #include "chromeos/crosapi/mojom/embedded_accessibility_helper.mojom.h" @@ -14,10 +16,30 @@ EmbeddedAccessibilityHelperClientAsh::~EmbeddedAccessibilityHelperClientAsh() = default; +void EmbeddedAccessibilityHelperClientAsh:: + BindEmbeddedAccessibilityHelperClient( + mojo::PendingReceiver<crosapi::mojom::EmbeddedAccessibilityHelperClient> + embeded_ax_helper_client) { + embedded_ax_helper_receivers_.Add(this, std::move(embeded_ax_helper_client)); +} + +void EmbeddedAccessibilityHelperClientAsh::BindEmbeddedAccessibilityHelper( + mojo::PendingRemote<crosapi::mojom::EmbeddedAccessibilityHelper> + embedded_ax_helper) { + embedded_ax_helper_remotes_.Add(std::move(embedded_ax_helper)); +} + void EmbeddedAccessibilityHelperClientAsh::SpeakSelectedText() { ash::AccessibilityManager::Get()->OnSelectToSpeakContextMenuClick(); } +void EmbeddedAccessibilityHelperClientAsh::ClipboardCopyInActiveGoogleDoc( + const std::string& url) { + for (auto& remote : embedded_ax_helper_remotes_) { + remote->ClipboardCopyInActiveGoogleDoc(url); + } +} + void EmbeddedAccessibilityHelperClientAsh:: BindEmbeddedAccessibilityHelperClientFactoryReceiver( mojo::PendingReceiver< @@ -26,11 +48,5 @@ embedded_ax_helper_factory_receivers_.Add(this, std::move(receiver)); } -void EmbeddedAccessibilityHelperClientAsh:: - BindEmbeddedAccessibilityHelperClient( - mojo::PendingReceiver<crosapi::mojom::EmbeddedAccessibilityHelperClient> - embeded_ax_helper_client) { - embedded_ax_helper_receivers_.Add(this, std::move(embeded_ax_helper_client)); -} } // namespace crosapi
diff --git a/chrome/browser/ash/crosapi/embedded_accessibility_helper_client_ash.h b/chrome/browser/ash/crosapi/embedded_accessibility_helper_client_ash.h index ac582a5..d3112227 100644 --- a/chrome/browser/ash/crosapi/embedded_accessibility_helper_client_ash.h +++ b/chrome/browser/ash/crosapi/embedded_accessibility_helper_client_ash.h
@@ -7,6 +7,7 @@ #include "chromeos/crosapi/mojom/embedded_accessibility_helper.mojom.h" #include "mojo/public/cpp/bindings/receiver_set.h" +#include "mojo/public/cpp/bindings/remote_set.h" namespace crosapi { @@ -25,15 +26,22 @@ void BindEmbeddedAccessibilityHelperClient( mojo::PendingReceiver<crosapi::mojom::EmbeddedAccessibilityHelperClient> embeded_ax_helper_client) override; + void BindEmbeddedAccessibilityHelper( + mojo::PendingRemote<crosapi::mojom::EmbeddedAccessibilityHelper> + embedded_ax_helper) override; // crosapi::mojom::EmbeddedAccessibilityHelperClient: void SpeakSelectedText() override; + void ClipboardCopyInActiveGoogleDoc(const std::string& url); + void BindEmbeddedAccessibilityHelperClientFactoryReceiver( mojo::PendingReceiver< crosapi::mojom::EmbeddedAccessibilityHelperClientFactory> receiver); private: + mojo::RemoteSet<crosapi::mojom::EmbeddedAccessibilityHelper> + embedded_ax_helper_remotes_; mojo::ReceiverSet<crosapi::mojom::EmbeddedAccessibilityHelperClientFactory> embedded_ax_helper_factory_receivers_; mojo::ReceiverSet<crosapi::mojom::EmbeddedAccessibilityHelperClient>
diff --git a/chrome/browser/ash/extensions/url_constants.h b/chrome/browser/ash/extensions/url_constants.h index 9a9492d..efd3cf96 100644 --- a/chrome/browser/ash/extensions/url_constants.h +++ b/chrome/browser/ash/extensions/url_constants.h
@@ -8,7 +8,7 @@ namespace extensions { // IME extension's Japanese options page. -constexpr char kIMEJPOptionsURL[] = +inline constexpr char kIMEJPOptionsURL[] = "chrome-extension://jkghodnilhceideoidjikpgommlajknk/" "mozc_option.html";
diff --git a/chrome/browser/ash/login/screens/pin_setup_screen_browsertest.cc b/chrome/browser/ash/login/screens/pin_setup_screen_browsertest.cc index 07db231..69674765 100644 --- a/chrome/browser/ash/login/screens/pin_setup_screen_browsertest.cc +++ b/chrome/browser/ash/login/screens/pin_setup_screen_browsertest.cc
@@ -88,7 +88,9 @@ UserContext* context = LoginDisplayHost::default_host() ->GetWizardContext() ->extra_factors_auth_session.get(); - CHECK(context); + // LoginManagerMixin uses StubAuthenticator that fills out authsession. + // Reset Authsession to correctly interact with FakeUserDataAuthClient. + context->ResetAuthSessionIds(); cryptohome_.MarkUserAsExisting(context->GetAccountId()); auto session_ids = cryptohome_.AddSession(context->GetAccountId(), /*authenticated=*/true);
diff --git a/chrome/browser/ash/policy/reporting/metrics_reporting/fatal_crash/fatal_crash_events_observer.cc b/chrome/browser/ash/policy/reporting/metrics_reporting/fatal_crash/fatal_crash_events_observer.cc index 8041e2f..e97be898 100644 --- a/chrome/browser/ash/policy/reporting/metrics_reporting/fatal_crash/fatal_crash_events_observer.cc +++ b/chrome/browser/ash/policy/reporting/metrics_reporting/fatal_crash/fatal_crash_events_observer.cc
@@ -95,10 +95,16 @@ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); } +// static std::unique_ptr<FatalCrashEventsObserver> FatalCrashEventsObserver::Create() { return base::WrapUnique(new FatalCrashEventsObserver()); } +// static +int64_t FatalCrashEventsObserver::ConvertTimeToMicroseconds(base::Time t) { + return t.ToJavaTime() * base::Time::kMicrosecondsPerMillisecond; +} + void FatalCrashEventsObserver::SetSkippedCrashCallback( base::RepeatingCallback<void(LocalIdEntry)> callback) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); @@ -116,18 +122,18 @@ // Unuploaded crash. Need to look up whether the crash has been reported or // not. if (crash_event_info->upload_info.is_null()) { - if (!reported_local_id_manager_->UpdateLocalId( - crash_event_info->local_id, - crash_event_info->capture_time.ToJavaTime())) { + if (auto capture_timestamp_us = + ConvertTimeToMicroseconds(crash_event_info->capture_time); + !reported_local_id_manager_->UpdateLocalId(crash_event_info->local_id, + capture_timestamp_us)) { // Crash is already reported. Skip. skipped_callback_.Run({.local_id = std::move(crash_event_info->local_id), - .capture_timestamp_us = - crash_event_info->capture_time.ToJavaTime()}); + .capture_timestamp_us = capture_timestamp_us}); return; } } - // TODO(b/266018440): If the crash is found to be uploaded, need to remove it - // from reported local IDs. + // TODO(b/266018440): If the crash is found to have been uploaded, need to + // remove it from reported local IDs. MetricData metric_data = FillFatalCrashTelemetry(crash_event_info); OnEventObserved(std::move(metric_data)); @@ -171,7 +177,7 @@ } *data.mutable_local_id() = info->local_id; - data.set_timestamp_us(info->capture_time.ToJavaTime()); + data.set_timestamp_us(ConvertTimeToMicroseconds(info->capture_time)); if (!info->upload_info.is_null()) { *data.mutable_crash_report_id() = info->upload_info->crash_report_id; } @@ -192,6 +198,7 @@ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); } +// static std::unique_ptr<FatalCrashEventsObserver::ReportedLocalIdManager> FatalCrashEventsObserver::ReportedLocalIdManager::Create( base::FilePath save_file_path) {
diff --git a/chrome/browser/ash/policy/reporting/metrics_reporting/fatal_crash/fatal_crash_events_observer.h b/chrome/browser/ash/policy/reporting/metrics_reporting/fatal_crash/fatal_crash_events_observer.h index be947ba8..37c8820 100644 --- a/chrome/browser/ash/policy/reporting/metrics_reporting/fatal_crash/fatal_crash_events_observer.h +++ b/chrome/browser/ash/policy/reporting/metrics_reporting/fatal_crash/fatal_crash_events_observer.h
@@ -15,6 +15,7 @@ #include "base/functional/callback.h" #include "base/functional/callback_helpers.h" #include "base/sequence_checker.h" +#include "base/time/time.h" #include "chrome/browser/ash/policy/reporting/metrics_reporting/mojo_service_events_observer_base.h" #include "chromeos/ash/services/cros_healthd/public/mojom/cros_healthd_events.mojom.h" @@ -42,6 +43,9 @@ ~FatalCrashEventsObserver() override; + // Convert a `base::Time` to a timestamp in microseconds. + static int64_t ConvertTimeToMicroseconds(base::Time t); + // Sets the callback that is called when a crash is skipped. void SetSkippedCrashCallback( base::RepeatingCallback<void(LocalIdEntry)> callback);
diff --git a/chrome/browser/ash/policy/reporting/metrics_reporting/fatal_crash/fatal_crash_events_observer_unittest.cc b/chrome/browser/ash/policy/reporting/metrics_reporting/fatal_crash/fatal_crash_events_observer_unittest.cc index 5fc9344a..942325e 100644 --- a/chrome/browser/ash/policy/reporting/metrics_reporting/fatal_crash/fatal_crash_events_observer_unittest.cc +++ b/chrome/browser/ash/policy/reporting/metrics_reporting/fatal_crash/fatal_crash_events_observer_unittest.cc
@@ -221,7 +221,8 @@ const auto fatal_crash_telemetry = WaitForFatalCrashTelemetry(std::move(crash_event_info)); ASSERT_TRUE(fatal_crash_telemetry.has_timestamp_us()); - EXPECT_EQ(fatal_crash_telemetry.timestamp_us(), kCaptureTime.ToJavaTime()); + EXPECT_EQ(fatal_crash_telemetry.timestamp_us(), + FatalCrashEventsObserver::ConvertTimeToMicroseconds(kCaptureTime)); } TEST_P(FatalCrashEventsObserverTest, FieldCrashReportIdPassedThrough) { @@ -389,7 +390,9 @@ ASSERT_TRUE(fatal_crash_telemetry.has_local_id()); ASSERT_EQ(fatal_crash_telemetry.local_id(), local_id); ASSERT_TRUE(fatal_crash_telemetry.has_timestamp_us()); - ASSERT_EQ(fatal_crash_telemetry.timestamp_us(), capture_time.ToJavaTime()); + ASSERT_EQ( + fatal_crash_telemetry.timestamp_us(), + FatalCrashEventsObserver::ConvertTimeToMicroseconds(capture_time)); } // Wait for the given fatal crash event being skipped. @@ -441,7 +444,8 @@ /*local_id=*/kLocalId, /*capture_time=*/kCaptureTime, *fatal_crash_events_observer); EXPECT_EQ(local_id_entry.local_id, kLocalId); - EXPECT_EQ(local_id_entry.capture_timestamp_us, kCaptureTime.ToJavaTime()); + EXPECT_EQ(local_id_entry.capture_timestamp_us, + FatalCrashEventsObserver::ConvertTimeToMicroseconds(kCaptureTime)); } TEST_P(FatalCrashEventsObserverReportedLocalIdsTest, @@ -466,7 +470,9 @@ /*local_id=*/kLocalId, /*capture_time=*/kCaptureTime, *fatal_crash_events_observer); EXPECT_EQ(local_id_entry.local_id, kLocalId); - EXPECT_EQ(local_id_entry.capture_timestamp_us, kCaptureTime.ToJavaTime()); + EXPECT_EQ( + local_id_entry.capture_timestamp_us, + FatalCrashEventsObserver::ConvertTimeToMicroseconds(kCaptureTime)); } } @@ -493,13 +499,15 @@ /*local_id=*/kLocalIdEarly, /*capture_time=*/kCaptureTimeEarly, *fatal_crash_events_observer); EXPECT_EQ(local_id_entry.local_id, kLocalIdEarly); - EXPECT_EQ(local_id_entry.capture_timestamp_us, - kCaptureTimeEarly.ToJavaTime()); + EXPECT_EQ( + local_id_entry.capture_timestamp_us, + FatalCrashEventsObserver::ConvertTimeToMicroseconds(kCaptureTimeEarly)); local_id_entry = WaitForSkippedFatalCrashEvent(/*local_id=*/kLocalId, /*capture_time=*/kCaptureTime, *fatal_crash_events_observer); EXPECT_EQ(local_id_entry.local_id, kLocalId); - EXPECT_EQ(local_id_entry.capture_timestamp_us, kCaptureTime.ToJavaTime()); + EXPECT_EQ(local_id_entry.capture_timestamp_us, + FatalCrashEventsObserver::ConvertTimeToMicroseconds(kCaptureTime)); // Crashes with later timestamps are reported. auto crash_event_info = NewCrashEventInfo(/*is_uploaded=*/false); @@ -511,8 +519,9 @@ ASSERT_TRUE(fatal_crash_telemetry.has_local_id()); EXPECT_EQ(fatal_crash_telemetry.local_id(), kLocalIdLate); ASSERT_TRUE(fatal_crash_telemetry.has_timestamp_us()); - EXPECT_EQ(fatal_crash_telemetry.timestamp_us(), - kCaptureTimeLate.ToJavaTime()); + EXPECT_EQ( + fatal_crash_telemetry.timestamp_us(), + FatalCrashEventsObserver::ConvertTimeToMicroseconds(kCaptureTimeLate)); } // TODO(b/266018440): After implementing the logic that controls whether an @@ -581,8 +590,9 @@ ASSERT_TRUE(fatal_crash_telemetry.has_local_id()); EXPECT_EQ(fatal_crash_telemetry.local_id(), ss.str()); ASSERT_TRUE(fatal_crash_telemetry.has_timestamp_us()); - EXPECT_EQ(fatal_crash_telemetry.timestamp_us(), - kCaptureTimeZero.ToJavaTime()); + EXPECT_EQ( + fatal_crash_telemetry.timestamp_us(), + FatalCrashEventsObserver::ConvertTimeToMicroseconds(kCaptureTimeZero)); } // The next crash event should still be skipped. Need this line for testing @@ -592,7 +602,9 @@ /*local_id=*/kLocalId, /*capture_time=*/kCaptureTimeZero, *fatal_crash_events_observer); EXPECT_EQ(local_id_entry.local_id, kLocalId); - EXPECT_EQ(local_id_entry.capture_timestamp_us, kCaptureTimeZero.ToJavaTime()); + EXPECT_EQ( + local_id_entry.capture_timestamp_us, + FatalCrashEventsObserver::ConvertTimeToMicroseconds(kCaptureTimeZero)); } TEST_F(FatalCrashEventsObserverReportedLocalIdsCorruptSaveFileTest,
diff --git a/chrome/browser/ash/scalable_iph/scalable_iph_browser_test_base.cc b/chrome/browser/ash/scalable_iph/scalable_iph_browser_test_base.cc index ab95bde..c134f97e 100644 --- a/chrome/browser/ash/scalable_iph/scalable_iph_browser_test_base.cc +++ b/chrome/browser/ash/scalable_iph/scalable_iph_browser_test_base.cc
@@ -96,6 +96,12 @@ return; } + // If ScalableIph feature is off, do not set up mock as ScalableIph is not + // available. + if (!enable_scalable_iph_) { + return; + } + SetUpMocks(); } @@ -168,13 +174,17 @@ AppendFakeUiParamsNotification(params); base::test::FeatureRefAndParams test_config(kScalableIphTest, params); - base::test::FeatureRefAndParams scalable_iph_feature( - ash::features::kScalableIph, {}); - - std::vector<base::test::FeatureRefAndParams> enabled_features( - {scalable_iph_feature, test_config}); + std::vector<base::test::FeatureRefAndParams> enabled_features({test_config}); std::vector<base::test::FeatureRef> disabled_features; + if (enable_scalable_iph_) { + enabled_features.push_back( + base::test::FeatureRefAndParams(ash::features::kScalableIph, {})); + } else { + disabled_features.push_back( + base::test::FeatureRef(ash::features::kScalableIph)); + } + if (enable_scalable_iph_debug_) { enabled_features.push_back( base::test::FeatureRefAndParams(ash::features::kScalableIphDebug, {}));
diff --git a/chrome/browser/ash/scalable_iph/scalable_iph_browser_test_base.h b/chrome/browser/ash/scalable_iph/scalable_iph_browser_test_base.h index 11a35ae..c5c1e6a 100644 --- a/chrome/browser/ash/scalable_iph/scalable_iph_browser_test_base.h +++ b/chrome/browser/ash/scalable_iph/scalable_iph_browser_test_base.h
@@ -104,6 +104,9 @@ // A sub-class might override this from `InitializeScopedFeatureList`. base::test::ScopedFeatureList scoped_feature_list_; + // Set false in the constructor to disable `ash::features::kScalableIph`. + bool enable_scalable_iph_ = true; + // Set false in the constructor to disable `ash::features::kScalableIphDebug`. bool enable_scalable_iph_debug_ = true;
diff --git a/chrome/browser/ash/scalable_iph/scalable_iph_browsertest.cc b/chrome/browser/ash/scalable_iph/scalable_iph_browsertest.cc index ff67087f..2c31beb 100644 --- a/chrome/browser/ash/scalable_iph/scalable_iph_browsertest.cc +++ b/chrome/browser/ash/scalable_iph/scalable_iph_browsertest.cc
@@ -164,6 +164,15 @@ ScalableIphBrowserTestDebugOff() { enable_scalable_iph_debug_ = false; } }; +class ScalableIphBrowserTestFeatureOffDebugOn : public ScalableIphBrowserTest { + public: + ScalableIphBrowserTestFeatureOffDebugOn() { + enable_scalable_iph_ = false; + CHECK(enable_scalable_iph_debug_) + << "Debug feature is on by default for ScalableIphBrowserTest"; + } +}; + class ScalableIphBrowserTestPreinstallApps : public ScalableIphBrowserTest { public: void SetUpDefaultCommandLine(base::CommandLine* command_line) override { @@ -793,6 +802,17 @@ EXPECT_FALSE(render_frame_host->GetLastResponseHeaders()); } +IN_PROC_BROWSER_TEST_F(ScalableIphBrowserTestFeatureOffDebugOn, + LogPageAvailable) { + content::RenderFrameHost* render_frame_host = ui_test_utils::NavigateToURL( + browser(), GURL(kScalableIphDebugLogTextUrl)); + ASSERT_TRUE(render_frame_host); + ASSERT_TRUE(render_frame_host->GetLastResponseHeaders()); + EXPECT_EQ(200, render_frame_host->GetLastResponseHeaders()->response_code()) + << "Debug log page is expected to be available even if ScalableIph " + "feature itself is off."; +} + IN_PROC_BROWSER_TEST_F(ScalableIphBrowserTestMultipleIphs, OneIphAtATime) { EnableTestIphFeatures({&TestIphFeature(), &kScalableIphTestTwo});
diff --git a/chrome/browser/ash/scanning/lorgnette_scanner_manager_unittest.cc b/chrome/browser/ash/scanning/lorgnette_scanner_manager_unittest.cc index 347ed18..46fd4aa 100644 --- a/chrome/browser/ash/scanning/lorgnette_scanner_manager_unittest.cc +++ b/chrome/browser/ash/scanning/lorgnette_scanner_manager_unittest.cc
@@ -16,6 +16,7 @@ #include "base/memory/raw_ptr.h" #include "base/run_loop.h" #include "base/test/bind.h" +#include "base/test/protobuf_matchers.h" #include "base/test/task_environment.h" #include "chrome/browser/ash/scanning/zeroconf_scanner_detector.h" #include "chrome/browser/ash/scanning/zeroconf_scanner_detector_utils.h" @@ -33,6 +34,7 @@ namespace { +using ::base::EqualsProto; using local_discovery::ServiceDescription; using ::testing::ElementsAreArray; @@ -49,15 +51,6 @@ // Model which contains the manufacturer. constexpr char kModelContainingManufacturer[] = "TEST Model X"; -// Matcher that verifies two protobufs contain the same data. -MATCHER_P(ProtobufEquals, expected_message, "") { - std::string arg_dumped; - arg.SerializeToString(&arg_dumped); - std::string expected_message_dumped; - expected_message.SerializeToString(&expected_message_dumped); - return arg_dumped == expected_message_dumped; -} - // Returns a ScannerInfo object with the given |name| and |model|, if provided. lorgnette::ScannerInfo CreateLorgnetteScanner( std::string name, @@ -644,7 +637,7 @@ OpenScanner(); WaitForResult(); ASSERT_TRUE(open_scanner_response()); - EXPECT_THAT(response, ProtobufEquals(open_scanner_response().value())); + EXPECT_THAT(response, EqualsProto(open_scanner_response().value())); } // Test closing a scanner. @@ -660,7 +653,7 @@ CloseScanner(); WaitForResult(); ASSERT_TRUE(close_scanner_response()); - EXPECT_THAT(response, ProtobufEquals(close_scanner_response().value())); + EXPECT_THAT(response, EqualsProto(close_scanner_response().value())); } // Test that scanning fails when GetScannerNames() has never been called.
diff --git a/chrome/browser/chrome_browser_interface_binders.cc b/chrome/browser/chrome_browser_interface_binders.cc index 9f62e9b..50e0249 100644 --- a/chrome/browser/chrome_browser_interface_binders.cc +++ b/chrome/browser/chrome_browser_interface_binders.cc
@@ -78,6 +78,7 @@ #include "components/no_state_prefetch/browser/no_state_prefetch_processor_impl.h" #include "components/payments/content/payment_credential_factory.h" #include "components/performance_manager/embedder/binders.h" +#include "components/performance_manager/public/features.h" #include "components/performance_manager/public/performance_manager.h" #include "components/prefs/pref_service.h" #include "components/reading_list/features/reading_list_switches.h" @@ -192,6 +193,7 @@ #include "chrome/browser/ui/webui/side_panel/customize_chrome/customize_chrome.mojom.h" #include "chrome/browser/ui/webui/side_panel/customize_chrome/customize_chrome_ui.h" #include "chrome/browser/ui/webui/side_panel/history_clusters/history_clusters_side_panel_ui.h" +#include "chrome/browser/ui/webui/side_panel/performance_controls/performance_side_panel_ui.h" #include "chrome/browser/ui/webui/side_panel/read_anything/read_anything_untrusted_ui.h" #include "chrome/browser/ui/webui/side_panel/reading_list/reading_list.mojom.h" #include "chrome/browser/ui/webui/side_panel/reading_list/reading_list_ui.h" @@ -1222,6 +1224,13 @@ shopping_list::mojom::ShoppingListHandlerFactory, BookmarksSidePanelUI, ShoppingInsightsSidePanelUI>(map); + if (base::FeatureList::IsEnabled( + performance_manager::features::kPerformanceControlsSidePanel)) { + RegisterWebUIControllerInterfaceBinder< + side_panel::mojom::PerformancePageHandlerFactory, + PerformanceSidePanelUI>(map); + } + if (customize_chrome::IsSidePanelEnabled()) { RegisterWebUIControllerInterfaceBinder< side_panel::mojom::CustomizeChromePageHandlerFactory,
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc index 35dbcb4..0c425f5 100644 --- a/chrome/browser/chrome_content_browser_client.cc +++ b/chrome/browser/chrome_content_browser_client.cc
@@ -119,6 +119,7 @@ #include "chrome/browser/preloading/preloading_prefs.h" #include "chrome/browser/preloading/prerender/prerender_web_contents_delegate.h" #include "chrome/browser/privacy_sandbox/privacy_sandbox_settings_factory.h" +#include "chrome/browser/privacy_sandbox/tracking_protection_settings_factory.h" #include "chrome/browser/private_network_access/chrome_private_network_device_delegate.h" #include "chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.h" #include "chrome/browser/profiles/profile.h" @@ -6859,6 +6860,32 @@ UMA_HISTOGRAM_BOOLEAN("Settings.Preloading.DeprecatedRedirect", false); } } + Profile* profile = Profile::FromBrowserContext(browser_context); + auto* tracking_protection_settings = + TrackingProtectionSettingsFactory::GetForProfile(profile); + if (tracking_protection_settings && + tracking_protection_settings->IsTrackingProtection3pcdEnabled()) { + // Redirect from cookies to trackingProtection in experiment. + if (url->SchemeIs(content::kChromeUIScheme) && + url->host() == chrome::kChromeUISettingsHost && + url->path() == chrome::kCookiesSubPagePath) { + GURL::Replacements replacements; + replacements.SetPathStr(chrome::kTrackingProtectionSubPagePath); + *url = url->ReplaceComponents(replacements); + UMA_HISTOGRAM_BOOLEAN("Settings.TrackingProtection.Redirect", true); + } else if (url->path() == chrome::kTrackingProtectionSubPagePath) { + UMA_HISTOGRAM_BOOLEAN("Settings.TrackingProtection.Redirect", false); + } + } else { + // Redirect from trackingProtection to cookies outside experiment. + if (url->SchemeIs(content::kChromeUIScheme) && + url->host() == chrome::kChromeUISettingsHost && + url->path() == chrome::kTrackingProtectionSubPagePath) { + GURL::Replacements replacements; + replacements.SetPathStr(chrome::kCookiesSubPagePath); + *url = url->ReplaceComponents(replacements); + } + } #endif #if BUILDFLAG(IS_WIN)
diff --git a/chrome/browser/chromeos/extensions/telemetry/api/events/event_router.h b/chrome/browser/chromeos/extensions/telemetry/api/events/event_router.h index 46e7368..32fb4db 100644 --- a/chrome/browser/chromeos/extensions/telemetry/api/events/event_router.h +++ b/chrome/browser/chromeos/extensions/telemetry/api/events/event_router.h
@@ -20,7 +20,7 @@ namespace { -constexpr auto kCategoriesWithFocusRestriction = +inline constexpr auto kCategoriesWithFocusRestriction = base::MakeFixedFlatSet<crosapi::mojom::TelemetryEventCategoryEnum>({ crosapi::mojom::TelemetryEventCategoryEnum::kTouchpadButton, crosapi::mojom::TelemetryEventCategoryEnum::kTouchpadTouch,
diff --git a/chrome/browser/commerce/android/BUILD.gn b/chrome/browser/commerce/android/BUILD.gn index 8ef7493f..ba4472f 100644 --- a/chrome/browser/commerce/android/BUILD.gn +++ b/chrome/browser/commerce/android/BUILD.gn
@@ -37,6 +37,7 @@ "//components/user_prefs/android:java", "//content/public/android:content_java", "//third_party/androidx:androidx_annotation_annotation_java", + "//third_party/androidx:androidx_fragment_fragment_java", "//third_party/androidx:androidx_preference_preference_java", "//ui/android:ui_java", ]
diff --git a/chrome/browser/component_updater/tpcd_metadata_component_installer.cc b/chrome/browser/component_updater/tpcd_metadata_component_installer.cc index 50a8a8a..f745d6a 100644 --- a/chrome/browser/component_updater/tpcd_metadata_component_installer.cc +++ b/chrome/browser/component_updater/tpcd_metadata_component_installer.cc
@@ -154,7 +154,6 @@ VLOG(1) << "Third Party Cookie Deprecation Metadata component."; auto installer = base::MakeRefCounted<ComponentInstaller>( - // TODO(http://b/290039145): Integrate the component with CookieSettings. std::make_unique<TpcdMetadataComponentInstaller>( base::BindRepeating([](std::string raw_metadata) { tpcd::metadata::Parser::GetInstance()->ParseMetadata(raw_metadata);
diff --git a/chrome/browser/devtools/devtools_ui_bindings.cc b/chrome/browser/devtools/devtools_ui_bindings.cc index 370be788..3f915f86 100644 --- a/chrome/browser/devtools/devtools_ui_bindings.cc +++ b/chrome/browser/devtools/devtools_ui_bindings.cc
@@ -42,11 +42,9 @@ #include "chrome/browser/signin/identity_manager_factory.h" #include "chrome/browser/sync/sync_service_factory.h" #include "chrome/browser/ui/browser.h" -#include "chrome/browser/ui/browser_list.h" -#include "chrome/browser/ui/browser_window.h" +#include "chrome/browser/ui/browser_finder.h" #include "chrome/browser/ui/hats/hats_service.h" #include "chrome/browser/ui/hats/hats_service_factory.h" -#include "chrome/browser/ui/tabs/tab_strip_model.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/extensions/chrome_manifest_url_handlers.h" #include "chrome/common/pref_names.h" @@ -92,6 +90,7 @@ #include "net/http/http_response_headers.h" #include "net/traffic_annotation/network_traffic_annotation.h" #include "services/network/public/cpp/resource_request.h" +#include "services/network/public/cpp/simple_url_loader.h" #include "services/network/public/cpp/simple_url_loader_stream_consumer.h" #include "services/network/public/cpp/wrapper_shared_url_loader_factory.h" #include "services/network/public/mojom/url_response_head.mojom.h" @@ -108,21 +107,21 @@ namespace { -static const char kFrontendHostId[] = "id"; -static const char kFrontendHostMethod[] = "method"; -static const char kFrontendHostParams[] = "params"; -static const char kTitleFormat[] = "DevTools - %s"; +const char kFrontendHostId[] = "id"; +const char kFrontendHostMethod[] = "method"; +const char kFrontendHostParams[] = "params"; +const char kTitleFormat[] = "DevTools - %s"; -static const char kRemotePageActionInspect[] = "inspect"; -static const char kRemotePageActionReload[] = "reload"; -static const char kRemotePageActionActivate[] = "activate"; -static const char kRemotePageActionClose[] = "close"; +const char kRemotePageActionInspect[] = "inspect"; +const char kRemotePageActionReload[] = "reload"; +const char kRemotePageActionActivate[] = "activate"; +const char kRemotePageActionClose[] = "close"; -static const char kConfigDiscoverUsbDevices[] = "discoverUsbDevices"; -static const char kConfigPortForwardingEnabled[] = "portForwardingEnabled"; -static const char kConfigPortForwardingConfig[] = "portForwardingConfig"; -static const char kConfigNetworkDiscoveryEnabled[] = "networkDiscoveryEnabled"; -static const char kConfigNetworkDiscoveryConfig[] = "networkDiscoveryConfig"; +const char kConfigDiscoverUsbDevices[] = "discoverUsbDevices"; +const char kConfigPortForwardingEnabled[] = "portForwardingEnabled"; +const char kConfigPortForwardingConfig[] = "portForwardingConfig"; +const char kConfigNetworkDiscoveryEnabled[] = "networkDiscoveryEnabled"; +const char kConfigNetworkDiscoveryConfig[] = "networkDiscoveryConfig"; // This constant should be in sync with // the constant @@ -142,16 +141,6 @@ return file_system_value; } -Browser* FindBrowser(content::WebContents* web_contents) { - for (auto* browser : *BrowserList::GetInstance()) { - int tab_index = browser->tab_strip_model()->GetIndexOfWebContents( - web_contents); - if (tab_index != TabStripModel::kNoTab) - return browser; - } - return nullptr; -} - // DevToolsUIDefaultDelegate -------------------------------------------------- class DefaultBindingsDelegate : public DevToolsUIBindings::Delegate { @@ -198,7 +187,7 @@ content::OpenURLParams params(GURL(url), content::Referrer(), WindowOpenDisposition::NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_LINK, false); - Browser* browser = FindBrowser(web_contents_); + Browser* browser = chrome::FindBrowserWithWebContents(web_contents_); browser->OpenURL(params); }
diff --git a/chrome/browser/devtools/devtools_ui_bindings.h b/chrome/browser/devtools/devtools_ui_bindings.h index cd43d85..c1a2e19 100644 --- a/chrome/browser/devtools/devtools_ui_bindings.h +++ b/chrome/browser/devtools/devtools_ui_bindings.h
@@ -13,9 +13,6 @@ #include "base/containers/unique_ptr_adapters.h" #include "base/memory/weak_ptr.h" #include "base/values.h" -#if defined(AIDA_SCOPE) -#include "chrome/browser/devtools/aida_client.h" -#endif #include "chrome/browser/devtools/device/devtools_android_bridge.h" #include "chrome/browser/devtools/devtools_embedder_message_dispatcher.h" #include "chrome/browser/devtools/devtools_file_helper.h" @@ -24,18 +21,17 @@ #include "chrome/browser/devtools/devtools_settings.h" #include "chrome/browser/devtools/devtools_targets_ui.h" #include "components/prefs/pref_change_registrar.h" -#include "components/signin/public/identity_manager/access_token_fetcher.h" -#include "components/signin/public/identity_manager/access_token_info.h" #include "content/public/browser/devtools_agent_host.h" #include "content/public/browser/devtools_frontend_host.h" -#include "google_apis/gaia/google_service_auth_error.h" -#include "services/network/public/cpp/resource_request.h" -#include "services/network/public/cpp/simple_url_loader.h" #include "ui/gfx/geometry/size.h" +#if defined(AIDA_SCOPE) +#include "chrome/browser/devtools/aida_client.h" +#endif + class DevToolsAndroidBridge; -class Profile; class PortForwardingStatusSerializer; +class Profile; namespace content { class NavigationHandle;
diff --git a/chrome/browser/download/bubble/download_display_controller.cc b/chrome/browser/download/bubble/download_display_controller.cc index c4b5b18a..b74271a9 100644 --- a/chrome/browser/download/bubble/download_display_controller.cc +++ b/chrome/browser/download/bubble/download_display_controller.cc
@@ -30,10 +30,6 @@ #include "components/offline_items_collection/core/offline_item.h" #include "components/offline_items_collection/core/offline_item_state.h" -#if BUILDFLAG(IS_MAC) -#include "chrome/browser/ui/fullscreen_util_mac.h" -#endif - namespace { using DownloadIconActive = DownloadDisplay::IconActive; @@ -122,18 +118,6 @@ BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser(browser_); will_show_details = browser_view && browser_view->IsImmersiveModeEnabled(); } - - // At this point, we are possibly in fullscreen. If we're in immersive - // fullscreen on macOS, it's OK to show the details bubble because the - // toolbar is either visible or it can be made visible. However, if we're - // in content/HTML fullscreen, the toolbar is not visible and we should not - // show the bubble. So, check our fullscreen state here and avoid showing - // the bubble if we're in content fullscreen. -#if BUILDFLAG(IS_MAC) - will_show_details = - will_show_details && !fullscreen_utils::IsInContentFullscreen(browser_); -#endif - if (will_show_details) { display_->ShowDetails(); }
diff --git a/chrome/browser/extensions/api/identity/identity_get_auth_token_function.h b/chrome/browser/extensions/api/identity/identity_get_auth_token_function.h index ab747c3..4b02aa4 100644 --- a/chrome/browser/extensions/api/identity/identity_get_auth_token_function.h +++ b/chrome/browser/extensions/api/identity/identity_get_auth_token_function.h
@@ -43,7 +43,8 @@ class IdentityGetAuthTokenError; // Exposed for testing -constexpr base::TimeDelta kGetAuthTokenInactivityTime = base::Minutes(10); +inline constexpr base::TimeDelta kGetAuthTokenInactivityTime = + base::Minutes(10); // identity.getAuthToken fetches an OAuth 2 function for the // caller. The request has three sub-flows: non-interactive,
diff --git a/chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl_unittest.cc b/chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl_unittest.cc index 60dc789..b047738 100644 --- a/chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl_unittest.cc +++ b/chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl_unittest.cc
@@ -91,8 +91,6 @@ using MockReauthCallback = base::MockCallback< password_manager::PasswordAccessAuthenticator::ReauthCallback>; -using extensions::api::passwords_private::FamilyFetchResults; -using extensions::api::passwords_private::RecipientInfo; using password_manager::PasswordForm; using password_manager::PasswordRecipient; using password_manager::ReauthPurpose; @@ -109,8 +107,16 @@ using ::testing::Return; using ::testing::SizeIs; using ::testing::StrictMock; + namespace extensions { +using api::passwords_private::FamilyFetchResults; +using api::passwords_private::ImportResults; +using api::passwords_private::PasswordUiEntry; +using api::passwords_private::PublicKey; +using api::passwords_private::RecipientInfo; +using api::passwords_private::UrlCollection; + namespace { constexpr char kHistogramName[] = "PasswordManager.AccessPasswordInSettings"; @@ -430,12 +436,13 @@ void PasswordsPrivateDelegateImplTest::SetUpPasswordStores( std::vector<PasswordForm> forms) { for (const PasswordForm& form : forms) { - if (form.IsUsingAccountStore()) + if (form.IsUsingAccountStore()) { account_store_->AddLogin(form); - else if (form.IsUsingProfileStore()) + } else if (form.IsUsingProfileStore()) { profile_store_->AddLogin(form); - else + } else { NOTREACHED() << "Store not set"; + } } // Spin the loop to allow PasswordStore tasks being processed. base::RunLoop().RunUntilIdle(); @@ -567,7 +574,7 @@ base::RunLoop().RunUntilIdle(); // Check that adding passwords got reflected in the passwords list. - api::passwords_private::PasswordUiEntry expected_entry1; + PasswordUiEntry expected_entry1; expected_entry1.affiliated_domains.emplace_back(); expected_entry1.affiliated_domains.back().signon_realm = "https://example1.com/"; @@ -575,7 +582,7 @@ expected_entry1.note.emplace(); expected_entry1.stored_in = api::passwords_private::PASSWORD_STORE_SET_ACCOUNT; - api::passwords_private::PasswordUiEntry expected_entry2; + PasswordUiEntry expected_entry2; expected_entry2.affiliated_domains.emplace_back(); expected_entry2.affiliated_domains.back().signon_realm = "http://example2.com/"; @@ -639,9 +646,8 @@ EXPECT_CALL(*(client->GetPasswordFeatureManager()), SetDefaultPasswordStore) .Times(0); EXPECT_CALL(*mock_porter_ptr, Import).Times(1); - delegate->ImportPasswords( - api::passwords_private::PasswordStoreSet::PASSWORD_STORE_SET_DEVICE, - base::DoNothing(), web_contents.get()); + delegate->ImportPasswords(api::passwords_private::PASSWORD_STORE_SET_DEVICE, + base::DoNothing(), web_contents.get()); } TEST_F(PasswordsPrivateDelegateImplTest, ImportPasswordsUpdatesDefaultStore) { @@ -661,9 +667,8 @@ EXPECT_CALL(*(client->GetPasswordFeatureManager()), SetDefaultPasswordStore(PasswordForm::Store::kAccountStore)); EXPECT_CALL(*mock_porter_ptr, Import).Times(1); - delegate->ImportPasswords( - api::passwords_private::PasswordStoreSet::PASSWORD_STORE_SET_ACCOUNT, - base::DoNothing(), web_contents.get()); + delegate->ImportPasswords(api::passwords_private::PASSWORD_STORE_SET_ACCOUNT, + base::DoNothing(), web_contents.get()); } TEST_F(PasswordsPrivateDelegateImplTest, @@ -685,14 +690,13 @@ fake_porter_ptr->set_import_result_status(kExpectedStatus); base::MockCallback<PasswordsPrivateDelegate::ImportResultsCallback> callback; - EXPECT_CALL(callback, Run(::testing::Field( - &api::passwords_private::ImportResults::status, - api::passwords_private::ImportResultsStatus:: - IMPORT_RESULTS_STATUS_BAD_FORMAT))) + EXPECT_CALL(callback, + Run(::testing::Field( + &ImportResults::status, + api::passwords_private::IMPORT_RESULTS_STATUS_BAD_FORMAT))) .Times(1); - delegate->ImportPasswords( - api::passwords_private::PasswordStoreSet::PASSWORD_STORE_SET_ACCOUNT, - callback.Get(), web_contents.get()); + delegate->ImportPasswords(api::passwords_private::PASSWORD_STORE_SET_ACCOUNT, + callback.Get(), web_contents.get()); task_environment()->RunUntilIdle(); histogram_tester().ExpectUniqueSample("PasswordManager.ImportResultsStatus2", @@ -726,11 +730,10 @@ base::MockCallback<PasswordsPrivateDelegate::ImportResultsCallback> import_callback; - EXPECT_CALL( - import_callback, - Run(::testing::Field(&api::passwords_private::ImportResults::status, - api::passwords_private::ImportResultsStatus:: - IMPORT_RESULTS_STATUS_DISMISSED))) + EXPECT_CALL(import_callback, + Run(::testing::Field( + &ImportResults::status, + api::passwords_private::IMPORT_RESULTS_STATUS_DISMISSED))) .Times(1); delegate->ContinueImport(/*selected_ids=*/{1}, import_callback.Get(), @@ -760,10 +763,10 @@ fake_porter_ptr->set_import_result_status(kExpectedStatus); base::MockCallback<PasswordsPrivateDelegate::ImportResultsCallback> callback; - EXPECT_CALL(callback, Run(::testing::Field( - &api::passwords_private::ImportResults::status, - api::passwords_private::ImportResultsStatus:: - IMPORT_RESULTS_STATUS_BAD_FORMAT))) + EXPECT_CALL(callback, + Run(::testing::Field( + &ImportResults::status, + api::passwords_private::IMPORT_RESULTS_STATUS_BAD_FORMAT))) .Times(1); delegate->ContinueImport(/*selected_ids=*/{}, callback.Get(), web_contents.get()); @@ -792,8 +795,7 @@ // |delegate| to be completed. base::RunLoop().RunUntilIdle(); - api::passwords_private::PasswordUiEntry updated_credential = - GetCredentials(*delegate).at(0).Clone(); + PasswordUiEntry updated_credential = GetCredentials(*delegate).at(0).Clone(); updated_credential.password = "new_pass"; updated_credential.username = "new_user"; @@ -808,8 +810,7 @@ const PasswordsPrivateDelegate::UiEntries& credentials = GetCredentials(*delegate); EXPECT_EQ(credentials.size(), 1u); - const api::passwords_private::PasswordUiEntry& refreshed_credential = - credentials.at(0); + const PasswordUiEntry& refreshed_credential = credentials.at(0); EXPECT_EQ(refreshed_credential.username, "new_user"); EXPECT_EQ(refreshed_credential.note, absl::nullopt); } @@ -826,8 +827,7 @@ // |delegate| to be completed. base::RunLoop().RunUntilIdle(); - api::passwords_private::PasswordUiEntry updated_credential = - GetCredentials(*delegate).at(0).Clone(); + PasswordUiEntry updated_credential = GetCredentials(*delegate).at(0).Clone(); updated_credential.password = "new_pass"; updated_credential.username = "new_user"; @@ -840,12 +840,10 @@ const PasswordsPrivateDelegate::UiEntries& credentials = GetCredentials(*delegate); EXPECT_EQ(credentials.size(), 1u); - const api::passwords_private::PasswordUiEntry& refreshed_credential = - credentials.at(0); + const PasswordUiEntry& refreshed_credential = credentials.at(0); EXPECT_EQ(refreshed_credential.username, "new_user"); EXPECT_EQ(refreshed_credential.stored_in, - api::passwords_private::PasswordStoreSet:: - PASSWORD_STORE_SET_DEVICE_AND_ACCOUNT); + api::passwords_private::PASSWORD_STORE_SET_DEVICE_AND_ACCOUNT); } TEST_F(PasswordsPrivateDelegateImplTest, @@ -867,11 +865,10 @@ EXPECT_EQ(credentials.size(), 2u); const auto account_credential_it = base::ranges::find( credentials, api::passwords_private::PASSWORD_STORE_SET_ACCOUNT, - &api::passwords_private::PasswordUiEntry::stored_in); + &PasswordUiEntry::stored_in); ASSERT_NE(account_credential_it, credentials.end()); - api::passwords_private::PasswordUiEntry updated_credential = - account_credential_it->Clone(); + PasswordUiEntry updated_credential = account_credential_it->Clone(); updated_credential.password = "new_pass"; updated_credential.username = "new_user"; @@ -886,7 +883,7 @@ EXPECT_EQ(updated_credentials.size(), 2u); const auto refreshed_credential_it = base::ranges::find( updated_credentials, api::passwords_private::PASSWORD_STORE_SET_ACCOUNT, - &api::passwords_private::PasswordUiEntry::stored_in); + &PasswordUiEntry::stored_in); ASSERT_NE(account_credential_it, updated_credentials.end()); EXPECT_EQ(refreshed_credential_it->username, "new_user"); } @@ -914,12 +911,10 @@ const PasswordsPrivateDelegate::UiEntries& credentials = GetCredentials(*delegate); EXPECT_EQ(credentials.size(), 1u); - const api::passwords_private::PasswordUiEntry& existing_credential = - credentials.at(0); + const PasswordUiEntry& existing_credential = credentials.at(0); EXPECT_TRUE(existing_credential.is_passkey); - api::passwords_private::PasswordUiEntry updated_credential = - existing_credential.Clone(); + PasswordUiEntry updated_credential = existing_credential.Clone(); updated_credential.username = "new_user"; updated_credential.display_name = "new_display_name"; @@ -942,8 +937,7 @@ // Spin the loop to allow PasswordStore tasks posted on the creation of // |delegate| to be completed. base::RunLoop().RunUntilIdle(); - EXPECT_FALSE( - delegate->ChangeCredential(api::passwords_private::PasswordUiEntry())); + EXPECT_FALSE(delegate->ChangeCredential(PasswordUiEntry())); } TEST_F(PasswordsPrivateDelegateImplTest, ChangeCredential_EmptyPassword) { @@ -954,8 +948,7 @@ // |delegate| to be completed. base::RunLoop().RunUntilIdle(); - api::passwords_private::PasswordUiEntry updated_credential = - GetCredentials(*delegate).at(0).Clone(); + PasswordUiEntry updated_credential = GetCredentials(*delegate).at(0).Clone(); updated_credential.password = ""; updated_credential.username = "new_user"; @@ -1111,8 +1104,7 @@ MockRequestCredentialsDetailsCallback password_callback; EXPECT_CALL(password_callback, Run) - .WillOnce([&](const std::vector<api::passwords_private::PasswordUiEntry>& - entries) { + .WillOnce([&](const std::vector<PasswordUiEntry>& entries) { EXPECT_EQ(1u, entries.size()); EXPECT_THAT(entries[0].password, Eq("test")); EXPECT_THAT(entries[0].username, Eq("test@gmail.com")); @@ -1202,7 +1194,7 @@ TEST_F(PasswordsPrivateDelegateImplTest, GetUrlCollectionValueWithSchemeWhenIpAddress) { auto delegate = CreateDelegate(); - const absl::optional<api::passwords_private::UrlCollection> urls = + const absl::optional<UrlCollection> urls = delegate->GetUrlCollection("127.0.0.1"); EXPECT_TRUE(urls.has_value()); EXPECT_EQ("127.0.0.1", urls.value().shown); @@ -1213,7 +1205,7 @@ TEST_F(PasswordsPrivateDelegateImplTest, GetUrlCollectionValueWithSchemeWhenWebAddress) { auto delegate = CreateDelegate(); - const absl::optional<api::passwords_private::UrlCollection> urls = + const absl::optional<UrlCollection> urls = delegate->GetUrlCollection("example.com/login"); EXPECT_TRUE(urls.has_value()); EXPECT_EQ("example.com", urls.value().shown); @@ -1224,9 +1216,8 @@ TEST_F(PasswordsPrivateDelegateImplTest, GetUrlCollectionStrippedValueWhenFullUrl) { auto delegate = CreateDelegate(); - const absl::optional<api::passwords_private::UrlCollection> urls = - delegate->GetUrlCollection( - "http://username:password@example.com/login?param=value#ref"); + const absl::optional<UrlCollection> urls = delegate->GetUrlCollection( + "http://username:password@example.com/login?param=value#ref"); EXPECT_TRUE(urls.has_value()); EXPECT_EQ("example.com", urls.value().shown); EXPECT_EQ("http://example.com/", urls.value().signon_realm); @@ -1236,7 +1227,7 @@ TEST_F(PasswordsPrivateDelegateImplTest, GetUrlCollectionNoValueWhenUnsupportedScheme) { auto delegate = CreateDelegate(); - const absl::optional<api::passwords_private::UrlCollection> urls = + const absl::optional<UrlCollection> urls = delegate->GetUrlCollection("scheme://unsupported"); EXPECT_FALSE(urls.has_value()); } @@ -1244,7 +1235,7 @@ TEST_F(PasswordsPrivateDelegateImplTest, GetUrlCollectionNoValueWhenInvalidUrl) { auto delegate = CreateDelegate(); - const absl::optional<api::passwords_private::UrlCollection> urls = + const absl::optional<UrlCollection> urls = delegate->GetUrlCollection("https://^/invalid"); EXPECT_FALSE(urls.has_value()); } @@ -1297,130 +1288,68 @@ } TEST_F(PasswordsPrivateDelegateImplTest, VerifyCastingOfImportEntryStatus) { + static_assert(int{api::passwords_private::IMPORT_ENTRY_STATUS_NONE} == + int{password_manager::ImportEntry::Status::NONE}); static_assert( - static_cast<int>(api::passwords_private::ImportEntryStatus:: - IMPORT_ENTRY_STATUS_NONE) == - static_cast<int>(password_manager::ImportEntry::Status::NONE), - ""); - static_assert(static_cast<int>(api::passwords_private::ImportEntryStatus:: - IMPORT_ENTRY_STATUS_UNKNOWN_ERROR) == - static_cast<int>( - password_manager::ImportEntry::Status::UNKNOWN_ERROR), - ""); + int{api::passwords_private::IMPORT_ENTRY_STATUS_UNKNOWN_ERROR} == + int{password_manager::ImportEntry::Status::UNKNOWN_ERROR}); static_assert( - static_cast<int>(api::passwords_private::ImportEntryStatus:: - IMPORT_ENTRY_STATUS_MISSING_PASSWORD) == - static_cast<int>( - password_manager::ImportEntry::Status::MISSING_PASSWORD), - ""); + int{api::passwords_private::IMPORT_ENTRY_STATUS_MISSING_PASSWORD} == + int{password_manager::ImportEntry::Status::MISSING_PASSWORD}); + static_assert(int{api::passwords_private::IMPORT_ENTRY_STATUS_MISSING_URL} == + int{password_manager::ImportEntry::Status::MISSING_URL}); + static_assert(int{api::passwords_private::IMPORT_ENTRY_STATUS_INVALID_URL} == + int{password_manager::ImportEntry::Status::INVALID_URL}); + static_assert(int{api::passwords_private::IMPORT_ENTRY_STATUS_LONG_URL} == + int{password_manager::ImportEntry::Status::LONG_URL}); static_assert( - static_cast<int>(api::passwords_private::ImportEntryStatus:: - IMPORT_ENTRY_STATUS_MISSING_URL) == - static_cast<int>(password_manager::ImportEntry::Status::MISSING_URL), - ""); + int{api::passwords_private::IMPORT_ENTRY_STATUS_LONG_PASSWORD} == + int{password_manager::ImportEntry::Status::LONG_PASSWORD}); static_assert( - static_cast<int>(api::passwords_private::ImportEntryStatus:: - IMPORT_ENTRY_STATUS_INVALID_URL) == - static_cast<int>(password_manager::ImportEntry::Status::INVALID_URL), - ""); + int{api::passwords_private::IMPORT_ENTRY_STATUS_LONG_USERNAME} == + int{password_manager::ImportEntry::Status::LONG_USERNAME}); static_assert( - static_cast<int>(api::passwords_private::ImportEntryStatus:: - IMPORT_ENTRY_STATUS_LONG_URL) == - static_cast<int>(password_manager::ImportEntry::Status::LONG_URL), - ""); - static_assert(static_cast<int>(api::passwords_private::ImportEntryStatus:: - IMPORT_ENTRY_STATUS_LONG_PASSWORD) == - static_cast<int>( - password_manager::ImportEntry::Status::LONG_PASSWORD), - ""); - static_assert(static_cast<int>(api::passwords_private::ImportEntryStatus:: - IMPORT_ENTRY_STATUS_LONG_USERNAME) == - static_cast<int>( - password_manager::ImportEntry::Status::LONG_USERNAME), - ""); + int{api::passwords_private::IMPORT_ENTRY_STATUS_CONFLICT_PROFILE} == + int{password_manager::ImportEntry::Status::CONFLICT_PROFILE}); static_assert( - static_cast<int>(api::passwords_private::ImportEntryStatus:: - IMPORT_ENTRY_STATUS_CONFLICT_PROFILE) == - static_cast<int>( - password_manager::ImportEntry::Status::CONFLICT_PROFILE), - ""); + int{api::passwords_private::IMPORT_ENTRY_STATUS_CONFLICT_ACCOUNT} == + int{password_manager::ImportEntry::Status::CONFLICT_ACCOUNT}); + static_assert(int{api::passwords_private::IMPORT_ENTRY_STATUS_LONG_NOTE} == + int{password_manager::ImportEntry::Status::LONG_NOTE}); static_assert( - static_cast<int>(api::passwords_private::ImportEntryStatus:: - IMPORT_ENTRY_STATUS_CONFLICT_ACCOUNT) == - static_cast<int>( - password_manager::ImportEntry::Status::CONFLICT_ACCOUNT), - ""); - static_assert( - static_cast<int>(api::passwords_private::ImportEntryStatus:: - IMPORT_ENTRY_STATUS_LONG_NOTE) == - static_cast<int>(password_manager::ImportEntry::Status::LONG_NOTE), - ""); - static_assert( - static_cast<int>(api::passwords_private::ImportEntryStatus:: - IMPORT_ENTRY_STATUS_LONG_CONCATENATED_NOTE) == - static_cast<int>( - password_manager::ImportEntry::Status::LONG_CONCATENATED_NOTE), - ""); - static_assert( - static_cast<int>(api::passwords_private::ImportEntryStatus:: - IMPORT_ENTRY_STATUS_VALID) == - static_cast<int>(password_manager::ImportEntry::Status::VALID), - ""); + int{api::passwords_private::IMPORT_ENTRY_STATUS_LONG_CONCATENATED_NOTE} == + int{password_manager::ImportEntry::Status::LONG_CONCATENATED_NOTE}); + static_assert(int{api::passwords_private::IMPORT_ENTRY_STATUS_VALID} == + int{password_manager::ImportEntry::Status::VALID}); } TEST_F(PasswordsPrivateDelegateImplTest, VerifyCastingOfImportResultsStatus) { + static_assert(int{api::passwords_private::IMPORT_RESULTS_STATUS_NONE} == + int{password_manager::ImportResults::Status::NONE}); static_assert( - static_cast<int>(api::passwords_private::ImportResultsStatus:: - IMPORT_RESULTS_STATUS_NONE) == - static_cast<int>(password_manager::ImportResults::Status::NONE), - ""); - static_assert(static_cast<int>(api::passwords_private::ImportResultsStatus:: - IMPORT_RESULTS_STATUS_UNKNOWN_ERROR) == - static_cast<int>( - password_manager::ImportResults::Status::UNKNOWN_ERROR), - ""); + int{api::passwords_private::IMPORT_RESULTS_STATUS_UNKNOWN_ERROR} == + int{password_manager::ImportResults::Status::UNKNOWN_ERROR}); + static_assert(int{api::passwords_private::IMPORT_RESULTS_STATUS_SUCCESS} == + int{password_manager::ImportResults::Status::SUCCESS}); + static_assert(int{api::passwords_private::IMPORT_RESULTS_STATUS_IO_ERROR} == + int{password_manager::ImportResults::Status::IO_ERROR}); + static_assert(int{api::passwords_private::IMPORT_RESULTS_STATUS_BAD_FORMAT} == + int{password_manager::ImportResults::Status::BAD_FORMAT}); + static_assert(int{api::passwords_private::IMPORT_RESULTS_STATUS_DISMISSED} == + int{password_manager::ImportResults::Status::DISMISSED}); static_assert( - static_cast<int>(api::passwords_private::ImportResultsStatus:: - IMPORT_RESULTS_STATUS_SUCCESS) == - static_cast<int>(password_manager::ImportResults::Status::SUCCESS), - ""); + int{api::passwords_private::IMPORT_RESULTS_STATUS_MAX_FILE_SIZE} == + int{password_manager::ImportResults::Status::MAX_FILE_SIZE}); static_assert( - static_cast<int>(api::passwords_private::ImportResultsStatus:: - IMPORT_RESULTS_STATUS_IO_ERROR) == - static_cast<int>(password_manager::ImportResults::Status::IO_ERROR), - ""); + int{api::passwords_private:: + IMPORT_RESULTS_STATUS_IMPORT_ALREADY_ACTIVE} == + int{password_manager::ImportResults::Status::IMPORT_ALREADY_ACTIVE}); static_assert( - static_cast<int>(api::passwords_private::ImportResultsStatus:: - IMPORT_RESULTS_STATUS_BAD_FORMAT) == - static_cast<int>(password_manager::ImportResults::Status::BAD_FORMAT), - ""); - static_assert( - static_cast<int>(api::passwords_private::ImportResultsStatus:: - IMPORT_RESULTS_STATUS_DISMISSED) == - static_cast<int>(password_manager::ImportResults::Status::DISMISSED), - ""); - static_assert(static_cast<int>(api::passwords_private::ImportResultsStatus:: - IMPORT_RESULTS_STATUS_MAX_FILE_SIZE) == - static_cast<int>( - password_manager::ImportResults::Status::MAX_FILE_SIZE), - ""); - static_assert( - static_cast<int>(api::passwords_private::ImportResultsStatus:: - IMPORT_RESULTS_STATUS_IMPORT_ALREADY_ACTIVE) == - static_cast<int>( - password_manager::ImportResults::Status::IMPORT_ALREADY_ACTIVE), - ""); - static_assert( - static_cast<int>(api::passwords_private::ImportResultsStatus:: - IMPORT_RESULTS_STATUS_NUM_PASSWORDS_EXCEEDED) == - static_cast<int>( - password_manager::ImportResults::Status::NUM_PASSWORDS_EXCEEDED), - ""); - static_assert( - static_cast<int>(api::passwords_private::ImportResultsStatus:: - IMPORT_RESULTS_STATUS_CONFLICTS) == - static_cast<int>(password_manager::ImportResults::Status::CONFLICTS), - ""); + int{api::passwords_private:: + IMPORT_RESULTS_STATUS_NUM_PASSWORDS_EXCEEDED} == + int{password_manager::ImportResults::Status::NUM_PASSWORDS_EXCEEDED}); + static_assert(int{api::passwords_private::IMPORT_RESULTS_STATUS_CONFLICTS} == + int{password_manager::ImportResults::Status::CONFLICTS}); } #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) @@ -1543,12 +1472,12 @@ EXPECT_EQ("abc1.com", groups[0].name); EXPECT_EQ("https://abc1.com/favicon.ico", groups[0].icon_url); - api::passwords_private::PasswordUiEntry expected_entry1; + PasswordUiEntry expected_entry1; expected_entry1.affiliated_domains.emplace_back(); expected_entry1.affiliated_domains.back().signon_realm = "https://abc1.com"; expected_entry1.username = "username1"; expected_entry1.stored_in = api::passwords_private::PASSWORD_STORE_SET_DEVICE; - api::passwords_private::PasswordUiEntry expected_entry2; + PasswordUiEntry expected_entry2; expected_entry2.affiliated_domains.emplace_back(); expected_entry2.affiliated_domains.back().signon_realm = "https://abc1.com"; expected_entry2.username = "username2"; @@ -1601,12 +1530,12 @@ EXPECT_EQ("abc1.com", groups[0].name); EXPECT_EQ("https://abc1.com/favicon.ico", groups[0].icon_url); - api::passwords_private::PasswordUiEntry expected_entry1; + PasswordUiEntry expected_entry1; expected_entry1.affiliated_domains.emplace_back(); expected_entry1.affiliated_domains.back().signon_realm = "https://abc1.com"; expected_entry1.username = "username1"; expected_entry1.stored_in = api::passwords_private::PASSWORD_STORE_SET_DEVICE; - api::passwords_private::PasswordUiEntry expected_entry2; + PasswordUiEntry expected_entry2; expected_entry2.is_passkey = true; expected_entry2.affiliated_domains.emplace_back(); expected_entry2.affiliated_domains.back().signon_realm = "https://abc1.com"; @@ -1639,8 +1568,7 @@ SetUpPasswordStores({}); auto groups = delegate->GetCredentialGroups(); - api::passwords_private::PasswordUiEntry& passkey_entry = - groups.at(0).entries.at(0); + PasswordUiEntry& passkey_entry = groups.at(0).entries.at(0); ASSERT_TRUE(passkey_entry.is_passkey); EXPECT_EQ(user_action_tester.GetActionCount("PasswordManager_RemovePasskey"), 0); @@ -1653,8 +1581,7 @@ // Attempt removing a non existent entry. delegate->RemoveCredential( - /*id=*/42, - api::passwords_private::PasswordStoreSet::PASSWORD_STORE_SET_ACCOUNT); + /*id=*/42, api::passwords_private::PASSWORD_STORE_SET_ACCOUNT); EXPECT_EQ(user_action_tester.GetActionCount("PasswordManager_RemovePasskey"), 1); } @@ -1665,8 +1592,8 @@ SetUpPasswordStores({password}); PasswordsPrivateDelegate::ShareRecipients recipients; - api::passwords_private::RecipientInfo recipient1; - api::passwords_private::PublicKey public_key1; + RecipientInfo recipient1; + PublicKey public_key1; public_key1.value = kSharingRecipientKeyValue1; recipient1.public_key = std::move(public_key1); recipient1.user_id = kSharingRecipientId1; @@ -1675,8 +1602,8 @@ recipient1.profile_image_url = kSharingRecipientProfileImageUrl1; recipients.push_back(std::move(recipient1)); - api::passwords_private::RecipientInfo recipient2; - api::passwords_private::PublicKey public_key2; + RecipientInfo recipient2; + PublicKey public_key2; public_key2.value = kSharingRecipientKeyValue2; recipient2.public_key = std::move(public_key2); recipient2.user_id = kSharingRecipientId2; @@ -1751,7 +1678,7 @@ // m.facebook.com int id_with_two_affiliated_domains = -1; for (const api::passwords_private::CredentialGroup& group : groups) { - for (const api::passwords_private::PasswordUiEntry& entry : group.entries) { + for (const PasswordUiEntry& entry : group.entries) { if (entry.affiliated_domains.size() == 2) { id_with_two_affiliated_domains = entry.id; break; @@ -1761,8 +1688,8 @@ ASSERT_NE(-1, id_with_two_affiliated_domains); PasswordsPrivateDelegate::ShareRecipients recipients; - api::passwords_private::RecipientInfo recipient; - api::passwords_private::PublicKey public_key; + RecipientInfo recipient; + PublicKey public_key; public_key.value = kSharingRecipientKeyValue1; recipient.public_key = std::move(public_key); recipient.user_id = kSharingRecipientId1; @@ -1798,7 +1725,7 @@ auto delegate = CreateDelegate(); PasswordsPrivateDelegate::ShareRecipients recipients; - api::passwords_private::RecipientInfo recipient; + RecipientInfo recipient; recipient.user_id = kSharingRecipientId1; recipients.push_back(std::move(recipient)); @@ -1910,23 +1837,21 @@ callback; EXPECT_CALL( callback, - Run(AllOf( - Field(&FamilyFetchResults::status, - api::passwords_private::FAMILY_FETCH_STATUS_SUCCESS), - Field(&FamilyFetchResults::family_members, - ElementsAre(AllOf( - Field(&RecipientInfo::user_id, kTestUserId), - Field(&RecipientInfo::display_name, kTestUserName), - Field(&RecipientInfo::email, kTestEmail), - Field(&RecipientInfo::is_eligible, true), - Field(&RecipientInfo::public_key, - Optional(AllOf( - Field(&api::passwords_private::PublicKey::value, - kTestPublicKeyBase64), - Field(&api::passwords_private::PublicKey::version, - kTestPublicKeyVersion)))), - Field(&RecipientInfo::profile_image_url, - kTestProfileImageUrl))))))); + Run(AllOf(Field(&FamilyFetchResults::status, + api::passwords_private::FAMILY_FETCH_STATUS_SUCCESS), + Field(&FamilyFetchResults::family_members, + ElementsAre(AllOf( + Field(&RecipientInfo::user_id, kTestUserId), + Field(&RecipientInfo::display_name, kTestUserName), + Field(&RecipientInfo::email, kTestEmail), + Field(&RecipientInfo::is_eligible, true), + Field(&RecipientInfo::public_key, + Optional(AllOf(Field(&PublicKey::value, + kTestPublicKeyBase64), + Field(&PublicKey::version, + kTestPublicKeyVersion)))), + Field(&RecipientInfo::profile_image_url, + kTestProfileImageUrl))))))); delegate()->FetchFamilyMembers(callback.Get()); task_environment()->RunUntilIdle();
diff --git a/chrome/browser/extensions/api/web_request/web_request_apitest.cc b/chrome/browser/extensions/api/web_request/web_request_apitest.cc index ae7e2b6..b201c0f 100644 --- a/chrome/browser/extensions/api/web_request/web_request_apitest.cc +++ b/chrome/browser/extensions/api/web_request/web_request_apitest.cc
@@ -1084,30 +1084,17 @@ << message_; } -// TODO(crbug.com/1453477): test is flaky on linux, mac and chromeos. -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -#define MAYBE_WebRequestSubresourceRedirects \ - DISABLED_WebRequestSubresourceRedirects -#else -#define MAYBE_WebRequestSubresourceRedirects WebRequestSubresourceRedirects -#endif +// TODO(crbug.com/1453477): test is flaky on multiple platforms. IN_PROC_BROWSER_TEST_P(ExtensionWebRequestApiTestWithContextType, - MAYBE_WebRequestSubresourceRedirects) { + DISABLED_WebRequestSubresourceRedirects) { ASSERT_TRUE(StartEmbeddedTestServer()); ASSERT_TRUE(RunExtensionTest("webrequest/test_subresource_redirects")) << message_; } -// TODO(crbug.com/1453477): test is flaky on linux, mac and chromeos. -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) -#define MAYBE_WebRequestSubresourceRedirectsWithExtraHeaders \ - DISABLED_WebRequestSubresourceRedirectsWithExtraHeaders -#else -#define MAYBE_WebRequestSubresourceRedirectsWithExtraHeaders \ - WebRequestSubresourceRedirectsWithExtraHeaders -#endif +// TODO(crbug.com/1453477): test is flaky on multiple platforms. IN_PROC_BROWSER_TEST_P(ExtensionWebRequestApiTestWithContextType, - MAYBE_WebRequestSubresourceRedirectsWithExtraHeaders) { + DISABLED_WebRequestSubresourceRedirectsWithExtraHeaders) { ASSERT_TRUE(StartEmbeddedTestServer()); ASSERT_TRUE(RunExtensionTest("webrequest/test_subresource_redirects", {.custom_arg = R"({"useExtraHeaders": true})"}))
diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json index 727d842..c5ed9ce 100644 --- a/chrome/browser/flag-metadata.json +++ b/chrome/browser/flag-metadata.json
@@ -1232,6 +1232,11 @@ "owners": ["ckincaid@google.com", "multipaste@google.com"], "expiry_milestone": 118 }, + { + "name": "clipboard-history-web-contents-paste", + "owners": ["dmblack@google.com", "multipaste@google.com"], + "expiry_milestone": 120 + }, { "name": "clipboard-maximum-age", "owners": ["pnoland", "chrome-mobile-search@google.com"], @@ -5394,6 +5399,11 @@ "expiry_milestone": 114 }, { + "name": "link-cross-device-internals", + "owners": [ "chromeos-cross-device-eng@google.com", "dclasson" ], + "expiry_milestone": 125 + }, + { "name": "list-all-display-modes", "owners": [ "//ui/display/OWNERS" ], // This flag is used for debugging and development purposes to list all
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc index 7baebf0..bf4a574 100644 --- a/chrome/browser/flag_descriptions.cc +++ b/chrome/browser/flag_descriptions.cc
@@ -266,10 +266,6 @@ "(raster, webgl, video) " " continues using the gpu main thread."; -const char kEnableDrDcVulkanName[] = - " Use this flag along with flag enable-drdc to enable DrDc on Vulkan. " - " Note that this flag will be a no-op if enable-drdc is disabled. "; - const char kForceGpuMainThreadToNormalPriorityDrDcName[] = "Force GPU main thread priority to normal for DrDc."; const char kForceGpuMainThreadToNormalPriorityDrDcDescription[] = @@ -3702,7 +3698,7 @@ const char kWebSQLAccessName[] = "Allows access to WebSQL APIs"; const char kWebSQLAccessDescription[] = - "The WebSQL API is enabled by default, but can be disabled here."; + "The WebSQL API is disabled by default, but can be enabled here."; const char kUseGpuSchedulerDfsName[] = "Use new gpu scheduler."; const char kUseGpuSchedulerDfsDescription[] = @@ -5264,6 +5260,12 @@ "ChromeOS Flex). If disabled, this removes all Cross-Device features and " "their entries in the Settings app."; +const char kLinkCrossDeviceInternalsName[] = + "Link Cross-Device internals logging to Feedback reports."; +const char kLinkCrossDeviceInternalsDescription[] = + "Improves debugging of Cross-Device features by recording more verbose " + "logs and attaching these logs to filed Feedback reports."; + const char kAllowDevtoolsInSystemUIName[] = "Enable DevTools in System UI"; const char kAllowDevtoolsInSystemUIDescription[] = "Enable the developer tools (DevTools) including the page source viewer " @@ -5711,6 +5713,12 @@ "annotation for copied URLs in the clipboard history menu: If the URL has " "been visited, its page title will appear as part of the URL's menu item."; +const char kClipboardHistoryWebContentsPasteName[] = + "Explicitly paste into web contents from clipboard history"; +const char kClipboardHistoryWebContentsPasteDescription[] = + "Enables an experimental behavior where clipboard history explicitly " + "pastes into web contents instead of using synthetic key events."; + const char kComponentUpdaterTestRequestName[] = "Enable the component updater check 'test-request' parameter"; const char kComponentUpdaterTestRequestDescription[] =
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h index a6fb8b1..cf202a86 100644 --- a/chrome/browser/flag_descriptions.h +++ b/chrome/browser/flag_descriptions.h
@@ -193,8 +193,6 @@ extern const char kForceGpuMainThreadToNormalPriorityDrDcName[]; extern const char kForceGpuMainThreadToNormalPriorityDrDcDescription[]; -extern const char kEnableDrDcVulkanName[]; - extern const char kUseClientGmbInterfaceName[]; extern const char kUseClientGmbInterfaceDescription[]; @@ -3055,6 +3053,9 @@ extern const char kAllowCrossDeviceFeatureSuiteName[]; extern const char kAllowCrossDeviceFeatureSuiteDescription[]; +extern const char kLinkCrossDeviceInternalsName[]; +extern const char kLinkCrossDeviceInternalsDescription[]; + extern const char kAllowDevtoolsInSystemUIName[]; extern const char kAllowDevtoolsInSystemUIDescription[]; @@ -3300,6 +3301,9 @@ extern const char kClipboardHistoryUrlTitlesName[]; extern const char kClipboardHistoryUrlTitlesDescription[]; +extern const char kClipboardHistoryWebContentsPasteName[]; +extern const char kClipboardHistoryWebContentsPasteDescription[]; + extern const char kComponentUpdaterTestRequestName[]; extern const char kComponentUpdaterTestRequestDescription[];
diff --git a/chrome/browser/image_descriptions/BUILD.gn b/chrome/browser/image_descriptions/BUILD.gn index 3d5bb0cd..565538e 100644 --- a/chrome/browser/image_descriptions/BUILD.gn +++ b/chrome/browser/image_descriptions/BUILD.gn
@@ -31,6 +31,7 @@ "//content/public/android:content_java", "//net/android:net_java", "//third_party/androidx:androidx_annotation_annotation_java", + "//third_party/androidx:androidx_fragment_fragment_java", "//third_party/androidx:androidx_preference_preference_java", "//ui/accessibility:ax_base_java", "//ui/android:ui_full_java",
diff --git a/chrome/browser/lacros/embedded_a11y_manager_lacros.cc b/chrome/browser/lacros/embedded_a11y_manager_lacros.cc index 0f865314..7706b66 100644 --- a/chrome/browser/lacros/embedded_a11y_manager_lacros.cc +++ b/chrome/browser/lacros/embedded_a11y_manager_lacros.cc
@@ -4,6 +4,8 @@ #include "chrome/browser/lacros/embedded_a11y_manager_lacros.h" +#include <memory> + #include "base/memory/singleton.h" #include "base/path_service.h" #include "chrome/browser/browser_process.h" @@ -12,12 +14,14 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile_manager.h" #include "chrome/common/chrome_paths.h" +#include "chrome/common/extensions/api/accessibility_service_private.h" #include "chrome/common/extensions/extension_constants.h" #include "chrome/common/pref_names.h" #include "chromeos/crosapi/mojom/embedded_accessibility_helper.mojom.h" #include "chromeos/lacros/lacros_service.h" #include "content/public/browser/browser_context.h" #include "content/public/browser/browser_thread.h" +#include "extensions/browser/event_router.h" #include "extensions/browser/extension_file_task_runner.h" #include "extensions/browser/extension_system.h" #include "extensions/common/extension_l10n_util.h" @@ -78,6 +82,26 @@ EmbeddedA11yManagerLacros::~EmbeddedA11yManagerLacros() = default; +void EmbeddedA11yManagerLacros::ClipboardCopyInActiveGoogleDoc( + const std::string& url) { + // Get the `Profile` last used (the `Profile` which owns the most + // recently focused window). This is the one on which we want to + // request speech. + Profile* profile = ProfileManager::GetLastUsedProfile(); + extensions::EventRouter* event_router = extensions::EventRouter::Get(profile); + + auto event_args(extensions::api::accessibility_service_private:: + ClipboardCopyInActiveGoogleDoc::Create(url)); + std::unique_ptr<extensions::Event> event(new extensions::Event( + extensions::events:: + ACCESSIBILITY_SERVICE_PRIVATE_CLIPBOARD_COPY_IN_ACTIVE_GOOGLE_DOC, + extensions::api::accessibility_service_private:: + ClipboardCopyInActiveGoogleDoc::kEventName, + std::move(event_args))); + event_router->DispatchEventWithLazyListener( + extension_misc::kEmbeddedA11yHelperExtensionId, std::move(event)); +} + void EmbeddedA11yManagerLacros::Init() { CHECK(!chromevox_enabled_observer_) << "EmbeddedA11yManagerLacros::Init should only be called once."; @@ -101,9 +125,12 @@ chromeos::LacrosService* impl = chromeos::LacrosService::Get(); if (impl->IsAvailable< crosapi::mojom::EmbeddedAccessibilityHelperClientFactory>()) { - impl->GetRemote<crosapi::mojom::EmbeddedAccessibilityHelperClientFactory>() - ->BindEmbeddedAccessibilityHelperClient( - a11y_helper_remote_.BindNewPipeAndPassReceiver()); + auto& remote = impl->GetRemote< + crosapi::mojom::EmbeddedAccessibilityHelperClientFactory>(); + remote->BindEmbeddedAccessibilityHelperClient( + a11y_helper_remote_.BindNewPipeAndPassReceiver()); + remote->BindEmbeddedAccessibilityHelper( + a11y_helper_receiver_.BindNewPipeAndPassRemote()); } pdf_ocr_always_active_observer_ = std::make_unique<CrosapiPrefObserver>(
diff --git a/chrome/browser/lacros/embedded_a11y_manager_lacros.h b/chrome/browser/lacros/embedded_a11y_manager_lacros.h index 993791a..9a7cc24 100644 --- a/chrome/browser/lacros/embedded_a11y_manager_lacros.h +++ b/chrome/browser/lacros/embedded_a11y_manager_lacros.h
@@ -5,6 +5,8 @@ #ifndef CHROME_BROWSER_LACROS_EMBEDDED_A11Y_MANAGER_LACROS_H_ #define CHROME_BROWSER_LACROS_EMBEDDED_A11Y_MANAGER_LACROS_H_ +#include <string> + #include "base/functional/callback_forward.h" #include "base/memory/singleton.h" #include "base/scoped_multi_source_observation.h" @@ -27,8 +29,10 @@ // features running in Ash. Installs and uninstalls the extensions on every // profile (including guest and incognito) depending on which Ash accessibility // features are running and syncs the preferences on all profiles. -class EmbeddedA11yManagerLacros : public ProfileObserver, - public ProfileManagerObserver { +class EmbeddedA11yManagerLacros + : public crosapi::mojom::EmbeddedAccessibilityHelper, + public ProfileObserver, + public ProfileManagerObserver { public: // Gets the current instance of EmbeddedA11yManagerLacros. There should be one // of these across all Lacros profiles. @@ -40,6 +44,9 @@ EmbeddedA11yManagerLacros(EmbeddedA11yManagerLacros&) = delete; EmbeddedA11yManagerLacros& operator=(EmbeddedA11yManagerLacros&) = delete; + // crosapi::mojom::EmbeddedAccessibilityHelper: + void ClipboardCopyInActiveGoogleDoc(const std::string& url) override; + // Starts to observe Ash accessibility feature state and profiles. // Should be called when Lacros starts up. void Init(); @@ -116,6 +123,9 @@ mojo::Remote<crosapi::mojom::EmbeddedAccessibilityHelperClient> a11y_helper_remote_; + mojo::Receiver<crosapi::mojom::EmbeddedAccessibilityHelper> + a11y_helper_receiver_{this}; + base::WeakPtrFactory<EmbeddedA11yManagerLacros> weak_ptr_factory_{this}; friend struct base::DefaultSingletonTraits<EmbeddedA11yManagerLacros>;
diff --git a/chrome/browser/nearby_sharing/nearby_sharing_service_factory.cc b/chrome/browser/nearby_sharing/nearby_sharing_service_factory.cc index 3459450..50224f4 100644 --- a/chrome/browser/nearby_sharing/nearby_sharing_service_factory.cc +++ b/chrome/browser/nearby_sharing/nearby_sharing_service_factory.cc
@@ -7,6 +7,7 @@ #include <memory> #include <utility> +#include "ash/constants/ash_features.h" #include "base/feature_list.h" #include "base/no_destructor.h" #include "build/build_config.h" @@ -55,6 +56,11 @@ return *IsSupportedTesting(); } + if (!base::FeatureList::IsEnabled( + ash::features::kAllowCrossDeviceFeatureSuite)) { + return false; + } + if (!base::FeatureList::IsEnabled(features::kNearbySharing)) { return false; }
diff --git a/chrome/browser/page_load_metrics/integration_tests/largest_contentful_paint_browsertest.cc b/chrome/browser/page_load_metrics/integration_tests/largest_contentful_paint_browsertest.cc index aa16ad1..59481d2 100644 --- a/chrome/browser/page_load_metrics/integration_tests/largest_contentful_paint_browsertest.cc +++ b/chrome/browser/page_load_metrics/integration_tests/largest_contentful_paint_browsertest.cc
@@ -13,6 +13,7 @@ #include "base/test/scoped_feature_list.h" #include "base/test/trace_event_analyzer.h" #include "build/build_config.h" +#include "build/chromeos_buildflags.h" #include "cc/base/switches.h" #include "chrome/browser/page_load_metrics/integration_tests/metric_integration_test.h" #include "chrome/test/base/ui_test_utils.h" @@ -318,7 +319,13 @@ *trace_analyzer, "latest_largest_contentful_paint_ms", lcpTime, 2.0); } -class IsAnimatedLCPTest : public MetricIntegrationTest { +// TODO(crbug.com/1365773): Flaky on lacros +#if BUILDFLAG(IS_CHROMEOS_LACROS) +#define MAYBE_IsAnimatedLCPTest DISABLED_IsAnimatedLCPTest +#else +#define MAYBE_IsAnimatedLCPTest IsAnimatedLCPTest +#endif +class MAYBE_IsAnimatedLCPTest : public MetricIntegrationTest { public: void SetUpCommandLine(base::CommandLine* command_line) override { command_line->AppendSwitchASCII(switches::kEnableBlinkFeatures, @@ -351,13 +358,14 @@ } }; -IN_PROC_BROWSER_TEST_F(IsAnimatedLCPTest, LargestContentfulPaint_IsAnimated) { +IN_PROC_BROWSER_TEST_F(MAYBE_IsAnimatedLCPTest, + LargestContentfulPaint_IsAnimated) { test_is_animated("/is_animated.html", blink::LargestContentfulPaintType::kAnimatedImage, /*expected=*/true); } -IN_PROC_BROWSER_TEST_F(IsAnimatedLCPTest, +IN_PROC_BROWSER_TEST_F(MAYBE_IsAnimatedLCPTest, LargestContentfulPaint_IsNotAnimated) { test_is_animated("/non_animated.html", blink::LargestContentfulPaintType::kAnimatedImage, @@ -365,7 +373,7 @@ } IN_PROC_BROWSER_TEST_F( - IsAnimatedLCPTest, + MAYBE_IsAnimatedLCPTest, LargestContentfulPaint_AnimatedImageWithLargerTextFirst) { test_is_animated("/animated_image_with_larger_text_first.html", blink::LargestContentfulPaintType::kAnimatedImage, @@ -373,14 +381,20 @@ } // crbug.com/1373885: This test is unreliable on ChromeOS, Linux and Mac -IN_PROC_BROWSER_TEST_F(IsAnimatedLCPTest, +IN_PROC_BROWSER_TEST_F(MAYBE_IsAnimatedLCPTest, DISABLED_LargestContentfulPaint_IsVideo) { test_is_animated("/is_video.html", blink::LargestContentfulPaintType::kVideo, /*expected=*/true, /*entries=*/0); } -class MouseoverLCPTest : public MetricIntegrationTest, - public testing::WithParamInterface<bool> { +// TODO(crbug.com/1365773): Flaky on lacros +#if BUILDFLAG(IS_CHROMEOS_LACROS) +#define MAYBE_MouseoverLCPTest DISABLED_MouseoverLCPTest +#else +#define MAYBE_MouseoverLCPTest MouseoverLCPTest +#endif +class MAYBE_MouseoverLCPTest : public MetricIntegrationTest, + public testing::WithParamInterface<bool> { public: void test_mouseover(const char* html_name, blink::LargestContentfulPaintType flag_set, @@ -490,9 +504,11 @@ } }; -INSTANTIATE_TEST_SUITE_P(All, MouseoverLCPTest, ::testing::Values(false, true)); +INSTANTIATE_TEST_SUITE_P(All, + MAYBE_MouseoverLCPTest, + ::testing::Values(false, true)); -IN_PROC_BROWSER_TEST_P(MouseoverLCPTest, +IN_PROC_BROWSER_TEST_P(MAYBE_MouseoverLCPTest, LargestContentfulPaint_MouseoverOverLCPImage) { test_mouseover("/mouseover.html", blink::LargestContentfulPaintType::kAfterMouseover, @@ -503,7 +519,7 @@ /*expected=*/true); } -IN_PROC_BROWSER_TEST_P(MouseoverLCPTest, +IN_PROC_BROWSER_TEST_P(MAYBE_MouseoverLCPTest, LargestContentfulPaint_MouseoverOverLCPImageReplace) { test_mouseover("/mouseover.html?replace", blink::LargestContentfulPaintType::kAfterMouseover, @@ -514,7 +530,7 @@ /*expected=*/true); } -IN_PROC_BROWSER_TEST_P(MouseoverLCPTest, +IN_PROC_BROWSER_TEST_P(MAYBE_MouseoverLCPTest, LargestContentfulPaint_MouseoverOverBody) { test_mouseover("/mouseover.html", blink::LargestContentfulPaintType::kAfterMouseover, @@ -525,7 +541,7 @@ /*expected=*/false); } -IN_PROC_BROWSER_TEST_P(MouseoverLCPTest, +IN_PROC_BROWSER_TEST_P(MAYBE_MouseoverLCPTest, LargestContentfulPaint_MouseoverOverLCPImageThenBody) { test_mouseover("/mouseover.html?dispatch", blink::LargestContentfulPaintType::kAfterMouseover, @@ -536,9 +552,9 @@ /*expected=*/false); } -class MouseoverLCPTestWithHeuristicFlag : public MouseoverLCPTest { +class MouseoverLCPTestWithHeuristicFlag : public MAYBE_MouseoverLCPTest { void SetUpCommandLine(base::CommandLine* command_line) override { - MouseoverLCPTest::SetUpCommandLine(command_line); + MAYBE_MouseoverLCPTest::SetUpCommandLine(command_line); feature_list_.InitWithFeatures( {blink::features::kLCPMouseoverHeuristics} /*enabled*/, {} /*disabled*/); @@ -561,8 +577,17 @@ /*expected=*/false); } -IN_PROC_BROWSER_TEST_P(MouseoverLCPTestWithHeuristicFlag, - LargestContentfulPaint_MouseoverOverLCPImageReplace) { +// TODO(crbug.com/1365773): Flaky on lacros +#if BUILDFLAG(IS_CHROMEOS_LACROS) +#define MAYBE_LargestContentfulPaint_MouseoverOverLCPImageReplace \ + DISABLED_LargestContentfulPaint_MouseoverOverLCPImageReplace +#else +#define MAYBE_LargestContentfulPaint_MouseoverOverLCPImageReplace \ + LargestContentfulPaint_MouseoverOverLCPImageReplace +#endif +IN_PROC_BROWSER_TEST_P( + MouseoverLCPTestWithHeuristicFlag, + MAYBE_LargestContentfulPaint_MouseoverOverLCPImageReplace) { test_mouseover("/mouseover.html?replace", blink::LargestContentfulPaintType::kAfterMouseover, /*entries=*/"1",
diff --git a/chrome/browser/password_entry_edit/android/BUILD.gn b/chrome/browser/password_entry_edit/android/BUILD.gn index 003f112..e420954 100644 --- a/chrome/browser/password_entry_edit/android/BUILD.gn +++ b/chrome/browser/password_entry_edit/android/BUILD.gn
@@ -36,6 +36,7 @@ "//third_party/android_deps:material_design_java", "//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_preference_preference_java", "//ui/android:ui_no_recycler_view_java", ]
diff --git a/chrome/browser/password_manager/android/device_lock_bridge.cc b/chrome/browser/password_manager/android/device_lock_bridge.cc index e625753..0206581 100644 --- a/chrome/browser/password_manager/android/device_lock_bridge.cc +++ b/chrome/browser/password_manager/android/device_lock_bridge.cc
@@ -41,7 +41,8 @@ } bool DeviceLockBridge::ShowDeviceLockUiBeforeSavingPassword() { - return RequiresDeviceLock() && !IsDeviceSecure(); + return RequiresDeviceLock() && + (!IsDeviceSecure() || !DeviceLockPageHasBeenPassed()); } bool DeviceLockBridge::RequiresDeviceLock() { @@ -52,3 +53,8 @@ return Java_DeviceLockBridge_isDeviceSecure( base::android::AttachCurrentThread(), java_object_); } + +bool DeviceLockBridge::DeviceLockPageHasBeenPassed() { + return Java_DeviceLockBridge_deviceLockPageHasBeenPassed( + base::android::AttachCurrentThread(), java_object_); +}
diff --git a/chrome/browser/password_manager/android/device_lock_bridge.h b/chrome/browser/password_manager/android/device_lock_bridge.h index bd201316..17225fa 100644 --- a/chrome/browser/password_manager/android/device_lock_bridge.h +++ b/chrome/browser/password_manager/android/device_lock_bridge.h
@@ -45,6 +45,11 @@ // Returns true iff the device has a device lock (ex: pin/password). bool IsDeviceSecure(); + // Returns true iff the device lock page has already been passed (i.e. the + // device lock page has been shown to and affirmatively acknowledged by the + // user). + bool DeviceLockPageHasBeenPassed(); + // This object is an instance of DeviceLockBridge.java (the Java counterpart // to this class). base::android::ScopedJavaGlobalRef<jobject> java_object_;
diff --git a/chrome/browser/performance_manager/chrome_browser_main_extra_parts_performance_manager.cc b/chrome/browser/performance_manager/chrome_browser_main_extra_parts_performance_manager.cc index 3e5f019..97d6b8b 100644 --- a/chrome/browser/performance_manager/chrome_browser_main_extra_parts_performance_manager.cc +++ b/chrome/browser/performance_manager/chrome_browser_main_extra_parts_performance_manager.cc
@@ -59,7 +59,7 @@ #endif // BUILDFLAG(IS_CHROMEOS_ASH) #if BUILDFLAG(IS_CHROMEOS_LACROS) -#include "chrome/browser/performance_manager/policies/oom_score_policy_lacros.h" +#include "chrome/browser/performance_manager/policies/oom_score_policy_chromeos.h" #endif // BUILDFLAG(IS_CHROMEOS_LACROS) #if BUILDFLAG(ENABLE_EXTENSIONS) @@ -136,8 +136,8 @@ #endif // BUILDFLAG(IS_CHROMEOS_ASH) #if BUILDFLAG(IS_CHROMEOS_LACROS) - graph->PassToGraph( - std::make_unique<performance_manager::policies::OomScorePolicyLacros>()); + graph->PassToGraph(std::make_unique< + performance_manager::policies::OomScorePolicyChromeOS>()); #endif // BUILDFLAG(IS_CHROMEOS_LACROS) #if !BUILDFLAG(IS_ANDROID)
diff --git a/chrome/browser/performance_manager/policies/oom_score_policy_lacros.cc b/chrome/browser/performance_manager/policies/oom_score_policy_chromeos.cc similarity index 83% rename from chrome/browser/performance_manager/policies/oom_score_policy_lacros.cc rename to chrome/browser/performance_manager/policies/oom_score_policy_chromeos.cc index 8505825..4f804f9 100644 --- a/chrome/browser/performance_manager/policies/oom_score_policy_lacros.cc +++ b/chrome/browser/performance_manager/policies/oom_score_policy_chromeos.cc
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/performance_manager/policies/oom_score_policy_lacros.h" +#include "chrome/browser/performance_manager/policies/oom_score_policy_chromeos.h" #include <algorithm> #include <set> @@ -21,24 +21,24 @@ } // namespace -OomScorePolicyLacros::OomScorePolicyLacros() = default; -OomScorePolicyLacros::~OomScorePolicyLacros() = default; +OomScorePolicyChromeOS::OomScorePolicyChromeOS() = default; +OomScorePolicyChromeOS::~OomScorePolicyChromeOS() = default; -void OomScorePolicyLacros::OnPassedToGraph(Graph* graph) { +void OomScorePolicyChromeOS::OnPassedToGraph(Graph* graph) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); graph_ = graph; timer_.Start(FROM_HERE, kOomScoreAssignmentInterval, - base::BindRepeating(&OomScorePolicyLacros::AssignOomScores, + base::BindRepeating(&OomScorePolicyChromeOS::AssignOomScores, weak_factory_.GetWeakPtr())); } -void OomScorePolicyLacros::OnTakenFromGraph(Graph* graph) { +void OomScorePolicyChromeOS::OnTakenFromGraph(Graph* graph) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); graph_ = nullptr; timer_.Stop(); } -void OomScorePolicyLacros::AssignOomScores() { +void OomScorePolicyChromeOS::AssignOomScores() { PageDiscardingHelper* discarding_helper = PageDiscardingHelper::GetFromGraph(graph_); @@ -65,15 +65,17 @@ oom_score_map_ = DistributeOomScore(candidates); } -OomScorePolicyLacros::ProcessScoreMap OomScorePolicyLacros::DistributeOomScore( +OomScorePolicyChromeOS::ProcessScoreMap +OomScorePolicyChromeOS::DistributeOomScore( const std::vector<PageNodeSortProxy>& candidates) { ProcessScoreMap score_map; std::vector<base::ProcessId> pids = GetUniqueSortedPids(candidates); const int pid_count = pids.size(); - if (pid_count == 0) + if (pid_count == 0) { return score_map; + } // Now we distribute oom_score_adj evenly in the range based on the sorted // list. We're assigning priorities in the range of kLowestRendererOomScore @@ -93,9 +95,10 @@ if (GetCachedOomScore(pid) != adj) { VLOG(3) << "Update OOM score " << adj << " for " << pid; - if (!base::AdjustOOMScore(pid, adj)) + if (!base::AdjustOOMScore(pid, adj)) { LOG(ERROR) << "Failed to set oom_score_adj to " << adj << " for process " << pid; + } } adj_raw += adj_increment; } @@ -103,7 +106,7 @@ return score_map; } -std::vector<base::ProcessId> OomScorePolicyLacros::GetUniqueSortedPids( +std::vector<base::ProcessId> OomScorePolicyChromeOS::GetUniqueSortedPids( const std::vector<PageNodeSortProxy>& candidates) { std::vector<base::ProcessId> pids; @@ -112,12 +115,14 @@ for (const auto& candidate : candidates) { const FrameNode* main_frame_node = candidate.page_node()->GetMainFrameNode(); - if (!main_frame_node) + if (!main_frame_node) { continue; + } base::ProcessId pid = main_frame_node->GetProcessNode()->GetProcessId(); - if (pid == base::kNullProcessId || pid_set.find(pid) != pid_set.end()) + if (pid == base::kNullProcessId || pid_set.find(pid) != pid_set.end()) { continue; + } pids.push_back(pid); pid_set.insert(pid); @@ -126,10 +131,11 @@ return pids; } -int OomScorePolicyLacros::GetCachedOomScore(base::ProcessHandle pid) { +int OomScorePolicyChromeOS::GetCachedOomScore(base::ProcessHandle pid) { auto it = oom_score_map_.find(pid); - if (it == oom_score_map_.end()) + if (it == oom_score_map_.end()) { return -1; + } return it->second; }
diff --git a/chrome/browser/performance_manager/policies/oom_score_policy_lacros.h b/chrome/browser/performance_manager/policies/oom_score_policy_chromeos.h similarity index 84% rename from chrome/browser/performance_manager/policies/oom_score_policy_lacros.h rename to chrome/browser/performance_manager/policies/oom_score_policy_chromeos.h index 9a75efa..e9d092db 100644 --- a/chrome/browser/performance_manager/policies/oom_score_policy_lacros.h +++ b/chrome/browser/performance_manager/policies/oom_score_policy_chromeos.h
@@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_BROWSER_PERFORMANCE_MANAGER_POLICIES_OOM_SCORE_POLICY_LACROS_H_ -#define CHROME_BROWSER_PERFORMANCE_MANAGER_POLICIES_OOM_SCORE_POLICY_LACROS_H_ +#ifndef CHROME_BROWSER_PERFORMANCE_MANAGER_POLICIES_OOM_SCORE_POLICY_CHROMEOS_H_ +#define CHROME_BROWSER_PERFORMANCE_MANAGER_POLICIES_OOM_SCORE_POLICY_CHROMEOS_H_ #include <vector> @@ -23,12 +23,12 @@ // would be assigned lower oom score adj. See the following web page for more // explanation on Linux oom score adj(adjust). // [1]: https://man7.org/linux/man-pages/man1/choom.1.html -class OomScorePolicyLacros : public GraphOwned { +class OomScorePolicyChromeOS : public GraphOwned { public: - OomScorePolicyLacros(); - ~OomScorePolicyLacros() override; - OomScorePolicyLacros(const OomScorePolicyLacros& other) = delete; - OomScorePolicyLacros& operator=(const OomScorePolicyLacros&) = delete; + OomScorePolicyChromeOS(); + ~OomScorePolicyChromeOS() override; + OomScorePolicyChromeOS(const OomScorePolicyChromeOS& other) = delete; + OomScorePolicyChromeOS& operator=(const OomScorePolicyChromeOS&) = delete; // GraphOwned implementation: void OnPassedToGraph(Graph* graph) override; @@ -63,10 +63,10 @@ SEQUENCE_CHECKER(sequence_checker_); - base::WeakPtrFactory<OomScorePolicyLacros> weak_factory_{this}; + base::WeakPtrFactory<OomScorePolicyChromeOS> weak_factory_{this}; }; } // namespace policies } // namespace performance_manager -#endif // CHROME_BROWSER_PERFORMANCE_MANAGER_POLICIES_OOM_SCORE_POLICY_LACROS_H_ +#endif // CHROME_BROWSER_PERFORMANCE_MANAGER_POLICIES_OOM_SCORE_POLICY_CHROMEOS_H_
diff --git a/chrome/browser/performance_manager/policies/oom_score_policy_lacros_unittest.cc b/chrome/browser/performance_manager/policies/oom_score_policy_chromeos_unittest.cc similarity index 91% rename from chrome/browser/performance_manager/policies/oom_score_policy_lacros_unittest.cc rename to chrome/browser/performance_manager/policies/oom_score_policy_chromeos_unittest.cc index bb70e98..f726fe5a 100644 --- a/chrome/browser/performance_manager/policies/oom_score_policy_lacros_unittest.cc +++ b/chrome/browser/performance_manager/policies/oom_score_policy_chromeos_unittest.cc
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/performance_manager/policies/oom_score_policy_lacros.h" +#include "chrome/browser/performance_manager/policies/oom_score_policy_chromeos.h" #include "chrome/browser/performance_manager/test_support/page_discarding_utils.h" // For GraphTestHarnessWithMockDiscarder #include "components/performance_manager/test_support/mock_graphs.h" // For TestProcessNodeImpl @@ -12,31 +12,32 @@ namespace performance_manager { namespace policies { -class MockOomScorePolicyLacros : public OomScorePolicyLacros { +class MockOomScorePolicyChromeOS : public OomScorePolicyChromeOS { public: // Overrides OnPassedToGraph to avoid starting the timer. void OnPassedToGraph(Graph* graph) override { graph_ = graph; } - void AssignOomScores() { OomScorePolicyLacros::AssignOomScores(); } + void AssignOomScores() { OomScorePolicyChromeOS::AssignOomScores(); } int GetCachedOomScore(base::ProcessId pid) { - return OomScorePolicyLacros::GetCachedOomScore(pid); + return OomScorePolicyChromeOS::GetCachedOomScore(pid); } }; -class OomScorePolicyLacrosTest +class OomScorePolicyChromeOSTest : public testing::GraphTestHarnessWithMockDiscarder { public: - OomScorePolicyLacrosTest() = default; - ~OomScorePolicyLacrosTest() override = default; - OomScorePolicyLacrosTest(const OomScorePolicyLacrosTest& other) = delete; - OomScorePolicyLacrosTest& operator=(const OomScorePolicyLacrosTest&) = delete; + OomScorePolicyChromeOSTest() = default; + ~OomScorePolicyChromeOSTest() override = default; + OomScorePolicyChromeOSTest(const OomScorePolicyChromeOSTest& other) = delete; + OomScorePolicyChromeOSTest& operator=(const OomScorePolicyChromeOSTest&) = + delete; void SetUp() override { testing::GraphTestHarnessWithMockDiscarder::SetUp(); // Create the policy and pass it to the graph. - auto policy = std::make_unique<MockOomScorePolicyLacros>(); + auto policy = std::make_unique<MockOomScorePolicyChromeOS>(); policy_ = policy.get(); graph()->PassToGraph(std::move(policy)); } @@ -46,13 +47,13 @@ testing::GraphTestHarnessWithMockDiscarder::TearDown(); } - MockOomScorePolicyLacros* policy() { return policy_; } + MockOomScorePolicyChromeOS* policy() { return policy_; } private: - raw_ptr<MockOomScorePolicyLacros> policy_; + raw_ptr<MockOomScorePolicyChromeOS, DanglingUntriaged> policy_; }; -TEST_F(OomScorePolicyLacrosTest, DistributeOomScores) { +TEST_F(OomScorePolicyChromeOSTest, DistributeOomScores) { constexpr base::ProcessId kProcessId1 = 1; constexpr base::ProcessId kProcessId2 = 2; constexpr base::ProcessId kProcessId3 = 3; @@ -109,7 +110,7 @@ ASSERT_EQ(policy()->GetCachedOomScore(0), -1); } -TEST_F(OomScorePolicyLacrosTest, DistributeOomScoresWithPriority) { +TEST_F(OomScorePolicyChromeOSTest, DistributeOomScoresWithPriority) { constexpr base::ProcessId kProcessId1 = 1; constexpr base::ProcessId kProcessId2 = 2; constexpr base::ProcessId kProcessId3 = 3; @@ -169,7 +170,7 @@ content::kLowestRendererOomScore); } -TEST_F(OomScorePolicyLacrosTest, DistributeOomScoresSharedPid) { +TEST_F(OomScorePolicyChromeOSTest, DistributeOomScoresSharedPid) { constexpr base::ProcessId kProcessId1 = 1; constexpr base::ProcessId kProcessId2 = 2; constexpr base::ProcessId kProcessId3 = 3;
diff --git a/chrome/browser/picture_in_picture/auto_picture_in_picture_tab_helper.cc b/chrome/browser/picture_in_picture/auto_picture_in_picture_tab_helper.cc index 7c8fe811..54b34e0 100644 --- a/chrome/browser/picture_in_picture/auto_picture_in_picture_tab_helper.cc +++ b/chrome/browser/picture_in_picture/auto_picture_in_picture_tab_helper.cc
@@ -183,6 +183,12 @@ return false; } + // Only https:// or file:// may autopip. + const GURL url = web_contents()->GetLastCommittedURL(); + if (!url.SchemeIs(url::kHttpsScheme) && !url.SchemeIsFile()) { + return false; + } + // The website must have registered for autopip. if (!is_enter_auto_picture_in_picture_available_) { return false;
diff --git a/chrome/browser/picture_in_picture/auto_picture_in_picture_tab_helper.h b/chrome/browser/picture_in_picture/auto_picture_in_picture_tab_helper.h index 96851a6d..9cb7ca1d 100644 --- a/chrome/browser/picture_in_picture/auto_picture_in_picture_tab_helper.h +++ b/chrome/browser/picture_in_picture/auto_picture_in_picture_tab_helper.h
@@ -79,6 +79,8 @@ private: explicit AutoPictureInPictureTabHelper(content::WebContents* web_contents); friend class content::WebContentsUserData<AutoPictureInPictureTabHelper>; + FRIEND_TEST_ALL_PREFIXES(AutoPictureInPictureTabHelperBrowserTest, + CannotAutopipViaHttp); void MaybeEnterAutoPictureInPicture();
diff --git a/chrome/browser/picture_in_picture/auto_picture_in_picture_tab_helper_browsertest.cc b/chrome/browser/picture_in_picture/auto_picture_in_picture_tab_helper_browsertest.cc index aeaf99a..8af9a00 100644 --- a/chrome/browser/picture_in_picture/auto_picture_in_picture_tab_helper_browsertest.cc +++ b/chrome/browser/picture_in_picture/auto_picture_in_picture_tab_helper_browsertest.cc
@@ -18,6 +18,7 @@ #include "components/content_settings/core/browser/host_content_settings_map.h" #include "content/public/browser/media_session.h" #include "content/public/browser/media_session_service.h" +#include "content/public/browser/navigation_entry.h" #include "content/public/test/browser_test.h" #include "content/public/test/media_start_stop_observer.h" #include "media/base/media_switches.h" @@ -246,6 +247,12 @@ url, url, ContentSettingsType::AUTO_PICTURE_IN_PICTURE, setting); } + void OverrideURL(const GURL& url) { + // Lie about the URL. + auto* web_contents = browser()->tab_strip_model()->GetActiveWebContents(); + web_contents->GetController().GetVisibleEntry()->SetVirtualURL(url); + } + protected: virtual std::vector<base::test::FeatureRef> GetEnabledFeatures() { return {blink::features::kDocumentPictureInPictureAPI, @@ -311,6 +318,34 @@ /*should_document_pip=*/true); } +IN_PROC_BROWSER_TEST_F(AutoPictureInPictureTabHelperBrowserTest, + CannotAutopipViaHttp) { + // Load a page that registers for autopip and starts using camera/microphone. + LoadCameraMicrophonePage(browser()); + auto* web_contents = browser()->tab_strip_model()->GetActiveWebContents(); + GetUserMediaAndAccept(web_contents); + + // Since it's hard to test that autopip is not triggered, settle to make sure + // that the tab helper switches from "okay" to "not okay". + auto* tab_helper = + AutoPictureInPictureTabHelper::FromWebContents(web_contents); + ASSERT_NE(nullptr, tab_helper); + EXPECT_TRUE(tab_helper->IsEligibleForAutoPictureInPicture()); + OverrideURL(GURL("http://should.not.work.com")); + EXPECT_FALSE(tab_helper->IsEligibleForAutoPictureInPicture()); +} + +IN_PROC_BROWSER_TEST_F(AutoPictureInPictureTabHelperBrowserTest, + CanAutopipViaHttps) { + // Load a page that registers for autopip and starts using camera/microphone. + LoadCameraMicrophonePage(browser()); + GetUserMediaAndAccept(browser()->tab_strip_model()->GetActiveWebContents()); + OverrideURL(GURL("https://should.work.great.com")); + + SwitchToNewTabAndBackAndExpectAutopip(/*should_video_pip=*/false, + /*should_document_pip=*/true); +} + IN_PROC_BROWSER_TEST_F(AutoPictureInPictureWithVideoPlaybackBrowserTest, DoesNotAutopipWithoutPlayback) { // Load a page that registers for autopip but doesn't start playback. @@ -388,8 +423,15 @@ EXPECT_TRUE(original_web_contents->HasPictureInPictureDocument()); } +// TODO(crbug.com/1485641): Re-enable after resolving flakiness. +#if BUILDFLAG(IS_CHROMEOS) && defined(MEMORY_SANITIZER) +#define MAYBE_ShowsMostRecentlyHiddenTab \ + DISABLED_ShowsMostRecentlyHiddenTab +#else +#define MAYBE_ShowsMostRecentlyHiddenTab ShowsMostRecentlyHiddenTab +#endif IN_PROC_BROWSER_TEST_F(AutoPictureInPictureTabHelperBrowserTest, - ShowsMostRecentlyHiddenTab) { + MAYBE_ShowsMostRecentlyHiddenTab) { // Load a page that registers for autopip. LoadCameraMicrophonePage(browser()); auto* original_web_contents =
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc index 4cefcde..7fa2ba1 100644 --- a/chrome/browser/prefs/browser_prefs.cc +++ b/chrome/browser/prefs/browser_prefs.cc
@@ -85,6 +85,7 @@ #include "chrome/browser/ui/tabs/pinned_tab_codec.h" #include "chrome/browser/ui/toolbar/chrome_labs_prefs.h" #include "chrome/browser/ui/toolbar/chrome_location_bar_model_delegate.h" +#include "chrome/browser/ui/toolbar/toolbar_pref_names.h" #include "chrome/browser/ui/user_education/browser_feature_promo_storage_service.h" #include "chrome/browser/ui/webui/bookmarks/bookmark_prefs.h" #include "chrome/browser/ui/webui/flags/flags_ui.h" @@ -1727,7 +1728,9 @@ browser_sync::ForeignSessionHandler::RegisterProfilePrefs(registry); BrowserFeaturePromoStorageService::RegisterProfilePrefs(registry); captions::LiveTranslateController::RegisterProfilePrefs(registry); + CartService::RegisterProfilePrefs(registry); ChromeAuthenticatorRequestDelegate::RegisterProfilePrefs(registry); + commerce::ShoppingListUiTabHelper::RegisterProfilePrefs(registry); companion::PromoHandler::RegisterProfilePrefs(registry); DeviceServiceImpl::RegisterProfilePrefs(registry); DevToolsWindow::RegisterProfilePrefs(registry); @@ -1751,6 +1754,7 @@ plus_addresses::RegisterProfilePrefs(registry); policy::DeveloperToolsPolicyHandler::RegisterProfilePrefs(registry); PromoService::RegisterProfilePrefs(registry); + RecipesService::RegisterProfilePrefs(registry); RegisterReadAnythingProfilePrefs(registry); RegisterSafetyHubProfilePrefs(registry); settings::SettingsUI::RegisterProfilePrefs(registry); @@ -1759,11 +1763,10 @@ StartupBrowserCreator::RegisterProfilePrefs(registry); tab_search_prefs::RegisterProfilePrefs(registry); ThemeColorPickerHandler::RegisterProfilePrefs(registry); - RecipesService::RegisterProfilePrefs(registry); + toolbar::RegisterProfilePrefs(registry); UnifiedAutoplayConfig::RegisterProfilePrefs(registry); - CartService::RegisterProfilePrefs(registry); - commerce::ShoppingListUiTabHelper::RegisterProfilePrefs(registry); user_notes::RegisterProfilePrefs(registry); + #if !BUILDFLAG(IS_CHROMEOS_LACROS) captions::LiveCaptionController::RegisterProfilePrefs(registry); #endif // !BUILDFLAG(IS_CHROMEOS_LACROS)
diff --git a/chrome/browser/prefs/chrome_pref_model_associator_client.cc b/chrome/browser/prefs/chrome_pref_model_associator_client.cc index b97db7e..3e9c71c 100644 --- a/chrome/browser/prefs/chrome_pref_model_associator_client.cc +++ b/chrome/browser/prefs/chrome_pref_model_associator_client.cc
@@ -7,6 +7,8 @@ #include <cstdint> #include "base/check_is_test.h" +#include "base/memory/singleton.h" +#include "chrome/browser/ui/toolbar/toolbar_pref_names.h" #include "chrome/common/pref_names.h" #include "components/content_settings/core/browser/website_settings_info.h" #include "components/content_settings/core/browser/website_settings_registry.h" @@ -16,13 +18,14 @@ #include "base/json/values_util.h" #endif // BUILDFLAG(IS_CHROMEOS_ASH) -ChromePrefModelAssociatorClient::ChromePrefModelAssociatorClient() {} +ChromePrefModelAssociatorClient::ChromePrefModelAssociatorClient() = default; -ChromePrefModelAssociatorClient::~ChromePrefModelAssociatorClient() {} +ChromePrefModelAssociatorClient::~ChromePrefModelAssociatorClient() = default; bool ChromePrefModelAssociatorClient::IsMergeableListPreference( const std::string& pref_name) const { - return pref_name == prefs::kURLsToRestoreOnStartup; + return (pref_name == prefs::kURLsToRestoreOnStartup) || + (pref_name == prefs::kPinnedActions); } bool ChromePrefModelAssociatorClient::IsMergeableDictionaryPreference(
diff --git a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc index 97eae0b8..4eb78a17 100644 --- a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc +++ b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
@@ -175,6 +175,7 @@ #include "chrome/browser/sync/user_event_service_factory.h" #include "chrome/browser/themes/theme_service_factory.h" #include "chrome/browser/tpcd/experiment/eligibility_service_factory.h" +#include "chrome/browser/tpcd/metadata/updater_service_factory.h" #include "chrome/browser/translate/translate_model_service_factory.h" #include "chrome/browser/translate/translate_ranker_factory.h" #include "chrome/browser/ui/cookie_controls/cookie_controls_service_factory.h" @@ -1113,6 +1114,7 @@ #endif TopSitesFactory::GetInstance(); tpcd::experiment::EligibilityServiceFactory::GetInstance(); + tpcd::metadata::UpdaterServiceFactory::GetInstance(); TrackingProtectionOnboardingFactory::GetInstance(); TrackingProtectionSettingsFactory::GetInstance(); translate::TranslateRankerFactory::GetInstance();
diff --git a/chrome/browser/readaloud/android/BUILD.gn b/chrome/browser/readaloud/android/BUILD.gn index c1d9025..b65bffa 100644 --- a/chrome/browser/readaloud/android/BUILD.gn +++ b/chrome/browser/readaloud/android/BUILD.gn
@@ -6,7 +6,6 @@ android_library("java") { sources = [ - "java/src/org/chromium/chrome/browser/readaloud/PlayerController.java", "java/src/org/chromium/chrome/browser/readaloud/ReadAloudController.java", "java/src/org/chromium/chrome/browser/readaloud/ReadAloudFeatures.java", "java/src/org/chromium/chrome/browser/readaloud/ReadAloudToolbarButtonController.java", @@ -19,6 +18,7 @@ ":expanded_player_java", ":hooks_java", ":java_resources", + ":player_java", ":player_state_java", "//base:base_java", "//chrome/android:chrome_app_java_resources", @@ -97,7 +97,6 @@ robolectric_library("junit") { testonly = true sources = [ - "java/src/org/chromium/chrome/browser/readaloud/PlayerControllerUnitTest.java", "java/src/org/chromium/chrome/browser/readaloud/ReadAloudControllerUnitTest.java", "java/src/org/chromium/chrome/browser/readaloud/ReadAloudToolbarButtonControllerUnitTest.java", "java/src/org/chromium/chrome/browser/readaloud/expandedplayer/ExpandedPlayerCoordinatorUnitTest.java", @@ -111,6 +110,7 @@ ":hooks_java", ":java", ":java_resources", + ":player_junit_java", ":player_state_java", "//base:base_java", "//base:base_java_test_support", @@ -164,3 +164,46 @@ [ "java/src/org/chromium/chrome/browser/readaloud/PlayerState.java" ] deps = [ "//third_party/androidx:androidx_annotation_annotation_java" ] } + +android_library("player_java") { + sources = [ + "java/src/org/chromium/chrome/browser/readaloud/player/InteractionHandler.java", + "java/src/org/chromium/chrome/browser/readaloud/player/PlayerCoordinator.java", + "java/src/org/chromium/chrome/browser/readaloud/player/PlayerMediator.java", + "java/src/org/chromium/chrome/browser/readaloud/player/PlayerProperties.java", + "java/src/org/chromium/chrome/browser/readaloud/player/VisibilityState.java", + ] + deps = [ + ":java_resources", + "//base:base_java", + "//chrome/android:chrome_app_java_resources", + "//chrome/android/modules/readaloud/public:java", + "//chrome/browser/ui/android/strings:ui_strings_grd", + "//components/browser_ui/bottomsheet/android:java", + "//third_party/android_deps:material_design_java", + "//third_party/androidx:androidx_annotation_annotation_java", + "//third_party/androidx:androidx_appcompat_appcompat_java", + "//ui/android:ui_java_resources", + "//ui/android:ui_no_recycler_view_java", + ] + resources_package = "org.chromium.chrome.browser.readaloud.player" +} + +robolectric_library("player_junit_java") { + testonly = true + sources = [ "java/src/org/chromium/chrome/browser/readaloud/player/PlayerCoordinatorUnitTest.java" ] + deps = [ + ":player_java", + "//base:base_java", + "//base:base_java_test_support", + "//base:base_junit_test_support", + "//chrome/android/modules/readaloud/public:java", + "//chrome/browser/tab:java", + "//components/browser_ui/bottomsheet/android:java", + "//third_party/androidx:androidx_test_core_java", + "//third_party/androidx:androidx_test_ext_junit_java", + "//third_party/junit:junit", + "//third_party/mockito:mockito_java", + "//ui/android:ui_no_recycler_view_java", + ] +}
diff --git a/chrome/browser/readaloud/android/java/src/org/chromium/chrome/browser/readaloud/PlayerController.java b/chrome/browser/readaloud/android/java/src/org/chromium/chrome/browser/readaloud/PlayerController.java deleted file mode 100644 index b29fdd3..0000000 --- a/chrome/browser/readaloud/android/java/src/org/chromium/chrome/browser/readaloud/PlayerController.java +++ /dev/null
@@ -1,117 +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. - -package org.chromium.chrome.browser.readaloud; - -import org.chromium.base.Log; -import org.chromium.chrome.browser.readaloud.miniplayer.MiniPlayerCoordinator; -import org.chromium.chrome.browser.tab.Tab; -import org.chromium.chrome.modules.readaloud.ExpandedPlayer; -import org.chromium.chrome.modules.readaloud.Playback; - -/** - * Class that controls and coordinates the mini and expanded player UI. - * - * The expanded player is a full-width bottom sheet that will completely obscure - * the mini player if it's showing. Since showing or hiding the mini player - * requires resizing web contents which is expensive and laggy, we will leave - * the mini player on screen when the expanded player is shown. - * - * States: - * A. no players shown - * B. mini player visible - * C. expanded player open and mini player visible (behind expanded player) - */ -class PlayerController { - private static final String TAG = "RAPlayerCtrlr"; - private final ExpandedPlayer mExpandedPlayer; - private final ExpandedPlayer.Observer mExpandedPlayerObserver; - private final MiniPlayerCoordinator mMiniPlayer; - private final MiniPlayerCoordinator.Observer mMiniPlayerObserver; - - private Tab mPlayingTab; - private Playback mPlayback; - - public PlayerController(MiniPlayerCoordinator miniPlayer, ExpandedPlayer expandedPlayer) { - mExpandedPlayer = expandedPlayer; - mExpandedPlayerObserver = new ExpandedPlayer.Observer() { - @Override - public void onCloseClicked() { - stopAndHideAll(); - } - }; - mExpandedPlayer.addObserver(mExpandedPlayerObserver); - - mMiniPlayer = miniPlayer; - mMiniPlayerObserver = new MiniPlayerCoordinator.Observer() { - @Override - public void onExpandRequested() { - mExpandedPlayer.show(mPlayback); - // Don't bother hiding the mini player because it will be covered and hiding is - // expensive. - } - @Override - public void onCloseClicked() { - stopAndHideAll(); - } - }; - mMiniPlayer.addObserver(mMiniPlayerObserver); - } - - /** Stop playback and stop tracking players. */ - public void destroy() { - stopAndHideAll(); - mExpandedPlayer.removeObserver(mExpandedPlayerObserver); - mMiniPlayer.removeObserver(mMiniPlayerObserver); - } - - /** - * Show the mini player, called when playback is requested. - * @param tab Tab to be played. - */ - public void playTabRequested(Tab tab) { - mPlayingTab = tab; - mMiniPlayer.show(shouldAnimateMiniPlayer(), /* playback= */ null); - } - - /** - * Update players when playback is ready. - * @param playback New Playback object. - */ - public void playbackReady(Playback playback) { - mPlayback = playback; - // Show the players with the new Playback if they are supposed to be showing. - if (isShowing(mExpandedPlayer.getState())) { - mExpandedPlayer.show(mPlayback); - } - if (isShowing(mMiniPlayer.getState())) { - mMiniPlayer.show(shouldAnimateMiniPlayer(), mPlayback); - } - } - - /** Update players when playback fails. */ - public void playbackFailed() { - Log.e(TAG, "PlayerController.playbackFailed() not implemented."); - } - - /** Kill playback and hide players. */ - public void stopAndHideAll() { - if (mPlayback != null) { - // TODO make sure everything holding this Playback knows it's been released - mPlayback.release(); - } - mMiniPlayer.dismiss(shouldAnimateMiniPlayer()); - mExpandedPlayer.dismiss(); - } - - private boolean shouldAnimateMiniPlayer() { - // If the expanded player is definitely covering the mini player, we can skip - // animating the mini player show and hide. - return mExpandedPlayer.getState() != PlayerState.VISIBLE; - } - - private static boolean isShowing(@PlayerState int state) { - return state == PlayerState.SHOWING || state == PlayerState.VISIBLE; - } -}
diff --git a/chrome/browser/readaloud/android/java/src/org/chromium/chrome/browser/readaloud/PlayerControllerUnitTest.java b/chrome/browser/readaloud/android/java/src/org/chromium/chrome/browser/readaloud/PlayerControllerUnitTest.java deleted file mode 100644 index 4e10acd..0000000 --- a/chrome/browser/readaloud/android/java/src/org/chromium/chrome/browser/readaloud/PlayerControllerUnitTest.java +++ /dev/null
@@ -1,181 +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. - -package org.chromium.chrome.browser.readaloud; - -import static org.mockito.Mockito.any; -import static org.mockito.Mockito.doReturn; -import static org.mockito.Mockito.eq; -import static org.mockito.Mockito.never; -import static org.mockito.Mockito.times; -import static org.mockito.Mockito.verify; - -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.ArgumentCaptor; -import org.mockito.Captor; -import org.mockito.Mock; -import org.mockito.MockitoAnnotations; -import org.robolectric.annotation.Config; - -import org.chromium.base.test.BaseRobolectricTestRunner; -import org.chromium.chrome.browser.readaloud.miniplayer.MiniPlayerCoordinator; -import org.chromium.chrome.browser.tab.Tab; -import org.chromium.chrome.modules.readaloud.ExpandedPlayer; -import org.chromium.chrome.modules.readaloud.Playback; - -/** Unit tests for {@link ReadAloudController}. */ -@RunWith(BaseRobolectricTestRunner.class) -@Config(manifest = Config.NONE) -public class PlayerControllerUnitTest { - @Mock - private MiniPlayerCoordinator mMiniPlayer; - @Mock - private ExpandedPlayer mExpandedPlayer; - @Mock - private Tab mTab; - @Mock - private Playback mPlayback; - - @Captor - ArgumentCaptor<MiniPlayerCoordinator.Observer> mMiniObserverCaptor; - @Captor - ArgumentCaptor<ExpandedPlayer.Observer> mExpandedObserverCaptor; - - private PlayerController mPlayerController; - - @Before - public void setUp() { - MockitoAnnotations.initMocks(this); - mPlayerController = new PlayerController(mMiniPlayer, mExpandedPlayer); - } - - @Test - public void testPlaybackRequested_expandedPlayerGone() { - doReturn(PlayerState.GONE).when(mExpandedPlayer).getState(); - - mPlayerController.playTabRequested(null); - verify(mMiniPlayer, times(1)).show(/*animate=*/eq(true), /*playback=*/eq(null)); - } - - @Test - public void testPlaybackRequested_expandedPlayerShowing() { - doReturn(PlayerState.SHOWING).when(mExpandedPlayer).getState(); - - mPlayerController.playTabRequested(null); - verify(mMiniPlayer, times(1)).show(/*animate=*/eq(true), /*playback=*/eq(null)); - } - - @Test - public void testPlaybackRequested_expandedPlayerHiding() { - doReturn(PlayerState.HIDING).when(mExpandedPlayer).getState(); - - mPlayerController.playTabRequested(null); - verify(mMiniPlayer, times(1)).show(/*animate=*/eq(true), /*playback=*/eq(null)); - } - - @Test - public void testPlaybackRequested_expandedPlayerVisible() { - doReturn(PlayerState.VISIBLE).when(mExpandedPlayer).getState(); - - mPlayerController.playTabRequested(null); - verify(mMiniPlayer, times(1)).show(/*animate=*/eq(false), /*playback=*/eq(null)); - } - - @Test - public void testPlaybackReady_expandedPlayerShowingOrVisible() { - doReturn(PlayerState.SHOWING).when(mExpandedPlayer).getState(); - - mPlayerController.playbackReady(mPlayback); - verify(mExpandedPlayer, times(1)).show(eq(mPlayback)); - - doReturn(PlayerState.VISIBLE).when(mExpandedPlayer).getState(); - - mPlayerController.playbackReady(mPlayback); - verify(mExpandedPlayer, times(2)).show(eq(mPlayback)); - } - - @Test - public void testPlaybackReady_expandedPlayerHidingOrGone() { - doReturn(PlayerState.HIDING).when(mExpandedPlayer).getState(); - - mPlayerController.playbackReady(mPlayback); - verify(mExpandedPlayer, never()).show(any()); - - doReturn(PlayerState.GONE).when(mExpandedPlayer).getState(); - - mPlayerController.playbackReady(mPlayback); - verify(mExpandedPlayer, never()).show(any()); - } - - @Test - public void testPlaybackReady_miniPlayerShowingOrVisible() { - doReturn(PlayerState.GONE).when(mExpandedPlayer).getState(); - doReturn(PlayerState.SHOWING).when(mMiniPlayer).getState(); - - mPlayerController.playbackReady(mPlayback); - verify(mMiniPlayer, times(1)).show(eq(true), eq(mPlayback)); - - doReturn(PlayerState.VISIBLE).when(mMiniPlayer).getState(); - - mPlayerController.playbackReady(mPlayback); - verify(mMiniPlayer, times(2)).show(eq(true), eq(mPlayback)); - } - - @Test - public void testPlaybackReady_miniPlayerHidingOrGone() { - doReturn(PlayerState.GONE).when(mExpandedPlayer).getState(); - doReturn(PlayerState.HIDING).when(mMiniPlayer).getState(); - - mPlayerController.playbackReady(mPlayback); - verify(mMiniPlayer, never()).show(eq(true), eq(mPlayback)); - - doReturn(PlayerState.GONE).when(mMiniPlayer).getState(); - - mPlayerController.playbackReady(mPlayback); - verify(mMiniPlayer, never()).show(eq(true), eq(mPlayback)); - } - - @Test - public void testStopAndHideAll() { - doReturn(PlayerState.GONE).when(mExpandedPlayer).getState(); - - mPlayerController.playbackReady(mPlayback); - mPlayerController.stopAndHideAll(); - verify(mPlayback, times(1)).release(); - verify(mMiniPlayer, times(1)).dismiss(eq(true)); - verify(mExpandedPlayer, times(1)).dismiss(); - } - - @Test - public void testMiniPlayerRequestClose() { - verify(mMiniPlayer).addObserver(mMiniObserverCaptor.capture()); - doReturn(PlayerState.GONE).when(mExpandedPlayer).getState(); - - mMiniObserverCaptor.getValue().onCloseClicked(); - verify(mMiniPlayer, times(1)).dismiss(eq(true)); - } - - @Test - public void testExpandedPlayerRequestClose() { - verify(mExpandedPlayer).addObserver(mExpandedObserverCaptor.capture()); - doReturn(PlayerState.VISIBLE).when(mMiniPlayer).getState(); - doReturn(PlayerState.VISIBLE).when(mExpandedPlayer).getState(); - - mExpandedObserverCaptor.getValue().onCloseClicked(); - verify(mMiniPlayer, times(1)).dismiss(eq(false)); - verify(mExpandedPlayer, times(1)).dismiss(); - } - - @Test - public void testMiniPlayerRequestExpand() { - verify(mMiniPlayer).addObserver(mMiniObserverCaptor.capture()); - doReturn(PlayerState.GONE).when(mExpandedPlayer).getState(); - mPlayerController.playbackReady(mPlayback); - - mMiniObserverCaptor.getValue().onExpandRequested(); - verify(mExpandedPlayer, times(1)).show(eq(mPlayback)); - } -}
diff --git a/chrome/browser/readaloud/android/java/src/org/chromium/chrome/browser/readaloud/ReadAloudController.java b/chrome/browser/readaloud/android/java/src/org/chromium/chrome/browser/readaloud/ReadAloudController.java index 8fcf7d85..77d1196 100644 --- a/chrome/browser/readaloud/android/java/src/org/chromium/chrome/browser/readaloud/ReadAloudController.java +++ b/chrome/browser/readaloud/android/java/src/org/chromium/chrome/browser/readaloud/ReadAloudController.java
@@ -16,6 +16,7 @@ import org.chromium.chrome.browser.profiles.Profile; import org.chromium.chrome.browser.readaloud.expandedplayer.ExpandedPlayerCoordinator; import org.chromium.chrome.browser.readaloud.miniplayer.MiniPlayerCoordinator; +import org.chromium.chrome.browser.readaloud.player.PlayerCoordinator; import org.chromium.chrome.browser.signin.services.UnifiedConsentServiceBridge; import org.chromium.chrome.browser.tab.Tab; import org.chromium.chrome.browser.tabmodel.TabModel; @@ -45,7 +46,7 @@ private final TabModel mTabModel; private final MiniPlayerCoordinator mMiniPlayer; private final ExpandedPlayer mExpandedPlayer; - private final PlayerController mPlayerController; + private final PlayerCoordinator mPlayerCoordinator; private TabModelTabObserver mTabObserver; private final ReadAloudReadabilityHooks mReadabilityHooks; @@ -87,7 +88,7 @@ : new ReadAloudReadabilityHooksImpl(context, ReadAloudFeatures.getApiKeyOverride()); mMiniPlayer = new MiniPlayerCoordinator(miniPlayerStub); mExpandedPlayer = new ExpandedPlayerCoordinator(context, bottomSheetController); - mPlayerController = new PlayerController(mMiniPlayer, mExpandedPlayer); + mPlayerCoordinator = new PlayerCoordinator(context); if (mReadabilityHooks.isEnabled()) { mTabObserver = new TabModelTabObserver(mTabModel) { @Override @@ -173,10 +174,10 @@ PlaybackArgs args = new PlaybackArgs(tab.getUrl().getSpec(), TranslateBridge.getCurrentLanguage(tab), /* voice=*/null, /* dateModifiedMsSinceEpock=*/0); - // TODO request playback here and call mPlayerController.playbackReady() + // TODO request playback here and call mPlayerCoordinator.playbackReady() // Notify player UI that playback is happening soon. - mPlayerController.playTabRequested(tab); + mPlayerCoordinator.playTabRequested(); } /** @@ -197,7 +198,7 @@ mTabObserver.destroy(); } // Stop playback and hide players. - mPlayerController.destroy(); + mPlayerCoordinator.destroy(); } @VisibleForTesting(otherwise = VisibleForTesting.PACKAGE_PRIVATE)
diff --git a/chrome/browser/readaloud/android/java/src/org/chromium/chrome/browser/readaloud/player/InteractionHandler.java b/chrome/browser/readaloud/android/java/src/org/chromium/chrome/browser/readaloud/player/InteractionHandler.java new file mode 100644 index 0000000..299e0d5 --- /dev/null +++ b/chrome/browser/readaloud/android/java/src/org/chromium/chrome/browser/readaloud/player/InteractionHandler.java
@@ -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. + +package org.chromium.chrome.browser.readaloud.player; + +import android.widget.SeekBar; + +import org.chromium.chrome.modules.readaloud.PlaybackArgs.PlaybackVoice; + +/** Callbacks for player buttons and seek bar. */ +public interface InteractionHandler { + /** Called when the play/pause button is clicked. */ + void onPlayPauseClick(); + + /** Called when the "X" button is clicked. */ + void onCloseClick(); + + /** Called when the expanded player publisher button is clicked. */ + void onPublisherClick(); + + /** Called when the seek back button is clicked. */ + void onSeekBackClick(); + + /** Called when the seek forward button is clicked. */ + void onSeekForwardClick(); + + /** + * Called when a playback voice is chosen. + * @param voice Selected voice. + */ + void onVoiceSelected(PlaybackVoice voice); + + /** + * Called when a voice's "preview voice" button is clicked. + * @param voice Voice to preview. + */ + void onPreviewVoiceClick(PlaybackVoice voice); + + /** + * Called when the "highlighting enabled" toggle switch is changed. + * @param enabled Value of switch. + */ + void onHighlightingChange(boolean enabled); + + /** Listener for seek bar events. */ + SeekBar.OnSeekBarChangeListener getSeekBarChangeListener(); + + /** + * Called when the user changes the playback speed. + * @param newSpeed New speed. + */ + void onSpeedChange(float newSpeed); + + /** + * Called when the user picks a language in the player's translate menu. + * @param targetLanguage Language to translate to. + */ + void onTranslateLanguageChange(String targetLanguage); + + /** Called when the user taps somewhere on the mini player to expand it. */ + void onMiniPlayerExpandClick(); +}
diff --git a/chrome/browser/readaloud/android/java/src/org/chromium/chrome/browser/readaloud/player/PlayerCoordinator.java b/chrome/browser/readaloud/android/java/src/org/chromium/chrome/browser/readaloud/player/PlayerCoordinator.java new file mode 100644 index 0000000..fbc9e71 --- /dev/null +++ b/chrome/browser/readaloud/android/java/src/org/chromium/chrome/browser/readaloud/player/PlayerCoordinator.java
@@ -0,0 +1,114 @@ +// 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.chrome.browser.readaloud.player; + +import android.content.Context; + +import org.chromium.base.ObserverList; +import org.chromium.chrome.modules.readaloud.Playback; +import org.chromium.chrome.modules.readaloud.PlaybackListener; +import org.chromium.ui.modelutil.PropertyModel; + +/** + * Class that controls and coordinates the mini and expanded player UI. + * + * The expanded player is a full-width bottom sheet that will completely obscure + * the mini player if it's showing. Since showing or hiding the mini player + * requires resizing web contents which is expensive and laggy, we will leave + * the mini player on screen when the expanded player is shown. + * + * States: + * A. no players shown + * B. mini player visible + * C. expanded player open and mini player visible (behind expanded player) + * + */ +public class PlayerCoordinator { + private static final String TAG = "ReadAloudPlayer"; + + private final ObserverList<Observer> mObserverList; + private final PropertyModel mModel; + private final PlayerMediator mMediator; + + public interface Observer { + /* + * Called when the user dismisses the player. The observer is responsible for + * then calling dismissPlayers(). + */ + void onRequestClosePlayers(); + } + + public PlayerCoordinator(Context context) { + mObserverList = new ObserverList<Observer>(); + mModel = new PropertyModel.Builder(PlayerProperties.ALL_KEYS).build(); + mMediator = new PlayerMediator(/*coordinator=*/this, mModel); + } + + /** + * Add an observer to receive event updates. + * + * @param observer Observer to add. + */ + public void addObserver(Observer observer) { + mObserverList.addObserver(observer); + } + + /** + * Remove an observer that was previously added. No effect if the observer was + * never added. + */ + public void removeObserver(Observer observer) { + mObserverList.removeObserver(observer); + } + + /** Stop playback and stop tracking players. */ + public void destroy() { + dismissPlayers(); + mMediator.destroy(); + } + + /** + * Show the mini player, called when playback is requested. + */ + public void playTabRequested() { + // TODO implement + } + + /** + * Update players when playback is ready. + * + * @param playback New Playback object. + * @param currentPlaybackState Playback state. + */ + public void playbackReady(Playback playback, @PlaybackListener.State int currentPlaybackState) { + // TODO implement + } + + /** Update players when playback fails. */ + public void playbackFailed() { + // TODO implement + } + + /** Show expanded player. */ + void expand() { + // TODO implement + } + + /** Hide players. */ + public void dismissPlayers() { + // TODO implement + } + + /** To be called when the close button is clicked. */ + void closeClicked() { + for (Observer o : mObserverList) { + o.onRequestClosePlayers(); + } + } + + PropertyModel getModelForTesting() { + return mModel; + } +}
diff --git a/chrome/browser/readaloud/android/java/src/org/chromium/chrome/browser/readaloud/player/PlayerCoordinatorUnitTest.java b/chrome/browser/readaloud/android/java/src/org/chromium/chrome/browser/readaloud/player/PlayerCoordinatorUnitTest.java new file mode 100644 index 0000000..e7c0e86 --- /dev/null +++ b/chrome/browser/readaloud/android/java/src/org/chromium/chrome/browser/readaloud/player/PlayerCoordinatorUnitTest.java
@@ -0,0 +1,37 @@ +// 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.chrome.browser.readaloud.player; + +import static org.junit.Assert.assertNotNull; + +import androidx.test.core.app.ApplicationProvider; + +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.MockitoAnnotations; +import org.robolectric.annotation.Config; + +import org.chromium.base.test.BaseRobolectricTestRunner; +import org.chromium.ui.modelutil.PropertyModel; + +/** Unit tests for {@link PlayerCoordinator}. */ +@RunWith(BaseRobolectricTestRunner.class) +@Config(manifest = Config.NONE) +public class PlayerCoordinatorUnitTest { + private PlayerCoordinator mPlayerCoordinator; + private PropertyModel mModel; + + @Before + public void setUp() { + MockitoAnnotations.initMocks(this); + mPlayerCoordinator = new PlayerCoordinator(ApplicationProvider.getApplicationContext()); + mModel = mPlayerCoordinator.getModelForTesting(); + } + + @Test + public void testInitialModelState() { + assertNotNull(mModel.get(PlayerProperties.INTERACTION_HANDLER)); + } +}
diff --git a/chrome/browser/readaloud/android/java/src/org/chromium/chrome/browser/readaloud/player/PlayerMediator.java b/chrome/browser/readaloud/android/java/src/org/chromium/chrome/browser/readaloud/player/PlayerMediator.java new file mode 100644 index 0000000..08b00b80 --- /dev/null +++ b/chrome/browser/readaloud/android/java/src/org/chromium/chrome/browser/readaloud/player/PlayerMediator.java
@@ -0,0 +1,81 @@ +// 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.chrome.browser.readaloud.player; + +import android.widget.SeekBar.OnSeekBarChangeListener; + +import androidx.annotation.Nullable; + +import org.chromium.chrome.modules.readaloud.Playback; +import org.chromium.chrome.modules.readaloud.PlaybackArgs.PlaybackVoice; +import org.chromium.chrome.modules.readaloud.PlaybackListener; +import org.chromium.ui.modelutil.PropertyModel; + +/** Mediator class in charge of updating player UI property model. */ +class PlayerMediator implements InteractionHandler { + private final PlayerCoordinator mCoordinator; + private final PropertyModel mModel; + + PlayerMediator(PlayerCoordinator coordinator, PropertyModel model) { + mCoordinator = coordinator; + mModel = model; + mModel.set(PlayerProperties.INTERACTION_HANDLER, this); + } + + void destroy() { + // TODO implement + } + + void setPlayback( + @Nullable Playback playback, @PlaybackListener.State int currentPlaybackState) { + // TODO implement + } + + void updateTitleAndPublisher(String title, String publisher) { + // TODO implement + } + + // InteractionHandler implementation + @Override + public void onPlayPauseClick() {} + + @Override + public void onCloseClick() { + mCoordinator.closeClicked(); + } + + @Override + public void onPublisherClick() {} + + @Override + public void onSeekBackClick() {} + + @Override + public void onSeekForwardClick() {} + + @Override + public void onVoiceSelected(PlaybackVoice voice) {} + + @Override + public void onPreviewVoiceClick(PlaybackVoice voice) {} + + @Override + public void onHighlightingChange(boolean enabled) {} + + @Override + public OnSeekBarChangeListener getSeekBarChangeListener() { + // TODO implement + return null; + } + + @Override + public void onSpeedChange(float newSpeed) {} + + @Override + public void onTranslateLanguageChange(String targetLanguage) {} + + @Override + public void onMiniPlayerExpandClick() {} +}
diff --git a/chrome/browser/readaloud/android/java/src/org/chromium/chrome/browser/readaloud/player/PlayerProperties.java b/chrome/browser/readaloud/android/java/src/org/chromium/chrome/browser/readaloud/player/PlayerProperties.java new file mode 100644 index 0000000..43c873c --- /dev/null +++ b/chrome/browser/readaloud/android/java/src/org/chromium/chrome/browser/readaloud/player/PlayerProperties.java
@@ -0,0 +1,17 @@ +// 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.chrome.browser.readaloud.player; + +import org.chromium.ui.modelutil.PropertyKey; +import org.chromium.ui.modelutil.PropertyModel.WritableObjectPropertyKey; + +/** Keys for Read Aloud player model properties. */ +class PlayerProperties { + public static final WritableObjectPropertyKey<InteractionHandler> INTERACTION_HANDLER = + new WritableObjectPropertyKey<>(); + public static final PropertyKey[] ALL_KEYS = { + INTERACTION_HANDLER // + }; +}
diff --git a/chrome/browser/readaloud/android/java/src/org/chromium/chrome/browser/readaloud/player/VisibilityState.java b/chrome/browser/readaloud/android/java/src/org/chromium/chrome/browser/readaloud/player/VisibilityState.java new file mode 100644 index 0000000..6bc831a6 --- /dev/null +++ b/chrome/browser/readaloud/android/java/src/org/chromium/chrome/browser/readaloud/player/VisibilityState.java
@@ -0,0 +1,25 @@ +// 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.chrome.browser.readaloud.player; + +import androidx.annotation.IntDef; + +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +/** Visibility and animation states for a player. */ +@IntDef({VisibilityState.GONE, VisibilityState.SHOWING, VisibilityState.VISIBLE, + VisibilityState.HIDING}) +@Retention(RetentionPolicy.SOURCE) +public @interface VisibilityState { + /** Player isn't on the screen or transitioning. Default state. */ + int GONE = 0; + /** Player is transitioning from GONE to VISIBLE. */ + int SHOWING = 1; + /** Player is open and not transitioning. */ + int VISIBLE = 2; + /** Player is transitioning from VISIBLE to GONE. */ + int HIDING = 3; +}
diff --git a/chrome/browser/resources/BUILD.gn b/chrome/browser/resources/BUILD.gn index ac6c2a4f..2ba87c7c 100644 --- a/chrome/browser/resources/BUILD.gn +++ b/chrome/browser/resources/BUILD.gn
@@ -51,6 +51,7 @@ "side_panel/companion:resources", "side_panel/customize_chrome:resources", "side_panel/history_clusters:resources", + "side_panel/performance_controls:resources", "side_panel/read_anything:resources", "side_panel/reading_list:resources", "side_panel/shared:resources",
diff --git a/chrome/browser/resources/accessibility/embedded_a11y_helper/BUILD.gn b/chrome/browser/resources/accessibility/embedded_a11y_helper/BUILD.gn index d45e8919..c0d3afd 100644 --- a/chrome/browser/resources/accessibility/embedded_a11y_helper/BUILD.gn +++ b/chrome/browser/resources/accessibility/embedded_a11y_helper/BUILD.gn
@@ -15,6 +15,7 @@ ts_library("build_ts") { in_files = [ + "clipboard_copy.ts", "content.ts", "service_worker.ts", ] @@ -28,6 +29,7 @@ "//tools/typescript/definitions/accessibility_service_private.d.ts", "//tools/typescript/definitions/context_menus.d.ts", "//tools/typescript/definitions/i18n.d.ts", + "//tools/typescript/definitions/scripting.d.ts", ] }
diff --git a/chrome/browser/resources/accessibility/embedded_a11y_helper/clipboard_copy.ts b/chrome/browser/resources/accessibility/embedded_a11y_helper/clipboard_copy.ts new file mode 100644 index 0000000..7e155c4 --- /dev/null +++ b/chrome/browser/resources/accessibility/embedded_a11y_helper/clipboard_copy.ts
@@ -0,0 +1,5 @@ +// 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. + +document.execCommand('copy');
diff --git a/chrome/browser/resources/accessibility/embedded_a11y_helper/service_worker.ts b/chrome/browser/resources/accessibility/embedded_a11y_helper/service_worker.ts index 042da44..bd648fc 100644 --- a/chrome/browser/resources/accessibility/embedded_a11y_helper/service_worker.ts +++ b/chrome/browser/resources/accessibility/embedded_a11y_helper/service_worker.ts
@@ -7,6 +7,11 @@ // flag. const SHOW_CONTEXT_MENU = chrome.accessibilityServicePrivate !== undefined; +// Matches one of the known GSuite apps which need the clipboard to find and +// read selected text. Includes sandbox and non-sandbox versions. +const GSUITE_APP_REGEXP = + /^https:\/\/docs\.(?:sandbox\.)?google\.com\/(?:(?:presentation)|(?:document)|(?:spreadsheets)|(?:drawings)){1}\//; + async function selectToSpeakContextMenusCallback() { // Inform Lacros of the context menu click. if (SHOW_CONTEXT_MENU) { @@ -14,6 +19,18 @@ } } +async function clipboardCopyInActiveGoogleDoc(url: string) { + const queryOptions = {active: true, currentWindow: true}; + const [tab] = await chrome.tabs.query(queryOptions); + if (tab?.id && tab.url && tab.url === url && + GSUITE_APP_REGEXP.exec(tab.url)) { + chrome.scripting.executeScript({ + target: {tabId: tab.id, allFrames: true}, + files: ['embedded_a11y_helper/clipboard_copy.js'], + }); + } +} + async function onSelectToSpeakChanged( details: chrome.accessibilityFeatures.ChromeSettingsResponse) { if (details.value) { @@ -44,6 +61,8 @@ async function main() { chrome.contextMenus.onClicked.addListener(selectToSpeakContextMenusCallback); + chrome.accessibilityServicePrivate.clipboardCopyInActiveGoogleDoc.addListener( + url => clipboardCopyInActiveGoogleDoc(url)); // Set up based on current state. const currentDetails =
diff --git a/chrome/browser/resources/accessibility/embedded_a11y_helper_manifest.json.jinja2 b/chrome/browser/resources/accessibility/embedded_a11y_helper_manifest.json.jinja2 index 30a41ed..6d44452 100644 --- a/chrome/browser/resources/accessibility/embedded_a11y_helper_manifest.json.jinja2 +++ b/chrome/browser/resources/accessibility/embedded_a11y_helper_manifest.json.jinja2
@@ -16,7 +16,8 @@ "accessibilityServicePrivate", "contextMenus", "scripting", - "storage" + "storage", + "tabs" ], "incognito": "split", "icons": {
diff --git a/chrome/browser/resources/ash/settings/BUILD.gn b/chrome/browser/resources/ash/settings/BUILD.gn index bfc6b51..ebe6952 100644 --- a/chrome/browser/resources/ash/settings/BUILD.gn +++ b/chrome/browser/resources/ash/settings/BUILD.gn
@@ -304,6 +304,7 @@ "os_search_page/search_and_assistant_settings_card.ts", "os_search_page/search_engine.ts", "os_search_page/search_subpage.ts", + "os_settings_menu/menu_item.ts", "os_settings_main/os_settings_main.ts", "os_settings_menu/os_settings_menu.ts", "os_settings_page/os_settings_animated_pages.ts",
diff --git a/chrome/browser/resources/ash/settings/device_page/customize_button_row.html b/chrome/browser/resources/ash/settings/device_page/customize_button_row.html index 947f9fa..2950c10 100644 --- a/chrome/browser/resources/ash/settings/device_page/customize_button_row.html +++ b/chrome/browser/resources/ash/settings/device_page/customize_button_row.html
@@ -105,7 +105,8 @@ display: none; } </style> -<div id="container" class="settings-box" on-mousedown="onContainerMouseDown_" +<div id="container" class="settings-box first" + on-mousedown="onContainerMouseDown_" on-dragstart="onDragStart_" on-dragend="onDragEnd_" draggable="true"> <div class="move-icon-container"> <cr-icon-button class="move-button" iron-icon="os-settings:move">
diff --git a/chrome/browser/resources/ash/settings/device_page/customize_buttons_subsection.html b/chrome/browser/resources/ash/settings/device_page/customize_buttons_subsection.html index b9407dc..c0ebe09 100644 --- a/chrome/browser/resources/ash/settings/device_page/customize_buttons_subsection.html +++ b/chrome/browser/resources/ash/settings/device_page/customize_buttons_subsection.html
@@ -18,15 +18,18 @@ --cr-dialog-width: 320px; } </style> -<template is="dom-repeat" - items="{{buttonRemappingList}}" - index-as="index"> - <customize-button-row - button-remapping-list="[[buttonRemappingList]]" - remapping-index="[[index]]" - action-list$="[[actionList]]"> - </customize-button-row> -</template> +<div class="subsection"> + <template is="dom-repeat" + items="{{buttonRemappingList}}" + index-as="index"> + <customize-button-row + button-remapping-list="[[buttonRemappingList]]" + remapping-index="[[index]]" + action-list$="[[actionList]]"> + </customize-button-row> + </template> +</div> + <template is="dom-if" if="[[shouldShowRenamingDialog_]]" restamp> <cr-dialog id="renamingDialog" on-close="cancelRenamingDialogClicked_" show-on-attach>
diff --git a/chrome/browser/resources/ash/settings/device_page/customize_mouse_buttons_subpage.html b/chrome/browser/resources/ash/settings/device_page/customize_mouse_buttons_subpage.html index 5a00308e..e3f6797 100644 --- a/chrome/browser/resources/ash/settings/device_page/customize_mouse_buttons_subpage.html +++ b/chrome/browser/resources/ash/settings/device_page/customize_mouse_buttons_subpage.html
@@ -1,23 +1,17 @@ <style include="settings-shared input-device-settings-shared"> - #header { - display: flex; - height: 24px; - padding: 12px 0; - } - - #description { - color: var(--cros-text-color-secondary); + #mouseSwapToggleButton { + border-bottom: var(--cr-separator-line); } </style> -<div class="subsection"> - <settings-toggle-button id="mouseSwapToggleButton" - aria-describedby="description" - label="$i18n{mouseSwapButtonsLabel}" - pref="{{primaryRightPref_}}"> - </settings-toggle-button> - <div id="description">[[getDescription_(selectedMouse.*)]]</div> - <customize-buttons-subsection - button-remapping-list="{{selectedMouse.settings.buttonRemappings}}" - action-list$="[[buttonActionList_]]"> - </customize-buttons-subsection> +<settings-toggle-button id="mouseSwapToggleButton" + aria-describedby="description" + label="$i18n{mouseSwapButtonsLabel}" + pref="{{primaryRightPref_}}"> +</settings-toggle-button> +<div id="description" class="subpage-description"> + [[getDescription_(selectedMouse.*)]] </div> +<customize-buttons-subsection + button-remapping-list="{{selectedMouse.settings.buttonRemappings}}" + action-list$="[[buttonActionList_]]"> +</customize-buttons-subsection>
diff --git a/chrome/browser/resources/ash/settings/device_page/customize_pen_buttons_subpage.html b/chrome/browser/resources/ash/settings/device_page/customize_pen_buttons_subpage.html index e2107ee..d6494be 100644 --- a/chrome/browser/resources/ash/settings/device_page/customize_pen_buttons_subpage.html +++ b/chrome/browser/resources/ash/settings/device_page/customize_pen_buttons_subpage.html
@@ -1,21 +1,9 @@ <style include="settings-shared input-device-settings-shared"> - #header { - display: flex; - height: 24px; - padding: 12px 0; - } - - #description { - color: var(--cros-text-color-secondary); - margin-inline-start: 20px; - } </style> -<div id="header"> - <div id="description">[[getDescription_(selectedTablet.*)]]</div> +<div id="description" class="subpage-description"> + [[getDescription_(selectedTablet.*)]] </div> -<div class="subsection"> - <customize-buttons-subsection - button-remapping-list="{{selectedTablet.settings.penButtonRemappings}}" - action-list$="[[buttonActionList_]]"> - </customize-buttons-subsection> -</div> +<customize-buttons-subsection + button-remapping-list="{{selectedTablet.settings.penButtonRemappings}}" + action-list$="[[buttonActionList_]]"> +</customize-buttons-subsection>
diff --git a/chrome/browser/resources/ash/settings/device_page/customize_tablet_buttons_subpage.html b/chrome/browser/resources/ash/settings/device_page/customize_tablet_buttons_subpage.html index 7507a22..cadf82b 100644 --- a/chrome/browser/resources/ash/settings/device_page/customize_tablet_buttons_subpage.html +++ b/chrome/browser/resources/ash/settings/device_page/customize_tablet_buttons_subpage.html
@@ -1,21 +1,9 @@ <style include="settings-shared input-device-settings-shared"> - #header { - display: flex; - height: 24px; - padding: 12px 0; - } - - #description { - color: var(--cros-text-color-secondary); - margin-inline-start: 20px; - } </style> -<div id="header"> - <div id="description">[[getDescription_(selectedTablet.*)]]</div> +<div id="description" class="subpage-description"> + [[getDescription_(selectedTablet.*)]] </div> -<div class="subsection"> - <customize-buttons-subsection - button-remapping-list="{{selectedTablet.settings.tabletButtonRemappings}}" - action-list$="[[buttonActionList_]]"> - </customize-buttons-subsection> -</div> +<customize-buttons-subsection + button-remapping-list="{{selectedTablet.settings.tabletButtonRemappings}}" + action-list$="[[buttonActionList_]]"> +</customize-buttons-subsection>
diff --git a/chrome/browser/resources/ash/settings/device_page/input_device_settings_shared.css b/chrome/browser/resources/ash/settings/device_page/input_device_settings_shared.css index d75c6a2..7b42eed 100644 --- a/chrome/browser/resources/ash/settings/device_page/input_device_settings_shared.css +++ b/chrome/browser/resources/ash/settings/device_page/input_device_settings_shared.css
@@ -13,6 +13,7 @@ .subsection { margin-bottom: 16px; + margin-top: 8px; padding-inline-start: var(--cr-section-indent-width); } @@ -69,3 +70,9 @@ background-color: var(--cros-bg-color); border: solid 1px var(--cros-button-stroke-color-secondary); } + +.subpage-description { + color: var(--cros-text-color-secondary); + font: var(--cros-body-2-font); + padding: 12px 20px; +}
diff --git a/chrome/browser/resources/ash/settings/device_page/per_device_keyboard_remap_keys.html b/chrome/browser/resources/ash/settings/device_page/per_device_keyboard_remap_keys.html index 27669a0..371356b7 100644 --- a/chrome/browser/resources/ash/settings/device_page/per_device_keyboard_remap_keys.html +++ b/chrome/browser/resources/ash/settings/device_page/per_device_keyboard_remap_keys.html
@@ -7,7 +7,6 @@ .subsection { margin-bottom: 0; - margin-top: 8px; } #description {
diff --git a/chrome/browser/resources/ash/settings/lazy_load.ts b/chrome/browser/resources/ash/settings/lazy_load.ts index dbebe3a..669d7979 100644 --- a/chrome/browser/resources/ash/settings/lazy_load.ts +++ b/chrome/browser/resources/ash/settings/lazy_load.ts
@@ -256,13 +256,13 @@ export {PrinterDialogErrorElement} from './os_printing_page/cups_printer_dialog_error.js'; export {PrinterListEntry, PrinterType} from './os_printing_page/cups_printer_types.js'; export {PrinterSettingsUserAction, SettingsCupsPrintersElement} from './os_printing_page/cups_printers.js'; -export {CupsPrinterInfo, CupsPrintersBrowserProxy, CupsPrintersBrowserProxyImpl, PrinterSetupResult, PrintServerResult} from './os_printing_page/cups_printers_browser_proxy.js'; +export {CupsPrinterInfo, CupsPrintersBrowserProxy, CupsPrintersBrowserProxyImpl, CupsPrintersList, ManufacturersInfo, ModelsInfo, PrinterMakeModel, PrinterPpdMakeModel, PrinterSetupResult, PrintServerResult} from './os_printing_page/cups_printers_browser_proxy.js'; export {SettingsCupsPrintersEntryElement} from './os_printing_page/cups_printers_entry.js'; export {CupsPrintersEntryManager} from './os_printing_page/cups_printers_entry_manager.js'; export {SettingsCupsSavedPrintersElement} from './os_printing_page/cups_saved_printers.js'; export {SettingsCupsAddPrinterDialogElement} from './os_printing_page/cups_settings_add_printer_dialog.js'; export {OsSettingsPrintingPageElement} from './os_printing_page/os_printing_page.js'; -export {computePrinterState, getStatusReasonFromPrinterStatus, PrinterState, PrinterStatusReason, PrinterStatusSeverity} from './os_printing_page/printer_status.js'; +export {computePrinterState, getStatusReasonFromPrinterStatus, PrinterState, PrinterStatus, PrinterStatusReason, PrinterStatusSeverity} from './os_printing_page/printer_status.js'; export {PrintingSettingsCardElement} from './os_printing_page/printing_settings_card.js'; export {SettingsManageUsersSubpageElement} from './os_privacy_page/manage_users_subpage.js'; export {MediaDevicesProxy} from './os_privacy_page/media_devices_proxy.js';
diff --git a/chrome/browser/resources/ash/settings/os_bluetooth_page/os_bluetooth_devices_subpage.ts b/chrome/browser/resources/ash/settings/os_bluetooth_page/os_bluetooth_devices_subpage.ts index 40cf7ed..3f99519 100644 --- a/chrome/browser/resources/ash/settings/os_bluetooth_page/os_bluetooth_devices_subpage.ts +++ b/chrome/browser/resources/ash/settings/os_bluetooth_page/os_bluetooth_devices_subpage.ts
@@ -267,7 +267,8 @@ private isFastPairSavedDevicesRowVisible_(): boolean { return loadTimeData.getBoolean('enableFastPairFlag') && loadTimeData.getBoolean('enableSavedDevicesFlag') && - !loadTimeData.getBoolean('isGuest'); + !loadTimeData.getBoolean('isGuest') && + loadTimeData.getBoolean('isCrossDeviceFeatureSuiteEnabled'); } private onClicked_(event: Event): void {
diff --git a/chrome/browser/resources/ash/settings/os_languages_page/language_settings_card.html b/chrome/browser/resources/ash/settings/os_languages_page/language_settings_card.html index af7c6dc..e010de6 100644 --- a/chrome/browser/resources/ash/settings/os_languages_page/language_settings_card.html +++ b/chrome/browser/resources/ash/settings/os_languages_page/language_settings_card.html
@@ -1,6 +1,6 @@ <style include="settings-shared"></style> -<settings-card header-text="$i18n{osLanguagesPageTitle}"> +<settings-card header-text="[[getHeaderText_()]]"> <cr-link-row id="languagesRow" label="$i18n{languagesPageTitle}" @@ -9,13 +9,15 @@ on-click="onLanguagesV2Click_" role-description="$i18n{subpageArrowRoleDescription}"> </cr-link-row> - <cr-link-row - id="inputRow" - class="hr" - label="$i18n{inputPageTitle}" - sub-label="[[getInputMethodDisplayName_( - languages.inputMethods.currentId, languageHelper)]]" - on-click="onInputClick_" - role-description="$i18n{subpageArrowRoleDescription}"> - </cr-link-row> + <template is="dom-if" if="[[!isRevampWayfindingEnabled_]]"> + <cr-link-row + id="inputRow" + class="hr" + label="$i18n{inputPageTitle}" + sub-label="[[getInputMethodDisplayName_( + languages.inputMethods.currentId, languageHelper)]]" + on-click="onInputClick_" + role-description="$i18n{subpageArrowRoleDescription}"> + </cr-link-row> + </template> </settings-card>
diff --git a/chrome/browser/resources/ash/settings/os_languages_page/language_settings_card.ts b/chrome/browser/resources/ash/settings/os_languages_page/language_settings_card.ts index 7b400fd..f03ea162 100644 --- a/chrome/browser/resources/ash/settings/os_languages_page/language_settings_card.ts +++ b/chrome/browser/resources/ash/settings/os_languages_page/language_settings_card.ts
@@ -78,6 +78,13 @@ this.addFocusConfig(routes.OS_LANGUAGES_INPUT, '#inputRow'); } + private getHeaderText_(): string { + if (this.isRevampWayfindingEnabled_) { + return this.i18n('languagesPageTitle'); + } + return this.i18n('osLanguagesPageTitle'); + } + private onLanguagesV2Click_(): void { Router.getInstance().navigateTo(routes.OS_LANGUAGES_LANGUAGES); }
diff --git a/chrome/browser/resources/ash/settings/os_settings_menu/menu_item.html b/chrome/browser/resources/ash/settings/os_settings_menu/menu_item.html new file mode 100644 index 0000000..9faf7df7 --- /dev/null +++ b/chrome/browser/resources/ash/settings/os_settings_menu/menu_item.html
@@ -0,0 +1,84 @@ +<style include="settings-shared"> + :host { + /* The tap target extends slightly above each visible menu item. */ + --tap-target-padding: 3px; + /* Width of the keyboard focus border. */ + --focus-border-width: 2px; + + align-items: center; + background: transparent; + border-block-end-width: var(--focus-border-width); + border-block-start-width: var(--focus-border-width); + /* Always apply border so item doesn't shift when focused. */ + border-color: transparent; + border-inline-end-width: var(--focus-border-width); + /* No border on window edge (left in LTR, right in RTL). */ + border-inline-start-width: 0; + border-radius: 0 20px 20px 0; + border-style: solid; + color: var(--cros-text-color-primary); + display: flex; + margin-bottom: 8px; + margin-inline-end: 2px; + min-height: 32px; + padding: var(--tap-target-padding) 0; + padding-inline-start: 20px; + text-decoration: none; + } + + :host-context([dir=rtl]):host { + border-radius: 20px 0 0 20px; + } + + /* Font */ + :host-context(body:not(.jelly-enabled)):host { + font-weight: 500; + } + + :host-context(body.jelly-enabled):host { + font: var(--cros-button-1-font); + } + + /* Hover state */ + :host-context(body:not(.jelly-enabled)):host(:not(.iron-selected):hover) { + background-color: var(--cros-ripple-color) !important; + } + + :host-context(body.jelly-enabled):host(:not(.iron-selected):hover) { + background-color: var(--cros-sys-hover_on_subtle) !important; + } + + /* Focused state */ + :host-context(.focus-outline-visible):host(:focus) { + border-color: var(--cros-focus-ring-color); + } + + /* Selected state */ + :host-context(body:not(.jelly-enabled)):host(.iron-selected) { + background-color: var(--cros-highlight-color) !important; + color: var(--cros-text-color-selection); + } + + :host-context(body.jelly-enabled):host(.iron-selected) { + background-color: var(--cros-sys-primary) !important; + color: var(--cros-sys-on_primary); + } + + /* Icon styles */ + iron-icon { + margin-inline-end: 16px; + pointer-events: none; + vertical-align: top; + } + + :host-context(body:not(.jelly-enabled)):host(.iron-selected) > iron-icon { + fill: var(--cros-icon-color-selection); + } + + :host-context(body.jelly-enabled):host(.iron-selected) > iron-icon { + fill: var(--cros-sys-on_primary); + } +</style> + +<iron-icon icon="[[icon]]" hidden="[[!icon]]"></iron-icon> +<slot></slot>
diff --git a/chrome/browser/resources/ash/settings/os_settings_menu/menu_item.ts b/chrome/browser/resources/ash/settings/os_settings_menu/menu_item.ts new file mode 100644 index 0000000..256189ea1 --- /dev/null +++ b/chrome/browser/resources/ash/settings/os_settings_menu/menu_item.ts
@@ -0,0 +1,82 @@ +// 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. + +/** + * @fileoverview + * 'os-settings-menu-item' represents a menu item. This is expected to be + * rendered under a 'iron-selector' element in 'os-settings-menu'. + */ + +import 'chrome://resources/polymer/v3_0/iron-icon/iron-icon.js'; +import '../os_settings_icons.html.js'; +import '../settings_shared.css.js'; + +import {PolymerElement} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; + +import {getTemplate} from './menu_item.html.js'; + +export class OsSettingsMenuItemElement extends PolymerElement { + static get is() { + return 'os-settings-menu-item' as const; + } + + static get template() { + return getTemplate(); + } + + static get properties() { + return { + path: { + type: String, + reflectToAttribute: true, + }, + + /** + * Icon type must be registered in os_settings_icons.html. By default, + * no icon is shown. + */ + icon: { + type: String, + value: '', + }, + }; + } + + icon: string; + path: string; + + override ready(): void { + super.ready(); + + this.setAttribute('role', 'link'); + this.setAttribute('tabindex', '0'); + this.addEventListener('keydown', this.onKeyDown_.bind(this)); + } + + private onKeyDown_(event: KeyboardEvent): void { + if (event.key !== ' ' && event.key !== 'Enter') { + return; + } + + event.preventDefault(); + event.stopPropagation(); + if (event.repeat) { + return; + } + + // Simulate click + if (event.key === 'Enter') { + this.dispatchEvent( + new CustomEvent('click', {bubbles: true, composed: true})); + } + } +} + +declare global { + interface HTMLElementTagNameMap { + [OsSettingsMenuItemElement.is]: OsSettingsMenuItemElement; + } +} + +customElements.define(OsSettingsMenuItemElement.is, OsSettingsMenuItemElement);
diff --git a/chrome/browser/resources/ash/settings/os_settings_menu/os_settings_menu.html b/chrome/browser/resources/ash/settings/os_settings_menu/os_settings_menu.html index 455494f..445ef3f 100644 --- a/chrome/browser/resources/ash/settings/os_settings_menu/os_settings_menu.html +++ b/chrome/browser/resources/ash/settings/os_settings_menu/os_settings_menu.html
@@ -1,9 +1,8 @@ <style include="settings-shared"> :host { - /* The tap target extends slightly above each visible menu item. */ - --tap-target-padding: 3px; /* Width of the keyboard focus border. */ --focus-border-width: 2px; + box-sizing: border-box; display: block; padding-bottom: 2px; @@ -14,90 +13,11 @@ -webkit-tap-highlight-color: transparent; } - /* Override focus CSS for selectable items. */ - [selectable]:focus, + /* Override iron-selector focus CSS for selectable items. */ [selectable] > :focus { background-color: transparent; } - /* The <a> is the entire tap target, including the padding around the - * visible icon and text. */ - a { - background: transparent; - display: block; - padding: var(--tap-target-padding) 0; - } - - /* "item" class draws the icon, text, and rounded background. */ - a.item { - align-items: center; - border-block-end-width: var(--focus-border-width); - border-block-start-width: var(--focus-border-width); - /* Always apply border so item doesn't shift when focused. */ - border-color: transparent; - border-inline-end-width: var(--focus-border-width); - /* No border on window edge (left in LTR, right in RTL). */ - border-inline-start-width: 0; - border-radius: 0 20px 20px 0; - border-style: solid; - color: var(--cros-text-color-primary); - display: flex; - margin-bottom: 8px; - margin-inline-end: 2px; - min-height: 32px; - padding-inline-start: 20px; - text-decoration: none; - } - - :host-context([dir=rtl]) a.item { - /* Chrome doesn't support border-start-end-radius, so override. */ - border-radius: 20px 0 0 20px; - } - - :host-context(body:not(.jelly-enabled)) a.item { - font-weight: 500; - } - - :host-context(body.jelly-enabled) a.item { - font: var(--cros-button-1-font); - } - - a.item.iron-selected { - background-color: var(--cros-highlight-color); - color: var(--cros-text-color-selection); - } - - :host-context(body.jelly-enabled) a.item.iron-selected { - background-color: var(--cros-sys-primary); - color: var(--cros-sys-on_primary); - } - - :host-context(.focus-outline-visible) a.item:focus { - border-color: var(--cros-focus-ring-color); - } - - a.item:not(.iron-selected):hover { - background-color: var(--cros-ripple-color); - } - - :host-context(body.jelly-enabled) a.item:not(.iron-selected):hover { - background-color: var(--cros-sys-hover_on_subtle); - } - - iron-icon { - margin-inline-end: 16px; - pointer-events: none; - vertical-align: top; - } - - a.item.iron-selected > iron-icon { - fill: var(--cros-icon-color-selection); - } - - :host-context(body.jelly-enabled) a.item.iron-selected > iron-icon { - fill: var(--cros-sys-on_primary); - } - #advancedButton { --ink-color: var(--cros-text-color-primary); align-items: center; @@ -132,6 +52,11 @@ outline: var(--focus-border-width) solid var(--cros-focus-ring-color); } + :host-context([dir=rtl]):host-context(.focus-outline-visible) + #advancedButton:focus { + border-radius: 20px 0 0 20px; + } + #advancedButton > span { flex: 1; } @@ -143,19 +68,12 @@ } #menuSeparator { - /* Per bettes@, this is different from the other separator lines. */ - border-bottom: 1px solid rgba(0, 0, 0, 0.08); + border-bottom: var(--cr-separator-line); margin-bottom: 8px; margin-top: 8px; } - @media (prefers-color-scheme: dark) { - #menuSeparator { - border-bottom: var(--cr-separator-line); /* override */ - } - } - - #aboutItem { + #topMenu > os-settings-menu-item:last-of-type { /* Reserve space so the last menu item isn't too close to the window * bottom edge, 48px under the text baseline. */ margin-bottom: calc( @@ -163,19 +81,17 @@ } </style> <iron-selector id="topMenu" - selectable="a.item" - attr-for-selected="href" role="navigation" + selectable="os-settings-menu-item" + attr-for-selected="path" + selected="[[selectedItemPath_]]" on-iron-activate="onItemActivated_" on-iron-select="onItemSelected_" - on-iron-deselect="onItemDeselected_" - on-click="onLinkClick_" - selected="[[selectedUrl_]]"> - <template is="dom-repeat" items="[[basicMenuItems_]]" id="topMenuRepeat"> - <a href="[[item.href]]" class="item"> - <iron-icon icon="[[item.icon]]"></iron-icon> + on-iron-deselect="onItemDeselected_"> + <template id="topMenuRepeat" is="dom-repeat" items="[[basicMenuItems_]]"> + <os-settings-menu-item path="[[item.path]]" icon="[[item.icon]]"> [[item.label]] - </a> + </os-settings-menu-item> </template> <template is="dom-if" if="[[!isRevampWayfindingEnabled_]]"> @@ -188,26 +104,20 @@ </cr-button> <iron-collapse id="advancedCollapse" opened="[[advancedOpened]]"> <iron-selector id="advancedSubmenu" - selectable="a.item" - attr-for-selected="href" role="navigation" - on-click="onLinkClick_" - selected="[[selectedUrl_]]"> + selectable="os-settings-menu-item" + attr-for-selected="path" + selected="[[selectedItemPath_]]"> <template is="dom-repeat" items="[[advancedMenuItems_]]"> - <a href="[[item.href]]" class="item"> - <iron-icon icon="[[item.icon]]"></iron-icon> + <os-settings-menu-item path="[[item.path]]" icon="[[item.icon]]"> [[item.label]] - </a> + </os-settings-menu-item> </template> </iron-selector> </iron-collapse> <div id="menuSeparator"></div> + <os-settings-menu-item path="[[aboutMenuItemPath_]]"> + $i18n{aboutOsPageTitle} + </os-settings-menu-item> </template> - - <a id="aboutItem" href="[[aboutMenuItemHref_]]" class="item"> - <iron-icon icon="os-settings:chrome" - hidden="[[!isRevampWayfindingEnabled_]]"> - </iron-icon> - $i18n{aboutOsPageTitle} - </a> </iron-selector>
diff --git a/chrome/browser/resources/ash/settings/os_settings_menu/os_settings_menu.ts b/chrome/browser/resources/ash/settings/os_settings_menu/os_settings_menu.ts index 1cd520d..23e93ae 100644 --- a/chrome/browser/resources/ash/settings/os_settings_menu/os_settings_menu.ts +++ b/chrome/browser/resources/ash/settings/os_settings_menu/os_settings_menu.ts
@@ -13,6 +13,7 @@ import 'chrome://resources/polymer/v3_0/iron-selector/iron-selector.js'; import '../settings_shared.css.js'; import '../os_settings_icons.html.js'; +import './menu_item.js'; import {I18nMixin} from 'chrome://resources/cr_elements/i18n_mixin.js'; import {IronSelectorElement} from 'chrome://resources/polymer/v3_0/iron-selector/iron-selector.js'; @@ -30,7 +31,7 @@ interface MenuItemData { section: routesMojom.Section; - href: string; + path: string; icon: string; label: string; } @@ -81,15 +82,14 @@ }, /** - * The full URL (e.g. chrome://os-settings/internet) of the currently - * selected menu item. Not to be confused with the href attribute. + * The path of the currently selected menu item. e.g. '/internet'. */ - selectedUrl_: { + selectedItemPath_: { type: String, value: '', }, - aboutMenuItemHref_: { + aboutMenuItemPath_: { type: String, value: `/${routesMojom.ABOUT_CHROME_OS_SECTION_PATH}`, }, @@ -109,7 +109,8 @@ private basicMenuItems_: MenuItemData[]; private advancedMenuItems_: MenuItemData[]; private isRevampWayfindingEnabled_: boolean; - private selectedUrl_: string; + private selectedItemPath_: string; + private aboutMenuItemPath_: string; override ready(): void { super.ready(); @@ -128,26 +129,26 @@ this.advancedOpened = true; } - this.setSelectedUrlFromRoute_(newRoute); + this.setSelectedItemPathForRoute_(newRoute); } /** - * Set the selected menu item based on the current route path matching the - * href attribute. + * Set the selected menu item based on a menu item's route matching or + * containing the given |route|. */ - private setSelectedUrlFromRoute_(route: Route) { - const anchors = - this.shadowRoot!.querySelectorAll<HTMLAnchorElement>('a.item'); - for (const anchor of anchors) { - const path = new URL(anchor.href).pathname; - const matchingRoute = Router.getInstance().getRouteForPath(path); + private setSelectedItemPathForRoute_(route: Route) { + const menuItems = + this.shadowRoot!.querySelectorAll('os-settings-menu-item'); + for (const menuItem of menuItems) { + const matchingRoute = Router.getInstance().getRouteForPath(menuItem.path); if (matchingRoute?.contains(route)) { - this.setSelectedUrl_(anchor.href); + this.setSelectedItemPath_(menuItem.path); return; } } - this.setSelectedUrl_(''); // Nothing is selected. + // Nothing is selected. + this.setSelectedItemPath_(''); } private computeBasicMenuItems_(): MenuItemData[] { @@ -156,136 +157,142 @@ basicMenuItems = [ { section: Section.kNetwork, - href: `/${routesMojom.NETWORK_SECTION_PATH}`, + path: `/${routesMojom.NETWORK_SECTION_PATH}`, icon: 'os-settings:network-wifi', label: this.i18n('internetPageTitle'), }, { section: Section.kBluetooth, - href: `/${routesMojom.BLUETOOTH_SECTION_PATH}`, + path: `/${routesMojom.BLUETOOTH_SECTION_PATH}`, icon: 'cr:bluetooth', label: this.i18n('bluetoothPageTitle'), }, { section: Section.kMultiDevice, - href: `/${routesMojom.MULTI_DEVICE_SECTION_PATH}`, + path: `/${routesMojom.MULTI_DEVICE_SECTION_PATH}`, icon: 'os-settings:connected-devices', label: this.i18n('multidevicePageTitle'), }, { section: Section.kPeople, - href: `/${routesMojom.PEOPLE_SECTION_PATH}`, + path: `/${routesMojom.PEOPLE_SECTION_PATH}`, icon: 'os-settings:account', label: this.i18n('osPeoplePageTitle'), }, { section: Section.kKerberos, - href: `/${routesMojom.KERBEROS_SECTION_PATH}`, + path: `/${routesMojom.KERBEROS_SECTION_PATH}`, icon: 'os-settings:auth-key', label: this.i18n('kerberosPageTitle'), }, { section: Section.kDevice, - href: `/${routesMojom.DEVICE_SECTION_PATH}`, + path: `/${routesMojom.DEVICE_SECTION_PATH}`, icon: 'os-settings:laptop-chromebook', label: this.i18n('devicePageTitle'), }, { section: Section.kPersonalization, - href: `/${routesMojom.PERSONALIZATION_SECTION_PATH}`, + path: `/${routesMojom.PERSONALIZATION_SECTION_PATH}`, icon: 'os-settings:personalization', label: this.i18n('personalizationPageTitle'), }, { section: Section.kPrivacyAndSecurity, - href: `/${routesMojom.PRIVACY_AND_SECURITY_SECTION_PATH}`, + path: `/${routesMojom.PRIVACY_AND_SECURITY_SECTION_PATH}`, icon: 'cr:security', label: this.i18n('privacyPageTitle'), }, { section: Section.kApps, - href: `/${routesMojom.APPS_SECTION_PATH}`, + path: `/${routesMojom.APPS_SECTION_PATH}`, icon: 'os-settings:apps', label: this.i18n('appsPageTitle'), }, { section: Section.kAccessibility, - href: `/${routesMojom.ACCESSIBILITY_SECTION_PATH}`, + path: `/${routesMojom.ACCESSIBILITY_SECTION_PATH}`, icon: 'os-settings:accessibility-revamp', label: this.i18n('a11yPageTitle'), }, { section: Section.kSystemPreferences, - href: `/${routesMojom.SYSTEM_PREFERENCES_SECTION_PATH}`, + path: `/${routesMojom.SYSTEM_PREFERENCES_SECTION_PATH}`, icon: 'os-settings:system-preferences', label: this.i18n('systemPreferencesTitle'), }, + { + section: Section.kAboutChromeOs, + path: this.aboutMenuItemPath_, + icon: 'os-settings:chrome', + label: this.i18n('aboutOsPageTitle'), + }, ]; } else { basicMenuItems = [ { section: Section.kNetwork, - href: `/${routesMojom.NETWORK_SECTION_PATH}`, + path: `/${routesMojom.NETWORK_SECTION_PATH}`, icon: 'os-settings:network-wifi', label: this.i18n('internetPageTitle'), }, { section: Section.kBluetooth, - href: `/${routesMojom.BLUETOOTH_SECTION_PATH}`, + path: `/${routesMojom.BLUETOOTH_SECTION_PATH}`, icon: 'cr:bluetooth', label: this.i18n('bluetoothPageTitle'), }, { section: Section.kMultiDevice, - href: `/${routesMojom.MULTI_DEVICE_SECTION_PATH}`, + path: `/${routesMojom.MULTI_DEVICE_SECTION_PATH}`, icon: 'os-settings:multidevice-better-together-suite', label: this.i18n('multidevicePageTitle'), }, { section: Section.kPeople, - href: `/${routesMojom.PEOPLE_SECTION_PATH}`, + path: `/${routesMojom.PEOPLE_SECTION_PATH}`, icon: 'cr:person', label: this.i18n('osPeoplePageTitle'), }, { section: Section.kKerberos, - href: `/${routesMojom.KERBEROS_SECTION_PATH}`, + path: `/${routesMojom.KERBEROS_SECTION_PATH}`, icon: 'os-settings:auth-key', label: this.i18n('kerberosPageTitle'), }, { section: Section.kDevice, - href: `/${routesMojom.DEVICE_SECTION_PATH}`, + path: `/${routesMojom.DEVICE_SECTION_PATH}`, icon: 'os-settings:laptop-chromebook', label: this.i18n('devicePageTitle'), }, { section: Section.kPersonalization, - href: `/${routesMojom.PERSONALIZATION_SECTION_PATH}`, + path: `/${routesMojom.PERSONALIZATION_SECTION_PATH}`, icon: 'os-settings:paint-brush', label: this.i18n('personalizationPageTitle'), }, { section: Section.kSearchAndAssistant, - href: `/${routesMojom.SEARCH_AND_ASSISTANT_SECTION_PATH}`, + path: `/${routesMojom.SEARCH_AND_ASSISTANT_SECTION_PATH}`, icon: 'cr:search', label: this.i18n('osSearchPageTitle'), }, { section: Section.kPrivacyAndSecurity, - href: `/${routesMojom.PRIVACY_AND_SECURITY_SECTION_PATH}`, + path: `/${routesMojom.PRIVACY_AND_SECURITY_SECTION_PATH}`, icon: 'cr:security', label: this.i18n('privacyPageTitle'), }, { section: Section.kApps, - href: `/${routesMojom.APPS_SECTION_PATH}`, + path: `/${routesMojom.APPS_SECTION_PATH}`, icon: 'os-settings:apps', label: this.i18n('appsPageTitle'), }, { section: Section.kAccessibility, - href: `/${routesMojom.ACCESSIBILITY_SECTION_PATH}`, + path: `/${routesMojom.ACCESSIBILITY_SECTION_PATH}`, icon: 'os-settings:accessibility', label: this.i18n('a11yPageTitle'), }, @@ -305,37 +312,37 @@ const advancedMenuItems: MenuItemData[] = [ { section: Section.kDateAndTime, - href: `/${routesMojom.DATE_AND_TIME_SECTION_PATH}`, + path: `/${routesMojom.DATE_AND_TIME_SECTION_PATH}`, icon: 'os-settings:access-time', label: this.i18n('dateTimePageTitle'), }, { section: Section.kLanguagesAndInput, - href: `/${routesMojom.LANGUAGES_AND_INPUT_SECTION_PATH}`, + path: `/${routesMojom.LANGUAGES_AND_INPUT_SECTION_PATH}`, icon: 'os-settings:language', label: this.i18n('osLanguagesPageTitle'), }, { section: Section.kFiles, - href: `/${routesMojom.FILES_SECTION_PATH}`, + path: `/${routesMojom.FILES_SECTION_PATH}`, icon: 'os-settings:folder-outline', label: this.i18n('filesPageTitle'), }, { section: Section.kPrinting, - href: `/${routesMojom.PRINTING_SECTION_PATH}`, + path: `/${routesMojom.PRINTING_SECTION_PATH}`, icon: 'os-settings:print', label: this.i18n('printingPageTitle'), }, { section: Section.kCrostini, - href: `/${routesMojom.CROSTINI_SECTION_PATH}`, + path: `/${routesMojom.CROSTINI_SECTION_PATH}`, icon: 'os-settings:developer-tags', label: this.i18n('crostiniPageTitle'), }, { section: Section.kReset, - href: `/${routesMojom.RESET_SECTION_PATH}`, + path: `/${routesMojom.RESET_SECTION_PATH}`, icon: 'os-settings:restore', label: this.i18n('resetPageTitle'), }, @@ -350,25 +357,20 @@ } /** - * Prevent clicks on sidebar items from navigating. These are only links for - * accessibility purposes, taps are handled separately by <iron-selector>. + * @param path The path of the menu item to be selected. This path should be + * the pathname portion of a URL, not the full URL. e.g. `/internet`, not + * `chrome://os-settings/internet`. */ - private onLinkClick_(event: Event) { - if ((event.target as HTMLElement).matches('a')) { - event.preventDefault(); - } + private setSelectedItemPath_(path: string): void { + this.selectedItemPath_ = path; } /** - * |iron-selector| expects a full URL so |element.href| is needed instead of - * |element.getAttribute('href')|. + * Called when a selectable item from <iron-selector> is clicked. This is + * fired before the selected item is changed. */ - private setSelectedUrl_(url: string): void { - this.selectedUrl_ = url; - } - private onItemActivated_(event: CustomEvent<{selected: string}>): void { - this.setSelectedUrl_(event.detail.selected); + this.setSelectedItemPath_(event.detail.selected); } private onItemSelected_(e: CustomEvent<{item: HTMLElement}>) {
diff --git a/chrome/browser/resources/ash/settings/os_settings_routes.ts b/chrome/browser/resources/ash/settings/os_settings_routes.ts index 4243c75..90e602f7 100644 --- a/chrome/browser/resources/ash/settings/os_settings_routes.ts +++ b/chrome/browser/resources/ash/settings/os_settings_routes.ts
@@ -288,14 +288,16 @@ r.BLUETOOTH_DEVICE_DETAIL = createSubpage( r.BLUETOOTH, routesMojom.BLUETOOTH_DEVICE_DETAIL_SUBPAGE_PATH, Subpage.kBluetoothDeviceDetail); - if (loadTimeData.getBoolean('enableSavedDevicesFlag')) { + if (loadTimeData.getBoolean('enableSavedDevicesFlag') && + loadTimeData.getBoolean('isCrossDeviceFeatureSuiteEnabled')) { r.BLUETOOTH_SAVED_DEVICES = createSubpage( r.BLUETOOTH, routesMojom.BLUETOOTH_SAVED_DEVICES_SUBPAGE_PATH, Subpage.kBluetoothSavedDevices); } // MultiDevice section. - if (!isGuest()) { + if (!isGuest() && + loadTimeData.getBoolean('isCrossDeviceFeatureSuiteEnabled')) { r.MULTIDEVICE = createSection( r.BASIC, routesMojom.MULTI_DEVICE_SECTION_PATH, Section.kMultiDevice); r.MULTIDEVICE_FEATURES = createSubpage(
diff --git a/chrome/browser/resources/ash/settings/os_settings_ui/os_settings_ui.html b/chrome/browser/resources/ash/settings/os_settings_ui/os_settings_ui.html index ee40e80..c23f5c9 100644 --- a/chrome/browser/resources/ash/settings/os_settings_ui/os_settings_ui.html +++ b/chrome/browser/resources/ash/settings/os_settings_ui/os_settings_ui.html
@@ -120,7 +120,7 @@ <template is="dom-if" id="drawerTemplate"> <os-settings-menu page-availability="[[pageAvailability_]]" - on-iron-activate="onSectionSelect_" + on-iron-activate="onMenuItemSelected_" advanced-opened="{{advancedOpenedInMenu_}}"> </os-settings-menu> </template> @@ -132,7 +132,7 @@ <template is="dom-if" if="[[showNavMenu_]]"> <os-settings-menu page-availability="[[pageAvailability_]]" - on-iron-activate="onSectionSelect_" + on-iron-activate="onMenuItemSelected_" advanced-opened="{{advancedOpenedInMenu_}}"> </os-settings-menu> </template>
diff --git a/chrome/browser/resources/ash/settings/os_settings_ui/os_settings_ui.ts b/chrome/browser/resources/ash/settings/os_settings_ui/os_settings_ui.ts index 3be8ac33..83789f8c 100644 --- a/chrome/browser/resources/ash/settings/os_settings_ui/os_settings_ui.ts +++ b/chrome/browser/resources/ash/settings/os_settings_ui/os_settings_ui.ts
@@ -399,14 +399,13 @@ } /** - * Called when a section is selected. + * Called when a menu item is selected. */ - private onSectionSelect_(e: CustomEvent<{selected: string}>) { + private onMenuItemSelected_(e: CustomEvent<{selected: string}>) { assert(this.showNavMenu_); - const url = e.detail.selected; - const path = new URL(url).pathname; + const path = e.detail.selected; const route = Router.getInstance().getRouteForPath(path); - assert(route, `os-settings-menu has an item with invalid route: ${path}`); + assert(route, `os-settings-menu-item with invalid route: ${path}`); this.activeRoute_ = route; if (this.isNarrow) {
diff --git a/chrome/browser/resources/chromeos/accessibility/chromevox/learn_mode/learn_mode_test.js b/chrome/browser/resources/chromeos/accessibility/chromevox/learn_mode/learn_mode_test.js index 8170b3f2..74428d5 100644 --- a/chrome/browser/resources/chromeos/accessibility/chromevox/learn_mode/learn_mode_test.js +++ b/chrome/browser/resources/chromeos/accessibility/chromevox/learn_mode/learn_mode_test.js
@@ -157,10 +157,10 @@ .expectSpeechWithQueueMode('Touch explore', QueueMode.CATEGORY_FLUSH) // Test for inclusion of commandDescriptionMsgId when provided. - .call(doLearnModeGesture(Gesture.SWIPE_LEFT2)) + .call(doLearnModeGesture(Gesture.SWIPE_RIGHT2)) .expectSpeechWithQueueMode( - 'Swipe two fingers left', QueueMode.CATEGORY_FLUSH) - .expectSpeechWithQueueMode('Escape', QueueMode.QUEUE); + 'Swipe two fingers right', QueueMode.CATEGORY_FLUSH) + .expectSpeechWithQueueMode('Enter', QueueMode.QUEUE); await mockFeedback.replay(); });
diff --git a/chrome/browser/resources/chromeos/accessibility/select_to_speak/select_to_speak.js b/chrome/browser/resources/chromeos/accessibility/select_to_speak/select_to_speak.js index 240c2f4..a58f7c1 100644 --- a/chrome/browser/resources/chromeos/accessibility/select_to_speak/select_to_speak.js +++ b/chrome/browser/resources/chromeos/accessibility/select_to_speak/select_to_speak.js
@@ -492,18 +492,25 @@ chrome.tabs.query({active: true}, tabs => { // Closure doesn't realize that we did a !gsuiteAppRootNode earlier // so we check again here. - if (tabs.length === 0 || !gsuiteAppRootNode) { + if (!gsuiteAppRootNode || gsuiteAppRootNode.url === undefined) { return; } - const tab = tabs[0]; this.inputHandler_.onRequestReadClipboardData(); this.currentNodeGroupItem_ = new ParagraphUtils.NodeGroupItem(gsuiteAppRootNode, 0, false); - chrome.tabs.executeScript(tab.id, { - allFrames: true, - matchAboutBlank: true, - code: 'document.execCommand("copy");', - }); + if (tabs.length > 0 && tabs[0].url === gsuiteAppRootNode.url) { + const tab = tabs[0]; + chrome.tabs.executeScript(tab.id, { + allFrames: true, + matchAboutBlank: true, + code: 'document.execCommand("copy");', + }); + } else { + // In Lacros because chrome.tabs didn't return a tab or it + // was a tab with a different URL. + chrome.accessibilityPrivate.clipboardCopyInActiveLacrosGoogleDoc( + gsuiteAppRootNode.url); + } if (userRequested) { MetricsUtils.recordStartEvent(methodNumber, this.prefsManager_); }
diff --git a/chrome/browser/resources/chromeos/accessibility/switch_access/BUILD.gn b/chrome/browser/resources/chromeos/accessibility/switch_access/BUILD.gn index 0af84b7..249283416 100644 --- a/chrome/browser/resources/chromeos/accessibility/switch_access/BUILD.gn +++ b/chrome/browser/resources/chromeos/accessibility/switch_access/BUILD.gn
@@ -202,6 +202,9 @@ js_library("switch_access_loader") { deps = [ + ":commands", + ":navigator", + ":preference_manager", ":switch_access", "../common:instance_checker", ] @@ -433,10 +436,8 @@ js_library("switch_access") { deps = [ ":auto_scan_manager", - ":commands", ":menu_manager", ":navigator", - ":preference_manager", ":switch_access_constants", "../common:constants", "../common:flags",
diff --git a/chrome/browser/resources/chromeos/accessibility/switch_access/commands.js b/chrome/browser/resources/chromeos/accessibility/switch_access/commands.js index ab880a0..d96e2265 100644 --- a/chrome/browser/resources/chromeos/accessibility/switch_access/commands.js +++ b/chrome/browser/resources/chromeos/accessibility/switch_access/commands.js
@@ -25,6 +25,13 @@ command => this.runCommand_(command)); } + static init() { + if (SACommands.instance) { + throw new Error('Cannot create more than one SACommands instance.'); + } + SACommands.instance = new SACommands(); + } + /** * Run the function binding for the specified command. * @param {!Command} command @@ -35,3 +42,6 @@ AutoScanManager.restartIfRunning(); } } + +/** @type {SACommands} */ +SACommands.instance;
diff --git a/chrome/browser/resources/chromeos/accessibility/switch_access/switch_access.js b/chrome/browser/resources/chromeos/accessibility/switch_access/switch_access.js index 7d9e932..31c68eb 100644 --- a/chrome/browser/resources/chromeos/accessibility/switch_access/switch_access.js +++ b/chrome/browser/resources/chromeos/accessibility/switch_access/switch_access.js
@@ -6,10 +6,8 @@ import {EventHandler} from '../common/event_handler.js'; import {FlagName, Flags} from '../common/flags.js'; -import {SACommands} from './commands.js'; import {Navigator} from './navigator.js'; import {KeyboardRootNode} from './nodes/keyboard_node.js'; -import {PreferenceManager} from './preference_manager.js'; import {ErrorType, Mode} from './switch_access_constants.js'; const AutomationNode = chrome.automation.AutomationNode; @@ -26,23 +24,15 @@ * codebase. */ export class SwitchAccess { - static async init() { - await Flags.init(); + /** @param {!AutomationNode} desktop */ + static async init(desktop) { if (SwitchAccess.instance) { throw new Error('Cannot create two SwitchAccess.instances'); } SwitchAccess.instance = new SwitchAccess(); - const desktop = await AsyncUtil.getDesktop(); const currentFocus = await AsyncUtil.getFocus(); - - await SwitchAccess.waitForFocus_(desktop, currentFocus); - - // Navigator must be initialized first. - Navigator.initializeSingletonInstances(desktop); - - SwitchAccess.commands = new SACommands(); - PreferenceManager.initialize(); + await SwitchAccess.instance.waitForFocus_(desktop, currentFocus); } /** Starts Switch Access behavior. */ @@ -61,7 +51,7 @@ * @param {AutomationNode} currentFocus * @private */ - static async waitForFocus_(desktop, currentFocus) { + async waitForFocus_(desktop, currentFocus) { return new Promise(resolve => { // Focus is available. Finish init without waiting for further events. // Disallow web view nodes, which indicate a root web area is still
diff --git a/chrome/browser/resources/chromeos/accessibility/switch_access/switch_access_loader.js b/chrome/browser/resources/chromeos/accessibility/switch_access/switch_access_loader.js index ed05a84..e92ad57 100644 --- a/chrome/browser/resources/chromeos/accessibility/switch_access/switch_access_loader.js +++ b/chrome/browser/resources/chromeos/accessibility/switch_access/switch_access_loader.js
@@ -2,14 +2,27 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +import {AsyncUtil} from '../common/async_util.js'; +import {Flags} from '../common/flags.js'; import {InstanceChecker} from '../common/instance_checker.js'; +import {SACommands} from './commands.js'; +import {Navigator} from './navigator.js'; +import {PreferenceManager} from './preference_manager.js'; import {SwitchAccess} from './switch_access.js'; InstanceChecker.closeExtraInstances(); async function initAll() { - await SwitchAccess.init(); + await Flags.init(); + const desktop = await AsyncUtil.getDesktop(); + await SwitchAccess.init(desktop); + + // Navigator must be initialized before other classes. + Navigator.initializeSingletonInstances(desktop); + + SACommands.init(); + PreferenceManager.initialize(); SwitchAccess.start(); }
diff --git a/chrome/browser/resources/chromeos/accessibility/switch_access/switch_access_test.js b/chrome/browser/resources/chromeos/accessibility/switch_access/switch_access_test.js index 6e4c0d5..2eaa947 100644 --- a/chrome/browser/resources/chromeos/accessibility/switch_access/switch_access_test.js +++ b/chrome/browser/resources/chromeos/accessibility/switch_access/switch_access_test.js
@@ -27,11 +27,12 @@ AX_TEST_F( 'SwitchAccessSwitchAccessTest', 'NoFocusDefersInit', async function() { + await this.runWithLoadedTree(''); // Build a new SwitchAccess instance with hooks. let initCount = 0; const oldInit = SwitchAccess.init; - SwitchAccess.init = async () => { - await oldInit(); + SwitchAccess.init = async (...args) => { + await oldInit(...args); initCount++; assertNotNullNorUndefined(this.promiseCallback); this.promiseCallback(); @@ -51,7 +52,7 @@ // Initialize; we should not have incremented initCount since there's no // focus. - SwitchAccess.init(); + SwitchAccess.init(this.desktop); await this.waitForCallback(); assertEquals(0, initCount); @@ -60,7 +61,7 @@ // Restub this to pass a "focused" node. chrome.automation.getFocus = callback => callback({}); - SwitchAccess.init(); + SwitchAccess.init(this.desktop); await this.waitForCallback(); assertEquals(1, initCount); });
diff --git a/chrome/browser/resources/chromeos/accessibility/switch_access/test_utility.js b/chrome/browser/resources/chromeos/accessibility/switch_access/test_utility.js index 0c4d6c3..9dd77231 100644 --- a/chrome/browser/resources/chromeos/accessibility/switch_access/test_utility.js +++ b/chrome/browser/resources/chromeos/accessibility/switch_access/test_utility.js
@@ -18,6 +18,7 @@ const TestUtility = { async setup() { await Promise.all([ + importModule('SACommands', '/switch_access/commands.js'), importModule('FocusRingManager', '/switch_access/focus_ring_manager.js'), importModule('Navigator', '/switch_access/navigator.js'), importModule('SwitchAccess', '/switch_access/switch_access.js'), @@ -42,17 +43,17 @@ }, pressNextSwitch() { - SwitchAccess.commands.runCommand_( + SACommands.instance.runCommand_( chrome.accessibilityPrivate.SwitchAccessCommand.NEXT); }, pressPreviousSwitch() { - SwitchAccess.commands.runCommand_( + SACommands.instance.runCommand_( chrome.accessibilityPrivate.SwitchAccessCommand.PREVIOUS); }, pressSelectSwitch() { - SwitchAccess.commands.runCommand_( + SACommands.instance.runCommand_( chrome.accessibilityPrivate.SwitchAccessCommand.SELECT); },
diff --git a/chrome/browser/resources/settings/privacy_page/cookies_page.ts b/chrome/browser/resources/settings/privacy_page/cookies_page.ts index 69ea9ca1d..6622e15d 100644 --- a/chrome/browser/resources/settings/privacy_page/cookies_page.ts +++ b/chrome/browser/resources/settings/privacy_page/cookies_page.ts
@@ -175,9 +175,15 @@ assert(toFocus); focusWithoutInk(toFocus); }; - this.focusConfig.set( - `${routes.SITE_SETTINGS_ALL.path}_${routes.COOKIES.path}`, - selectSiteDataLinkRow); + if (this.is3pcdRedesignEnabled_) { + this.focusConfig.set( + `${routes.SITE_SETTINGS_ALL.path}_${routes.TRACKING_PROTECTION.path}`, + selectSiteDataLinkRow); + } else { + this.focusConfig.set( + `${routes.SITE_SETTINGS_ALL.path}_${routes.COOKIES.path}`, + selectSiteDataLinkRow); + } if (this.showPreloadingSubpage_) { const selectPreloadingLinkRow = () => { @@ -193,7 +199,11 @@ } override currentRouteChanged(route: Route) { - if (route !== routes.COOKIES) { + if (this.is3pcdRedesignEnabled_) { + if (route !== routes.TRACKING_PROTECTION) { + this.$.toast.hide(); + } + } else if (route !== routes.COOKIES) { this.$.toast.hide(); } }
diff --git a/chrome/browser/resources/settings/privacy_page/privacy_page.html b/chrome/browser/resources/settings/privacy_page/privacy_page.html index d56611a..214017ea 100644 --- a/chrome/browser/resources/settings/privacy_page/privacy_page.html +++ b/chrome/browser/resources/settings/privacy_page/privacy_page.html
@@ -55,7 +55,7 @@ start-icon="settings:visibility-off" class="hr" label="$i18n{trackingProtectionLinkRowLabel}" sub-label="$i18n{trackingProtectionLinkRowSubLabel}" - on-click="onCookiesClick_" + on-click="onTrackingProtectionClick_" role-description="$i18n{subpageArrowRoleDescription}"> </cr-link-row> </template> @@ -314,8 +314,8 @@ </settings-subpage> </template> <template is="dom-if" if="[[is3pcdRedesignEnabled_]]"> - <template is="dom-if" route-path="/cookies"> - <settings-subpage id="cookies" + <template is="dom-if" route-path="/trackingProtection"> + <settings-subpage id="trackingProtection" page-title="$i18n{trackingProtectionPageTitle}" learn-more-url="$i18n{cookiesSettingsHelpCenterURL}" search-label="$i18n{siteSettingsAllSitesSearch}"
diff --git a/chrome/browser/resources/settings/privacy_page/privacy_page.ts b/chrome/browser/resources/settings/privacy_page/privacy_page.ts index d8d32be..41539979 100644 --- a/chrome/browser/resources/settings/privacy_page/privacy_page.ts +++ b/chrome/browser/resources/settings/privacy_page/privacy_page.ts
@@ -227,6 +227,11 @@ map.set(`${routes.COOKIES.path}_${routes.BASIC.path}`, selector); } + if (routes.TRACKING_PROTECTION) { + map.set( + routes.TRACKING_PROTECTION.path, '#trackingProtectionLinkRow'); + } + if (routes.SITE_SETTINGS) { map.set(routes.SITE_SETTINGS.path, '#permissionsLinkRow'); } @@ -432,6 +437,12 @@ Router.getInstance().navigateTo(routes.COOKIES); } + private onTrackingProtectionClick_() { + this.interactedWithPage_(); + + Router.getInstance().navigateTo(routes.TRACKING_PROTECTION); + } + private onCbdDialogClosed_() { Router.getInstance().navigateTo(routes.CLEAR_BROWSER_DATA.parent!); setTimeout(() => {
diff --git a/chrome/browser/resources/settings/route.ts b/chrome/browser/resources/settings/route.ts index 4398484e..26619e8 100644 --- a/chrome/browser/resources/settings/route.ts +++ b/chrome/browser/resources/settings/route.ts
@@ -27,9 +27,15 @@ r.PRIVACY_GUIDE = r.PRIVACY.createChild('guide'); } r.SITE_SETTINGS = r.PRIVACY.createChild('/content'); - r.COOKIES = r.PRIVACY.createChild('/cookies'); r.SECURITY = r.PRIVACY.createChild('/security'); + r.TRACKING_PROTECTION = r.PRIVACY.createChild('/trackingProtection'); + r.COOKIES = r.PRIVACY.createChild('/cookies'); + if (!loadTimeData.getBoolean( + 'isPerformanceSettingsPreloadingSubpageEnabled')) { + r.PRELOADING = r.COOKIES.createChild('/preloading'); + } + if (loadTimeData.getBoolean('isPrivacySandboxSettings4') && !loadTimeData.getBoolean('isPrivacySandboxRestricted')) { r.PRIVACY_SANDBOX = r.PRIVACY.createChild('/adPrivacy'); @@ -62,11 +68,6 @@ // </if> } - if (!loadTimeData.getBoolean( - 'isPerformanceSettingsPreloadingSubpageEnabled')) { - r.PRELOADING = r.COOKIES.createChild('/preloading'); - } - r.SITE_SETTINGS_ALL = r.SITE_SETTINGS.createChild('all'); r.SITE_SETTINGS_SITE_DETAILS = r.SITE_SETTINGS_ALL.createChild('/content/siteDetails');
diff --git a/chrome/browser/resources/settings/router.ts b/chrome/browser/resources/settings/router.ts index 8c989c86..24bf153 100644 --- a/chrome/browser/resources/settings/router.ts +++ b/chrome/browser/resources/settings/router.ts
@@ -102,6 +102,7 @@ SYNC: Route; SYNC_ADVANCED: Route; SYSTEM: Route; + TRACKING_PROTECTION: Route; TRIGGERED_RESET_DIALOG: Route; }
diff --git a/chrome/browser/resources/settings/site_settings_page/site_settings_list.ts b/chrome/browser/resources/settings/site_settings_page/site_settings_list.ts index b65b8edd..f8783df0 100644 --- a/chrome/browser/resources/settings/site_settings_page/site_settings_list.ts +++ b/chrome/browser/resources/settings/site_settings_page/site_settings_list.ts
@@ -164,6 +164,13 @@ } if (category === ContentSettingsTypes.COOKIES) { + if (loadTimeData.getBoolean('is3pcdCookieSettingsRedesignEnabled')) { + const index = this.categoryList.map(e => e.id).indexOf( + ContentSettingsTypes.COOKIES); + this.set( + `categoryList.${index}.subLabel`, + this.i18n('trackingProtectionLinkRowSubLabel')); + } // Updates to the cookies label are handled by the // cookieSettingDescriptionChanged event listener. return Promise.resolve(); @@ -303,7 +310,8 @@ * Update the third-party cookies link row label when the pref changes. */ private updateThirdPartyCookiesLabel_() { - if (!loadTimeData.getBoolean('isPrivacySandboxSettings4')) { + if (!loadTimeData.getBoolean('isPrivacySandboxSettings4') || + loadTimeData.getBoolean('is3pcdCookieSettingsRedesignEnabled')) { return; }
diff --git a/chrome/browser/resources/settings/site_settings_page/site_settings_page.ts b/chrome/browser/resources/settings/site_settings_page/site_settings_page.ts index 05fcb66d..577c937d 100644 --- a/chrome/browser/resources/settings/site_settings_page/site_settings_page.ts +++ b/chrome/browser/resources/settings/site_settings_page/site_settings_page.ts
@@ -41,6 +41,8 @@ if (categoryItemMap !== null) { return categoryItemMap; } + const is3pcdRedesignEnabled = + loadTimeData.getBoolean('is3pcdCookieSettingsRedesignEnabled'); // The following list is ordered alphabetically by |id|. The order in which // these appear in the UI is determined elsewhere in this file. const categoryList = [ @@ -137,10 +139,13 @@ { route: routes.COOKIES, id: Id.COOKIES, - label: loadTimeData.getBoolean('isPrivacySandboxSettings4') ? - 'thirdPartyCookiesLinkRowLabel' : - 'siteSettingsCookies', - icon: 'settings:cookie', + label: is3pcdRedesignEnabled ? + 'trackingProtectionLinkRowLabel' : + (loadTimeData.getBoolean('isPrivacySandboxSettings4') ? + 'thirdPartyCookiesLinkRowLabel' : + 'siteSettingsCookies'), + icon: is3pcdRedesignEnabled ? 'settings:visibility-off' : + 'settings:cookie', enabledLabel: 'siteSettingsCookiesAllowed', disabledLabel: 'siteSettingsBlocked', otherLabel: 'cookiePageClearOnExit',
diff --git a/chrome/browser/resources/side_panel/performance_controls/BUILD.gn b/chrome/browser/resources/side_panel/performance_controls/BUILD.gn new file mode 100644 index 0000000..206cc28b --- /dev/null +++ b/chrome/browser/resources/side_panel/performance_controls/BUILD.gn
@@ -0,0 +1,28 @@ +# 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("//ui/webui/resources/tools/build_webui.gni") + +assert(!is_android) + +build_webui("build") { + grd_prefix = "side_panel_performance" + + static_files = [ "performance.html" ] + + web_component_files = [ "app.ts" ] + + non_web_component_files = [] + + mojo_files_deps = [ "//chrome/browser/ui/webui/side_panel/performance_controls:mojo_bindings_ts__generator" ] + mojo_files = [ "$root_gen_dir/chrome/browser/ui/webui/side_panel/performance_controls/performance.mojom-webui.ts" ] + + ts_composite = true + ts_deps = [ + "//third_party/polymer/v3_0:library", + "//ui/webui/resources/cr_elements:build_ts", + "//ui/webui/resources/js:build_ts", + "//ui/webui/resources/mojo:build_ts", + ] +}
diff --git a/chrome/browser/resources/side_panel/performance_controls/app.html b/chrome/browser/resources/side_panel/performance_controls/app.html new file mode 100644 index 0000000..fe16707 --- /dev/null +++ b/chrome/browser/resources/side_panel/performance_controls/app.html
@@ -0,0 +1 @@ +<!-- Insert side panel contents here. --> \ No newline at end of file
diff --git a/chrome/browser/resources/side_panel/performance_controls/app.ts b/chrome/browser/resources/side_panel/performance_controls/app.ts new file mode 100644 index 0000000..2af1e33 --- /dev/null +++ b/chrome/browser/resources/side_panel/performance_controls/app.ts
@@ -0,0 +1,31 @@ +// 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 {PolymerElement} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; + +import {getTemplate} from './app.html.js'; + +export interface PerformanceAppElement { + $: {}; +} + +export class PerformanceAppElement extends PolymerElement { + static get is() { + return 'performance-app'; + } + + static get template() { + return getTemplate(); + } + + static get properties() { + return {}; + } +} +declare global { + interface HTMLElementTagNameMap { + 'performance-app': PerformanceAppElement; + } +} +customElements.define(PerformanceAppElement.is, PerformanceAppElement);
diff --git a/chrome/browser/resources/side_panel/performance_controls/performance.html b/chrome/browser/resources/side_panel/performance_controls/performance.html new file mode 100644 index 0000000..b63a104 --- /dev/null +++ b/chrome/browser/resources/side_panel/performance_controls/performance.html
@@ -0,0 +1,24 @@ +<!doctype html> +<html dir="$i18n{textdirection}" lang="$i18n{language}"> + <head> + <meta charset="utf-8"> + <meta name="color-scheme" content="light dark"> + <link rel="stylesheet" href="chrome://resources/css/text_defaults_md.css"> + <link rel="stylesheet" href="chrome://resources/css/md_colors.css"> + <style> + body { + background: white; + } + + @media (prefers-color-scheme: dark) { + body { + background: var(--google-grey-900); + } + } + </style> + </head> + <body> + <performance-app></performance-app> + <script type="module" src="app.js"></script> + </body> +</html>
diff --git a/chrome/browser/resources/side_panel/read_anything/read_anything_toolbar.html b/chrome/browser/resources/side_panel/read_anything/read_anything_toolbar.html index c6e6ca3..f06de0f4 100644 --- a/chrome/browser/resources/side_panel/read_anything/read_anything_toolbar.html +++ b/chrome/browser/resources/side_panel/read_anything/read_anything_toolbar.html
@@ -38,7 +38,7 @@ .back, .section { font-weight: bold; } - #font-size-decrease{ + #font-size-decrease { margin-left: 16px; } .font-size { @@ -82,32 +82,14 @@ on-click="onHighlightClick_"> </cr-icon-button> </span> - <cr-icon-button - id="font-size" - iron-icon="read-anything:font-size" - on-click="onShowFontSizeMenuClick_"> - </cr-icon-button> - <cr-icon-button - id="font" - iron-icon="read-anything:font" - on-click="onShowFontMenuClick_"> - </cr-icon-button> - <cr-icon-button - id="color" - iron-icon="read-anything:color" - on-click="onShowColorMenuClick_"> - </cr-icon-button> - <cr-icon-button - id="line-spacing" - iron-icon="read-anything:line-spacing" - on-click="onShowLineSpacingMenuClick_"> - </cr-icon-button> - <cr-icon-button - id="letter-spacing" - iron-icon="read-anything:letter-spacing" - on-click="onShowLetterSpacingMenuClick_"> - </cr-icon-button> - + <template is="dom-repeat" items="[[textStyleOptions_]]"> + <cr-icon-button + class="toolbar-button" + id="[[item.id]]" + iron-icon="[[item.icon]]" + on-click="onTextStyleMenuButtonClick_"> + </cr-icon-button> + </template> <cr-action-menu id="rateMenu"> <template is="dom-repeat" items="[[rateOptions_]]"> <button class="dropdown-item" on-click="onRateClick_">
diff --git a/chrome/browser/resources/side_panel/read_anything/read_anything_toolbar.ts b/chrome/browser/resources/side_panel/read_anything/read_anything_toolbar.ts index 05d93e8..dbc146a 100644 --- a/chrome/browser/resources/side_panel/read_anything/read_anything_toolbar.ts +++ b/chrome/browser/resources/side_panel/read_anything/read_anything_toolbar.ts
@@ -38,6 +38,14 @@ callback: () => void; } +interface MenuButton { + id: string; + icon: string; + // This is a function instead of just the menu itself because the menu isn't + // ready by the time we create the MenuButton entries. + menuToOpen: () => CrActionMenuElement; +} + // Enum for logging when a text style setting is changed. // These values are persisted to logs. Entries should not be renumbered and // numeric values should never be reused. @@ -73,6 +81,7 @@ lineSpacingOptions_: Array, colorOptions_: Array, rateOptions_: Array, + textStyleOptions_: Array, }; } @@ -162,6 +171,34 @@ private rateOptions_: number[] = [0.5, 0.8, 1, 1.2, 1.5, 2, 3, 4]; + private textStyleOptions_: MenuButton[] = [ + { + id: 'font-size', + icon: 'read-anything:font-size', + menuToOpen: () => this.$.fontSizeMenu, + }, + { + id: 'font', + icon: 'read-anything:font', + menuToOpen: () => this.$.fontMenu, + }, + { + id: 'color', + icon: 'read-anything:color', + menuToOpen: () => this.$.colorMenu, + }, + { + id: 'line-spacing', + icon: 'read-anything:line-spacing', + menuToOpen: () => this.$.lineSpacingMenu, + }, + { + id: 'letter-spacing', + icon: 'read-anything:letter-spacing', + menuToOpen: () => this.$.letterSpacingMenu, + }, + ]; + private showAtPositionConfig_: ShowAtPositionConfig = { top: 20, left: 8, @@ -282,30 +319,14 @@ } } + private onTextStyleMenuButtonClick_(event: DomRepeatEvent<MenuButton>) { + this.openMenu_(event.model.item.menuToOpen(), event.target as HTMLElement); + } + private onShowRateMenuClick_(event: MouseEvent) { this.openMenu_(this.$.rateMenu, event.target as HTMLElement); } - private onShowColorMenuClick_(event: MouseEvent) { - this.openMenu_(this.$.colorMenu, event.target as HTMLElement); - } - - private onShowLineSpacingMenuClick_(event: MouseEvent) { - this.openMenu_(this.$.lineSpacingMenu, event.target as HTMLElement); - } - - private onShowLetterSpacingMenuClick_(event: MouseEvent) { - this.openMenu_(this.$.letterSpacingMenu, event.target as HTMLElement); - } - - private onShowFontMenuClick_(event: MouseEvent) { - this.openMenu_(this.$.fontMenu, event.target as HTMLElement); - } - - private onShowFontSizeMenuClick_(event: MouseEvent) { - this.openMenu_(this.$.fontSizeMenu, event.target as HTMLElement); - } - private openMenu_(menuToOpen: CrActionMenuElement, target: HTMLElement) { this.closeMenus_();
diff --git a/chrome/browser/safe_browsing/download_protection/deep_scanning_request.cc b/chrome/browser/safe_browsing/download_protection/deep_scanning_request.cc index 8bccb59..713e6526 100644 --- a/chrome/browser/safe_browsing/download_protection/deep_scanning_request.cc +++ b/chrome/browser/safe_browsing/download_protection/deep_scanning_request.cc
@@ -312,6 +312,20 @@ } } +void LogDeepScanResult(DownloadCheckResult download_result, + DeepScanningRequest::DeepScanTrigger trigger, + bool is_encrypted_archive) { + base::UmaHistogramEnumeration( + "SBClientDownload.MalwareDeepScanResult2." + GetTriggerName(trigger), + download_result); + if (is_encrypted_archive) { + base::UmaHistogramEnumeration( + "SBClientDownload.PasswordProtectedMalwareDeepScanResult." + + GetTriggerName(trigger), + download_result); + } +} + } // namespace /* static */ @@ -592,15 +606,25 @@ /*duration=*/base::TimeTicks::Now() - upload_start_times_[current_path], /*total_size=*/item_->GetTotalBytes(), /*result=*/result, /*response=*/response); + + if (trigger_ == DeepScanTrigger::TRIGGER_CONSUMER_PROMPT) { + OnConsumerScanComplete(current_path, result, response); + } else { + OnEnterpriseScanComplete(current_path, result, response); + } +} + +void DeepScanningRequest::OnConsumerScanComplete( + const base::FilePath& current_path, + BinaryUploadService::Result result, + enterprise_connectors::ContentAnalysisResponse response) { + CHECK_EQ(trigger_, DeepScanTrigger::TRIGGER_CONSUMER_PROMPT); DownloadCheckResult download_result = DownloadCheckResult::UNKNOWN; if (result == BinaryUploadService::Result::SUCCESS) { request_tokens_.push_back(response.request_token()); ResponseToDownloadCheckResult(response, &download_result); - if (trigger_ == DeepScanTrigger::TRIGGER_CONSUMER_PROMPT) { - LogDeepScanEvent(item_, DeepScanEvent::kScanCompleted); - } + LogDeepScanEvent(item_, DeepScanEvent::kScanCompleted); } else if (!base::FeatureList::IsEnabled(kDeepScanningUpdatedUX) && - trigger_ == DeepScanTrigger::TRIGGER_CONSUMER_PROMPT && ResultIsRetriable(result) && MaybeShowDeepScanFailureModalDialog( base::BindOnce(&DeepScanningRequest::Start, @@ -614,12 +638,9 @@ base::BindOnce(&DeepScanningRequest::OpenDownload, weak_ptr_factory_.GetWeakPtr()))) { return; - } else if (base::FeatureList::IsEnabled(kDeepScanningUpdatedUX) && - trigger_ == DeepScanTrigger::TRIGGER_CONSUMER_PROMPT) { + } else if (base::FeatureList::IsEnabled(kDeepScanningUpdatedUX)) { download_result = DownloadCheckResult::DEEP_SCANNED_FAILED; - if (trigger_ == DeepScanTrigger::TRIGGER_CONSUMER_PROMPT) { - LogDeepScanEvent(item_, DeepScanEvent::kScanFailed); - } + LogDeepScanEvent(item_, DeepScanEvent::kScanFailed); if (base::FeatureList::IsEnabled(kDeepScanningEncryptedArchives) && result == BinaryUploadService::Result::FILE_ENCRYPTED) { @@ -630,6 +651,25 @@ PromptForPassword(item_); download_result = DownloadCheckResult::PROMPT_FOR_SCANNING; } + } + + LogDeepScanResult(download_result, trigger_, + DownloadItemWarningData::IsEncryptedArchive(item_)); + + DCHECK(file_metadata_.count(current_path)); + file_metadata_.at(current_path).scan_response = std::move(response); + MaybeFinishRequest(download_result); +} + +void DeepScanningRequest::OnEnterpriseScanComplete( + const base::FilePath& current_path, + BinaryUploadService::Result result, + enterprise_connectors::ContentAnalysisResponse response) { + CHECK_EQ(trigger_, DeepScanTrigger::TRIGGER_POLICY); + DownloadCheckResult download_result = DownloadCheckResult::UNKNOWN; + if (result == BinaryUploadService::Result::SUCCESS) { + request_tokens_.push_back(response.request_token()); + ResponseToDownloadCheckResult(response, &download_result); } else if (result == BinaryUploadService::Result::FILE_TOO_LARGE && analysis_settings_.block_large_files) { download_result = DownloadCheckResult::BLOCKED_TOO_LARGE; @@ -642,15 +682,8 @@ download_result = DownloadCheckResult::BLOCKED_UNSUPPORTED_FILE_TYPE; } - base::UmaHistogramEnumeration( - "SBClientDownload.MalwareDeepScanResult2." + GetTriggerName(trigger_), - download_result); - if (DownloadItemWarningData::IsEncryptedArchive(item_)) { - base::UmaHistogramEnumeration( - "SBClientDownload.PasswordProtectedMalwareDeepScanResult." + - GetTriggerName(trigger_), - download_result); - } + LogDeepScanResult(download_result, trigger_, + DownloadItemWarningData::IsEncryptedArchive(item_)); Profile* profile = Profile::FromBrowserContext( content::DownloadItemUtils::GetBrowserContext(item_));
diff --git a/chrome/browser/safe_browsing/download_protection/deep_scanning_request.h b/chrome/browser/safe_browsing/download_protection/deep_scanning_request.h index 051f17c..ec811a44 100644 --- a/chrome/browser/safe_browsing/download_protection/deep_scanning_request.h +++ b/chrome/browser/safe_browsing/download_protection/deep_scanning_request.h
@@ -138,6 +138,14 @@ void OnScanComplete(const base::FilePath& current_path, BinaryUploadService::Result result, enterprise_connectors::ContentAnalysisResponse response); + void OnConsumerScanComplete( + const base::FilePath& current_path, + BinaryUploadService::Result result, + enterprise_connectors::ContentAnalysisResponse response); + void OnEnterpriseScanComplete( + const base::FilePath& current_path, + BinaryUploadService::Result result, + enterprise_connectors::ContentAnalysisResponse response); // Called when a single file scanning request has completed. Calls // FinishRequest if it was the last required one.
diff --git a/chrome/browser/safe_browsing/extension_telemetry/extension_telemetry_service.cc b/chrome/browser/safe_browsing/extension_telemetry/extension_telemetry_service.cc index 4deb395..25997219 100644 --- a/chrome/browser/safe_browsing/extension_telemetry/extension_telemetry_service.cc +++ b/chrome/browser/safe_browsing/extension_telemetry/extension_telemetry_service.cc
@@ -98,6 +98,10 @@ // Delay before the Telemetry Service checks its last upload time. base::TimeDelta kStartupUploadCheckDelaySeconds = base::Seconds(15); +// Limit the off-store file data collection duration. +base::TimeDelta kOffstoreFileDataCollectionDurationLimitSeconds = + base::Seconds(60); + void RecordWhenFileWasPersisted(bool persisted_at_write_interval) { base::UmaHistogramBoolean( "SafeBrowsing.ExtensionTelemetry.FilePersistedAtWriteInterval", @@ -231,7 +235,9 @@ extension_prefs_(extensions::ExtensionPrefs::Get(profile)), enabled_(false), current_reporting_interval_( - base::Seconds(kExtensionTelemetryUploadIntervalSeconds.Get())) { + base::Seconds(kExtensionTelemetryUploadIntervalSeconds.Get())), + offstore_file_data_collection_duration_limit_( + kOffstoreFileDataCollectionDurationLimitSeconds) { // Register for SB preference change notifications. pref_service_ = profile_->GetPrefs(); pref_change_registrar_.Init(pref_service_); @@ -1080,9 +1086,13 @@ return; } - // If data for all offstore extensions has been collected, start the timer - // again to schedule the next pass of data collection. - if (offstore_extension_file_data_contexts_.empty()) { + // If data for all offstore extensions has been collected or + // |offstore_file_data_collection_duration_limit_| has been + // exceeded, start the timer again to schedule the next pass of data + // collection. + if (offstore_extension_file_data_contexts_.empty() || + (base::TimeTicks::Now() - offstore_file_data_collection_start_time_) >= + offstore_file_data_collection_duration_limit_) { offstore_file_data_collection_timer_.Start( FROM_HERE, base::Seconds(
diff --git a/chrome/browser/safe_browsing/extension_telemetry/extension_telemetry_service.h b/chrome/browser/safe_browsing/extension_telemetry/extension_telemetry_service.h index 0996c09..3888ba6 100644 --- a/chrome/browser/safe_browsing/extension_telemetry/extension_telemetry_service.h +++ b/chrome/browser/safe_browsing/extension_telemetry/extension_telemetry_service.h
@@ -286,6 +286,7 @@ // |kExtensionTelemetryFileDataProcessIntervalSeconds| - default: 2 hours. base::OneShotTimer offstore_file_data_collection_timer_; base::TimeTicks offstore_file_data_collection_start_time_; + base::TimeDelta offstore_file_data_collection_duration_limit_; using SignalProcessors = base::flat_map<ExtensionSignalType, @@ -299,7 +300,8 @@ friend class ExtensionTelemetryServiceTest; friend class ExtensionTelemetryServiceBrowserTest; - + FRIEND_TEST_ALL_PREFIXES(ExtensionTelemetryServiceTest, + FileData_EnforcesCollectionDurationLimit); base::WeakPtrFactory<ExtensionTelemetryService> weak_factory_{this}; };
diff --git a/chrome/browser/safe_browsing/extension_telemetry/extension_telemetry_service_unittest.cc b/chrome/browser/safe_browsing/extension_telemetry/extension_telemetry_service_unittest.cc index 305d2be..e793c45 100644 --- a/chrome/browser/safe_browsing/extension_telemetry/extension_telemetry_service_unittest.cc +++ b/chrome/browser/safe_browsing/extension_telemetry/extension_telemetry_service_unittest.cc
@@ -976,6 +976,34 @@ EXPECT_EQ(telemetry_report_pb->reports(1).extension().file_infos_size(), 0); } +TEST_F(ExtensionTelemetryServiceTest, + FileData_EnforcesCollectionDurationLimit) { + // Enable |kExtensionTelemetryFileData| feature and starts collection. + telemetry_service_->SetEnabled(false); + scoped_feature_list.InitAndEnableFeatureWithParameters( + {kExtensionTelemetryFileData}, + {{"StartupDelaySeconds", + base::NumberToString(kFileDataStartUpDelaySeconds)}}); + // Set collection duration limit to 0 milliseconds. + telemetry_service_->offstore_file_data_collection_duration_limit_ = + base::Milliseconds(0); + telemetry_service_->SetEnabled(true); + task_environment_.FastForwardBy(base::Seconds(kFileDataStartUpDelaySeconds)); + task_environment_.RunUntilIdle(); + + std::unique_ptr<TelemetryReport> telemetry_report_pb = GetTelemetryReport(); + + // Verify Extension 0 does not have offstore file data. + EXPECT_EQ(telemetry_report_pb->reports(0).extension().id(), kExtensionId[0]); + EXPECT_FALSE(telemetry_report_pb->reports(0).extension().has_manifest_json()); + EXPECT_EQ(telemetry_report_pb->reports(0).extension().file_infos_size(), 0); + + // Verify Extension 1 does not have offstore file data. + EXPECT_EQ(telemetry_report_pb->reports(1).extension().id(), kExtensionId[1]); + EXPECT_FALSE(telemetry_report_pb->reports(1).extension().has_manifest_json()); + EXPECT_EQ(telemetry_report_pb->reports(1).extension().file_infos_size(), 0); +} + TEST_F(ExtensionTelemetryServiceTest, DisableOffstoreExtensions) { telemetry_service_->SetEnabled(false); scoped_feature_list.InitAndEnableFeature(
diff --git a/chrome/browser/safety_check/android/BUILD.gn b/chrome/browser/safety_check/android/BUILD.gn index 640b7ba..2696412f 100644 --- a/chrome/browser/safety_check/android/BUILD.gn +++ b/chrome/browser/safety_check/android/BUILD.gn
@@ -58,6 +58,7 @@ "//components/sync/android:sync_java", "//content/public/android:content_java", "//third_party/androidx:androidx_annotation_annotation_java", + "//third_party/androidx:androidx_fragment_fragment_java", "//third_party/androidx:androidx_lifecycle_lifecycle_common_java", "//third_party/androidx:androidx_lifecycle_lifecycle_common_java8_java", "//third_party/androidx:androidx_lifecycle_lifecycle_livedata_core_java",
diff --git a/chrome/browser/scalable_iph/scalable_iph_factory.h b/chrome/browser/scalable_iph/scalable_iph_factory.h index 0b40bbe..2d4fd58 100644 --- a/chrome/browser/scalable_iph/scalable_iph_factory.h +++ b/chrome/browser/scalable_iph/scalable_iph_factory.h
@@ -23,6 +23,14 @@ static scalable_iph::ScalableIph* GetForBrowserContext( content::BrowserContext* browser_context); + // Call `GetBrowserContextToUse` with a logger for debugging purpose. + // `GetBrowserContextToUse` is a const member function. We have to pass a + // logger from the outside. This function is also marked as const to avoid + // accidentally changing its internal state. + virtual content::BrowserContext* GetBrowserContextToUseForDebug( + content::BrowserContext* browser_context, + scalable_iph::Logger* logger) const = 0; + // `ScalableIph` service has a repeating timer in it to invoke time tick // events. We want to start this service after a user login (but not during // OOBE session). A service must be created via this method to make sure it
diff --git a/chrome/browser/scalable_iph/scalable_iph_factory_impl.cc b/chrome/browser/scalable_iph/scalable_iph_factory_impl.cc index 9cabffe..0f7cc53f 100644 --- a/chrome/browser/scalable_iph/scalable_iph_factory_impl.cc +++ b/chrome/browser/scalable_iph/scalable_iph_factory_impl.cc
@@ -20,6 +20,7 @@ #include "chrome/browser/scalable_iph/scalable_iph_factory.h" #include "chromeos/ash/components/browser_context_helper/browser_context_helper.h" #include "chromeos/ash/components/browser_context_helper/browser_context_types.h" +#include "chromeos/ash/components/scalable_iph/logger.h" #include "chromeos/ash/components/scalable_iph/scalable_iph.h" #include "chromeos/ash/components/scalable_iph/scalable_iph_delegate.h" #include "chromeos/ash/services/multidevice_setup/public/cpp/prefs.h" @@ -80,64 +81,16 @@ delegate_testing_factory_ = std::move(delegate_testing_factory); } +content::BrowserContext* ScalableIphFactoryImpl::GetBrowserContextToUseForDebug( + content::BrowserContext* browser_context, + scalable_iph::Logger* logger) const { + return GetBrowserContextToUseInternal(browser_context, logger); +} + content::BrowserContext* ScalableIphFactoryImpl::GetBrowserContextToUse( content::BrowserContext* browser_context) const { - // TODO(b/286604737): Do not return a ScalableIph services if multi-user - // sign-in is used. - - if (!ash::features::IsScalableIphEnabled()) { - return nullptr; - } - - Profile* profile = Profile::FromBrowserContext(browser_context); - if (!profile) { - return nullptr; - } - - if (!ash::IsUserBrowserContext(browser_context) || - !profile->IsRegularProfile()) { - return nullptr; - } - - if (profile->IsChild()) { - return nullptr; - } - - if (!ash::multidevice_setup::IsFeatureAllowed( - ash::multidevice_setup::mojom::Feature::kPhoneHub, - profile->GetPrefs())) { - DLOG(WARNING) << "Phone hub feature is disabled by a policy. This is " - "expected only for test code as we are returning early " - "above if a profile is managed."; - return nullptr; - } - - if (IsSupportedEmailDomain(browser_context)) { - return browser_context; - } - - if (g_browser_process->platform_part() - ->browser_policy_connector_ash() - ->IsDeviceEnterpriseManaged()) { - return nullptr; - } - - if (profile->GetProfilePolicyConnector()->IsManaged()) { - return nullptr; - } - - CHECK(user_manager::UserManager::IsInitialized()) - << "UserManager is required for an eligibility check"; - // Check that the user profile is the device owner, excepting when - // the device owner id is not registered yet (i.e. first sessions). - if (user_manager::UserManager::Get()->GetOwnerAccountId() != - EmptyAccountId() && - !user_manager::UserManager::Get()->IsOwnerUser( - GetUser(browser_context))) { - return nullptr; - } - - return browser_context; + scalable_iph::Logger logger_unused; + return GetBrowserContextToUseInternal(browser_context, &logger_unused); } std::unique_ptr<KeyedService> @@ -162,6 +115,90 @@ tracker, std::move(scalable_iph_delegate), std::move(logger)); } +content::BrowserContext* ScalableIphFactoryImpl::GetBrowserContextToUseInternal( + content::BrowserContext* browser_context, + scalable_iph::Logger* logger) const { + // TODO(b/286604737): Do not return a ScalableIph services if multi-user + // sign-in is used. + + if (!ash::features::IsScalableIphEnabled()) { + SCALABLE_IPH_LOG(logger) << "ScalableIph flag is off."; + return nullptr; + } + + Profile* profile = Profile::FromBrowserContext(browser_context); + if (!profile) { + SCALABLE_IPH_LOG(logger) << "Unable to obtain a profile from a browser " + "context. browser_context==nullptr: " + << (browser_context == nullptr); + return nullptr; + } + + SCALABLE_IPH_LOG(logger) << "Profile user name: " + << profile->GetProfileUserName(); + + if (!ash::IsUserBrowserContext(browser_context)) { + SCALABLE_IPH_LOG(logger) << "Not a user browser context."; + return nullptr; + } + + if (!profile->IsRegularProfile()) { + SCALABLE_IPH_LOG(logger) << "Profile is not a regular profile."; + return nullptr; + } + + if (profile->IsChild()) { + SCALABLE_IPH_LOG(logger) << "Profile is a child profile."; + return nullptr; + } + + if (!ash::multidevice_setup::IsFeatureAllowed( + ash::multidevice_setup::mojom::Feature::kPhoneHub, + profile->GetPrefs())) { + SCALABLE_IPH_LOG(logger) << "Phone hub feature is disabled by a policy."; + DLOG(WARNING) << "Phone hub feature is disabled by a policy. This is " + "expected only for test code as we are returning early " + "above if a profile is managed."; + return nullptr; + } + + if (IsSupportedEmailDomain(browser_context)) { + SCALABLE_IPH_LOG(logger) + << "Provided browser context is in a supported email domain. Returning " + "early as an eligible profile."; + return browser_context; + } + + if (g_browser_process->platform_part() + ->browser_policy_connector_ash() + ->IsDeviceEnterpriseManaged()) { + SCALABLE_IPH_LOG(logger) << "Device is managed."; + return nullptr; + } + + if (profile->GetProfilePolicyConnector()->IsManaged()) { + SCALABLE_IPH_LOG(logger) << "Profile is managed."; + return nullptr; + } + + CHECK(user_manager::UserManager::IsInitialized()) + << "UserManager is required for an eligibility check"; + // Check that the user profile is the device owner, excepting when + // the device owner id is not registered yet (i.e. first sessions). + if (user_manager::UserManager::Get()->GetOwnerAccountId() != + EmptyAccountId() && + !user_manager::UserManager::Get()->IsOwnerUser( + GetUser(browser_context))) { + SCALABLE_IPH_LOG(logger) << "User is not an owner."; + return nullptr; + } + + SCALABLE_IPH_LOG(logger) + << "This browser context is eligible for ScalableIph."; + + return browser_context; +} + std::unique_ptr<scalable_iph::ScalableIphDelegate> ScalableIphFactoryImpl::CreateScalableIphDelegate( Profile* profile,
diff --git a/chrome/browser/scalable_iph/scalable_iph_factory_impl.h b/chrome/browser/scalable_iph/scalable_iph_factory_impl.h index 3e640f4..0ca3854b 100644 --- a/chrome/browser/scalable_iph/scalable_iph_factory_impl.h +++ b/chrome/browser/scalable_iph/scalable_iph_factory_impl.h
@@ -35,6 +35,10 @@ return !delegate_testing_factory_.is_null(); } + content::BrowserContext* GetBrowserContextToUseForDebug( + content::BrowserContext* browser_context, + scalable_iph::Logger* logger) const override; + protected: // BrowserContextKeyedServiceFactory: content::BrowserContext* GetBrowserContextToUse( @@ -45,6 +49,13 @@ private: friend base::NoDestructor<ScalableIphFactoryImpl>; + // This is the actual implementation of `GetBrowserContextToUse`. We have this + // interface to have logging. `GetBrowserContextToUse` is a const member + // function. We have to pass a logger from outside. + content::BrowserContext* GetBrowserContextToUseInternal( + content::BrowserContext* browser_context, + scalable_iph::Logger* logger) const; + std::unique_ptr<scalable_iph::ScalableIphDelegate> CreateScalableIphDelegate( Profile* profile, scalable_iph::Logger* logger) const;
diff --git a/chrome/browser/sync/prefs/chrome_syncable_prefs_database.cc b/chrome/browser/sync/prefs/chrome_syncable_prefs_database.cc index beaa41f..f0f7642 100644 --- a/chrome/browser/sync/prefs/chrome_syncable_prefs_database.cc +++ b/chrome/browser/sync/prefs/chrome_syncable_prefs_database.cc
@@ -7,6 +7,7 @@ #include "base/containers/fixed_flat_map.h" #include "base/strings/string_piece.h" #include "chrome/browser/promos/promos_pref_names.h" +#include "chrome/browser/ui/toolbar/toolbar_pref_names.h" #include "chrome/browser/ui/webui/side_panel/read_anything/read_anything_prefs.h" #include "chrome/common/pref_names.h" #include "components/language/core/browser/pref_names.h" @@ -284,6 +285,8 @@ kAccessibilityReadAnythingSpeechRate = 100229, kAccessibilityReadAnythingHighlightGranularity = 100230, kAccessibilityReadAnythingHighlightColor = 100231, + kPinnedActions = 100232, + kPinnedSearchCompanionMigrationComplete = 100233, // See components/sync_preferences/README.md about adding new entries here. // vvvvv IMPORTANT! vvvvv // Note to the reviewer: IT IS YOUR RESPONSIBILITY to ensure that new syncable @@ -383,6 +386,12 @@ {prefs::kSidePanelCompanionEntryPinnedToToolbar, {syncable_prefs_ids::kSidePanelCompanionEntryPinnedToToolbar, syncer::PREFERENCES, false, sync_preferences::MergeBehavior::kNone}}, + {prefs::kPinnedActions, + {syncable_prefs_ids::kPinnedActions, syncer::PREFERENCES, false, + sync_preferences::MergeBehavior::kMergeableListWithRewriteOnUpdate}}, + {prefs::kPinnedSearchCompanionMigrationComplete, + {syncable_prefs_ids::kPinnedSearchCompanionMigrationComplete, + syncer::PREFERENCES, false, sync_preferences::MergeBehavior::kNone}}, #endif // BUILDFLAG(IS_ANDROID) #if BUILDFLAG(ENABLE_EXTENSIONS) {extensions::pref_names::kPinnedExtensions,
diff --git a/chrome/browser/tpcd/experiment/eligibility_service.cc b/chrome/browser/tpcd/experiment/eligibility_service.cc index c9ec334..111cbbcd 100644 --- a/chrome/browser/tpcd/experiment/eligibility_service.cc +++ b/chrome/browser/tpcd/experiment/eligibility_service.cc
@@ -6,6 +6,7 @@ #include "base/check.h" #include "base/functional/bind.h" +#include "chrome/browser/privacy_sandbox/tracking_protection_onboarding_factory.h" #include "chrome/browser/tpcd/experiment/eligibility_service_factory.h" #include "content/public/browser/cookie_deprecation_label_manager.h" #include "content/public/browser/storage_partition.h" @@ -15,10 +16,13 @@ namespace tpcd::experiment { EligibilityService::EligibilityService(Profile* profile) - : profile_(profile), pref_service_(profile->GetPrefs()) { - DCHECK(base::FeatureList::IsEnabled( + : profile_(profile), + pref_service_(profile->GetPrefs()), + onboarding_service_( + TrackingProtectionOnboardingFactory::GetForProfile(profile_)) { + CHECK(base::FeatureList::IsEnabled( features::kCookieDeprecationFacilitatedTesting)); - DCHECK(pref_service_); + CHECK(pref_service_); } EligibilityService::~EligibilityService() = default; @@ -28,16 +32,30 @@ return EligibilityServiceFactory::GetForProfile(profile); } -void EligibilityService::OnClientEligibilityChanged() { +void EligibilityService::Shutdown() { + onboarding_service_ = nullptr; +} + +void EligibilityService::OnClientEligibilityChanged(bool is_eligible) { + // For each storage partition, update the cookie deprecation label to the + // updated value from the CookieDeprecationLabelManager. profile_->ForEachLoadedStoragePartition( base::BindRepeating([](content::StoragePartition* storage_partition) { - auto* cookie_deprecation_label_manager = - storage_partition->GetCookieDeprecationLabelManager(); - if (cookie_deprecation_label_manager) { + if (auto* cookie_deprecation_label_manager = + storage_partition->GetCookieDeprecationLabelManager()) { storage_partition->GetNetworkContext()->SetCookieDeprecationLabel( cookie_deprecation_label_manager->GetValue()); } })); + + // Update the eligibility for the onboarding UX flow. + if (onboarding_service_) { + if (is_eligible) { + onboarding_service_->MaybeMarkEligible(); + } else { + onboarding_service_->MaybeMarkIneligible(); + } + } } } // namespace tpcd::experiment
diff --git a/chrome/browser/tpcd/experiment/eligibility_service.h b/chrome/browser/tpcd/experiment/eligibility_service.h index ad20fcf9..7cda4bc 100644 --- a/chrome/browser/tpcd/experiment/eligibility_service.h +++ b/chrome/browser/tpcd/experiment/eligibility_service.h
@@ -10,6 +10,10 @@ #include "components/keyed_service/core/keyed_service.h" #include "components/prefs/pref_service.h" +namespace privacy_sandbox { +class TrackingProtectionOnboarding; +} + namespace tpcd::experiment { class EligibilityService : public KeyedService { @@ -21,16 +25,20 @@ static EligibilityService* Get(Profile* profile); + void Shutdown() override; + private: // So EligibilityServiceFactory::BuildServiceInstanceFor can call the // constructor. friend class EligibilityServiceFactory; friend class EligiblityServiceBrowserTest; - void OnClientEligibilityChanged(); + void OnClientEligibilityChanged(bool is_eligible); raw_ptr<Profile> profile_; raw_ptr<PrefService> pref_service_; + // onboarding_service_ may be null for OTR and system profiles. + raw_ptr<privacy_sandbox::TrackingProtectionOnboarding> onboarding_service_; }; } // namespace tpcd::experiment
diff --git a/chrome/browser/tpcd/experiment/eligibility_service_browsertest.cc b/chrome/browser/tpcd/experiment/eligibility_service_browsertest.cc index 8e46d17..91dcf0c3 100644 --- a/chrome/browser/tpcd/experiment/eligibility_service_browsertest.cc +++ b/chrome/browser/tpcd/experiment/eligibility_service_browsertest.cc
@@ -9,6 +9,7 @@ #include "base/strings/strcat.h" #include "base/test/scoped_feature_list.h" #include "chrome/browser/privacy_sandbox/privacy_sandbox_settings_factory.h" +#include "chrome/browser/privacy_sandbox/tracking_protection_onboarding_factory.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/tpcd/experiment/eligibility_service.h" #include "chrome/browser/tpcd/experiment/eligibility_service_factory.h" @@ -19,6 +20,7 @@ #include "chrome/test/base/ui_test_utils.h" #include "components/privacy_sandbox/privacy_sandbox_settings.h" #include "components/privacy_sandbox/privacy_sandbox_test_util.h" +#include "components/privacy_sandbox/tracking_protection_onboarding.h" #include "content/public/browser/storage_partition.h" #include "content/public/common/content_features.h" #include "content/public/test/browser_test.h" @@ -64,11 +66,11 @@ ->FlushNetworkInterfaceForTesting(); } - void FireOnClientEligibilityChanged() { + void FireOnClientEligibilityChanged(bool is_eligible) { auto* eligibility_service = tpcd::experiment::EligibilityServiceFactory::GetForProfile( browser()->profile()); - eligibility_service->OnClientEligibilityChanged(); + eligibility_service->OnClientEligibilityChanged(is_eligible); } net::EmbeddedTestServer https_server_{ @@ -110,7 +112,7 @@ ASSERT_FALSE(privacy_sandbox_settings->IsCookieDeprecationLabelAllowed()); - FireOnClientEligibilityChanged(); + FireOnClientEligibilityChanged(/*is_eligible=*/true); // Ensures the cookie deprecation label is updated in the network context. FlushNetworkInterface(); @@ -145,7 +147,7 @@ ASSERT_TRUE(privacy_sandbox_settings->IsCookieDeprecationLabelAllowed()); - FireOnClientEligibilityChanged(); + FireOnClientEligibilityChanged(/*is_eligible=*/false); // Ensures the cookie deprecation label is updated in the network context. FlushNetworkInterface(); @@ -160,4 +162,22 @@ "label_test"); } +IN_PROC_BROWSER_TEST_F(EligiblityServiceBrowserTest, + EligibilityChanged_OnboardingServiceNotified) { + privacy_sandbox::TrackingProtectionOnboarding* onboarding_service = + TrackingProtectionOnboardingFactory::GetForProfile(browser()->profile()); + + FireOnClientEligibilityChanged(/*is_eligible=*/true); + + EXPECT_EQ(onboarding_service->GetOnboardingStatus(), + privacy_sandbox::TrackingProtectionOnboarding::OnboardingStatus:: + kEligible); + + FireOnClientEligibilityChanged(/*is_eligible=*/false); + + EXPECT_EQ(onboarding_service->GetOnboardingStatus(), + privacy_sandbox::TrackingProtectionOnboarding::OnboardingStatus:: + kIneligible); +} + } // namespace tpcd::experiment
diff --git a/chrome/browser/tpcd/experiment/eligibility_service_factory.cc b/chrome/browser/tpcd/experiment/eligibility_service_factory.cc index ba8aacb..8421dbf 100644 --- a/chrome/browser/tpcd/experiment/eligibility_service_factory.cc +++ b/chrome/browser/tpcd/experiment/eligibility_service_factory.cc
@@ -5,6 +5,7 @@ #include "chrome/browser/tpcd/experiment/eligibility_service_factory.h" #include "chrome/browser/browser_process.h" +#include "chrome/browser/privacy_sandbox/tracking_protection_onboarding_factory.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/tpcd/experiment/eligibility_service.h" @@ -27,7 +28,9 @@ "EligibilityServiceFactory", ProfileSelections::Builder() .WithRegular(ProfileSelection::kOriginalOnly) - .Build()) {} + .Build()) { + DependsOn(TrackingProtectionOnboardingFactory::GetInstance()); +} std::unique_ptr<KeyedService> EligibilityServiceFactory::BuildServiceInstanceForBrowserContext(
diff --git a/chrome/browser/tpcd/metadata/DEPS b/chrome/browser/tpcd/metadata/DEPS new file mode 100644 index 0000000..fb86b50 --- /dev/null +++ b/chrome/browser/tpcd/metadata/DEPS
@@ -0,0 +1,3 @@ +include_rules = [ + "+components/tpcd/metadata", +]
diff --git a/chrome/browser/tpcd/metadata/DIR_METADATA b/chrome/browser/tpcd/metadata/DIR_METADATA new file mode 100644 index 0000000..decc3b4 --- /dev/null +++ b/chrome/browser/tpcd/metadata/DIR_METADATA
@@ -0,0 +1,4 @@ +monorail: { + component: "Internals>Network>Cookies" +} +team_email: "tpcd-mitigations-team@google.com"
diff --git a/chrome/browser/tpcd/metadata/updater_service.cc b/chrome/browser/tpcd/metadata/updater_service.cc new file mode 100644 index 0000000..b895602 --- /dev/null +++ b/chrome/browser/tpcd/metadata/updater_service.cc
@@ -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. + +#include "chrome/browser/tpcd/metadata/updater_service.h" + +#include "chrome/browser/content_settings/cookie_settings_factory.h" +#include "chrome/browser/profiles/profile.h" +#include "components/content_settings/core/browser/cookie_settings.h" +#include "content/public/browser/browser_context.h" +#include "content/public/browser/storage_partition.h" +#include "services/network/public/mojom/cookie_manager.mojom.h" + +namespace tpcd::metadata { +UpdaterService::UpdaterService(content::BrowserContext* context) + : browser_context_(context) { + CHECK(browser_context_); + + cookie_settings_ = CookieSettingsFactory::GetForProfile( + Profile::FromBrowserContext(browser_context_)); + + parser_ = tpcd::metadata::Parser::GetInstance(); + if (!parser_->GetMetadata().empty()) { + OnMetadataReady(); + } + + parser_->AddObserver(this); +} + +UpdaterService::~UpdaterService() { + parser_->RemoveObserver(this); +} + +void UpdaterService::Shutdown() { + parser_->RemoveObserver(this); +} + +void UpdaterService::OnMetadataReady() { + CHECK(browser_context_); + + ContentSettingsForOneType tpcd_metadata_grants; + + for (const auto& metadata_entry : parser_->GetMetadata()) { + const auto primary_pattern = ContentSettingsPattern::FromString( + metadata_entry.primary_pattern_spec()); + const auto secondary_pattern = ContentSettingsPattern::FromString( + metadata_entry.secondary_pattern_spec()); + + base::Value value = base::Value(ContentSetting::CONTENT_SETTING_ALLOW); + + tpcd_metadata_grants.emplace_back(primary_pattern, secondary_pattern, + std::move(value), std::string(), false); + } + + cookie_settings_->SetContentSettingsFor3pcdMetadataGrants( + tpcd_metadata_grants); + + browser_context_->GetDefaultStoragePartition() + ->GetCookieManagerForBrowserProcess() + ->SetContentSettingsFor3pcdMetadataGrants( + std::move(tpcd_metadata_grants)); +} +} // namespace tpcd::metadata
diff --git a/chrome/browser/tpcd/metadata/updater_service.h b/chrome/browser/tpcd/metadata/updater_service.h new file mode 100644 index 0000000..fe6fac6 --- /dev/null +++ b/chrome/browser/tpcd/metadata/updater_service.h
@@ -0,0 +1,44 @@ +// 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_TPCD_METADATA_UPDATER_SERVICE_H_ +#define CHROME_BROWSER_TPCD_METADATA_UPDATER_SERVICE_H_ + +#include "components/keyed_service/core/keyed_service.h" +#include "components/tpcd/metadata/parser.h" + +namespace content { +class BrowserContext; +} + +namespace content_settings { +class CookieSettings; +} + +namespace tpcd::metadata { +class UpdaterService : public KeyedService, public Parser::Observer { + public: + explicit UpdaterService(content::BrowserContext* context); + ~UpdaterService() override; + UpdaterService(const UpdaterService&) = delete; + UpdaterService& operator=(const UpdaterService&) = delete; + + private: + // KeyedService Start: + void Shutdown() override; + // KeyedService End. + + // Parser::Observer Start: + void OnMetadataReady() override; + // Parser::Observer End. + + raw_ptr<content::BrowserContext> browser_context_; + raw_ptr<Parser> parser_; + scoped_refptr<content_settings::CookieSettings> cookie_settings_; + base::WeakPtrFactory<UpdaterService> weak_ptr_factory_{this}; +}; + +} // namespace tpcd::metadata + +#endif // CHROME_BROWSER_TPCD_METADATA_UPDATER_SERVICE_H_
diff --git a/chrome/browser/tpcd/metadata/updater_service_browsertest.cc b/chrome/browser/tpcd/metadata/updater_service_browsertest.cc new file mode 100644 index 0000000..fca3365 --- /dev/null +++ b/chrome/browser/tpcd/metadata/updater_service_browsertest.cc
@@ -0,0 +1,199 @@ +// 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/tpcd/metadata/updater_service.h" + +#include <string> +#include <vector> + +#include "base/files/file_util.h" +#include "base/path_service.h" +#include "base/test/scoped_feature_list.h" +#include "chrome/browser/content_settings/cookie_settings_factory.h" +#include "chrome/browser/profiles/profile.h" +#include "chrome/browser/tpcd/metadata/updater_service_factory.h" +#include "chrome/browser/ui/browser.h" +#include "chrome/test/base/in_process_browser_test.h" +#include "chrome/test/base/ui_test_utils.h" +#include "components/content_settings/core/browser/cookie_settings.h" +#include "components/content_settings/core/browser/host_content_settings_map.h" +#include "components/content_settings/core/common/content_settings.h" +#include "components/content_settings/core/common/content_settings_types.h" +#include "components/tpcd/metadata/parser_test_helper.h" +#include "content/public/test/browser_test.h" +#include "net/base/features.h" + +namespace tpcd::metadata { +namespace { +const base::FilePath::CharType kComponentFileName[] = + FILE_PATH_LITERAL("metadata.pb"); +} // namespace + +class UpdaterServiceBrowserTest : public PlatformBrowserTest { + public: + ~UpdaterServiceBrowserTest() override = default; + + UpdaterServiceBrowserTest() { + CHECK(fake_install_dir_.CreateUniqueTempDir()); + CHECK(fake_install_dir_.IsValid()); + scoped_feature_list_.InitAndEnableFeature( + net::features::kTpcdMetadataGrants); + } + + UpdaterService* updater_service() { + return UpdaterServiceFactory::GetForProfile(browser()->profile()); + } + + Parser* parser() { return tpcd::metadata::Parser::GetInstance(); } + + void MockComponentInstallation(Metadata metadata) { + base::FilePath path = + fake_install_dir_.GetPath().Append(kComponentFileName); + CHECK(base::WriteFile(path, metadata.SerializeAsString())); + + CHECK(base::PathExists(path)); + std::string raw_metadata; + CHECK(base::ReadFileToString(path, &raw_metadata)); + + parser()->ParseMetadata(raw_metadata); + } + + PrefService* GetPrefs(Profile* profile = nullptr) { + return (profile ? profile : browser()->profile())->GetPrefs(); + } + + content_settings::CookieSettings* GetCookieSettings( + Profile* profile = nullptr) { + return CookieSettingsFactory::GetForProfile(profile ? profile + : browser()->profile()) + .get(); + } + + private: + base::ScopedTempDir fake_install_dir_; + base::test::ScopedFeatureList scoped_feature_list_; +}; + +IN_PROC_BROWSER_TEST_F(UpdaterServiceBrowserTest, + ContentSettingsForOneType_SuccessfullyUpdated) { + base::ScopedAllowBlockingForTesting allow_blocking; + + const GURL kEmbedded = GURL("http://www.bar.com"); + const GURL kEmbedder = GURL("http://www.foo.com"); + + ASSERT_EQ(GetCookieSettings() + ->GetContentSettingsForOneTypeForTesting( + ContentSettingsType::TPCD_METADATA_GRANTS) + .size(), + 0u); + EXPECT_EQ( + ContentSetting::CONTENT_SETTING_BLOCK, + GetCookieSettings()->GetContentSettingForTesting( + kEmbedded, kEmbedder, ContentSettingsType::TPCD_METADATA_GRANTS)); + + const std::string primary_pattern_spec = "[*.]bar.com"; + const std::string secondary_pattern_spec = "[*.]foo.com"; + + std::vector<MetadataPair> metadata_pairs; + metadata_pairs.emplace_back(primary_pattern_spec, secondary_pattern_spec); + Metadata metadata = MakeMetadataProtoFromVectorOfPair(metadata_pairs); + ASSERT_EQ(metadata.metadata_entries_size(), 1); + + MockComponentInstallation(metadata); + + ASSERT_EQ(GetCookieSettings() + ->GetContentSettingsForOneTypeForTesting( + ContentSettingsType::TPCD_METADATA_GRANTS) + .size(), + 1u); + EXPECT_EQ( + ContentSetting::CONTENT_SETTING_ALLOW, + GetCookieSettings()->GetContentSettingForTesting( + kEmbedded, kEmbedder, ContentSettingsType::TPCD_METADATA_GRANTS)); +} + +IN_PROC_BROWSER_TEST_F(UpdaterServiceBrowserTest, + ContentSettingsForOneType_SuccessfullyCleared) { + base::ScopedAllowBlockingForTesting allow_blocking; + + const GURL kEmbedded1 = GURL("http://www.bar.com"); + const GURL kEmbedder1 = GURL("http://www.foo.com"); + const GURL kEmbedded2 = GURL("http://www.baz.com"); + const GURL kEmbedder2 = GURL("http://www.daz.com"); + + { + const std::string primary_pattern_spec = "[*.]bar.com"; + const std::string secondary_pattern_spec = "[*.]foo.com"; + + std::vector<MetadataPair> metadata_pairs; + metadata_pairs.emplace_back(primary_pattern_spec, secondary_pattern_spec); + Metadata metadata = MakeMetadataProtoFromVectorOfPair(metadata_pairs); + ASSERT_EQ(metadata.metadata_entries_size(), 1); + + ASSERT_EQ(GetCookieSettings() + ->GetContentSettingsForOneTypeForTesting( + ContentSettingsType::TPCD_METADATA_GRANTS) + .size(), + 0u); + EXPECT_EQ( + + GetCookieSettings()->GetContentSettingForTesting( + kEmbedded1, kEmbedder1, ContentSettingsType::TPCD_METADATA_GRANTS), + ContentSetting::CONTENT_SETTING_BLOCK); + + MockComponentInstallation(metadata); + + ASSERT_EQ(GetCookieSettings() + ->GetContentSettingsForOneTypeForTesting( + ContentSettingsType::TPCD_METADATA_GRANTS) + .size(), + 1u); + EXPECT_EQ( + GetCookieSettings()->GetContentSettingForTesting( + kEmbedded1, kEmbedder1, ContentSettingsType::TPCD_METADATA_GRANTS), + ContentSetting::CONTENT_SETTING_ALLOW); + } + + { + const std::string primary_pattern_spec = "[*.]baz.com"; + const std::string secondary_pattern_spec = "[*.]daz.com"; + + std::vector<MetadataPair> metadata_pairs; + metadata_pairs.emplace_back(primary_pattern_spec, secondary_pattern_spec); + Metadata metadata = MakeMetadataProtoFromVectorOfPair(metadata_pairs); + ASSERT_EQ(metadata.metadata_entries_size(), 1); + + ASSERT_EQ(GetCookieSettings() + ->GetContentSettingsForOneTypeForTesting( + ContentSettingsType::TPCD_METADATA_GRANTS) + .size(), + 1u); + EXPECT_EQ( + GetCookieSettings()->GetContentSettingForTesting( + kEmbedded1, kEmbedder1, ContentSettingsType::TPCD_METADATA_GRANTS), + ContentSetting::CONTENT_SETTING_ALLOW); + EXPECT_EQ( + GetCookieSettings()->GetContentSettingForTesting( + kEmbedded2, kEmbedder2, ContentSettingsType::TPCD_METADATA_GRANTS), + ContentSetting::CONTENT_SETTING_BLOCK); + + MockComponentInstallation(metadata); + + ASSERT_EQ(GetCookieSettings() + ->GetContentSettingsForOneTypeForTesting( + ContentSettingsType::TPCD_METADATA_GRANTS) + .size(), + 1u); + EXPECT_EQ( + GetCookieSettings()->GetContentSettingForTesting( + kEmbedded1, kEmbedder1, ContentSettingsType::TPCD_METADATA_GRANTS), + ContentSetting::CONTENT_SETTING_BLOCK); + EXPECT_EQ( + GetCookieSettings()->GetContentSettingForTesting( + kEmbedded2, kEmbedder2, ContentSettingsType::TPCD_METADATA_GRANTS), + ContentSetting::CONTENT_SETTING_ALLOW); + } +} + +} // namespace tpcd::metadata
diff --git a/chrome/browser/tpcd/metadata/updater_service_factory.cc b/chrome/browser/tpcd/metadata/updater_service_factory.cc new file mode 100644 index 0000000..46fadb9 --- /dev/null +++ b/chrome/browser/tpcd/metadata/updater_service_factory.cc
@@ -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. + +#include "chrome/browser/tpcd/metadata/updater_service_factory.h" + +#include "chrome/browser/content_settings/cookie_settings_factory.h" +#include "chrome/browser/content_settings/host_content_settings_map_factory.h" +#include "chrome/browser/profiles/profile.h" +#include "chrome/browser/tpcd/metadata/updater_service.h" +#include "net/base/features.h" + +namespace tpcd::metadata { +// static +UpdaterServiceFactory* UpdaterServiceFactory::GetInstance() { + static base::NoDestructor<UpdaterServiceFactory> factory; + return factory.get(); +} + +// static +UpdaterService* UpdaterServiceFactory::GetForProfile(Profile* profile) { + return static_cast<UpdaterService*>( + GetInstance()->GetServiceForBrowserContext(profile, true)); +} + +// static +ProfileSelections UpdaterServiceFactory::CreateProfileSelections() { + if (!base::FeatureList::IsEnabled(net::features::kTpcdMetadataGrants)) { + return ProfileSelections::BuildNoProfilesSelected(); + } + + return ProfileSelections::Builder() + .WithRegular(ProfileSelection::kOriginalOnly) + .WithGuest(ProfileSelection::kOwnInstance) + // The Following will be completely unselected as users do not "browse" + // within this profiles. + .WithSystem(ProfileSelection::kNone) + .WithAshInternals(ProfileSelection::kNone) + .Build(); + ; +} + +UpdaterServiceFactory::UpdaterServiceFactory() + : ProfileKeyedServiceFactory("UpdaterService", CreateProfileSelections()) { + DependsOn(CookieSettingsFactory::GetInstance()); + DependsOn(HostContentSettingsMapFactory::GetInstance()); +} + +UpdaterServiceFactory::~UpdaterServiceFactory() = default; + +KeyedService* UpdaterServiceFactory::BuildServiceInstanceFor( + content::BrowserContext* context) const { + return new UpdaterService(context); +} + +bool UpdaterServiceFactory::ServiceIsCreatedWithBrowserContext() const { + // The `UpdaterService` needs to be created with `BrowserContext`, as it needs + // to be ready to update the ContentSettingsForOneType, right away, once the + // parser parses a metadata component. + return true; +} + +} // namespace tpcd::metadata
diff --git a/chrome/browser/tpcd/metadata/updater_service_factory.h b/chrome/browser/tpcd/metadata/updater_service_factory.h new file mode 100644 index 0000000..b9cd41a --- /dev/null +++ b/chrome/browser/tpcd/metadata/updater_service_factory.h
@@ -0,0 +1,44 @@ +// 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_TPCD_METADATA_UPDATER_SERVICE_FACTORY_H_ +#define CHROME_BROWSER_TPCD_METADATA_UPDATER_SERVICE_FACTORY_H_ + +#include "base/no_destructor.h" +#include "chrome/browser/profiles/profile_keyed_service_factory.h" + +namespace content { +class BrowserContext; +} + +namespace tpcd::metadata { + +class UpdaterService; + +class UpdaterServiceFactory : public ProfileKeyedServiceFactory { + public: + static UpdaterServiceFactory* GetInstance(); + static UpdaterService* GetForProfile(Profile* profile); + static ProfileSelections CreateProfileSelections(); + + UpdaterServiceFactory(const UpdaterServiceFactory&) = delete; + UpdaterServiceFactory& operator=(const UpdaterServiceFactory&) = delete; + UpdaterServiceFactory(UpdaterServiceFactory&&) = delete; + UpdaterServiceFactory& operator=(UpdaterServiceFactory&&) = delete; + + private: + friend class base::NoDestructor<UpdaterServiceFactory>; + + UpdaterServiceFactory(); + ~UpdaterServiceFactory() override; + + // BrowserContextKeyedServiceFactory: + KeyedService* BuildServiceInstanceFor( + content::BrowserContext* context) const override; + bool ServiceIsCreatedWithBrowserContext() const override; +}; + +} // namespace tpcd::metadata + +#endif // CHROME_BROWSER_TPCD_METADATA_UPDATER_SERVICE_FACTORY_H_
diff --git a/chrome/browser/tracing/chrome_tracing_delegate.cc b/chrome/browser/tracing/chrome_tracing_delegate.cc index 569799e..356d723 100644 --- a/chrome/browser/tracing/chrome_tracing_delegate.cc +++ b/chrome/browser/tracing/chrome_tracing_delegate.cc
@@ -245,6 +245,10 @@ return true; } +bool ChromeTracingDelegate::ShouldSaveUnuploadedTrace() const { + return true; +} + bool ChromeTracingDelegate::IsSystemWideTracingEnabled() { #if BUILDFLAG(IS_CHROMEOS_ASH) // Always allow system tracing in dev mode images.
diff --git a/chrome/browser/tracing/chrome_tracing_delegate.h b/chrome/browser/tracing/chrome_tracing_delegate.h index 347ecf9c..0afb603 100644 --- a/chrome/browser/tracing/chrome_tracing_delegate.h +++ b/chrome/browser/tracing/chrome_tracing_delegate.h
@@ -50,6 +50,7 @@ bool requires_anonymized_data, bool is_crash_scenario) override; + bool ShouldSaveUnuploadedTrace() const override; bool IsSystemWideTracingEnabled() override; absl::optional<base::Value::Dict> GenerateMetadataDict() override;
diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn index fb3757d..85f8758 100644 --- a/chrome/browser/ui/BUILD.gn +++ b/chrome/browser/ui/BUILD.gn
@@ -1423,6 +1423,7 @@ "tabs/organization/tab_data.h", "tabs/organization/tab_organization.cc", "tabs/organization/tab_organization.h", + "tabs/organization/tab_organization_observer.h", "tabs/organization/tab_organization_request.cc", "tabs/organization/tab_organization_request.h", "tabs/organization/tab_organization_service.cc", @@ -1527,6 +1528,8 @@ "toolbar/toolbar_actions_model.h", "toolbar/toolbar_actions_model_factory.cc", "toolbar/toolbar_actions_model_factory.h", + "toolbar/toolbar_pref_names.cc", + "toolbar/toolbar_pref_names.h", "translate/translate_bubble_factory.cc", "translate/translate_bubble_factory.h", "uma_browsing_activity_observer.cc", @@ -1795,6 +1798,10 @@ "webui/side_panel/customize_chrome/customize_chrome_ui.h", "webui/side_panel/history_clusters/history_clusters_side_panel_ui.cc", "webui/side_panel/history_clusters/history_clusters_side_panel_ui.h", + "webui/side_panel/performance_controls/performance_page_handler.cc", + "webui/side_panel/performance_controls/performance_page_handler.h", + "webui/side_panel/performance_controls/performance_side_panel_ui.cc", + "webui/side_panel/performance_controls/performance_side_panel_ui.h", "webui/side_panel/read_anything/read_anything_prefs.cc", "webui/side_panel/read_anything/read_anything_prefs.h", "webui/side_panel/read_anything/read_anything_untrusted_page_handler.cc", @@ -1926,6 +1933,7 @@ "//chrome/browser/ui/webui/new_tab_page_third_party:mojo_bindings", "//chrome/browser/ui/webui/side_panel/bookmarks:mojo_bindings", "//chrome/browser/ui/webui/side_panel/customize_chrome:mojo_bindings", + "//chrome/browser/ui/webui/side_panel/performance_controls:mojo_bindings", "//chrome/browser/ui/webui/side_panel/reading_list:mojo_bindings", "//chrome/browser/ui/webui/side_panel/user_notes:mojo_bindings", "//chrome/browser/ui/webui/tab_search:mojo_bindings", @@ -3568,6 +3576,7 @@ "//chromeos/ash/components/phonehub:debug", "//chromeos/ash/components/proximity_auth", "//chromeos/ash/components/scalable_iph:constants", + "//chromeos/ash/components/scalable_iph:logger", "//chromeos/ash/components/scalable_iph:scalable_iph", "//chromeos/ash/components/settings", "//chromeos/ash/components/string_matching", @@ -5483,6 +5492,8 @@ "views/side_panel/history_clusters/history_clusters_side_panel_controller_utils.cc", "views/side_panel/history_clusters/history_clusters_side_panel_coordinator.cc", "views/side_panel/history_clusters/history_clusters_side_panel_coordinator.h", + "views/side_panel/performance_controls/performance_side_panel_coordinator.cc", + "views/side_panel/performance_controls/performance_side_panel_coordinator.h", "views/side_panel/read_anything/read_anything_button_view.cc", "views/side_panel/read_anything/read_anything_button_view.h", "views/side_panel/read_anything/read_anything_container_view.cc",
diff --git a/chrome/browser/ui/android/night_mode/BUILD.gn b/chrome/browser/ui/android/night_mode/BUILD.gn index 79facb6..63b233f 100644 --- a/chrome/browser/ui/android/night_mode/BUILD.gn +++ b/chrome/browser/ui/android/night_mode/BUILD.gn
@@ -47,6 +47,7 @@ "//third_party/androidx:androidx_annotation_annotation_java", "//third_party/androidx:androidx_appcompat_appcompat_java", "//third_party/androidx:androidx_appcompat_appcompat_resources_java", + "//third_party/androidx:androidx_fragment_fragment_java", "//third_party/androidx:androidx_preference_preference_java", "//ui/android:ui_no_recycler_view_java", "//ui/android:ui_utils_java",
diff --git a/chrome/browser/ui/android/page_insights/java/src/org/chromium/chrome/browser/page_insights/PageInsightsCoordinator.java b/chrome/browser/ui/android/page_insights/java/src/org/chromium/chrome/browser/page_insights/PageInsightsCoordinator.java index ec7fbac..1b72b123 100644 --- a/chrome/browser/ui/android/page_insights/java/src/org/chromium/chrome/browser/page_insights/PageInsightsCoordinator.java +++ b/chrome/browser/ui/android/page_insights/java/src/org/chromium/chrome/browser/page_insights/PageInsightsCoordinator.java
@@ -79,7 +79,7 @@ * Launch PageInsights hub in bottom sheet container and fetch the data to show. */ public void launch() { - mMediator.openInExpandedState(); + mMediator.launch(); } /**
diff --git a/chrome/browser/ui/android/page_insights/java/src/org/chromium/chrome/browser/page_insights/PageInsightsMediator.java b/chrome/browser/ui/android/page_insights/java/src/org/chromium/chrome/browser/page_insights/PageInsightsMediator.java index 7d6795e..1177396 100644 --- a/chrome/browser/ui/android/page_insights/java/src/org/chromium/chrome/browser/page_insights/PageInsightsMediator.java +++ b/chrome/browser/ui/android/page_insights/java/src/org/chromium/chrome/browser/page_insights/PageInsightsMediator.java
@@ -11,11 +11,13 @@ import android.text.format.DateUtils; import android.view.View; +import androidx.annotation.IntDef; import androidx.annotation.Nullable; import com.google.protobuf.ByteString; import org.chromium.base.MathUtils; +import org.chromium.base.metrics.RecordHistogram; import org.chromium.base.supplier.ObservableSupplier; import org.chromium.base.supplier.Supplier; import org.chromium.chrome.browser.browser_controls.BrowserControlsSizer; @@ -112,6 +114,32 @@ private long mAutoTriggerDelayMs; private Supplier<Long> mCurrentTime; + private int mOldState = SheetState.NONE; + + // These values are persisted to logs. Entries should not be renumbered and + // numeric values should never be reused. + @IntDef({PageInsightsEvent.USER_INVOKES_PIH, PageInsightsEvent.AUTO_PEEK_TRIGGERED, + PageInsightsEvent.STATE_PEEK, PageInsightsEvent.STATE_EXPANDED, + PageInsightsEvent.DISMISS_PEEK, PageInsightsEvent.DISMISS_EXPANDED, + PageInsightsEvent.TAP_XSURFACE_VIEW, PageInsightsEvent.COUNT}) + @interface PageInsightsEvent { + int USER_INVOKES_PIH = 0; + int AUTO_PEEK_TRIGGERED = 1; + int STATE_PEEK = 2; + int STATE_EXPANDED = 3; + int DISMISS_PEEK = 4; + int DISMISS_EXPANDED = 5; + // User interacts with a xSurface in PIH + int TAP_XSURFACE_VIEW = 6; + // Number of elements in the enum + int COUNT = 7; + } + + private static void logPageInsightsEvent(@PageInsightsEvent int event) { + RecordHistogram.recordEnumeratedHistogram( + "CustomTabs.PageInsights.Event", event, PageInsightsEvent.COUNT); + } + public PageInsightsMediator(Context context, ObservableSupplier<Tab> tabObservable, Supplier<ShareDelegate> shareDelegateSupplier, ManagedBottomSheetController bottomSheetController, @@ -253,6 +281,7 @@ boolean hasEnoughConfidence = metadata.getAutoPeekConditions().getConfidence() > MINIMUM_CONFIDENCE; if (hasEnoughConfidence) { + logPageInsightsEvent(PageInsightsEvent.AUTO_PEEK_TRIGGERED); openInPeekState(metadata); resetAutoTriggerTimer(); } @@ -265,7 +294,7 @@ } // data - void openInExpandedState() { + void launch() { mSheetContent.showLoadingIndicator(); mSheetController.requestShowContent(mSheetContent, true); mPageInsightsDataLoader.loadInsightsData(); @@ -273,6 +302,7 @@ mSheetContent.setFeedPage(getXSurfaceView(metadata.getFeedPage().getElementsOutput())); mSheetContent.showFeedPage(); setCornerRadiusPx(mMaxCornerRadiusPx); + logPageInsightsEvent(PageInsightsEvent.USER_INVOKES_PIH); mSheetController.expandSheet(); } @@ -304,10 +334,27 @@ if (newState == SheetState.HIDDEN || newState == SheetState.PEEK) { setBottomControlsHeight(mSheetController.getCurrentOffset()); } + + // Dismiss from PEEK state + if (newState == SheetState.HIDDEN && mOldState == SheetState.PEEK) { + logPageInsightsEvent(PageInsightsEvent.DISMISS_PEEK); + } + + // Dismiss from EXPANDED state + if (newState == SheetState.HIDDEN && mOldState >= SheetState.HALF) { + logPageInsightsEvent(PageInsightsEvent.DISMISS_EXPANDED); + } + if (newState == SheetState.PEEK) { setDrawableBackgroundColor(/* ratioOfCompletionFromPeekToExpanded */ .0f); + logPageInsightsEvent(PageInsightsEvent.STATE_PEEK); } else if (newState == SheetState.FULL) { setDrawableBackgroundColor(/* ratioOfCompletionFromPeekToExpanded */ 1.0f); + logPageInsightsEvent(PageInsightsEvent.STATE_EXPANDED); + } + + if (newState != SheetState.NONE && newState != SheetState.SCROLLING) { + mOldState = newState; } }
diff --git a/chrome/browser/ui/android/page_insights/java/src/org/chromium/chrome/browser/page_insights/PageInsightsMediatorTest.java b/chrome/browser/ui/android/page_insights/java/src/org/chromium/chrome/browser/page_insights/PageInsightsMediatorTest.java index b3034e8..958e3a33 100644 --- a/chrome/browser/ui/android/page_insights/java/src/org/chromium/chrome/browser/page_insights/PageInsightsMediatorTest.java +++ b/chrome/browser/ui/android/page_insights/java/src/org/chromium/chrome/browser/page_insights/PageInsightsMediatorTest.java
@@ -50,10 +50,12 @@ import org.chromium.base.supplier.ObservableSupplier; import org.chromium.base.supplier.Supplier; import org.chromium.base.test.BaseRobolectricTestRunner; +import org.chromium.base.test.util.HistogramWatcher; import org.chromium.base.test.util.JniMocker; import org.chromium.chrome.browser.browser_controls.BrowserControlsSizer; import org.chromium.chrome.browser.browser_controls.BrowserControlsStateProvider; import org.chromium.chrome.browser.flags.ChromeFeatureList; +import org.chromium.chrome.browser.page_insights.PageInsightsMediator.PageInsightsEvent; import org.chromium.chrome.browser.page_insights.proto.PageInsights.AutoPeekConditions; import org.chromium.chrome.browser.page_insights.proto.PageInsights.Page; import org.chromium.chrome.browser.page_insights.proto.PageInsights.PageInsightsMetadata; @@ -66,6 +68,8 @@ import org.chromium.chrome.browser.xsurface.pageinsights.PageInsightsSurfaceScope; import org.chromium.chrome.browser.xsurface_provider.XSurfaceProcessScopeProvider; import org.chromium.components.browser_ui.bottomsheet.BottomSheetController; +import org.chromium.components.browser_ui.bottomsheet.BottomSheetController.SheetState; +import org.chromium.components.browser_ui.bottomsheet.BottomSheetController.StateChangeReason; import org.chromium.components.browser_ui.bottomsheet.ExpandedSheetHelper; import org.chromium.components.browser_ui.bottomsheet.ManagedBottomSheetController; import org.chromium.components.browser_ui.share.ShareParams; @@ -239,7 +243,7 @@ View feedView = new View(ContextUtils.getApplicationContext()); when(mSurfaceRenderer.render(eq(TEST_FEED_ELEMENTS_OUTPUT), any())).thenReturn(feedView); - mMediator.openInExpandedState(); + mMediator.launch(); verify(mBottomSheetController, times(1)).requestShowContent(any(), anyBoolean()); assertEquals(View.VISIBLE, @@ -268,7 +272,7 @@ eq(TEST_FEED_ELEMENTS_OUTPUT), mSurfaceRendererContextValues.capture())) .thenReturn(new View(ContextUtils.getApplicationContext())); when(mSurfaceRenderer.render(eq(TEST_CHILD_ELEMENTS_OUTPUT), any())).thenReturn(childView); - mMediator.openInExpandedState(); + mMediator.launch(); ((PageInsightsActionsHandler) mSurfaceRendererContextValues.getValue().get( PageInsightsActionsHandler.KEY)) @@ -300,7 +304,7 @@ when(mSurfaceRenderer.render( eq(TEST_FEED_ELEMENTS_OUTPUT), mSurfaceRendererContextValues.capture())) .thenReturn(new View(ContextUtils.getApplicationContext())); - mMediator.openInExpandedState(); + mMediator.launch(); String url = "https://www.realwebsite.com/"; ((PageInsightsActionsHandler) mSurfaceRendererContextValues.getValue().get( @@ -318,7 +322,7 @@ when(mSurfaceRenderer.render( eq(TEST_FEED_ELEMENTS_OUTPUT), mSurfaceRendererContextValues.capture())) .thenReturn(new View(ContextUtils.getApplicationContext())); - mMediator.openInExpandedState(); + mMediator.launch(); String url = "https://www.realwebsite.com/"; String title = "Real Website TM"; @@ -378,6 +382,123 @@ verify(mBottomSheetController).requestShowContent(any(), anyBoolean()); } + @Test + @MediumTest + public void openInExpandedState_recordsHistogram_userInvokesPih() { + HistogramWatcher histogramWatcher = + HistogramWatcher.newSingleRecordWatcher("CustomTabs.PageInsights.Event", + PageInsightsMediator.PageInsightsEvent.USER_INVOKES_PIH); + createMediator(); + when(mSurfaceRenderer.render( + eq(TEST_FEED_ELEMENTS_OUTPUT), mSurfaceRendererContextValues.capture())) + .thenReturn(new View(ContextUtils.getApplicationContext())); + mMediator.launch(); + + histogramWatcher.assertExpected(); + } + + @Test + @MediumTest + public void testAutoTrigger_recordsHistogram_autoPeekTriggered() { + HistogramWatcher histogramWatcher = HistogramWatcher.newSingleRecordWatcher( + "CustomTabs.PageInsights.Event", PageInsightsEvent.AUTO_PEEK_TRIGGERED); + + createMediator(SHORT_TRIGGER_DELAY_MS); + View feedView = new View(ContextUtils.getApplicationContext()); + when(mSurfaceRenderer.render(eq(TEST_FEED_ELEMENTS_OUTPUT), any())).thenReturn(feedView); + + mMediator.onLoadStopped(mTab, true); + + verify(mBottomSheetController, never()).requestShowContent(any(), anyBoolean()); + + mShadowLooper.idleFor(2500, TimeUnit.MILLISECONDS); + mBrowserControlsStateProviderObserver.getValue().onControlsOffsetChanged(0, 70, 0, 0, true); + + verify(mBottomSheetController, times(1)).requestShowContent(any(), anyBoolean()); + histogramWatcher.assertExpected(); + } + + @Test + @MediumTest + public void autoTrigger_swipeToExpandedState_recordsHistogramInStateExpanded() { + HistogramWatcher histogramWatcher = + HistogramWatcher.newSingleRecordWatcher("CustomTabs.PageInsights.Event", + PageInsightsMediator.PageInsightsEvent.STATE_EXPANDED); + + createMediator(SHORT_TRIGGER_DELAY_MS); + when(mSurfaceRenderer.render( + eq(TEST_FEED_ELEMENTS_OUTPUT), mSurfaceRendererContextValues.capture())) + .thenReturn(new View(ContextUtils.getApplicationContext())); + + // STATE_EXPANDED is recorded + mMediator.onSheetStateChanged(SheetState.FULL, StateChangeReason.SWIPE); + + histogramWatcher.assertExpected(); + } + + @Test + @MediumTest + public void openInExpandedState_updateToPeekState_recordsHistogramInStatePeek() { + HistogramWatcher histogramWatcher = HistogramWatcher.newSingleRecordWatcher( + "CustomTabs.PageInsights.Event", PageInsightsMediator.PageInsightsEvent.STATE_PEEK); + + createMediator(SHORT_TRIGGER_DELAY_MS); + when(mSurfaceRenderer.render( + eq(TEST_FEED_ELEMENTS_OUTPUT), mSurfaceRendererContextValues.capture())) + .thenReturn(new View(ContextUtils.getApplicationContext())); + + // STATE_PEEK is recorded + mMediator.onSheetStateChanged(SheetState.PEEK, StateChangeReason.SWIPE); + + histogramWatcher.assertExpected(); + } + + @Test + @MediumTest + public void dismissFromPeekState_recordsHistogramInDismissPeek() { + HistogramWatcher histogramWatcher = + HistogramWatcher.newBuilder() + .expectIntRecords("CustomTabs.PageInsights.Event", + PageInsightsEvent.STATE_PEEK, PageInsightsEvent.DISMISS_PEEK) + .build(); + + createMediator(SHORT_TRIGGER_DELAY_MS); + when(mSurfaceRenderer.render( + eq(TEST_FEED_ELEMENTS_OUTPUT), mSurfaceRendererContextValues.capture())) + .thenReturn(new View(ContextUtils.getApplicationContext())); + + // STATE_PEEK is recorded + mMediator.onSheetStateChanged(SheetState.PEEK, StateChangeReason.SWIPE); + // DISMISS_PEEK is recorded + mMediator.onSheetStateChanged(SheetState.HIDDEN, StateChangeReason.SWIPE); + + histogramWatcher.assertExpected(); + } + + @Test + @MediumTest + public void dismissFromExpandedState_recordsHistogramInDismissExpanded() { + HistogramWatcher histogramWatcher = + HistogramWatcher.newBuilder() + .expectIntRecords("CustomTabs.PageInsights.Event", + PageInsightsEvent.STATE_EXPANDED, + PageInsightsEvent.DISMISS_EXPANDED) + .build(); + + createMediator(SHORT_TRIGGER_DELAY_MS); + when(mSurfaceRenderer.render( + eq(TEST_FEED_ELEMENTS_OUTPUT), mSurfaceRendererContextValues.capture())) + .thenReturn(new View(ContextUtils.getApplicationContext())); + + // STATE_PEEK is recorded + mMediator.onSheetStateChanged(SheetState.FULL, StateChangeReason.SWIPE); + + // DISMISS_PEEK is recorded + mMediator.onSheetStateChanged(SheetState.HIDDEN, StateChangeReason.SWIPE); + + histogramWatcher.assertExpected(); + } + private PageInsightsMetadata getPageInsightsMetadata() { Page childPage = Page.newBuilder() .setId(Page.PageID.PEOPLE_ALSO_VIEW)
diff --git a/chrome/browser/ui/android/plus_addresses/java/src/org/chromium/chrome/browser/ui/plus_addresses/PlusAddressCreationPrompt.java b/chrome/browser/ui/android/plus_addresses/java/src/org/chromium/chrome/browser/ui/plus_addresses/PlusAddressCreationPrompt.java index 549db13..0cca663c 100644 --- a/chrome/browser/ui/android/plus_addresses/java/src/org/chromium/chrome/browser/ui/plus_addresses/PlusAddressCreationPrompt.java +++ b/chrome/browser/ui/android/plus_addresses/java/src/org/chromium/chrome/browser/ui/plus_addresses/PlusAddressCreationPrompt.java
@@ -28,8 +28,8 @@ private ModalDialogManager mModalDialogManager; private final View mDialogView; - public PlusAddressCreationPrompt( - PlusAddressCreationDelegate delegate, Activity activity, String primaryEmailAddress) { + public PlusAddressCreationPrompt(PlusAddressCreationDelegate delegate, Activity activity, + String primaryEmailAddressHolder) { mPlusAddressDelegate = delegate; LayoutInflater inflater = LayoutInflater.from(activity); mDialogView = inflater.inflate(R.layout.plus_address_creation_prompt, null); @@ -39,8 +39,7 @@ // some project exigencies. Context context = ContextUtils.getApplicationContext(); TextView primaryEmailView = mDialogView.findViewById(R.id.plus_address_modal_primary_email); - primaryEmailView.setText(context.getString( - R.string.plus_address_modal_regular_address_label, primaryEmailAddress)); + primaryEmailView.setText(primaryEmailAddressHolder); PropertyModel.Builder builder = new PropertyModel.Builder(ModalDialogProperties.ALL_KEYS)
diff --git a/chrome/browser/ui/android/plus_addresses/junit/src/org/chromium/chrome/browser/ui/plus_addresses/PlusAddressCreationPromptTest.java b/chrome/browser/ui/android/plus_addresses/junit/src/org/chromium/chrome/browser/ui/plus_addresses/PlusAddressCreationPromptTest.java index a1941ba8..d28dac1 100644 --- a/chrome/browser/ui/android/plus_addresses/junit/src/org/chromium/chrome/browser/ui/plus_addresses/PlusAddressCreationPromptTest.java +++ b/chrome/browser/ui/android/plus_addresses/junit/src/org/chromium/chrome/browser/ui/plus_addresses/PlusAddressCreationPromptTest.java
@@ -34,7 +34,7 @@ @Config(manifest = Config.NONE) public class PlusAddressCreationPromptTest { private static final long NATIVE_PLUS_ADDRESS_CREATION_VIEW = 100L; - private static final String DUMMY_EMAIL = "plus+plus@plus.plus"; + private static final String EMAIL_PLACEHOLDER = "plus+plus@plus.plus"; @Rule public JniMocker mJniMocker = new JniMocker(); @@ -59,7 +59,7 @@ private void createAndShowPrompt() { mModalDialogManager = new FakeModalDialogManager(ModalDialogType.APP); - mPrompt = new PlusAddressCreationPrompt(mPromptDelegate, mActivity, DUMMY_EMAIL); + mPrompt = new PlusAddressCreationPrompt(mPromptDelegate, mActivity, EMAIL_PLACEHOLDER); mPrompt.show(mModalDialogManager); } @@ -69,7 +69,9 @@ createAndShowPrompt(); TextView primaryEmailView = mPrompt.getDialogViewForTesting().findViewById( R.id.plus_address_modal_primary_email); - Assert.assertTrue(primaryEmailView.getText().toString().contains(DUMMY_EMAIL)); + // Ensure that the email placeholder passed into the prompt is shown in the + // appropriate spot. + Assert.assertEquals(primaryEmailView.getText().toString(), EMAIL_PLACEHOLDER); Assert.assertNotNull(mModalDialogManager.getShownDialogModel()); }
diff --git a/chrome/browser/ui/android/plus_addresses/plus_address_creation_view_android.cc b/chrome/browser/ui/android/plus_addresses/plus_address_creation_view_android.cc index e6b8077..c75c424 100644 --- a/chrome/browser/ui/android/plus_addresses/plus_address_creation_view_android.cc +++ b/chrome/browser/ui/android/plus_addresses/plus_address_creation_view_android.cc
@@ -6,11 +6,14 @@ #include "base/android/jni_string.h" #include "base/memory/weak_ptr.h" +#include "base/strings/utf_string_conversions.h" #include "chrome/browser/ui/android/plus_addresses/jni_headers/PlusAddressCreationViewBridge_jni.h" #include "chrome/browser/ui/plus_addresses/plus_address_creation_controller.h" +#include "chrome/grit/generated_resources.h" #include "content/public/browser/web_contents.h" #include "ui/android/view_android.h" #include "ui/android/window_android.h" +#include "ui/base/l10n/l10n_util.h" namespace plus_addresses { PlusAddressCreationViewAndroid::PlusAddressCreationViewAndroid( @@ -26,11 +29,15 @@ java_object_.Reset(Java_PlusAddressCreationViewBridge_create( env, reinterpret_cast<intptr_t>(this))); - base::android::ScopedJavaLocalRef<jstring> j_email = - base::android::ConvertUTF8ToJavaString(env, primary_email_address); + base::android::ScopedJavaLocalRef<jstring> j_formatted_email = + base::android::ConvertUTF8ToJavaString( + env, l10n_util::GetStringFUTF8( + IDS_PLUS_ADDRESS_MODAL_REGULAR_ADDRESS_LABEL, + base::UTF8ToUTF16(primary_email_address))); Java_PlusAddressCreationViewBridge_show( env, java_object_, - web_contents_->GetTopLevelNativeWindow()->GetJavaObject(), j_email); + web_contents_->GetTopLevelNativeWindow()->GetJavaObject(), + j_formatted_email); } void PlusAddressCreationViewAndroid::OnConfirmed(
diff --git a/chrome/browser/ui/android/toolbar/BUILD.gn b/chrome/browser/ui/android/toolbar/BUILD.gn index e4551ba..a679768 100644 --- a/chrome/browser/ui/android/toolbar/BUILD.gn +++ b/chrome/browser/ui/android/toolbar/BUILD.gn
@@ -179,6 +179,7 @@ "//third_party/androidx:androidx_appcompat_appcompat_java", "//third_party/androidx:androidx_appcompat_appcompat_resources_java", "//third_party/androidx:androidx_core_core_java", + "//third_party/androidx:androidx_fragment_fragment_java", "//third_party/androidx:androidx_interpolator_interpolator_java", "//third_party/androidx:androidx_preference_preference_java", "//third_party/androidx:androidx_vectordrawable_vectordrawable_java",
diff --git a/chrome/browser/ui/ash/clipboard_history_browsertest.cc b/chrome/browser/ui/ash/clipboard_history_browsertest.cc index f031ed3..07339517 100644 --- a/chrome/browser/ui/ash/clipboard_history_browsertest.cc +++ b/chrome/browser/ui/ash/clipboard_history_browsertest.cc
@@ -719,10 +719,15 @@ } class ClipboardHistoryPasteTypeBrowserTest - : public ClipboardHistoryBrowserTest { + : public ClipboardHistoryBrowserTest, + public ::testing::WithParamInterface< + /*web_contents_paste_enabled=*/bool> { public: - ClipboardHistoryPasteTypeBrowserTest() = default; - ~ClipboardHistoryPasteTypeBrowserTest() override = default; + ClipboardHistoryPasteTypeBrowserTest() { + scoped_feature_list_.InitWithFeatureState( + ash::features::kClipboardHistoryWebContentsPaste, + /*web_contents_paste_enabled=*/GetParam()); + } protected: // ClipboardHistoryBrowserTest: @@ -812,12 +817,17 @@ return std::move(paste_list_value).TakeList(); } + base::test::ScopedFeatureList scoped_feature_list_; raw_ptr<content::WebContents, DanglingUntriaged | ExperimentalAsh> web_contents_ = nullptr; int paste_num_ = 1; }; -IN_PROC_BROWSER_TEST_F(ClipboardHistoryPasteTypeBrowserTest, +INSTANTIATE_TEST_SUITE_P(All, + ClipboardHistoryPasteTypeBrowserTest, + /*web_contents_paste_enabled=*/::testing::Bool()); + +IN_PROC_BROWSER_TEST_P(ClipboardHistoryPasteTypeBrowserTest, PlainAndRichTextPastes) { using ClipboardHistoryPasteType = ash::ClipboardHistoryControllerImpl::ClipboardHistoryPasteType; @@ -1071,7 +1081,7 @@ // Regression test for crbug.com/1363828 --- verifies that // `WebContents::Paste()` works, since that's necessary for the html preview. -IN_PROC_BROWSER_TEST_F(ClipboardHistoryPasteTypeBrowserTest, PasteCommand) { +IN_PROC_BROWSER_TEST_P(ClipboardHistoryPasteTypeBrowserTest, PasteCommand) { SetClipboardTextAndHtml("A", "<span>A</span>"); web_contents()->Paste(); WaitForWebContentsPaste("A", /*paste_plain_text=*/false); @@ -1152,12 +1162,8 @@ // The browser test which creates a widget with a textfield during setting-up // to help verify the multipaste menu item's response to the gesture tap and // the mouse click. -class ClipboardHistoryTextfieldBrowserTest +class ClipboardHistoryTextfieldBrowserTestBase : public ClipboardHistoryBrowserTest { - public: - ClipboardHistoryTextfieldBrowserTest() = default; - ~ClipboardHistoryTextfieldBrowserTest() override = default; - protected: // ClipboardHistoryBrowserTest: void SetUpOnMainThread() override { @@ -1193,9 +1199,28 @@ raw_ptr<views::Textfield, ExperimentalAsh> textfield_ = nullptr; }; +class ClipboardHistoryTextfieldBrowserTest + : public ClipboardHistoryTextfieldBrowserTestBase, + public ::testing::WithParamInterface< + /*web_contents_paste_enabled=*/bool> { + public: + ClipboardHistoryTextfieldBrowserTest() { + scoped_feature_list_.InitWithFeatureState( + ash::features::kClipboardHistoryWebContentsPaste, + /*web_contents_paste_enabled=*/GetParam()); + } + + private: + base::test::ScopedFeatureList scoped_feature_list_; +}; + +INSTANTIATE_TEST_SUITE_P(All, + ClipboardHistoryTextfieldBrowserTest, + /*web_contents_paste_enabled=*/::testing::Bool()); + // Verifies that the clipboard history menu responses to the gesture tap // correctly (https://crbug.com/1142088). -IN_PROC_BROWSER_TEST_F(ClipboardHistoryTextfieldBrowserTest, +IN_PROC_BROWSER_TEST_P(ClipboardHistoryTextfieldBrowserTest, VerifyResponseToGestures) { base::HistogramTester histogram_tester; @@ -1223,7 +1248,7 @@ // Verifies that the metric to record the count of the consecutive pastes from // the clipboard history menu works as expected. -IN_PROC_BROWSER_TEST_F(ClipboardHistoryTextfieldBrowserTest, +IN_PROC_BROWSER_TEST_P(ClipboardHistoryTextfieldBrowserTest, VerifyConsecutivePasteMetric) { base::HistogramTester histogram_tester; @@ -1239,7 +1264,7 @@ /*expected_bucket_count=*/1); } -IN_PROC_BROWSER_TEST_F(ClipboardHistoryTextfieldBrowserTest, +IN_PROC_BROWSER_TEST_P(ClipboardHistoryTextfieldBrowserTest, ShouldPasteHistoryViaKeyboard) { base::HistogramTester histogram_tester; // Write some things to the clipboard. @@ -1309,7 +1334,7 @@ "Ash.ClipboardHistory.ContextMenu.DisplayFormatPasted", 4); } -IN_PROC_BROWSER_TEST_F(ClipboardHistoryTextfieldBrowserTest, +IN_PROC_BROWSER_TEST_P(ClipboardHistoryTextfieldBrowserTest, ShouldPasteHistoryWhileHoldingDownCommandKey) { // Write some things to the clipboard. SetClipboardText("A"); @@ -1342,7 +1367,7 @@ Release(ui::KeyboardCode::VKEY_COMMAND); } -IN_PROC_BROWSER_TEST_F(ClipboardHistoryTextfieldBrowserTest, +IN_PROC_BROWSER_TEST_P(ClipboardHistoryTextfieldBrowserTest, PasteWithLockedScreen) { // Write an item to the clipboard. SetClipboardText("A"); @@ -1408,7 +1433,7 @@ // The browser test equipped with the custom policy controller. class ClipboardHistoryWithMockDLPBrowserTest - : public ClipboardHistoryTextfieldBrowserTest { + : public ClipboardHistoryTextfieldBrowserTestBase { public: ClipboardHistoryWithMockDLPBrowserTest() : data_transfer_policy_controller_( @@ -1926,7 +1951,7 @@ // Base class used to test features that only exist when the Ctrl+V longpress // feature is enabled. class ClipboardHistoryLongpressEnabledBrowserTest - : public ClipboardHistoryTextfieldBrowserTest { + : public ClipboardHistoryTextfieldBrowserTestBase { public: ClipboardHistoryLongpressEnabledBrowserTest() { scoped_feature_list_.InitWithFeatures( @@ -1998,7 +2023,7 @@ // Base class used to test features that only exist when the UI refresh is // enabled. class ClipboardHistoryRefreshEnabledBrowserTest - : public ClipboardHistoryTextfieldBrowserTest { + : public ClipboardHistoryTextfieldBrowserTestBase { public: ClipboardHistoryRefreshEnabledBrowserTest() { scoped_feature_list_.InitWithFeatures(
diff --git a/chrome/browser/ui/ash/clipboard_history_controller_delegate_impl.cc b/chrome/browser/ui/ash/clipboard_history_controller_delegate_impl.cc index 537f0d64..2a2bd57f 100644 --- a/chrome/browser/ui/ash/clipboard_history_controller_delegate_impl.cc +++ b/chrome/browser/ui/ash/clipboard_history_controller_delegate_impl.cc
@@ -4,8 +4,79 @@ #include "chrome/browser/ui/ash/clipboard_history_controller_delegate_impl.h" +#include <set> + +#include "ash/constants/ash_features.h" +#include "content/public/browser/render_frame_host.h" +#include "content/public/browser/render_view_host.h" +#include "content/public/browser/render_widget_host.h" +#include "content/public/browser/render_widget_host_iterator.h" +#include "content/public/browser/web_contents.h" +#include "ui/aura/window.h" + +namespace { + +// Helpers --------------------------------------------------------------------- + +// Returns the set of all `content::WebContents` instances. Copied from +// `content::WebContentsImpl::GetAllWebContents()` due to dependency +// restrictions. +std::set<content::WebContents*> GetAllWebContents() { + std::set<content::WebContents*> result; + + const auto it = content::RenderWidgetHost::GetRenderWidgetHosts(); + while (content::RenderWidgetHost* const rwh = it->GetNextHost()) { + auto* const rvh = content::RenderViewHost::From(rwh); + if (!rvh) { + continue; + } + auto* const web_contents = content::WebContents::FromRenderViewHost(rvh); + if (!web_contents) { + continue; + } + if (web_contents->GetPrimaryMainFrame()->GetRenderViewHost() == rvh) { + result.emplace(web_contents); + } + } + + return result; +} + +// Returns the currently focused `content::WebContents` for the specified +// `web_contents`. May return `web_contents`, an embedded `content::WebContents` +// within `web_contents`, or `nullptr`. +content::WebContents* GetFocusedWebContents( + content::WebContents* web_contents) { + auto* const focused_frame = web_contents->GetFocusedFrame(); + return focused_frame + ? content::WebContents::FromRenderFrameHost(focused_frame) + : nullptr; +} + +} // namespace + +// ClipboardHistoryControllerDelegateImpl -------------------------------------- + ClipboardHistoryControllerDelegateImpl:: ClipboardHistoryControllerDelegateImpl() = default; ClipboardHistoryControllerDelegateImpl:: ~ClipboardHistoryControllerDelegateImpl() = default; + +bool ClipboardHistoryControllerDelegateImpl::Paste() const { + if (!ash::features::IsClipboardHistoryWebContentsPasteEnabled()) { + return false; + } + for (auto* const web_contents : GetAllWebContents()) { + auto* const focused_web_contents = GetFocusedWebContents(web_contents); + if (!focused_web_contents) { + continue; + } + if (const auto* const window = focused_web_contents->GetContentNativeView(); + window && window->HasFocus()) { + focused_web_contents->Paste(); + return true; + } + } + return false; +}
diff --git a/chrome/browser/ui/ash/clipboard_history_controller_delegate_impl.h b/chrome/browser/ui/ash/clipboard_history_controller_delegate_impl.h index e2e4427..61d90fd4 100644 --- a/chrome/browser/ui/ash/clipboard_history_controller_delegate_impl.h +++ b/chrome/browser/ui/ash/clipboard_history_controller_delegate_impl.h
@@ -17,6 +17,10 @@ ClipboardHistoryControllerDelegateImpl& operator=( const ClipboardHistoryControllerDelegateImpl&) = delete; ~ClipboardHistoryControllerDelegateImpl() override; + + private: + // ash::ClipboardHistoryControllerDelegate: + bool Paste() const override; }; #endif // CHROME_BROWSER_UI_ASH_CLIPBOARD_HISTORY_CONTROLLER_DELEGATE_IMPL_H_
diff --git a/chrome/browser/ui/ash/shelf/app_service/app_service_shortcut_shelf_item_controller_browsertest.cc b/chrome/browser/ui/ash/shelf/app_service/app_service_shortcut_shelf_item_controller_browsertest.cc index 5dab960b..27b16a74 100644 --- a/chrome/browser/ui/ash/shelf/app_service/app_service_shortcut_shelf_item_controller_browsertest.cc +++ b/chrome/browser/ui/ash/shelf/app_service/app_service_shortcut_shelf_item_controller_browsertest.cc
@@ -169,8 +169,9 @@ EXPECT_FALSE(controller()->GetItem(ash::ShelfID(shortcut_id.value()))); } +// TODO(crbug.com/1485630): Re-enable once segfault is resolved. IN_PROC_BROWSER_TEST_F(AppServiceShortcutShelfItemControllerBrowserTest, - ContextMenuRemove) { + DISABLED_ContextMenuRemove) { GURL app_url = GURL("https://example.org/"); std::u16string shortcut_name = u"Example"; apps::ShortcutId shortcut_id =
diff --git a/chrome/browser/ui/browser_window.h b/chrome/browser/ui/browser_window.h index 313d46d..2d119e3 100644 --- a/chrome/browser/ui/browser_window.h +++ b/chrome/browser/ui/browser_window.h
@@ -587,11 +587,22 @@ // background. virtual bool IsFeaturePromoActive(const base::Feature& iph_feature) const = 0; + // Returns whether `MaybeShowFeaturePromo()` would succeed if called now. + // + // USAGE NOTE: Only call this method if figuring out whether to try to show an + // IPH would involve significant expense. This method may itself have + // non-trivial cost. + virtual bool CanShowFeaturePromo(const base::Feature& iph_feature) const = 0; + // Maybe shows an in-product help promo. Returns true if the promo is shown. // In cases where there is no promo controller, immediately returns false. // // If this feature promo is likely to be shown at browser startup, prefer - // calling MaybeShowStartupFeaturePromo() instead. + // calling `MaybeShowStartupFeaturePromo()` instead. + // + // If determining whether to call this method would involve significant + // expense, you *may* first call `CanShowFeaturePromo()` before doing the + // required computation; otherwise just call this method. virtual bool MaybeShowFeaturePromo( const base::Feature& iph_feature, user_education::FeaturePromoController::BubbleCloseCallback @@ -644,8 +655,17 @@ // Records that the user has engaged with a particular feature that has an // associated promo; this information is used to determine whether to show // specific promos in the future. + // + // If `event_name` corresponds to the "used" event for an IPH, prefer using + // `NotifyFeaturePromoFeatureUsed()` for clarity instead. virtual void NotifyFeatureEngagementEvent(const char* event_name) = 0; + // Records that the user has engaged the specific feature associated with + // the promo `iph_feature`; this information is used to determine whether to + // show the promo in the future. Prefer this to + // `NotifyFeatureEngagementEvent()` where possible. + virtual void NotifyPromoFeatureUsed(const base::Feature& iph_feature) = 0; + // Shows an Incognito clear browsing data dialog. virtual void ShowIncognitoClearBrowsingDataDialog() = 0;
diff --git a/chrome/browser/ui/extensions/accelerator_priority.h b/chrome/browser/ui/extensions/accelerator_priority.h index 232247d..e883cc4 100644 --- a/chrome/browser/ui/extensions/accelerator_priority.h +++ b/chrome/browser/ui/extensions/accelerator_priority.h
@@ -13,7 +13,7 @@ // (high). High priority is used for all accelerators assigned to extensions, // which are extensions of the user agent and should (by default) supersede the // browser shortcuts. -constexpr ui::AcceleratorManager::HandlerPriority +inline constexpr ui::AcceleratorManager::HandlerPriority kExtensionAcceleratorPriority = ui::AcceleratorManager::kHighPriority; #endif // CHROME_BROWSER_UI_EXTENSIONS_ACCELERATOR_PRIORITY_H_
diff --git a/chrome/browser/ui/fullscreen_util_mac.cc b/chrome/browser/ui/fullscreen_util_mac.cc index 318de98..7a3ad19 100644 --- a/chrome/browser/ui/fullscreen_util_mac.cc +++ b/chrome/browser/ui/fullscreen_util_mac.cc
@@ -16,10 +16,13 @@ namespace fullscreen_utils { bool IsInContentFullscreen(Browser* browser) { + if (!browser->exclusive_access_manager()) { + return false; + } FullscreenController* controller = browser->exclusive_access_manager()->fullscreen_controller(); - return controller->IsWindowFullscreenForTabOrPending() || - controller->IsExtensionFullscreenOrPending(); + return controller && (controller->IsWindowFullscreenForTabOrPending() || + controller->IsExtensionFullscreenOrPending()); } bool IsAlwaysShowToolbarEnabled(const Browser* browser) {
diff --git a/chrome/browser/ui/side_panel/side_panel_entry_id.h b/chrome/browser/ui/side_panel/side_panel_entry_id.h index 93c440e..04d0efc9 100644 --- a/chrome/browser/ui/side_panel/side_panel_entry_id.h +++ b/chrome/browser/ui/side_panel/side_panel_entry_id.h
@@ -17,6 +17,7 @@ kUserNote, kFeed, kWebView, + kPerformance, // Contextual Entries kSideSearch, kLens,
diff --git a/chrome/browser/ui/tabs/organization/tab_organization_observer.h b/chrome/browser/ui/tabs/organization/tab_organization_observer.h new file mode 100644 index 0000000..d920e15 --- /dev/null +++ b/chrome/browser/ui/tabs/organization/tab_organization_observer.h
@@ -0,0 +1,17 @@ +// 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_UI_TABS_ORGANIZATION_TAB_ORGANIZATION_OBSERVER_H_ +#define CHROME_BROWSER_UI_TABS_ORGANIZATION_TAB_ORGANIZATION_OBSERVER_H_ + +class Browser; + +class TabOrganizationObserver { + public: + // Called when all checks pass to be able to show the organization call to + // action UI. + virtual void OnToggleActionUIState(Browser* browser, bool should_show) {} +}; + +#endif // CHROME_BROWSER_UI_TABS_ORGANIZATION_TAB_ORGANIZATION_OBSERVER_H_
diff --git a/chrome/browser/ui/tabs/organization/tab_organization_service.cc b/chrome/browser/ui/tabs/organization/tab_organization_service.cc index 9e62371..c8b83267 100644 --- a/chrome/browser/ui/tabs/organization/tab_organization_service.cc +++ b/chrome/browser/ui/tabs/organization/tab_organization_service.cc
@@ -20,6 +20,10 @@ browser_session_map_.emplace(browser, std::make_unique<TabOrganizationSession>()); + + for (TabOrganizationObserver& observer : observers_) { + observer.OnToggleActionUIState(browser, true); + } } const TabOrganizationSession* TabOrganizationService::GetSessionForBrowser(
diff --git a/chrome/browser/ui/tabs/organization/tab_organization_service.h b/chrome/browser/ui/tabs/organization/tab_organization_service.h index ce28164..c270a0d 100644 --- a/chrome/browser/ui/tabs/organization/tab_organization_service.h +++ b/chrome/browser/ui/tabs/organization/tab_organization_service.h
@@ -8,6 +8,8 @@ #include <unordered_map> #include "base/memory/raw_ptr.h" +#include "base/observer_list.h" +#include "chrome/browser/ui/tabs/organization/tab_organization_observer.h" #include "components/keyed_service/core/keyed_service.h" class Browser; @@ -34,9 +36,20 @@ const TabOrganizationSession* GetSessionForBrowser(Browser* browser); + void AddObserver(TabOrganizationObserver* observer) { + observers_.AddObserver(observer); + } + + void RemoveObserver(TabOrganizationObserver* observer) { + observers_.RemoveObserver(observer); + } + private: // mapping of browser to BrowserSessionMap browser_session_map_; + + // A list of the observers of a tab organization Service. + base::ObserverList<TabOrganizationObserver>::Unchecked observers_; }; #endif // CHROME_BROWSER_UI_TABS_ORGANIZATION_TAB_ORGANIZATION_SERVICE_H_
diff --git a/chrome/browser/ui/tabs/organization/tab_organization_service_unittest.cc b/chrome/browser/ui/tabs/organization/tab_organization_service_unittest.cc index 430e9cd..089bda8 100644 --- a/chrome/browser/ui/tabs/organization/tab_organization_service_unittest.cc +++ b/chrome/browser/ui/tabs/organization/tab_organization_service_unittest.cc
@@ -5,6 +5,7 @@ #include <memory> #include "chrome/browser/ui/browser.h" +#include "chrome/browser/ui/tabs/organization/tab_organization_observer.h" #include "chrome/browser/ui/tabs/organization/tab_organization_service.h" #include "chrome/test/base/browser_with_test_window_test.h" #include "chrome/test/base/testing_profile.h" @@ -12,6 +13,7 @@ #include "content/public/test/test_renderer_host.h" #include "content/public/test/web_contents_tester.h" #include "tab_organization_service_factory.h" +#include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" #include "ui/base/page_transition_types.h" @@ -66,6 +68,11 @@ std::vector<std::unique_ptr<Browser>> browsers_; }; +class MockTabOrganizationObserver : public TabOrganizationObserver { + public: + MOCK_METHOD(void, OnToggleActionUIState, (Browser*, bool), (override)); +}; + // Service Factory tests. TEST_F(TabOrganizationServiceTest, DifferentSessionPerProfile) { @@ -124,3 +131,14 @@ EXPECT_NE(service()->GetSessionForBrowser(browser1), service()->GetSessionForBrowser(browser2)); } + +TEST_F(TabOrganizationServiceTest, ObserverShowTriggerUICalled) { + Browser* browser = AddBrowser(); + + MockTabOrganizationObserver mock_observer; + EXPECT_CALL(mock_observer, OnToggleActionUIState(browser, true)).Times(1); + + service()->AddObserver(&mock_observer); + service()->OnTriggerOccured(browser); + service()->RemoveObserver(&mock_observer); +}
diff --git a/chrome/browser/ui/toolbar/toolbar_pref_names.cc b/chrome/browser/ui/toolbar/toolbar_pref_names.cc new file mode 100644 index 0000000..44951b7 --- /dev/null +++ b/chrome/browser/ui/toolbar/toolbar_pref_names.cc
@@ -0,0 +1,19 @@ +// 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/ui/toolbar/toolbar_pref_names.h" +#include "components/pref_registry/pref_registry_syncable.h" +#include "components/prefs/pref_registry_simple.h" + +namespace toolbar { + +void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { + registry->RegisterListPref(prefs::kPinnedActions, + user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); + registry->RegisterBooleanPref( + prefs::kPinnedSearchCompanionMigrationComplete, false, + user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); +} + +} // namespace toolbar
diff --git a/chrome/browser/ui/toolbar/toolbar_pref_names.h b/chrome/browser/ui/toolbar/toolbar_pref_names.h new file mode 100644 index 0000000..c39e3ed --- /dev/null +++ b/chrome/browser/ui/toolbar/toolbar_pref_names.h
@@ -0,0 +1,31 @@ +// 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_UI_TOOLBAR_TOOLBAR_PREF_NAMES_H_ +#define CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_PREF_NAMES_H_ + +namespace user_prefs { +class PrefRegistrySyncable; +} + +namespace prefs { + +// A preference that tracks actions pinned to the toolbar. This is a list. +// The actions are stored by ID. +inline constexpr char kPinnedActions[] = "toolbar.pinned_actions"; +// Indicates whether the search companion pin state pref has been migrated to +// the new toolbar container. +inline constexpr char kPinnedSearchCompanionMigrationComplete[] = + "toolbar.pinned_search_companion_migration_complete"; + +} // namespace prefs + +namespace toolbar { + +// Registers user preferences related to the toolbar. +void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); + +} // namespace toolbar + +#endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_PREF_NAMES_H_
diff --git a/chrome/browser/ui/ui_features.cc b/chrome/browser/ui/ui_features.cc index 74d9fdb..c51c13c 100644 --- a/chrome/browser/ui/ui_features.cc +++ b/chrome/browser/ui/ui_features.cc
@@ -29,10 +29,6 @@ #endif // BUILDFLAG(IS_WIN) ); -BASE_FEATURE(kBrowserMetricsAPI, - "BrowserMetricsAPI", - base::FEATURE_DISABLED_BY_DEFAULT); - // Enables Chrome Labs menu in the toolbar. See https://crbug.com/1145666 BASE_FEATURE(kChromeLabs, "ChromeLabs", base::FEATURE_ENABLED_BY_DEFAULT); const char kChromeLabsActivationParameterName[] =
diff --git a/chrome/browser/ui/ui_features.h b/chrome/browser/ui/ui_features.h index ff984e4..648d907 100644 --- a/chrome/browser/ui/ui_features.h +++ b/chrome/browser/ui/ui_features.h
@@ -27,8 +27,6 @@ BASE_DECLARE_FEATURE(kAllowEyeDropperWGCScreenCapture); -BASE_DECLARE_FEATURE(kBrowserMetricsAPI); - BASE_DECLARE_FEATURE(kChromeLabs); extern const char kChromeLabsActivationParameterName[]; extern const base::FeatureParam<int> kChromeLabsActivationPercentage;
diff --git a/chrome/browser/ui/views/apps/app_info_dialog/app_info_dialog_views_browsertest.cc b/chrome/browser/ui/views/apps/app_info_dialog/app_info_dialog_views_browsertest.cc index d2efd37..2677919 100644 --- a/chrome/browser/ui/views/apps/app_info_dialog/app_info_dialog_views_browsertest.cc +++ b/chrome/browser/ui/views/apps/app_info_dialog/app_info_dialog_views_browsertest.cc
@@ -50,7 +50,13 @@ }; // Invokes a dialog that shows details of an installed extension. -IN_PROC_BROWSER_TEST_F(AppInfoDialogBrowserTest, InvokeUi_default) { +// Flaky on ChromeOS MSan. See https://crbug.com/1485666 +#if BUILDFLAG(IS_CHROMEOS) && defined(MEMORY_SANITIZER) +#define MAYBE_InvokeUi_default DISABLED_InvokeUi_default +#else +#define MAYBE_InvokeUi_default InvokeUi_default +#endif +IN_PROC_BROWSER_TEST_F(AppInfoDialogBrowserTest, MAYBE_InvokeUi_default) { ShowAndVerifyUi(); }
diff --git a/chrome/browser/ui/views/controls/hover_button.cc b/chrome/browser/ui/views/controls/hover_button.cc index f5fcf21..7f121a5 100644 --- a/chrome/browser/ui/views/controls/hover_button.cc +++ b/chrome/browser/ui/views/controls/hover_button.cc
@@ -126,8 +126,7 @@ const std::u16string& title, const std::u16string& subtitle, std::unique_ptr<views::View> secondary_view, - bool resize_row_for_secondary_view, - bool secondary_view_can_process_events) + bool add_vertical_label_spacing) : HoverButton(std::move(callback), std::u16string()) { label()->SetHandlesTooltips(false); @@ -177,16 +176,16 @@ views::FlexSpecification(views::MinimumFlexSizeRule::kScaleToZero, views::MaximumFlexSizeRule::kUnbounded)); label_wrapper->SetCanProcessEventsWithinSubtree(false); - label_wrapper->SetProperty(views::kMarginsKey, - gfx::Insets::VH(vertical_spacing, 0)); + label_wrapper->SetProperty( + views::kMarginsKey, + gfx::Insets::VH(add_vertical_label_spacing ? vertical_spacing : 0, 0)); label_wrapper_ = AddChildView(std::move(label_wrapper)); // Observe |label_wrapper_| bounds changes to ensure the HoverButton tooltip // is kept in sync with the size. label_observation_.Observe(label_wrapper_.get()); if (secondary_view) { - secondary_view->SetCanProcessEventsWithinSubtree( - secondary_view_can_process_events); + secondary_view->SetCanProcessEventsWithinSubtree(false); // |secondary_view| needs a layer otherwise it's obscured by the layer // used in drawing ink drops. secondary_view->SetPaintToLayer(); @@ -195,17 +194,12 @@ ChromeLayoutProvider::Get()->GetDistanceMetric( views::DISTANCE_RELATED_LABEL_HORIZONTAL); - // If |resize_row_for_secondary_view| is true set vertical margins such that - // the vertical distance between HoverButtons is maintained. - // Otherwise set vertical margins to 0 and allow the secondary view to grow - // into the vertical margins that would otherwise exist due to |icon_view_| - // and the |label_wrapper_|. - const int secondary_spacing = - resize_row_for_secondary_view ? vertical_spacing : 0; + // Set vertical margins such that the vertical distance between HoverButtons + // is maintained. secondary_view->SetProperty( views::kMarginsKey, - gfx::Insets::TLBR(secondary_spacing, icon_label_spacing, - secondary_spacing, 0)); + gfx::Insets::TLBR(vertical_spacing, icon_label_spacing, + vertical_spacing, 0)); secondary_view_ = AddChildView(std::move(secondary_view)); } @@ -245,13 +239,17 @@ } void HoverButton::SetTitleTextStyle(views::style::TextStyle text_style, - SkColor background_color) { + SkColor background_color, + absl::optional<ui::ColorId> color_id) { if (!title()) { return; } - title_->SetDisplayedOnBackgroundColor(background_color); title_->SetDefaultTextStyle(text_style); + title_->SetDisplayedOnBackgroundColor(background_color); + if (color_id) { + title_->SetDefaultEnabledColorId(color_id); + } } void HoverButton::SetSubtitleTextStyle(int text_context,
diff --git a/chrome/browser/ui/views/controls/hover_button.h b/chrome/browser/ui/views/controls/hover_button.h index 0865dad..203e10d6 100644 --- a/chrome/browser/ui/views/controls/hover_button.h +++ b/chrome/browser/ui/views/controls/hover_button.h
@@ -52,9 +52,8 @@ // LabelButton icon, and titles appear on separate rows. An empty |subtitle| // will vertically center |title|. |secondary_view|, when set, is shown // on the opposite side of the button from |icon_view|. - // When |resize_row_for_secondary_icon| is false, the button tries to - // accommodate the view's preferred size by reducing the top and bottom - // insets appropriately up to a value of 0. + // When |add_vertical_label_spacing| is false it will not add vertical spacing + // to the label wrapper. // Warning: |icon_view| must have a fixed size and be correctly set during its // constructor for the HoverButton to layout correctly. HoverButton(PressedCallback callback, @@ -62,8 +61,7 @@ const std::u16string& title, const std::u16string& subtitle = std::u16string(), std::unique_ptr<views::View> secondary_view = nullptr, - bool resize_row_for_secondary_view = true, - bool secondary_view_can_process_events = false); + bool add_vertical_label_spacing = true); HoverButton(const HoverButton&) = delete; HoverButton& operator=(const HoverButton&) = delete; @@ -82,8 +80,10 @@ // Sets the text style of the title considering the color of the background. // Passing |background_color| makes sure that the text color will not be // changed to a color that is not readable on the specified background. + // Sets the title's enabled color to |color_id|, if present. void SetTitleTextStyle(views::style::TextStyle text_style, - SkColor background_color); + SkColor background_color, + absl::optional<ui::ColorId> color_id); // Set the text context and style of the subtitle. void SetSubtitleTextStyle(int text_context, @@ -128,7 +128,10 @@ }; BEGIN_VIEW_BUILDER(, HoverButton, views::LabelButton) -VIEW_BUILDER_METHOD(SetTitleTextStyle, views::style::TextStyle, SkColor) +VIEW_BUILDER_METHOD(SetTitleTextStyle, + views::style::TextStyle, + SkColor, + absl::optional<ui::ColorId>) END_VIEW_BUILDER DEFINE_VIEW_BUILDER(, HoverButton)
diff --git a/chrome/browser/ui/views/download/bubble/download_toolbar_button_view.cc b/chrome/browser/ui/views/download/bubble/download_toolbar_button_view.cc index b4901a68..9bdf0f4 100644 --- a/chrome/browser/ui/views/download/bubble/download_toolbar_button_view.cc +++ b/chrome/browser/ui/views/download/bubble/download_toolbar_button_view.cc
@@ -73,10 +73,6 @@ #include "chromeos/components/kiosk/kiosk_utils.h" #endif -#if BUILDFLAG(IS_MAC) -#include "chrome/browser/ui/fullscreen_util_mac.h" -#endif - namespace { using offline_items_collection::ContentId; @@ -331,20 +327,6 @@ } bool DownloadToolbarButtonView::IsFullscreenWithParentViewHidden() const { -#if BUILDFLAG(IS_MAC) - if (fullscreen_utils::IsInContentFullscreen(browser_)) { - return true; - } -#endif - - // If immersive fullscreen, check if top chrome is visible. - BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser(browser_); - if (browser_view && browser_view->GetLocationBarView() && - browser_view->IsImmersiveModeEnabled()) { - return !browser_view->immersive_mode_controller()->IsRevealed(); - } - - // Handle the remaining fullscreen case. return browser_->window() && browser_->window()->IsFullscreen() && !browser_->window()->IsToolbarVisible(); }
diff --git a/chrome/browser/ui/views/extensions/extensions_menu_item_view.cc b/chrome/browser/ui/views/extensions/extensions_menu_item_view.cc index 997cbbf..bb66c1c3 100644 --- a/chrome/browser/ui/views/extensions/extensions_menu_item_view.cc +++ b/chrome/browser/ui/views/extensions/extensions_menu_item_view.cc
@@ -323,7 +323,8 @@ ui::kColorIcon, small_icon_size)) : nullptr, std::u16string(), std::u16string(), - std::move(site_permissions_button_icon))) + std::move(site_permissions_button_icon), + /*add_vertical_label_spacing=*/false)) .CopyAddressTo(&site_permissions_button_) // Align the main and secondary row text by adding the primary // action button's icon size as margin. @@ -333,6 +334,9 @@ // label in the primary action button. .SetBorder(views::CreateEmptyBorder( gfx::Insets::VH(0, icon_label_spacing))) + .SetTitleTextStyle(views::style::STYLE_BODY_5, + ui::kColorDialogBackground, + ui::kColorSysOnSurfaceSubtle) .SetTooltipText(l10n_util::GetStringUTF16( IDS_EXTENSIONS_MENU_MAIN_PAGE_EXTENSION_SITE_ACCESS_TOOLTIP)))) .BuildChildren();
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc index f424961..0a5f2153 100644 --- a/chrome/browser/ui/views/frame/browser_view.cc +++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -4864,6 +4864,11 @@ iph_feature, user_education::FeaturePromoStatus::kContinued); } +bool BrowserView::CanShowFeaturePromo(const base::Feature& iph_feature) const { + return initialized_ && feature_promo_controller_ && + feature_promo_controller_->CanShowPromo(iph_feature); +} + bool BrowserView::MaybeShowFeaturePromo( const base::Feature& iph_feature, user_education::FeaturePromoController::BubbleCloseCallback close_callback, @@ -4912,12 +4917,21 @@ } void BrowserView::NotifyFeatureEngagementEvent(const char* event_name) { - if (!feature_promo_controller_) + if (!feature_promo_controller_) { return; + } feature_promo_controller_->feature_engagement_tracker()->NotifyEvent( event_name); } +void BrowserView::NotifyPromoFeatureUsed(const base::Feature& iph_feature) { + if (!feature_promo_controller_) { + return; + } + feature_promo_controller_->feature_engagement_tracker()->NotifyUsedEvent( + iph_feature); +} + bool BrowserView::DoCutCopyPasteForWebContents(WebContents* contents, void (WebContents::*method)()) { // It's possible for a non-null WebContents to have a null RWHV if it's
diff --git a/chrome/browser/ui/views/frame/browser_view.h b/chrome/browser/ui/views/frame/browser_view.h index fdb6936..0564905 100644 --- a/chrome/browser/ui/views/frame/browser_view.h +++ b/chrome/browser/ui/views/frame/browser_view.h
@@ -635,6 +635,7 @@ BrowserFeaturePromoController* GetFeaturePromoController() override; bool IsFeaturePromoActive(const base::Feature& iph_feature) const override; + bool CanShowFeaturePromo(const base::Feature& iph_feature) const override; bool MaybeShowFeaturePromo( const base::Feature& iph_feature, user_education::FeaturePromoController::BubbleCloseCallback @@ -659,6 +660,7 @@ user_education::FeaturePromoHandle CloseFeaturePromoAndContinue( const base::Feature& iph_feature) override; void NotifyFeatureEngagementEvent(const char* event_name) override; + void NotifyPromoFeatureUsed(const base::Feature& iph_feature) override; void ShowIncognitoClearBrowsingDataDialog() override;
diff --git a/chrome/browser/ui/views/media_router/cast_dialog_sink_button.cc b/chrome/browser/ui/views/media_router/cast_dialog_sink_button.cc index 9c173c4..98dbef80 100644 --- a/chrome/browser/ui/views/media_router/cast_dialog_sink_button.cc +++ b/chrome/browser/ui/views/media_router/cast_dialog_sink_button.cc
@@ -174,7 +174,7 @@ GetColorProvider()->GetColor(ui::kColorDialogBackground); SetTitleTextStyle( GetEnabled() ? views::style::STYLE_PRIMARY : views::style::STYLE_DISABLED, - background_color); + background_color, /*color_id=*/absl::nullopt); } void CastDialogSinkButton::RequestFocus() {
diff --git a/chrome/browser/ui/views/page_info/page_info_bubble_view_browsertest.cc b/chrome/browser/ui/views/page_info/page_info_bubble_view_browsertest.cc index e1ce9c3..944f4274 100644 --- a/chrome/browser/ui/views/page_info/page_info_bubble_view_browsertest.cc +++ b/chrome/browser/ui/views/page_info/page_info_bubble_view_browsertest.cc
@@ -180,7 +180,8 @@ // launched. Disable features for the new version of "Cookies in use" // dialog. The new UI is covered by // PageInfoBubbleViewBrowserTestCookiesSubpage. - feature_list_.InitWithFeatures({}, {}); + feature_list_.InitWithFeatures({}, + {safe_browsing::kRedInterstitialFacelift}); } PageInfoBubbleViewBrowserTest(const PageInfoBubbleViewBrowserTest& test) =
diff --git a/chrome/browser/ui/views/page_info/page_info_bubble_view_dialog_browsertest.cc b/chrome/browser/ui/views/page_info/page_info_bubble_view_dialog_browsertest.cc index 382546e..be6f6ec5 100644 --- a/chrome/browser/ui/views/page_info/page_info_bubble_view_dialog_browsertest.cc +++ b/chrome/browser/ui/views/page_info/page_info_bubble_view_dialog_browsertest.cc
@@ -95,9 +95,10 @@ public: PageInfoBubbleViewDialogBrowserTest() { feature_list_.InitWithFeatures( - {}, {// TODO(crbug.com/1394910): Use HTTPS URLs in tests to avoid having - // to disable this feature. - features::kHttpsUpgrades}); + {}, + {// TODO(crbug.com/1394910): Use HTTPS URLs in tests to avoid having + // to disable this feature. + features::kHttpsUpgrades, safe_browsing::kRedInterstitialFacelift}); } PageInfoBubbleViewDialogBrowserTest(
diff --git a/chrome/browser/ui/views/profiles/profile_management_flow_controller.cc b/chrome/browser/ui/views/profiles/profile_management_flow_controller.cc index 30a2090..56ab0e81 100644 --- a/chrome/browser/ui/views/profiles/profile_management_flow_controller.cc +++ b/chrome/browser/ui/views/profiles/profile_management_flow_controller.cc
@@ -125,3 +125,15 @@ // Hence there is no extension blocked. profile); } + +base::OnceClosure +ProfileManagementFlowController::CreateSwitchToCurrentStepPopCallback() { + return base::BindOnce( + &ProfileManagementFlowController::SwitchToStep, + // Binding as Unretained as `this` outlives the step + // controllers. + base::Unretained(this), current_step(), + /*reset_state=*/false, + /*step_switch_finished_callback=*/StepSwitchFinishedCallback(), + /*pop_step_callback=*/base::OnceClosure()); +}
diff --git a/chrome/browser/ui/views/profiles/profile_management_flow_controller.h b/chrome/browser/ui/views/profiles/profile_management_flow_controller.h index d9948fe..f4257220 100644 --- a/chrome/browser/ui/views/profiles/profile_management_flow_controller.h +++ b/chrome/browser/ui/views/profiles/profile_management_flow_controller.h
@@ -100,6 +100,10 @@ // (which is the default), the host will choose itself some generic title. virtual std::u16string GetFallbackAccessibleWindowTitle() const; + // A helper method to create a pop callback that will switch to the existing + // step (prior to the actual switch that this pop closure should be part of). + base::OnceClosure CreateSwitchToCurrentStepPopCallback(); + protected: void RegisterStep(Step step, std::unique_ptr<ProfileManagementStepController>);
diff --git a/chrome/browser/ui/views/profiles/profile_management_flow_controller_impl.cc b/chrome/browser/ui/views/profiles/profile_management_flow_controller_impl.cc index f8ba9bc..c064ebbe9 100644 --- a/chrome/browser/ui/views/profiles/profile_management_flow_controller_impl.cc +++ b/chrome/browser/ui/views/profiles/profile_management_flow_controller_impl.cc
@@ -62,18 +62,10 @@ // outlives the step controllers. base::Unretained(this)))); } - auto pop_closure = base::BindOnce( - &ProfileManagementFlowControllerImpl::SwitchToStep, - // Binding as Unretained as `this` outlives the step - // controllers. - base::Unretained(this), current_step(), - /*reset_state=*/false, - /*step_switch_finished_callback=*/StepSwitchFinishedCallback(), - /*pop_step_callback=*/base::OnceClosure()); SwitchToStep(Step::kAccountSelection, /*reset_state=*/step_needs_registration, std::move(step_switch_finished_callback), - std::move(pop_closure)); + CreateSwitchToCurrentStepPopCallback()); } #endif
diff --git a/chrome/browser/ui/views/profiles/profile_picker_dice_reauth_provider.cc b/chrome/browser/ui/views/profiles/profile_picker_dice_reauth_provider.cc index 57dfcb6..eadf203c 100644 --- a/chrome/browser/ui/views/profiles/profile_picker_dice_reauth_provider.cc +++ b/chrome/browser/ui/views/profiles/profile_picker_dice_reauth_provider.cc
@@ -83,11 +83,13 @@ contents_ = content::WebContents::Create( content::WebContents::CreateParams(&*profile_)); - // TODO(https://crbug.com/1478217): Add the back button and the appropriate - // reactions. - - host_->ShowScreen(contents_.get(), - signin::GetChromeReauthURL((email_to_reauth_))); + // Show the back button, the reactions are handled by the host itself. + host_->ShowScreen( + contents_.get(), signin::GetChromeReauthURL((email_to_reauth_)), + base::BindOnce(&ProfilePickerWebContentsHost::SetNativeToolbarVisible, + // Unretained is enough as the callback is called by the + // host itself. + base::Unretained(host_), /*visible=*/true)); } void ProfilePickerDiceReauthProvider::OnRefreshTokenUpdatedForAccount( @@ -120,6 +122,8 @@ void ProfilePickerDiceReauthProvider::Finish(bool success) { scoped_identity_manager_observation_.Reset(); + // Hide the toolbar in case it was visible after showing the reauth page. + host_->SetNativeToolbarVisible(false); std::move(on_reauth_completed_).Run(success); }
diff --git a/chrome/browser/ui/views/profiles/profile_picker_dice_reauth_provider.h b/chrome/browser/ui/views/profiles/profile_picker_dice_reauth_provider.h index 8bba798..09d2ef27 100644 --- a/chrome/browser/ui/views/profiles/profile_picker_dice_reauth_provider.h +++ b/chrome/browser/ui/views/profiles/profile_picker_dice_reauth_provider.h
@@ -47,6 +47,8 @@ ProfilePickerDiceReauthProvider& operator=( const ProfilePickerDiceReauthProvider&) = delete; + content::WebContents* contents() const { return contents_.get(); } + // Start the reauth process. void SwitchToReauth();
diff --git a/chrome/browser/ui/views/profiles/profile_picker_flow_controller.cc b/chrome/browser/ui/views/profiles/profile_picker_flow_controller.cc index d1e958a..ead80f143 100644 --- a/chrome/browser/ui/views/profiles/profile_picker_flow_controller.cc +++ b/chrome/browser/ui/views/profiles/profile_picker_flow_controller.cc
@@ -117,8 +117,9 @@ void MaybeShowProfileSwitchIPH(Browser* browser) { DCHECK(browser); BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser(browser); - if (!browser_view) + if (!browser_view) { return; + } browser_view->MaybeShowProfileSwitchIPH(); } @@ -183,8 +184,9 @@ } void Cancel() override { - if (is_finishing_) + if (is_finishing_) { return; + } is_finishing_ = true; } @@ -194,8 +196,9 @@ // called. Note that this can get called first time from a special case // handling (such as the Settings link) and than second time when the // TurnSyncOnHelper finishes. - if (is_finishing_) + if (is_finishing_) { return; + } is_finishing_ = true; if (callback->is_null()) { @@ -283,13 +286,15 @@ reauth_provider_->SwitchToReauth(); } - void OnNavigateBackRequested() override{}; + void OnNavigateBackRequested() override { + NavigateBackInternal(reauth_provider_->contents()); + } private: std::unique_ptr<ProfilePickerDiceReauthProvider> reauth_provider_; }; -std::unique_ptr<ProfileManagementStepController> CreateReauthReauthStep( +std::unique_ptr<ProfileManagementStepController> CreateReauthtep( ProfilePickerWebContentsHost* host, Profile* profile, base::OnceCallback<void(bool)> on_reauth_completed) { @@ -346,12 +351,19 @@ RegisterStep( Step::kReauth, - CreateReauthReauthStep( + CreateReauthtep( host(), profile, base::BindOnce(&ProfilePickerFlowController::OnReauthCompleted, base::Unretained(this), profile, std::move(on_error_callback)))); - SwitchToStep(Step::kReauth, true); + // Popping this step should first unregister it (specific to the reauth step), + // then switch back to the current step. + auto pop_closure = + base::BindOnce(&ProfilePickerFlowController::UnregisterStep, + base::Unretained(this), Step::kReauth) + .Then(CreateSwitchToCurrentStepPopCallback()); + SwitchToStep(Step::kReauth, true, StepSwitchFinishedCallback(), + std::move(pop_closure)); } void ProfilePickerFlowController::OnReauthCompleted(
diff --git a/chrome/browser/ui/views/profiles/profile_picker_view_browsertest.cc b/chrome/browser/ui/views/profiles/profile_picker_view_browsertest.cc index 27a846f..5a4fbaf1 100644 --- a/chrome/browser/ui/views/profiles/profile_picker_view_browsertest.cc +++ b/chrome/browser/ui/views/profiles/profile_picker_view_browsertest.cc
@@ -654,6 +654,16 @@ return &test_url_loader_factory_; } + void SimulateNavigateBack() { + // Use "Command [" for Mac and "Alt Left" for the other operating systems. +#if BUILDFLAG(IS_MAC) + view()->AcceleratorPressed( + ui::Accelerator(ui::VKEY_OEM_4, ui::EF_COMMAND_DOWN)); +#else + view()->AcceleratorPressed(ui::Accelerator(ui::VKEY_LEFT, ui::EF_ALT_DOWN)); +#endif + } + protected: const GURL kLocalProfileCreationUrl = AppendProfileCustomizationQueryParams( GURL("chrome://profile-customization"), @@ -1055,6 +1065,69 @@ EXPECT_EQ(BrowserList::GetInstance()->size(), initial_browser_count); EXPECT_TRUE(entry->IsSigninRequired()); } + +IN_PROC_BROWSER_TEST_F(ForceSigninProfilePickerCreationFlowBrowserTest, + ForceSigninReauthNavigateBackShouldAbort) { + size_t initial_browser_count = BrowserList::GetInstance()->size(); + ASSERT_EQ(initial_browser_count, 0u); + + const std::vector<Profile*> profiles = + g_browser_process->profile_manager()->GetLoadedProfiles(); + ASSERT_GE(profiles.size(), 1u); + Profile* profile = profiles[0]; + ProfileAttributesEntry* entry = + g_browser_process->profile_manager() + ->GetProfileAttributesStorage() + .GetProfileAttributesWithPath(profile->GetPath()); + + ASSERT_TRUE(entry->IsSigninRequired()); + ASSERT_TRUE(ProfilePicker::IsOpen()); + + signin::IdentityManager* identity_manager = + IdentityManagerFactory::GetForProfile(profile); + + const std::string email("test@managedchrome.com"); + signin::MakePrimaryAccountAvailable(identity_manager, email, + signin::ConsentLevel::kSignin); + // Only managed accounts are allowed to reauth. + entry->SetUserAcceptedAccountManagement(true); + + CoreAccountId primary_account = + identity_manager->GetPrimaryAccountId(signin::ConsentLevel::kSignin); + ASSERT_FALSE(primary_account.empty()); + + // Simulate an invalid account. + signin::SetInvalidRefreshTokenForPrimaryAccount(identity_manager); + + // Opening the locked profile from the profile picker should trigger the + // reauth. + OpenProfileFromPicker(entry->GetPath(), false); + WaitForLoadStop(GetChromeReauthURL(email)); + + // Simulate a redirect within the reauth page (requesting a password for + // example), the actual URL is not important for the testing purposes. + GURL redirect_url("https://www.google.com/"); + web_contents()->GetController().LoadURL(redirect_url, content::Referrer(), + ui::PAGE_TRANSITION_AUTO_TOPLEVEL, + std::string()); + WaitForLoadStop(redirect_url); + + // Simulate a back navigation within the reauth redirect. + SimulateNavigateBack(); + + // Expect it to take us back to the initial reauth page. + WaitForLoadStop(GetChromeReauthURL(email)); + + // Simulate a back navigation within the reauth page. + SimulateNavigateBack(); + + // Expect the profile picker to be opened since it was the last step before + // reauth, and the profile to be still locked. + WaitForLoadStop(GURL("chrome://profile-picker")); + EXPECT_TRUE(ProfilePicker::IsOpen()); + EXPECT_EQ(BrowserList::GetInstance()->size(), initial_browser_count); + EXPECT_TRUE(entry->IsSigninRequired()); +} #endif // Regression test for crbug.com/1266415. @@ -1220,13 +1293,7 @@ Profile* profile_being_created = StartDiceSignIn(); // Navigate back from the sign in step. - // Use "Command [" for Mac and "Alt Left" for the other operating systems. -#if BUILDFLAG(IS_MAC) - view()->AcceleratorPressed( - ui::Accelerator(ui::VKEY_OEM_4, ui::EF_COMMAND_DOWN)); -#else - view()->AcceleratorPressed(ui::Accelerator(ui::VKEY_LEFT, ui::EF_ALT_DOWN)); -#endif + SimulateNavigateBack(); // Simulate the sign-in screen get re-entered with a different color // (configured on the local profile screen). @@ -2592,13 +2659,9 @@ "Joe"); EXPECT_TRUE(ProfilePicker::IsOpen()); -// Navigate back does nothing. -#if BUILDFLAG(IS_MAC) - view()->AcceleratorPressed( - ui::Accelerator(ui::VKEY_OEM_4, ui::EF_COMMAND_DOWN)); -#else - view()->AcceleratorPressed(ui::Accelerator(ui::VKEY_LEFT, ui::EF_ALT_DOWN)); -#endif + // Navigate back does nothing. + SimulateNavigateBack(); + EXPECT_EQ(web_contents()->GetController().GetPendingEntry(), nullptr); }
diff --git a/chrome/browser/ui/views/side_panel/performance_controls/performance_side_panel_coordinator.cc b/chrome/browser/ui/views/side_panel/performance_controls/performance_side_panel_coordinator.cc new file mode 100644 index 0000000..9535c6b --- /dev/null +++ b/chrome/browser/ui/views/side_panel/performance_controls/performance_side_panel_coordinator.cc
@@ -0,0 +1,67 @@ +// 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/ui/views/side_panel/performance_controls/performance_side_panel_coordinator.h" + +#include "chrome/app/vector_icons/vector_icons.h" +#include "chrome/browser/profiles/profile.h" +#include "chrome/browser/ui/browser.h" +#include "chrome/browser/ui/views/chrome_layout_provider.h" +#include "chrome/browser/ui/views/side_panel/side_panel_content_proxy.h" +#include "chrome/browser/ui/views/side_panel/side_panel_coordinator.h" +#include "chrome/browser/ui/views/side_panel/side_panel_entry.h" +#include "chrome/browser/ui/views/side_panel/side_panel_registry.h" +#include "chrome/browser/ui/views/side_panel/side_panel_util.h" +#include "chrome/browser/ui/views/side_panel/side_panel_web_ui_view.h" +#include "chrome/browser/ui/webui/side_panel/performance_controls/performance_side_panel_ui.h" +#include "chrome/common/webui_url_constants.h" +#include "chrome/grit/generated_resources.h" +#include "ui/base/l10n/l10n_util.h" +#include "ui/base/models/image_model.h" +#include "ui/views/vector_icons.h" + +PerformanceSidePanelCoordinator::PerformanceSidePanelCoordinator( + Browser* browser) + : BrowserUserData<PerformanceSidePanelCoordinator>(*browser) {} + +PerformanceSidePanelCoordinator::~PerformanceSidePanelCoordinator() { + auto* global_registry = + SidePanelCoordinator::GetGlobalSidePanelRegistry(&GetBrowser()); + if (global_registry) { + global_registry->Deregister( + SidePanelEntry::Key(SidePanelEntry::Id::kPerformance)); + } +} + +void PerformanceSidePanelCoordinator::CreateAndRegisterEntry( + SidePanelRegistry* global_registry) { + const int icon_size = ChromeLayoutProvider::Get()->GetDistanceMetric( + ChromeDistanceMetric::DISTANCE_SIDE_PANEL_HEADER_VECTOR_ICON_SIZE); + + global_registry->Register(std::make_unique<SidePanelEntry>( + SidePanelEntry::Id::kPerformance, + l10n_util::GetStringUTF16(IDS_SHOW_PERFORMANCE), + ui::ImageModel::FromVectorIcon(kHighEfficiencyIcon, ui::kColorIcon, + icon_size), + base::BindRepeating( + &PerformanceSidePanelCoordinator::CreatePerformanceWebUIView, + base::Unretained(this)))); +} + +std::unique_ptr<views::View> +PerformanceSidePanelCoordinator::CreatePerformanceWebUIView() { + auto wrapper = + std::make_unique<BubbleContentsWrapperT<PerformanceSidePanelUI>>( + GURL(chrome::kChromeUIPerformanceSidePanelURL), + GetBrowser().profile(), IDS_SHOW_PERFORMANCE, + /*webui_resizes_host=*/false, + /*esc_closes_ui=*/false); + auto view = std::make_unique<SidePanelWebUIViewT<PerformanceSidePanelUI>>( + base::RepeatingClosure(), base::RepeatingClosure(), std::move(wrapper)); + view->SetVisible(true); + SidePanelUtil::GetSidePanelContentProxy(view.get())->SetAvailable(true); + return view; +} + +WEB_CONTENTS_USER_DATA_KEY_IMPL(PerformanceSidePanelCoordinator);
diff --git a/chrome/browser/ui/views/side_panel/performance_controls/performance_side_panel_coordinator.h b/chrome/browser/ui/views/side_panel/performance_controls/performance_side_panel_coordinator.h new file mode 100644 index 0000000..be257052e --- /dev/null +++ b/chrome/browser/ui/views/side_panel/performance_controls/performance_side_panel_coordinator.h
@@ -0,0 +1,37 @@ +// 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_UI_VIEWS_SIDE_PANEL_PERFORMANCE_CONTROLS_PERFORMANCE_SIDE_PANEL_COORDINATOR_H_ +#define CHROME_BROWSER_UI_VIEWS_SIDE_PANEL_PERFORMANCE_CONTROLS_PERFORMANCE_SIDE_PANEL_COORDINATOR_H_ + +#include <memory> + +#include "chrome/browser/ui/browser_user_data.h" + +class Browser; +class SidePanelRegistry; + +namespace views { +class View; +} // namespace views + +// PerformanceSidePanelCoordinator handles the creation and registration of the +// performance SidePanelEntry. +class PerformanceSidePanelCoordinator + : public BrowserUserData<PerformanceSidePanelCoordinator> { + public: + explicit PerformanceSidePanelCoordinator(Browser* browser); + ~PerformanceSidePanelCoordinator() override; + + void CreateAndRegisterEntry(SidePanelRegistry* global_registry); + + private: + friend class BrowserUserData<PerformanceSidePanelCoordinator>; + + std::unique_ptr<views::View> CreatePerformanceWebUIView(); + + BROWSER_USER_DATA_KEY_DECL(); +}; + +#endif // CHROME_BROWSER_UI_VIEWS_SIDE_PANEL_PERFORMANCE_CONTROLS_PERFORMANCE_SIDE_PANEL_COORDINATOR_H_
diff --git a/chrome/browser/ui/views/side_panel/performance_controls/performance_side_panel_interactive_uitest.cc b/chrome/browser/ui/views/side_panel/performance_controls/performance_side_panel_interactive_uitest.cc new file mode 100644 index 0000000..6bb2762 --- /dev/null +++ b/chrome/browser/ui/views/side_panel/performance_controls/performance_side_panel_interactive_uitest.cc
@@ -0,0 +1,76 @@ +// 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 "base/functional/bind.h" +#include "base/test/scoped_feature_list.h" +#include "chrome/browser/ui/browser_element_identifiers.h" +#include "chrome/grit/generated_resources.h" +#include "chrome/test/base/ui_test_utils.h" +#include "chrome/test/interaction/interactive_browser_test.h" +#include "components/performance_manager/public/features.h" +#include "content/public/test/browser_test.h" +#include "ui/base/interaction/element_tracker.h" +#include "ui/base/interaction/interaction_test_util.h" +#include "ui/base/interaction/interactive_test.h" +#include "ui/base/l10n/l10n_util.h" +#include "ui/views/controls/button/label_button.h" +#include "ui/views/controls/combobox/combobox.h" +#include "ui/views/interaction/element_tracker_views.h" + +class PerformanceSidePanelInteractiveTest : public InteractiveBrowserTest { + public: + PerformanceSidePanelInteractiveTest() = default; + ~PerformanceSidePanelInteractiveTest() override = default; + + void SetUp() override { + scoped_feature_list_.InitAndEnableFeature( + performance_manager::features::kPerformanceControlsSidePanel); + set_open_about_blank_on_browser_launch(true); + InteractiveBrowserTest::SetUp(); + } + + private: + base::test::ScopedFeatureList scoped_feature_list_; +}; + +IN_PROC_BROWSER_TEST_F(PerformanceSidePanelInteractiveTest, + SelectPerformanceSidePanel) { + RunTestSequence( + // Ensure the side panel isn't open + EnsureNotPresent(kSidePanelElementId), + // Click on the toolbar button to open the side panel + PressButton(kToolbarSidePanelButtonElementId), + WaitForShow(kSidePanelElementId), + WaitForShow(kSidePanelComboboxElementId), + // Switch to the performance entry using the header combobox + WithElement( + kSidePanelComboboxElementId, + base::BindOnce([](ui::TrackedElement* el) { + auto* const view = el->AsA<views::TrackedElementViews>()->view(); + auto* const combobox = views::AsViewClass<views::Combobox>(view); + auto* const model = combobox->GetModel(); + + for (int i = 0; i < static_cast<int>(model->GetItemCount()); i++) { + if (model->GetItemAt(i) == + l10n_util::GetStringUTF16(IDS_SHOW_PERFORMANCE)) { + combobox->MenuSelectionAt(i); + return; + } + } + })), + CheckElement(kSidePanelComboboxElementId, + base::BindOnce([](ui::TrackedElement* el) { + auto* const view = + el->AsA<views::TrackedElementViews>()->view(); + auto* const combobox = + views::AsViewClass<views::Combobox>(view); + if (combobox->GetModel()->GetItemAt( + combobox->GetSelectedIndex().value()) != + l10n_util::GetStringUTF16(IDS_SHOW_PERFORMANCE)) { + LOG(ERROR) << "Performance side panel is not selected."; + return false; + } + return true; + }))); +}
diff --git a/chrome/browser/ui/views/side_panel/read_anything/read_anything_coordinator.cc b/chrome/browser/ui/views/side_panel/read_anything/read_anything_coordinator.cc index e130df1c..c50caacd 100644 --- a/chrome/browser/ui/views/side_panel/read_anything/read_anything_coordinator.cc +++ b/chrome/browser/ui/views/side_panel/read_anything/read_anything_coordinator.cc
@@ -10,6 +10,7 @@ #include <vector> #include "base/functional/bind.h" +#include "base/metrics/field_trial_params.h" #include "base/time/time.h" #include "base/timer/timer.h" #include "chrome/app/vector_icons/vector_icons.h"
diff --git a/chrome/browser/ui/views/side_panel/side_panel_entry.cc b/chrome/browser/ui/views/side_panel/side_panel_entry.cc index 9333bfd0..4445894 100644 --- a/chrome/browser/ui/views/side_panel/side_panel_entry.cc +++ b/chrome/browser/ui/views/side_panel/side_panel_entry.cc
@@ -62,6 +62,10 @@ entry_shown_timestamp_ = base::TimeTicks::Now(); SidePanelUtil::RecordEntryShownMetrics(key_.id(), entry_show_triggered_timestamp_); + // After the initial load time is recorded, we need to reset the triggered + // timestamp so we don't keep recording this entry after its selected from the + // combobox. + ResetLoadTimestamp(); for (SidePanelEntryObserver& observer : observers_) observer.OnEntryShown(this); }
diff --git a/chrome/browser/ui/views/side_panel/side_panel_util.cc b/chrome/browser/ui/views/side_panel/side_panel_util.cc index 98c92ce1..1194758 100644 --- a/chrome/browser/ui/views/side_panel/side_panel_util.cc +++ b/chrome/browser/ui/views/side_panel/side_panel_util.cc
@@ -19,6 +19,7 @@ #include "chrome/browser/ui/views/side_panel/bookmarks/bookmarks_side_panel_coordinator.h" #include "chrome/browser/ui/views/side_panel/feed/feed_side_panel_coordinator.h" #include "chrome/browser/ui/views/side_panel/history_clusters/history_clusters_side_panel_coordinator.h" +#include "chrome/browser/ui/views/side_panel/performance_controls/performance_side_panel_coordinator.h" #include "chrome/browser/ui/views/side_panel/read_anything/read_anything_coordinator.h" #include "chrome/browser/ui/views/side_panel/reading_list/reading_list_side_panel_coordinator.h" #include "chrome/browser/ui/views/side_panel/search_companion/search_companion_side_panel_coordinator.h" @@ -29,6 +30,7 @@ #include "components/feed/feed_feature_list.h" #include "components/history_clusters/core/features.h" #include "components/history_clusters/core/history_clusters_service.h" +#include "components/performance_manager/public/features.h" #include "components/prefs/pref_service.h" #include "components/user_notes/user_notes_features.h" #include "ui/accessibility/accessibility_features.h" @@ -53,6 +55,7 @@ {SidePanelEntry::Id::kReadAnything, "ReadAnything"}, {SidePanelEntry::Id::kUserNote, "UserNotes"}, {SidePanelEntry::Id::kFeed, "Feed"}, + {SidePanelEntry::Id::kPerformance, "Performance"}, {SidePanelEntry::Id::kSideSearch, "SideSearch"}, {SidePanelEntry::Id::kLens, "Lens"}, {SidePanelEntry::Id::kAssistant, "Assistant"}, @@ -80,6 +83,13 @@ BookmarksSidePanelCoordinator::GetOrCreateForBrowser(browser) ->CreateAndRegisterEntry(global_registry); + // Add performance. + if (base::FeatureList::IsEnabled( + performance_manager::features::kPerformanceControlsSidePanel)) { + PerformanceSidePanelCoordinator::GetOrCreateForBrowser(browser) + ->CreateAndRegisterEntry(global_registry); + } + // Add history clusters. if (HistoryClustersSidePanelCoordinator::IsSupported(browser->profile())) { HistoryClustersSidePanelCoordinator::GetOrCreateForBrowser(browser)
diff --git a/chrome/browser/ui/views/tabs/tab_hover_card_controller_interactive_uitest.cc b/chrome/browser/ui/views/tabs/tab_hover_card_controller_interactive_uitest.cc index f5c587d..5f1f15f7 100644 --- a/chrome/browser/ui/views/tabs/tab_hover_card_controller_interactive_uitest.cc +++ b/chrome/browser/ui/views/tabs/tab_hover_card_controller_interactive_uitest.cc
@@ -630,8 +630,16 @@ // The discarded status in the hover card footer should disappear after a // discarded tab is reloaded +// TODO(crbug.com/1485605): Re-enable after resolving flakiness. +#if BUILDFLAG(IS_CHROMEOS) && defined(MEMORY_SANITIZER) +#define MAYBE_HoverCardStopShowingDiscardStatusOnReload \ + DISABLED_HoverCardStopShowingDiscardStatusOnReload +#else +#define MAYBE_HoverCardStopShowingDiscardStatusOnReload \ + HoverCardStopShowingDiscardStatusOnReload +#endif IN_PROC_BROWSER_TEST_P(TabHoverCardFadeFooterInteractiveUiTest, - HoverCardStopShowingDiscardStatusOnReload) { + MAYBE_HoverCardStopShowingDiscardStatusOnReload) { RunTestSequence( InstrumentTab(kFirstTabContents, 0), NavigateWebContents(kFirstTabContents, GetTestingURL("a.com")),
diff --git a/chrome/browser/ui/views/user_education/browser_feature_promo_controller.cc b/chrome/browser/ui/views/user_education/browser_feature_promo_controller.cc index abe573a..297262f 100644 --- a/chrome/browser/ui/views/user_education/browser_feature_promo_controller.cc +++ b/chrome/browser/ui/views/user_education/browser_feature_promo_controller.cc
@@ -66,7 +66,7 @@ return views::ElementTrackerViews::GetContextForView(browser_view_); } -bool BrowserFeaturePromoController::CanShowPromo( +bool BrowserFeaturePromoController::CanShowPromoForElement( ui::TrackedElement* anchor_element) const { auto* const profile = browser_view_->GetProfile(); // Temporarily turn off IPH in incognito as a concern was raised that
diff --git a/chrome/browser/ui/views/user_education/browser_feature_promo_controller.h b/chrome/browser/ui/views/user_education/browser_feature_promo_controller.h index 22bef0ef..dbd648f 100644 --- a/chrome/browser/ui/views/user_education/browser_feature_promo_controller.h +++ b/chrome/browser/ui/views/user_education/browser_feature_promo_controller.h
@@ -71,11 +71,13 @@ GetAcceleratorProvider); FRIEND_TEST_ALL_PREFIXES(BrowserFeaturePromoControllerTest, GetFocusHelpBubbleScreenReaderHint); - FRIEND_TEST_ALL_PREFIXES(BrowserFeaturePromoControllerUiTest, CanShowPromo); + FRIEND_TEST_ALL_PREFIXES(BrowserFeaturePromoControllerUiTest, + CanShowPromoForElement); // FeaturePromoController: ui::ElementContext GetAnchorContext() const override; - bool CanShowPromo(ui::TrackedElement* anchor_element) const override; + bool CanShowPromoForElement( + ui::TrackedElement* anchor_element) const override; const ui::AcceleratorProvider* GetAcceleratorProvider() const override; std::u16string GetTutorialScreenReaderHint() const override; std::u16string GetFocusHelpBubbleScreenReaderHint(
diff --git a/chrome/browser/ui/views/user_education/browser_feature_promo_controller_interactive_uitest.cc b/chrome/browser/ui/views/user_education/browser_feature_promo_controller_interactive_uitest.cc index 31db354..71cd524 100644 --- a/chrome/browser/ui/views/user_education/browser_feature_promo_controller_interactive_uitest.cc +++ b/chrome/browser/ui/views/user_education/browser_feature_promo_controller_interactive_uitest.cc
@@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "base/strings/stringprintf.h" #include "chrome/browser/ui/views/user_education/browser_feature_promo_controller.h" #include <memory> @@ -79,6 +80,10 @@ browser()->profile())); ASSERT_TRUE(mock_tracker_); + // Allow an unlimited number of calls to WouldTriggerHelpUI(). + EXPECT_CALL(*mock_tracker_, WouldTriggerHelpUI) + .WillRepeatedly(Return(true)); + promo_controller_ = static_cast<BrowserFeaturePromoController*>( browser()->window()->GetFeaturePromoController()); @@ -104,15 +109,25 @@ registry()->RegisterFeature(std::move(notice)); } + // Verifies that `CanShowPromo()` returns `can_show`. + auto QueryIPH(const base::Feature& iph_feature, bool can_show) { + return CheckResult( + [this, &iph_feature]() { + return promo_controller_->CanShowPromo(iph_feature); + }, + can_show, + base::StringPrintf("QueryIPH(%s, %s)", iph_feature.name, + (can_show ? "true" : "false"))); + } + // Tries to show tab groups IPH by meeting the trigger conditions. If // |should_show| is true it checks that it was shown. If false, it // checks that it was not shown. auto AttemptIPH(const base::Feature& iph_feature, bool should_show, base::OnceClosure on_close = base::DoNothing()) { - return Do(base::BindLambdaForTesting([this, &iph_feature, should_show, - callback = - std::move(on_close)]() mutable { + return Check([this, &iph_feature, should_show, + callback = std::move(on_close)]() mutable { if (should_show) { EXPECT_CALL(*mock_tracker_, ShouldTriggerHelpUI(Ref(iph_feature))) .WillOnce(Return(true)); @@ -121,15 +136,22 @@ .Times(0); } - ASSERT_EQ(should_show, promo_controller_->MaybeShowPromo( - iph_feature, std::move(callback))); - ASSERT_EQ(should_show, promo_controller_->IsPromoActive(iph_feature)); + if (should_show != + promo_controller_->MaybeShowPromo(iph_feature, std::move(callback))) { + LOG(ERROR) << "MaybeShowPromo() didn't return expected result."; + return false; + } + if (should_show != promo_controller_->IsPromoActive(iph_feature)) { + LOG(ERROR) << "IsPromoActive() didn't return expected result."; + return false; + } // If shown, Tracker::Dismissed should be called eventually. if (should_show) { EXPECT_CALL(*mock_tracker_, Dismissed(Ref(iph_feature))); } - })); + return true; + }); } auto TriggerNonDefaultButton() { @@ -273,13 +295,14 @@ base::UserActionTester user_action_tester_; }; -IN_PROC_BROWSER_TEST_F(BrowserFeaturePromoControllerUiTest, CanShowPromo) { +IN_PROC_BROWSER_TEST_F(BrowserFeaturePromoControllerUiTest, + CanShowPromoForElement) { auto widget = std::make_unique<views::Widget>(); auto can_show_promo = [this](ui::TrackedElement* anchor) { return static_cast<BrowserFeaturePromoController*>( browser()->window()->GetFeaturePromoController()) - ->CanShowPromo(anchor); + ->CanShowPromoForElement(anchor); }; RunTestSequence( @@ -350,6 +373,15 @@ } IN_PROC_BROWSER_TEST_F(BrowserFeaturePromoControllerUiTest, + CanShowPromoReturnsExpectedValue) { + RunTestSequence(QueryIPH(kCustomActionTestFeature, true), + AttemptIPH(kCustomActionTestFeature, true), + QueryIPH(kCustomActionTestFeature, false), + TriggerNonDefaultButton(), + QueryIPH(kCustomActionTestFeature, true)); +} + +IN_PROC_BROWSER_TEST_F(BrowserFeaturePromoControllerUiTest, CallbackHappensAfterCancel) { bool called = false; CloseReason close_reason = CloseReason::kAbortPromo;
diff --git a/chrome/browser/ui/views/user_education/browser_feature_promo_controller_unittest.cc b/chrome/browser/ui/views/user_education/browser_feature_promo_controller_unittest.cc index e4ec601..ccdf2d6 100644 --- a/chrome/browser/ui/views/user_education/browser_feature_promo_controller_unittest.cc +++ b/chrome/browser/ui/views/user_education/browser_feature_promo_controller_unittest.cc
@@ -273,6 +273,18 @@ EXPECT_EQ(nullptr, BrowserFeaturePromoController::GetForView(&orphan_view)); } +TEST_F(BrowserFeaturePromoControllerTest, AsksBackendIfPromoShouldBeShown) { + // If the backend says no, the controller says no. + EXPECT_CALL(*mock_tracker_, WouldTriggerHelpUI(Ref(kTestIPHFeature))) + .WillOnce(Return(false)); + EXPECT_FALSE(controller_->CanShowPromo(kTestIPHFeature)); + + // If the backend says yes, the controller says yes. + EXPECT_CALL(*mock_tracker_, WouldTriggerHelpUI(Ref(kTestIPHFeature))) + .WillOnce(Return(true)); + EXPECT_TRUE(controller_->CanShowPromo(kTestIPHFeature)); +} + TEST_F(BrowserFeaturePromoControllerTest, AsksBackendToShowPromo) { EXPECT_CALL(*mock_tracker_, ShouldTriggerHelpUI(Ref(kTestIPHFeature))) .WillOnce(Return(false)); @@ -300,7 +312,7 @@ TEST_F(BrowserFeaturePromoControllerTest, DoesNotAskBackendWhenShowingFromDemoPage) { - EXPECT_TRUE(controller_->MaybeShowPromoForDemoPage(&kTestIPHFeature)); + EXPECT_TRUE(controller_->MaybeShowPromoForDemoPage(kTestIPHFeature)); EXPECT_TRUE(controller_->IsPromoActive(kTestIPHFeature)); EXPECT_NE(nullptr, GetPromoBubble()); } @@ -313,6 +325,20 @@ EXPECT_TRUE(GetPromoBubble()); } +TEST_F(BrowserFeaturePromoControllerTest, BubbleBlocksCanShowPromo) { + EXPECT_CALL(*mock_tracker_, ShouldTriggerHelpUI(Ref(kTestIPHFeature))) + .WillOnce(Return(true)); + EXPECT_CALL(*mock_tracker_, WouldTriggerHelpUI(Ref(kTutorialIPHFeature))) + .WillRepeatedly(Return(true)); + EXPECT_TRUE(controller_->MaybeShowPromo(kTestIPHFeature)); + EXPECT_FALSE(controller_->CanShowPromo(kTutorialIPHFeature)); + EXPECT_CALL(*mock_tracker_, Dismissed(Ref(kTestIPHFeature))).Times(1); + EXPECT_TRUE(controller_->EndPromo( + kTestIPHFeature, + user_education::FeaturePromoCloseReason::kFeatureEngaged)); + EXPECT_TRUE(controller_->CanShowPromo(kTutorialIPHFeature)); +} + TEST_F(BrowserFeaturePromoControllerTest, ShowsStartupBubble) { EXPECT_CALL(*mock_tracker_, AddOnInitializedCallback) .WillOnce([](feature_engagement::Tracker::OnInitializedCallback cb) {
diff --git a/chrome/browser/ui/views/user_education/feature_promo_lifecycle_interactive_uitest.cc b/chrome/browser/ui/views/user_education/feature_promo_lifecycle_interactive_uitest.cc index 3c4515f1..98cc30f2 100644 --- a/chrome/browser/ui/views/user_education/feature_promo_lifecycle_interactive_uitest.cc +++ b/chrome/browser/ui/views/user_education/feature_promo_lifecycle_interactive_uitest.cc
@@ -155,7 +155,7 @@ auto AttemptIPH( bool should_show, const base::Feature* feature = &kFeaturePromoLifecycleTestPromo) { - return InBrowser(base::BindLambdaForTesting( + return CheckBrowser(base::BindLambdaForTesting( [this, should_show, feature](Browser* browser) { auto* const tracker = GetTracker(browser); if (should_show) { @@ -166,16 +166,25 @@ EXPECT_CALL(*tracker, ShouldTriggerHelpUI(Ref(*feature))).Times(0); } - ASSERT_EQ(should_show, - GetPromoController(browser)->MaybeShowPromo(*feature)); - ASSERT_EQ(should_show, - GetPromoController(browser)->IsPromoActive(*feature)); + if (should_show != + GetPromoController(browser)->MaybeShowPromo(*feature)) { + LOG(ERROR) << "MaybeShowPromo did not return expected value."; + return false; + } + + if (should_show != + GetPromoController(browser)->IsPromoActive(*feature)) { + LOG(ERROR) << "IsPromoActive did not return expected value."; + return false; + } // If shown, Tracker::Dismissed should be called eventually. if (should_show) { EXPECT_CALL(*tracker, Dismissed(Ref(*feature))); last_show_time_.second = base::Time::Now(); } + + return true; })); } @@ -448,12 +457,14 @@ IN_PROC_BROWSER_TEST_F(FeaturePromoLifecycleAppUiTest, ShowForApp) { Browser* const app_browser = LaunchWebAppBrowser(app1_id_); RunTestSequenceInContext(app_browser->window()->GetElementContext(), + WaitForShow(kToolbarAppMenuButtonElementId), AttemptIPH(true), DismissIPH(), CheckShownForApp()); } IN_PROC_BROWSER_TEST_F(FeaturePromoLifecycleAppUiTest, ShowForAppThenBlocked) { Browser* const app_browser = LaunchWebAppBrowser(app1_id_); RunTestSequenceInContext(app_browser->window()->GetElementContext(), + WaitForShow(kToolbarAppMenuButtonElementId), AttemptIPH(true), DismissIPH(), FlushEvents(), AttemptIPH(false)); } @@ -461,6 +472,7 @@ IN_PROC_BROWSER_TEST_F(FeaturePromoLifecycleAppUiTest, HasPromoBeenDismissed) { Browser* const app_browser = LaunchWebAppBrowser(app1_id_); RunTestSequenceInContext(app_browser->window()->GetElementContext(), + WaitForShow(kToolbarAppMenuButtonElementId), CheckDismissed(false), AttemptIPH(true), DismissIPH(), CheckDismissed(true)); } @@ -470,9 +482,10 @@ Browser* const app_browser2 = LaunchWebAppBrowser(app2_id_); RunTestSequenceInContext( app_browser->window()->GetElementContext(), AttemptIPH(true), - DismissIPH(), FlushEvents(), + WaitForShow(kToolbarAppMenuButtonElementId), DismissIPH(), FlushEvents(), InContext(app_browser2->window()->GetElementContext(), - Steps(AttemptIPH(true), DismissIPH(), CheckShownForApp()))); + Steps(WaitForShow(kToolbarAppMenuButtonElementId), + AttemptIPH(true), DismissIPH(), CheckShownForApp()))); } class FeaturePromoLifecycleCriticaUiTest : public FeaturePromoLifecycleUiTest {
diff --git a/chrome/browser/ui/webui/ash/scalable_iph/scalable_iph_debug_ui.cc b/chrome/browser/ui/webui/ash/scalable_iph/scalable_iph_debug_ui.cc index 379abb90..5ae4248b 100644 --- a/chrome/browser/ui/webui/ash/scalable_iph/scalable_iph_debug_ui.cc +++ b/chrome/browser/ui/webui/ash/scalable_iph/scalable_iph_debug_ui.cc
@@ -4,10 +4,13 @@ #include "chrome/browser/ui/webui/ash/scalable_iph/scalable_iph_debug_ui.h" +#include <sstream> + #include "ash/constants/ash_features.h" #include "base/memory/ref_counted_memory.h" #include "base/memory/scoped_refptr.h" #include "chrome/browser/scalable_iph/scalable_iph_factory.h" +#include "chromeos/ash/components/scalable_iph/logger.h" #include "chromeos/ash/components/scalable_iph/scalable_iph.h" #include "content/public/browser/web_contents.h" #include "content/public/browser/web_ui.h" @@ -17,13 +20,37 @@ namespace { constexpr char kLoggingPath[] = "log.txt"; -constexpr char kDebugMessageScalableIphNotAvailable[] = - "ScalableIph keyed service is not created for this profile."; bool ShouldHandleRequest(const std::string& path) { return path == kLoggingPath; } +std::string CollectServiceStartUpDebugLog( + content::BrowserContext* browser_context) { + std::ostringstream log; + log << "Failed to get a Scalable Iph service. Collect debug logs for the " + "service initialization.\n"; + + ScalableIphFactory* scalable_iph_factory = ScalableIphFactory::GetInstance(); + if (!scalable_iph_factory) { + log << "Failed to obtain ScalableIphFactory instance.\n"; + return log.str(); + } + + log << "Call ScalableIphFactory::GetBrowserContextToUse for debugging.\n"; + scalable_iph::Logger logger; + content::BrowserContext* result = + scalable_iph_factory->GetBrowserContextToUseForDebug(browser_context, + &logger); + log << "Return value of ScalableIphFactory::GetBrowserContextToUseForDebug: " + "result == nullptr: " + << (result == nullptr) << "\n"; + log << "Log from ScalableIphFactory::GetBrowserContextToUseForDebug:\n"; + log << logger.GenerateLog() << "\n"; + + return log.str(); +} + } // namespace bool ScalableIphDebugUIConfig::IsWebUIEnabled( @@ -50,15 +77,16 @@ content::WebUIDataSource::GotDataCallback callback) { CHECK_EQ(path, kLoggingPath); + content::BrowserContext* browser_context = + web_ui()->GetWebContents()->GetBrowserContext(); scalable_iph::ScalableIph* scalable_iph = - ScalableIphFactory::GetForBrowserContext( - web_ui()->GetWebContents()->GetBrowserContext()); + ScalableIphFactory::GetForBrowserContext(browser_context); if (!scalable_iph) { // `ScalableIph` might not be available even if the feature flag is on, e.g. // pre-conditions don't get satisfied, querying a service before its // initialization, etc. std::move(callback).Run(base::MakeRefCounted<base::RefCountedString>( - kDebugMessageScalableIphNotAvailable)); + CollectServiceStartUpDebugLog(browser_context))); return; }
diff --git a/chrome/browser/ui/webui/ash/settings/pages/bluetooth/bluetooth_section.cc b/chrome/browser/ui/webui/ash/settings/pages/bluetooth/bluetooth_section.cc index 9641dfe4..afbee1a 100644 --- a/chrome/browser/ui/webui/ash/settings/pages/bluetooth/bluetooth_section.cc +++ b/chrome/browser/ui/webui/ash/settings/pages/bluetooth/bluetooth_section.cc
@@ -459,7 +459,9 @@ updater.AddSearchTags(GetBluetoothSearchConcepts()); - if (features::IsFastPairEnabled()) { + if (features::IsFastPairEnabled() && + base::FeatureList::IsEnabled( + ash::features::kAllowCrossDeviceFeatureSuite)) { if (pref_service_->GetBoolean(ash::prefs::kFastPairEnabled)) { updater.AddSearchTags(GetFastPairOnSearchConcepts()); } else {
diff --git a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc index 143d1b3..5a9d1bb 100644 --- a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc +++ b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
@@ -169,6 +169,7 @@ #include "chrome/browser/ui/webui/side_panel/bookmarks/bookmarks_side_panel_ui.h" #include "chrome/browser/ui/webui/side_panel/customize_chrome/customize_chrome_ui.h" #include "chrome/browser/ui/webui/side_panel/history_clusters/history_clusters_side_panel_ui.h" +#include "chrome/browser/ui/webui/side_panel/performance_controls/performance_side_panel_ui.h" #include "chrome/browser/ui/webui/side_panel/read_anything/read_anything_untrusted_ui.h" #include "chrome/browser/ui/webui/side_panel/reading_list/reading_list_ui.h" #include "chrome/browser/ui/webui/side_panel/user_notes/user_notes_side_panel_ui.h" @@ -616,6 +617,9 @@ } if (url.host_piece() == chrome::kChromeUIUserNotesSidePanelHost) return &NewWebUI<UserNotesSidePanelUI>; + if (url.host_piece() == chrome::kChromeUIPerformanceSidePanelHost) { + return &NewWebUI<PerformanceSidePanelUI>; + } // Settings are implemented with native UI elements on Android. if (url.host_piece() == chrome::kChromeUISettingsHost) return &NewWebUI<settings::SettingsUI>;
diff --git a/chrome/browser/ui/webui/internals/user_education/user_education_internals_page_handler_impl.cc b/chrome/browser/ui/webui/internals/user_education/user_education_internals_page_handler_impl.cc index 476d6d8..ebc9079 100644 --- a/chrome/browser/ui/webui/internals/user_education/user_education_internals_page_handler_impl.cc +++ b/chrome/browser/ui/webui/internals/user_education/user_education_internals_page_handler_impl.cc
@@ -210,7 +210,7 @@ ->GetFeaturePromoController(); bool showed_promo = - feature_promo_controller->MaybeShowPromoForDemoPage(feature); + feature_promo_controller->MaybeShowPromoForDemoPage(*feature); if (showed_promo) { std::move(callback).Run(std::string());
diff --git a/chrome/browser/ui/webui/interstitials/interstitial_ui_browsertest.cc b/chrome/browser/ui/webui/interstitials/interstitial_ui_browsertest.cc index 95a58a41..66b895d 100644 --- a/chrome/browser/ui/webui/interstitials/interstitial_ui_browsertest.cc +++ b/chrome/browser/ui/webui/interstitials/interstitial_ui_browsertest.cc
@@ -3,6 +3,7 @@ // found in the LICENSE file. #include "base/strings/utf_string_conversions.h" +#include "base/test/scoped_feature_list.h" #include "build/build_config.h" #include "chrome/browser/chrome_notification_types.h" #include "chrome/browser/devtools/devtools_window.h" @@ -13,6 +14,7 @@ #include "chrome/common/chrome_switches.h" #include "chrome/test/base/in_process_browser_test.h" #include "chrome/test/base/ui_test_utils.h" +#include "components/safe_browsing/core/common/features.h" #include "components/strings/grit/components_strings.h" #include "content/public/browser/web_contents.h" #include "content/public/test/browser_test.h" @@ -26,6 +28,8 @@ ~InterstitialUITest() override {} void SetUpCommandLine(base::CommandLine* command_line) override { + scoped_feature_list_.InitAndDisableFeature( + safe_browsing::kRedInterstitialFacelift); InProcessBrowserTest::SetUpCommandLine(command_line); #if BUILDFLAG(IS_CHROMEOS) @@ -80,6 +84,9 @@ int message_id) { TestInterstitial(url, page_title, l10n_util::GetStringUTF16(message_id)); } + + private: + base::test::ScopedFeatureList scoped_feature_list_; }; IN_PROC_BROWSER_TEST_F(InterstitialUITest, HomePage) {
diff --git a/chrome/browser/ui/webui/settings/ash/multidevice_section.cc b/chrome/browser/ui/webui/settings/ash/multidevice_section.cc index 4b9aef3..49da9d9 100644 --- a/chrome/browser/ui/webui/settings/ash/multidevice_section.cc +++ b/chrome/browser/ui/webui/settings/ash/multidevice_section.cc
@@ -588,6 +588,10 @@ IDS_SETTINGS_MULTIDEVICE_PERMISSIONS_SETUP_DIALOG_NOTIFICATION_ACCESS_PROHIBITED_SUMMARY, GetHelpUrlWithBoard(phonehub::kPhoneHubLearnMoreLink))); + html_source->AddBoolean("isCrossDeviceFeatureSuiteEnabled", + base::FeatureList::IsEnabled( + ash::features::kAllowCrossDeviceFeatureSuite)); + // We still need to register strings even if Nearby Share is not supported. // For example, the HTML is always built but only displayed if Nearby Share is // supported. @@ -712,6 +716,12 @@ updater.RemoveSearchTags(GetMultiDeviceOptedOutSearchConcepts()); updater.RemoveSearchTags(GetMultiDeviceOptedInSearchConcepts()); + if (!base::FeatureList::IsEnabled( + ash::features::kAllowCrossDeviceFeatureSuite)) { + // Do not add multidevice search tags if Cross Device is disabled. + return; + } + if (IsOptedIn(host_status_with_device.first)) { updater.AddSearchTags(GetMultiDeviceOptedInSearchConcepts()); } else { @@ -729,6 +739,12 @@ updater.RemoveSearchTags(GetMultiDeviceOptedInWifiSyncSearchConcepts()); updater.RemoveSearchTags(GetMultiDeviceOptedInPhoneHubAppsSearchConcepts()); + if (!base::FeatureList::IsEnabled( + ash::features::kAllowCrossDeviceFeatureSuite)) { + // Do not add multidevice search tags if Cross Device is disabled. + return; + } + if (IsFeatureSupported(Feature::kPhoneHub)) { updater.AddSearchTags(GetMultiDeviceOptedInPhoneHubSearchConcepts()); if (features::IsPhoneHubCameraRollEnabled() &&
diff --git a/chrome/browser/ui/webui/settings/site_settings_handler.h b/chrome/browser/ui/webui/settings/site_settings_handler.h index 024720d..6804289 100644 --- a/chrome/browser/ui/webui/settings/site_settings_handler.h +++ b/chrome/browser/ui/webui/settings/site_settings_handler.h
@@ -191,7 +191,6 @@ // Handles setting and resetting an origin permission. void HandleResetCategoryPermissionForPattern(const base::Value::List& args); - // TODO(1466127): Add tests for HandleSetCategoryPermissionForPattern. void HandleSetCategoryPermissionForPattern(const base::Value::List& args); // TODO(andypaicu, crbug.com/880684): Update to only expect a list of three
diff --git a/chrome/browser/ui/webui/settings/site_settings_handler_unittest.cc b/chrome/browser/ui/webui/settings/site_settings_handler_unittest.cc index ee9cc214..a1e118f 100644 --- a/chrome/browser/ui/webui/settings/site_settings_handler_unittest.cc +++ b/chrome/browser/ui/webui/settings/site_settings_handler_unittest.cc
@@ -517,7 +517,9 @@ map->SetContentSettingCustomScope( ContentSettingsPattern::FromString(primary_pattern), - ContentSettingsPattern::FromString(secondary_pattern), + secondary_pattern.empty() + ? ContentSettingsPattern::Wildcard() + : ContentSettingsPattern::FromString(secondary_pattern), content_setting_type, content_setting, constraints); EXPECT_EQ(expected_total_calls, web_ui()->call_data().size()); ASSERT_EQ("contentSettingSitePermissionChanged", @@ -1830,15 +1832,10 @@ CreateIncognitoProfile(); { - base::Value::List set_args; - set_args.Append(kOriginToBlock); // Primary pattern. - set_args.Append(std::string()); // Secondary pattern. - set_args.Append(kNotifications); - set_args.Append( - content_settings::ContentSettingToString(CONTENT_SETTING_BLOCK)); - set_args.Append(true); // Incognito. - - handler()->HandleSetCategoryPermissionForPattern(set_args); + SetContentSettingCustomScope(kOriginToBlock, std::string(), + kPermissionNotifications, + CONTENT_SETTING_BLOCK, 2U, + /*is_incognito=*/true); base::Value::List get_exception_list_args; get_exception_list_args.Append(kCallbackId); @@ -1855,15 +1852,10 @@ } { - base::Value::List set_args; - set_args.Append(kOriginToBlock); // Primary pattern. - set_args.Append(std::string()); // Secondary pattern. - set_args.Append(kNotifications); - set_args.Append( - content_settings::ContentSettingToString(CONTENT_SETTING_BLOCK)); - set_args.Append(false); // Incognito. - - handler()->HandleSetCategoryPermissionForPattern(set_args); + SetContentSettingCustomScope(kOriginToBlock, std::string(), + kPermissionNotifications, + CONTENT_SETTING_BLOCK, 5U, + /*is_incognito=*/false); base::Value::List get_exception_list_args; get_exception_list_args.Append(kCallbackId); @@ -1998,7 +1990,7 @@ handler()->HandleResetCategoryPermissionForPattern(reset_args); } -TEST_F(SiteSettingsHandlerTest, Origins) { +TEST_F(SiteSettingsHandlerTest, SetCategory_GetException_ResetCategory) { const std::string google("https://www.google.com:443"); { // Test the JS -> C++ -> JS callback path for configuring origins, by @@ -2259,7 +2251,132 @@ site_settings::SiteSettingSource::kInsecureOrigin, 2U); } -TEST_F(SiteSettingsHandlerTest, ExceptionHelpers) { +TEST_F(SiteSettingsHandlerTest, SetCategoryPermissionForPattern) { + const std::string kOrigin = "https://www.example.com:443"; + + base::Value::List set_args; + set_args.Append(kOrigin); // Primary pattern. + set_args.Append(std::string()); // Secondary pattern. + set_args.Append(kNotifications); + set_args.Append( + content_settings::ContentSettingToString(CONTENT_SETTING_BLOCK)); + set_args.Append(false); // Incognito. + + handler()->HandleSetCategoryPermissionForPattern(set_args); + EXPECT_EQ(kNumberContentSettingListeners, web_ui()->call_data().size()); + + HostContentSettingsMap* map = + HostContentSettingsMapFactory::GetForProfile(profile()); + + ASSERT_EQ(CONTENT_SETTING_BLOCK, + map->GetContentSetting(GURL(kOrigin), GURL(std::string()), + kPermissionNotifications)); +} + +TEST_F(SiteSettingsHandlerTest, SetCategoryPermissionForPattern_WildCard) { + const std::string kWildcardOrigin = "[*.]example.com"; + const std::string kRealOrigin = "https://www.example.com"; + + base::Value::List set_args; + set_args.Append(kWildcardOrigin); // Primary pattern. + set_args.Append(std::string()); // Secondary pattern. + set_args.Append(kNotifications); + set_args.Append( + content_settings::ContentSettingToString(CONTENT_SETTING_BLOCK)); + set_args.Append(false); // Incognito. + + handler()->HandleSetCategoryPermissionForPattern(set_args); + EXPECT_EQ(kNumberContentSettingListeners, web_ui()->call_data().size()); + + HostContentSettingsMap* map = + HostContentSettingsMapFactory::GetForProfile(profile()); + + ASSERT_EQ(CONTENT_SETTING_BLOCK, + map->GetContentSetting(GURL(kRealOrigin), GURL(std::string()), + kPermissionNotifications)); +} + +TEST_F(SiteSettingsHandlerTest, + SetCategoryPermissionForPattern_SecondaryPattern) { + const std::string kOrigin = "https://www.example.com:443"; + const std::string kSecondary = "https://www.secondary.com:443"; + + base::Value::List set_args; + set_args.Append(kOrigin); // Primary pattern. + set_args.Append(kSecondary); // Secondary pattern. + set_args.Append(site_settings::ContentSettingsTypeToGroupName( + ContentSettingsType::STORAGE_ACCESS)); + set_args.Append( + content_settings::ContentSettingToString(CONTENT_SETTING_BLOCK)); + set_args.Append(false); // Incognito. + + handler()->HandleSetCategoryPermissionForPattern(set_args); + EXPECT_EQ(1U, web_ui()->call_data().size()); + + HostContentSettingsMap* map = + HostContentSettingsMapFactory::GetForProfile(profile()); + + ASSERT_EQ(CONTENT_SETTING_BLOCK, + map->GetContentSetting(GURL(kOrigin), GURL(kSecondary), + kPermissionStorageAccess)); +} + +TEST_F(SiteSettingsHandlerTest, SetCategoryPermissionForPattern_Incognito) { + const std::string kOrigin = "https://www.example.com:443"; + CreateIncognitoProfile(); + + HostContentSettingsMap* incognito_map = + HostContentSettingsMapFactory::GetForProfile(incognito_profile()); + HostContentSettingsMap* map = + HostContentSettingsMapFactory::GetForProfile(profile()); + + { + base::Value::List set_args; + set_args.Append(kOrigin); // Primary pattern. + set_args.Append(std::string()); // Secondary pattern. + set_args.Append(kNotifications); + set_args.Append( + content_settings::ContentSettingToString(CONTENT_SETTING_BLOCK)); + set_args.Append(true); // Incognito. + + handler()->HandleSetCategoryPermissionForPattern(set_args); + EXPECT_EQ(3U, web_ui()->call_data().size()); + + ASSERT_EQ(CONTENT_SETTING_BLOCK, incognito_map->GetContentSetting( + GURL(kOrigin), GURL(std::string()), + kPermissionNotifications)); + // Shouldn't change the setting for the normal profile. + ASSERT_EQ(CONTENT_SETTING_ASK, + map->GetContentSetting(GURL(kOrigin), GURL(std::string()), + kPermissionNotifications)); + } + + { + base::Value::List set_args; + set_args.Append(kOrigin); // Primary pattern. + set_args.Append(std::string()); // Secondary pattern. + set_args.Append(kNotifications); + set_args.Append( + content_settings::ContentSettingToString(CONTENT_SETTING_ALLOW)); + set_args.Append(false); // Incognito. + + handler()->HandleSetCategoryPermissionForPattern(set_args); + EXPECT_EQ(6U, web_ui()->call_data().size()); + + ASSERT_EQ(CONTENT_SETTING_ALLOW, + map->GetContentSetting(GURL(kOrigin), GURL(std::string()), + kPermissionNotifications)); + // Shouldn't change the setting for the incognito profile. + ASSERT_EQ(CONTENT_SETTING_BLOCK, incognito_map->GetContentSetting( + GURL(kOrigin), GURL(std::string()), + kPermissionNotifications)); + } + + DestroyIncognitoProfile(); +} + +TEST_F(SiteSettingsHandlerTest, + SetCategoryPermissionForPattern_ExceptionHelpers) { ContentSettingsPattern pattern = ContentSettingsPattern::FromString("[*.]google.com"); base::Value::Dict exception = site_settings::GetExceptionForPage( @@ -2315,6 +2432,20 @@ handler()->HandleSetCategoryPermissionForPattern(args); } +TEST_F(SiteSettingsHandlerTest, SetCategoryPermissionForPattern_SessionOnly) { + const std::string kGoogleWithPort("https://www.google.com:443"); + base::Value::List set_args; + set_args.Append(kGoogleWithPort); // Primary pattern. + set_args.Append(std::string()); // Secondary pattern. + set_args.Append(kCookies); + set_args.Append( + content_settings::ContentSettingToString(CONTENT_SETTING_SESSION_ONLY)); + set_args.Append(false); // Incognito. + handler()->HandleSetCategoryPermissionForPattern(set_args); + + EXPECT_EQ(kNumberContentSettingListeners, web_ui()->call_data().size()); +} + TEST_F(SiteSettingsHandlerTest, ExtensionDisplayName) { // When the extension is loaded, displayName is the extension's name and id. auto extension = LoadExtension(kExtensionName); @@ -2884,20 +3015,6 @@ EXPECT_TRUE(url::IsSameOriginWith(origin, tab_url)); } -TEST_F(SiteSettingsHandlerTest, SessionOnlyException) { - const std::string google_with_port("https://www.google.com:443"); - base::Value::List set_args; - set_args.Append(google_with_port); // Primary pattern. - set_args.Append(std::string()); // Secondary pattern. - set_args.Append(kCookies); - set_args.Append( - content_settings::ContentSettingToString(CONTENT_SETTING_SESSION_ONLY)); - set_args.Append(false); // Incognito. - handler()->HandleSetCategoryPermissionForPattern(set_args); - - EXPECT_EQ(kNumberContentSettingListeners, web_ui()->call_data().size()); -} - TEST_F(SiteSettingsHandlerTest, BlockAutoplay_SendOnRequest) { base::Value::List args; handler()->HandleFetchBlockAutoplayStatus(args);
diff --git a/chrome/browser/ui/webui/side_panel/performance_controls/BUILD.gn b/chrome/browser/ui/webui/side_panel/performance_controls/BUILD.gn new file mode 100644 index 0000000..8803f59 --- /dev/null +++ b/chrome/browser/ui/webui/side_panel/performance_controls/BUILD.gn
@@ -0,0 +1,19 @@ +# 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("//mojo/public/tools/bindings/mojom.gni") + +assert(!is_android) + +mojom("mojo_bindings") { + sources = [ "performance.mojom" ] + webui_module_path = "/" + use_typescript_sources = true + public_deps = [ + "//chrome/browser/resource_coordinator:mojo_bindings", + "//mojo/public/mojom/base", + "//ui/base/mojom", + "//url/mojom:url_mojom_gurl", + ] +}
diff --git a/chrome/browser/ui/webui/side_panel/performance_controls/OWNERS b/chrome/browser/ui/webui/side_panel/performance_controls/OWNERS new file mode 100644 index 0000000..37fd8ae5 --- /dev/null +++ b/chrome/browser/ui/webui/side_panel/performance_controls/OWNERS
@@ -0,0 +1,4 @@ +file://chrome/browser/ui/performance_controls/OWNERS + +per-file *.mojom=set noparent +per-file *.mojom=file://ipc/SECURITY_OWNERS \ No newline at end of file
diff --git a/chrome/browser/ui/webui/side_panel/performance_controls/performance.mojom b/chrome/browser/ui/webui/side_panel/performance_controls/performance.mojom new file mode 100644 index 0000000..561c8db4 --- /dev/null +++ b/chrome/browser/ui/webui/side_panel/performance_controls/performance.mojom
@@ -0,0 +1,26 @@ +// 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. + +module side_panel.mojom; + +import "mojo/public/mojom/base/time.mojom"; +import "url/mojom/url.mojom"; + +// Factory to create the performance page handler. +interface PerformancePageHandlerFactory { + // The WebUI calls this method when the page is first initialized. + CreatePerformancePageHandler( + pending_remote<PerformancePage> page, + pending_receiver<PerformancePageHandler> handler); +}; + +// Browser-side handler for requests from WebUI page. +interface PerformancePageHandler { + +}; + +// WebUI-side handler for requests from the browser. +interface PerformancePage { + +}; \ No newline at end of file
diff --git a/chrome/browser/ui/webui/side_panel/performance_controls/performance_page_handler.cc b/chrome/browser/ui/webui/side_panel/performance_controls/performance_page_handler.cc new file mode 100644 index 0000000..25ff7cd --- /dev/null +++ b/chrome/browser/ui/webui/side_panel/performance_controls/performance_page_handler.cc
@@ -0,0 +1,17 @@ +// 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/ui/webui/side_panel/performance_controls/performance_page_handler.h" + +#include "chrome/browser/ui/webui/side_panel/performance_controls/performance_side_panel_ui.h" + +PerformancePageHandler::PerformancePageHandler( + mojo::PendingReceiver<side_panel::mojom::PerformancePageHandler> receiver, + mojo::PendingRemote<side_panel::mojom::PerformancePage> page, + PerformanceSidePanelUI* performance_ui) + : receiver_(this, std::move(receiver)), + page_(std::move(page)), + performance_ui_(performance_ui) {} + +PerformancePageHandler::~PerformancePageHandler() = default;
diff --git a/chrome/browser/ui/webui/side_panel/performance_controls/performance_page_handler.h b/chrome/browser/ui/webui/side_panel/performance_controls/performance_page_handler.h new file mode 100644 index 0000000..172a231 --- /dev/null +++ b/chrome/browser/ui/webui/side_panel/performance_controls/performance_page_handler.h
@@ -0,0 +1,33 @@ +// 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_UI_WEBUI_SIDE_PANEL_PERFORMANCE_CONTROLS_PERFORMANCE_PAGE_HANDLER_H_ +#define CHROME_BROWSER_UI_WEBUI_SIDE_PANEL_PERFORMANCE_CONTROLS_PERFORMANCE_PAGE_HANDLER_H_ + +#include "base/memory/raw_ptr.h" +#include "chrome/browser/ui/webui/side_panel/performance_controls/performance.mojom.h" +#include "mojo/public/cpp/bindings/pending_receiver.h" +#include "mojo/public/cpp/bindings/receiver.h" +#include "mojo/public/cpp/bindings/remote.h" + +class PerformanceSidePanelUI; + +class PerformancePageHandler + : public side_panel::mojom::PerformancePageHandler { + public: + explicit PerformancePageHandler( + mojo::PendingReceiver<side_panel::mojom::PerformancePageHandler> receiver, + mojo::PendingRemote<side_panel::mojom::PerformancePage> page, + PerformanceSidePanelUI* performance_ui); + PerformancePageHandler(const PerformancePageHandler&) = delete; + PerformancePageHandler& operator=(const PerformancePageHandler&) = delete; + ~PerformancePageHandler() override; + + private: + mojo::Receiver<side_panel::mojom::PerformancePageHandler> receiver_; + mojo::Remote<side_panel::mojom::PerformancePage> page_; + raw_ptr<PerformanceSidePanelUI> performance_ui_ = nullptr; +}; + +#endif // CHROME_BROWSER_UI_WEBUI_SIDE_PANEL_PERFORMANCE_CONTROLS_PERFORMANCE_PAGE_HANDLER_H_
diff --git a/chrome/browser/ui/webui/side_panel/performance_controls/performance_side_panel_ui.cc b/chrome/browser/ui/webui/side_panel/performance_controls/performance_side_panel_ui.cc new file mode 100644 index 0000000..c34303d --- /dev/null +++ b/chrome/browser/ui/webui/side_panel/performance_controls/performance_side_panel_ui.cc
@@ -0,0 +1,60 @@ +// 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/ui/webui/side_panel/performance_controls/performance_side_panel_ui.h" + +#include <string> +#include <utility> + +#include "chrome/browser/browser_process.h" +#include "chrome/browser/profiles/profile.h" +#include "chrome/browser/ui/webui/side_panel/performance_controls/performance_page_handler.h" +#include "chrome/browser/ui/webui/webui_util.h" +#include "chrome/common/webui_url_constants.h" +#include "chrome/grit/generated_resources.h" +#include "chrome/grit/side_panel_performance_resources.h" +#include "chrome/grit/side_panel_performance_resources_map.h" +#include "chrome/grit/side_panel_shared_resources.h" +#include "chrome/grit/side_panel_shared_resources_map.h" +#include "components/strings/grit/components_strings.h" +#include "content/public/browser/web_contents.h" +#include "content/public/browser/web_ui.h" +#include "content/public/browser/web_ui_data_source.h" + +PerformanceSidePanelUI::PerformanceSidePanelUI(content::WebUI* web_ui) + : ui::MojoBubbleWebUIController(web_ui, true) { + Profile* const profile = Profile::FromWebUI(web_ui); + content::WebUIDataSource* source = content::WebUIDataSource::CreateAndAdd( + profile, chrome::kChromeUIPerformanceSidePanelHost); + static constexpr webui::LocalizedString kLocalizedStrings[] = {}; + for (const auto& str : kLocalizedStrings) { + webui::AddLocalizedString(source, str.name, str.id); + } + + webui::SetupWebUIDataSource( + source, + base::make_span(kSidePanelPerformanceResources, + kSidePanelPerformanceResourcesSize), + IDR_SIDE_PANEL_PERFORMANCE_PERFORMANCE_HTML); + source->AddResourcePaths(base::make_span(kSidePanelSharedResources, + kSidePanelSharedResourcesSize)); +} + +PerformanceSidePanelUI::~PerformanceSidePanelUI() = default; + +WEB_UI_CONTROLLER_TYPE_IMPL(PerformanceSidePanelUI) + +void PerformanceSidePanelUI::BindInterface( + mojo::PendingReceiver<side_panel::mojom::PerformancePageHandlerFactory> + receiver) { + performance_page_factory_receiver_.reset(); + performance_page_factory_receiver_.Bind(std::move(receiver)); +} + +void PerformanceSidePanelUI::CreatePerformancePageHandler( + mojo::PendingRemote<side_panel::mojom::PerformancePage> page, + mojo::PendingReceiver<side_panel::mojom::PerformancePageHandler> receiver) { + performance_page_handler_ = std::make_unique<PerformancePageHandler>( + std::move(receiver), std::move(page), this); +}
diff --git a/chrome/browser/ui/webui/side_panel/performance_controls/performance_side_panel_ui.h b/chrome/browser/ui/webui/side_panel/performance_controls/performance_side_panel_ui.h new file mode 100644 index 0000000..7a98f64 --- /dev/null +++ b/chrome/browser/ui/webui/side_panel/performance_controls/performance_side_panel_ui.h
@@ -0,0 +1,47 @@ +// 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_UI_WEBUI_SIDE_PANEL_PERFORMANCE_CONTROLS_PERFORMANCE_SIDE_PANEL_UI_H_ +#define CHROME_BROWSER_UI_WEBUI_SIDE_PANEL_PERFORMANCE_CONTROLS_PERFORMANCE_SIDE_PANEL_UI_H_ + +#include <memory> + +#include "chrome/browser/ui/webui/side_panel/performance_controls/performance.mojom.h" +#include "mojo/public/cpp/bindings/pending_receiver.h" +#include "mojo/public/cpp/bindings/pending_remote.h" +#include "mojo/public/cpp/bindings/receiver.h" +#include "ui/webui/mojo_bubble_web_ui_controller.h" + +class PerformancePageHandler; + +class PerformanceSidePanelUI + : public ui::MojoBubbleWebUIController, + side_panel::mojom::PerformancePageHandlerFactory { + public: + explicit PerformanceSidePanelUI(content::WebUI* web_ui); + PerformanceSidePanelUI(const PerformanceSidePanelUI&) = delete; + PerformanceSidePanelUI& operator=(const PerformanceSidePanelUI&) = delete; + ~PerformanceSidePanelUI() override; + + // Instantiates the implementor of the mojom::PageHandlerFactory mojo + // interface passing the pending receiver that will be internally bound. + void BindInterface( + mojo::PendingReceiver<side_panel::mojom::PerformancePageHandlerFactory> + receiver); + + private: + // side_panel::mojom::PerformancePageHandlerFactory: + void CreatePerformancePageHandler( + mojo::PendingRemote<side_panel::mojom::PerformancePage> page, + mojo::PendingReceiver<side_panel::mojom::PerformancePageHandler> receiver) + override; + + std::unique_ptr<PerformancePageHandler> performance_page_handler_; + mojo::Receiver<side_panel::mojom::PerformancePageHandlerFactory> + performance_page_factory_receiver_{this}; + + WEB_UI_CONTROLLER_TYPE_DECL(); +}; + +#endif // CHROME_BROWSER_UI_WEBUI_SIDE_PANEL_PERFORMANCE_CONTROLS_PERFORMANCE_SIDE_PANEL_UI_H_
diff --git a/chrome/build/android-arm32.pgo.txt b/chrome/build/android-arm32.pgo.txt index abbe6c6..3d8c09a 100644 --- a/chrome/build/android-arm32.pgo.txt +++ b/chrome/build/android-arm32.pgo.txt
@@ -1 +1 @@ -chrome-android32-main-1695297564-e6fa67feacc3166f96301f47bccf73447ea397bd.profdata +chrome-android32-main-1695319076-5d3f8d7ac77e21798fac3487913d63f6fd6b529b.profdata
diff --git a/chrome/build/android-arm64.pgo.txt b/chrome/build/android-arm64.pgo.txt index 22d4e36..69e1327 100644 --- a/chrome/build/android-arm64.pgo.txt +++ b/chrome/build/android-arm64.pgo.txt
@@ -1 +1 @@ -chrome-android64-main-1695297564-faa12249dac68624c75034fc362be49589418041.profdata +chrome-android64-main-1695319076-de4c264f01e1377964ff7e580752db38fe9a0e06.profdata
diff --git a/chrome/build/linux.pgo.txt b/chrome/build/linux.pgo.txt index 9970d07..704f4966 100644 --- a/chrome/build/linux.pgo.txt +++ b/chrome/build/linux.pgo.txt
@@ -1 +1 @@ -chrome-linux-main-1695297564-9a836511b21a58074a6b5d4bbbea32354a8a6f1d.profdata +chrome-linux-main-1695319076-d8f8e6c6046b6a1dc4238dc127055e2910843597.profdata
diff --git a/chrome/build/mac-arm.pgo.txt b/chrome/build/mac-arm.pgo.txt index fe39724..22b66aa 100644 --- a/chrome/build/mac-arm.pgo.txt +++ b/chrome/build/mac-arm.pgo.txt
@@ -1 +1 @@ -chrome-mac-arm-main-1695304792-f38fa17a284387ebfe724ab081c0a94019bb18c5.profdata +chrome-mac-arm-main-1695326084-a580b7e078421699673b751b3e36830b03b1d774.profdata
diff --git a/chrome/build/mac.pgo.txt b/chrome/build/mac.pgo.txt index e5a8455..c7c35aa1 100644 --- a/chrome/build/mac.pgo.txt +++ b/chrome/build/mac.pgo.txt
@@ -1 +1 @@ -chrome-mac-main-1695297564-022e98705c44c1c0049586f589a4475e22505645.profdata +chrome-mac-main-1695319076-51aef2ea66d0b9391d07d97b21c0b8b731cfbe55.profdata
diff --git a/chrome/build/win-arm64.pgo.txt b/chrome/build/win-arm64.pgo.txt index 25e1457dd..784eebac 100644 --- a/chrome/build/win-arm64.pgo.txt +++ b/chrome/build/win-arm64.pgo.txt
@@ -1 +1 @@ -chrome-win-arm64-main-1695297564-a0cb2a94a0e57e8df88e31df2c3927307fd986d6.profdata +chrome-win-arm64-main-1695319076-d71160d36b8938cbdc81964e5309ae0f9117b75b.profdata
diff --git a/chrome/build/win32.pgo.txt b/chrome/build/win32.pgo.txt index 4ed94ecb..087a7d2 100644 --- a/chrome/build/win32.pgo.txt +++ b/chrome/build/win32.pgo.txt
@@ -1 +1 @@ -chrome-win32-main-1695275888-1b63406aa5c6db5c41b58ee0c476ba880c5ab341.profdata +chrome-win32-main-1695308290-8aa35072182870460404b75888f0609e31076dc1.profdata
diff --git a/chrome/build/win64.pgo.txt b/chrome/build/win64.pgo.txt index 83a456b5..eb38f501 100644 --- a/chrome/build/win64.pgo.txt +++ b/chrome/build/win64.pgo.txt
@@ -1 +1 @@ -chrome-win64-main-1695297564-f873bf77d789634fc2d47210b792d0d1821a5d6e.profdata +chrome-win64-main-1695319076-a65313e19bfe1599c5dcedfa65c1f72a190b060e.profdata
diff --git a/chrome/chrome_paks.gni b/chrome/chrome_paks.gni index 884a61f..b9ad04e4 100644 --- a/chrome/chrome_paks.gni +++ b/chrome/chrome_paks.gni
@@ -178,6 +178,7 @@ "$root_gen_dir/chrome/side_panel_companion_resources.pak", "$root_gen_dir/chrome/side_panel_customize_chrome_resources.pak", "$root_gen_dir/chrome/side_panel_history_clusters_resources.pak", + "$root_gen_dir/chrome/side_panel_performance_resources.pak", "$root_gen_dir/chrome/side_panel_read_anything_resources.pak", "$root_gen_dir/chrome/side_panel_reading_list_resources.pak", "$root_gen_dir/chrome/side_panel_shared_resources.pak",
diff --git a/chrome/common/extensions/api/accessibility_private.json b/chrome/common/extensions/api/accessibility_private.json index 6daeb4c..5f2fb71 100644 --- a/chrome/common/extensions/api/accessibility_private.json +++ b/chrome/common/extensions/api/accessibility_private.json
@@ -665,6 +665,17 @@ ] }, { + "name": "clipboardCopyInActiveLacrosGoogleDoc", + "type": "function", + "description": "Called by the Select-to-Speak extension to request a clipboard copy in the active Lacros Google Docs tab for the copy-paste fallback.", + "parameters": [ { + "name": "url", + "type": "string", + "description": "URL of the Google Docs tab." + } + ] + }, + { "name": "handleScrollableBoundsForPointFound", "type": "function", "description": "Called by the Accessibility Common extension when onScrollableBoundsForPointRequested has found a scrolling container. |rect| will be the bounds of the nearest scrollable ancestor of the node at the point requested using onScrollableBoundsForPointRequested.",
diff --git a/chrome/common/extensions/api/accessibility_service_private.idl b/chrome/common/extensions/api/accessibility_service_private.idl index 26b616c..384116f 100644 --- a/chrome/common/extensions/api/accessibility_service_private.idl +++ b/chrome/common/extensions/api/accessibility_service_private.idl
@@ -19,4 +19,13 @@ [supportsPromises] static void speakSelectedText( optional VoidCallback callback); }; + + interface Events { + // Called when Select to Speak in ChromeOS wants a clipboard copy + // event to be performed on the active and focused tab with the + // given URL. This is fired when Select to Speak is trying to speak + // with search+s but cannot find a selection and the focused node + // is in a Google Docs page. + static void clipboardCopyInActiveGoogleDoc(DOMString url); + }; };
diff --git a/chrome/common/webui_url_constants.cc b/chrome/common/webui_url_constants.cc index 5285cc0..c1005a6a 100644 --- a/chrome/common/webui_url_constants.cc +++ b/chrome/common/webui_url_constants.cc
@@ -163,6 +163,10 @@ const char kChromeUIPasswordManagerSettingsURL[] = "chrome://password-manager/settings"; const char kChromeUIPerformanceSettingsURL[] = "chrome://settings/performance"; +const char kChromeUIPerformanceSidePanelHost[] = + "performance-side-panel.top-chrome"; +const char kChromeUIPerformanceSidePanelURL[] = + "chrome://performance-side-panel.top-chrome"; const char kChromeUIPolicyHost[] = "policy"; const char kChromeUIPolicyURL[] = "chrome://policy/"; const char kChromeUIPolicyTestURL[] = "chrome://policy/test"; @@ -627,6 +631,8 @@ const char kPrivacySandboxSubPagePath[] = "/privacySandbox"; const char kPerformanceSubPagePath[] = "/performance"; const char kPreloadingSubPagePath[] = "/preloading"; +const char kTrackingProtectionSubPagePath[] = "/trackingProtection"; +const char kCookiesSubPagePath[] = "/cookies"; #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
diff --git a/chrome/common/webui_url_constants.h b/chrome/common/webui_url_constants.h index 3c6d9d0..1101f68 100644 --- a/chrome/common/webui_url_constants.h +++ b/chrome/common/webui_url_constants.h
@@ -163,6 +163,8 @@ extern const char kChromeUIPasswordManagerCheckupURL[]; extern const char kChromeUIPasswordManagerSettingsURL[]; extern const char kChromeUIPerformanceSettingsURL[]; +extern const char kChromeUIPerformanceSidePanelHost[]; +extern const char kChromeUIPerformanceSidePanelURL[]; extern const char kChromeUIPolicyHost[]; extern const char kChromeUIPolicyURL[]; extern const char kChromeUIPolicyTestURL[]; @@ -555,6 +557,8 @@ extern const char kPrivacySandboxSubPagePath[]; extern const char kPerformanceSubPagePath[]; extern const char kPreloadingSubPagePath[]; +extern const char kTrackingProtectionSubPagePath[]; +extern const char kCookiesSubPagePath[]; #endif #if BUILDFLAG(IS_WIN)
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn index 210a7f3..2416b8f 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn
@@ -325,6 +325,7 @@ "//components/security_interstitials/content:security_interstitial_page", "//components/segmentation_platform/public:test_support", "//components/spellcheck/renderer", + "//components/tpcd/metadata", "//components/ukm:test_support", "//components/user_education/common", "//components/user_manager", @@ -656,8 +657,8 @@ if (is_chromeos) { sources += [ "../browser/app_mode/test/accelerator_helpers.cc", - "../browser/apps/app_service/metrics/website_metrics_browser_test_base.cc", - "../browser/apps/app_service/metrics/website_metrics_browser_test_base.h", + "../browser/apps/app_service/metrics/website_metrics_browser_test_mixin.cc", + "../browser/apps/app_service/metrics/website_metrics_browser_test_mixin.h", "../browser/certificate_provider/test_certificate_provider_extension.cc", "../browser/certificate_provider/test_certificate_provider_extension.h", "../browser/extensions/policy_test_utils.cc", @@ -1082,6 +1083,7 @@ "//components/page_load_metrics/browser/observers/ad_metrics:test_support", "//components/privacy_sandbox:privacy_sandbox", "//components/privacy_sandbox:privacy_sandbox_prefs", + "//components/privacy_sandbox:tracking_protection_onboarding", "//components/privacy_sandbox:tracking_protection_prefs", "//components/privacy_sandbox:tracking_protection_settings", "//components/safe_browsing/core/browser/db:v4_database", @@ -1689,6 +1691,7 @@ "//components/privacy_sandbox", "//components/privacy_sandbox:privacy_sandbox_prefs", "//components/privacy_sandbox:test_support", + "//components/privacy_sandbox:tracking_protection_onboarding", "//components/privacy_sandbox:tracking_protection_prefs", "//components/privacy_sandbox:tracking_protection_settings", "//components/privacy_sandbox/privacy_sandbox_attestations", @@ -2144,6 +2147,7 @@ "../browser/media/webrtc/region_capture_browsertest.cc", "../browser/media/webrtc/same_origin_observer_browsertest.cc", "../browser/media/webrtc/test_stats_dictionary_unittest.cc", + "../browser/tpcd/metadata/updater_service_browsertest.cc", # TODO(b/246519185) - Py3 incompatible, decide if to keep test. # "../browser/media/webrtc/webrtc_apprtc_browsertest.cc", @@ -5819,6 +5823,7 @@ sources = [ # All unittests in browser, common, renderer and service. "../browser/about_flags_unittest.cc", + "../browser/accessibility/media_app/ax_media_app_handler_unittest.cc", "../browser/active_use_util_unittest.cc", "../browser/after_startup_task_utils_unittest.cc", "../browser/apps/icon_standardizer_unittest.cc", @@ -6422,6 +6427,7 @@ "//chrome/browser:get_proxy_config_proto", "//chrome/browser:permissions_proto", "//chrome/browser:theme_properties", + "//chrome/browser/accessibility/media_app/test:test_support", "//chrome/browser/apps:icon_standardizer", "//chrome/browser/apps:user_type_filter", "//chrome/browser/autofill", @@ -8364,7 +8370,7 @@ "../browser/media/webrtc/chrome_screen_enumerator_lacros_unittest.cc", "../browser/metrics/lacros_metrics_provider_unittest.cc", "../browser/notifications/notification_platform_bridge_lacros_unittest.cc", - "../browser/performance_manager/policies/oom_score_policy_lacros_unittest.cc", + "../browser/performance_manager/policies/oom_score_policy_chromeos_unittest.cc", "../browser/policy/restricted_mgs_policy_provider_lacros_unittest.cc", "../browser/signin/signin_ui_delegate_impl_lacros_unittest.cc", "../browser/ui/media_router/cast_notification_controller_lacros_unittest.cc", @@ -10464,7 +10470,7 @@ if (include_js_tests) { deps += [ "//chrome/test/data/webui:interactive_ui_tests" ] } - if (include_js2gtest_tests && (is_chromeos_ash || enable_print_preview)) { + if (include_js2gtest_tests && is_chromeos_ash) { deps += [ "//chrome/test/data/webui:interactive_ui_tests_js_webui" ] } @@ -10584,6 +10590,7 @@ "../browser/ui/views/permissions/permission_indicators_interactive_uitest.cc", "../browser/ui/views/permissions/permission_metrics_ui_test.cc", "../browser/ui/views/sad_tab_view_interactive_uitest.cc", + "../browser/ui/views/side_panel/performance_controls/performance_side_panel_interactive_uitest.cc", "../browser/ui/views/side_panel/side_panel_interactive_uitest.cc", "../browser/ui/views/side_panel/user_note/user_notes_interactive_uitest.cc", "../browser/ui/views/side_search/side_search_browsertest.cc",
diff --git a/chrome/test/base/test_browser_window.cc b/chrome/test/base/test_browser_window.cc index 1ed1d48..dbe6173 100644 --- a/chrome/test/base/test_browser_window.cc +++ b/chrome/test/base/test_browser_window.cc
@@ -4,6 +4,7 @@ #include "chrome/test/base/test_browser_window.h" +#include "base/feature_list.h" #include "base/values.h" #include "build/build_config.h" #include "chrome/browser/sharing/sharing_dialog_data.h" @@ -349,6 +350,12 @@ iph_feature, user_education::FeaturePromoStatus::kContinued); } +bool TestBrowserWindow::CanShowFeaturePromo( + const base::Feature& iph_feature) const { + return feature_promo_controller_ && + feature_promo_controller_->CanShowPromo(iph_feature); +} + bool TestBrowserWindow::MaybeShowFeaturePromo( const base::Feature& iph_feature, user_education::FeaturePromoController::BubbleCloseCallback close_callback, @@ -391,6 +398,9 @@ void TestBrowserWindow::NotifyFeatureEngagementEvent(const char* event_name) {} +void TestBrowserWindow::NotifyPromoFeatureUsed( + const base::Feature& iph_feature) {} + user_education::FeaturePromoController* TestBrowserWindow::SetFeaturePromoController( std::unique_ptr<user_education::FeaturePromoController>
diff --git a/chrome/test/base/test_browser_window.h b/chrome/test/base/test_browser_window.h index 34b85f4..be9fb94d 100644 --- a/chrome/test/base/test_browser_window.h +++ b/chrome/test/base/test_browser_window.h
@@ -240,6 +240,7 @@ user_education::FeaturePromoController* GetFeaturePromoController() override; bool IsFeaturePromoActive(const base::Feature& iph_feature) const override; + bool CanShowFeaturePromo(const base::Feature& iph_feature) const override; bool MaybeShowFeaturePromo( const base::Feature& iph_feature, user_education::FeaturePromoController::BubbleCloseCallback @@ -264,6 +265,7 @@ user_education::FeaturePromoHandle CloseFeaturePromoAndContinue( const base::Feature& iph_feature) override; void NotifyFeatureEngagementEvent(const char* event_name) override; + void NotifyPromoFeatureUsed(const base::Feature& iph_feature) override; // Sets the controller returned by GetFeaturePromoController(). // Deletes the existing one, if any.
diff --git a/chrome/test/base/web_ui_mocha_browser_test.cc b/chrome/test/base/web_ui_mocha_browser_test.cc index 480633e..5881731 100644 --- a/chrome/test/base/web_ui_mocha_browser_test.cc +++ b/chrome/test/base/web_ui_mocha_browser_test.cc
@@ -84,6 +84,12 @@ // setup steps are needed. } +void WebUIMochaBrowserTest::SubstituteWebContents( + content::WebContents** out_new_contents) { + // Nothing to do here. Should be overridden by any subclasses if web contents + // should be substituted. +} + void WebUIMochaBrowserTest::RunTest(const std::string& file, const std::string& trigger, const bool& skip_test_loader) { @@ -110,6 +116,12 @@ FAIL() << "Navigation to '" << url.spec() << "' failed."; } + // Hook for subclasses that want to override the WebContents used for running + // the mocha test (e.g., for testing the WebContents of a constrained dialog + // and not the tab itself). + SubstituteWebContents(&web_contents); + ASSERT_TRUE(web_contents); + // Hook for subclasses that need access to the WebContents before the Mocha // test runs. OnWebContentsAvailable(web_contents);
diff --git a/chrome/test/base/web_ui_mocha_browser_test.h b/chrome/test/base/web_ui_mocha_browser_test.h index c12e8bf..c076c0c 100644 --- a/chrome/test/base/web_ui_mocha_browser_test.h +++ b/chrome/test/base/web_ui_mocha_browser_test.h
@@ -45,6 +45,10 @@ // involve the WebContents, before the Mocha test runs. virtual void OnWebContentsAvailable(content::WebContents* web_contents); + // Hook for subclasses that want to run the Mocha test on a different set of + // WebContents than the WebContents of the test tab. + virtual void SubstituteWebContents(content::WebContents** out_new_contents); + // InProcessBrowserTest overrides. void SetUpOnMainThread() override;
diff --git a/chrome/test/chromedriver/chrome_launcher.cc b/chrome/test/chromedriver/chrome_launcher.cc index e608ceb7..8d8744f2 100644 --- a/chrome/test/chromedriver/chrome_launcher.cc +++ b/chrome/test/chromedriver/chrome_launcher.cc
@@ -466,6 +466,17 @@ if (status.IsError()) return status; + if (command.HasSwitch("remote-debugging-port") && + PipeBuilder::PlatformIsSupported()) { + VLOG(logging::LOGGING_INFO) + << "ChromeDriver supports communication with Chrome via pipes. " + "This is more reliable and more secure."; + VLOG(logging::LOGGING_INFO) + << "Use the --remote-debugging-pipe Chrome switch " + "instead of the default --remote-debugging-port " + "to enable this communication mode."; + } + base::LaunchOptions options; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA)
diff --git a/chrome/test/data/webui/BUILD.gn b/chrome/test/data/webui/BUILD.gn index d7a7469..65e7573 100644 --- a/chrome/test/data/webui/BUILD.gn +++ b/chrome/test/data/webui/BUILD.gn
@@ -30,6 +30,7 @@ "access_code_cast/access_code_cast_browsertest.cc", "bookmarks/bookmarks_browsertest.cc", "chrome_timeticks_browsertest.cc", + "commander/commander_browsertest.cc", "commerce_internals/commerce_internals_browsertest.cc", "cr_components/cr_components_browsertest.cc", "cr_elements/cr_elements_browsertest.cc", @@ -189,19 +190,11 @@ } if (include_js2gtest_tests) { - if (is_chromeos_ash || enable_print_preview) { + if (is_chromeos_ash) { js2gtest("interactive_ui_tests_js_webui") { test_type = "webui" - sources = [] - - if (is_chromeos_ash) { - sources += [ "cr_focus_row_behavior_interactive_test.js" ] - } - - if (enable_print_preview) { - sources += [ "print_preview/print_preview_interactive_ui_tests.js" ] - } + sources = [ "cr_focus_row_behavior_interactive_test.js" ] gen_include_files = [ "polymer_browser_test_base.js", @@ -222,7 +215,6 @@ sources = [ "assertions.js", "async_gen.js", - "commander/commander_browsertest.js", "js2gtest_browsertest.js", ]
diff --git a/chrome/test/data/webui/commander/commander_browsertest.cc b/chrome/test/data/webui/commander/commander_browsertest.cc new file mode 100644 index 0000000..caed76d --- /dev/null +++ b/chrome/test/data/webui/commander/commander_browsertest.cc
@@ -0,0 +1,14 @@ +// 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/common/webui_url_constants.h" +#include "chrome/test/base/web_ui_mocha_browser_test.h" +#include "content/public/test/browser_test.h" + +using CommanderWebUIBrowserTest = WebUIMochaBrowserTest; + +IN_PROC_BROWSER_TEST_F(CommanderWebUIBrowserTest, All) { + set_test_loader_host(chrome::kChromeUICommanderHost); + RunTest("commander/commander_app_test.js", "mocha.run()"); +}
diff --git a/chrome/test/data/webui/commander/commander_browsertest.js b/chrome/test/data/webui/commander/commander_browsertest.js deleted file mode 100644 index b8edf17..0000000 --- a/chrome/test/data/webui/commander/commander_browsertest.js +++ /dev/null
@@ -1,18 +0,0 @@ -// Copyright 2020 The Chromium Authors -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -/** @fileoverview Test suite for the Commander WebUI interface. */ -GEN_INCLUDE(['//chrome/test/data/webui/polymer_browser_test_base.js']); -GEN('#include "content/public/test/browser_test.h"'); - -var CommanderWebUIBrowserTest = class extends PolymerTest { - /** @override */ - get browsePreload() { - return 'chrome://commander/test_loader.html?module=commander/commander_app_test.js'; - } -}; - -TEST_F('CommanderWebUIBrowserTest', 'All', function() { - mocha.run(); -});
diff --git a/chrome/test/data/webui/new_tab_page/lens_form_test.ts b/chrome/test/data/webui/new_tab_page/lens_form_test.ts index 99f6bf2..8b6c77d 100644 --- a/chrome/test/data/webui/new_tab_page/lens_form_test.ts +++ b/chrome/test/data/webui/new_tab_page/lens_form_test.ts
@@ -14,6 +14,10 @@ let urlFormSubmitted = false; let lastError: LensErrorType|null = null; let lastSubmit: LensSubmitType|null = null; + const loadingHandler = (e: Event) => { + const event = e as CustomEvent<LensSubmitType>; + lastSubmit = event.detail; + }; setup(() => { lensForm = document.createElement('ntp-lens-form'); @@ -32,10 +36,7 @@ lastError = event.detail; }); - lensForm.addEventListener('loading', (e: Event) => { - const event = e as CustomEvent<LensSubmitType>; - lastSubmit = event.detail; - }); + lensForm.addEventListener('loading', loadingHandler); }); teardown(() => { @@ -52,10 +53,17 @@ // Act. dispatchFileInputChange(file); - // Assert. - assertTrue(fileFormSubmitted); - assertEquals(null, lastError); - assertEquals(LensSubmitType.FILE, lastSubmit); + await new Promise<void>((resolve) => { + lensForm.addEventListener('loading', (e: Event) => { + loadingHandler(e); + resolve(); + }); + }).then((_) => { + // Assert. + assertTrue(fileFormSubmitted); + assertEquals(null, lastError); + assertEquals(LensSubmitType.FILE, lastSubmit); + }); }); test( @@ -112,10 +120,17 @@ // Act. dispatchFileInputChange(file); - // Assert. - const action = new URL(lensForm.$.fileForm.action); - const ep = action.searchParams.get('ep'); - assertEquals('cntpubb', ep); + await new Promise<void>((resolve) => { + lensForm.addEventListener('loading', (e: Event) => { + loadingHandler(e); + resolve(); + }); + }).then((_) => { + // Assert. + const action = new URL(lensForm.$.fileForm.action); + const ep = action.searchParams.get('ep'); + assertEquals('cntpubb', ep); + }); }); test('submit file should set rendering environment parameter', async () => { @@ -125,10 +140,17 @@ // Act. dispatchFileInputChange(file); - // Assert. - const action = new URL(lensForm.$.fileForm.action); - const re = action.searchParams.get('re'); - assertEquals('df', re); + await new Promise<void>((resolve) => { + lensForm.addEventListener('loading', (e: Event) => { + loadingHandler(e); + resolve(); + }); + }).then((_) => { + // Assert. + const action = new URL(lensForm.$.fileForm.action); + const re = action.searchParams.get('re'); + assertEquals('df', re); + }); }); test('submit file should set surface parameter', async () => { @@ -138,10 +160,17 @@ // Act. dispatchFileInputChange(file); - // Assert. - const action = new URL(lensForm.$.fileForm.action); - const s = action.searchParams.get('s'); - assertEquals('4', s); + await new Promise<void>((resolve) => { + lensForm.addEventListener('loading', (e: Event) => { + loadingHandler(e); + resolve(); + }); + }).then((_) => { + // Assert. + const action = new URL(lensForm.$.fileForm.action); + const s = action.searchParams.get('s'); + assertEquals('4', s); + }); }); test('submit file should set language parameter', async () => { @@ -151,10 +180,17 @@ // Act. dispatchFileInputChange(file); - // Assert. - const action = new URL(lensForm.$.fileForm.action); - const hl = action.searchParams.get('hl'); - assertEquals('en-US', hl); + await new Promise<void>((resolve) => { + lensForm.addEventListener('loading', (e: Event) => { + loadingHandler(e); + resolve(); + }); + }).then((_) => { + // Assert. + const action = new URL(lensForm.$.fileForm.action); + const hl = action.searchParams.get('hl'); + assertEquals('en-US', hl); + }); }); test('submit file should set start time parameter', async () => { @@ -165,10 +201,17 @@ // Act. dispatchFileInputChange(file); - // Assert. - const action = new URL(lensForm.$.fileForm.action); - const st = action.searchParams.get('st'); - assertEquals('1001', st); + await new Promise<void>((resolve) => { + lensForm.addEventListener('loading', (e: Event) => { + loadingHandler(e); + resolve(); + }); + }).then((_) => { + // Assert. + const action = new URL(lensForm.$.fileForm.action); + const st = action.searchParams.get('st'); + assertEquals('1001', st); + }); }); test( @@ -180,10 +223,17 @@ // Act. dispatchFileInputChange(file); - // Assert. - const action = new URL(lensForm.$.fileForm.action); - const cd = action.searchParams.get('cd'); - assertGT(cd?.length ?? 0, 0); + await new Promise<void>((resolve) => { + lensForm.addEventListener('loading', (e: Event) => { + loadingHandler(e); + resolve(); + }); + }).then((_) => { + // Assert. + const action = new URL(lensForm.$.fileForm.action); + const cd = action.searchParams.get('cd'); + assertGT(cd?.length ?? 0, 0); + }); });
diff --git a/chrome/test/data/webui/print_preview/button_strip_interactive_test.ts b/chrome/test/data/webui/print_preview/button_strip_interactive_test.ts index e02b6f8..0a273789 100644 --- a/chrome/test/data/webui/print_preview/button_strip_interactive_test.ts +++ b/chrome/test/data/webui/print_preview/button_strip_interactive_test.ts
@@ -6,17 +6,7 @@ import {assert} from 'chrome://resources/js/assert_ts.js'; import {eventToPromise} from 'chrome://webui-test/test_util.js'; -const button_strip_interactive_test = { - suiteName: 'ButtonStripInteractiveTest', - TestNames: { - FocusPrintOnReady: 'focus print on ready', - }, -}; - -Object.assign( - window, {button_strip_interactive_test: button_strip_interactive_test}); - -suite(button_strip_interactive_test.suiteName, function() { +suite('ButtonStripInteractiveTest', function() { let buttonStrip: PrintPreviewButtonStripElement; setup(function() { @@ -35,7 +25,7 @@ // Tests that the print button is automatically focused when the destination // is ready. - test(button_strip_interactive_test.TestNames.FocusPrintOnReady, function() { + test('focus print on ready', function() { const printButton = buttonStrip.shadowRoot!.querySelector('.action-button'); assert(printButton); const whenFocusDone = eventToPromise('focus', printButton);
diff --git a/chrome/test/data/webui/print_preview/destination_dialog_cros_interactive_test.ts b/chrome/test/data/webui/print_preview/destination_dialog_cros_interactive_test.ts index 490b5b78..e873a59 100644 --- a/chrome/test/data/webui/print_preview/destination_dialog_cros_interactive_test.ts +++ b/chrome/test/data/webui/print_preview/destination_dialog_cros_interactive_test.ts
@@ -12,20 +12,7 @@ import {NativeLayerStub} from './native_layer_stub.js'; import {setupTestListenerElement} from './print_preview_test_utils.js'; -const destination_dialog_cros_interactive_test = { - suiteName: 'DestinationDialogCrosInteractiveTest', - TestNames: { - FocusSearchBox: 'focus search box', - EscapeSearchBox: 'escape search box', - }, -}; - -Object.assign(window, { - destination_dialog_cros_interactive_test: - destination_dialog_cros_interactive_test, -}); - -suite(destination_dialog_cros_interactive_test.suiteName, function() { +suite('DestinationDialogInteractiveTest', function() { let dialog: PrintPreviewDestinationDialogCrosElement; let nativeLayer: NativeLayerStub; @@ -79,22 +66,19 @@ // Tests that the search input text field is automatically focused when the // dialog is shown and there are destinations available. - test( - destination_dialog_cros_interactive_test.TestNames.FocusSearchBox, - function() { - const searchInput = dialog.$.searchBox.getSearchInput(); - assertTrue(!!searchInput); - const whenFocusDone = eventToPromise('focus', searchInput); - dialog.destinationStore.startLoadAllDestinations(); - dialog.show(); - return whenFocusDone; - }); + test('FocusSearchBox', function() { + const searchInput = dialog.$.searchBox.getSearchInput(); + assertTrue(!!searchInput); + const whenFocusDone = eventToPromise('focus', searchInput); + dialog.destinationStore.startLoadAllDestinations(); + dialog.show(); + return whenFocusDone; + }); // Tests that pressing the escape key while the search box is focused // closes the dialog if and only if the query is empty. test( - destination_dialog_cros_interactive_test.TestNames.EscapeSearchBox, - function() { + 'EscapeSearchBox', function() { const searchBox = dialog.$.searchBox; const searchInput = searchBox.getSearchInput(); assertTrue(!!searchInput);
diff --git a/chrome/test/data/webui/print_preview/destination_dialog_interactive_test.ts b/chrome/test/data/webui/print_preview/destination_dialog_interactive_test.ts index b8cad40c..c104938 100644 --- a/chrome/test/data/webui/print_preview/destination_dialog_interactive_test.ts +++ b/chrome/test/data/webui/print_preview/destination_dialog_interactive_test.ts
@@ -3,45 +3,20 @@ // found in the LICENSE file. import { - // <if expr="is_chromeos"> - DESTINATION_DIALOG_CROS_LOADING_TIMER_IN_MS, - // </if> NativeLayerImpl, PrintPreviewDestinationDialogElement, State} from 'chrome://print/print_preview.js'; import {keyDownOn} from 'chrome://resources/polymer/v3_0/iron-test-helpers/mock-interactions.js'; import {assertEquals, assertFalse, assertTrue} from 'chrome://webui-test/chai_assert.js'; -// <if expr="is_chromeos"> -import {MockTimer} from 'chrome://webui-test/mock_timer.js'; -// </if> import {fakeDataBind} from 'chrome://webui-test/polymer_test_util.js'; import {eventToPromise} from 'chrome://webui-test/test_util.js'; -// <if expr="is_chromeos"> -import {setNativeLayerCrosInstance} from './native_layer_cros_stub.js'; -// </if> import {NativeLayerStub} from './native_layer_stub.js'; import {setupTestListenerElement} from './print_preview_test_utils.js'; -const destination_dialog_interactive_test = { - suiteName: 'DestinationDialogInteractiveTest', - TestNames: { - FocusSearchBox: 'focus search box', - EscapeSearchBox: 'escape search box', - }, -}; - -Object.assign( - window, - {destination_dialog_interactive_test: destination_dialog_interactive_test}); - -suite(destination_dialog_interactive_test.suiteName, function() { +suite('DestinationDialogInteractiveTest', function() { let dialog: PrintPreviewDestinationDialogElement; let nativeLayer: NativeLayerStub; - // <if expr="is_chromeos"> - let mockTimer: MockTimer; - // </if> - suiteSetup(function() { setupTestListenerElement(); }); @@ -65,12 +40,6 @@ fakeDataBind(model, destinationSettings, 'settings'); document.body.appendChild(destinationSettings); - // <if expr="is_chromeos"> - setNativeLayerCrosInstance(); - mockTimer = new MockTimer(); - mockTimer.install(); - // </if> - // Initialize destinationSettings.init( 'FooDevice' /* printerName */, false /* pdfPrinterDisabled */, @@ -82,41 +51,27 @@ }); }); - // <if expr="is_chromeos"> - teardown(function() { - mockTimer.uninstall(); - }); - // </if> - // Tests that the search input text field is automatically focused when the // dialog is shown. - test( - destination_dialog_interactive_test.TestNames.FocusSearchBox, function() { - const searchInput = dialog.$.searchBox.getSearchInput(); - assertTrue(!!searchInput); - const whenFocusDone = eventToPromise('focus', searchInput); - dialog.destinationStore.startLoadAllDestinations(); - dialog.show(); - // <if expr="is_chromeos"> - mockTimer.tick(DESTINATION_DIALOG_CROS_LOADING_TIMER_IN_MS); - // </if> - return whenFocusDone; - }); + test('FocusSearchBox', function() { + const searchInput = dialog.$.searchBox.getSearchInput(); + assertTrue(!!searchInput); + const whenFocusDone = eventToPromise('focus', searchInput); + dialog.destinationStore.startLoadAllDestinations(); + dialog.show(); + return whenFocusDone; + }); // Tests that pressing the escape key while the search box is focused // closes the dialog if and only if the query is empty. test( - destination_dialog_interactive_test.TestNames.EscapeSearchBox, - function() { + 'EscapeSearchBox', function() { const searchBox = dialog.$.searchBox; const searchInput = searchBox.getSearchInput(); assertTrue(!!searchInput); const whenFocusDone = eventToPromise('focus', searchInput); dialog.destinationStore.startLoadAllDestinations(); dialog.show(); - // <if expr="is_chromeos"> - mockTimer.tick(DESTINATION_DIALOG_CROS_LOADING_TIMER_IN_MS); - // </if> return whenFocusDone .then(() => { assertTrue(dialog.$.dialog.open);
diff --git a/chrome/test/data/webui/print_preview/number_settings_section_interactive_test.ts b/chrome/test/data/webui/print_preview/number_settings_section_interactive_test.ts index 0507f17b..f48ce37 100644 --- a/chrome/test/data/webui/print_preview/number_settings_section_interactive_test.ts +++ b/chrome/test/data/webui/print_preview/number_settings_section_interactive_test.ts
@@ -10,19 +10,7 @@ import {triggerInputEvent} from './print_preview_test_utils.js'; -const number_settings_section_interactive_test = { - suiteName: 'NumberSettingsSectionInteractiveTest', - TestNames: { - BlurResetsEmptyInput: 'blur resets empty input', - }, -}; - -Object.assign(window, { - number_settings_section_interactive_test: - number_settings_section_interactive_test, -}); - -suite(number_settings_section_interactive_test.suiteName, function() { +suite('NumberSettingsSectionInteractiveTest', function() { let numberSettings: PrintPreviewNumberSettingsSectionElement; setup(function() { @@ -38,36 +26,34 @@ // Verifies that blurring the input will reset it to the default if it is // empty, but not if it contains an invalid value. - test( - number_settings_section_interactive_test.TestNames.BlurResetsEmptyInput, - async () => { - // Initial value is 10. - const crInput = numberSettings.getInput(); - const input = crInput.inputElement; - assertEquals('10', input.value); + test('blur resets empty input', async () => { + // Initial value is 10. + const crInput = numberSettings.getInput(); + const input = crInput.inputElement; + assertEquals('10', input.value); - // Set something invalid in the input. - input.focus(); - await triggerInputEvent(input, '0', numberSettings); - assertEquals('0', input.value); - assertTrue(crInput.invalid); + // Set something invalid in the input. + input.focus(); + await triggerInputEvent(input, '0', numberSettings); + assertEquals('0', input.value); + assertTrue(crInput.invalid); - // Blurring the input does not clear it or clear the error if there - // is an explicit invalid value. - input.blur(); - assertEquals('0', input.value); - assertTrue(crInput.invalid); + // Blurring the input does not clear it or clear the error if there + // is an explicit invalid value. + input.blur(); + assertEquals('0', input.value); + assertTrue(crInput.invalid); - // Clear the input. - input.focus(); + // Clear the input. + input.focus(); - await triggerInputEvent(input, '', numberSettings); - assertEquals('', input.value); - assertFalse(crInput.invalid); + await triggerInputEvent(input, '', numberSettings); + assertEquals('', input.value); + assertFalse(crInput.invalid); - // Blurring the input clears it to the default when it is empty. - input.blur(); - assertEquals('50', input.value); - assertFalse(crInput.invalid); - }); + // Blurring the input clears it to the default when it is empty. + input.blur(); + assertEquals('50', input.value); + assertFalse(crInput.invalid); + }); });
diff --git a/chrome/test/data/webui/print_preview/print_preview_focus_test.cc b/chrome/test/data/webui/print_preview/print_preview_focus_test.cc index 10b1a2d..4f89252a 100644 --- a/chrome/test/data/webui/print_preview/print_preview_focus_test.cc +++ b/chrome/test/data/webui/print_preview/print_preview_focus_test.cc
@@ -13,6 +13,31 @@ PrintPreviewFocusTest() { set_test_loader_host(chrome::kChromeUIPrintHost); } }; +// Web UI interactive tests are flaky on Win10, see https://crbug.com/711256 +#if BUILDFLAG(IS_WIN) +#define MAYBE_FocusPrintButtonOnReady DISABLED_FocusPrintButtonOnReady +#else +#define MAYBE_FocusPrintButtonOnReady FocusPrintButtonOnReady +#endif +IN_PROC_BROWSER_TEST_F(PrintPreviewFocusTest, MAYBE_FocusPrintButtonOnReady) { + RunTest("print_preview/button_strip_interactive_test.js", "mocha.run()"); +} + +IN_PROC_BROWSER_TEST_F(PrintPreviewFocusTest, BlurResetsEmptyNumberInput) { + RunTest("print_preview/number_settings_section_interactive_test.js", + "mocha.run()"); +} + +// Web UI interactive tests are flaky on Win10, see https://crbug.com/711256 +#if BUILDFLAG(IS_WIN) +#define MAYBE_AutoFocusScalingInput DISABLED_AutoFocusScalingInput +#else +#define MAYBE_AutoFocusScalingInput AutoFocusScalingInput +#endif +IN_PROC_BROWSER_TEST_F(PrintPreviewFocusTest, MAYBE_AutoFocusScalingInput) { + RunTest("print_preview/scaling_settings_interactive_test.js", "mocha.run()"); +} + class PrintPreviewPagesSettingsFocusTest : public PrintPreviewFocusTest { protected: void RunTestCase(const std::string& testCase) { @@ -54,3 +79,27 @@ RunTestCase("ClickCloses"); } #endif + +class PrintPreviewDestinationDialogFocusTest : public PrintPreviewFocusTest { + protected: + void RunTestCase(const std::string& testCase) { + PrintPreviewFocusTest::RunTest( +#if BUILDFLAG(IS_CHROMEOS) + "print_preview/destination_dialog_cros_interactive_test.js", +#else + "print_preview/destination_dialog_interactive_test.js", +#endif + base::StringPrintf( + "runMochaTest('DestinationDialogInteractiveTest', '%s');", + testCase.c_str())); + } +}; + +IN_PROC_BROWSER_TEST_F(PrintPreviewDestinationDialogFocusTest, FocusSearchBox) { + RunTestCase("FocusSearchBox"); +} + +IN_PROC_BROWSER_TEST_F(PrintPreviewDestinationDialogFocusTest, + EscapeSearchBox) { + RunTestCase("EscapeSearchBox"); +}
diff --git a/chrome/test/data/webui/print_preview/print_preview_interactive_ui_tests.js b/chrome/test/data/webui/print_preview/print_preview_interactive_ui_tests.js deleted file mode 100644 index d11b5a8..0000000 --- a/chrome/test/data/webui/print_preview/print_preview_interactive_ui_tests.js +++ /dev/null
@@ -1,158 +0,0 @@ -// Copyright 2018 The Chromium Authors -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -/** @fileoverview Runs the Polymer Print Preview interactive UI tests. */ - -// Polymer BrowserTest fixture. -GEN_INCLUDE(['//chrome/test/data/webui/polymer_interactive_ui_test.js']); - -GEN('#include "build/build_config.h"'); -GEN('#include "content/public/test/browser_test.h"'); - -const PrintPreviewInteractiveUITest = class extends PolymerInteractiveUITest { - /** @override */ - get browsePreload() { - throw new Error('this is abstract and should be overriden by subclasses'); - } - - // The name of the mocha suite. Should be overridden by subclasses. - get suiteName() { - return null; - } - - /** @param {string} testName The name of the test to run. */ - runMochaTest(testName) { - runMochaTest(this.suiteName, testName); - } -}; - -var PrintPreviewButtonStripInteractiveTest = - class extends PrintPreviewInteractiveUITest { - /** @override */ - get browsePreload() { - return 'chrome://print/test_loader.html?module=print_preview/button_strip_interactive_test.js'; - } - - /** @override */ - get suiteName() { - return button_strip_interactive_test.suiteName; - } -}; - -// Web UI interactive tests are flaky on Win10, see https://crbug.com/711256 -GEN('#if BUILDFLAG(IS_WIN)'); -GEN('#define MAYBE_FocusPrintOnReady DISABLED_FocusPrintOnReady'); -GEN('#else'); -GEN('#define MAYBE_FocusPrintOnReady FocusPrintOnReady'); -GEN('#endif'); -TEST_F( - 'PrintPreviewButtonStripInteractiveTest', 'MAYBE_FocusPrintOnReady', - function() { - this.runMochaTest( - button_strip_interactive_test.TestNames.FocusPrintOnReady); - }); - -GEN('#if !BUILDFLAG(IS_CHROMEOS)'); -var PrintPreviewDestinationDialogInteractiveTest = - class extends PrintPreviewInteractiveUITest { - /** @override */ - get browsePreload() { - return 'chrome://print/test_loader.html?module=print_preview/destination_dialog_interactive_test.js'; - } - - /** @override */ - get suiteName() { - return destination_dialog_interactive_test.suiteName; - } -}; - -TEST_F( - 'PrintPreviewDestinationDialogInteractiveTest', 'FocusSearchBox', - function() { - this.runMochaTest( - destination_dialog_interactive_test.TestNames.FocusSearchBox); - }); - -TEST_F( - 'PrintPreviewDestinationDialogInteractiveTest', 'EscapeSearchBox', - function() { - this.runMochaTest( - destination_dialog_interactive_test.TestNames.EscapeSearchBox); - }); -GEN('#else'); - -var PrintPreviewDestinationDialogCrosInteractiveTest = - class extends PrintPreviewInteractiveUITest { - /** @override */ - get browsePreload() { - return 'chrome://print/test_loader.html?module=print_preview/destination_dialog_cros_interactive_test.js'; - } - - /** @override */ - get suiteName() { - return destination_dialog_cros_interactive_test.suiteName; - } -}; - -TEST_F( - 'PrintPreviewDestinationDialogCrosInteractiveTest', 'FocusSearchBox', - function() { - this.runMochaTest( - destination_dialog_cros_interactive_test.TestNames.FocusSearchBox); - }); - -TEST_F( - 'PrintPreviewDestinationDialogCrosInteractiveTest', 'EscapeSearchBox', - function() { - this.runMochaTest( - destination_dialog_cros_interactive_test.TestNames.EscapeSearchBox); - }); -GEN('#endif'); - - -var PrintPreviewNumberSettingsSectionInteractiveTest = - class extends PrintPreviewInteractiveUITest { - /** @override */ - get browsePreload() { - return 'chrome://print/test_loader.html?module=print_preview/number_settings_section_interactive_test.js'; - } - - /** @override */ - get suiteName() { - return number_settings_section_interactive_test.suiteName; - } -}; - -TEST_F( - 'PrintPreviewNumberSettingsSectionInteractiveTest', 'BlurResetsEmptyInput', - function() { - this.runMochaTest(number_settings_section_interactive_test.TestNames - .BlurResetsEmptyInput); - }); - -var PrintPreviewScalingSettingsInteractiveTest = - class extends PrintPreviewInteractiveUITest { - /** @override */ - get browsePreload() { - return 'chrome://print/test_loader.html?module=print_preview/scaling_settings_interactive_test.js'; - } - - /** @override */ - get suiteName() { - return scaling_settings_interactive_test.suiteName; - } -}; - -// Web UI interactive tests are flaky on Win10, see https://crbug.com/711256 -GEN('#if BUILDFLAG(IS_WIN)'); -GEN('#define MAYBE_AutoFocusInput DISABLED_InputAutoFocus'); -GEN('#else'); -GEN('#define MAYBE_AutoFocusInput InputAutoFocus'); -GEN('#endif'); -TEST_F( - 'PrintPreviewScalingSettingsInteractiveTest', 'MAYBE_AutoFocusInput', - function() { - this.runMochaTest( - scaling_settings_interactive_test.TestNames.AutoFocusInput); - });
diff --git a/chrome/test/data/webui/print_preview/scaling_settings_interactive_test.ts b/chrome/test/data/webui/print_preview/scaling_settings_interactive_test.ts index e4b7cd8..76beddd 100644 --- a/chrome/test/data/webui/print_preview/scaling_settings_interactive_test.ts +++ b/chrome/test/data/webui/print_preview/scaling_settings_interactive_test.ts
@@ -10,18 +10,7 @@ import {selectOption} from './print_preview_test_utils.js'; -const scaling_settings_interactive_test = { - suiteName: 'ScalingSettingsInteractiveTest', - TestNames: { - AutoFocusInput: 'auto focus input', - }, -}; - -Object.assign( - window, - {scaling_settings_interactive_test: scaling_settings_interactive_test}); - -suite(scaling_settings_interactive_test.suiteName, function() { +suite('ScalingSettingsInteractiveTest', function() { let scalingSection: PrintPreviewScalingSettingsElement; let model: PrintPreviewModelElement; @@ -41,7 +30,7 @@ }); test( - scaling_settings_interactive_test.TestNames.AutoFocusInput, async () => { + 'auto focus input', async () => { const scalingInput = scalingSection.shadowRoot! .querySelector('print-preview-number-settings-section')!.$
diff --git a/chrome/test/data/webui/settings/chromeos/BUILD.gn b/chrome/test/data/webui/settings/chromeos/BUILD.gn index 830d09e..280125d 100644 --- a/chrome/test/data/webui/settings/chromeos/BUILD.gn +++ b/chrome/test/data/webui/settings/chromeos/BUILD.gn
@@ -258,7 +258,7 @@ "os_printing_page/os_printing_page_test.ts", "os_printing_page/printer_status_test.ts", "os_printing_page/printing_settings_card_test.ts", - "os_printing_page/test_cups_printers_browser_proxy.js", + "os_printing_page/test_cups_printers_browser_proxy.ts", "os_privacy_page/manage_users_subpage_test.ts", "os_privacy_page/os_privacy_page_test.ts",
diff --git a/chrome/test/data/webui/settings/chromeos/os_bluetooth_page/os_bluetooth_devices_subpage_test.ts b/chrome/test/data/webui/settings/chromeos/os_bluetooth_page/os_bluetooth_devices_subpage_test.ts index c74c9ba..6822bb5 100644 --- a/chrome/test/data/webui/settings/chromeos/os_bluetooth_page/os_bluetooth_devices_subpage_test.ts +++ b/chrome/test/data/webui/settings/chromeos/os_bluetooth_page/os_bluetooth_devices_subpage_test.ts
@@ -33,6 +33,7 @@ setup(() => { bluetoothConfig = new FakeBluetoothConfig(); setBluetoothConfigForTesting(bluetoothConfig); + loadTimeData.overrideValues({isCrossDeviceFeatureSuiteEnabled: true}); }); teardown(() => { @@ -63,7 +64,7 @@ function setFastPairPrefEnabled(enabled: boolean): void { bluetoothDevicesSubpage.prefs = { - 'ash': {'fast_pair': {'enabled': {value: enabled}}}, + ash: {fast_pair: {enabled: {value: enabled}}}, }; } @@ -78,7 +79,7 @@ test('Only show saved devices link row when flag is true', async () => { bluetoothConfig.setSystemState(BluetoothSystemState.kEnabled); - loadTimeData.overrideValues({'enableSavedDevicesFlag': true}); + loadTimeData.overrideValues({enableSavedDevicesFlag: true}); await init(); assertTrue(isVisible(bluetoothDevicesSubpage.shadowRoot!.querySelector( @@ -86,7 +87,7 @@ bluetoothDevicesSubpage.remove(); // Set flag to False and check that the row is not visible. - loadTimeData.overrideValues({'enableSavedDevicesFlag': false}); + loadTimeData.overrideValues({enableSavedDevicesFlag: false}); bluetoothDevicesSubpage = document.createElement('os-settings-bluetooth-devices-subpage'); document.body.appendChild(bluetoothDevicesSubpage); @@ -96,10 +97,24 @@ }); test( + 'Hide saved devices link row when Cross Device suite disabled', + async () => { + bluetoothConfig.setSystemState(BluetoothSystemState.kEnabled); + loadTimeData.overrideValues({ + isCrossDeviceFeatureSuiteEnabled: false, + enableSavedDevicesFlag: true, + }); + await init(); + + assertFalse(isVisible(bluetoothDevicesSubpage.shadowRoot!.querySelector( + '#savedDevicesRowLink'))); + }); + + test( 'Selecting saved devices row routes to saved devices subpage', async () => { bluetoothConfig.setSystemState(BluetoothSystemState.kEnabled); - loadTimeData.overrideValues({'enableSavedDevicesFlag': true}); + loadTimeData.overrideValues({enableSavedDevicesFlag: true}); await init(); const link =
diff --git a/chrome/test/data/webui/settings/chromeos/os_languages_page/language_settings_card_test.ts b/chrome/test/data/webui/settings/chromeos/os_languages_page/language_settings_card_test.ts index 9602a65..ab006444 100644 --- a/chrome/test/data/webui/settings/chromeos/os_languages_page/language_settings_card_test.ts +++ b/chrome/test/data/webui/settings/chromeos/os_languages_page/language_settings_card_test.ts
@@ -5,19 +5,18 @@ import 'chrome://os-settings/lazy_load.js'; import {LanguageSettingsCardElement} from 'chrome://os-settings/lazy_load.js'; -import {OsSettingsRoutes, Router, routes} from 'chrome://os-settings/os_settings.js'; +import {Route, Router, routes} from 'chrome://os-settings/os_settings.js'; import {loadTimeData} from 'chrome://resources/js/load_time_data.js'; import {flush} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; -import {assertEquals, assertTrue} from 'chrome://webui-test/chai_assert.js'; +import {assertEquals, assertFalse, assertTrue} from 'chrome://webui-test/chai_assert.js'; import {waitAfterNextRender} from 'chrome://webui-test/polymer_test_util.js'; import {eventToPromise, isVisible} from 'chrome://webui-test/test_util.js'; -interface SubpageTriggerData { - triggerSelector: string; - routeName: keyof OsSettingsRoutes; -} - suite('<language-settings-card>', () => { + const isRevampWayfindingEnabled = + loadTimeData.getBoolean('isRevampWayfindingEnabled'); + const defaultRoute = isRevampWayfindingEnabled ? routes.SYSTEM_PREFERENCES : + routes.OS_LANGUAGES; let languageSettingsCard: LanguageSettingsCardElement; function createLanguagesCard(): void { @@ -26,6 +25,28 @@ flush(); } + async function assertSubpageTriggerFocused( + triggerSelector: string, route: Route): Promise<void> { + const subpageTrigger = + languageSettingsCard.shadowRoot!.querySelector<HTMLElement>( + triggerSelector); + assertTrue(!!subpageTrigger); + + // Subpage trigger navigates to subpage for route + subpageTrigger.click(); + assertEquals(route, Router.getInstance().currentRoute); + + // Navigate back + const popStateEventPromise = eventToPromise('popstate', window); + Router.getInstance().navigateToPreviousRoute(); + await popStateEventPromise; + await waitAfterNextRender(languageSettingsCard); + + assertEquals( + subpageTrigger, languageSettingsCard.shadowRoot!.activeElement, + `${triggerSelector} should be focused.`); + } + setup(() => { loadTimeData.overrideValues({allowEmojiSuggestion: true}); }); @@ -43,52 +64,34 @@ assertTrue(isVisible(languagesRow)); }); - test('Input row is visible', () => { + test('Languages row is focused when returning from subpage', async () => { + Router.getInstance().navigateTo(defaultRoute); createLanguagesCard(); - const inputRow = - languageSettingsCard.shadowRoot!.querySelector<HTMLElement>( - '#inputRow'); - assertTrue(isVisible(inputRow)); + await assertSubpageTriggerFocused( + '#languagesRow', routes.OS_LANGUAGES_LANGUAGES); }); - const subpageTriggerData: SubpageTriggerData[] = [ - { - triggerSelector: '#languagesRow', - routeName: 'OS_LANGUAGES_LANGUAGES', - }, - { - triggerSelector: '#inputRow', - routeName: 'OS_LANGUAGES_INPUT', - }, - ]; - subpageTriggerData.forEach(({triggerSelector, routeName}) => { - test( - `Row for ${routeName} is focused when returning from subpage`, - async () => { - const languageSettingsCardRoute = languageSettingsCard.route; - assertTrue(!!languageSettingsCardRoute); - Router.getInstance().navigateTo(languageSettingsCardRoute); + if (isRevampWayfindingEnabled) { + test('Input row is not visible', () => { + createLanguagesCard(); + const inputRow = + languageSettingsCard.shadowRoot!.querySelector<HTMLElement>( + '#inputRow'); + assertFalse(isVisible(inputRow)); + }); + } else { + test('Input row is visible', () => { + createLanguagesCard(); + const inputRow = + languageSettingsCard.shadowRoot!.querySelector<HTMLElement>( + '#inputRow'); + assertTrue(isVisible(inputRow)); + }); - createLanguagesCard(); - - const subpageTrigger = - languageSettingsCard.shadowRoot!.querySelector<HTMLElement>( - triggerSelector); - assertTrue(!!subpageTrigger); - - // Sub-page trigger navigates to subpage for route - subpageTrigger.click(); - assertEquals(routes[routeName], Router.getInstance().currentRoute); - - // Navigate back - const popStateEventPromise = eventToPromise('popstate', window); - Router.getInstance().navigateToPreviousRoute(); - await popStateEventPromise; - await waitAfterNextRender(languageSettingsCard); - - assertEquals( - subpageTrigger, languageSettingsCard.shadowRoot!.activeElement, - `${triggerSelector} should be focused.`); - }); - }); + test('Input row is focused when returning from subpage', async () => { + Router.getInstance().navigateTo(defaultRoute); + createLanguagesCard(); + await assertSubpageTriggerFocused('#inputRow', routes.OS_LANGUAGES_INPUT); + }); + } });
diff --git a/chrome/test/data/webui/settings/chromeos/os_printing_page/test_cups_printers_browser_proxy.js b/chrome/test/data/webui/settings/chromeos/os_printing_page/test_cups_printers_browser_proxy.js deleted file mode 100644 index 70c63eb..0000000 --- a/chrome/test/data/webui/settings/chromeos/os_printing_page/test_cups_printers_browser_proxy.js +++ /dev/null
@@ -1,252 +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. - -import {PrinterSetupResult, PrintServerResult} from 'chrome://os-settings/lazy_load.js'; -import {TestBrowserProxy} from 'chrome://webui-test/test_browser_proxy.js'; - -/** - * @implements {CupsPrintersBrowserProxy} - */ -export class TestCupsPrintersBrowserProxy extends TestBrowserProxy { - constructor() { - super([ - 'addCupsPrinter', - 'addDiscoveredPrinter', - 'getCupsSavedPrintersList', - 'getCupsEnterprisePrintersList', - 'getCupsPrinterManufacturersList', - 'getCupsPrinterModelsList', - 'getPrinterInfo', - 'getPrinterPpdManufacturerAndModel', - 'queryPrintServer', - 'startDiscoveringPrinters', - 'stopDiscoveringPrinters', - 'cancelPrinterSetUp', - 'updateCupsPrinter', - 'removeCupsPrinter', - 'reconfigureCupsPrinter', - 'getEulaUrl', - 'requestPrinterStatusUpdate', - 'retrieveCupsPrinterPpd', - 'getCupsPrinterPpdPath', - 'openPrintManagementApp', - 'openScanningApp', - ]); - - this.printerList = /** @type{?CupsPrintersList} */ ({printerList: []}); - this.printServerPrinters = - /** @type{?CupsPrintersList} */ ({printerList: []}); - this.manufacturers = - /** @type{?ManufacturersInfo} */ ({success: false, manufacturers: []}); - this.models = - /** @type{?ModelsInfo} */ ({success: false, models: []}); - this.printerInfo = - /** @type{PrinterMakeModel} */ - ({ - makeAndModel: '', - autoconf: false, - ppdRefUserSuppliedPpdUrl: '', - ppdRefEffectiveMakeAndModel: '', - ppdReferenceResolved: false, - }); - this.printerPpdMakeModel = - /** @type{PrinterPpdMakeModel */ ({ppdManufacturer: '', ppdModel: ''}); - this.printerStatusMap = {}; - - /** - * |eulaUrl_| in conjunction with |setEulaUrl| mimics setting the EULA url - * for a printer. - * @private {string} - */ - this.eulaUrl_ = ''; - - /** - * If set, 'getPrinterInfo' will fail and the promise will be reject with - * this PrinterSetupResult. - * @private {PrinterSetupResult} - */ - this.getPrinterInfoResult_ = null; - - /** - * Contains the result code from querying a print server. - * @private {PrintServerResult} - */ - this.queryPrintServerResult_ = null; - - /** - * If set, 'addDiscoveredPrinter' will fail and the promise will be - * rejected with this printer. - * @private {CupsPrinterInfo} - */ - this.addDiscoveredFailedPrinter_ = null; - - this.printerPpdPath = ''; - } - - /** @override */ - addCupsPrinter(newPrinter) { - this.methodCalled('addCupsPrinter', newPrinter); - return Promise.resolve(PrinterSetupResult.SUCCESS); - } - - /** @override */ - addDiscoveredPrinter(printerId) { - this.methodCalled('addDiscoveredPrinter', printerId); - if (this.addDiscoveredFailedPrinter_ != null) { - return Promise.reject(this.addDiscoveredFailedPrinter_); - } - return Promise.resolve(PrinterSetupResult.SUCCESS); - } - - /** @override */ - getCupsSavedPrintersList() { - this.methodCalled('getCupsSavedPrintersList'); - return Promise.resolve(this.printerList); - } - - /** @override */ - getCupsEnterprisePrintersList() { - this.methodCalled('getCupsEnterprisePrintersList'); - return Promise.resolve(this.printerList); - } - - /** @override */ - getCupsPrinterManufacturersList() { - this.methodCalled('getCupsPrinterManufacturersList'); - return Promise.resolve(this.manufacturers); - } - - /** @override */ - getCupsPrinterModelsList(manufacturer) { - this.methodCalled('getCupsPrinterModelsList', manufacturer); - return Promise.resolve(this.models); - } - - /** @override */ - getPrinterInfo(newPrinter) { - this.methodCalled('getPrinterInfo', newPrinter); - if (this.getPrinterInfoResult_ != null) { - return Promise.reject(this.getPrinterInfoResult_); - } - return Promise.resolve(this.printerInfo); - } - - /** @override */ - startDiscoveringPrinters() { - this.methodCalled('startDiscoveringPrinters'); - } - - /** @override */ - stopDiscoveringPrinters() { - this.methodCalled('stopDiscoveringPrinters'); - } - - /** @override */ - cancelPrinterSetUp(newPrinter) { - this.methodCalled('cancelPrinterSetUp', newPrinter); - } - - /** @override */ - updateCupsPrinter(printerId, printerName) { - this.methodCalled('updateCupsPrinter', [printerId, printerName]); - return Promise.resolve(PrinterSetupResult.EDIT_SUCCESS); - } - - /** @override */ - removeCupsPrinter(printerId, printerName) { - this.methodCalled('removeCupsPrinter', [printerId, printerName]); - } - - /** @override */ - getPrinterPpdManufacturerAndModel(printerId) { - this.methodCalled('getPrinterPpdManufacturerAndModel', printerId); - return Promise.resolve(this.printerPpdMakeModel); - } - - /** @override */ - reconfigureCupsPrinter(printer) { - this.methodCalled('reconfigureCupsPrinter', printer); - return Promise.resolve(PrinterSetupResult.EDIT_SUCCESS); - } - - /** @override */ - getEulaUrl(ppdManufacturer, ppdModel) { - this.methodCalled('getEulaUrl', [ppdManufacturer, ppdModel]); - return Promise.resolve(this.eulaUrl_); - } - - /** @override */ - queryPrintServer(serverUrl) { - this.methodCalled('queryPrintServer', serverUrl); - if (this.queryPrintServerResult_ !== PrintServerResult.NO_ERRORS) { - return Promise.reject(this.queryPrintServerResult_); - } - return Promise.resolve(this.printServerPrinters); - } - - /** @override */ - requestPrinterStatusUpdate(printerId) { - this.methodCalled('requestPrinterStatusUpdate', printerId); - return Promise.resolve(this.printerStatusMap[printerId]); - } - - /** @override */ - retrieveCupsPrinterPpd(printerId, printerName, eula) { - this.methodCalled('retrieveCupsPrinterPpd', [printerId, printerName, eula]); - } - - /** @override */ - getCupsPrinterPpdPath() { - this.methodCalled('getCupsPrinterPpdPath'); - return Promise.resolve(this.printerPpdPath); - } - - /** @override */ - openPrintManagementApp() { - this.methodCalled('openPrintManagementApp'); - } - - /** @override */ - openScanningApp() { - this.methodCalled('openScanningApp'); - } - - /** @param {string} eulaUrl */ - setEulaUrl(eulaUrl) { - this.eulaUrl_ = eulaUrl; - } - - /** @param {PrinterSetupResult} result */ - setGetPrinterInfoResult(result) { - this.getPrinterInfoResult_ = result; - } - - /** @param {PrintServerResult} result */ - setQueryPrintServerResult(result) { - this.queryPrintServerResult_ = result; - } - - /** @param {!CupsPrinterInfo} printer */ - setAddDiscoveredPrinterFailure(printer) { - this.addDiscoveredFailedPrinter_ = printer; - } - - /** - * @param {string} printerId - * @param {!PrinterStatusReason} reason - * @param {!PrinterStatusSeverity} severity - */ - addPrinterStatus(printerId, reason, severity) { - this.printerStatusMap[printerId] = { - printerId: printerId, - statusReasons: [ - { - reason: reason, - severity: severity, - }, - ], - timestamp: 0, - }; - } -}
diff --git a/chrome/test/data/webui/settings/chromeos/os_printing_page/test_cups_printers_browser_proxy.ts b/chrome/test/data/webui/settings/chromeos/os_printing_page/test_cups_printers_browser_proxy.ts new file mode 100644 index 0000000..7092263 --- /dev/null +++ b/chrome/test/data/webui/settings/chromeos/os_printing_page/test_cups_printers_browser_proxy.ts
@@ -0,0 +1,228 @@ +// 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. + +import {CupsPrinterInfo, CupsPrintersBrowserProxy, CupsPrintersList, ManufacturersInfo, ModelsInfo, PrinterMakeModel, PrinterPpdMakeModel, PrinterSetupResult, PrinterStatus, PrinterStatusReason, PrinterStatusSeverity, PrintServerResult} from 'chrome://os-settings/lazy_load.js'; +import {TestBrowserProxy} from 'chrome://webui-test/test_browser_proxy.js'; + +export class TestCupsPrintersBrowserProxy extends TestBrowserProxy implements + CupsPrintersBrowserProxy { + printerList: CupsPrintersList; + printServerPrinters: CupsPrintersList; + manufacturers: ManufacturersInfo; + models: ModelsInfo; + printerInfo: PrinterMakeModel; + printerPpdMakeModel: PrinterPpdMakeModel; + printerStatusMap: {[key: string]: PrinterStatus}; + printerPpdPath: string; + private eulaUrl: string; + private getPrinterInfoResult: PrinterSetupResult|null; + private queryPrintServerResult: PrintServerResult|null; + private addDiscoveredFailedPrinter: CupsPrinterInfo|null; + + constructor() { + super([ + 'addCupsPrinter', + 'addDiscoveredPrinter', + 'getCupsSavedPrintersList', + 'getCupsEnterprisePrintersList', + 'getCupsPrinterManufacturersList', + 'getCupsPrinterModelsList', + 'getPrinterInfo', + 'getPrinterPpdManufacturerAndModel', + 'queryPrintServer', + 'startDiscoveringPrinters', + 'stopDiscoveringPrinters', + 'cancelPrinterSetUp', + 'updateCupsPrinter', + 'removeCupsPrinter', + 'reconfigureCupsPrinter', + 'getEulaUrl', + 'requestPrinterStatusUpdate', + 'retrieveCupsPrinterPpd', + 'getCupsPrinterPpdPath', + 'openPrintManagementApp', + 'openScanningApp', + ]); + + + this.printerList = {printerList: []}; + this.printServerPrinters = {printerList: []}; + this.manufacturers = {success: false, manufacturers: []}; + this.models = {success: false, models: []}; + this.printerInfo = { + makeAndModel: '', + autoconf: false, + ppdRefUserSuppliedPpdUrl: '', + ppdRefEffectiveMakeAndModel: '', + ppdReferenceResolved: false, + }; + this.printerPpdMakeModel = {ppdManufacturer: '', ppdModel: ''}; + this.printerStatusMap = {}; + this.printerPpdPath = ''; + /** + * |eulaUrl| in conjunction with |setEulaUrl| mimics setting the EULA url + * for a printer. + */ + this.eulaUrl = ''; + + /** + * If set, 'getPrinterInfo' will fail and the promise will be reject with + * this PrinterSetupResult. + */ + this.getPrinterInfoResult = null; + + /** + * Contains the result code from querying a print server. + */ + this.queryPrintServerResult = null; + + /** + * If set, 'addDiscoveredPrinter' will fail and the promise will be + * rejected with this printer. + */ + this.addDiscoveredFailedPrinter = null; + } + + addCupsPrinter(newPrinter: CupsPrinterInfo): Promise<PrinterSetupResult> { + this.methodCalled('addCupsPrinter', newPrinter); + return Promise.resolve(PrinterSetupResult.SUCCESS); + } + + addDiscoveredPrinter(printerId: string): Promise<PrinterSetupResult> { + this.methodCalled('addDiscoveredPrinter', printerId); + if (this.addDiscoveredFailedPrinter !== null) { + return Promise.reject(this.addDiscoveredFailedPrinter); + } + return Promise.resolve(PrinterSetupResult.SUCCESS); + } + + getCupsSavedPrintersList(): Promise<CupsPrintersList> { + this.methodCalled('getCupsSavedPrintersList'); + return Promise.resolve(this.printerList); + } + + getCupsEnterprisePrintersList(): Promise<CupsPrintersList> { + this.methodCalled('getCupsEnterprisePrintersList'); + return Promise.resolve(this.printerList); + } + + getCupsPrinterManufacturersList(): Promise<ManufacturersInfo> { + this.methodCalled('getCupsPrinterManufacturersList'); + return Promise.resolve(this.manufacturers); + } + + getCupsPrinterModelsList(manufacturer: string): Promise<ModelsInfo> { + this.methodCalled('getCupsPrinterModelsList', manufacturer); + return Promise.resolve(this.models); + } + + getPrinterInfo(newPrinter: CupsPrinterInfo): Promise<PrinterMakeModel> { + this.methodCalled('getPrinterInfo', newPrinter); + if (this.getPrinterInfoResult !== null) { + return Promise.reject(this.getPrinterInfoResult); + } + return Promise.resolve(this.printerInfo); + } + + startDiscoveringPrinters(): void { + this.methodCalled('startDiscoveringPrinters'); + } + + stopDiscoveringPrinters(): void { + this.methodCalled('stopDiscoveringPrinters'); + } + + cancelPrinterSetUp(newPrinter: CupsPrinterInfo): void { + this.methodCalled('cancelPrinterSetUp', newPrinter); + } + + updateCupsPrinter(printerId: string, printerName: string): + Promise<PrinterSetupResult> { + this.methodCalled('updateCupsPrinter', [printerId, printerName]); + return Promise.resolve(PrinterSetupResult.EDIT_SUCCESS); + } + + removeCupsPrinter(printerId: string, printerName: string): void { + this.methodCalled('removeCupsPrinter', [printerId, printerName]); + } + + getPrinterPpdManufacturerAndModel(printerId: string): + Promise<PrinterPpdMakeModel> { + this.methodCalled('getPrinterPpdManufacturerAndModel', printerId); + return Promise.resolve(this.printerPpdMakeModel); + } + + reconfigureCupsPrinter(printer: CupsPrinterInfo): + Promise<PrinterSetupResult> { + this.methodCalled('reconfigureCupsPrinter', printer); + return Promise.resolve(PrinterSetupResult.EDIT_SUCCESS); + } + + getEulaUrl(ppdManufacturer: string, ppdModel: string): Promise<string> { + this.methodCalled('getEulaUrl', [ppdManufacturer, ppdModel]); + return Promise.resolve(this.eulaUrl); + } + + queryPrintServer(serverUrl: string): Promise<CupsPrintersList> { + this.methodCalled('queryPrintServer', serverUrl); + if (this.queryPrintServerResult !== PrintServerResult.NO_ERRORS) { + return Promise.reject(this.queryPrintServerResult); + } + return Promise.resolve(this.printServerPrinters); + } + + requestPrinterStatusUpdate(printerId: string): Promise<PrinterStatus> { + this.methodCalled('requestPrinterStatusUpdate', printerId); + return Promise.resolve(this.printerStatusMap[printerId]!); + } + + retrieveCupsPrinterPpd(printerId: string, printerName: string, eula: string): + void { + this.methodCalled('retrieveCupsPrinterPpd', [printerId, printerName, eula]); + } + + getCupsPrinterPpdPath(): Promise<string> { + this.methodCalled('getCupsPrinterPpdPath'); + return Promise.resolve(this.printerPpdPath); + } + + openPrintManagementApp(): void { + this.methodCalled('openPrintManagementApp'); + } + + openScanningApp(): void { + this.methodCalled('openScanningApp'); + } + + setEulaUrl(eulaUrl: string): void { + this.eulaUrl = eulaUrl; + } + + setGetPrinterInfoResult(result: PrinterSetupResult): void { + this.getPrinterInfoResult = result; + } + + setQueryPrintServerResult(result: PrintServerResult): void { + this.queryPrintServerResult = result; + } + + setAddDiscoveredPrinterFailure(printer: CupsPrinterInfo): void { + this.addDiscoveredFailedPrinter = printer; + } + + addPrinterStatus( + printerId: string, reason: PrinterStatusReason, + severity: PrinterStatusSeverity): void { + this.printerStatusMap[printerId] = { + printerId, + statusReasons: [ + { + reason, + severity, + }, + ], + timestamp: 0, + }; + } +}
diff --git a/chrome/test/data/webui/settings/chromeos/os_settings_menu/os_settings_menu_revamp_test.ts b/chrome/test/data/webui/settings/chromeos/os_settings_menu/os_settings_menu_revamp_test.ts index 7da24fe..fc5d1a3 100644 --- a/chrome/test/data/webui/settings/chromeos/os_settings_menu/os_settings_menu_revamp_test.ts +++ b/chrome/test/data/webui/settings/chromeos/os_settings_menu/os_settings_menu_revamp_test.ts
@@ -19,7 +19,7 @@ interface MenuItemData { sectionName: SectionName; - href: string; + path: string; } suite('<os-settings-menu> menu item visibility', () => { @@ -41,9 +41,9 @@ settingsMenu.remove(); }); - function queryMenuItemByHref(href: string): HTMLElement|null { + function queryMenuItemByPath(path: string): HTMLElement|null { return settingsMenu.shadowRoot!.querySelector<HTMLElement>( - `a.item[href="${href}"]`); + `os-settings-menu-item[path="${path}"]`); } test('Advanced toggle and collapsible menu are not visible', () => { @@ -61,8 +61,8 @@ }); test('About page menu item should always be visible', () => { - const href = `/${routesMojom.ABOUT_CHROME_OS_SECTION_PATH}`; - const menuItem = queryMenuItemByHref(href); + const path = `/${routesMojom.ABOUT_CHROME_OS_SECTION_PATH}`; + const menuItem = queryMenuItemByPath(path); assertTrue(isVisible(menuItem)); }); @@ -70,54 +70,53 @@ // Basic pages { sectionName: 'kNetwork', - href: `/${routesMojom.NETWORK_SECTION_PATH}`, + path: `/${routesMojom.NETWORK_SECTION_PATH}`, }, { sectionName: 'kBluetooth', - href: `/${routesMojom.BLUETOOTH_SECTION_PATH}`, + path: `/${routesMojom.BLUETOOTH_SECTION_PATH}`, }, { sectionName: 'kMultiDevice', - href: `/${routesMojom.MULTI_DEVICE_SECTION_PATH}`, + path: `/${routesMojom.MULTI_DEVICE_SECTION_PATH}`, }, { sectionName: 'kPeople', - href: `/${routesMojom.PEOPLE_SECTION_PATH}`, + path: `/${routesMojom.PEOPLE_SECTION_PATH}`, }, { sectionName: 'kKerberos', - href: `/${routesMojom.KERBEROS_SECTION_PATH}`, + path: `/${routesMojom.KERBEROS_SECTION_PATH}`, }, { sectionName: 'kDevice', - href: `/${routesMojom.DEVICE_SECTION_PATH}`, + path: `/${routesMojom.DEVICE_SECTION_PATH}`, }, { sectionName: 'kPersonalization', - href: `/${routesMojom.PERSONALIZATION_SECTION_PATH}`, + path: `/${routesMojom.PERSONALIZATION_SECTION_PATH}`, }, { sectionName: 'kPrivacyAndSecurity', - href: `/${routesMojom.PRIVACY_AND_SECURITY_SECTION_PATH}`, + path: `/${routesMojom.PRIVACY_AND_SECURITY_SECTION_PATH}`, }, { sectionName: 'kApps', - href: `/${routesMojom.APPS_SECTION_PATH}`, + path: `/${routesMojom.APPS_SECTION_PATH}`, }, { sectionName: 'kAccessibility', - href: `/${routesMojom.ACCESSIBILITY_SECTION_PATH}`, + path: `/${routesMojom.ACCESSIBILITY_SECTION_PATH}`, }, { sectionName: 'kSystemPreferences', - href: `/${routesMojom.SYSTEM_PREFERENCES_SECTION_PATH}`, + path: `/${routesMojom.SYSTEM_PREFERENCES_SECTION_PATH}`, }, ]; - for (const {sectionName, href} of menuItemData) { + for (const {sectionName, path} of menuItemData) { test( - `${sectionName} menu item is visible if corresponding page is available`, - () => { + `${sectionName} menu item is visible if page is available`, () => { // Make page available settingsMenu.pageAvailability = { ...settingsMenu.pageAvailability, @@ -125,11 +124,13 @@ }; flush(); - let menuItem = queryMenuItemByHref(href); - assertTrue( - isVisible(menuItem), - `Menu item for ${sectionName} should be visible.`); + const menuItem = queryMenuItemByPath(path); + assertTrue(isVisible(menuItem)); + }); + test( + `${sectionName} menu item is not visible if page is unavailable`, + () => { // Make page unavailable settingsMenu.pageAvailability = { ...settingsMenu.pageAvailability, @@ -137,10 +138,8 @@ }; flush(); - menuItem = queryMenuItemByHref(href); - assertFalse( - isVisible(menuItem), - `Menu item for ${sectionName} should not be visible.`); + const menuItem = queryMenuItemByPath(path); + assertFalse(isVisible(menuItem)); }); } });
diff --git a/chrome/test/data/webui/settings/chromeos/os_settings_menu/os_settings_menu_test.ts b/chrome/test/data/webui/settings/chromeos/os_settings_menu/os_settings_menu_test.ts index f011a10..b77541e 100644 --- a/chrome/test/data/webui/settings/chromeos/os_settings_menu/os_settings_menu_test.ts +++ b/chrome/test/data/webui/settings/chromeos/os_settings_menu/os_settings_menu_test.ts
@@ -116,7 +116,7 @@ const submenu = settingsMenu.shadowRoot!.querySelector<IronSelectorElement>( '#advancedSubmenu'); assertTrue(!!submenu); - const path = new window.URL(submenu.selected as string).pathname; + const path = submenu.selected; assertEquals('/osReset', path); }); @@ -124,13 +124,13 @@ const submenu = settingsMenu.shadowRoot!.querySelector<IronSelectorElement>( '#advancedSubmenu'); assertTrue(!!submenu); - let path = new window.URL(submenu.selected as string).pathname; + let path = submenu.selected; assertEquals('/osReset', path); Router.getInstance().navigateTo(routes.BLUETOOTH); flush(); - path = new window.URL(submenu.selected as string).pathname; + path = submenu.selected; assertEquals('/bluetooth', path); }); @@ -138,7 +138,7 @@ const submenu = settingsMenu.shadowRoot!.querySelector<IronSelectorElement>( '#advancedSubmenu'); assertTrue(!!submenu); - const path = new window.URL(submenu.selected as string).pathname; + const path = submenu.selected; assertEquals('/osReset', path); Router.getInstance().navigateTo(routes.BASIC); @@ -167,100 +167,99 @@ settingsMenu.remove(); }); - function queryMenuItemByHref(href: string): HTMLElement|null { + function queryMenuItemByPath(path: string): HTMLElement|null { return settingsMenu.shadowRoot!.querySelector<HTMLElement>( - `a.item[href="${href}"]`); + `os-settings-menu-item[path="${path}"]`); } test('About page menu item should always be visible', () => { - const href = `/${routesMojom.ABOUT_CHROME_OS_SECTION_PATH}`; - const menuItem = queryMenuItemByHref(href); + const path = `/${routesMojom.ABOUT_CHROME_OS_SECTION_PATH}`; + const menuItem = queryMenuItemByPath(path); assertTrue(isVisible(menuItem)); }); interface MenuItemData { sectionName: SectionName; - href: string; + path: string; } const menuItemData: MenuItemData[] = [ // Basic pages { sectionName: 'kNetwork', - href: `/${routesMojom.NETWORK_SECTION_PATH}`, + path: `/${routesMojom.NETWORK_SECTION_PATH}`, }, { sectionName: 'kBluetooth', - href: `/${routesMojom.BLUETOOTH_SECTION_PATH}`, + path: `/${routesMojom.BLUETOOTH_SECTION_PATH}`, }, { sectionName: 'kMultiDevice', - href: `/${routesMojom.MULTI_DEVICE_SECTION_PATH}`, + path: `/${routesMojom.MULTI_DEVICE_SECTION_PATH}`, }, { sectionName: 'kPeople', - href: `/${routesMojom.PEOPLE_SECTION_PATH}`, + path: `/${routesMojom.PEOPLE_SECTION_PATH}`, }, { sectionName: 'kKerberos', - href: `/${routesMojom.KERBEROS_SECTION_PATH}`, + path: `/${routesMojom.KERBEROS_SECTION_PATH}`, }, { sectionName: 'kDevice', - href: `/${routesMojom.DEVICE_SECTION_PATH}`, + path: `/${routesMojom.DEVICE_SECTION_PATH}`, }, { sectionName: 'kPersonalization', - href: `/${routesMojom.PERSONALIZATION_SECTION_PATH}`, + path: `/${routesMojom.PERSONALIZATION_SECTION_PATH}`, }, { sectionName: 'kSearchAndAssistant', - href: `/${routesMojom.SEARCH_AND_ASSISTANT_SECTION_PATH}`, + path: `/${routesMojom.SEARCH_AND_ASSISTANT_SECTION_PATH}`, }, { sectionName: 'kPrivacyAndSecurity', - href: `/${routesMojom.PRIVACY_AND_SECURITY_SECTION_PATH}`, + path: `/${routesMojom.PRIVACY_AND_SECURITY_SECTION_PATH}`, }, { sectionName: 'kApps', - href: `/${routesMojom.APPS_SECTION_PATH}`, + path: `/${routesMojom.APPS_SECTION_PATH}`, }, { sectionName: 'kAccessibility', - href: `/${routesMojom.ACCESSIBILITY_SECTION_PATH}`, + path: `/${routesMojom.ACCESSIBILITY_SECTION_PATH}`, }, // Advanced pages { sectionName: 'kDateAndTime', - href: `/${routesMojom.DATE_AND_TIME_SECTION_PATH}`, + path: `/${routesMojom.DATE_AND_TIME_SECTION_PATH}`, }, { sectionName: 'kLanguagesAndInput', - href: `/${routesMojom.LANGUAGES_AND_INPUT_SECTION_PATH}`, + path: `/${routesMojom.LANGUAGES_AND_INPUT_SECTION_PATH}`, }, { sectionName: 'kFiles', - href: `/${routesMojom.FILES_SECTION_PATH}`, + path: `/${routesMojom.FILES_SECTION_PATH}`, }, { sectionName: 'kPrinting', - href: `/${routesMojom.PRINTING_SECTION_PATH}`, + path: `/${routesMojom.PRINTING_SECTION_PATH}`, }, { sectionName: 'kCrostini', - href: `/${routesMojom.CROSTINI_SECTION_PATH}`, + path: `/${routesMojom.CROSTINI_SECTION_PATH}`, }, { sectionName: 'kReset', - href: `/${routesMojom.RESET_SECTION_PATH}`, + path: `/${routesMojom.RESET_SECTION_PATH}`, }, ]; - for (const {sectionName, href} of menuItemData) { + for (const {sectionName, path} of menuItemData) { test( - `${sectionName} menu item is visible if corresponding page is available`, - () => { + `${sectionName} menu item is visible if page is available`, () => { // Make page available settingsMenu.pageAvailability = { ...settingsMenu.pageAvailability, @@ -268,11 +267,14 @@ }; flush(); - let menuItem = queryMenuItemByHref(href); - assertTrue( - isVisible(menuItem), - `Menu item for ${sectionName} should be visible.`); + const menuItem = queryMenuItemByPath(path); + assertTrue(isVisible(menuItem)); + }); + + test( + `${sectionName} menu item is not visible if page is unavailable`, + () => { // Make page unavailable settingsMenu.pageAvailability = { ...settingsMenu.pageAvailability, @@ -280,10 +282,8 @@ }; flush(); - menuItem = queryMenuItemByHref(href); - assertFalse( - isVisible(menuItem), - `Menu item for ${sectionName} should not be visible.`); + const menuItem = queryMenuItemByPath(path); + assertFalse(isVisible(menuItem)); }); } });
diff --git a/chrome/test/data/webui/settings/chromeos/os_settings_ui/os_settings_ui_about_page_test.ts b/chrome/test/data/webui/settings/chromeos/os_settings_ui/os_settings_ui_about_page_test.ts index 3e63c27..179e29e 100644 --- a/chrome/test/data/webui/settings/chromeos/os_settings_ui/os_settings_ui_about_page_test.ts +++ b/chrome/test/data/webui/settings/chromeos/os_settings_ui/os_settings_ui_about_page_test.ts
@@ -52,9 +52,9 @@ flush(); } - function queryMenuItemByHref(href: string): HTMLElement|null { + function queryMenuItemByPath(path: string): HTMLElement|null { return menu.shadowRoot!.querySelector<HTMLElement>( - `a.item[href="${href}"]`); + `os-settings-menu-item[path="${path}"]`); } async function clickMenuItemAndWaitForPage(menuItem: HTMLElement): @@ -93,7 +93,7 @@ // Show basic page let menuItem = - queryMenuItemByHref(`/${routesMojom.BLUETOOTH_SECTION_PATH}`); + queryMenuItemByPath(`/${routesMojom.BLUETOOTH_SECTION_PATH}`); assertTrue(!!menuItem); await clickMenuItemAndWaitForPage(menuItem); assertTrue(isVisible(basicPageContainer)); @@ -102,7 +102,7 @@ // Show about page menuItem = - queryMenuItemByHref(`/${routesMojom.ABOUT_CHROME_OS_SECTION_PATH}`); + queryMenuItemByPath(`/${routesMojom.ABOUT_CHROME_OS_SECTION_PATH}`); assertTrue(!!menuItem); await clickMenuItemAndWaitForPage(menuItem); assertFalse(isVisible(basicPageContainer)); @@ -111,7 +111,7 @@ // Show advanced page menuItem = - queryMenuItemByHref(`/${routesMojom.DATE_AND_TIME_SECTION_PATH}`); + queryMenuItemByPath(`/${routesMojom.DATE_AND_TIME_SECTION_PATH}`); assertTrue(!!menuItem); await clickMenuItemAndWaitForPage(menuItem); assertTrue(isVisible(basicPageContainer)); @@ -120,7 +120,7 @@ // Show about page menuItem = - queryMenuItemByHref(`/${routesMojom.ABOUT_CHROME_OS_SECTION_PATH}`); + queryMenuItemByPath(`/${routesMojom.ABOUT_CHROME_OS_SECTION_PATH}`); assertTrue(!!menuItem); await clickMenuItemAndWaitForPage(menuItem); assertFalse(isVisible(basicPageContainer));
diff --git a/chrome/test/data/webui/settings/chromeos/os_settings_ui/os_settings_ui_menu_test.ts b/chrome/test/data/webui/settings/chromeos/os_settings_ui/os_settings_ui_menu_test.ts index 5703669c..850cba6f 100644 --- a/chrome/test/data/webui/settings/chromeos/os_settings_ui/os_settings_ui_menu_test.ts +++ b/chrome/test/data/webui/settings/chromeos/os_settings_ui/os_settings_ui_menu_test.ts
@@ -94,8 +94,9 @@ const router = Router.getInstance(); router.navigateTo(routes.BASIC, urlParams); assertEquals(urlParams.toString(), router.getQueryParameters().toString()); + const personalizationPath = `/${routesMojom.PERSONALIZATION_SECTION_PATH}`; const link = settingsMenu.shadowRoot!.querySelector<HTMLAnchorElement>( - `a.item[href="/${routesMojom.PERSONALIZATION_SECTION_PATH}"]`); + `os-settings-menu-item[path="${personalizationPath}"]`); assertTrue(!!link); link.click(); assertEquals('', router.getQueryParameters().toString());
diff --git a/chrome/test/data/webui/settings/chromeos/os_settings_ui/os_settings_ui_page_visibility_revamp_test.ts b/chrome/test/data/webui/settings/chromeos/os_settings_ui/os_settings_ui_page_visibility_revamp_test.ts index bfe43fa1..2c3db22 100644 --- a/chrome/test/data/webui/settings/chromeos/os_settings_ui/os_settings_ui_page_visibility_revamp_test.ts +++ b/chrome/test/data/webui/settings/chromeos/os_settings_ui/os_settings_ui_page_visibility_revamp_test.ts
@@ -57,9 +57,9 @@ flush(); } - function queryMenuItemByHref(href: string): HTMLElement|null { + function queryMenuItemByPath(path: string): HTMLElement|null { return menu.shadowRoot!.querySelector<HTMLElement>( - `a.item[href="${href}"]`); + `os-settings-menu-item[path="${path}"]`); } /** @@ -191,8 +191,8 @@ async () => { const route = routes[routeName]; - const menuItem = queryMenuItemByHref(route.path); - assert(menuItem, `Menu item with href="${route.path}" not found.`); + const menuItem = queryMenuItemByPath(route.path); + assert(menuItem, `Menu item with path="${route.path}" not found.`); menuItem.click(); await flushTasks();
diff --git a/chrome/test/data/webui/settings/site_settings_page_test.ts b/chrome/test/data/webui/settings/site_settings_page_test.ts index 164aeba1..634c71c 100644 --- a/chrome/test/data/webui/settings/site_settings_page_test.ts +++ b/chrome/test/data/webui/settings/site_settings_page_test.ts
@@ -129,6 +129,35 @@ cookiesLinkRow.subLabel); }); + test('TrackingProtectionLinkRowSubLabel', async function() { + loadTimeData.overrideValues({ + is3pcdCookieSettingsRedesignEnabled: true, + }); + setupPage(); + const cookiesLinkRow = + page.shadowRoot!.querySelector('#basicContentList')!.shadowRoot! + .querySelector<CrLinkRowElement>('#cookies')!; + assertEquals( + loadTimeData.getString('trackingProtectionLinkRowSubLabel'), + cookiesLinkRow.subLabel); + + // Even if cookie controls mode changes, sub-label stays the same. + page.set( + 'prefs.profile.cookie_controls_mode.value', + CookieControlsMode.BLOCK_THIRD_PARTY); + await flushTasks(); + assertEquals( + loadTimeData.getString('trackingProtectionLinkRowSubLabel'), + cookiesLinkRow.subLabel); + + page.set( + 'prefs.profile.cookie_controls_mode.value', CookieControlsMode.OFF); + await flushTasks(); + assertEquals( + loadTimeData.getString('trackingProtectionLinkRowSubLabel'), + cookiesLinkRow.subLabel); + }); + test('NotificationsLinkRowSublabel', async function() { const notificationsLinkRow = page.shadowRoot!.querySelector('#basicPermissionsList')!.shadowRoot!
diff --git a/chrome/test/variations/fixtures/skia_gold.py b/chrome/test/variations/fixtures/skia_gold.py index 5342742..ed711c94d 100644 --- a/chrome/test/variations/fixtures/skia_gold.py +++ b/chrome/test/variations/fixtures/skia_gold.py
@@ -7,12 +7,13 @@ import functools import os import shutil +import struct import sys import attr import pytest from selenium.webdriver.remote.webelement import WebElement -from typing import Tuple +from typing import List, Tuple # The module skia_gold_common is relative to its own path, add "build" dir # to the search path. @@ -32,6 +33,18 @@ return skia_options +def _get_png_image_info(data: bytes) -> Tuple[int, int]: + if _is_png(data): + weight, height = struct.unpack('>LL', data[16:24]) + return int(weight), int(height) + else: + raise RuntimeError('not a png image') + + +def _is_png(data: bytes) -> bool: + return data[:6] == b'\x89PNG\r\n' and data[12:16] == b'IHDR' + + @attr.attrs() class VariationsSkiaGoldUtil: """Wrapper test util class for skia gold API.""" @@ -45,25 +58,58 @@ """Returns a file name that should be used for diff comparison.""" return os.path.join(self.img_dir, f'{name}.png') + def _inexact_matching_args(self, max_diff: int) -> List[str]: + # Fuzzy matching algorithms allow to diff in a certain number of pixels. + # https://skia.googlesource.com/buildbot/+/main/gold-client/go/imgmatching/fuzzy/fuzzy.go + return[ + '--add-test-optional-key', + 'image_matching_algorithm:fuzzy', + # Some hardware may cause rasterization inconsistency, resulting two + # completely different pixels. Here we tolerate some level of hardware + # rendering on each pixel even those two pixels are completely different, + # without compromising significant visual differences. + '--add-test-optional-key', + 'fuzzy_pixel_per_channel_delta_threshold:255', + '--add-test-optional-key', + f'fuzzy_max_different_pixels:{max_diff}', + ] + @staticmethod def screenshot_from_element(ele: WebElement) -> bytes: """Convenient method to screenshot an selement.""" return base64.b64decode(ele.screenshot_as_base64) - def compare(self, name: str, png_data: bytes) -> Tuple[int, str]: + def compare(self, name: str, + png_data: bytes, + threshold: float = 0.001) -> Tuple[int, str]: """Compares image using skia gold API. It saves png data into a file first and compares using `goldctl`. The image can be inspected after test runs. It runs locally or on a bot, and only upload gold images for triaging on a bot. + + Args: + name: the image name used to identify the comparison result. + png_data: the raw data saving png contents. + threshold: the percentage to allow pixel differences. + + Returns: + The tuple of status code and optional error message. + + Raises: + RuntimeError if the png_data is not a PNG content. """ + weight, height = _get_png_image_info(png_data) + max_pixel = int(weight * height * threshold) png_file = self._png_file_for_name(name) with open(png_file, "wb") as f: f.write(png_data) image_name = f'{self.test_name}:{name}' status, error_msg = self.skia_gold_session.RunComparison( - name=image_name, png_file=png_file, use_luci=self.use_luci) + name=image_name, png_file=png_file, + inexact_matching_args=self._inexact_matching_args(max_pixel), + use_luci=self.use_luci) # Screenshots for variations are in chrome-gold.skia.org triage_link = self.skia_gold_session.GetTriageLinks(image_name)[1]
diff --git a/chrome/updater/app/app_install_win.cc b/chrome/updater/app/app_install_win.cc index 7d424f7d..c769e550 100644 --- a/chrome/updater/app/app_install_win.cc +++ b/chrome/updater/app/app_install_win.cc
@@ -814,7 +814,9 @@ ? CompletionCodes::COMPLETION_CODE_SUCCESS : CompletionCodes:: COMPLETION_CODE_EXIT_SILENTLY_ON_LAUNCH_COMMAND; - } else if (app_info.error_code == ERROR_SUCCESS_REBOOT_REQUIRED) { + } else if (app_info.error_code == ERROR_SUCCESS_REBOOT_INITIATED || + app_info.error_code == ERROR_SUCCESS_REBOOT_REQUIRED || + app_info.error_code == ERROR_SUCCESS_RESTART_REQUIRED) { app_info.completion_code = CompletionCodes::COMPLETION_CODE_REBOOT_NOTICE_ONLY; } else {
diff --git a/chrome/updater/app/server/win/service_main.cc b/chrome/updater/app/server/win/service_main.cc index cad941d..d1b1d026 100644 --- a/chrome/updater/app/server/win/service_main.cc +++ b/chrome/updater/app/server/win/service_main.cc
@@ -168,8 +168,12 @@ return RunCOMServer(); } - VLOG(2) << "Running Wake task from the Windows Service"; - return RunWakeTask(); + if (IsInternalService()) { + VLOG(2) << "Running Wake task from the Windows Service"; + return RunWakeTask(); + } + + return S_OK; } HRESULT ServiceMain::RunCOMServer() {
diff --git a/chrome/updater/update_service_impl.cc b/chrome/updater/update_service_impl.cc index 9c01b995..a90a4ce 100644 --- a/chrome/updater/update_service_impl.cc +++ b/chrome/updater/update_service_impl.cc
@@ -180,30 +180,20 @@ ToErrorCategory(crx_update_item.error_category); update_state.error_code = crx_update_item.error_code; update_state.extra_code1 = crx_update_item.extra_code1; + if (crx_update_item.installer_result) { + update_state.error_code = + crx_update_item.installer_result->original_error; + update_state.installer_cmd_line = + crx_update_item.installer_result->installer_cmd_line; + update_state.installer_text = + crx_update_item.installer_result->installer_text; + } if (update_state.state == UpdateService::UpdateState::State::kUpdated || update_state.state == UpdateService::UpdateState::State::kUpdateError || update_state.state == UpdateService::UpdateState::State::kNoUpdate) { -#if BUILDFLAG(IS_WIN) - // Read the installer API results from the registry. - // TODO(crbug.com/1478305): Remove this code if `update_client` - // provides these values in the future. - // TODO(crbug.com/1481362): Remove the need for - // `MakeInstallerResultAndOriginalError` if this can be implemented in - // `update_client` instead. - const auto [result, error] = MakeInstallerResultAndOriginalError( - GetClientStateKeyLastInstallerOutcome(GetUpdaterScope(), - update_state.app_id), - update_state.error_code); - update_state.installer_cmd_line = result.installer_cmd_line; - if (error) - update_state.error_code = *error; - update_state.extra_code1 = result.extended_error; - update_state.installer_text = result.installer_text; -#endif // BUILDFLAG(IS_WIN) - // If a new install encounters an error, the AppId registered in // `UpdateServiceImpl::Install` needs to be removed here. Otherwise // the updater may remain installed even if there are no other apps to @@ -726,12 +716,16 @@ config->GetPrefService()->CommitPendingWrite(); } - state.error_code = result.error; + // Handle the offline installer cases similar to the online cases, + // and get the `error_code` from `original_error`. + state.error_code = + result.original_error ? result.original_error : result.error; state.extra_code1 = result.extended_error; state.installer_text = result.installer_text; state.installer_cmd_line = result.installer_cmd_line; state_update.Run(state); - VLOG(1) << app_id << " installation completed: " << result.error; + VLOG(1) << app_id + << " installation completed: " << state.error_code; // Send an install ping. In some environments the ping cannot be // sent, so do not wait for it to be sent before calling back the
diff --git a/chrome/updater/win/BUILD.gn b/chrome/updater/win/BUILD.gn index f70e020..ede94cf2d 100644 --- a/chrome/updater/win/BUILD.gn +++ b/chrome/updater/win/BUILD.gn
@@ -81,8 +81,8 @@ "$root_build_dir/UpdaterSetup.exe", "$root_build_dir/UpdaterSetup_test.exe", "$root_build_dir/qualification_app.exe", - "$root_gen_dir/chrome/updater/app/server/win/updater_idl.h", - "$root_gen_dir/chrome/updater/app/server/win/updater_internal_idl.h", + "$root_gen_dir/chrome/updater/app/server/win/updater_idl.idl", + "$root_gen_dir/chrome/updater/app/server/win/updater_internal_idl.idl", ] + get_target_outputs(":signing") deps = [ ":signing",
diff --git a/chrome/updater/win/installer_api.cc b/chrome/updater/win/installer_api.cc index 984a08afd..192a3be 100644 --- a/chrome/updater/win/installer_api.cc +++ b/chrome/updater/win/installer_api.cc
@@ -402,8 +402,7 @@ // Omaha/Google Update. Some edge cases could be missing. // TODO(crbug.com/1172866): remove the hardcoded assumption that error must // be zero to indicate success. -std::pair<Installer::Result, absl::optional<int>> -MakeInstallerResultAndOriginalError( +Installer::Result MakeInstallerResult( absl::optional<InstallerOutcome> installer_outcome, int exit_code) { InstallerOutcome outcome; @@ -411,14 +410,11 @@ outcome = *installer_outcome; } else { // Set the installer result based on whether this is a success or an error. - // TODO(crbug.com/1481314): handle an `exit_code` of - // `ERROR_SUCCESS_REBOOT_REQUIRED`. if (exit_code == 0) { outcome.installer_result = InstallerResult::kSuccess; } else { outcome.installer_result = InstallerResult::kExitCode; - outcome.installer_error = kErrorApplicationInstallerFailed; - outcome.installer_extracode1 = exit_code; + outcome.installer_error = exit_code; } } @@ -438,46 +434,37 @@ case InstallerResult::kMsiError: case InstallerResult::kSystemError: case InstallerResult::kExitCode: - // These are unconditional errors: + // These are usually unconditional errors: // - use the installer error, or the exit code, or report a generic // error. // - use the installer extra code if available. // - use the text description of the error if available. - result.error = + result.original_error = outcome.installer_error ? *outcome.installer_error : exit_code; - if (!result.error) { - result.error = kErrorApplicationInstallerFailed; + if (!result.original_error) { + result.original_error = kErrorApplicationInstallerFailed; } + + // `update_client` needs to view the below codes as a success, otherwise + // it will consider the app as not installed. So we reset the `error` to + // `0` in these cases. + result.error = + result.original_error == ERROR_SUCCESS_REBOOT_INITIATED || + result.original_error == ERROR_SUCCESS_REBOOT_REQUIRED || + result.original_error == ERROR_SUCCESS_RESTART_REQUIRED + ? 0 + : kErrorApplicationInstallerFailed; if (outcome.installer_extracode1) { result.extended_error = *outcome.installer_extracode1; } - result.installer_text = outcome.installer_text - ? *outcome.installer_text - : GetTextForSystemError(result.error); - CHECK_NE(result.error, 0); + result.installer_text = + outcome.installer_text ? *outcome.installer_text + : GetTextForSystemError(result.original_error); + CHECK_NE(result.original_error, 0); break; } - // `update_client` needs to view `ERROR_SUCCESS_REBOOT_REQUIRED` as a - // success, otherwise it will consider the app as not installed even though - // it installed successfully. So we reset the `error` to `0` here. The - // original error will be returned by this function via the - // `original_result_error`. - if (result.error == ERROR_SUCCESS_REBOOT_REQUIRED) { - const int original_result_error = result.error; - result.error = 0; - return std::make_pair(result, original_result_error); - } - return std::make_pair(result, absl::nullopt); -} - -// Calls `MakeInstallerResultAndOriginalError` and returns the resultant -// `Installer::Result`. -Installer::Result MakeInstallerResult( - absl::optional<InstallerOutcome> installer_outcome, - int exit_code) { - return MakeInstallerResultAndOriginalError(installer_outcome, exit_code) - .first; + return result; } // Clears the previous installer output, runs the application installer,
diff --git a/chrome/updater/win/installer_api.h b/chrome/updater/win/installer_api.h index 22c18e8..d8890dc1 100644 --- a/chrome/updater/win/installer_api.h +++ b/chrome/updater/win/installer_api.h
@@ -130,17 +130,16 @@ const std::string& app_id, const InstallerOutcome& installer_outcome); -// Translates the Installer API outcome into an `Installer::Result` value and -// the original error code set by the installer if relevant in some cases such -// as reboot. -// TODO(crbug.com/1481362): Remove the need for -// `MakeInstallerResultAndOriginalError` if this can be implemented in -// `update_client` instead. -std::pair<Installer::Result, absl::optional<int>> -MakeInstallerResultAndOriginalError( - absl::optional<InstallerOutcome> installer_outcome, - int exit_code); - +// Translates the Installer API outcome into an `Installer::Result` value. +// * Handles installer exit codes correctly. +// * Handles non-zero success codes `ERROR_SUCCESS_RE{xxx}` correctly. +// * Uniformly sets `CrxInstaller::Result::error` to `0` for success, and +// `kErrorApplicationInstallerFailed` for failure. The installer API code (or +// exit code in the case of no installer API) is stored within +// `CrxInstaller::Result::original_error` to avoid overlaps with +// `update_client` error codes. Otherwise for instance error code `2` could +// mean `FINGERPRINT_WRITE_FAILED = 2` or the windows error +// `ERROR_FILE_NOT_FOUND`. Installer::Result MakeInstallerResult( absl::optional<InstallerOutcome> installer_outcome, int exit_code);
diff --git a/chrome/updater/win/installer_api_unittest.cc b/chrome/updater/win/installer_api_unittest.cc index 079ef58..89de98f 100644 --- a/chrome/updater/win/installer_api_unittest.cc +++ b/chrome/updater/win/installer_api_unittest.cc
@@ -9,6 +9,7 @@ #include "base/strings/utf_string_conversions.h" #include "base/test/test_reg_util_win.h" #include "base/win/registry.h" +#include "chrome/updater/constants.h" #include "chrome/updater/updater_scope.h" #include "chrome/updater/util/win_util.h" #include "chrome/updater/win/win_constants.h" @@ -160,13 +161,15 @@ installer_outcome.installer_text = "some text"; installer_outcome.installer_cmd_line = "some cmd line"; auto installer_result = MakeInstallerResult(installer_outcome, 10); - EXPECT_EQ(installer_result.error, 1); + EXPECT_EQ(installer_result.error, kErrorApplicationInstallerFailed); + EXPECT_EQ(installer_result.original_error, 1); EXPECT_EQ(installer_result.extended_error, -2); EXPECT_STREQ(installer_result.installer_text.c_str(), "some text"); EXPECT_TRUE(installer_result.installer_cmd_line.empty()); installer_outcome.installer_error = absl::nullopt; installer_result = MakeInstallerResult(installer_outcome, 10); - EXPECT_EQ(installer_result.error, 10); + EXPECT_EQ(installer_result.error, kErrorApplicationInstallerFailed); + EXPECT_EQ(installer_result.original_error, 10); EXPECT_EQ(installer_result.extended_error, -2); EXPECT_STREQ(installer_result.installer_text.c_str(), "some text"); EXPECT_TRUE(installer_result.installer_cmd_line.empty()); @@ -180,13 +183,15 @@ installer_outcome.installer_text = "some text"; installer_outcome.installer_cmd_line = "some cmd line"; auto installer_result = MakeInstallerResult(installer_outcome, 10); - EXPECT_EQ(installer_result.error, 1); + EXPECT_EQ(installer_result.error, kErrorApplicationInstallerFailed); + EXPECT_EQ(installer_result.original_error, 1); EXPECT_EQ(installer_result.extended_error, -2); EXPECT_FALSE(installer_result.installer_text.empty()); EXPECT_TRUE(installer_result.installer_cmd_line.empty()); installer_outcome.installer_error = absl::nullopt; installer_result = MakeInstallerResult(installer_outcome, 10); - EXPECT_EQ(installer_result.error, 10); + EXPECT_EQ(installer_result.error, kErrorApplicationInstallerFailed); + EXPECT_EQ(installer_result.original_error, 10); EXPECT_EQ(installer_result.extended_error, -2); EXPECT_FALSE(installer_result.installer_text.empty()); EXPECT_TRUE(installer_result.installer_cmd_line.empty()); @@ -200,13 +205,15 @@ installer_outcome.installer_text = "some text"; installer_outcome.installer_cmd_line = "some cmd line"; auto installer_result = MakeInstallerResult(installer_outcome, 10); - EXPECT_EQ(installer_result.error, 1); + EXPECT_EQ(installer_result.error, kErrorApplicationInstallerFailed); + EXPECT_EQ(installer_result.original_error, 1); EXPECT_EQ(installer_result.extended_error, -2); EXPECT_FALSE(installer_result.installer_text.empty()); EXPECT_TRUE(installer_result.installer_cmd_line.empty()); installer_outcome.installer_error = absl::nullopt; installer_result = MakeInstallerResult(installer_outcome, 10); - EXPECT_EQ(installer_result.error, 10); + EXPECT_EQ(installer_result.error, kErrorApplicationInstallerFailed); + EXPECT_EQ(installer_result.original_error, 10); EXPECT_EQ(installer_result.extended_error, -2); EXPECT_FALSE(installer_result.installer_text.empty()); EXPECT_TRUE(installer_result.installer_cmd_line.empty()); @@ -223,14 +230,16 @@ // TODO(crbug.com/1483374): reconcile update_client::InstallError overlaps // with InstallerResult::kExitCode - EXPECT_EQ(installer_result.error, 1); + EXPECT_EQ(installer_result.error, kErrorApplicationInstallerFailed); + EXPECT_EQ(installer_result.original_error, 1); EXPECT_EQ(installer_result.extended_error, -2); EXPECT_EQ(installer_result.installer_text, "some text"); EXPECT_TRUE(installer_result.installer_cmd_line.empty()); // `installer_outcome` overrides the exit code. installer_result = MakeInstallerResult(installer_outcome, 10); - EXPECT_EQ(installer_result.error, 1); + EXPECT_EQ(installer_result.error, kErrorApplicationInstallerFailed); + EXPECT_EQ(installer_result.original_error, 1); EXPECT_EQ(installer_result.extended_error, -2); EXPECT_EQ(installer_result.installer_text, "some text"); EXPECT_TRUE(installer_result.installer_cmd_line.empty());
diff --git a/chromeos/CHROMEOS_LKGM b/chromeos/CHROMEOS_LKGM index 4e1d41f..210293a 100644 --- a/chromeos/CHROMEOS_LKGM +++ b/chromeos/CHROMEOS_LKGM
@@ -1 +1 @@ -15622.0.0 \ No newline at end of file +15623.0.0 \ No newline at end of file
diff --git a/chromeos/ash/components/cryptohome/BUILD.gn b/chromeos/ash/components/cryptohome/BUILD.gn index 883a3e5..8ac77d0 100644 --- a/chromeos/ash/components/cryptohome/BUILD.gn +++ b/chromeos/ash/components/cryptohome/BUILD.gn
@@ -11,6 +11,7 @@ component("cryptohome") { defines = [ "IS_CHROMEOS_ASH_COMPONENTS_CRYPTOHOME_IMPL" ] deps = [ + ":public", "//base", "//chromeos/ash/components/dbus/constants", "//chromeos/ash/components/dbus/cryptohome", @@ -23,6 +24,7 @@ "//components/user_manager", "//components/version_info", ] + public_deps = [ ":public" ] sources = [ "auth_factor.cc", "auth_factor.h", @@ -30,7 +32,6 @@ "auth_factor_conversions.h", "auth_factor_input.cc", "auth_factor_input.h", - "common_types.h", "cryptohome_parameters.cc", "cryptohome_parameters.h", "cryptohome_util.cc", @@ -42,10 +43,19 @@ ] } +source_set("public") { + deps = [ "//base" ] + sources = [ + "common_types.h", + "constants.h", + ] +} + source_set("unit_tests") { testonly = true deps = [ ":cryptohome", + ":public", "//base", "//base/test:test_support", "//chromeos/ash/components/dbus:test_support",
diff --git a/chromeos/ash/components/cryptohome/constants.h b/chromeos/ash/components/cryptohome/constants.h new file mode 100644 index 0000000..3eba96cfa --- /dev/null +++ b/chromeos/ash/components/cryptohome/constants.h
@@ -0,0 +1,25 @@ +// 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 CHROMEOS_ASH_COMPONENTS_CRYPTOHOME_CONSTANTS_H_ +#define CHROMEOS_ASH_COMPONENTS_CRYPTOHOME_CONSTANTS_H_ + +#include "base/time/time.h" + +namespace cryptohome { + +// By default Authsession is valid for 300 seconds after becoming +// authenticated. +constexpr base::TimeDelta kAuthsessionInitialLifetime = base::Minutes(5); + +// When extending Authsession lifetime, we ask to extend it by 60 seconds. +constexpr base::TimeDelta kAuthsessionExtensionPeriod = base::Minutes(1); + +// Chrome would request Authsession lifetime extension when there is +// less than 15 seconds remaining. +constexpr base::TimeDelta kAuthsessionExtendThreshold = base::Seconds(15); + +} // namespace cryptohome + +#endif // CHROMEOS_ASH_COMPONENTS_CRYPTOHOME_CONSTANTS_H_
diff --git a/chromeos/ash/components/cryptohome/userdataauth_util.cc b/chromeos/ash/components/cryptohome/userdataauth_util.cc index 9696c186..6e2f6e08 100644 --- a/chromeos/ash/components/cryptohome/userdataauth_util.cc +++ b/chromeos/ash/components/cryptohome/userdataauth_util.cc
@@ -96,6 +96,9 @@ ReplyToCryptohomeError(const absl::optional<GetAuthSessionStatusReply>&); template COMPONENT_EXPORT(CHROMEOS_ASH_COMPONENTS_CRYPTOHOME) CryptohomeErrorCode + ReplyToCryptohomeError(const absl::optional<ExtendAuthSessionReply>&); +template COMPONENT_EXPORT(CHROMEOS_ASH_COMPONENTS_CRYPTOHOME) + CryptohomeErrorCode ReplyToCryptohomeError(const absl::optional<InvalidateAuthSessionReply>&); template COMPONENT_EXPORT(CHROMEOS_ASH_COMPONENTS_CRYPTOHOME) CryptohomeErrorCode
diff --git a/chromeos/ash/components/dbus/hermes/hermes_manager_client.cc b/chromeos/ash/components/dbus/hermes/hermes_manager_client.cc index 0af0c35..6742764 100644 --- a/chromeos/ash/components/dbus/hermes/hermes_manager_client.cc +++ b/chromeos/ash/components/dbus/hermes/hermes_manager_client.cc
@@ -95,6 +95,9 @@ HermesManagerClient::~HermesManagerClient() { DCHECK_EQ(g_instance, this); + for (auto& observer : observers()) { + observer.OnShutdown(); + } g_instance = nullptr; }
diff --git a/chromeos/ash/components/dbus/hermes/hermes_manager_client.h b/chromeos/ash/components/dbus/hermes/hermes_manager_client.h index 677da6c..6d8fea88 100644 --- a/chromeos/ash/components/dbus/hermes/hermes_manager_client.h +++ b/chromeos/ash/components/dbus/hermes/hermes_manager_client.h
@@ -42,6 +42,9 @@ // Called when a new Euicc objects are added or removed. virtual void OnAvailableEuiccListChanged() {} + + // Called when the Hermes clients are being shut down. + virtual void OnShutdown() {} }; // Adds an observer for carrier profile lists changes on Hermes manager.
diff --git a/chromeos/ash/components/dbus/lorgnette_manager/lorgnette_manager_client_unittest.cc b/chromeos/ash/components/dbus/lorgnette_manager/lorgnette_manager_client_unittest.cc index 08815f2..6928451a 100644 --- a/chromeos/ash/components/dbus/lorgnette_manager/lorgnette_manager_client_unittest.cc +++ b/chromeos/ash/components/dbus/lorgnette_manager/lorgnette_manager_client_unittest.cc
@@ -21,6 +21,7 @@ #include "base/run_loop.h" #include "base/task/thread_pool.h" #include "base/test/bind.h" +#include "base/test/protobuf_matchers.h" #include "base/test/scoped_feature_list.h" #include "base/test/task_environment.h" #include "chromeos/ash/components/dbus/lorgnette/lorgnette_service.pb.h" @@ -33,6 +34,7 @@ #include "third_party/cros_system_api/dbus/lorgnette/dbus-constants.h" #include "third_party/cros_system_api/dbus/service_constants.h" +using ::base::EqualsProto; using ::testing::_; using ::testing::Invoke; using ::testing::Return; @@ -275,15 +277,6 @@ return true; } -// Matcher that verifies two protobufs contain the same data. -MATCHER_P(ProtobufEquals, expected_message, "") { - std::string arg_dumped; - arg.SerializeToString(&arg_dumped); - std::string expected_message_dumped; - expected_message.SerializeToString(&expected_message_dumped); - return arg_dumped == expected_message_dumped; -} - } // namespace class LorgnetteManagerClientTest : public testing::Test { @@ -583,7 +576,7 @@ lorgnette::OpenScannerRequest request; ASSERT_TRUE( dbus::MessageReader(method_call).PopArrayOfBytesAsProto(&request)); - EXPECT_THAT(request, ProtobufEquals(CreateOpenScannerRequest())); + EXPECT_THAT(request, EqualsProto(CreateOpenScannerRequest())); task_environment_.GetMainThreadTaskRunner()->PostTask( FROM_HERE, base::BindOnce(std::move(*callback), open_scanner_response_)); @@ -598,7 +591,7 @@ lorgnette::CloseScannerRequest request; ASSERT_TRUE( dbus::MessageReader(method_call).PopArrayOfBytesAsProto(&request)); - EXPECT_THAT(request, ProtobufEquals(CreateCloseScannerRequest())); + EXPECT_THAT(request, EqualsProto(CreateCloseScannerRequest())); task_environment_.GetMainThreadTaskRunner()->PostTask( FROM_HERE, base::BindOnce(std::move(*callback), close_scanner_response_)); @@ -613,7 +606,7 @@ lorgnette::StartScanRequest request; ASSERT_TRUE( dbus::MessageReader(method_call).PopArrayOfBytesAsProto(&request)); - EXPECT_THAT(request, ProtobufEquals(CreateStartScanRequest())); + EXPECT_THAT(request, EqualsProto(CreateStartScanRequest())); task_environment_.GetMainThreadTaskRunner()->PostTask( FROM_HERE, base::BindOnce(std::move(*callback), start_scan_response_)); } @@ -631,7 +624,7 @@ ASSERT_TRUE(message_reader.PopArrayOfBytesAsProto(&request)); EXPECT_THAT( request, - ProtobufEquals(CreateGetNextImageRequest(response_and_uuid.second))); + EqualsProto(CreateGetNextImageRequest(response_and_uuid.second))); // Save the file descriptor so we can write to it later. EXPECT_TRUE(message_reader.PopFileDescriptor(&fd_)); @@ -650,7 +643,7 @@ lorgnette::CancelScanRequest request; ASSERT_TRUE( dbus::MessageReader(method_call).PopArrayOfBytesAsProto(&request)); - EXPECT_THAT(request, ProtobufEquals(CreateCancelScanRequest())); + EXPECT_THAT(request, EqualsProto(CreateCancelScanRequest())); task_environment_.GetMainThreadTaskRunner()->PostTask( FROM_HERE, base::BindOnce(std::move(*callback), cancel_scan_response_)); } @@ -711,7 +704,7 @@ GetClient()->ListScanners(base::BindLambdaForTesting( [&](absl::optional<lorgnette::ListScannersResponse> result) { ASSERT_TRUE(result.has_value()); - EXPECT_THAT(result.value(), ProtobufEquals(kExpectedResponse)); + EXPECT_THAT(result.value(), EqualsProto(kExpectedResponse)); run_loop.Quit(); })); @@ -742,7 +735,7 @@ GetClient()->ListScanners(base::BindLambdaForTesting( [&](absl::optional<lorgnette::ListScannersResponse> result) { ASSERT_TRUE(result.has_value()); - EXPECT_THAT(result.value(), ProtobufEquals(kExpectedScannerList)); + EXPECT_THAT(result.value(), EqualsProto(kExpectedScannerList)); run_loop.Quit(); })); @@ -873,7 +866,7 @@ run_loop.Run(); - EXPECT_THAT(actual_response, ProtobufEquals(kExpectedScannerList)); + EXPECT_THAT(actual_response, EqualsProto(kExpectedScannerList)); } // Test that the client can retrieve capabilities for a scanner. @@ -891,7 +884,7 @@ base::BindLambdaForTesting( [&](absl::optional<lorgnette::ScannerCapabilities> result) { ASSERT_TRUE(result.has_value()); - EXPECT_THAT(result.value(), ProtobufEquals(kExpectedResponse)); + EXPECT_THAT(result.value(), EqualsProto(kExpectedResponse)); run_loop.Quit(); })); @@ -948,7 +941,7 @@ base::BindLambdaForTesting( [&](absl::optional<lorgnette::OpenScannerResponse> result) { ASSERT_TRUE(result.has_value()); - EXPECT_THAT(result.value(), ProtobufEquals(kExpectedResponse)); + EXPECT_THAT(result.value(), EqualsProto(kExpectedResponse)); run_loop.Quit(); })); @@ -1005,7 +998,7 @@ base::BindLambdaForTesting( [&](absl::optional<lorgnette::CloseScannerResponse> result) { ASSERT_TRUE(result.has_value()); - EXPECT_THAT(result.value(), ProtobufEquals(kExpectedResponse)); + EXPECT_THAT(result.value(), EqualsProto(kExpectedResponse)); run_loop.Quit(); }));
diff --git a/chromeos/ash/components/dbus/printscanmgr/printscanmgr_client_unittest.cc b/chromeos/ash/components/dbus/printscanmgr/printscanmgr_client_unittest.cc index 76ec4d9..a208273 100644 --- a/chromeos/ash/components/dbus/printscanmgr/printscanmgr_client_unittest.cc +++ b/chromeos/ash/components/dbus/printscanmgr/printscanmgr_client_unittest.cc
@@ -12,6 +12,7 @@ #include "base/memory/raw_ptr.h" #include "base/memory/scoped_refptr.h" #include "base/test/bind.h" +#include "base/test/protobuf_matchers.h" #include "base/test/task_environment.h" #include "chromeos/ash/components/dbus/printscanmgr/printscanmgr_service.pb.h" #include "dbus/message.h" @@ -22,6 +23,7 @@ #include "testing/gtest/include/gtest/gtest.h" #include "third_party/cros_system_api/dbus/service_constants.h" +using ::base::EqualsProto; using ::testing::_; using ::testing::Return; @@ -106,15 +108,6 @@ return true; } -// Matcher that veries two protobufs contain the same data. -MATCHER_P(ProtobufEquals, expected_message, "") { - std::string arg_dumped; - arg.SerializeToString(&arg_dumped); - std::string expected_message_dumped; - expected_message.SerializeToString(&expected_message_dumped); - return arg_dumped == expected_message_dumped; -} - } // namespace class PrintscanmgrClientTest : public testing::Test { @@ -212,8 +205,8 @@ printscanmgr::CupsAddManuallyConfiguredPrinterRequest request; ASSERT_TRUE( dbus::MessageReader(method_call).PopArrayOfBytesAsProto(&request)); - EXPECT_THAT(request, ProtobufEquals( - CreateCupsAddManuallyConfiguredPrinterRequest())); + EXPECT_THAT(request, + EqualsProto(CreateCupsAddManuallyConfiguredPrinterRequest())); task_environment_.GetMainThreadTaskRunner()->PostTask( FROM_HERE, base::BindOnce(std::move(*callback), @@ -231,7 +224,7 @@ ASSERT_TRUE( dbus::MessageReader(method_call).PopArrayOfBytesAsProto(&request)); EXPECT_THAT(request, - ProtobufEquals(CreateCupsAddAutoConfiguredPrinterRequest())); + EqualsProto(CreateCupsAddAutoConfiguredPrinterRequest())); task_environment_.GetMainThreadTaskRunner()->PostTask( FROM_HERE, base::BindOnce(std::move(*callback), cups_add_autoconfigured_printer_response_, @@ -246,7 +239,7 @@ printscanmgr::CupsRemovePrinterRequest request; ASSERT_TRUE( dbus::MessageReader(method_call).PopArrayOfBytesAsProto(&request)); - EXPECT_THAT(request, ProtobufEquals(CreateCupsRemovePrinterRequest())); + EXPECT_THAT(request, EqualsProto(CreateCupsRemovePrinterRequest())); task_environment_.GetMainThreadTaskRunner()->PostTask( FROM_HERE, base::BindOnce(std::move(*callback), cups_remove_printer_response_)); @@ -260,7 +253,7 @@ printscanmgr::CupsRetrievePpdRequest request; ASSERT_TRUE( dbus::MessageReader(method_call).PopArrayOfBytesAsProto(&request)); - EXPECT_THAT(request, ProtobufEquals(CreateCupsRetrievePpdRequest())); + EXPECT_THAT(request, EqualsProto(CreateCupsRetrievePpdRequest())); task_environment_.GetMainThreadTaskRunner()->PostTask( FROM_HERE, base::BindOnce(std::move(*callback), cups_retrieve_ppd_response_)); @@ -303,7 +296,7 @@ [&](absl::optional< printscanmgr::CupsAddManuallyConfiguredPrinterResponse> result) { ASSERT_TRUE(result.has_value()); - EXPECT_THAT(result.value(), ProtobufEquals(kExpectedResponse)); + EXPECT_THAT(result.value(), EqualsProto(kExpectedResponse)); run_loop.Quit(); })); @@ -325,7 +318,7 @@ [&](absl::optional< printscanmgr::CupsAddManuallyConfiguredPrinterResponse> result) { ASSERT_TRUE(result.has_value()); - EXPECT_THAT(result.value(), ProtobufEquals(kExpectedResponse)); + EXPECT_THAT(result.value(), EqualsProto(kExpectedResponse)); run_loop.Quit(); })); @@ -349,7 +342,7 @@ [&](absl::optional< printscanmgr::CupsAddManuallyConfiguredPrinterResponse> result) { ASSERT_TRUE(result.has_value()); - EXPECT_THAT(result.value(), ProtobufEquals(kExpectedResponse)); + EXPECT_THAT(result.value(), EqualsProto(kExpectedResponse)); run_loop.Quit(); })); @@ -373,7 +366,7 @@ [&](absl::optional<printscanmgr::CupsAddAutoConfiguredPrinterResponse> result) { ASSERT_TRUE(result.has_value()); - EXPECT_THAT(result.value(), ProtobufEquals(kExpectedResponse)); + EXPECT_THAT(result.value(), EqualsProto(kExpectedResponse)); run_loop.Quit(); })); @@ -395,7 +388,7 @@ [&](absl::optional<printscanmgr::CupsAddAutoConfiguredPrinterResponse> result) { ASSERT_TRUE(result.has_value()); - EXPECT_THAT(result.value(), ProtobufEquals(kExpectedResponse)); + EXPECT_THAT(result.value(), EqualsProto(kExpectedResponse)); run_loop.Quit(); })); @@ -418,7 +411,7 @@ [&](absl::optional<printscanmgr::CupsAddAutoConfiguredPrinterResponse> result) { ASSERT_TRUE(result.has_value()); - EXPECT_THAT(result.value(), ProtobufEquals(kExpectedResponse)); + EXPECT_THAT(result.value(), EqualsProto(kExpectedResponse)); run_loop.Quit(); })); @@ -441,7 +434,7 @@ base::BindLambdaForTesting( [&](absl::optional<printscanmgr::CupsRemovePrinterResponse> result) { ASSERT_TRUE(result.has_value()); - EXPECT_THAT(result.value(), ProtobufEquals(kExpectedResponse)); + EXPECT_THAT(result.value(), EqualsProto(kExpectedResponse)); run_loop.Quit(); }), base::BindLambdaForTesting([&]() { error_callback_called = true; })); @@ -508,7 +501,7 @@ base::BindLambdaForTesting( [&](absl::optional<printscanmgr::CupsRetrievePpdResponse> result) { ASSERT_TRUE(result.has_value()); - EXPECT_THAT(result.value(), ProtobufEquals(kExpectedResponse)); + EXPECT_THAT(result.value(), EqualsProto(kExpectedResponse)); run_loop.Quit(); }), base::BindLambdaForTesting([&]() { error_callback_called = true; }));
diff --git a/chromeos/ash/components/dbus/userdataauth/BUILD.gn b/chromeos/ash/components/dbus/userdataauth/BUILD.gn index 7c9201e..0605c1b 100644 --- a/chromeos/ash/components/dbus/userdataauth/BUILD.gn +++ b/chromeos/ash/components/dbus/userdataauth/BUILD.gn
@@ -15,6 +15,7 @@ deps = [ ":userdataauth_proto", "//base", + "//chromeos/ash/components/cryptohome:public", "//chromeos/ash/components/dbus/cryptohome", "//chromeos/ash/components/dbus/cryptohome:cryptohome_proto", "//chromeos/dbus/common",
diff --git a/chromeos/ash/components/dbus/userdataauth/DEPS b/chromeos/ash/components/dbus/userdataauth/DEPS index 7aecc6f..02e6637 100644 --- a/chromeos/ash/components/dbus/userdataauth/DEPS +++ b/chromeos/ash/components/dbus/userdataauth/DEPS
@@ -1,3 +1,4 @@ include_rules = [ - "+third_party/protobuf/src/google/protobuf" + "+third_party/protobuf/src/google/protobuf", + "+chromeos/ash/components/cryptohome/constants.h", ]
diff --git a/chromeos/ash/components/dbus/userdataauth/fake_userdataauth_client.cc b/chromeos/ash/components/dbus/userdataauth/fake_userdataauth_client.cc index b018e95c..4955f94 100644 --- a/chromeos/ash/components/dbus/userdataauth/fake_userdataauth_client.cc +++ b/chromeos/ash/components/dbus/userdataauth/fake_userdataauth_client.cc
@@ -20,6 +20,8 @@ #include "base/strings/stringprintf.h" #include "base/task/single_thread_task_runner.h" #include "base/threading/thread_restrictions.h" +#include "base/time/time.h" +#include "chromeos/ash/components/cryptohome/constants.h" #include "chromeos/ash/components/dbus/cryptohome/UserDataAuth.pb.h" #include "chromeos/ash/components/dbus/cryptohome/rpc.pb.h" #include "third_party/abseil-cpp/absl/types/variant.h" @@ -107,10 +109,6 @@ // The number of updates the MigrateToDircrypto will send before it completes. constexpr uint64_t kDircryptoMigrationMaxProgress = 15; -// Timeout after which an authenticated session is destroyed by the real -// cryptohome service. -constexpr int kSessionTimeoutSeconds = 5 * 60; - // Template for auth session ID. constexpr char kAuthSessionIdTemplate[] = "AuthSession-%d"; @@ -1063,6 +1061,10 @@ } auth_session.authenticated = true; + // TODO(b/301078137): once proto includes lifetime information, add it + // to the reply. + auth_session.lifetime = + base::Time::Now() + cryptohome::kAuthsessionInitialLifetime; } void FakeUserDataAuthClient::PreparePersistentVault( @@ -1169,8 +1171,13 @@ ReplyOnReturn auto_reply(&reply, std::move(callback)); auto error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; - GetAuthenticatedAuthSession(request.auth_session_id(), &error); + auto* session_data = + GetAuthenticatedAuthSession(request.auth_session_id(), &error); reply.set_error(error); + if (session_data) { + auth_sessions_.find(request.auth_session_id())->second.lifetime = + base::Time::Now() + base::Seconds(request.extension_duration()); + } } void FakeUserDataAuthClient::AddAuthFactor( @@ -1310,8 +1317,10 @@ session.authenticated = true; session.authorized_auth_session_intent.Put( session.requested_auth_session_intent); + session.lifetime = + base::Time::Now() + cryptohome::kAuthsessionInitialLifetime; reply.add_authorized_for(session.requested_auth_session_intent); - reply.set_seconds_left(kSessionTimeoutSeconds); + reply.set_seconds_left(cryptohome::kAuthsessionInitialLifetime.InSeconds()); } void FakeUserDataAuthClient::UpdateAuthFactor( @@ -1398,7 +1407,6 @@ const std::string auth_session_id = request.auth_session_id(); auto auth_session = auth_sessions_.find(auth_session_id); - // Check if the token refers to a valid AuthSession. if (auth_session == auth_sessions_.end()) { reply.set_error(CryptohomeErrorCode::CRYPTOHOME_INVALID_AUTH_SESSION_TOKEN); @@ -1409,9 +1417,15 @@ ::user_data_auth::AUTH_SESSION_STATUS_FURTHER_FACTOR_REQUIRED); return; } + base::TimeDelta time_left = auth_session->second.lifetime - base::Time::Now(); + if (time_left.is_negative()) { + reply.set_status( + ::user_data_auth::AUTH_SESSION_STATUS_INVALID_AUTH_SESSION); + return; + } reply.set_status(::user_data_auth::AUTH_SESSION_STATUS_AUTHENTICATED); // Use 5 minutes timeout - as if auth session has just started. - reply.set_time_left(5 * 60); + reply.set_time_left(time_left.InSeconds()); } void FakeUserDataAuthClient::PrepareAuthFactor(
diff --git a/chromeos/ash/components/dbus/userdataauth/fake_userdataauth_client.h b/chromeos/ash/components/dbus/userdataauth/fake_userdataauth_client.h index ce33124b..f6ea8b3 100644 --- a/chromeos/ash/components/dbus/userdataauth/fake_userdataauth_client.h +++ b/chromeos/ash/components/dbus/userdataauth/fake_userdataauth_client.h
@@ -191,6 +191,7 @@ // Indication that session is set to listen for FP events. bool is_listening_for_fingerprint_events = false; + base::Time lifetime; }; FakeUserDataAuthClient();
diff --git a/chromeos/ash/components/login/auth/public/user_context.cc b/chromeos/ash/components/login/auth/public/user_context.cc index c03c886..4a63882 100644 --- a/chromeos/ash/components/login/auth/public/user_context.cc +++ b/chromeos/ash/components/login/auth/public/user_context.cc
@@ -91,6 +91,7 @@ const std::string& broadcast_id) { LOG_IF(WARNING, !authsession_id_.empty()) << "Overwriting existing auth session ID"; + DCHECK(authsession_id_.empty()); authsession_id_ = authsession_id; broadcast_id_ = broadcast_id; }
diff --git a/chromeos/ash/components/login/auth/public/user_context.h b/chromeos/ash/components/login/auth/public/user_context.h index aedf770..5ab3a87e 100644 --- a/chromeos/ash/components/login/auth/public/user_context.h +++ b/chromeos/ash/components/login/auth/public/user_context.h
@@ -83,6 +83,7 @@ base::Time GetSessionLifetime() const; void SetSessionLifetime(const base::Time& valid_until); + void AddAuthorizedIntent(AuthSessionIntent auth_intent); AuthSessionIntents GetAuthorizedIntents() const; @@ -236,6 +237,7 @@ void ResetAuthSessionIds(); const std::string& GetAuthSessionId() const; const std::string& GetBroadcastId() const; + base::Time GetSessionLifetime() const; void SetSessionLifetime(const base::Time& valid_until);
diff --git a/chromeos/ash/components/network/BUILD.gn b/chromeos/ash/components/network/BUILD.gn index 657c5b5..06260d3d 100644 --- a/chromeos/ash/components/network/BUILD.gn +++ b/chromeos/ash/components/network/BUILD.gn
@@ -73,6 +73,8 @@ "cellular_esim_profile_handler.h", "cellular_esim_profile_handler_impl.cc", "cellular_esim_profile_handler_impl.h", + "cellular_esim_profile_waiter.cc", + "cellular_esim_profile_waiter.h", "cellular_esim_uninstall_handler.cc", "cellular_esim_uninstall_handler.h", "cellular_inhibitor.cc", @@ -123,6 +125,8 @@ "managed_network_configuration_handler_impl.h", "managed_state.cc", "managed_state.h", + "network_3gpp_handler.cc", + "network_3gpp_handler.h", "network_activation_handler.h", "network_activation_handler_impl.cc", "network_activation_handler_impl.h", @@ -228,6 +232,8 @@ "//testing/gtest", ] sources = [ + "fake_network_3gpp_handler.cc", + "fake_network_3gpp_handler.h", "fake_network_activation_handler.cc", "fake_network_activation_handler.h", "fake_network_connection_handler.cc", @@ -309,6 +315,7 @@ "cellular_esim_installer_unittest.cc", "cellular_esim_profile_handler_impl_unittest.cc", "cellular_esim_profile_unittest.cc", + "cellular_esim_profile_waiter_unittest.cc", "cellular_esim_uninstall_handler_unittest.cc", "cellular_inhibitor_unittest.cc", "cellular_metrics_logger_unittest.cc", @@ -330,6 +337,7 @@ "hotspot_state_handler_unittest.cc", "managed_cellular_pref_handler_unittest.cc", "managed_network_configuration_handler_unittest.cc", + "network_3gpp_handler_unittest.cc", "network_cert_loader_unittest.cc", "network_configuration_handler_unittest.cc", "network_connect_unittest.cc",
diff --git a/chromeos/ash/components/network/cellular_esim_profile_handler.cc b/chromeos/ash/components/network/cellular_esim_profile_handler.cc index 6bb876050..90b8caa 100644 --- a/chromeos/ash/components/network/cellular_esim_profile_handler.cc +++ b/chromeos/ash/components/network/cellular_esim_profile_handler.cc
@@ -8,6 +8,7 @@ #include "base/check.h" #include "base/strings/utf_string_conversions.h" #include "base/task/single_thread_task_runner.h" +#include "chromeos/ash/components/network/cellular_esim_profile_waiter.h" #include "chromeos/ash/components/network/cellular_utils.h" #include "chromeos/ash/components/network/hermes_metrics_util.h" #include "chromeos/ash/components/network/metrics/cellular_network_metrics_logger.h" @@ -16,6 +17,11 @@ namespace ash { namespace { +// The amount of time to wait for Hermes to update the properties expected of a +// pending profile before collecting profile properties for +// RequestAvailableProfiles(). +constexpr base::TimeDelta kCellularESimProfileWaiterDelay = base::Seconds(30); + // Delay before profile refresh callback is called. This ensures that eSIM // profiles are updated before callback returns. constexpr base::TimeDelta kProfileRefreshCallbackDelay = @@ -223,32 +229,63 @@ DCHECK(info->callback); DCHECK(inhibit_lock); - if (info->smds_activation_codes.empty()) { - // TODO(b/278135630): Emit - // Network.Ash.Cellular.ESim.SMDSScan.{SMDSType}.{ResultType}. - NET_LOG(EVENT) << "Finished requesting available profiles"; - CellularNetworkMetricsLogger::LogSmdsScanProfileCount( - info->profile_list.size()); - std::move(info->callback) - .Run(cellular_setup::mojom::ESimOperationResult::kSuccess, - std::move(info->profile_list)); + if (!info->smds_activation_codes.empty()) { + NET_LOG(EVENT) << "Requesting available profiles"; + + // Remove one SM-DS activation code from the list and use this activation + // code for the next SM-DS scan. This logic is responsible for making sure + // we only scan each activation code once, avoiding an infinite loop. + const std::string smds_activation_code = info->smds_activation_codes.back(); + info->smds_activation_codes.pop_back(); + + HermesEuiccClient::Get()->RefreshSmdxProfiles( + euicc_path, smds_activation_code, + /*restore_slot=*/true, + base::BindOnce(&CellularESimProfileHandler::OnRequestAvailableProfiles, + weak_ptr_factory_.GetWeakPtr(), euicc_path, + std::move(info), std::move(inhibit_lock))); return; } - NET_LOG(EVENT) << "Requesting available profiles"; + NET_LOG(EVENT) << "Finished requesting available profiles"; - // Remove one SM-DS activation code from the list and use this activation code - // for the next SM-DS scan. This logic is responsible for making sure we only - // scan each activation code once, avoiding an infinite loop. - const std::string smds_activation_code = info->smds_activation_codes.back(); - info->smds_activation_codes.pop_back(); + // TODO(b/278135630): Emit + // Network.Ash.Cellular.ESim.SMDSScan.{SMDSType}.{ResultType}. + CellularNetworkMetricsLogger::LogSmdsScanProfileCount( + info->profile_paths.size()); - HermesEuiccClient::Get()->RefreshSmdxProfiles( - euicc_path, smds_activation_code, - /*restore_slot=*/true, - base::BindOnce(&CellularESimProfileHandler::OnRequestAvailableProfiles, - weak_ptr_factory_.GetWeakPtr(), euicc_path, - std::move(info), std::move(inhibit_lock))); + std::unique_ptr<CellularESimProfileWaiter> waiter = + std::make_unique<CellularESimProfileWaiter>(); + for (const auto& profile_path : info->profile_paths) { + waiter->RequirePendingProfile(profile_path); + } + + auto split = base::SplitOnceCallback(std::move(info->callback)); + info->callback = std::move(split.first); + + auto on_success = base::BindOnce(base::BindOnce( + &CellularESimProfileHandler::CompleteRequestAvailableProfiles, + weak_ptr_factory_.GetWeakPtr(), euicc_path, std::move(info))); + auto on_shutdown = base::BindOnce( + [](RequestAvailableProfilesCallback callback) { + std::move(callback).Run( + cellular_setup::mojom::ESimOperationResult::kSuccess, + std::vector<CellularESimProfile>()); + }, + std::move(split.second)); + + waiter->Wait(std::move(on_success), std::move(on_shutdown)); + + if (waiter->waiting()) { + base::SingleThreadTaskRunner::GetCurrentDefault()->PostDelayedTask( + FROM_HERE, + base::BindOnce( + [](std::unique_ptr<CellularESimProfileWaiter> waiter) { + waiter.reset(); + }, + std::move(waiter)), + kCellularESimProfileWaiterDelay); + } } void CellularESimProfileHandler::OnRequestAvailableProfiles( @@ -261,23 +298,33 @@ DCHECK(info->callback); DCHECK(inhibit_lock); - // TODO(b/278135481): Emit - // Network.Ash.Cellular.ESim.SMDSScan.{SMDSType}.Duration. - // TODO(b/278135630): Emit - // Network.Ash.Cellular.ESim.SMDSScan.{SMDSType}.{ResultType}. - // Each SM-DS scan will return both a result and zero or more available - // profiles. An error being returned indicates there was an issue when - // performing the scan, but since it does not invalidate the returned profiles - // we simply log the error, capture the error in our metrics, and continue. - NET_LOG(EVENT) - << "HermesEuiccClient::RefreshSmdxProfiles returned with result code " - << status; + for (const auto& profile_path : profile_paths) { + info->profile_paths.emplace_back(profile_path.value()); + } + + // This function is provided as a callback to + // PerformRequestAvailableProfiles() to be called when an SM-DS scan + // completes. Since the activation code used in this function may not have + // been the last needed, continue the loop. When |info.smds_activation_codes| + // is empty PerformRequestAvailableProfiles() will exit this loop by invoking + // |info.callback|. + PerformRequestAvailableProfiles(euicc_path, std::move(info), + std::move(inhibit_lock)); +} + +void CellularESimProfileHandler::CompleteRequestAvailableProfiles( + const dbus::ObjectPath& euicc_path, + std::unique_ptr<RequestAvailableProfilesInfo> info) { + DCHECK(info); + DCHECK(info->callback); + + std::vector<CellularESimProfile> profile_list; HermesEuiccClient::Properties* euicc_properties = HermesEuiccClient::Get()->GetProperties(euicc_path); DCHECK(euicc_properties); - for (const auto& profile_path : profile_paths) { + for (const auto& profile_path : info->profile_paths) { HermesProfileClient::Properties* profile_properties = HermesProfileClient::Get()->GetProperties(profile_path); if (!profile_properties) { @@ -292,10 +339,19 @@ << profile_properties->state().value(); continue; } + if (profile_properties->name().value().empty()) { + NET_LOG(ERROR) << "Expected available profile to have a non-empty name"; + continue; + } + if (profile_properties->activation_code().value().empty()) { + NET_LOG(ERROR) + << "Expected available profile to have a non-empty activation code"; + continue; + } NET_LOG(EVENT) << "Found available profile"; - info->profile_list.emplace_back( + profile_list.emplace_back( CellularESimProfile::State::kPending, profile_path, euicc_properties->eid().value(), profile_properties->iccid().value(), base::UTF8ToUTF16(profile_properties->name().value()), @@ -304,14 +360,9 @@ profile_properties->activation_code().value()); } - // This function is provided as a callback to - // PerformRequestAvailableProfiles() to be called when an SM-DS scan - // completes. Since the activation code used in this function may not have - // been the last needed, continue the loop. When |info.smds_activation_codes| - // is empty PerformRequestAvailableProfiles() will exit this loop by invoking - // |info.callback|. - PerformRequestAvailableProfiles(euicc_path, std::move(info), - std::move(inhibit_lock)); + std::move(info->callback) + .Run(cellular_setup::mojom::ESimOperationResult::kSuccess, + std::move(profile_list)); } } // namespace ash
diff --git a/chromeos/ash/components/network/cellular_esim_profile_handler.h b/chromeos/ash/components/network/cellular_esim_profile_handler.h index ee9b162..60810df 100644 --- a/chromeos/ash/components/network/cellular_esim_profile_handler.h +++ b/chromeos/ash/components/network/cellular_esim_profile_handler.h
@@ -137,9 +137,9 @@ // available profiles. std::vector<std::string> smds_activation_codes; - // The list of available profiles found from scanning with activation codes + // The list of paths to profiles found when scanning with activation codes // from |smds_activation_codes|. - std::vector<CellularESimProfile> profile_list; + std::vector<dbus::ObjectPath> profile_paths; RequestAvailableProfilesCallback callback; }; @@ -187,6 +187,9 @@ std::unique_ptr<CellularInhibitor::InhibitLock> inhibit_lock, HermesResponseStatus status, const std::vector<dbus::ObjectPath>& profile_paths); + void CompleteRequestAvailableProfiles( + const dbus::ObjectPath& euicc_path, + std::unique_ptr<RequestAvailableProfilesInfo> info); raw_ptr<CellularInhibitor, ExperimentalAsh> cellular_inhibitor_ = nullptr;
diff --git a/chromeos/ash/components/network/cellular_esim_profile_handler_impl_unittest.cc b/chromeos/ash/components/network/cellular_esim_profile_handler_impl_unittest.cc index e19aaf0..5277c07 100644 --- a/chromeos/ash/components/network/cellular_esim_profile_handler_impl_unittest.cc +++ b/chromeos/ash/components/network/cellular_esim_profile_handler_impl_unittest.cc
@@ -43,6 +43,10 @@ constexpr base::TimeDelta kInteractiveDelay = base::Seconds(30); +std::string CreateTestProfilePath(int profile_num) { + return base::StringPrintf("%s%02d", kTestProfileBasePath, profile_num); +} + std::string CreateTestEuiccPath(int euicc_num) { return base::StringPrintf("%s%d", kTestEuiccBasePath, euicc_num); } @@ -140,8 +144,7 @@ hermes::profile::ProfileClass profile_class = hermes::profile::ProfileClass::kOperational, bool blank_iccid = false) { - dbus::ObjectPath path(base::StringPrintf("%s%02d", kTestProfileBasePath, - num_profiles_created_)); + dbus::ObjectPath path(CreateTestProfilePath(num_profiles_created_)); std::string iccid; if (!blank_iccid) { @@ -1126,6 +1129,99 @@ } TEST_F(CellularESimProfileHandlerImplTest_SmdsSupportEnabled, + RequestAvailableProfiles_WaitForProfileProperties) { + AddCellularDevice(); + AddEuicc(/*euicc_num=*/1); + Init(); + SetDevicePrefs(); + + base::HistogramTester histogram_tester; + + HermesEuiccClient::Get()->GetTestInterface()->SetInteractiveDelay( + kInteractiveDelay); + + const dbus::ObjectPath euicc_path(CreateTestEuiccPath(1)); + const std::vector<std::string> smds_activation_codes = + cellular_utils::GetSmdsActivationCodes(); + + // Create profiles with activation codes that match all of the activation + // codes that will be used to perform SM-DS scans. These profiles will have an + // activation code, but are missing a name and have an incorrect state. These + // properties should be set before RequestAvailableProfiles() returns. + std::vector<dbus::ObjectPath> profile_paths; + for (const auto& smds_activation_code : smds_activation_codes) { + const dbus::ObjectPath profile_path( + CreateTestProfilePath(profile_paths.size())); + HermesEuiccClient::Get()->GetTestInterface()->AddCarrierProfile( + profile_path, euicc_path, + /*iccid=*/"", + /*name=*/"", + /*nickname=*/"", + /*service_provider=*/"", + /*activation_code=*/smds_activation_code, + /*network_service_path=*/"", + /*state=*/hermes::profile::State::kPending, + /*profile_class=*/hermes::profile::ProfileClass::kOperational, + /*add_carrier_profile_behavior=*/ + HermesEuiccClient::TestInterface::AddCarrierProfileBehavior:: + kAddProfileWithService); + base::RunLoop().RunUntilIdle(); + + profile_paths.push_back(profile_path); + } + + absl::optional<ESimOperationResult> result; + absl::optional<std::vector<CellularESimProfile>> profile_list; + + base::RunLoop run_loop; + RequestAvailableProfiles( + /*euicc_num=*/1, + base::BindLambdaForTesting( + [&](ESimOperationResult returned_result, + std::vector<CellularESimProfile> returned_profile_list) { + result = returned_result; + profile_list = returned_profile_list; + run_loop.Quit(); + })); + + // Skip forward the amount of time needed to complete all of the SM-DS scans. + for (size_t i = 0; i < smds_activation_codes.size(); ++i) { + task_environment()->FastForwardBy(kInteractiveDelay); + base::RunLoop().RunUntilIdle(); + } + + EXPECT_FALSE(profile_list.has_value()); + + for (const auto& profile_path : profile_paths) { + HermesProfileClient::Properties* profile_properties = + HermesProfileClient::Get()->GetProperties(profile_path); + ASSERT_TRUE(profile_properties); + profile_properties->state().ReplaceValue( + /*value=*/hermes::profile::State::kPending); + } + base::RunLoop().RunUntilIdle(); + EXPECT_FALSE(profile_list.has_value()); + + for (const auto& profile_path : profile_paths) { + HermesProfileClient::Properties* profile_properties = + HermesProfileClient::Get()->GetProperties(profile_path); + ASSERT_TRUE(profile_properties); + profile_properties->name().ReplaceValue( + /*value=*/"name"); + } + run_loop.Run(); + ASSERT_TRUE(profile_list.has_value()); + EXPECT_EQ(smds_activation_codes.size(), profile_list->size()); + + histogram_tester.ExpectTotalCount( + CellularNetworkMetricsLogger::kSmdsScanProfileCount, + /*expected_count=*/1); + EXPECT_EQ(static_cast<int64_t>(smds_activation_codes.size()), + histogram_tester.GetTotalSum( + CellularNetworkMetricsLogger::kSmdsScanProfileCount)); +} + +TEST_F(CellularESimProfileHandlerImplTest_SmdsSupportEnabled, RequestAvailableProfiles_FailToInhibit) { AddCellularDevice(); AddEuicc(/*euicc_num=*/1);
diff --git a/chromeos/ash/components/network/cellular_esim_profile_waiter.cc b/chromeos/ash/components/network/cellular_esim_profile_waiter.cc new file mode 100644 index 0000000..dde1ef2b --- /dev/null +++ b/chromeos/ash/components/network/cellular_esim_profile_waiter.cc
@@ -0,0 +1,143 @@ +// 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 "chromeos/ash/components/network/cellular_esim_profile_waiter.h" + +#include <string> +#include "base/check.h" +#include "base/containers/flat_map.h" +#include "base/functional/callback_forward.h" +#include "base/scoped_observation.h" +#include "chromeos/ash/components/dbus/hermes/hermes_profile_client.h" +#include "components/device_event_log/device_event_log.h" +#include "dbus/object_path.h" +#include "dbus/property.h" + +namespace ash { + +CellularESimProfileWaiter::CellularESimProfileWaiter() = default; + +CellularESimProfileWaiter::~CellularESimProfileWaiter() { + hermes_manager_client_observer_.Reset(); + hermes_profile_client_observer_.Reset(); + if (!on_success_.is_null()) { + NET_LOG(EVENT) + << "CellularESimProfileWaiter was destructed while waiting for " + << "all of the conditions to be satisfied"; + std::move(on_success_).Run(); + } + on_shutdown_.Reset(); +} + +void CellularESimProfileWaiter::RequirePendingProfile( + const dbus::ObjectPath& profile_path) { + AddCondition( + profile_path, + base::BindRepeating( + [](HermesProfileClient::Properties* profile_properties) { + return profile_properties && + profile_properties->state().value() == + hermes::profile::State::kPending && + !profile_properties->name().value().empty() && + !profile_properties->activation_code().value().empty(); + })); +} + +void CellularESimProfileWaiter::Wait(base::OnceCallback<void()> on_success, + base::OnceCallback<void()> on_shutdown) { + DCHECK(on_success_.is_null() && !on_success.is_null()); + DCHECK(on_shutdown_.is_null() && !on_shutdown.is_null()); + on_success_ = std::move(on_success); + on_shutdown_ = std::move(on_shutdown); + + if (profile_path_to_condition_.empty()) { + std::move(on_success_).Run(); + on_shutdown_.Reset(); + return; + } + + hermes_manager_client_observer_.Observe(HermesManagerClient::Get()); + hermes_profile_client_observer_.Observe(HermesProfileClient::Get()); + + for (auto entry = profile_path_to_condition_.begin(); + entry != profile_path_to_condition_.end();) { + if (EvaluateCondition(entry->first, entry->second)) { + entry = profile_path_to_condition_.erase(entry); + } else { + entry++; + } + } + MaybeFinish(); +} + +bool CellularESimProfileWaiter::waiting() const { + return !profile_path_to_condition_.empty(); +} + +void CellularESimProfileWaiter::OnShutdown() { + NET_LOG(EVENT) << "Hermes clients shut down while waiting for all of the " + << "conditions to be satisfied"; + + hermes_manager_client_observer_.Reset(); + hermes_profile_client_observer_.Reset(); + + profile_path_to_condition_.clear(); + + DCHECK(!on_shutdown_.is_null()); + + on_success_.Reset(); + std::move(on_shutdown_).Run(); +} + +void CellularESimProfileWaiter::OnCarrierProfilePropertyChanged( + const dbus::ObjectPath& object_path, + const std::string& property_name) { + auto entry = profile_path_to_condition_.find(object_path); + if (entry == profile_path_to_condition_.end()) { + return; + } + if (EvaluateCondition(/*profile_path=*/entry->first, + /*condition=*/entry->second)) { + profile_path_to_condition_.erase(entry->first); + } + MaybeFinish(); +} + +void CellularESimProfileWaiter::AddCondition( + const dbus::ObjectPath& profile_path, + Condition condition) { + DCHECK(!condition.is_null()); + profile_path_to_condition_.insert_or_assign(profile_path, + std::move(condition)); +} + +bool CellularESimProfileWaiter::EvaluateCondition( + const dbus::ObjectPath& profile_path, + const Condition& condition) { + HermesProfileClient::Properties* profile_properties = + HermesProfileClient::Get()->GetProperties(profile_path); + if (!profile_properties) { + return false; + } + return condition.Run(profile_properties); +} + +void CellularESimProfileWaiter::MaybeFinish() { + if (!profile_path_to_condition_.empty()) { + return; + } + hermes_manager_client_observer_.Reset(); + hermes_profile_client_observer_.Reset(); + + if (on_success_.is_null()) { + return; + } + + NET_LOG(EVENT) << "All conditions have been satisfied"; + + std::move(on_success_).Run(); + on_shutdown_.Reset(); +} + +} // namespace ash
diff --git a/chromeos/ash/components/network/cellular_esim_profile_waiter.h b/chromeos/ash/components/network/cellular_esim_profile_waiter.h new file mode 100644 index 0000000..3b3da01 --- /dev/null +++ b/chromeos/ash/components/network/cellular_esim_profile_waiter.h
@@ -0,0 +1,109 @@ +// 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 CHROMEOS_ASH_COMPONENTS_NETWORK_CELLULAR_ESIM_PROFILE_WAITER_H_ +#define CHROMEOS_ASH_COMPONENTS_NETWORK_CELLULAR_ESIM_PROFILE_WAITER_H_ + +#include <string> + +#include "base/check.h" +#include "base/component_export.h" +#include "base/containers/flat_map.h" +#include "base/functional/callback_forward.h" +#include "base/scoped_observation.h" +#include "chromeos/ash/components/dbus/hermes/hermes_manager_client.h" +#include "chromeos/ash/components/dbus/hermes/hermes_profile_client.h" +#include "dbus/object_path.h" +#include "dbus/property.h" + +namespace ash { + +// This class performs a best-effort attempt at waiting until specified Hermes +// profiles meet specified conditions regarding their properties to invoke a +// provided callback. The provided callback will be invoked if the destructor is +// called and the callback hadn't previously been invoked. This guarantee allows +// clients to pass ownership of instances of this class to delayed tasks, +// resulting in the callback being called as soon as the conditions are met or +// upon destruction when the task completes. +class COMPONENT_EXPORT(CHROMEOS_NETWORK) CellularESimProfileWaiter + : public HermesManagerClient::Observer, + public HermesProfileClient::Observer { + public: + // Comparison function that should return |true| IFF the provided Hermes + // properties have reached a desired state. + using Condition = + base::RepeatingCallback<bool(HermesProfileClient::Properties*)>; + + CellularESimProfileWaiter(); + CellularESimProfileWaiter(const CellularESimProfileWaiter&) = delete; + CellularESimProfileWaiter& operator=(const CellularESimProfileWaiter&) = + delete; + ~CellularESimProfileWaiter() override; + + // This is a helper function used to add a condition that the profile at + // |profile_path| has the properties that are expected of a pending eSIM + // profile to be set. + void RequirePendingProfile(const dbus::ObjectPath& profile_path); + + // This function is used to begin watching for Hermes profile property + // changes. This function will perform an initial check of whether all of the + // conditions have already been met; if so, the |on_success| callback will be + // immediately called. Clients should confirm whether they need to continue + // waiting after calling this method since all conditions may be satisfied + // without delay. + // + // If the Hermes clients are shut down and the specified conditions have not + // been met the |on_shutdown| callback will be called. + void Wait(base::OnceCallback<void()> on_success, + base::OnceCallback<void()> on_shutdown); + + // Returns whether we are waiting for all conditions to be met. + bool waiting() const; + + private: + friend class CellularESimProfileWaiterTest; + + // HermesManagerClient::Observer: + void OnShutdown() override; + + // HermesProfileClient::Observer: + void OnCarrierProfilePropertyChanged( + const dbus::ObjectPath& object_path, + const std::string& property_name) override; + + // This function is used to add a condition to wait on. The |profile_path| + // argument should be the path to an Hermes profile and |condition| should be + // a function that evaluates |true| IFF the profile is in the desired state. + // The profile does not need to exist at the time this method is called. + void AddCondition(const dbus::ObjectPath& profile_path, Condition condition); + + // This function returns whether |condition| is satisfied for the Hermes + // profile at |profile_path|. + bool EvaluateCondition(const dbus::ObjectPath& profile_path, + const Condition& condition); + + // This function checks whether all conditions have been met and is + // responsible for stopping observing Hermes profile property changes and + // invoking |on_success_|. + void MaybeFinish(); + + base::flat_map<dbus::ObjectPath, Condition> profile_path_to_condition_; + + // This will be called when all specified conditions have been met, or upon + // destruction. + base::OnceCallback<void()> on_success_; + + // This will be called IFF all specified conditions have not been met and the + // Hermes clients are being shut down. + base::OnceCallback<void()> on_shutdown_; + + base::ScopedObservation<HermesManagerClient, HermesManagerClient::Observer> + hermes_manager_client_observer_{this}; + base::ScopedObservation<HermesProfileClient, HermesProfileClient::Observer> + hermes_profile_client_observer_{this}; +}; + +} // namespace ash + +#endif // CHROMEOS_ASH_COMPONENTS_NETWORK_CELLULAR_ESIM_PROFILE_WAITER_H_
diff --git a/chromeos/ash/components/network/cellular_esim_profile_waiter_unittest.cc b/chromeos/ash/components/network/cellular_esim_profile_waiter_unittest.cc new file mode 100644 index 0000000..d961174 --- /dev/null +++ b/chromeos/ash/components/network/cellular_esim_profile_waiter_unittest.cc
@@ -0,0 +1,179 @@ +// 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 "chromeos/ash/components/network/cellular_esim_profile_waiter.h" + +#include "ash/constants/ash_features.h" +#include "base/functional/bind.h" +#include "base/run_loop.h" +#include "base/test/task_environment.h" +#include "chromeos/ash/components/dbus/hermes/hermes_clients.h" +#include "chromeos/ash/components/dbus/hermes/hermes_euicc_client.h" +#include "chromeos/ash/components/dbus/hermes/hermes_manager_client.h" +#include "testing/gtest/include/gtest/gtest.h" + +namespace ash { +namespace { +const char kTestCarrierProfilePath[] = "/org/chromium/hermes/Profile/1"; +} // namespace + +class CellularESimProfileWaiterTest : public testing::Test { + public: + CellularESimProfileWaiterTest() = default; + CellularESimProfileWaiterTest(const CellularESimProfileWaiterTest&) = delete; + CellularESimProfileWaiterTest& operator=( + const CellularESimProfileWaiterTest&) = delete; + ~CellularESimProfileWaiterTest() override = default; + + void SetUp() override { + hermes_clients::InitializeFakes(); + base::RunLoop().RunUntilIdle(); + + esim_profile_waiter_ = std::make_unique<CellularESimProfileWaiter>(); + } + + void TearDown() override { hermes_clients::Shutdown(); } + + void AddCondition(const dbus::ObjectPath& profile_path, + CellularESimProfileWaiter::Condition condition) { + esim_profile_waiter_->AddCondition(profile_path, std::move(condition)); + } + + base::OnceCallback<void()> SetBooleanCallback(bool* value) { + return base::BindOnce([](bool* value) { *value = true; }, value); + } + + std::unique_ptr<CellularESimProfileWaiter>& esim_profile_waiter() { + return esim_profile_waiter_; + } + + base::test::SingleThreadTaskEnvironment* task_environment() { + return &task_environment_; + } + + private: + base::test::SingleThreadTaskEnvironment task_environment_{ + base::test::TaskEnvironment::TimeSource::MOCK_TIME}; + std::unique_ptr<CellularESimProfileWaiter> esim_profile_waiter_; +}; + +TEST_F(CellularESimProfileWaiterTest, CalledImmediatelyWhenMissingConditions) { + bool on_success_called = false; + bool on_shutdown_called = false; + + esim_profile_waiter()->Wait( + /*on_success=*/SetBooleanCallback(&on_success_called), + /*on_shutdown=*/SetBooleanCallback(&on_shutdown_called)); + base::RunLoop().RunUntilIdle(); + EXPECT_FALSE(esim_profile_waiter()->waiting()); + EXPECT_TRUE(on_success_called); + EXPECT_FALSE(on_shutdown_called); +} + +TEST_F(CellularESimProfileWaiterTest, CalledImmediatelyWhenReset) { + const dbus::ObjectPath kProfilePath(kTestCarrierProfilePath); + + bool on_success_called = false; + bool on_shutdown_called = false; + + AddCondition(kProfilePath, + base::BindRepeating( + [](HermesProfileClient::Properties*) { return false; })); + + esim_profile_waiter()->Wait( + /*on_success=*/SetBooleanCallback(&on_success_called), + /*on_shutdown=*/SetBooleanCallback(&on_shutdown_called)); + base::RunLoop().RunUntilIdle(); + EXPECT_TRUE(esim_profile_waiter()->waiting()); + EXPECT_FALSE(on_success_called); + EXPECT_FALSE(on_shutdown_called); + + esim_profile_waiter().reset(); + EXPECT_TRUE(on_success_called); + EXPECT_FALSE(on_shutdown_called); +} + +TEST_F(CellularESimProfileWaiterTest, CalledImmediatelyWhenShutdown) { + const dbus::ObjectPath kProfilePath(kTestCarrierProfilePath); + + bool on_success_called = false; + bool on_shutdown_called = false; + + AddCondition(kProfilePath, + base::BindRepeating( + [](HermesProfileClient::Properties*) { return false; })); + + esim_profile_waiter()->Wait( + /*on_success=*/SetBooleanCallback(&on_success_called), + /*on_shutdown=*/SetBooleanCallback(&on_shutdown_called)); + base::RunLoop().RunUntilIdle(); + EXPECT_TRUE(esim_profile_waiter()->waiting()); + EXPECT_FALSE(on_success_called); + EXPECT_FALSE(on_shutdown_called); + + static_cast<HermesManagerClient::Observer*>(esim_profile_waiter().get()) + ->OnShutdown(); + + EXPECT_FALSE(esim_profile_waiter()->waiting()); + EXPECT_FALSE(on_success_called); + EXPECT_TRUE(on_shutdown_called); +} + +TEST_F(CellularESimProfileWaiterTest, CalledImmediatelyWhenConditionsAreMet) { + const dbus::ObjectPath kProfilePath(kTestCarrierProfilePath); + + bool on_success_called = false; + bool on_shutdown_called = false; + + esim_profile_waiter()->RequirePendingProfile(kProfilePath); + + esim_profile_waiter()->Wait( + /*on_success=*/SetBooleanCallback(&on_success_called), + /*on_shutdown=*/SetBooleanCallback(&on_shutdown_called)); + base::RunLoop().RunUntilIdle(); + EXPECT_TRUE(esim_profile_waiter()->waiting()); + EXPECT_FALSE(on_success_called); + EXPECT_FALSE(on_shutdown_called); + + HermesProfileClient::Properties* profile_properties = + HermesProfileClient::Get()->GetProperties(kProfilePath); + base::RunLoop().RunUntilIdle(); + EXPECT_TRUE(esim_profile_waiter()->waiting()); + EXPECT_FALSE(on_success_called); + EXPECT_FALSE(on_shutdown_called); + + profile_properties->state().ReplaceValue( + /*value=*/hermes::profile::State::kInactive); + profile_properties->name().ReplaceValue( + /*value=*/""); + profile_properties->activation_code().ReplaceValue( + /*value=*/""); + base::RunLoop().RunUntilIdle(); + EXPECT_TRUE(esim_profile_waiter()->waiting()); + EXPECT_FALSE(on_success_called); + EXPECT_FALSE(on_shutdown_called); + + profile_properties->state().ReplaceValue( + /*value=*/hermes::profile::State::kPending); + base::RunLoop().RunUntilIdle(); + EXPECT_TRUE(esim_profile_waiter()->waiting()); + EXPECT_FALSE(on_success_called); + EXPECT_FALSE(on_shutdown_called); + + profile_properties->name().ReplaceValue( + /*value=*/"name"); + base::RunLoop().RunUntilIdle(); + EXPECT_TRUE(esim_profile_waiter()->waiting()); + EXPECT_FALSE(on_success_called); + EXPECT_FALSE(on_shutdown_called); + + profile_properties->activation_code().ReplaceValue( + /*value=*/"activation_code"); + base::RunLoop().RunUntilIdle(); + EXPECT_FALSE(esim_profile_waiter()->waiting()); + EXPECT_TRUE(on_success_called); + EXPECT_FALSE(on_shutdown_called); +} + +} // namespace ash
diff --git a/chromeos/ash/components/network/fake_network_3gpp_handler.cc b/chromeos/ash/components/network/fake_network_3gpp_handler.cc new file mode 100644 index 0000000..d2a05cf --- /dev/null +++ b/chromeos/ash/components/network/fake_network_3gpp_handler.cc
@@ -0,0 +1,40 @@ +// 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 "chromeos/ash/components/network/fake_network_3gpp_handler.h" + +#include <stddef.h> +#include <stdint.h> + +#include <algorithm> +#include <memory> +#include <vector> + +#include "base/containers/circular_deque.h" +#include "base/functional/bind.h" +#include "base/logging.h" +#include "base/task/single_thread_task_runner.h" +#include "base/task/task_runner.h" +#include "base/values.h" + +namespace ash { + +FakeNetwork3gppHandler::FakeNetwork3gppHandler() = default; + +FakeNetwork3gppHandler::~FakeNetwork3gppHandler() = default; + +void FakeNetwork3gppHandler::SetCarrierLock( + const std::string& config, + Modem3gppClient::CarrierLockCallback callback) { + carrier_lock_callback_ = std::move(callback); + base::SingleThreadTaskRunner::GetCurrentDefault()->PostTask( + FROM_HERE, base::BindOnce(&FakeNetwork3gppHandler::CompleteSetCarrierLock, + weak_ptr_factory_.GetWeakPtr())); +} + +void FakeNetwork3gppHandler::CompleteSetCarrierLock() { + std::move(carrier_lock_callback_).Run(carrier_lock_result_); +} + +} // namespace ash
diff --git a/chromeos/ash/components/network/fake_network_3gpp_handler.h b/chromeos/ash/components/network/fake_network_3gpp_handler.h new file mode 100644 index 0000000..1641de4 --- /dev/null +++ b/chromeos/ash/components/network/fake_network_3gpp_handler.h
@@ -0,0 +1,33 @@ +// 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 CHROMEOS_ASH_COMPONENTS_NETWORK_FAKE_NETWORK_3GPP_HANDLER_H_ +#define CHROMEOS_ASH_COMPONENTS_NETWORK_FAKE_NETWORK_3GPP_HANDLER_H_ + +#include "chromeos/ash/components/network/network_3gpp_handler.h" + +namespace ash { + +// Class to use 3gpp SetCarrierLock method. +class FakeNetwork3gppHandler : public Network3gppHandler { + public: + FakeNetwork3gppHandler(); + ~FakeNetwork3gppHandler() override; + + void SetCarrierLock(const std::string& config, + Modem3gppClient::CarrierLockCallback callback) override; + void CompleteSetCarrierLock(); + void set_carrier_lock_result(CarrierLockResult result) { + carrier_lock_result_ = result; + } + + private: + Modem3gppClient::CarrierLockCallback carrier_lock_callback_; + CarrierLockResult carrier_lock_result_; + base::WeakPtrFactory<FakeNetwork3gppHandler> weak_ptr_factory_{this}; +}; + +} // namespace ash + +#endif // CHROMEOS_ASH_COMPONENTS_NETWORK_FAKE_NETWORK_3GPP_HANDLER_H_
diff --git a/chromeos/ash/components/network/network_3gpp_handler.cc b/chromeos/ash/components/network/network_3gpp_handler.cc new file mode 100644 index 0000000..c329385d --- /dev/null +++ b/chromeos/ash/components/network/network_3gpp_handler.cc
@@ -0,0 +1,246 @@ +// 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 "chromeos/ash/components/network/network_3gpp_handler.h" + +#include <stddef.h> +#include <stdint.h> + +#include <algorithm> +#include <memory> +#include <vector> + +#include "ash/constants/ash_features.h" +#include "base/containers/circular_deque.h" +#include "base/functional/bind.h" +#include "base/logging.h" +#include "base/values.h" +#include "chromeos/ash/components/dbus/shill/modem_3gpp_client.h" +#include "chromeos/ash/components/dbus/shill/shill_device_client.h" +#include "chromeos/ash/components/dbus/shill/shill_manager_client.h" +#include "components/device_event_log/device_event_log.h" +#include "dbus/object_path.h" +#include "third_party/cros_system_api/dbus/service_constants.h" + +namespace ash { + +class Network3gppHandler::Network3gppDeviceHandler { + public: + Network3gppDeviceHandler() = default; + virtual ~Network3gppDeviceHandler() = default; + + virtual void SetCarrierLock( + const std::string& config, + Modem3gppClient::CarrierLockCallback callback) = 0; +}; + +class Network3gppHandler::Network3gppDeviceHandlerImpl + : public Network3gppHandler::Network3gppDeviceHandler { + public: + Network3gppDeviceHandlerImpl(const std::string& service_name, + const dbus::ObjectPath& object_path, + Modem3gppClient* modem_client); + + Network3gppDeviceHandlerImpl(const Network3gppDeviceHandlerImpl&) = delete; + Network3gppDeviceHandlerImpl& operator=(const Network3gppDeviceHandlerImpl&) = + delete; + + private: + // Network3gppHandler::Network3gppDeviceHandler: + void SetCarrierLock(const std::string& config, + Modem3gppClient::CarrierLockCallback callback) override; + + std::string service_name_; + dbus::ObjectPath object_path_; + raw_ptr<Modem3gppClient> modem_client_; + + base::WeakPtrFactory<Network3gppDeviceHandlerImpl> weak_ptr_factory_{this}; +}; + +Network3gppHandler::Network3gppDeviceHandlerImpl::Network3gppDeviceHandlerImpl( + const std::string& service_name, + const dbus::ObjectPath& object_path, + Modem3gppClient* modem_client) + : service_name_(service_name), + object_path_(object_path), + modem_client_(modem_client) {} + +void Network3gppHandler::Network3gppDeviceHandlerImpl::SetCarrierLock( + const std::string& config, + Modem3gppClient::CarrierLockCallback callback) { + if (!modem_client_) { + NET_LOG(ERROR) << "Modem 3gpp client not initialized."; + std::move(callback).Run(CarrierLockResult::kNotInitialized); + return; + } + + modem_client_->SetCarrierLock(service_name_, object_path_, config, + std::move(callback)); +} + +/////////////////////////////////////////////////////////////////////////////// +// Network3gppHandler + +Network3gppHandler::Network3gppHandler() { + DCHECK(features::IsCellularCarrierLockEnabled()); +} + +Network3gppHandler::~Network3gppHandler() { + if (!ShillManagerClient::Get()) { + return; + } + + ShillManagerClient::Get()->RemovePropertyChangedObserver(this); + if (!cellular_device_path_.empty()) { + ShillDeviceClient::Get()->RemovePropertyChangedObserver( + dbus::ObjectPath(cellular_device_path_), this); + } +} + +void Network3gppHandler::Init() { + // Add as an observer here so that new devices added after this call are + // recognized. + ShillManagerClient::Get()->AddPropertyChangedObserver(this); + + // Request network manager properties so that we can get the list of devices. + ShillManagerClient::Get()->GetProperties( + base::BindOnce(&Network3gppHandler::ManagerPropertiesCallback, + weak_ptr_factory_.GetWeakPtr())); +} + +void Network3gppHandler::SetCarrierLock( + const std::string& configuration, + Modem3gppClient::CarrierLockCallback callback) { + if (!device_handler_) { + NET_LOG(ERROR) << "ModemManager device handler not initialized."; + std::move(callback).Run(CarrierLockResult::kNotInitialized); + return; + } + + device_handler_->SetCarrierLock(configuration, std::move(callback)); +} + +void Network3gppHandler::OnPropertyChanged(const std::string& name, + const base::Value& value) { + // Device property change + if (name == shill::kDBusObjectProperty) { + OnObjectPathChanged(value); + return; + } + + // Manager property change + if (name == shill::kDevicesProperty && value.is_list()) { + UpdateDevices(value.GetList()); + } +} + +void Network3gppHandler::ManagerPropertiesCallback( + absl::optional<base::Value::Dict> properties) { + if (!properties) { + NET_LOG(ERROR) << "Network3gppHandler: Failed to get manager properties."; + return; + } + const base::Value::List* value = + properties->FindList(shill::kDevicesProperty); + if (!value) { + NET_LOG(EVENT) << "Network3gppHandler: No list value for: " + << shill::kDevicesProperty; + return; + } + UpdateDevices(*value); +} + +void Network3gppHandler::UpdateDevices(const base::Value::List& devices) { + for (const auto& item : devices) { + if (!item.is_string()) { + continue; + } + + const std::string device_path = item.GetString(); + if (device_path.empty()) { + continue; + } + // Request device properties. + NET_LOG(DEBUG) << "GetDeviceProperties: " << device_path; + ShillDeviceClient::Get()->GetProperties( + dbus::ObjectPath(device_path), + base::BindOnce(&Network3gppHandler::DevicePropertiesCallback, + weak_ptr_factory_.GetWeakPtr(), device_path)); + } +} + +void Network3gppHandler::DevicePropertiesCallback( + const std::string& device_path, + absl::optional<base::Value::Dict> properties) { + if (!properties) { + NET_LOG(ERROR) << "Network3gppHandler error for: " << device_path; + return; + } + + const std::string* device_type = properties->FindString(shill::kTypeProperty); + if (!device_type) { + NET_LOG(ERROR) << "Network3gppHandler: No type for: " << device_path; + return; + } + if (*device_type != shill::kTypeCellular) { + return; + } + + const std::string* service_name = + properties->FindString(shill::kDBusServiceProperty); + if (!service_name) { + NET_LOG(ERROR) << "Device has no DBusService Property: " << device_path; + return; + } + + if (*service_name != modemmanager::kModemManager1ServiceName) { + return; + } + + const std::string* object_path_string = + properties->FindString(shill::kDBusObjectProperty); + if (!object_path_string || object_path_string->empty()) { + NET_LOG(ERROR) << "Device has no or empty DBusObject Property: " + << device_path; + return; + } + dbus::ObjectPath object_path(*object_path_string); + + modem_client_ = Modem3gppClient::Get(); + if (!modem_client_) { + NET_LOG(ERROR) << "Modem shill client was not initialized!"; + return; + } + + device_handler_ = std::make_unique<Network3gppDeviceHandlerImpl>( + *service_name, object_path, modem_client_); + + if (!cellular_device_path_.empty()) { + ShillDeviceClient::Get()->RemovePropertyChangedObserver( + dbus::ObjectPath(cellular_device_path_), this); + } + cellular_device_path_ = device_path; + ShillDeviceClient::Get()->AddPropertyChangedObserver( + dbus::ObjectPath(cellular_device_path_), this); +} + +void Network3gppHandler::OnObjectPathChanged(const base::Value& object_path) { + // Remove the old handler. + device_handler_.reset(); + + const std::string object_path_string = + object_path.is_string() ? object_path.GetString() : std::string(); + // If the new object path is empty, there is no SIM. Don't create a new + // handler. + if (object_path_string.empty() || object_path_string == "/") { + return; + } + + // Recreate handler for the new object path. + ShillManagerClient::Get()->GetProperties( + base::BindOnce(&Network3gppHandler::ManagerPropertiesCallback, + weak_ptr_factory_.GetWeakPtr())); +} + +} // namespace ash
diff --git a/chromeos/ash/components/network/network_3gpp_handler.h b/chromeos/ash/components/network/network_3gpp_handler.h new file mode 100644 index 0000000..a5fe153 --- /dev/null +++ b/chromeos/ash/components/network/network_3gpp_handler.h
@@ -0,0 +1,77 @@ +// 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 CHROMEOS_ASH_COMPONENTS_NETWORK_NETWORK_3GPP_HANDLER_H_ +#define CHROMEOS_ASH_COMPONENTS_NETWORK_NETWORK_3GPP_HANDLER_H_ + +#include <memory> +#include <string> +#include <vector> + +#include "base/component_export.h" +#include "base/memory/weak_ptr.h" +#include "base/observer_list.h" +#include "base/values.h" +#include "chromeos/ash/components/dbus/shill/modem_3gpp_client.h" +#include "chromeos/ash/components/dbus/shill/shill_property_changed_observer.h" +#include "chromeos/dbus/common/dbus_method_call_status.h" +#include "third_party/abseil-cpp/absl/types/optional.h" + +namespace ash { + +// This class handles call to ModemManager's SetCarrierLock method which +// configures network personalisation lock on cellular modem. +// This method is part of Modem 3gpp interface. +class COMPONENT_EXPORT(CHROMEOS_NETWORK) Network3gppHandler + : public ShillPropertyChangedObserver { + public: + Network3gppHandler(); + Network3gppHandler(const Network3gppHandler&) = delete; + Network3gppHandler& operator=(const Network3gppHandler&) = delete; + + ~Network3gppHandler() override; + + virtual void SetCarrierLock(const std::string& configuration, + Modem3gppClient::CarrierLockCallback callback); + + private: + friend class NetworkHandler; + friend class Network3gppHandlerTest; + + class Network3gppDeviceHandler; + class Network3gppDeviceHandlerImpl; + + // ShillPropertyChangedObserver: + void OnPropertyChanged(const std::string& name, + const base::Value& value) override; + + // Requests the devices from the network manager, sets up observers, and + // requests the initial list of messages. + void Init(); + + // Callback to handle the manager properties with the list of devices. + void ManagerPropertiesCallback(absl::optional<base::Value::Dict> properties); + + // Requests properties for each entry in |devices|. + void UpdateDevices(const base::Value::List& devices); + + // Callback to handle the device properties for |device_path|. + // A Network3gppDeviceHandler will be instantiated for each cellular device. + void DevicePropertiesCallback(const std::string& device_path, + absl::optional<base::Value::Dict> properties); + + // Called when the cellular device's object path changes. This means that + // there has been an update to the device's SIM (removed or inserted) and that + // a new handler should be created for the device's new object path. + void OnObjectPathChanged(const base::Value& object_path); + + raw_ptr<Modem3gppClient> modem_client_; + std::unique_ptr<Network3gppDeviceHandler> device_handler_; + std::string cellular_device_path_; + base::WeakPtrFactory<Network3gppHandler> weak_ptr_factory_{this}; +}; + +} // namespace ash + +#endif // CHROMEOS_ASH_COMPONENTS_NETWORK_NETWORK_3GPP_HANDLER_H_
diff --git a/chromeos/ash/components/network/network_3gpp_handler_unittest.cc b/chromeos/ash/components/network/network_3gpp_handler_unittest.cc new file mode 100644 index 0000000..3af757b --- /dev/null +++ b/chromeos/ash/components/network/network_3gpp_handler_unittest.cc
@@ -0,0 +1,152 @@ +// 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 "chromeos/ash/components/network/network_3gpp_handler.h" + +#include <memory> +#include <set> +#include <string> + +#include "ash/constants/ash_features.h" +#include "base/command_line.h" +#include "base/run_loop.h" +#include "base/test/scoped_feature_list.h" +#include "base/test/task_environment.h" +#include "base/test/test_future.h" +#include "chromeos/ash/components/dbus/shill/fake_modem_3gpp_client.h" +#include "chromeos/ash/components/dbus/shill/modem_3gpp_client.h" +#include "chromeos/ash/components/dbus/shill/shill_clients.h" +#include "chromeos/ash/components/dbus/shill/shill_device_client.h" +#include "chromeos/dbus/constants/dbus_switches.h" +#include "dbus/object_path.h" +#include "testing/gtest/include/gtest/gtest.h" +#include "third_party/cros_system_api/dbus/service_constants.h" + +namespace ash { + +namespace { + +const char kCellularDevicePath[] = "/org/freedesktop/ModemManager1/stub/0"; +const char kCellularDeviceObjectPath[] = + "/org/freedesktop/ModemManager1/stub/0/Modem/1"; +const char kCellularDeviceConfiguration[] = "carrier.lock.configuration"; + +} // namespace + +class Network3gppHandlerTest : public testing::Test { + public: + Network3gppHandlerTest() + : task_environment_( + base::test::SingleThreadTaskEnvironment::MainThreadType::UI) {} + ~Network3gppHandlerTest() override = default; + + void SetUp() override { + // Enable Carrier Lock feature flag. + scoped_feature_list_.InitAndEnableFeature(features::kCellularCarrierLock); + + // Initialize fake clients. + shill_clients::InitializeFakes(); + Modem3gppClient::InitializeFake(); + device_test_ = ShillDeviceClient::Get()->GetTestInterface(); + ASSERT_TRUE(device_test_); + + // We want to have only 1 cellular device. + device_test_->ClearDevices(); + device_test_->AddDevice(kCellularDevicePath, shill::kTypeCellular, + "stub_cellular_device"); + + // This relies on the stub dbus implementations for ShillManagerClient, + // ShillDeviceClient, Modem3gppClient. + network_3gpp_handler_ = std::make_unique<Network3gppHandler>(); + network_3gpp_handler_->Init(); + base::RunLoop().RunUntilIdle(); + modem_fake_client_ = + static_cast<FakeModem3gppClient*>(network_3gpp_handler_->modem_client_); + } + + void TearDown() override { + device_test_ = nullptr; + modem_fake_client_ = nullptr; + network_3gpp_handler_.reset(); + Modem3gppClient::Shutdown(); + shill_clients::Shutdown(); + } + + protected: + base::test::SingleThreadTaskEnvironment task_environment_; + raw_ptr<ShillDeviceClient::TestInterface> device_test_; + raw_ptr<FakeModem3gppClient> modem_fake_client_; + std::unique_ptr<Network3gppHandler> network_3gpp_handler_; + base::test::ScopedFeatureList scoped_feature_list_; +}; + +TEST_F(Network3gppHandlerTest, EmptyDbusObjectPath) { + // This test verifies no crash occurs when the device dbus object path + // is an empty value. + device_test_->SetDeviceProperty(kCellularDevicePath, + shill::kDBusObjectProperty, base::Value(""), + /*notify_changed=*/true); + + base::RunLoop().RunUntilIdle(); +} + +TEST_F(Network3gppHandlerTest, SwapDbusObjectPath) { + // This test verifies no crash occurs when the device object + // path is changed multiple times. + device_test_->SetDeviceProperty(kCellularDevicePath, + shill::kDBusObjectProperty, base::Value(""), + /*notify_changed=*/true); + device_test_->SetDeviceProperty(kCellularDevicePath, + shill::kDBusObjectProperty, + base::Value(kCellularDeviceObjectPath), + /*notify_changed=*/true); + device_test_->SetDeviceProperty(kCellularDevicePath, + shill::kDBusObjectProperty, base::Value("/"), + /*notify_changed=*/true); + device_test_->SetDeviceProperty(kCellularDevicePath, + shill::kDBusObjectProperty, + base::Value(kCellularDeviceObjectPath), + /*notify_changed=*/true); + + base::RunLoop().RunUntilIdle(); +} + +TEST_F(Network3gppHandlerTest, EmptyDeviceConfig) { + // This test uses empty carrier lock configuration. + device_test_->SetDeviceProperty(kCellularDevicePath, + shill::kDBusObjectProperty, + base::Value(kCellularDeviceObjectPath), + /*notify_changed=*/true); + base::RunLoop().RunUntilIdle(); + + // Call SetCarrierLock. + base::test::TestFuture<CarrierLockResult> set_carrier_lock_future; + network_3gpp_handler_->SetCarrierLock(std::string(), + set_carrier_lock_future.GetCallback()); + modem_fake_client_->CompleteSetCarrierLock( + /*result=*/CarrierLockResult::kUnknownError); + + EXPECT_EQ(CarrierLockResult::kUnknownError, set_carrier_lock_future.Get()); +} + +TEST_F(Network3gppHandlerTest, SetCarrierLock) { + // This test uses proper object path and sample configuration. + device_test_->SetDeviceProperty(kCellularDevicePath, + shill::kDBusObjectProperty, + base::Value(kCellularDeviceObjectPath), + /*notify_changed=*/true); + base::RunLoop().RunUntilIdle(); + + // Call SetCarrierLock. + base::test::TestFuture<CarrierLockResult> set_carrier_lock_future; + network_3gpp_handler_->SetCarrierLock( + std::string(kCellularDeviceConfiguration), + set_carrier_lock_future.GetCallback()); + modem_fake_client_->CompleteSetCarrierLock( + /*result=*/CarrierLockResult::kSuccess); + + EXPECT_EQ(CarrierLockResult::kSuccess, set_carrier_lock_future.Get()); +} + +} // namespace ash
diff --git a/chromeos/ash/components/network/network_handler.cc b/chromeos/ash/components/network/network_handler.cc index 4a66faf..4498bf3 100644 --- a/chromeos/ash/components/network/network_handler.cc +++ b/chromeos/ash/components/network/network_handler.cc
@@ -34,6 +34,7 @@ #include "chromeos/ash/components/network/metrics/hotspot_feature_usage_metrics.h" #include "chromeos/ash/components/network/metrics/hotspot_metrics_helper.h" #include "chromeos/ash/components/network/metrics/vpn_network_metrics_helper.h" +#include "chromeos/ash/components/network/network_3gpp_handler.h" #include "chromeos/ash/components/network/network_activation_handler_impl.h" #include "chromeos/ash/components/network/network_cert_loader.h" #include "chromeos/ash/components/network/network_certificate_handler.h" @@ -103,6 +104,9 @@ text_message_provider_.reset(new TextMessageProvider()); } geolocation_handler_.reset(new GeolocationHandler()); + if (ash::features::IsCellularCarrierLockEnabled()) { + network_3gpp_handler_.reset(new Network3gppHandler()); + } } NetworkHandler::~NetworkHandler() { @@ -204,6 +208,9 @@ network_sms_handler_->Init(); } geolocation_handler_->Init(); + if (ash::features::IsCellularCarrierLockEnabled()) { + network_3gpp_handler_->Init(); + } } // static @@ -385,6 +392,11 @@ return geolocation_handler_.get(); } +Network3gppHandler* NetworkHandler::network_3gpp_handler() { + DCHECK(ash::features::IsCellularCarrierLockEnabled()); + return network_3gpp_handler_.get(); +} + ProhibitedTechnologiesHandler* NetworkHandler::prohibited_technologies_handler() { return prohibited_technologies_handler_.get();
diff --git a/chromeos/ash/components/network/network_handler.h b/chromeos/ash/components/network/network_handler.h index 2e91aeb8..7aa66c4f 100644 --- a/chromeos/ash/components/network/network_handler.h +++ b/chromeos/ash/components/network/network_handler.h
@@ -51,6 +51,7 @@ class NetworkProfileHandler; class NetworkStateHandler; class NetworkSmsHandler; +class Network3gppHandler; class ProhibitedTechnologiesHandler; class StubCellularNetworksProvider; class TechnologyStateController; @@ -132,6 +133,7 @@ NetworkConnectionHandler* network_connection_handler(); NetworkMetadataStore* network_metadata_store(); NetworkSmsHandler* network_sms_handler(); + Network3gppHandler* network_3gpp_handler(); GeolocationHandler* geolocation_handler(); ProhibitedTechnologiesHandler* prohibited_technologies_handler(); TechnologyStateController* technology_state_controller(); @@ -190,6 +192,7 @@ std::unique_ptr<ProhibitedTechnologiesHandler> prohibited_technologies_handler_; std::unique_ptr<NetworkSmsHandler> network_sms_handler_; + std::unique_ptr<Network3gppHandler> network_3gpp_handler_; std::unique_ptr<TextMessageProvider> text_message_provider_; std::unique_ptr<GeolocationHandler> geolocation_handler_; std::unique_ptr<UIProxyConfigService> ui_proxy_config_service_;
diff --git a/chromeos/ash/components/phonehub/feature_status_provider_impl.cc b/chromeos/ash/components/phonehub/feature_status_provider_impl.cc index 3dd6cec..6c1d161 100644 --- a/chromeos/ash/components/phonehub/feature_status_provider_impl.cc +++ b/chromeos/ash/components/phonehub/feature_status_provider_impl.cc
@@ -57,13 +57,19 @@ // normally, then an administrator prohibits the policy during the user // session. If this occurs, we consider the session ineligible for using Phone // Hub. - if (feature_state == FeatureState::kProhibitedByPolicy) + if (feature_state == FeatureState::kProhibitedByPolicy) { return false; + } + + if (feature_state == FeatureState::kNotSupportedByChromebook) { + return false; + } // If the local device has not yet been enrolled, no phone can serve as its // Phone Hub host. - if (!local_device) + if (!local_device) { return false; + } // If the local device does not support being a Phone Hub client, no phone can // serve as its host. @@ -74,23 +80,27 @@ // If the local device does not have an enrolled Bluetooth address, no phone // can serve as its host. - if (local_device->bluetooth_public_address().empty()) + if (local_device->bluetooth_public_address().empty()) { return false; + } // If the host device is not an eligible host, do not initialize Phone Hub. - if (host_status.first == HostStatus::kNoEligibleHosts) + if (host_status.first == HostStatus::kNoEligibleHosts) { return false; + } // If there is a host device available, check if the device is eligible for // Phonehub. - if (host_status.second.has_value()) + if (host_status.second.has_value()) { return IsEligiblePhoneHubHost(*(host_status.second)); + } // Otherwise, check if there is any available remote device that is // eligible for Phonehub. for (const RemoteDeviceRef& device : remote_devices) { - if (IsEligiblePhoneHubHost(device)) + if (IsEligiblePhoneHubHost(device)) { return true; + } } // If none of the devices return true above, there are no phones capable of @@ -109,8 +119,9 @@ // The device has been set up with the back-end, but the phone has not yet // enabled itself. - if (host_status == HostStatus::kHostSetButNotYetVerified) + if (host_status == HostStatus::kHostSetButNotYetVerified) { return true; + } // The phone has enabled itself for the multi-device suite but has not yet // enabled itself for Phone Hub. Note that kNotSupportedByPhone is a bit of a @@ -158,8 +169,9 @@ device_sync_client_->RemoveObserver(this); multidevice_setup_client_->RemoveObserver(this); connection_manager_->RemoveObserver(this); - if (bluetooth_adapter_) + if (bluetooth_adapter_) { bluetooth_adapter_->RemoveObserver(this); + } session_manager_->RemoveObserver(this); power_manager_client_->RemoveObserver(this); } @@ -212,8 +224,9 @@ // If |status_| has not yet been set, this call occurred synchronously in the // constructor, so status_ has not yet been initialized. - if (status_.has_value()) + if (status_.has_value()) { UpdateStatus(); + } } void FeatureStatusProviderImpl::OnConnectionStatusChanged() { @@ -230,8 +243,9 @@ DCHECK(status_.has_value()); FeatureStatus computed_status = ComputeStatus(); - if (computed_status == *status_) + if (computed_status == *status_) { return; + } PA_LOG(INFO) << "Phone Hub feature status: " << *status_ << " => " << computed_status; @@ -259,20 +273,25 @@ return FeatureStatus::kNotEligibleForFeature; } - if (session_manager_->IsScreenLocked() || is_suspended_) + if (session_manager_->IsScreenLocked() || is_suspended_) { return FeatureStatus::kLockOrSuspended; + } - if (host_status == HostStatus::kEligibleHostExistsButNoHostSet) + if (host_status == HostStatus::kEligibleHostExistsButNoHostSet) { return FeatureStatus::kEligiblePhoneButNotSetUp; + } - if (IsPhonePendingSetup(host_status, feature_state)) + if (IsPhonePendingSetup(host_status, feature_state)) { return FeatureStatus::kPhoneSelectedAndPendingSetup; + } - if (IsFeatureDisabledByUser(feature_state)) + if (IsFeatureDisabledByUser(feature_state)) { return FeatureStatus::kDisabled; + } - if (!IsBluetoothOn()) + if (!IsBluetoothOn()) { return FeatureStatus::kUnavailableBluetoothOff; + } switch (connection_manager_->GetStatus()) { case secure_channel::ConnectionManager::Status::kDisconnected: @@ -287,8 +306,9 @@ } bool FeatureStatusProviderImpl::IsBluetoothOn() const { - if (!bluetooth_adapter_) + if (!bluetooth_adapter_) { return false; + } return bluetooth_adapter_->IsPresent() && bluetooth_adapter_->IsPowered(); }
diff --git a/chromeos/ash/components/phonehub/feature_status_provider_impl_unittest.cc b/chromeos/ash/components/phonehub/feature_status_provider_impl_unittest.cc index 44da2d5..e533fd6 100644 --- a/chromeos/ash/components/phonehub/feature_status_provider_impl_unittest.cc +++ b/chromeos/ash/components/phonehub/feature_status_provider_impl_unittest.cc
@@ -154,11 +154,13 @@ fake_device_sync_client_.set_local_device_metadata(local_device); multidevice::RemoteDeviceRefList synced_devices; - if (local_device) + if (local_device) { synced_devices.push_back(*local_device); + } for (const auto& phone_device : phone_devices) { - if (phone_device) + if (phone_device) { synced_devices.push_back(*phone_device); + } } fake_device_sync_client_.set_synced_devices(synced_devices); @@ -194,8 +196,9 @@ } void SetAdapterPresentState(bool present) { - if (is_adapter_present_ == present) + if (is_adapter_present_ == present) { return; + } is_adapter_present_ = present; @@ -205,8 +208,9 @@ } void SetAdapterPoweredState(bool powered) { - if (is_adapter_powered_ == powered) + if (is_adapter_powered_ == powered) { return; + } is_adapter_powered_ = powered; @@ -695,4 +699,17 @@ EXPECT_EQ(GetNumEligibleHostObserverCalls(), 2u); } +TEST_F(FeatureStatusProviderImplTest, NotSupportedByChromebook) { + SetEligibleSyncedDevices(); + SetMultiDeviceState(HostStatus::kHostVerified, + FeatureState::kNotSupportedByChromebook, + /*supports_better_together_host=*/true, + /*supports_phone_hub=*/true, + /*has_bluetooth_address=*/true); + + // When the multidevice feature state is kNotSupportedByChromebook, then the + // Phonehub status is kNotEligibleForFeature. + EXPECT_EQ(FeatureStatus::kNotEligibleForFeature, GetStatus()); +} + } // namespace ash::phonehub
diff --git a/chromeos/ash/services/cellular_setup/euicc.cc b/chromeos/ash/services/cellular_setup/euicc.cc index e2863cf..d69f02e 100644 --- a/chromeos/ash/services/cellular_setup/euicc.cc +++ b/chromeos/ash/services/cellular_setup/euicc.cc
@@ -119,30 +119,32 @@ const std::string& confirmation_code, mojom::ProfileInstallMethod install_method, InstallProfileFromActivationCodeCallback callback) { - ESimProfile* profile_info = nullptr; - mojom::ProfileInstallResult status = - GetPendingProfileInfoFromActivationCode(activation_code, &profile_info); + if (!ash::features::IsSmdsSupportEnabled()) { + ESimProfile* profile_info = nullptr; + mojom::ProfileInstallResult status = + GetPendingProfileInfoFromActivationCode(activation_code, &profile_info); - // Return early if profile was found but not in the correct state. - if (profile_info && status != mojom::ProfileInstallResult::kSuccess) { - NET_LOG(ERROR) << "EUICC could not install profile: " << status; - std::move(callback).Run(status, mojo::NullRemote()); - return; - } + // Return early if profile was found but not in the correct state. + if (profile_info && status != mojom::ProfileInstallResult::kSuccess) { + NET_LOG(ERROR) << "EUICC could not install profile: " << status; + std::move(callback).Run(status, mojo::NullRemote()); + return; + } - if (!ash::features::IsSmdsSupportEnabled() && profile_info) { - NET_LOG(USER) << "Installing profile with path " - << profile_info->path().value(); - profile_info->InstallProfile( - confirmation_code, - base::BindOnce( - [](InstallProfileFromActivationCodeCallback callback, - ESimProfile* esim_profile, - mojom::ProfileInstallResult status) -> void { - std::move(callback).Run(status, esim_profile->CreateRemote()); - }, - std::move(callback), profile_info)); - return; + if (profile_info) { + NET_LOG(USER) << "Installing profile with path " + << profile_info->path().value(); + profile_info->InstallProfile( + confirmation_code, + base::BindOnce( + [](InstallProfileFromActivationCodeCallback callback, + ESimProfile* esim_profile, + mojom::ProfileInstallResult status) -> void { + std::move(callback).Run(status, esim_profile->CreateRemote()); + }, + std::move(callback), profile_info)); + return; + } } if (ash::features::IsSmdsSupportEnabled()) {
diff --git a/chromeos/ash/services/multidevice_setup/feature_state_manager_impl.cc b/chromeos/ash/services/multidevice_setup/feature_state_manager_impl.cc index 8f2a826f..2aa7bfd 100644 --- a/chromeos/ash/services/multidevice_setup/feature_state_manager_impl.cc +++ b/chromeos/ash/services/multidevice_setup/feature_state_manager_impl.cc
@@ -114,13 +114,15 @@ bool is_at_least_one_feature_supported = false; for (const auto& map_entry : feature_states_map) { // Skip the suite feature, since it doesn't have its own policy. - if (map_entry.first == mojom::Feature::kBetterTogetherSuite) + if (map_entry.first == mojom::Feature::kBetterTogetherSuite) { continue; + } const mojom::FeatureState feature_state = map_entry.second; - if (feature_state != mojom::FeatureState::kNotSupportedByChromebook) + if (feature_state != mojom::FeatureState::kNotSupportedByChromebook) { is_at_least_one_feature_supported = true; + } // Also check for features that are not supported by the Chromebook, since // we should still consider the suite prohibited if all sub-features are @@ -243,8 +245,9 @@ cached_feature_state_map_(GenerateInitialDefaultCachedStateMap()) { host_status_provider_->AddObserver(this); device_sync_client_->AddObserver(this); - if (android_sms_pairing_state_tracker_) + if (android_sms_pairing_state_tracker_) { android_sms_pairing_state_tracker_->AddObserver(this); + } registrar_.Init(pref_service_); @@ -284,8 +287,9 @@ FeatureStateManagerImpl::~FeatureStateManagerImpl() { host_status_provider_->RemoveObserver(this); device_sync_client_->RemoveObserver(this); - if (android_sms_pairing_state_tracker_) + if (android_sms_pairing_state_tracker_) { android_sms_pairing_state_tracker_->RemoveObserver(this); + } } FeatureStateManager::FeatureStatesMap @@ -345,8 +349,9 @@ // Some computed values must be updated to support various edge cases. ProcessSuiteEdgeCases(&cached_feature_state_map_); - if (previous_cached_feature_state_map == cached_feature_state_map_) + if (previous_cached_feature_state_map == cached_feature_state_map_) { return; + } PA_LOG(INFO) << "Feature states map changed. Old map: " << previous_cached_feature_state_map << ", new map: " << cached_feature_state_map_; @@ -356,30 +361,37 @@ mojom::FeatureState FeatureStateManagerImpl::ComputeFeatureState( mojom::Feature feature) { - if (!IsAllowedByPolicy(feature)) + if (!IsAllowedByPolicy(feature)) { return mojom::FeatureState::kProhibitedByPolicy; + } HostStatusProvider::HostStatusWithDevice status_with_device = host_status_provider_->GetHostWithStatus(); - if (status_with_device.host_status() == mojom::HostStatus::kNoEligibleHosts) + if (status_with_device.host_status() == mojom::HostStatus::kNoEligibleHosts) { return mojom::FeatureState::kUnavailableNoVerifiedHost_NoEligibleHosts; + } - if (status_with_device.host_status() != mojom::HostStatus::kHostVerified) + if (status_with_device.host_status() != mojom::HostStatus::kHostVerified) { return mojom::FeatureState:: kUnavailableNoVerifiedHost_HostExistsButNotSetAndVerified; + } - if (!IsSupportedByChromebook(feature)) + if (!IsSupportedByChromebook(feature)) { return mojom::FeatureState::kNotSupportedByChromebook; + } - if (!HasSufficientSecurity(feature, *status_with_device.host_device())) + if (!HasSufficientSecurity(feature, *status_with_device.host_device())) { return mojom::FeatureState::kUnavailableInsufficientSecurity; + } - if (!HasBeenActivatedByPhone(feature, *status_with_device.host_device())) + if (!HasBeenActivatedByPhone(feature, *status_with_device.host_device())) { return mojom::FeatureState::kNotSupportedByPhone; + } - if (RequiresFurtherSetup(feature)) + if (RequiresFurtherSetup(feature)) { return mojom::FeatureState::kFurtherSetupRequired; + } return GetEnabledOrDisabledState(feature); } @@ -387,13 +399,18 @@ bool FeatureStateManagerImpl::IsAllowedByPolicy(mojom::Feature feature) { // If no policy preference exists for this feature, the feature is implicitly // allowed. - if (!base::Contains(feature_to_allowed_pref_name_map_, feature)) + if (!base::Contains(feature_to_allowed_pref_name_map_, feature)) { return true; + } return pref_service_->GetBoolean(feature_to_allowed_pref_name_map_[feature]); } bool FeatureStateManagerImpl::IsSupportedByChromebook(mojom::Feature feature) { + if (!base::FeatureList::IsEnabled(features::kAllowCrossDeviceFeatureSuite)) { + return false; + } + static const std::pair<mojom::Feature, multidevice::SoftwareFeature> kFeatureAndClientSoftwareFeaturePairs[] = { {mojom::Feature::kBetterTogetherSuite, @@ -427,8 +444,9 @@ } for (const auto& pair : kFeatureAndClientSoftwareFeaturePairs) { - if (pair.first != feature) + if (pair.first != feature) { continue; + } if ((pair.second == multidevice::SoftwareFeature::kPhoneHubClient || pair.second == multidevice::SoftwareFeature::kEcheClient) && @@ -447,8 +465,9 @@ bool FeatureStateManagerImpl::HasSufficientSecurity( mojom::Feature feature, const multidevice::RemoteDeviceRef& host_device) { - if (feature != mojom::Feature::kSmartLock) + if (feature != mojom::Feature::kSmartLock) { return true; + } // Special case for Smart Lock: if the host device does not have a lock screen // set, its SoftwareFeatureState for kSmartLockHost is supported but not @@ -486,8 +505,9 @@ {mojom::Feature::kEche, multidevice::SoftwareFeature::kEcheHost}}; for (const auto& pair : kFeatureAndHostSoftwareFeaturePairs) { - if (pair.first != feature) + if (pair.first != feature) { continue; + } // The bluetooth public address is required in order to use PhoneHub/Eche // and its sub-features. @@ -547,8 +567,9 @@ // TODO(khorimoto): Add a way to determine whether Phone Hub notification // access has been granted by the user on the phone. bool FeatureStateManagerImpl::RequiresFurtherSetup(mojom::Feature feature) { - if (feature != mojom::Feature::kMessages) + if (feature != mojom::Feature::kMessages) { return false; + } if (GetEnabledOrDisabledState(feature) == mojom::FeatureState::kDisabledByUser) {
diff --git a/chromeos/ash/services/multidevice_setup/feature_state_manager_impl_unittest.cc b/chromeos/ash/services/multidevice_setup/feature_state_manager_impl_unittest.cc index 4eeaaf5b..e15646c3 100644 --- a/chromeos/ash/services/multidevice_setup/feature_state_manager_impl_unittest.cc +++ b/chromeos/ash/services/multidevice_setup/feature_state_manager_impl_unittest.cc
@@ -79,8 +79,9 @@ raw_device->software_features[multidevice::SoftwareFeature::kWifiSyncHost] = multidevice::SoftwareFeatureState::kSupported; - if (empty_mac_address) + if (empty_mac_address) { raw_device->bluetooth_public_address.clear(); + } return host_device; } @@ -287,6 +288,59 @@ std::unique_ptr<FeatureStateManager> manager_; }; +TEST_F(MultiDeviceSetupFeatureStateManagerImplTest, + DisableAllowCrossDeviceFeatureSuiteFlag) { + // Disable the "AllowCrossDeviceFeatureSuite" flag, which should force all + // Cross Device features to be unsupported. + base::test::ScopedFeatureList feature_list; + feature_list.InitAndDisableFeature( + ash::features::kAllowCrossDeviceFeatureSuite); + + // Enable all features + SetupFeatureStateManager(); + SetVerifiedHost(); + SetSoftwareFeatureState(true /* use_local_device */, + multidevice::SoftwareFeature::kBetterTogetherClient, + multidevice::SoftwareFeatureState::kSupported); + SetSoftwareFeatureState(true /* use_local_device */, + multidevice::SoftwareFeature::kInstantTetheringClient, + multidevice::SoftwareFeatureState::kSupported); + SetSoftwareFeatureState(true /* use_local_device */, + multidevice::SoftwareFeature::kSmartLockClient, + multidevice::SoftwareFeatureState::kSupported); + SetSoftwareFeatureState(true /* use_local_device */, + multidevice::SoftwareFeature::kMessagesForWebClient, + multidevice::SoftwareFeatureState::kSupported); + SetSoftwareFeatureState(true /* use_local_device */, + multidevice::SoftwareFeature::kPhoneHubClient, + multidevice::SoftwareFeatureState::kSupported); + SetSoftwareFeatureState(true /* use_local_device */, + multidevice::SoftwareFeature::kWifiSyncClient, + multidevice::SoftwareFeatureState::kSupported); + + // Verify that all features are unsupported. + VerifyFeatureState(mojom::FeatureState::kNotSupportedByChromebook, + mojom::Feature::kBetterTogetherSuite); + VerifyFeatureState(mojom::FeatureState::kNotSupportedByChromebook, + mojom::Feature::kInstantTethering); + VerifyFeatureState(mojom::FeatureState::kNotSupportedByChromebook, + mojom::Feature::kMessages); + VerifyFeatureState(mojom::FeatureState::kNotSupportedByChromebook, + mojom::Feature::kSmartLock); + VerifyFeatureState(mojom::FeatureState::kNotSupportedByChromebook, + mojom::Feature::kPhoneHub); + VerifyFeatureState(mojom::FeatureState::kNotSupportedByChromebook, + mojom::Feature::kPhoneHubNotifications); + VerifyFeatureState(mojom::FeatureState::kNotSupportedByChromebook, + mojom::Feature::kPhoneHubTaskContinuation); + VerifyFeatureState(mojom::FeatureState::kNotSupportedByChromebook, + mojom::Feature::kWifiSync); + VerifyFeatureState(mojom::FeatureState::kNotSupportedByChromebook, + mojom::Feature::kEche); + VerifyFeatureState(mojom::FeatureState::kNotSupportedByChromebook, + mojom::Feature::kPhoneHubCameraRoll); +} + TEST_F(MultiDeviceSetupFeatureStateManagerImplTest, BetterTogetherSuite) { SetupFeatureStateManager(); @@ -579,8 +633,9 @@ mojom::Feature::kPhoneHubNotifications, mojom::Feature::kPhoneHubTaskContinuation, mojom::Feature::kEche}; - for (const auto& phone_hub_feature : kAllPhoneHubFeatures) + for (const auto& phone_hub_feature : kAllPhoneHubFeatures) { TryAllUnverifiedHostStatesAndVerifyFeatureState(phone_hub_feature); + } SetVerifiedHost(); for (const auto& phone_hub_feature : kAllPhoneHubFeatures) { @@ -664,8 +719,9 @@ mojom::Feature::kPhoneHubNotifications, mojom::Feature::kPhoneHubTaskContinuation, mojom::Feature::kEche}; - for (const auto& phone_hub_feature : kAllPhoneHubFeatures) + for (const auto& phone_hub_feature : kAllPhoneHubFeatures) { TryAllUnverifiedHostStatesAndVerifyFeatureState(phone_hub_feature); + } SetVerifiedHost(); for (const auto& phone_hub_feature : kAllPhoneHubFeatures) { @@ -742,8 +798,9 @@ mojom::Feature::kPhoneHub, mojom::Feature::kPhoneHubNotifications, mojom::Feature::kPhoneHubTaskContinuation}; - for (const auto& phone_hub_feature : kAllPhoneHubFeatures) + for (const auto& phone_hub_feature : kAllPhoneHubFeatures) { TryAllUnverifiedHostStatesAndVerifyFeatureState(phone_hub_feature); + } SetVerifiedHost(); for (const auto& phone_hub_feature : kAllPhoneHubFeatures) {
diff --git a/chromeos/crosapi/mojom/embedded_accessibility_helper.mojom b/chromeos/crosapi/mojom/embedded_accessibility_helper.mojom index 2906203..28a551c 100644 --- a/chromeos/crosapi/mojom/embedded_accessibility_helper.mojom +++ b/chromeos/crosapi/mojom/embedded_accessibility_helper.mojom
@@ -18,11 +18,32 @@ SpeakSelectedText@0(); }; +// Interface for EmbeddedAccessibilityHelpers. Implemented by lacros-chrome. +// Used by ash-chrome for accessibility features in Ash that need actions +// performed in lacros-chrome. +[Stable, Uuid="f259d816-7530-4fcc-9836-0e2996d395ec"] +interface EmbeddedAccessibilityHelper { + // Called when Select to Speak in Ash wants a clipboard copy + // event to be performed on the active and focused tab with the + // given URL. This is fired when Select to Speak is trying to speak + // with search+s but cannot find a selection and the focused node + // is in a Google Docs page. + ClipboardCopyInActiveGoogleDoc@0(string url); +}; + // A factory living in ash-chrome which brokers connections to other -// processes for EmbeddedAccessibilityHelperClient. +// processes for EmbeddedAccessibilityHelper and +// EmbeddedAccessibilityHelperClient. +// Next version: 2 +// Next method id: 2 [Stable, Uuid="b6216633-c0d5-4eab-848e-d9fdfeaa3c33"] interface EmbeddedAccessibilityHelperClientFactory { - // Binds EmbeddedAccessibilityHelperClient's receiver in lacros-chrome. - BindEmbeddedAccessibilityHelperClient@0( - pending_receiver<EmbeddedAccessibilityHelperClient> embedded_ax_helper_client); + // Binds EmbeddedAccessibilityHelperClient's receiver in lacros-chrome. + BindEmbeddedAccessibilityHelperClient@0( + pending_receiver<EmbeddedAccessibilityHelperClient> + embedded_ax_helper_client); + + // Binds EmbeddedAccessibilityHelper's remote in lacros-chrome. + [MinVersion=1] BindEmbeddedAccessibilityHelper@1( + pending_remote<EmbeddedAccessibilityHelper> embedded_ax_helper); };
diff --git a/chromeos/profiles/atom.afdo.newest.txt b/chromeos/profiles/atom.afdo.newest.txt index dbcd156..cf371e3 100644 --- a/chromeos/profiles/atom.afdo.newest.txt +++ b/chromeos/profiles/atom.afdo.newest.txt
@@ -1 +1 @@ -chromeos-chrome-amd64-atom-118-5978.0-1695034742-benchmark-119.0.6019.0-r1-redacted.afdo.xz +chromeos-chrome-amd64-atom-118-5978.0-1695034742-benchmark-119.0.6020.0-r2-redacted.afdo.xz
diff --git a/clank b/clank index 9b02ccff..9cb3763 160000 --- a/clank +++ b/clank
@@ -1 +1 @@ -Subproject commit 9b02ccffa6e89d606b5364dcea2b78d054903a02 +Subproject commit 9cb3763b57dad6a18fedab649ec129310e52a26e
diff --git a/components/attribution_reporting/registration.mojom b/components/attribution_reporting/registration.mojom index 311f643..b713758 100644 --- a/components/attribution_reporting/registration.mojom +++ b/components/attribution_reporting/registration.mojom
@@ -95,10 +95,7 @@ // report can be generated with this source. mojo_base.mojom.TimeDelta? aggregatable_report_window; - // Optionally specifies how many event-level reports can be generated with - // this source, with -1 representing absl::nullopt. - // - // TODO(crbug.com/657632): Make nullable. + // Specifies how many event-level reports can be generated with this source. int32 max_event_level_reports; // Priority for this source.
diff --git a/components/attribution_reporting/registration_mojom_traits.cc b/components/attribution_reporting/registration_mojom_traits.cc index 9c7d8d2f..592e21d 100644 --- a/components/attribution_reporting/registration_mojom_traits.cc +++ b/components/attribution_reporting/registration_mojom_traits.cc
@@ -205,10 +205,7 @@ } out->source_event_id = data.source_event_id(); - out->max_event_level_reports = - data.max_event_level_reports() == -1 - ? absl::nullopt - : absl::make_optional(data.max_event_level_reports()); + out->max_event_level_reports = data.max_event_level_reports(); out->priority = data.priority(); out->debug_reporting = data.debug_reporting(); return out->IsValid();
diff --git a/components/attribution_reporting/registration_mojom_traits.h b/components/attribution_reporting/registration_mojom_traits.h index 18a098d8..b934826 100644 --- a/components/attribution_reporting/registration_mojom_traits.h +++ b/components/attribution_reporting/registration_mojom_traits.h
@@ -186,7 +186,7 @@ static int max_event_level_reports( const attribution_reporting::SourceRegistration& source) { - return source.max_event_level_reports.value_or(-1); + return source.max_event_level_reports; } static int64_t priority(
diff --git a/components/attribution_reporting/source_registration.cc b/components/attribution_reporting/source_registration.cc index 7a85ef2..b8124a3 100644 --- a/components/attribution_reporting/source_registration.cc +++ b/components/attribution_reporting/source_registration.cc
@@ -24,6 +24,7 @@ #include "components/attribution_reporting/filters.h" #include "components/attribution_reporting/parsing_utils.h" #include "components/attribution_reporting/source_registration_error.mojom.h" +#include "components/attribution_reporting/source_type.mojom.h" #include "components/attribution_reporting/suitable_origin.h" #include "mojo/public/cpp/bindings/default_construct_tag.h" #include "third_party/abseil-cpp/absl/types/optional.h" @@ -33,6 +34,7 @@ namespace { using ::attribution_reporting::mojom::SourceRegistrationError; +using ::attribution_reporting::mojom::SourceType; constexpr char kAggregatableReportWindow[] = "aggregatable_report_window"; constexpr char kAggregationKeys[] = "aggregation_keys"; @@ -57,6 +59,15 @@ return *i; } +int DefaultMaxEventLevelReports(SourceType source_type) { + switch (source_type) { + case SourceType::kNavigation: + return 3; + case SourceType::kEvent: + return 1; + } +} + } // namespace void RecordSourceRegistrationError(mojom::SourceRegistrationError error) { @@ -83,7 +94,8 @@ // static base::expected<SourceRegistration, SourceRegistrationError> -SourceRegistration::Parse(base::Value::Dict registration) { +SourceRegistration::Parse(base::Value::Dict registration, + SourceType source_type) { ASSIGN_OR_RETURN(DestinationSet destination_set, DestinationSet::FromJSON(registration.Find(kDestination))); SourceRegistration result(std::move(destination_set)); @@ -128,6 +140,8 @@ if (const base::Value* value = registration.Find(kMaxEventLevelReports)) { ASSIGN_OR_RETURN(result.max_event_level_reports, ParseMaxEventLevelReports(*value)); + } else { + result.max_event_level_reports = DefaultMaxEventLevelReports(source_type); } result.debug_key = ParseDebugKey(registration); @@ -140,7 +154,7 @@ // static base::expected<SourceRegistration, SourceRegistrationError> -SourceRegistration::Parse(base::StringPiece json) { +SourceRegistration::Parse(base::StringPiece json, SourceType source_type) { base::expected<SourceRegistration, SourceRegistrationError> source = base::unexpected(SourceRegistrationError::kInvalidJson); @@ -149,7 +163,7 @@ if (value) { if (value->is_dict()) { - source = Parse(std::move(*value).TakeDict()); + source = Parse(std::move(*value).TakeDict(), source_type); } else { source = base::unexpected(SourceRegistrationError::kRootWrongType); } @@ -190,9 +204,7 @@ SerializeDebugKey(dict, debug_key); SerializeDebugReporting(dict, debug_reporting); - if (max_event_level_reports.has_value()) { - dict.Set(kMaxEventLevelReports, max_event_level_reports.value()); - } + dict.Set(kMaxEventLevelReports, max_event_level_reports); return dict; } @@ -207,8 +219,7 @@ return false; } - if (max_event_level_reports.has_value() && - !IsMaxEventLevelReportsValid(*max_event_level_reports)) { + if (!IsMaxEventLevelReportsValid(max_event_level_reports)) { return false; }
diff --git a/components/attribution_reporting/source_registration.h b/components/attribution_reporting/source_registration.h index f50b0a6..f8e8ad30 100644 --- a/components/attribution_reporting/source_registration.h +++ b/components/attribution_reporting/source_registration.h
@@ -17,6 +17,7 @@ #include "components/attribution_reporting/event_report_windows.h" #include "components/attribution_reporting/filters.h" #include "components/attribution_reporting/source_registration_error.mojom-forward.h" +#include "components/attribution_reporting/source_type.mojom-forward.h" #include "mojo/public/cpp/bindings/default_construct_tag.h" #include "third_party/abseil-cpp/absl/types/optional.h" @@ -28,11 +29,11 @@ struct COMPONENT_EXPORT(ATTRIBUTION_REPORTING) SourceRegistration { // Doesn't log metric on parsing failures. static base::expected<SourceRegistration, mojom::SourceRegistrationError> - Parse(base::Value::Dict); + Parse(base::Value::Dict, mojom::SourceType); // Logs metric on parsing failures. static base::expected<SourceRegistration, mojom::SourceRegistrationError> - Parse(base::StringPiece json); + Parse(base::StringPiece json, mojom::SourceType); explicit SourceRegistration(DestinationSet); @@ -59,9 +60,9 @@ absl::optional<base::TimeDelta> expiry; absl::optional<EventReportWindows> event_report_windows; absl::optional<base::TimeDelta> aggregatable_report_window; - // Must be non-negative and <= `kMaxSettableEventLevelAttributions` if set. + // Must be non-negative and <= `kMaxSettableEventLevelAttributions`. // This is verified by the `Parse()` and `IsValid()` methods. - absl::optional<int> max_event_level_reports; + int max_event_level_reports = 0; int64_t priority = 0; FilterData filter_data; absl::optional<uint64_t> debug_key;
diff --git a/components/attribution_reporting/source_registration_fuzzer.cc b/components/attribution_reporting/source_registration_fuzzer.cc index 68c32ef..a3a99f37 100644 --- a/components/attribution_reporting/source_registration_fuzzer.cc +++ b/components/attribution_reporting/source_registration_fuzzer.cc
@@ -15,6 +15,7 @@ #include "base/logging.h" #include "base/values.h" #include "components/attribution_reporting/source_registration.h" +#include "components/attribution_reporting/source_type.mojom.h" #include "testing/libfuzzer/proto/json.pb.h" #include "testing/libfuzzer/proto/json_proto_converter.h" #include "testing/libfuzzer/proto/lpm_interface.h" @@ -48,7 +49,9 @@ if (!input || !input->is_dict()) return; - std::ignore = SourceRegistration::Parse(std::move(*input).TakeDict()); + // TODO(apaseltiner): Allow `source_type` to be fuzzed. + std::ignore = SourceRegistration::Parse(std::move(*input).TakeDict(), + mojom::SourceType::kNavigation); } } // namespace attribution_reporting
diff --git a/components/attribution_reporting/source_registration_unittest.cc b/components/attribution_reporting/source_registration_unittest.cc index ce206bbb..1bc0e611 100644 --- a/components/attribution_reporting/source_registration_unittest.cc +++ b/components/attribution_reporting/source_registration_unittest.cc
@@ -18,6 +18,7 @@ #include "components/attribution_reporting/event_report_windows.h" #include "components/attribution_reporting/filters.h" #include "components/attribution_reporting/source_registration_error.mojom.h" +#include "components/attribution_reporting/source_type.mojom.h" #include "components/attribution_reporting/test_utils.h" #include "net/base/schemeful_site.h" #include "testing/gmock/include/gmock/gmock.h" @@ -29,6 +30,7 @@ namespace { using ::attribution_reporting::mojom::SourceRegistrationError; +using ::attribution_reporting::mojom::SourceType; using ::base::test::ErrorIs; using ::base::test::ValueIs; using ::testing::AllOf; @@ -52,6 +54,7 @@ ::testing::Matcher< base::expected<SourceRegistration, SourceRegistrationError>> matches; + SourceType source_type = SourceType::kNavigation; } kTestCases[] = { { "invalid_json", @@ -73,8 +76,7 @@ Field(&SourceRegistration::event_report_windows, absl::nullopt), Field(&SourceRegistration::aggregatable_report_window, absl::nullopt), - Field(&SourceRegistration::max_event_level_reports, - absl::nullopt), + Field(&SourceRegistration::max_event_level_reports, 3), Field(&SourceRegistration::priority, 0), Field(&SourceRegistration::filter_data, FilterData()), Field(&SourceRegistration::debug_key, absl::nullopt), @@ -210,6 +212,12 @@ SourceRegistrationError::kAggregatableReportWindowValueInvalid), }, { + "max_event_level_reports_omitted_event", + R"json({"destination":"https://d.example"})json", + ValueIs(Field(&SourceRegistration::max_event_level_reports, 1)), + SourceType::kEvent, + }, + { "max_event_level_reports_valid", R"json({"max_event_level_reports":5, "destination":"https://d.example"})json", @@ -296,7 +304,8 @@ SCOPED_TRACE(test_case.desc); base::HistogramTester histograms; - auto source = SourceRegistration::Parse(test_case.json); + auto source = + SourceRegistration::Parse(test_case.json, test_case.source_type); EXPECT_THAT(source, test_case.matches); if (source.has_value()) { @@ -321,6 +330,7 @@ R"json({ "debug_reporting": false, "destination":"https://d.example", + "max_event_level_reports": 0, "priority": "0", "source_event_id": "0" })json",
diff --git a/components/autofill/core/browser/address_profile_save_manager.cc b/components/autofill/core/browser/address_profile_save_manager.cc index c19c3d6..d9b0289 100644 --- a/components/autofill/core/browser/address_profile_save_manager.cc +++ b/components/autofill/core/browser/address_profile_save_manager.cc
@@ -143,13 +143,7 @@ std::unique_ptr<ProfileImportProcess> import_process) { DCHECK(personal_data_manager_); - // If the profiles changed at all, reset the full list of AutofillProfiles in - // the personal data manager. - if (import_process->ProfilesChanged()) { - std::vector<AutofillProfile> resulting_profiles = - import_process->GetResultingProfiles(); - personal_data_manager_->SetProfilesForAllSources(&resulting_profiles); - } + import_process->ApplyImport(); AdjustNewProfileStrikes(*import_process); AdjustUpdateProfileStrikes(*import_process);
diff --git a/components/autofill/core/browser/autofill_profile_import_process.cc b/components/autofill/core/browser/autofill_profile_import_process.cc index 59cf170..7dac051 100644 --- a/components/autofill/core/browser/autofill_profile_import_process.cc +++ b/components/autofill/core/browser/autofill_profile_import_process.cc
@@ -57,7 +57,7 @@ const AutofillProfile& observed_profile, const std::string& app_locale, const GURL& form_source_url, - const PersonalDataManager* personal_data_manager, + PersonalDataManager* personal_data_manager, bool allow_only_silent_updates, ProfileImportMetadata import_metadata) : import_id_(GetImportId()), @@ -297,54 +297,31 @@ } } -std::vector<AutofillProfile> ProfileImportProcess::GetResultingProfiles() { +void ProfileImportProcess::ApplyImport() { // At this point, a user decision must have been supplied. DCHECK_NE(user_decision_, UserDecision::kUndefined); - - std::vector<AutofillProfile> resulting_profiles; - std::set<std::string> guids_of_changed_profiles; - - // Add all silently updated profiles. - for (const auto& updated_profile : silently_updated_profiles_) { - resulting_profiles.push_back(updated_profile); - guids_of_changed_profiles.insert(updated_profile.guid()); + if (!ProfilesChanged()) { + return; } - // If there is a confirmed import candidate, add it. - if (confirmed_import_candidate_.has_value()) { - // Confirming an import candidate corresponds to either a new/update profile - // or a migration prompt. - if (is_migration()) { - AutofillProfile migrated_profile = - confirmed_import_candidate_->ConvertToAccountProfile(); - CHECK_NE(migrated_profile.guid(), confirmed_import_candidate_->guid()); - resulting_profiles.push_back(migrated_profile); - guids_of_changed_profiles.insert(migrated_profile.guid()); - // Adding the `confirmed_import_candidate_`'s GUID ensures that it isn't - // revived below as one of the unchanged profiles. - guids_of_changed_profiles.insert(confirmed_import_candidate_->guid()); - // If the `import_candidate_` was silently updated, it is part of - // `silently_updated_profiles_`. Remove the corresponding - // `confirmed_import_candidate_` from `reesulting_profiles`, so it doesn't - // get revived. - base::EraseIf(resulting_profiles, [&](const AutofillProfile& profile) { - return profile.guid() == confirmed_import_candidate_->guid(); - }); - } else { - resulting_profiles.emplace_back(confirmed_import_candidate_.value()); - guids_of_changed_profiles.insert(confirmed_import_candidate_->guid()); - } + // Apply silent updates. + for (const AutofillProfile& updated_profile : silently_updated_profiles_) { + personal_data_manager_->UpdateProfile(updated_profile); } - // Add all other profiles that are currently available in the personal data - // manager. - for (const auto* unchanged_profile : personal_data_manager_->GetProfiles()) { - if (!guids_of_changed_profiles.contains(unchanged_profile->guid())) { - resulting_profiles.push_back(*unchanged_profile); - } + if (!confirmed_import_candidate_.has_value()) { + return; } - - return resulting_profiles; + const AutofillProfile& confirmed_profile = *confirmed_import_candidate_; + // Confirming an import candidate corresponds to either a new/update profile + // or a migration prompt. + if (is_migration()) { + personal_data_manager_->MigrateProfileToAccount(confirmed_profile); + } else if (is_confirmable_update()) { + personal_data_manager_->UpdateProfile(confirmed_profile); + } else { + personal_data_manager_->AddProfile(confirmed_profile); + } } void ProfileImportProcess::SetUserDecision(
diff --git a/components/autofill/core/browser/autofill_profile_import_process.h b/components/autofill/core/browser/autofill_profile_import_process.h index e0c766b..ab917e5 100644 --- a/components/autofill/core/browser/autofill_profile_import_process.h +++ b/components/autofill/core/browser/autofill_profile_import_process.h
@@ -107,8 +107,8 @@ // supplied by either calling `AcceptWithoutPrompt()`, `AcceptWithoutEdits()`, // `AcceptWithEdits()`, `Declined()` or `Ignore()`. // -// * Finally, `GetResultingProfiles()` should be used to get the complete set of -// resulting AutofillProfiles. +// * Finally, `ImportAffectedProfiles()` should be used to update the +// profiles in the `PersonalDataManager`. // // The instance of this class should contain all information needed to record // metrics once an import process is finished. @@ -117,7 +117,7 @@ ProfileImportProcess(const AutofillProfile& observed_profile, const std::string& app_locale, const GURL& form_source_url, - const PersonalDataManager* personal_data_manager, + PersonalDataManager* personal_data_manager, bool allow_only_silent_updates, ProfileImportMetadata import_metadata = {}); @@ -183,9 +183,11 @@ const GURL& form_source_url() const { return form_source_url_; } - // Returns a vector containing all unchanged, updated, merged and new - // profiles. - std::vector<AutofillProfile> GetResultingProfiles(); + // Adds and updates all profiles affected by the import process in the + // `personal_data_manager_`. The affected profiles correspond to the + // `silently_updated_profiles_` and depending on the import type, the + // `confirmed_import_candidate_`. + void ApplyImport(); // Returns false if the import does not result in any change to the stored // profiles. This function can only be evaluated after a decision was @@ -301,8 +303,8 @@ bool new_profiles_suppressed_for_domain_; // A pointer to the persona data manager that is used to retrieve additional - // information about existing profiles. - raw_ptr<const PersonalDataManager> personal_data_manager_; + // information about existing profiles and save/update imported profiles. + raw_ptr<PersonalDataManager> personal_data_manager_; // Counts the number of blocked profile updates. int number_of_blocked_profile_updates_{0};
diff --git a/components/autofill/core/browser/autofill_profile_import_process_unittest.cc b/components/autofill/core/browser/autofill_profile_import_process_unittest.cc index aac2843..ee3291a 100644 --- a/components/autofill/core/browser/autofill_profile_import_process_unittest.cc +++ b/components/autofill/core/browser/autofill_profile_import_process_unittest.cc
@@ -44,6 +44,20 @@ } } + // Returns all profiles stored in the `personal_data_manager_` after + // finalizing the `import_process`'s import. + std::vector<AutofillProfile> ApplyImportAndGetProfiles( + ProfileImportProcess& import_process) const { + import_process.ApplyImport(); + // For convenience, return plain objects rather than pointers. + std::vector<AutofillProfile> profiles; + for (const AutofillProfile* pdm_profile : + personal_data_manager_.GetProfiles()) { + profiles.push_back(*pdm_profile); + } + return profiles; + } + TestPersonalDataManager personal_data_manager_; GURL url_{"https://www.import.me/now.html"}; }; @@ -97,7 +111,7 @@ EXPECT_EQ(import_data.import_type(), AutofillProfileImportType::kNewProfile); std::vector<AutofillProfile> resulting_profiles = - import_data.GetResultingProfiles(); + ApplyImportAndGetProfiles(import_data); ASSERT_EQ(resulting_profiles.size(), 1U); EXPECT_THAT(resulting_profiles, testing::UnorderedElementsAre(observed_profile)); @@ -128,7 +142,7 @@ EXPECT_EQ(import_data.import_type(), AutofillProfileImportType::kSuppressedNewProfile); - EXPECT_THAT(import_data.GetResultingProfiles(), + EXPECT_THAT(ApplyImportAndGetProfiles(import_data), testing::UnorderedElementsAre()); } @@ -159,7 +173,7 @@ EXPECT_TRUE(import_data.ProfilesChanged()); EXPECT_EQ(import_data.import_type(), AutofillProfileImportType::kNewProfile); - EXPECT_THAT(import_data.GetResultingProfiles(), + EXPECT_THAT(ApplyImportAndGetProfiles(import_data), testing::UnorderedElementsAre(edited_profile)); } @@ -186,7 +200,7 @@ // profile. EXPECT_EQ(import_data.import_type(), AutofillProfileImportType::kNewProfile); - EXPECT_THAT(import_data.GetResultingProfiles(), + EXPECT_THAT(ApplyImportAndGetProfiles(import_data), testing::UnorderedElementsAre()); } @@ -215,7 +229,7 @@ // There should be no change to the profiles. EXPECT_FALSE(import_data.ProfilesChanged()); - EXPECT_THAT(import_data.GetResultingProfiles(), + EXPECT_THAT(ApplyImportAndGetProfiles(import_data), testing::UnorderedElementsAre(existing_profiles.at(0))); } @@ -273,7 +287,7 @@ // Verify that this operation does not result in a change of the profiles. EXPECT_FALSE(import_data.ProfilesChanged()); - EXPECT_THAT(import_data.GetResultingProfiles(), + EXPECT_THAT(ApplyImportAndGetProfiles(import_data), testing::UnorderedElementsAre(duplicate_existing_profile, distinct_existing_profile)); } @@ -295,7 +309,7 @@ AutofillProfileImportType::kDuplicateImport); import_data.AcceptWithoutPrompt(); EXPECT_FALSE(import_data.ProfilesChanged()); - EXPECT_THAT(import_data.GetResultingProfiles(), + EXPECT_THAT(ApplyImportAndGetProfiles(import_data), testing::ElementsAreArray(existing_profiles)); } @@ -316,7 +330,7 @@ AutofillProfileImportType::kDuplicateImport); import_data.AcceptWithoutPrompt(); EXPECT_FALSE(import_data.ProfilesChanged()); - EXPECT_THAT(import_data.GetResultingProfiles(), + EXPECT_THAT(ApplyImportAndGetProfiles(import_data), testing::ElementsAreArray(existing_profiles)); } @@ -341,7 +355,7 @@ AutofillProfileImportType::kDuplicateImport); import_data.AcceptWithoutPrompt(); EXPECT_FALSE(import_data.ProfilesChanged()); - EXPECT_THAT(import_data.GetResultingProfiles(), + EXPECT_THAT(ApplyImportAndGetProfiles(import_data), testing::ElementsAreArray(existing_profiles)); } @@ -370,7 +384,7 @@ AutofillProfile expected_profile = test::StandardProfile(); expected_profile.set_guid(account_profile.guid()); expected_profile.set_source_for_testing(AutofillProfile::Source::kAccount); - EXPECT_THAT(import_data.GetResultingProfiles(), + EXPECT_THAT(ApplyImportAndGetProfiles(import_data), testing::ElementsAre(expected_profile)); } @@ -397,7 +411,7 @@ AutofillProfile expected_profile = test::StandardProfile(); expected_profile.set_source_for_testing(AutofillProfile::Source::kAccount); expected_profile.set_guid(account_profile.guid()); - EXPECT_THAT(import_data.GetResultingProfiles(), + EXPECT_THAT(ApplyImportAndGetProfiles(import_data), testing::ElementsAre(expected_profile)); } @@ -446,7 +460,7 @@ test::CopyGUID(mergeable_profile, &final_profile); std::vector<AutofillProfile> resulting_profiles = - import_data.GetResultingProfiles(); + ApplyImportAndGetProfiles(import_data); ASSERT_EQ(resulting_profiles.size(), 1U); EXPECT_THAT(resulting_profiles, testing::UnorderedElementsAre(final_profile)); EXPECT_EQ(resulting_profiles.at(0).modification_date(), current_time); @@ -494,7 +508,7 @@ EXPECT_TRUE(import_data.ProfilesChanged()); std::vector<AutofillProfile> resulting_profiles = - import_data.GetResultingProfiles(); + ApplyImportAndGetProfiles(import_data); ASSERT_EQ(resulting_profiles.size(), 1U); EXPECT_THAT(resulting_profiles, testing::UnorderedElementsAre(edited_profile)); @@ -539,7 +553,7 @@ AutofillProfile merged_profile = test::StandardProfile(); test::CopyGUID(mergeable_profile, &merged_profile); - EXPECT_THAT(import_data.GetResultingProfiles(), + EXPECT_THAT(ApplyImportAndGetProfiles(import_data), testing::UnorderedElementsAre(merged_profile, distinct_profile)); } @@ -585,7 +599,7 @@ EXPECT_FALSE(import_data.ProfilesChanged()); std::vector<AutofillProfile> resulting_profiles = - import_data.GetResultingProfiles(); + ApplyImportAndGetProfiles(import_data); ASSERT_EQ(resulting_profiles.size(), 1U); EXPECT_THAT(resulting_profiles, testing::UnorderedElementsAre(mergeable_profile)); @@ -634,7 +648,7 @@ updated_profile.set_guid(updateable_profile.guid()); std::vector<AutofillProfile> resulting_profiles = - import_data.GetResultingProfiles(); + ApplyImportAndGetProfiles(import_data); ASSERT_EQ(resulting_profiles.size(), 1U); EXPECT_THAT(resulting_profiles, testing::UnorderedElementsAre(updated_profile)); @@ -680,7 +694,7 @@ AutofillProfile merged_profile = observed_profile; test::CopyGUID(mergeable_profile, &merged_profile); - EXPECT_THAT(import_data.GetResultingProfiles(), + EXPECT_THAT(ApplyImportAndGetProfiles(import_data), testing::UnorderedElementsAre(merged_profile, updated_profile)); } @@ -723,7 +737,7 @@ test::CopyGUID(updateable_profile, &updated_profile); EXPECT_THAT( - import_data.GetResultingProfiles(), + ApplyImportAndGetProfiles(import_data), testing::UnorderedElementsAre(mergeable_profile, updated_profile)); } @@ -768,7 +782,7 @@ test::CopyGUID(updateable_profile, &updated_profile); EXPECT_THAT( - import_data.GetResultingProfiles(), + ApplyImportAndGetProfiles(import_data), testing::UnorderedElementsAre(mergeable_profile, updated_profile)); } @@ -803,7 +817,7 @@ EXPECT_FALSE(import_data.ProfilesChanged()); - EXPECT_THAT(import_data.GetResultingProfiles(), + EXPECT_THAT(ApplyImportAndGetProfiles(import_data), testing::UnorderedElementsAre(mergeable_profile)); } @@ -851,7 +865,7 @@ updated_profile.set_guid(updateable_profile.guid()); std::vector<AutofillProfile> resulting_profiles = - import_data.GetResultingProfiles(); + ApplyImportAndGetProfiles(import_data); ASSERT_EQ(resulting_profiles.size(), 1U); EXPECT_THAT(resulting_profiles, testing::UnorderedElementsAre(updated_profile)); @@ -928,7 +942,7 @@ test::CopyGUID(updateable_profile, &updated_profile); EXPECT_THAT( - import_data.GetResultingProfiles(), + ApplyImportAndGetProfiles(import_data), testing::UnorderedElementsAre(mergeable_profile, updated_profile)); } @@ -987,7 +1001,7 @@ import_data.AcceptWithoutEdits(); EXPECT_TRUE(import_data.ProfilesChanged()); EXPECT_THAT( - import_data.GetResultingProfiles(), + ApplyImportAndGetProfiles(import_data), testing::UnorderedPointwise( CompareWithSource(), {profile_to_migrate.ConvertToAccountProfile(), other_profile})); @@ -1018,7 +1032,7 @@ import_data.AcceptWithoutEdits(); EXPECT_TRUE(import_data.ProfilesChanged()); EXPECT_THAT( - import_data.GetResultingProfiles(), + ApplyImportAndGetProfiles(import_data), testing::UnorderedPointwise( CompareWithSource(), {observed_profile.ConvertToAccountProfile()})); } @@ -1040,7 +1054,7 @@ import_data.Declined(); EXPECT_TRUE(import_data.ProfilesChanged()); EXPECT_THAT( - import_data.GetResultingProfiles(), + ApplyImportAndGetProfiles(import_data), testing::UnorderedPointwise(CompareWithSource(), {observed_profile})); }
diff --git a/components/autofill/core/browser/metrics/shadow_prediction_metrics.cc b/components/autofill/core/browser/metrics/shadow_prediction_metrics.cc index b54a5af..f420c87 100644 --- a/components/autofill/core/browser/metrics/shadow_prediction_metrics.cc +++ b/components/autofill/core/browser/metrics/shadow_prediction_metrics.cc
@@ -4,8 +4,12 @@ #include "components/autofill/core/browser/metrics/shadow_prediction_metrics.h" +#include "base/feature_list.h" #include "base/metrics/histogram_functions.h" #include "components/autofill/core/browser/form_parsing/buildflags.h" +#include "components/autofill/core/browser/heuristic_source.h" +#include "components/autofill/core/common/autofill_features.h" +#include "components/optimization_guide/machine_learning_tflite_buildflags.h" namespace autofill::autofill_metrics { @@ -83,6 +87,32 @@ field.heuristic_type(HeuristicSource::kNextGen), submitted_types)); #endif + +#if BUILDFLAG(BUILD_WITH_TFLITE_LIB) + if (base::FeatureList::IsEnabled(features::kAutofillModelPredictions)) { + base::UmaHistogramSparse( + "Autofill.ShadowPredictions.DefaultServerToMLModel", + GetShadowPrediction( + field.server_type(), + field.heuristic_type(HeuristicSource::kMachineLearning), + submitted_types)); +#if !BUILDFLAG(USE_INTERNAL_AUTOFILL_PATTERNS) + base::UmaHistogramSparse( + "Autofill.ShadowPredictions.LegacyPatternSourceToMLModel", + GetShadowPrediction( + field.heuristic_type(HeuristicSource::kLegacy), + field.heuristic_type(HeuristicSource::kMachineLearning), + submitted_types)); +#else + base::UmaHistogramSparse( + "Autofill.ShadowPredictions.DefaultPatternSourceToMLModel", + GetShadowPrediction( + field.heuristic_type(HeuristicSource::kDefault), + field.heuristic_type(HeuristicSource::kMachineLearning), + submitted_types)); +#endif + } +#endif } } // namespace autofill::autofill_metrics
diff --git a/components/browser_ui/accessibility/android/BUILD.gn b/components/browser_ui/accessibility/android/BUILD.gn index ac93846..c1c2506 100644 --- a/components/browser_ui/accessibility/android/BUILD.gn +++ b/components/browser_ui/accessibility/android/BUILD.gn
@@ -64,6 +64,7 @@ "//components/user_prefs/android:java", "//content/public/android:content_full_java", "//third_party/androidx:androidx_annotation_annotation_java", + "//third_party/androidx:androidx_fragment_fragment_java", "//third_party/androidx:androidx_preference_preference_java", "//ui/accessibility:ax_base_java", "//ui/android:ui_no_recycler_view_java",
diff --git a/components/browser_ui/modaldialog/android/java/res/layout/permission_dialog.xml b/components/browser_ui/modaldialog/android/java/res/layout/permission_dialog.xml index d76b871e..67b5855 100644 --- a/components/browser_ui/modaldialog/android/java/res/layout/permission_dialog.xml +++ b/components/browser_ui/modaldialog/android/java/res/layout/permission_dialog.xml
@@ -20,4 +20,14 @@ android:drawablePadding="8dp" android:textAppearance="@style/TextAppearance.TextMedium.Secondary" app:chromeDrawableTint="@macro/default_icon_color_accent1" /> + + <TextView + android:id="@+id/secondary" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:gravity="center_vertical" + android:textDirection="locale" + android:paddingBottom="12dp" + android:visibility="gone" + android:textAppearance="@style/TextAppearance.TextSmall.Secondary"/> </LinearLayout>
diff --git a/components/content_settings/core/browser/cookie_settings.cc b/components/content_settings/core/browser/cookie_settings.cc index 3adbd64..096b962 100644 --- a/components/content_settings/core/browser/cookie_settings.cc +++ b/components/content_settings/core/browser/cookie_settings.cc
@@ -239,6 +239,20 @@ const GURL& secondary_url, ContentSettingsType content_type, content_settings::SettingInfo* info) const { + if (content_type == ContentSettingsType::TPCD_METADATA_GRANTS) { + const auto& entry = base::ranges::find_if( + settings_for_3pcd_metadata_grants_, + [&](const ContentSettingPatternSource& entry) { + CHECK(IsAllowed( + content_settings::ValueToContentSetting(entry.setting_value))); + return entry.primary_pattern.Matches(primary_url) && + entry.secondary_pattern.Matches(secondary_url); + }); + return entry != settings_for_3pcd_metadata_grants_.end() + ? CONTENT_SETTING_ALLOW + : CONTENT_SETTING_BLOCK; + } + return host_content_settings_map_->GetContentSetting( primary_url, secondary_url, content_type, info); }
diff --git a/components/content_settings/core/browser/cookie_settings.h b/components/content_settings/core/browser/cookie_settings.h index a7d11c04..31182e1 100644 --- a/components/content_settings/core/browser/cookie_settings.h +++ b/components/content_settings/core/browser/cookie_settings.h
@@ -115,6 +115,31 @@ // not covered by user bypass at this state of art. bool IsStoragePartitioningBypassEnabled(const GURL& first_party_url); + // Sets the `settings_for_3pcd_metadata_grants_` `ContentSettingsForOneType` + // to be held and accessed from memory by the cookie settings object. + void SetContentSettingsFor3pcdMetadataGrants( + const ContentSettingsForOneType settings) { + settings_for_3pcd_metadata_grants_ = settings; + } + + ContentSetting GetContentSettingForTesting( + const GURL& primary_url, + const GURL& secondary_url, + ContentSettingsType content_type, + content_settings::SettingInfo* info = nullptr) { + return GetContentSetting(primary_url, secondary_url, content_type); + } + + ContentSettingsForOneType GetContentSettingsForOneTypeForTesting( + ContentSettingsType content_type) { + switch (content_type) { + case ContentSettingsType::TPCD_METADATA_GRANTS: + return settings_for_3pcd_metadata_grants_; + default: + NOTREACHED_NORETURN() << static_cast<int>(content_type); + } + } + // Resets the cookie setting for the given url. // // This should only be called on the UI thread. @@ -207,6 +232,11 @@ const bool is_incognito_; const char* extension_scheme_; // Weak. + // Used to represent content settings for 3PC accesses granted via the + // component updater service. This type will only be populated when + // `net::features::kTpcdMetadataGrants` is enabled. + ContentSettingsForOneType settings_for_3pcd_metadata_grants_; + mutable base::Lock lock_; bool block_third_party_cookies_ GUARDED_BY(lock_); };
diff --git a/components/content_settings/core/browser/cookie_settings_unittest.cc b/components/content_settings/core/browser/cookie_settings_unittest.cc index 4017313..babfdd9 100644 --- a/components/content_settings/core/browser/cookie_settings_unittest.cc +++ b/components/content_settings/core/browser/cookie_settings_unittest.cc
@@ -802,7 +802,13 @@ EXPECT_TRUE(cookie_settings_->IsCookieSessionOnly(kBlockedSite)); } -TEST_P(CookieSettingsTest, ThirdPartyExceptionSessionOnly) { +#if BUILDFLAG(IS_IOS) && BUILDFLAG(USE_BLINK) +#define MAYBE_ThirdPartyExceptionSessionOnly \ + DISABLED_ThirdPartyExceptionSessionOnly +#else +#define MAYBE_ThirdPartyExceptionSessionOnly ThirdPartyExceptionSessionOnly +#endif // BUILDFLAG(IS_IOS) && BUILDFLAG(USE_BLINK) +TEST_P(CookieSettingsTest, MAYBE_ThirdPartyExceptionSessionOnly) { cookie_settings_->SetThirdPartyCookieSetting(kBlockedSite, CONTENT_SETTING_SESSION_ONLY); EXPECT_EQ(cookie_settings_->IsCookieSessionOnly(kBlockedSite), @@ -1133,7 +1139,14 @@ EXPECT_TRUE(ShouldDeleteCookieOnExit(kSubDomain, true)); } -TEST_P(CookieSettingsTest, DeleteCookiesWithThirdPartyException) { +#if BUILDFLAG(IS_IOS) && BUILDFLAG(USE_BLINK) +#define MAYBE_DeleteCookiesWithThirdPartyException \ + DISABLED_DeleteCookiesWithThirdPartyException +#else +#define MAYBE_DeleteCookiesWithThirdPartyException \ + DeleteCookiesWithThirdPartyException +#endif // BUILDFLAG(IS_IOS) && BUILDFLAG(USE_BLINK) +TEST_P(CookieSettingsTest, MAYBE_DeleteCookiesWithThirdPartyException) { cookie_settings_->SetDefaultCookieSetting(CONTENT_SETTING_ALLOW); cookie_settings_->SetThirdPartyCookieSetting(kHttpsSite, CONTENT_SETTING_SESSION_ONLY); @@ -1490,10 +1503,13 @@ prefs_.SetInteger(prefs::kCookieControlsMode, static_cast<int>(CookieControlsMode::kBlockThirdParty)); - settings_map_->SetContentSettingCustomScope( + ContentSettingsForOneType tpcd_metadata_grants; + tpcd_metadata_grants.emplace_back( ContentSettingsPattern::FromURLNoWildcard(url), ContentSettingsPattern::FromURLNoWildcard(top_level_url), - ContentSettingsType::TPCD_METADATA_GRANTS, CONTENT_SETTING_ALLOW); + base::Value(ContentSetting::CONTENT_SETTING_ALLOW), std::string(), false); + cookie_settings_->SetContentSettingsFor3pcdMetadataGrants( + tpcd_metadata_grants); EXPECT_EQ(cookie_settings_->GetCookieSetting( url, top_level_url, GetCookieSettingOverrides(), nullptr),
diff --git a/components/cronet/android/test/javatests/src/org/chromium/net/CronetStressTest.java b/components/cronet/android/test/javatests/src/org/chromium/net/CronetStressTest.java index 62d0d5b..c3b6602 100644 --- a/components/cronet/android/test/javatests/src/org/chromium/net/CronetStressTest.java +++ b/components/cronet/android/test/javatests/src/org/chromium/net/CronetStressTest.java
@@ -18,6 +18,8 @@ import org.junit.runner.RunWith; import org.chromium.base.test.util.Batch; +import org.chromium.net.CronetTestRule.CronetImplementation; +import org.chromium.net.CronetTestRule.IgnoreFor; import java.util.ArrayList; import java.util.List; @@ -46,7 +48,10 @@ @Test @LargeTest - public void testLargeNumberOfUploads() throws Exception { + @IgnoreFor(implementations = {CronetImplementation.FALLBACK}, + reason = "This test crashes the fallback implementation.") + public void + testLargeNumberOfUploads() throws Exception { Random random = new Random(); final int kNumRequest = 1000; final int kNumRequestHeaders = 100;
diff --git a/components/feature_engagement/internal/tracker_impl.cc b/components/feature_engagement/internal/tracker_impl.cc index 50a5bf04..21245d16c 100644 --- a/components/feature_engagement/internal/tracker_impl.cc +++ b/components/feature_engagement/internal/tracker_impl.cc
@@ -192,6 +192,15 @@ event_model_->IsReady()); } +#if !BUILDFLAG(IS_ANDROID) +void TrackerImpl::NotifyUsedEvent(const base::Feature& feature) { + const auto& feature_config = configuration_->GetFeatureConfig(feature); + if (!feature_config.used.name.empty()) { + NotifyEvent(feature_config.used.name); + } +} +#endif + bool TrackerImpl::ShouldTriggerHelpUI(const base::Feature& feature) { return ShouldTriggerHelpUIWithSnooze(feature).ShouldShowIph(); }
diff --git a/components/feature_engagement/internal/tracker_impl.h b/components/feature_engagement/internal/tracker_impl.h index 20930b2e..ecc42e4 100644 --- a/components/feature_engagement/internal/tracker_impl.h +++ b/components/feature_engagement/internal/tracker_impl.h
@@ -13,6 +13,7 @@ #include "base/feature_list.h" #include "base/memory/weak_ptr.h" #include "base/time/time.h" +#include "build/build_config.h" #include "components/feature_engagement/public/tracker.h" #include "third_party/abseil-cpp/absl/types/optional.h" @@ -47,6 +48,9 @@ // Tracker implementation. void NotifyEvent(const std::string& event) override; +#if !BUILDFLAG(IS_ANDROID) + void NotifyUsedEvent(const base::Feature& feature) override; +#endif bool ShouldTriggerHelpUI(const base::Feature& feature) override; TriggerDetails ShouldTriggerHelpUIWithSnooze( const base::Feature& feature) override;
diff --git a/components/feature_engagement/internal/tracker_impl_unittest.cc b/components/feature_engagement/internal/tracker_impl_unittest.cc index 8df3cb6..9ad7554 100644 --- a/components/feature_engagement/internal/tracker_impl_unittest.cc +++ b/components/feature_engagement/internal/tracker_impl_unittest.cc
@@ -21,6 +21,7 @@ #include "base/test/metrics/user_action_tester.h" #include "base/test/task_environment.h" #include "base/time/time.h" +#include "build/build_config.h" #include "components/feature_engagement/internal/availability_model_impl.h" #include "components/feature_engagement/internal/display_lock_controller.h" #include "components/feature_engagement/internal/editable_configuration.h" @@ -1257,6 +1258,31 @@ EXPECT_EQ(1u, bar_event.events(0).count()); } +#if !BUILDFLAG(IS_ANDROID) + +TEST_F(TrackerImplTest, TestNotifyUsedEvent) { + StoringInitializedCallback callback; + tracker_->AddOnInitializedCallback(base::BindOnce( + &StoringInitializedCallback::OnInitialized, base::Unretained(&callback))); + base::RunLoop().RunUntilIdle(); + base::UserActionTester user_action_tester; + + tracker_->NotifyUsedEvent(kTrackerTestFeatureFoo); + + // Used event will record both NotifyEvent and NotifyUsedEvent. Explicitly + // specify the whole user action string here. + EXPECT_EQ(1, user_action_tester.GetActionCount( + "InProductHelp.NotifyUsedEvent.test_foo")); + EXPECT_EQ(1, user_action_tester.GetActionCount( + "InProductHelp.NotifyEvent.test_foo")); + EXPECT_EQ(0, user_action_tester.GetActionCount( + "InProductHelp.NotifyUsedEvent.test_bar")); + EXPECT_EQ(0, user_action_tester.GetActionCount( + "InProductHelp.NotifyEvent.test_bar")); +} + +#endif // !BUILDFLAG(IS_ANDROID) + TEST_F(TrackerImplTest, ShouldPassThroughAcquireDisplayLock) { auto lock_handle = std::make_unique<DisplayLockHandle>(base::DoNothing()); DisplayLockHandle* lock_handle_ptr = lock_handle.get();
diff --git a/components/feature_engagement/public/tracker.h b/components/feature_engagement/public/tracker.h index 2d09352..46df8c0 100644 --- a/components/feature_engagement/public/tracker.h +++ b/components/feature_engagement/public/tracker.h
@@ -169,6 +169,11 @@ // Must be called whenever an event happens. virtual void NotifyEvent(const std::string& event) = 0; +#if !BUILDFLAG(IS_ANDROID) + // Notifies that the "used" event for `feature` has happened. + virtual void NotifyUsedEvent(const base::Feature& feature) = 0; +#endif + // This function must be called whenever the triggering condition for a // specific feature happens. Returns true iff the display of the in-product // help must happen.
diff --git a/components/feature_engagement/test/mock_tracker.h b/components/feature_engagement/test/mock_tracker.h index 1a530676..eeee84a 100644 --- a/components/feature_engagement/test/mock_tracker.h +++ b/components/feature_engagement/test/mock_tracker.h
@@ -8,6 +8,7 @@ #include <memory> #include <string> +#include "build/build_config.h" #include "components/feature_engagement/public/tracker.h" #include "testing/gmock/include/gmock/gmock.h" #include "third_party/abseil-cpp/absl/types/optional.h" @@ -30,6 +31,9 @@ // Tracker implememtation. MOCK_METHOD1(NotifyEvent, void(const std::string& event)); +#if !BUILDFLAG(IS_ANDROID) + MOCK_METHOD1(NotifyUsedEvent, void(const base::Feature& feature)); +#endif MOCK_METHOD1(ShouldTriggerHelpUI, bool(const base::Feature& feature)); MOCK_METHOD1(ShouldTriggerHelpUIWithSnooze, TriggerDetails(const base::Feature& feature));
diff --git a/components/metrics/generate_expired_histograms_array.gni b/components/metrics/generate_expired_histograms_array.gni index 259dd95..da02934 100644 --- a/components/metrics/generate_expired_histograms_array.gni +++ b/components/metrics/generate_expired_histograms_array.gni
@@ -160,7 +160,6 @@ "//tools/metrics/histograms/metadata/side_search/histograms.xml", "//tools/metrics/histograms/metadata/signin/histograms.xml", "//tools/metrics/histograms/metadata/simple/histograms.xml", - "//tools/metrics/histograms/metadata/software/histograms.xml", "//tools/metrics/histograms/metadata/stability/histograms.xml", "//tools/metrics/histograms/metadata/start_surface/histograms.xml", "//tools/metrics/histograms/metadata/startup/histograms.xml",
diff --git a/components/mirroring/browser/single_client_video_capture_host_unittest.cc b/components/mirroring/browser/single_client_video_capture_host_unittest.cc index e9ae3d1f..74ead8e 100644 --- a/components/mirroring/browser/single_client_video_capture_host_unittest.cc +++ b/components/mirroring/browser/single_client_video_capture_host_unittest.cc
@@ -249,6 +249,8 @@ OnStateChangedCall(media::mojom::VideoCaptureState::ENDED)) .WillOnce(InvokeWithoutArgs(&run_loop, &base::RunLoop::Quit)); consumer_->Stop(); + + launched_device_ = nullptr; run_loop.Run(); } @@ -298,8 +300,7 @@ base::test::TaskEnvironment task_environment_; std::unique_ptr<MockVideoCaptureObserver> consumer_; base::WeakPtr<VideoFrameReceiver> frame_receiver_; - raw_ptr<MockVideoCaptureDevice, AcrossTasksDanglingUntriaged> - launched_device_ = nullptr; + raw_ptr<MockVideoCaptureDevice> launched_device_ = nullptr; private: std::unique_ptr<content::VideoCaptureDeviceLauncher> CreateDeviceLauncher() {
diff --git a/components/mirroring/service/openscreen_session_host.cc b/components/mirroring/service/openscreen_session_host.cc index e5601e3..12c61be5 100644 --- a/components/mirroring/service/openscreen_session_host.cc +++ b/components/mirroring/service/openscreen_session_host.cc
@@ -991,9 +991,9 @@ } void OpenscreenSessionHost::UpdateBandwidthEstimate() { - int bandwidth_estimate = forced_bandwidth_estimate_for_testing_ > 0 - ? forced_bandwidth_estimate_for_testing_ - : session_->GetEstimatedNetworkBandwidth(); + const int bandwidth_estimate = forced_bandwidth_estimate_for_testing_ > 0 + ? forced_bandwidth_estimate_for_testing_ + : session_->GetEstimatedNetworkBandwidth(); // Nothing to do yet. if (bandwidth_estimate <= 0) {
diff --git a/components/omnibox/browser/autocomplete_controller.cc b/components/omnibox/browser/autocomplete_controller.cc index a55f1e1..5e645ff 100644 --- a/components/omnibox/browser/autocomplete_controller.cc +++ b/components/omnibox/browser/autocomplete_controller.cc
@@ -183,7 +183,7 @@ // updates. This mitigates aggressive scoring search suggestions getting // 'stuck' as the default when short inputs provide low confidence. if (!sync_pass_done) - return input.text().length() >= 3; + return input.text().length() >= 4; else return true; }
diff --git a/components/password_manager/core/browser/built_in_backend_to_android_backend_migrator.cc b/components/password_manager/core/browser/built_in_backend_to_android_backend_migrator.cc index 0c8ca41..709c73648 100644 --- a/components/password_manager/core/browser/built_in_backend_to_android_backend_migrator.cc +++ b/components/password_manager/core/browser/built_in_backend_to_android_backend_migrator.cc
@@ -207,7 +207,8 @@ // TODO(crbug.com/1445497): Re-evaluate migration code for local passwords. bool upm_for_local_active = base::FeatureList::IsEnabled( - password_manager::features::kUnifiedPasswordManagerLocalPasswordsAndroid); + password_manager::features:: + kUnifiedPasswordManagerLocalPasswordsAndroidWithMigration); // If the user enables or disables password sync, the new active backend needs // non-syncable data from the previously active backend, as logins are
diff --git a/components/password_manager/core/browser/built_in_backend_to_android_backend_migrator_unittest.cc b/components/password_manager/core/browser/built_in_backend_to_android_backend_migrator_unittest.cc index 6bef4d8..02d0a90 100644 --- a/components/password_manager/core/browser/built_in_backend_to_android_backend_migrator_unittest.cc +++ b/components/password_manager/core/browser/built_in_backend_to_android_backend_migrator_unittest.cc
@@ -164,7 +164,7 @@ TEST_F(BuiltInBackendToAndroidBackendMigratorTest, AllPrefsAreUpdatedWhenMigrationIsNeeded_SyncOff) { feature_list().InitAndEnableFeature( - features::kUnifiedPasswordManagerLocalPasswordsAndroid); + features::kUnifiedPasswordManagerLocalPasswordsAndroidWithMigration); Init(); InitSyncService(/*is_password_sync_enabled=*/false); @@ -216,7 +216,7 @@ LastAttemptUpdatedInPrefsWhenRollingMigrationEnabled) { // Setup the pref to indicate that the initial migration has happened already. feature_list().InitAndEnableFeature( - features::kUnifiedPasswordManagerLocalPasswordsAndroid); + features::kUnifiedPasswordManagerLocalPasswordsAndroidWithMigration); Init(/*current_migration_version=*/1); migrator()->StartMigrationIfNecessary( @@ -526,7 +526,7 @@ InitSyncService(/*is_password_sync_enabled=*/false); feature_list().InitAndEnableFeature( - features::kUnifiedPasswordManagerLocalPasswordsAndroid); + features::kUnifiedPasswordManagerLocalPasswordsAndroidWithMigration); const MigrationParam& p = GetParam(); @@ -556,7 +556,7 @@ // Setup the pref to indicate that the initial migration has happened already. // This implies that rolling migration will take place! feature_list().InitAndEnableFeature( - features::kUnifiedPasswordManagerLocalPasswordsAndroid); + features::kUnifiedPasswordManagerLocalPasswordsAndroidWithMigration); BuiltInBackendToAndroidBackendMigratorTest::Init( /*current_migration_version=*/1); @@ -855,7 +855,7 @@ DoesNotCompleteMigrationWhenWritingToAndroidBackendFails_SyncOff) { base::test::ScopedFeatureList scoped_feature_list; scoped_feature_list.InitAndEnableFeature( - features::kUnifiedPasswordManagerLocalPasswordsAndroid); + features::kUnifiedPasswordManagerLocalPasswordsAndroidWithMigration); // Sync state doesn't affect this test, run it arbitrarily for non-sync'ing // users.
diff --git a/components/password_manager/core/common/password_manager_features.cc b/components/password_manager/core/common/password_manager_features.cc index 6563238..074b825e 100644 --- a/components/password_manager/core/common/password_manager_features.cc +++ b/components/password_manager/core/common/password_manager_features.cc
@@ -138,9 +138,18 @@ "UnifiedPasswordManagerAndroid_LAUNCHED", base::FEATURE_ENABLED_BY_DEFAULT); -// Enables use of Google Mobile services for non-sycned password storage. -BASE_FEATURE(kUnifiedPasswordManagerLocalPasswordsAndroid, - "UnifiedPasswordManagerLocalPasswordsAndroid", +// Enables use of Google Mobile services for non-synced password storage. +BASE_FEATURE(kUnifiedPasswordManagerLocalPasswordsAndroidWithMigration, + "kUnifiedPasswordManagerLocalPasswordsAndroidWithMigration", + base::FEATURE_DISABLED_BY_DEFAULT); + +// Enables use of Google Mobile services for non-synced password storage that +// contains no passwords, so no migration will be necessary. +// UnifiedPasswordManagerLocalPasswordsAndroidWithMigration will replace this +// feature once UPM starts to be rolled out to local users who have saved +// passwords. +BASE_FEATURE(kUnifiedPasswordManagerLocalPasswordsAndroidWithoutMigration, + "kUnifiedPasswordManagerLocalPasswordsAndroidWithoutMigration", base::FEATURE_DISABLED_BY_DEFAULT); // Enables showing the warning about UPM migrating local passwords.
diff --git a/components/password_manager/core/common/password_manager_features.h b/components/password_manager/core/common/password_manager_features.h index 45ccac2..614eacf 100644 --- a/components/password_manager/core/common/password_manager_features.h +++ b/components/password_manager/core/common/password_manager_features.h
@@ -51,8 +51,11 @@ BASE_DECLARE_FEATURE(kPasswordEditDialogWithDetails); BASE_DECLARE_FEATURE(kPasswordGenerationBottomSheet); BASE_DECLARE_FEATURE(kPasswordSuggestionBottomSheetV2); +// TODO(crbug.com/1439191): Clean up the UnifiedPasswordManagerAndroid flag. BASE_DECLARE_FEATURE(kUnifiedPasswordManagerAndroid); -BASE_DECLARE_FEATURE(kUnifiedPasswordManagerLocalPasswordsAndroid); +BASE_DECLARE_FEATURE(kUnifiedPasswordManagerLocalPasswordsAndroidWithMigration); +BASE_DECLARE_FEATURE( + kUnifiedPasswordManagerLocalPasswordsAndroidWithoutMigration); BASE_DECLARE_FEATURE(kUnifiedPasswordManagerLocalPasswordsMigrationWarning); BASE_DECLARE_FEATURE(kUnifiedPasswordManagerSyncUsingAndroidBackendOnly); BASE_DECLARE_FEATURE(kPasswordsInCredMan);
diff --git a/components/performance_manager/features.cc b/components/performance_manager/features.cc index 9efc7877..7742c24 100644 --- a/components/performance_manager/features.cc +++ b/components/performance_manager/features.cc
@@ -149,6 +149,10 @@ MemoryUsageInHovercardsUpdateTrigger::kBackground, &kMemoryUsageInHovercardsUpdateTriggerOptions}; +BASE_FEATURE(kPerformanceControlsSidePanel, + "PerformanceControlsSidePanel", + base::FEATURE_DISABLED_BY_DEFAULT); + #endif BASE_FEATURE(kBFCachePerformanceManagerPolicy,
diff --git a/components/performance_manager/public/features.h b/components/performance_manager/public/features.h index 4fc8585..ddff391 100644 --- a/components/performance_manager/public/features.h +++ b/components/performance_manager/public/features.h
@@ -209,6 +209,10 @@ kFadeSmallFaviconWithRing = 2 }; +// This enables the performance controls side panel for learning about and +// configuring performance settings. +BASE_DECLARE_FEATURE(kPerformanceControlsSidePanel); + #endif // Policy that evicts the BFCache of pages that become non visible or the
diff --git a/components/permissions/android/BUILD.gn b/components/permissions/android/BUILD.gn index ba3e9079..3b32787 100644 --- a/components/permissions/android/BUILD.gn +++ b/components/permissions/android/BUILD.gn
@@ -70,6 +70,7 @@ "res/drawable/ic_signal_cellular_2_bar.xml", "res/drawable/ic_signal_cellular_3_bar.xml", "res/drawable/ic_signal_cellular_4_bar.xml", + "res/drawable/ic_storage_access_24.xml", "res/drawable/tenancy.xml", "res/layout/bluetooth_scanning_permission_dialog.xml", "res/layout/bluetooth_scanning_permission_dialog_row.xml",
diff --git a/components/permissions/android/java/src/org/chromium/components/permissions/PermissionDialogDelegate.java b/components/permissions/android/java/src/org/chromium/components/permissions/PermissionDialogDelegate.java index ad45ed8..7245eef 100644 --- a/components/permissions/android/java/src/org/chromium/components/permissions/PermissionDialogDelegate.java +++ b/components/permissions/android/java/src/org/chromium/components/permissions/PermissionDialogDelegate.java
@@ -34,6 +34,9 @@ /** Text shown in the dialog. */ private String mMessageText; + /** Optional secondary text shown in the dialog. */ + private String mSecondaryText; + /** Text shown on the primary button, e.g. "Allow". */ private String mPrimaryButtonText; @@ -59,6 +62,10 @@ return mMessageText; } + public String getSecondaryText() { + return mSecondaryText; + } + public String getPrimaryButtonText() { return mPrimaryButtonText; } @@ -115,28 +122,30 @@ * @param contentSettingsTypes The content settings types requested by this dialog. * @param iconId The id of the icon to display in the dialog. * @param message The message to display in the dialog. + * @param secondaryText The secondary text to display in the dialog bellow the message. * @param primaryTextButton The text to display on the primary button. * @param secondaryTextButton The text to display on the primary button. */ @CalledByNative private static PermissionDialogDelegate create(long nativeDelegatePtr, WindowAndroid window, - int[] contentSettingsTypes, int iconId, String message, String primaryButtonText, - String secondaryButtonText) { + int[] contentSettingsTypes, int iconId, String message, String secondaryText, + String primaryButtonText, String secondaryButtonText) { return new PermissionDialogDelegate(nativeDelegatePtr, window, contentSettingsTypes, iconId, - message, primaryButtonText, secondaryButtonText); + message, secondaryText, primaryButtonText, secondaryButtonText); } /** * Upon construction, this class takes ownership of the passed in native delegate. */ private PermissionDialogDelegate(long nativeDelegatePtr, WindowAndroid window, - int[] contentSettingsTypes, int iconId, String message, String primaryButtonText, - String secondaryButtonText) { + int[] contentSettingsTypes, int iconId, String message, String secondaryText, + String primaryButtonText, String secondaryButtonText) { mNativeDelegatePtr = nativeDelegatePtr; mWindow = window; mContentSettingsTypes = contentSettingsTypes; mDrawableId = iconId; mMessageText = message; + mSecondaryText = secondaryText; mPrimaryButtonText = primaryButtonText; mSecondaryButtonText = secondaryButtonText; }
diff --git a/components/permissions/android/java/src/org/chromium/components/permissions/PermissionDialogModel.java b/components/permissions/android/java/src/org/chromium/components/permissions/PermissionDialogModel.java index 9a46ae5..c31976a9 100644 --- a/components/permissions/android/java/src/org/chromium/components/permissions/PermissionDialogModel.java +++ b/components/permissions/android/java/src/org/chromium/components/permissions/PermissionDialogModel.java
@@ -34,13 +34,20 @@ TextViewCompat.setCompoundDrawablesRelativeWithIntrinsicBounds( messageTextView, delegate.getDrawableId(), 0, 0, 0); + String secondaryText = delegate.getSecondaryText(); + if (!secondaryText.isEmpty()) { + TextView secondaryTextView = customView.findViewById(R.id.secondary); + secondaryTextView.setText(secondaryText); + secondaryTextView.setVisibility(View.VISIBLE); + } + return new PropertyModel.Builder(ModalDialogProperties.ALL_KEYS) .with(ModalDialogProperties.CONTROLLER, controller) .with(ModalDialogProperties.FOCUS_DIALOG, true) .with(ModalDialogProperties.CUSTOM_VIEW, customView) .with(ModalDialogProperties.POSITIVE_BUTTON_TEXT, delegate.getPrimaryButtonText()) .with(ModalDialogProperties.NEGATIVE_BUTTON_TEXT, delegate.getSecondaryButtonText()) - .with(ModalDialogProperties.CONTENT_DESCRIPTION, delegate.getMessageText()) + .with(ModalDialogProperties.CONTENT_DESCRIPTION, messageText) .with(ModalDialogProperties.FILTER_TOUCH_FOR_SECURITY, true) .with(ModalDialogProperties.TOUCH_FILTERED_CALLBACK, touchFilteredCallback) .with(ModalDialogProperties.BUTTON_TAP_PROTECTION_PERIOD_MS,
diff --git a/components/permissions/android/permission_prompt/permission_dialog_delegate.cc b/components/permissions/android/permission_prompt/permission_dialog_delegate.cc index 6e849178..95938a9 100644 --- a/components/permissions/android/permission_prompt/permission_dialog_delegate.cc +++ b/components/permissions/android/permission_prompt/permission_dialog_delegate.cc
@@ -50,6 +50,7 @@ PermissionsClient::Get()->MapToJavaDrawableId( permission_prompt_->GetIconId()), ConvertUTF16ToJavaString(env, permission_prompt_->GetMessageText()), + ConvertUTF16ToJavaString(env, permission_prompt_->GetSecondaryText()), primaryButtonText, secondaryButtonText)); }
diff --git a/components/permissions/android/permission_prompt/permission_prompt_android.cc b/components/permissions/android/permission_prompt/permission_prompt_android.cc index 40f263e..5d49d7a 100644 --- a/components/permissions/android/permission_prompt/permission_prompt_android.cc +++ b/components/permissions/android/permission_prompt/permission_prompt_android.cc
@@ -6,6 +6,7 @@ #include <vector> +#include "components/permissions/features.h" #include "components/permissions/permission_request.h" #include "components/resources/android/theme_resources.h" #include "components/strings/grit/components_strings.h" @@ -107,6 +108,14 @@ const std::vector<PermissionRequest*>& requests = delegate_->Requests(); if (requests.size() == 1) { if (requests[0]->request_type() == RequestType::kStorageAccess) { + if (base::FeatureList::IsEnabled( + permissions::features::kPermissionStorageAccessAPI)) { + return l10n_util::GetStringFUTF16( + IDS_STORAGE_ACCESS_PERMISSION_TWO_ORIGIN_PROMPT_TITLE, + url_formatter::FormatUrlForSecurityDisplay( + delegate_->GetRequestingOrigin(), + url_formatter::SchemeDisplay::OMIT_CRYPTOGRAPHIC)); + } return l10n_util::GetStringFUTF16( IDS_STORAGE_ACCESS_INFOBAR_TEXT, url_formatter::FormatUrlForSecurityDisplay( @@ -115,9 +124,8 @@ url_formatter::FormatUrlForSecurityDisplay( delegate_->GetEmbeddingOrigin(), url_formatter::SchemeDisplay::OMIT_CRYPTOGRAPHIC)); - } else { - return requests[0]->GetDialogMessageText(); } + return requests[0]->GetDialogMessageText(); } CheckValidRequestGroup(requests); return l10n_util::GetStringFUTF16( @@ -127,4 +135,23 @@ url_formatter::SchemeDisplay::OMIT_CRYPTOGRAPHIC)); } +std::u16string PermissionPromptAndroid::GetSecondaryText() const { + const std::vector<PermissionRequest*>& requests = delegate_->Requests(); + CHECK_GT(requests.size(), 0U); + + if (requests[0]->request_type() == RequestType::kStorageAccess && + base::FeatureList::IsEnabled( + permissions::features::kPermissionStorageAccessAPI)) { + return l10n_util::GetStringFUTF16( + IDS_STORAGE_ACCESS_PERMISSION_TWO_ORIGIN_EXPLANATION, + url_formatter::FormatUrlForSecurityDisplay( + delegate_->GetRequestingOrigin(), + url_formatter::SchemeDisplay::OMIT_CRYPTOGRAPHIC), + url_formatter::FormatUrlForSecurityDisplay( + delegate_->GetEmbeddingOrigin(), + url_formatter::SchemeDisplay::OMIT_CRYPTOGRAPHIC)); + } + return std::u16string(); +} + } // namespace permissions
diff --git a/components/permissions/android/permission_prompt/permission_prompt_android.h b/components/permissions/android/permission_prompt/permission_prompt_android.h index 39e962f..5cfac255 100644 --- a/components/permissions/android/permission_prompt/permission_prompt_android.h +++ b/components/permissions/android/permission_prompt/permission_prompt_android.h
@@ -58,8 +58,8 @@ size_t PermissionCount() const; ContentSettingsType GetContentSettingType(size_t position) const; int GetIconId() const; - std::u16string GetTitleText() const; std::u16string GetMessageText() const; + std::u16string GetSecondaryText() const; content::WebContents* web_contents() { return web_contents_; }
diff --git a/components/permissions/android/res/drawable/ic_storage_access_24.xml b/components/permissions/android/res/drawable/ic_storage_access_24.xml new file mode 100644 index 0000000..24e9ac4 --- /dev/null +++ b/components/permissions/android/res/drawable/ic_storage_access_24.xml
@@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24" + android:tint="?attr/colorControlNormal"> + <path + android:fillColor="@android:color/white" + android:pathData="M12 22c-.55 0-1.02-.195-1.414-.586A1.935 1.935 0 0 1 10 20v-8c0-.55.195-1.02.586-1.414.394-.39.863-.586 1.414-.586h8c.55 0 1.02.195 1.414.586.39.394.586.863.586 1.414v8c0 .55-.195 1.02-.586 1.414-.394.39-.863.586-1.414.586Zm.5-3h7l-2.3-3-1.7 2.25-1.2-1.648ZM8 17.75c-1.785-.45-3.23-1.395-4.336-2.836C2.554 13.473 2 11.832 2 10c0-2.234.773-4.125 2.324-5.676C5.875 2.774 7.766 2 10 2c1.832 0 3.473.555 4.914 1.664C16.355 4.77 17.301 6.214 17.75 8H12c-1.102 0-2.043.39-2.824 1.176C8.39 9.957 8 10.898 8 12Zm0 0"/> +</vector>
diff --git a/components/permissions/request_type.cc b/components/permissions/request_type.cc index b2d7df95..874ec2494 100644 --- a/components/permissions/request_type.cc +++ b/components/permissions/request_type.cc
@@ -62,7 +62,10 @@ return IDR_ANDROID_INFOBAR_PROTECTED_MEDIA_IDENTIFIER; case RequestType::kStorageAccess: case RequestType::kTopLevelStorageAccess: - return IDR_ANDROID_INFOBAR_PERMISSION_COOKIE; + return base::FeatureList::IsEnabled( + permissions::features::kPermissionStorageAccessAPI) + ? IDR_ANDROID_STORAGE_ACCESS + : IDR_ANDROID_INFOBAR_PERMISSION_COOKIE; } NOTREACHED(); return 0; @@ -122,7 +125,12 @@ return vector_icons::kProtocolHandlerIcon; case RequestType::kStorageAccess: case RequestType::kTopLevelStorageAccess: - return vector_icons::kStorageAccessIcon; + if (base::FeatureList::IsEnabled( + permissions::features::kPermissionStorageAccessAPI)) { + return vector_icons::kStorageAccessIcon; + } + return cr23 ? vector_icons::kCookieChromeRefreshIcon + : vector_icons::kCookieIcon; case RequestType::kWindowManagement: return cr23 ? vector_icons::kSelectWindowChromeRefreshIcon : vector_icons::kSelectWindowIcon;
diff --git a/components/policy/resources/templates/policy_definitions/Miscellaneous/WebSQLAccess.yaml b/components/policy/resources/templates/policy_definitions/Miscellaneous/WebSQLAccess.yaml index e2e0f3b..09dc023d 100644 --- a/components/policy/resources/templates/policy_definitions/Miscellaneous/WebSQLAccess.yaml +++ b/components/policy/resources/templates/policy_definitions/Miscellaneous/WebSQLAccess.yaml
@@ -1,9 +1,7 @@ caption: Force WebSQL to be enabled. default: false desc: |- - WebSQL is on by default as of M101, but can be disabled via Chrome flag. - If this policy is set to false or unset, WebSQL can be disabled. - If this policy is set to true, WebSQL cannot be disabled. + As of M119, if this policy is set to false or unset, WebSQL is disabled, but can be enabled via Chrome flag "web-sql-access". If the policy is set to true, WebSQL access is enabled. example_value: true features: dynamic_refresh: false @@ -13,10 +11,10 @@ items: - caption: Force WebSQL to be enabled. value: true -- caption: Allow WebSQL to be disabled by Chrome flag. +- caption: Allow WebSQL to be enabled by Chrome flag. value: false owners: -- arichiv@chromium.org +- ayui@chromium.org - chrome-owp-storage@google.com schema: type: boolean
diff --git a/components/resources/android/permissions_resource_id.h b/components/resources/android/permissions_resource_id.h index aa49d8a..d1ae5a5e 100644 --- a/components/resources/android/permissions_resource_id.h +++ b/components/resources/android/permissions_resource_id.h
@@ -29,6 +29,8 @@ DECLARE_RESOURCE_ID(IDR_ANDROID_INFOBAR_FOLDER, R.drawable.ic_folder_blue_24dp) DECLARE_RESOURCE_ID(IDR_ANDROID_INFOBAR_GEOLOCATION, R.drawable.gm_filled_location_on_24) +DECLARE_RESOURCE_ID(IDR_ANDROID_INFOBAR_IDLE_DETECTION, + R.drawable.gm_filled_devices_24) DECLARE_RESOURCE_ID(IDR_ANDROID_INFOBAR_MEDIA_STREAM_CAMERA, R.drawable.gm_filled_videocam_24) DECLARE_RESOURCE_ID(IDR_ANDROID_INFOBAR_MEDIA_STREAM_MIC, @@ -41,10 +43,9 @@ R.drawable.gm_filled_notifications_24) DECLARE_RESOURCE_ID(IDR_ANDROID_INFOBAR_PROTECTED_MEDIA_IDENTIFIER, R.drawable.infobar_protected_media_identifier) +DECLARE_RESOURCE_ID(IDR_ANDROID_INFOBAR_PERMISSION_COOKIE, + R.drawable.permission_cookie) DECLARE_RESOURCE_ID(IDR_ANDROID_INFOBAR_WARNING, R.drawable.infobar_warning) DECLARE_RESOURCE_ID(IDR_ANDROID_INFOBAR_VR_HEADSET, R.drawable.gm_filled_cardboard_24) -DECLARE_RESOURCE_ID(IDR_ANDROID_INFOBAR_PERMISSION_COOKIE, - R.drawable.permission_cookie) -DECLARE_RESOURCE_ID(IDR_ANDROID_INFOBAR_IDLE_DETECTION, - R.drawable.gm_filled_devices_24) +DECLARE_RESOURCE_ID(IDR_ANDROID_STORAGE_ACCESS, R.drawable.ic_storage_access_24)
diff --git a/components/segmentation_platform/internal/dummy_segmentation_platform_service.cc b/components/segmentation_platform/internal/dummy_segmentation_platform_service.cc index bf01c076..4203c143 100644 --- a/components/segmentation_platform/internal/dummy_segmentation_platform_service.cc +++ b/components/segmentation_platform/internal/dummy_segmentation_platform_service.cc
@@ -51,14 +51,6 @@ return SegmentSelectionResult(); } -void DummySegmentationPlatformService::GetSelectedSegmentOnDemand( - const std::string& segmentation_key, - scoped_refptr<InputContext> input_context, - SegmentSelectionCallback callback) { - base::SequencedTaskRunner::GetCurrentDefault()->PostTask( - FROM_HERE, base::BindOnce(std::move(callback), SegmentSelectionResult())); -} - void DummySegmentationPlatformService::CollectTrainingData( proto::SegmentId segment_id, TrainingRequestId request_id,
diff --git a/components/segmentation_platform/internal/dummy_segmentation_platform_service.h b/components/segmentation_platform/internal/dummy_segmentation_platform_service.h index 275692e..7f67889 100644 --- a/components/segmentation_platform/internal/dummy_segmentation_platform_service.h +++ b/components/segmentation_platform/internal/dummy_segmentation_platform_service.h
@@ -38,9 +38,6 @@ AnnotatedNumericResultCallback callback) override; SegmentSelectionResult GetCachedSegmentResult( const std::string& segmentation_key) override; - void GetSelectedSegmentOnDemand(const std::string& segmentation_key, - scoped_refptr<InputContext> input_context, - SegmentSelectionCallback callback) override; void CollectTrainingData(proto::SegmentId segment_id, TrainingRequestId request_id, const TrainingLabels& param,
diff --git a/components/segmentation_platform/internal/metadata/metadata_utils.cc b/components/segmentation_platform/internal/metadata/metadata_utils.cc index 3ab6131..61024a3 100644 --- a/components/segmentation_platform/internal/metadata/metadata_utils.cc +++ b/components/segmentation_platform/internal/metadata/metadata_utils.cc
@@ -85,9 +85,6 @@ ValidationResult ValidateBinnedClassifier( const proto::Predictor::BinnedClassifier& classifier) { - if (classifier.underflow_label().empty()) { - return ValidationResult::kBinnedClassifierEmptyLabels; - } float prev = std::numeric_limits<float>::lowest(); for (const auto& bin : classifier.bins()) { if (bin.label().empty()) {
diff --git a/components/segmentation_platform/internal/segmentation_platform_service_impl.cc b/components/segmentation_platform/internal/segmentation_platform_service_impl.cc index 8b35498..c4100cc 100644 --- a/components/segmentation_platform/internal/segmentation_platform_service_impl.cc +++ b/components/segmentation_platform/internal/segmentation_platform_service_impl.cc
@@ -179,33 +179,6 @@ return selector->GetCachedSegmentResult(); } -void SegmentationPlatformServiceImpl::GetSelectedSegmentOnDemand( - const std::string& segmentation_key, - scoped_refptr<InputContext> input_context, - SegmentSelectionCallback callback) { - // TODO(shaktisahu): Delete this API after enabling RequestDispatcher. - if (!storage_init_status_.has_value()) { - // If the platform isn't fully initialized, cache the input arguments to run - // later. - pending_actions_.push_back(base::BindOnce( - &SegmentationPlatformServiceImpl::GetSelectedSegmentOnDemand, - weak_ptr_factory_.GetWeakPtr(), segmentation_key, - std::move(input_context), std::move(callback))); - return; - } - - if (!storage_init_status_.value()) { - base::SingleThreadTaskRunner::GetCurrentDefault()->PostTask( - FROM_HERE, - base::BindOnce(std::move(callback), SegmentSelectionResult())); - return; - } - - CHECK(segment_selectors_.find(segmentation_key) != segment_selectors_.end()); - auto& selector = segment_selectors_.at(segmentation_key); - selector->GetSelectedSegmentOnDemand(input_context, std::move(callback)); -} - void SegmentationPlatformServiceImpl::CollectTrainingData( SegmentId segment_id, TrainingRequestId request_id,
diff --git a/components/segmentation_platform/internal/segmentation_platform_service_impl.h b/components/segmentation_platform/internal/segmentation_platform_service_impl.h index c0220563..42724d0e 100644 --- a/components/segmentation_platform/internal/segmentation_platform_service_impl.h +++ b/components/segmentation_platform/internal/segmentation_platform_service_impl.h
@@ -117,9 +117,6 @@ AnnotatedNumericResultCallback callback) override; SegmentSelectionResult GetCachedSegmentResult( const std::string& segmentation_key) override; - void GetSelectedSegmentOnDemand(const std::string& segmentation_key, - scoped_refptr<InputContext> input_context, - SegmentSelectionCallback callback) override; void CollectTrainingData(SegmentId segment_id, TrainingRequestId request_id, const TrainingLabels& param,
diff --git a/components/segmentation_platform/internal/segmentation_platform_service_impl_unittest.cc b/components/segmentation_platform/internal/segmentation_platform_service_impl_unittest.cc index fb557ba..7e68fc2 100644 --- a/components/segmentation_platform/internal/segmentation_platform_service_impl_unittest.cc +++ b/components/segmentation_platform/internal/segmentation_platform_service_impl_unittest.cc
@@ -153,23 +153,6 @@ segmentation_key)); } - void AssertSelectedSegmentOnDemand( - const std::string& segmentation_key, - bool is_ready, - SegmentId expected = SegmentId::OPTIMIZATION_TARGET_UNKNOWN) { - SegmentSelectionResult result; - result.is_ready = is_ready; - if (is_ready) - result.segment = expected; - base::RunLoop loop; - segmentation_platform_service_impl_->GetSelectedSegmentOnDemand( - segmentation_key, nullptr, - base::BindOnce( - &SegmentationPlatformServiceImplTest::OnGetSelectedSegment, - base::Unretained(this), loop.QuitClosure(), result)); - loop.Run(); - } - protected: void TestInitializationFlow() { // ServiceProxy will load new segment infos from the DB. @@ -314,21 +297,6 @@ loop.Run(); } -TEST_F(SegmentationPlatformServiceImplTest, - GetSelectedSegmentOnDemandIfDbFailed) { - EXPECT_FALSE(segmentation_platform_service_impl_->IsPlatformInitialized()); - int pending_queue_size = GetPendingActionsQueueSize(); - // Initialize the platform - FailInitializationFlow(); - // Platform failed to initialize, so the API call to get the selected - // segment on demand is executed with a null result. - EXPECT_FALSE(segmentation_platform_service_impl_->IsPlatformInitialized()); - EXPECT_EQ(pending_queue_size, GetPendingActionsQueueSize()); - AssertSelectedSegmentOnDemand(kTestSegmentationKey4, /*is_ready=*/false, - SegmentId::OPTIMIZATION_TARGET_UNKNOWN); - EXPECT_EQ(pending_queue_size, GetPendingActionsQueueSize()); -} - class SegmentationPlatformServiceImplEmptyConfigTest : public SegmentationPlatformServiceImplTest { std::vector<std::unique_ptr<Config>> CreateConfigs() override {
diff --git a/components/segmentation_platform/internal/selection/request_dispatcher.cc b/components/segmentation_platform/internal/selection/request_dispatcher.cc index f0f768b..2796da93 100644 --- a/components/segmentation_platform/internal/selection/request_dispatcher.cc +++ b/components/segmentation_platform/internal/selection/request_dispatcher.cc
@@ -169,10 +169,10 @@ WrappedCallback callback) { if (storage_service_->config_holder()->IsLegacySegmentationKey( segmentation_key)) { - LOG(ERROR) << "Segmentation key: " << segmentation_key - << " is using a legacy config with the new API which is not " - "supported. Legacy segments should use " - "GetSelectedSegmentOnDemand or migrate to the new config."; + LOG(ERROR) + << "Segmentation key: " << segmentation_key + << " is using a legacy config with the new API which is not " + "supported. Legacy segments should migrate to the new config."; base::SingleThreadTaskRunner::GetCurrentDefault()->PostTask( FROM_HERE, base::BindOnce(std::move(callback), /*is_cached_result=*/false,
diff --git a/components/segmentation_platform/internal/selection/segment_selector.h b/components/segmentation_platform/internal/selection/segment_selector.h index 54e5a10..d2b69c9 100644 --- a/components/segmentation_platform/internal/selection/segment_selector.h +++ b/components/segmentation_platform/internal/selection/segment_selector.h
@@ -39,12 +39,6 @@ // asynchronously. If none, returns empty result. virtual void GetSelectedSegment(SegmentSelectionCallback callback) = 0; - // Client API. Runs models and selects a segment on demand. Returns empty - // result on failure. - virtual void GetSelectedSegmentOnDemand( - scoped_refptr<InputContext> input_context, - SegmentSelectionCallback callback) = 0; - // Client API. Returns the cached selected segment from the last session // synchronously. virtual SegmentSelectionResult GetCachedSegmentResult() = 0;
diff --git a/components/segmentation_platform/internal/selection/segment_selector_impl.cc b/components/segmentation_platform/internal/selection/segment_selector_impl.cc index 7e1cbf6d..bf5dfee 100644 --- a/components/segmentation_platform/internal/selection/segment_selector_impl.cc +++ b/components/segmentation_platform/internal/selection/segment_selector_impl.cc
@@ -171,18 +171,6 @@ return selected_segment_; } -void SegmentSelectorImpl::GetSelectedSegmentOnDemand( - scoped_refptr<InputContext> input_context, - SegmentSelectionCallback callback) { - DCHECK(!config_->auto_execute_and_cache); - // Wrap callback to record metrics. - auto wrapped_callback = base::BindOnce( - &SegmentSelectorImpl::CallbackWrapper, weak_ptr_factory_.GetWeakPtr(), - base::Time::Now(), std::move(callback)); - GetRankForNextSegment(std::make_unique<SegmentRanks>(), input_context, - std::move(wrapped_callback)); -} - void SegmentSelectorImpl::OnModelExecutionCompleted(SegmentId segment_id) { DCHECK(segment_result_provider_);
diff --git a/components/segmentation_platform/internal/selection/segment_selector_impl.h b/components/segmentation_platform/internal/selection/segment_selector_impl.h index 478cc6d7..303c913 100644 --- a/components/segmentation_platform/internal/selection/segment_selector_impl.h +++ b/components/segmentation_platform/internal/selection/segment_selector_impl.h
@@ -55,8 +55,6 @@ void OnPlatformInitialized(ExecutionService* execution_service) override; void GetSelectedSegment(SegmentSelectionCallback callback) override; SegmentSelectionResult GetCachedSegmentResult() override; - void GetSelectedSegmentOnDemand(scoped_refptr<InputContext> input_context, - SegmentSelectionCallback callback) override; // Helper function to update the selected segment in the prefs. Auto-extends // the selection if the new result is unknown.
diff --git a/components/segmentation_platform/internal/selection/segment_selector_unittest.cc b/components/segmentation_platform/internal/selection/segment_selector_unittest.cc index 25ce382..25c5dce7 100644 --- a/components/segmentation_platform/internal/selection/segment_selector_unittest.cc +++ b/components/segmentation_platform/internal/selection/segment_selector_unittest.cc
@@ -233,95 +233,6 @@ ASSERT_EQ(segment_id2, prefs_->selection->segment_id); } -TEST_F(SegmentSelectorTest, RunSelectionOnDemand) { - auto config = CreateTestConfig(); - config->auto_execute_and_cache = false; - SetUpWithConfig(std::move(config)); - EXPECT_CALL(signal_storage_config_, MeetsSignalCollectionRequirement(_, _)) - .WillRepeatedly(Return(true)); - - static constexpr SegmentId kSegmentId = - SegmentId::OPTIMIZATION_TARGET_SEGMENTATION_NEW_TAB; - float mapping[][2] = {{0.2, 1}, {0.5, 3}, {0.7, 4}}; - InitializeMetadataForSegment(kSegmentId, mapping, 3); - - static constexpr SegmentId kSegmentId2 = - SegmentId::OPTIMIZATION_TARGET_SEGMENTATION_SHARE; - float mapping2[][2] = {{0.3, 1}, {0.4, 4}}; - InitializeMetadataForSegment(kSegmentId2, mapping2, 2); - - EXPECT_CALL(training_data_collector_, OnDecisionTime(kSegmentId, _, _)) - .Times(1); - EXPECT_CALL(training_data_collector_, OnDecisionTime(kSegmentId2, _, _)) - .Times(1); - - auto result_provider = std::make_unique<MockResultProvider>(); - EXPECT_CALL(*result_provider, GetSegmentResult(_)) - .Times(2) - .WillRepeatedly(Invoke( - [](std::unique_ptr<SegmentResultProvider::GetResultOptions> options) { - EXPECT_TRUE(options->ignore_db_scores); - int rank = options->segment_id == kSegmentId ? 3 : 4; - auto result = - std::make_unique<SegmentResultProvider::SegmentResult>( - SegmentResultProvider::ResultState:: - kServerModelExecutionScoreUsed, - proto::PredictionResult(), rank); - std::move(options->callback).Run(std::move(result)); - })); - segment_selector_->set_segment_result_provider_for_testing( - std::move(result_provider)); - - clock_.Advance(base::Days(1)); - base::RunLoop wait_for_selection; - segment_selector_->GetSelectedSegmentOnDemand( - /*input_context=*/nullptr, - base::BindOnce( - [](base::OnceClosure quit, const SegmentSelectionResult& result) { - EXPECT_TRUE(result.is_ready); - EXPECT_EQ(kSegmentId2, *result.segment); - std::move(quit).Run(); - }, - wait_for_selection.QuitClosure())); - wait_for_selection.Run(); -} - -TEST_F(SegmentSelectorTest, RunSelectionOnDemandCallbackInvokedOnFailure) { - auto config = CreateTestConfig(); - config->auto_execute_and_cache = false; - SetUpWithConfig(std::move(config)); - EXPECT_CALL(signal_storage_config_, MeetsSignalCollectionRequirement(_, _)) - .WillRepeatedly(Return(true)); - - auto result_provider = std::make_unique<MockResultProvider>(); - EXPECT_CALL(*result_provider, GetSegmentResult(_)) - .Times(1) - .WillRepeatedly(Invoke( - [](std::unique_ptr<SegmentResultProvider::GetResultOptions> options) { - EXPECT_TRUE(options->ignore_db_scores); - auto result = - std::make_unique<SegmentResultProvider::SegmentResult>( - SegmentResultProvider::ResultState:: - kDefaultModelExecutionFailed); - std::move(options->callback).Run(std::move(result)); - })); - segment_selector_->set_segment_result_provider_for_testing( - std::move(result_provider)); - - clock_.Advance(base::Days(1)); - base::RunLoop wait_for_selection; - segment_selector_->GetSelectedSegmentOnDemand( - /*input_context=*/nullptr, - base::BindOnce( - [](base::OnceClosure quit, const SegmentSelectionResult& result) { - EXPECT_FALSE(result.is_ready); - EXPECT_FALSE(result.segment.has_value()); - std::move(quit).Run(); - }, - wait_for_selection.QuitClosure())); - wait_for_selection.Run(); -} - TEST_F(SegmentSelectorTest, NewSegmentResultOverridesThePreviousBest) { auto config = CreateTestConfig(); config->unknown_selection_ttl = base::TimeDelta();
diff --git a/components/segmentation_platform/public/segmentation_platform_service.h b/components/segmentation_platform/public/segmentation_platform_service.h index e28230a..72b3a16 100644 --- a/components/segmentation_platform/public/segmentation_platform_service.h +++ b/components/segmentation_platform/public/segmentation_platform_service.h
@@ -112,13 +112,6 @@ virtual SegmentSelectionResult GetCachedSegmentResult( const std::string& segmentation_key) = 0; - // Given a client and a set of inputs, runs the required models on demand and - // returns the result in the supplied callback. - virtual void GetSelectedSegmentOnDemand( - const std::string& segmentation_key, - scoped_refptr<InputContext> input_context, - SegmentSelectionCallback callback) = 0; - // Called to trigger training data collection for a given request ID. Request // IDs are given when |GetClassificationResult| is called. virtual void CollectTrainingData(proto::SegmentId segment_id,
diff --git a/components/segmentation_platform/public/testing/mock_segmentation_platform_service.h b/components/segmentation_platform/public/testing/mock_segmentation_platform_service.h index ed04d52..ba7c95a4 100644 --- a/components/segmentation_platform/public/testing/mock_segmentation_platform_service.h +++ b/components/segmentation_platform/public/testing/mock_segmentation_platform_service.h
@@ -29,11 +29,6 @@ GetCachedSegmentResult, (const std::string&)); MOCK_METHOD(void, - GetSelectedSegmentOnDemand, - (const std::string&, - scoped_refptr<InputContext>, - SegmentSelectionCallback)); - MOCK_METHOD(void, GetClassificationResult, (const std::string&, const PredictionOptions&,
diff --git a/components/stylus_handwriting/android/BUILD.gn b/components/stylus_handwriting/android/BUILD.gn index eb55cb5..cc21459 100644 --- a/components/stylus_handwriting/android/BUILD.gn +++ b/components/stylus_handwriting/android/BUILD.gn
@@ -43,12 +43,17 @@ } robolectric_library("junit_test_support") { - sources = [ "junit/src/org/chromium/components/stylus_handwriting/test_support/ShadowDirectWritingSettingsHelper.java" ] + sources = [ + "junit/src/org/chromium/components/stylus_handwriting/test_support/ShadowDirectWritingSettingsHelper.java", + "junit/src/org/chromium/components/stylus_handwriting/test_support/ShadowGlobalSettings.java", + "junit/src/org/chromium/components/stylus_handwriting/test_support/ShadowSecureSettings.java", + ] deps = [ ":java" ] } robolectric_library("stylus_handwriting_junit_tests") { sources = [ + "junit/src/org/chromium/components/stylus_handwriting/AndroidStylusWritingHandlerTest.java", "junit/src/org/chromium/components/stylus_handwriting/DirectWritingServiceBinderTest.java", "junit/src/org/chromium/components/stylus_handwriting/DirectWritingServiceCallbackTest.java", "junit/src/org/chromium/components/stylus_handwriting/DirectWritingTriggerTest.java",
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 1a06adc..2ca4ee6 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
@@ -91,9 +91,6 @@ } @Override - public void onWindowFocusChanged(Context context, boolean hasFocus) {} - - @Override public boolean canShowSoftKeyboard() { // TODO(mahesh.ma): We can return false here when Android stylus writing service has widget // toolbar that can allow editing commands like add space, backspace, perform editor actions
diff --git a/components/stylus_handwriting/android/junit/src/org/chromium/components/stylus_handwriting/AndroidStylusWritingHandlerTest.java b/components/stylus_handwriting/android/junit/src/org/chromium/components/stylus_handwriting/AndroidStylusWritingHandlerTest.java new file mode 100644 index 0000000..d882cf19b --- /dev/null +++ b/components/stylus_handwriting/android/junit/src/org/chromium/components/stylus_handwriting/AndroidStylusWritingHandlerTest.java
@@ -0,0 +1,133 @@ +// 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.components.stylus_handwriting; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; +import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; +import static org.mockito.MockitoAnnotations.openMocks; + +import android.content.ComponentName; +import android.content.Context; +import android.graphics.Point; +import android.graphics.Rect; +import android.graphics.RectF; +import android.os.Build; +import android.view.inputmethod.EditorBoundsInfo; +import android.view.inputmethod.InputMethodInfo; +import android.view.inputmethod.InputMethodManager; + +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.Mock; +import org.robolectric.annotation.Config; + +import org.chromium.base.test.BaseRobolectricTestRunner; +import org.chromium.base.test.util.HistogramWatcher; +import org.chromium.components.stylus_handwriting.test_support.ShadowGlobalSettings; +import org.chromium.components.stylus_handwriting.test_support.ShadowSecureSettings; +import org.chromium.content_public.browser.WebContents; + +import java.util.List; + +/** + * Unit tests for {@link AndroidStylusWritingHandler}. + */ +@RunWith(BaseRobolectricTestRunner.class) +@Config(manifest = Config.NONE, sdk = Build.VERSION_CODES.TIRAMISU, + shadows = {ShadowGlobalSettings.class, ShadowSecureSettings.class}) +public class AndroidStylusWritingHandlerTest { + @Mock + private Context mContext; + @Mock + private InputMethodManager mInputMethodManager; + @Mock + private InputMethodInfo mInputMethodInfo; + + private AndroidStylusWritingHandler mHandler; + + @Before + public void setUp() { + openMocks(this); + when(mContext.getSystemService(InputMethodManager.class)).thenReturn(mInputMethodManager); + when(mInputMethodManager.getInputMethodList()).thenReturn(List.of(mInputMethodInfo)); + when(mInputMethodInfo.getComponent()) + .thenReturn(ComponentName.unflattenFromString( + ShadowSecureSettings.DEFAULT_IME_PACKAGE)); + mHandler = new AndroidStylusWritingHandler(mContext); + } + + @Test + @Config(sdk = Build.VERSION_CODES.S) + public void handlerIsDisabled_beforeT() { + assertFalse(AndroidStylusWritingHandler.isEnabled(mContext)); + } + + @Test + public void handlerIsDisabled_withFeatureDisabled() { + when(mInputMethodInfo.supportsStylusHandwriting()).thenReturn(true); + ShadowGlobalSettings.setHandwritingEnabled(false); + assertFalse(AndroidStylusWritingHandler.isEnabled(mContext)); + } + + @Test + public void handlerIsDisabled_noKeyboardSupport() { + when(mInputMethodInfo.supportsStylusHandwriting()).thenReturn(false); + ShadowGlobalSettings.setHandwritingEnabled(true); + assertFalse(AndroidStylusWritingHandler.isEnabled(mContext)); + } + + @Test + public void handlerIsEnabled_withFeatureEnabledAndKeyboardSupport() { + when(mInputMethodInfo.supportsStylusHandwriting()).thenReturn(true); + ShadowGlobalSettings.setHandwritingEnabled(true); + assertTrue(AndroidStylusWritingHandler.isEnabled(mContext)); + } + + @Test + public void webContentsStylusWritingHandlerIsSet() { + WebContents webContents = mock(WebContents.class); + mHandler.onWebContentsChanged(mContext, webContents); + verify(webContents).setStylusWritingHandler(eq(mHandler)); + } + + @Test + public void editElementFocusedReturnsDips() { + Rect boundsInPix = new Rect(20, 20, 80, 80); + Point cursorPositionInPix = new Point(40, 40); + // onEditElementFocusedForStylusWriting receives coordinates in pixels and should convert + // them to DIPs. It does not use the contentOffset as this is taken into account by + // CursorAnchorInfo's matrix. + EditorBoundsInfo editorBoundsInfo = mHandler.onEditElementFocusedForStylusWriting( + boundsInPix, cursorPositionInPix, 4, 10); + assertEquals(new RectF(5, 5, 20, 20), editorBoundsInfo.getEditorBounds()); + assertEquals(new RectF(5, 5, 20, 20), editorBoundsInfo.getHandwritingBounds()); + } + + @Test + public void onFocusedNodeChangedReturnsDips() { + Rect boundsInDips = new Rect(20, 20, 80, 80); + // onFocusedNodeChanged receives coordinates in DIPs and should return them in the same + // format. It does not use the contentOffset as this is taken into account by + // CursorAnchorInfo's matrix. + EditorBoundsInfo editorBoundsInfo = + mHandler.onFocusedNodeChanged(boundsInDips, true, null, 4, 10); + assertEquals(new RectF(boundsInDips), editorBoundsInfo.getEditorBounds()); + assertEquals(new RectF(boundsInDips), editorBoundsInfo.getHandwritingBounds()); + } + + @Test + public void testStylusHandwritingLogsApiOption() { + HistogramWatcher histogramWatcher = HistogramWatcher.newSingleRecordWatcher( + "InputMethod.StylusHandwriting.Triggered", StylusApiOption.Api.ANDROID); + mHandler.requestStartStylusWriting(null); + histogramWatcher.assertExpected(); + } +}
diff --git a/components/stylus_handwriting/android/junit/src/org/chromium/components/stylus_handwriting/test_support/ShadowGlobalSettings.java b/components/stylus_handwriting/android/junit/src/org/chromium/components/stylus_handwriting/test_support/ShadowGlobalSettings.java new file mode 100644 index 0000000..deaa04b --- /dev/null +++ b/components/stylus_handwriting/android/junit/src/org/chromium/components/stylus_handwriting/test_support/ShadowGlobalSettings.java
@@ -0,0 +1,30 @@ +// 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.components.stylus_handwriting.test_support; + +import android.content.ContentResolver; +import android.provider.Settings; + +import org.robolectric.annotation.Implementation; +import org.robolectric.annotation.Implements; + +/** This shadow class lets tests manipulate the global settings for Android. */ +@Implements(Settings.Global.class) +public class ShadowGlobalSettings { + // Whether handwriting is enabled. 1 = enabled, 0 = disabled, -1 = unset. + private static int sHandwritingEnabled = -1; + + @Implementation + public static int getInt(ContentResolver contentResolver, String name, int def) { + if ("stylus_handwriting_enabled".equals(name)) { + return sHandwritingEnabled; + } + return def; + } + + public static void setHandwritingEnabled(boolean value) { + sHandwritingEnabled = value ? 1 : 0; + } +}
diff --git a/components/stylus_handwriting/android/junit/src/org/chromium/components/stylus_handwriting/test_support/ShadowSecureSettings.java b/components/stylus_handwriting/android/junit/src/org/chromium/components/stylus_handwriting/test_support/ShadowSecureSettings.java new file mode 100644 index 0000000..dcfb472 --- /dev/null +++ b/components/stylus_handwriting/android/junit/src/org/chromium/components/stylus_handwriting/test_support/ShadowSecureSettings.java
@@ -0,0 +1,35 @@ +// 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.components.stylus_handwriting.test_support; + +import android.content.ContentResolver; +import android.provider.Settings; + +import org.robolectric.annotation.Implementation; +import org.robolectric.annotation.Implements; + +/** This shadow class lets tests manipulate the secure settings for Android. */ +@Implements(Settings.Secure.class) +public class ShadowSecureSettings { + public static final String DEFAULT_IME_PACKAGE = "DEFAULT.IME.PACKAGE/COMPONENT.NAME"; + // Whether handwriting is enabled. 1 = enabled, 0 = disabled, -1 = unset. + private static int sHandwritingEnabled = -1; + + @Implementation + public static int getInt(ContentResolver contentResolver, String name, int def) { + if ("stylus_handwriting_enabled".equals(name)) { + return sHandwritingEnabled; + } + return def; + } + + @Implementation + public static String getString(ContentResolver contentResolver, String name) { + if ("default_input_method".equals(name)) { + return DEFAULT_IME_PACKAGE; + } + return ""; + } +}
diff --git a/components/supervised_user/core/browser/resources/supervised_user_block_interstitial_v2.html b/components/supervised_user/core/browser/resources/supervised_user_block_interstitial_v2.html index 1688bbf..c76dda0 100644 --- a/components/supervised_user/core/browser/resources/supervised_user_block_interstitial_v2.html +++ b/components/supervised_user/core/browser/resources/supervised_user_block_interstitial_v2.html
@@ -50,8 +50,8 @@ <div id="main-message"> <h1 id="block-page-header" tabindex="-1">$i18n{blockPageHeader}</h1> <p id="block-page-message" tabindex="-1">$i18n{blockPageMessage}</p> - <h1 id="request-failed-message" role="alert" hidden>$i18n{requestFailedMessage}</h1> - <h1 id="request-sent-message" role="alert" hidden>$i18n{requestSentMessage}</h1> + <h1 id="request-failed-message" aria-live="assertive" aria-atomic="true" hidden>$i18n{requestFailedMessage}</h1> + <h1 id="request-sent-message" aria-live="assertive" aria-atomic="true" hidden>$i18n{requestSentMessage}</h1> <p id="request-sent-description" hidden>$i18n{requestSentDescription}</p> </div> <div id="block-reason-container">
diff --git a/components/tpcd/metadata/parser.cc b/components/tpcd/metadata/parser.cc index ddc6d2bb..ead3954 100644 --- a/components/tpcd/metadata/parser.cc +++ b/components/tpcd/metadata/parser.cc
@@ -45,6 +45,8 @@ CHECK(metadata.ParseFromString(raw_metadata)); metadata_ = ToMetadataEntries(metadata); + + CallOnMetadataReady(); } MetadataEntries ParseMetadataFromFeatureParam( @@ -63,6 +65,20 @@ return ToMetadataEntries(metadata); } +void Parser::AddObserver(Observer* observer) { + observers_.AddObserver(observer); +} + +void Parser::RemoveObserver(Observer* observer) { + observers_.RemoveObserver(observer); +} + +void Parser::CallOnMetadataReady() { + for (auto& observer : observers_) { + observer.OnMetadataReady(); + } +} + MetadataEntries Parser::GetMetadata() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); @@ -80,7 +96,7 @@ } // Start Parser testing methods impl: -MetadataEntries Parser::GetMetadataForTesting() { +MetadataEntries Parser::GetInstalledMetadataForTesting() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); return metadata_.value_or(MetadataEntries());
diff --git a/components/tpcd/metadata/parser.h b/components/tpcd/metadata/parser.h index d0f736a7..420f2e41 100644 --- a/components/tpcd/metadata/parser.h +++ b/components/tpcd/metadata/parser.h
@@ -8,8 +8,9 @@ #include <string> #include <vector> +#include "base/memory/weak_ptr.h" #include "base/metrics/field_trial_params.h" -#include "base/no_destructor.h" +#include "base/observer_list.h" #include "base/sequence_checker.h" #include "base/thread_annotations.h" #include "components/tpcd/metadata/metadata.pb.h" @@ -22,10 +23,23 @@ class Parser { public: static Parser* GetInstance(); + class Observer { + public: + virtual void OnMetadataReady() = 0; + }; + + Parser(); + virtual ~Parser(); Parser(const Parser&) = delete; Parser& operator=(const Parser&) = delete; + // Adds/Removes an Observer. + void AddObserver(Observer* observer); + void RemoveObserver(Observer* observer); + + void CallOnMetadataReady(); + // ParseMetadata deserializes the proto content from `raw_metadata`. // NOTE: The validation of `raw_metadata` will be performed within the // ComponentInstaller's VerifyInstallation method before feeding it to this @@ -37,19 +51,17 @@ // Component Updater. MetadataEntries GetMetadata(); - MetadataEntries GetMetadataForTesting(); + static constexpr char const* kMetadataFeatureParamName = "Metadata"; + + // Start Parser testing methods: + MetadataEntries GetInstalledMetadataForTesting(); void ResetStatesForTesting(); MetadataEntries ParseMetadataFromFeatureParamForTesting( const base::FieldTrialParams& params); - - static constexpr char const* kMetadataFeatureParamName = "Metadata"; + // End Parser testing methods. private: - friend class base::NoDestructor<Parser>; - - Parser(); - ~Parser(); - + base::ObserverList<Observer>::Unchecked observers_; absl::optional<MetadataEntries> metadata_ GUARDED_BY_CONTEXT(sequence_checker_) = absl::nullopt;
diff --git a/components/tpcd/metadata/parser_unittest.cc b/components/tpcd/metadata/parser_unittest.cc index b9b1e6b..7a659a5a 100644 --- a/components/tpcd/metadata/parser_unittest.cc +++ b/components/tpcd/metadata/parser_unittest.cc
@@ -4,6 +4,7 @@ #include "components/tpcd/metadata/parser.h" +#include <memory> #include <string> #include <utility> #include <vector> @@ -38,10 +39,10 @@ ParserTest() { CHECK(fake_install_dir_.CreateUniqueTempDir()); CHECK(fake_install_dir_.IsValid()); - parser_ = Parser::GetInstance(); + parser_ = std::make_unique<Parser>(); } - ~ParserTest() override { parser_->ResetStatesForTesting(); } + ~ParserTest() override = default; protected: // NOTE: we can initialize the ScopedFeatureList this way since this @@ -74,7 +75,7 @@ return raw_metadata; } - Parser* parser() { return parser_; } + Parser* parser() { return parser_.get(); } // The death test is not reliable on old x86 Android: // https://crbug.com/815537 & @@ -93,7 +94,7 @@ } private: - raw_ptr<Parser> parser_; + std::unique_ptr<Parser> parser_; base::test::ScopedFeatureList scoped_feature_list_; base::ScopedTempDir fake_install_dir_; }; @@ -214,7 +215,7 @@ ExecFakeComponentInstallation(metadata.SerializeAsString()); parser()->ParseMetadata(GetFakeComponent()); - MetadataEntries me = parser()->GetMetadataForTesting(); + MetadataEntries me = parser()->GetInstalledMetadataForTesting(); ASSERT_EQ(me.size(), 1u); ASSERT_EQ(me.front().primary_pattern_spec(), primary_pattern_spec); ASSERT_EQ(me.front().secondary_pattern_spec(), secondary_pattern_spec); @@ -287,7 +288,7 @@ EnableFeatureWithParams({{Parser::kMetadataFeatureParamName, MakeBase64EncodedMetadata(metadata_pairs)}}); - MetadataEntries me = parser()->GetMetadataForTesting(); + MetadataEntries me = parser()->GetInstalledMetadataForTesting(); ASSERT_EQ(me.size(), 1u); ASSERT_EQ(me.front().primary_pattern_spec(), primary_pattern_spec); ASSERT_EQ(me.front().secondary_pattern_spec(), secondary_pattern_spec); @@ -311,7 +312,7 @@ EnableFeatureWithParams({{Parser::kMetadataFeatureParamName, MakeBase64EncodedMetadata(metadata_pairs)}}); - MetadataEntries me = parser()->GetMetadataForTesting(); + MetadataEntries me = parser()->GetInstalledMetadataForTesting(); EXPECT_THAT(me, IsEmpty()); me = parser()->GetMetadata(); @@ -352,7 +353,7 @@ EnableFeatureWithParams({{Parser::kMetadataFeatureParamName, MakeBase64EncodedMetadata(metadata_pairs)}}); - MetadataEntries me = parser()->GetMetadataForTesting(); + MetadataEntries me = parser()->GetInstalledMetadataForTesting(); EXPECT_THAT(me, IsEmpty()); me = parser()->GetMetadata(); @@ -370,7 +371,7 @@ ExecFakeComponentInstallation(metadata.SerializeAsString()); parser()->ParseMetadata(GetFakeComponent()); - MetadataEntries me = parser()->GetMetadataForTesting(); + MetadataEntries me = parser()->GetInstalledMetadataForTesting(); ASSERT_EQ(me.size(), 1u); ASSERT_EQ(me.front().primary_pattern_spec(), primary_pattern_spec); ASSERT_EQ(me.front().secondary_pattern_spec(), secondary_pattern_spec);
diff --git a/components/unified_consent/url_keyed_data_collection_consent_helper.cc b/components/unified_consent/url_keyed_data_collection_consent_helper.cc index 37ef591..ccc6c58 100644 --- a/components/unified_consent/url_keyed_data_collection_consent_helper.cc +++ b/components/unified_consent/url_keyed_data_collection_consent_helper.cc
@@ -74,6 +74,7 @@ const bool require_sync_feature_enabled_; raw_ptr<syncer::SyncService> sync_service_; std::map<syncer::ModelType, syncer::UploadState> sync_data_type_states_; + bool sync_feature_state_ = false; }; PrefBasedUrlKeyedDataCollectionConsentHelper:: @@ -124,12 +125,12 @@ sync_service_->RemoveObserver(this); } +// Note: This method must only consume cached state (not query anything from +// SyncService), to ensure that the state-change detection in OnStateChanged() +// works correctly. UrlKeyedDataCollectionConsentHelper::State SyncBasedUrlKeyedDataCollectionConsentHelper::GetConsentState() { - // TODO(crbug.com/1462552): Find a replacement once IsSyncFeatureEnabled() - // starts always returning false. - if (require_sync_feature_enabled_ && - (!sync_service_ || !sync_service_->IsSyncFeatureEnabled())) { + if (require_sync_feature_enabled_ && !sync_feature_state_) { return State::kDisabled; } @@ -172,6 +173,12 @@ } void SyncBasedUrlKeyedDataCollectionConsentHelper::UpdateSyncDataTypeStates() { + if (require_sync_feature_enabled_) { + // TODO(crbug.com/1462552): Find a replacement once IsSyncFeatureEnabled() + // starts always returning false. + sync_feature_state_ = + sync_service_ && sync_service_->IsSyncFeatureEnabled(); + } for (auto& [model_type, upload_state] : sync_data_type_states_) { upload_state = syncer::GetUploadToGoogleState(sync_service_, model_type); }
diff --git a/components/unified_consent/url_keyed_data_collection_consent_helper_unittest.cc b/components/unified_consent/url_keyed_data_collection_consent_helper_unittest.cc index faa065f..b63d5b80 100644 --- a/components/unified_consent/url_keyed_data_collection_consent_helper_unittest.cc +++ b/components/unified_consent/url_keyed_data_collection_consent_helper_unittest.cc
@@ -155,6 +155,32 @@ } TEST_F(UrlKeyedDataCollectionConsentHelperTest, + PersonalizedBookmarksDataCollection_IsSyncFeatureEnabled) { + std::unique_ptr<UrlKeyedDataCollectionConsentHelper> helper = + UrlKeyedDataCollectionConsentHelper:: + NewPersonalizedBookmarksDataCollectionConsentHelper( + &sync_service_, + /*require_sync_feature_enabled=*/true); + sync_service_.GetUserSettings()->SetSelectedTypes( + /*sync_everything=*/false, + /*types=*/{syncer::UserSelectableType::kBookmarks}); + sync_service_.FireOnStateChangeOnAllObservers(); + EXPECT_TRUE(sync_service_.IsSyncFeatureEnabled()); + EXPECT_TRUE(helper->IsEnabled()); + + helper->AddObserver(this); + sync_service_.SetHasSyncConsent(false); + EXPECT_FALSE(sync_service_.IsSyncFeatureEnabled()); + EXPECT_TRUE(helper->IsEnabled()); + EXPECT_EQ(0U, state_changed_notifications_.size()); + + sync_service_.FireOnStateChangeOnAllObservers(); + EXPECT_FALSE(helper->IsEnabled()); + EXPECT_EQ(1U, state_changed_notifications_.size()); + helper->RemoveObserver(this); +} + +TEST_F(UrlKeyedDataCollectionConsentHelperTest, PersonalizedBookmarksDataCollection_NullSyncService) { std::unique_ptr<UrlKeyedDataCollectionConsentHelper> helper = UrlKeyedDataCollectionConsentHelper::
diff --git a/components/update_client/component.cc b/components/update_client/component.cc index cca9718..47b2fe05 100644 --- a/components/update_client/component.cc +++ b/components/update_client/component.cc
@@ -95,29 +95,36 @@ namespace update_client { namespace { -using InstallOnBlockingTaskRunnerCompleteCallback = base::OnceCallback< - void(ErrorCategory error_category, int error_code, int extra_code1)>; +using InstallOnBlockingTaskRunnerCompleteCallback = base::OnceCallback<void( + ErrorCategory error_category, + int error_code, + int extra_code1, + absl::optional<CrxInstaller::Result> installer_result)>; void InstallComplete(scoped_refptr<base::SequencedTaskRunner> main_task_runner, InstallOnBlockingTaskRunnerCompleteCallback callback, const base::FilePath& unpack_path, - const CrxInstaller::Result& result) { + const CrxInstaller::Result& installer_result) { base::ThreadPool::PostTask( FROM_HERE, kTaskTraits, base::BindOnce( [](scoped_refptr<base::SequencedTaskRunner> main_task_runner, InstallOnBlockingTaskRunnerCompleteCallback callback, const base::FilePath& unpack_path, - const CrxInstaller::Result& result) { + const CrxInstaller::Result& installer_result) { base::DeletePathRecursively(unpack_path); - const ErrorCategory error_category = - result.error ? ErrorCategory::kInstall : ErrorCategory::kNone; + const ErrorCategory error_category = installer_result.error + ? ErrorCategory::kInstall + : ErrorCategory::kNone; main_task_runner->PostTask( - FROM_HERE, base::BindOnce(std::move(callback), error_category, - static_cast<int>(result.error), - result.extended_error)); + FROM_HERE, + base::BindOnce(std::move(callback), error_category, + static_cast<int>(installer_result.error), + installer_result.extended_error, + installer_result)); }, - main_task_runner, std::move(callback), unpack_path, result)); + main_task_runner, std::move(callback), unpack_path, + installer_result)); } void InstallOnBlockingTaskRunner( @@ -138,12 +145,14 @@ if (!base::WriteFile( unpack_path.Append(FILE_PATH_LITERAL("manifest.fingerprint")), fingerprint)) { - const CrxInstaller::Result result(InstallError::FINGERPRINT_WRITE_FAILED, - logging::GetLastSystemErrorCode()); + const CrxInstaller::Result installer_result( + InstallError::FINGERPRINT_WRITE_FAILED, + logging::GetLastSystemErrorCode()); main_task_runner->PostTask( FROM_HERE, base::BindOnce(std::move(callback), ErrorCategory::kInstall, - static_cast<int>(result.error), result.extended_error)); + static_cast<int>(installer_result.error), + installer_result.extended_error, absl::nullopt)); return; } @@ -195,9 +204,9 @@ base::BindOnce( [](scoped_refptr<CallbackChecker> callback_checker, CrxInstaller::Callback callback, - const CrxInstaller::Result& result) { + const CrxInstaller::Result& installer_result) { callback_checker->set_unsafe(); - std::move(callback).Run(result); + std::move(callback).Run(installer_result); }, callback_checker, base::BindOnce(&InstallComplete, main_task_runner, @@ -244,9 +253,9 @@ update_client::DeleteFileAndEmptyParentDirectory(crx_path); DVLOG(2) << "Unpack failed: " << static_cast<int>(result.error); main_task_runner->PostTask( - FROM_HERE, - base::BindOnce(std::move(callback), ErrorCategory::kUnpack, - static_cast<int>(result.error), result.extended_error)); + FROM_HERE, base::BindOnce(std::move(callback), ErrorCategory::kUnpack, + static_cast<int>(result.error), + result.extended_error, absl::nullopt)); } else if (!base::FeatureList::IsEnabled(features::kPuffinPatches) || !optional_crx_cache.has_value()) { // If we were unable to create the crx_cache, skip the CrxCache::Put call. @@ -321,8 +330,9 @@ update_client::DeleteFileAndEmptyParentDirectory(src_crx_path); update_client::DeleteFileAndEmptyParentDirectory(dest_crx_path); main_task_runner->PostTask( - FROM_HERE, base::BindOnce(std::move(callback), ErrorCategory::kUnpack, - static_cast<int>(error), extra_code)); + FROM_HERE, + base::BindOnce(std::move(callback), ErrorCategory::kUnpack, + static_cast<int>(error), extra_code, absl::nullopt)); DVLOG(2) << "PuffPatch failed: " << static_cast<int>(error); return; } @@ -355,8 +365,9 @@ const CrxCache::Result& result) { if (result.error != UnpackerError::kNone) { main_task_runner->PostTask( - FROM_HERE, base::BindOnce(std::move(callback), ErrorCategory::kUnpack, - static_cast<int>(result.error), 0)); + FROM_HERE, + base::BindOnce(std::move(callback), ErrorCategory::kUnpack, + static_cast<int>(result.error), 0, absl::nullopt)); DVLOG(2) << "crx_cache->Get failed: " << static_cast<int>(result.error); return; } @@ -509,6 +520,7 @@ crx_update_item.error_code = error_code_; crx_update_item.extra_code1 = extra_code1_; crx_update_item.custom_updatecheck_data = custom_attrs_; + crx_update_item.installer_result = installer_result_; return crx_update_item; } @@ -1160,8 +1172,8 @@ FROM_HERE, base::BindOnce(&Component::StateUpdatingDiff::InstallComplete, base::Unretained(this), ErrorCategory::kUnpack, - static_cast<int>(UnpackerError::kCrxCacheNotProvided), - 0)); + static_cast<int>(UnpackerError::kCrxCacheNotProvided), 0, + absl::nullopt)); } } @@ -1175,9 +1187,11 @@ component.NotifyObservers(Events::COMPONENT_UPDATE_UPDATING); } -void Component::StateUpdatingDiff::InstallComplete(ErrorCategory error_category, - int error_code, - int extra_code1) { +void Component::StateUpdatingDiff::InstallComplete( + ErrorCategory error_category, + int error_code, + int extra_code1, + absl::optional<CrxInstaller::Result>) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); auto& component = Component::State::component(); @@ -1256,9 +1270,11 @@ component.NotifyObservers(Events::COMPONENT_UPDATE_UPDATING); } -void Component::StateUpdating::InstallComplete(ErrorCategory error_category, - int error_code, - int extra_code1) { +void Component::StateUpdating::InstallComplete( + ErrorCategory error_category, + int error_code, + int extra_code1, + absl::optional<CrxInstaller::Result> installer_result) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); auto& component = Component::State::component(); @@ -1266,6 +1282,7 @@ component.error_category_ = error_category; component.error_code_ = error_code; component.extra_code1_ = extra_code1; + component.installer_result_ = installer_result; if (component.error_code_ != 0) { TransitionState(std::make_unique<StateUpdateError>(&component));
diff --git a/components/update_client/component.h b/components/update_client/component.h index 9ced5f90..613b65dd 100644 --- a/components/update_client/component.h +++ b/components/update_client/component.h
@@ -114,7 +114,11 @@ bool diff_update_failed() const { return !!diff_error_code_; } ErrorCategory error_category() const { return error_category_; } - int error_code() const { return error_code_; } + int error_code() const { + return installer_result_ && installer_result_->original_error + ? installer_result_->original_error + : error_code_; + } int extra_code1() const { return extra_code1_; } ErrorCategory diff_error_category() const { return diff_error_category_; } int diff_error_code() const { return diff_error_code_; } @@ -311,7 +315,8 @@ void InstallProgress(int install_progress); void InstallComplete(ErrorCategory error_category, int error_code, - int extra_code1); + int extra_code1, + absl::optional<CrxInstaller::Result> installer_result); }; class StateUpdating : public State { @@ -328,7 +333,8 @@ void InstallProgress(int install_progress); void InstallComplete(ErrorCategory error_category, int error_code, - int extra_code1); + int extra_code1, + absl::optional<CrxInstaller::Result> installer_result); }; class StateUpdated : public State { @@ -459,9 +465,12 @@ // the |extra_code1| usually contains a system error, but it can contain // any extended information that is relevant to either the category or the // error itself. + // The `installer_result_` contains the value provided by the `CrxInstaller` + // instance when the install completes. ErrorCategory error_category_ = ErrorCategory::kNone; int error_code_ = 0; int extra_code1_ = 0; + absl::optional<CrxInstaller::Result> installer_result_; ErrorCategory diff_error_category_ = ErrorCategory::kNone; int diff_error_code_ = 0; int diff_extra_code1_ = 0;
diff --git a/components/update_client/crx_update_item.h b/components/update_client/crx_update_item.h index b8c9d98f..b764ae8 100644 --- a/components/update_client/crx_update_item.h +++ b/components/update_client/crx_update_item.h
@@ -56,6 +56,10 @@ int error_code = 0; int extra_code1 = 0; std::map<std::string, std::string> custom_updatecheck_data; + + // The value of this data member is provided to the `UpdateClient` by the + // `CrxInstaller` instance when the install completes. + absl::optional<CrxInstaller::Result> installer_result; }; } // namespace update_client
diff --git a/components/update_client/update_client.h b/components/update_client/update_client.h index 36974a2..eefdcea 100644 --- a/components/update_client/update_client.h +++ b/components/update_client/update_client.h
@@ -184,6 +184,23 @@ // Shell command run at the end of the install, if applicable. This string // must be escaped to be a command line. std::string installer_cmd_line; + + // A `CrxInstaller` instance that runs other application installers needs + // the ability to report error codes that `update_client` should not + // interpret. For instance: + // * the application installer error code may be an OS error code that + // overlaps with the error codes in `update_client::InstallError`. Error + // code `2` could mean `FINGERPRINT_WRITE_FAILED = 2` or the windows error + // `ERROR_FILE_NOT_FOUND`. + // * the application installer may report a non-zero success code. + // `update_client` views any error code other than `0` as an error. + // `ERROR_SUCCESS_REBOOT_INITIATED`, `ERROR_SUCCESS_REBOOT_REQUIRED`, and + // `ERROR_SUCCESS_RESTART_REQUIRED` are examples of non-zero success + // codes. + // In these cases, the `CrxInstaller` may choose to store the application + // installer result in `original_error`, and use a zero/non-zero `error` + // only to indicate a success/error. + int original_error = 0; }; struct InstallParams {
diff --git a/components/user_education/common/feature_promo_controller.cc b/components/user_education/common/feature_promo_controller.cc index 5340ad46..840ef10 100644 --- a/components/user_education/common/feature_promo_controller.cc +++ b/components/user_education/common/feature_promo_controller.cc
@@ -38,7 +38,9 @@ HelpBubbleFactoryRegistry* help_bubble_registry, FeaturePromoStorageService* storage_service, TutorialService* tutorial_service) - : registry_(registry), + : in_iph_demo_mode_( + base::FeatureList::IsEnabled(feature_engagement::kIPHDemoMode)), + registry_(registry), feature_engagement_tracker_(feature_engagement_tracker), bubble_factory_registry_(help_bubble_registry), storage_service_(storage_service), @@ -54,31 +56,20 @@ std::move(callback).Run(*feature, false); } +bool FeaturePromoControllerCommon::CanShowPromo( + const base::Feature& iph_feature) const { + return CanShowPromoCommon(iph_feature, false) && + feature_engagement_tracker_->WouldTriggerHelpUI(iph_feature); +} + bool FeaturePromoControllerCommon::MaybeShowPromo( const base::Feature& iph_feature, BubbleCloseCallback close_callback, FeaturePromoSpecification::FormatParameters body_params, FeaturePromoSpecification::FormatParameters title_params) { - // Fail if the promo is already queued to run at FE initialization. - if (base::Contains(startup_promos_, &iph_feature)) - return false; - - const FeaturePromoSpecification* spec = - registry()->GetParamsForFeature(iph_feature); - if (!spec) { - return false; - } - - // Fetch the anchor element. For now, assume all elements are Views. - ui::TrackedElement* const anchor_element = - spec->GetAnchorElement(GetAnchorContext()); - - if (!anchor_element) - return false; - - return MaybeShowPromoFromSpecification( - *spec, /* for_demo =*/false, anchor_element, std::move(close_callback), - std::move(body_params), std::move(title_params)); + return MaybeShowPromoCommon(iph_feature, + /* for_demo =*/false, std::move(close_callback), + std::move(body_params), std::move(title_params)); } bool FeaturePromoControllerCommon::MaybeShowStartupPromo( @@ -111,108 +102,58 @@ } bool FeaturePromoControllerCommon::MaybeShowPromoForDemoPage( - const base::Feature* iph_feature, + const base::Feature& iph_feature, BubbleCloseCallback close_callback, FeaturePromoSpecification::FormatParameters body_params, FeaturePromoSpecification::FormatParameters title_params) { - if (current_promo_) { - EndPromo(*GetCurrentPromoFeature(), CloseReason::kOverrideForDemo); - } - - const FeaturePromoSpecification* spec = - registry()->GetParamsForFeature(*iph_feature); - if (!spec) { - return false; - } - - // Fetch the anchor element. For now, assume all elements are Views. - ui::TrackedElement* const anchor_element = - spec->GetAnchorElement(GetAnchorContext()); - - if (!anchor_element) { - return false; - } - - return MaybeShowPromoFromSpecification( - *spec, /* for_demo =*/true, anchor_element, std::move(close_callback), - std::move(body_params), std::move(title_params)); + return MaybeShowPromoCommon(iph_feature, + /* for_demo =*/true, std::move(close_callback), + std::move(body_params), std::move(title_params)); } -bool FeaturePromoControllerCommon::MaybeShowPromoFromSpecification( - const FeaturePromoSpecification& spec, +bool FeaturePromoControllerCommon::MaybeShowPromoCommon( + const base::Feature& iph_feature, bool for_demo, - ui::TrackedElement* anchor_element, BubbleCloseCallback close_callback, FeaturePromoSpecification::FormatParameters body_params, FeaturePromoSpecification::FormatParameters title_params) { + // Perform common checks. + const FeaturePromoSpecification* spec = nullptr; + std::unique_ptr<FeaturePromoLifecycle> lifecycle = nullptr; + ui::TrackedElement* anchor_element = nullptr; + if (!CanShowPromoCommon(iph_feature, for_demo, &spec, &lifecycle, + &anchor_element)) { + return false; + } + CHECK(spec); + CHECK(lifecycle); CHECK(anchor_element); const bool is_high_priority = - spec.promo_subtype() == + spec->promo_subtype() == FeaturePromoSpecification::PromoSubtype::kLegalNotice; - const bool high_priority_already_showing = - critical_promo_bubble_ || - (current_promo_ && - current_promo_->promo_subtype() == - FeaturePromoSpecification::PromoSubtype::kLegalNotice); - // A normal promo cannot show if a high priority promo is displayed. - if (high_priority_already_showing) { - return false; + // For demo and high-priority promos, cancel the current promo. + if ((is_high_priority || for_demo) && current_promo_) { + EndPromo(*GetCurrentPromoFeature(), CloseReason::kOverrideForDemo); } - // Some contexts and anchors are not appropriate for showing normal promos. - if (!CanShowPromo(anchor_element)) { - return false; - } - + // For high priority promos, close any other promos or help bubbles in this + // context. if (is_high_priority) { - // For high priority promos, close any other promos or help bubbles in this - // context. - if (const auto* current = GetCurrentPromoFeature()) { - EndPromo(*current, CloseReason::kOverrideForPrecedence); - } if (auto* help_bubble = bubble_factory_registry_->GetHelpBubble( anchor_element->context())) { help_bubble->Close(); } - } else if (current_promo_ || - bubble_factory_registry_->is_any_bubble_showing()) { - // Can't show a standard promo if another IPH is running or another help - // bubble is visible. - return false; - } - - // Some checks should not be done in demo mode, because we absolutely want to - // trigger the bubble if possible. Put any checks that should be bypassed in - // demo mode in this block. - const base::Feature* const feature = spec.feature(); - const bool in_demo_mode = - base::FeatureList::IsEnabled(feature_engagement::kIPHDemoMode); - auto lifecycle = std::make_unique<FeaturePromoLifecycle>( - storage_service_, GetAppId(), feature, spec.promo_type(), - spec.promo_subtype()); - if (!for_demo && !in_demo_mode) { - // When not bypassing the normal gating systems, don't try to show promos - // for disabled features. This prevents us from calling into the Feature - // Engagement tracker more times than necessary, emitting unnecessary - // logging even when features are disabled. - if (!base::FeatureList::IsEnabled(*feature)) { - return false; - } - - if (!lifecycle->CanShow()) { - return false; - } } // TODO(crbug.com/1258216): Currently this must be called before // ShouldTriggerHelpUI() below. See bug for details. const bool screen_reader_available = - CheckScreenReaderPromptAvailable(for_demo || in_demo_mode); + CheckScreenReaderPromptAvailable(for_demo || in_iph_demo_mode_); if (!for_demo && - !feature_engagement_tracker_->ShouldTriggerHelpUI(*feature)) { + !feature_engagement_tracker_->ShouldTriggerHelpUI(iph_feature)) { return false; } @@ -223,12 +164,12 @@ // Try to show the bubble and bail out if we cannot. auto bubble = ShowPromoBubbleImpl( - spec, anchor_element, std::move(body_params), std::move(title_params), + *spec, anchor_element, std::move(body_params), std::move(title_params), screen_reader_available, /* is_critical_promo =*/false); if (!bubble) { current_promo_.reset(); if (!for_demo) { - feature_engagement_tracker_->Dismissed(*feature); + feature_engagement_tracker_->Dismissed(iph_feature); } return false; } @@ -414,8 +355,9 @@ bool tracker_initialized_successfully) { // If the promo has been canceled, do not proceed. const auto it = startup_promos_.find(iph_feature); - if (it == startup_promos_.end()) + if (it == startup_promos_.end()) { return; + } // Store the callback and remove the promo from the pending list. StartupPromoCallback callback = std::move(it->second); @@ -430,6 +372,105 @@ std::move(callback).Run(*iph_feature, success); } +bool FeaturePromoControllerCommon::CanShowPromoCommon( + const base::Feature& iph_feature, + bool for_demo, + const FeaturePromoSpecification** spec_out, + std::unique_ptr<FeaturePromoLifecycle>* lifecycle_out, + ui::TrackedElement** anchor_element_out) const { + // Ensure that this promo isn't already queued for startup. + // + // Note that this check is bypassed if this is for an explicit demo, but not + // in demo mode, as the IPH may be queued for startup specifically because it + // is being demoed. + if (!for_demo && base::Contains(startup_promos_, &iph_feature)) { + return false; + } + + const FeaturePromoSpecification* spec = + registry()->GetParamsForFeature(iph_feature); + if (!spec) { + return false; + } + + // Fetch the anchor element. For now, assume all elements are Views. + ui::TrackedElement* const anchor_element = + spec->GetAnchorElement(GetAnchorContext()); + if (!anchor_element) { + return false; + } + + const bool is_high_priority = + spec->promo_subtype() == + FeaturePromoSpecification::PromoSubtype::kLegalNotice; + const bool high_priority_already_showing = + critical_promo_bubble_ || + (current_promo_ && + current_promo_->promo_subtype() == + FeaturePromoSpecification::PromoSubtype::kLegalNotice); + + // A normal promo cannot show if a high priority promo is displayed. + // + // Demo mode does not override high-priority promos, as in many cases they are + // legally mandated. + if (high_priority_already_showing) { + return false; + } + + // Some contexts and anchors are not appropriate for showing normal promos. + if (!CanShowPromoForElement(anchor_element)) { + return false; + } + + // Can't show a standard promo if another IPH is running or another help + // bubble is visible. + if (!is_high_priority && + (current_promo_ || bubble_factory_registry_->is_any_bubble_showing())) { + return false; + } + + // When not bypassing the normal gating systems, don't try to show promos for + // disabled features. This prevents us from calling into the Feature + // Engagement tracker more times than necessary, emitting unnecessary logging + // events when features are disabled. + if (!for_demo && !in_iph_demo_mode_ && + !base::FeatureList::IsEnabled(iph_feature)) { + return false; + } + + // Check the lifecycle, but only if not in demo mode. This is especially + // important for snoozeable, app, and legal notice promos. + if (!for_demo && !in_iph_demo_mode_) { + auto lifecycle = std::make_unique<FeaturePromoLifecycle>( + storage_service_, GetAppId(), &iph_feature, spec->promo_type(), + spec->promo_subtype()); + if (!lifecycle->CanShow()) { + return false; + } + if (lifecycle_out) { + *lifecycle_out = std::move(lifecycle); + } + } else if (lifecycle_out) { + // If in demo mode but the caller has asked for a lifecycle anyway, then + // provide one. + *lifecycle_out = std::make_unique<FeaturePromoLifecycle>( + storage_service_, GetAppId(), &iph_feature, spec->promo_type(), + spec->promo_subtype()); + } + + // If the caller has asked for the specification or anchor element, then + // provide them. + if (spec_out) { + *spec_out = spec; + } + if (anchor_element_out) { + *anchor_element_out = anchor_element; + } + + // Success - the promo can show. + return true; +} + std::unique_ptr<HelpBubble> FeaturePromoControllerCommon::ShowPromoBubbleImpl( const FeaturePromoSpecification& spec, ui::TrackedElement* anchor_element,
diff --git a/components/user_education/common/feature_promo_controller.h b/components/user_education/common/feature_promo_controller.h index 33f4b3f..f20364d 100644 --- a/components/user_education/common/feature_promo_controller.h +++ b/components/user_education/common/feature_promo_controller.h
@@ -81,6 +81,16 @@ virtual ~FeaturePromoController(); void operator=(const FeaturePromoController& other) = delete; + // Queries whether the given promo could be shown at the current moment. + // + // In general it is unnecessary to call this method if the intention is to + // show the promo; just call `MaybeShowPromo()` directly. However, in cases + // where determining whether to try to show a promo would be prohibitively + // expensive, this is a slightly less expensive out (but please note that it + // is not zero cost; a number of prefs and application states do need to be + // queried). + virtual bool CanShowPromo(const base::Feature& iph_feature) const = 0; + // Starts the promo if possible. Returns whether it started. // |iph_feature| must be an IPH feature defined in // components/feature_engagement/public/feature_list.cc and registered @@ -166,7 +176,7 @@ // Starts a promo with the settings for skipping any logging or filtering // provided by the implementation for MaybeShowPromo. virtual bool MaybeShowPromoForDemoPage( - const base::Feature* iph_feature, + const base::Feature& iph_feature, BubbleCloseCallback close_callback = base::DoNothing(), FeaturePromoSpecification::FormatParameters body_params = FeaturePromoSpecification::NoSubstitution(), @@ -240,6 +250,7 @@ } // FeaturePromoController: + bool CanShowPromo(const base::Feature& iph_feature) const override; bool MaybeShowPromo(const base::Feature& iph_feature, BubbleCloseCallback close_callback = base::DoNothing(), FeaturePromoSpecification::FormatParameters body_params = @@ -260,7 +271,7 @@ FeaturePromoStorageService::CloseReason* close_reason = nullptr) const override; bool MaybeShowPromoForDemoPage( - const base::Feature* iph_feature, + const base::Feature& iph_feature, BubbleCloseCallback close_callback = base::DoNothing(), FeaturePromoSpecification::FormatParameters body_params = FeaturePromoSpecification::NoSubstitution(), @@ -295,10 +306,9 @@ // For IPH not registered with |FeaturePromoRegistry|. Only use this // if it is infeasible to pre-register your IPH. - bool MaybeShowPromoFromSpecification( - const FeaturePromoSpecification& spec, + bool MaybeShowPromoCommon( + const base::Feature& iph_feature, bool for_demo, - ui::TrackedElement* anchor_element, BubbleCloseCallback close_callback, FeaturePromoSpecification::FormatParameters body_params, FeaturePromoSpecification::FormatParameters title_params); @@ -329,8 +339,9 @@ // non-critical promos. // // Note: Implementations should make sure to check - // active_window_check_blocked(). - virtual bool CanShowPromo(ui::TrackedElement* anchor_element) const = 0; + // `active_window_check_blocked()`. + virtual bool CanShowPromoForElement( + ui::TrackedElement* anchor_element) const = 0; // Get the accelerator provider to use to look up accelerators. virtual const ui::AcceleratorProvider* GetAcceleratorProvider() const = 0; @@ -397,6 +408,18 @@ FeaturePromoSpecification::FormatParameters title_params, bool tracker_initialized_successfully); + // Performs common logic for determining if a feature promo for `iph_feature` + // could be shown right now. + // + // The optional parameters `spec`, `lifecycle`, and `anchor_element` will be + // populated on success, if specified. + bool CanShowPromoCommon( + const base::Feature& iph_feature, + bool for_demo, + const FeaturePromoSpecification** spec = nullptr, + std::unique_ptr<FeaturePromoLifecycle>* lifecycle = nullptr, + ui::TrackedElement** anchor_element = nullptr) const; + // Method that creates the bubble for a feature promo. May return null if the // bubble cannot be shown. std::unique_ptr<HelpBubble> ShowPromoBubbleImpl( @@ -466,6 +489,9 @@ const base::Feature* GetCurrentPromoFeature() const; + // Whether the IPH Demo Mode flag has been set at startup. + const bool in_iph_demo_mode_; + // The feature promo registry to use. const raw_ptr<FeaturePromoRegistry> registry_;
diff --git a/components/user_education/test/mock_feature_promo_controller.h b/components/user_education/test/mock_feature_promo_controller.h index db2f95134..12fb1af 100644 --- a/components/user_education/test/mock_feature_promo_controller.h +++ b/components/user_education/test/mock_feature_promo_controller.h
@@ -20,6 +20,7 @@ ~MockFeaturePromoController() override; // FeaturePromoController: + MOCK_METHOD(bool, CanShowPromo, (const base::Feature&), (const, override)); MOCK_METHOD(bool, MaybeShowPromo, (const base::Feature&, @@ -37,7 +38,7 @@ (override)); MOCK_METHOD(bool, MaybeShowPromoForDemoPage, - (const base::Feature*, + (const base::Feature&, BubbleCloseCallback, FeaturePromoSpecification::FormatParameters, FeaturePromoSpecification::FormatParameters),
diff --git a/components/variations/cros_evaluate_seed/early_boot_seed_store_unittest.cc b/components/variations/cros_evaluate_seed/early_boot_seed_store_unittest.cc index 0f69cd41..cf438332 100644 --- a/components/variations/cros_evaluate_seed/early_boot_seed_store_unittest.cc +++ b/components/variations/cros_evaluate_seed/early_boot_seed_store_unittest.cc
@@ -6,6 +6,7 @@ #include <string> +#include "base/test/protobuf_matchers.h" #include "base/test/scoped_command_line.h" #include "base/time/time.h" #include "chromeos/ash/components/dbus/featured/featured.pb.h" @@ -20,14 +21,7 @@ namespace { -MATCHER_P(EqualsProto, - message, - "Match a proto Message equal to the matcher's argument.") { - std::string expected_serialized, actual_serialized; - message.SerializeToString(&expected_serialized); - arg.SerializeToString(&actual_serialized); - return expected_serialized == actual_serialized; -} +using ::base::EqualsProto; // Populates |seed| with simple test data. The resulting seed will contain one // study called "test", which contains one experiment called "abc" with
diff --git a/components/variations/cros_evaluate_seed/evaluate_seed_unittest.cc b/components/variations/cros_evaluate_seed/evaluate_seed_unittest.cc index b24fa34..ec7f7c3 100644 --- a/components/variations/cros_evaluate_seed/evaluate_seed_unittest.cc +++ b/components/variations/cros_evaluate_seed/evaluate_seed_unittest.cc
@@ -5,6 +5,7 @@ #include "components/variations/cros_evaluate_seed/evaluate_seed.h" #include "base/strings/strcat.h" +#include "base/test/protobuf_matchers.h" #include "base/test/scoped_chromeos_version_info.h" #include "build/branding_buildflags.h" #include "build/config/chromebox_for_meetings/buildflags.h" @@ -15,14 +16,7 @@ namespace variations::cros_early_boot::evaluate_seed { -MATCHER_P(EqualsProto, - message, - "Match a proto Message equal to the matcher's argument.") { - std::string expected_serialized, actual_serialized; - message.SerializeToString(&expected_serialized); - arg.SerializeToString(&actual_serialized); - return expected_serialized == actual_serialized; -} +using ::base::EqualsProto; TEST(VariationsCrosEvaluateSeed, GetClientFilterable_Enrolled) { base::CommandLine::ForCurrentProcess()->InitFromArgv(
diff --git a/components/viz/common/features.cc b/components/viz/common/features.cc index e619db17..f0e827c 100644 --- a/components/viz/common/features.cc +++ b/components/viz/common/features.cc
@@ -237,21 +237,14 @@ // If enabled, CompositorFrameSinkClient::OnBeginFrame is also treated as the // DidReceiveCompositorFrameAck. Both in providing the Ack for the previous -// frame, and in returning resources. While enabled the separate Ack and -// ReclaimResources signals will not be sent. +// frame, and in returning resources. While enabled we attempt to not send +// separate Ack and ReclaimResources signals. However if while sending an +// OnBeginFrame there is a pending Ack, then if the Ack arrives before the next +// OnBeginFrame we will send the Ack immediately, rather than batching it. BASE_FEATURE(kOnBeginFrameAcks, "OnBeginFrameAcks", base::FEATURE_DISABLED_BY_DEFAULT); -// If enabled, and kOnBeginFrameAcks is also enabled, then if we issue an -// CompositorFrameSinkClient::OnBeginFrame, while we are pending an Ack. If the -// Ack arrives before the next OnBeginFrame we will send it immediately, instead -// of batching it. This is to support a frame submission/draw that occurs right -// near the OnBeginFrame boundary. -BASE_FEATURE(kOnBeginFrameAllowLateAcks, - "OnBeginFrameAllowLateAcks", - base::FEATURE_DISABLED_BY_DEFAULT); - // if enabled, Any CompositorFrameSink of type video that defines a preferred // framerate that is below the display framerate will throttle OnBeginFrame // callbacks to match the preferred framerate.
diff --git a/components/viz/common/features.h b/components/viz/common/features.h index 90dc4221..56ce518 100644 --- a/components/viz/common/features.h +++ b/components/viz/common/features.h
@@ -70,7 +70,6 @@ VIZ_COMMON_EXPORT BASE_DECLARE_FEATURE(kBufferQueueImageSetPurgeable); VIZ_COMMON_EXPORT BASE_DECLARE_FEATURE(kEvictSubtree); VIZ_COMMON_EXPORT BASE_DECLARE_FEATURE(kOnBeginFrameAcks); -VIZ_COMMON_EXPORT BASE_DECLARE_FEATURE(kOnBeginFrameAllowLateAcks); VIZ_COMMON_EXPORT BASE_DECLARE_FEATURE(kOnBeginFrameThrottleVideo); VIZ_COMMON_EXPORT BASE_DECLARE_FEATURE(kAutoNeedsBeginFrame); VIZ_COMMON_EXPORT BASE_DECLARE_FEATURE(kSharedBitmapToSharedImage);
diff --git a/components/viz/service/frame_sinks/compositor_frame_sink_support.cc b/components/viz/service/frame_sinks/compositor_frame_sink_support.cc index 7fe393f..a450d89 100644 --- a/components/viz/service/frame_sinks/compositor_frame_sink_support.cc +++ b/components/viz/service/frame_sinks/compositor_frame_sink_support.cc
@@ -876,8 +876,7 @@ // send a separate Ack, so they can unthrottle and begin frame production. if (ShouldMergeBeginFrameWithAcks() && !was_pending_manual_begin_frame_source_ && - (!base::FeatureList::IsEnabled(features::kOnBeginFrameAllowLateAcks) || - !ack_pending_during_on_begin_frame_)) { + !ack_pending_during_on_begin_frame_) { ack_queued_for_client_count_++; UpdateNeedsBeginFramesInternal(); return;
diff --git a/components/viz/service/frame_sinks/surface_synchronization_unittest.cc b/components/viz/service/frame_sinks/surface_synchronization_unittest.cc index 97a9548..43ed4c7 100644 --- a/components/viz/service/frame_sinks/surface_synchronization_unittest.cc +++ b/components/viz/service/frame_sinks/surface_synchronization_unittest.cc
@@ -1827,8 +1827,7 @@ // immediately so that the child can submit another frame and catch up with // the parent. SendNextBeginFrame(); - EXPECT_CALL(support_client_, DidReceiveCompositorFrameAck(_)) - .Times(BeginFrameAcksEnabled() ? 0 : 1); + EXPECT_CALL(support_client_, DidReceiveCompositorFrameAck(_)).Times(1); child_support1().SubmitCompositorFrame( child_id1.local_surface_id(), MakeCompositorFrame({arbitrary_id},
diff --git a/components/viz/test/test_context_provider.cc b/components/viz/test/test_context_provider.cc index be42e716..99485692 100644 --- a/components/viz/test/test_context_provider.cc +++ b/components/viz/test/test_context_provider.cc
@@ -369,6 +369,15 @@ // static scoped_refptr<TestContextProvider> TestContextProvider::CreateRaster( + std::unique_ptr<TestRasterInterface> raster) { + CHECK(raster); + return base::MakeRefCounted<TestContextProvider>( + std::make_unique<TestContextSupport>(), std::move(raster), + /*support_locking=*/false); +} + +// static +scoped_refptr<TestContextProvider> TestContextProvider::CreateRaster( std::unique_ptr<TestContextSupport> context_support) { CHECK(context_support); return base::MakeRefCounted<TestContextProvider>(
diff --git a/components/viz/test/test_context_provider.h b/components/viz/test/test_context_provider.h index 6d47533..525847e 100644 --- a/components/viz/test/test_context_provider.h +++ b/components/viz/test/test_context_provider.h
@@ -173,6 +173,8 @@ // Creates a context backed by TestRasterInterface with no lock. static scoped_refptr<TestContextProvider> CreateRaster(); static scoped_refptr<TestContextProvider> CreateRaster( + std::unique_ptr<TestRasterInterface> raster); + static scoped_refptr<TestContextProvider> CreateRaster( std::unique_ptr<TestContextSupport> support); // Creates a worker context provider that can be used on any thread. This is
diff --git a/components/viz/test/test_raster_interface.cc b/components/viz/test/test_raster_interface.cc index 61495b3d..ba43c02 100644 --- a/components/viz/test/test_raster_interface.cc +++ b/components/viz/test/test_raster_interface.cc
@@ -186,4 +186,14 @@ test_support_->CallAllSyncPointCallbacks(); } +void TestRasterInterface::set_supports_gpu_memory_buffer_format( + gfx::BufferFormat format, + bool support) { + if (support) { + caps_.gpu_memory_buffer_formats.Put(format); + } else { + caps_.gpu_memory_buffer_formats.Remove(format); + } +} + } // namespace viz
diff --git a/components/viz/test/test_raster_interface.h b/components/viz/test/test_raster_interface.h index 049b1a1..90281be72 100644 --- a/components/viz/test/test_raster_interface.h +++ b/components/viz/test/test_raster_interface.h
@@ -54,6 +54,11 @@ void set_max_texture_size(int max_texture_size) { caps_.max_texture_size = max_texture_size; } + void set_supports_scanout_shared_images(bool supports_scanout_shared_images) { + caps_.supports_scanout_shared_images = supports_scanout_shared_images; + } + void set_supports_gpu_memory_buffer_format(gfx::BufferFormat format, + bool support); // gpu::raster::RasterInterface implementation. void Finish() override;
diff --git a/content/browser/accessibility/dump_accessibility_tree_browsertest.cc b/content/browser/accessibility/dump_accessibility_tree_browsertest.cc index 47297149..cdeab26 100644 --- a/content/browser/accessibility/dump_accessibility_tree_browsertest.cc +++ b/content/browser/accessibility/dump_accessibility_tree_browsertest.cc
@@ -2433,8 +2433,9 @@ RunHtmlTest(FILE_PATH_LITERAL("input-search.html")); } -// TODO(crbug.com/1480429): failing on linux -#if BUILDFLAG(IS_LINUX) +// TODO(crbug.com/1480429): failing on Linux, Lacros ASAN +#if BUILDFLAG(IS_LINUX) || \ + (BUILDFLAG(IS_CHROMEOS_LACROS) && defined(ADDRESS_SANITIZER)) #define MAYBE_AccessibilityInsertBefore DISABLED_AccessibilityInsertBefore #else #define MAYBE_AccessibilityInsertBefore AccessibilityInsertBefore
diff --git a/content/browser/attribution_reporting/attribution_config.cc b/content/browser/attribution_reporting/attribution_config.cc index f52af430..feb45fb 100644 --- a/content/browser/attribution_reporting/attribution_config.cc +++ b/content/browser/attribution_reporting/attribution_config.cc
@@ -149,14 +149,6 @@ return false; } - if (max_attributions_per_navigation_source <= 0) { - return false; - } - - if (max_attributions_per_event_source <= 0) { - return false; - } - if (randomized_response_epsilon < 0 || std::isnan(randomized_response_epsilon)) { return false;
diff --git a/content/browser/attribution_reporting/attribution_config.h b/content/browser/attribution_reporting/attribution_config.h index a0063531..f8444dfa 100644 --- a/content/browser/attribution_reporting/attribution_config.h +++ b/content/browser/attribution_reporting/attribution_config.h
@@ -82,10 +82,6 @@ // destination. int max_reports_per_destination = 1024; - // Controls how many times a single source can create an event-level report. - int max_attributions_per_navigation_source = 3; - int max_attributions_per_event_source = 1; - // Default constants for report window deadlines. static constexpr base::TimeDelta kDefaultFirstReportWindowDeadline = base::Days(2);
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 483c5686..037fe5c 100644 --- a/content/browser/attribution_reporting/attribution_data_host_manager_impl.cc +++ b/content/browser/attribution_reporting/attribution_data_host_manager_impl.cc
@@ -867,6 +867,7 @@ /*violation_type=*/attribution_header->error(), /*request_url=*/reporting_url, *it->devtools_request_id(), /*invalid_parameter=*/absl::nullopt); + MaybeOnRegistrationsFinished(it); return; } @@ -906,7 +907,7 @@ } ASSIGN_OR_RETURN(auto registration, attribution_reporting::SourceRegistration::Parse( - std::move(*result).TakeDict())); + std::move(*result).TakeDict(), source_type)); return StorableSource(pending_decode.reporting_origin, std::move(registration), registrations->source_origin(), source_type,
diff --git a/content/browser/attribution_reporting/attribution_debug_report.cc b/content/browser/attribution_reporting/attribution_debug_report.cc index 0afe4a5..b09d7f20 100644 --- a/content/browser/attribution_reporting/attribution_debug_report.cc +++ b/content/browser/attribution_reporting/attribution_debug_report.cc
@@ -144,7 +144,7 @@ return DataTypeIfCookieSet( DebugDataType::kTriggerEventNoMatchingConfigurations, is_debug_cookie_set); - case EventLevelResult::kDroppedForNoise: + case EventLevelResult::kNeverAttributedSource: case EventLevelResult::kFalselyAttributedSource: return DataTypeIfCookieSet(DebugDataType::kTriggerEventNoise, is_debug_cookie_set);
diff --git a/content/browser/attribution_reporting/attribution_debug_report_unittest.cc b/content/browser/attribution_reporting/attribution_debug_report_unittest.cc index 752def64..c5cdf0c 100644 --- a/content/browser/attribution_reporting/attribution_debug_report_unittest.cc +++ b/content/browser/attribution_reporting/attribution_debug_report_unittest.cc
@@ -583,7 +583,7 @@ }, "type": "trigger-event-low-priority" }])json"}, - {EventLevelResult::kDroppedForNoise, + {EventLevelResult::kNeverAttributedSource, /*replaced_event_level_report=*/absl::nullopt, /*new_event_level_report=*/absl::nullopt, /*source=*/SourceBuilder().BuildStored(), CreateReportResult::Limits(),
diff --git a/content/browser/attribution_reporting/attribution_internals_browsertest.cc b/content/browser/attribution_reporting/attribution_internals_browsertest.cc index c425f7a2..8446669 100644 --- a/content/browser/attribution_reporting/attribution_internals_browsertest.cc +++ b/content/browser/attribution_reporting/attribution_internals_browsertest.cc
@@ -142,14 +142,21 @@ static constexpr char kObserveEmptyReportsTableScript[] = R"( const table = document.querySelector('#reportTable') .shadowRoot.querySelector('tbody'); - const obs = new MutationObserver((_, obs) => { + const setTitleIfDone = (_, obs) => { if (table.children.length === 1 && table.children[0].children[0]?.innerText === 'No sent or pending reports.') { - obs.disconnect(); + if (obs) { + obs.disconnect(); + } document.title = $1; + return true; } - }); - obs.observe(table, {childList: true, subtree: true, characterData: true}); + return false; + }; + if (!setTitleIfDone()) { + const obs = new MutationObserver(setTitleIfDone); + obs.observe(table, {childList: true, subtree: true, characterData: true}); + } )"; ASSERT_TRUE( ExecJsInWebUI(JsReplace(kObserveEmptyReportsTableScript, title))); @@ -191,13 +198,20 @@ // results are returned in promises. static constexpr char kScript[] = R"( const status = document.getElementById('feature-status-content'); - const obs = new MutationObserver((_, obs) => { + const setTitleIfDone = (_, obs) => { if (status.innerText.trim() === 'enabled') { - obs.disconnect(); + if (obs) { + obs.disconnect(); + } document.title = $1; + return true; } - }); - obs.observe(status, {childList: true, characterData: true}); + return false; + }; + if (!setTitleIfDone()) { + const obs = new MutationObserver(setTitleIfDone); + obs.observe(status, {childList: true, characterData: true}); + } )"; ASSERT_TRUE(ExecJsInWebUI(JsReplace(kScript, kCompleteTitle))); @@ -224,13 +238,20 @@ // results are returned in promises. static constexpr char kScript[] = R"( const status = document.getElementById('feature-status-content'); - const obs = new MutationObserver((_, obs) => { + const setTitleIfDone = (_, obs) => { if (status.innerText.trim() === 'disabled') { - obs.disconnect(); + if (obs) { + obs.disconnect(); + } document.title = $1; + return true; } - }); - obs.observe(status, {childList: true, characterData: true}); + return false; + }; + if (!setTitleIfDone()) { + const obs = new MutationObserver(setTitleIfDone); + obs.observe(status, {childList: true, characterData: true}); + } )"; ASSERT_TRUE(ExecJsInWebUI(JsReplace(kScript, kCompleteTitle))); @@ -247,14 +268,21 @@ static constexpr char kScript[] = R"( const table = document.querySelector('#sourceTable') .shadowRoot.querySelector('tbody'); - const obs = new MutationObserver((_, obs) => { + const setTitleIfDone = (_, obs) => { if (table.children.length === 1 && table.children[0].children[0]?.innerText === 'No sources.') { - obs.disconnect(); + if (obs) { + obs.disconnect(); + } document.title = $1; + return true; } - }); - obs.observe(table, {childList: true, subtree: true, characterData: true}); + return false; + }; + if (!setTitleIfDone()) { + const obs = new MutationObserver(setTitleIfDone); + obs.observe(table, {childList: true, subtree: true, characterData: true}); + } )"; ASSERT_TRUE(ExecJsInWebUI(JsReplace(kScript, kCompleteTitle))); @@ -329,7 +357,7 @@ .shadowRoot.querySelector('tbody'); const regTable = document.querySelector('#sourceRegistrationTable') .shadowRoot.querySelector('tbody'); - const obs = new MutationObserver((_, obs) => { + const setTitleIfDone = (_, obs) => { if (table.children.length === 4 && regTable.children.length === 5 && table.children[0].children[3]?.children[0]?.children.length === 2 && @@ -368,11 +396,18 @@ regTable.children[3].children[6]?.innerText === 'Rejected: insufficient unique destination capacity' && regTable.children[4].children[5]?.innerText === 'Event' && regTable.children[4].children[6]?.innerText === 'Rejected: excessive reporting origins') { - obs.disconnect(); + if (obs) { + obs.disconnect(); + } document.title = $3; + return true; } - }); - obs.observe(table, {childList: true, subtree: true, characterData: true}); + return false; + }; + if (!setTitleIfDone()) { + const obs = new MutationObserver(setTitleIfDone); + obs.observe(table, {childList: true, subtree: true, characterData: true}); + } )"; ASSERT_TRUE(ExecJsInWebUI( JsReplace(kScript, kMaxUint64String, kMaxInt64String, kCompleteTitle))); @@ -390,7 +425,7 @@ const table = document.querySelector('#osRegistrationTable') .shadowRoot.querySelector('tbody'); - const obs = new MutationObserver((_, obs) => { + const setTitleIfDone = (_, obs) => { if (table.children.length === 1 && table.children[0].children[1]?.innerText === 'OS Source' && table.children[0].children[2]?.innerText === 'https://a.test/' && @@ -398,11 +433,18 @@ table.children[0].children[4]?.innerText === 'false' && table.children[0].children[5]?.innerText === 'false' && table.children[0].children[6]?.innerText === 'Passed to OS') { - obs.disconnect(); + if (obs) { + obs.disconnect(); + } document.title = $1; + return true; } - }); - obs.observe(table, {childList: true, subtree: true, characterData: true}); + return false; + }; + if (!setTitleIfDone()) { + const obs = new MutationObserver(setTitleIfDone); + obs.observe(table, {childList: true, subtree: true, characterData: true}); + } )"; ASSERT_TRUE(ExecJsInWebUI(JsReplace(kScript, kCompleteTitle))); @@ -437,15 +479,22 @@ static constexpr char kScript[] = R"( const reportDelays = document.getElementById('report-delays'); const noise = document.getElementById('noise'); - const obs = new MutationObserver((_, obs) => { + const setTitleIfDone = (_, obs) => { if (reportDelays.innerText === 'enabled' && noise.innerText === 'enabled') { - obs.disconnect(); + if (obs) { + obs.disconnect(); + } document.title = $1; + return true; } - }); - obs.observe(reportDelays, {childList: true, subtree: true, characterData: true}); - obs.observe(noise, {childList: true, subtree: true, characterData: true}); + return false; + }; + if (!setTitleIfDone()) { + const obs = new MutationObserver(setTitleIfDone); + obs.observe(reportDelays, {childList: true, subtree: true, characterData: true}); + obs.observe(noise, {childList: true, subtree: true, characterData: true}); + } )"; ASSERT_TRUE(ExecJsInWebUI(JsReplace(kScript, kCompleteTitle))); @@ -467,15 +516,22 @@ static constexpr char kScript[] = R"( const reportDelays = document.getElementById('report-delays'); const noise = document.getElementById('noise'); - const obs = new MutationObserver((_, obs) => { + const setTitleIfDone = (_, obs) => { if (reportDelays.innerText === 'disabled' && noise.innerText === 'disabled') { - obs.disconnect(); + if (obs) { + obs.disconnect(); + } document.title = $1; + return true; } - }); - obs.observe(reportDelays, {childList: true, subtree: true, characterData: true}); - obs.observe(noise, {childList: true, subtree: true, characterData: true}); + return false; + }; + if (!setTitleIfDone()) { + const obs = new MutationObserver(setTitleIfDone); + obs.observe(reportDelays, {childList: true, subtree: true, characterData: true}); + obs.observe(noise, {childList: true, subtree: true, characterData: true}); + } )"; ASSERT_TRUE(ExecJsInWebUI(JsReplace(kScript, kCompleteTitle))); @@ -1040,7 +1096,7 @@ static constexpr char kScript[] = R"( const table = document.querySelector('#aggregatableReportTable') .shadowRoot.querySelector('tbody'); - const obs = new MutationObserver((_, obs) => { + const setTitleIfDone = (_, obs) => { if (table.children.length === 7 && table.children[0].children[2]?.innerText === 'https://report.test/.well-known/attribution-reporting/report-aggregate-attribution' && @@ -1059,11 +1115,18 @@ 'https://report.test/.well-known/attribution-reporting/debug/report-aggregate-attribution' && table.children[6].children[5]?.innerText === '[ { "key": "0x0", "value": 0 }]' && table.children[6].children[8]?.innerText === 'true') { - obs.disconnect(); + if (obs) { + obs.disconnect(); + } document.title = $1; + return true; } - }); - obs.observe(table, {childList: true, subtree: true, characterData: true}); + return false; + }; + if (!setTitleIfDone()) { + const obs = new MutationObserver(setTitleIfDone); + obs.observe(table, {childList: true, subtree: true, characterData: true}); + } )"; ASSERT_TRUE(ExecJsInWebUI(JsReplace(kScript, kCompleteTitle))); @@ -1138,7 +1201,7 @@ const table = document.querySelector('#triggerTable') .shadowRoot.querySelector('tbody'); - const obs = new MutationObserver((_, obs) => { + const setTitleIfDone = (_, obs) => { if (table.children.length === 2 && table.children[0].children[5]?.innerText === 'Success: Report stored' && table.children[0].children[6]?.innerText === 'Success: Report stored' && @@ -1148,11 +1211,18 @@ table.children[0].children[4]?.innerText === '' && table.children[1].children[4]?.innerText === '123' && table.children[1].children[7]?.innerHTML === expectedVerification) { - obs.disconnect(); + if (obs) { + obs.disconnect(); + } document.title = $1; + return true; } - }); - obs.observe(table, {childList: true, subtree: true, characterData: true}); + return false; + }; + if (!setTitleIfDone()) { + const obs = new MutationObserver(setTitleIfDone); + obs.observe(table, {childList: true, subtree: true, characterData: true}); + } )"; ASSERT_TRUE(ExecJsInWebUI(JsReplace(kScript, kCompleteTitle))); @@ -1221,14 +1291,21 @@ static constexpr char kScript[] = R"( const table = document.querySelector('#aggregatableReportTable') .shadowRoot.querySelector('tbody'); - const obs = new MutationObserver((_, obs) => { + const setTitleIfDone = (_, obs) => { if (table.children.length === 1 && table.children[0].children[0]?.innerText !== 'No sent or pending reports.') { - obs.disconnect(); + if (obs) { + obs.disconnect(); + } document.title = $1; + return true; } - }); - obs.observe(table, {childList: true}); + return false; + }; + if (!setTitleIfDone()) { + const obs = new MutationObserver(setTitleIfDone); + obs.observe(table, {childList: true}); + } )"; ASSERT_TRUE(ExecJsInWebUI(JsReplace(kScript, kCompleteTitle))); @@ -1299,17 +1376,24 @@ const table = document.querySelector('#reportTable') .shadowRoot.querySelector('tbody'); const label = document.querySelector('#show-debug-event-reports span'); - const obs = new MutationObserver((_, obs) => { + const setTitleIfDone = (_, obs) => { if (table.children.length === 2 && table.children[0].children[5]?.innerText === '1' && table.children[1].children[5]?.innerText === '2' && label.innerText === '') { - obs.disconnect(); + if (obs) { + obs.disconnect(); + } document.title = $1; + return true; } - }); - obs.observe(table, {childList: true, subtree: true, characterData: true}); - obs.observe(label, {childList: true, characterData: true}); + return false; + }; + if (!setTitleIfDone()) { + const obs = new MutationObserver(setTitleIfDone); + obs.observe(table, {childList: true, subtree: true, characterData: true}); + obs.observe(label, {childList: true, characterData: true}); + } )"; ASSERT_TRUE(ExecJsInWebUI(JsReplace(kScript, kCompleteTitle))); @@ -1338,16 +1422,23 @@ const table = document.querySelector('#reportTable') .shadowRoot.querySelector('tbody'); const label = document.querySelector('#show-debug-event-reports span'); - const obs = new MutationObserver((_, obs) => { + const setTitleIfDone = (_, obs) => { if (table.children.length === 1 && table.children[0].children[5]?.innerText === '2' && label.innerText === ' (2 hidden)') { - obs.disconnect(); + if (obs) { + obs.disconnect(); + } document.title = $1; + return true; } - }); - obs.observe(table, {childList: true, subtree: true, characterData: true}); - obs.observe(label, {childList: true, characterData: true}); + return false; + }; + if (!setTitleIfDone()) { + const obs = new MutationObserver(setTitleIfDone); + obs.observe(table, {childList: true, subtree: true, characterData: true}); + obs.observe(label, {childList: true, characterData: true}); + } )"; ASSERT_TRUE(ExecJsInWebUI(JsReplace(kScript, kCompleteTitle2))); @@ -1367,18 +1458,25 @@ const table = document.querySelector('#reportTable').shadowRoot .querySelector('tbody'); const label = document.querySelector('#show-debug-event-reports span'); - const obs = new MutationObserver((_, obs) => { + const setTitleIfDone = (_, obs) => { if (table.children.length === 3 && table.children[0].children[5]?.innerText === '1' && table.children[1].children[5]?.innerText === '2' && table.children[2].children[5]?.innerText === '3' && label.innerText === '') { - obs.disconnect(); + if (obs) { + obs.disconnect(); + } document.title = $1; + return true; } - }); - obs.observe(table, {childList: true, subtree: true, characterData: true}); - obs.observe(label, {childList: true, characterData: true}); + return false; + }; + if (!setTitleIfDone()) { + const obs = new MutationObserver(setTitleIfDone); + obs.observe(table, {childList: true, subtree: true, characterData: true}); + obs.observe(label, {childList: true, characterData: true}); + } )"; ASSERT_TRUE(ExecJsInWebUI(JsReplace(kScript, kCompleteTitle3))); @@ -1405,17 +1503,24 @@ const url = 'https://report.test/.well-known/attribution-reporting/debug/verbose'; - const obs = new MutationObserver((_, obs) => { + const setTitleIfDone = (_, obs) => { if (table.children.length === 1 && table.children[0].children[1]?.innerText === url && table.children[0].children[2]?.innerText === 'HTTP 200' && table.children[0].children[3]?.innerText.includes('source-unknown-error') ) { - obs.disconnect(); + if (obs) { + obs.disconnect(); + } document.title = $1; + return true; } - }); - obs.observe(table, {childList: true, subtree: true, characterData: true}); + return false; + }; + if (!setTitleIfDone()) { + const obs = new MutationObserver(setTitleIfDone); + obs.observe(table, {childList: true, subtree: true, characterData: true}); + } )"; ASSERT_TRUE(ExecJsInWebUI(JsReplace(kScript, kCompleteTitle)));
diff --git a/content/browser/attribution_reporting/attribution_internals_handler_impl.cc b/content/browser/attribution_reporting/attribution_internals_handler_impl.cc index fae6d6c..7e9b2958 100644 --- a/content/browser/attribution_reporting/attribution_internals_handler_impl.cc +++ b/content/browser/attribution_reporting/attribution_internals_handler_impl.cc
@@ -443,7 +443,7 @@ return WebUITriggerStatus::kExcessiveAttributions; case EventLevelStatus::kPriorityTooLow: return WebUITriggerStatus::kLowPriority; - case EventLevelStatus::kDroppedForNoise: + case EventLevelStatus::kNeverAttributedSource: case EventLevelStatus::kFalselyAttributedSource: return WebUITriggerStatus::kNoised; case EventLevelStatus::kExcessiveReportingOrigins:
diff --git a/content/browser/attribution_reporting/attribution_interop_parser.cc b/content/browser/attribution_reporting/attribution_interop_parser.cc index a7372e2..a046f03 100644 --- a/content/browser/attribution_reporting/attribution_interop_parser.cc +++ b/content/browser/attribution_reporting/attribution_interop_parser.cc
@@ -197,12 +197,6 @@ ParseInt(dict, "max_event_level_reports_per_destination", config.event_level_limit.max_reports_per_destination, required); - ParseInt(dict, "max_attributions_per_navigation_source", - config.event_level_limit.max_attributions_per_navigation_source, - required); - ParseInt(dict, "max_attributions_per_event_source", - config.event_level_limit.max_attributions_per_event_source, - required); ParseUint64( dict, "navigation_source_trigger_data_cardinality", config.event_level_limit.navigation_source_trigger_data_cardinality,
diff --git a/content/browser/attribution_reporting/attribution_interop_parser_unittest.cc b/content/browser/attribution_reporting/attribution_interop_parser_unittest.cc index e9390a2..957bc9f 100644 --- a/content/browser/attribution_reporting/attribution_interop_parser_unittest.cc +++ b/content/browser/attribution_reporting/attribution_interop_parser_unittest.cc
@@ -45,8 +45,6 @@ config.navigation_source_trigger_data_cardinality, config.event_source_trigger_data_cardinality, config.randomized_response_epsilon, config.max_reports_per_destination, - config.max_attributions_per_navigation_source, - config.max_attributions_per_event_source, config.first_navigation_report_window_deadline, config.second_navigation_report_window_deadline, config.first_event_report_window_deadline, @@ -577,20 +575,6 @@ e.max_reports_per_destination = 10; }); })}, - {R"json({"max_attributions_per_navigation_source":"10"})json", false, - AttributionConfigWith([](AttributionConfig& c) { - c.event_level_limit = - EventLevelLimitWith([](AttributionConfig::EventLevelLimit& e) { - e.max_attributions_per_navigation_source = 10; - }); - })}, - {R"json({"max_attributions_per_event_source":"10"})json", false, - AttributionConfigWith([](AttributionConfig& c) { - c.event_level_limit = - EventLevelLimitWith([](AttributionConfig::EventLevelLimit& e) { - e.max_attributions_per_event_source = 10; - }); - })}, {R"json({"max_navigation_info_gain":"0.2"})json", false, AttributionConfigWith([](AttributionConfig& c) { c.event_level_limit = @@ -649,8 +633,6 @@ "event_source_trigger_data_cardinality":"10", "randomized_response_epsilon":"0.2", "max_event_level_reports_per_destination":"10", - "max_attributions_per_navigation_source":"5", - "max_attributions_per_event_source":"1", "max_navigation_info_gain":"5.5", "max_event_info_gain":"0.5", "max_aggregatable_reports_per_destination":"10", @@ -676,8 +658,6 @@ e.event_source_trigger_data_cardinality = 10; e.randomized_response_epsilon = 0.2; e.max_reports_per_destination = 10; - e.max_attributions_per_navigation_source = 5; - e.max_attributions_per_event_source = 1; e.max_navigation_info_gain = 5.5; e.max_event_info_gain = 0.5; }); @@ -723,8 +703,6 @@ "navigation_source_trigger_data_cardinality", "event_source_trigger_data_cardinality", "max_event_level_reports_per_destination", - "max_attributions_per_navigation_source", - "max_attributions_per_event_source", "max_aggregatable_reports_per_destination", "aggregatable_budget_per_source", };
diff --git a/content/browser/attribution_reporting/attribution_interop_runner.cc b/content/browser/attribution_reporting/attribution_interop_runner.cc index 69f1e6d..2c89618 100644 --- a/content/browser/attribution_reporting/attribution_interop_runner.cc +++ b/content/browser/attribution_reporting/attribution_interop_runner.cc
@@ -274,8 +274,8 @@ } if (event.source_type.has_value()) { - auto registration = - attribution_reporting::SourceRegistration::Parse(std::move(*dict)); + auto registration = attribution_reporting::SourceRegistration::Parse( + std::move(*dict), *event.source_type); if (!registration.has_value()) { AddUnparsableRegistration(event); return;
diff --git a/content/browser/attribution_reporting/attribution_manager_impl_unittest.cc b/content/browser/attribution_reporting/attribution_manager_impl_unittest.cc index 5a367f0..c29a5be6 100644 --- a/content/browser/attribution_reporting/attribution_manager_impl_unittest.cc +++ b/content/browser/attribution_reporting/attribution_manager_impl_unittest.cc
@@ -292,7 +292,6 @@ auto storage_delegate = std::make_unique<ConfigurableStorageDelegate>(); storage_delegate->set_report_delay(kFirstReportingWindow); - storage_delegate->set_max_attributions_per_source(3); storage_delegate->set_offline_report_delay_config( kDefaultOfflineReportDelay); @@ -916,12 +915,14 @@ kSuccessDroppedLowerPriority)))); } - attribution_manager_->HandleSource( - SourceBuilder().SetExpiry(kImpressionExpiry).Build(), kFrameId); + attribution_manager_->HandleSource(SourceBuilder() + .SetExpiry(kImpressionExpiry) + .SetMaxEventLevelReports(3) + .Build(), + kFrameId); EXPECT_THAT(StoredSources(), SizeIs(1)); - // `kNavigation` sources can have 3 reports, so none of these should result in - // a dropped report. + // Store the maximum number of reports. for (int i = 1; i <= 3; i++) { attribution_manager_->HandleTrigger(TriggerBuilder().SetPriority(i).Build(), kFrameId); @@ -1547,6 +1548,7 @@ attribution_manager_->HandleSource(TestAggregatableSourceProvider() .GetBuilder() + .SetMaxEventLevelReports(3) .SetExpiry(kImpressionExpiry) .Build(), kFrameId);
diff --git a/content/browser/attribution_reporting/attribution_storage_delegate.cc b/content/browser/attribution_reporting/attribution_storage_delegate.cc index 25156c7..6243edf 100644 --- a/content/browser/attribution_reporting/attribution_storage_delegate.cc +++ b/content/browser/attribution_reporting/attribution_storage_delegate.cc
@@ -57,17 +57,6 @@ AttributionStorageDelegate::~AttributionStorageDelegate() = default; -int AttributionStorageDelegate::GetDefaultAttributionsPerSource( - SourceType source_type) const { - DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); - switch (source_type) { - case SourceType::kNavigation: - return config_.event_level_limit.max_attributions_per_navigation_source; - case SourceType::kEvent: - return config_.event_level_limit.max_attributions_per_event_source; - } -} - int AttributionStorageDelegate::GetMaxSourcesPerOrigin() const { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); return config_.max_sources_per_origin;
diff --git a/content/browser/attribution_reporting/attribution_storage_delegate.h b/content/browser/attribution_reporting/attribution_storage_delegate.h index c2cafeb..d25d3ef 100644 --- a/content/browser/attribution_reporting/attribution_storage_delegate.h +++ b/content/browser/attribution_reporting/attribution_storage_delegate.h
@@ -112,14 +112,6 @@ virtual base::Time GetAggregatableReportTime( base::Time trigger_time) const = 0; - // This limit is used to determine if a source is allowed to schedule - // a new report. When a source reaches this limit it is - // marked inactive and no new reports will be created for it. - // Sources will be checked against this limit after they schedule a new - // report. - int GetDefaultAttributionsPerSource( - attribution_reporting::mojom::SourceType) const; - // These limits are designed solely to avoid excessive disk / memory usage. // In particular, they do not correspond with any privacy parameters. //
diff --git a/content/browser/attribution_reporting/attribution_storage_delegate_impl_unittest.cc b/content/browser/attribution_reporting/attribution_storage_delegate_impl_unittest.cc index 05d6cf3..15c4aaf4 100644 --- a/content/browser/attribution_reporting/attribution_storage_delegate_impl_unittest.cc +++ b/content/browser/attribution_reporting/attribution_storage_delegate_impl_unittest.cc
@@ -989,12 +989,5 @@ IsEmpty()); } -TEST(AttributionStorageDelegateImplTest, GetMaxAttributionsPerSource) { - EXPECT_EQ(1, AttributionStorageDelegateImpl().GetDefaultAttributionsPerSource( - SourceType::kEvent)); - EXPECT_EQ(3, AttributionStorageDelegateImpl().GetDefaultAttributionsPerSource( - SourceType::kNavigation)); -} - } // namespace } // namespace content
diff --git a/content/browser/attribution_reporting/attribution_storage_sql.cc b/content/browser/attribution_reporting/attribution_storage_sql.cc index c5daf655..5faeef7 100644 --- a/content/browser/attribution_reporting/attribution_storage_sql.cc +++ b/content/browser/attribution_reporting/attribution_storage_sql.cc
@@ -877,13 +877,10 @@ reg.aggregatable_report_window, source_time), expiry_time); - int max_event_level_reports = reg.max_event_level_reports.value_or( - delegate_->GetDefaultAttributionsPerSource(common_info.source_type())); - ASSIGN_OR_RETURN(const auto randomized_response_data, delegate_->GetRandomizedResponse( common_info.source_type(), event_report_windows, - max_event_level_reports, source_time), + reg.max_event_level_reports, source_time), [](auto) { return StoreSourceResult( StorableSource::Result::kExceedsMaxChannelCapacity); @@ -937,7 +934,7 @@ statement.BindBlob(14, SerializeAggregationKeys(reg.aggregation_keys)); statement.BindBlob(15, SerializeFilterData(reg.filter_data)); statement.BindBlob(16, SerializeReadOnlySourceData( - event_report_windows, max_event_level_reports, + event_report_windows, reg.max_event_level_reports, randomized_response_data.rate())); if (!statement.Run()) { @@ -963,9 +960,9 @@ const StoredSource stored_source( source.common_info(), reg.source_event_id, reg.destination_set, source_time, expiry_time, std::move(event_report_windows), - aggregatable_report_window_time, max_event_level_reports, reg.priority, - reg.filter_data, reg.debug_key, reg.aggregation_keys, attribution_logic, - *active_state, source_id, + aggregatable_report_window_time, reg.max_event_level_reports, + reg.priority, reg.filter_data, reg.debug_key, reg.aggregation_keys, + attribution_logic, *active_state, source_id, /*aggregatable_budget_consumed=*/0, randomized_response_data.rate()); if (!rate_limit_table_.AddRateLimitForSource(&db_, stored_source)) { @@ -1443,7 +1440,7 @@ // clean sources. if (!IsSuccessResult(store_event_level_status) && !IsSuccessResult(store_aggregatable_status) && - store_event_level_status != EventLevelResult::kDroppedForNoise) { + store_event_level_status != EventLevelResult::kNeverAttributedSource) { if (!transaction.Commit()) { return assemble_report_result(EventLevelResult::kInternalError, AggregatableResult::kInternalError); @@ -1476,7 +1473,7 @@ // |RateLimitTable::ClearDataForSourceIds()| here. // Reports which are dropped do not need to make any further changes. - if (store_event_level_status == EventLevelResult::kDroppedForNoise && + if (store_event_level_status == EventLevelResult::kNeverAttributedSource && !IsSuccessResult(store_aggregatable_status)) { if (!transaction.Commit()) { return assemble_report_result(EventLevelResult::kInternalError, @@ -1722,7 +1719,7 @@ } if (!create_report) { - return EventLevelResult::kDroppedForNoise; + return EventLevelResult::kNeverAttributedSource; } return maybe_replace_lower_priority_report_result ==
diff --git a/content/browser/attribution_reporting/attribution_storage_unittest.cc b/content/browser/attribution_reporting/attribution_storage_unittest.cc index 79a1efa..6796b9f 100644 --- a/content/browser/attribution_reporting/attribution_storage_unittest.cc +++ b/content/browser/attribution_reporting/attribution_storage_unittest.cc
@@ -354,27 +354,6 @@ } TEST_F(AttributionStorageTest, - ImpressionWithDefaultMaxConversions_ConversionReportNotStored) { - delegate()->set_max_attributions_per_source(kMaxConversions); - - storage()->StoreSource(SourceBuilder().Build()); - - for (int i = 0; i < kMaxConversions; i++) { - EXPECT_EQ(AttributionTrigger::EventLevelResult::kSuccess, - MaybeCreateAndStoreEventLevelReport(DefaultTrigger())); - } - - // No additional conversion reports should be created. - EXPECT_THAT(storage()->MaybeCreateAndStoreReport( - TriggerBuilder().SetTriggerData(20).Build()), - AllOf(CreateReportEventLevelStatusIs( - AttributionTrigger::EventLevelResult::kPriorityTooLow), - ReplacedEventLevelReportIs(absl::nullopt), - DroppedEventLevelReportIs( - Optional(EventLevelDataIs(TriggerDataIs(20u)))))); -} - -TEST_F(AttributionStorageTest, ImpressionWithSetMaxConversions_ConversionReportStored) { storage()->StoreSource( SourceBuilder().SetMaxEventLevelReports(kMaxConversions + 1).Build()); @@ -529,13 +508,12 @@ TEST_F(AttributionStorageTest, ManyImpressionsWithManyConversions_OneImpressionAttributed) { - delegate()->set_max_attributions_per_source(kMaxConversions); - const int kNumMultiTouchImpressions = 20; // Store a large, arbitrary number of impressions. for (int i = 0; i < kNumMultiTouchImpressions; i++) { - storage()->StoreSource(SourceBuilder().Build()); + storage()->StoreSource( + SourceBuilder().SetMaxEventLevelReports(kMaxConversions).Build()); } for (int i = 0; i < kMaxConversions; i++) { @@ -829,19 +807,24 @@ TEST_F(AttributionStorageTest, MaxImpressionsPerOrigin_LimitsStorage) { delegate()->set_max_sources_per_origin(2); - delegate()->set_max_attributions_per_source(1); base::HistogramTester histograms; ASSERT_EQ(storage() - ->StoreSource( - SourceBuilder().SetSourceEventId(3).SetPriority(1).Build()) + ->StoreSource(SourceBuilder() + .SetSourceEventId(3) + .SetPriority(1) + .SetMaxEventLevelReports(1) + .Build()) .status, StorableSource::Result::kSuccess); ASSERT_EQ(storage() - ->StoreSource( - SourceBuilder().SetSourceEventId(5).SetPriority(2).Build()) + ->StoreSource(SourceBuilder() + .SetSourceEventId(5) + .SetPriority(2) + .SetMaxEventLevelReports(1) + .Build()) .status, StorableSource::Result::kSuccess); @@ -854,12 +837,18 @@ // There's still room for this source, as the limit applies only to active // sources. ASSERT_EQ(storage() - ->StoreSource(SourceBuilder().SetSourceEventId(6).Build()) + ->StoreSource(SourceBuilder() + .SetSourceEventId(6) + .SetMaxEventLevelReports(1) + .Build()) .status, StorableSource::Result::kSuccess); ASSERT_EQ(storage() - ->StoreSource(SourceBuilder().SetSourceEventId(7).Build()) + ->StoreSource(SourceBuilder() + .SetSourceEventId(7) + .SetMaxEventLevelReports(1) + .Build()) .status, StorableSource::Result::kInsufficientSourceCapacity); @@ -1296,11 +1285,6 @@ } TEST_F(AttributionStorageTest, MaxAttributionsBetweenSites) { - // TODO(linnan): This should be irrelevant to this test, but isn't due to - // `GetExpectedAggregatableReport()` inspecting the max_event_level_reports - // field of the source, which is not relevant to this test. - delegate()->set_max_attributions_per_source(kMaxConversions); - delegate()->set_rate_limits( RateLimitWith([](AttributionConfig::RateLimitConfig& r) { r.time_window = base::TimeDelta::Max(); @@ -1347,7 +1331,6 @@ DroppedEventLevelReportIs(absl::nullopt))); const auto source = source_builder.SetAggregatableBudgetConsumed(5) - .SetMaxEventLevelReports(3) .BuildStored(); auto contributions = DefaultAggregatableHistogramContributions(/*histogram_values=*/{5}); @@ -1385,8 +1368,6 @@ TEST_F(AttributionStorageTest, NeverAttributeImpression_EventLevelReportNotStored) { - delegate()->set_max_attributions_per_source(1); - delegate()->set_randomized_response( std::vector<AttributionStorageDelegate::FakeReport>{}); StoreSourceResult result = storage()->StoreSource( @@ -1394,12 +1375,13 @@ EXPECT_EQ(result.status, StorableSource::Result::kSuccessNoised); delegate()->set_randomized_response(absl::nullopt); - EXPECT_THAT(storage()->MaybeCreateAndStoreReport( - DefaultAggregatableTriggerBuilder().Build()), - AllOf(CreateReportEventLevelStatusIs( - AttributionTrigger::EventLevelResult::kDroppedForNoise), - CreateReportAggregatableStatusIs( - AttributionTrigger::AggregatableResult::kSuccess))); + EXPECT_THAT( + storage()->MaybeCreateAndStoreReport( + DefaultAggregatableTriggerBuilder().Build()), + AllOf(CreateReportEventLevelStatusIs( + AttributionTrigger::EventLevelResult::kNeverAttributedSource), + CreateReportAggregatableStatusIs( + AttributionTrigger::AggregatableResult::kSuccess))); EXPECT_THAT(storage()->GetAttributionReports(base::Time::Max()), ElementsAre(AggregatableAttributionDataIs( @@ -1494,11 +1476,6 @@ TEST_F(AttributionStorageTest, NeverAttributeSource_AggregatableReportStoredAndRateLimitsChanged) { - // TODO(linnan): This should be irrelevant to this test, but isn't due to - // `GetExpectedAggregatableReport()` inspecting the max_event_level_reports - // field of the source, which is not relevant to this test. - delegate()->set_max_attributions_per_source(kMaxConversions); - delegate()->set_rate_limits( RateLimitWith([](AttributionConfig::RateLimitConfig& r) { r.time_window = base::TimeDelta::Max(); @@ -1529,7 +1506,6 @@ .SetAttributionLogic(StoredSource::AttributionLogic::kNever) .SetPriority(0) .SetAggregatableBudgetConsumed(1) - .SetMaxEventLevelReports(3) .BuildStored(), DefaultAggregatableHistogramContributions(), trigger); @@ -1553,17 +1529,19 @@ const auto conversion = DefaultAggregatableTriggerBuilder().Build(); - EXPECT_THAT(storage()->MaybeCreateAndStoreReport(conversion), - AllOf(CreateReportEventLevelStatusIs( - AttributionTrigger::EventLevelResult::kDroppedForNoise), - CreateReportAggregatableStatusIs( - AttributionTrigger::AggregatableResult::kSuccess))); + EXPECT_THAT( + storage()->MaybeCreateAndStoreReport(conversion), + AllOf(CreateReportEventLevelStatusIs( + AttributionTrigger::EventLevelResult::kNeverAttributedSource), + CreateReportAggregatableStatusIs( + AttributionTrigger::AggregatableResult::kSuccess))); - EXPECT_THAT(storage()->MaybeCreateAndStoreReport(conversion), - AllOf(CreateReportEventLevelStatusIs( - AttributionTrigger::EventLevelResult::kDroppedForNoise), - CreateReportAggregatableStatusIs( - AttributionTrigger::AggregatableResult::kSuccess))); + EXPECT_THAT( + storage()->MaybeCreateAndStoreReport(conversion), + AllOf(CreateReportEventLevelStatusIs( + AttributionTrigger::EventLevelResult::kNeverAttributedSource), + CreateReportAggregatableStatusIs( + AttributionTrigger::AggregatableResult::kSuccess))); auto contributions = DefaultAggregatableHistogramContributions(); EXPECT_THAT( @@ -1913,7 +1891,6 @@ } TEST_F(AttributionStorageTest, FalselyAttributeImpression_ReportStored) { - delegate()->set_max_attributions_per_source(1); delegate()->set_rate_limits( RateLimitWith([](AttributionConfig::RateLimitConfig& r) { r.time_window = base::TimeDelta::Max(); @@ -1930,7 +1907,8 @@ SourceBuilder builder = TestAggregatableSourceProvider().GetBuilder(); builder.SetSourceEventId(4) .SetSourceType(SourceType::kEvent) - .SetPriority(100); + .SetPriority(100) + .SetMaxEventLevelReports(1); delegate()->set_randomized_response( std::vector<AttributionStorageDelegate::FakeReport>{ {.trigger_data = 7, @@ -2053,12 +2031,16 @@ } TEST_F(AttributionStorageTest, TriggerPriority) { - delegate()->set_max_attributions_per_source(1); - - storage()->StoreSource( - SourceBuilder().SetSourceEventId(3).SetPriority(0).Build()); - storage()->StoreSource( - SourceBuilder().SetSourceEventId(5).SetPriority(1).Build()); + storage()->StoreSource(SourceBuilder() + .SetSourceEventId(3) + .SetPriority(0) + .SetMaxEventLevelReports(1) + .Build()); + storage()->StoreSource(SourceBuilder() + .SetSourceEventId(5) + .SetPriority(1) + .SetMaxEventLevelReports(1) + .Build()); EXPECT_THAT(storage()->MaybeCreateAndStoreReport( TriggerBuilder().SetPriority(0).SetTriggerData(20).Build()), @@ -2080,8 +2062,11 @@ CreateReportSourceIs(Optional(SourceEventIdIs(5u))), DroppedEventLevelReportIs(absl::nullopt))); - storage()->StoreSource( - SourceBuilder().SetSourceEventId(7).SetPriority(2).Build()); + storage()->StoreSource(SourceBuilder() + .SetSourceEventId(7) + .SetPriority(2) + .SetMaxEventLevelReports(1) + .Build()); EXPECT_EQ(AttributionTrigger::EventLevelResult::kSuccess, MaybeCreateAndStoreEventLevelReport( @@ -2105,9 +2090,7 @@ } TEST_F(AttributionStorageTest, TriggerPriority_Simple) { - delegate()->set_max_attributions_per_source(1); - - storage()->StoreSource(SourceBuilder().Build()); + storage()->StoreSource(SourceBuilder().SetMaxEventLevelReports(1).Build()); int i = 0; EXPECT_EQ(AttributionTrigger::EventLevelResult::kSuccess, @@ -2127,9 +2110,7 @@ } TEST_F(AttributionStorageTest, TriggerPriority_SamePriorityDeletesMostRecent) { - delegate()->set_max_attributions_per_source(2); - - storage()->StoreSource(SourceBuilder().Build()); + storage()->StoreSource(SourceBuilder().SetMaxEventLevelReports(2).Build()); EXPECT_EQ(AttributionTrigger::EventLevelResult::kSuccess, MaybeCreateAndStoreEventLevelReport( @@ -2160,12 +2141,16 @@ } TEST_F(AttributionStorageTest, TriggerPriority_DeactivatesImpression) { - delegate()->set_max_attributions_per_source(1); - - storage()->StoreSource( - SourceBuilder().SetSourceEventId(3).SetPriority(0).Build()); - storage()->StoreSource( - SourceBuilder().SetSourceEventId(5).SetPriority(1).Build()); + storage()->StoreSource(SourceBuilder() + .SetSourceEventId(3) + .SetPriority(0) + .SetMaxEventLevelReports(1) + .Build()); + storage()->StoreSource(SourceBuilder() + .SetSourceEventId(5) + .SetPriority(1) + .SetMaxEventLevelReports(1) + .Build()); EXPECT_THAT(storage()->GetActiveSources(), SizeIs(2)); EXPECT_EQ(AttributionTrigger::EventLevelResult::kSuccess, @@ -2771,9 +2756,8 @@ TEST_F(AttributionStorageTest, MaybeCreateAndStoreEventLevelReport_ReturnsDeactivatedSources) { - delegate()->set_max_attributions_per_source(kMaxConversions); - - storage()->StoreSource(SourceBuilder().Build()); + storage()->StoreSource( + SourceBuilder().SetMaxEventLevelReports(kMaxConversions).Build()); EXPECT_THAT(storage()->GetActiveSources(), SizeIs(1)); // Store the maximum number of reports for the source. @@ -3297,11 +3281,12 @@ // Will return minimum of next event-level report and next aggregatable report // time if both present. TEST_F(AttributionStorageTest, GetNextReportTime) { - delegate()->set_max_attributions_per_source(1); - EXPECT_EQ(storage()->GetNextReportTime(base::Time::Min()), absl::nullopt); - storage()->StoreSource(TestAggregatableSourceProvider().GetBuilder().Build()); + storage()->StoreSource(TestAggregatableSourceProvider() + .GetBuilder() + .SetMaxEventLevelReports(1) + .Build()); EXPECT_EQ(AttributionTrigger::EventLevelResult::kSuccess, MaybeCreateAndStoreEventLevelReport(DefaultTrigger())); @@ -3325,7 +3310,7 @@ task_environment_.FastForwardBy(base::Milliseconds(1)); - storage()->StoreSource(SourceBuilder().Build()); + storage()->StoreSource(SourceBuilder().SetMaxEventLevelReports(1).Build()); EXPECT_EQ(AttributionTrigger::EventLevelResult::kSuccess, MaybeCreateAndStoreEventLevelReport(DefaultTrigger())); @@ -3677,11 +3662,6 @@ } TEST_F(AttributionStorageTest, AggregatableAttribution_ReportsScheduled) { - // TODO(linnan): This should be irrelevant to this test, but isn't due to - // `GetExpectedAggregatableReport()` inspecting the max_event_level_reports - // field of the source, which is not relevant to this test. - delegate()->set_max_attributions_per_source(kMaxConversions); - auto source_builder = TestAggregatableSourceProvider().GetBuilder(); storage()->StoreSource(source_builder.Build()); @@ -3703,7 +3683,6 @@ AggregatableHistogramContributionsAre(contributions)))))); const auto source = source_builder.SetAggregatableBudgetConsumed(5) - .SetMaxEventLevelReports(3) .BuildStored(); auto expected_aggregatable_report = GetExpectedAggregatableReport(source, std::move(contributions), trigger); @@ -3718,9 +3697,10 @@ TEST_F( AttributionStorageTest, MaybeCreateAndStoreAggregatableReport_reachedEventLevelAttributionLimit) { - delegate()->set_max_attributions_per_source(kMaxConversions); - - storage()->StoreSource(TestAggregatableSourceProvider().GetBuilder().Build()); + storage()->StoreSource(TestAggregatableSourceProvider() + .GetBuilder() + .SetMaxEventLevelReports(kMaxConversions) + .Build()); EXPECT_THAT(storage()->GetActiveSources(), SizeIs(1)); // Store the maximum number of reports for the source. @@ -3940,11 +3920,6 @@ } TEST_F(AttributionStorageTest, BothRealAndNullAggregatableReports) { - // TODO(linnan): This should be irrelevant to this test, but isn't due to - // `GetExpectedAggregatableReport()` inspecting the max_event_level_reports - // field of the source, which is not relevant to this test. - delegate()->set_max_attributions_per_source(kMaxConversions); - base::Time now = base::Time::Now(); SourceBuilder builder = TestAggregatableSourceProvider().GetBuilder(now); @@ -3975,7 +3950,6 @@ const AttributionReport expected_aggregatable_report = GetExpectedAggregatableReport(builder.SetAggregatableBudgetConsumed(1) - .SetMaxEventLevelReports(3) .BuildStored(), DefaultAggregatableHistogramContributions(), trigger);
diff --git a/content/browser/attribution_reporting/attribution_test_utils.cc b/content/browser/attribution_reporting/attribution_test_utils.cc index bc4eb41..5b948eb7 100644 --- a/content/browser/attribution_reporting/attribution_test_utils.cc +++ b/content/browser/attribution_reporting/attribution_test_utils.cc
@@ -125,7 +125,9 @@ source_origin_(*SuitableOrigin::Deserialize(kDefaultSourceOrigin)), destination_sites_(*attribution_reporting::DestinationSet::Create( {net::SchemefulSite::Deserialize(kDefaultDestinationOrigin)})), - reporting_origin_(*SuitableOrigin::Deserialize(kDefaultReportOrigin)) {} + reporting_origin_(*SuitableOrigin::Deserialize(kDefaultReportOrigin)), + max_event_level_reports_( + attribution_reporting::kMaxSettableEventLevelAttributions) {} SourceBuilder::~SourceBuilder() = default; @@ -291,10 +293,8 @@ ComputeReportWindowTime(GetReportWindowTimeForTesting( aggregatable_report_window_, source_time_), expiry_time), - max_event_level_reports_.value_or( - attribution_reporting::kMaxSettableEventLevelAttributions), - priority_, filter_data_, debug_key_, aggregation_keys_, - attribution_logic_, active_state_, source_id_, + max_event_level_reports_, priority_, filter_data_, debug_key_, + aggregation_keys_, attribution_logic_, active_state_, source_id_, aggregatable_budget_consumed_, randomized_response_rate_); source.SetDedupKeys(dedup_keys_); source.SetAggregatableDedupKeys(aggregatable_dedup_keys_); @@ -699,8 +699,8 @@ return out << "excessiveAttributions"; case AttributionTrigger::EventLevelResult::kPriorityTooLow: return out << "priorityTooLow"; - case AttributionTrigger::EventLevelResult::kDroppedForNoise: - return out << "noised"; + case AttributionTrigger::EventLevelResult::kNeverAttributedSource: + return out << "neverAttributedSource"; case AttributionTrigger::EventLevelResult::kExcessiveReportingOrigins: return out << "excessiveReportingOrigins"; case AttributionTrigger::EventLevelResult::kNoMatchingSourceFilterData:
diff --git a/content/browser/attribution_reporting/attribution_test_utils.h b/content/browser/attribution_reporting/attribution_test_utils.h index e2c7fbd8..03b56039 100644 --- a/content/browser/attribution_reporting/attribution_test_utils.h +++ b/content/browser/attribution_reporting/attribution_test_utils.h
@@ -176,7 +176,7 @@ std::vector<uint64_t> aggregatable_dedup_keys_; absl::optional<attribution_reporting::EventReportWindows> event_report_windows_ = absl::nullopt; - absl::optional<int> max_event_level_reports_ = absl::nullopt; + int max_event_level_reports_; bool is_within_fenced_frame_ = false; bool debug_reporting_ = false; };
diff --git a/content/browser/attribution_reporting/attribution_trigger.h b/content/browser/attribution_reporting/attribution_trigger.h index 90b8aaa..bfaa563 100644 --- a/content/browser/attribution_reporting/attribution_trigger.h +++ b/content/browser/attribution_reporting/attribution_trigger.h
@@ -34,7 +34,8 @@ kDeduplicated = 5, kExcessiveAttributions = 6, kPriorityTooLow = 7, - kDroppedForNoise = 8, + // Equivalent to the "noised" trigger result described in the spec. + kNeverAttributedSource = 8, kExcessiveReportingOrigins = 9, kNoMatchingSourceFilterData = 10, kProhibitedByBrowserPolicy = 11,
diff --git a/content/browser/attribution_reporting/test/configurable_storage_delegate.cc b/content/browser/attribution_reporting/test/configurable_storage_delegate.cc index 778da92..7d7a0a4 100644 --- a/content/browser/attribution_reporting/test/configurable_storage_delegate.cc +++ b/content/browser/attribution_reporting/test/configurable_storage_delegate.cc
@@ -55,10 +55,6 @@ std::numeric_limits<double>::infinity(); e.max_reports_per_destination = std::numeric_limits<int>::max(); - e.max_attributions_per_navigation_source = - std::numeric_limits<int>::max(); - e.max_attributions_per_event_source = - std::numeric_limits<int>::max(); }); c.aggregate_limit = AggregateLimitWith([](AttributionConfig::AggregateLimit& a) { @@ -187,12 +183,6 @@ base::Seconds(0), {last_report_window}); } -void ConfigurableStorageDelegate::set_max_attributions_per_source(int max) { - DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); - config_.event_level_limit.max_attributions_per_navigation_source = max; - config_.event_level_limit.max_attributions_per_event_source = max; -} - void ConfigurableStorageDelegate::set_max_sources_per_origin(int max) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); config_.max_sources_per_origin = max;
diff --git a/content/browser/attribution_reporting/test/configurable_storage_delegate.h b/content/browser/attribution_reporting/test/configurable_storage_delegate.h index cfa8e6f8..1965e4b 100644 --- a/content/browser/attribution_reporting/test/configurable_storage_delegate.h +++ b/content/browser/attribution_reporting/test/configurable_storage_delegate.h
@@ -60,8 +60,6 @@ attribution_reporting::mojom::SourceType source_type, base::TimeDelta last_report_window) const override; - void set_max_attributions_per_source(int max); - void set_max_sources_per_origin(int max); void set_max_reports_per_destination(AttributionReport::Type, int max);
diff --git a/content/browser/cookie_deprecation_label/cookie_deprecation_label_browsertest.cc b/content/browser/cookie_deprecation_label/cookie_deprecation_label_browsertest.cc index 176b320..c1798d8 100644 --- a/content/browser/cookie_deprecation_label/cookie_deprecation_label_browsertest.cc +++ b/content/browser/cookie_deprecation_label/cookie_deprecation_label_browsertest.cc
@@ -483,7 +483,7 @@ } IN_PROC_BROWSER_TEST_F(CookieDeprecationLabelEnabledBrowserTest, - NotAllowed_LabelError) { + NotAllowed_EmptyLabelReturned) { MockCookieDeprecationLabelContentBrowserClientBase< ContentBrowserTestContentBrowserClient> browser_client; @@ -496,9 +496,9 @@ EXPECT_TRUE( NavigateToURL(shell(), https_server->GetURL("a.test", "/hello.html"))); EXPECT_EQ(EvalJs(shell(), R"((async () => { - return await navigator.cookieDeprecationLabel.getValue() - .catch(() => 'error'); })())"), - "error"); + return await navigator.cookieDeprecationLabel.getValue(); + })())"), + ""); } IN_PROC_BROWSER_TEST_F(CookieDeprecationLabelEnabledBrowserTest, @@ -521,7 +521,7 @@ } IN_PROC_BROWSER_TEST_F(CookieDeprecationLabelEnabledBrowserTest, - Incognito_LabelError) { + Incognito_EmptyLabelReturned) { auto https_server = CreateTestServer(EmbeddedTestServer::TYPE_HTTPS); ASSERT_TRUE(https_server->Start()); @@ -530,9 +530,9 @@ EXPECT_TRUE(NavigateToURL(incognito_shell, https_server->GetURL("a.test", "/hello.html"))); EXPECT_EQ(EvalJs(incognito_shell, R"((async () => { - return await navigator.cookieDeprecationLabel.getValue() - .catch(() => 'error'); })())"), - "error"); + return await navigator.cookieDeprecationLabel.getValue(); + })())"), + ""); } class CookieDeprecationLabelEnabledEmptyLabelBrowserTest @@ -593,6 +593,37 @@ response_a_b->Done(); } +class CookieDeprecationLabelIncognitoEnabledBrowserTest + : public CookieDeprecationLabelBrowserTestBase { + public: + CookieDeprecationLabelIncognitoEnabledBrowserTest() { + scoped_feature_list_.InitAndEnableFeatureWithParameters( + features::kCookieDeprecationFacilitatedTesting, + {{"label", "label_test"}, {"enable_incognito", "true"}}); + } + + private: + base::test::ScopedFeatureList scoped_feature_list_; +}; + +// Ensure that cookie deprecation labels are present in incognito mode if the +// "enable_incognito" feature parameter is true. See also the +// CookieDeprecationLabelEnabledBrowserTest.Incognito_EmptyLabelReturned test. +IN_PROC_BROWSER_TEST_F(CookieDeprecationLabelIncognitoEnabledBrowserTest, + Incognito_LabelReturned) { + auto https_server = CreateTestServer(EmbeddedTestServer::TYPE_HTTPS); + ASSERT_TRUE(https_server->Start()); + + auto* incognito_shell = CreateOffTheRecordBrowser(); + + EXPECT_TRUE(NavigateToURL(incognito_shell, + https_server->GetURL("a.test", "/hello.html"))); + EXPECT_EQ(EvalJs(incognito_shell, R"((async () => { + return await navigator.cookieDeprecationLabel.getValue(); + })())"), + "label_test"); +} + } // namespace } // namespace content
diff --git a/content/browser/interest_group/interest_group_browsertest.cc b/content/browser/interest_group/interest_group_browsertest.cc index 8bdea1c..5acdd61 100644 --- a/content/browser/interest_group/interest_group_browsertest.cc +++ b/content/browser/interest_group/interest_group_browsertest.cc
@@ -450,7 +450,7 @@ {{":status", "200"}, {"content-type", response.content_type}, {"ad-auction-allowed", "true"}, - {"x-fledge-auction-only", "true"}, + {"ad-auction-only", "true"}, {"access-control-allow-credentials", "true"}, {"access-control-allow-origin", allow_origin}}, response.payload);
diff --git a/content/browser/interest_group/interest_group_storage.cc b/content/browser/interest_group/interest_group_storage.cc index 52dc2060..188bffb 100644 --- a/content/browser/interest_group/interest_group_storage.cc +++ b/content/browser/interest_group/interest_group_storage.cc
@@ -27,10 +27,12 @@ #include "base/strings/escape.h" #include "base/strings/string_number_conversions.h" #include "base/strings/string_piece.h" +#include "base/strings/stringprintf.h" #include "base/time/time.h" #include "content/browser/interest_group/interest_group_ad.pb.h" #include "content/browser/interest_group/interest_group_k_anonymity_manager.h" #include "content/browser/interest_group/interest_group_update.h" +#include "content/browser/interest_group/storage_interest_group.h" #include "content/services/auction_worklet/public/mojom/bidder_worklet.mojom.h" #include "mojo/public/cpp/bindings/receiver.h" #include "sql/database.h" @@ -74,6 +76,7 @@ // Version 14 - 2023/08 - crrev.com/c/4739632 // Version 15 - 2023/08 - crrev.com/c/4808727 // Version 16 - 2023/08 - crrev.com/c/4822944 +// Version 17 - 2023/09 - crrev.com/c/4852051 // // Version 1 adds a table for interest groups. // Version 2 adds a column for rate limiting interest group updates. @@ -92,11 +95,13 @@ // Version 15 adds an additional bid key field. // Version 16 changes the ads and ad component columns of the interest group // table to protobuf format. -const int kCurrentVersionNumber = 16; +// Version 17 adds interest group name and owner columns to the k-anonymity +// table. +const int kCurrentVersionNumber = 17; // Earliest version of the code which can use a |kCurrentVersionNumber| // database without failing. -const int kCompatibleVersionNumber = 16; +const int kCompatibleVersionNumber = 17; // Latest version of the database that cannot be upgraded to // |kCurrentVersionNumber| without razing the database. @@ -506,11 +511,6 @@ return deserialized; } -StorageInterestGroup::KAnonymityData DefaultKAnonymityData( - const std::string& key) { - return {key, /*is_k_anonymous=*/false, /*last_updated=*/base::Time::Min()}; -} - // Merges new `priority_signals_overrides` received from an update with an // existing set of overrides store with an interest group. Populates `overrides` // if it was previously null. @@ -594,9 +594,134 @@ return true; } +// Create indices on the k_anon table. +bool CreateKAnonIndices(sql::Database& db) { + DCHECK(!db.DoesIndexExist("kanon_key_idx")); + static const char kCreateKAnonIndexSQL[] = + // clang-format off + "CREATE INDEX kanon_key_idx " + "ON k_anon(key)"; + // clang-format on + if (!db.Execute(kCreateKAnonIndexSQL)) { + return false; + } + + DCHECK(!db.DoesIndexExist("k_anon_last_server_time_idx")); + static const char kCreateKAnonServerTimeIndexSQL[] = + // clang-format off + "CREATE INDEX k_anon_last_server_time_idx " + "ON k_anon(last_reported_to_anon_server_time DESC);"; + // clang-format on + return db.Execute(kCreateKAnonServerTimeIndexSQL); +} + +bool MaybeCreateKAnonEntry(sql::Database& db, + const blink::InterestGroupKey& interest_group_key, + const std::string& key, + const base::Time& now, + bool for_database_update = false) { + base::Time distant_past = base::Time::Min(); + base::Time last_referenced_time = now; + + sql::Statement get_previous_kanon_val( + db.GetCachedStatement(SQL_FROM_HERE, + "SELECT is_k_anon," + "last_k_anon_updated_time," + "last_reported_to_anon_server_time " + "FROM k_anon WHERE key = ? " + "LIMIT 1")); + // We can get any previously added row for a k_anon key because the same data + // is duplicated for each row of the same key. + if (!get_previous_kanon_val.is_valid()) { + return false; + } + + get_previous_kanon_val.BindString(0, key); + + bool is_kanon = false; + base::Time last_k_anon_updated_time = distant_past; + base::Time last_reported_to_anon_server_time = distant_past; + if (get_previous_kanon_val.Step()) { + is_kanon = get_previous_kanon_val.ColumnBool(0); + last_k_anon_updated_time = get_previous_kanon_val.ColumnTime(1); + last_reported_to_anon_server_time = get_previous_kanon_val.ColumnTime(2); + } + + // clang-format off + const char insert_k_anon_str[] = + "INSERT OR REPLACE INTO %s(" + "last_referenced_time," + "key," + "owner," + "name," + "is_k_anon," + "last_k_anon_updated_time," + "last_reported_to_anon_server_time) " + "VALUES(?,?,?,?,?,?,?)"; + // clang-format on + + sql::Statement maybe_insert_kanon; + if (for_database_update) { + std::string query = base::StringPrintf(insert_k_anon_str, "k_anon_new"); + maybe_insert_kanon.Assign( + db.GetCachedStatement(SQL_FROM_HERE, query.c_str())); + } else { + std::string query = base::StringPrintf(insert_k_anon_str, "k_anon"); + maybe_insert_kanon.Assign( + db.GetCachedStatement(SQL_FROM_HERE, query.c_str())); + } + + if (!maybe_insert_kanon.is_valid()) { + return false; + } + + maybe_insert_kanon.Reset(true); + maybe_insert_kanon.BindTime(0, last_referenced_time); + maybe_insert_kanon.BindString(1, key); + maybe_insert_kanon.BindString(2, Serialize(interest_group_key.owner)); + maybe_insert_kanon.BindString(3, interest_group_key.name); + maybe_insert_kanon.BindBool(4, is_kanon); + maybe_insert_kanon.BindTime(5, last_k_anon_updated_time); + maybe_insert_kanon.BindTime(6, last_reported_to_anon_server_time); + return maybe_insert_kanon.Run(); +} + +bool InsertKAnonForJoinedInterestGroup(sql::Database& db, + const blink::InterestGroup& data, + base::Time exact_join_time, + bool for_database_update) { + blink::InterestGroupKey interest_group_key(data.owner, data.name); + if (data.ads.has_value() && data.bidding_url.has_value()) { + for (auto& ad : *data.ads) { + if (!MaybeCreateKAnonEntry(db, interest_group_key, + blink::KAnonKeyForAdNameReporting(data, ad), + exact_join_time, for_database_update)) { + return false; + } + if (!MaybeCreateKAnonEntry(db, interest_group_key, + blink::KAnonKeyForAdBid(data, ad.render_url), + exact_join_time, for_database_update)) { + return false; + } + } + } + if (data.ad_components.has_value()) { + for (auto& ad : *data.ad_components) { + if (!MaybeCreateKAnonEntry( + db, interest_group_key, + blink::KAnonKeyForAdComponentBid(ad.render_url), exact_join_time, + for_database_update)) { + return false; + } + } + } + + return true; +} + // Initializes the tables, returning true on success. // The tables cannot exist when calling this function. -bool CreateV16Schema(sql::Database& db) { +bool CreateV17Schema(sql::Database& db) { // IMPORTANT: If you add or remove fields, you need to update // `ClearExcessiveStorage()` to consider the size of added/removed fields for // storage usage calculations. @@ -646,28 +771,22 @@ } DCHECK(!db.DoesTableExist("k_anon")); - static const char kInterestGroupKAnonTableSql[] = - // clang-format off + static const char kCreateInterestGroupKAnonTableSql[] = "CREATE TABLE k_anon(" - "last_referenced_time INTEGER NOT NULL," - "key TEXT NOT NULL," - "is_k_anon INTEGER NOT NULL," - "last_k_anon_updated_time INTEGER NOT NULL," - "last_reported_to_anon_server_time INTEGER NOT NULL," - "PRIMARY KEY(key))"; + "last_referenced_time INTEGER NOT NULL," + "key TEXT NOT NULL," + "owner TEXT NOT NULL," + "name TEXT NOT NULL," + "is_k_anon INTEGER NOT NULL," + "last_k_anon_updated_time INTEGER NOT NULL," + "last_reported_to_anon_server_time INTEGER NOT NULL," + "PRIMARY KEY(owner,name,key))"; // clang-format on - if (!db.Execute(kInterestGroupKAnonTableSql)) { + if (!db.Execute(kCreateInterestGroupKAnonTableSql)) { return false; } - // Index on kanon last_referenced_time. - DCHECK(!db.DoesIndexExist("k_anon_last_referenced_time")); - static const char kInterestGroupKAnonLastRefIndexSql[] = - // clang-format off - "CREATE INDEX k_anon_last_referenced_time" - " ON k_anon(last_referenced_time DESC)"; - // clang-format on - if (!db.Execute(kInterestGroupKAnonLastRefIndexSql)) { + if (!CreateKAnonIndices(db)) { return false; } @@ -730,6 +849,83 @@ return true; } +bool UpgradeV16SchemaToV17(sql::Database& db, sql::MetaTable& meta_table) { + static const char kCreateKAnonTableSql[] = + "CREATE TABLE k_anon_new(" + "last_referenced_time INTEGER NOT NULL," + "key TEXT NOT NULL," + "owner TEXT NOT NULL," + "name TEXT NOT NULL," + "is_k_anon INTEGER NOT NULL," + "last_k_anon_updated_time INTEGER NOT NULL," + "last_reported_to_anon_server_time INTEGER NOT NULL," + "PRIMARY KEY(owner,name,key))"; + + if (!db.Execute(kCreateKAnonTableSql)) { + return false; + } + + // Copy over all existing k-anon values into the new table. + static const char kInsertPreviousKANonValues[] = + // clang-format off + "INSERT INTO k_anon_new(" + "last_referenced_time," + "key," + "owner," + "name," + "is_k_anon," + "last_k_anon_updated_time," + "last_reported_to_anon_server_time) " + "SELECT last_referenced_time, key,'',''," + "is_k_anon, last_k_anon_updated_time," + "last_reported_to_anon_server_time " + "FROM k_anon"; + // clang-format on + + if (!db.Execute(kInsertPreviousKANonValues)) { + return false; + } + + // Make sure all k-anon keys for ads in the interest_groups table are + // represented in the k_anon table. + sql::Statement select_igs_with_ads_and_bidding_url( + db.GetCachedStatement(SQL_FROM_HERE, + "SELECT owner, name, ads_pb, ad_components_pb, " + "bidding_url FROM interest_groups")); + base::Time now = base::Time::Now(); + while (select_igs_with_ads_and_bidding_url.Step()) { + blink::InterestGroup ig; + ig.owner = + DeserializeOrigin(select_igs_with_ads_and_bidding_url.ColumnString(0)); + ig.name = select_igs_with_ads_and_bidding_url.ColumnString(1); + ig.ads = DeserializeInterestGroupAdVectorProto( + select_igs_with_ads_and_bidding_url.ColumnString(2)); + ig.ad_components = DeserializeInterestGroupAdVectorProto( + select_igs_with_ads_and_bidding_url.ColumnString(3)); + ig.bidding_url = + DeserializeURL(select_igs_with_ads_and_bidding_url.ColumnString(4)); + + InsertKAnonForJoinedInterestGroup(db, ig, now, + /*for_database_update=*/true); + } + + static const char kDropKAnonTableSql[] = "DROP TABLE k_anon"; + if (!db.Execute(kDropKAnonTableSql)) { + return false; + } + + static const char kRenameKAnonTableSql[] = + // clang-format off + "ALTER TABLE k_anon_new " + "RENAME TO k_anon"; + // clang-format on + if (!db.Execute(kRenameKAnonTableSql)) { + return false; + } + + return CreateKAnonIndices(db); +} + bool UpgradeV15SchemaToV16(sql::Database& db, sql::MetaTable& meta_table) { static const char kInterestGroupTableSql[] = // clang-format off @@ -1457,36 +1653,6 @@ return true; } -bool MaybeCreateKAnonEntry(sql::Database& db, - const std::string& key, - const base::Time& now) { - base::Time distant_past = base::Time::Min(); - - // clang-format off - sql::Statement maybe_insert_kanon( - db.GetCachedStatement(SQL_FROM_HERE, - "INSERT OR IGNORE INTO k_anon(" - "last_referenced_time," - "key," - "is_k_anon," - "last_k_anon_updated_time," - "last_reported_to_anon_server_time) " - "VALUES(?,?,0,?,?)" - )); - // clang-format on - if (!maybe_insert_kanon.is_valid()) { - return false; - } - - maybe_insert_kanon.Reset(true); - maybe_insert_kanon.BindTime(0, now); - maybe_insert_kanon.BindString(1, key); - maybe_insert_kanon.BindTime(2, distant_past); - maybe_insert_kanon.BindTime(3, distant_past); - - return maybe_insert_kanon.Run(); -} - bool RemoveJoinHistory(sql::Database& db, const blink::InterestGroupKey& group_key) { sql::Statement remove_join_history( @@ -1771,17 +1937,18 @@ /*exact_join_time=*/nullptr, /*last_updated=*/nullptr)) { if (old_group.expiry <= base::Time::Now()) { - // If there's a matching old interest group that's expired but that hasn't - // yet been cleaned up, delete it. This removes its associated tables, - // which should expire at the same time as the old interest group. + // If there's a matching old interest group that's expired but that + // hasn't yet been cleaned up, delete it. This removes its associated + // tables, which should expire at the same time as the old interest + // group. if (!DoRemoveInterestGroup(db, interest_group_key)) { return false; } } else if (old_group.execution_mode == blink::InterestGroup::ExecutionMode::kGroupedByOriginMode && joining_origin != old_joining_origin) { - // Clear all interest groups with same owner and mode GroupedByOriginMode - // and same `old_joining_origin`. + // Clear all interest groups with same owner and mode + // GroupedByOriginMode and same `old_joining_origin`. if (!DoClearClusteredBiddingGroups(db, data.owner, old_joining_origin)) { return false; } @@ -1866,6 +2033,10 @@ return false; } + if (!InsertKAnonForJoinedInterestGroup(db, data, exact_join_time, + /*for_database_update=*/false)) { + return false; + } return transaction.Commit(); } @@ -1945,8 +2116,8 @@ // strings) aren't modified in the database -- in this sense, new data is // merged with old data. // - // Since we need to verify this results in a valid interest group, we have to - // first read the interest group from the DB, apply the changes and then + // Since we need to verify this results in a valid interest group, we have + // to first read the interest group from the DB, apply the changes and then // verify the interest group is valid before writing it to the database. blink::InterestGroup stored_group; @@ -2031,6 +2202,11 @@ return false; } + if (!InsertKAnonForJoinedInterestGroup(db, stored_group, now, + /*for_database_update=*/false)) { + return false; + } + return transaction.Commit(); } @@ -2049,7 +2225,8 @@ update_group.Reset(true); if (parse_failure) { - // Non-network failures delay the same amount of time as successful updates. + // Non-network failures delay the same amount of time as successful + // updates. update_group.BindTime( 0, now + InterestGroupStorage::kUpdateSucceededBackoffPeriod); } else { @@ -2164,10 +2341,6 @@ return false; } - if (!MaybeCreateKAnonEntry(db, data.key, now)) { - return false; - } - // clang-format off sql::Statement update( db.GetCachedStatement(SQL_FROM_HERE, @@ -2189,6 +2362,7 @@ if (!update.Run()) { return false; } + return transaction.Commit(); } @@ -2196,9 +2370,10 @@ const std::string& key) { const base::Time distant_past = base::Time::Min(); - sql::Statement get_reported(db.GetCachedStatement( - SQL_FROM_HERE, - "SELECT last_reported_to_anon_server_time FROM k_anon WHERE key=?")); + sql::Statement get_reported( + db.GetCachedStatement(SQL_FROM_HERE, + "SELECT last_reported_to_anon_server_time FROM " + "k_anon WHERE key=? LIMIT 1")); if (!get_reported.is_valid()) { DLOG(ERROR) << "GetLastKAnonymityReported SQL statement did not compile: " << db.GetErrorMessage(); @@ -2223,10 +2398,6 @@ return; } - if (!MaybeCreateKAnonEntry(db, key, now)) { - return; - } - // clang-format off sql::Statement set_reported(db.GetCachedStatement( SQL_FROM_HERE, @@ -2248,6 +2419,48 @@ if (!set_reported.Run()) { return; } + + if (db.GetLastChangeCount() > 0) { + transaction.Commit(); + return; + } + + // If mid-auction, an interest group leaves and database maintenance runs, + // it may be possible that we try to update the + // last_reported_to_anon_server_time for a key that isn't present in the + // k_anon table. Store the last_reported_to_anon_server_time for this key by + // creating a new entry with an empty interest group. The + // last_reported_to_anon_server_time would be needed if we rejoin or join an + // interest group with this key. + + // clang-format off + sql::Statement insert_entry_for_empty_ig( + db.GetCachedStatement(SQL_FROM_HERE, + "INSERT INTO k_anon(" + "last_referenced_time," + "key," + "owner," + "name," + "is_k_anon," + "last_k_anon_updated_time," + "last_reported_to_anon_server_time) " + "VALUES(?,?,'','',0,?,?)")); + // clang-format on + + if (!insert_entry_for_empty_ig.is_valid()) { + return; + } + + insert_entry_for_empty_ig.Reset(true); + insert_entry_for_empty_ig.BindTime(0, base::Time::Min()); + insert_entry_for_empty_ig.BindString(1, key); + insert_entry_for_empty_ig.BindTime(2, base::Time::Min()); + insert_entry_for_empty_ig.BindTime(3, now); + + if (!insert_entry_for_empty_ig.Run()) { + return; + } + transaction.Commit(); } @@ -2285,9 +2498,9 @@ "FROM interest_groups " "WHERE expiration>?")); if (!load.is_valid()) { - DLOG(ERROR) - << "LoadAllInterestGroupJoiningOrigins SQL statement did not compile: " - << db.GetErrorMessage(); + DLOG(ERROR) << "LoadAllInterestGroupJoiningOrigins SQL statement did not " + "compile: " + << db.GetErrorMessage(); return absl::nullopt; } load.Reset(true); @@ -2366,40 +2579,6 @@ return result; } -bool DoGetKAnonymity( - sql::Database& db, - const std::string& key, - absl::optional<StorageInterestGroup::KAnonymityData>& output) { - // clang-format off - sql::Statement interest_group_kanon( - db.GetCachedStatement(SQL_FROM_HERE, - "SELECT is_k_anon, last_k_anon_updated_time " - "FROM k_anon " - "WHERE key=?" - )); - // clang-format on - if (!interest_group_kanon.is_valid()) { - DLOG(ERROR) - << "GetInterestGroupsForOwner interest_group_kanon SQL statement did " - "not compile: " - << db.GetErrorMessage(); - return false; - } - - interest_group_kanon.Reset(true); - interest_group_kanon.BindString(0, key); - - if (!interest_group_kanon.Step()) { - // Not in the table, so return the defaults. - output = DefaultKAnonymityData(key); - return true; - } - - output = {key, /*is_k_anonymous=*/interest_group_kanon.ColumnInt(0) > 0, - /*last_updated=*/interest_group_kanon.ColumnTime(1)}; - return interest_group_kanon.Succeeded(); -} - bool GetPreviousWins(sql::Database& db, const blink::InterestGroupKey& group_key, base::Time win_time_after, @@ -2529,51 +2708,27 @@ return absl::nullopt; } - if (db_interest_group.interest_group.bidding_url) { - if (db_interest_group.interest_group.ads) { - for (auto& ad : db_interest_group.interest_group.ads.value()) { - absl::optional<StorageInterestGroup::KAnonymityData> ad_kanon; - if (!DoGetKAnonymity( - db, - blink::KAnonKeyForAdBid(db_interest_group.interest_group, - ad.render_url), - ad_kanon)) { - return absl::nullopt; - } - if (!ad_kanon) { - continue; - } - db_interest_group.bidding_ads_kanon.push_back( - std::move(ad_kanon).value()); + sql::Statement interest_group_kanon_query( + db.GetCachedStatement(SQL_FROM_HERE, + "SELECT key, is_k_anon, last_k_anon_updated_time " + "FROM k_anon " + "WHERE owner = ? AND name = ?")); - absl::optional<StorageInterestGroup::KAnonymityData> ad_name_kanon; - if (!DoGetKAnonymity(db, - blink::KAnonKeyForAdNameReporting( - db_interest_group.interest_group, ad), - ad_name_kanon)) { - return absl::nullopt; - } - if (!ad_name_kanon) { - continue; - } - db_interest_group.reporting_ads_kanon.push_back( - std::move(ad_name_kanon).value()); - } - } - if (db_interest_group.interest_group.ad_components) { - for (auto& ad : db_interest_group.interest_group.ad_components.value()) { - absl::optional<StorageInterestGroup::KAnonymityData> ad_kanon; - if (!DoGetKAnonymity(db, - blink::KAnonKeyForAdComponentBid(ad.render_url), - ad_kanon)) { - return absl::nullopt; - } - if (!ad_kanon) { - continue; - } - db_interest_group.component_ads_kanon.push_back( - std::move(ad_kanon).value()); - } + interest_group_kanon_query.BindString(0, Serialize(group_key.owner)); + interest_group_kanon_query.BindString(1, group_key.name); + + while (interest_group_kanon_query.Step()) { + StorageInterestGroup::KAnonymityData kanon_data = { + interest_group_kanon_query.ColumnString(0), + /*is_k_anonymous=*/interest_group_kanon_query.ColumnBool(1), + /*last_updated=*/interest_group_kanon_query.ColumnTime(2)}; + if (kanon_data.key.starts_with(blink::kKAnonKeyForAdBidPrefix)) { + db_interest_group.bidding_ads_kanon.push_back(kanon_data); + } else if (kanon_data.key.starts_with( + blink::kKAnonKeyForAdComponentBidPrefix)) { + db_interest_group.component_ads_kanon.push_back(kanon_data); + } else { + db_interest_group.reporting_ads_kanon.push_back(kanon_data); } } @@ -2902,8 +3057,8 @@ return transaction.Commit(); } -// Removes interest groups so that per-owner limit is respected. Note that we're -// intentionally not trying to keep this in sync with +// Removes interest groups so that per-owner limit is respected. Note that +// we're intentionally not trying to keep this in sync with // `blink::InterestGroup::EstimateSize()`. There's not a compelling reason to // keep those exactly aligned and keeping them in sync would require a // significant amount of extra work. @@ -2983,18 +3138,28 @@ } bool ClearExpiredKAnon(sql::Database& db, base::Time cutoff) { - sql::Statement expired_kanon( + // clang-format off + sql::Statement expired_k_anon( db.GetCachedStatement(SQL_FROM_HERE, - "DELETE FROM k_anon " - "WHERE last_referenced_time <= ?")); - if (!expired_kanon.is_valid()) { + "DELETE FROM k_anon " + "WHERE ROWID IN(" + "SELECT k.ROWID FROM k_anon k " + "LEFT JOIN interest_groups ig " + "ON (ig.name = k.name AND ig.owner=k.owner) " + // IG was deleted or updated without the relevant ad + // and the key hasn't been reported in the last day. + "WHERE (ig.owner IS NULL " + "OR ig.last_updated > k.last_referenced_time) " + "AND k.last_reported_to_anon_server_time < ?)")); + // clang-format on + if (!expired_k_anon.is_valid()) { DLOG(ERROR) << "ClearExpiredKAnon SQL statement did not compile."; return false; } - expired_kanon.Reset(true); - expired_kanon.BindTime(0, cutoff); - return expired_kanon.Run(); + expired_k_anon.Reset(true); + expired_k_anon.BindTime(0, cutoff); + return expired_k_anon.Run(); } bool DoPerformDatabaseMaintenance(sql::Database& db, @@ -3025,7 +3190,8 @@ if (!DeleteOldWins(db, now - InterestGroupStorage::kHistoryLength)) { return false; } - if (!ClearExpiredKAnon(db, now - InterestGroupStorage::kHistoryLength)) { + if (!ClearExpiredKAnon( + db, now - InterestGroupStorage::kAdditionalKAnonStoragePeriod)) { return false; } return transaction.Commit(); @@ -3156,7 +3322,7 @@ } if (new_db) { - return CreateV16Schema(*db_); + return CreateV17Schema(*db_); } const int db_version = meta_table.GetVersionNumber(); @@ -3227,6 +3393,11 @@ if (!UpgradeV15SchemaToV16(*db_, meta_table)) { return false; } + ABSL_FALLTHROUGH_INTENDED; + case 16: + if (!UpgradeV16SchemaToV17(*db_, meta_table)) { + return false; + } if (!meta_table.SetVersionNumber(kCurrentVersionNumber)) { return false;
diff --git a/content/browser/interest_group/interest_group_storage.h b/content/browser/interest_group/interest_group_storage.h index c85632c8..98786f33 100644 --- a/content/browser/interest_group/interest_group_storage.h +++ b/content/browser/interest_group/interest_group_storage.h
@@ -39,6 +39,10 @@ static constexpr base::TimeDelta kHistoryLength = base::Days(30); static constexpr base::TimeDelta kMaintenanceInterval = base::Hours(1); static constexpr base::TimeDelta kIdlePeriod = base::Seconds(30); + // Store a KAnon key after its corresponding interest group or ad is + // no longer present for this amount longer. + static constexpr base::TimeDelta kAdditionalKAnonStoragePeriod = + base::Days(1); // After a successful interest group update, delay the next update until // kUpdateSucceededBackoffPeriod time has passed. static constexpr base::TimeDelta kUpdateSucceededBackoffPeriod =
diff --git a/content/browser/interest_group/interest_group_storage_unittest.cc b/content/browser/interest_group/interest_group_storage_unittest.cc index 8a4023b2..d7de4d14 100644 --- a/content/browser/interest_group/interest_group_storage_unittest.cc +++ b/content/browser/interest_group/interest_group_storage_unittest.cc
@@ -22,19 +22,18 @@ #include "base/test/simple_test_clock.h" #include "base/test/task_environment.h" #include "base/time/time.h" +#include "content/browser/interest_group/interest_group_update.h" #include "content/browser/interest_group/storage_interest_group.h" #include "content/services/auction_worklet/public/mojom/bidder_worklet.mojom.h" #include "sql/database.h" #include "sql/meta_table.h" #include "sql/test/scoped_error_expecter.h" #include "sql/test/test_helpers.h" -#include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" #include "third_party/blink/public/common/features.h" #include "third_party/blink/public/common/interest_group/interest_group.h" #include "third_party/blink/public/common/interest_group/test_interest_group_builder.h" #include "third_party/blink/public/common/storage_key/storage_key.h" -#include "third_party/blink/public/mojom/interest_group/interest_group_types.mojom.h" #include "url/origin.h" namespace content { @@ -654,17 +653,241 @@ testing::UnorderedElementsAreArray(expected_reporting)); } +TEST_F(InterestGroupStorageTest, + UpdatesAdKAnonymityWithMultipleInterestGroups) { + url::Origin test_origin = + url::Origin::Create(GURL("https://owner.example.com")); + GURL ad1_url = GURL("https://owner.example.com/ad1"); + GURL ad2_url = GURL("https://owner.example.com/ad2"); + GURL ad3_url = GURL("https://owner.example.com/ad3"); + + InterestGroup g1 = NewInterestGroup(test_origin, "name"); + g1.ads.emplace(); + g1.ads->emplace_back(ad1_url, "metadata1"); + g1.ad_components.emplace(); + g1.ad_components->emplace_back(ad1_url, "component_metadata1"); + g1.ad_components->emplace_back(ad3_url, "component_metadata3"); + g1.expiry = base::Time::Now() + InterestGroupStorage::kHistoryLength; + + InterestGroup g2 = g1; + g2.ads->emplace_back(ad2_url, "metadata2"); + g2.name = "name 2"; + g2.expiry = + base::Time::Now() + InterestGroupStorage::kHistoryLength + base::Hours(1); + + InterestGroup g3 = g1; + g3.ad_components->clear(); + g3.name = "name 3"; + g3.expiry = + base::Time::Now() + InterestGroupStorage::kHistoryLength + base::Hours(2); + + std::string k_anon_bid_key_1 = blink::KAnonKeyForAdBid(g1, ad1_url); + std::string k_anon_bid_key_2 = blink::KAnonKeyForAdBid(g2, ad2_url); + std::string k_anon_component_key_1 = + blink::KAnonKeyForAdComponentBid(ad1_url); + std::string k_anon_component_key_3 = + blink::KAnonKeyForAdComponentBid(ad3_url); + + std::unique_ptr<InterestGroupStorage> storage = CreateStorage(); + + // A true k-anonimity value should be returned with just one interest group. + StorageInterestGroup::KAnonymityData k_anon_bid1{k_anon_bid_key_1, true, + base::Time::Now()}; + StorageInterestGroup::KAnonymityData k_anon_bid2{k_anon_bid_key_2, false, + base::Time::Min()}; + StorageInterestGroup::KAnonymityData k_anon_component1{ + k_anon_component_key_1, false, base::Time::Min()}; + StorageInterestGroup::KAnonymityData k_anon_component3{ + k_anon_component_key_3, false, base::Time::Min()}; + storage->JoinInterestGroup(g1, GURL("example.com")); + storage->UpdateKAnonymity(k_anon_bid1); + std::vector<StorageInterestGroup> returned_groups = + storage->GetInterestGroupsForOwner(g1.owner); + EXPECT_EQ(returned_groups.size(), 1u); + EXPECT_THAT(returned_groups[0].bidding_ads_kanon, + testing::UnorderedElementsAre(k_anon_bid1)); + EXPECT_THAT( + returned_groups[0].component_ads_kanon, + testing::UnorderedElementsAre(k_anon_component1, k_anon_component3)); + + task_environment().FastForwardBy(base::Hours(1)); + + // The second interest group should also get the same true k-anon value that + // we set earlier since it shares the ad. + storage->JoinInterestGroup(g2, GURL("example.com")); + returned_groups = storage->GetInterestGroupsForOwner(g1.owner); + { + auto expected_interest_group_matcher = testing::UnorderedElementsAre( + testing::AllOf( + Field("bidding_ads_kanon", &StorageInterestGroup::bidding_ads_kanon, + testing::UnorderedElementsAre(k_anon_bid1)), + Field("component_ads_kanon", + &StorageInterestGroup::component_ads_kanon, + testing::UnorderedElementsAre(k_anon_component1, + k_anon_component3)), + Field( + "interest_group", &StorageInterestGroup::interest_group, + testing::AllOf(Field("owner", &InterestGroup::owner, g1.owner), + Field("name", &InterestGroup::name, g1.name)))), + testing::AllOf( + Field("bidding_ads_kanon", &StorageInterestGroup::bidding_ads_kanon, + testing::UnorderedElementsAre(k_anon_bid1, k_anon_bid2)), + Field("component_ads_kanon", + &StorageInterestGroup::component_ads_kanon, + testing::UnorderedElementsAre(k_anon_component1, + k_anon_component3)), + Field( + "interest_group", &StorageInterestGroup::interest_group, + testing::AllOf(Field("owner", &InterestGroup::owner, g2.owner), + Field("name", &InterestGroup::name, g2.name))))); + EXPECT_THAT(returned_groups, expected_interest_group_matcher); + } + + // Updating a k-anon value for an ad only in the second interest group should + // not affect the returned k-anonimity values for the first group. + k_anon_bid2 = {k_anon_bid_key_2, true, base::Time::Now()}; + storage->UpdateKAnonymity(k_anon_bid2); + returned_groups = storage->GetInterestGroupsForOwner(g1.owner); + { + auto expected_interest_group_matcher = testing::UnorderedElementsAre( + testing::AllOf( + Field("bidding_ads_kanon", &StorageInterestGroup::bidding_ads_kanon, + testing::UnorderedElementsAre(k_anon_bid1)), + Field("component_ads_kanon", + &StorageInterestGroup::component_ads_kanon, + testing::UnorderedElementsAre(k_anon_component1, + k_anon_component3)), + Field( + "interest_group", &StorageInterestGroup::interest_group, + testing::AllOf(Field("owner", &InterestGroup::owner, g1.owner), + Field("name", &InterestGroup::name, g1.name)))), + testing::AllOf( + Field("bidding_ads_kanon", &StorageInterestGroup::bidding_ads_kanon, + testing::UnorderedElementsAre(k_anon_bid1, k_anon_bid2)), + Field("component_ads_kanon", + &StorageInterestGroup::component_ads_kanon, + testing::UnorderedElementsAre(k_anon_component1, + k_anon_component3)), + Field( + "interest_group", &StorageInterestGroup::interest_group, + testing::AllOf(Field("owner", &InterestGroup::owner, g2.owner), + Field("name", &InterestGroup::name, g2.name))))); + EXPECT_THAT(returned_groups, expected_interest_group_matcher); + } + + task_environment().FastForwardBy(base::Hours(1)); + + // Updating a k-anon value for an ad in both interest groups should affect + // both interest groups. + k_anon_component3 = {k_anon_component_key_3, true, base::Time::Now()}; + storage->UpdateKAnonymity(k_anon_component3); + returned_groups = storage->GetInterestGroupsForOwner(g1.owner); + { + auto expected_interest_group_matcher = testing::UnorderedElementsAre( + testing::AllOf( + Field("bidding_ads_kanon", &StorageInterestGroup::bidding_ads_kanon, + testing::UnorderedElementsAre(k_anon_bid1)), + Field("component_ads_kanon", + &StorageInterestGroup::component_ads_kanon, + testing::UnorderedElementsAre(k_anon_component1, + k_anon_component3)), + Field( + "interest_group", &StorageInterestGroup::interest_group, + testing::AllOf(Field("owner", &InterestGroup::owner, g1.owner), + Field("name", &InterestGroup::name, g1.name)))), + testing::AllOf( + Field("bidding_ads_kanon", &StorageInterestGroup::bidding_ads_kanon, + testing::UnorderedElementsAre(k_anon_bid1, k_anon_bid2)), + Field("component_ads_kanon", + &StorageInterestGroup::component_ads_kanon, + testing::UnorderedElementsAre(k_anon_component1, + k_anon_component3)), + Field( + "interest_group", &StorageInterestGroup::interest_group, + testing::AllOf(Field("owner", &InterestGroup::owner, g2.owner), + Field("name", &InterestGroup::name, g2.name))))); + EXPECT_THAT(returned_groups, expected_interest_group_matcher); + } + + // After joining a third interest group, the third interest group should be + // returned with the (already set) k_anon values for its ads. + storage->JoinInterestGroup(g3, GURL("example.com")); + returned_groups = storage->GetInterestGroupsForOwner(g1.owner); + { + auto expected_interest_group_matcher = testing::UnorderedElementsAre( + testing::AllOf( + Field("bidding_ads_kanon", &StorageInterestGroup::bidding_ads_kanon, + testing::UnorderedElementsAre(k_anon_bid1)), + Field("component_ads_kanon", + &StorageInterestGroup::component_ads_kanon, + testing::UnorderedElementsAre(k_anon_component1, + k_anon_component3)), + Field( + "interest_group", &StorageInterestGroup::interest_group, + testing::AllOf(Field("owner", &InterestGroup::owner, g1.owner), + Field("name", &InterestGroup::name, g1.name)))), + testing::AllOf( + Field("bidding_ads_kanon", &StorageInterestGroup::bidding_ads_kanon, + testing::UnorderedElementsAre(k_anon_bid1, k_anon_bid2)), + Field("component_ads_kanon", + &StorageInterestGroup::component_ads_kanon, + testing::UnorderedElementsAre(k_anon_component1, + k_anon_component3)), + Field( + "interest_group", &StorageInterestGroup::interest_group, + testing::AllOf(Field("owner", &InterestGroup::owner, g2.owner), + Field("name", &InterestGroup::name, g2.name)))), + testing::AllOf( + Field("bidding_ads_kanon", &StorageInterestGroup::bidding_ads_kanon, + testing::UnorderedElementsAre(k_anon_bid1)), + Field("component_ads_kanon", + &StorageInterestGroup::component_ads_kanon, + testing::IsEmpty()), + Field( + "interest_group", &StorageInterestGroup::interest_group, + testing::AllOf(Field("owner", &InterestGroup::owner, g3.owner), + Field("name", &InterestGroup::name, g3.name))))); + EXPECT_THAT(returned_groups, expected_interest_group_matcher); + } + + // Check that the k_anon_bid1 is unaffected by the expiration of the other + // values. + task_environment().FastForwardBy(InterestGroupStorage::kHistoryLength - + base::Hours(1)); + + k_anon_bid2 = {k_anon_bid_key_2, false, base::Time::Min()}; + k_anon_component1 = {k_anon_component_key_1, false, base::Time::Min()}; + k_anon_component3 = {k_anon_component_key_3, false, base::Time::Min()}; + + returned_groups = storage->GetInterestGroupsForOwner(g1.owner); + { + auto expected_interest_group_matcher = + testing::UnorderedElementsAre(testing::AllOf( + Field("bidding_ads_kanon", &StorageInterestGroup::bidding_ads_kanon, + testing::UnorderedElementsAre(k_anon_bid1)), + Field("component_ads_kanon", + &StorageInterestGroup::component_ads_kanon, + testing::IsEmpty()), + Field( + "interest_group", &StorageInterestGroup::interest_group, + testing::AllOf(Field("owner", &InterestGroup::owner, g3.owner), + Field("name", &InterestGroup::name, g3.name))))); + EXPECT_EQ(returned_groups.size(), 1u); + EXPECT_THAT(returned_groups, expected_interest_group_matcher); + } +} + TEST_F(InterestGroupStorageTest, KAnonDataExpires) { GURL update_url("https://owner.example.com/groupUpdate"); url::Origin test_origin = url::Origin::Create(update_url); const std::string name = "name"; - const std::string key = test_origin.GetURL().spec() + '\n' + name; // We make the ad urls equal to the name key and update urls to verify the // database stores them separately. GURL ad1_url = GURL("https://owner.example.com/groupUpdate"); GURL ad2_url = GURL("https://owner.example.com/name"); InterestGroup g = NewInterestGroup(test_origin, name); + blink::InterestGroupKey interest_group_key(g.owner, g.name); g.ads.emplace(); g.ads->push_back(blink::InterestGroup::Ad(ad1_url, "metadata1")); g.ad_components.emplace(); @@ -722,6 +945,20 @@ EXPECT_THAT(groups[0].reporting_ads_kanon, testing::UnorderedElementsAre(ad1_report_kanon)); + // Leave & Join again and expect the same kanon values. + storage->LeaveInterestGroup(interest_group_key, interest_group_key.owner); + storage->JoinInterestGroup(g, GURL("https://owner.example.com/join3")); + + // K-anon data should still be the same. + groups = storage->GetInterestGroupsForOwner(test_origin); + ASSERT_EQ(1u, groups.size()); + EXPECT_THAT(groups[0].bidding_ads_kanon, + testing::UnorderedElementsAre(ad1_bid_kanon)); + EXPECT_THAT(groups[0].component_ads_kanon, + testing::UnorderedElementsAre(ad2_bid_kanon)); + EXPECT_THAT(groups[0].reporting_ads_kanon, + testing::UnorderedElementsAre(ad1_report_kanon)); + // Fast-forward past interest group and kanon value expiration. task_environment().FastForwardBy(InterestGroupStorage::kHistoryLength); @@ -1647,6 +1884,95 @@ StoresAllFieldsTest(); } +// Upgrades a v16 database dump to an expected current database. +// The v16 database dump was extracted from an updated version of +// the v6 data dump, then altered to have new k-anon keys -- +// the format of k-anon keys has changed between the two versions +// (without migration of one key type to the next) +// so this new dump is necessary to test changes to the k-anon +// table. +TEST_F(InterestGroupStorageTest, UpgradeFromV16) { + // Create V16 database from dump + base::FilePath file_path; + base::PathService::Get(base::DIR_SOURCE_ROOT, &file_path); + file_path = + file_path.AppendASCII("content/test/data/interest_group/schemaV16.sql"); + ASSERT_TRUE(base::PathExists(file_path)); + ASSERT_TRUE(sql::test::CreateDatabaseFromSQL(db_path(), file_path)); + + StorageInterestGroup::KAnonymityData k_anon_bid{ + "AdBid\n" + "https://owner.example.com/\n" + "https://owner.example.com/bidder.js\n" + "https://ads.example.com/1", + true, base::Time::Min()}; + auto expected_interest_group_matcher = testing::UnorderedElementsAre( + testing::AllOf( + Field("interest_group", &StorageInterestGroup::interest_group, + testing::AllOf(Field("name", &InterestGroup::name, "group1"))), + Field("bidding_ads_kanon", &StorageInterestGroup::bidding_ads_kanon, + testing::UnorderedElementsAre(k_anon_bid)), + Field("reporting_ads_kanon", + &StorageInterestGroup::reporting_ads_kanon, + testing::UnorderedElementsAre( + StorageInterestGroup::KAnonymityData{ + "NameReport\n" + "https://owner.example.com/\n" + "https://owner.example.com/bidder.js\n" + "https://ads.example.com/1\n" + "group1", + false, base::Time::Min()}))), + testing::AllOf( + Field("interest_group", &StorageInterestGroup::interest_group, + testing::AllOf(Field("name", &InterestGroup::name, "group2"))), + Field("bidding_ads_kanon", &StorageInterestGroup::bidding_ads_kanon, + testing::UnorderedElementsAre(k_anon_bid)), + Field("reporting_ads_kanon", + &StorageInterestGroup::reporting_ads_kanon, + testing::UnorderedElementsAre( + StorageInterestGroup::KAnonymityData{ + "NameReport\n" + "https://owner.example.com/\n" + "https://owner.example.com/bidder.js\n" + "https://ads.example.com/1\n" + "group2", + false, base::Time::Min()}))), + testing::AllOf( + Field("interest_group", &StorageInterestGroup::interest_group, + testing::AllOf(Field("name", &InterestGroup::name, "group3"))), + Field("bidding_ads_kanon", &StorageInterestGroup::bidding_ads_kanon, + testing::UnorderedElementsAre(k_anon_bid)), + Field("reporting_ads_kanon", + &StorageInterestGroup::reporting_ads_kanon, + testing::UnorderedElementsAre( + StorageInterestGroup::KAnonymityData{ + "NameReport\n" + "https://owner.example.com/\n" + "https://owner.example.com/bidder.js\n" + "https://ads.example.com/1\n" + "group3", + false, base::Time::Min()})))); + + // Upgrade and read. + std::unique_ptr<InterestGroupStorage> storage = CreateStorage(); + ASSERT_TRUE(storage); + + std::vector<StorageInterestGroup> interest_groups = + storage->GetAllInterestGroupsUnfilteredForTesting(); + + EXPECT_THAT(interest_groups, expected_interest_group_matcher); + + // In the v16 table, there was a k-anon key that doesn't correspond with an + // interest group in the interest group table -- make sure this was migrated + // as well. + std::string key_without_ig_in_ig_table = + "AdBid\nhttps://owner.example2.com/\nhttps://owner.example2.com/" + "bidder.js\nhttps://ads.example2.com/1"; + absl::optional<base::Time> last_reported = + storage->GetLastKAnonymityReported(key_without_ig_in_ig_table); + EXPECT_EQ(last_reported, base::Time::Min() + base::Microseconds(8)); +} + TEST_F(InterestGroupStorageTest, ClusteredGroupsClearedWhenClusterChangesOnJoin) { const url::Origin cluster_origin = @@ -1860,50 +2186,65 @@ blink::InterestGroup::Ad(ad3_url, "component_metadata3")); std::unique_ptr<InterestGroupStorage> storage = CreateStorage(); + std::string k_anon_key_1 = blink::KAnonKeyForAdBid(g, ad1_url); + std::string k_anon_key_2 = blink::KAnonKeyForAdBid(g, ad2_url); + std::string k_anon_key_3 = blink::KAnonKeyForAdComponentBid(ad3_url); + absl::optional<base::Time> last_report = - storage->GetLastKAnonymityReported(ad1_url.spec()); + storage->GetLastKAnonymityReported(k_anon_key_1); EXPECT_EQ(base::Time::Min(), last_report); // Not in the database. + // Setting a last reported time for a key that doesn't correspond with an + // interest group should work. + base::Time expected_last_report = base::Time::Now(); + storage->UpdateLastKAnonymityReported(k_anon_key_3); + task_environment().FastForwardBy(base::Seconds(1)); + last_report = storage->GetLastKAnonymityReported(k_anon_key_3); + EXPECT_EQ(expected_last_report, last_report); + storage->JoinInterestGroup(g, GURL("https://owner.example.com/join")); - base::Time expected_last_report; - last_report = storage->GetLastKAnonymityReported(ad1_url.spec()); + // After joining an interest group for a previously joined key, we should + // still get the same time. + last_report = storage->GetLastKAnonymityReported(k_anon_key_3); + EXPECT_EQ(expected_last_report, last_report); + + last_report = storage->GetLastKAnonymityReported(k_anon_key_1); EXPECT_EQ(last_report, base::Time::Min()); - storage->UpdateLastKAnonymityReported(ad1_url.spec()); + storage->UpdateLastKAnonymityReported(k_anon_key_1); expected_last_report = base::Time::Now(); task_environment().FastForwardBy(base::Seconds(1)); - last_report = storage->GetLastKAnonymityReported(ad1_url.spec()); + last_report = storage->GetLastKAnonymityReported(k_anon_key_1); EXPECT_EQ(last_report, expected_last_report); task_environment().FastForwardBy(base::Seconds(1)); - last_report = storage->GetLastKAnonymityReported(ad2_url.spec()); + last_report = storage->GetLastKAnonymityReported(k_anon_key_2); EXPECT_EQ(last_report, base::Time::Min()); - storage->UpdateLastKAnonymityReported(ad2_url.spec()); + storage->UpdateLastKAnonymityReported(k_anon_key_2); expected_last_report = base::Time::Now(); task_environment().FastForwardBy(base::Seconds(1)); - last_report = storage->GetLastKAnonymityReported(ad2_url.spec()); + last_report = storage->GetLastKAnonymityReported(k_anon_key_2); EXPECT_EQ(last_report, expected_last_report); task_environment().FastForwardBy(base::Seconds(1)); - last_report = storage->GetLastKAnonymityReported(ad3_url.spec()); - EXPECT_EQ(last_report, base::Time::Min()); - storage->UpdateLastKAnonymityReported(ad3_url.spec()); + storage->UpdateLastKAnonymityReported(k_anon_key_3); expected_last_report = base::Time::Now(); task_environment().FastForwardBy(base::Seconds(1)); - last_report = storage->GetLastKAnonymityReported(ad3_url.spec()); + last_report = storage->GetLastKAnonymityReported(k_anon_key_3); EXPECT_EQ(last_report, expected_last_report); task_environment().FastForwardBy(base::Seconds(1)); - std::string group_name_key = test_origin.GetURL().spec() + "\nname"; + std::string group_name_key = + blink::KAnonKeyForAdNameReporting(g, g.ads->at(0)); last_report = storage->GetLastKAnonymityReported(group_name_key); EXPECT_EQ(last_report, base::Time::Min()); storage->UpdateLastKAnonymityReported(group_name_key); @@ -2018,38 +2359,106 @@ GURL ad2_url = GURL("https://owner.example.com/ad2"); InterestGroup g = NewInterestGroup(test_origin, "name"); + blink::InterestGroupKey interest_group_key(g.owner, g.name); g.ads.emplace(); g.ads->push_back(blink::InterestGroup::Ad(ad1_url, "metadata1")); g.ads->push_back(blink::InterestGroup::Ad(ad2_url, "metadata2")); std::unique_ptr<InterestGroupStorage> storage = CreateStorage(); + std::string k_anon_key_1 = blink::KAnonKeyForAdBid(g, ad1_url); + std::string k_anon_key_2 = blink::KAnonKeyForAdBid(g, ad2_url); + storage->JoinInterestGroup(g, GURL("https://owner.example.com/join")); std::vector<StorageInterestGroup> groups = storage->GetInterestGroupsForOwner(test_origin); - storage->UpdateLastKAnonymityReported(ad1_url.spec()); - storage->UpdateLastKAnonymityReported(ad2_url.spec()); + storage->UpdateLastKAnonymityReported(k_anon_key_1); + storage->UpdateLastKAnonymityReported(k_anon_key_2); EXPECT_NE(base::Time::Min(), - storage->GetLastKAnonymityReported(ad1_url.spec())); + storage->GetLastKAnonymityReported(k_anon_key_1)); EXPECT_NE(base::Time::Min(), - storage->GetLastKAnonymityReported(ad2_url.spec())); + storage->GetLastKAnonymityReported(k_anon_key_2)); task_environment().FastForwardBy(base::Days(1)); - // fast-forward 30 days. - for (int i = 0; i < InterestGroupStorage::kHistoryLength / base::Days(1); - i++) { - storage->JoinInterestGroup(g, GURL("https://owner.example.com/join")); - storage->UpdateLastKAnonymityReported(ad1_url.spec()); - task_environment().FastForwardBy(base::Days(1)); - } + g.ads->pop_back(); // Erase the second ad so that we don't update the + // k_anon_key_2 last_referenced values on join. + + storage->JoinInterestGroup(g, GURL("https://owner.example.com/join")); + + // The k-anon value for k_anon_key_2 should remain a day after it's no + // longer used by an active interest group. + EXPECT_NE(base::Time::Min(), + storage->GetLastKAnonymityReported(k_anon_key_1)); + EXPECT_NE(base::Time::Min(), + storage->GetLastKAnonymityReported(k_anon_key_2)); + + task_environment().FastForwardBy( + InterestGroupStorage::kAdditionalKAnonStoragePeriod + + InterestGroupStorage::kIdlePeriod); EXPECT_NE(base::Time::Min(), - storage->GetLastKAnonymityReported(ad1_url.spec())); + storage->GetLastKAnonymityReported(k_anon_key_1)); EXPECT_EQ(base::Time::Min(), - storage->GetLastKAnonymityReported(ad2_url.spec())); + storage->GetLastKAnonymityReported(k_anon_key_2)); + + // An InterestGroupUpdate should update k-anon keys too. Now k_anon_key_1 will + // expire and k_anon_key_2 won't. + InterestGroupUpdate g_update; + g_update.ads.emplace(); + g_update.ads->emplace_back(ad2_url, "metadata2"); + storage->UpdateInterestGroup(interest_group_key, g_update); + storage->UpdateLastKAnonymityReported(k_anon_key_2); + + EXPECT_NE(base::Time::Min(), + storage->GetLastKAnonymityReported(k_anon_key_1)); + EXPECT_NE(base::Time::Min(), + storage->GetLastKAnonymityReported(k_anon_key_2)); + + task_environment().FastForwardBy( + InterestGroupStorage::kAdditionalKAnonStoragePeriod + + InterestGroupStorage::kIdlePeriod); + + EXPECT_EQ(base::Time::Min(), + storage->GetLastKAnonymityReported(k_anon_key_1)); + EXPECT_NE(base::Time::Min(), + storage->GetLastKAnonymityReported(k_anon_key_2)); + + // UpdateLastKAnonymityReported should re-activate a k_anon key. + storage->UpdateLastKAnonymityReported(k_anon_key_1); + + EXPECT_NE(base::Time::Min(), + storage->GetLastKAnonymityReported(k_anon_key_1)); + EXPECT_NE(base::Time::Min(), + storage->GetLastKAnonymityReported(k_anon_key_2)); + + // After the interest group expires, we don't need to keep any k-anonymity + // data unless it's been reported <1 day ago. + storage->JoinInterestGroup(g, GURL("https://owner.example.com/join")); + + task_environment().FastForwardBy(InterestGroupStorage::kHistoryLength); + storage->UpdateLastKAnonymityReported(k_anon_key_1); + EXPECT_EQ(1u, storage->GetAllInterestGroupsUnfilteredForTesting().size()); + task_environment().FastForwardBy(InterestGroupStorage::kIdlePeriod); + EXPECT_EQ(0u, storage->GetAllInterestGroupsUnfilteredForTesting().size()); + + EXPECT_NE(base::Time::Min(), + storage->GetLastKAnonymityReported(k_anon_key_1)); + EXPECT_EQ(base::Time::Min(), + storage->GetLastKAnonymityReported(k_anon_key_2)); + + task_environment().FastForwardBy( + InterestGroupStorage::kAdditionalKAnonStoragePeriod); + EXPECT_NE(base::Time::Min(), + storage->GetLastKAnonymityReported(k_anon_key_1)); + task_environment().FastForwardBy(InterestGroupStorage::kIdlePeriod); + + EXPECT_EQ(base::Time::Min(), + storage->GetLastKAnonymityReported(k_anon_key_1)); + EXPECT_EQ(base::Time::Min(), + storage->GetLastKAnonymityReported(k_anon_key_2)); } TEST_F(InterestGroupStorageTest, UpdateAdditionalBidKey) {
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc index cd25e9de..1ea5783 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -10404,11 +10404,6 @@ } } - // TODO(crbug.com/1126305): Once the Prerender2 moves to use the MPArch, we - // need to check the relevant FrameTree to know the precise prerendering - // state to update commit_params.is_prerendering here. - // Current design doesn't capture the cases NavigationRequest is created via - // CreateRendererInitiated or CreateForSynchronousRendererCommit. SendCommitNavigation( navigation_client, navigation_request, std::move(common_params), std::move(commit_params), std::move(head), std::move(response_body),
diff --git a/content/browser/storage_partition_impl.cc b/content/browser/storage_partition_impl.cc index 5003655..3d6c0ea7 100644 --- a/content/browser/storage_partition_impl.cc +++ b/content/browser/storage_partition_impl.cc
@@ -1452,10 +1452,12 @@ std::make_unique<BluetoothAllowedDevicesMap>(); // Must be initialized before the `url_loader_factory_getter_`. - // Cookie deprecation traffic labels should not be sent in incognito mode. + // Cookie deprecation traffic labels should not be sent in incognito mode, + // unless the "enable_incognito" feature parameter is true. if (base::FeatureList::IsEnabled( features::kCookieDeprecationFacilitatedTesting) && - !is_in_memory()) { + (!is_in_memory() || + features::kCookieDeprecationFacilitatedTestingEnableIncognito.Get())) { cookie_deprecation_label_manager_ = std::make_unique<CookieDeprecationLabelManagerImpl>(browser_context_); }
diff --git a/content/browser/web_contents/web_contents_observer_browsertest.cc b/content/browser/web_contents/web_contents_observer_browsertest.cc index f998cae..81adfaa 100644 --- a/content/browser/web_contents/web_contents_observer_browsertest.cc +++ b/content/browser/web_contents/web_contents_observer_browsertest.cc
@@ -371,8 +371,8 @@ } // namespace -// TODO(https://crbug.com/1288573): Flaky on Mac and Android. -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_ANDROID) +// TODO(https://crbug.com/1288573): Flaky on Windows, Mac, and Android. +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_ANDROID) #define MAYBE_CookieCallbacks_MainFrame DISABLED_CookieCallbacks_MainFrame #else #define MAYBE_CookieCallbacks_MainFrame CookieCallbacks_MainFrame
diff --git a/content/public/android/BUILD.gn b/content/public/android/BUILD.gn index 4715ea77..37c59e5 100644 --- a/content/public/android/BUILD.gn +++ b/content/public/android/BUILD.gn
@@ -596,7 +596,6 @@ "javatests/src/org/chromium/content/browser/ChildProcessLauncherTest.java", "javatests/src/org/chromium/content/browser/ClipboardTest.java", "javatests/src/org/chromium/content/browser/ContactsProviderTest.java", - "javatests/src/org/chromium/content/browser/ContentCommandLineTest.java", "javatests/src/org/chromium/content/browser/ContentTextSelectionTest.java", "javatests/src/org/chromium/content/browser/ContentViewLocationTest.java", "javatests/src/org/chromium/content/browser/ContentViewPointerTypeTest.java",
diff --git a/content/public/android/javatests/src/org/chromium/content/browser/ContentCommandLineTest.java b/content/public/android/javatests/src/org/chromium/content/browser/ContentCommandLineTest.java deleted file mode 100644 index 6b24ce7..0000000 --- a/content/public/android/javatests/src/org/chromium/content/browser/ContentCommandLineTest.java +++ /dev/null
@@ -1,145 +0,0 @@ -// Copyright 2013 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.content.browser; - -import androidx.test.filters.MediumTest; - -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; - -import org.chromium.base.CommandLine; -import org.chromium.base.test.BaseJUnit4ClassRunner; -import org.chromium.base.test.util.Feature; -import org.chromium.content_public.browser.test.NativeLibraryTestUtils; -import org.chromium.content_shell_apk.ContentShellApplication; - -/** - * Test class for command lines. - */ -@RunWith(BaseJUnit4ClassRunner.class) -public class ContentCommandLineTest { - // A reference command line. Note that switch2 is [brea\d], switch3 is [and "butter"], - // and switch4 is [a "quoted" 'food'!] - static final String INIT_SWITCHES[] = { "init_command", "--switch", "Arg", - "--switch2=brea\\d", "--switch3=and \"butter\"", - "--switch4=a \"quoted\" 'food'!", - "--", "--actually_an_arg" }; - - // The same command line, but in quoted string format. - static final char INIT_SWITCHES_BUFFER[] = - ("init_command --switch Arg --switch2=brea\\d --switch3=\"and \\\"butt\"er\\\" " - + "--switch4='a \"quoted\" \\'food\\'!' " - + "-- --actually_an_arg").toCharArray(); - - static final String CL_ADDED_SWITCH = "zappo-dappo-doggy-trainer"; - static final String CL_ADDED_SWITCH_2 = "username"; - static final String CL_ADDED_VALUE_2 = "bozo"; - - @Before - public void setUp() { - CommandLine.reset(); - } - - void loadJni() { - Assert.assertFalse(CommandLine.getInstance().isNativeImplementation()); - NativeLibraryTestUtils.loadNativeLibraryNoBrowserProcess(); - Assert.assertTrue(CommandLine.getInstance().isNativeImplementation()); - } - - void checkInitSwitches() { - CommandLine cl = CommandLine.getInstance(); - Assert.assertFalse(cl.hasSwitch("init_command")); - Assert.assertTrue(cl.hasSwitch("switch")); - Assert.assertFalse(cl.hasSwitch("--switch")); - Assert.assertFalse(cl.hasSwitch("arg")); - Assert.assertFalse(cl.hasSwitch("actually_an_arg")); - Assert.assertEquals("brea\\d", cl.getSwitchValue("switch2")); - Assert.assertEquals("and \"butter\"", cl.getSwitchValue("switch3")); - Assert.assertEquals("a \"quoted\" 'food'!", cl.getSwitchValue("switch4")); - Assert.assertNull(cl.getSwitchValue("switch")); - Assert.assertNull(cl.getSwitchValue("non-existant")); - } - - void checkSettingThenGetting() { - CommandLine cl = CommandLine.getInstance(); - - // Add a plain switch. - Assert.assertFalse(cl.hasSwitch(CL_ADDED_SWITCH)); - cl.appendSwitch(CL_ADDED_SWITCH); - Assert.assertTrue(cl.hasSwitch(CL_ADDED_SWITCH)); - - // Add a switch paired with a value. - Assert.assertFalse(cl.hasSwitch(CL_ADDED_SWITCH_2)); - Assert.assertNull(cl.getSwitchValue(CL_ADDED_SWITCH_2)); - cl.appendSwitchWithValue(CL_ADDED_SWITCH_2, CL_ADDED_VALUE_2); - Assert.assertTrue(CL_ADDED_VALUE_2.equals(cl.getSwitchValue(CL_ADDED_SWITCH_2))); - - // Append a few new things. - final String switchesAndArgs[] = { "dummy", "--superfast", "--speed=turbo" }; - Assert.assertFalse(cl.hasSwitch("dummy")); - Assert.assertFalse(cl.hasSwitch("superfast")); - Assert.assertNull(cl.getSwitchValue("speed")); - cl.appendSwitchesAndArguments(switchesAndArgs); - Assert.assertFalse(cl.hasSwitch("dummy")); - Assert.assertFalse(cl.hasSwitch("command")); - Assert.assertTrue(cl.hasSwitch("superfast")); - Assert.assertTrue("turbo".equals(cl.getSwitchValue("speed"))); - } - - void checkAppendedSwitchesPassedThrough() { - CommandLine cl = CommandLine.getInstance(); - Assert.assertTrue(cl.hasSwitch(CL_ADDED_SWITCH)); - Assert.assertTrue(cl.hasSwitch(CL_ADDED_SWITCH_2)); - Assert.assertTrue(CL_ADDED_VALUE_2.equals(cl.getSwitchValue(CL_ADDED_SWITCH_2))); - } - - @Test - @MediumTest - @Feature({"Android-AppBase"}) - public void testJavaNativeTransition() { - CommandLine.init(INIT_SWITCHES); - checkInitSwitches(); - loadJni(); - checkInitSwitches(); - checkSettingThenGetting(); - } - - @Test - @MediumTest - @Feature({"Android-AppBase"}) - public void testJavaNativeTransitionAfterAppends() { - CommandLine.init(INIT_SWITCHES); - checkInitSwitches(); - checkSettingThenGetting(); - loadJni(); - checkInitSwitches(); - checkAppendedSwitchesPassedThrough(); - } - - @Test - @MediumTest - @Feature({"Android-AppBase"}) - public void testNativeInitialization() { - CommandLine.init(null); - loadJni(); - // Drop the program name for use with appendSwitchesAndArguments. - String[] args = new String[INIT_SWITCHES.length - 1]; - System.arraycopy(INIT_SWITCHES, 1, args, 0, args.length); - CommandLine.getInstance().appendSwitchesAndArguments(args); - checkInitSwitches(); - checkSettingThenGetting(); - } - - @Test - @MediumTest - @Feature({"Android-AppBase"}) - public void testFileInitialization() { - CommandLine.initFromFile(ContentShellApplication.COMMAND_LINE_FILE); - loadJni(); - checkSettingThenGetting(); - } -}
diff --git a/content/public/common/content_features.cc b/content/public/common/content_features.cc index 9f643c7b..412f7e9 100644 --- a/content/public/common/content_features.cc +++ b/content/public/common/content_features.cc
@@ -170,6 +170,11 @@ "CookieDeprecationFacilitatedTesting", base::FEATURE_DISABLED_BY_DEFAULT); +// Set whether to enable cookie deprecation API in incognito mode. +const base::FeatureParam<bool> + kCookieDeprecationFacilitatedTestingEnableIncognito{ + &kCookieDeprecationFacilitatedTesting, "enable_incognito", false}; + // Enables Blink cooperative scheduling. BASE_FEATURE(kCooperativeScheduling, "CooperativeScheduling",
diff --git a/content/public/common/content_features.h b/content/public/common/content_features.h index f6e890d..c19e008 100644 --- a/content/public/common/content_features.h +++ b/content/public/common/content_features.h
@@ -49,6 +49,8 @@ kClearCrossSiteCrossBrowsingContextGroupWindowName); CONTENT_EXPORT BASE_DECLARE_FEATURE(kCompositeBGColorAnimation); CONTENT_EXPORT BASE_DECLARE_FEATURE(kCookieDeprecationFacilitatedTesting); +CONTENT_EXPORT extern const base::FeatureParam<bool> + kCookieDeprecationFacilitatedTestingEnableIncognito; CONTENT_EXPORT BASE_DECLARE_FEATURE(kCooperativeScheduling); CONTENT_EXPORT BASE_DECLARE_FEATURE(kCrashReporting); CONTENT_EXPORT BASE_DECLARE_FEATURE(kDevicePosture);
diff --git a/content/services/auction_worklet/bidder_worklet_unittest.cc b/content/services/auction_worklet/bidder_worklet_unittest.cc index ca53779..39eb2bc 100644 --- a/content/services/auction_worklet/bidder_worklet_unittest.cc +++ b/content/services/auction_worklet/bidder_worklet_unittest.cc
@@ -3182,7 +3182,7 @@ constexpr char kTrustedSignalsResponse[] = R"({"keys":{"1":1}})"; constexpr char kJsonResponse[] = "{}"; constexpr char kDirectFromSellerSignalsHeaders[] = - "Ad-Auction-Allowed: true\nX-FLEDGE-Auction-Only: true"; + "Ad-Auction-Allowed: true\nAd-Auction-Only: true"; direct_from_seller_per_buyer_signals_ = GURL("https://url.test/perbuyersignals"); @@ -3278,7 +3278,7 @@ constexpr char kRawReturnValue[] = R"({bid: 1, render:"https://response.test/"})"; constexpr char kDirectFromSellerSignalsHeaders[] = - "Ad-Auction-Allowed: true\nX-FLEDGE-Auction-Only: true"; + "Ad-Auction-Allowed: true\nAd-Auction-Only: true"; for (bool late_direct_from_seller_signals : {false, true}) { SCOPED_TRACE(late_direct_from_seller_signals); @@ -5399,7 +5399,7 @@ TEST_F(BidderWorkletTest, ReportWinLoadCompletionOrder) { constexpr char kJsonResponse[] = "{}"; constexpr char kDirectFromSellerSignalsHeaders[] = - "Ad-Auction-Allowed: true\nX-FLEDGE-Auction-Only: true"; + "Ad-Auction-Allowed: true\nAd-Auction-Only: true"; direct_from_seller_per_buyer_signals_ = GURL("https://url.test/perbuyersignals");
diff --git a/content/services/auction_worklet/seller_worklet_unittest.cc b/content/services/auction_worklet/seller_worklet_unittest.cc index d8b3e5e..84a61fbb 100644 --- a/content/services/auction_worklet/seller_worklet_unittest.cc +++ b/content/services/auction_worklet/seller_worklet_unittest.cc
@@ -2236,7 +2236,7 @@ TEST_F(SellerWorkletTest, ScoreAdLoadCompletionOrder) { constexpr char kJsonResponse[] = "{}"; constexpr char kDirectFromSellerSignalsHeaders[] = - "Ad-Auction-Allowed: true\nX-FLEDGE-Auction-Only: true"; + "Ad-Auction-Allowed: true\nAd-Auction-Only: true"; direct_from_seller_seller_signals_ = GURL("https://url.test/sellersignals"); direct_from_seller_auction_signals_ = GURL("https://url.test/auctionsignals"); @@ -2339,7 +2339,7 @@ } )"; constexpr char kDirectFromSellerSignalsHeaders[] = - "Ad-Auction-Allowed: true\nX-FLEDGE-Auction-Only: true"; + "Ad-Auction-Allowed: true\nAd-Auction-Only: true"; direct_from_seller_seller_signals_ = GURL("https://url.test/sellersignals"); direct_from_seller_auction_signals_ = GURL("https://url.test/auctionsignals"); @@ -3219,7 +3219,7 @@ TEST_F(SellerWorkletTest, ReportResultLoadCompletionOrder) { constexpr char kJsonResponse[] = "{}"; constexpr char kDirectFromSellerSignalsHeaders[] = - "Ad-Auction-Allowed: true\nX-FLEDGE-Auction-Only: true"; + "Ad-Auction-Allowed: true\nAd-Auction-Only: true"; direct_from_seller_seller_signals_ = GURL("https://url.test/sellersignals"); direct_from_seller_auction_signals_ = GURL("https://url.test/auctionsignals");
diff --git a/content/test/content_test_bundle_data.filelist b/content/test/content_test_bundle_data.filelist index 654f06a4..eaf5bfa2 100644 --- a/content/test/content_test_bundle_data.filelist +++ b/content/test/content_test_bundle_data.filelist
@@ -6193,6 +6193,7 @@ data/interest_group/page_with_custom_ad_auction_result_header.html.mock-http-headers data/interest_group/page_with_custom_ad_auction_result_header2.html data/interest_group/page_with_custom_ad_auction_result_header2.html.mock-http-headers +data/interest_group/schemaV16.sql data/interest_group/schemaV6.sql data/interest_group/trusted_bidding_signals.json data/interest_group/trusted_bidding_signals.json.mock-http-headers
diff --git a/content/test/data/attribution_reporting/interop/default_config.json b/content/test/data/attribution_reporting/interop/default_config.json index 1f12cbe..ec6582e8 100644 --- a/content/test/data/attribution_reporting/interop/default_config.json +++ b/content/test/data/attribution_reporting/interop/default_config.json
@@ -70,14 +70,6 @@ // storage per destination. Formatted as a base-10 string. "max_event_level_reports_per_destination": "1024", - // Positive integer that controls how many times a navigation source can create - // an event-level report. Formatted as a base-10 string. - "max_attributions_per_navigation_source": "3", - - // Positive integer that controls how many times an event source can create - // an event-level report. Formatted as a base-10 string. - "max_attributions_per_event_source": "1", - // Positive double that controls the max channel capacity in bits for // navigation sources. "max_navigation_info_gain": "11.46173",
diff --git a/content/test/data/interest_group/schemaV16.sql b/content/test/data/interest_group/schemaV16.sql new file mode 100644 index 0000000..ad19313 --- /dev/null +++ b/content/test/data/interest_group/schemaV16.sql
@@ -0,0 +1,37 @@ +PRAGMA foreign_keys=OFF; +BEGIN TRANSACTION; +CREATE TABLE meta(key LONGVARCHAR NOT NULL UNIQUE PRIMARY KEY, value LONGVARCHAR); +INSERT INTO meta VALUES('mmap_status','-1'); +INSERT INTO meta VALUES('last_compatible_version','6'); +INSERT INTO meta VALUES('version','16'); +CREATE TABLE win_history( + owner TEXT NOT NULL, name TEXT NOT NULL, win_time INTEGER NOT NULL, ad TEXT NOT NULL, + FOREIGN KEY(owner, name) REFERENCES interest_groups); +CREATE TABLE IF NOT EXISTS "join_history"(owner TEXT NOT NULL,name TEXT NOT NULL,join_time INTEGER NOT NULL,count INTEGER NOT NULL,PRIMARY KEY(owner, name, join_time) FOREIGN KEY(owner,name) REFERENCES interest_groups); +INSERT INTO join_history VALUES('https://owner.example.com','group1',13291257600000000,4); +INSERT INTO join_history VALUES('https://owner.example.com','group1',13291344000000000,1); +INSERT INTO join_history VALUES('https://owner.example.com','group2',13291257600000000,4); +INSERT INTO join_history VALUES('https://owner.example.com','group2',13291344000000000,1); +INSERT INTO join_history VALUES('https://owner.example.com','group3',13291257600000000,3); +INSERT INTO join_history VALUES('https://owner.example.com','group3',13291344000000000,1); +CREATE TABLE IF NOT EXISTS "bid_history"(owner TEXT NOT NULL,name TEXT NOT NULL,bid_time INTEGER NOT NULL,count INTEGER NOT NULL,PRIMARY KEY(owner, name, bid_time) FOREIGN KEY(owner,name) REFERENCES interest_groups); +INSERT INTO bid_history VALUES('https://owner.example.com','group1',13291257600000000,2); +INSERT INTO bid_history VALUES('https://owner.example.com','group1',13291344000000000,2); +INSERT INTO bid_history VALUES('https://owner.example.com','group2',13291257600000000,1); +INSERT INTO bid_history VALUES('https://owner.example.com','group2',13291344000000000,2); +INSERT INTO bid_history VALUES('https://owner.example.com','group3',13291257600000000,2); +INSERT INTO bid_history VALUES('https://owner.example.com','group3',13291344000000000,2); +CREATE TABLE k_anon(last_referenced_time INTEGER NOT NULL,key TEXT NOT NULL,is_k_anon INTEGER NOT NULL,last_k_anon_updated_time INTEGER NOT NULL,last_reported_to_anon_server_time INTEGER NOT NULL,PRIMARY KEY(key)); +INSERT INTO k_anon VALUES(13291340603098283,replace('AdBid\nhttps://owner.example.com/\nhttps://owner.example.com/bidder.js\nhttps://ads.example.com/1','\n',char(10)),1,-9223372036854775808,-9223372036854775808); +INSERT INTO k_anon VALUES(13291340603098283,replace('AdBid\nhttps://owner.example2.com/\nhttps://owner.example2.com/bidder.js\nhttps://ads.example2.com/1','\n',char(10)),1,-9223372036854775808,-9223372036854775800); +CREATE TABLE IF NOT EXISTS "interest_groups"(expiration INTEGER NOT NULL,last_updated INTEGER NOT NULL,next_update_after INTEGER NOT NULL,owner TEXT NOT NULL,joining_origin TEXT NOT NULL,exact_join_time INTEGER NOT NULL,name TEXT NOT NULL,priority DOUBLE NOT NULL,enable_bidding_signals_prioritization INTEGER NOT NULL,priority_vector TEXT NOT NULL,priority_signals_overrides TEXT NOT NULL,seller_capabilities TEXT NOT NULL,all_sellers_capabilities INTEGER NOT NULL,execution_mode INTEGER NOT NULL,joining_url TEXT NOT NULL,bidding_url TEXT NOT NULL,bidding_wasm_helper_url TEXT NOT NULL,update_url TEXT NOT NULL,trusted_bidding_signals_url TEXT NOT NULL,trusted_bidding_signals_keys TEXT NOT NULL,user_bidding_signals TEXT,ads_pb BLOB NOT NULL,ad_components_pb BLOB NOT NULL,ad_sizes TEXT NOT NULL,size_groups TEXT NOT NULL,auction_server_request_flags INTEGER NOT NULL,additional_bid_key BLOB NOT NULL,PRIMARY KEY(owner,name)); +INSERT INTO interest_groups VALUES(13293932603076872,13291340603081533,-9223372036854775808,'https://owner.example.com','https://publisher.example.com',13291340603081533,'group1',0.0,0,'','','',0,0,'https://publisher.example.com/page1.html','https://owner.example.com/bidder.js','','https://owner.example.com/update','https://owner.example.com/signals','["group1"]','[["1","2"]]',X'0a2f0a1968747470733a2f2f6164732e6578616d706c652e636f6d2f311a125b2234222c2235222c6e756c6c2c2236225d',X'','','',0,X''); +INSERT INTO interest_groups VALUES(13293932603080090,13291340603089914,-9223372036854775808,'https://owner.example.com','https://publisher.example.com',13291340603089914,'group2',0.0,0,'','','',0,0,'https://publisher.example.com/page2.html','https://owner.example.com/bidder.js','','https://owner.example.com/update','https://owner.example.com/signals','["group2"]','[["1","3"]]',X'0a2f0a1968747470733a2f2f6164732e6578616d706c652e636f6d2f311a125b2234222c2235222c6e756c6c2c2236225d',X'','','',0,X''); +INSERT INTO interest_groups VALUES(13293932603052561,13291340603098283,-9223372036854775808,'https://owner.example.com','https://publisher.example.com',13291340603098283,'group3',0.0,0,'','','',0,0,'https://publisher.example.com/page3.html','https://owner.example.com/bidder.js','','https://owner.example.com/update','https://owner.example.com/signals','["group3"]','[["3","2"]]',X'0a2f0a1968747470733a2f2f6164732e6578616d706c652e636f6d2f311a125b2234222c2235222c6e756c6c2c2236225d',X'','','',0,X''); +CREATE INDEX win_history_index +ON win_history(owner, name, win_time DESC); +CREATE INDEX k_anon_last_referenced_time ON k_anon(last_referenced_time DESC); +CREATE INDEX interest_group_expiration ON interest_groups(expiration DESC, owner, name); +CREATE INDEX interest_group_owner ON interest_groups(owner,expiration DESC,next_update_after ASC,name); +CREATE INDEX interest_group_joining_origin ON interest_groups(joining_origin, expiration DESC, owner, name); +COMMIT;
diff --git a/content/test/gpu/gpu_tests/test_expectations/webgl2_conformance_expectations.txt b/content/test/gpu/gpu_tests/test_expectations/webgl2_conformance_expectations.txt index ee31ac70..fd6e970 100644 --- a/content/test/gpu/gpu_tests/test_expectations/webgl2_conformance_expectations.txt +++ b/content/test/gpu/gpu_tests/test_expectations/webgl2_conformance_expectations.txt
@@ -475,6 +475,7 @@ ## Metal AMD ## +crbug.com/angleproject/6430 [ amd-0x679e angle-metal monterey passthrough ] conformance2/textures/misc/tex-srgb-mipmap.html [ Failure ] crbug.com/angleproject/6430 [ mac passthrough angle-metal amd ] deqp/functional/gles3/pixelbufferobject.html [ Failure ] crbug.com/angleproject/6430 [ mac passthrough angle-metal amd ] deqp/functional/gles3/shaderpackingfunction.html [ Failure ] crbug.com/angleproject/6430 [ mac passthrough angle-metal amd ] deqp/functional/gles3/textureshadow/2d_array_nearest_mipmap_nearest_greater_or_equal.html [ Failure ] @@ -493,19 +494,29 @@ crbug.com/angleproject/7425 [ mac passthrough angle-metal amd ] deqp/functional/gles3/texturespecification/texstorage3d_format_depth_stencil.html [ Failure ] crbug.com/1316389 [ amd-0x67ef angle-metal passthrough ventura ] deqp/functional/gles3/fboinvalidate/default.html [ Failure ] +crbug.com/1316389 [ amd-0x679e angle-metal passthrough monterey ] deqp/functional/gles3/fboinvalidate/default.html [ Failure ] crbug.com/1316389 [ mac passthrough angle-metal amd ] deqp/functional/gles3/transformfeedback/basic_types_interleaved_points.html [ Failure ] crbug.com/1316389 [ amd-0x67ef angle-metal passthrough ventura ] deqp/functional/gles3/transformfeedback/basic_types_separate_points.html [ Failure ] +crbug.com/1316389 [ amd-0x679e angle-metal passthrough monterey ] deqp/functional/gles3/transformfeedback/basic_types_separate_points.html [ Failure ] crbug.com/1316389 [ amd-0x67ef angle-metal passthrough ventura ] deqp/functional/gles3/transformfeedback/interpolation_centroid.html [ Failure ] +crbug.com/1316389 [ amd-0x679e angle-metal passthrough monterey ] deqp/functional/gles3/transformfeedback/interpolation_centroid.html [ Failure ] crbug.com/1316389 [ amd-0x67ef angle-metal passthrough ventura ] deqp/functional/gles3/transformfeedback/interpolation_flat.html [ Failure ] +crbug.com/1316389 [ amd-0x679e angle-metal passthrough monterey ] deqp/functional/gles3/transformfeedback/interpolation_flat.html [ Failure ] crbug.com/1316389 [ amd-0x67ef angle-metal passthrough ventura ] deqp/functional/gles3/transformfeedback/interpolation_smooth.html [ Failure ] +crbug.com/1316389 [ amd-0x679e angle-metal passthrough monterey ] deqp/functional/gles3/transformfeedback/interpolation_smooth.html [ Failure ] crbug.com/1316389 [ amd-0x67ef angle-metal passthrough ventura ] deqp/functional/gles3/transformfeedback/point_size.html [ Failure ] +crbug.com/1316389 [ amd-0x679e angle-metal passthrough monterey ] deqp/functional/gles3/transformfeedback/point_size.html [ Failure ] crbug.com/1316389 [ amd-0x67ef angle-metal passthrough ventura ] deqp/functional/gles3/transformfeedback/random_interleaved_points.html [ Failure ] +crbug.com/1316389 [ amd-0x679e angle-metal passthrough monterey ] deqp/functional/gles3/transformfeedback/random_interleaved_points.html [ Failure ] crbug.com/1316389 [ amd-0x67ef angle-metal passthrough ventura ] deqp/functional/gles3/transformfeedback/random_separate_points.html [ Failure ] +crbug.com/1316389 [ amd-0x679e angle-metal passthrough monterey ] deqp/functional/gles3/transformfeedback/random_separate_points.html [ Failure ] crbug.com/1435021 [ mac amd-0x67ef angle-metal ] conformance/textures/misc/texture-active-bind.html [ RetryOnFailure ] crbug.com/1435021 [ mac amd-0x67ef angle-metal ] conformance/textures/misc/texture-active-bind-2.html [ RetryOnFailure ] crbug.com/1435021 [ mac amd-0x67ef angle-metal ] conformance/canvas/draw-webgl-to-canvas-test.html [ RetryOnFailure ] crbug.com/1421437 [ mac amd-0x67ef angle-metal ] conformance2/extensions/webgl-shader-pixel-local-storage.html [ Failure ] +crbug.com/1421437 [ mac amd-0x679e angle-metal ] conformance2/extensions/webgl-shader-pixel-local-storage.html [ Failure ] +crbug.com/641209 [ mac amd-0x679e angle-metal ] deqp/functional/gles3/fbomultisample* [ Failure ] crbug.com/1474883 [ mac amd angle-metal ] deqp/functional/gles3/texturespecification/teximage3d_depth.html [ Failure ] ## Metal Intel ##
diff --git a/device/fido/features.cc b/device/fido/features.cc index fd01a20c..a358428 100644 --- a/device/fido/features.cc +++ b/device/fido/features.cc
@@ -64,10 +64,10 @@ "WebAuthenticationAndroidCredMan", base::FEATURE_DISABLED_BY_DEFAULT); -// Not yet enabled by default. +// Enabled in M118. Remove in or after M121. BASE_FEATURE(kWebAuthnAndroidCredManForHybrid, "WebAuthenticationAndroidCredManForHybrid", - base::FEATURE_DISABLED_BY_DEFAULT); + base::FEATURE_ENABLED_BY_DEFAULT); // Added in M118, Not yet enabled by default. BASE_FEATURE(kWebAuthnAndroidCredManAndGmsCore,
diff --git a/docs/mac/arc.md b/docs/mac/arc.md index 2c79230..aedee5d 100644 --- a/docs/mac/arc.md +++ b/docs/mac/arc.md
@@ -37,7 +37,7 @@ thinking about ARC is that, while in classic manual reference counting, those pointers are raw pointers and the programmer is in charge of writing the appropriate retain and release messages, with ARC, all pointers to Objective-C -objects are smart pointers: +objects are smart pointers, indicated by the following qualifications: - `__strong` (default): This pointer maintains a strong reference to the object. When an object pointer is assigned to it, that object is sent a retain @@ -70,6 +70,47 @@ Incorrect annotations will cause incorrect reference counting; annotate the code correctly to fix issues with the compiler-generated reference counting. +## ARC and C++ standard library containers {#cxx-containers} + +The most important interaction between ARC and C++ is that when you instantiate +a template on an Objective-C type, it [implicitly +qualifies](https://clang.llvm.org/docs/AutomaticReferenceCounting.html#template-arguments) +the Objective-C type with `__strong`. For example, + +```objectivecpp + std::vector<NSWindow*> +``` + +is equivalent to + +```objectivecpp + std::vector<NSWindow* __strong> +``` + +and you need to make sure that you understand the implications of taking strong +references to those `NSWindow`s, even if `__strong` was not explicitly written. + +One might therefore want to explicitly qualify with `__weak`. While that is fine +for some C++ standard library containers, like `std::vector`, one must not use +`__weak` qualification in any tree or hash-based container, such as `std::map` +or `std::set`. + +First, it's explicitly undefined behavior (UB). Containers that rely on looking +up a value by either direct comparison or hash comparison rely on the values +that are currently in the container not changing out underneath it. The main +feature of `__weak` is that it nils itself out when there are no more strong +references to it, and that behavior will break comparison-based containers. + +Second, at a higher “consider what it means to be a set” level, what would +happen if you had a set or map where two entries that started out as different +values now both nilled themselves out? That would break the invariant that there +be no duplicate entries. + +The only C++ standard library containers in which it is safe to put `__weak` +objects are those that merely move and copy them around, but perform no other +processing or lookup on them. Arrays, vectors, and lists are fine; sets and maps +are not. + ## ARC in Chromium {#conventions} ### When to use ARC {#conventions-when}
diff --git a/docs/security/research/graphics/resources/chromeoffensiv--25zv8cth637j.png b/docs/security/research/graphics/resources/chromeoffensiv--25zv8cth637j.png new file mode 100644 index 0000000..0f0be830 --- /dev/null +++ b/docs/security/research/graphics/resources/chromeoffensiv--25zv8cth637j.png Binary files differ
diff --git a/docs/security/research/graphics/resources/chromeoffensiv--594gh2o328e.jpg b/docs/security/research/graphics/resources/chromeoffensiv--594gh2o328e.jpg new file mode 100644 index 0000000..8748504 --- /dev/null +++ b/docs/security/research/graphics/resources/chromeoffensiv--594gh2o328e.jpg Binary files differ
diff --git a/docs/security/research/graphics/resources/chromeoffensiv--6mue8ablsri.png b/docs/security/research/graphics/resources/chromeoffensiv--6mue8ablsri.png new file mode 100644 index 0000000..8e52db0 --- /dev/null +++ b/docs/security/research/graphics/resources/chromeoffensiv--6mue8ablsri.png Binary files differ
diff --git a/docs/security/research/graphics/resources/chromeoffensiv--86bdvm4zaei.jpg b/docs/security/research/graphics/resources/chromeoffensiv--86bdvm4zaei.jpg new file mode 100644 index 0000000..8f038e0 --- /dev/null +++ b/docs/security/research/graphics/resources/chromeoffensiv--86bdvm4zaei.jpg Binary files differ
diff --git a/docs/security/research/graphics/resources/chromeoffensiv--ct2njhd1x14.png b/docs/security/research/graphics/resources/chromeoffensiv--ct2njhd1x14.png new file mode 100644 index 0000000..d6d02e70 --- /dev/null +++ b/docs/security/research/graphics/resources/chromeoffensiv--ct2njhd1x14.png Binary files differ
diff --git a/docs/security/research/graphics/resources/chromeoffensiv--dxtg69vpyxl.jpg b/docs/security/research/graphics/resources/chromeoffensiv--dxtg69vpyxl.jpg new file mode 100644 index 0000000..aca40866 --- /dev/null +++ b/docs/security/research/graphics/resources/chromeoffensiv--dxtg69vpyxl.jpg Binary files differ
diff --git a/docs/security/research/graphics/resources/chromeoffensiv--fci4atgmk2e.png b/docs/security/research/graphics/resources/chromeoffensiv--fci4atgmk2e.png new file mode 100644 index 0000000..1bab0d09 --- /dev/null +++ b/docs/security/research/graphics/resources/chromeoffensiv--fci4atgmk2e.png Binary files differ
diff --git a/docs/security/research/graphics/resources/chromeoffensiv--gms7nqwczp.png b/docs/security/research/graphics/resources/chromeoffensiv--gms7nqwczp.png new file mode 100644 index 0000000..6fe21fa3 --- /dev/null +++ b/docs/security/research/graphics/resources/chromeoffensiv--gms7nqwczp.png Binary files differ
diff --git a/docs/security/research/graphics/resources/chromeoffensiv--hummy4droud.png b/docs/security/research/graphics/resources/chromeoffensiv--hummy4droud.png new file mode 100644 index 0000000..c0f6817 --- /dev/null +++ b/docs/security/research/graphics/resources/chromeoffensiv--hummy4droud.png Binary files differ
diff --git a/docs/security/research/graphics/resources/chromeoffensiv--i5ooq44jbrq.jpg b/docs/security/research/graphics/resources/chromeoffensiv--i5ooq44jbrq.jpg new file mode 100644 index 0000000..69d7586 --- /dev/null +++ b/docs/security/research/graphics/resources/chromeoffensiv--i5ooq44jbrq.jpg Binary files differ
diff --git a/docs/security/research/graphics/resources/chromeoffensiv--m5a1m5mf2h.jpg b/docs/security/research/graphics/resources/chromeoffensiv--m5a1m5mf2h.jpg new file mode 100644 index 0000000..c5cc121 --- /dev/null +++ b/docs/security/research/graphics/resources/chromeoffensiv--m5a1m5mf2h.jpg Binary files differ
diff --git a/docs/security/research/graphics/resources/chromeoffensiv--nb3icxsvqik.png b/docs/security/research/graphics/resources/chromeoffensiv--nb3icxsvqik.png new file mode 100644 index 0000000..065267b --- /dev/null +++ b/docs/security/research/graphics/resources/chromeoffensiv--nb3icxsvqik.png Binary files differ
diff --git a/docs/security/research/graphics/resources/chromeoffensiv--suavcw9636c.jpg b/docs/security/research/graphics/resources/chromeoffensiv--suavcw9636c.jpg new file mode 100644 index 0000000..3786b2a --- /dev/null +++ b/docs/security/research/graphics/resources/chromeoffensiv--suavcw9636c.jpg Binary files differ
diff --git a/docs/security/research/graphics/resources/chromeoffensiv--ttzz54pb83l.jpg b/docs/security/research/graphics/resources/chromeoffensiv--ttzz54pb83l.jpg new file mode 100644 index 0000000..c8742e1e --- /dev/null +++ b/docs/security/research/graphics/resources/chromeoffensiv--ttzz54pb83l.jpg Binary files differ
diff --git a/docs/security/research/graphics/resources/chromeoffensiv--umacwcr8c1p.jpg b/docs/security/research/graphics/resources/chromeoffensiv--umacwcr8c1p.jpg new file mode 100644 index 0000000..44539955 --- /dev/null +++ b/docs/security/research/graphics/resources/chromeoffensiv--umacwcr8c1p.jpg Binary files differ
diff --git a/docs/security/research/graphics/resources/chromeoffensiv--utbsiqyq43e.jpg b/docs/security/research/graphics/resources/chromeoffensiv--utbsiqyq43e.jpg new file mode 100644 index 0000000..ec8603a --- /dev/null +++ b/docs/security/research/graphics/resources/chromeoffensiv--utbsiqyq43e.jpg Binary files differ
diff --git a/docs/security/research/graphics/resources/chromeoffensiv--vcq2rype4h7.jpg b/docs/security/research/graphics/resources/chromeoffensiv--vcq2rype4h7.jpg new file mode 100644 index 0000000..a6def4d3 --- /dev/null +++ b/docs/security/research/graphics/resources/chromeoffensiv--vcq2rype4h7.jpg Binary files differ
diff --git a/docs/security/research/graphics/resources/chromeoffensiv--x4oroth0usm.jpg b/docs/security/research/graphics/resources/chromeoffensiv--x4oroth0usm.jpg new file mode 100644 index 0000000..1701bd5 --- /dev/null +++ b/docs/security/research/graphics/resources/chromeoffensiv--x4oroth0usm.jpg Binary files differ
diff --git a/docs/security/research/graphics/resources/chromeoffensiv--xef89t24uli.jpg b/docs/security/research/graphics/resources/chromeoffensiv--xef89t24uli.jpg new file mode 100644 index 0000000..7897493 --- /dev/null +++ b/docs/security/research/graphics/resources/chromeoffensiv--xef89t24uli.jpg Binary files differ
diff --git a/docs/security/research/graphics/resources/chromeoffensiv--y3qar9s40vd.jpg b/docs/security/research/graphics/resources/chromeoffensiv--y3qar9s40vd.jpg new file mode 100644 index 0000000..4b44902 --- /dev/null +++ b/docs/security/research/graphics/resources/chromeoffensiv--y3qar9s40vd.jpg Binary files differ
diff --git a/docs/security/research/graphics/resources/dawn_wgsl_pipeline.png b/docs/security/research/graphics/resources/dawn_wgsl_pipeline.png new file mode 100644 index 0000000..2f57f8cb --- /dev/null +++ b/docs/security/research/graphics/resources/dawn_wgsl_pipeline.png Binary files differ
diff --git a/docs/security/research/graphics/webgpu_technical_report.md b/docs/security/research/graphics/webgpu_technical_report.md new file mode 100644 index 0000000..2ca897fb --- /dev/null +++ b/docs/security/research/graphics/webgpu_technical_report.md
@@ -0,0 +1,969 @@ +# WebGPU Technical Report + +Authors: [tiszka@chromium.org](mailto:tiszka@chromium.org), +[bookholt@chromium.org](mailto:bookholt@chromium.org), +[mattdr@chromium.org](mailto:mattdr@chromium.org) + +## Chrome Graphics as Seen By Attackers + +In this document we outline how WebGPU works through the mind of an attacker, +our vulnerability research methodologies, and our thought processes in some of +the more difficult research areas. There are many interesting portions of Chrome +graphics that we omitted from review to keep scope manageable. While our primary +focus was WebGPU, we did explore a few attack surfaces shared by other graphics +features. We will interleave background information on WebGPU with descriptions +of the important bugs we found. We hope this report will give the security +community a deeper understanding of the shape of vulnerabilities we may come to +expect with the addition of WebGPU, along with a lens into the vulnerabilities +we might encounter in the future. + +The graphics stack has long been an area of interest for Chrome Security. Before +we dive into WebGPU internals, consider the diagram below showing a simplified +view of the Chrome graphics architecture. + + + +Show above: Attackers' perspective of Chrome graphics. + +The Chrome process model uses sandboxing to create layered security boundaries +between untrusted content from the web and protected user data. However, the +rapid evolution and high complexity of Chrome's accelerated graphics features +coupled with their need to interface directly with drivers in the kernel, as +well as their implementation in memory-unsafe languages mean bugs in graphics +code are especially useful for bypassing Chrome sandbox boundaries. Furthermore, +although Chrome sets the industry standard for rapidly fixing security bugs and +quickly shipping updates to users, the presence and exposure of code supported +by third parties creates challenges to getting fixes to users rapidly that can +lengthen the period when a vulnerability may be viable for exploitation, +reducing the cost attackers must bear to sustain a capability. + +## Enter WebGPU + +WebGPU entered Origin Trial in mid-2022 marking the first time web developers +and users got to experience the new features. Coincidentally, the Chrome +Offensive Security team decided to look into WebGPU as our first major +research target. + +According to the [WebGPU spec](https://www.w3.org/TR/webgpu/), "WebGPU exposes +an API for performing operations, such as rendering and computation, on a +Graphics Processing Unit". Unlike WebGL, its predecessor that set out with +similar goals, WebGPU isn't an existing native API ported to the Web; WebGPU is +a new API designed to surface the functionality of existing graphics APIs like +Vulkan, Metal, and Direct3D. In the context of this document we will only be +discussing Vulkan as it is ubiquitously reachable on every platform that WebGPU +supports either through the GPU rendering pipeline or the software rendering +pipeline. + +WebGPU introduces two unique attack surfaces to Chrome that will come with their +own challenges: + ++ the WebGPU API Implementation which was added to the GPU process & renderer + process; and ++ the WGSL shader compiler added to the GPU process + +While they are related and shader compilation is accessible via web-exposed +APIs, they pose two unique challenges so we will dig into both attack surfaces +separately. + +To give you the big picture first, the diagram below shows the slice of the +Chrome graphics stack required for WebGPU. While WebGPU has many pieces and +inter-connections, we omitted a great many notable portions of Chrome's graphics +attack surface, including WebGL, Skia, Canvas2D, Widevine DRM, and video +decoding for the sake of avoiding complexity explosion. + + + +Shown above: The full Chrome WebGPU stack. + +## WebGPU API + +The **WebGPU** API is exposed via JavaScript which calls into **Dawn**, the +library within Chrome that implements WebGPU. + +**Dawn** is separated into two different libraries: **Dawn Wire** and **Dawn +Native**. **Dawn Wire** is a client-server implementation of **WebGPU**. When a +WebGPU API call is made from JavaScript the request is serialized in the +renderer process using the **Dawn Wire Client**, the serialized blob is passed +to the GPU process using WebGPU extensions to the Chrome GPU Command Buffer +([`WebGPUDecoderImpl`](https://source.chromium.org/chromium/chromium/src/+/main:gpu/command_buffer/service/webgpu_decoder_impl.cc;l=1768;drc=34ba1d95a41c614308175e932a2b121018891bbf)) +, and then deserialized in the GPU process by **Dawn Wire Server**.** Dawn Wire +Server **then calls into **Dawn Native** which is the "native" implementation of +WebGPU that wraps the underlying platform's GPU APIs. + +This portion of the review focused on the WebGPU API implementation from +**Blink** to **Dawn Backends**. We also chose to scope our review to Dawn's +**Vulkan Backend** because it is reachable on every WebGPU platform and it is +the only platform that's fuzzable with ClusterFuzz since most of the Vulkan +Backend code can be exercised without a physical GPU. + + + +Shown above: The subset of the Chrome WebGPU stack we focused on during this +portion of the review, with out-of-scope portions de-emphasized in white. + +### Finding: Incorrect State Tracking in Dawn Native leads to UAF + +> _**tl;dr - Systemic Concerns**_ +> +> Dawn has a pattern where objects hold a raw pointer to reference counted +> objects, assuming a reference is held elsewhere. This assumption can easily +> break with future changes to the code as we've seen in the browser process +> with Mojo handlers. Dawn should discourage this pattern to reduce +> use-after-free bugs. + +Interacting with WebGPU begins with requesting an `adapter` which is an object +wrapping a single instance of WebGPU and then a `device` which is a logical +instantiation of the `adapter`. + +```js +const gpuAdapter = await navigator.gpu.requestAdapter(); +const gpuDevice = await gpuAdapter.requestDevice(); + +/* Call WebGPU APIs */ +let buffer = gpuDevice.createBuffer(); +``` + +As shown in the picture below, under the covers, `gpuDevice.createBuffer` +creates an Oilpan managed **WebGPU Buffer** object in Blink that holds a raw +pointer and a reference to a **Dawn Wire Client Object**. + +This **Dawn Wire Client Object**, which lives in the renderer process, holds a +reference to a **Dawn Wire Server Object**, which lives in the GPU process, +implicitly incrementing and decrementing the reference count by sending a +`wgpuCreateObject` on construction and `wgpuDestroyObject` on destruction over +IPC to the GPU process. + +This** Dawn Wire Server Object** holds a reference to the** Dawn Native +Object**. Finally, the **Dawn Native Object** holds a raw pointer to the +underlying Vulkan Object (or other graphics API platform object on non-Vulkan +platforms.) + + + +Through this long chain of reference counted objects we hold a pointer to a +resource in the **Usermode Graphics Driver (UMD) **through our Oilpan managed +`gpuBuffer` object in JavaScript. This is a lot of state to track! + +Interestingly, this means that it's possible to drop references and free objects +in the GPU process from an uncompromised renderer by garbage collecting the +corresponding WebGPU object in the renderer process. + +```js +const gpuAdapter = await navigator.gpu.requestAdapter(); +const gpuDevice = await gpuAdapter.requestDevice(); + +let buffer = gpuDevice.createBuffer(); +buffer = null; +gc(); +``` + +Under the covers, the destruction of an Oilpan object drops a reference to its +Dawn Wire Client object which when destructed sends a `wgpuDestroyObject` IPC +command to the GPU process. + + + +Situations can arise where multiple objects within Dawn Native hold references +to the same object, so this destruction won't actually free the Dawn Native +Buffer. + + + +When we began auditing these references we checked for many of the "classic" +reference counting implementation issues. For example, sending multiple +`wgpuDestroyObject` commands from a compromised renderer does not allow the +compromised renderer to decrement the reference indefinitely. Reference counted +objects use [64 bit integers +](https://source.chromium.org/chromium/chromium/src/+/refs/heads/main:third_party/dawn/src/dawn/common/RefCounted.cpp;l=69;drc=76be2f9f117654f3fe4faa477b0445114fccedda)for +tracking on all architectures which prevents integer overflow style bugs. +However, we did come across instances where raw pointers were being held without +taking a reference to the reference counted pointer. + + + +#### What's happening inside WebGPU? + +WebGPU gives developers an API to queue up operations and then run them in +batches using modern graphics APIs. Under the hood, a lot goes on to make this +work. The diagram below shows the simplified life cycle of creating and running +a compute shader. + + + +The Dawn Native `GPUCommandBuffer` object, created by the step highlighted in +<span style="background-color:blue">Blue</span>, holds a pre-recorded set of +commands that can then be executed at an arbitrary time. Herein lies the magic +of WebGPU! It's possible to queue up thousands of GPU compute jobs and execute +them asynchronously. + +> **_Note_**: The WebGPU +[`GPUCommandBuffer`](https://www.w3.org/TR/webgpu/#gpucommandbuffer) is +completely unrelated to the Chrome [GPU Command +Buffer](https://www.chromium.org/developers/design-documents/gpu-command-buffer). +This is an unfortunate name collision. The `GPUCommandBuffer` is a WebGPU object +and the Chrome GPU Command Buffer is a mechanism for communicating over shared +memory with the GPU process. + +```js +const commandEncoder = device.createCommandEncoder(); + +// Encode commands for copying buffer to buffer. +commandEncoder.copyBufferToBuffer( + source_buffer, /* source buffer */ + 0, /* source offset */ + dest_buffer, /* destination buffer */ + 0, /* destination offset */ + 10 /* size */ +); + +// Create a GPUCommandBuffer +const gpuCommandBuffer = commandEncoder.finish(); +... +// Execute the GPU commands asynchronously +device.queue.submit([gpuCommandBuffer, gpuCommandBuffer]); +``` + +The same interface is used to create **compute pipelines**. These pipelines +facilitate shader execution and create `GPUComputePassEncoder` objects which +hold references to objects - `GPUBuffer`s, `GPUTexture`s, etc - that the GPU +compute shaders will be modifying during execution. + +```js +const commandEncoder = device.createCommandEncoder(); + +const passEncoder = commandEncoder.beginComputePass(); +passEncoder.setPipeline(computePipeline); +passEncoder.dispatchWorkgroups(1, 1); +passEncoder.end(); + + +const gpuCommand = commandEncoder.finish(); +... +// Execute the GPU commands asynchronously +device.queue.submit([gpuCommand, gpuCommand]); +``` + +Under the covers, the `GPUCommandBuffer` holds references to **Dawn Native** +objects (in the example above the `source_buffer` and `dest_buffer`). A lot can +happen during execution of a sequence of commands within the `GPUCommandBuffer` +- `wgpuDispatchWorkGroups` is used to execute shaders, `wgpuCopyBufferToBuffer` +is used to copy one GPU buffer's content to another, `wgpuSetBindGroup` can be +used to change the bindings that a compute job is executing on - so it's very +important that the objects the `GPUCommandBuffer` holds references to are not +de-allocated until after the execution of the compute pipeline. + +However, there are areas in **Dawn** where the code holds raw pointers with the +assumption that a reference is already held to an object such as at [1] in the +excerpt below. + +```cpp +// Used to track operations that are handled after recording. +// Currently only tracks semaphores, but may be used to do barrier coalescing in the future. +struct CommandRecordingContext { + ... + // External textures that will be eagerly transitioned just before VkSubmit. + // The textures are kept alive by the CommandBuffer so they don't need to be Ref-ed. + std::set<Texture*> externalTexturesForEagerTransition; + + std::set<Buffer*> mappableBuffersForEagerTransition; // [1] + ... +}; +``` + +#### The Bug + +Herein lies a bug, and likely a bug pattern that could cause issues in the +future. An assumption was made that raw pointers could not be added to +`mappableBuffersForEagerTransition` outside of `GPUCommandBuffer` execution. The +code also assumes that references would not be dropped within `GPUCommandBuffer` +execution. + +Within Buffer initialization, there was a branch that called the function +`ClearBuffer` [1] if the size of the buffer being created was unaligned. + +```cpp +MaybeError Buffer::Initialize(bool mappedAtCreation) { + if (device->IsToggleEnabled(Toggle::LazyClearResourceOnFirstUse) && !mappedAtCreation) { + uint32_t paddingBytes = GetAllocatedSize() - GetSize(); + if (paddingBytes > 0) { + CommandRecordingContext* recordingContext = device->GetPendingRecordingContext(); + // [1] + ClearBuffer(recordingContext, 0, clearOffset, clearSize); + } + } +} +``` + +The `ClearBuffer` call leads to many other state changing effects and function +calls. One of those code paths adds a Buffer's raw pointer to +`mappableBuffersForEagerTransition`. + + + +This `TrackResourceAndGetResourceBarrier` call occurs outside of WebGPU +`GPUCommandBuffer` command execution, which is unexpected, so the only other +reference to the **Dawn Native Buffer** is the reference from the renderer +process. + +From here it was possible to drop all other references to the **Dawn Native +Buffer** object in the GPU process held from the renderer process by garbage +collecting the WebGPU JavaScript buffer object, leading to a use-after-free the +next time `mappableBuffersForEagerTransition` was iterated. + +Pointer lifetimes are difficult to get right. Taking a closer look at this +vulnerability we see that there are other raw pointers. These _appeared_ to be +safe, but they could easily be turned into vulnerabilities by future changes to +**Dawn**. + +```cpp +// Used to track operations that are handled after recording. +// Currently only tracks semaphores, but may be used to do barrier coalescing in the future. +struct CommandRecordingContext { + ... + // External textures that will be eagerly transitioned just before VkSubmit. + // The textures are kept alive by the CommandBuffer so they don't need to be Ref-ed. + std::set<Texture*> externalTexturesForEagerTransition; + +- std::set<Buffer*> mappableBuffersForEagerTransition; ++ std::set<Ref<Buffer>> mappableBuffersForEagerTransition; + + ... +}; +``` + +As the diff above shows, the fix was to add reference counting to accurately +track the Buffer life cycle. It appears that this vulnerability was introduced +because assumptions were made about `Buffer` lifetimes based on the earlier +comment about `GPUTexture` lifetimes. This shows us a problem: even when this +pattern is used <ins>correctly</ins>, it may too easily encourage other +<ins>incorrect</ins> uses. It is hard to verify that the raw pointers in +`externalTexturesForEagerTransition` aren't vulnerable in a similar way. It is +probably safer to avoid raw pointers altogether when working with **Dawn Native +Objects**. + +### Finding: Unexpected State Change Before Callback leads to UAF + +> _**tl;dr - Systemic Concerns**_ +> +> WebGPU implements callbacks in the GPU process.Similar patterns in Mojo and +> JavaScript have consistently caused high severity issues in Chrome over the +> years. We believe a high bar of scrutiny should be applied to changes within +> existing **Dawn** callback handlers and for any new callback handlers being +> added to **Dawn**. Increasing complexity in this area would likely have a high +> cost to Chrome Security. + +WebGPU was built to offload work from the CPU to the GPU. GPU execution is +asynchronous, so WebGPU was built to be entirely asynchronous. In the bug above +we learned that Dawn `GPUCommandBuffer` execution can execute +`GPUComputePipelines`. For example, `GPUComputePipelines` contain shader +programs that have no guarantees on when they terminate. + +``` +// WGSL Script +fn main() { + loop {} +} +``` + +GPU Drivers implement Fences to signal the completion of GPU work. These Fences +are polled on every logical `wgpuTick` within **Dawn**. Once the work on the GPU +completes, **Dawn** will execute a callback in the GPU process that will then +change state within the GPU process and send any results to the renderer process +using **Dawn Wire**. + + + +This creates a point of reentrancy during callback execution in `wgpuTick` when +the pending callbacks are executed. State can change in unexpected ways during +callback execution within `wgpuTick` and state can change in unexpected ways +before callback execution. This creates room for bugs similar to the classic +Javascript engine callback bugs that we've seen in the +[browser](https://googleprojectzero.blogspot.com/2019/04/virtually-unlimited-memory-escaping.html) +and [renderer](https://tiszka.com/blog/CVE_2021_21225.html) processes. + + + +Luckily, as of May 2023, there aren't that many asynchronous calls in WebGPU and +these callbacks do not introduce unbounded re-entrancy (i.e. it is not possible +to call `ApiTick` within an `ApiTick`). + + + +#### The Bug + +The bug we're looking at occurred because of an unexpected state change between +callback registration and callback execution. WebGPU registers a callback +handler that executes whenever an error is encountered. + +```cpp +void Server::SetForwardingDeviceCallbacks(ObjectData<WGPUDevice>* deviceObject) { + ... + mProcs.deviceSetUncapturedErrorCallback( + deviceObject->handle, + [](WGPUErrorType type, const char* message, void* userdata) { + DeviceInfo* info = static_cast<DeviceInfo*>(userdata); + info->server->OnUncapturedError(info->self, type, message); + }, + deviceObject->info.get()); // [1.a] + ... +} +``` + +A raw pointer to the `WGPUDevice`'s **Object's** `userdata` is fetched and +passed to the callback [1.a], which later stores the saved pointer into +`mUncapturedErrorUserdata` [1.b]. + +```cpp +void DeviceBase::APISetUncapturedErrorCallback(wgpu::ErrorCallback callback, void* userdata) { + if (IsLost()) { // [2] + return; + } + FlushCallbackTaskQueue(); + mUncapturedErrorCallback = callback; + mUncapturedErrorUserdata = userdata; // [1.b] +} +``` + +When a Dawn Wire Server `GPUDevice` object is freed, `mUncapturedErrorCallback` +is set to null. + +```cpp +void Server::ClearDeviceCallbacks(WGPUDevice device) { + ... + mProcs.deviceSetUncapturedErrorCallback(device, nullptr, nullptr); + ... +} +``` + +However if the Device is put into a "Lost" state [2] after 1.a and before 1.b +when the `ClearDeviceCallbacks` is called it will not be nulled out, leading to +a dangling pointer. This creates room for an attacker to send a +`wgpuBufferDestroy` command to Dawn Wire Server before the callback is executed. + +```cpp +void DeviceBase::APISetUncapturedErrorCallback(wgpu::ErrorCallback callback, void* userdata) { + if (IsLost()) { // [2] + return; + } + FlushCallbackTaskQueue(); + mUncapturedErrorCallback = callback; + mUncapturedErrorUserdata = userdata; // [1.b] +} +``` + +After that the attacker can clear all references to the `WGPUDevice`, freeing +the userdata leading to a dangling pointer. On the next `wgpuTick`, if an error +callback is invoked it will lead to `mUncapturedErrorUserdata` being +dereferenced, causing a use-after-free (UAF). + +This leads to the proof of concept below that uses the trick we mentioned +earlier where Garbage Collected objects created from JavaScript in the renderer +process can be used to drop a single reference to a Dawn Wire Server object in +the GPU process, opening the door for the use-after-free. + +```js +async function trigger() { + let adapter1 = await self.navigator.gpu.requestAdapter({ + forceFallbackAdapter: true + }); + let device1 = await adapter1.requestDevice(); + + // Request a second device. + let adapter2 = await self.navigator.gpu.requestAdapter({ + forceFallbackAdapter: true + }); + + let buffer1 = device1.createBuffer( + { mappedAtCreation: false, + size: 128, usage: + GPUBufferUsage.UNIFORM }); + + // Set Device::mState to State::kDestroyed. + device1.destroy(); + + // Trigger an error by unmapping a buffer on a destroyed device, + // which queues up an error callback + buffer1.unmap(); + + // Trigger GC to drop the renderer's reference to device, and free it + buffer1 = null; + adapter1 = null; + device1 = null; + try { new ArrayBuffer(31 * 1024 * 1024 * 1024); } catch(e) {} + + // Flush. Trigger UAF. + await adapter2.requestDevice(); +} +``` + +### Finding: Multiple vulnerabilities in WebGPU use of GPU Command Buffer + +> _**Our Concerns - The Short Version**_ +> +>The Chrome Command Buffer is prone to input validation issues, has many legacy +>undocumented footguns, and is difficult to fuzz effectively. Manual auditing is +>currently the best way to discover bugs in this area of the codebase. Snapshot +>fuzzing could help solve this problem. + +**Dawn Wire** is a serialization/deserialization library. **Dawn Wire **does not +implement IPC mechanisms that can be used to transfer data between processes in +Chrome. Instead, within Chrome, **Dawn Wire** is built on top of the existing +[Chrome Command +Buffer](https://www.chromium.org/developers/design-documents/gpu-command-buffer/) +architecture to facilitate inter-process communication between the Renderer and +GPU processes. One of the WebGPU-specific GPU Command Buffer [IPC +handlers](https://source.chromium.org/chromium/chromium/src/+/main:gpu/command_buffer/service/webgpu_decoder_impl.cc;l=1768;drc=34ba1d95a41c614308175e932a2b121018891bbf) +receives serialized **Dawn Wire **data over shared memory and deserializes and +executes it using **Dawn Wire Server.** + +```cpp +error::Error WebGPUDecoderImpl::HandleDawnCommands(...) { + if (!wire_server_->HandleCommands(shm_commands, size)) { + return error::kLostContext; + } + ... +} +``` + + + +WebGPU improved on the `GLES2CommandBuffer` implementation in many ways. For +example, the `GLES2CommandBuffer` has been plagued with +time-of-check/time-of-use (TOCTOU) [vulnerabilities](https://crbug.com/1422594) +[that](https://crbug.com/597636) [come](https://crbug.com/597625) +[with](https://crbug.com/468936) working directly on shared memory that can be +concurrently modified by a compromised renderer process. In direct response to +this bug class, the WebGPU usage of the Chrome GPU Command Buffer and Dawn Wire +Server always copy shared memory passed from the renderer process into a static +heap-allocated buffer within the deserializer in the GPU process, before calling +into **Dawn Native**. + +There are still a few other footguns to avoid when building on top of the Chrome +GPU Command Buffer abstraction. [The](https://crbug.com/1373314) +[vulnerabilities](https://crbug.com/1340654) +[discovered](https://crbug.com/1393177) [in](https://crbug.com/1314754) +[the](https://crbug.com/1406115) WebGPU usage of the **Chrome GPU Command +Buffer** so far are good examples; such as not holding a `scoped_ptr` reference +to a `TransferBuffer` while holding a raw_ptr to its shared memory and not +validating buffer offsets/sizes received from a compromised renderer process. + +While these vulnerabilities are in WebGPU's implementation within Chrome, they +are not unique to WebGPU. The **Chrome GPU Command Buffer** had similar issues +in 2013, and it is notoriously difficult to fuzz effectively, so we will likely +introduce similar bugs that reach stable with future abstractions that build on +the **Chrome GPU Command Buffer**. + +### More Bugs and Notes on WebGPU Implementation Complexity + ++ **WebGPU** was the first web-exposed user to back an `ArrayBuffer` with a + raw pointer. This led to [some](https://crbug.com/1336014) + [issues](https://crbug.com/1326210). + ++ The **WebGPU** specification states the `getMappedRange()` method returns an + `ArrayBuffer`. Within Chrome, this `ArrayBuffer` is backed by shared memory. + Concurrent modification of `ArrayBuffer` backing stores has led to + [multiple](https://crbug.com/1174582) security vulnerabilities. Fortunately, + it is not possible to modify the shared memory in the GPU process after the + `ArrayBuffer` is created. However, if that ever becomes possible in the + future it will be a security vulnerability. + + + Interestingly, this also means that we have a well-defined way to + compromise an uncompromised renderer that is colluding with a + compromised GPU process. + ++ Google do not control the underlying **Vulkan** implementation in the + various third party **Usermode Graphics Driver** that **Dawn** calls into. + Usermode Graphics Driver complexity could reach a point where it becomes + indefensible. + ++ Vulkan, Metal, and D3d are inherently insecure APIs. Dawn has the hefty + responsibility of validating user input before calling into these APIs. + ++ The current **Dawn** fuzzers - + [DawnWireServerFuzzer](https://source.chromium.org/chromium/chromium/src/+/main:third_party/dawn/src/dawn/fuzzers/DawnWireServerFuzzer.cpp) + and + [DawnLPMFuzzer](https://source.chromium.org/chromium/chromium/src/+/main:third_party/dawn/src/dawn/fuzzers/lpmfuzz/) + - fuzz the **Dawn** wire byte stream, and therefore all of the validation + and everything the validation is protecting. + ++ **Dawn** will one day be multithreaded, first as a standalone library and + then within Chrome. This will increase its complexity. + +## WebGPU Shaders + +This section focuses on the portions of WebGPU that ingest and process shaders. +Refer again to the high level picture below for an illustration of the +components of interest in this section. + + + +Show above: The subset of the Chrome WebGPU stack we focused on during this +portion of the review, with out-of-scope portions de-emphasized in white. + +There is not much information out there about threats facing Chrome's existing +shader compilers for **WebGL** shaders, or how Chrome currently defends against +them. **WebGPU** introduced a new shader compiler pipeline that is defended in a +similar manner. + +WebGPU moves away from WebGL's GLSL shader language entirely and implements +**WGSL**, a re-imagined high level shading language for the web. +**[Tint**](https://dawn.googlesource.com/tint) is Google's translator for +**WGSL**. **Tint** compiles **WGSL** into a platform dependent intermediate +language - **SPIR-V**, **HLSL**, **MSL** - that the underlying Usermode +Graphics Drivers will further compile. + + + +With the addition of **WebGPU**, Chrome now has two front-end compilers in the +GPU process that can compile some high-level language into **SPIR-V**: the +**ANGLE Translator** for WebGL shaders (not discussed here) and **Tint** for +WebGPU shaders. Interestingly, the **SPIR-V** emitted by **Tint** is not the +same subset of **SPIR-V** emitted by the **ANGLE Translator**. However, both +compilers end up passing their emitted **SPIR-V** to the same underlying +**Usermode Graphics Drivers** for further backend compilation. + + + +### Integer Overflow in SwiftShader JIT leads to out-of-bounds read/write + +> _**tl;dr - Systemic Concerns**_ +> +> Vulnerabilities in the **SwiftShader JIT** compiler aren't being fixed in the +> **SwiftShader** codebase. Instead they are fixed by translating away code +> patterns using the higher-level front end compilers like the **ANGLE +> Translator**. This has led to bug variants. Furthermore, ANGLE and Tint +> sanitization happens on a representation of shaders that is distinct from the +> representation used by SwiftShader and Usermode Graphics Drivers, creating +> gaps in protection coverage. Finally, Chrome now has two front-end compilers +> that pass compiled code to **SwiftShader** for further compilation making this +> even more precarious. + +We did dig into **SwiftShader's** shader execution pipeline. **SwiftShader** +emulates an entire GPU stack - the **Vulkan** Implementation within the +**Usermode Graphics Drivers**, shader compiler within the **Usermode Graphics +Drivers**, and the GPU hardware these call into - all on the CPU. + +GPUs make heavy use of parallel shader computation. **SwiftShader** implemented +a **SPIR-V JIT compiler** to reach _near-GPU_ speeds that compiles to various +architectures (x86, x64, arm, arm64). After shader compilation, the JITTed code +is executed on multiple threads to emulate a GPU executing shaders. + +#### SwiftShader's JIT + +**SwiftShader's** JIT compiler is built on the Reactor API which acts as a +domain specific language and interface to the underlying JIT compiler. Reactor +emits LLVM-like IR which is then ingested by the JIT compiler backend for +Reactor, +[Subzero](https://swiftshader.googlesource.com/SwiftShader/+/refs/heads/master/docs/Subzero.md). + +#### The Bug + +The vulnerability is a classic integer overflow within a **SubZero** +optimization that collates multiple +[`alloca`](https://llvm.org/docs/LangRef.html#alloca-instruction) instructions +into a single `alloca` instruction. + +```cpp +void Cfg::sortAndCombineAllocas(CfgVector<InstAlloca *> &Allocas, + uint32_t CombinedAlignment, InstList &Insts, + AllocaBaseVariableType BaseVariableType) { + uint32_t CurrentOffset = 0; // [1] + for (Inst *Instr : Allocas) { + auto *Alloca = llvm::cast<InstAlloca>(Instr); + uint32_t Alignment = std::max(Alloca->getAlignInBytes(), 1u); + auto *ConstSize = + llvm::dyn_cast<ConstantInteger32>(Alloca->getSizeInBytes()); + uint32_t Size = Utils::applyAlignment(ConstSize->getValue(), Alignment); + CurrentOffset += Size; // [2] + } + uint32_t TotalSize = + Utils::applyAlignment(CurrentOffset, CombinedAlignment); + + Operand *AllocaSize = Ctx->getConstantInt32(TotalSize); + InstAlloca *CombinedAlloca = + InstAlloca::create( + this, + BaseVariable, + AllocaSize, + CombinedAlignment + ); // [3] + ... +} +``` + +`CurrentOffset` is a 32 bit unsigned integer declared at [1]. By supplying a +SPIR-V shader that generates enough large `alloca` nodes, it's possible for the +repeated addition at [2] to overflow the 32-bit unsigned integer, leading to an +undersized `alloca` node being generated at [3]. + +`alloca` instructions are later lowered to stack allocations for the actual +variables in the shader program. Reading and writing into an undersized stack +allocation will lead to out-of-bounds reads/writes. + +#### SwiftShader JIT Bugs: Reachable from WebGPU and WebGL + +As we mentioned earlier, both **WebGPU** and **WebGL** shaders are compiled to** +SPIR-V** in **Vulkan** environments. SwiftShader implements the **Vulkan** +Graphics** **API. + + + +We found a bug, but there are many many layers to dig through to figure out if +the bug is reachable. The **ANGLE Translator** will emit an +[`spv::Op::OpVariable`](https://source.chromium.org/chromium/chromium/src/+/main:third_party/angle/src/common/spirv/spirv_instruction_builder_autogen.cpp;l=567;drc=bec40d7684688eaf8a5ca4747341dcea4243c996) +SPIR-V instruction whenever it encounters a variable declaration within the +WebGL SL it is compiling. **Tint** will also emit an +[`spv::Op::OpVariable`](https://source.chromium.org/chromium/chromium/src/+/main:third_party/dawn/src/tint/writer/spirv/builder.cc;l=835;drc=9543f74739118a853dd5e5a46297f5442c3352f8) +**SPIR-V** instruction whenever it encounters a variable declaration within the +WGSL it is compiling. + + + +When the **SwiftShader SPIR-V compiler** encounters the +[`spv::Op::OpVariable`](https://source.chromium.org/chromium/chromium/src/+/refs/heads/main:third_party/swiftshader/src/Pipeline/SpirvShader.cpp;l=1768;drc=004227a1fc7355a9080146c2621d072bd2327701) +instruction it will generate a Variable IR. + + + +Whenever this Variable IR is being converted from Reactor IR into Subzero IR it +calls into +[`allocateStackVariable()`](https://source.chromium.org/chromium/chromium/src/+/refs/heads/main:third_party/swiftshader/src/Reactor/Reactor.cpp;l=106;drc=004227a1fc7355a9080146c2621d072bd2327701) +which emits a SubZero InstAlloca instruction. + + + +```cpp +Value *Nucleus::allocateStackVariable(Type *t, int arraySize) +{ + Ice::Type type = T(t); + int typeSize = Ice::typeWidthInBytes(type); + int totalSize = typeSize * (arraySize ? arraySize : 1); + + auto bytes = Ice::ConstantInteger32::create( + ::context, Ice::IceType_i32, totalSize); + auto address = ::function->makeVariable(T(getPointerType(t))); + auto alloca = + Ice::InstAlloca::create(::function, address, bytes, typeSize); // [4] + ::function->getEntryNode()->getInsts().push_front(alloca); + + return V(address); +} +``` + +`allocateStackVariable()` generates the **SubZero** `InstAlloca` IR instruction +that `sortAndCombineAllocas` incorrectly optimizes. + + + +When the assembly emitted by **SubZero** is executed on the CPU and the +undersized allocation is read/written to, it leads to out-of-bounds memory +accesses. + +#### The Fix + +Similar to other bugs in shader compilers, this vulnerability is prevented by +the front-end compilers and no changes were made to **SwiftShader**. For those +who don't follow the bug tracker closely, looking closer at the +[fix](https://chromium-review.googlesource.com/c/angle/angle/+/4377639) this is +a [variant](https://chromium-review.googlesource.com/c/angle/angle/+/4377639) of +a [variant](https://chromium-review.googlesource.com/c/angle/angle/+/3023033). +Integer overflows keep popping up in shader compilers and +[`ValidateTypeSizeLimitations()`](https://source.chromium.org/chromium/chromium/src/+/main:third_party/angle/src/compiler/translator/ValidateTypeSizeLimitations.cpp;l=34;drc=d0ee0197ddff25fe1a9876511c07542ac483702d) +is being used to further restrict the maximum size of variables within shaders +to prevent these vulnerabilities. It's unclear if this strategy will prevent +more variants from popping up in **SwiftShader; **[especially now that +**WebGPU** will also need to make similar fixes in their front-end +compiler.](https://bugs.chromium.org/p/chromium/issues/detail?id=1431761#c14) + +> _**Note**_: When **Tint** emits an `OpVariable` it also emits an +[`OpConstantNull`](https://registry.khronos.org/SPIR-V/specs/unified1/SPIRV.html#OpConstantNull) +SPIR-V instruction. The `OpConstantNull` instruction causes SwiftShader, and any +other **SPIR-V** compiler, to zero-initialize variables allocations. [As noted +in the bug](https://crbug.com/1431761), it prevents the bug from triggering in a +convenient amount of time on WebGPU. This is an interesting inconsistency +between the two front-end compilers. We are also actively investigating if the +**ANGLE Translator's** lack of `OpConstantNull` leads to infoleaks. The +**WebGPU** team is considering a [separate +fix](https://bugs.chromium.org/p/chromium/issues/detail?id=1431761#c14) for this +bug. + +### More Bugs and Notes on Shader Compiler Complexity + ++ The front-end shader compilers - ANGLE Translator and Tint - break Chrome's + [Rule of + Two](https://chromium.googlesource.com/chromium/src/+/master/docs/security/rule-of-2.md) + on platforms like Android, where the GPU process is un-sandboxed **and** + parses complex attacker-controlled shaders as input. In addition, backend + shader compilers in the Usermode Graphics Drivers have a high complexity, + are closed source, and are evolving targets that are continuously adding new + optimizations and functionality. + ++ **WGSL Shader Compilers** are more expressive in general than **WebGL SL + shader compilers**. Notably, **WGSL** supports both dynamic sized arrays and + runtime-sized arrays which introduces complexity when handling. There is + state tracking within Dawn to ensure that object types don't change between + executions of the JIT compiler. However as complexity increases in both + **Dawn** and **Tint** this could become harder to manage and lead to bugs. + ++ We are currently fixing bugs in SwiftShader by making fixes in the front-end + compilers. [This is likely a risky way to fix these + vulnerabilities](https://bugs.chromium.org/p/chromium/issues/detail?id=1431761#c14) + and leads to situations where variants can easily slip through the cracks. + ++ We believe that Chrome owning the entire front-end compilation component in + **Tint** is a net-positive win for security. The less attack surface we pass + on to the Usermode Graphics Drivers the better. + ++ We did not spend time digging into speculative execution vulnerabilities. + However, we would be surprised if there are no Spectre gadgets in + SwiftShader. + ++ SwiftShader unifies the GPU process attack surface, and enables exploits + that are reachable through the **Vulkan** API on all platforms. We + encouraged the **WebGPU** team to consider shipping the + `forceFallbackAdapter` adapter option behind a runtime flag. + ++ We have not yet audited what any of this means at the Kernel level. We don't + know what shader compiler execution looks like on a GPU and what the shape + of a vulnerability in that area would look like. + +## Summary of Findings + +WebGPU introduces a significant amount of attack surface to Chrome's GPU process +both through the core WebGPU implementation which lives in **Dawn**, the +**WebGPU extensions to the GPU Command Buffer**, and transitively through the +third party Usermode Graphics Drivers and everything below. + +The vulnerabilities in the document are meant to showcase attack surfaces and +patterns that demonstrate further complexity will likely lead to more +vulnerabilities. + +WebGPU invested a significant amount of effort on validating renderer supplied +input before calling into drivers and reference counting pointers. This +investment paid off – we found precisely zero "low-hanging" vulnerabilities in +Dawn. + +WebGPU also introduces a large amount of attack surface through the compilation +and execution of shader compilers in Chrome's privileged GPU process in +**Tint**, third party **Usermode Graphics Drivers**, and **SwiftShader**. + +WebGPU has invested a significant amount of effort on fuzzing **Tint**. However +the fuzzing only targets the parsers and lexers within **Tint** and doesn't +exercise the code in SwiftShader or on **Usermode Graphics Drivers**. There is +room for Chrome to invest in fuzzing shader compilers with syntactically and +semantically correct code in the same way that we fuzz V8 with Fuzzilli to +exercise code in **SwiftShader's** **JIT** compiler. Like V8, shader compilers +will have bugs that are unfuzzable. Chrome Security will need to continue +manually auditing shader compiler implementations to correctly assess risk and +reduce bug density. Furthermore, where we lack access to source code, such as +third party **Usermode Graphics Drivers**, expanding fuzzing support is our only +feasibly scalable approach to mitigating the risk of third party code within the +Chrome GPU process. + +### Systemic Concerns + +We found many one-off vulnerabilities in WebGPU during this exercise, and we +found some bugs that hinted at future problem areas.** In this document we walk +through how WebGPU works and a few more concerning areas.** + ++ **Dawn use-after-frees**: Dawn has a pattern where objects hold a raw + pointer to reference counted objects, assuming a reference is held + elsewhere. This assumption can easily break with future changes to the code + as we've seen in the browser process with Mojo handlers. Dawn should + discourage this pattern to reduce use-after-free bugs. + ++ **Dawn Callbacks**: WebGPU implements callbacks in the GPU process. Similar + patterns in Mojo and JavaScript have consistently caused high severity + issues in Chrome over the years. We believe a high bar of scrutiny should be + applied to changes within existing **WebGPU** callback handlers and for any + new callback handlers being added to **Dawn**. Increasing complexity in this + area would likely have a high cost to Chrome Security. + ++ **Chrome Command Buffer**: The Chrome Command Buffer is prone to input + validation issues, has many undocumented legacy footguns, and is difficult + to fuzz effectively because feature coverage requires (a) a harness that + supports Chrome in multi-process mode, (b) a stateful generator that can + leverage context across test cases, and (c) can sometimes also require + execution on a host with a physical GPU. Snapshot fuzzing may be useful to + address some of these challenges, although manual auditing is currently the + best way to discover bugs in this area of the codebase. + ++ **SwiftShader JIT**: Vulnerabilities in the **SwiftShader JIT **compiler + aren't being fixed in the **SwiftShader** codebase. Instead they are fixed + by translating away code patterns using the higher-level front end compilers + like the **ANGLE Translator**. This has led to bug variants. Furthermore, + **ANGLE** and **Tint** sanitization happens on a representation of shaders + that is distinct from the representation used by **SwiftShader** and + **Usermode Graphics Drivers**, creating gaps in protection coverage. + Finally, Chrome now has two front-end compilers that pass compiled code to + **SwiftShader** for further compilation making this strategy more + precarious. + +## Glossary: Chrome Security GPU Terminology + +The security relevance of GPU terms is hard to track. Here are a lot of them in +one place. + ++ **Dawn Wire**: Client-Server implementation of + [`webgpu.h`](https://github.com/webgpu-native/webgpu-headers/blob/main/webgpu.h). + + + **Dawn Wire Client**: Lives in the renderer process. + + **Dawn Wire Server**: Lives in the GPU process + ++ **Dawn Native**: Core implementation of WebGPU that calls into the Dawn + backends. ++ **Dawn Backends**: Wrappers around the System Graphics Apis that Dawn Native + needs to call into (Vulkan, Metal, & DirectX3D). ++ **Tint:** Google's OSS implementation of WGSL. Compiles WGSL to SPIRV, MSL, + HLSL, & DXIL. Mostly a front-end compiler as of May 23, 2023. ++ **ANGLE**: Google's OSS implementation of OpenGL. ++ **ANGLE Translator**: Google's OSS implementation of WebGL SL. Compiles + WebGL SL to GLSL or SPIR-V. ++ **SwiftShader**: Vulkan implementation and SPIR-V compiler built to run + directly on the CPU. Emulates an entire GPU as well. Does so with JIT + compiled SIMD shader compiler execution. ++ **SwiftShader JIT Compiler**: SwiftShader compiles SPIR-V shaders to + X86/Arm/aarch64/etc using PNACL's old JIT compiler, SubZero. ++ **D3D12**: Direct3D 12, Microsoft's newest System Graphics API. Implemented + in Usermode Graphics Driver. ++ **OpenGL**: WebGL is built on OpenGL. Implemented in Usermode Graphics + Driver. SwiftShader no longer ++ **Vulkan**: Systems Graphics API on Linux (and some Windows devices™). + WebGPU is built on top of Vulkan. + + + WebGL can be run with a Vulkan backend natively. Currently enabled on + 50% is built on top of Vulkan on 50% of Linux Desktop devices through a + finch experiment. + + WebGL on SwiftShader uses the Vulkan backend on every platform. + + WebGPU on Linux uses Vulkan for 100% of Linux Desktop and Android + devices + + WebGPU on SwiftShader uses the Vulkan backend on every platform. + ++ **Metal**: Systems Graphics API on Mac. ++ **DXIL**: DirectX Intermediate Language, essentially LLVM IR for shaders + for D3D12 ++ **HLSL**: High Level Shading Language, Direct3D's shading language + (including D3D12). ++ **MSL**: Metal Shading Language (shading language that runs on apple + hardware). ++ **SPIR-V**: Standard Portable Intermediate Representation - Vulkan. An SSA + form bytecode shading language used for Vulkan. Both WebGL and WebGPU + compile to SPIR-V on Vulkan. ++ **WGSL**: WebGPU Shading Language. WebGL's successor. ++ **GLSL**: OpenGL Shading Language. ++ **WebGL SL**: WebGL Shader language. A subset of GLSL that is safe for the + web. Compiled and sanitized by the ANGLE translator. ++ **Usermode Graphics Driver (UMD)**: A shared library that ships with a + kernel graphics driver (think Arm, Nvidia, AMD, Qualcomm). This is where + shader compilation happens. This is where the system graphics APIs are + implemented. SwiftShader emulates an entire GPU, so it is a Usermode + Graphics Driver and more. ++ **GPU Command Buffer**: High level abstraction for transferring data over + shared memory to the GPU process. Both the renderer process and browser + process use various command buffers to do GPU operations in Chrome. ++ **WebGPU use of GPU Command Buffer (`WebGPUDecoderImpl`)**: An extension of + the Chrome GPU Command Buffer abstraction that is used for transferring Dawn + Wire data between the Renderer and GPU processes. ++ **Dawn Native `GPUCommandBuffer`**: An object within Dawn that has a name + collision with the legacy Chrome GPU Command Buffer abstraction. They are + not related.
diff --git a/docs/use_counter_wiki.md b/docs/use_counter_wiki.md index 02a21880..055b2b81 100644 --- a/docs/use_counter_wiki.md +++ b/docs/use_counter_wiki.md
@@ -85,33 +85,17 @@ + For the most dominant milestone. -### UMA Timeline with Formula +### Internal UMA tools -Internally (sorry, Google employees only) you can query the usage of a feature -with break-downs on platforms, channels, etc on the -[UMA Timeline dashboard](https://goto.google.com/uma-usecounter). +See (https://goto.google.com/uma-usecounter) for internal tooling. -To create break-downs, select filters on the top of the dashboard, for example, -"Platform", and set the `operation` to "split by". Note that you can also see -data usage within Android Webview by setting a filter on "Platform". - -Select Metric: +Some metrics of interest: + "Blink.UseCounter.Features" for HTML and JavaScript features. + "Blink.UseCounter.CSSProperties" for CSS properties. + "Blink.UseCounter.AnimatedCSSProperties" for animated CSS properties. + "Blink.UseCounter.Extensions.Features" for HTML and JacaScript features on extensions. -In the metric panel, select "Formula" in the left-most drop-down. Then Click -"ADD NEW FORMULA" with: -``` -"MyFeature" / "PageVisits" * 100 -``` - -This provides timeline data for your feature usage (per page load) with -break-downs, which should more or less reflects the results on chromestatus.com. - - ### UseCounter Feature in HTTP Archive HTTP Archive crawls the top 10K sites on the web and records everything from
diff --git a/extensions/browser/api/declarative_net_request/constants.h b/extensions/browser/api/declarative_net_request/constants.h index 73faaf8..a49b971 100644 --- a/extensions/browser/api/declarative_net_request/constants.h +++ b/extensions/browser/api/declarative_net_request/constants.h
@@ -241,10 +241,10 @@ // The maximum amount of static rules in the global rule pool for a single // profile. -constexpr int kMaxStaticRulesPerProfile = 300000; +inline constexpr int kMaxStaticRulesPerProfile = 300000; // The per-extension maximum amount of disabled static rules. -constexpr int kMaxDisabledStaticRules = 5000; +inline constexpr int kMaxDisabledStaticRules = 5000; // Identifier for a Flatbuffer containing `flat::EmbedderConditions` as the // root. @@ -254,7 +254,7 @@ // (header name, header delimiter). Currently, this list contains all standard // HTTP request headers that support multiple values in a single entry. This // list may be extended in the future to support custom headers. -constexpr auto kDNRRequestHeaderAppendAllowList = +inline constexpr auto kDNRRequestHeaderAppendAllowList = base::MakeFixedFlatMap<base::StringPiece, base::StringPiece>( {{"accept", ", "}, {"accept-encoding", ", "},
diff --git a/extensions/browser/api/scripting/scripting_constants.h b/extensions/browser/api/scripting/scripting_constants.h index 6cccba82..0519c6b 100644 --- a/extensions/browser/api/scripting/scripting_constants.h +++ b/extensions/browser/api/scripting/scripting_constants.h
@@ -11,23 +11,23 @@ // TODO(crbug.com/1168627): The can_execute_script_everywhere flag is currently // only used by the legacy version Chromevox extension. We can assume it will // always be false here, but it may be added back if needed. -constexpr bool kScriptsCanExecuteEverywhere = false; +inline constexpr bool kScriptsCanExecuteEverywhere = false; // The all_urls_includes_chrome_urls flag is only true for the legacy ChromeVox // extension, which does not call this API. Therefore we can assume it to be // always false. -constexpr bool kAllUrlsIncludesChromeUrls = false; +inline constexpr bool kAllUrlsIncludesChromeUrls = false; // The key for the field in the extension's StateStore for dynamic content // script metadata that persists across sessions. -constexpr char kRegisteredScriptsStorageKey[] = "dynamic_scripts"; +inline constexpr char kRegisteredScriptsStorageKey[] = "dynamic_scripts"; // The key for storing a dynamic content script's id. -constexpr char kId[] = "id"; +inline constexpr char kId[] = "id"; // Key corresponding to the set of URL patterns from the extension's persistent // dynamic content scripts. -constexpr const char kPrefPersistentScriptURLPatterns[] = +inline constexpr const char kPrefPersistentScriptURLPatterns[] = "persistent_script_url_patterns"; } // namespace scripting
diff --git a/extensions/browser/content_verifier/content_verifier_utils.h b/extensions/browser/content_verifier/content_verifier_utils.h index 10c160b..98d0556 100644 --- a/extensions/browser/content_verifier/content_verifier_utils.h +++ b/extensions/browser/content_verifier/content_verifier_utils.h
@@ -8,8 +8,7 @@ #include "base/types/strong_alias.h" #include "build/build_config.h" -namespace extensions { -namespace content_verifier_utils { +namespace extensions::content_verifier_utils { // Extension relative FilePath's canonical version for content verification // system. Canonicalization consists of: @@ -50,7 +49,6 @@ CanonicalRelativePath CanonicalizeRelativePath( const base::FilePath& relative_path); -} // namespace content_verifier_utils -} // namespace extensions +} // namespace extensions::content_verifier_utils #endif // EXTENSIONS_BROWSER_CONTENT_VERIFIER_CONTENT_VERIFIER_UTILS_H_
diff --git a/extensions/browser/extension_event_histogram_value.h b/extensions/browser/extension_event_histogram_value.h index 2b787694..ba78fe58 100644 --- a/extensions/browser/extension_event_histogram_value.h +++ b/extensions/browser/extension_event_histogram_value.h
@@ -566,6 +566,7 @@ OS_EVENTS_ON_TOUCHSCREEN_CONNECTED_EVENT = 544, FILE_MANAGER_PRIVATE_ON_DEVICE_CONNECTION_STATUS_CHANGED = 545, OS_DIAGNOSTICS_ON_ROUTINE_EXCEPTION = 546, + ACCESSIBILITY_SERVICE_PRIVATE_CLIPBOARD_COPY_IN_ACTIVE_GOOGLE_DOC = 547, // Last entry: Add new entries above, then run: // tools/metrics/histograms/update_extension_histograms.py ENUM_BOUNDARY
diff --git a/extensions/browser/extension_function_histogram_value.h b/extensions/browser/extension_function_histogram_value.h index 96ab246..25b2b13 100644 --- a/extensions/browser/extension_function_histogram_value.h +++ b/extensions/browser/extension_function_histogram_value.h
@@ -1889,6 +1889,7 @@ OS_DIAGNOSTICS_STARTROUTINE = 1827, OS_DIAGNOSTICS_CANCELROUTINE = 1828, OS_DIAGNOSTICS_ISMEMORYROUTINEARGUMENTSUPPORTED = 1829, + ACCESSIBILITY_PRIVATE_CLIPBOARDCOPYINACTIVELACROSGOOGLEDOC = 1830, // Last entry: Add new entries above, then run: // tools/metrics/histograms/update_extension_histograms.py ENUM_BOUNDARY
diff --git a/extensions/browser/updater/safe_manifest_parser.h b/extensions/browser/updater/safe_manifest_parser.h index 085ae8a5..1ee2892 100644 --- a/extensions/browser/updater/safe_manifest_parser.h +++ b/extensions/browser/updater/safe_manifest_parser.h
@@ -92,7 +92,7 @@ int diff_size = 0; }; -constexpr int kNoDaystart = -1; +inline constexpr int kNoDaystart = -1; struct UpdateManifestResults { UpdateManifestResults(); UpdateManifestResults(const UpdateManifestResults& other);
diff --git a/extensions/common/api/declarative_net_request/constants.h b/extensions/common/api/declarative_net_request/constants.h index 15ad149..6fdf8e4 100644 --- a/extensions/common/api/declarative_net_request/constants.h +++ b/extensions/common/api/declarative_net_request/constants.h
@@ -17,25 +17,25 @@ extern const char kFeedbackAPIPermission[]; // Minimum valid value of a declarative rule ID. -constexpr int kMinValidID = 1; +inline constexpr int kMinValidID = 1; // Minimum valid value of a declarative rule priority. -constexpr int kMinValidPriority = 1; +inline constexpr int kMinValidPriority = 1; using RulesetID = ::base::IdType<class RulesetIDTag, int, -2 /* invalid value */>; -constexpr RulesetID kMinValidStaticRulesetID(1); -constexpr RulesetID kDynamicRulesetID(0); -constexpr RulesetID kSessionRulesetID(-1); +inline constexpr RulesetID kMinValidStaticRulesetID(1); +inline constexpr RulesetID kDynamicRulesetID(0); +inline constexpr RulesetID kSessionRulesetID(-1); // Prefix for reserved ruleset public IDs. Extensions can't specify static // rulesets beginning with this. -constexpr char kReservedRulesetIDPrefix = '_'; +inline constexpr char kReservedRulesetIDPrefix = '_'; // Default priority used for rules when the priority is not explicity provided // by an extension. -constexpr int kDefaultPriority = 1; +inline constexpr int kDefaultPriority = 1; // Keys used in rules. extern const char kIDKey[];
diff --git a/extensions/common/constants.h b/extensions/common/constants.h index adbcfa5..30e4e96 100644 --- a/extensions/common/constants.h +++ b/extensions/common/constants.h
@@ -16,156 +16,158 @@ namespace extensions { // Scheme we serve extension content from. -constexpr char kExtensionScheme[] = "chrome-extension"; +inline constexpr char kExtensionScheme[] = "chrome-extension"; // The name of the manifest inside an extension. -constexpr base::FilePath::CharType kManifestFilename[] = +inline constexpr base::FilePath::CharType kManifestFilename[] = FILE_PATH_LITERAL("manifest.json"); // The name of the differential fingerprint file inside an extension. -constexpr base::FilePath::CharType kDifferentialFingerprintFilename[] = +inline constexpr base::FilePath::CharType kDifferentialFingerprintFilename[] = FILE_PATH_LITERAL("manifest.fingerprint"); // The name of locale folder inside an extension. -constexpr base::FilePath::CharType kLocaleFolder[] = +inline constexpr base::FilePath::CharType kLocaleFolder[] = FILE_PATH_LITERAL("_locales"); // The name of the messages file inside an extension. -constexpr base::FilePath::CharType kMessagesFilename[] = +inline constexpr base::FilePath::CharType kMessagesFilename[] = FILE_PATH_LITERAL("messages.json"); // The name of the gzipped messages file inside an extension. -constexpr base::FilePath::CharType kGzippedMessagesFilename[] = +inline constexpr base::FilePath::CharType kGzippedMessagesFilename[] = FILE_PATH_LITERAL("messages.json.gz"); // The base directory for subdirectories with platform-specific code. -constexpr base::FilePath::CharType kPlatformSpecificFolder[] = +inline constexpr base::FilePath::CharType kPlatformSpecificFolder[] = FILE_PATH_LITERAL("_platform_specific"); // A directory reserved for metadata, generated either by the webstore // or chrome. -constexpr base::FilePath::CharType kMetadataFolder[] = +inline constexpr base::FilePath::CharType kMetadataFolder[] = FILE_PATH_LITERAL("_metadata"); // Name of the verified contents file within the metadata folder. -constexpr base::FilePath::CharType kVerifiedContentsFilename[] = +inline constexpr base::FilePath::CharType kVerifiedContentsFilename[] = FILE_PATH_LITERAL("verified_contents.json"); // Name of the computed hashes file within the metadata folder. -constexpr base::FilePath::CharType kComputedHashesFilename[] = +inline constexpr base::FilePath::CharType kComputedHashesFilename[] = FILE_PATH_LITERAL("computed_hashes.json"); // Name of the indexed ruleset directory for the Declarative Net Request API. -constexpr base::FilePath::CharType kIndexedRulesetDirectory[] = +inline constexpr base::FilePath::CharType kIndexedRulesetDirectory[] = FILE_PATH_LITERAL("generated_indexed_rulesets"); // The name of the directory inside the profile where extensions are // installed to. -constexpr char kInstallDirectoryName[] = "Extensions"; +inline constexpr char kInstallDirectoryName[] = "Extensions"; // The name of the directory inside the profile where unpacked (e.g. from .zip // file) extensions are installed to. -constexpr char kUnpackedInstallDirectoryName[] = "UnpackedExtensions"; +inline constexpr char kUnpackedInstallDirectoryName[] = "UnpackedExtensions"; // The name of a temporary directory to install an extension into for // validation before finalizing install. -constexpr char kTempExtensionName[] = "CRX_INSTALL"; +inline constexpr char kTempExtensionName[] = "CRX_INSTALL"; // The file to write our decoded message catalogs to, relative to the // extension_path. -constexpr char kDecodedMessageCatalogsFilename[] = "DECODED_MESSAGE_CATALOGS"; +inline constexpr char kDecodedMessageCatalogsFilename[] = + "DECODED_MESSAGE_CATALOGS"; // The filename to use for a background page generated from // background.scripts. -constexpr char kGeneratedBackgroundPageFilename[] = +inline constexpr char kGeneratedBackgroundPageFilename[] = "_generated_background_page.html"; // The URL piece between the extension ID and favicon URL. -constexpr char kFaviconSourcePath[] = "_favicon"; +inline constexpr char kFaviconSourcePath[] = "_favicon"; // Path to imported modules. -constexpr char kModulesDir[] = "_modules"; +inline constexpr char kModulesDir[] = "_modules"; // The file extension (.crx) for extensions. -constexpr base::FilePath::CharType kExtensionFileExtension[] = +inline constexpr base::FilePath::CharType kExtensionFileExtension[] = FILE_PATH_LITERAL(".crx"); // The file extension (.pem) for private key files. -constexpr base::FilePath::CharType kExtensionKeyFileExtension[] = +inline constexpr base::FilePath::CharType kExtensionKeyFileExtension[] = FILE_PATH_LITERAL(".pem"); // Default frequency for auto updates, if turned on (5 hours). -constexpr int kDefaultUpdateFrequencySeconds = 60 * 60 * 5; +inline constexpr int kDefaultUpdateFrequencySeconds = 60 * 60 * 5; // The name of the directory inside the profile where per-app local settings // are stored. -constexpr base::FilePath::CharType kLocalAppSettingsDirectoryName[] = +inline constexpr base::FilePath::CharType kLocalAppSettingsDirectoryName[] = FILE_PATH_LITERAL("Local App Settings"); // The name of the directory inside the profile where per-extension local // settings are stored. -constexpr base::FilePath::CharType kLocalExtensionSettingsDirectoryName[] = - - FILE_PATH_LITERAL("Local Extension Settings"); +inline constexpr base::FilePath::CharType + kLocalExtensionSettingsDirectoryName[] = + FILE_PATH_LITERAL("Local Extension Settings"); // The name of the directory inside the profile where per-app synced settings // are stored. -constexpr base::FilePath::CharType kSyncAppSettingsDirectoryName[] = +inline constexpr base::FilePath::CharType kSyncAppSettingsDirectoryName[] = FILE_PATH_LITERAL("Sync App Settings"); // The name of the directory inside the profile where per-extension synced // settings are stored. -constexpr base::FilePath::CharType kSyncExtensionSettingsDirectoryName[] = - FILE_PATH_LITERAL("Sync Extension Settings"); +inline constexpr base::FilePath::CharType + kSyncExtensionSettingsDirectoryName[] = + FILE_PATH_LITERAL("Sync Extension Settings"); // The name of the directory inside the profile where per-extension persistent // managed settings are stored. -constexpr base::FilePath::CharType kManagedSettingsDirectoryName[] = +inline constexpr base::FilePath::CharType kManagedSettingsDirectoryName[] = FILE_PATH_LITERAL("Managed Extension Settings"); // The name of the database inside the profile where chrome-internal // extension state resides. -constexpr base::FilePath::CharType kStateStoreName[] = +inline constexpr base::FilePath::CharType kStateStoreName[] = FILE_PATH_LITERAL("Extension State"); // The name of the database inside the profile where declarative extension // rules are stored. -constexpr base::FilePath::CharType kRulesStoreName[] = +inline constexpr base::FilePath::CharType kRulesStoreName[] = FILE_PATH_LITERAL("Extension Rules"); // The name of the database inside the profile where persistent dynamic user // script metadata is stored. -constexpr base::FilePath::CharType kScriptsStoreName[] = +inline constexpr base::FilePath::CharType kScriptsStoreName[] = FILE_PATH_LITERAL("Extension Scripts"); // Statistics are logged to UMA with these strings as part of histogram name. // They can all be found under Extensions.Database.Open.<client>. Changing this // needs to synchronize with histograms.xml, AND will also become incompatible // with older browsers still reporting the previous values. -constexpr char kSettingsDatabaseUMAClientName[] = "Settings"; -constexpr char kRulesDatabaseUMAClientName[] = "Rules"; -constexpr char kStateDatabaseUMAClientName[] = "State"; -constexpr char kScriptsDatabaseUMAClientName[] = "Scripts"; +inline constexpr char kSettingsDatabaseUMAClientName[] = "Settings"; +inline constexpr char kRulesDatabaseUMAClientName[] = "Rules"; +inline constexpr char kStateDatabaseUMAClientName[] = "State"; +inline constexpr char kScriptsDatabaseUMAClientName[] = "Scripts"; // Mime type strings -constexpr char kMimeTypeJpeg[] = "image/jpeg"; -constexpr char kMimeTypePng[] = "image/png"; +inline constexpr char kMimeTypeJpeg[] = "image/jpeg"; +inline constexpr char kMimeTypePng[] = "image/png"; // The extension id of the Web Store component application. -constexpr char kWebStoreAppId[] = "ahfgeienlihckogmohjhadlkjgocpleb"; +inline constexpr char kWebStoreAppId[] = "ahfgeienlihckogmohjhadlkjgocpleb"; // The key used for signing some pieces of data from the webstore. EXTENSIONS_EXPORT extern const uint8_t kWebstoreSignaturesPublicKey[]; EXTENSIONS_EXPORT extern const size_t kWebstoreSignaturesPublicKeySize; // A preference for storing the extension's update URL data. -constexpr char kUpdateURLData[] = "update_url_data"; +inline constexpr char kUpdateURLData[] = "update_url_data"; // Thread identifier for the main renderer thread (as opposed to a service // worker thread). // This is the default thread id used for extension event listeners registered // from a non-service worker context -constexpr int kMainThreadId = 0; +inline constexpr int kMainThreadId = 0; // Enumeration of possible app launch sources. // This should be kept in sync with LaunchSource in @@ -232,26 +234,26 @@ namespace extension_misc { // Matches chrome.tabs.TAB_ID_NONE. -constexpr int kUnknownTabId = -1; +inline constexpr int kUnknownTabId = -1; // Matches chrome.windows.WINDOW_ID_NONE. -constexpr int kUnknownWindowId = -1; +inline constexpr int kUnknownWindowId = -1; // Matches chrome.windows.WINDOW_ID_CURRENT. -constexpr int kCurrentWindowId = -2; +inline constexpr int kCurrentWindowId = -2; using ExtensionIcons = int; -constexpr ExtensionIcons EXTENSION_ICON_GIGANTOR = 512; -constexpr ExtensionIcons EXTENSION_ICON_EXTRA_LARGE = 256; -constexpr ExtensionIcons EXTENSION_ICON_LARGE = 128; -constexpr ExtensionIcons EXTENSION_ICON_MEDIUM = 48; -constexpr ExtensionIcons EXTENSION_ICON_SMALL = 32; -constexpr ExtensionIcons EXTENSION_ICON_SMALLISH = 24; -constexpr ExtensionIcons EXTENSION_ICON_BITTY = 16; -constexpr ExtensionIcons EXTENSION_ICON_INVALID = 0; +inline constexpr ExtensionIcons EXTENSION_ICON_GIGANTOR = 512; +inline constexpr ExtensionIcons EXTENSION_ICON_EXTRA_LARGE = 256; +inline constexpr ExtensionIcons EXTENSION_ICON_LARGE = 128; +inline constexpr ExtensionIcons EXTENSION_ICON_MEDIUM = 48; +inline constexpr ExtensionIcons EXTENSION_ICON_SMALL = 32; +inline constexpr ExtensionIcons EXTENSION_ICON_SMALLISH = 24; +inline constexpr ExtensionIcons EXTENSION_ICON_BITTY = 16; +inline constexpr ExtensionIcons EXTENSION_ICON_INVALID = 0; // The extension id of the ChromeVox extension. -constexpr char kChromeVoxExtensionId[] = +inline constexpr char kChromeVoxExtensionId[] = #if BUILDFLAG(IS_CHROMEOS) // The extension id for the built-in component extension. "mndnfokpggljbaajbnioimlmbfngpief"; @@ -261,102 +263,110 @@ #endif // The extension id of the PDF extension. -constexpr char kPdfExtensionId[] = "mhjfbmdgcfjbbpaeojofohoefgiehjai"; +inline constexpr char kPdfExtensionId[] = "mhjfbmdgcfjbbpaeojofohoefgiehjai"; // The extension id of the Office Viewer component extension. -constexpr char kQuickOfficeComponentExtensionId[] = +inline constexpr char kQuickOfficeComponentExtensionId[] = "bpmcpldpdmajfigpchkicefoigmkfalc"; // The extension id of the Office Viewer extension on the internal webstore. -constexpr char kQuickOfficeInternalExtensionId[] = +inline constexpr char kQuickOfficeInternalExtensionId[] = "ehibbfinohgbchlgdbfpikodjaojhccn"; // The extension id of the Office Viewer extension. -constexpr char kQuickOfficeExtensionId[] = "gbkeegbaiigmenfmjfclcdgdpimamgkj"; +inline constexpr char kQuickOfficeExtensionId[] = + "gbkeegbaiigmenfmjfclcdgdpimamgkj"; // The extension id used for testing mimeHandlerPrivate. -constexpr char kMimeHandlerPrivateTestExtensionId[] = +inline constexpr char kMimeHandlerPrivateTestExtensionId[] = "oickdpebdnfbgkcaoklfcdhjniefkcji"; // The extension id of the Files Manager application. -constexpr char kFilesManagerAppId[] = "hhaomjibdihmijegdhdafkllkbggdgoj"; +inline constexpr char kFilesManagerAppId[] = "hhaomjibdihmijegdhdafkllkbggdgoj"; // The extension id of the Calculator application. -constexpr char kCalculatorAppId[] = "joodangkbfjnajiiifokapkpmhfnpleo"; +inline constexpr char kCalculatorAppId[] = "joodangkbfjnajiiifokapkpmhfnpleo"; // The extension id of the demo Calendar application. -constexpr char kCalendarDemoAppId[] = "fpgfohogebplgnamlafljlcidjedbdeb"; +inline constexpr char kCalendarDemoAppId[] = "fpgfohogebplgnamlafljlcidjedbdeb"; // The extension id of the GMail application. -constexpr char kGmailAppId[] = "pjkljhegncpnkpknbcohdijeoejaedia"; +inline constexpr char kGmailAppId[] = "pjkljhegncpnkpknbcohdijeoejaedia"; // The extension id of the demo Google Docs application. -constexpr char kGoogleDocsDemoAppId[] = "chdaoodbokekbiiphekbfjdmiodccljl"; +inline constexpr char kGoogleDocsDemoAppId[] = + "chdaoodbokekbiiphekbfjdmiodccljl"; // The extension id of the Google Docs PWA. -constexpr char kGoogleDocsPwaAppId[] = "cepkndkdlbllfhpfhledabdcdbidehkd"; +inline constexpr char kGoogleDocsPwaAppId[] = + "cepkndkdlbllfhpfhledabdcdbidehkd"; // The extension id of the Google Drive application. -constexpr char kGoogleDriveAppId[] = "apdfllckaahabafndbhieahigkjlhalf"; +inline constexpr char kGoogleDriveAppId[] = "apdfllckaahabafndbhieahigkjlhalf"; // The extension id of the Google Meet PWA. -constexpr char kGoogleMeetPwaAppId[] = "dkainijpcknoofiakgccliajhbmlbhji"; +inline constexpr char kGoogleMeetPwaAppId[] = + "dkainijpcknoofiakgccliajhbmlbhji"; // The extension id of the demo Google Sheets application. -constexpr char kGoogleSheetsDemoAppId[] = "nifkmgcdokhkjghdlgflonppnefddien"; +inline constexpr char kGoogleSheetsDemoAppId[] = + "nifkmgcdokhkjghdlgflonppnefddien"; // The extension id of the Google Sheets PWA. -constexpr char kGoogleSheetsPwaAppId[] = "hcgjdbbnhkmopplfiibmdgghhdhbiidh"; +inline constexpr char kGoogleSheetsPwaAppId[] = + "hcgjdbbnhkmopplfiibmdgghhdhbiidh"; // The extension id of the demo Google Slides application. -constexpr char kGoogleSlidesDemoAppId[] = "hdmobeajeoanbanmdlabnbnlopepchip"; +inline constexpr char kGoogleSlidesDemoAppId[] = + "hdmobeajeoanbanmdlabnbnlopepchip"; // The extension id of the Google Keep application. -constexpr char kGoogleKeepAppId[] = "hmjkmjkepdijhoojdojkdfohbdgmmhki"; +inline constexpr char kGoogleKeepAppId[] = "hmjkmjkepdijhoojdojkdfohbdgmmhki"; // The extension id of the Youtube application. -constexpr char kYoutubeAppId[] = "blpcfgokakmgnkcojhhkbfbldkacnbeo"; +inline constexpr char kYoutubeAppId[] = "blpcfgokakmgnkcojhhkbfbldkacnbeo"; // The extension id of the Youtube PWA. -constexpr char kYoutubePwaAppId[] = "agimnkijcaahngcdmfeangaknmldooml"; +inline constexpr char kYoutubePwaAppId[] = "agimnkijcaahngcdmfeangaknmldooml"; // The extension id of the Spotify PWA. -constexpr char kSpotifyAppId[] = "pjibgclleladliembfgfagdaldikeohf"; +inline constexpr char kSpotifyAppId[] = "pjibgclleladliembfgfagdaldikeohf"; // The extension id of the BeFunky PWA. -constexpr char kBeFunkyAppId[] = "fjoomcalbeohjbnlcneddljemclcekeg"; +inline constexpr char kBeFunkyAppId[] = "fjoomcalbeohjbnlcneddljemclcekeg"; // The extension id of the Clipchamp PWA. -constexpr char kClipchampAppId[] = "pfepfhbcedkbjdkanpimmmdjfgoddhkg"; +inline constexpr char kClipchampAppId[] = "pfepfhbcedkbjdkanpimmmdjfgoddhkg"; // The extension id of the GeForce NOW PWA. -constexpr char kGeForceNowAppId[] = "egmafekfmcnknbdlbfbhafbllplmjlhn"; +inline constexpr char kGeForceNowAppId[] = "egmafekfmcnknbdlbfbhafbllplmjlhn"; // The extension id of the Zoom PWA. -constexpr char kZoomAppId[] = "jldpdkiafafcejhceeincjmlkmibemgj"; +inline constexpr char kZoomAppId[] = "jldpdkiafafcejhceeincjmlkmibemgj"; // The extension id of the Sumo PWA. -constexpr char kSumoAppId[] = "mfknjekfflbfdchhohffdpkokgfbfmdc"; +inline constexpr char kSumoAppId[] = "mfknjekfflbfdchhohffdpkokgfbfmdc"; // The extension id of the Sumo PWA. -constexpr char kAdobeSparkAppId[] = "magefboookdoiehjohjmbjmkepngibhm"; +inline constexpr char kAdobeSparkAppId[] = "magefboookdoiehjohjmbjmkepngibhm"; // The extension id of the Google Docs application. -constexpr char kGoogleDocsAppId[] = "aohghmighlieiainnegkcijnfilokake"; +inline constexpr char kGoogleDocsAppId[] = "aohghmighlieiainnegkcijnfilokake"; // The extension id of the Google Sheets application. -constexpr char kGoogleSheetsAppId[] = "felcaaldnbdncclmgdcncolpebgiejap"; +inline constexpr char kGoogleSheetsAppId[] = "felcaaldnbdncclmgdcncolpebgiejap"; // The extension id of the Google Slides application. -constexpr char kGoogleSlidesAppId[] = "aapocclcgogkmnckokdopfmhonfmgoek"; +inline constexpr char kGoogleSlidesAppId[] = "aapocclcgogkmnckokdopfmhonfmgoek"; #if BUILDFLAG(IS_CHROMEOS_ASH) // The id of the testing extension allowed in the signin profile. -constexpr char kSigninProfileTestExtensionId[] = +inline constexpr char kSigninProfileTestExtensionId[] = "mecfefiddjlmabpeilblgegnbioikfmp"; // The id of the testing extension allowed in guest mode. -constexpr char kGuestModeTestExtensionId[] = "behllobkkfkfnphdnhnkndlbkcpglgmj"; +inline constexpr char kGuestModeTestExtensionId[] = + "behllobkkfkfnphdnhnkndlbkcpglgmj"; // Returns true if this app is part of the "system UI". Generally this is UI // that that on other operating systems would be considered part of the OS, @@ -366,16 +376,18 @@ #if BUILDFLAG(IS_CHROMEOS) // The extension id of the default Demo Mode Highlights app. -constexpr char kHighlightsAppId[] = "lpmakjfjcconjeehbidjclhdlpjmfjjj"; +inline constexpr char kHighlightsAppId[] = "lpmakjfjcconjeehbidjclhdlpjmfjjj"; // The extension id of the default Demo Mode screensaver app. -constexpr char kScreensaverAppId[] = "mnoijifedipmbjaoekhadjcijipaijjc"; +inline constexpr char kScreensaverAppId[] = "mnoijifedipmbjaoekhadjcijipaijjc"; // The extension id of 2022 Demo Mode Highlights app. -constexpr char kNewAttractLoopAppId[] = "igilkdghcdehjdcpndaodgnjgdggiemm"; +inline constexpr char kNewAttractLoopAppId[] = + "igilkdghcdehjdcpndaodgnjgdggiemm"; // The extension id of 2022 Demo Mode screensaver app. -constexpr char kNewHighlightsAppId[] = "enchmnkoajljphdmahljlebfmpkkbnkj"; +inline constexpr char kNewHighlightsAppId[] = + "enchmnkoajljphdmahljlebfmpkkbnkj"; // Returns true if this app is one of Demo Mode Chrome Apps, including // attract loop and highlights apps. @@ -394,25 +406,25 @@ EXTENSIONS_EXPORT bool IsPreinstalledAppId(base::StringPiece app_id); // Error message when enterprise policy blocks scripting of webpage. -constexpr char kPolicyBlockedScripting[] = +inline constexpr char kPolicyBlockedScripting[] = "This page cannot be scripted due to an ExtensionsSettings policy."; // Error message when access to incognito preferences is denied. -constexpr char kIncognitoErrorMessage[] = +inline constexpr char kIncognitoErrorMessage[] = "You do not have permission to access incognito preferences."; // Error message when setting a pref with "incognito_session_only" // scope is denied. -constexpr char kIncognitoSessionOnlyErrorMessage[] = +inline constexpr char kIncognitoSessionOnlyErrorMessage[] = "You cannot set a preference with scope 'incognito_session_only' when no " "incognito window is open."; // Error message when an invalid color is provided to an API method. -constexpr char kInvalidColorError[] = +inline constexpr char kInvalidColorError[] = "The color specification could not be parsed."; // The default block size for hashing used in content verification. -constexpr int kContentVerificationDefaultBlockSize = 4096; +inline constexpr int kContentVerificationDefaultBlockSize = 4096; } // namespace extension_misc
diff --git a/extensions/common/features/feature.h b/extensions/common/features/feature.h index 29a1076..1ad7978 100644 --- a/extensions/common/features/feature.h +++ b/extensions/common/features/feature.h
@@ -19,7 +19,7 @@ namespace extensions { -constexpr int kUnspecifiedContextId = -1; +inline constexpr int kUnspecifiedContextId = -1; class Extension;
diff --git a/extensions/common/image_util.h b/extensions/common/image_util.h index fa8dc0eb65..7834ce59 100644 --- a/extensions/common/image_util.h +++ b/extensions/common/image_util.h
@@ -43,7 +43,7 @@ // Icons should be a reasonable size for analysis. There have been crash // reports due to memory allocation issues with calls to // SkBitmap::allocN32Pixels. See crbug.com/1155746. -constexpr int kMaxAllowedPixels = 2048 * 2048; +inline constexpr int kMaxAllowedPixels = 2048 * 2048; // Renders the icon bitmap onto another bitmap, combining it with the specified // background color. The output bitmap must be empty.
diff --git a/extensions/common/logging_constants.h b/extensions/common/logging_constants.h index 8388483..40f12d4 100644 --- a/extensions/common/logging_constants.h +++ b/extensions/common/logging_constants.h
@@ -12,7 +12,7 @@ namespace extension_misc { // The minimum severity of a log or error in order to report it to the browser. -constexpr logging::LogSeverity kMinimumSeverityToReportError = +inline constexpr logging::LogSeverity kMinimumSeverityToReportError = logging::LOG_WARNING; } // namespace extension_misc
diff --git a/gpu/command_buffer/client/shared_image_interface.cc b/gpu/command_buffer/client/shared_image_interface.cc index 08514fb..69f82dd 100644 --- a/gpu/command_buffer/client/shared_image_interface.cc +++ b/gpu/command_buffer/client/shared_image_interface.cc
@@ -92,6 +92,14 @@ return buffer_->GetType() == gfx::GpuMemoryBufferType::SHARED_MEMORY_BUFFER; } +void SharedImageInterface::ScopedMapping::OnMemoryDump( + base::trace_event::ProcessMemoryDump* pmd, + const base::trace_event::MemoryAllocatorDumpGuid& buffer_dump_guid, + uint64_t tracing_process_id, + int importance) { + buffer_->OnMemoryDump(pmd, buffer_dump_guid, tracing_process_id, importance); +} + uint32_t SharedImageInterface::UsageForMailbox(const Mailbox& mailbox) { return 0u; }
diff --git a/gpu/command_buffer/client/shared_image_interface.h b/gpu/command_buffer/client/shared_image_interface.h index e5f12a6e..20230da 100644 --- a/gpu/command_buffer/client/shared_image_interface.h +++ b/gpu/command_buffer/client/shared_image_interface.h
@@ -71,6 +71,17 @@ // Returns whether the underlying resource is shared memory. bool IsSharedMemory(); + // Dumps information about the memory backing this instance to |pmd|. + // The memory usage is attributed to |buffer_dump_guid|. + // |tracing_process_id| uniquely identifies the process owning the memory. + // |importance| is relevant only for the cases of co-ownership, the memory + // gets attributed to the owner with the highest importance. + void OnMemoryDump( + base::trace_event::ProcessMemoryDump* pmd, + const base::trace_event::MemoryAllocatorDumpGuid& buffer_dump_guid, + uint64_t tracing_process_id, + int importance); + private: friend class ClientSharedImageInterface; friend class SharedImageInterfaceInProcess;
diff --git a/gpu/config/gpu_finch_features.cc b/gpu/config/gpu_finch_features.cc index e515f1e..9a128842 100644 --- a/gpu/config/gpu_finch_features.cc +++ b/gpu/config/gpu_finch_features.cc
@@ -275,12 +275,6 @@ "ForceGpuMainThreadToNormalPriorityDrDc", base::FEATURE_DISABLED_BY_DEFAULT); -#if BUILDFLAG(IS_ANDROID) -BASE_FEATURE(kEnableDrDcVulkan, - "EnableDrDcVulkan", - base::FEATURE_ENABLED_BY_DEFAULT); -#endif // BUILDFLAG(IS_ANDROID) - // Enable WebGPU on gpu service side only. This is used with origin trial and // enabled by default on supported platforms. #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) @@ -553,8 +547,8 @@ if (!base::FeatureList::IsEnabled(kEnableDrDc)) return false; - return IsUsingVulkan() ? base::FeatureList::IsEnabled(kEnableDrDcVulkan) - : true; + + return true; #else return false; #endif
diff --git a/infra/config/console-header.star b/infra/config/console-header.star index ad63dfe..fa1452c 100644 --- a/infra/config/console-header.star +++ b/infra/config/console-header.star
@@ -307,6 +307,11 @@ alt = "Fuchsia", ), headers.link( + text = "fuzz", + url = "/p/{}/g/tryserver.chromium.fuzz/builders".format(settings.project), + alt = "Fuzz", + ), + headers.link( text = "linux", branch_selector = branches.selector.LINUX_BRANCHES, url = "/p/{}/g/tryserver.chromium.linux/builders".format(settings.project),
diff --git a/infra/config/generated/builders/ci/ASAN Debug/properties.json b/infra/config/generated/builders/ci/ASAN Debug/properties.json index 70484fea..4e44ef04 100644 --- a/infra/config/generated/builders/ci/ASAN Debug/properties.json +++ b/infra/config/generated/builders/ci/ASAN Debug/properties.json
@@ -39,6 +39,12 @@ "builder": "ASAN Debug", "project": "chromium" } + ], + "mirroring_builder_group_and_names": [ + { + "builder": "linux-asan-dbg", + "group": "tryserver.chromium.fuzz" + } ] } },
diff --git a/infra/config/generated/builders/ci/ASAN Release Media/properties.json b/infra/config/generated/builders/ci/ASAN Release Media/properties.json index 46bc4560..811abb6 100644 --- a/infra/config/generated/builders/ci/ASAN Release Media/properties.json +++ b/infra/config/generated/builders/ci/ASAN Release Media/properties.json
@@ -39,6 +39,12 @@ "builder": "ASAN Release Media", "project": "chromium" } + ], + "mirroring_builder_group_and_names": [ + { + "builder": "linux-asan-media-rel", + "group": "tryserver.chromium.fuzz" + } ] } },
diff --git a/infra/config/generated/builders/ci/ASAN Release/properties.json b/infra/config/generated/builders/ci/ASAN Release/properties.json index c077059..ba741745 100644 --- a/infra/config/generated/builders/ci/ASAN Release/properties.json +++ b/infra/config/generated/builders/ci/ASAN Release/properties.json
@@ -39,6 +39,12 @@ "builder": "ASAN Release", "project": "chromium" } + ], + "mirroring_builder_group_and_names": [ + { + "builder": "linux-asan-rel", + "group": "tryserver.chromium.fuzz" + } ] } },
diff --git "a/infra/config/generated/builders/ci/ASan Debug \05032-bit x86 with V8-ARM\051/properties.json" "b/infra/config/generated/builders/ci/ASan Debug \05032-bit x86 with V8-ARM\051/properties.json" index 2f82626..b85a4ef 100644 --- "a/infra/config/generated/builders/ci/ASan Debug \05032-bit x86 with V8-ARM\051/properties.json" +++ "b/infra/config/generated/builders/ci/ASan Debug \05032-bit x86 with V8-ARM\051/properties.json"
@@ -40,6 +40,12 @@ "builder": "ASan Debug (32-bit x86 with V8-ARM)", "project": "chromium" } + ], + "mirroring_builder_group_and_names": [ + { + "builder": "linux-asan-v8-arm-dbg", + "group": "tryserver.chromium.fuzz" + } ] } },
diff --git "a/infra/config/generated/builders/ci/ASan Release \05032-bit x86 with V8-ARM\051/properties.json" "b/infra/config/generated/builders/ci/ASan Release \05032-bit x86 with V8-ARM\051/properties.json" index 922cbcc4..1d03c7f 100644 --- "a/infra/config/generated/builders/ci/ASan Release \05032-bit x86 with V8-ARM\051/properties.json" +++ "b/infra/config/generated/builders/ci/ASan Release \05032-bit x86 with V8-ARM\051/properties.json"
@@ -40,6 +40,12 @@ "builder": "ASan Release (32-bit x86 with V8-ARM)", "project": "chromium" } + ], + "mirroring_builder_group_and_names": [ + { + "builder": "linux-asan-v8-arm-rel", + "group": "tryserver.chromium.fuzz" + } ] } },
diff --git "a/infra/config/generated/builders/ci/ASan Release Media \05032-bit x86 with V8-ARM\051/properties.json" "b/infra/config/generated/builders/ci/ASan Release Media \05032-bit x86 with V8-ARM\051/properties.json" index 52350c21..ee618af 100644 --- "a/infra/config/generated/builders/ci/ASan Release Media \05032-bit x86 with V8-ARM\051/properties.json" +++ "b/infra/config/generated/builders/ci/ASan Release Media \05032-bit x86 with V8-ARM\051/properties.json"
@@ -40,6 +40,12 @@ "builder": "ASan Release Media (32-bit x86 with V8-ARM)", "project": "chromium" } + ], + "mirroring_builder_group_and_names": [ + { + "builder": "linux-asan-media-v8-arm-rel", + "group": "tryserver.chromium.fuzz" + } ] } },
diff --git a/infra/config/generated/builders/ci/ChromiumOS ASAN Release/properties.json b/infra/config/generated/builders/ci/ChromiumOS ASAN Release/properties.json index b8ba873..9ac565a 100644 --- a/infra/config/generated/builders/ci/ChromiumOS ASAN Release/properties.json +++ b/infra/config/generated/builders/ci/ChromiumOS ASAN Release/properties.json
@@ -43,6 +43,12 @@ "builder": "ChromiumOS ASAN Release", "project": "chromium" } + ], + "mirroring_builder_group_and_names": [ + { + "builder": "linux-chromeos-asan-rel", + "group": "tryserver.chromium.fuzz" + } ] } },
diff --git "a/infra/config/generated/builders/ci/Dawn Mac arm64 DEPS Release \050Apple M2\051/properties.json" "b/infra/config/generated/builders/ci/Dawn Mac arm64 DEPS Release \050Apple M2\051/properties.json" index 68935e4..74feeec6 100644 --- "a/infra/config/generated/builders/ci/Dawn Mac arm64 DEPS Release \050Apple M2\051/properties.json" +++ "b/infra/config/generated/builders/ci/Dawn Mac arm64 DEPS Release \050Apple M2\051/properties.json"
@@ -37,6 +37,12 @@ "builder": "Dawn Mac arm64 DEPS Release (Apple M2)", "project": "chromium" } + ], + "mirroring_builder_group_and_names": [ + { + "builder": "dawn-try-mac-arm64-deps-rel", + "group": "tryserver.chromium.dawn" + } ] } },
diff --git "a/infra/config/generated/builders/ci/MSAN Release \050chained origins\051/properties.json" "b/infra/config/generated/builders/ci/MSAN Release \050chained origins\051/properties.json" index d22575c..919f962d 100644 --- "a/infra/config/generated/builders/ci/MSAN Release \050chained origins\051/properties.json" +++ "b/infra/config/generated/builders/ci/MSAN Release \050chained origins\051/properties.json"
@@ -40,6 +40,12 @@ "builder": "MSAN Release (chained origins)", "project": "chromium" } + ], + "mirroring_builder_group_and_names": [ + { + "builder": "linux-msan-chained-origins-rel", + "group": "tryserver.chromium.fuzz" + } ] } },
diff --git "a/infra/config/generated/builders/ci/MSAN Release \050no origins\051/properties.json" "b/infra/config/generated/builders/ci/MSAN Release \050no origins\051/properties.json" index 2e443f3..78e4cebc 100644 --- "a/infra/config/generated/builders/ci/MSAN Release \050no origins\051/properties.json" +++ "b/infra/config/generated/builders/ci/MSAN Release \050no origins\051/properties.json"
@@ -40,6 +40,12 @@ "builder": "MSAN Release (no origins)", "project": "chromium" } + ], + "mirroring_builder_group_and_names": [ + { + "builder": "linux-msan-no-origins-rel", + "group": "tryserver.chromium.fuzz" + } ] } },
diff --git a/infra/config/generated/builders/ci/Mac ASAN Release Media/properties.json b/infra/config/generated/builders/ci/Mac ASAN Release Media/properties.json index 59bb4fc1..85f6ca8 100644 --- a/infra/config/generated/builders/ci/Mac ASAN Release Media/properties.json +++ b/infra/config/generated/builders/ci/Mac ASAN Release Media/properties.json
@@ -39,6 +39,12 @@ "builder": "Mac ASAN Release Media", "project": "chromium" } + ], + "mirroring_builder_group_and_names": [ + { + "builder": "mac-asan-media-rel", + "group": "tryserver.chromium.fuzz" + } ] } },
diff --git a/infra/config/generated/builders/ci/Mac ASAN Release/properties.json b/infra/config/generated/builders/ci/Mac ASAN Release/properties.json index 924a1d5..0dff719f 100644 --- a/infra/config/generated/builders/ci/Mac ASAN Release/properties.json +++ b/infra/config/generated/builders/ci/Mac ASAN Release/properties.json
@@ -39,6 +39,12 @@ "builder": "Mac ASAN Release", "project": "chromium" } + ], + "mirroring_builder_group_and_names": [ + { + "builder": "mac-asan-rel", + "group": "tryserver.chromium.fuzz" + } ] } },
diff --git a/infra/config/generated/builders/ci/TSAN Debug/properties.json b/infra/config/generated/builders/ci/TSAN Debug/properties.json index 45e837bb..bc6eab5 100644 --- a/infra/config/generated/builders/ci/TSAN Debug/properties.json +++ b/infra/config/generated/builders/ci/TSAN Debug/properties.json
@@ -40,6 +40,12 @@ "builder": "TSAN Debug", "project": "chromium" } + ], + "mirroring_builder_group_and_names": [ + { + "builder": "linux-tsan-dbg", + "group": "tryserver.chromium.fuzz" + } ] } },
diff --git a/infra/config/generated/builders/ci/TSAN Release/properties.json b/infra/config/generated/builders/ci/TSAN Release/properties.json index 7d74805..00295a28 100644 --- a/infra/config/generated/builders/ci/TSAN Release/properties.json +++ b/infra/config/generated/builders/ci/TSAN Release/properties.json
@@ -40,6 +40,12 @@ "builder": "TSAN Release", "project": "chromium" } + ], + "mirroring_builder_group_and_names": [ + { + "builder": "linux-tsan-rel", + "group": "tryserver.chromium.fuzz" + } ] } },
diff --git a/infra/config/generated/builders/ci/UBSan Release/properties.json b/infra/config/generated/builders/ci/UBSan Release/properties.json index d08c45c0..bea689ae 100644 --- a/infra/config/generated/builders/ci/UBSan Release/properties.json +++ b/infra/config/generated/builders/ci/UBSan Release/properties.json
@@ -38,6 +38,12 @@ "builder": "UBSan Release", "project": "chromium" } + ], + "mirroring_builder_group_and_names": [ + { + "builder": "linux-ubsan-rel", + "group": "tryserver.chromium.fuzz" + } ] } },
diff --git a/infra/config/generated/builders/ci/UBSan vptr Release/properties.json b/infra/config/generated/builders/ci/UBSan vptr Release/properties.json index 642cc7f9..00c8ea7d 100644 --- a/infra/config/generated/builders/ci/UBSan vptr Release/properties.json +++ b/infra/config/generated/builders/ci/UBSan vptr Release/properties.json
@@ -39,6 +39,12 @@ "builder": "UBSan vptr Release", "project": "chromium" } + ], + "mirroring_builder_group_and_names": [ + { + "builder": "linux-ubsan-vptr-rel", + "group": "tryserver.chromium.fuzz" + } ] } },
diff --git a/infra/config/generated/builders/ci/Win ASan Release Media/properties.json b/infra/config/generated/builders/ci/Win ASan Release Media/properties.json index e8d96a9e..30afc1c 100644 --- a/infra/config/generated/builders/ci/Win ASan Release Media/properties.json +++ b/infra/config/generated/builders/ci/Win ASan Release Media/properties.json
@@ -39,6 +39,12 @@ "builder": "Win ASan Release Media", "project": "chromium" } + ], + "mirroring_builder_group_and_names": [ + { + "builder": "win-asan-media-rel", + "group": "tryserver.chromium.fuzz" + } ] } },
diff --git a/infra/config/generated/builders/ci/Win ASan Release/properties.json b/infra/config/generated/builders/ci/Win ASan Release/properties.json index ff3253fc..31050079 100644 --- a/infra/config/generated/builders/ci/Win ASan Release/properties.json +++ b/infra/config/generated/builders/ci/Win ASan Release/properties.json
@@ -39,6 +39,12 @@ "builder": "Win ASan Release", "project": "chromium" } + ], + "mirroring_builder_group_and_names": [ + { + "builder": "win-asan-rel", + "group": "tryserver.chromium.fuzz" + } ] } },
diff --git a/infra/config/generated/builders/ci/fuchsia-fyi-x64-asan/properties.json b/infra/config/generated/builders/ci/fuchsia-fyi-x64-asan/properties.json index 38f03d0..6eb1d0a 100644 --- a/infra/config/generated/builders/ci/fuchsia-fyi-x64-asan/properties.json +++ b/infra/config/generated/builders/ci/fuchsia-fyi-x64-asan/properties.json
@@ -39,6 +39,12 @@ "builder": "fuchsia-fyi-x64-asan", "project": "chromium" } + ], + "mirroring_builder_group_and_names": [ + { + "builder": "fuchsia-fyi-x64-asan", + "group": "tryserver.chromium.fuchsia" + } ] } },
diff --git a/infra/config/generated/builders/ci/fuchsia-fyi-x64-dbg-persistent-emulator/properties.json b/infra/config/generated/builders/ci/fuchsia-fyi-x64-dbg-persistent-emulator/properties.json index 671fa2b..ee688e14 100644 --- a/infra/config/generated/builders/ci/fuchsia-fyi-x64-dbg-persistent-emulator/properties.json +++ b/infra/config/generated/builders/ci/fuchsia-fyi-x64-dbg-persistent-emulator/properties.json
@@ -72,6 +72,12 @@ "builder": "fuchsia-fyi-x64-dbg-persistent-emulator", "project": "chromium" } + ], + "mirroring_builder_group_and_names": [ + { + "builder": "fuchsia-fyi-x64-dbg-persistent-emulator", + "group": "tryserver.chromium.fuchsia" + } ] } },
diff --git a/infra/config/generated/builders/try/dawn-try-mac-arm64-deps-rel/properties.json b/infra/config/generated/builders/try/dawn-try-mac-arm64-deps-rel/properties.json new file mode 100644 index 0000000..11ea959 --- /dev/null +++ b/infra/config/generated/builders/try/dawn-try-mac-arm64-deps-rel/properties.json
@@ -0,0 +1,59 @@ +{ + "$build/chromium_tests_builder_config": { + "builder_config": { + "builder_db": { + "entries": [ + { + "builder_id": { + "bucket": "ci", + "builder": "Dawn Mac arm64 DEPS Release (Apple M2)", + "project": "chromium" + }, + "builder_spec": { + "build_gs_bucket": "chromium-dawn-archive", + "builder_group": "chromium.dawn", + "execution_mode": "COMPILE_AND_TEST", + "legacy_chromium_config": { + "apply_configs": [ + "mb" + ], + "build_config": "Release", + "config": "chromium", + "target_arch": "arm", + "target_bits": 64, + "target_platform": "mac" + }, + "legacy_gclient_config": { + "config": "chromium" + }, + "run_tests_serially": true + } + } + ] + }, + "builder_ids": [ + { + "bucket": "ci", + "builder": "Dawn Mac arm64 DEPS Release (Apple M2)", + "project": "chromium" + } + ] + } + }, + "$build/reclient": { + "instance": "rbe-chromium-untrusted", + "jobs": 150, + "metrics_project": "chromium-reclient-metrics", + "scandeps_server": true + }, + "$recipe_engine/resultdb/test_presentation": { + "column_keys": [], + "grouping_keys": [ + "status", + "v.test_suite", + "v.gpu" + ] + }, + "builder_group": "tryserver.chromium.dawn", + "recipe": "chromium_trybot" +} \ No newline at end of file
diff --git a/infra/config/generated/builders/try/fuchsia-fyi-x64-asan/properties.json b/infra/config/generated/builders/try/fuchsia-fyi-x64-asan/properties.json new file mode 100644 index 0000000..cc668d85 --- /dev/null +++ b/infra/config/generated/builders/try/fuchsia-fyi-x64-asan/properties.json
@@ -0,0 +1,60 @@ +{ + "$build/chromium_tests_builder_config": { + "builder_config": { + "builder_db": { + "entries": [ + { + "builder_id": { + "bucket": "ci", + "builder": "fuchsia-fyi-x64-asan", + "project": "chromium" + }, + "builder_spec": { + "build_gs_bucket": "chromium-fyi-archive", + "builder_group": "chromium.fuchsia.fyi", + "execution_mode": "COMPILE_AND_TEST", + "legacy_chromium_config": { + "apply_configs": [ + "mb" + ], + "build_config": "Release", + "config": "chromium", + "target_bits": 64, + "target_platform": "fuchsia" + }, + "legacy_gclient_config": { + "apply_configs": [ + "fuchsia_x64" + ], + "config": "chromium" + }, + "run_tests_serially": true + } + } + ] + }, + "builder_ids": [ + { + "bucket": "ci", + "builder": "fuchsia-fyi-x64-asan", + "project": "chromium" + } + ] + } + }, + "$build/reclient": { + "instance": "rbe-chromium-untrusted", + "jobs": 500, + "metrics_project": "chromium-reclient-metrics", + "scandeps_server": true + }, + "$recipe_engine/resultdb/test_presentation": { + "column_keys": [], + "grouping_keys": [ + "status", + "v.test_suite" + ] + }, + "builder_group": "tryserver.chromium.fuchsia", + "recipe": "chromium_trybot" +} \ No newline at end of file
diff --git a/infra/config/generated/builders/try/fuchsia-fyi-x64-dbg-persistent-emulator/properties.json b/infra/config/generated/builders/try/fuchsia-fyi-x64-dbg-persistent-emulator/properties.json new file mode 100644 index 0000000..a167150 --- /dev/null +++ b/infra/config/generated/builders/try/fuchsia-fyi-x64-dbg-persistent-emulator/properties.json
@@ -0,0 +1,100 @@ +{ + "$build/chromium_tests_builder_config": { + "builder_config": { + "builder_db": { + "entries": [ + { + "builder_id": { + "bucket": "ci", + "builder": "fuchsia-fyi-x64-dbg", + "project": "chromium" + }, + "builder_spec": { + "build_gs_bucket": "chromium-fyi-archive", + "builder_group": "chromium.fuchsia.fyi", + "execution_mode": "COMPILE_AND_TEST", + "legacy_chromium_config": { + "apply_configs": [ + "mb" + ], + "build_config": "Debug", + "config": "chromium", + "target_bits": 64, + "target_platform": "fuchsia" + }, + "legacy_gclient_config": { + "apply_configs": [ + "fuchsia_x64" + ], + "config": "chromium" + }, + "run_tests_serially": true + } + }, + { + "builder_id": { + "bucket": "ci", + "builder": "fuchsia-fyi-x64-dbg-persistent-emulator", + "project": "chromium" + }, + "builder_spec": { + "build_gs_bucket": "chromium-fyi-archive", + "builder_group": "chromium.fuchsia.fyi", + "execution_mode": "TEST", + "legacy_chromium_config": { + "apply_configs": [ + "mb" + ], + "build_config": "Debug", + "config": "chromium", + "target_bits": 64, + "target_platform": "fuchsia" + }, + "legacy_gclient_config": { + "apply_configs": [ + "fuchsia_x64" + ], + "config": "chromium" + }, + "parent": { + "bucket": "ci", + "builder": "fuchsia-fyi-x64-dbg", + "project": "chromium" + }, + "run_tests_serially": true + } + } + ] + }, + "builder_ids": [ + { + "bucket": "ci", + "builder": "fuchsia-fyi-x64-dbg", + "project": "chromium" + } + ], + "builder_ids_in_scope_for_testing": [ + { + "bucket": "ci", + "builder": "fuchsia-fyi-x64-dbg-persistent-emulator", + "project": "chromium" + } + ] + } + }, + "$build/reclient": { + "instance": "rbe-chromium-untrusted", + "jobs": 500, + "metrics_project": "chromium-reclient-metrics", + "scandeps_server": true + }, + "$recipe_engine/resultdb/test_presentation": { + "column_keys": [], + "grouping_keys": [ + "status", + "v.test_suite" + ] + }, + "builder_group": "tryserver.chromium.fuchsia", + "recipe": "chromium_trybot" +} \ No newline at end of file
diff --git a/infra/config/generated/builders/try/linux-asan-dbg/properties.json b/infra/config/generated/builders/try/linux-asan-dbg/properties.json new file mode 100644 index 0000000..2640714b --- /dev/null +++ b/infra/config/generated/builders/try/linux-asan-dbg/properties.json
@@ -0,0 +1,60 @@ +{ + "$build/chromium_tests_builder_config": { + "builder_config": { + "builder_db": { + "entries": [ + { + "builder_id": { + "bucket": "ci", + "builder": "ASAN Debug", + "project": "chromium" + }, + "builder_spec": { + "builder_group": "chromium.fuzz", + "clusterfuzz_archive": { + "archive_name_prefix": "asan", + "gs_acl": "public-read", + "gs_bucket": "chromium-browser-asan" + }, + "execution_mode": "COMPILE_AND_TEST", + "legacy_chromium_config": { + "apply_configs": [ + "mb", + "clobber" + ], + "build_config": "Debug", + "config": "chromium_asan", + "target_bits": 64 + }, + "legacy_gclient_config": { + "config": "chromium" + } + } + } + ] + }, + "builder_ids": [ + { + "bucket": "ci", + "builder": "ASAN Debug", + "project": "chromium" + } + ] + } + }, + "$build/reclient": { + "instance": "rbe-chromium-untrusted", + "jobs": 500, + "metrics_project": "chromium-reclient-metrics", + "scandeps_server": true + }, + "$recipe_engine/resultdb/test_presentation": { + "column_keys": [], + "grouping_keys": [ + "status", + "v.test_suite" + ] + }, + "builder_group": "tryserver.chromium.fuzz", + "recipe": "chromium_trybot" +} \ No newline at end of file
diff --git a/infra/config/generated/builders/try/linux-asan-media-rel/properties.json b/infra/config/generated/builders/try/linux-asan-media-rel/properties.json new file mode 100644 index 0000000..0c006c2 --- /dev/null +++ b/infra/config/generated/builders/try/linux-asan-media-rel/properties.json
@@ -0,0 +1,60 @@ +{ + "$build/chromium_tests_builder_config": { + "builder_config": { + "builder_db": { + "entries": [ + { + "builder_id": { + "bucket": "ci", + "builder": "ASAN Release Media", + "project": "chromium" + }, + "builder_spec": { + "builder_group": "chromium.fuzz", + "clusterfuzz_archive": { + "archive_name_prefix": "asan", + "gs_acl": "public-read", + "gs_bucket": "chrome-test-builds/media" + }, + "execution_mode": "COMPILE_AND_TEST", + "legacy_chromium_config": { + "apply_configs": [ + "mb", + "clobber" + ], + "build_config": "Release", + "config": "chromium_asan", + "target_bits": 64 + }, + "legacy_gclient_config": { + "config": "chromium" + } + } + } + ] + }, + "builder_ids": [ + { + "bucket": "ci", + "builder": "ASAN Release Media", + "project": "chromium" + } + ] + } + }, + "$build/reclient": { + "instance": "rbe-chromium-untrusted", + "jobs": 500, + "metrics_project": "chromium-reclient-metrics", + "scandeps_server": true + }, + "$recipe_engine/resultdb/test_presentation": { + "column_keys": [], + "grouping_keys": [ + "status", + "v.test_suite" + ] + }, + "builder_group": "tryserver.chromium.fuzz", + "recipe": "chromium_trybot" +} \ No newline at end of file
diff --git a/infra/config/generated/builders/try/linux-asan-media-v8-arm-rel/properties.json b/infra/config/generated/builders/try/linux-asan-media-v8-arm-rel/properties.json new file mode 100644 index 0000000..325bc7a9 --- /dev/null +++ b/infra/config/generated/builders/try/linux-asan-media-v8-arm-rel/properties.json
@@ -0,0 +1,61 @@ +{ + "$build/chromium_tests_builder_config": { + "builder_config": { + "builder_db": { + "entries": [ + { + "builder_id": { + "bucket": "ci", + "builder": "ASan Release Media (32-bit x86 with V8-ARM)", + "project": "chromium" + }, + "builder_spec": { + "builder_group": "chromium.fuzz", + "clusterfuzz_archive": { + "archive_name_prefix": "asan-v8-arm", + "archive_subdir": "v8-arm", + "gs_acl": "public-read", + "gs_bucket": "chrome-test-builds/media" + }, + "execution_mode": "COMPILE_AND_TEST", + "legacy_chromium_config": { + "apply_configs": [ + "mb", + "clobber" + ], + "build_config": "Release", + "config": "chromium_asan", + "target_bits": 32 + }, + "legacy_gclient_config": { + "config": "chromium" + } + } + } + ] + }, + "builder_ids": [ + { + "bucket": "ci", + "builder": "ASan Release Media (32-bit x86 with V8-ARM)", + "project": "chromium" + } + ] + } + }, + "$build/reclient": { + "instance": "rbe-chromium-untrusted", + "jobs": 500, + "metrics_project": "chromium-reclient-metrics", + "scandeps_server": true + }, + "$recipe_engine/resultdb/test_presentation": { + "column_keys": [], + "grouping_keys": [ + "status", + "v.test_suite" + ] + }, + "builder_group": "tryserver.chromium.fuzz", + "recipe": "chromium_trybot" +} \ No newline at end of file
diff --git a/infra/config/generated/builders/try/linux-asan-rel/properties.json b/infra/config/generated/builders/try/linux-asan-rel/properties.json new file mode 100644 index 0000000..3218bab4 --- /dev/null +++ b/infra/config/generated/builders/try/linux-asan-rel/properties.json
@@ -0,0 +1,60 @@ +{ + "$build/chromium_tests_builder_config": { + "builder_config": { + "builder_db": { + "entries": [ + { + "builder_id": { + "bucket": "ci", + "builder": "ASAN Release", + "project": "chromium" + }, + "builder_spec": { + "builder_group": "chromium.fuzz", + "clusterfuzz_archive": { + "archive_name_prefix": "asan", + "gs_acl": "public-read", + "gs_bucket": "chromium-browser-asan" + }, + "execution_mode": "COMPILE_AND_TEST", + "legacy_chromium_config": { + "apply_configs": [ + "mb", + "clobber" + ], + "build_config": "Release", + "config": "chromium_asan", + "target_bits": 64 + }, + "legacy_gclient_config": { + "config": "chromium" + } + } + } + ] + }, + "builder_ids": [ + { + "bucket": "ci", + "builder": "ASAN Release", + "project": "chromium" + } + ] + } + }, + "$build/reclient": { + "instance": "rbe-chromium-untrusted", + "jobs": 500, + "metrics_project": "chromium-reclient-metrics", + "scandeps_server": true + }, + "$recipe_engine/resultdb/test_presentation": { + "column_keys": [], + "grouping_keys": [ + "status", + "v.test_suite" + ] + }, + "builder_group": "tryserver.chromium.fuzz", + "recipe": "chromium_trybot" +} \ No newline at end of file
diff --git a/infra/config/generated/builders/try/linux-asan-v8-arm-dbg/properties.json b/infra/config/generated/builders/try/linux-asan-v8-arm-dbg/properties.json new file mode 100644 index 0000000..b171d7d --- /dev/null +++ b/infra/config/generated/builders/try/linux-asan-v8-arm-dbg/properties.json
@@ -0,0 +1,61 @@ +{ + "$build/chromium_tests_builder_config": { + "builder_config": { + "builder_db": { + "entries": [ + { + "builder_id": { + "bucket": "ci", + "builder": "ASan Debug (32-bit x86 with V8-ARM)", + "project": "chromium" + }, + "builder_spec": { + "builder_group": "chromium.fuzz", + "clusterfuzz_archive": { + "archive_name_prefix": "asan-v8-arm", + "archive_subdir": "v8-arm", + "gs_acl": "public-read", + "gs_bucket": "chromium-browser-asan" + }, + "execution_mode": "COMPILE_AND_TEST", + "legacy_chromium_config": { + "apply_configs": [ + "mb", + "clobber" + ], + "build_config": "Debug", + "config": "chromium_asan", + "target_bits": 32 + }, + "legacy_gclient_config": { + "config": "chromium" + } + } + } + ] + }, + "builder_ids": [ + { + "bucket": "ci", + "builder": "ASan Debug (32-bit x86 with V8-ARM)", + "project": "chromium" + } + ] + } + }, + "$build/reclient": { + "instance": "rbe-chromium-untrusted", + "jobs": 500, + "metrics_project": "chromium-reclient-metrics", + "scandeps_server": true + }, + "$recipe_engine/resultdb/test_presentation": { + "column_keys": [], + "grouping_keys": [ + "status", + "v.test_suite" + ] + }, + "builder_group": "tryserver.chromium.fuzz", + "recipe": "chromium_trybot" +} \ No newline at end of file
diff --git a/infra/config/generated/builders/try/linux-asan-v8-arm-rel/properties.json b/infra/config/generated/builders/try/linux-asan-v8-arm-rel/properties.json new file mode 100644 index 0000000..f6ec2d9 --- /dev/null +++ b/infra/config/generated/builders/try/linux-asan-v8-arm-rel/properties.json
@@ -0,0 +1,61 @@ +{ + "$build/chromium_tests_builder_config": { + "builder_config": { + "builder_db": { + "entries": [ + { + "builder_id": { + "bucket": "ci", + "builder": "ASan Release (32-bit x86 with V8-ARM)", + "project": "chromium" + }, + "builder_spec": { + "builder_group": "chromium.fuzz", + "clusterfuzz_archive": { + "archive_name_prefix": "asan-v8-arm", + "archive_subdir": "v8-arm", + "gs_acl": "public-read", + "gs_bucket": "chromium-browser-asan" + }, + "execution_mode": "COMPILE_AND_TEST", + "legacy_chromium_config": { + "apply_configs": [ + "mb", + "clobber" + ], + "build_config": "Release", + "config": "chromium_asan", + "target_bits": 32 + }, + "legacy_gclient_config": { + "config": "chromium" + } + } + } + ] + }, + "builder_ids": [ + { + "bucket": "ci", + "builder": "ASan Release (32-bit x86 with V8-ARM)", + "project": "chromium" + } + ] + } + }, + "$build/reclient": { + "instance": "rbe-chromium-untrusted", + "jobs": 500, + "metrics_project": "chromium-reclient-metrics", + "scandeps_server": true + }, + "$recipe_engine/resultdb/test_presentation": { + "column_keys": [], + "grouping_keys": [ + "status", + "v.test_suite" + ] + }, + "builder_group": "tryserver.chromium.fuzz", + "recipe": "chromium_trybot" +} \ No newline at end of file
diff --git a/infra/config/generated/builders/try/linux-chromeos-asan-rel/properties.json b/infra/config/generated/builders/try/linux-chromeos-asan-rel/properties.json new file mode 100644 index 0000000..8819501 --- /dev/null +++ b/infra/config/generated/builders/try/linux-chromeos-asan-rel/properties.json
@@ -0,0 +1,64 @@ +{ + "$build/chromium_tests_builder_config": { + "builder_config": { + "builder_db": { + "entries": [ + { + "builder_id": { + "bucket": "ci", + "builder": "ChromiumOS ASAN Release", + "project": "chromium" + }, + "builder_spec": { + "builder_group": "chromium.fuzz", + "clusterfuzz_archive": { + "archive_name_prefix": "asan", + "archive_subdir": "chromeos", + "gs_acl": "public-read", + "gs_bucket": "chromium-browser-asan" + }, + "execution_mode": "COMPILE_AND_TEST", + "legacy_chromium_config": { + "apply_configs": [ + "mb", + "clobber" + ], + "build_config": "Release", + "config": "chromium_asan", + "target_bits": 64 + }, + "legacy_gclient_config": { + "apply_configs": [ + "chromeos" + ], + "config": "chromium" + } + } + } + ] + }, + "builder_ids": [ + { + "bucket": "ci", + "builder": "ChromiumOS ASAN Release", + "project": "chromium" + } + ] + } + }, + "$build/reclient": { + "instance": "rbe-chromium-untrusted", + "jobs": 500, + "metrics_project": "chromium-reclient-metrics", + "scandeps_server": true + }, + "$recipe_engine/resultdb/test_presentation": { + "column_keys": [], + "grouping_keys": [ + "status", + "v.test_suite" + ] + }, + "builder_group": "tryserver.chromium.fuzz", + "recipe": "chromium_trybot" +} \ No newline at end of file
diff --git a/infra/config/generated/builders/try/linux-msan-chained-origins-rel/properties.json b/infra/config/generated/builders/try/linux-msan-chained-origins-rel/properties.json new file mode 100644 index 0000000..05b07d4 --- /dev/null +++ b/infra/config/generated/builders/try/linux-msan-chained-origins-rel/properties.json
@@ -0,0 +1,61 @@ +{ + "$build/chromium_tests_builder_config": { + "builder_config": { + "builder_db": { + "entries": [ + { + "builder_id": { + "bucket": "ci", + "builder": "MSAN Release (chained origins)", + "project": "chromium" + }, + "builder_spec": { + "builder_group": "chromium.fuzz", + "clusterfuzz_archive": { + "archive_name_prefix": "msan-chained-origins", + "gs_acl": "public-read", + "gs_bucket": "chromium-browser-msan" + }, + "execution_mode": "COMPILE_AND_TEST", + "legacy_chromium_config": { + "apply_configs": [ + "mb", + "msan", + "clobber" + ], + "build_config": "Release", + "config": "chromium_clang", + "target_bits": 64 + }, + "legacy_gclient_config": { + "config": "chromium" + } + } + } + ] + }, + "builder_ids": [ + { + "bucket": "ci", + "builder": "MSAN Release (chained origins)", + "project": "chromium" + } + ] + } + }, + "$build/reclient": { + "instance": "rbe-chromium-untrusted", + "jobs": 500, + "metrics_project": "chromium-reclient-metrics", + "scandeps_server": true + }, + "$recipe_engine/resultdb/test_presentation": { + "column_keys": [], + "grouping_keys": [ + "status", + "v.test_suite" + ] + }, + "builder_group": "tryserver.chromium.fuzz", + "recipe": "chromium_trybot" +} \ No newline at end of file
diff --git a/infra/config/generated/builders/try/linux-msan-no-origins-rel/properties.json b/infra/config/generated/builders/try/linux-msan-no-origins-rel/properties.json new file mode 100644 index 0000000..ac22960 --- /dev/null +++ b/infra/config/generated/builders/try/linux-msan-no-origins-rel/properties.json
@@ -0,0 +1,61 @@ +{ + "$build/chromium_tests_builder_config": { + "builder_config": { + "builder_db": { + "entries": [ + { + "builder_id": { + "bucket": "ci", + "builder": "MSAN Release (no origins)", + "project": "chromium" + }, + "builder_spec": { + "builder_group": "chromium.fuzz", + "clusterfuzz_archive": { + "archive_name_prefix": "msan-no-origins", + "gs_acl": "public-read", + "gs_bucket": "chromium-browser-msan" + }, + "execution_mode": "COMPILE_AND_TEST", + "legacy_chromium_config": { + "apply_configs": [ + "mb", + "msan", + "clobber" + ], + "build_config": "Release", + "config": "chromium_clang", + "target_bits": 64 + }, + "legacy_gclient_config": { + "config": "chromium" + } + } + } + ] + }, + "builder_ids": [ + { + "bucket": "ci", + "builder": "MSAN Release (no origins)", + "project": "chromium" + } + ] + } + }, + "$build/reclient": { + "instance": "rbe-chromium-untrusted", + "jobs": 500, + "metrics_project": "chromium-reclient-metrics", + "scandeps_server": true + }, + "$recipe_engine/resultdb/test_presentation": { + "column_keys": [], + "grouping_keys": [ + "status", + "v.test_suite" + ] + }, + "builder_group": "tryserver.chromium.fuzz", + "recipe": "chromium_trybot" +} \ No newline at end of file
diff --git a/infra/config/generated/builders/try/linux-tsan-dbg/properties.json b/infra/config/generated/builders/try/linux-tsan-dbg/properties.json new file mode 100644 index 0000000..60768a0 --- /dev/null +++ b/infra/config/generated/builders/try/linux-tsan-dbg/properties.json
@@ -0,0 +1,61 @@ +{ + "$build/chromium_tests_builder_config": { + "builder_config": { + "builder_db": { + "entries": [ + { + "builder_id": { + "bucket": "ci", + "builder": "TSAN Debug", + "project": "chromium" + }, + "builder_spec": { + "builder_group": "chromium.fuzz", + "clusterfuzz_archive": { + "archive_name_prefix": "tsan", + "gs_acl": "public-read", + "gs_bucket": "chromium-browser-tsan" + }, + "execution_mode": "COMPILE_AND_TEST", + "legacy_chromium_config": { + "apply_configs": [ + "mb", + "tsan2", + "clobber" + ], + "build_config": "Debug", + "config": "chromium_clang", + "target_bits": 64 + }, + "legacy_gclient_config": { + "config": "chromium" + } + } + } + ] + }, + "builder_ids": [ + { + "bucket": "ci", + "builder": "TSAN Debug", + "project": "chromium" + } + ] + } + }, + "$build/reclient": { + "instance": "rbe-chromium-untrusted", + "jobs": 500, + "metrics_project": "chromium-reclient-metrics", + "scandeps_server": true + }, + "$recipe_engine/resultdb/test_presentation": { + "column_keys": [], + "grouping_keys": [ + "status", + "v.test_suite" + ] + }, + "builder_group": "tryserver.chromium.fuzz", + "recipe": "chromium_trybot" +} \ No newline at end of file
diff --git a/infra/config/generated/builders/try/linux-tsan-rel/properties.json b/infra/config/generated/builders/try/linux-tsan-rel/properties.json new file mode 100644 index 0000000..7d39cd3 --- /dev/null +++ b/infra/config/generated/builders/try/linux-tsan-rel/properties.json
@@ -0,0 +1,61 @@ +{ + "$build/chromium_tests_builder_config": { + "builder_config": { + "builder_db": { + "entries": [ + { + "builder_id": { + "bucket": "ci", + "builder": "TSAN Release", + "project": "chromium" + }, + "builder_spec": { + "builder_group": "chromium.fuzz", + "clusterfuzz_archive": { + "archive_name_prefix": "tsan", + "gs_acl": "public-read", + "gs_bucket": "chromium-browser-tsan" + }, + "execution_mode": "COMPILE_AND_TEST", + "legacy_chromium_config": { + "apply_configs": [ + "mb", + "tsan2", + "clobber" + ], + "build_config": "Release", + "config": "chromium_clang", + "target_bits": 64 + }, + "legacy_gclient_config": { + "config": "chromium" + } + } + } + ] + }, + "builder_ids": [ + { + "bucket": "ci", + "builder": "TSAN Release", + "project": "chromium" + } + ] + } + }, + "$build/reclient": { + "instance": "rbe-chromium-untrusted", + "jobs": 500, + "metrics_project": "chromium-reclient-metrics", + "scandeps_server": true + }, + "$recipe_engine/resultdb/test_presentation": { + "column_keys": [], + "grouping_keys": [ + "status", + "v.test_suite" + ] + }, + "builder_group": "tryserver.chromium.fuzz", + "recipe": "chromium_trybot" +} \ No newline at end of file
diff --git a/infra/config/generated/builders/try/linux-ubsan-rel/properties.json b/infra/config/generated/builders/try/linux-ubsan-rel/properties.json new file mode 100644 index 0000000..50af428f --- /dev/null +++ b/infra/config/generated/builders/try/linux-ubsan-rel/properties.json
@@ -0,0 +1,59 @@ +{ + "$build/chromium_tests_builder_config": { + "builder_config": { + "builder_db": { + "entries": [ + { + "builder_id": { + "bucket": "ci", + "builder": "UBSan Release", + "project": "chromium" + }, + "builder_spec": { + "builder_group": "chromium.fuzz", + "clusterfuzz_archive": { + "archive_name_prefix": "ubsan", + "gs_acl": "public-read", + "gs_bucket": "chromium-browser-ubsan" + }, + "execution_mode": "COMPILE_AND_TEST", + "legacy_chromium_config": { + "apply_configs": [ + "mb" + ], + "build_config": "Release", + "config": "chromium_linux_ubsan", + "target_bits": 64 + }, + "legacy_gclient_config": { + "config": "chromium" + } + } + } + ] + }, + "builder_ids": [ + { + "bucket": "ci", + "builder": "UBSan Release", + "project": "chromium" + } + ] + } + }, + "$build/reclient": { + "instance": "rbe-chromium-untrusted", + "jobs": 500, + "metrics_project": "chromium-reclient-metrics", + "scandeps_server": true + }, + "$recipe_engine/resultdb/test_presentation": { + "column_keys": [], + "grouping_keys": [ + "status", + "v.test_suite" + ] + }, + "builder_group": "tryserver.chromium.fuzz", + "recipe": "chromium_trybot" +} \ No newline at end of file
diff --git a/infra/config/generated/builders/try/linux-ubsan-vptr-rel/properties.json b/infra/config/generated/builders/try/linux-ubsan-vptr-rel/properties.json new file mode 100644 index 0000000..b5be07cc --- /dev/null +++ b/infra/config/generated/builders/try/linux-ubsan-vptr-rel/properties.json
@@ -0,0 +1,60 @@ +{ + "$build/chromium_tests_builder_config": { + "builder_config": { + "builder_db": { + "entries": [ + { + "builder_id": { + "bucket": "ci", + "builder": "UBSan vptr Release", + "project": "chromium" + }, + "builder_spec": { + "builder_group": "chromium.fuzz", + "clusterfuzz_archive": { + "archive_name_prefix": "ubsan-vptr", + "archive_subdir": "vptr", + "gs_acl": "public-read", + "gs_bucket": "chromium-browser-ubsan" + }, + "execution_mode": "COMPILE_AND_TEST", + "legacy_chromium_config": { + "apply_configs": [ + "mb" + ], + "build_config": "Release", + "config": "chromium_linux_ubsan_vptr", + "target_bits": 64 + }, + "legacy_gclient_config": { + "config": "chromium" + } + } + } + ] + }, + "builder_ids": [ + { + "bucket": "ci", + "builder": "UBSan vptr Release", + "project": "chromium" + } + ] + } + }, + "$build/reclient": { + "instance": "rbe-chromium-untrusted", + "jobs": 500, + "metrics_project": "chromium-reclient-metrics", + "scandeps_server": true + }, + "$recipe_engine/resultdb/test_presentation": { + "column_keys": [], + "grouping_keys": [ + "status", + "v.test_suite" + ] + }, + "builder_group": "tryserver.chromium.fuzz", + "recipe": "chromium_trybot" +} \ No newline at end of file
diff --git a/infra/config/generated/builders/try/mac-asan-media-rel/properties.json b/infra/config/generated/builders/try/mac-asan-media-rel/properties.json new file mode 100644 index 0000000..749a454 --- /dev/null +++ b/infra/config/generated/builders/try/mac-asan-media-rel/properties.json
@@ -0,0 +1,60 @@ +{ + "$build/chromium_tests_builder_config": { + "builder_config": { + "builder_db": { + "entries": [ + { + "builder_id": { + "bucket": "ci", + "builder": "Mac ASAN Release Media", + "project": "chromium" + }, + "builder_spec": { + "builder_group": "chromium.fuzz", + "clusterfuzz_archive": { + "archive_name_prefix": "asan", + "gs_acl": "public-read", + "gs_bucket": "chrome-test-builds/media" + }, + "execution_mode": "COMPILE_AND_TEST", + "legacy_chromium_config": { + "apply_configs": [ + "mb", + "clobber" + ], + "build_config": "Release", + "config": "chromium_asan", + "target_bits": 64 + }, + "legacy_gclient_config": { + "config": "chromium" + } + } + } + ] + }, + "builder_ids": [ + { + "bucket": "ci", + "builder": "Mac ASAN Release Media", + "project": "chromium" + } + ] + } + }, + "$build/reclient": { + "instance": "rbe-chromium-untrusted", + "jobs": 500, + "metrics_project": "chromium-reclient-metrics", + "scandeps_server": true + }, + "$recipe_engine/resultdb/test_presentation": { + "column_keys": [], + "grouping_keys": [ + "status", + "v.test_suite" + ] + }, + "builder_group": "tryserver.chromium.fuzz", + "recipe": "chromium_trybot" +} \ No newline at end of file
diff --git a/infra/config/generated/builders/try/mac-asan-rel/properties.json b/infra/config/generated/builders/try/mac-asan-rel/properties.json new file mode 100644 index 0000000..758d893 --- /dev/null +++ b/infra/config/generated/builders/try/mac-asan-rel/properties.json
@@ -0,0 +1,60 @@ +{ + "$build/chromium_tests_builder_config": { + "builder_config": { + "builder_db": { + "entries": [ + { + "builder_id": { + "bucket": "ci", + "builder": "Mac ASAN Release", + "project": "chromium" + }, + "builder_spec": { + "builder_group": "chromium.fuzz", + "clusterfuzz_archive": { + "archive_name_prefix": "asan", + "gs_acl": "public-read", + "gs_bucket": "chromium-browser-asan" + }, + "execution_mode": "COMPILE_AND_TEST", + "legacy_chromium_config": { + "apply_configs": [ + "mb", + "clobber" + ], + "build_config": "Release", + "config": "chromium_asan", + "target_bits": 64 + }, + "legacy_gclient_config": { + "config": "chromium" + } + } + } + ] + }, + "builder_ids": [ + { + "bucket": "ci", + "builder": "Mac ASAN Release", + "project": "chromium" + } + ] + } + }, + "$build/reclient": { + "instance": "rbe-chromium-untrusted", + "jobs": 500, + "metrics_project": "chromium-reclient-metrics", + "scandeps_server": true + }, + "$recipe_engine/resultdb/test_presentation": { + "column_keys": [], + "grouping_keys": [ + "status", + "v.test_suite" + ] + }, + "builder_group": "tryserver.chromium.fuzz", + "recipe": "chromium_trybot" +} \ No newline at end of file
diff --git a/infra/config/generated/builders/try/win-asan-media-rel/properties.json b/infra/config/generated/builders/try/win-asan-media-rel/properties.json new file mode 100644 index 0000000..ae3c5b8 --- /dev/null +++ b/infra/config/generated/builders/try/win-asan-media-rel/properties.json
@@ -0,0 +1,60 @@ +{ + "$build/chromium_tests_builder_config": { + "builder_config": { + "builder_db": { + "entries": [ + { + "builder_id": { + "bucket": "ci", + "builder": "Win ASan Release Media", + "project": "chromium" + }, + "builder_spec": { + "builder_group": "chromium.fuzz", + "clusterfuzz_archive": { + "archive_name_prefix": "asan", + "gs_acl": "public-read", + "gs_bucket": "chrome-test-builds/media" + }, + "execution_mode": "COMPILE_AND_TEST", + "legacy_chromium_config": { + "apply_configs": [ + "mb", + "clobber" + ], + "build_config": "Release", + "config": "chromium_win_clang_asan", + "target_bits": 32 + }, + "legacy_gclient_config": { + "config": "chromium" + } + } + } + ] + }, + "builder_ids": [ + { + "bucket": "ci", + "builder": "Win ASan Release Media", + "project": "chromium" + } + ] + } + }, + "$build/reclient": { + "instance": "rbe-chromium-untrusted", + "jobs": 500, + "metrics_project": "chromium-reclient-metrics", + "scandeps_server": true + }, + "$recipe_engine/resultdb/test_presentation": { + "column_keys": [], + "grouping_keys": [ + "status", + "v.test_suite" + ] + }, + "builder_group": "tryserver.chromium.fuzz", + "recipe": "chromium_trybot" +} \ No newline at end of file
diff --git a/infra/config/generated/builders/try/win-asan-rel/properties.json b/infra/config/generated/builders/try/win-asan-rel/properties.json new file mode 100644 index 0000000..cd222c9 --- /dev/null +++ b/infra/config/generated/builders/try/win-asan-rel/properties.json
@@ -0,0 +1,60 @@ +{ + "$build/chromium_tests_builder_config": { + "builder_config": { + "builder_db": { + "entries": [ + { + "builder_id": { + "bucket": "ci", + "builder": "Win ASan Release", + "project": "chromium" + }, + "builder_spec": { + "builder_group": "chromium.fuzz", + "clusterfuzz_archive": { + "archive_name_prefix": "asan", + "gs_acl": "public-read", + "gs_bucket": "chromium-browser-asan" + }, + "execution_mode": "COMPILE_AND_TEST", + "legacy_chromium_config": { + "apply_configs": [ + "mb", + "clobber" + ], + "build_config": "Release", + "config": "chromium_win_clang_asan", + "target_bits": 64 + }, + "legacy_gclient_config": { + "config": "chromium" + } + } + } + ] + }, + "builder_ids": [ + { + "bucket": "ci", + "builder": "Win ASan Release", + "project": "chromium" + } + ] + } + }, + "$build/reclient": { + "instance": "rbe-chromium-untrusted", + "jobs": 500, + "metrics_project": "chromium-reclient-metrics", + "scandeps_server": true + }, + "$recipe_engine/resultdb/test_presentation": { + "column_keys": [], + "grouping_keys": [ + "status", + "v.test_suite" + ] + }, + "builder_group": "tryserver.chromium.fuzz", + "recipe": "chromium_trybot" +} \ No newline at end of file
diff --git a/infra/config/generated/luci/commit-queue.cfg b/infra/config/generated/luci/commit-queue.cfg index 3f002c8..5d413a4 100644 --- a/infra/config/generated/luci/commit-queue.cfg +++ b/infra/config/generated/luci/commit-queue.cfg
@@ -1942,6 +1942,10 @@ includable_only: true } builders { + name: "chromium/try/dawn-try-mac-arm64-deps-rel" + includable_only: true + } + builders { name: "chromium/try/dawn-try-mac-arm64-rel" includable_only: true } @@ -2255,10 +2259,18 @@ includable_only: true } builders { + name: "chromium/try/fuchsia-fyi-x64-asan" + includable_only: true + } + builders { name: "chromium/try/fuchsia-fyi-x64-dbg" includable_only: true } builders { + name: "chromium/try/fuchsia-fyi-x64-dbg-persistent-emulator" + includable_only: true + } + builders { name: "chromium/try/fuchsia-official" includable_only: true } @@ -2988,6 +3000,30 @@ includable_only: true } builders { + name: "chromium/try/linux-asan-dbg" + includable_only: true + } + builders { + name: "chromium/try/linux-asan-media-rel" + includable_only: true + } + builders { + name: "chromium/try/linux-asan-media-v8-arm-rel" + includable_only: true + } + builders { + name: "chromium/try/linux-asan-rel" + includable_only: true + } + builders { + name: "chromium/try/linux-asan-v8-arm-dbg" + includable_only: true + } + builders { + name: "chromium/try/linux-asan-v8-arm-rel" + includable_only: true + } + builders { name: "chromium/try/linux-bfcache-rel" includable_only: true } @@ -3103,6 +3139,10 @@ includable_only: true } builders { + name: "chromium/try/linux-chromeos-asan-rel" + includable_only: true + } + builders { name: "chromium/try/linux-chromeos-clang-tidy-rel" includable_only: true } @@ -3400,6 +3440,14 @@ includable_only: true } builders { + name: "chromium/try/linux-msan-chained-origins-rel" + includable_only: true + } + builders { + name: "chromium/try/linux-msan-no-origins-rel" + includable_only: true + } + builders { name: "chromium/try/linux-official" includable_only: true } @@ -3530,14 +3578,30 @@ includable_only: true } builders { + name: "chromium/try/linux-tsan-dbg" + includable_only: true + } + builders { + name: "chromium/try/linux-tsan-rel" + includable_only: true + } + builders { name: "chromium/try/linux-ubsan-fyi-rel" includable_only: true } builders { + name: "chromium/try/linux-ubsan-rel" + includable_only: true + } + builders { name: "chromium/try/linux-ubsan-vptr" includable_only: true } builders { + name: "chromium/try/linux-ubsan-vptr-rel" + includable_only: true + } + builders { name: "chromium/try/linux-updater-try-builder-dbg" location_filters { gerrit_host_regexp: ".*" @@ -4116,6 +4180,14 @@ includable_only: true } builders { + name: "chromium/try/mac-asan-media-rel" + includable_only: true + } + builders { + name: "chromium/try/mac-asan-rel" + includable_only: true + } + builders { name: "chromium/try/mac-builder-next" includable_only: true } @@ -4623,6 +4695,14 @@ includable_only: true } builders { + name: "chromium/try/win-asan-media-rel" + includable_only: true + } + builders { + name: "chromium/try/win-asan-rel" + includable_only: true + } + builders { name: "chromium/try/win-celab-try-rel" includable_only: true }
diff --git a/infra/config/generated/luci/cr-buildbucket.cfg b/infra/config/generated/luci/cr-buildbucket.cfg index 86dbf2a..978e7e0 100644 --- a/infra/config/generated/luci/cr-buildbucket.cfg +++ b/infra/config/generated/luci/cr-buildbucket.cfg
@@ -266,6 +266,7 @@ use_invocation_timestamp: true } } + description_html: "This builder is mirrored by any of the following try builders:<br/><ul><li><a href=\"https://ci.chromium.org/p/chromium/builders/try/linux-asan-dbg\">linux-asan-dbg</a></li></ul>" shadow_builder_adjustments { service_account: "chromium-try-builder@chops-service-accounts.iam.gserviceaccount.com" pool: "luci.chromium.try" @@ -360,6 +361,7 @@ use_invocation_timestamp: true } } + description_html: "This builder is mirrored by any of the following try builders:<br/><ul><li><a href=\"https://ci.chromium.org/p/chromium/builders/try/linux-asan-rel\">linux-asan-rel</a></li></ul>" shadow_builder_adjustments { service_account: "chromium-try-builder@chops-service-accounts.iam.gserviceaccount.com" pool: "luci.chromium.try" @@ -454,6 +456,7 @@ use_invocation_timestamp: true } } + description_html: "This builder is mirrored by any of the following try builders:<br/><ul><li><a href=\"https://ci.chromium.org/p/chromium/builders/try/linux-asan-media-rel\">linux-asan-media-rel</a></li></ul>" shadow_builder_adjustments { service_account: "chromium-try-builder@chops-service-accounts.iam.gserviceaccount.com" pool: "luci.chromium.try" @@ -548,6 +551,7 @@ use_invocation_timestamp: true } } + description_html: "This builder is mirrored by any of the following try builders:<br/><ul><li><a href=\"https://ci.chromium.org/p/chromium/builders/try/linux-asan-v8-arm-dbg\">linux-asan-v8-arm-dbg</a></li></ul>" shadow_builder_adjustments { service_account: "chromium-try-builder@chops-service-accounts.iam.gserviceaccount.com" pool: "luci.chromium.try" @@ -642,6 +646,7 @@ use_invocation_timestamp: true } } + description_html: "This builder is mirrored by any of the following try builders:<br/><ul><li><a href=\"https://ci.chromium.org/p/chromium/builders/try/linux-asan-v8-arm-rel\">linux-asan-v8-arm-rel</a></li></ul>" shadow_builder_adjustments { service_account: "chromium-try-builder@chops-service-accounts.iam.gserviceaccount.com" pool: "luci.chromium.try" @@ -736,6 +741,7 @@ use_invocation_timestamp: true } } + description_html: "This builder is mirrored by any of the following try builders:<br/><ul><li><a href=\"https://ci.chromium.org/p/chromium/builders/try/linux-asan-media-v8-arm-rel\">linux-asan-media-v8-arm-rel</a></li></ul>" shadow_builder_adjustments { service_account: "chromium-try-builder@chops-service-accounts.iam.gserviceaccount.com" pool: "luci.chromium.try" @@ -3671,6 +3677,7 @@ use_invocation_timestamp: true } } + description_html: "This builder is mirrored by any of the following try builders:<br/><ul><li><a href=\"https://ci.chromium.org/p/chromium/builders/try/linux-chromeos-asan-rel\">linux-chromeos-asan-rel</a></li></ul>" shadow_builder_adjustments { service_account: "chromium-try-builder@chops-service-accounts.iam.gserviceaccount.com" pool: "luci.chromium.try" @@ -7105,6 +7112,7 @@ use_invocation_timestamp: true } } + description_html: "This builder is mirrored by any of the following try builders:<br/><ul><li><a href=\"https://ci.chromium.org/p/chromium/builders/try/dawn-try-mac-arm64-deps-rel\">dawn-try-mac-arm64-deps-rel</a></li></ul>" shadow_builder_adjustments { service_account: "chromium-try-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" pool: "luci.chromium.try" @@ -16577,6 +16585,7 @@ use_invocation_timestamp: true } } + description_html: "This builder is mirrored by any of the following try builders:<br/><ul><li><a href=\"https://ci.chromium.org/p/chromium/builders/try/linux-msan-chained-origins-rel\">linux-msan-chained-origins-rel</a></li></ul>" shadow_builder_adjustments { service_account: "chromium-try-builder@chops-service-accounts.iam.gserviceaccount.com" pool: "luci.chromium.try" @@ -16671,6 +16680,7 @@ use_invocation_timestamp: true } } + description_html: "This builder is mirrored by any of the following try builders:<br/><ul><li><a href=\"https://ci.chromium.org/p/chromium/builders/try/linux-msan-no-origins-rel\">linux-msan-no-origins-rel</a></li></ul>" shadow_builder_adjustments { service_account: "chromium-try-builder@chops-service-accounts.iam.gserviceaccount.com" pool: "luci.chromium.try" @@ -16763,6 +16773,7 @@ use_invocation_timestamp: true } } + description_html: "This builder is mirrored by any of the following try builders:<br/><ul><li><a href=\"https://ci.chromium.org/p/chromium/builders/try/mac-asan-rel\">mac-asan-rel</a></li></ul>" shadow_builder_adjustments { service_account: "chromium-try-builder@chops-service-accounts.iam.gserviceaccount.com" pool: "luci.chromium.try" @@ -16856,6 +16867,7 @@ use_invocation_timestamp: true } } + description_html: "This builder is mirrored by any of the following try builders:<br/><ul><li><a href=\"https://ci.chromium.org/p/chromium/builders/try/mac-asan-media-rel\">mac-asan-media-rel</a></li></ul>" shadow_builder_adjustments { service_account: "chromium-try-builder@chops-service-accounts.iam.gserviceaccount.com" pool: "luci.chromium.try" @@ -20233,6 +20245,7 @@ use_invocation_timestamp: true } } + description_html: "This builder is mirrored by any of the following try builders:<br/><ul><li><a href=\"https://ci.chromium.org/p/chromium/builders/try/linux-tsan-dbg\">linux-tsan-dbg</a></li></ul>" shadow_builder_adjustments { service_account: "chromium-try-builder@chops-service-accounts.iam.gserviceaccount.com" pool: "luci.chromium.try" @@ -20327,6 +20340,7 @@ use_invocation_timestamp: true } } + description_html: "This builder is mirrored by any of the following try builders:<br/><ul><li><a href=\"https://ci.chromium.org/p/chromium/builders/try/linux-tsan-rel\">linux-tsan-rel</a></li></ul>" shadow_builder_adjustments { service_account: "chromium-try-builder@chops-service-accounts.iam.gserviceaccount.com" pool: "luci.chromium.try" @@ -23864,6 +23878,7 @@ use_invocation_timestamp: true } } + description_html: "This builder is mirrored by any of the following try builders:<br/><ul><li><a href=\"https://ci.chromium.org/p/chromium/builders/try/linux-ubsan-rel\">linux-ubsan-rel</a></li></ul>" shadow_builder_adjustments { service_account: "chromium-try-builder@chops-service-accounts.iam.gserviceaccount.com" pool: "luci.chromium.try" @@ -23958,6 +23973,7 @@ use_invocation_timestamp: true } } + description_html: "This builder is mirrored by any of the following try builders:<br/><ul><li><a href=\"https://ci.chromium.org/p/chromium/builders/try/linux-ubsan-vptr-rel\">linux-ubsan-vptr-rel</a></li></ul>" shadow_builder_adjustments { service_account: "chromium-try-builder@chops-service-accounts.iam.gserviceaccount.com" pool: "luci.chromium.try" @@ -24520,6 +24536,7 @@ use_invocation_timestamp: true } } + description_html: "This builder is mirrored by any of the following try builders:<br/><ul><li><a href=\"https://ci.chromium.org/p/chromium/builders/try/win-asan-rel\">win-asan-rel</a></li></ul>" shadow_builder_adjustments { service_account: "chromium-try-builder@chops-service-accounts.iam.gserviceaccount.com" pool: "luci.chromium.try" @@ -24613,6 +24630,7 @@ use_invocation_timestamp: true } } + description_html: "This builder is mirrored by any of the following try builders:<br/><ul><li><a href=\"https://ci.chromium.org/p/chromium/builders/try/win-asan-media-rel\">win-asan-media-rel</a></li></ul>" shadow_builder_adjustments { service_account: "chromium-try-builder@chops-service-accounts.iam.gserviceaccount.com" pool: "luci.chromium.try" @@ -36256,6 +36274,7 @@ use_invocation_timestamp: true } } + description_html: "This builder is mirrored by any of the following try builders:<br/><ul><li><a href=\"https://ci.chromium.org/p/chromium/builders/try/fuchsia-fyi-x64-asan\">fuchsia-fyi-x64-asan</a></li></ul>" shadow_builder_adjustments { service_account: "chromium-try-builder@chops-service-accounts.iam.gserviceaccount.com" pool: "luci.chromium.try" @@ -36447,6 +36466,7 @@ use_invocation_timestamp: true } } + description_html: "This builder is mirrored by any of the following try builders:<br/><ul><li><a href=\"https://ci.chromium.org/p/chromium/builders/try/fuchsia-fyi-x64-dbg-persistent-emulator\">fuchsia-fyi-x64-dbg-persistent-emulator</a></li></ul>" shadow_builder_adjustments { service_account: "chromium-try-builder@chops-service-accounts.iam.gserviceaccount.com" pool: "luci.chromium.try" @@ -72121,6 +72141,96 @@ description_html: "This builder mirrors the following CI builders:<br/><ul><li><a href=\"https://ci.chromium.org/p/chromium/builders/ci/Dawn Mac x64 Builder\">Dawn Mac x64 Builder</a></li><li><a href=\"https://ci.chromium.org/p/chromium/builders/ci/Dawn Mac x64 Experimental Release (AMD)\">Dawn Mac x64 Experimental Release (AMD)</a></li></ul>" } builders { + name: "dawn-try-mac-arm64-deps-rel" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "builderless:1" + dimensions: "cpu:x86-64" + dimensions: "os:Mac" + dimensions: "pool:luci.chromium.gpu.mac.arm64.apple.m1.try" + exe { + cipd_package: "infra/chromium/bootstrapper/${platform}" + cipd_version: "latest" + cmd: "bootstrapper" + } + properties: + '{' + ' "$bootstrap/exe": {' + ' "exe": {' + ' "cipd_package": "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build",' + ' "cipd_version": "refs/heads/main",' + ' "cmd": [' + ' "luciexe"' + ' ]' + ' }' + ' },' + ' "$bootstrap/properties": {' + ' "properties_file": "infra/config/generated/builders/try/dawn-try-mac-arm64-deps-rel/properties.json",' + ' "top_level_project": {' + ' "ref": "refs/heads/main",' + ' "repo": {' + ' "host": "chromium.googlesource.com",' + ' "project": "chromium/src"' + ' }' + ' }' + ' },' + ' "builder_group": "tryserver.chromium.dawn",' + ' "led_builder_is_bootstrapped": true,' + ' "recipe": "chromium_trybot"' + '}' + execution_timeout_secs: 14400 + expiration_secs: 7200 + grace_period { + seconds: 120 + } + build_numbers: YES + service_account: "chromium-try-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" + task_template_canary_percentage { + value: 5 + } + experiments { + key: "chromium_swarming.expose_merge_script_failures" + value: 100 + } + experiments { + key: "luci.recipes.use_python3" + value: 100 + } + resultdb { + enable: true + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "gpu_try_test_results" + test_results { + predicate { + test_id_regexp: "ninja://chrome/test:telemetry_gpu_integration_test[^/]*/.+" + } + } + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "blink_web_tests_try_test_results" + test_results { + predicate { + test_id_regexp: "(ninja://[^/]*blink_web_tests/.+)|(ninja://[^/]*_wpt_tests/.+)" + } + } + } + history_options { + use_invocation_timestamp: true + } + } + description_html: "This builder mirrors the following CI builders:<br/><ul><li><a href=\"https://ci.chromium.org/p/chromium/builders/ci/Dawn Mac arm64 DEPS Release (Apple M2)\">Dawn Mac arm64 DEPS Release (Apple M2)</a></li></ul>" + contact_team_email: "chrome-gpu-infra@google.com" + } + builders { name: "dawn-try-mac-arm64-rel" swarming_host: "chromium-swarm.appspot.com" dimensions: "builderless:1" @@ -73786,6 +73896,98 @@ description_html: "This builder mirrors the following CI builders:<br/><ul><li><a href=\"https://ci.chromium.org/p/chromium/builders/ci/fuchsia-fyi-arm64-dbg\">fuchsia-fyi-arm64-dbg</a></li></ul>" } builders { + name: "fuchsia-fyi-x64-asan" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "builderless:1" + dimensions: "cores:8" + dimensions: "cpu:x86-64" + dimensions: "os:Ubuntu-22.04" + dimensions: "pool:luci.chromium.try" + dimensions: "ssd:0" + exe { + cipd_package: "infra/chromium/bootstrapper/${platform}" + cipd_version: "latest" + cmd: "bootstrapper" + } + properties: + '{' + ' "$bootstrap/exe": {' + ' "exe": {' + ' "cipd_package": "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build",' + ' "cipd_version": "refs/heads/main",' + ' "cmd": [' + ' "luciexe"' + ' ]' + ' }' + ' },' + ' "$bootstrap/properties": {' + ' "properties_file": "infra/config/generated/builders/try/fuchsia-fyi-x64-asan/properties.json",' + ' "top_level_project": {' + ' "ref": "refs/heads/main",' + ' "repo": {' + ' "host": "chromium.googlesource.com",' + ' "project": "chromium/src"' + ' }' + ' }' + ' },' + ' "builder_group": "tryserver.chromium.fuchsia",' + ' "led_builder_is_bootstrapped": true,' + ' "recipe": "chromium_trybot"' + '}' + execution_timeout_secs: 36000 + expiration_secs: 7200 + grace_period { + seconds: 120 + } + build_numbers: YES + service_account: "chromium-try-builder@chops-service-accounts.iam.gserviceaccount.com" + task_template_canary_percentage { + value: 5 + } + experiments { + key: "chromium_swarming.expose_merge_script_failures" + value: 100 + } + experiments { + key: "luci.recipes.use_python3" + value: 100 + } + resultdb { + enable: true + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "gpu_try_test_results" + test_results { + predicate { + test_id_regexp: "ninja://chrome/test:telemetry_gpu_integration_test[^/]*/.+" + } + } + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "blink_web_tests_try_test_results" + test_results { + predicate { + test_id_regexp: "(ninja://[^/]*blink_web_tests/.+)|(ninja://[^/]*_wpt_tests/.+)" + } + } + } + history_options { + use_invocation_timestamp: true + } + } + description_html: "This builder mirrors the following CI builders:<br/><ul><li><a href=\"https://ci.chromium.org/p/chromium/builders/ci/fuchsia-fyi-x64-asan\">fuchsia-fyi-x64-asan</a></li></ul>" + contact_team_email: "chrome-fuchsia-engprod@google.com" + } + builders { name: "fuchsia-fyi-x64-dbg" swarming_host: "chromium-swarm.appspot.com" dimensions: "builderless:1" @@ -73877,6 +74079,98 @@ description_html: "This builder mirrors the following CI builders:<br/><ul><li><a href=\"https://ci.chromium.org/p/chromium/builders/ci/fuchsia-fyi-x64-dbg\">fuchsia-fyi-x64-dbg</a></li></ul>" } builders { + name: "fuchsia-fyi-x64-dbg-persistent-emulator" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "builderless:1" + dimensions: "cores:8" + dimensions: "cpu:x86-64" + dimensions: "os:Ubuntu-22.04" + dimensions: "pool:luci.chromium.try" + dimensions: "ssd:0" + exe { + cipd_package: "infra/chromium/bootstrapper/${platform}" + cipd_version: "latest" + cmd: "bootstrapper" + } + properties: + '{' + ' "$bootstrap/exe": {' + ' "exe": {' + ' "cipd_package": "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build",' + ' "cipd_version": "refs/heads/main",' + ' "cmd": [' + ' "luciexe"' + ' ]' + ' }' + ' },' + ' "$bootstrap/properties": {' + ' "properties_file": "infra/config/generated/builders/try/fuchsia-fyi-x64-dbg-persistent-emulator/properties.json",' + ' "top_level_project": {' + ' "ref": "refs/heads/main",' + ' "repo": {' + ' "host": "chromium.googlesource.com",' + ' "project": "chromium/src"' + ' }' + ' }' + ' },' + ' "builder_group": "tryserver.chromium.fuchsia",' + ' "led_builder_is_bootstrapped": true,' + ' "recipe": "chromium_trybot"' + '}' + execution_timeout_secs: 36000 + expiration_secs: 7200 + grace_period { + seconds: 120 + } + build_numbers: YES + service_account: "chromium-try-builder@chops-service-accounts.iam.gserviceaccount.com" + task_template_canary_percentage { + value: 5 + } + experiments { + key: "chromium_swarming.expose_merge_script_failures" + value: 100 + } + experiments { + key: "luci.recipes.use_python3" + value: 100 + } + resultdb { + enable: true + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "gpu_try_test_results" + test_results { + predicate { + test_id_regexp: "ninja://chrome/test:telemetry_gpu_integration_test[^/]*/.+" + } + } + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "blink_web_tests_try_test_results" + test_results { + predicate { + test_id_regexp: "(ninja://[^/]*blink_web_tests/.+)|(ninja://[^/]*_wpt_tests/.+)" + } + } + } + history_options { + use_invocation_timestamp: true + } + } + description_html: "This builder mirrors the following CI builders:<br/><ul><li><a href=\"https://ci.chromium.org/p/chromium/builders/ci/fuchsia-fyi-x64-dbg-persistent-emulator\">fuchsia-fyi-x64-dbg-persistent-emulator</a></li></ul>" + contact_team_email: "chrome-fuchsia-engprod@google.com" + } + builders { name: "fuchsia-official" swarming_host: "chromium-swarm.appspot.com" dimensions: "builderless:1" @@ -81873,6 +82167,552 @@ description_html: "This builder mirrors the following CI builders:<br/><ul><li><a href=\"https://ci.chromium.org/p/chromium/builders/ci/linux-arm64-rel-cft\">linux-arm64-rel-cft</a></li></ul>" } builders { + name: "linux-asan-dbg" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "builderless:1" + dimensions: "cores:8" + dimensions: "cpu:x86-64" + dimensions: "os:Ubuntu-22.04" + dimensions: "pool:luci.chromium.try" + dimensions: "ssd:0" + exe { + cipd_package: "infra/chromium/bootstrapper/${platform}" + cipd_version: "latest" + cmd: "bootstrapper" + } + properties: + '{' + ' "$bootstrap/exe": {' + ' "exe": {' + ' "cipd_package": "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build",' + ' "cipd_version": "refs/heads/main",' + ' "cmd": [' + ' "luciexe"' + ' ]' + ' }' + ' },' + ' "$bootstrap/properties": {' + ' "properties_file": "infra/config/generated/builders/try/linux-asan-dbg/properties.json",' + ' "top_level_project": {' + ' "ref": "refs/heads/main",' + ' "repo": {' + ' "host": "chromium.googlesource.com",' + ' "project": "chromium/src"' + ' }' + ' }' + ' },' + ' "builder_group": "tryserver.chromium.fuzz",' + ' "led_builder_is_bootstrapped": true,' + ' "recipe": "chromium_trybot"' + '}' + execution_timeout_secs: 14400 + expiration_secs: 7200 + grace_period { + seconds: 120 + } + build_numbers: YES + service_account: "chromium-try-builder@chops-service-accounts.iam.gserviceaccount.com" + task_template_canary_percentage { + value: 5 + } + experiments { + key: "chromium_swarming.expose_merge_script_failures" + value: 100 + } + experiments { + key: "luci.recipes.use_python3" + value: 100 + } + resultdb { + enable: true + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "gpu_try_test_results" + test_results { + predicate { + test_id_regexp: "ninja://chrome/test:telemetry_gpu_integration_test[^/]*/.+" + } + } + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "blink_web_tests_try_test_results" + test_results { + predicate { + test_id_regexp: "(ninja://[^/]*blink_web_tests/.+)|(ninja://[^/]*_wpt_tests/.+)" + } + } + } + history_options { + use_invocation_timestamp: true + } + } + description_html: "This builder mirrors the following CI builders:<br/><ul><li><a href=\"https://ci.chromium.org/p/chromium/builders/ci/ASAN Debug\">ASAN Debug</a></li></ul>" + } + builders { + name: "linux-asan-media-rel" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "builderless:1" + dimensions: "cores:8" + dimensions: "cpu:x86-64" + dimensions: "os:Ubuntu-22.04" + dimensions: "pool:luci.chromium.try" + dimensions: "ssd:0" + exe { + cipd_package: "infra/chromium/bootstrapper/${platform}" + cipd_version: "latest" + cmd: "bootstrapper" + } + properties: + '{' + ' "$bootstrap/exe": {' + ' "exe": {' + ' "cipd_package": "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build",' + ' "cipd_version": "refs/heads/main",' + ' "cmd": [' + ' "luciexe"' + ' ]' + ' }' + ' },' + ' "$bootstrap/properties": {' + ' "properties_file": "infra/config/generated/builders/try/linux-asan-media-rel/properties.json",' + ' "top_level_project": {' + ' "ref": "refs/heads/main",' + ' "repo": {' + ' "host": "chromium.googlesource.com",' + ' "project": "chromium/src"' + ' }' + ' }' + ' },' + ' "builder_group": "tryserver.chromium.fuzz",' + ' "led_builder_is_bootstrapped": true,' + ' "recipe": "chromium_trybot"' + '}' + execution_timeout_secs: 14400 + expiration_secs: 7200 + grace_period { + seconds: 120 + } + build_numbers: YES + service_account: "chromium-try-builder@chops-service-accounts.iam.gserviceaccount.com" + task_template_canary_percentage { + value: 5 + } + experiments { + key: "chromium_swarming.expose_merge_script_failures" + value: 100 + } + experiments { + key: "luci.recipes.use_python3" + value: 100 + } + resultdb { + enable: true + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "gpu_try_test_results" + test_results { + predicate { + test_id_regexp: "ninja://chrome/test:telemetry_gpu_integration_test[^/]*/.+" + } + } + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "blink_web_tests_try_test_results" + test_results { + predicate { + test_id_regexp: "(ninja://[^/]*blink_web_tests/.+)|(ninja://[^/]*_wpt_tests/.+)" + } + } + } + history_options { + use_invocation_timestamp: true + } + } + description_html: "This builder mirrors the following CI builders:<br/><ul><li><a href=\"https://ci.chromium.org/p/chromium/builders/ci/ASAN Release Media\">ASAN Release Media</a></li></ul>" + } + builders { + name: "linux-asan-media-v8-arm-rel" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "builderless:1" + dimensions: "cores:8" + dimensions: "cpu:x86-64" + dimensions: "os:Ubuntu-22.04" + dimensions: "pool:luci.chromium.try" + dimensions: "ssd:0" + exe { + cipd_package: "infra/chromium/bootstrapper/${platform}" + cipd_version: "latest" + cmd: "bootstrapper" + } + properties: + '{' + ' "$bootstrap/exe": {' + ' "exe": {' + ' "cipd_package": "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build",' + ' "cipd_version": "refs/heads/main",' + ' "cmd": [' + ' "luciexe"' + ' ]' + ' }' + ' },' + ' "$bootstrap/properties": {' + ' "properties_file": "infra/config/generated/builders/try/linux-asan-media-v8-arm-rel/properties.json",' + ' "top_level_project": {' + ' "ref": "refs/heads/main",' + ' "repo": {' + ' "host": "chromium.googlesource.com",' + ' "project": "chromium/src"' + ' }' + ' }' + ' },' + ' "builder_group": "tryserver.chromium.fuzz",' + ' "led_builder_is_bootstrapped": true,' + ' "recipe": "chromium_trybot"' + '}' + execution_timeout_secs: 14400 + expiration_secs: 7200 + grace_period { + seconds: 120 + } + build_numbers: YES + service_account: "chromium-try-builder@chops-service-accounts.iam.gserviceaccount.com" + task_template_canary_percentage { + value: 5 + } + experiments { + key: "chromium_swarming.expose_merge_script_failures" + value: 100 + } + experiments { + key: "luci.recipes.use_python3" + value: 100 + } + resultdb { + enable: true + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "gpu_try_test_results" + test_results { + predicate { + test_id_regexp: "ninja://chrome/test:telemetry_gpu_integration_test[^/]*/.+" + } + } + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "blink_web_tests_try_test_results" + test_results { + predicate { + test_id_regexp: "(ninja://[^/]*blink_web_tests/.+)|(ninja://[^/]*_wpt_tests/.+)" + } + } + } + history_options { + use_invocation_timestamp: true + } + } + description_html: "This builder mirrors the following CI builders:<br/><ul><li><a href=\"https://ci.chromium.org/p/chromium/builders/ci/ASan Release Media (32-bit x86 with V8-ARM)\">ASan Release Media (32-bit x86 with V8-ARM)</a></li></ul>" + } + builders { + name: "linux-asan-rel" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "builderless:1" + dimensions: "cores:8" + dimensions: "cpu:x86-64" + dimensions: "os:Ubuntu-22.04" + dimensions: "pool:luci.chromium.try" + dimensions: "ssd:0" + exe { + cipd_package: "infra/chromium/bootstrapper/${platform}" + cipd_version: "latest" + cmd: "bootstrapper" + } + properties: + '{' + ' "$bootstrap/exe": {' + ' "exe": {' + ' "cipd_package": "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build",' + ' "cipd_version": "refs/heads/main",' + ' "cmd": [' + ' "luciexe"' + ' ]' + ' }' + ' },' + ' "$bootstrap/properties": {' + ' "properties_file": "infra/config/generated/builders/try/linux-asan-rel/properties.json",' + ' "top_level_project": {' + ' "ref": "refs/heads/main",' + ' "repo": {' + ' "host": "chromium.googlesource.com",' + ' "project": "chromium/src"' + ' }' + ' }' + ' },' + ' "builder_group": "tryserver.chromium.fuzz",' + ' "led_builder_is_bootstrapped": true,' + ' "recipe": "chromium_trybot"' + '}' + execution_timeout_secs: 14400 + expiration_secs: 7200 + grace_period { + seconds: 120 + } + build_numbers: YES + service_account: "chromium-try-builder@chops-service-accounts.iam.gserviceaccount.com" + task_template_canary_percentage { + value: 5 + } + experiments { + key: "chromium_swarming.expose_merge_script_failures" + value: 100 + } + experiments { + key: "luci.recipes.use_python3" + value: 100 + } + resultdb { + enable: true + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "gpu_try_test_results" + test_results { + predicate { + test_id_regexp: "ninja://chrome/test:telemetry_gpu_integration_test[^/]*/.+" + } + } + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "blink_web_tests_try_test_results" + test_results { + predicate { + test_id_regexp: "(ninja://[^/]*blink_web_tests/.+)|(ninja://[^/]*_wpt_tests/.+)" + } + } + } + history_options { + use_invocation_timestamp: true + } + } + description_html: "This builder mirrors the following CI builders:<br/><ul><li><a href=\"https://ci.chromium.org/p/chromium/builders/ci/ASAN Release\">ASAN Release</a></li></ul>" + } + builders { + name: "linux-asan-v8-arm-dbg" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "builderless:1" + dimensions: "cores:8" + dimensions: "cpu:x86-64" + dimensions: "os:Ubuntu-22.04" + dimensions: "pool:luci.chromium.try" + dimensions: "ssd:0" + exe { + cipd_package: "infra/chromium/bootstrapper/${platform}" + cipd_version: "latest" + cmd: "bootstrapper" + } + properties: + '{' + ' "$bootstrap/exe": {' + ' "exe": {' + ' "cipd_package": "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build",' + ' "cipd_version": "refs/heads/main",' + ' "cmd": [' + ' "luciexe"' + ' ]' + ' }' + ' },' + ' "$bootstrap/properties": {' + ' "properties_file": "infra/config/generated/builders/try/linux-asan-v8-arm-dbg/properties.json",' + ' "top_level_project": {' + ' "ref": "refs/heads/main",' + ' "repo": {' + ' "host": "chromium.googlesource.com",' + ' "project": "chromium/src"' + ' }' + ' }' + ' },' + ' "builder_group": "tryserver.chromium.fuzz",' + ' "led_builder_is_bootstrapped": true,' + ' "recipe": "chromium_trybot"' + '}' + execution_timeout_secs: 14400 + expiration_secs: 7200 + grace_period { + seconds: 120 + } + build_numbers: YES + service_account: "chromium-try-builder@chops-service-accounts.iam.gserviceaccount.com" + task_template_canary_percentage { + value: 5 + } + experiments { + key: "chromium_swarming.expose_merge_script_failures" + value: 100 + } + experiments { + key: "luci.recipes.use_python3" + value: 100 + } + resultdb { + enable: true + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "gpu_try_test_results" + test_results { + predicate { + test_id_regexp: "ninja://chrome/test:telemetry_gpu_integration_test[^/]*/.+" + } + } + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "blink_web_tests_try_test_results" + test_results { + predicate { + test_id_regexp: "(ninja://[^/]*blink_web_tests/.+)|(ninja://[^/]*_wpt_tests/.+)" + } + } + } + history_options { + use_invocation_timestamp: true + } + } + description_html: "This builder mirrors the following CI builders:<br/><ul><li><a href=\"https://ci.chromium.org/p/chromium/builders/ci/ASan Debug (32-bit x86 with V8-ARM)\">ASan Debug (32-bit x86 with V8-ARM)</a></li></ul>" + } + builders { + name: "linux-asan-v8-arm-rel" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "builderless:1" + dimensions: "cores:8" + dimensions: "cpu:x86-64" + dimensions: "os:Ubuntu-22.04" + dimensions: "pool:luci.chromium.try" + dimensions: "ssd:0" + exe { + cipd_package: "infra/chromium/bootstrapper/${platform}" + cipd_version: "latest" + cmd: "bootstrapper" + } + properties: + '{' + ' "$bootstrap/exe": {' + ' "exe": {' + ' "cipd_package": "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build",' + ' "cipd_version": "refs/heads/main",' + ' "cmd": [' + ' "luciexe"' + ' ]' + ' }' + ' },' + ' "$bootstrap/properties": {' + ' "properties_file": "infra/config/generated/builders/try/linux-asan-v8-arm-rel/properties.json",' + ' "top_level_project": {' + ' "ref": "refs/heads/main",' + ' "repo": {' + ' "host": "chromium.googlesource.com",' + ' "project": "chromium/src"' + ' }' + ' }' + ' },' + ' "builder_group": "tryserver.chromium.fuzz",' + ' "led_builder_is_bootstrapped": true,' + ' "recipe": "chromium_trybot"' + '}' + execution_timeout_secs: 14400 + expiration_secs: 7200 + grace_period { + seconds: 120 + } + build_numbers: YES + service_account: "chromium-try-builder@chops-service-accounts.iam.gserviceaccount.com" + task_template_canary_percentage { + value: 5 + } + experiments { + key: "chromium_swarming.expose_merge_script_failures" + value: 100 + } + experiments { + key: "luci.recipes.use_python3" + value: 100 + } + resultdb { + enable: true + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "gpu_try_test_results" + test_results { + predicate { + test_id_regexp: "ninja://chrome/test:telemetry_gpu_integration_test[^/]*/.+" + } + } + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "blink_web_tests_try_test_results" + test_results { + predicate { + test_id_regexp: "(ninja://[^/]*blink_web_tests/.+)|(ninja://[^/]*_wpt_tests/.+)" + } + } + } + history_options { + use_invocation_timestamp: true + } + } + description_html: "This builder mirrors the following CI builders:<br/><ul><li><a href=\"https://ci.chromium.org/p/chromium/builders/ci/ASan Release (32-bit x86 with V8-ARM)\">ASan Release (32-bit x86 with V8-ARM)</a></li></ul>" + } + builders { name: "linux-bfcache-rel" swarming_host: "chromium-swarm.appspot.com" dimensions: "builderless:1" @@ -82502,6 +83342,97 @@ description_html: "This builder mirrors the following CI builders:<br/><ul><li><a href=\"https://ci.chromium.org/p/chromium/builders/ci/linux-chromeos-annotator-rel\">linux-chromeos-annotator-rel</a></li></ul>" } builders { + name: "linux-chromeos-asan-rel" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "builderless:1" + dimensions: "cores:8" + dimensions: "cpu:x86-64" + dimensions: "os:Ubuntu-22.04" + dimensions: "pool:luci.chromium.try" + dimensions: "ssd:0" + exe { + cipd_package: "infra/chromium/bootstrapper/${platform}" + cipd_version: "latest" + cmd: "bootstrapper" + } + properties: + '{' + ' "$bootstrap/exe": {' + ' "exe": {' + ' "cipd_package": "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build",' + ' "cipd_version": "refs/heads/main",' + ' "cmd": [' + ' "luciexe"' + ' ]' + ' }' + ' },' + ' "$bootstrap/properties": {' + ' "properties_file": "infra/config/generated/builders/try/linux-chromeos-asan-rel/properties.json",' + ' "top_level_project": {' + ' "ref": "refs/heads/main",' + ' "repo": {' + ' "host": "chromium.googlesource.com",' + ' "project": "chromium/src"' + ' }' + ' }' + ' },' + ' "builder_group": "tryserver.chromium.fuzz",' + ' "led_builder_is_bootstrapped": true,' + ' "recipe": "chromium_trybot"' + '}' + execution_timeout_secs: 14400 + expiration_secs: 7200 + grace_period { + seconds: 120 + } + build_numbers: YES + service_account: "chromium-try-builder@chops-service-accounts.iam.gserviceaccount.com" + task_template_canary_percentage { + value: 5 + } + experiments { + key: "chromium_swarming.expose_merge_script_failures" + value: 100 + } + experiments { + key: "luci.recipes.use_python3" + value: 100 + } + resultdb { + enable: true + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "gpu_try_test_results" + test_results { + predicate { + test_id_regexp: "ninja://chrome/test:telemetry_gpu_integration_test[^/]*/.+" + } + } + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "blink_web_tests_try_test_results" + test_results { + predicate { + test_id_regexp: "(ninja://[^/]*blink_web_tests/.+)|(ninja://[^/]*_wpt_tests/.+)" + } + } + } + history_options { + use_invocation_timestamp: true + } + } + description_html: "This builder mirrors the following CI builders:<br/><ul><li><a href=\"https://ci.chromium.org/p/chromium/builders/ci/ChromiumOS ASAN Release\">ChromiumOS ASAN Release</a></li></ul>" + } + builders { name: "linux-chromeos-clang-tidy-rel" swarming_host: "chromium-swarm.appspot.com" dimensions: "builder:linux-chromeos-clang-tidy-rel" @@ -85937,6 +86868,188 @@ description_html: "This builder mirrors the following CI builders:<br/><ul><li><a href=\"https://ci.chromium.org/p/chromium/builders/ci/Linux Builder\">Linux Builder</a></li><li><a href=\"https://ci.chromium.org/p/chromium/builders/ci/Linux Tests\">Linux Tests</a></li><li><a href=\"https://ci.chromium.org/p/chromium/builders/ci/GPU Linux Builder\">GPU Linux Builder</a></li><li><a href=\"https://ci.chromium.org/p/chromium/builders/ci/Linux Release (NVIDIA)\">Linux Release (NVIDIA)</a></li></ul>" } builders { + name: "linux-msan-chained-origins-rel" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "builderless:1" + dimensions: "cores:8" + dimensions: "cpu:x86-64" + dimensions: "os:Ubuntu-22.04" + dimensions: "pool:luci.chromium.try" + dimensions: "ssd:0" + exe { + cipd_package: "infra/chromium/bootstrapper/${platform}" + cipd_version: "latest" + cmd: "bootstrapper" + } + properties: + '{' + ' "$bootstrap/exe": {' + ' "exe": {' + ' "cipd_package": "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build",' + ' "cipd_version": "refs/heads/main",' + ' "cmd": [' + ' "luciexe"' + ' ]' + ' }' + ' },' + ' "$bootstrap/properties": {' + ' "properties_file": "infra/config/generated/builders/try/linux-msan-chained-origins-rel/properties.json",' + ' "top_level_project": {' + ' "ref": "refs/heads/main",' + ' "repo": {' + ' "host": "chromium.googlesource.com",' + ' "project": "chromium/src"' + ' }' + ' }' + ' },' + ' "builder_group": "tryserver.chromium.fuzz",' + ' "led_builder_is_bootstrapped": true,' + ' "recipe": "chromium_trybot"' + '}' + execution_timeout_secs: 14400 + expiration_secs: 7200 + grace_period { + seconds: 120 + } + build_numbers: YES + service_account: "chromium-try-builder@chops-service-accounts.iam.gserviceaccount.com" + task_template_canary_percentage { + value: 5 + } + experiments { + key: "chromium_swarming.expose_merge_script_failures" + value: 100 + } + experiments { + key: "luci.recipes.use_python3" + value: 100 + } + resultdb { + enable: true + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "gpu_try_test_results" + test_results { + predicate { + test_id_regexp: "ninja://chrome/test:telemetry_gpu_integration_test[^/]*/.+" + } + } + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "blink_web_tests_try_test_results" + test_results { + predicate { + test_id_regexp: "(ninja://[^/]*blink_web_tests/.+)|(ninja://[^/]*_wpt_tests/.+)" + } + } + } + history_options { + use_invocation_timestamp: true + } + } + description_html: "This builder mirrors the following CI builders:<br/><ul><li><a href=\"https://ci.chromium.org/p/chromium/builders/ci/MSAN Release (chained origins)\">MSAN Release (chained origins)</a></li></ul>" + } + builders { + name: "linux-msan-no-origins-rel" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "builderless:1" + dimensions: "cores:8" + dimensions: "cpu:x86-64" + dimensions: "os:Ubuntu-22.04" + dimensions: "pool:luci.chromium.try" + dimensions: "ssd:0" + exe { + cipd_package: "infra/chromium/bootstrapper/${platform}" + cipd_version: "latest" + cmd: "bootstrapper" + } + properties: + '{' + ' "$bootstrap/exe": {' + ' "exe": {' + ' "cipd_package": "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build",' + ' "cipd_version": "refs/heads/main",' + ' "cmd": [' + ' "luciexe"' + ' ]' + ' }' + ' },' + ' "$bootstrap/properties": {' + ' "properties_file": "infra/config/generated/builders/try/linux-msan-no-origins-rel/properties.json",' + ' "top_level_project": {' + ' "ref": "refs/heads/main",' + ' "repo": {' + ' "host": "chromium.googlesource.com",' + ' "project": "chromium/src"' + ' }' + ' }' + ' },' + ' "builder_group": "tryserver.chromium.fuzz",' + ' "led_builder_is_bootstrapped": true,' + ' "recipe": "chromium_trybot"' + '}' + execution_timeout_secs: 14400 + expiration_secs: 7200 + grace_period { + seconds: 120 + } + build_numbers: YES + service_account: "chromium-try-builder@chops-service-accounts.iam.gserviceaccount.com" + task_template_canary_percentage { + value: 5 + } + experiments { + key: "chromium_swarming.expose_merge_script_failures" + value: 100 + } + experiments { + key: "luci.recipes.use_python3" + value: 100 + } + resultdb { + enable: true + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "gpu_try_test_results" + test_results { + predicate { + test_id_regexp: "ninja://chrome/test:telemetry_gpu_integration_test[^/]*/.+" + } + } + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "blink_web_tests_try_test_results" + test_results { + predicate { + test_id_regexp: "(ninja://[^/]*blink_web_tests/.+)|(ninja://[^/]*_wpt_tests/.+)" + } + } + } + history_options { + use_invocation_timestamp: true + } + } + description_html: "This builder mirrors the following CI builders:<br/><ul><li><a href=\"https://ci.chromium.org/p/chromium/builders/ci/MSAN Release (no origins)\">MSAN Release (no origins)</a></li></ul>" + } + builders { name: "linux-official" swarming_host: "chromium-swarm.appspot.com" dimensions: "builderless:1" @@ -87241,6 +88354,188 @@ description_html: "This builder mirrors the following CI builders:<br/><ul><li><a href=\"https://ci.chromium.org/p/chromium/builders/ci/linux-swangle-x64-exp\">linux-swangle-x64-exp</a></li></ul>" } builders { + name: "linux-tsan-dbg" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "builderless:1" + dimensions: "cores:8" + dimensions: "cpu:x86-64" + dimensions: "os:Ubuntu-22.04" + dimensions: "pool:luci.chromium.try" + dimensions: "ssd:0" + exe { + cipd_package: "infra/chromium/bootstrapper/${platform}" + cipd_version: "latest" + cmd: "bootstrapper" + } + properties: + '{' + ' "$bootstrap/exe": {' + ' "exe": {' + ' "cipd_package": "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build",' + ' "cipd_version": "refs/heads/main",' + ' "cmd": [' + ' "luciexe"' + ' ]' + ' }' + ' },' + ' "$bootstrap/properties": {' + ' "properties_file": "infra/config/generated/builders/try/linux-tsan-dbg/properties.json",' + ' "top_level_project": {' + ' "ref": "refs/heads/main",' + ' "repo": {' + ' "host": "chromium.googlesource.com",' + ' "project": "chromium/src"' + ' }' + ' }' + ' },' + ' "builder_group": "tryserver.chromium.fuzz",' + ' "led_builder_is_bootstrapped": true,' + ' "recipe": "chromium_trybot"' + '}' + execution_timeout_secs: 14400 + expiration_secs: 7200 + grace_period { + seconds: 120 + } + build_numbers: YES + service_account: "chromium-try-builder@chops-service-accounts.iam.gserviceaccount.com" + task_template_canary_percentage { + value: 5 + } + experiments { + key: "chromium_swarming.expose_merge_script_failures" + value: 100 + } + experiments { + key: "luci.recipes.use_python3" + value: 100 + } + resultdb { + enable: true + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "gpu_try_test_results" + test_results { + predicate { + test_id_regexp: "ninja://chrome/test:telemetry_gpu_integration_test[^/]*/.+" + } + } + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "blink_web_tests_try_test_results" + test_results { + predicate { + test_id_regexp: "(ninja://[^/]*blink_web_tests/.+)|(ninja://[^/]*_wpt_tests/.+)" + } + } + } + history_options { + use_invocation_timestamp: true + } + } + description_html: "This builder mirrors the following CI builders:<br/><ul><li><a href=\"https://ci.chromium.org/p/chromium/builders/ci/TSAN Debug\">TSAN Debug</a></li></ul>" + } + builders { + name: "linux-tsan-rel" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "builderless:1" + dimensions: "cores:8" + dimensions: "cpu:x86-64" + dimensions: "os:Ubuntu-22.04" + dimensions: "pool:luci.chromium.try" + dimensions: "ssd:0" + exe { + cipd_package: "infra/chromium/bootstrapper/${platform}" + cipd_version: "latest" + cmd: "bootstrapper" + } + properties: + '{' + ' "$bootstrap/exe": {' + ' "exe": {' + ' "cipd_package": "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build",' + ' "cipd_version": "refs/heads/main",' + ' "cmd": [' + ' "luciexe"' + ' ]' + ' }' + ' },' + ' "$bootstrap/properties": {' + ' "properties_file": "infra/config/generated/builders/try/linux-tsan-rel/properties.json",' + ' "top_level_project": {' + ' "ref": "refs/heads/main",' + ' "repo": {' + ' "host": "chromium.googlesource.com",' + ' "project": "chromium/src"' + ' }' + ' }' + ' },' + ' "builder_group": "tryserver.chromium.fuzz",' + ' "led_builder_is_bootstrapped": true,' + ' "recipe": "chromium_trybot"' + '}' + execution_timeout_secs: 14400 + expiration_secs: 7200 + grace_period { + seconds: 120 + } + build_numbers: YES + service_account: "chromium-try-builder@chops-service-accounts.iam.gserviceaccount.com" + task_template_canary_percentage { + value: 5 + } + experiments { + key: "chromium_swarming.expose_merge_script_failures" + value: 100 + } + experiments { + key: "luci.recipes.use_python3" + value: 100 + } + resultdb { + enable: true + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "gpu_try_test_results" + test_results { + predicate { + test_id_regexp: "ninja://chrome/test:telemetry_gpu_integration_test[^/]*/.+" + } + } + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "blink_web_tests_try_test_results" + test_results { + predicate { + test_id_regexp: "(ninja://[^/]*blink_web_tests/.+)|(ninja://[^/]*_wpt_tests/.+)" + } + } + } + history_options { + use_invocation_timestamp: true + } + } + description_html: "This builder mirrors the following CI builders:<br/><ul><li><a href=\"https://ci.chromium.org/p/chromium/builders/ci/TSAN Release\">TSAN Release</a></li></ul>" + } + builders { name: "linux-ubsan-fyi-rel" swarming_host: "chromium-swarm.appspot.com" dimensions: "builderless:1" @@ -87332,6 +88627,97 @@ description_html: "This builder mirrors the following CI builders:<br/><ul><li><a href=\"https://ci.chromium.org/p/chromium/builders/ci/linux-ubsan-fyi-rel\">linux-ubsan-fyi-rel</a></li></ul>" } builders { + name: "linux-ubsan-rel" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "builderless:1" + dimensions: "cores:8" + dimensions: "cpu:x86-64" + dimensions: "os:Ubuntu-22.04" + dimensions: "pool:luci.chromium.try" + dimensions: "ssd:0" + exe { + cipd_package: "infra/chromium/bootstrapper/${platform}" + cipd_version: "latest" + cmd: "bootstrapper" + } + properties: + '{' + ' "$bootstrap/exe": {' + ' "exe": {' + ' "cipd_package": "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build",' + ' "cipd_version": "refs/heads/main",' + ' "cmd": [' + ' "luciexe"' + ' ]' + ' }' + ' },' + ' "$bootstrap/properties": {' + ' "properties_file": "infra/config/generated/builders/try/linux-ubsan-rel/properties.json",' + ' "top_level_project": {' + ' "ref": "refs/heads/main",' + ' "repo": {' + ' "host": "chromium.googlesource.com",' + ' "project": "chromium/src"' + ' }' + ' }' + ' },' + ' "builder_group": "tryserver.chromium.fuzz",' + ' "led_builder_is_bootstrapped": true,' + ' "recipe": "chromium_trybot"' + '}' + execution_timeout_secs: 14400 + expiration_secs: 7200 + grace_period { + seconds: 120 + } + build_numbers: YES + service_account: "chromium-try-builder@chops-service-accounts.iam.gserviceaccount.com" + task_template_canary_percentage { + value: 5 + } + experiments { + key: "chromium_swarming.expose_merge_script_failures" + value: 100 + } + experiments { + key: "luci.recipes.use_python3" + value: 100 + } + resultdb { + enable: true + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "gpu_try_test_results" + test_results { + predicate { + test_id_regexp: "ninja://chrome/test:telemetry_gpu_integration_test[^/]*/.+" + } + } + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "blink_web_tests_try_test_results" + test_results { + predicate { + test_id_regexp: "(ninja://[^/]*blink_web_tests/.+)|(ninja://[^/]*_wpt_tests/.+)" + } + } + } + history_options { + use_invocation_timestamp: true + } + } + description_html: "This builder mirrors the following CI builders:<br/><ul><li><a href=\"https://ci.chromium.org/p/chromium/builders/ci/UBSan Release\">UBSan Release</a></li></ul>" + } + builders { name: "linux-ubsan-vptr" swarming_host: "chromium-swarm.appspot.com" dimensions: "builderless:1" @@ -87423,6 +88809,97 @@ description_html: "This builder mirrors the following CI builders:<br/><ul><li><a href=\"https://ci.chromium.org/p/chromium/builders/ci/linux-ubsan-vptr\">linux-ubsan-vptr</a></li></ul>" } builders { + name: "linux-ubsan-vptr-rel" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "builderless:1" + dimensions: "cores:8" + dimensions: "cpu:x86-64" + dimensions: "os:Ubuntu-22.04" + dimensions: "pool:luci.chromium.try" + dimensions: "ssd:0" + exe { + cipd_package: "infra/chromium/bootstrapper/${platform}" + cipd_version: "latest" + cmd: "bootstrapper" + } + properties: + '{' + ' "$bootstrap/exe": {' + ' "exe": {' + ' "cipd_package": "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build",' + ' "cipd_version": "refs/heads/main",' + ' "cmd": [' + ' "luciexe"' + ' ]' + ' }' + ' },' + ' "$bootstrap/properties": {' + ' "properties_file": "infra/config/generated/builders/try/linux-ubsan-vptr-rel/properties.json",' + ' "top_level_project": {' + ' "ref": "refs/heads/main",' + ' "repo": {' + ' "host": "chromium.googlesource.com",' + ' "project": "chromium/src"' + ' }' + ' }' + ' },' + ' "builder_group": "tryserver.chromium.fuzz",' + ' "led_builder_is_bootstrapped": true,' + ' "recipe": "chromium_trybot"' + '}' + execution_timeout_secs: 14400 + expiration_secs: 7200 + grace_period { + seconds: 120 + } + build_numbers: YES + service_account: "chromium-try-builder@chops-service-accounts.iam.gserviceaccount.com" + task_template_canary_percentage { + value: 5 + } + experiments { + key: "chromium_swarming.expose_merge_script_failures" + value: 100 + } + experiments { + key: "luci.recipes.use_python3" + value: 100 + } + resultdb { + enable: true + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "gpu_try_test_results" + test_results { + predicate { + test_id_regexp: "ninja://chrome/test:telemetry_gpu_integration_test[^/]*/.+" + } + } + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "blink_web_tests_try_test_results" + test_results { + predicate { + test_id_regexp: "(ninja://[^/]*blink_web_tests/.+)|(ninja://[^/]*_wpt_tests/.+)" + } + } + } + history_options { + use_invocation_timestamp: true + } + } + description_html: "This builder mirrors the following CI builders:<br/><ul><li><a href=\"https://ci.chromium.org/p/chromium/builders/ci/UBSan vptr Release\">UBSan vptr Release</a></li></ul>" + } + builders { name: "linux-updater-try-builder-dbg" swarming_host: "chromium-swarm.appspot.com" dimensions: "builderless:1" @@ -91173,6 +92650,184 @@ description_html: "This builder mirrors the following CI builders:<br/><ul><li><a href=\"https://ci.chromium.org/p/chromium/builders/ci/mac-arm64-on-arm64-rel\">mac-arm64-on-arm64-rel</a></li></ul>" } builders { + name: "mac-asan-media-rel" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "builderless:1" + dimensions: "cpu:x86-64" + dimensions: "os:Mac-13" + dimensions: "pool:luci.chromium.try" + exe { + cipd_package: "infra/chromium/bootstrapper/${platform}" + cipd_version: "latest" + cmd: "bootstrapper" + } + properties: + '{' + ' "$bootstrap/exe": {' + ' "exe": {' + ' "cipd_package": "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build",' + ' "cipd_version": "refs/heads/main",' + ' "cmd": [' + ' "luciexe"' + ' ]' + ' }' + ' },' + ' "$bootstrap/properties": {' + ' "properties_file": "infra/config/generated/builders/try/mac-asan-media-rel/properties.json",' + ' "top_level_project": {' + ' "ref": "refs/heads/main",' + ' "repo": {' + ' "host": "chromium.googlesource.com",' + ' "project": "chromium/src"' + ' }' + ' }' + ' },' + ' "builder_group": "tryserver.chromium.fuzz",' + ' "led_builder_is_bootstrapped": true,' + ' "recipe": "chromium_trybot"' + '}' + execution_timeout_secs: 14400 + expiration_secs: 7200 + grace_period { + seconds: 120 + } + build_numbers: YES + service_account: "chromium-try-builder@chops-service-accounts.iam.gserviceaccount.com" + task_template_canary_percentage { + value: 5 + } + experiments { + key: "chromium_swarming.expose_merge_script_failures" + value: 100 + } + experiments { + key: "luci.recipes.use_python3" + value: 100 + } + resultdb { + enable: true + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "gpu_try_test_results" + test_results { + predicate { + test_id_regexp: "ninja://chrome/test:telemetry_gpu_integration_test[^/]*/.+" + } + } + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "blink_web_tests_try_test_results" + test_results { + predicate { + test_id_regexp: "(ninja://[^/]*blink_web_tests/.+)|(ninja://[^/]*_wpt_tests/.+)" + } + } + } + history_options { + use_invocation_timestamp: true + } + } + description_html: "This builder mirrors the following CI builders:<br/><ul><li><a href=\"https://ci.chromium.org/p/chromium/builders/ci/Mac ASAN Release Media\">Mac ASAN Release Media</a></li></ul>" + } + builders { + name: "mac-asan-rel" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "builderless:1" + dimensions: "cpu:x86-64" + dimensions: "os:Mac-13" + dimensions: "pool:luci.chromium.try" + exe { + cipd_package: "infra/chromium/bootstrapper/${platform}" + cipd_version: "latest" + cmd: "bootstrapper" + } + properties: + '{' + ' "$bootstrap/exe": {' + ' "exe": {' + ' "cipd_package": "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build",' + ' "cipd_version": "refs/heads/main",' + ' "cmd": [' + ' "luciexe"' + ' ]' + ' }' + ' },' + ' "$bootstrap/properties": {' + ' "properties_file": "infra/config/generated/builders/try/mac-asan-rel/properties.json",' + ' "top_level_project": {' + ' "ref": "refs/heads/main",' + ' "repo": {' + ' "host": "chromium.googlesource.com",' + ' "project": "chromium/src"' + ' }' + ' }' + ' },' + ' "builder_group": "tryserver.chromium.fuzz",' + ' "led_builder_is_bootstrapped": true,' + ' "recipe": "chromium_trybot"' + '}' + execution_timeout_secs: 14400 + expiration_secs: 7200 + grace_period { + seconds: 120 + } + build_numbers: YES + service_account: "chromium-try-builder@chops-service-accounts.iam.gserviceaccount.com" + task_template_canary_percentage { + value: 5 + } + experiments { + key: "chromium_swarming.expose_merge_script_failures" + value: 100 + } + experiments { + key: "luci.recipes.use_python3" + value: 100 + } + resultdb { + enable: true + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "gpu_try_test_results" + test_results { + predicate { + test_id_regexp: "ninja://chrome/test:telemetry_gpu_integration_test[^/]*/.+" + } + } + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "blink_web_tests_try_test_results" + test_results { + predicate { + test_id_regexp: "(ninja://[^/]*blink_web_tests/.+)|(ninja://[^/]*_wpt_tests/.+)" + } + } + } + history_options { + use_invocation_timestamp: true + } + } + description_html: "This builder mirrors the following CI builders:<br/><ul><li><a href=\"https://ci.chromium.org/p/chromium/builders/ci/Mac ASAN Release\">Mac ASAN Release</a></li></ul>" + } + builders { name: "mac-builder-next" swarming_host: "chromium-swarm.appspot.com" dimensions: "builder:mac-builder-next" @@ -97004,6 +98659,188 @@ description_html: "This builder mirrors the following CI builders:<br/><ul><li><a href=\"https://ci.chromium.org/p/chromium/builders/ci/win-asan\">win-asan</a></li></ul>" } builders { + name: "win-asan-media-rel" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "builderless:1" + dimensions: "cores:8" + dimensions: "cpu:x86-64" + dimensions: "os:Windows-10" + dimensions: "pool:luci.chromium.try" + dimensions: "ssd:0" + exe { + cipd_package: "infra/chromium/bootstrapper/${platform}" + cipd_version: "latest" + cmd: "bootstrapper" + } + properties: + '{' + ' "$bootstrap/exe": {' + ' "exe": {' + ' "cipd_package": "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build",' + ' "cipd_version": "refs/heads/main",' + ' "cmd": [' + ' "luciexe"' + ' ]' + ' }' + ' },' + ' "$bootstrap/properties": {' + ' "properties_file": "infra/config/generated/builders/try/win-asan-media-rel/properties.json",' + ' "top_level_project": {' + ' "ref": "refs/heads/main",' + ' "repo": {' + ' "host": "chromium.googlesource.com",' + ' "project": "chromium/src"' + ' }' + ' }' + ' },' + ' "builder_group": "tryserver.chromium.fuzz",' + ' "led_builder_is_bootstrapped": true,' + ' "recipe": "chromium_trybot"' + '}' + execution_timeout_secs: 14400 + expiration_secs: 7200 + grace_period { + seconds: 120 + } + build_numbers: YES + service_account: "chromium-try-builder@chops-service-accounts.iam.gserviceaccount.com" + task_template_canary_percentage { + value: 5 + } + experiments { + key: "chromium_swarming.expose_merge_script_failures" + value: 100 + } + experiments { + key: "luci.recipes.use_python3" + value: 100 + } + resultdb { + enable: true + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "gpu_try_test_results" + test_results { + predicate { + test_id_regexp: "ninja://chrome/test:telemetry_gpu_integration_test[^/]*/.+" + } + } + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "blink_web_tests_try_test_results" + test_results { + predicate { + test_id_regexp: "(ninja://[^/]*blink_web_tests/.+)|(ninja://[^/]*_wpt_tests/.+)" + } + } + } + history_options { + use_invocation_timestamp: true + } + } + description_html: "This builder mirrors the following CI builders:<br/><ul><li><a href=\"https://ci.chromium.org/p/chromium/builders/ci/Win ASan Release Media\">Win ASan Release Media</a></li></ul>" + } + builders { + name: "win-asan-rel" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "builderless:1" + dimensions: "cores:8" + dimensions: "cpu:x86-64" + dimensions: "os:Windows-10" + dimensions: "pool:luci.chromium.try" + dimensions: "ssd:0" + exe { + cipd_package: "infra/chromium/bootstrapper/${platform}" + cipd_version: "latest" + cmd: "bootstrapper" + } + properties: + '{' + ' "$bootstrap/exe": {' + ' "exe": {' + ' "cipd_package": "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build",' + ' "cipd_version": "refs/heads/main",' + ' "cmd": [' + ' "luciexe"' + ' ]' + ' }' + ' },' + ' "$bootstrap/properties": {' + ' "properties_file": "infra/config/generated/builders/try/win-asan-rel/properties.json",' + ' "top_level_project": {' + ' "ref": "refs/heads/main",' + ' "repo": {' + ' "host": "chromium.googlesource.com",' + ' "project": "chromium/src"' + ' }' + ' }' + ' },' + ' "builder_group": "tryserver.chromium.fuzz",' + ' "led_builder_is_bootstrapped": true,' + ' "recipe": "chromium_trybot"' + '}' + execution_timeout_secs: 14400 + expiration_secs: 7200 + grace_period { + seconds: 120 + } + build_numbers: YES + service_account: "chromium-try-builder@chops-service-accounts.iam.gserviceaccount.com" + task_template_canary_percentage { + value: 5 + } + experiments { + key: "chromium_swarming.expose_merge_script_failures" + value: 100 + } + experiments { + key: "luci.recipes.use_python3" + value: 100 + } + resultdb { + enable: true + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "gpu_try_test_results" + test_results { + predicate { + test_id_regexp: "ninja://chrome/test:telemetry_gpu_integration_test[^/]*/.+" + } + } + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "blink_web_tests_try_test_results" + test_results { + predicate { + test_id_regexp: "(ninja://[^/]*blink_web_tests/.+)|(ninja://[^/]*_wpt_tests/.+)" + } + } + } + history_options { + use_invocation_timestamp: true + } + } + description_html: "This builder mirrors the following CI builders:<br/><ul><li><a href=\"https://ci.chromium.org/p/chromium/builders/ci/Win ASan Release\">Win ASan Release</a></li></ul>" + } + builders { name: "win-celab-try-rel" swarming_host: "chromium-swarm.appspot.com" dimensions: "builderless:1"
diff --git a/infra/config/generated/luci/luci-milo.cfg b/infra/config/generated/luci/luci-milo.cfg index 4414f03..7dfcdf5 100644 --- a/infra/config/generated/luci/luci-milo.cfg +++ b/infra/config/generated/luci/luci-milo.cfg
@@ -352,6 +352,11 @@ alt: "Fuchsia" } links { + text: "fuzz" + url: "/p/chromium/g/tryserver.chromium.fuzz/builders" + alt: "Fuzz" + } + links { text: "linux" url: "/p/chromium/g/tryserver.chromium.linux/builders" alt: "Linux" @@ -1298,6 +1303,11 @@ alt: "Fuchsia" } links { + text: "fuzz" + url: "/p/chromium/g/tryserver.chromium.fuzz/builders" + alt: "Fuzz" + } + links { text: "linux" url: "/p/chromium/g/tryserver.chromium.linux/builders" alt: "Linux" @@ -2038,6 +2048,11 @@ alt: "Fuchsia" } links { + text: "fuzz" + url: "/p/chromium/g/tryserver.chromium.fuzz/builders" + alt: "Fuzz" + } + links { text: "linux" url: "/p/chromium/g/tryserver.chromium.linux/builders" alt: "Linux" @@ -2518,6 +2533,11 @@ alt: "Fuchsia" } links { + text: "fuzz" + url: "/p/chromium/g/tryserver.chromium.fuzz/builders" + alt: "Fuzz" + } + links { text: "linux" url: "/p/chromium/g/tryserver.chromium.linux/builders" alt: "Linux" @@ -2877,6 +2897,11 @@ alt: "Fuchsia" } links { + text: "fuzz" + url: "/p/chromium/g/tryserver.chromium.fuzz/builders" + alt: "Fuzz" + } + links { text: "linux" url: "/p/chromium/g/tryserver.chromium.linux/builders" alt: "Linux" @@ -3574,6 +3599,11 @@ alt: "Fuchsia" } links { + text: "fuzz" + url: "/p/chromium/g/tryserver.chromium.fuzz/builders" + alt: "Fuzz" + } + links { text: "linux" url: "/p/chromium/g/tryserver.chromium.linux/builders" alt: "Linux" @@ -3918,6 +3948,11 @@ alt: "Fuchsia" } links { + text: "fuzz" + url: "/p/chromium/g/tryserver.chromium.fuzz/builders" + alt: "Fuzz" + } + links { text: "linux" url: "/p/chromium/g/tryserver.chromium.linux/builders" alt: "Linux" @@ -4337,6 +4372,11 @@ alt: "Fuchsia" } links { + text: "fuzz" + url: "/p/chromium/g/tryserver.chromium.fuzz/builders" + alt: "Fuzz" + } + links { text: "linux" url: "/p/chromium/g/tryserver.chromium.linux/builders" alt: "Linux" @@ -4682,6 +4722,11 @@ alt: "Fuchsia" } links { + text: "fuzz" + url: "/p/chromium/g/tryserver.chromium.fuzz/builders" + alt: "Fuzz" + } + links { text: "linux" url: "/p/chromium/g/tryserver.chromium.linux/builders" alt: "Linux" @@ -5280,6 +5325,11 @@ alt: "Fuchsia" } links { + text: "fuzz" + url: "/p/chromium/g/tryserver.chromium.fuzz/builders" + alt: "Fuzz" + } + links { text: "linux" url: "/p/chromium/g/tryserver.chromium.linux/builders" alt: "Linux" @@ -5678,6 +5728,11 @@ alt: "Fuchsia" } links { + text: "fuzz" + url: "/p/chromium/g/tryserver.chromium.fuzz/builders" + alt: "Fuzz" + } + links { text: "linux" url: "/p/chromium/g/tryserver.chromium.linux/builders" alt: "Linux" @@ -6087,6 +6142,11 @@ alt: "Fuchsia" } links { + text: "fuzz" + url: "/p/chromium/g/tryserver.chromium.fuzz/builders" + alt: "Fuzz" + } + links { text: "linux" url: "/p/chromium/g/tryserver.chromium.linux/builders" alt: "Linux" @@ -6437,6 +6497,11 @@ alt: "Fuchsia" } links { + text: "fuzz" + url: "/p/chromium/g/tryserver.chromium.fuzz/builders" + alt: "Fuzz" + } + links { text: "linux" url: "/p/chromium/g/tryserver.chromium.linux/builders" alt: "Linux" @@ -6894,6 +6959,11 @@ alt: "Fuchsia" } links { + text: "fuzz" + url: "/p/chromium/g/tryserver.chromium.fuzz/builders" + alt: "Fuzz" + } + links { text: "linux" url: "/p/chromium/g/tryserver.chromium.linux/builders" alt: "Linux" @@ -7463,6 +7533,11 @@ alt: "Fuchsia" } links { + text: "fuzz" + url: "/p/chromium/g/tryserver.chromium.fuzz/builders" + alt: "Fuzz" + } + links { text: "linux" url: "/p/chromium/g/tryserver.chromium.linux/builders" alt: "Linux" @@ -7987,6 +8062,11 @@ alt: "Fuchsia" } links { + text: "fuzz" + url: "/p/chromium/g/tryserver.chromium.fuzz/builders" + alt: "Fuzz" + } + links { text: "linux" url: "/p/chromium/g/tryserver.chromium.linux/builders" alt: "Linux" @@ -8363,6 +8443,11 @@ alt: "Fuchsia" } links { + text: "fuzz" + url: "/p/chromium/g/tryserver.chromium.fuzz/builders" + alt: "Fuzz" + } + links { text: "linux" url: "/p/chromium/g/tryserver.chromium.linux/builders" alt: "Linux" @@ -8732,6 +8817,11 @@ alt: "Fuchsia" } links { + text: "fuzz" + url: "/p/chromium/g/tryserver.chromium.fuzz/builders" + alt: "Fuzz" + } + links { text: "linux" url: "/p/chromium/g/tryserver.chromium.linux/builders" alt: "Linux" @@ -9220,6 +9310,11 @@ alt: "Fuchsia" } links { + text: "fuzz" + url: "/p/chromium/g/tryserver.chromium.fuzz/builders" + alt: "Fuzz" + } + links { text: "linux" url: "/p/chromium/g/tryserver.chromium.linux/builders" alt: "Linux" @@ -10049,6 +10144,11 @@ alt: "Fuchsia" } links { + text: "fuzz" + url: "/p/chromium/g/tryserver.chromium.fuzz/builders" + alt: "Fuzz" + } + links { text: "linux" url: "/p/chromium/g/tryserver.chromium.linux/builders" alt: "Linux" @@ -10416,6 +10516,11 @@ alt: "Fuchsia" } links { + text: "fuzz" + url: "/p/chromium/g/tryserver.chromium.fuzz/builders" + alt: "Fuzz" + } + links { text: "linux" url: "/p/chromium/g/tryserver.chromium.linux/builders" alt: "Linux" @@ -10816,6 +10921,11 @@ alt: "Fuchsia" } links { + text: "fuzz" + url: "/p/chromium/g/tryserver.chromium.fuzz/builders" + alt: "Fuzz" + } + links { text: "linux" url: "/p/chromium/g/tryserver.chromium.linux/builders" alt: "Linux" @@ -11211,6 +11321,11 @@ alt: "Fuchsia" } links { + text: "fuzz" + url: "/p/chromium/g/tryserver.chromium.fuzz/builders" + alt: "Fuzz" + } + links { text: "linux" url: "/p/chromium/g/tryserver.chromium.linux/builders" alt: "Linux" @@ -11846,6 +11961,11 @@ alt: "Fuchsia" } links { + text: "fuzz" + url: "/p/chromium/g/tryserver.chromium.fuzz/builders" + alt: "Fuzz" + } + links { text: "linux" url: "/p/chromium/g/tryserver.chromium.linux/builders" alt: "Linux" @@ -12219,6 +12339,11 @@ alt: "Fuchsia" } links { + text: "fuzz" + url: "/p/chromium/g/tryserver.chromium.fuzz/builders" + alt: "Fuzz" + } + links { text: "linux" url: "/p/chromium/g/tryserver.chromium.linux/builders" alt: "Linux" @@ -12637,6 +12762,11 @@ alt: "Fuchsia" } links { + text: "fuzz" + url: "/p/chromium/g/tryserver.chromium.fuzz/builders" + alt: "Fuzz" + } + links { text: "linux" url: "/p/chromium/g/tryserver.chromium.linux/builders" alt: "Linux" @@ -13066,6 +13196,11 @@ alt: "Fuchsia" } links { + text: "fuzz" + url: "/p/chromium/g/tryserver.chromium.fuzz/builders" + alt: "Fuzz" + } + links { text: "linux" url: "/p/chromium/g/tryserver.chromium.linux/builders" alt: "Linux" @@ -13510,6 +13645,11 @@ alt: "Fuchsia" } links { + text: "fuzz" + url: "/p/chromium/g/tryserver.chromium.fuzz/builders" + alt: "Fuzz" + } + links { text: "linux" url: "/p/chromium/g/tryserver.chromium.linux/builders" alt: "Linux" @@ -13869,6 +14009,11 @@ alt: "Fuchsia" } links { + text: "fuzz" + url: "/p/chromium/g/tryserver.chromium.fuzz/builders" + alt: "Fuzz" + } + links { text: "linux" url: "/p/chromium/g/tryserver.chromium.linux/builders" alt: "Linux" @@ -14363,6 +14508,11 @@ alt: "Fuchsia" } links { + text: "fuzz" + url: "/p/chromium/g/tryserver.chromium.fuzz/builders" + alt: "Fuzz" + } + links { text: "linux" url: "/p/chromium/g/tryserver.chromium.linux/builders" alt: "Linux" @@ -14738,6 +14888,11 @@ alt: "Fuchsia" } links { + text: "fuzz" + url: "/p/chromium/g/tryserver.chromium.fuzz/builders" + alt: "Fuzz" + } + links { text: "linux" url: "/p/chromium/g/tryserver.chromium.linux/builders" alt: "Linux" @@ -15117,6 +15272,11 @@ alt: "Fuchsia" } links { + text: "fuzz" + url: "/p/chromium/g/tryserver.chromium.fuzz/builders" + alt: "Fuzz" + } + links { text: "linux" url: "/p/chromium/g/tryserver.chromium.linux/builders" alt: "Linux" @@ -15631,6 +15791,11 @@ alt: "Fuchsia" } links { + text: "fuzz" + url: "/p/chromium/g/tryserver.chromium.fuzz/builders" + alt: "Fuzz" + } + links { text: "linux" url: "/p/chromium/g/tryserver.chromium.linux/builders" alt: "Linux" @@ -16005,6 +16170,11 @@ alt: "Fuchsia" } links { + text: "fuzz" + url: "/p/chromium/g/tryserver.chromium.fuzz/builders" + alt: "Fuzz" + } + links { text: "linux" url: "/p/chromium/g/tryserver.chromium.linux/builders" alt: "Linux" @@ -16420,6 +16590,11 @@ alt: "Fuchsia" } links { + text: "fuzz" + url: "/p/chromium/g/tryserver.chromium.fuzz/builders" + alt: "Fuzz" + } + links { text: "linux" url: "/p/chromium/g/tryserver.chromium.linux/builders" alt: "Linux" @@ -16799,6 +16974,11 @@ alt: "Fuchsia" } links { + text: "fuzz" + url: "/p/chromium/g/tryserver.chromium.fuzz/builders" + alt: "Fuzz" + } + links { text: "linux" url: "/p/chromium/g/tryserver.chromium.linux/builders" alt: "Linux" @@ -17172,6 +17352,11 @@ alt: "Fuchsia" } links { + text: "fuzz" + url: "/p/chromium/g/tryserver.chromium.fuzz/builders" + alt: "Fuzz" + } + links { text: "linux" url: "/p/chromium/g/tryserver.chromium.linux/builders" alt: "Linux" @@ -17563,6 +17748,9 @@ name: "buildbucket/luci.chromium.try/dawn-try-mac-amd-exp" } builders { + name: "buildbucket/luci.chromium.try/dawn-try-mac-arm64-deps-rel" + } + builders { name: "buildbucket/luci.chromium.try/dawn-try-mac-arm64-rel" } builders { @@ -17617,9 +17805,15 @@ name: "buildbucket/luci.chromium.try/fuchsia-fyi-arm64-dbg" } builders { + name: "buildbucket/luci.chromium.try/fuchsia-fyi-x64-asan" + } + builders { name: "buildbucket/luci.chromium.try/fuchsia-fyi-x64-dbg" } builders { + name: "buildbucket/luci.chromium.try/fuchsia-fyi-x64-dbg-persistent-emulator" + } + builders { name: "buildbucket/luci.chromium.try/fuchsia-official" } builders { @@ -17881,6 +18075,24 @@ name: "buildbucket/luci.chromium.try/linux-arm64-rel-cft" } builders { + name: "buildbucket/luci.chromium.try/linux-asan-dbg" + } + builders { + name: "buildbucket/luci.chromium.try/linux-asan-media-rel" + } + builders { + name: "buildbucket/luci.chromium.try/linux-asan-media-v8-arm-rel" + } + builders { + name: "buildbucket/luci.chromium.try/linux-asan-rel" + } + builders { + name: "buildbucket/luci.chromium.try/linux-asan-v8-arm-dbg" + } + builders { + name: "buildbucket/luci.chromium.try/linux-asan-v8-arm-rel" + } + builders { name: "buildbucket/luci.chromium.try/linux-bfcache-rel" } builders { @@ -17902,6 +18114,9 @@ name: "buildbucket/luci.chromium.try/linux-chromeos-annotator-rel" } builders { + name: "buildbucket/luci.chromium.try/linux-chromeos-asan-rel" + } + builders { name: "buildbucket/luci.chromium.try/linux-chromeos-clang-tidy-rel" } builders { @@ -18016,6 +18231,12 @@ name: "buildbucket/luci.chromium.try/linux-mbi-mode-per-site-instance-rel" } builders { + name: "buildbucket/luci.chromium.try/linux-msan-chained-origins-rel" + } + builders { + name: "buildbucket/luci.chromium.try/linux-msan-no-origins-rel" + } + builders { name: "buildbucket/luci.chromium.try/linux-official" } builders { @@ -18058,12 +18279,24 @@ name: "buildbucket/luci.chromium.try/linux-swangle-try-x64-exp" } builders { + name: "buildbucket/luci.chromium.try/linux-tsan-dbg" + } + builders { + name: "buildbucket/luci.chromium.try/linux-tsan-rel" + } + builders { name: "buildbucket/luci.chromium.try/linux-ubsan-fyi-rel" } builders { + name: "buildbucket/luci.chromium.try/linux-ubsan-rel" + } + builders { name: "buildbucket/luci.chromium.try/linux-ubsan-vptr" } builders { + name: "buildbucket/luci.chromium.try/linux-ubsan-vptr-rel" + } + builders { name: "buildbucket/luci.chromium.try/linux-updater-try-builder-dbg" } builders { @@ -18184,6 +18417,12 @@ name: "buildbucket/luci.chromium.try/mac-arm64-on-arm64-rel" } builders { + name: "buildbucket/luci.chromium.try/mac-asan-media-rel" + } + builders { + name: "buildbucket/luci.chromium.try/mac-asan-rel" + } + builders { name: "buildbucket/luci.chromium.try/mac-builder-next" } builders { @@ -18376,6 +18615,12 @@ name: "buildbucket/luci.chromium.try/win-asan" } builders { + name: "buildbucket/luci.chromium.try/win-asan-media-rel" + } + builders { + name: "buildbucket/luci.chromium.try/win-asan-rel" + } + builders { name: "buildbucket/luci.chromium.try/win-celab-try-rel" } builders { @@ -19075,6 +19320,9 @@ name: "buildbucket/luci.chromium.try/dawn-try-mac-amd-exp" } builders { + name: "buildbucket/luci.chromium.try/dawn-try-mac-arm64-deps-rel" + } + builders { name: "buildbucket/luci.chromium.try/dawn-try-mac-arm64-rel" } builders { @@ -19137,9 +19385,15 @@ name: "buildbucket/luci.chromium.try/fuchsia-fyi-arm64-dbg" } builders { + name: "buildbucket/luci.chromium.try/fuchsia-fyi-x64-asan" + } + builders { name: "buildbucket/luci.chromium.try/fuchsia-fyi-x64-dbg" } builders { + name: "buildbucket/luci.chromium.try/fuchsia-fyi-x64-dbg-persistent-emulator" + } + builders { name: "buildbucket/luci.chromium.try/fuchsia-x64-cast-receiver-rel" } builders { @@ -19157,6 +19411,62 @@ builder_view_only: true } consoles { + id: "tryserver.chromium.fuzz" + name: "tryserver.chromium.fuzz" + builders { + name: "buildbucket/luci.chromium.try/linux-asan-dbg" + } + builders { + name: "buildbucket/luci.chromium.try/linux-asan-media-rel" + } + builders { + name: "buildbucket/luci.chromium.try/linux-asan-media-v8-arm-rel" + } + builders { + name: "buildbucket/luci.chromium.try/linux-asan-rel" + } + builders { + name: "buildbucket/luci.chromium.try/linux-asan-v8-arm-dbg" + } + builders { + name: "buildbucket/luci.chromium.try/linux-asan-v8-arm-rel" + } + builders { + name: "buildbucket/luci.chromium.try/linux-chromeos-asan-rel" + } + builders { + name: "buildbucket/luci.chromium.try/linux-msan-chained-origins-rel" + } + builders { + name: "buildbucket/luci.chromium.try/linux-msan-no-origins-rel" + } + builders { + name: "buildbucket/luci.chromium.try/linux-tsan-dbg" + } + builders { + name: "buildbucket/luci.chromium.try/linux-tsan-rel" + } + builders { + name: "buildbucket/luci.chromium.try/linux-ubsan-rel" + } + builders { + name: "buildbucket/luci.chromium.try/linux-ubsan-vptr-rel" + } + builders { + name: "buildbucket/luci.chromium.try/mac-asan-media-rel" + } + builders { + name: "buildbucket/luci.chromium.try/mac-asan-rel" + } + builders { + name: "buildbucket/luci.chromium.try/win-asan-media-rel" + } + builders { + name: "buildbucket/luci.chromium.try/win-asan-rel" + } + builder_view_only: true +} +consoles { id: "tryserver.chromium.infra" name: "tryserver.chromium.infra" builders {
diff --git a/infra/config/generated/testing/variants.pyl b/infra/config/generated/testing/variants.pyl index 9deba00..b8a1c979 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.6021.0', + 'description': 'Run with ash-chrome version 119.0.6022.0', 'args': [ - '--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6021.0/test_ash_chrome', + '--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6022.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.6021.0', - 'revision': 'version:119.0.6021.0', + 'location': 'lacros_version_skew_tests_v119.0.6022.0', + 'revision': 'version:119.0.6022.0', }, ], }, @@ -465,6 +465,72 @@ 'cros_img': 'dedede-release/R115-15474.70.0', }, }, + 'CROS_FIZZ_RELEASE_LKGM': { + 'identifier': 'FIZZ_RELEASE_LKGM', + 'skylab': { + 'cros_board': 'fizz', + 'cros_img': 'fizz-release/R119-15619.0.0', + 'autotest_name': 'tast.lacros-from-gcs', + 'dut_pool': 'chrome', + }, + }, + 'CROS_FIZZ_RELEASE_DEV': { + 'identifier': 'FIZZ_RELEASE_DEV', + 'skylab': { + 'cros_board': 'fizz', + 'cros_img': 'fizz-release/R117-15563.0.0', + 'dut_pool': 'chrome', + }, + }, + 'CROS_FIZZ_RELEASE_BETA': { + 'identifier': 'FIZZ_RELEASE_BETA', + 'skylab': { + 'cros_board': 'fizz', + 'cros_img': 'fizz-release/R116-15509.50.0', + 'dut_pool': 'chrome', + }, + }, + 'CROS_FIZZ_RELEASE_STABLE': { + 'identifier': 'FIZZ_RELEASE_STABLE', + 'skylab': { + 'cros_board': 'fizz', + 'cros_img': 'fizz-release/R115-15474.70.0', + 'dut_pool': 'chrome', + }, + }, + 'CROS_GUYBRUSH_RELEASE_LKGM': { + 'identifier': 'GUYBRUSH_RELEASE_LKGM', + 'skylab': { + 'cros_board': 'guybrush', + 'cros_img': 'guybrush-release/R119-15619.0.0', + 'autotest_name': 'tast.lacros-from-gcs', + 'dut_pool': 'chrome', + }, + }, + 'CROS_GUYBRUSH_RELEASE_DEV': { + 'identifier': 'GUYBRUSH_RELEASE_DEV', + 'skylab': { + 'cros_board': 'guybrush', + 'cros_img': 'guybrush-release/R117-15563.0.0', + 'dut_pool': 'chrome', + }, + }, + 'CROS_GUYBRUSH_RELEASE_BETA': { + 'identifier': 'GUYBRUSH_RELEASE_BETA', + 'skylab': { + 'cros_board': 'guybrush', + 'cros_img': 'guybrush-release/R116-15509.50.0', + 'dut_pool': 'chrome', + }, + }, + 'CROS_GUYBRUSH_RELEASE_STABLE': { + 'identifier': 'GUYBRUSH_RELEASE_STABLE', + 'skylab': { + 'cros_board': 'guybrush', + 'cros_img': 'guybrush-release/R115-15474.70.0', + 'dut_pool': 'chrome', + }, + }, 'CROS_PUFF_RELEASE_LKGM': { 'identifier': 'PUFF_RELEASE_LKGM', 'skylab': {
diff --git a/infra/config/lib/builder_config.star b/infra/config/lib/builder_config.star index 08dbfe4..0fc6861 100644 --- a/infra/config/lib/builder_config.star +++ b/infra/config/lib/builder_config.star
@@ -8,6 +8,7 @@ load("@stdlib//internal/luci/common.star", "keys", "kinds", "triggerer") load("./args.star", "args") load("./builder_url.star", "linkify_builder") +load("./chrome_settings.star", "per_builder_outputs_config") load("./nodes.star", "nodes") load("./structs.star", "structs") load("//project.star", "settings") @@ -427,7 +428,14 @@ _BUILDER_CONFIG, ) -def register_builder_config(bucket, name, builder_group, builder_spec, mirrors, try_settings): +def register_builder_config( + bucket, + name, + builder_group, + builder_spec, + mirrors, + try_settings, + additional_exclusions): """Registers the builder config so the properties can be computed. At most one of builder_spec or mirrors can be set. If neither builder_spec @@ -440,6 +448,9 @@ builder_spec: The spec describing the configuration for the builder. mirrors: References to the builders that the builder should mirror. try_settings: The object determining the try-specific settings. + additional_exclusions: A list of paths that are excluded when analyzing + the change to determine affected targets. The paths should be + relative to the per-builder output root dir. """ if not builder_spec and not mirrors: if try_settings: @@ -461,6 +472,7 @@ builder_spec = builder_spec, mirrors = mirrors, try_settings = try_settings, + additional_exclusions = additional_exclusions, )) if _is_copy_from(builder_spec): @@ -694,6 +706,14 @@ builder_ids = sorted(builder_ids, key = _builder_id_sort_key), **structs.to_proto_properties(node.props.try_settings) ) + if node.props.additional_exclusions: + builder_config["additional_exclusions"] = [ + "infra/config/generated/{}/{}".format( + per_builder_outputs_config().root_dir, + exclusion, + ) + for exclusion in node.props.additional_exclusions + ] builder_config.pop("include_all_triggered_testers", None) if builder_ids_in_scope_for_testing:
diff --git a/infra/config/lib/builder_health_indicators.star b/infra/config/lib/builder_health_indicators.star index a85a3e1a..66466f4 100644 --- a/infra/config/lib/builder_health_indicators.star +++ b/infra/config/lib/builder_health_indicators.star
@@ -706,6 +706,12 @@ "linux-annotator-rel", "linux-arm64-castos", "linux-arm64-rel-cft", + "linux-asan-dbg", + "linux-asan-rel", + "linux-asan-media-rel", + "linux-asan-v8-arm-dbg", + "linux-asan-v8-arm-rel", + "linux-asan-media-v8-arm-rel", "linux-bfcache-rel", "linux-blink-heap-verification-try", "linux-blink-rel", @@ -713,6 +719,7 @@ "linux-centipede-asan-rel", "linux-cfm-rel", "linux-chromeos-annotator-rel", + "linux-chromeos-asan-rel", "linux-chromeos-clang-tidy-rel", "linux-chromeos-code-coverage", "linux-chromeos-compile-dbg", @@ -750,6 +757,8 @@ "linux-libfuzzer-asan-rel", "linux-mbi-mode-per-render-process-host-rel", "linux-mbi-mode-per-site-instance-rel", + "linux-msan-chained-origins-rel", + "linux-msan-no-origins-rel", "linux-official", "linux-perfetto-rel", "linux-rel", @@ -764,8 +773,12 @@ "linux-swangle-try-tot-swiftshader-x64", "linux-swangle-try-x64", "linux-swangle-try-x64-exp", + "linux-tsan-dbg", + "linux-tsan-rel", "linux-ubsan-fyi-rel", + "linux-ubsan-rel", "linux-ubsan-vptr", + "linux-ubsan-vptr-rel", "linux-updater-try-builder-dbg", "linux-updater-try-builder-rel", "linux-v4l2-codec-rel", @@ -807,6 +820,8 @@ "mac-angle-chromium-try", "mac-arm64-clobber-rel", "mac-arm64-on-arm64-rel", + "mac-asan-media-rel", + "mac-asan-rel", "mac-builder-next", "mac-clang-tidy-rel", "mac-clobber-rel", @@ -869,6 +884,8 @@ "win-angle-chromium-x86-try", "win-annotator-rel", "win-asan", + "win-asan-rel", + "win-asan-media-rel", "win-celab-try-rel", "win-clobber-rel", "win-dawn-rel",
diff --git a/infra/config/lib/builders.star b/infra/config/lib/builders.star index cad0f10..562f53c 100644 --- a/infra/config/lib/builders.star +++ b/infra/config/lib/builders.star
@@ -955,7 +955,17 @@ register_recipe_experiments_ref(bucket, name, executable) - register_builder_config(bucket, name, builder_group, builder_spec, mirrors, try_settings) + additional_exclusions = register_gn_args(builder_group, bucket, name, gn_args) + + register_builder_config( + bucket, + name, + builder_group, + builder_spec, + mirrors, + try_settings, + additional_exclusions, + ) register_bootstrap(bucket, name, bootstrap, executable) @@ -963,8 +973,6 @@ register_health_spec(bucket, name, health_spec, contact_team_email) - register_gn_args(builder_group, bucket, name, gn_args) - builder_name = "{}/{}".format(bucket, name) if console_view_entry:
diff --git a/infra/config/lib/gn_args.star b/infra/config/lib/gn_args.star index 307ce24..aa5383c9 100644 --- a/infra/config/lib/gn_args.star +++ b/infra/config/lib/gn_args.star
@@ -14,6 +14,8 @@ _GN_CONFIG = nodes.create_unscoped_node_type("gn_config") +_GN_ARGS_FILE_NAME = "gn-args.json" + def _get_gn_args_resolver(): resolved_gn_args_by_config_node = {} @@ -164,6 +166,10 @@ builder: (string) The builder name. gn_args: The string name of a GN config, or the return value of a gn_args.config method call without setting the "name" parameter. + + Returns: + A list of generated GN args file paths relative to the per-builder + output root dir if gn_args is set; None otherwise. """ if gn_args: if type(gn_args) == "string": @@ -174,6 +180,9 @@ gn_args["builder_group"] = builder_group builder_node_key = _create_gn_config_node("{}/{}".format(bucket, builder), **gn_args) graph.add_edge(keys.project(), builder_node_key) + return ["{}/{}/{}".format(bucket, builder, _GN_ARGS_FILE_NAME)] + else: + return None def _generate_gn_args(ctx): """Generator callback for generating "gn-args.json" files. @@ -185,10 +194,9 @@ root_out_dir = per_builder_outputs_config().root_dir builder_nodes = graph.children(keys.project(), _GN_CONFIG.kind) if builder_nodes: - gn_args_file_name = "gn-args.json" resolve_gn_args = _get_gn_args_resolver() for node in builder_nodes: - gn_args_file_path = "{}/{}/{}".format(root_out_dir, node.key.id, gn_args_file_name) + gn_args_file_path = "{}/{}/{}".format(root_out_dir, node.key.id, _GN_ARGS_FILE_NAME) gn_args_dict = resolve_gn_args(node) for key in gn_args_dict.keys(): if not gn_args_dict[key]: @@ -200,7 +208,7 @@ args_gn_locations.setdefault( builder_group, {}, - )[builder_name] = "{}/{}".format(node.key.id, gn_args_file_name) + )[builder_name] = "{}/{}".format(node.key.id, _GN_ARGS_FILE_NAME) locations_file_path = "{}/gn_args_locations.json".format(root_out_dir) ctx.output[locations_file_path] = json.indent(
diff --git a/infra/config/subprojects/chromium/try.star b/infra/config/subprojects/chromium/try.star index bb945517..9d67a6032 100644 --- a/infra/config/subprojects/chromium/try.star +++ b/infra/config/subprojects/chromium/try.star
@@ -167,6 +167,7 @@ exec("./try/tryserver.chromium.cft.star") exec("./try/tryserver.chromium.dawn.star") exec("./try/tryserver.chromium.fuchsia.star") +exec("./try/tryserver.chromium.fuzz.star") exec("./try/tryserver.chromium.infra.star") exec("./try/tryserver.chromium.linux.star") exec("./try/tryserver.chromium.mac.star")
diff --git a/infra/config/subprojects/chromium/try/tryserver.chromium.dawn.star b/infra/config/subprojects/chromium/try/tryserver.chromium.dawn.star index e8ed218..d84f9138 100644 --- a/infra/config/subprojects/chromium/try/tryserver.chromium.dawn.star +++ b/infra/config/subprojects/chromium/try/tryserver.chromium.dawn.star
@@ -276,6 +276,22 @@ ) try_.builder( + name = "dawn-try-mac-arm64-deps-rel", + mirrors = [ + "ci/Dawn Mac arm64 DEPS Release (Apple M2)", + ], + # TODO(crbug.com/1435476): Switch to a dedicated M2 pool once we have + # allocated machines. + pool = "luci.chromium.gpu.mac.arm64.apple.m1.try", + builderless = True, + os = os.MAC_ANY, + contact_team_email = "chrome-gpu-infra@google.com", + test_presentation = resultdb.test_presentation( + grouping_keys = ["status", "v.test_suite", "v.gpu"], + ), +) + +try_.builder( name = "dawn-try-mac-arm64-rel", mirrors = [ "ci/Dawn Mac arm64 Release (Apple M2)",
diff --git a/infra/config/subprojects/chromium/try/tryserver.chromium.fuchsia.star b/infra/config/subprojects/chromium/try/tryserver.chromium.fuchsia.star index ca87530..99e4059 100644 --- a/infra/config/subprojects/chromium/try/tryserver.chromium.fuchsia.star +++ b/infra/config/subprojects/chromium/try/tryserver.chromium.fuchsia.star
@@ -125,10 +125,24 @@ ) try_.builder( + name = "fuchsia-fyi-x64-asan", + mirrors = ["ci/fuchsia-fyi-x64-asan"], + contact_team_email = "chrome-fuchsia-engprod@google.com", + execution_timeout = 10 * time.hour, +) + +try_.builder( name = "fuchsia-fyi-x64-dbg", mirrors = ["ci/fuchsia-fyi-x64-dbg"], ) +try_.builder( + name = "fuchsia-fyi-x64-dbg-persistent-emulator", + mirrors = ["ci/fuchsia-fyi-x64-dbg-persistent-emulator"], + contact_team_email = "chrome-fuchsia-engprod@google.com", + execution_timeout = 10 * time.hour, +) + try_.orchestrator_builder( name = "fuchsia-x64-cast-receiver-rel", branch_selector = branches.selector.FUCHSIA_BRANCHES,
diff --git a/infra/config/subprojects/chromium/try/tryserver.chromium.fuzz.star b/infra/config/subprojects/chromium/try/tryserver.chromium.fuzz.star new file mode 100644 index 0000000..5d34744e --- /dev/null +++ b/infra/config/subprojects/chromium/try/tryserver.chromium.fuzz.star
@@ -0,0 +1,119 @@ +# 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. +"""Definitions of builders in the tryserver.chromium.fuchsia builder group.""" + +load("//lib/builders.star", "os", "reclient", "siso") +load("//lib/consoles.star", "consoles") +load("//lib/try.star", "try_") + +try_.defaults.set( + executable = try_.DEFAULT_EXECUTABLE, + builder_group = "tryserver.chromium.fuzz", + pool = try_.DEFAULT_POOL, + builderless = True, + cores = 8, + os = os.LINUX_DEFAULT, + execution_timeout = try_.DEFAULT_EXECUTION_TIMEOUT, + reclient_instance = reclient.instance.DEFAULT_UNTRUSTED, + reclient_jobs = reclient.jobs.HIGH_JOBS_FOR_CQ, + service_account = try_.DEFAULT_SERVICE_ACCOUNT, + siso_enable_cloud_profiler = True, + siso_enable_cloud_trace = True, + siso_project = siso.project.DEFAULT_UNTRUSTED, +) + +consoles.list_view( + name = "tryserver.chromium.fuzz", +) + +try_.builder( + name = "linux-asan-dbg", + mirrors = ["ci/ASAN Debug"], +) + +try_.builder( + name = "linux-asan-rel", + mirrors = ["ci/ASAN Release"], +) + +try_.builder( + name = "linux-asan-media-rel", + mirrors = ["ci/ASAN Release Media"], +) + +try_.builder( + name = "linux-asan-v8-arm-dbg", + mirrors = ["ci/ASan Debug (32-bit x86 with V8-ARM)"], +) + +try_.builder( + name = "linux-asan-v8-arm-rel", + mirrors = ["ci/ASan Release (32-bit x86 with V8-ARM)"], +) + +try_.builder( + name = "linux-asan-media-v8-arm-rel", + mirrors = ["ci/ASan Release Media (32-bit x86 with V8-ARM)"], +) + +try_.builder( + name = "linux-chromeos-asan-rel", + mirrors = ["ci/ChromiumOS ASAN Release"], +) + +try_.builder( + name = "linux-msan-chained-origins-rel", + mirrors = ["ci/MSAN Release (chained origins)"], +) + +try_.builder( + name = "linux-msan-no-origins-rel", + mirrors = ["ci/MSAN Release (no origins)"], +) + +try_.builder( + name = "linux-tsan-dbg", + mirrors = ["ci/TSAN Debug"], +) + +try_.builder( + name = "linux-tsan-rel", + mirrors = ["ci/TSAN Release"], +) + +try_.builder( + name = "linux-ubsan-rel", + mirrors = ["ci/UBSan Release"], +) + +try_.builder( + name = "linux-ubsan-vptr-rel", + mirrors = ["ci/UBSan vptr Release"], +) + +try_.builder( + name = "mac-asan-rel", + mirrors = ["ci/Mac ASAN Release"], + cores = None, + os = os.MAC_DEFAULT, +) + +try_.builder( + name = "mac-asan-media-rel", + mirrors = ["ci/Mac ASAN Release Media"], + cores = None, + os = os.MAC_DEFAULT, +) + +try_.builder( + name = "win-asan-rel", + mirrors = ["ci/Win ASan Release"], + os = os.WINDOWS_DEFAULT, +) + +try_.builder( + name = "win-asan-media-rel", + mirrors = ["ci/Win ASan Release Media"], + os = os.WINDOWS_DEFAULT, +)
diff --git a/infra/config/targets/cros-skylab-variants.json b/infra/config/targets/cros-skylab-variants.json index d5d5ac2f..38dd1392 100644 --- a/infra/config/targets/cros-skylab-variants.json +++ b/infra/config/targets/cros-skylab-variants.json
@@ -45,6 +45,88 @@ "enabled": true, "identifier": "DEDEDE_RELEASE_STABLE" }, + "CROS_FIZZ_RELEASE_LKGM": { + "skylab": { + "cros_board": "fizz", + "cros_chrome_version": "119.0.6011.0", + "cros_img": "fizz-release/R119-15619.0.0", + "autotest_name": "tast.lacros-from-gcs", + "dut_pool": "chrome" + }, + "enabled": true, + "identifier": "FIZZ_RELEASE_LKGM" + }, + "CROS_FIZZ_RELEASE_DEV": { + "skylab": { + "cros_board": "fizz", + "cros_chrome_version": "117.0.5920.0", + "cros_img": "fizz-release/R117-15563.0.0", + "dut_pool": "chrome" + }, + "enabled": true, + "identifier": "FIZZ_RELEASE_DEV" + }, + "CROS_FIZZ_RELEASE_BETA": { + "skylab": { + "cros_board": "fizz", + "cros_chrome_version": "116.0.5845.67", + "cros_img": "fizz-release/R116-15509.50.0", + "dut_pool": "chrome" + }, + "enabled": true, + "identifier": "FIZZ_RELEASE_BETA" + }, + "CROS_FIZZ_RELEASE_STABLE": { + "skylab": { + "cros_board": "fizz", + "cros_chrome_version": "115.0.5790.160", + "cros_img": "fizz-release/R115-15474.70.0", + "dut_pool": "chrome" + }, + "enabled": true, + "identifier": "FIZZ_RELEASE_STABLE" + }, + "CROS_GUYBRUSH_RELEASE_LKGM": { + "skylab": { + "cros_board": "guybrush", + "cros_chrome_version": "119.0.6011.0", + "cros_img": "guybrush-release/R119-15619.0.0", + "autotest_name": "tast.lacros-from-gcs", + "dut_pool": "chrome" + }, + "enabled": true, + "identifier": "GUYBRUSH_RELEASE_LKGM" + }, + "CROS_GUYBRUSH_RELEASE_DEV": { + "skylab": { + "cros_board": "guybrush", + "cros_chrome_version": "117.0.5920.0", + "cros_img": "guybrush-release/R117-15563.0.0", + "dut_pool": "chrome" + }, + "enabled": true, + "identifier": "GUYBRUSH_RELEASE_DEV" + }, + "CROS_GUYBRUSH_RELEASE_BETA": { + "skylab": { + "cros_board": "guybrush", + "cros_chrome_version": "116.0.5845.67", + "cros_img": "guybrush-release/R116-15509.50.0", + "dut_pool": "chrome" + }, + "enabled": true, + "identifier": "GUYBRUSH_RELEASE_BETA" + }, + "CROS_GUYBRUSH_RELEASE_STABLE": { + "skylab": { + "cros_board": "guybrush", + "cros_chrome_version": "115.0.5790.160", + "cros_img": "guybrush-release/R115-15474.70.0", + "dut_pool": "chrome" + }, + "enabled": true, + "identifier": "GUYBRUSH_RELEASE_STABLE" + }, "CROS_PUFF_RELEASE_LKGM": { "skylab": { "cros_board": "puff",
diff --git a/infra/config/targets/lacros-version-skew-variants.json b/infra/config/targets/lacros-version-skew-variants.json index b3a4440..aa63d24a 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.6021.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6022.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 119.0.6021.0", + "description": "Run with ash-chrome version 119.0.6022.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.6021.0", - "revision": "version:119.0.6021.0" + "location": "lacros_version_skew_tests_v119.0.6022.0", + "revision": "version:119.0.6022.0" } ] }
diff --git a/internal b/internal index e3a870e..3181fde 160000 --- a/internal +++ b/internal
@@ -1 +1 @@ -Subproject commit e3a870ecead3c110644eba39accc4031464adb3d +Subproject commit 3181fde91ac77714ff320fd41e13147bde8f7fcd
diff --git a/ios/chrome/app/main_application_delegate.mm b/ios/chrome/app/main_application_delegate.mm index fc26e10..6ba134f 100644 --- a/ios/chrome/app/main_application_delegate.mm +++ b/ios/chrome/app/main_application_delegate.mm
@@ -61,8 +61,6 @@ // The set of "scene sessions" that needs to be discarded. See // -application:didDiscardSceneSessions: for details. NSSet<UISceneSession*>* _sceneSessionsToDiscard; - // Delegate that handles delivered push notification workflow. - PushNotificationDelegate* _pushNotificationDelegate; } // YES if application:didFinishLaunchingWithOptions: was called. Used to @@ -70,6 +68,9 @@ // applicationWillTerminate:. @property(nonatomic, assign) BOOL didFinishLaunching; +// Delegate that handles delivered push notification workflow. +@property(nonatomic, strong) PushNotificationDelegate* pushNotificationDelegate; + @end @implementation MainApplicationDelegate @@ -216,7 +217,7 @@ // application. In that case, the user must relaunch the application or must // restart the device before the system will launch the application and invoke // this function. - UIBackgroundFetchResult result = [_pushNotificationDelegate + UIBackgroundFetchResult result = [self.pushNotificationDelegate applicationWillProcessIncomingRemoteNotification:userInfo]; if (completionHandler) { completionHandler(result); @@ -229,17 +230,9 @@ // APNS and retrieval of the device's APNS token. base::UmaHistogramBoolean("IOS.PushNotification.APNSDeviceRegistration", true); - - // TODO(crbug.com/1478263) Move PushNotificationDelegate to - // property and this should avoid the need to use strongSelf. - __weak MainApplicationDelegate* weakSelf = self; web::GetUIThreadTaskRunner({})->PostTask( FROM_HERE, base::BindOnce(^{ - MainApplicationDelegate* strongSelf = weakSelf; - if (!strongSelf) { - return; - } - [strongSelf->_pushNotificationDelegate + [self.pushNotificationDelegate applicationDidRegisterWithAPNS:deviceToken]; })); }
diff --git a/ios/chrome/browser/safe_browsing/safe_browsing_egtest.mm b/ios/chrome/browser/safe_browsing/safe_browsing_egtest.mm index 906054b..6681ea6 100644 --- a/ios/chrome/browser/safe_browsing/safe_browsing_egtest.mm +++ b/ios/chrome/browser/safe_browsing/safe_browsing_egtest.mm
@@ -98,6 +98,7 @@ - (AppLaunchConfiguration)appConfigurationForTestCase { AppLaunchConfiguration config; + config.features_disabled.push_back(safe_browsing::kRedInterstitialFacelift); // Use commandline args to insert fake unsafe URLs into the Safe Browsing // database. config.additional_args.push_back(std::string("--mark_as_phishing=") +
diff --git a/ios/chrome/browser/shared/public/features/features.h b/ios/chrome/browser/shared/public/features/features.h index c778535..4becd95 100644 --- a/ios/chrome/browser/shared/public/features/features.h +++ b/ios/chrome/browser/shared/public/features/features.h
@@ -239,4 +239,8 @@ // Feature flag enabling Save to Photos. BASE_DECLARE_FEATURE(kIOSSaveToPhotos); +// Kill switch to control the `settingsWillBeDismissed` bug fix (see +// crbug.com/1482284). +BASE_DECLARE_FEATURE(kSettingsWillBeDismissedBugFixKillSwitch); + #endif // IOS_CHROME_BROWSER_SHARED_PUBLIC_FEATURES_FEATURES_H_
diff --git a/ios/chrome/browser/shared/public/features/features.mm b/ios/chrome/browser/shared/public/features/features.mm index eabb640c..8ba8b1a5 100644 --- a/ios/chrome/browser/shared/public/features/features.mm +++ b/ios/chrome/browser/shared/public/features/features.mm
@@ -283,3 +283,7 @@ BASE_FEATURE(kIOSSaveToPhotos, "IOSSaveToPhotos", base::FEATURE_DISABLED_BY_DEFAULT); + +BASE_FEATURE(kSettingsWillBeDismissedBugFixKillSwitch, + "SettingsWillBeDismissedBugFixKillSwitch", + base::FEATURE_ENABLED_BY_DEFAULT);
diff --git a/ios/chrome/browser/ui/authentication/history_sync/history_sync_mediator.mm b/ios/chrome/browser/ui/authentication/history_sync/history_sync_mediator.mm index 7feeec6..d4f23e6 100644 --- a/ios/chrome/browser/ui/authentication/history_sync/history_sync_mediator.mm +++ b/ios/chrome/browser/ui/authentication/history_sync/history_sync_mediator.mm
@@ -13,16 +13,21 @@ #import "components/unified_consent/unified_consent_service.h" #import "ios/chrome/browser/signin/authentication_service.h" #import "ios/chrome/browser/signin/chrome_account_manager_service.h" +#import "ios/chrome/browser/signin/chrome_account_manager_service_observer_bridge.h" #import "ios/chrome/browser/ui/authentication/history_sync/history_sync_consumer.h" #import "ios/chrome/grit/ios_strings.h" #import "ui/base/l10n/l10n_util.h" -@interface HistorySyncMediator () <IdentityManagerObserverBridgeDelegate> +@interface HistorySyncMediator () <ChromeAccountManagerServiceObserver, + IdentityManagerObserverBridgeDelegate> @end @implementation HistorySyncMediator { AuthenticationService* _authenticationService; + // Account manager service with observer. ChromeAccountManagerService* _accountManagerService; + std::unique_ptr<ChromeAccountManagerServiceObserverBridge> + _accountManagerServiceObserver; // Observer for `IdentityManager`. std::unique_ptr<signin::IdentityManagerObserverBridge> _identityManagerObserver; @@ -43,6 +48,9 @@ if (self) { _authenticationService = authenticationService; _accountManagerService = chromeAccountManagerService; + _accountManagerServiceObserver = + std::make_unique<ChromeAccountManagerServiceObserverBridge>( + self, _accountManagerService); _identityManagerObserver = std::make_unique<signin::IdentityManagerObserverBridge>(identityManager, self); @@ -53,6 +61,7 @@ } - (void)disconnect { + _accountManagerServiceObserver.reset(); _identityManagerObserver.reset(); _authenticationService = nullptr; _accountManagerService = nullptr; @@ -96,6 +105,12 @@ [_consumer setFooterText:footerText]; } +#pragma mark - ChromeAccountManagerServiceObserver + +- (void)identityUpdated:(id<SystemIdentity>)identity { + [self updateAvatarImageWithIdentity:identity]; +} + #pragma mark - IdentityManagerObserverBridgeDelegate - (void)onPrimaryAccountChanged:
diff --git a/ios/chrome/browser/ui/settings/google_services/manage_sync_settings_table_view_controller.mm b/ios/chrome/browser/ui/settings/google_services/manage_sync_settings_table_view_controller.mm index 3297467..c1690c09 100644 --- a/ios/chrome/browser/ui/settings/google_services/manage_sync_settings_table_view_controller.mm +++ b/ios/chrome/browser/ui/settings/google_services/manage_sync_settings_table_view_controller.mm
@@ -164,7 +164,19 @@ // No need to reload since the model has not been loaded yet. return; } + if (!item) { + // No need to reload if the item doesn't exist. indexPathForItem below + // should handle nil just fine, but doesn't hurt to early return explicitly. + return; + } NSIndexPath* indexPath = [self.tableViewModel indexPathForItem:item]; + if (!indexPath) { + // No need to reload if the item is not in the model. This would also cause + // a crash below since NSArrays cannot contain nil. + // TODO(crbug.com/1485554): Better understand the crash root cause and CHECK + // instead of no-op. + return; + } // To avoid animation glitches related to crbug.com/1469539. [UIView performWithoutAnimation:^{ [self.tableView beginUpdates];
diff --git a/ios/chrome/browser/ui/settings/settings_root_table_view_controller.mm b/ios/chrome/browser/ui/settings/settings_root_table_view_controller.mm index 0d4108d0..17ef7e58 100644 --- a/ios/chrome/browser/ui/settings/settings_root_table_view_controller.mm +++ b/ios/chrome/browser/ui/settings/settings_root_table_view_controller.mm
@@ -9,6 +9,7 @@ #import "ios/chrome/browser/net/crurl.h" #import "ios/chrome/browser/shared/public/commands/application_commands.h" #import "ios/chrome/browser/shared/public/commands/open_new_tab_command.h" +#import "ios/chrome/browser/shared/public/features/features.h" #import "ios/chrome/browser/shared/ui/table_view/chrome_table_view_styler.h" #import "ios/chrome/browser/shared/ui/table_view/table_view_utils.h" #import "ios/chrome/browser/shared/ui/util/uikit_ui_util.h" @@ -187,8 +188,16 @@ // can leave the new top view controller with a toolbar when it doesn't // require one. Disabling editing mode to avoid this. See crbug.com/1404111 as // an example. - if (!parent && self.isEditing) { - [self setEditing:NO animated:NO]; + if (!parent) { + if (!base::FeatureList::IsEnabled( + kSettingsWillBeDismissedBugFixKillSwitch) && + [self respondsToSelector:@selector(settingsWillBeDismissed)]) { + [self performSelector:@selector(settingsWillBeDismissed)]; + } + + if (self.isEditing) { + [self setEditing:NO animated:NO]; + } } [self.navigationController setToolbarHidden:YES animated:YES]; @@ -196,7 +205,9 @@ - (void)didMoveToParentViewController:(UIViewController*)parent { [super didMoveToParentViewController:parent]; - if (!parent && [self respondsToSelector:@selector(settingsWillBeDismissed)]) { + if (!parent && + base::FeatureList::IsEnabled(kSettingsWillBeDismissedBugFixKillSwitch) && + [self respondsToSelector:@selector(settingsWillBeDismissed)]) { [self performSelector:@selector(settingsWillBeDismissed)]; } }
diff --git a/ios/chrome/browser/ui/webui/interstitials/BUILD.gn b/ios/chrome/browser/ui/webui/interstitials/BUILD.gn index 9b9d5074..ae2bbc2 100644 --- a/ios/chrome/browser/ui/webui/interstitials/BUILD.gn +++ b/ios/chrome/browser/ui/webui/interstitials/BUILD.gn
@@ -48,6 +48,7 @@ ":constants", "//base", "//base/test:test_support", + "//components/safe_browsing/core/common", "//ios/chrome/browser/shared/model/url:constants", "//ios/chrome/test/earl_grey:eg_test_support+eg2", "//ios/components/webui:url_constants",
diff --git a/ios/chrome/browser/ui/webui/interstitials/interstitial_ui_egtest.mm b/ios/chrome/browser/ui/webui/interstitials/interstitial_ui_egtest.mm index c495088..695e9536 100644 --- a/ios/chrome/browser/ui/webui/interstitials/interstitial_ui_egtest.mm +++ b/ios/chrome/browser/ui/webui/interstitials/interstitial_ui_egtest.mm
@@ -4,6 +4,7 @@ #import <XCTest/XCTest.h> +#import "components/safe_browsing/core/common/features.h" #import "ios/chrome/browser/shared/model/url/chrome_url_constants.h" #import "ios/chrome/browser/ui/webui/interstitials/interstitial_ui_constants.h" #import "ios/chrome/test/earl_grey/chrome_earl_grey.h" @@ -26,6 +27,12 @@ @implementation InterstitialWebUITestCase +- (AppLaunchConfiguration)appConfigurationForTestCase { + AppLaunchConfiguration config; + config.features_disabled.push_back(safe_browsing::kRedInterstitialFacelift); + return config; +} + - (void)setUp { [super setUp]; _schemeRegistry = std::make_unique<url::ScopedSchemeRegistryForTests>();
diff --git a/ios/chrome/content_widget_extension/BUILD.gn b/ios/chrome/content_widget_extension/BUILD.gn index 747220f..26c5906c 100644 --- a/ios/chrome/content_widget_extension/BUILD.gn +++ b/ios/chrome/content_widget_extension/BUILD.gn
@@ -13,22 +13,13 @@ source_set("content_widget") { sources = [ - "content_widget_view.h", - "content_widget_view.mm", "content_widget_view_controller.h", "content_widget_view_controller.mm", - "most_visited_tile_view.h", - "most_visited_tile_view.mm", ] deps = [ "//base", - "//ios/chrome/common/app_group", - "//ios/chrome/common/app_group:command", "//ios/chrome/common/crash_report", - "//ios/chrome/common/ntp_tile", - "//ios/chrome/common/ui/elements", - "//ios/chrome/common/ui/favicon", "//ios/chrome/common/ui/util", ] @@ -56,7 +47,10 @@ config_file = "content_widget_extension_localize_strings_config.plist" datapack_dir = get_label_info(_packed_resources_target, "target_gen_dir") packed_locales = locales_as_apple_outputs - output_filenames = [ "InfoPlist.strings" ] + output_filenames = [ + "InfoPlist.strings", + "Localizable.strings", + ] deps = [ "//ios/chrome/content_widget_extension/strings:ios_content_widget_extension_branded_strings", _packed_resources_target,
diff --git a/ios/chrome/content_widget_extension/content_widget_extension_localize_strings_config.plist b/ios/chrome/content_widget_extension/content_widget_extension_localize_strings_config.plist index 36eb6dc..9b003a2 100644 --- a/ios/chrome/content_widget_extension/content_widget_extension_localize_strings_config.plist +++ b/ios/chrome/content_widget_extension/content_widget_extension_localize_strings_config.plist
@@ -21,6 +21,14 @@ </dict> </array> </dict> + <dict> + <key>name</key> + <string>Localizable.strings</string> + <key>strings</key> + <array> + <string>IDS_IOS_CONTENT_WIDGET_LABEL</string> + </array> + </dict> </array> </dict> </plist>
diff --git a/ios/chrome/content_widget_extension/content_widget_view.h b/ios/chrome/content_widget_extension/content_widget_view.h deleted file mode 100644 index 50eb63c..0000000 --- a/ios/chrome/content_widget_extension/content_widget_view.h +++ /dev/null
@@ -1,56 +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 IOS_CHROME_CONTENT_WIDGET_EXTENSION_CONTENT_WIDGET_VIEW_H_ -#define IOS_CHROME_CONTENT_WIDGET_EXTENSION_CONTENT_WIDGET_VIEW_H_ - -#import <UIKit/UIKit.h> - -@class MostVisitedTileView; -@class NTPTile; - -// Protocol to be implemented by targets for user actions coming from the -// content widget view. -@protocol ContentWidgetViewDelegate - -// Called when tapping a tile to open `URL`. -- (void)openURL:(NSURL*)URL; - -@end - -// View for the content widget. Shows 1 (compact view) or 2 (full size view) -// rows of 4 most visited tiles (favicon or fallback + title), if there are -// enough tiles to show. If there are fewer than 4 tiles, always displays a -// single row. -@interface ContentWidgetView : UIView - -// The height of the widget in expanded mode. -@property(nonatomic, readonly) CGFloat widgetExpandedHeight; - -// Designated initializer, creates the widget view with a `delegate` for user -// actions. `compactHeight` indicates the size to use in compact display. -// `width` is the width of the widget. -- (instancetype)initWithDelegate:(id<ContentWidgetViewDelegate>)delegate - compactHeight:(CGFloat)compactHeight - width:(CGFloat)width NS_DESIGNATED_INITIALIZER; -- (instancetype)initWithFrame:(CGRect)frame NS_UNAVAILABLE; -- (instancetype)initWithCoder:(NSCoder*)aDecoder NS_UNAVAILABLE; -- (instancetype)init NS_UNAVAILABLE; - -// Updates the view to display a compact or expanded view, depending on -// `compact`. If `compact` is false, the view shows a maximum of 8 tiles. If -// `compact` is true, the view is set to show a single row of 4 tiles at most -// within the `compactHeight` passed in the constructor. -- (void)showMode:(BOOL)compact; - -// Updates the displayed sites. `sites` should contain NTPTiles with continuous -// positions starting at 0. -- (void)updateSites:(NSDictionary<NSURL*, NTPTile*>*)sites; - -// Returns whether all the sites can be displayed on a single row. -- (BOOL)sitesFitSingleRow; - -@end - -#endif // IOS_CHROME_CONTENT_WIDGET_EXTENSION_CONTENT_WIDGET_VIEW_H_
diff --git a/ios/chrome/content_widget_extension/content_widget_view.mm b/ios/chrome/content_widget_extension/content_widget_view.mm deleted file mode 100644 index cc04fc53..0000000 --- a/ios/chrome/content_widget_extension/content_widget_view.mm +++ /dev/null
@@ -1,261 +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. - -#import "ios/chrome/content_widget_extension/content_widget_view.h" - -#import "base/check.h" -#import "ios/chrome/common/app_group/app_group_constants.h" -#import "ios/chrome/common/ntp_tile/ntp_tile.h" -#import "ios/chrome/common/ui/favicon/favicon_view.h" -#import "ios/chrome/common/ui/util/constraints_ui_util.h" -#import "ios/chrome/content_widget_extension/most_visited_tile_view.h" - -namespace { -// Spacing between tiles. -const CGFloat kTileSpacing = 16; -// Height of a tile row. -const CGFloat kTileHeight = 100; -// Number of rows in the widget. Note that modifying this value will not add -// extra rows and will break functionality unless additional changes are made. -const int kRows = 2; -} // namespace - -@interface ContentWidgetView () - -// The number of icons to show per row. -@property(nonatomic, assign) int iconsPerRow; -// The first row of sites. -@property(nonatomic, strong) UIView* firstRow; -// The second row of sites. -@property(nonatomic, strong) UIView* secondRow; -// The height used in the compact display mode. -@property(nonatomic) CGFloat compactHeight; -// The first row's height constraint. Set its constant to modify the first row's -// height. -@property(nonatomic, strong) NSLayoutConstraint* firstRowHeightConstraint; -// Whether the second row of sites should be shown. False if there are no sites -// to show in that row. -@property(nonatomic, readonly) BOOL shouldShowSecondRow; -// The number of sites to display. -@property(nonatomic, assign) int siteCount; -// The most visited tile views; tiles remain in this array even when hidden. -@property(nonatomic, strong) NSArray<MostVisitedTileView*>* mostVisitedTiles; -// The delegate for actions in the view. -@property(nonatomic, weak) id<ContentWidgetViewDelegate> delegate; - -// Sets up the widget UI in compact mode. -- (void)createUI; - -// Arranges `tiles` horizontally in a view and returns the view. -- (UIView*)createRowFromTiles:(NSArray<MostVisitedTileView*>*)tiles; - -// Returns the height to use for the first row, depending on the display mode. -- (CGFloat)firstRowHeight:(BOOL)compact; - -// Returns the height to use for the second row (can be 0 if the row should not -// be shown). -- (CGFloat)secondRowHeight; - -// Opens the `mostVisitedTile`'s url, using the delegate. -- (void)openURLFromMostVisited:(MostVisitedTileView*)mostVisitedTile; - -@end - -@implementation ContentWidgetView - -@synthesize iconsPerRow = _iconsPerRow; -@synthesize firstRow = _firstRow; -@synthesize secondRow = _secondRow; -@synthesize compactHeight = _compactHeight; -@synthesize firstRowHeightConstraint = _firstRowHeightConstraint; -@synthesize siteCount = _siteCount; -@synthesize mostVisitedTiles = _mostVisitedTiles; -@synthesize delegate = _delegate; - -- (instancetype)initWithDelegate:(id<ContentWidgetViewDelegate>)delegate - compactHeight:(CGFloat)compactHeight - width:(CGFloat)width { - self = [super initWithFrame:CGRectZero]; - if (self) { - DCHECK(delegate); - _delegate = delegate; - _compactHeight = compactHeight; - - // At least 1 tile and at most 4. - _iconsPerRow = - MIN(4, MAX(width / (MostVisitedTileView.tileWidth + kTileSpacing), 1)); - - [self createUI]; - } - return self; -} - -#pragma mark - properties - -- (CGFloat)widgetExpandedHeight { - return [self firstRowHeight:NO] + [self secondRowHeight]; -} - -- (BOOL)shouldShowSecondRow { - return self.siteCount > self.iconsPerRow; -} - -#pragma mark - UI creation - -- (void)createUI { - NSMutableArray* tiles = [[NSMutableArray alloc] init]; - for (int i = 0; i < _iconsPerRow * kRows; i++) { - [tiles addObject:[[MostVisitedTileView alloc] init]]; - } - _mostVisitedTiles = tiles; - - _firstRow = [self - createRowFromTiles:[tiles - subarrayWithRange:NSMakeRange(0, _iconsPerRow)]]; - _secondRow = [self - createRowFromTiles:[tiles subarrayWithRange:NSMakeRange(_iconsPerRow, - _iconsPerRow)]]; - - [self addSubview:_firstRow]; - [self addSubview:_secondRow]; - - _firstRowHeightConstraint = [_firstRow.heightAnchor - constraintEqualToConstant:[self firstRowHeight:YES]]; - - [NSLayoutConstraint activateConstraints:@[ - [_firstRow.topAnchor constraintEqualToAnchor:self.topAnchor], - [_secondRow.topAnchor constraintEqualToAnchor:_firstRow.bottomAnchor], - [self.leadingAnchor constraintEqualToAnchor:_firstRow.leadingAnchor], - [self.leadingAnchor constraintEqualToAnchor:_secondRow.leadingAnchor], - [self.trailingAnchor constraintEqualToAnchor:_firstRow.trailingAnchor], - [self.trailingAnchor constraintEqualToAnchor:_secondRow.trailingAnchor], - _firstRowHeightConstraint, - ]]; -} - -- (UIView*)createRowFromTiles:(NSArray<MostVisitedTileView*>*)tiles { - UIStackView* stack = [[UIStackView alloc] initWithArrangedSubviews:tiles]; - stack.translatesAutoresizingMaskIntoConstraints = NO; - stack.axis = UILayoutConstraintAxisHorizontal; - stack.alignment = UIStackViewAlignmentTop; - stack.distribution = UIStackViewDistributionEqualSpacing; - stack.layoutMargins = UIEdgeInsetsZero; - stack.spacing = kTileSpacing; - stack.layoutMarginsRelativeArrangement = YES; - - UIView* container = [[UIView alloc] initWithFrame:CGRectZero]; - container.translatesAutoresizingMaskIntoConstraints = NO; - [container addSubview:stack]; - - [NSLayoutConstraint activateConstraints:@[ - [stack.centerYAnchor constraintEqualToAnchor:container.centerYAnchor], - [stack.centerXAnchor constraintEqualToAnchor:container.centerXAnchor], - [container.heightAnchor constraintGreaterThanOrEqualToConstant:kTileHeight], - ]]; - - return container; -} - -- (void)updateSites:(NSDictionary<NSURL*, NTPTile*>*)sites { - for (NTPTile* site in sites.objectEnumerator) { - // If the site's position is > the # of tiles shown, there is no tile to - // update. Remember that sites is a dictionary and is not ordered by - // position. - if (static_cast<NSUInteger>(site.position) >= self.mostVisitedTiles.count) { - continue; - } - MostVisitedTileView* tileView = self.mostVisitedTiles[site.position]; - tileView.titleLabel.text = site.title; - tileView.URL = site.URL; - - FaviconAttributes* attributes = nil; - - if (site.faviconFileName) { - NSURL* filePath = [app_group::ContentWidgetFaviconsFolder() - URLByAppendingPathComponent:site.faviconFileName]; - UIImage* faviconImage = [UIImage imageWithContentsOfFile:filePath.path]; - if (faviconImage) { - attributes = [FaviconAttributes attributesWithImage:faviconImage]; - } - } - if (!attributes) { - if ([site.fallbackMonogram length] == 0) { - // Something bad happened when saving the icon. Switch to best effort to - // show something to the user. - site.fallbackMonogram = @""; - } - if (!site.fallbackTextColor || !site.fallbackBackgroundColor) { - // Something bad happened when saving the icon. Switch to best effort to - // show something to the user. - // kDefaultTextColor = SK_ColorWHITE; - site.fallbackTextColor = UIColor.whiteColor; - // kDefaultBackgroundColor = SkColorSetRGB(0x78, 0x78, 0x78); - site.fallbackBackgroundColor = [UIColor colorWithRed:0x78 / 255.0f - green:0x78 / 255.0f - blue:0x78 / 255.0f - alpha:1]; - site.fallbackIsDefaultColor = YES; - } - attributes = [FaviconAttributes - attributesWithMonogram:site.fallbackMonogram - textColor:site.fallbackTextColor - backgroundColor:site.fallbackBackgroundColor - defaultBackgroundColor:site.fallbackIsDefaultColor]; - } - [tileView.faviconView configureWithAttributes:attributes]; - tileView.alpha = 1; - tileView.userInteractionEnabled = YES; - [tileView addTarget:self - action:@selector(openURLFromMostVisited:) - forControlEvents:UIControlEventTouchUpInside]; - tileView.accessibilityLabel = site.title; - } - - self.siteCount = sites.count; - [self hideEmptyTiles]; -} - -- (void)openURLFromMostVisited:(MostVisitedTileView*)mostVisitedTile { - [self.delegate openURL:mostVisitedTile.URL]; -} - -- (void)hideEmptyTiles { - for (int i = self.siteCount; i < kRows * self.iconsPerRow; i++) { - self.mostVisitedTiles[i].alpha = 0; - self.mostVisitedTiles[i].userInteractionEnabled = NO; - } -} - -- (CGFloat)firstRowHeight:(BOOL)compact { - if (compact) { - return self.compactHeight; - } - - CGFloat firstRowHeight = kTileHeight + kRows * kTileSpacing; - CGFloat secondRowHeight = [self secondRowHeight]; - CGFloat totalHeight = firstRowHeight + secondRowHeight; - if (totalHeight > self.compactHeight) { - return firstRowHeight; - } - - // The expanded height should be strictly greater than compactHeight, - // otherwise iOS does not update the UI correctly. - return self.compactHeight - secondRowHeight + 1; -} - -- (CGFloat)secondRowHeight { - return self.shouldShowSecondRow ? kTileHeight + kTileSpacing : 0; -} - -- (BOOL)sitesFitSingleRow { - return self.iconsPerRow >= self.siteCount; -} - -#pragma mark - ContentWidgetView - -- (void)showMode:(BOOL)compact { - self.firstRowHeightConstraint.constant = [self firstRowHeight:compact]; -} - -@end
diff --git a/ios/chrome/content_widget_extension/content_widget_view_controller.h b/ios/chrome/content_widget_extension/content_widget_view_controller.h index 0642dfb..abc3b9bd 100644 --- a/ios/chrome/content_widget_extension/content_widget_view_controller.h +++ b/ios/chrome/content_widget_extension/content_widget_view_controller.h
@@ -9,7 +9,6 @@ #import <UIKit/UIKit.h> @interface ContentWidgetViewController : UIViewController<NCWidgetProviding> - @end #endif // IOS_CHROME_CONTENT_WIDGET_EXTENSION_CONTENT_WIDGET_VIEW_CONTROLLER_H_
diff --git a/ios/chrome/content_widget_extension/content_widget_view_controller.mm b/ios/chrome/content_widget_extension/content_widget_view_controller.mm index 16a83d6..a9a6a79 100644 --- a/ios/chrome/content_widget_extension/content_widget_view_controller.mm +++ b/ios/chrome/content_widget_extension/content_widget_view_controller.mm
@@ -6,53 +6,17 @@ #import "base/apple/foundation_util.h" #import "base/strings/sys_string_conversions.h" -#import "ios/chrome/common/app_group/app_group_command.h" -#import "ios/chrome/common/app_group/app_group_constants.h" -#import "ios/chrome/common/app_group/app_group_metrics.h" #import "ios/chrome/common/crash_report/crash_helper.h" -#import "ios/chrome/common/ntp_tile/ntp_tile.h" #import "ios/chrome/common/ui/util/constraints_ui_util.h" -#import "ios/chrome/content_widget_extension/content_widget_view.h" -#import "ios/chrome/content_widget_extension/most_visited_tile_view.h" namespace { -// Using GURL in the extension is not wanted as it includes ICU which makes the -// extension binary much larger; therefore, ios/chrome/common/x_callback_url.h -// cannot be used. This class makes a very basic use of x-callback-url, so no -// full implementation is required. -NSString* const kXCallbackURLHost = @"x-callback-url"; +// This constant indicate the leading space between the current view and the +// content. +const CGFloat kLeadingAnchorConstant = 10; } // namespace -@interface ContentWidgetViewController ()<ContentWidgetViewDelegate> -@property(nonatomic, strong) NSDictionary<NSURL*, NTPTile*>* sites; -@property(nonatomic, weak) ContentWidgetView* widgetView; -@property(nonatomic, readonly) BOOL isCompact; - -// Updates the widget with latest data. Returns whether any visual updates -// occurred. -- (BOOL)updateWidget; -// Expand the widget. -- (void)setExpanded:(CGSize)maxSize; -// Register a display of the widget in the app_group NSUserDefaults. -// Metrics on the widget usage will be sent (if enabled) on the next Chrome -// startup. -- (void)registerWidgetDisplay; -@end - @implementation ContentWidgetViewController -@synthesize sites = _sites; -@synthesize widgetView = _widgetView; - -#pragma mark - properties - -- (BOOL)isCompact { - DCHECK(self.extensionContext); - return [self.extensionContext widgetActiveDisplayMode] == - NCWidgetDisplayModeCompact; - return NO; -} - #pragma mark - UIViewController + (void)initialize { @@ -63,129 +27,37 @@ - (void)viewDidLoad { [super viewDidLoad]; - DCHECK(self.extensionContext); - CGFloat height = - [self.extensionContext - widgetMaximumSizeForDisplayMode:NCWidgetDisplayModeCompact] - .height; + self.view.translatesAutoresizingMaskIntoConstraints = NO; - CGFloat width = - [self.extensionContext - widgetMaximumSizeForDisplayMode:NCWidgetDisplayModeCompact] - .width; + UIVibrancyEffect* labelEffect = nil; + labelEffect = [UIVibrancyEffect + widgetEffectForVibrancyStyle:UIVibrancyEffectStyleSecondaryLabel]; - // A local variable is necessary here as the property is declared weak and the - // object would be deallocated before being retained by the addSubview call. - ContentWidgetView* widgetView = - [[ContentWidgetView alloc] initWithDelegate:self - compactHeight:height - width:width]; - self.widgetView = widgetView; - [self.view addSubview:self.widgetView]; + UIVisualEffectView* titleLabelEffectView = + [[UIVisualEffectView alloc] initWithEffect:labelEffect]; + titleLabelEffectView.translatesAutoresizingMaskIntoConstraints = NO; + [self.view addSubview:titleLabelEffectView]; + AddSameConstraints(self.view, titleLabelEffectView); - self.extensionContext.widgetLargestAvailableDisplayMode = - NCWidgetDisplayModeCompact; + UILabel* updateExtensionLabel = [[UILabel alloc] initWithFrame:CGRectZero]; + updateExtensionLabel.font = + [UIFont preferredFontForTextStyle:UIFontTextStyleFootnote]; + updateExtensionLabel.textAlignment = NSTextAlignmentCenter; + updateExtensionLabel.numberOfLines = 0; + updateExtensionLabel.userInteractionEnabled = NO; + updateExtensionLabel.text = + NSLocalizedString(@"IDS_IOS_CONTENT_WIDGET_LABEL", @""); + updateExtensionLabel.translatesAutoresizingMaskIntoConstraints = NO; + [titleLabelEffectView.contentView addSubview:updateExtensionLabel]; - self.widgetView.translatesAutoresizingMaskIntoConstraints = NO; - AddSameConstraints(self.widgetView, self.view); + [NSLayoutConstraint activateConstraints:@[ + [updateExtensionLabel.centerXAnchor + constraintEqualToAnchor:self.view.centerXAnchor], + [updateExtensionLabel.centerYAnchor + constraintEqualToAnchor:self.view.centerYAnchor], + [updateExtensionLabel.leadingAnchor + constraintGreaterThanOrEqualToAnchor:self.view.leadingAnchor + constant:kLeadingAnchorConstant] + ]]; } - -- (void)viewWillAppear:(BOOL)animated { - [super viewWillAppear:animated]; - [self registerWidgetDisplay]; - - // `widgetActiveDisplayMode` does not contain a valid value in viewDidLoad. By - // the time viewWillAppear is called, it is correct, so set the mode here. - [self.widgetView showMode:self.isCompact]; -} - -- (void)widgetPerformUpdateWithCompletionHandler: - (void (^)(NCUpdateResult))completionHandler { - completionHandler([self updateWidget] ? NCUpdateResultNewData - : NCUpdateResultNoData); -} - -- (void)viewWillTransitionToSize:(CGSize)size - withTransitionCoordinator: - (id<UIViewControllerTransitionCoordinator>)coordinator { - [super viewWillTransitionToSize:size withTransitionCoordinator:coordinator]; - - [coordinator - animateAlongsideTransition:^( - id<UIViewControllerTransitionCoordinatorContext> _Nonnull context) { - [self.widgetView showMode:self.isCompact]; - [self.widgetView layoutIfNeeded]; - } - completion:nil]; -} - -#pragma mark - NCWidgetProviding - -- (void)widgetActiveDisplayModeDidChange:(NCWidgetDisplayMode)activeDisplayMode - withMaximumSize:(CGSize)maxSize { - switch (activeDisplayMode) { - case NCWidgetDisplayModeCompact: - self.preferredContentSize = maxSize; - break; - case NCWidgetDisplayModeExpanded: - [self setExpanded:maxSize]; - break; - } -} - -#pragma mark - internal - -- (void)setExpanded:(CGSize)maxSize { - [self updateWidget]; - self.preferredContentSize = - CGSizeMake(maxSize.width, - MIN([self.widgetView widgetExpandedHeight], maxSize.height)); -} - -- (BOOL)updateWidget { - NSUserDefaults* sharedDefaults = app_group::GetGroupUserDefaults(); - NSData* data = [sharedDefaults objectForKey:app_group::kSuggestedItems]; - NSError* error = nil; - NSKeyedUnarchiver* unarchiver = - [[NSKeyedUnarchiver alloc] initForReadingFromData:data error:&error]; - - if (!unarchiver || error) { - DLOG(WARNING) << "Error creating unarchiver for widget extension: " - << base::SysNSStringToUTF8([error description]); - return NO; - } - - unarchiver.requiresSecureCoding = NO; - - NSDictionary<NSURL*, NTPTile*>* newSites = - [unarchiver decodeObjectForKey:NSKeyedArchiveRootObjectKey]; - if ([newSites isEqualToDictionary:self.sites]) { - return NO; - } - self.sites = newSites; - [self.widgetView updateSites:self.sites]; - self.extensionContext.widgetLargestAvailableDisplayMode = - [self.widgetView sitesFitSingleRow] ? NCWidgetDisplayModeCompact - : NCWidgetDisplayModeExpanded; - return YES; -} - -- (void)registerWidgetDisplay { - NSUserDefaults* sharedDefaults = app_group::GetGroupUserDefaults(); - NSInteger numberOfDisplay = - [sharedDefaults integerForKey:app_group::kContentExtensionDisplayCount]; - [sharedDefaults setInteger:numberOfDisplay + 1 - forKey:app_group::kContentExtensionDisplayCount]; -} - -- (void)openURL:(NSURL*)URL { - AppGroupCommand* command = [[AppGroupCommand alloc] - initWithSourceApp:app_group::kOpenCommandSourceContentExtension - URLOpenerBlock:^(NSURL* openURL) { - [self.extensionContext openURL:openURL completionHandler:nil]; - }]; - [command prepareToOpenURL:URL]; - [command executeInApp]; -} - @end
diff --git a/ios/chrome/content_widget_extension/most_visited_tile_view.h b/ios/chrome/content_widget_extension/most_visited_tile_view.h deleted file mode 100644 index 9969556b..0000000 --- a/ios/chrome/content_widget_extension/most_visited_tile_view.h +++ /dev/null
@@ -1,37 +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 IOS_CHROME_CONTENT_WIDGET_EXTENSION_MOST_VISITED_TILE_VIEW_H_ -#define IOS_CHROME_CONTENT_WIDGET_EXTENSION_MOST_VISITED_TILE_VIEW_H_ - -#import <UIKit/UIKit.h> - -#import "ios/chrome/common/ui/elements/highlight_button.h" - -@class FaviconView; - -// View to display a Most Visited tile based on the suggestion. -// It displays the favicon for this Most Visited suggestion and its title. -@interface MostVisitedTileView : HighlightButton - -// Returns the fixed width of a tile. -+ (CGFloat)tileWidth; - -// Designated initializer. -- (nonnull instancetype)init NS_DESIGNATED_INITIALIZER; -- (nonnull instancetype)initWithFrame:(CGRect)frame NS_UNAVAILABLE; -- (nonnull instancetype)initWithCoder:(nonnull NSCoder*)aDecoder NS_UNAVAILABLE; - -// FaviconView displaying the favicon. -@property(nonatomic, strong, readonly, nonnull) FaviconView* faviconView; - -// Title of the Most Visited. -@property(nonatomic, strong, readonly, nonnull) UILabel* titleLabel; - -// URL of the Most Visited. -@property(nonatomic, strong, nullable) NSURL* URL; - -@end - -#endif // IOS_CHROME_CONTENT_WIDGET_EXTENSION_MOST_VISITED_TILE_VIEW_H_
diff --git a/ios/chrome/content_widget_extension/most_visited_tile_view.mm b/ios/chrome/content_widget_extension/most_visited_tile_view.mm deleted file mode 100644 index 7bf144b..0000000 --- a/ios/chrome/content_widget_extension/most_visited_tile_view.mm +++ /dev/null
@@ -1,84 +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. - -#import "ios/chrome/content_widget_extension/most_visited_tile_view.h" - -#import <NotificationCenter/NotificationCenter.h> - -#import "base/check.h" -#import "ios/chrome/common/ui/favicon/favicon_view.h" -#import "ios/chrome/common/ui/util/constraints_ui_util.h" - -namespace { -const NSInteger kLabelNumLines = 2; -const CGFloat kFaviconSize = 48; -const CGFloat kSpaceFaviconTitle = 8; - -// Width of a tile. -const CGFloat kTileWidth = 73; -} - -@implementation MostVisitedTileView - -@synthesize titleLabel = _titleLabel; - -#pragma mark - Public - -+ (CGFloat)tileWidth { - return kTileWidth; -} - -- (instancetype)init { - self = [super initWithFrame:CGRectZero]; - if (self) { - UIVibrancyEffect* labelEffect = nil; - labelEffect = [UIVibrancyEffect - widgetEffectForVibrancyStyle:UIVibrancyEffectStyleSecondaryLabel]; - DCHECK(labelEffect); - - UIVisualEffectView* titleLabelEffectView = - [[UIVisualEffectView alloc] initWithEffect:labelEffect]; - titleLabelEffectView.translatesAutoresizingMaskIntoConstraints = NO; - - _titleLabel = [[UILabel alloc] initWithFrame:CGRectZero]; - _titleLabel.font = - [UIFont preferredFontForTextStyle:UIFontTextStyleCaption2]; - _titleLabel.textAlignment = NSTextAlignmentCenter; - _titleLabel.isAccessibilityElement = NO; - _titleLabel.numberOfLines = kLabelNumLines; - _titleLabel.translatesAutoresizingMaskIntoConstraints = NO; - [titleLabelEffectView.contentView addSubview:_titleLabel]; - AddSameConstraints(titleLabelEffectView, _titleLabel); - - _faviconView = [[FaviconView alloc] init]; - _faviconView.isAccessibilityElement = NO; - _faviconView.font = - [UIFont preferredFontForTextStyle:UIFontTextStyleHeadline]; - _faviconView.translatesAutoresizingMaskIntoConstraints = NO; - - UIStackView* stack = [[UIStackView alloc] - initWithArrangedSubviews:@[ _faviconView, titleLabelEffectView ]]; - stack.axis = UILayoutConstraintAxisVertical; - stack.spacing = kSpaceFaviconTitle; - stack.alignment = UIStackViewAlignmentCenter; - stack.translatesAutoresizingMaskIntoConstraints = NO; - stack.isAccessibilityElement = NO; - stack.userInteractionEnabled = NO; - [self addSubview:stack]; - AddSameConstraints(self, stack); - - [NSLayoutConstraint activateConstraints:@[ - [stack.widthAnchor constraintEqualToConstant:kTileWidth], - [_faviconView.widthAnchor constraintEqualToConstant:kFaviconSize], - [_faviconView.heightAnchor constraintEqualToConstant:kFaviconSize], - ]]; - - self.translatesAutoresizingMaskIntoConstraints = NO; - - self.highlightableViews = @[ _faviconView, _titleLabel ]; - } - return self; -} - -@end
diff --git a/ios/chrome/content_widget_extension/strings/ios_content_widget_extension_chromium_strings.grd b/ios/chrome/content_widget_extension/strings/ios_content_widget_extension_chromium_strings.grd index a8ca60ad..d50707d 100644 --- a/ios/chrome/content_widget_extension/strings/ios_content_widget_extension_chromium_strings.grd +++ b/ios/chrome/content_widget_extension/strings/ios_content_widget_extension_chromium_strings.grd
@@ -193,6 +193,9 @@ <message name="IDS_IOS_CONTENT_WIDGET_TITLE" desc="Title of the widget."> Chromium - Suggested Sites </message> + <message name="IDS_IOS_CONTENT_WIDGET_LABEL" desc="Label of the widget. This is a message to indicate the deprecation of the extension."> + To keep using this widget, at the bottom of the screen, tap Edit, then tap +. Go to Chromium and select Chromium Shortcuts. + </message> </messages> </release> </grit>
diff --git a/ios/chrome/content_widget_extension/strings/ios_content_widget_extension_chromium_strings_grd/IDS_IOS_CONTENT_WIDGET_LABEL.png.sha1 b/ios/chrome/content_widget_extension/strings/ios_content_widget_extension_chromium_strings_grd/IDS_IOS_CONTENT_WIDGET_LABEL.png.sha1 new file mode 100644 index 0000000..ad770c26 --- /dev/null +++ b/ios/chrome/content_widget_extension/strings/ios_content_widget_extension_chromium_strings_grd/IDS_IOS_CONTENT_WIDGET_LABEL.png.sha1
@@ -0,0 +1 @@ +464bee8c92311e7181030740593dc937e751d923 \ No newline at end of file
diff --git a/ios/chrome/content_widget_extension/strings/ios_content_widget_extension_google_chrome_strings.grd b/ios/chrome/content_widget_extension/strings/ios_content_widget_extension_google_chrome_strings.grd index 74a780dc..2504f5cb 100644 --- a/ios/chrome/content_widget_extension/strings/ios_content_widget_extension_google_chrome_strings.grd +++ b/ios/chrome/content_widget_extension/strings/ios_content_widget_extension_google_chrome_strings.grd
@@ -193,6 +193,9 @@ <message name="IDS_IOS_CONTENT_WIDGET_TITLE" desc="Title of the widget."> Chrome - Suggested Sites </message> + <message name="IDS_IOS_CONTENT_WIDGET_LABEL" desc="Label of the widget. This is a message to indicate the deprecation of the extension."> + To keep using this widget, at the bottom of the screen, tap Edit, then tap +. Go to Chrome and select Chrome Shortcuts. + </message> </messages> </release> </grit>
diff --git a/ios/chrome/content_widget_extension/strings/ios_content_widget_extension_google_chrome_strings_grd/IDS_IOS_CONTENT_WIDGET_LABEL.png.sha1 b/ios/chrome/content_widget_extension/strings/ios_content_widget_extension_google_chrome_strings_grd/IDS_IOS_CONTENT_WIDGET_LABEL.png.sha1 new file mode 100644 index 0000000..316b8c9 --- /dev/null +++ b/ios/chrome/content_widget_extension/strings/ios_content_widget_extension_google_chrome_strings_grd/IDS_IOS_CONTENT_WIDGET_LABEL.png.sha1
@@ -0,0 +1 @@ +6e5320ea155cc302b116bb0e7070283f507ca727 \ No newline at end of file
diff --git a/ios/web/navigation/navigation_manager_impl_unittest.mm b/ios/web/navigation/navigation_manager_impl_unittest.mm index f68bf0b..95264f7 100644 --- a/ios/web/navigation/navigation_manager_impl_unittest.mm +++ b/ios/web/navigation/navigation_manager_impl_unittest.mm
@@ -1375,32 +1375,6 @@ EXPECT_EQ(url, pending_item->GetURL()); } -// Tests that ReloadWithUserAgentType does not expose internal URLs. -TEST_F(NavigationManagerTest, ReloadWithUserAgentTypeOnIntenalUrl) { - delegate_.SetWebState(&web_state_); - web_state_.SetLoading(true); - - GURL url = wk_navigation_util::CreateRedirectUrl(GURL("http://www.1.com")); - navigation_manager()->AddPendingItem( - url, Referrer(), ui::PAGE_TRANSITION_TYPED, - NavigationInitiationType::BROWSER_INITIATED, - /*is_post_navigation=*/false, /*is_error_navigation=*/false, - web::HttpsUpgradeType::kNone); - GURL virtual_url("http://www.1.com/virtual"); - navigation_manager() - ->GetPendingItemInCurrentOrRestoredSession() - ->SetVirtualURL(virtual_url); - [mock_wk_list_ setCurrentURL:base::SysUTF8ToNSString(url.spec())]; - navigation_manager()->OnNavigationStarted(GURL("http://www.1.com/virtual")); - - navigation_manager()->ReloadWithUserAgentType(UserAgentType::DESKTOP); - - NavigationItem* pending_item = - navigation_manager()->GetPendingItemInCurrentOrRestoredSession(); - EXPECT_EQ(url, pending_item->GetURL()); - EXPECT_EQ(virtual_url, pending_item->GetVirtualURL()); -} - // Tests that app-specific URLs are not rewritten for renderer-initiated loads // or reloads unless requested by a page with app-specific url. TEST_F(NavigationManagerTest, RewritingAppSpecificUrls) { @@ -2335,21 +2309,6 @@ web::HttpsUpgradeType::kNone); EXPECT_EQ(original_item0, manager_->GetPendingItem()); - - // Simulate reloading a redirect url. This happens when one restores while - // offline. - GURL redirect_url = wk_navigation_util::CreateRedirectUrl( - manager_->GetPendingItem()->GetURL()); - [mock_wk_list_ setCurrentURL:base::SysUTF8ToNSString(redirect_url.spec()) - backListURLs:nil - forwardListURLs:nil]; - original_item0 = manager_->GetItemAtIndex(0); - manager_->AddPendingItem( - GURL("http://www.0.com"), Referrer(), ui::PAGE_TRANSITION_RELOAD, - web::NavigationInitiationType::BROWSER_INITIATED, - /*is_post_navigation=*/false, /*is_error_navigation=*/false, - web::HttpsUpgradeType::kNone); - EXPECT_EQ(original_item0, manager_->GetPendingItem()); } // Tests that transient URL rewriters are only applied to a new pending item. @@ -2712,19 +2671,6 @@ ASSERT_EQ(nullptr, manager_->GetPendingItem()); } -// Tests that the virtual URL of a restore_session redirect item is updated to -// the target URL. -TEST_F(NavigationManagerTest, HideInternalRedirectUrl) { - GURL target_url = GURL("http://www.1.com?query=special%26chars"); - GURL url = wk_navigation_util::CreateRedirectUrl(target_url); - NSString* url_spec = base::SysUTF8ToNSString(url.spec()); - [mock_wk_list_ setCurrentURL:url_spec]; - NavigationItem* item = manager_->GetItemAtIndex(0); - ASSERT_TRUE(item); - EXPECT_EQ(target_url, item->GetVirtualURL()); - EXPECT_EQ(url, item->GetURL()); -} - // Tests that all NavigationManager APIs return reasonable values in the Empty // Window Open Navigation edge case. See comments in header file for details. TEST_F(NavigationManagerTest, EmptyWindowOpenNavigation) { @@ -2835,11 +2781,6 @@ ASSERT_EQ(url2_, manager_->GetItemAtIndex(2)->GetURL()); } - NSString* CreateRedirectUrlForWKList(GURL url) { - GURL redirect_url = wk_navigation_util::CreateRedirectUrl(url); - return base::SysUTF8ToNSString(redirect_url.spec()); - } - GURL url0_; GURL url1_; GURL url2_; @@ -2984,18 +2925,6 @@ histogram_tester_.ExpectBucketCount(kRestoreNavigationItemCount, 3, 1); } -// Tests that detaching placeholder urls are cleaned before being cached. -TEST_F(NavigationManagerDetachedModeTest, CachedPlaceholders) { - [mock_wk_list_ setCurrentURL:CreateRedirectUrlForWKList(url1_) - backListURLs:@[ CreateRedirectUrlForWKList(url0_) ] - forwardListURLs:@[ CreateRedirectUrlForWKList(url2_) ]]; - manager_->DetachFromWebView(); - - EXPECT_EQ(url0_, manager_->GetNavigationItemImplAtIndex(0)->GetURL()); - EXPECT_EQ(url1_, manager_->GetNavigationItemImplAtIndex(1)->GetURL()); - EXPECT_EQ(url2_, manager_->GetNavigationItemImplAtIndex(2)->GetURL()); -} - // Tests that pending item is set to serializable when appropriate. TEST_F(NavigationManagerDetachedModeTest, NotSerializable) { manager_->AddPendingItem(
diff --git a/ios/web/navigation/wk_navigation_util.h b/ios/web/navigation/wk_navigation_util.h index eb50422..d01c9fa8 100644 --- a/ios/web/navigation/wk_navigation_util.h +++ b/ios/web/navigation/wk_navigation_util.h
@@ -79,14 +79,6 @@ bool IsRestoreSessionUrl(const GURL& url); bool IsRestoreSessionUrl(NSURL* url); -// Creates a restore_session.html URL that encodes the specified `target_url` in -// the URL fragment with a "targetUrl=" prefix. When this URL is loaded in the -// web view, it executes a client-side redirect to `target_url`. This results in -// a new navigation entry and prunes forward navigation history. This URL is -// used by NavigationManagerImpl to reload a page with user agent override, -// as reloading `target_url` directly doesn't create a new navigation entry. -GURL CreateRedirectUrl(const GURL& target_url); - // Extracts the URL encoded in the URL fragment of `restore_session_url` to // `target_url` and returns true. If the URL fragment does not have a // "targetUrl=" prefix, returns false.
diff --git a/ios/web/navigation/wk_navigation_util.mm b/ios/web/navigation/wk_navigation_util.mm index e1d5cb6f0..e151e380 100644 --- a/ios/web/navigation/wk_navigation_util.mm +++ b/ios/web/navigation/wk_navigation_util.mm
@@ -135,15 +135,6 @@ GetRestoreSessionBaseUrl().path())]; } -GURL CreateRedirectUrl(const GURL& target_url) { - GURL::Replacements replacements; - std::string ref = - kRestoreSessionTargetUrlHashPrefix + - base::EscapeQueryParamValue(target_url.spec(), false /* use_plus */); - replacements.SetRefStr(ref); - return GetRestoreSessionBaseUrl().ReplaceComponents(replacements); -} - bool ExtractTargetURL(const GURL& restore_session_url, GURL* target_url) { DCHECK(IsRestoreSessionUrl(restore_session_url)) << restore_session_url.possibly_invalid_spec()
diff --git a/ios/web/navigation/wk_navigation_util_unittest.mm b/ios/web/navigation/wk_navigation_util_unittest.mm index f274df19..b74e8e8 100644 --- a/ios/web/navigation/wk_navigation_util_unittest.mm +++ b/ios/web/navigation/wk_navigation_util_unittest.mm
@@ -334,18 +334,6 @@ EXPECT_FALSE(IsRestoreSessionUrl([NSURL URLWithString:@"http://www.1.com"])); } -// Tests that CreateRedirectUrl and ExtractTargetURL used back-to-back is an -// identity transformation. -TEST_F(WKNavigationUtilTest, CreateAndExtractTargetURL) { - GURL target_url = GURL("http://www.1.com?query=special%26chars"); - GURL url = CreateRedirectUrl(target_url); - ASSERT_TRUE(url.SchemeIsFile()); - - GURL extracted_url; - ASSERT_TRUE(ExtractTargetURL(url, &extracted_url)); - EXPECT_EQ(target_url, extracted_url); -} - // Tests that app specific urls and non-placeholder about: urls do not need a // user agent type, but normal urls and placeholders do. TEST_F(WKNavigationUtilTest, URLNeedsUserAgentType) {
diff --git a/ios/web/web_state/web_state_observer_inttest.mm b/ios/web/web_state/web_state_observer_inttest.mm index bcafe03e..e4f7b08 100644 --- a/ios/web/web_state/web_state_observer_inttest.mm +++ b/ios/web/web_state/web_state_observer_inttest.mm
@@ -64,7 +64,6 @@ namespace { using base::test::RunOnceCallback; -using wk_navigation_util::CreateRedirectUrl; using ::testing::WithArgs; const char kExpectedMimeType[] = "text/html"; @@ -2717,141 +2716,6 @@ ASSERT_TRUE(LoadUrl(url)); } -// Tests callbacks for restoring session and subsequently going back to -// about:blank. -TEST_F(WebStateObserverTest, RestoreSessionOnline) { - if (@available(iOS 15, *)) { - // The bulk of this test is for managing the various client side redirects - // in legacy session restore, which is now deprecated in iOS15. - return; - } - // Create a session of 3 items. Current item is at index 1. - const GURL url0("about:blank"); - auto item0 = std::make_unique<NavigationItemImpl>(); - item0->SetURL(url0); - - const GURL url1 = test_server_->GetURL("/echo?1"); - auto item1 = std::make_unique<NavigationItemImpl>(); - item1->SetURL(url1); - - const GURL url2 = test_server_->GetURL("/echo?2"); - auto item2 = std::make_unique<NavigationItemImpl>(); - item2->SetURL(url2); - - __block std::vector<std::unique_ptr<NavigationItem>> restored_items; - restored_items.push_back(std::move(item0)); - restored_items.push_back(std::move(item1)); - restored_items.push_back(std::move(item2)); - - const WebStatePolicyDecider::ResponseInfo expected_response_info( - /*for_main_frame=*/true); - - // Initiate session restoration. - - EXPECT_CALL(observer_, DidStartLoading(web_state())); - - EXPECT_CALL(*decider_, MockShouldAllowRequest(_, _, _)) - .WillOnce( - RunOnceCallback<2>(WebStatePolicyDecider::PolicyDecision::Allow())); - EXPECT_CALL(*decider_, ShouldAllowResponse( - _, ResponseInfoMatch(expected_response_info), _)) - .WillOnce( - RunOnceCallback<2>(WebStatePolicyDecider::PolicyDecision::Allow())); - - // Back/forward state changes due to History API calls during session - // restoration. Called once each for CanGoBack and CanGoForward. - EXPECT_CALL(observer_, DidChangeBackForwardState(web_state())); - - EXPECT_CALL(observer_, DidStopLoading(web_state())); - - EXPECT_CALL(observer_, DidChangeBackForwardState(web_state())); - - // Client-side redirect to restore_session.html?targetUrl=url1. - EXPECT_CALL(*decider_, - MockShouldAllowRequest(URLMatch(CreateRedirectUrl(url1)), _, _)) - .WillOnce( - RunOnceCallback<2>(WebStatePolicyDecider::PolicyDecision::Allow())); - - EXPECT_CALL(observer_, DidStartLoading(web_state())); - - EXPECT_CALL(*decider_, - ShouldAllowResponse(URLMatch(CreateRedirectUrl(url1)), - ResponseInfoMatch(expected_response_info), _)) - .WillOnce( - RunOnceCallback<2>(WebStatePolicyDecider::PolicyDecision::Allow())); - - EXPECT_CALL(observer_, DidStopLoading(web_state())); - - // Client-side redirect to `url1`. - EXPECT_CALL(*decider_, MockShouldAllowRequest(URLMatch(url1), _, _)) - .WillOnce( - RunOnceCallback<2>(WebStatePolicyDecider::PolicyDecision::Allow())); - EXPECT_CALL(observer_, DidStartLoading(web_state())); - - EXPECT_CALL(observer_, DidStartNavigation(web_state(), _)); - EXPECT_CALL(*decider_, - ShouldAllowResponse(URLMatch(url1), - ResponseInfoMatch(expected_response_info), _)) - .WillOnce( - RunOnceCallback<2>(WebStatePolicyDecider::PolicyDecision::Allow())); - - EXPECT_CALL(observer_, DidFinishNavigation(web_state(), _)); - EXPECT_CALL(observer_, DidStopLoading(web_state())); - EXPECT_CALL(observer_, - PageLoaded(web_state(), PageLoadCompletionStatus::SUCCESS)); - - ASSERT_TRUE(ExecuteBlockAndWaitForLoad(url1, ^{ - navigation_manager()->Restore(/*last_committed_item_index=*/1, - std::move(restored_items)); - })); - ASSERT_EQ(url1, navigation_manager()->GetLastCommittedItem()->GetURL()); - EXPECT_EQ(1, navigation_manager()->GetLastCommittedItemIndex()); - ASSERT_EQ(3, navigation_manager()->GetItemCount()); - ASSERT_TRUE(navigation_manager()->CanGoBack()); - ASSERT_TRUE(navigation_manager()->CanGoForward()); - - // Go back to `item0`. - - EXPECT_CALL(observer_, DidStartLoading(web_state())); - // Only CanGoBackward changes state on this navigation. - EXPECT_CALL(observer_, DidChangeBackForwardState(web_state())).Times(1); - - // Load restore_session.html?targetUrl=url0. - EXPECT_CALL(*decider_, - MockShouldAllowRequest(URLMatch(CreateRedirectUrl(url0)), _, _)) - .WillOnce( - RunOnceCallback<2>(WebStatePolicyDecider::PolicyDecision::Allow())); - EXPECT_CALL(*decider_, - ShouldAllowResponse(URLMatch(CreateRedirectUrl(url0)), - ResponseInfoMatch(expected_response_info), _)) - .WillOnce( - RunOnceCallback<2>(WebStatePolicyDecider::PolicyDecision::Allow())); - - EXPECT_CALL(observer_, DidStopLoading(web_state())); - - // Client-side redirect to `url0`. - EXPECT_CALL(*decider_, MockShouldAllowRequest(URLMatch(url0), _, _)) - .WillOnce( - RunOnceCallback<2>(WebStatePolicyDecider::PolicyDecision::Allow())); - - EXPECT_CALL(observer_, DidStartLoading(web_state())); - - EXPECT_CALL(observer_, DidStartNavigation(web_state(), _)); - // No ShouldAllowResponse call because about:blank has no response. - EXPECT_CALL(observer_, DidFinishNavigation(web_state(), _)); - EXPECT_CALL(observer_, DidStopLoading(web_state())); - EXPECT_CALL(observer_, - PageLoaded(web_state(), PageLoadCompletionStatus::SUCCESS)); - - ASSERT_TRUE(ExecuteBlockAndWaitForLoad(url0, ^{ - navigation_manager()->GoBack(); - })); - ASSERT_EQ(url0, navigation_manager()->GetLastCommittedItem()->GetURL()); - EXPECT_EQ(0, navigation_manager()->GetLastCommittedItemIndex()); - ASSERT_TRUE(navigation_manager()->CanGoForward()); - ASSERT_FALSE(navigation_manager()->CanGoBack()); -} - // Tests that if a saved session is provided when creating a new WebState, it is // restored after the first NavigationManager::LoadIfNecessary() call. TEST_F(WebStateObserverTest, RestoredFromHistory) {
diff --git a/ios_internal b/ios_internal index e0b4fdf..f3fb972 160000 --- a/ios_internal +++ b/ios_internal
@@ -1 +1 @@ -Subproject commit e0b4fdf6c25c2e766a86064ae1476068fc9946e0 +Subproject commit f3fb9720ab7fbddc42c8233fbb88995443589444
diff --git a/media/capture/video/linux/v4l2_capture_delegate.cc b/media/capture/video/linux/v4l2_capture_delegate.cc index 5752293..835ecb6 100644 --- a/media/capture/video/linux/v4l2_capture_delegate.cc +++ b/media/capture/video/linux/v4l2_capture_delegate.cc
@@ -4,10 +4,10 @@ #include "media/capture/video/linux/v4l2_capture_delegate.h" +#include <fcntl.h> #include <linux/version.h> #include <linux/videodev2.h> #include <poll.h> -#include <sys/fcntl.h> #include <sys/ioctl.h> #include <sys/mman.h>
diff --git a/media/capture/video/linux/v4l2_capture_delegate_unittest.cc b/media/capture/video/linux/v4l2_capture_delegate_unittest.cc index 956efdb..96d67373 100644 --- a/media/capture/video/linux/v4l2_capture_delegate_unittest.cc +++ b/media/capture/video/linux/v4l2_capture_delegate_unittest.cc
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include <sys/fcntl.h> +#include <fcntl.h> #include <sys/ioctl.h> #include "base/files/file_enumerator.h"
diff --git a/media/capture/video/linux/v4l2_capture_device.h b/media/capture/video/linux/v4l2_capture_device.h index 520a4520..12384c9b8d 100644 --- a/media/capture/video/linux/v4l2_capture_device.h +++ b/media/capture/video/linux/v4l2_capture_device.h
@@ -5,8 +5,8 @@ #ifndef MEDIA_CAPTURE_VIDEO_LINUX_V4L2_CAPTURE_DEVICE_H_ #define MEDIA_CAPTURE_VIDEO_LINUX_V4L2_CAPTURE_DEVICE_H_ +#include <fcntl.h> #include <poll.h> -#include <sys/fcntl.h> #include "base/memory/ref_counted.h" #include "base/memory/scoped_refptr.h"
diff --git a/media/capture/video/linux/v4l2_capture_device_impl.h b/media/capture/video/linux/v4l2_capture_device_impl.h index 7bfc984..e2f6bc15 100644 --- a/media/capture/video/linux/v4l2_capture_device_impl.h +++ b/media/capture/video/linux/v4l2_capture_device_impl.h
@@ -5,8 +5,8 @@ #ifndef MEDIA_CAPTURE_VIDEO_LINUX_V4L2_CAPTURE_DEVICE_IMPL_H_ #define MEDIA_CAPTURE_VIDEO_LINUX_V4L2_CAPTURE_DEVICE_IMPL_H_ +#include <fcntl.h> #include <poll.h> -#include <sys/fcntl.h> #include "media/capture/capture_export.h" #include "media/capture/video/linux/v4l2_capture_device.h"
diff --git a/media/cast/sender/video_bitrate_suggester.cc b/media/cast/sender/video_bitrate_suggester.cc index ad7b4b7..09ba1d35 100644 --- a/media/cast/sender/video_bitrate_suggester.cc +++ b/media/cast/sender/video_bitrate_suggester.cc
@@ -59,23 +59,22 @@ } // We don't want to change the bitrate too frequently in order to give - // things time to adjust, so only adjust every 100 frames (about 3 seconds - // at 30FPS). - constexpr int kWindowSize = 100; + // things time to adjust, so only adjust roughly once a second. + constexpr int kWindowSize = 30; if (number_of_frames_requested_ == kWindowSize) { - constexpr int kBitrateSteps = 8; DCHECK_GE(max_bitrate_, min_bitrate_); - const int adjustment = (max_bitrate_ - min_bitrate_) / kBitrateSteps; + + // We want to be more conservative about increasing the frame rate than + // decreasing it. + constexpr double kIncrease = 1.1; + constexpr double kDecrease = 0.8; // Generally speaking we shouldn't be dropping any frames, so even one is // a bad sign. - if (number_of_frames_dropped_ > 0) { - suggested_max_bitrate_ = - std::max(min_bitrate_, suggested_max_bitrate_ - adjustment); - } else { - suggested_max_bitrate_ = - std::min(max_bitrate_, suggested_max_bitrate_ + adjustment); - } + suggested_max_bitrate_ = + (number_of_frames_dropped_ > 0) + ? std::max<int>(min_bitrate_, suggested_max_bitrate_ * kDecrease) + : std::min<int>(max_bitrate_, suggested_max_bitrate_ * kIncrease); // Reset the recorded frame drops to start a new window. number_of_frames_requested_ = 0;
diff --git a/media/cast/sender/video_bitrate_suggester_unittest.cc b/media/cast/sender/video_bitrate_suggester_unittest.cc index 1e37986..ad47306 100644 --- a/media/cast/sender/video_bitrate_suggester_unittest.cc +++ b/media/cast/sender/video_bitrate_suggester_unittest.cc
@@ -86,19 +86,19 @@ // After a period with multiple frame drops, this should go down. RecordShouldDropNextFrame(true); RecordShouldDropNextFrame(true); - for (int i = 0; i < 99; ++i) { + for (int i = 0; i < 29; ++i) { RecordShouldDropNextFrame(false); } // It should now go down. - EXPECT_EQ(4412500, video_bitrate_suggester().GetSuggestedBitrate()); + EXPECT_EQ(4000000, video_bitrate_suggester().GetSuggestedBitrate()); // It should continue to go down to the minimum as long as frames are being // dropped. - int last_suggestion = 4412500; - for (int i = 0; i < 7; ++i) { + int last_suggestion = 4685120; + for (int i = 0; i < 12; ++i) { RecordShouldDropNextFrame(true); - for (int j = 0; j < 99; ++j) { + for (int j = 0; j < 29; ++j) { RecordShouldDropNextFrame(false); } @@ -113,8 +113,8 @@ // It should increase once we stop dropping frames. last_suggestion = 300000; - for (int i = 0; i < 8; ++i) { - for (int j = 0; j < 100; ++j) { + for (int i = 0; i < 30; ++i) { + for (int j = 0; j < 30; ++j) { RecordShouldDropNextFrame(false); } const int suggestion = video_bitrate_suggester().GetSuggestedBitrate();
diff --git a/media/gpu/v4l2/v4l2_status.h b/media/gpu/v4l2/v4l2_status.h index 94bb712..f8d25b5 100644 --- a/media/gpu/v4l2/v4l2_status.h +++ b/media/gpu/v4l2/v4l2_status.h
@@ -21,7 +21,6 @@ kBadFormat = 8, kFailedToStartStreamQueue = 9, kFailedToDestroyQueueBuffers = 10, - kFailedToSetSecureMode = 11, }; struct V4L2StatusTraits {
diff --git a/media/gpu/v4l2/v4l2_video_decoder.cc b/media/gpu/v4l2/v4l2_video_decoder.cc index 60199619..39f8efc 100644 --- a/media/gpu/v4l2/v4l2_video_decoder.cc +++ b/media/gpu/v4l2/v4l2_video_decoder.cc
@@ -43,7 +43,6 @@ // TODO(jkardatzke): Remove these once they are in linux/videodev2.h. #define V4L2_CID_MPEG_MTK_BASE (0x00990000 | 0x2000) #define V4L2_CID_MPEG_MTK_GET_SECURE_HANDLE (V4L2_CID_MPEG_MTK_BASE + 8) -#define V4L2_CID_MPEG_MTK_SET_SECURE_MODE (V4L2_CID_MPEG_MTK_BASE + 9) namespace media { @@ -403,28 +402,6 @@ return V4L2Status::Codes::kNoDriverSupportForFourcc; } -#if BUILDFLAG(USE_CHROMEOS_PROTECTED_MEDIA) - // Set SVP (secure video pipeline) mode. - struct v4l2_ext_control ctrl; - struct v4l2_ext_controls ctrls; - memset(&ctrls, 0, sizeof(ctrls)); - memset(&ctrl, 0, sizeof(ctrl)); - ctrl.id = V4L2_CID_MPEG_MTK_SET_SECURE_MODE; - ctrl.value = !!cdm_context_ref_ ? 1 : 0; - - ctrls.count = 1; - ctrls.which = V4L2_CTRL_WHICH_CUR_VAL; - ctrls.controls = &ctrl; - - VLOGF(1) << "Setting secure playback mode to: " << ctrl.value; - if (device_->Ioctl(VIDIOC_S_EXT_CTRLS, &ctrls)) { - PLOG(ERROR) << "Failed setting " - << (!!cdm_context_ref_ ? "secure" : "nonsecure") - << " playback mode"; - return V4L2Status::Codes::kFailedToSetSecureMode; - } -#endif // BUILDFLAG(USE_CHROMEOS_PROTECTED_MEDIA) - struct v4l2_capability caps; const __u32 kCapsRequired = V4L2_CAP_VIDEO_M2M_MPLANE | V4L2_CAP_STREAMING; if (device_->Ioctl(VIDIOC_QUERYCAP, &caps) ||
diff --git a/mojo/core/ipcz_driver/transport.cc b/mojo/core/ipcz_driver/transport.cc index 8aded2d3..96d982af 100644 --- a/mojo/core/ipcz_driver/transport.cc +++ b/mojo/core/ipcz_driver/transport.cc
@@ -130,7 +130,10 @@ HandleOwner handle_owner, HandleData& out_handle_data, bool is_remote_process_untrusted) { - DCHECK(handle.is_valid()); + // Duplicating INVALID_HANDLE_VALUE passes a process handle. If you intend to + // do this, you must open a valid process handle, not pass the result of + // GetCurrentProcess(). e.g. https://crbug.com/243339. + CHECK(handle.is_valid()); if (handle_owner == HandleOwner::kSender) { // Nothing to do when sending handles that belong to us. The recipient must // be sufficiently privileged and equipped to duplicate such handles to
diff --git a/mojo/core/platform_handle_in_transit.cc b/mojo/core/platform_handle_in_transit.cc index b30b70e..410cc11 100644 --- a/mojo/core/platform_handle_in_transit.cc +++ b/mojo/core/platform_handle_in_transit.cc
@@ -34,6 +34,11 @@ DcheckIfFileHandleIsUnsafe(handle); } + // Duplicating INVALID_HANDLE_VALUE passes a process handle. If you intend to + // do this, you must open a valid process handle, not pass the result of + // GetCurrentProcess(). e.g. https://crbug.com/243339. + CHECK(handle != INVALID_HANDLE_VALUE); + HANDLE out_handle; BOOL result = ::DuplicateHandle(from_process, handle, to_process, &out_handle, 0, FALSE,
diff --git a/net/base/features.cc b/net/base/features.cc index 24f700b..d974e256 100644 --- a/net/base/features.cc +++ b/net/base/features.cc
@@ -455,4 +455,12 @@ "ThirdPartyPartitionedStorageAllowedByDefault", base::FEATURE_DISABLED_BY_DEFAULT); +BASE_FEATURE(kCookieDeprecationFacilitatedTestingLabels, + "CookieDeprecationFacilitatedTestingLabels", + base::FEATURE_DISABLED_BY_DEFAULT); + +BASE_FEATURE(kPriorityHeader, + "PriorityHeader", + base::FEATURE_DISABLED_BY_DEFAULT); + } // namespace net::features
diff --git a/net/base/features.h b/net/base/features.h index 2d1797d..024744a 100644 --- a/net/base/features.h +++ b/net/base/features.h
@@ -452,6 +452,17 @@ NET_EXPORT BASE_DECLARE_FEATURE(kThirdPartyPartitionedStorageAllowedByDefault); +// Gate access to cookie deprecation API which allows developers to opt in +// server side testing without cookies. This doesn't actually do anything in +// terms of deprecating cookies. +// (See +// https://developer.chrome.com/en/docs/privacy-sandbox/chrome-testing/#mode-a) +NET_EXPORT BASE_DECLARE_FEATURE(kCookieDeprecationFacilitatedTestingLabels); + +// Enables the HTTP extensible priorities "priority" header. +// RFC 9218 +NET_EXPORT BASE_DECLARE_FEATURE(kPriorityHeader); + } // namespace net::features #endif // NET_BASE_FEATURES_H_
diff --git a/net/http/http_network_transaction_unittest.cc b/net/http/http_network_transaction_unittest.cc index a08a997..cfb54d6 100644 --- a/net/http/http_network_transaction_unittest.cc +++ b/net/http/http_network_transaction_unittest.cc
@@ -413,10 +413,10 @@ } // namespace -class HttpNetworkTransactionTest : public PlatformTest, - public WithTaskEnvironment { +class HttpNetworkTransactionTestBase : public PlatformTest, + public WithTaskEnvironment { public: - ~HttpNetworkTransactionTest() override { + ~HttpNetworkTransactionTestBase() override { // Important to restore the per-pool limit first, since the pool limit must // always be greater than group limit, and the tests reduce both limits. ClientSocketPoolManager::set_max_sockets_per_pool( @@ -426,7 +426,7 @@ } protected: - HttpNetworkTransactionTest() + HttpNetworkTransactionTestBase() : WithTaskEnvironment(base::test::TaskEnvironment::TimeSource::MOCK_TIME), dummy_connect_job_params_( nullptr /* client_socket_factory */, @@ -443,6 +443,7 @@ nullptr /* network_quality_estimator */, nullptr /* net_log */, nullptr /* websocket_endpoint_lock_manager */), + spdy_util_(/*use_priority_header=*/true), ssl_(ASYNC, OK), old_max_group_sockets_(ClientSocketPoolManager::max_sockets_per_group( HttpNetworkSession::NORMAL_SOCKET_POOL)), @@ -610,7 +611,7 @@ void CheckErrorIsPassedBack(int error, IoMode mode); base::RepeatingClosure FastForwardByCallback(base::TimeDelta delta) { - return base::BindRepeating(&HttpNetworkTransactionTest::FastForwardBy, + return base::BindRepeating(&HttpNetworkTransactionTestBase::FastForwardBy, base::Unretained(this), delta); } @@ -640,6 +641,27 @@ int old_max_pool_sockets_; }; +class HttpNetworkTransactionTest : public HttpNetworkTransactionTestBase, + public ::testing::WithParamInterface<bool> { + protected: + HttpNetworkTransactionTest() { + if (PriorityHeaderEnabled()) { + feature_list_.InitAndEnableFeature(net::features::kPriorityHeader); + } else { + feature_list_.InitAndDisableFeature(net::features::kPriorityHeader); + } + } + + bool PriorityHeaderEnabled() const { return GetParam(); } + + private: + base::test::ScopedFeatureList feature_list_; +}; + +INSTANTIATE_TEST_SUITE_P(All, + HttpNetworkTransactionTest, + testing::Values(true, false)); + namespace { // Fill |str| with a long header list that consumes >= |size| bytes. @@ -817,12 +839,12 @@ } // namespace -TEST_F(HttpNetworkTransactionTest, Basic) { +TEST_P(HttpNetworkTransactionTest, Basic) { std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_)); HttpNetworkTransaction trans(DEFAULT_PRIORITY, session.get()); } -TEST_F(HttpNetworkTransactionTest, SimpleGET) { +TEST_P(HttpNetworkTransactionTest, SimpleGET) { MockRead data_reads[] = { MockRead("HTTP/1.0 200 OK\r\n\r\n"), MockRead("hello world"), @@ -840,7 +862,7 @@ } // Response with no status line. -TEST_F(HttpNetworkTransactionTest, SimpleGETNoHeaders) { +TEST_P(HttpNetworkTransactionTest, SimpleGETNoHeaders) { MockRead data_reads[] = { MockRead("hello world"), MockRead(SYNCHRONOUS, OK), @@ -854,7 +876,7 @@ } // Response with no status line, and a weird port. Should fail by default. -TEST_F(HttpNetworkTransactionTest, SimpleGETNoHeadersWeirdPort) { +TEST_P(HttpNetworkTransactionTest, SimpleGETNoHeadersWeirdPort) { MockRead data_reads[] = { MockRead("hello world"), MockRead(SYNCHRONOUS, OK), }; @@ -879,7 +901,7 @@ } // Tests that request info can be destroyed after the headers phase is complete. -TEST_F(HttpNetworkTransactionTest, SimpleGETNoReadDestroyRequestInfo) { +TEST_P(HttpNetworkTransactionTest, SimpleGETNoReadDestroyRequestInfo) { std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_)); auto trans = std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get()); @@ -910,7 +932,7 @@ } // Test that a failure in resolving the hostname is retrievable. -TEST_F(HttpNetworkTransactionTest, SimpleGETHostResolutionFailure) { +TEST_P(HttpNetworkTransactionTest, SimpleGETHostResolutionFailure) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("http://www.example.org/"); @@ -936,7 +958,7 @@ // This test verifies that if the transaction fails before even connecting to a // remote endpoint, the ConnectedCallback is never called. -TEST_F(HttpNetworkTransactionTest, ConnectedCallbackNeverCalled) { +TEST_P(HttpNetworkTransactionTest, ConnectedCallbackNeverCalled) { auto resolver = std::make_unique<MockHostResolver>(); resolver->rules()->AddSimulatedTimeoutFailure("bar.test"); session_deps_.host_resolver = std::move(resolver); @@ -959,7 +981,7 @@ // This test verifies that if the ConnectedCallback returns an error, the // entire transaction fails with that error. -TEST_F(HttpNetworkTransactionTest, ConnectedCallbackFailure) { +TEST_P(HttpNetworkTransactionTest, ConnectedCallbackFailure) { // The exact error code does not matter, as long as it is the same one // returned by the transaction overall. ConnectedHandler connected_handler; @@ -986,7 +1008,7 @@ // This test verifies that if the ConnectedCallback returns an error, the // underlying socket is not closed and can be reused by the next transaction. -TEST_F(HttpNetworkTransactionTest, ConnectedCallbackFailureAllowsSocketReuse) { +TEST_P(HttpNetworkTransactionTest, ConnectedCallbackFailureAllowsSocketReuse) { ConnectedHandler connected_handler; connected_handler.set_result(ERR_NOT_IMPLEMENTED); @@ -1037,7 +1059,7 @@ // This test verifies that the ConnectedCallback is called once in the case of // simple requests. -TEST_F(HttpNetworkTransactionTest, ConnectedCallbackCalledOnce) { +TEST_P(HttpNetworkTransactionTest, ConnectedCallbackCalledOnce) { MockRead data_reads[] = { MockRead("HTTP/1.0 200 OK\r\n"), MockRead(SYNCHRONOUS, OK), @@ -1063,7 +1085,7 @@ // This test verifies that the ConnectedCallback is called once more per // authentication challenge. -TEST_F(HttpNetworkTransactionTest, ConnectedCallbackCalledOnEachAuthChallenge) { +TEST_P(HttpNetworkTransactionTest, ConnectedCallbackCalledOnEachAuthChallenge) { ConnectedHandler connected_handler; std::unique_ptr<HttpNetworkSession> session = CreateSession(&session_deps_); auto request = DefaultRequestInfo(); @@ -1110,7 +1132,7 @@ } // This test verifies that the ConnectedCallback is called once more per retry. -TEST_F(HttpNetworkTransactionTest, ConnectedCallbackCalledOnEachRetry) { +TEST_P(HttpNetworkTransactionTest, ConnectedCallbackCalledOnEachRetry) { ConnectedHandler connected_handler; std::unique_ptr<HttpNetworkSession> session = CreateSession(&session_deps_); auto request = DefaultRequestInfo(); @@ -1143,7 +1165,7 @@ EmbeddedHttpServerTransportInfo())); } -TEST_F(HttpNetworkTransactionTest, ConnectedCallbackCalledAsync) { +TEST_P(HttpNetworkTransactionTest, ConnectedCallbackCalledAsync) { MockRead data_reads[] = { MockRead("HTTP/1.0 200 OK\r\n"), MockRead(SYNCHRONOUS, OK), @@ -1168,7 +1190,7 @@ ElementsAre(EmbeddedHttpServerTransportInfo())); } -TEST_F(HttpNetworkTransactionTest, ConnectedCallbackCalledAsyncError) { +TEST_P(HttpNetworkTransactionTest, ConnectedCallbackCalledAsyncError) { MockRead data_reads[] = { MockRead("HTTP/1.0 200 OK\r\n"), MockRead(SYNCHRONOUS, OK), @@ -1195,7 +1217,7 @@ } // Allow up to 4 bytes of junk to precede status line. -TEST_F(HttpNetworkTransactionTest, StatusLineJunk3Bytes) { +TEST_P(HttpNetworkTransactionTest, StatusLineJunk3Bytes) { MockRead data_reads[] = { MockRead("xxxHTTP/1.0 404 Not Found\nServer: blah\n\nDATA"), MockRead(SYNCHRONOUS, OK), @@ -1209,7 +1231,7 @@ } // Allow up to 4 bytes of junk to precede status line. -TEST_F(HttpNetworkTransactionTest, StatusLineJunk4Bytes) { +TEST_P(HttpNetworkTransactionTest, StatusLineJunk4Bytes) { MockRead data_reads[] = { MockRead("\n\nQJHTTP/1.0 404 Not Found\nServer: blah\n\nDATA"), MockRead(SYNCHRONOUS, OK), @@ -1223,7 +1245,7 @@ } // Beyond 4 bytes of slop and it should fail to find a status line. -TEST_F(HttpNetworkTransactionTest, StatusLineJunk5Bytes) { +TEST_P(HttpNetworkTransactionTest, StatusLineJunk5Bytes) { MockRead data_reads[] = { MockRead("xxxxxHTTP/1.1 404 Not Found\nServer: blah"), MockRead(SYNCHRONOUS, OK), @@ -1237,7 +1259,7 @@ } // Same as StatusLineJunk4Bytes, except the read chunks are smaller. -TEST_F(HttpNetworkTransactionTest, StatusLineJunk4Bytes_Slow) { +TEST_P(HttpNetworkTransactionTest, StatusLineJunk4Bytes_Slow) { MockRead data_reads[] = { MockRead("\n"), MockRead("\n"), @@ -1255,7 +1277,7 @@ } // Close the connection before enough bytes to have a status line. -TEST_F(HttpNetworkTransactionTest, StatusLinePartial) { +TEST_P(HttpNetworkTransactionTest, StatusLinePartial) { MockRead data_reads[] = { MockRead("HTT"), MockRead(SYNCHRONOUS, OK), @@ -1271,7 +1293,7 @@ // Simulate a 204 response, lacking a Content-Length header, sent over a // persistent connection. The response should still terminate since a 204 // cannot have a response body. -TEST_F(HttpNetworkTransactionTest, StopsReading204) { +TEST_P(HttpNetworkTransactionTest, StopsReading204) { char junk[] = "junk"; MockRead data_reads[] = { MockRead("HTTP/1.1 204 No Content\r\n\r\n"), @@ -1288,7 +1310,7 @@ } // A simple request using chunked encoding with some extra data after. -TEST_F(HttpNetworkTransactionTest, ChunkedEncoding) { +TEST_P(HttpNetworkTransactionTest, ChunkedEncoding) { std::string final_chunk = "0\r\n\r\n"; std::string extra_data = "HTTP/1.1 200 OK\r\n"; std::string last_read = final_chunk + extra_data; @@ -1312,7 +1334,7 @@ // Next tests deal with http://crbug.com/56344. -TEST_F(HttpNetworkTransactionTest, +TEST_P(HttpNetworkTransactionTest, MultipleContentLengthHeadersNoTransferEncoding) { MockRead data_reads[] = { MockRead("HTTP/1.1 200 OK\r\n"), @@ -1323,7 +1345,7 @@ EXPECT_THAT(out.rv, IsError(ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_LENGTH)); } -TEST_F(HttpNetworkTransactionTest, +TEST_P(HttpNetworkTransactionTest, DuplicateContentLengthHeadersNoTransferEncoding) { MockRead data_reads[] = { MockRead("HTTP/1.1 200 OK\r\n"), @@ -1337,7 +1359,7 @@ EXPECT_EQ("Hello", out.response_data); } -TEST_F(HttpNetworkTransactionTest, +TEST_P(HttpNetworkTransactionTest, ComplexContentLengthHeadersNoTransferEncoding) { // More than 2 dupes. { @@ -1380,7 +1402,7 @@ } } -TEST_F(HttpNetworkTransactionTest, +TEST_P(HttpNetworkTransactionTest, MultipleContentLengthHeadersTransferEncoding) { MockRead data_reads[] = { MockRead("HTTP/1.1 200 OK\r\n"), @@ -1403,7 +1425,7 @@ // Next tests deal with http://crbug.com/98895. // Checks that a single Content-Disposition header results in no error. -TEST_F(HttpNetworkTransactionTest, SingleContentDispositionHeader) { +TEST_P(HttpNetworkTransactionTest, SingleContentDispositionHeader) { MockRead data_reads[] = { MockRead("HTTP/1.1 200 OK\r\n"), MockRead("Content-Disposition: attachment;filename=\"salutations.txt\"r\n"), @@ -1417,7 +1439,7 @@ } // Checks that two identical Content-Disposition headers result in no error. -TEST_F(HttpNetworkTransactionTest, TwoIdenticalContentDispositionHeaders) { +TEST_P(HttpNetworkTransactionTest, TwoIdenticalContentDispositionHeaders) { MockRead data_reads[] = { MockRead("HTTP/1.1 200 OK\r\n"), MockRead("Content-Disposition: attachment;filename=\"greetings.txt\"r\n"), @@ -1432,7 +1454,7 @@ } // Checks that two distinct Content-Disposition headers result in an error. -TEST_F(HttpNetworkTransactionTest, TwoDistinctContentDispositionHeaders) { +TEST_P(HttpNetworkTransactionTest, TwoDistinctContentDispositionHeaders) { MockRead data_reads[] = { MockRead("HTTP/1.1 200 OK\r\n"), MockRead("Content-Disposition: attachment;filename=\"greetings.txt\"r\n"), @@ -1447,7 +1469,7 @@ // Checks that two identical Location headers result in no error. // Also tests Location header behavior. -TEST_F(HttpNetworkTransactionTest, TwoIdenticalLocationHeaders) { +TEST_P(HttpNetworkTransactionTest, TwoIdenticalLocationHeaders) { MockRead data_reads[] = { MockRead("HTTP/1.1 302 Redirect\r\n"), MockRead("Location: http://good.com/\r\n"), @@ -1486,7 +1508,7 @@ } // Checks that two distinct Location headers result in an error. -TEST_F(HttpNetworkTransactionTest, TwoDistinctLocationHeaders) { +TEST_P(HttpNetworkTransactionTest, TwoDistinctLocationHeaders) { MockRead data_reads[] = { MockRead("HTTP/1.1 302 Redirect\r\n"), MockRead("Location: http://good.com/\r\n"), @@ -1500,7 +1522,7 @@ // Do a request using the HEAD method. Verify that we don't try to read the // message body (since HEAD has none). -TEST_F(HttpNetworkTransactionTest, Head) { +TEST_P(HttpNetworkTransactionTest, Head) { HttpRequestInfo request; request.method = "HEAD"; request.url = GURL("http://www.example.org/"); @@ -1562,7 +1584,7 @@ EXPECT_EQ("", response_data); } -TEST_F(HttpNetworkTransactionTest, ReuseConnection) { +TEST_P(HttpNetworkTransactionTest, ReuseConnection) { std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_)); MockRead data_reads[] = { @@ -1610,7 +1632,7 @@ } } -TEST_F(HttpNetworkTransactionTest, Ignores100) { +TEST_P(HttpNetworkTransactionTest, Ignores100) { std::vector<std::unique_ptr<UploadElementReader>> element_readers; element_readers.push_back( std::make_unique<UploadBytesElementReader>("foo", 3)); @@ -1663,7 +1685,7 @@ // This test is almost the same as Ignores100 above, but the response contains // a 102 instead of a 100. Also, instead of HTTP/1.0 the response is // HTTP/1.1 and the two status headers are read in one read. -TEST_F(HttpNetworkTransactionTest, Ignores1xx) { +TEST_P(HttpNetworkTransactionTest, Ignores1xx) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("http://www.foo.com/"); @@ -1702,7 +1724,7 @@ EXPECT_EQ("hello world", response_data); } -TEST_F(HttpNetworkTransactionTest, LoadTimingMeasuresTimeToFirstByteForHttp) { +TEST_P(HttpNetworkTransactionTest, LoadTimingMeasuresTimeToFirstByteForHttp) { static const base::TimeDelta kDelayAfterFirstByte = base::Milliseconds(10); HttpRequestInfo request; @@ -1772,7 +1794,7 @@ // Tests that the time-to-first-byte reported in a transaction's load timing // info uses the first response, even if 1XX/informational. -void HttpNetworkTransactionTest::Check100ResponseTiming(bool use_spdy) { +void HttpNetworkTransactionTestBase::Check100ResponseTiming(bool use_spdy) { static const base::TimeDelta kDelayAfter100Response = base::Milliseconds(10); HttpRequestInfo request; @@ -1869,15 +1891,15 @@ EXPECT_EQ("hello world", response_data); } -TEST_F(HttpNetworkTransactionTest, MeasuresTimeToFirst100ResponseForHttp) { +TEST_P(HttpNetworkTransactionTest, MeasuresTimeToFirst100ResponseForHttp) { Check100ResponseTiming(false /* use_spdy */); } -TEST_F(HttpNetworkTransactionTest, MeasuresTimeToFirst100ResponseForSpdy) { +TEST_P(HttpNetworkTransactionTest, MeasuresTimeToFirst100ResponseForSpdy) { Check100ResponseTiming(true /* use_spdy */); } -TEST_F(HttpNetworkTransactionTest, Incomplete100ThenEOF) { +TEST_P(HttpNetworkTransactionTest, Incomplete100ThenEOF) { HttpRequestInfo request; request.method = "POST"; request.url = GURL("http://www.foo.com/"); @@ -1908,7 +1930,7 @@ EXPECT_EQ("", response_data); } -TEST_F(HttpNetworkTransactionTest, EmptyResponse) { +TEST_P(HttpNetworkTransactionTest, EmptyResponse) { HttpRequestInfo request; request.method = "POST"; request.url = GURL("http://www.foo.com/"); @@ -1933,7 +1955,7 @@ EXPECT_THAT(rv, IsError(ERR_EMPTY_RESPONSE)); } -void HttpNetworkTransactionTest::KeepAliveConnectionResendRequestTest( +void HttpNetworkTransactionTestBase::KeepAliveConnectionResendRequestTest( const MockWrite* write_failure, const MockRead* read_failure) { HttpRequestInfo request; @@ -2021,12 +2043,12 @@ } } -void HttpNetworkTransactionTest::PreconnectErrorResendRequestTest( +void HttpNetworkTransactionTestBase::PreconnectErrorResendRequestTest( const MockWrite* write_failure, const MockRead* read_failure, bool use_spdy, bool chunked_upload) { - SpdyTestUtil spdy_util; + SpdyTestUtil spdy_util(/*use_priority_header=*/true); HttpRequestInfo request; request.method = "GET"; request.url = GURL("https://www.foo.com/"); @@ -2178,7 +2200,7 @@ // Test that we do not retry indefinitely when a server sends an error like // ERR_HTTP2_PING_FAILED, ERR_HTTP2_SERVER_REFUSED_STREAM, // ERR_QUIC_HANDSHAKE_FAILED or ERR_QUIC_PROTOCOL_ERROR. -TEST_F(HttpNetworkTransactionTest, FiniteRetriesOnIOError) { +TEST_P(HttpNetworkTransactionTest, FiniteRetriesOnIOError) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("https://www.foo.com/"); @@ -2218,7 +2240,7 @@ EXPECT_THAT(rv, IsError(ERR_HTTP2_SERVER_REFUSED_STREAM)); } -TEST_F(HttpNetworkTransactionTest, RetryTwiceOnIOError) { +TEST_P(HttpNetworkTransactionTest, RetryTwiceOnIOError) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("https://www.foo.com/"); @@ -2267,24 +2289,24 @@ EXPECT_THAT(rv, IsOk()); } -TEST_F(HttpNetworkTransactionTest, KeepAliveConnectionNotConnectedOnWrite) { +TEST_P(HttpNetworkTransactionTest, KeepAliveConnectionNotConnectedOnWrite) { MockWrite write_failure(ASYNC, ERR_SOCKET_NOT_CONNECTED); KeepAliveConnectionResendRequestTest(&write_failure, nullptr); } -TEST_F(HttpNetworkTransactionTest, KeepAliveConnectionReset) { +TEST_P(HttpNetworkTransactionTest, KeepAliveConnectionReset) { MockRead read_failure(ASYNC, ERR_CONNECTION_RESET); KeepAliveConnectionResendRequestTest(nullptr, &read_failure); } -TEST_F(HttpNetworkTransactionTest, KeepAliveConnectionEOF) { +TEST_P(HttpNetworkTransactionTest, KeepAliveConnectionEOF) { MockRead read_failure(SYNCHRONOUS, OK); // EOF KeepAliveConnectionResendRequestTest(nullptr, &read_failure); } // Make sure that on a 408 response (Request Timeout), the request is retried, // if the socket was a reused keep alive socket. -TEST_F(HttpNetworkTransactionTest, KeepAlive408) { +TEST_P(HttpNetworkTransactionTest, KeepAlive408) { MockRead read_failure(SYNCHRONOUS, "HTTP/1.1 408 Request Timeout\r\n" "Connection: Keep-Alive\r\n" @@ -2293,7 +2315,7 @@ KeepAliveConnectionResendRequestTest(nullptr, &read_failure); } -TEST_F(HttpNetworkTransactionTest, PreconnectErrorNotConnectedOnWrite) { +TEST_P(HttpNetworkTransactionTest, PreconnectErrorNotConnectedOnWrite) { MockWrite write_failure(ASYNC, ERR_SOCKET_NOT_CONNECTED); PreconnectErrorResendRequestTest(&write_failure, nullptr, false /* use_spdy */); @@ -2301,7 +2323,7 @@ &write_failure, nullptr, false /* use_spdy */, true /* chunked_upload */); } -TEST_F(HttpNetworkTransactionTest, PreconnectErrorReset) { +TEST_P(HttpNetworkTransactionTest, PreconnectErrorReset) { MockRead read_failure(ASYNC, ERR_CONNECTION_RESET); PreconnectErrorResendRequestTest(nullptr, &read_failure, false /* use_spdy */); @@ -2309,7 +2331,7 @@ true /* chunked_upload */); } -TEST_F(HttpNetworkTransactionTest, PreconnectErrorEOF) { +TEST_P(HttpNetworkTransactionTest, PreconnectErrorEOF) { MockRead read_failure(SYNCHRONOUS, OK); // EOF PreconnectErrorResendRequestTest(nullptr, &read_failure, false /* use_spdy */); @@ -2317,7 +2339,7 @@ true /* chunked_upload */); } -TEST_F(HttpNetworkTransactionTest, PreconnectErrorAsyncEOF) { +TEST_P(HttpNetworkTransactionTest, PreconnectErrorAsyncEOF) { MockRead read_failure(ASYNC, OK); // EOF PreconnectErrorResendRequestTest(nullptr, &read_failure, false /* use_spdy */); @@ -2327,7 +2349,7 @@ // Make sure that on a 408 response (Request Timeout), the request is retried, // if the socket was a preconnected (UNUSED_IDLE) socket. -TEST_F(HttpNetworkTransactionTest, RetryOnIdle408) { +TEST_P(HttpNetworkTransactionTest, RetryOnIdle408) { MockRead read_failure(SYNCHRONOUS, "HTTP/1.1 408 Request Timeout\r\n" "Connection: Keep-Alive\r\n" @@ -2340,7 +2362,7 @@ true /* chunked_upload */); } -TEST_F(HttpNetworkTransactionTest, SpdyPreconnectErrorNotConnectedOnWrite) { +TEST_P(HttpNetworkTransactionTest, SpdyPreconnectErrorNotConnectedOnWrite) { MockWrite write_failure(ASYNC, ERR_SOCKET_NOT_CONNECTED); PreconnectErrorResendRequestTest(&write_failure, nullptr, true /* use_spdy */); @@ -2348,28 +2370,28 @@ true /* chunked_upload */); } -TEST_F(HttpNetworkTransactionTest, SpdyPreconnectErrorReset) { +TEST_P(HttpNetworkTransactionTest, SpdyPreconnectErrorReset) { MockRead read_failure(ASYNC, ERR_CONNECTION_RESET); PreconnectErrorResendRequestTest(nullptr, &read_failure, true /* use_spdy */); PreconnectErrorResendRequestTest(nullptr, &read_failure, true /* use_spdy */, true /* chunked_upload */); } -TEST_F(HttpNetworkTransactionTest, SpdyPreconnectErrorEOF) { +TEST_P(HttpNetworkTransactionTest, SpdyPreconnectErrorEOF) { MockRead read_failure(SYNCHRONOUS, OK); // EOF PreconnectErrorResendRequestTest(nullptr, &read_failure, true /* use_spdy */); PreconnectErrorResendRequestTest(nullptr, &read_failure, true /* use_spdy */, true /* chunked_upload */); } -TEST_F(HttpNetworkTransactionTest, SpdyPreconnectErrorAsyncEOF) { +TEST_P(HttpNetworkTransactionTest, SpdyPreconnectErrorAsyncEOF) { MockRead read_failure(ASYNC, OK); // EOF PreconnectErrorResendRequestTest(nullptr, &read_failure, true /* use_spdy */); PreconnectErrorResendRequestTest(nullptr, &read_failure, true /* use_spdy */, true /* chunked_upload */); } -TEST_F(HttpNetworkTransactionTest, NonKeepAliveConnectionReset) { +TEST_P(HttpNetworkTransactionTest, NonKeepAliveConnectionReset) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("http://www.example.org/"); @@ -2410,7 +2432,7 @@ // Opera 9.52: after five attempts, blank page // Us with WinHTTP: error page (ERR_INVALID_RESPONSE) // Us: error page (EMPTY_RESPONSE) -TEST_F(HttpNetworkTransactionTest, NonKeepAliveConnectionEOF) { +TEST_P(HttpNetworkTransactionTest, NonKeepAliveConnectionEOF) { MockRead data_reads[] = { MockRead(SYNCHRONOUS, OK), // EOF MockRead("HTTP/1.0 200 OK\r\n\r\n"), // Should not be used @@ -2425,7 +2447,7 @@ // tests. There was a bug causing HttpNetworkTransaction to hang in the // destructor in such situations. // See http://crbug.com/154712 and http://crbug.com/156609. -TEST_F(HttpNetworkTransactionTest, KeepAliveEarlyClose) { +TEST_P(HttpNetworkTransactionTest, KeepAliveEarlyClose) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("http://www.example.org/"); @@ -2468,7 +2490,7 @@ EXPECT_EQ(0, GetIdleSocketCountInTransportSocketPool(session.get())); } -TEST_F(HttpNetworkTransactionTest, KeepAliveEarlyClose2) { +TEST_P(HttpNetworkTransactionTest, KeepAliveEarlyClose2) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("http://www.example.org/"); @@ -2510,7 +2532,7 @@ // Test that we correctly reuse a keep-alive connection after not explicitly // reading the body. -TEST_F(HttpNetworkTransactionTest, KeepAliveAfterUnreadBody) { +TEST_P(HttpNetworkTransactionTest, KeepAliveAfterUnreadBody) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("http://www.foo.com/"); @@ -2646,7 +2668,7 @@ // Sockets that receive extra data after a response is complete should not be // reused. -TEST_F(HttpNetworkTransactionTest, KeepAliveWithUnusedData1) { +TEST_P(HttpNetworkTransactionTest, KeepAliveWithUnusedData1) { std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_)); MockWrite data_writes1[] = { MockWrite("HEAD / HTTP/1.1\r\n" @@ -2723,7 +2745,7 @@ EXPECT_EQ("foo", response_data2); } -TEST_F(HttpNetworkTransactionTest, KeepAliveWithUnusedData2) { +TEST_P(HttpNetworkTransactionTest, KeepAliveWithUnusedData2) { std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_)); MockWrite data_writes1[] = { MockWrite("GET / HTTP/1.1\r\n" @@ -2801,7 +2823,7 @@ EXPECT_EQ("foo", response_data2); } -TEST_F(HttpNetworkTransactionTest, KeepAliveWithUnusedData3) { +TEST_P(HttpNetworkTransactionTest, KeepAliveWithUnusedData3) { std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_)); MockWrite data_writes1[] = { MockWrite("GET / HTTP/1.1\r\n" @@ -2883,7 +2905,7 @@ // HttpStreamParser doesn't know if there's extra data on a socket or not when // the HttpNetworkTransaction is torn down, because the response body hasn't // been read from yet, but the request goes through the HttpResponseBodyDrainer. -TEST_F(HttpNetworkTransactionTest, KeepAliveWithUnusedData4) { +TEST_P(HttpNetworkTransactionTest, KeepAliveWithUnusedData4) { std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_)); MockWrite data_writes1[] = { MockWrite("GET / HTTP/1.1\r\n" @@ -2933,7 +2955,7 @@ // Test the request-challenge-retry sequence for basic auth. // (basic auth is the easiest to mock, because it has no randomness). -TEST_F(HttpNetworkTransactionTest, BasicAuth) { +TEST_P(HttpNetworkTransactionTest, BasicAuth) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("http://www.example.org/"); @@ -3038,7 +3060,7 @@ // Test the request-challenge-retry sequence for basic auth. // (basic auth is the easiest to mock, because it has no randomness). -TEST_F(HttpNetworkTransactionTest, BasicAuthWithAddressChange) { +TEST_P(HttpNetworkTransactionTest, BasicAuthWithAddressChange) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("http://www.example.org/"); @@ -3152,7 +3174,7 @@ // Test that, if the server requests auth indefinitely, HttpNetworkTransaction // will eventually give up. -TEST_F(HttpNetworkTransactionTest, BasicAuthForever) { +TEST_P(HttpNetworkTransactionTest, BasicAuthForever) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("http://www.example.org/"); @@ -3218,7 +3240,7 @@ EXPECT_THAT(rv, IsError(ERR_TOO_MANY_RETRIES)); } -TEST_F(HttpNetworkTransactionTest, DoNotSendAuth) { +TEST_P(HttpNetworkTransactionTest, DoNotSendAuth) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("http://www.example.org/"); @@ -3267,7 +3289,7 @@ // Test the request-challenge-retry sequence for basic auth, over a keep-alive // connection. -TEST_F(HttpNetworkTransactionTest, BasicAuthKeepAlive) { +TEST_P(HttpNetworkTransactionTest, BasicAuthKeepAlive) { // On the second pass, the body read of the auth challenge is synchronous, so // IsConnectedAndIdle returns false. The socket should still be drained and // reused. See http://crbug.com/544255. @@ -3360,7 +3382,7 @@ // Test the request-challenge-retry sequence for basic auth, over a keep-alive // connection and with no response body to drain. -TEST_F(HttpNetworkTransactionTest, BasicAuthKeepAliveNoBody) { +TEST_P(HttpNetworkTransactionTest, BasicAuthKeepAliveNoBody) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("http://www.example.org/"); @@ -3433,7 +3455,7 @@ // Test the request-challenge-retry sequence for basic auth, over a keep-alive // connection and with a large response body to drain. -TEST_F(HttpNetworkTransactionTest, BasicAuthKeepAliveLargeBody) { +TEST_P(HttpNetworkTransactionTest, BasicAuthKeepAliveLargeBody) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("http://www.example.org/"); @@ -3514,7 +3536,7 @@ // Test the request-challenge-retry sequence for basic auth, over a keep-alive // connection, but the server gets impatient and closes the connection. -TEST_F(HttpNetworkTransactionTest, BasicAuthKeepAliveImpatientServer) { +TEST_P(HttpNetworkTransactionTest, BasicAuthKeepAliveImpatientServer) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("http://www.example.org/"); @@ -3600,7 +3622,7 @@ // Test the request-challenge-retry sequence for basic auth, over a connection // that requires a restart when setting up an SSL tunnel. -TEST_F(HttpNetworkTransactionTest, BasicAuthProxyNoKeepAliveHttp10) { +TEST_P(HttpNetworkTransactionTest, BasicAuthProxyNoKeepAliveHttp10) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("https://www.example.org/"); @@ -3750,7 +3772,7 @@ // Test the request-challenge-retry sequence for basic auth, over a connection // that requires a restart when setting up an SSL tunnel. -TEST_F(HttpNetworkTransactionTest, BasicAuthProxyNoKeepAliveHttp11) { +TEST_P(HttpNetworkTransactionTest, BasicAuthProxyNoKeepAliveHttp11) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("https://www.example.org/"); @@ -3893,7 +3915,7 @@ // Test the request-challenge-retry sequence for basic auth, over a keep-alive // proxy connection with HTTP/1.0 responses, when setting up an SSL tunnel. -TEST_F(HttpNetworkTransactionTest, BasicAuthProxyKeepAliveHttp10) { +TEST_P(HttpNetworkTransactionTest, BasicAuthProxyKeepAliveHttp10) { // On the second pass, the body read of the auth challenge is synchronous, so // IsConnectedAndIdle returns false. The socket should still be drained and // reused. See http://crbug.com/544255. @@ -4006,7 +4028,7 @@ // Test the request-challenge-retry sequence for basic auth, over a keep-alive // proxy connection with HTTP/1.1 responses, when setting up an SSL tunnel. -TEST_F(HttpNetworkTransactionTest, BasicAuthProxyKeepAliveHttp11) { +TEST_P(HttpNetworkTransactionTest, BasicAuthProxyKeepAliveHttp11) { // On the second pass, the body read of the auth challenge is synchronous, so // IsConnectedAndIdle returns false. The socket should still be drained and // reused. See http://crbug.com/544255. @@ -4125,7 +4147,7 @@ // proxy connection with HTTP/1.1 responses, when setting up an SSL tunnel, in // the case the server sends extra data on the original socket, so it can't be // reused. -TEST_F(HttpNetworkTransactionTest, BasicAuthProxyKeepAliveExtraData) { +TEST_P(HttpNetworkTransactionTest, BasicAuthProxyKeepAliveExtraData) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("https://www.example.org/"); @@ -4251,7 +4273,7 @@ // Test the case a proxy closes a socket while the challenge body is being // drained. -TEST_F(HttpNetworkTransactionTest, BasicAuthProxyKeepAliveHangupDuringBody) { +TEST_P(HttpNetworkTransactionTest, BasicAuthProxyKeepAliveHangupDuringBody) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("https://www.example.org/"); @@ -4343,7 +4365,7 @@ // Test that we don't read the response body when we fail to establish a tunnel, // even if the user cancels the proxy's auth attempt. -TEST_F(HttpNetworkTransactionTest, BasicAuthProxyCancelTunnel) { +TEST_P(HttpNetworkTransactionTest, BasicAuthProxyCancelTunnel) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("https://www.example.org/"); @@ -4404,7 +4426,7 @@ // Test the no-tunnel HTTP auth case where proxy and server origins and realms // are the same, but the user/passwords are different. Serves to verify // credentials are correctly separated based on HttpAuth::Target. -TEST_F(HttpNetworkTransactionTest, BasicAuthProxyMatchesServerAuthNoTunnel) { +TEST_P(HttpNetworkTransactionTest, BasicAuthProxyMatchesServerAuthNoTunnel) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("http://myproxy:70/"); @@ -4554,7 +4576,7 @@ // Serves to verify credentials are correctly separated based on // HttpAuth::Target and NetworkAnonymizationKeys, but NetworkAnonymizationKey // only affects server credentials, not proxy credentials. -TEST_F(HttpNetworkTransactionTest, +TEST_P(HttpNetworkTransactionTest, BasicAuthProxyMatchesServerAuthWithNetworkAnonymizationKeyNoTunnel) { const SchemefulSite kSite1(GURL("https://foo.test/")); const auto kNetworkAnonymizationKey1 = @@ -4818,7 +4840,7 @@ } // Much like the test above, but uses tunnelled connections. -TEST_F(HttpNetworkTransactionTest, +TEST_P(HttpNetworkTransactionTest, BasicAuthProxyMatchesServerAuthWithNetworkAnonymizationKeyWithTunnel) { const SchemefulSite kSite1(GURL("https://foo.test/")); const auto kNetworkAnonymizationKey1 = @@ -5103,7 +5125,7 @@ // Test that we don't pass extraneous headers from the proxy's response to the // caller when the proxy responds to CONNECT with 407. -TEST_F(HttpNetworkTransactionTest, SanitizeProxyAuthHeaders) { +TEST_P(HttpNetworkTransactionTest, SanitizeProxyAuthHeaders) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("https://www.example.org/"); @@ -5166,7 +5188,7 @@ // Test when a server (non-proxy) returns a 407 (proxy-authenticate). // The request should fail with ERR_UNEXPECTED_PROXY_AUTH. -TEST_F(HttpNetworkTransactionTest, UnexpectedProxyAuth) { +TEST_P(HttpNetworkTransactionTest, UnexpectedProxyAuth) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("http://www.example.org/"); @@ -5211,7 +5233,7 @@ // a non-authenticating proxy - there is nothing to indicate whether the // response came from the proxy or the server, so it is treated as if the proxy // issued the challenge. -TEST_F(HttpNetworkTransactionTest, HttpsServerRequestsProxyAuthThroughProxy) { +TEST_P(HttpNetworkTransactionTest, HttpsServerRequestsProxyAuthThroughProxy) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("https://www.example.org/"); @@ -5272,7 +5294,7 @@ // Test a proxy auth scheme that allows default credentials and a proxy server // that uses non-persistent connections. -TEST_F(HttpNetworkTransactionTest, +TEST_P(HttpNetworkTransactionTest, AuthAllowsDefaultCredentialsTunnelConnectionClose) { HttpRequestInfo request; request.method = "GET"; @@ -5388,7 +5410,7 @@ // Test a proxy auth scheme that allows default credentials and a proxy server // that hangs up when credentials are initially sent. -TEST_F(HttpNetworkTransactionTest, +TEST_P(HttpNetworkTransactionTest, AuthAllowsDefaultCredentialsTunnelServerClosesConnection) { HttpRequestInfo request; request.method = "GET"; @@ -5509,7 +5531,7 @@ // Test a proxy auth scheme that allows default credentials and a proxy server // that hangs up when credentials are initially sent, and hangs up again when // they are retried. -TEST_F(HttpNetworkTransactionTest, +TEST_P(HttpNetworkTransactionTest, AuthAllowsDefaultCredentialsTunnelServerClosesConnectionTwice) { HttpRequestInfo request; request.method = "GET"; @@ -5609,7 +5631,7 @@ // succeeds, but the user is not authorized to connect to the destination // server. There's no standard for what a proxy should do to indicate a blocked // site. -TEST_F(HttpNetworkTransactionTest, +TEST_P(HttpNetworkTransactionTest, AuthAllowsDefaultCredentialsTunnelConnectionClosesBeforeBody) { HttpRequestInfo request; request.method = "GET"; @@ -5727,7 +5749,7 @@ // Test a proxy auth scheme that allows default credentials and a proxy server // that hangs up when credentials are initially sent, and sends a challenge // again they are retried. -TEST_F(HttpNetworkTransactionTest, +TEST_P(HttpNetworkTransactionTest, AuthAllowsDefaultCredentialsTunnelServerChallengesTwice) { HttpRequestInfo request; request.method = "GET"; @@ -5832,7 +5854,7 @@ // unnecessarily invalidated, and that if the server co-operates, the // authentication handshake can continue with the same scheme but with a // different identity. -TEST_F(HttpNetworkTransactionTest, NonPermanentGenerateAuthTokenError) { +TEST_P(HttpNetworkTransactionTest, NonPermanentGenerateAuthTokenError) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("http://www.example.org/"); @@ -6035,7 +6057,7 @@ // same address, the connections are not grouped together. i.e., a request to // foo.com using proxy.com as an HTTPS proxy won't use the same socket as a // request to foo.com using proxy.com as an HTTP proxy. -TEST_F(HttpNetworkTransactionTest, SameDestinationForDifferentProxyTypes) { +TEST_P(HttpNetworkTransactionTest, SameDestinationForDifferentProxyTypes) { session_deps_.proxy_resolution_service = std::make_unique<ConfiguredProxyResolutionService>( std::make_unique<ProxyConfigServiceFixed>(ProxyConfigWithAnnotation( @@ -6225,7 +6247,7 @@ } // Test the load timing for HTTPS requests with an HTTP proxy. -TEST_F(HttpNetworkTransactionTest, HttpProxyLoadTimingNoPacTwoRequests) { +TEST_P(HttpNetworkTransactionTest, HttpProxyLoadTimingNoPacTwoRequests) { HttpRequestInfo request1; request1.method = "GET"; request1.url = GURL("https://www.example.org/1"); @@ -6330,7 +6352,7 @@ } // Test the load timing for HTTPS requests with an HTTP proxy and a PAC script. -TEST_F(HttpNetworkTransactionTest, HttpProxyLoadTimingWithPacTwoRequests) { +TEST_P(HttpNetworkTransactionTest, HttpProxyLoadTimingWithPacTwoRequests) { HttpRequestInfo request1; request1.method = "GET"; request1.url = GURL("https://www.example.org/1"); @@ -6434,7 +6456,7 @@ } // Make sure that NetworkAnonymizationKeys are passed down to the proxy layer. -TEST_F(HttpNetworkTransactionTest, ProxyResolvedWithNetworkAnonymizationKey) { +TEST_P(HttpNetworkTransactionTest, ProxyResolvedWithNetworkAnonymizationKey) { const SchemefulSite kSite(GURL("https://foo.test/")); ProxyConfig proxy_config; @@ -6473,7 +6495,7 @@ } // Test that a failure in resolving the proxy hostname is retrievable. -TEST_F(HttpNetworkTransactionTest, ProxyHostResolutionFailure) { +TEST_P(HttpNetworkTransactionTest, ProxyHostResolutionFailure) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("http://www.example.org/"); @@ -6502,7 +6524,7 @@ } // Test a simple get through an HTTPS Proxy. -TEST_F(HttpNetworkTransactionTest, HttpsProxyGet) { +TEST_P(HttpNetworkTransactionTest, HttpsProxyGet) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("http://www.example.org/"); @@ -6584,7 +6606,7 @@ } // Test a SPDY get through an HTTPS Proxy. -TEST_F(HttpNetworkTransactionTest, HttpsProxySpdyGet) { +TEST_P(HttpNetworkTransactionTest, HttpsProxySpdyGet) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("http://www.example.org/"); @@ -6665,7 +6687,7 @@ // Verifies that a session which races and wins against the owning transaction // (completing prior to host resolution), doesn't fail the transaction. // Regression test for crbug.com/334413. -TEST_F(HttpNetworkTransactionTest, HttpsProxySpdyGetWithSessionRace) { +TEST_P(HttpNetworkTransactionTest, HttpsProxySpdyGetWithSessionRace) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("http://www.example.org/"); @@ -6738,7 +6760,7 @@ } // Test a SPDY get through an HTTPS Proxy. -TEST_F(HttpNetworkTransactionTest, HttpsProxySpdyGetWithProxyAuth) { +TEST_P(HttpNetworkTransactionTest, HttpsProxySpdyGetWithProxyAuth) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("http://www.example.org/"); @@ -6836,7 +6858,7 @@ } // Test a SPDY CONNECT through an HTTPS Proxy to an HTTPS (non-SPDY) Server. -TEST_F(HttpNetworkTransactionTest, HttpsProxySpdyConnectHttps) { +TEST_P(HttpNetworkTransactionTest, HttpsProxySpdyConnectHttps) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("https://www.example.org/"); @@ -6921,8 +6943,8 @@ } // Test a SPDY CONNECT through an HTTPS Proxy to a SPDY server. -TEST_F(HttpNetworkTransactionTest, HttpsProxySpdyConnectSpdy) { - SpdyTestUtil spdy_util_wrapped; +TEST_P(HttpNetworkTransactionTest, HttpsProxySpdyConnectSpdy) { + SpdyTestUtil spdy_util_wrapped(/*use_priority_header=*/true); HttpRequestInfo request; request.method = "GET"; @@ -7016,7 +7038,7 @@ } // Test a SPDY CONNECT failure through an HTTPS Proxy. -TEST_F(HttpNetworkTransactionTest, HttpsProxySpdyConnectFailure) { +TEST_P(HttpNetworkTransactionTest, HttpsProxySpdyConnectFailure) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("https://www.example.org/"); @@ -7075,7 +7097,7 @@ // is observed, but does exist by the time auth credentials are provided. In // this case, auth and SSL are fully negotated on the second request, but then // the socket is discarded to use the shared session. -TEST_F(HttpNetworkTransactionTest, ProxiedH2SessionAppearsDuringAuth) { +TEST_P(HttpNetworkTransactionTest, ProxiedH2SessionAppearsDuringAuth) { ProxyConfig proxy_config; proxy_config.set_auto_detect(true); proxy_config.set_pac_url(GURL("http://fooproxyurl")); @@ -7242,7 +7264,7 @@ // Test load timing in the case of two HTTPS (non-SPDY) requests through a SPDY // HTTPS Proxy to different servers. -TEST_F(HttpNetworkTransactionTest, +TEST_P(HttpNetworkTransactionTest, HttpsProxySpdyConnectHttpsLoadTimingTwoRequestsTwoServers) { // Configure against https proxy server "proxy:70". session_deps_.proxy_resolution_service = @@ -7380,7 +7402,7 @@ // Test load timing in the case of two HTTPS (non-SPDY) requests through a SPDY // HTTPS Proxy to the same server. -TEST_F(HttpNetworkTransactionTest, +TEST_P(HttpNetworkTransactionTest, HttpsProxySpdyConnectHttpsLoadTimingTwoRequestsSameServer) { // Configure against https proxy server "proxy:70". session_deps_.proxy_resolution_service = @@ -7508,7 +7530,7 @@ // Test load timing in the case of of two HTTP requests through a SPDY HTTPS // Proxy to different servers. -TEST_F(HttpNetworkTransactionTest, HttpsProxySpdyLoadTimingTwoHttpRequests) { +TEST_P(HttpNetworkTransactionTest, HttpsProxySpdyLoadTimingTwoHttpRequests) { // Configure against https proxy server "proxy:70". session_deps_.proxy_resolution_service = ConfiguredProxyResolutionService::CreateFixedForTest( @@ -7613,7 +7635,7 @@ // Test that an HTTP/2 CONNECT through an HTTPS Proxy to a HTTP/2 server and a // direct (non-proxied) request to the proxy server are not pooled, as that // would break socket pool isolation. -TEST_F(HttpNetworkTransactionTest, SpdyProxyIsolation1) { +TEST_P(HttpNetworkTransactionTest, SpdyProxyIsolation1) { ProxyConfig proxy_config; proxy_config.set_auto_detect(true); proxy_config.set_pac_url(GURL("http://fooproxyurl")); @@ -7629,7 +7651,7 @@ std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_)); - SpdyTestUtil spdy_util1; + SpdyTestUtil spdy_util1(/*use_priority_header=*/true); // CONNECT to www.example.org:443 via HTTP/2. spdy::SpdySerializedFrame connect(spdy_util_.ConstructSpdyConnect( nullptr, 0, 1, HttpProxyConnectJob::kH2QuicTunnelPriority, @@ -7673,7 +7695,7 @@ // Fetch https://proxy:70/ via HTTP/2. Needs a new SpdyTestUtil, since it uses // a new pipe. - SpdyTestUtil spdy_util2; + SpdyTestUtil spdy_util2(/*use_priority_header=*/true); spdy::SpdySerializedFrame req( spdy_util2.ConstructSpdyGet("https://proxy:70/", 1, LOWEST)); MockWrite spdy_writes2[] = {CreateMockWrite(req, 0)}; @@ -7747,7 +7769,7 @@ // Same as above, but reverse request order, since the code to check for an // existing session is different for tunnels and direct connections. -TEST_F(HttpNetworkTransactionTest, SpdyProxyIsolation2) { +TEST_P(HttpNetworkTransactionTest, SpdyProxyIsolation2) { // Configure against https proxy server "myproxy:80". ProxyConfig proxy_config; proxy_config.set_auto_detect(true); @@ -7764,7 +7786,7 @@ std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_)); // Fetch https://proxy:70/ via HTTP/2. - SpdyTestUtil spdy_util1; + SpdyTestUtil spdy_util1(/*use_priority_header=*/true); spdy::SpdySerializedFrame req( spdy_util1.ConstructSpdyGet("https://proxy:70/", 1, LOWEST)); MockWrite spdy_writes1[] = {CreateMockWrite(req, 0)}; @@ -7780,7 +7802,7 @@ SequencedSocketData spdy_data1(spdy_reads1, spdy_writes1); session_deps_.socket_factory->AddSocketDataProvider(&spdy_data1); - SpdyTestUtil spdy_util2; + SpdyTestUtil spdy_util2(/*use_priority_header=*/true); // CONNECT to www.example.org:443 via HTTP/2. spdy::SpdySerializedFrame connect(spdy_util_.ConstructSpdyConnect( nullptr, 0, 1, HttpProxyConnectJob::kH2QuicTunnelPriority, @@ -7879,7 +7901,7 @@ } // Test the challenge-response-retry sequence through an HTTPS Proxy -TEST_F(HttpNetworkTransactionTest, HttpsProxyAuthRetry) { +TEST_P(HttpNetworkTransactionTest, HttpsProxyAuthRetry) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("http://www.example.org/"); @@ -7985,7 +8007,7 @@ // Test the challenge-response-retry sequence through an HTTPS Proxy over a // connection that requires a restart. -TEST_F(HttpNetworkTransactionTest, HttpsProxyAuthRetryNoKeepAlive) { +TEST_P(HttpNetworkTransactionTest, HttpsProxyAuthRetryNoKeepAlive) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("http://www.example.org/"); @@ -8102,7 +8124,7 @@ // Test the challenge-response-retry sequence through an HTTPS Proxy over a // connection that requires a restart, with a proxy change occurring over the // restart. -TEST_F(HttpNetworkTransactionTest, HttpsProxyAuthRetryNoKeepAliveChangeProxy) { +TEST_P(HttpNetworkTransactionTest, HttpsProxyAuthRetryNoKeepAliveChangeProxy) { const auto proxy1 = PacResultElementToProxyServer("HTTPS myproxy:70"); const auto proxy2 = PacResultElementToProxyServer("HTTPS myproxy2:70"); auto proxy_delegate = std::make_unique<SingleProxyDelegate>(); @@ -8227,7 +8249,7 @@ // Test the challenge-response-retry sequence through an HTTPS Proxy over a // connection that requires a restart, with a change to a direct connection // occurring over the restart. -TEST_F(HttpNetworkTransactionTest, +TEST_P(HttpNetworkTransactionTest, HttpsProxyAuthRetryNoKeepAliveChangeToDirect) { const auto proxy = PacResultElementToProxyServer("HTTPS myproxy:70"); const auto direct = ProxyServer::Direct(); @@ -8348,8 +8370,9 @@ EXPECT_FALSE(response->auth_challenge.has_value()); } -void HttpNetworkTransactionTest::ConnectStatusHelperWithExpectedStatus( - const MockRead& status, int expected_status) { +void HttpNetworkTransactionTestBase::ConnectStatusHelperWithExpectedStatus( + const MockRead& status, + int expected_status) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("https://www.example.org/"); @@ -8389,184 +8412,184 @@ EXPECT_EQ(expected_status, rv); } -void HttpNetworkTransactionTest::ConnectStatusHelper( +void HttpNetworkTransactionTestBase::ConnectStatusHelper( const MockRead& status) { ConnectStatusHelperWithExpectedStatus( status, ERR_TUNNEL_CONNECTION_FAILED); } -TEST_F(HttpNetworkTransactionTest, ConnectStatus100) { +TEST_P(HttpNetworkTransactionTest, ConnectStatus100) { ConnectStatusHelper(MockRead("HTTP/1.1 100 Continue\r\n")); } -TEST_F(HttpNetworkTransactionTest, ConnectStatus101) { +TEST_P(HttpNetworkTransactionTest, ConnectStatus101) { ConnectStatusHelper(MockRead("HTTP/1.1 101 Switching Protocols\r\n")); } -TEST_F(HttpNetworkTransactionTest, ConnectStatus201) { +TEST_P(HttpNetworkTransactionTest, ConnectStatus201) { ConnectStatusHelper(MockRead("HTTP/1.1 201 Created\r\n")); } -TEST_F(HttpNetworkTransactionTest, ConnectStatus202) { +TEST_P(HttpNetworkTransactionTest, ConnectStatus202) { ConnectStatusHelper(MockRead("HTTP/1.1 202 Accepted\r\n")); } -TEST_F(HttpNetworkTransactionTest, ConnectStatus203) { +TEST_P(HttpNetworkTransactionTest, ConnectStatus203) { ConnectStatusHelper( MockRead("HTTP/1.1 203 Non-Authoritative Information\r\n")); } -TEST_F(HttpNetworkTransactionTest, ConnectStatus204) { +TEST_P(HttpNetworkTransactionTest, ConnectStatus204) { ConnectStatusHelper(MockRead("HTTP/1.1 204 No Content\r\n")); } -TEST_F(HttpNetworkTransactionTest, ConnectStatus205) { +TEST_P(HttpNetworkTransactionTest, ConnectStatus205) { ConnectStatusHelper(MockRead("HTTP/1.1 205 Reset Content\r\n")); } -TEST_F(HttpNetworkTransactionTest, ConnectStatus206) { +TEST_P(HttpNetworkTransactionTest, ConnectStatus206) { ConnectStatusHelper(MockRead("HTTP/1.1 206 Partial Content\r\n")); } -TEST_F(HttpNetworkTransactionTest, ConnectStatus300) { +TEST_P(HttpNetworkTransactionTest, ConnectStatus300) { ConnectStatusHelper(MockRead("HTTP/1.1 300 Multiple Choices\r\n")); } -TEST_F(HttpNetworkTransactionTest, ConnectStatus301) { +TEST_P(HttpNetworkTransactionTest, ConnectStatus301) { ConnectStatusHelper(MockRead("HTTP/1.1 301 Moved Permanently\r\n")); } -TEST_F(HttpNetworkTransactionTest, ConnectStatus302) { +TEST_P(HttpNetworkTransactionTest, ConnectStatus302) { ConnectStatusHelper(MockRead("HTTP/1.1 302 Found\r\n")); } -TEST_F(HttpNetworkTransactionTest, ConnectStatus303) { +TEST_P(HttpNetworkTransactionTest, ConnectStatus303) { ConnectStatusHelper(MockRead("HTTP/1.1 303 See Other\r\n")); } -TEST_F(HttpNetworkTransactionTest, ConnectStatus304) { +TEST_P(HttpNetworkTransactionTest, ConnectStatus304) { ConnectStatusHelper(MockRead("HTTP/1.1 304 Not Modified\r\n")); } -TEST_F(HttpNetworkTransactionTest, ConnectStatus305) { +TEST_P(HttpNetworkTransactionTest, ConnectStatus305) { ConnectStatusHelper(MockRead("HTTP/1.1 305 Use Proxy\r\n")); } -TEST_F(HttpNetworkTransactionTest, ConnectStatus306) { +TEST_P(HttpNetworkTransactionTest, ConnectStatus306) { ConnectStatusHelper(MockRead("HTTP/1.1 306\r\n")); } -TEST_F(HttpNetworkTransactionTest, ConnectStatus307) { +TEST_P(HttpNetworkTransactionTest, ConnectStatus307) { ConnectStatusHelper(MockRead("HTTP/1.1 307 Temporary Redirect\r\n")); } -TEST_F(HttpNetworkTransactionTest, ConnectStatus308) { +TEST_P(HttpNetworkTransactionTest, ConnectStatus308) { ConnectStatusHelper(MockRead("HTTP/1.1 308 Permanent Redirect\r\n")); } -TEST_F(HttpNetworkTransactionTest, ConnectStatus400) { +TEST_P(HttpNetworkTransactionTest, ConnectStatus400) { ConnectStatusHelper(MockRead("HTTP/1.1 400 Bad Request\r\n")); } -TEST_F(HttpNetworkTransactionTest, ConnectStatus401) { +TEST_P(HttpNetworkTransactionTest, ConnectStatus401) { ConnectStatusHelper(MockRead("HTTP/1.1 401 Unauthorized\r\n")); } -TEST_F(HttpNetworkTransactionTest, ConnectStatus402) { +TEST_P(HttpNetworkTransactionTest, ConnectStatus402) { ConnectStatusHelper(MockRead("HTTP/1.1 402 Payment Required\r\n")); } -TEST_F(HttpNetworkTransactionTest, ConnectStatus403) { +TEST_P(HttpNetworkTransactionTest, ConnectStatus403) { ConnectStatusHelper(MockRead("HTTP/1.1 403 Forbidden\r\n")); } -TEST_F(HttpNetworkTransactionTest, ConnectStatus404) { +TEST_P(HttpNetworkTransactionTest, ConnectStatus404) { ConnectStatusHelper(MockRead("HTTP/1.1 404 Not Found\r\n")); } -TEST_F(HttpNetworkTransactionTest, ConnectStatus405) { +TEST_P(HttpNetworkTransactionTest, ConnectStatus405) { ConnectStatusHelper(MockRead("HTTP/1.1 405 Method Not Allowed\r\n")); } -TEST_F(HttpNetworkTransactionTest, ConnectStatus406) { +TEST_P(HttpNetworkTransactionTest, ConnectStatus406) { ConnectStatusHelper(MockRead("HTTP/1.1 406 Not Acceptable\r\n")); } -TEST_F(HttpNetworkTransactionTest, ConnectStatus407) { +TEST_P(HttpNetworkTransactionTest, ConnectStatus407) { ConnectStatusHelperWithExpectedStatus( MockRead("HTTP/1.1 407 Proxy Authentication Required\r\n"), ERR_PROXY_AUTH_UNSUPPORTED); } -TEST_F(HttpNetworkTransactionTest, ConnectStatus408) { +TEST_P(HttpNetworkTransactionTest, ConnectStatus408) { ConnectStatusHelper(MockRead("HTTP/1.1 408 Request Timeout\r\n")); } -TEST_F(HttpNetworkTransactionTest, ConnectStatus409) { +TEST_P(HttpNetworkTransactionTest, ConnectStatus409) { ConnectStatusHelper(MockRead("HTTP/1.1 409 Conflict\r\n")); } -TEST_F(HttpNetworkTransactionTest, ConnectStatus410) { +TEST_P(HttpNetworkTransactionTest, ConnectStatus410) { ConnectStatusHelper(MockRead("HTTP/1.1 410 Gone\r\n")); } -TEST_F(HttpNetworkTransactionTest, ConnectStatus411) { +TEST_P(HttpNetworkTransactionTest, ConnectStatus411) { ConnectStatusHelper(MockRead("HTTP/1.1 411 Length Required\r\n")); } -TEST_F(HttpNetworkTransactionTest, ConnectStatus412) { +TEST_P(HttpNetworkTransactionTest, ConnectStatus412) { ConnectStatusHelper(MockRead("HTTP/1.1 412 Precondition Failed\r\n")); } -TEST_F(HttpNetworkTransactionTest, ConnectStatus413) { +TEST_P(HttpNetworkTransactionTest, ConnectStatus413) { ConnectStatusHelper(MockRead("HTTP/1.1 413 Request Entity Too Large\r\n")); } -TEST_F(HttpNetworkTransactionTest, ConnectStatus414) { +TEST_P(HttpNetworkTransactionTest, ConnectStatus414) { ConnectStatusHelper(MockRead("HTTP/1.1 414 Request-URI Too Long\r\n")); } -TEST_F(HttpNetworkTransactionTest, ConnectStatus415) { +TEST_P(HttpNetworkTransactionTest, ConnectStatus415) { ConnectStatusHelper(MockRead("HTTP/1.1 415 Unsupported Media Type\r\n")); } -TEST_F(HttpNetworkTransactionTest, ConnectStatus416) { +TEST_P(HttpNetworkTransactionTest, ConnectStatus416) { ConnectStatusHelper( MockRead("HTTP/1.1 416 Requested Range Not Satisfiable\r\n")); } -TEST_F(HttpNetworkTransactionTest, ConnectStatus417) { +TEST_P(HttpNetworkTransactionTest, ConnectStatus417) { ConnectStatusHelper(MockRead("HTTP/1.1 417 Expectation Failed\r\n")); } -TEST_F(HttpNetworkTransactionTest, ConnectStatus500) { +TEST_P(HttpNetworkTransactionTest, ConnectStatus500) { ConnectStatusHelper(MockRead("HTTP/1.1 500 Internal Server Error\r\n")); } -TEST_F(HttpNetworkTransactionTest, ConnectStatus501) { +TEST_P(HttpNetworkTransactionTest, ConnectStatus501) { ConnectStatusHelper(MockRead("HTTP/1.1 501 Not Implemented\r\n")); } -TEST_F(HttpNetworkTransactionTest, ConnectStatus502) { +TEST_P(HttpNetworkTransactionTest, ConnectStatus502) { ConnectStatusHelper(MockRead("HTTP/1.1 502 Bad Gateway\r\n")); } -TEST_F(HttpNetworkTransactionTest, ConnectStatus503) { +TEST_P(HttpNetworkTransactionTest, ConnectStatus503) { ConnectStatusHelper(MockRead("HTTP/1.1 503 Service Unavailable\r\n")); } -TEST_F(HttpNetworkTransactionTest, ConnectStatus504) { +TEST_P(HttpNetworkTransactionTest, ConnectStatus504) { ConnectStatusHelper(MockRead("HTTP/1.1 504 Gateway Timeout\r\n")); } -TEST_F(HttpNetworkTransactionTest, ConnectStatus505) { +TEST_P(HttpNetworkTransactionTest, ConnectStatus505) { ConnectStatusHelper(MockRead("HTTP/1.1 505 HTTP Version Not Supported\r\n")); } // Test the flow when both the proxy server AND origin server require // authentication. Again, this uses basic auth for both since that is // the simplest to mock. -TEST_F(HttpNetworkTransactionTest, BasicAuthProxyThenServer) { +TEST_P(HttpNetworkTransactionTest, BasicAuthProxyThenServer) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("http://www.example.org/"); @@ -8700,7 +8723,7 @@ // [1] https://msdn.microsoft.com/en-us/library/cc236621.aspx // Enter the correct password and authenticate successfully. -TEST_F(HttpNetworkTransactionTest, NTLMAuthV2) { +TEST_P(HttpNetworkTransactionTest, NTLMAuthV2) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("https://server/kids/login.aspx"); @@ -8856,7 +8879,7 @@ } // Enter a wrong password, and then the correct one. -TEST_F(HttpNetworkTransactionTest, NTLMAuthV2WrongThenRightPassword) { +TEST_P(HttpNetworkTransactionTest, NTLMAuthV2WrongThenRightPassword) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("https://server/kids/login.aspx"); @@ -9086,7 +9109,7 @@ // Server requests NTLM authentication, which is not supported over HTTP/2. // Subsequent request with authorization header should be sent over HTTP/1.1. -TEST_F(HttpNetworkTransactionTest, NTLMOverHttp2) { +TEST_P(HttpNetworkTransactionTest, NTLMOverHttp2) { HttpAuthNtlmMechanism::ScopedProcSetter proc_setter( MockGetMSTime, MockGenerateRandom, MockGetHostName); @@ -9247,7 +9270,7 @@ #if BUILDFLAG(ENABLE_WEBSOCKETS) // Variant of above test using WebSockets. -TEST_F(HttpNetworkTransactionTest, NTLMOverHttp2WithWebsockets) { +TEST_P(HttpNetworkTransactionTest, NTLMOverHttp2WithWebsockets) { const GURL kInitialUrl("https://server/"); const GURL kWebSocketUrl("wss://server/"); HttpAuthNtlmMechanism::ScopedProcSetter proc_setter( @@ -9468,7 +9491,7 @@ // removed, but we now have a legacy crypto fallback. (If that fallback is // removed, this test should be kept but with the expectations tweaked, in case // future fallbacks are added.) -TEST_F(HttpNetworkTransactionTest, NTLMProxyTLSHandshakeReset) { +TEST_P(HttpNetworkTransactionTest, NTLMProxyTLSHandshakeReset) { // The NTLM test data expects the proxy to be named 'server'. The origin is // https://origin/. session_deps_.proxy_resolution_service = @@ -9625,7 +9648,7 @@ // Test reading a server response which has only headers, and no body. // After some maximum number of bytes is consumed, the transaction should // fail with ERR_RESPONSE_HEADERS_TOO_BIG. -TEST_F(HttpNetworkTransactionTest, LargeHeadersNoBody) { +TEST_P(HttpNetworkTransactionTest, LargeHeadersNoBody) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("http://www.example.org/"); @@ -9660,7 +9683,7 @@ // Make sure that we don't try to reuse a TCPClientSocket when failing to // establish tunnel. // http://code.google.com/p/chromium/issues/detail?id=3772 -TEST_F(HttpNetworkTransactionTest, DontRecycleTransportSocketForSSLTunnel) { +TEST_P(HttpNetworkTransactionTest, DontRecycleTransportSocketForSSLTunnel) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("https://www.example.org/"); @@ -9718,7 +9741,7 @@ } // Make sure that we recycle a socket after reading all of the response body. -TEST_F(HttpNetworkTransactionTest, RecycleSocket) { +TEST_P(HttpNetworkTransactionTest, RecycleSocket) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("http://www.example.org/"); @@ -9774,7 +9797,7 @@ // Make sure that we recycle a SSL socket after reading all of the response // body. -TEST_F(HttpNetworkTransactionTest, RecycleSSLSocket) { +TEST_P(HttpNetworkTransactionTest, RecycleSSLSocket) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("https://www.example.org/"); @@ -9833,7 +9856,7 @@ // Grab a SSL socket, use it, and put it back into the pool. Then, reuse it // from the pool and make sure that we recover okay. -TEST_F(HttpNetworkTransactionTest, RecycleDeadSSLSocket) { +TEST_P(HttpNetworkTransactionTest, RecycleDeadSSLSocket) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("https://www.example.org/"); @@ -9924,7 +9947,7 @@ EXPECT_EQ(1, GetIdleSocketCountInTransportSocketPool(session.get())); } -TEST_F(HttpNetworkTransactionTest, CloseConnectionOnDestruction) { +TEST_P(HttpNetworkTransactionTest, CloseConnectionOnDestruction) { enum class TestCase { kReadHeaders, kReadPartOfBodyRead, @@ -10025,7 +10048,7 @@ // Grab a socket, use it, and put it back into the pool. Then, make // low memory notification and ensure the socket pool is flushed. -TEST_F(HttpNetworkTransactionTest, FlushSocketPoolOnLowMemoryNotifications) { +TEST_P(HttpNetworkTransactionTest, FlushSocketPoolOnLowMemoryNotifications) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("http://www.example.org/"); @@ -10094,7 +10117,7 @@ // Disable idle socket closing on memory pressure. // Grab a socket, use it, and put it back into the pool. Then, make // low memory notification and ensure the socket pool is NOT flushed. -TEST_F(HttpNetworkTransactionTest, NoFlushSocketPoolOnLowMemoryNotifications) { +TEST_P(HttpNetworkTransactionTest, NoFlushSocketPoolOnLowMemoryNotifications) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("http://www.example.org/"); @@ -10171,7 +10194,7 @@ // Grab an SSL socket, use it, and put it back into the pool. Then, make // low memory notification and ensure the socket pool is flushed. -TEST_F(HttpNetworkTransactionTest, FlushSSLSocketPoolOnLowMemoryNotifications) { +TEST_P(HttpNetworkTransactionTest, FlushSSLSocketPoolOnLowMemoryNotifications) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("https://www.example.org/"); @@ -10240,7 +10263,7 @@ // Make sure that we recycle a socket after a zero-length response. // http://crbug.com/9880 -TEST_F(HttpNetworkTransactionTest, RecycleSocketAfterZeroContentLength) { +TEST_P(HttpNetworkTransactionTest, RecycleSocketAfterZeroContentLength) { HttpRequestInfo request; request.method = "GET"; request.url = GURL( @@ -10298,7 +10321,7 @@ EXPECT_EQ(1, GetIdleSocketCountInTransportSocketPool(session.get())); } -TEST_F(HttpNetworkTransactionTest, ResendRequestOnWriteBodyError) { +TEST_P(HttpNetworkTransactionTest, ResendRequestOnWriteBodyError) { std::vector<std::unique_ptr<UploadElementReader>> element_readers; element_readers.push_back( std::make_unique<UploadBytesElementReader>("foo", 3)); @@ -10392,7 +10415,7 @@ // Test the request-challenge-retry sequence for basic auth when there is // an identity in the URL. The request should be sent as normal, but when // it fails the identity from the URL is used to answer the challenge. -TEST_F(HttpNetworkTransactionTest, AuthIdentityInURL) { +TEST_P(HttpNetworkTransactionTest, AuthIdentityInURL) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("http://foo:b@r@www.example.org/"); @@ -10471,7 +10494,7 @@ // Test the request-challenge-retry sequence for basic auth when there is an // incorrect identity in the URL. The identity from the URL should be used only // once. -TEST_F(HttpNetworkTransactionTest, WrongAuthIdentityInURL) { +TEST_P(HttpNetworkTransactionTest, WrongAuthIdentityInURL) { HttpRequestInfo request; request.method = "GET"; // Note: the URL has a username:password in it. The password "baz" is @@ -10578,11 +10601,10 @@ base::RunLoop().RunUntilIdle(); } - // Test the request-challenge-retry sequence for basic auth when there is a // correct identity in the URL, but its use is being suppressed. The identity // from the URL should never be used. -TEST_F(HttpNetworkTransactionTest, AuthIdentityInURLSuppressed) { +TEST_P(HttpNetworkTransactionTest, AuthIdentityInURLSuppressed) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("http://foo:bar@www.example.org/"); @@ -10659,7 +10681,7 @@ } // Test that previously tried username/passwords for a realm get re-used. -TEST_F(HttpNetworkTransactionTest, BasicAuthCacheAndPreauth) { +TEST_P(HttpNetworkTransactionTest, BasicAuthCacheAndPreauth) { std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_)); // Transaction 1: authenticate (foo, bar) on MyRealm1 @@ -11043,7 +11065,7 @@ // Tests that nonce count increments when multiple auth attempts // are started with the same nonce. -TEST_F(HttpNetworkTransactionTest, DigestPreAuthNonceCount) { +TEST_P(HttpNetworkTransactionTest, DigestPreAuthNonceCount) { auto digest_factory = std::make_unique<HttpAuthHandlerDigest::Factory>(); auto nonce_generator = std::make_unique<HttpAuthHandlerDigest::FixedNonceGenerator>( @@ -11177,7 +11199,7 @@ } // Test the ResetStateForRestart() private method. -TEST_F(HttpNetworkTransactionTest, ResetStateForRestart) { +TEST_P(HttpNetworkTransactionTest, ResetStateForRestart) { // Create a transaction (the dependencies aren't important). std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_)); HttpNetworkTransaction trans(DEFAULT_PRIORITY, session.get()); @@ -11208,7 +11230,7 @@ } // Test HTTPS connections to a site with a bad certificate -TEST_F(HttpNetworkTransactionTest, HTTPSBadCertificate) { +TEST_P(HttpNetworkTransactionTest, HTTPSBadCertificate) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("https://www.example.org/"); @@ -11264,7 +11286,7 @@ // Test HTTPS connections to a site with a bad certificate, going through a // proxy -TEST_F(HttpNetworkTransactionTest, HTTPSBadCertificateViaProxy) { +TEST_P(HttpNetworkTransactionTest, HTTPSBadCertificateViaProxy) { session_deps_.proxy_resolution_service = ConfiguredProxyResolutionService::CreateFixedForTest( "myproxy:70", TRAFFIC_ANNOTATION_FOR_TESTS); @@ -11340,9 +11362,8 @@ } } - // Test HTTPS connections to a site, going through an HTTPS proxy -TEST_F(HttpNetworkTransactionTest, HTTPSViaHttpsProxy) { +TEST_P(HttpNetworkTransactionTest, HTTPSViaHttpsProxy) { session_deps_.proxy_resolution_service = ConfiguredProxyResolutionService::CreateFixedFromPacResultForTest( "HTTPS proxy:70", TRAFFIC_ANNOTATION_FOR_TESTS); @@ -11406,7 +11427,7 @@ } // Test that an HTTPS Proxy cannot redirect a CONNECT request for main frames. -TEST_F(HttpNetworkTransactionTest, RedirectOfHttpsConnectViaHttpsProxy) { +TEST_P(HttpNetworkTransactionTest, RedirectOfHttpsConnectViaHttpsProxy) { session_deps_.proxy_resolution_service = ConfiguredProxyResolutionService::CreateFixedFromPacResultForTest( "HTTPS proxy:70", TRAFFIC_ANNOTATION_FOR_TESTS); @@ -11471,7 +11492,7 @@ } // Test that an HTTPS Proxy cannot redirect a CONNECT request for subresources. -TEST_F(HttpNetworkTransactionTest, +TEST_P(HttpNetworkTransactionTest, RedirectOfHttpsConnectSubresourceViaHttpsProxy) { base::HistogramTester histograms; session_deps_.proxy_resolution_service = @@ -11518,7 +11539,7 @@ // Test that an HTTPS Proxy which was auto-detected cannot redirect a CONNECT // request for main frames. -TEST_F(HttpNetworkTransactionTest, +TEST_P(HttpNetworkTransactionTest, RedirectOfHttpsConnectViaAutoDetectedHttpsProxy) { base::HistogramTester histograms; session_deps_.proxy_resolution_service = ConfiguredProxyResolutionService:: @@ -11566,7 +11587,7 @@ // Tests that an HTTPS (SPDY) Proxy's cannot redirect a CONNECT request for main // frames. -TEST_F(HttpNetworkTransactionTest, RedirectOfHttpsConnectViaSpdyProxy) { +TEST_P(HttpNetworkTransactionTest, RedirectOfHttpsConnectViaSpdyProxy) { base::HistogramTester histograms; session_deps_.proxy_resolution_service = ConfiguredProxyResolutionService::CreateFixedForTest( @@ -11638,7 +11659,7 @@ } // Test that an HTTPS proxy's response to a CONNECT request is filtered. -TEST_F(HttpNetworkTransactionTest, ErrorResponseToHttpsConnectViaHttpsProxy) { +TEST_P(HttpNetworkTransactionTest, ErrorResponseToHttpsConnectViaHttpsProxy) { session_deps_.proxy_resolution_service = ConfiguredProxyResolutionService::CreateFixedForTest( "https://proxy:70", TRAFFIC_ANNOTATION_FOR_TESTS); @@ -11683,7 +11704,7 @@ } // Test that a SPDY proxy's response to a CONNECT request is filtered. -TEST_F(HttpNetworkTransactionTest, ErrorResponseToHttpsConnectViaSpdyProxy) { +TEST_P(HttpNetworkTransactionTest, ErrorResponseToHttpsConnectViaSpdyProxy) { session_deps_.proxy_resolution_service = ConfiguredProxyResolutionService::CreateFixedForTest( "https://proxy:70", TRAFFIC_ANNOTATION_FOR_TESTS); @@ -11739,7 +11760,7 @@ // Test the request-challenge-retry sequence for basic auth, through // a SPDY proxy over a single SPDY session. -TEST_F(HttpNetworkTransactionTest, BasicAuthSpdyProxy) { +TEST_P(HttpNetworkTransactionTest, BasicAuthSpdyProxy) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("https://www.example.org/"); @@ -11881,7 +11902,7 @@ // Test HTTPS connections to a site with a bad certificate, going through an // HTTPS proxy -TEST_F(HttpNetworkTransactionTest, HTTPSBadCertificateViaHttpsProxy) { +TEST_P(HttpNetworkTransactionTest, HTTPSBadCertificateViaHttpsProxy) { session_deps_.proxy_resolution_service = ConfiguredProxyResolutionService::CreateFixedForTest( "https://proxy:70", TRAFFIC_ANNOTATION_FOR_TESTS); @@ -11960,7 +11981,7 @@ EXPECT_EQ(100, response->headers->GetContentLength()); } -TEST_F(HttpNetworkTransactionTest, BuildRequest_UserAgent) { +TEST_P(HttpNetworkTransactionTest, BuildRequest_UserAgent) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("http://www.example.org/"); @@ -12000,7 +12021,7 @@ EXPECT_THAT(rv, IsOk()); } -TEST_F(HttpNetworkTransactionTest, BuildRequest_UserAgentOverTunnel) { +TEST_P(HttpNetworkTransactionTest, BuildRequest_UserAgentOverTunnel) { // Test user agent values, used both for the request header of the original // request, and the value returned by the HttpUserAgentSettings. nullptr means // no request header / no HttpUserAgentSettings object. @@ -12070,7 +12091,7 @@ } } -TEST_F(HttpNetworkTransactionTest, BuildRequest_Referer) { +TEST_P(HttpNetworkTransactionTest, BuildRequest_Referer) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("http://www.example.org/"); @@ -12110,7 +12131,7 @@ EXPECT_THAT(rv, IsOk()); } -TEST_F(HttpNetworkTransactionTest, BuildRequest_PostContentLengthZero) { +TEST_P(HttpNetworkTransactionTest, BuildRequest_PostContentLengthZero) { HttpRequestInfo request; request.method = "POST"; request.url = GURL("http://www.example.org/"); @@ -12148,7 +12169,7 @@ EXPECT_THAT(rv, IsOk()); } -TEST_F(HttpNetworkTransactionTest, BuildRequest_PutContentLengthZero) { +TEST_P(HttpNetworkTransactionTest, BuildRequest_PutContentLengthZero) { HttpRequestInfo request; request.method = "PUT"; request.url = GURL("http://www.example.org/"); @@ -12186,7 +12207,7 @@ EXPECT_THAT(rv, IsOk()); } -TEST_F(HttpNetworkTransactionTest, BuildRequest_HeadContentLengthZero) { +TEST_P(HttpNetworkTransactionTest, BuildRequest_HeadContentLengthZero) { HttpRequestInfo request; request.method = "HEAD"; request.url = GURL("http://www.example.org/"); @@ -12222,7 +12243,7 @@ EXPECT_THAT(rv, IsOk()); } -TEST_F(HttpNetworkTransactionTest, BuildRequest_CacheControlNoCache) { +TEST_P(HttpNetworkTransactionTest, BuildRequest_CacheControlNoCache) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("http://www.example.org/"); @@ -12262,7 +12283,7 @@ EXPECT_THAT(rv, IsOk()); } -TEST_F(HttpNetworkTransactionTest, BuildRequest_CacheControlValidateCache) { +TEST_P(HttpNetworkTransactionTest, BuildRequest_CacheControlValidateCache) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("http://www.example.org/"); @@ -12301,7 +12322,7 @@ EXPECT_THAT(rv, IsOk()); } -TEST_F(HttpNetworkTransactionTest, BuildRequest_ExtraHeaders) { +TEST_P(HttpNetworkTransactionTest, BuildRequest_ExtraHeaders) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("http://www.example.org/"); @@ -12340,7 +12361,7 @@ EXPECT_THAT(rv, IsOk()); } -TEST_F(HttpNetworkTransactionTest, BuildRequest_ExtraHeadersStripped) { +TEST_P(HttpNetworkTransactionTest, BuildRequest_ExtraHeadersStripped) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("http://www.example.org/"); @@ -12383,7 +12404,7 @@ EXPECT_THAT(rv, IsOk()); } -TEST_F(HttpNetworkTransactionTest, SOCKS4_HTTP_GET) { +TEST_P(HttpNetworkTransactionTest, SOCKS4_HTTP_GET) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("http://www.example.org/"); @@ -12439,7 +12460,7 @@ EXPECT_EQ("Payload", response_text); } -TEST_F(HttpNetworkTransactionTest, SOCKS4_SSL_GET) { +TEST_P(HttpNetworkTransactionTest, SOCKS4_SSL_GET) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("https://www.example.org/"); @@ -12500,7 +12521,7 @@ EXPECT_EQ("Payload", response_text); } -TEST_F(HttpNetworkTransactionTest, SOCKS4_HTTP_GET_no_PAC) { +TEST_P(HttpNetworkTransactionTest, SOCKS4_HTTP_GET_no_PAC) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("http://www.example.org/"); @@ -12555,7 +12576,7 @@ EXPECT_EQ("Payload", response_text); } -TEST_F(HttpNetworkTransactionTest, SOCKS5_HTTP_GET) { +TEST_P(HttpNetworkTransactionTest, SOCKS5_HTTP_GET) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("http://www.example.org/"); @@ -12623,7 +12644,7 @@ EXPECT_EQ("Payload", response_text); } -TEST_F(HttpNetworkTransactionTest, SOCKS5_SSL_GET) { +TEST_P(HttpNetworkTransactionTest, SOCKS5_SSL_GET) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("https://www.example.org/"); @@ -12741,7 +12762,7 @@ } // namespace -TEST_F(HttpNetworkTransactionTest, GroupIdForDirectConnections) { +TEST_P(HttpNetworkTransactionTest, GroupIdForDirectConnections) { const GroupIdTest tests[] = { { "", // unused @@ -12819,7 +12840,7 @@ } } -TEST_F(HttpNetworkTransactionTest, GroupIdForHTTPProxyConnections) { +TEST_P(HttpNetworkTransactionTest, GroupIdForHTTPProxyConnections) { const GroupIdTest tests[] = { { "http_proxy", @@ -12879,7 +12900,7 @@ } } -TEST_F(HttpNetworkTransactionTest, GroupIdForSOCKSConnections) { +TEST_P(HttpNetworkTransactionTest, GroupIdForSOCKSConnections) { const GroupIdTest tests[] = { { "socks4://socks_proxy:1080", @@ -12960,7 +12981,7 @@ } } -TEST_F(HttpNetworkTransactionTest, ReconsiderProxyAfterFailedConnection) { +TEST_P(HttpNetworkTransactionTest, ReconsiderProxyAfterFailedConnection) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("http://www.example.org/"); @@ -12988,7 +13009,7 @@ } // Make sure we can handle an error when writing the request. -TEST_F(HttpNetworkTransactionTest, RequestWriteError) { +TEST_P(HttpNetworkTransactionTest, RequestWriteError) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("http://www.foo.com/"); @@ -13018,7 +13039,7 @@ } // Check that a connection closed after the start of the headers finishes ok. -TEST_F(HttpNetworkTransactionTest, ConnectionClosedAfterStartOfHeaders) { +TEST_P(HttpNetworkTransactionTest, ConnectionClosedAfterStartOfHeaders) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("http://www.foo.com/"); @@ -13062,7 +13083,7 @@ // Make sure that a dropped connection while draining the body for auth // restart does the right thing. -TEST_F(HttpNetworkTransactionTest, DrainResetOK) { +TEST_P(HttpNetworkTransactionTest, DrainResetOK) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("http://www.example.org/"); @@ -13139,7 +13160,7 @@ } // Test HTTPS connections going through a proxy that sends extra data. -TEST_F(HttpNetworkTransactionTest, HTTPSViaProxyWithExtraData) { +TEST_P(HttpNetworkTransactionTest, HTTPSViaProxyWithExtraData) { session_deps_.proxy_resolution_service = ConfiguredProxyResolutionService::CreateFixedForTest( "myproxy:70", TRAFFIC_ANNOTATION_FOR_TESTS); @@ -13175,7 +13196,7 @@ EXPECT_THAT(rv, IsError(ERR_TUNNEL_CONNECTION_FAILED)); } -TEST_F(HttpNetworkTransactionTest, LargeContentLengthThenClose) { +TEST_P(HttpNetworkTransactionTest, LargeContentLengthThenClose) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("http://www.example.org/"); @@ -13211,7 +13232,7 @@ EXPECT_THAT(rv, IsError(ERR_CONTENT_LENGTH_MISMATCH)); } -TEST_F(HttpNetworkTransactionTest, UploadFileSmallerThanLength) { +TEST_P(HttpNetworkTransactionTest, UploadFileSmallerThanLength) { base::FilePath temp_file_path; ASSERT_TRUE(base::CreateTemporaryFile(&temp_file_path)); const uint64_t kFakeSize = 100000; // file is actually blank @@ -13258,7 +13279,7 @@ base::DeleteFile(temp_file_path); } -TEST_F(HttpNetworkTransactionTest, UploadUnreadableFile) { +TEST_P(HttpNetworkTransactionTest, UploadUnreadableFile) { base::FilePath temp_file; ASSERT_TRUE(base::CreateTemporaryFile(&temp_file)); std::string temp_file_content("Unreadable file."); @@ -13296,7 +13317,7 @@ base::DeleteFile(temp_file); } -TEST_F(HttpNetworkTransactionTest, CancelDuringInitRequestBody) { +TEST_P(HttpNetworkTransactionTest, CancelDuringInitRequestBody) { class FakeUploadElementReader : public UploadElementReader { public: FakeUploadElementReader() = default; @@ -13356,7 +13377,7 @@ } // Tests that changes to Auth realms are treated like auth rejections. -TEST_F(HttpNetworkTransactionTest, ChangeAuthRealms) { +TEST_P(HttpNetworkTransactionTest, ChangeAuthRealms) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("http://www.example.org/"); @@ -13508,7 +13529,7 @@ } // Regression test for https://crbug.com/754395. -TEST_F(HttpNetworkTransactionTest, IgnoreAltSvcWithInvalidCert) { +TEST_P(HttpNetworkTransactionTest, IgnoreAltSvcWithInvalidCert) { MockRead data_reads[] = { MockRead("HTTP/1.1 200 OK\r\n"), MockRead(kAlternativeServiceHttpHeader), @@ -13568,7 +13589,7 @@ .empty()); } -TEST_F(HttpNetworkTransactionTest, HonorAlternativeServiceHeader) { +TEST_P(HttpNetworkTransactionTest, HonorAlternativeServiceHeader) { MockRead data_reads[] = { MockRead("HTTP/1.1 200 OK\r\n"), MockRead(kAlternativeServiceHttpHeader), @@ -13630,7 +13651,7 @@ alternative_service_info_vector[0].alternative_service()); } -TEST_F(HttpNetworkTransactionTest, +TEST_P(HttpNetworkTransactionTest, HonorAlternativeServiceHeaderWithNetworkAnonymizationKey) { base::test::ScopedFeatureList feature_list; feature_list.InitWithFeatures( @@ -13730,7 +13751,7 @@ } // Regression test for https://crbug.com/615497. -TEST_F(HttpNetworkTransactionTest, +TEST_P(HttpNetworkTransactionTest, DoNotParseAlternativeServiceHeaderOnInsecureRequest) { MockRead data_reads[] = { MockRead("HTTP/1.1 200 OK\r\n"), @@ -13786,7 +13807,7 @@ // HTTP/2 Alternative Services should be disabled by default. // TODO(bnc): Remove when https://crbug.com/615413 is fixed. -TEST_F(HttpNetworkTransactionTest, +TEST_P(HttpNetworkTransactionTest, DisableHTTP2AlternativeServicesWithDifferentHost) { session_deps_.enable_http2_alternative_service = false; @@ -13833,7 +13854,7 @@ // Regression test for https://crbug.com/615497: // Alternative Services should be disabled for http origin. -TEST_F(HttpNetworkTransactionTest, +TEST_P(HttpNetworkTransactionTest, DisableAlternativeServicesForInsecureOrigin) { HttpRequestInfo request; request.method = "GET"; @@ -13872,7 +13893,7 @@ EXPECT_THAT(callback.GetResult(rv), IsError(ERR_CONNECTION_REFUSED)); } -TEST_F(HttpNetworkTransactionTest, ClearAlternativeServices) { +TEST_P(HttpNetworkTransactionTest, ClearAlternativeServices) { // Set an alternative service for origin. std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_)); HttpServerProperties* http_server_properties = @@ -13935,7 +13956,7 @@ .empty()); } -TEST_F(HttpNetworkTransactionTest, HonorMultipleAlternativeServiceHeaders) { +TEST_P(HttpNetworkTransactionTest, HonorMultipleAlternativeServiceHeaders) { MockRead data_reads[] = { MockRead("HTTP/1.1 200 OK\r\n"), MockRead("Alt-Svc: h2=\"www.example.com:443\","), @@ -14002,7 +14023,7 @@ alternative_service_info_vector[1].alternative_service()); } -TEST_F(HttpNetworkTransactionTest, IdentifyQuicBroken) { +TEST_P(HttpNetworkTransactionTest, IdentifyQuicBroken) { url::SchemeHostPort server("https", "origin.example.org", 443); HostPortPair alternative("alternative.example.org", 443); std::string origin_url = "https://origin.example.org:443"; @@ -14062,7 +14083,7 @@ EXPECT_TRUE(details.quic_broken); } -TEST_F(HttpNetworkTransactionTest, IdentifyQuicNotBroken) { +TEST_P(HttpNetworkTransactionTest, IdentifyQuicNotBroken) { url::SchemeHostPort server("https", "origin.example.org", 443); HostPortPair alternative1("alternative1.example.org", 443); HostPortPair alternative2("alternative2.example.org", 443); @@ -14141,7 +14162,7 @@ EXPECT_FALSE(details.quic_broken); } -TEST_F(HttpNetworkTransactionTest, MarkBrokenAlternateProtocolAndFallback) { +TEST_P(HttpNetworkTransactionTest, MarkBrokenAlternateProtocolAndFallback) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("https://www.example.org/"); @@ -14208,7 +14229,7 @@ // to an unrestricted (port >= 1024) when the original traffic was on a // restricted port (port < 1024). Ensure that we can redirect in all other // cases. -TEST_F(HttpNetworkTransactionTest, AlternateProtocolPortRestrictedBlocked) { +TEST_P(HttpNetworkTransactionTest, AlternateProtocolPortRestrictedBlocked) { HttpRequestInfo restricted_port_request; restricted_port_request.method = "GET"; restricted_port_request.url = GURL("https://www.example.org:1023/"); @@ -14257,7 +14278,7 @@ // Ensure that we are allowed to redirect traffic via an alternate protocol to // an unrestricted (port >= 1024) when the original traffic was on a restricted // port (port < 1024) if we set |enable_user_alternate_protocol_ports|. -TEST_F(HttpNetworkTransactionTest, AlternateProtocolPortRestrictedPermitted) { +TEST_P(HttpNetworkTransactionTest, AlternateProtocolPortRestrictedPermitted) { session_deps_.enable_user_alternate_protocol_ports = true; HttpRequestInfo restricted_port_request; @@ -14309,7 +14330,7 @@ // to an unrestricted (port >= 1024) when the original traffic was on a // restricted port (port < 1024). Ensure that we can redirect in all other // cases. -TEST_F(HttpNetworkTransactionTest, AlternateProtocolPortRestrictedAllowed) { +TEST_P(HttpNetworkTransactionTest, AlternateProtocolPortRestrictedAllowed) { HttpRequestInfo restricted_port_request; restricted_port_request.method = "GET"; restricted_port_request.url = GURL("https://www.example.org:1023/"); @@ -14359,7 +14380,7 @@ // to an unrestricted (port >= 1024) when the original traffic was on a // restricted port (port < 1024). Ensure that we can redirect in all other // cases. -TEST_F(HttpNetworkTransactionTest, AlternateProtocolPortUnrestrictedAllowed1) { +TEST_P(HttpNetworkTransactionTest, AlternateProtocolPortUnrestrictedAllowed1) { HttpRequestInfo unrestricted_port_request; unrestricted_port_request.method = "GET"; unrestricted_port_request.url = GURL("https://www.example.org:1024/"); @@ -14409,7 +14430,7 @@ // to an unrestricted (port >= 1024) when the original traffic was on a // restricted port (port < 1024). Ensure that we can redirect in all other // cases. -TEST_F(HttpNetworkTransactionTest, AlternateProtocolPortUnrestrictedAllowed2) { +TEST_P(HttpNetworkTransactionTest, AlternateProtocolPortUnrestrictedAllowed2) { HttpRequestInfo unrestricted_port_request; unrestricted_port_request.method = "GET"; unrestricted_port_request.url = GURL("https://www.example.org:1024/"); @@ -14458,7 +14479,7 @@ // Ensure that we are not allowed to redirect traffic via an alternate protocol // to an unsafe port, and that we resume the second HttpStreamFactory::Job once // the alternate protocol request fails. -TEST_F(HttpNetworkTransactionTest, AlternateProtocolUnsafeBlocked) { +TEST_P(HttpNetworkTransactionTest, AlternateProtocolUnsafeBlocked) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("http://www.example.org/"); @@ -14505,7 +14526,7 @@ EXPECT_EQ("hello world", response_data); } -TEST_F(HttpNetworkTransactionTest, UseAlternateProtocolForNpnSpdy) { +TEST_P(HttpNetworkTransactionTest, UseAlternateProtocolForNpnSpdy) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("https://www.example.org/"); @@ -14587,7 +14608,7 @@ EXPECT_EQ("hello!", response_data); } -TEST_F(HttpNetworkTransactionTest, AlternateProtocolWithSpdyLateBinding) { +TEST_P(HttpNetworkTransactionTest, AlternateProtocolWithSpdyLateBinding) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("https://www.example.org/"); @@ -14704,7 +14725,7 @@ EXPECT_EQ("hello!", response_data); } -TEST_F(HttpNetworkTransactionTest, StallAlternativeServiceForNpnSpdy) { +TEST_P(HttpNetworkTransactionTest, StallAlternativeServiceForNpnSpdy) { session_deps_.host_resolver->set_synchronous_mode(true); HttpRequestInfo request; @@ -14784,7 +14805,7 @@ // Test that proxy is resolved using the origin url, // regardless of the alternative server. -TEST_F(HttpNetworkTransactionTest, UseOriginNotAlternativeForProxy) { +TEST_P(HttpNetworkTransactionTest, UseOriginNotAlternativeForProxy) { // Configure proxy to bypass www.example.org, which is the origin URL. ProxyConfig proxy_config; proxy_config.proxy_rules().ParseFromString("myproxy:70"); @@ -14868,7 +14889,7 @@ ASSERT_TRUE(capturing_proxy_resolver.lookup_info().empty()); } -TEST_F(HttpNetworkTransactionTest, UseAlternativeServiceForTunneledNpnSpdy) { +TEST_P(HttpNetworkTransactionTest, UseAlternativeServiceForTunneledNpnSpdy) { ProxyConfig proxy_config; proxy_config.set_auto_detect(true); proxy_config.set_pac_url(GURL("http://fooproxyurl")); @@ -14986,7 +15007,7 @@ CONNECT_TIMING_HAS_SSL_TIMES); } -TEST_F(HttpNetworkTransactionTest, +TEST_P(HttpNetworkTransactionTest, UseAlternativeServiceForNpnSpdyWithExistingSpdySession) { HttpRequestInfo request; request.method = "GET"; @@ -15088,7 +15109,7 @@ // potentially running up to three rounds in each of the tests. The TestConfig // specifies both the configuration for the test as well as the expectations // for the results. -TEST_F(HttpNetworkTransactionTest, GenerateAuthToken) { +TEST_P(HttpNetworkTransactionTest, GenerateAuthToken) { static const char kServer[] = "http://www.example.com"; static const char kSecureServer[] = "https://www.example.com"; static const char kProxy[] = "myproxy:70"; @@ -16012,7 +16033,7 @@ } } -TEST_F(HttpNetworkTransactionTest, MultiRoundAuth) { +TEST_P(HttpNetworkTransactionTest, MultiRoundAuth) { // Do multi-round authentication and make sure it works correctly. auto auth_factory = std::make_unique<HttpAuthHandlerMock::Factory>(); auto* auth_factory_ptr = auth_factory.get(); @@ -16219,7 +16240,7 @@ // This tests the case that a request is issued via http instead of spdy after // npn is negotiated. -TEST_F(HttpNetworkTransactionTest, NpnWithHttpOverSSL) { +TEST_P(HttpNetworkTransactionTest, NpnWithHttpOverSSL) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("https://www.example.org/"); @@ -16275,7 +16296,7 @@ // Simulate the SSL handshake completing with a ALPN negotiation followed by an // immediate server closing of the socket. // Regression test for https://crbug.com/46369. -TEST_F(HttpNetworkTransactionTest, SpdyPostALPNServerHangup) { +TEST_P(HttpNetworkTransactionTest, SpdyPostALPNServerHangup) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("https://www.example.org/"); @@ -16332,7 +16353,7 @@ // Test that if we cancel the transaction as the connection is completing, that // everything tears down correctly. -TEST_F(HttpNetworkTransactionTest, SimpleCancel) { +TEST_P(HttpNetworkTransactionTest, SimpleCancel) { // Setup everything about the connection to complete synchronously, so that // after calling HttpNetworkTransaction::Start, the only thing we're waiting // for is the callback from the HttpStreamRequest. @@ -16375,7 +16396,7 @@ // from after the HttpNetworkTransaction and the objects it owns have been // deleted. // See http://crbug.com/368418 -TEST_F(HttpNetworkTransactionTest, CancelAfterHeaders) { +TEST_P(HttpNetworkTransactionTest, CancelAfterHeaders) { MockRead data_reads[] = { MockRead(ASYNC, "HTTP/1.1 200 OK\r\n"), MockRead(ASYNC, "Content-Length: 2\r\n"), @@ -16421,7 +16442,7 @@ } // Test a basic GET request through a proxy. -TEST_F(HttpNetworkTransactionTest, ProxyGet) { +TEST_P(HttpNetworkTransactionTest, ProxyGet) { session_deps_.proxy_resolution_service = ConfiguredProxyResolutionService::CreateFixedFromPacResultForTest( "PROXY myproxy:70", TRAFFIC_ANNOTATION_FOR_TESTS); @@ -16489,7 +16510,7 @@ } // Test a basic HTTPS GET request through a proxy. -TEST_F(HttpNetworkTransactionTest, ProxyTunnelGet) { +TEST_P(HttpNetworkTransactionTest, ProxyTunnelGet) { session_deps_.proxy_resolution_service = ConfiguredProxyResolutionService::CreateFixedFromPacResultForTest( "PROXY myproxy:70", TRAFFIC_ANNOTATION_FOR_TESTS); @@ -16574,7 +16595,7 @@ // Test a basic HTTPS GET request through a proxy, connecting to an IPv6 // literal host. -TEST_F(HttpNetworkTransactionTest, ProxyTunnelGetIPv6) { +TEST_P(HttpNetworkTransactionTest, ProxyTunnelGetIPv6) { session_deps_.proxy_resolution_service = ConfiguredProxyResolutionService::CreateFixedFromPacResultForTest( "PROXY myproxy:70", TRAFFIC_ANNOTATION_FOR_TESTS); @@ -16652,7 +16673,7 @@ // Test a basic HTTPS GET request through a proxy, but the server hangs up // while establishing the tunnel. -TEST_F(HttpNetworkTransactionTest, ProxyTunnelGetHangup) { +TEST_P(HttpNetworkTransactionTest, ProxyTunnelGetHangup) { session_deps_.proxy_resolution_service = ConfiguredProxyResolutionService::CreateFixedForTest( "myproxy:70", TRAFFIC_ANNOTATION_FOR_TESTS); @@ -16708,7 +16729,7 @@ } // Test for crbug.com/55424. -TEST_F(HttpNetworkTransactionTest, PreconnectWithExistingSpdySession) { +TEST_P(HttpNetworkTransactionTest, PreconnectWithExistingSpdySession) { spdy::SpdySerializedFrame req( spdy_util_.ConstructSpdyGet("https://www.example.org", 1, LOWEST)); MockWrite spdy_writes[] = {CreateMockWrite(req, 0)}; @@ -16754,8 +16775,8 @@ // Given a net error, cause that error to be returned from the first Write() // call and verify that the HttpNetworkTransaction fails with that error. -void HttpNetworkTransactionTest::CheckErrorIsPassedBack( - int error, IoMode mode) { +void HttpNetworkTransactionTestBase::CheckErrorIsPassedBack(int error, + IoMode mode) { HttpRequestInfo request_info; request_info.url = GURL("https://www.example.com/"); request_info.method = "GET"; @@ -16781,7 +16802,7 @@ ASSERT_EQ(error, rv); } -TEST_F(HttpNetworkTransactionTest, SSLWriteCertError) { +TEST_P(HttpNetworkTransactionTest, SSLWriteCertError) { // Just check a grab bag of cert errors. static const int kErrors[] = { ERR_CERT_COMMON_NAME_INVALID, @@ -16800,7 +16821,7 @@ // 2) TLS False Start is disabled. // 3) The initial TLS handshake requests a client certificate. // 4) The client supplies an invalid/unacceptable certificate. -TEST_F(HttpNetworkTransactionTest, ClientAuthCertCache_Direct_NoFalseStart) { +TEST_P(HttpNetworkTransactionTest, ClientAuthCertCache_Direct_NoFalseStart) { HttpRequestInfo request_info; request_info.url = GURL("https://www.example.com/"); request_info.method = "GET"; @@ -16892,7 +16913,7 @@ // 2) TLS False Start is enabled. // 3) The initial TLS handshake requests a client certificate. // 4) The client supplies an invalid/unacceptable certificate. -TEST_F(HttpNetworkTransactionTest, ClientAuthCertCache_Direct_FalseStart) { +TEST_P(HttpNetworkTransactionTest, ClientAuthCertCache_Direct_FalseStart) { HttpRequestInfo request_info; request_info.url = GURL("https://www.example.com/"); request_info.method = "GET"; @@ -17010,7 +17031,7 @@ // 3) The HTTPS proxy requests a client certificate. // 4) The client supplies an invalid/unacceptable certificate for the // proxy. -TEST_F(HttpNetworkTransactionTest, ClientAuthCertCache_Proxy_Fail) { +TEST_P(HttpNetworkTransactionTest, ClientAuthCertCache_Proxy_Fail) { session_deps_.proxy_resolution_service = ConfiguredProxyResolutionService::CreateFixedForTest( "https://proxy:70", TRAFFIC_ANNOTATION_FOR_TESTS); @@ -17163,7 +17184,7 @@ // Test that HttpNetworkTransaction correctly handles (mocked) certificate // requests during a TLS renegotiation. -TEST_F(HttpNetworkTransactionTest, CertificateRequestInRenego) { +TEST_P(HttpNetworkTransactionTest, CertificateRequestInRenego) { HttpRequestInfo request_info; request_info.url = GURL("https://www.example.com/"); request_info.method = "GET"; @@ -17245,7 +17266,7 @@ EXPECT_TRUE(client_cert->EqualsIncludingChain(identity->certificate())); } -TEST_F(HttpNetworkTransactionTest, UseIPConnectionPooling) { +TEST_P(HttpNetworkTransactionTest, UseIPConnectionPooling) { // Set up a special HttpNetworkSession with a MockCachingHostResolver. session_deps_.host_resolver = std::make_unique<MockCachingHostResolver>(); session_deps_.host_resolver->rules()->AddRule("www.example.org", "1.2.3.4"); @@ -17331,7 +17352,7 @@ EXPECT_EQ("hello!", response_data); } -TEST_F(HttpNetworkTransactionTest, UseIPConnectionPoolingAfterResolution) { +TEST_P(HttpNetworkTransactionTest, UseIPConnectionPoolingAfterResolution) { // Set up a special HttpNetworkSession with a MockCachingHostResolver. session_deps_.host_resolver = std::make_unique<MockCachingHostResolver>(); session_deps_.host_resolver->rules()->AddRule("www.example.org", "1.2.3.4"); @@ -17415,7 +17436,7 @@ // The server might not be able to serve an IP pooled request, and might send a // 421 Misdirected Request response status to indicate this. // HttpNetworkTransaction should reset the request and retry without IP pooling. -TEST_F(HttpNetworkTransactionTest, RetryWithoutConnectionPooling) { +TEST_P(HttpNetworkTransactionTest, RetryWithoutConnectionPooling) { // Two hosts resolve to the same IP address. const std::string ip_addr = "1.2.3.4"; IPAddress ip; @@ -17459,7 +17480,7 @@ AddSSLSocketData(); // Retry the second request on a second connection. - SpdyTestUtil spdy_util2; + SpdyTestUtil spdy_util2(/*use_priority_header=*/true); spdy::SpdySerializedFrame req3( spdy_util2.ConstructSpdyGet("https://mail.example.org", 1, LOWEST)); MockWrite writes2[] = { @@ -17541,7 +17562,7 @@ // Test that HTTP 421 responses are properly returned to the caller if received // on the retry as well. HttpNetworkTransaction should not infinite loop or lose // portions of the response. -TEST_F(HttpNetworkTransactionTest, ReturnHTTP421OnRetry) { +TEST_P(HttpNetworkTransactionTest, ReturnHTTP421OnRetry) { // Two hosts resolve to the same IP address. const std::string ip_addr = "1.2.3.4"; IPAddress ip; @@ -17586,7 +17607,7 @@ // Retry the second request on a second connection. It returns 421 Misdirected // Retry again. - SpdyTestUtil spdy_util2; + SpdyTestUtil spdy_util2(/*use_priority_header=*/true); spdy::SpdySerializedFrame req3( spdy_util2.ConstructSpdyGet("https://mail.example.org", 1, LOWEST)); MockWrite writes2[] = { @@ -17662,7 +17683,7 @@ EXPECT_EQ("hello!", response_data); } -TEST_F(HttpNetworkTransactionTest, +TEST_P(HttpNetworkTransactionTest, Response421WithStreamingBodyWithNonNullSource) { const std::string ip_addr = "1.2.3.4"; IPAddress ip; @@ -17697,7 +17718,7 @@ AddSSLSocketData(); - SpdyTestUtil spdy_util2; + SpdyTestUtil spdy_util2(/*use_priority_header=*/true); spdy::SpdySerializedFrame req2 = spdy_util2.ConstructChunkedSpdyPost({}, 0); spdy::SpdySerializedFrame req2_body = spdy_util2.ConstructSpdyDataFrame(1, request_body, /*fin=*/true); @@ -17752,7 +17773,7 @@ EXPECT_EQ("hello!", response_data); } -TEST_F(HttpNetworkTransactionTest, Response421WithStreamingBodyWithNullSource) { +TEST_P(HttpNetworkTransactionTest, Response421WithStreamingBodyWithNullSource) { const std::string ip_addr = "1.2.3.4"; IPAddress ip; ASSERT_TRUE(ip.AssignFromIPLiteral(ip_addr)); @@ -17820,7 +17841,7 @@ EXPECT_EQ("hello!", response_data); } -TEST_F(HttpNetworkTransactionTest, +TEST_P(HttpNetworkTransactionTest, UseIPConnectionPoolingWithHostCacheExpiration) { // Set up HostResolver to invalidate cached entries after 1 cached resolve. session_deps_.host_resolver = @@ -17908,7 +17929,7 @@ EXPECT_EQ("hello!", response_data); } -TEST_F(HttpNetworkTransactionTest, DoNotUseSpdySessionForHttp) { +TEST_P(HttpNetworkTransactionTest, DoNotUseSpdySessionForHttp) { const std::string https_url = "https://www.example.org:8080/"; const std::string http_url = "http://www.example.org:8080/"; @@ -17989,7 +18010,7 @@ // Alternative service requires HTTP/2 (or SPDY), but HTTP/1.1 is negotiated // with the alternative server. That connection should not be used. -TEST_F(HttpNetworkTransactionTest, AlternativeServiceNotOnHttp11) { +TEST_P(HttpNetworkTransactionTest, AlternativeServiceNotOnHttp11) { url::SchemeHostPort server("https", "www.example.org", 443); HostPortPair alternative("www.example.org", 444); @@ -18037,7 +18058,7 @@ // server, and an alternate one to the alternative server. If the former // succeeds, the request should succeed, even if the latter fails because // HTTP/1.1 is negotiated which is insufficient for alternative service. -TEST_F(HttpNetworkTransactionTest, FailedAlternativeServiceIsNotUserVisible) { +TEST_P(HttpNetworkTransactionTest, FailedAlternativeServiceIsNotUserVisible) { url::SchemeHostPort server("https", "www.example.org", 443); HostPortPair alternative("www.example.org", 444); @@ -18143,7 +18164,7 @@ // Alternative service requires HTTP/2 (or SPDY), but there is already a // HTTP/1.1 socket open to the alternative server. That socket should not be // used. -TEST_F(HttpNetworkTransactionTest, AlternativeServiceShouldNotPoolToHttp11) { +TEST_P(HttpNetworkTransactionTest, AlternativeServiceShouldNotPoolToHttp11) { url::SchemeHostPort server("https", "origin.example.org", 443); HostPortPair alternative("alternative.example.org", 443); std::string origin_url = "https://origin.example.org:443"; @@ -18260,12 +18281,12 @@ EXPECT_EQ("second HTTP/1.1 response from alternative", response_data3); } -TEST_F(HttpNetworkTransactionTest, DoNotUseSpdySessionForHttpOverTunnel) { +TEST_P(HttpNetworkTransactionTest, DoNotUseSpdySessionForHttpOverTunnel) { const std::string https_url = "https://www.example.org:8080/"; const std::string http_url = "http://www.example.org:8080/"; // Separate SPDY util instance for naked and wrapped requests. - SpdyTestUtil spdy_util_wrapped; + SpdyTestUtil spdy_util_wrapped(/*use_priority_header=*/true); // SPDY GET for HTTPS URL (through CONNECT tunnel) const HostPortPair host_port_pair("www.example.org", 8080); @@ -18388,13 +18409,13 @@ // that we do not pool other origins that resolve to the same IP when // the certificate does not match the new origin. // http://crbug.com/134690 -TEST_F(HttpNetworkTransactionTest, DoNotUseSpdySessionIfCertDoesNotMatch) { +TEST_P(HttpNetworkTransactionTest, DoNotUseSpdySessionIfCertDoesNotMatch) { const std::string url1 = "http://www.example.org/"; const std::string url2 = "https://news.example.org/"; const std::string ip_addr = "1.2.3.4"; // Second SpdyTestUtil instance for the second socket. - SpdyTestUtil spdy_util_secure; + SpdyTestUtil spdy_util_secure(/*use_priority_header=*/true); // SPDY GET for HTTP URL (through SPDY proxy) spdy::Http2HeaderBlock headers( @@ -18514,7 +18535,7 @@ // error) in SPDY session, removes the socket from pool and closes the SPDY // session. Verify that new url's from the same HttpNetworkSession (and a new // SpdySession) do work. http://crbug.com/224701 -TEST_F(HttpNetworkTransactionTest, ErrorSocketNotConnected) { +TEST_P(HttpNetworkTransactionTest, ErrorSocketNotConnected) { const std::string https_url = "https://www.example.org/"; MockRead reads1[] = { @@ -18582,7 +18603,7 @@ EXPECT_TRUE(trans2.GetResponseInfo()->was_fetched_via_spdy); } -TEST_F(HttpNetworkTransactionTest, CloseIdleSpdySessionToOpenNewOne) { +TEST_P(HttpNetworkTransactionTest, CloseIdleSpdySessionToOpenNewOne) { ClientSocketPoolManager::set_max_sockets_per_group( HttpNetworkSession::NORMAL_SOCKET_POOL, 1); ClientSocketPoolManager::set_max_sockets_per_pool( @@ -18616,7 +18637,7 @@ // Use a separate test instance for the separate SpdySession that will be // created. - SpdyTestUtil spdy_util_2; + SpdyTestUtil spdy_util_2(/*use_priority_header=*/true); SequencedSocketData spdy1_data(spdy1_reads, spdy1_writes); session_deps_.socket_factory->AddSocketDataProvider(&spdy1_data); @@ -18755,7 +18776,7 @@ HasSpdySession(session->spdy_session_pool(), spdy_session_key_b)); } -TEST_F(HttpNetworkTransactionTest, HttpSyncConnectError) { +TEST_P(HttpNetworkTransactionTest, HttpSyncConnectError) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("http://www.example.org/"); @@ -18787,7 +18808,7 @@ EXPECT_TRUE(endpoint.address().empty()); } -TEST_F(HttpNetworkTransactionTest, HttpAsyncConnectError) { +TEST_P(HttpNetworkTransactionTest, HttpAsyncConnectError) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("http://www.example.org/"); @@ -18819,7 +18840,7 @@ EXPECT_TRUE(endpoint.address().empty()); } -TEST_F(HttpNetworkTransactionTest, HttpSyncWriteError) { +TEST_P(HttpNetworkTransactionTest, HttpSyncWriteError) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("http://www.example.org/"); @@ -18848,7 +18869,7 @@ EXPECT_THAT(rv, IsError(ERR_CONNECTION_RESET)); } -TEST_F(HttpNetworkTransactionTest, HttpAsyncWriteError) { +TEST_P(HttpNetworkTransactionTest, HttpAsyncWriteError) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("http://www.example.org/"); @@ -18877,7 +18898,7 @@ EXPECT_THAT(rv, IsError(ERR_CONNECTION_RESET)); } -TEST_F(HttpNetworkTransactionTest, HttpSyncReadError) { +TEST_P(HttpNetworkTransactionTest, HttpSyncReadError) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("http://www.example.org/"); @@ -18909,7 +18930,7 @@ EXPECT_THAT(rv, IsError(ERR_CONNECTION_RESET)); } -TEST_F(HttpNetworkTransactionTest, HttpAsyncReadError) { +TEST_P(HttpNetworkTransactionTest, HttpAsyncReadError) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("http://www.example.org/"); @@ -18943,7 +18964,7 @@ // Tests that when a used socket is returned to the SSL socket pool, it's closed // if the transport socket pool is stalled on the global socket limit. -TEST_F(HttpNetworkTransactionTest, CloseSSLSocketOnIdleForHttpRequest) { +TEST_P(HttpNetworkTransactionTest, CloseSSLSocketOnIdleForHttpRequest) { ClientSocketPoolManager::set_max_sockets_per_group( HttpNetworkSession::NORMAL_SOCKET_POOL, 1); ClientSocketPoolManager::set_max_sockets_per_pool( @@ -19037,7 +19058,7 @@ // Tests that when a SSL connection is established but there's no corresponding // request that needs it, the new socket is closed if the transport socket pool // is stalled on the global socket limit. -TEST_F(HttpNetworkTransactionTest, CloseSSLSocketOnIdleForHttpRequest2) { +TEST_P(HttpNetworkTransactionTest, CloseSSLSocketOnIdleForHttpRequest2) { ClientSocketPoolManager::set_max_sockets_per_group( HttpNetworkSession::NORMAL_SOCKET_POOL, 1); ClientSocketPoolManager::set_max_sockets_per_pool( @@ -19107,7 +19128,7 @@ EXPECT_EQ(1, GetIdleSocketCountInTransportSocketPool(session.get())); } -TEST_F(HttpNetworkTransactionTest, PostReadsErrorResponseAfterReset) { +TEST_P(HttpNetworkTransactionTest, PostReadsErrorResponseAfterReset) { std::vector<std::unique_ptr<UploadElementReader>> element_readers; element_readers.push_back( std::make_unique<UploadBytesElementReader>("foo", 3)); @@ -19161,7 +19182,7 @@ // This test makes sure the retry logic doesn't trigger when reading an error // response from a server that rejected a POST with a CONNECTION_RESET. -TEST_F(HttpNetworkTransactionTest, +TEST_P(HttpNetworkTransactionTest, PostReadsErrorResponseAfterResetOnReusedSocket) { std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_)); MockWrite data_writes[] = { @@ -19248,7 +19269,7 @@ EXPECT_EQ("second response", response_data2); } -TEST_F(HttpNetworkTransactionTest, +TEST_P(HttpNetworkTransactionTest, PostReadsErrorResponseAfterResetPartialBodySent) { std::vector<std::unique_ptr<UploadElementReader>> element_readers; element_readers.push_back( @@ -19304,7 +19325,7 @@ // This tests the more common case than the previous test, where headers and // body are not merged into a single request. -TEST_F(HttpNetworkTransactionTest, ChunkedPostReadsErrorResponseAfterReset) { +TEST_P(HttpNetworkTransactionTest, ChunkedPostReadsErrorResponseAfterReset) { ChunkedUploadDataStream upload_data_stream(0); HttpRequestInfo request; @@ -19360,7 +19381,7 @@ EXPECT_EQ("hello world", response_data); } -TEST_F(HttpNetworkTransactionTest, PostReadsErrorResponseAfterResetAnd100) { +TEST_P(HttpNetworkTransactionTest, PostReadsErrorResponseAfterResetAnd100) { std::vector<std::unique_ptr<UploadElementReader>> element_readers; element_readers.push_back( std::make_unique<UploadBytesElementReader>("foo", 3)); @@ -19413,7 +19434,7 @@ EXPECT_EQ("hello world", response_data); } -TEST_F(HttpNetworkTransactionTest, PostIgnoresNonErrorResponseAfterReset) { +TEST_P(HttpNetworkTransactionTest, PostIgnoresNonErrorResponseAfterReset) { std::vector<std::unique_ptr<UploadElementReader>> element_readers; element_readers.push_back( std::make_unique<UploadBytesElementReader>("foo", 3)); @@ -19454,7 +19475,7 @@ EXPECT_THAT(rv, IsError(ERR_CONNECTION_RESET)); } -TEST_F(HttpNetworkTransactionTest, +TEST_P(HttpNetworkTransactionTest, PostIgnoresNonErrorResponseAfterResetAnd100) { std::vector<std::unique_ptr<UploadElementReader>> element_readers; element_readers.push_back( @@ -19498,7 +19519,7 @@ EXPECT_THAT(rv, IsError(ERR_CONNECTION_RESET)); } -TEST_F(HttpNetworkTransactionTest, PostIgnoresHttp09ResponseAfterReset) { +TEST_P(HttpNetworkTransactionTest, PostIgnoresHttp09ResponseAfterReset) { std::vector<std::unique_ptr<UploadElementReader>> element_readers; element_readers.push_back( std::make_unique<UploadBytesElementReader>("foo", 3)); @@ -19538,7 +19559,7 @@ EXPECT_THAT(rv, IsError(ERR_CONNECTION_RESET)); } -TEST_F(HttpNetworkTransactionTest, PostIgnoresPartial400HeadersAfterReset) { +TEST_P(HttpNetworkTransactionTest, PostIgnoresPartial400HeadersAfterReset) { std::vector<std::unique_ptr<UploadElementReader>> element_readers; element_readers.push_back( std::make_unique<UploadBytesElementReader>("foo", 3)); @@ -19591,7 +19612,7 @@ } // namespace -TEST_F(HttpNetworkTransactionTest, CreateWebSocketHandshakeStream) { +TEST_P(HttpNetworkTransactionTest, CreateWebSocketHandshakeStream) { for (bool secure : {true, false}) { MockWrite data_writes[] = { MockWrite("GET / HTTP/1.1\r\n" @@ -19651,7 +19672,7 @@ // Verify that proxy headers are not sent to the destination server when // establishing a tunnel for a secure WebSocket connection. -TEST_F(HttpNetworkTransactionTest, ProxyHeadersNotSentOverWssTunnel) { +TEST_P(HttpNetworkTransactionTest, ProxyHeadersNotSentOverWssTunnel) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("wss://www.example.org/"); @@ -19758,7 +19779,7 @@ // This requires the authentication info to be injected into the auth cache // due to crbug.com/395064 // TODO(ricea): Change to use a 407 response once issue 395064 is fixed. -TEST_F(HttpNetworkTransactionTest, ProxyHeadersNotSentOverWsTunnel) { +TEST_P(HttpNetworkTransactionTest, ProxyHeadersNotSentOverWsTunnel) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("ws://www.example.org/"); @@ -19837,7 +19858,7 @@ } // WebSockets over QUIC is not supported, including over QUIC proxies. -TEST_F(HttpNetworkTransactionTest, WebSocketNotSentOverQuicProxy) { +TEST_P(HttpNetworkTransactionTest, WebSocketNotSentOverQuicProxy) { for (bool secure : {true, false}) { SCOPED_TRACE(secure); session_deps_.proxy_resolution_service = @@ -19871,7 +19892,7 @@ #endif // BUILDFLAG(ENABLE_WEBSOCKETS) -TEST_F(HttpNetworkTransactionTest, TotalNetworkBytesPost) { +TEST_P(HttpNetworkTransactionTest, TotalNetworkBytesPost) { std::vector<std::unique_ptr<UploadElementReader>> element_readers; element_readers.push_back( std::make_unique<UploadBytesElementReader>("foo", 3)); @@ -19914,7 +19935,7 @@ EXPECT_EQ(CountReadBytes(data_reads), trans.GetTotalReceivedBytes()); } -TEST_F(HttpNetworkTransactionTest, TotalNetworkBytesPost100Continue) { +TEST_P(HttpNetworkTransactionTest, TotalNetworkBytesPost100Continue) { std::vector<std::unique_ptr<UploadElementReader>> element_readers; element_readers.push_back( std::make_unique<UploadBytesElementReader>("foo", 3)); @@ -19958,7 +19979,7 @@ EXPECT_EQ(CountReadBytes(data_reads), trans.GetTotalReceivedBytes()); } -TEST_F(HttpNetworkTransactionTest, TotalNetworkBytesChunkedPost) { +TEST_P(HttpNetworkTransactionTest, TotalNetworkBytesChunkedPost) { ChunkedUploadDataStream upload_data_stream(0); HttpRequestInfo request; @@ -20061,26 +20082,26 @@ } } -TEST_F(HttpNetworkTransactionTest, MatchContentEncoding1) { +TEST_P(HttpNetworkTransactionTest, MatchContentEncoding1) { CheckContentEncodingMatching(&session_deps_, "gzip,sdch", "br", "", false); } -TEST_F(HttpNetworkTransactionTest, MatchContentEncoding2) { +TEST_P(HttpNetworkTransactionTest, MatchContentEncoding2) { CheckContentEncodingMatching(&session_deps_, "identity;q=1, *;q=0", "", "", true); } -TEST_F(HttpNetworkTransactionTest, MatchContentEncoding3) { +TEST_P(HttpNetworkTransactionTest, MatchContentEncoding3) { CheckContentEncodingMatching(&session_deps_, "identity;q=1, *;q=0", "gzip", "", false); } -TEST_F(HttpNetworkTransactionTest, MatchContentEncoding4) { +TEST_P(HttpNetworkTransactionTest, MatchContentEncoding4) { CheckContentEncodingMatching(&session_deps_, "identity;q=1, *;q=0", "gzip", "www.foo.com/other", true); } -TEST_F(HttpNetworkTransactionTest, ProxyResolutionFailsSync) { +TEST_P(HttpNetworkTransactionTest, ProxyResolutionFailsSync) { ProxyConfig proxy_config; proxy_config.set_pac_url(GURL("http://fooproxyurl")); proxy_config.set_pac_mandatory(true); @@ -20110,7 +20131,7 @@ IsError(ERR_MANDATORY_PROXY_CONFIGURATION_FAILED)); } -TEST_F(HttpNetworkTransactionTest, ProxyResolutionFailsAsync) { +TEST_P(HttpNetworkTransactionTest, ProxyResolutionFailsAsync) { ProxyConfig proxy_config; proxy_config.set_pac_url(GURL("http://fooproxyurl")); proxy_config.set_pac_mandatory(true); @@ -20144,7 +20165,7 @@ IsError(ERR_MANDATORY_PROXY_CONFIGURATION_FAILED)); } -TEST_F(HttpNetworkTransactionTest, NoSupportedProxies) { +TEST_P(HttpNetworkTransactionTest, NoSupportedProxies) { session_deps_.proxy_resolution_service = ConfiguredProxyResolutionService::CreateFixedFromPacResultForTest( "QUIC myproxy.org:443", TRAFFIC_ANNOTATION_FOR_TESTS); @@ -20170,7 +20191,7 @@ #if BUILDFLAG(ENABLE_REPORTING) class HttpNetworkTransactionReportingTest - : public HttpNetworkTransactionTest, + : public HttpNetworkTransactionTestBase, public ::testing::WithParamInterface<bool> { protected: HttpNetworkTransactionReportingTest() { @@ -20183,7 +20204,7 @@ } void SetUp() override { - HttpNetworkTransactionTest::SetUp(); + HttpNetworkTransactionTestBase::SetUp(); auto test_reporting_context = std::make_unique<TestReportingContext>( &clock_, &tick_clock_, ReportingPolicy()); test_reporting_context_ = test_reporting_context.get(); @@ -20310,7 +20331,7 @@ : public HttpNetworkTransactionTest { protected: void SetUp() override { - HttpNetworkTransactionTest::SetUp(); + HttpNetworkTransactionTestBase::SetUp(); auto network_error_logging_service = std::make_unique<TestNetworkErrorLoggingService>(); test_network_error_logging_service_ = network_error_logging_service.get(); @@ -20412,14 +20433,18 @@ test_network_error_logging_service_; }; -TEST_F(HttpNetworkTransactionNetworkErrorLoggingTest, +INSTANTIATE_TEST_SUITE_P(All, + HttpNetworkTransactionNetworkErrorLoggingTest, + testing::Values(true, false)); + +TEST_P(HttpNetworkTransactionNetworkErrorLoggingTest, DontProcessNelHeaderNoService) { clear_network_error_logging_service(); RequestPolicy(); // No crash. } -TEST_F(HttpNetworkTransactionNetworkErrorLoggingTest, +TEST_P(HttpNetworkTransactionNetworkErrorLoggingTest, DontProcessNelHeaderHttp) { url_ = "http://www.example.org/"; request_.url = GURL(url_); @@ -20428,7 +20453,7 @@ } // Don't set NEL policies received on a proxied connection. -TEST_F(HttpNetworkTransactionNetworkErrorLoggingTest, +TEST_P(HttpNetworkTransactionNetworkErrorLoggingTest, DontProcessNelHeaderProxy) { session_deps_.proxy_resolution_service = ConfiguredProxyResolutionService::CreateFixedFromPacResultForTest( @@ -20491,7 +20516,7 @@ EXPECT_EQ(0u, network_error_logging_service()->headers().size()); } -TEST_F(HttpNetworkTransactionNetworkErrorLoggingTest, ProcessNelHeaderHttps) { +TEST_P(HttpNetworkTransactionNetworkErrorLoggingTest, ProcessNelHeaderHttps) { RequestPolicy(); ASSERT_EQ(1u, network_error_logging_service()->headers().size()); const auto& header = network_error_logging_service()->headers()[0]; @@ -20502,20 +20527,20 @@ EXPECT_EQ("{\"report_to\": \"nel\", \"max_age\": 86400}", header.value); } -TEST_F(HttpNetworkTransactionNetworkErrorLoggingTest, +TEST_P(HttpNetworkTransactionNetworkErrorLoggingTest, DontProcessNelHeaderInvalidHttps) { CertStatus cert_status = CERT_STATUS_COMMON_NAME_INVALID; RequestPolicy(cert_status); EXPECT_EQ(0u, network_error_logging_service()->headers().size()); } -TEST_F(HttpNetworkTransactionNetworkErrorLoggingTest, CreateReportSuccess) { +TEST_P(HttpNetworkTransactionNetworkErrorLoggingTest, CreateReportSuccess) { RequestPolicy(); ASSERT_EQ(1u, network_error_logging_service()->errors().size()); CheckReport(0 /* index */, 200 /* status_code */, OK); } -TEST_F(HttpNetworkTransactionNetworkErrorLoggingTest, +TEST_P(HttpNetworkTransactionNetworkErrorLoggingTest, CreateReportDNSErrorAfterStartSync) { std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_)); auto trans = @@ -20536,7 +20561,7 @@ IPAddress() /* server_ip */); } -TEST_F(HttpNetworkTransactionNetworkErrorLoggingTest, +TEST_P(HttpNetworkTransactionNetworkErrorLoggingTest, CreateReportDNSErrorAfterStartAsync) { std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_)); auto trans = @@ -20557,7 +20582,7 @@ IPAddress() /* server_ip */); } -TEST_F(HttpNetworkTransactionNetworkErrorLoggingTest, +TEST_P(HttpNetworkTransactionNetworkErrorLoggingTest, CreateReportErrorAfterStart) { std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_)); auto trans = @@ -20581,7 +20606,7 @@ } // Same as above except the error is ASYNC -TEST_F(HttpNetworkTransactionNetworkErrorLoggingTest, +TEST_P(HttpNetworkTransactionNetworkErrorLoggingTest, CreateReportErrorAfterStartAsync) { std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_)); auto trans = @@ -20604,7 +20629,7 @@ IPAddress::IPv4Localhost() /* server_ip */); } -TEST_F(HttpNetworkTransactionNetworkErrorLoggingTest, +TEST_P(HttpNetworkTransactionNetworkErrorLoggingTest, CreateReportReadBodyError) { std::string extra_header_string = extra_headers_.ToString(); MockWrite data_writes[] = { @@ -20658,7 +20683,7 @@ } // Same as above except the final read is ASYNC. -TEST_F(HttpNetworkTransactionNetworkErrorLoggingTest, +TEST_P(HttpNetworkTransactionNetworkErrorLoggingTest, CreateReportReadBodyErrorAsync) { std::string extra_header_string = extra_headers_.ToString(); MockWrite data_writes[] = { @@ -20711,7 +20736,7 @@ EXPECT_LE(error.elapsed_time, base::TimeTicks::Now() - start_time); } -TEST_F(HttpNetworkTransactionNetworkErrorLoggingTest, +TEST_P(HttpNetworkTransactionNetworkErrorLoggingTest, CreateReportRestartWithAuth) { std::string extra_header_string = extra_headers_.ToString(); static const base::TimeDelta kSleepDuration = base::Milliseconds(10); @@ -20814,7 +20839,7 @@ // Same as above, except draining the body before restarting fails // asynchronously. -TEST_F(HttpNetworkTransactionNetworkErrorLoggingTest, +TEST_P(HttpNetworkTransactionNetworkErrorLoggingTest, CreateReportRestartWithAuthAsync) { std::string extra_header_string = extra_headers_.ToString(); static const base::TimeDelta kSleepDuration = base::Milliseconds(10); @@ -20915,7 +20940,7 @@ EXPECT_EQ(error2.elapsed_time, base::TimeTicks::Now() - restart_time); } -TEST_F(HttpNetworkTransactionNetworkErrorLoggingTest, +TEST_P(HttpNetworkTransactionNetworkErrorLoggingTest, CreateReportRetryKeepAliveConnectionReset) { std::string extra_header_string = extra_headers_.ToString(); MockWrite data_writes1[] = { @@ -20992,7 +21017,7 @@ CheckReport(2 /* index */, 200 /* status_code */, OK); } -TEST_F(HttpNetworkTransactionNetworkErrorLoggingTest, +TEST_P(HttpNetworkTransactionNetworkErrorLoggingTest, CreateReportRetryKeepAlive408) { std::string extra_header_string = extra_headers_.ToString(); MockWrite data_writes1[] = { @@ -21073,7 +21098,7 @@ CheckReport(2 /* index */, 200 /* status_code */, OK); } -TEST_F(HttpNetworkTransactionNetworkErrorLoggingTest, +TEST_P(HttpNetworkTransactionNetworkErrorLoggingTest, CreateReportRetry421WithoutConnectionPooling) { // Two hosts resolve to the same IP address. const std::string ip_addr = "1.2.3.4"; @@ -21119,7 +21144,7 @@ AddSSLSocketData(); // Retry the second request on a second connection. - SpdyTestUtil spdy_util2; + SpdyTestUtil spdy_util2(/*use_priority_header=*/true); spdy::SpdySerializedFrame req3( spdy_util2.ConstructSpdyGet("https://mail.example.org", 1, LOWEST)); MockWrite writes2[] = { @@ -21237,7 +21262,7 @@ EXPECT_EQ(0, error3.reporting_upload_depth); } -TEST_F(HttpNetworkTransactionNetworkErrorLoggingTest, +TEST_P(HttpNetworkTransactionNetworkErrorLoggingTest, CreateReportCancelAfterStart) { StaticSocketDataProvider data; data.set_connect_data(MockConnect(SYNCHRONOUS, ERR_IO_PENDING)); @@ -21258,7 +21283,7 @@ IPAddress() /* server_ip */); } -TEST_F(HttpNetworkTransactionNetworkErrorLoggingTest, +TEST_P(HttpNetworkTransactionNetworkErrorLoggingTest, CreateReportCancelBeforeReadingBody) { std::string extra_header_string = extra_headers_.ToString(); MockWrite data_writes[] = { @@ -21298,7 +21323,7 @@ CheckReport(0 /* index */, 200 /* status_code */, ERR_ABORTED); } -TEST_F(HttpNetworkTransactionNetworkErrorLoggingTest, DontCreateReportHttp) { +TEST_P(HttpNetworkTransactionNetworkErrorLoggingTest, DontCreateReportHttp) { RequestPolicy(); EXPECT_EQ(1u, network_error_logging_service()->headers().size()); EXPECT_EQ(1u, network_error_logging_service()->errors().size()); @@ -21339,7 +21364,7 @@ EXPECT_EQ(1u, network_error_logging_service()->errors().size()); } -TEST_F(HttpNetworkTransactionNetworkErrorLoggingTest, +TEST_P(HttpNetworkTransactionNetworkErrorLoggingTest, DontCreateReportHttpError) { RequestPolicy(); EXPECT_EQ(1u, network_error_logging_service()->headers().size()); @@ -21372,7 +21397,7 @@ // Don't report on proxy auth challenges, don't report if connecting through a // proxy. -TEST_F(HttpNetworkTransactionNetworkErrorLoggingTest, DontCreateReportProxy) { +TEST_P(HttpNetworkTransactionNetworkErrorLoggingTest, DontCreateReportProxy) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("https://www.example.org/"); @@ -21466,7 +21491,7 @@ EXPECT_EQ(0u, network_error_logging_service()->errors().size()); } -TEST_F(HttpNetworkTransactionNetworkErrorLoggingTest, +TEST_P(HttpNetworkTransactionNetworkErrorLoggingTest, ReportContainsUploadDepth) { reporting_upload_depth_ = 7; request_.reporting_upload_depth = reporting_upload_depth_; @@ -21477,7 +21502,7 @@ EXPECT_EQ(7, error.reporting_upload_depth); } -TEST_F(HttpNetworkTransactionNetworkErrorLoggingTest, ReportElapsedTime) { +TEST_P(HttpNetworkTransactionNetworkErrorLoggingTest, ReportElapsedTime) { std::string extra_header_string = extra_headers_.ToString(); static const base::TimeDelta kSleepDuration = base::Milliseconds(10); @@ -21540,7 +21565,7 @@ #endif // BUILDFLAG(ENABLE_REPORTING) -TEST_F(HttpNetworkTransactionTest, AlwaysFailRequestToCache) { +TEST_P(HttpNetworkTransactionTest, AlwaysFailRequestToCache) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("http://example.org/"); @@ -21555,7 +21580,7 @@ EXPECT_THAT(rv, IsError(ERR_CACHE_MISS)); } -TEST_F(HttpNetworkTransactionTest, ZeroRTTDoesntConfirm) { +TEST_P(HttpNetworkTransactionTest, ZeroRTTDoesntConfirm) { static const base::TimeDelta kDelay = base::Milliseconds(10); HttpRequestInfo request; request.method = "GET"; @@ -21621,7 +21646,7 @@ session->CloseAllConnections(ERR_FAILED, "Very good reason"); } -TEST_F(HttpNetworkTransactionTest, ZeroRTTSyncConfirmSyncWrite) { +TEST_P(HttpNetworkTransactionTest, ZeroRTTSyncConfirmSyncWrite) { static const base::TimeDelta kDelay = base::Milliseconds(10); HttpRequestInfo request; request.method = "POST"; @@ -21690,7 +21715,7 @@ session->CloseAllConnections(ERR_FAILED, "Very good reason"); } -TEST_F(HttpNetworkTransactionTest, ZeroRTTSyncConfirmAsyncWrite) { +TEST_P(HttpNetworkTransactionTest, ZeroRTTSyncConfirmAsyncWrite) { HttpRequestInfo request; request.method = "POST"; request.url = GURL("https://www.example.org/"); @@ -21744,7 +21769,7 @@ session->CloseAllConnections(ERR_FAILED, "Very good reason"); } -TEST_F(HttpNetworkTransactionTest, ZeroRTTAsyncConfirmSyncWrite) { +TEST_P(HttpNetworkTransactionTest, ZeroRTTAsyncConfirmSyncWrite) { static const base::TimeDelta kDelay = base::Milliseconds(10); HttpRequestInfo request; request.method = "POST"; @@ -21812,7 +21837,7 @@ session->CloseAllConnections(ERR_FAILED, "Very good reason"); } -TEST_F(HttpNetworkTransactionTest, ZeroRTTAsyncConfirmAsyncWrite) { +TEST_P(HttpNetworkTransactionTest, ZeroRTTAsyncConfirmAsyncWrite) { HttpRequestInfo request; request.method = "POST"; request.url = GURL("https://www.example.org/"); @@ -21867,7 +21892,7 @@ } // 0-RTT rejects are handled at HttpNetworkTransaction. -TEST_F(HttpNetworkTransactionTest, ZeroRTTReject) { +TEST_P(HttpNetworkTransactionTest, ZeroRTTReject) { enum class RejectType { kRead, kWrite, @@ -21967,7 +21992,7 @@ } } -TEST_F(HttpNetworkTransactionTest, ZeroRTTConfirmErrorSync) { +TEST_P(HttpNetworkTransactionTest, ZeroRTTConfirmErrorSync) { HttpRequestInfo request; request.method = "POST"; request.url = GURL("https://www.example.org/"); @@ -22014,7 +22039,7 @@ session->CloseAllConnections(ERR_FAILED, "Very good reason"); } -TEST_F(HttpNetworkTransactionTest, ZeroRTTConfirmErrorAsync) { +TEST_P(HttpNetworkTransactionTest, ZeroRTTConfirmErrorAsync) { HttpRequestInfo request; request.method = "POST"; request.url = GURL("https://www.example.org/"); @@ -22063,7 +22088,7 @@ // Test the proxy and origin server each requesting both TLS client certificates // and HTTP auth. This is a regression test for https://crbug.com/946406. -TEST_F(HttpNetworkTransactionTest, AuthEverything) { +TEST_P(HttpNetworkTransactionTest, AuthEverything) { // Note these hosts must match the CheckBasic*Auth() functions. session_deps_.proxy_resolution_service = ConfiguredProxyResolutionService::CreateFixedForTest( @@ -22250,7 +22275,7 @@ // Test the proxy and origin server each requesting both TLS client certificates // and HTTP auth and each HTTP auth closing the connection. This is a regression // test for https://crbug.com/946406. -TEST_F(HttpNetworkTransactionTest, AuthEverythingWithConnectClose) { +TEST_P(HttpNetworkTransactionTest, AuthEverythingWithConnectClose) { // Note these hosts must match the CheckBasic*Auth() functions. session_deps_.proxy_resolution_service = ConfiguredProxyResolutionService::CreateFixedForTest( @@ -22490,7 +22515,7 @@ // Test the proxy requesting HTTP auth and the server requesting TLS client // certificates. This is a regression test for https://crbug.com/946406. -TEST_F(HttpNetworkTransactionTest, ProxyHTTPAndServerTLSAuth) { +TEST_P(HttpNetworkTransactionTest, ProxyHTTPAndServerTLSAuth) { // Note these hosts must match the CheckBasic*Auth() functions. session_deps_.proxy_resolution_service = ConfiguredProxyResolutionService::CreateFixedForTest( @@ -22603,7 +22628,7 @@ } // Test that socket reuse works with client certificates. -TEST_F(HttpNetworkTransactionTest, ClientCertSocketReuse) { +TEST_P(HttpNetworkTransactionTest, ClientCertSocketReuse) { auto cert_request_info = base::MakeRefCounted<SSLCertRequestInfo>(); cert_request_info->host_and_port = HostPortPair("www.example.org", 443); @@ -22689,7 +22714,7 @@ // sequence with two different NetworkAnonymizationKeys, the first and last have // the same key, the second a different one. Checks that the requests are // partitioned across sockets as expected. -TEST_F(HttpNetworkTransactionTest, NetworkIsolation) { +TEST_P(HttpNetworkTransactionTest, NetworkIsolation) { const SchemefulSite kSite1(GURL("http://origin1/")); const SchemefulSite kSite2(GURL("http://origin2/")); const auto network_anonymization_key1 = @@ -22844,7 +22869,7 @@ } } -TEST_F(HttpNetworkTransactionTest, NetworkIsolationH2) { +TEST_P(HttpNetworkTransactionTest, NetworkIsolationH2) { const SchemefulSite kSite1(GURL("http://origin1/")); const SchemefulSite kSite2(GURL("http://origin2/")); const auto network_anonymization_key1 = @@ -22899,7 +22924,7 @@ // Reads and writes for the unpartitioned case, where only one socket is // used. - SpdyTestUtil spdy_util; + SpdyTestUtil spdy_util(/*use_priority_header=*/true); spdy::SpdySerializedFrame unpartitioned_req1( spdy_util.ConstructSpdyGet(url1, 1, LOWEST)); spdy::SpdySerializedFrame unpartitioned_response1( @@ -22944,7 +22969,7 @@ // Reads and writes for the partitioned case, where two sockets are used. - SpdyTestUtil spdy_util2; + SpdyTestUtil spdy_util2(/*use_priority_header=*/true); spdy::SpdySerializedFrame partitioned_req1( spdy_util2.ConstructSpdyGet(url1, 1, LOWEST)); spdy::SpdySerializedFrame partitioned_response1( @@ -22973,7 +22998,7 @@ MockRead(SYNCHRONOUS, ERR_IO_PENDING, 6), }; - SpdyTestUtil spdy_util3; + SpdyTestUtil spdy_util3(/*use_priority_header=*/true); spdy::SpdySerializedFrame partitioned_req2( spdy_util3.ConstructSpdyGet(url2, 1, LOWEST)); spdy::SpdySerializedFrame partitioned_response2( @@ -23073,7 +23098,7 @@ // features::kPartitionConnectionsByNetworkIsolationKey is enabled. Then // issue a request and make sure the correct socket is used. Loops three times, // expecting to use the first preconnect, second preconnect, and neither. -TEST_F(HttpNetworkTransactionTest, NetworkIsolationPreconnect) { +TEST_P(HttpNetworkTransactionTest, NetworkIsolationPreconnect) { base::test::ScopedFeatureList feature_list; feature_list.InitAndEnableFeature( features::kPartitionConnectionsByNetworkIsolationKey); @@ -23210,7 +23235,7 @@ // Test that the NetworkAnonymizationKey is passed down to SSLConfig so the // session cache is isolated. -TEST_F(HttpNetworkTransactionTest, NetworkIsolationSSL) { +TEST_P(HttpNetworkTransactionTest, NetworkIsolationSSL) { base::test::ScopedFeatureList feature_list; feature_list.InitWithFeatures( {features::kPartitionConnectionsByNetworkIsolationKey, @@ -23336,7 +23361,7 @@ // Test that the NetworkAnonymizationKey is passed down to SSLConfig so the // session cache is isolated, for both origins and proxies. -TEST_F(HttpNetworkTransactionTest, NetworkIsolationSSLProxy) { +TEST_P(HttpNetworkTransactionTest, NetworkIsolationSSLProxy) { base::test::ScopedFeatureList feature_list; feature_list.InitWithFeatures( {features::kPartitionConnectionsByNetworkIsolationKey, @@ -23441,7 +23466,7 @@ // Test that SSLConfig changes from SSLConfigService are picked up even when // there are live sockets. -TEST_F(HttpNetworkTransactionTest, SSLConfigChanged) { +TEST_P(HttpNetworkTransactionTest, SSLConfigChanged) { SSLContextConfig ssl_context_config; ssl_context_config.version_max = SSL_PROTOCOL_VERSION_TLS1_3; auto ssl_config_service = @@ -23549,7 +23574,7 @@ trans3.reset(); } -TEST_F(HttpNetworkTransactionTest, SSLConfigChangedDuringTransaction) { +TEST_P(HttpNetworkTransactionTest, SSLConfigChangedDuringTransaction) { SSLContextConfig ssl_context_config; ssl_context_config.version_max = SSL_PROTOCOL_VERSION_TLS1_3; auto ssl_config_service = @@ -23653,7 +23678,7 @@ trans2.reset(); } -TEST_F(HttpNetworkTransactionTest, SSLConfigChangedPendingConnect) { +TEST_P(HttpNetworkTransactionTest, SSLConfigChangedPendingConnect) { SSLContextConfig ssl_context_config; ssl_context_config.version_max = SSL_PROTOCOL_VERSION_TLS1_3; auto ssl_config_service = @@ -23712,7 +23737,7 @@ // Test that HttpNetworkTransaction correctly handles existing sockets when the // server requests a client certificate post-handshake (via a TLS // renegotiation). This is a regression test for https://crbug.com/829184. -TEST_F(HttpNetworkTransactionTest, PostHandshakeClientCertWithSockets) { +TEST_P(HttpNetworkTransactionTest, PostHandshakeClientCertWithSockets) { const MutableNetworkTrafficAnnotationTag kTrafficAnnotation( TRAFFIC_ANNOTATION_FOR_TESTS); @@ -24000,7 +24025,7 @@ trans_post_auth_bar.reset(); } -TEST_F(HttpNetworkTransactionTest, RequestWithDnsAliases) { +TEST_P(HttpNetworkTransactionTest, RequestWithDnsAliases) { // Create a request. HttpRequestInfo request; request.method = "GET"; @@ -24056,7 +24081,7 @@ testing::ElementsAre("alias1", "alias2", "www.example.org")); } -TEST_F(HttpNetworkTransactionTest, RequestWithNoAdditionalDnsAliases) { +TEST_P(HttpNetworkTransactionTest, RequestWithNoAdditionalDnsAliases) { // Create a request. HttpRequestInfo request; request.method = "GET"; @@ -24110,7 +24135,7 @@ } // Test behavior of SetProxyInfoInResponse with a direct connection. -TEST_F(HttpNetworkTransactionTest, SetProxyInfoInResponse_Direct) { +TEST_P(HttpNetworkTransactionTest, SetProxyInfoInResponse_Direct) { ProxyInfo proxy_info; proxy_info.UseDirect(); HttpResponseInfo response_info; @@ -24121,7 +24146,7 @@ } // Test behavior of SetProxyInfoInResponse with a proxied connection. -TEST_F(HttpNetworkTransactionTest, SetProxyInfoInResponse_Proxied) { +TEST_P(HttpNetworkTransactionTest, SetProxyInfoInResponse_Proxied) { ProxyInfo proxy_info; ProxyServer proxy_server = ProxyServer::FromSchemeHostAndPort(ProxyServer::SCHEME_HTTPS, "prx", 443); @@ -24134,7 +24159,7 @@ } // Test behavior of SetProxyInfoInResponse with an empty ProxyInfo. -TEST_F(HttpNetworkTransactionTest, SetProxyInfoInResponse_Empty) { +TEST_P(HttpNetworkTransactionTest, SetProxyInfoInResponse_Empty) { ProxyInfo empty_proxy_info; HttpResponseInfo response_info; HttpNetworkTransaction::SetProxyInfoInResponse(empty_proxy_info, @@ -24146,7 +24171,7 @@ // Test behavior of SetProxyInfoInResponse with a proxied connection for IP // protection. -TEST_F(HttpNetworkTransactionTest, SetProxyInfoInResponse_IpProtection) { +TEST_P(HttpNetworkTransactionTest, SetProxyInfoInResponse_IpProtection) { ProxyInfo proxy_info; ProxyServer proxy_server = ProxyServer::FromSchemeHostAndPort(ProxyServer::SCHEME_HTTPS, "prx", 443);
diff --git a/net/http/http_request_headers.cc b/net/http/http_request_headers.cc index 65081e0..8bc948e2 100644 --- a/net/http/http_request_headers.cc +++ b/net/http/http_request_headers.cc
@@ -64,6 +64,7 @@ const char HttpRequestHeaders::kIfUnmodifiedSince[] = "If-Unmodified-Since"; const char HttpRequestHeaders::kOrigin[] = "Origin"; const char HttpRequestHeaders::kPragma[] = "Pragma"; +const char HttpRequestHeaders::kPriority[] = "Priority"; const char HttpRequestHeaders::kProxyAuthorization[] = "Proxy-Authorization"; const char HttpRequestHeaders::kProxyConnection[] = "Proxy-Connection"; const char HttpRequestHeaders::kRange[] = "Range";
diff --git a/net/http/http_request_headers.h b/net/http/http_request_headers.h index 8b9a2b35..668e525 100644 --- a/net/http/http_request_headers.h +++ b/net/http/http_request_headers.h
@@ -95,6 +95,7 @@ static const char kIfUnmodifiedSince[]; static const char kOrigin[]; static const char kPragma[]; + static const char kPriority[]; static const char kProxyAuthorization[]; static const char kProxyConnection[]; static const char kRange[];
diff --git a/net/http/transport_security_state_static.pins b/net/http/transport_security_state_static.pins index fee8a961..8b446c2 100644 --- a/net/http/transport_security_state_static.pins +++ b/net/http/transport_security_state_static.pins
@@ -43,9 +43,9 @@ # hash function for preloaded entries again (we have already done so once). # -# Last updated: 2023-09-20 12:55 UTC +# Last updated: 2023-09-21 12:56 UTC PinsListTimestamp -1695214530 +1695301000 TestSPKI sha256/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
diff --git a/net/http/transport_security_state_static_pins.json b/net/http/transport_security_state_static_pins.json index fcce06c..e25b269 100644 --- a/net/http/transport_security_state_static_pins.json +++ b/net/http/transport_security_state_static_pins.json
@@ -31,7 +31,7 @@ // the 'static_spki_hashes' and 'bad_static_spki_hashes' fields in 'pinsets' // refer to, and the timestamp at which the pins list was last updated. // -// Last updated: 2023-09-20 12:55 UTC +// Last updated: 2023-09-21 12:56 UTC // { "pinsets": [
diff --git a/net/quic/bidirectional_stream_quic_impl.cc b/net/quic/bidirectional_stream_quic_impl.cc index 16f0a4f..42526eba 100644 --- a/net/quic/bidirectional_stream_quic_impl.cc +++ b/net/quic/bidirectional_stream_quic_impl.cc
@@ -116,7 +116,7 @@ http_request_info.method = request_info_->method; http_request_info.extra_headers = request_info_->extra_headers; - CreateSpdyHeadersFromHttpRequest(http_request_info, + CreateSpdyHeadersFromHttpRequest(http_request_info, absl::nullopt, http_request_info.extra_headers, &headers); int rv = stream_->WriteHeaders(std::move(headers), request_info_->end_stream_on_headers, nullptr);
diff --git a/net/quic/quic_chromium_client_session.cc b/net/quic/quic_chromium_client_session.cc index 598ad26..7f2fd70 100644 --- a/net/quic/quic_chromium_client_session.cc +++ b/net/quic/quic_chromium_client_session.cc
@@ -1692,9 +1692,11 @@ UMA_HISTOGRAM_COUNTS_1000("Net.QuicSession.NumDefaultPathDegrading", connection()->GetStats().num_path_degrading); - UMA_HISTOGRAM_COUNTS_1000( - "Net.QuicSession.NumForwardProgressMadeAfterPathDegrading", - connection()->GetStats().num_forward_progress_after_path_degrading); + if (connection()->GetStats().num_path_degrading > 0) { + UMA_HISTOGRAM_COUNTS_1000( + "Net.QuicSession.NumForwardProgressMadeAfterPathDegrading", + connection()->GetStats().num_forward_progress_after_path_degrading); + } if (const quic::QuicConnection::MultiPortStats* multi_port_stats = connection()->multi_port_stats()) { UMA_HISTOGRAM_COUNTS_1000(
diff --git a/net/quic/quic_http_stream.cc b/net/quic/quic_http_stream.cc index da7a507..62b074b 100644 --- a/net/quic/quic_http_stream.cc +++ b/net/quic/quic_http_stream.cc
@@ -132,7 +132,7 @@ } // Store the serialized request headers. - CreateSpdyHeadersFromHttpRequest(*request_info_, request_headers, + CreateSpdyHeadersFromHttpRequest(*request_info_, priority_, request_headers, &request_headers_); // Store the request body.
diff --git a/net/quic/quic_http_stream_test.cc b/net/quic/quic_http_stream_test.cc index e4e92b1..be44e43 100644 --- a/net/quic/quic_http_stream_test.cc +++ b/net/quic/quic_http_stream_test.cc
@@ -102,11 +102,14 @@ struct TestParams { quic::ParsedQuicVersion version; + bool priority_header_enabled; }; // Used by ::testing::PrintToStringParamName(). std::string PrintToString(const TestParams& p) { - return ParsedQuicVersionToString(p.version); + return base::StrCat({ParsedQuicVersionToString(p.version), "_", + p.priority_header_enabled ? "PriorityHeaderEnabled" + : "PriorityHeaderDisabled"}); } std::vector<TestParams> GetTestParams() { @@ -114,7 +117,8 @@ quic::ParsedQuicVersionVector all_supported_versions = AllSupportedQuicVersions(); for (const auto& version : all_supported_versions) { - params.push_back(TestParams{version}); + params.push_back(TestParams{version, true}); + params.push_back(TestParams{version, false}); } return params; } @@ -277,14 +281,21 @@ &clock_, kDefaultServerHostName, quic::Perspective::IS_CLIENT, - true), + /*client_priority_uses_incremental=*/true, + /*use_priority_header=*/true), server_maker_(version_, connection_id_, &clock_, kDefaultServerHostName, quic::Perspective::IS_SERVER, - false), + /*client_priority_uses_incremental=*/false, + /*use_priority_header=*/false), printer_(version_) { + if (GetParam().priority_header_enabled) { + feature_list_.InitAndEnableFeature(net::features::kPriorityHeader); + } else { + feature_list_.InitAndDisableFeature(net::features::kPriorityHeader); + } FLAGS_quic_enable_http3_grease_randomness = false; quic::QuicEnableVersion(version_); IPAddress ip(192, 0, 2, 33); @@ -642,6 +653,7 @@ std::vector<PacketToWrite> writes_; quic::test::MockConnectionIdGenerator connection_id_generator_; quic::test::NoopQpackStreamSenderDelegate noop_qpack_stream_sender_delegate_; + base::test::ScopedFeatureList feature_list_; }; INSTANTIATE_TEST_SUITE_P(VersionIncludeStreamDependencySequence,
diff --git a/net/quic/quic_network_transaction_unittest.cc b/net/quic/quic_network_transaction_unittest.cc index cad2d0ec..afe250fb 100644 --- a/net/quic/quic_network_transaction_unittest.cc +++ b/net/quic/quic_network_transaction_unittest.cc
@@ -113,11 +113,14 @@ struct TestParams { quic::ParsedQuicVersion version; + bool priority_header_enabled; }; // Used by ::testing::PrintToStringParamName(). std::string PrintToString(const TestParams& p) { - return ParsedQuicVersionToString(p.version); + return base::StrCat({ParsedQuicVersionToString(p.version), "_", + p.priority_header_enabled ? "PriorityHeaderEnabled" + : "PriorityHeaderDisabled"}); } // Run QuicNetworkTransactionWithDestinationTest instances with all value @@ -183,7 +186,8 @@ quic::ParsedQuicVersionVector all_supported_versions = AllSupportedQuicVersions(); for (const quic::ParsedQuicVersion& version : all_supported_versions) { - params.push_back(TestParams{version}); + params.push_back(TestParams{version, true}); + params.push_back(TestParams{version, false}); } return params; } @@ -290,14 +294,16 @@ context_.clock(), kDefaultServerHostName, quic::Perspective::IS_CLIENT, - true)), + /*client_priority_uses_incremental=*/true, + /*use_priority_header=*/true)), server_maker_(version_, quic::QuicUtils::CreateRandomConnectionId( context_.random_generator()), context_.clock(), kDefaultServerHostName, quic::Perspective::IS_SERVER, - false), + /*client_priority_uses_incremental=*/false, + /*use_priority_header=*/false), quic_task_runner_( base::MakeRefCounted<TestTaskRunner>(context_.mock_clock())), ssl_config_service_(std::make_unique<SSLConfigServiceDefaults>()), @@ -306,6 +312,11 @@ auth_handler_factory_(HttpAuthHandlerFactory::CreateDefault()), http_server_properties_(std::make_unique<HttpServerProperties>()), ssl_data_(ASYNC, OK) { + if (GetParam().priority_header_enabled) { + feature_list_.InitAndEnableFeature(net::features::kPriorityHeader); + } else { + feature_list_.InitAndDisableFeature(net::features::kPriorityHeader); + } FLAGS_quic_enable_http3_grease_randomness = false; request_.method = "GET"; std::string url("https://"); @@ -338,6 +349,16 @@ session_.reset(); } + void DisablePriorityHeader() { + // switch client_maker_ to a version that does not add priority headers. + client_maker_ = std::make_unique<QuicTestPacketMaker>( + version_, + quic::QuicUtils::CreateRandomConnectionId(context_.random_generator()), + context_.clock(), kDefaultServerHostName, quic::Perspective::IS_CLIENT, + /*client_priority_uses_incremental=*/true, + /*use_priority_header=*/false); + } + std::unique_ptr<quic::QuicEncryptedPacket> ConstructServerConnectionClosePacket(uint64_t num) { return server_maker_.MakeConnectionClosePacket( @@ -771,12 +792,14 @@ version_, quic::QuicUtils::CreateRandomConnectionId(context_.random_generator()), context_.clock(), kDefaultServerHostName, quic::Perspective::IS_CLIENT, - true); + /*client_priority_uses_incremental=*/true, + /*use_priority_header=*/true); QuicTestPacketMaker server_maker( version_, quic::QuicUtils::CreateRandomConnectionId(context_.random_generator()), context_.clock(), kDefaultServerHostName, quic::Perspective::IS_SERVER, - false); + /*client_priority_uses_incremental=*/false, + /*use_priority_header=*/false); MockQuicData quic_data(version_); int packet_number = 1; client_maker.SetEncryptionLevel(quic::ENCRYPTION_ZERO_RTT); @@ -947,6 +970,7 @@ std::vector<std::unique_ptr<StaticSocketDataProvider>> hanging_data_; SSLSocketDataProvider ssl_data_; std::unique_ptr<ScopedMockNetworkChangeNotifier> scoped_mock_change_notifier_; + base::test::ScopedFeatureList feature_list_; private: void SendRequestAndExpectQuicResponseMaybeFromProxy( @@ -2181,12 +2205,13 @@ picked_version, quic::QuicUtils::CreateRandomConnectionId(context_.random_generator()), context_.clock(), kDefaultServerHostName, quic::Perspective::IS_CLIENT, - true); + /*client_priority_uses_incremental=*/true, /*use_priority_header=*/true); QuicTestPacketMaker server_maker( picked_version, quic::QuicUtils::CreateRandomConnectionId(context_.random_generator()), context_.clock(), kDefaultServerHostName, quic::Perspective::IS_SERVER, - false); + /*client_priority_uses_incremental=*/false, + /*use_priority_header=*/false); int packet_num = 1; if (VersionUsesHttp3(picked_version.transport_version)) { @@ -6011,11 +6036,14 @@ QuicTestPacketMaker client_maker( version_, quic::QuicUtils::CreateRandomConnectionId(context_.random_generator()), - context_.clock(), origin1_, quic::Perspective::IS_CLIENT, true); + context_.clock(), origin1_, quic::Perspective::IS_CLIENT, + /*client_priority_uses_incremental=*/true, /*use_priority_header=*/true); QuicTestPacketMaker server_maker( version_, quic::QuicUtils::CreateRandomConnectionId(context_.random_generator()), - context_.clock(), origin1_, quic::Perspective::IS_SERVER, false); + context_.clock(), origin1_, quic::Perspective::IS_SERVER, + /*client_priority_uses_incremental=*/false, + /*use_priority_header=*/false); MockQuicData mock_quic_data(version_); int packet_num = 1; @@ -6112,11 +6140,14 @@ QuicTestPacketMaker client_maker1( version_, quic::QuicUtils::CreateRandomConnectionId(context_.random_generator()), - context_.clock(), origin1_, quic::Perspective::IS_CLIENT, true); + context_.clock(), origin1_, quic::Perspective::IS_CLIENT, + /*client_priority_uses_incremental=*/true, /*use_priority_header=*/true); QuicTestPacketMaker server_maker1( version_, quic::QuicUtils::CreateRandomConnectionId(context_.random_generator()), - context_.clock(), origin1_, quic::Perspective::IS_SERVER, false); + context_.clock(), origin1_, quic::Perspective::IS_SERVER, + /*client_priority_uses_incremental=*/false, + /*use_priority_header=*/false); MockQuicData mock_quic_data1(version_); int packet_num = 1; @@ -6146,11 +6177,14 @@ QuicTestPacketMaker client_maker2( version_, quic::QuicUtils::CreateRandomConnectionId(context_.random_generator()), - context_.clock(), origin2_, quic::Perspective::IS_CLIENT, true); + context_.clock(), origin2_, quic::Perspective::IS_CLIENT, + /*client_priority_uses_incremental=*/true, /*use_priority_header=*/true); QuicTestPacketMaker server_maker2( version_, quic::QuicUtils::CreateRandomConnectionId(context_.random_generator()), - context_.clock(), origin2_, quic::Perspective::IS_SERVER, false); + context_.clock(), origin2_, quic::Perspective::IS_SERVER, + /*client_priority_uses_incremental=*/false, + /*use_priority_header=*/false); MockQuicData mock_quic_data2(version_); int packet_num2 = 1; @@ -6185,6 +6219,7 @@ // Performs an HTTPS/1.1 request over QUIC proxy tunnel. TEST_P(QuicNetworkTransactionTest, QuicProxyConnectHttpsServer) { + DisablePriorityHeader(); session_params_.enable_quic = true; session_params_.enable_quic_proxies_for_https_urls = true; proxy_resolution_service_ = @@ -6277,6 +6312,7 @@ // Performs an HTTP/2 request over QUIC proxy tunnel. TEST_P(QuicNetworkTransactionTest, QuicProxyConnectSpdyServer) { + DisablePriorityHeader(); session_params_.enable_quic = true; session_params_.enable_quic_proxies_for_https_urls = true; proxy_resolution_service_ = @@ -6304,7 +6340,7 @@ 1, GetNthClientInitiatedBidirectionalStreamId(0), false, GetResponseHeaders("200"))); - SpdyTestUtil spdy_util; + SpdyTestUtil spdy_util(/*use_priority_header=*/true); spdy::SpdySerializedFrame get_frame = spdy_util.ConstructSpdyGet("https://mail.example.org/", 1, LOWEST); @@ -6370,6 +6406,7 @@ // Make two HTTP/1.1 requests to the same host over a QUIC proxy tunnel and // check that the proxy socket is reused for the second request. TEST_P(QuicNetworkTransactionTest, QuicProxyConnectReuseTransportSocket) { + DisablePriorityHeader(); session_params_.enable_quic = true; session_params_.enable_quic_proxies_for_https_urls = true; proxy_resolution_service_ = @@ -6496,6 +6533,7 @@ // host over a QUIC proxy tunnel. Check that the QUIC session to the proxy // server is reused for the second request. TEST_P(QuicNetworkTransactionTest, QuicProxyConnectReuseQuicSession) { + DisablePriorityHeader(); session_params_.enable_quic = true; session_params_.enable_quic_proxies_for_https_urls = true; proxy_resolution_service_ = @@ -6568,7 +6606,7 @@ GetResponseHeaders("200"))); // GET request, response, and data over QUIC tunnel for second request - SpdyTestUtil spdy_util; + SpdyTestUtil spdy_util(/*use_priority_header=*/true); spdy::SpdySerializedFrame get_frame = spdy_util.ConstructSpdyGet("https://different.example.org/", 1, LOWEST); mock_quic_data.AddWrite( @@ -6651,6 +6689,7 @@ // Sends a CONNECT request to a QUIC proxy and receive a 500 response. TEST_P(QuicNetworkTransactionTest, QuicProxyConnectFailure) { + DisablePriorityHeader(); session_params_.enable_quic = true; session_params_.enable_quic_proxies_for_https_urls = true; proxy_resolution_service_ = @@ -6703,6 +6742,7 @@ // Sends a CONNECT request to a QUIC proxy and get a UDP socket read error. TEST_P(QuicNetworkTransactionTest, QuicProxyQuicConnectionError) { + DisablePriorityHeader(); session_params_.enable_quic = true; session_params_.enable_quic_proxies_for_https_urls = true; proxy_resolution_service_ = @@ -6744,6 +6784,7 @@ // Sends an HTTP/1.1 request over QUIC proxy tunnel and gets a bad cert from the // host. Retries request and succeeds. TEST_P(QuicNetworkTransactionTest, QuicProxyConnectBadCertificate) { + DisablePriorityHeader(); session_params_.enable_quic = true; session_params_.enable_quic_proxies_for_https_urls = true; proxy_resolution_service_ = @@ -6869,6 +6910,7 @@ // Checks if a request's specified "user-agent" header shows up correctly in the // CONNECT request to a QUIC proxy. TEST_P(QuicNetworkTransactionTest, QuicProxyUserAgent) { + DisablePriorityHeader(); const char kConfiguredUserAgent[] = "Configured User-Agent"; const char kRequestUserAgent[] = "Request User-Agent"; session_params_.enable_quic = true; @@ -6922,6 +6964,7 @@ // Makes sure the CONNECT request packet for a QUIC proxy contains the correct // HTTP/2 stream dependency and weights given the request priority. TEST_P(QuicNetworkTransactionTest, QuicProxyRequestPriority) { + DisablePriorityHeader(); session_params_.enable_quic = true; session_params_.enable_quic_proxies_for_https_urls = true; proxy_resolution_service_ = @@ -7276,13 +7319,17 @@ quic::QuicUtils::CreateRandomConnectionId( context_.random_generator()), context_.clock(), kDefaultServerHostName, - quic::Perspective::IS_CLIENT, true); + quic::Perspective::IS_CLIENT, + /*client_priority_uses_incremental=*/true, + /*use_priority_header=*/true); QuicTestPacketMaker server_maker1( version_, quic::QuicUtils::CreateRandomConnectionId( context_.random_generator()), context_.clock(), kDefaultServerHostName, - quic::Perspective::IS_SERVER, false); + quic::Perspective::IS_SERVER, + /*client_priority_uses_incremental=*/false, + /*use_priority_header=*/false); int packet_num = 1; unpartitioned_mock_quic_data.AddWrite( @@ -7349,13 +7396,17 @@ quic::QuicUtils::CreateRandomConnectionId( context_.random_generator()), context_.clock(), kDefaultServerHostName, - quic::Perspective::IS_CLIENT, true); + quic::Perspective::IS_CLIENT, + /*client_priority_uses_incremental=*/true, + /*use_priority_header=*/true); QuicTestPacketMaker server_maker2( version_, quic::QuicUtils::CreateRandomConnectionId( context_.random_generator()), context_.clock(), kDefaultServerHostName, - quic::Perspective::IS_SERVER, false); + quic::Perspective::IS_SERVER, + /*client_priority_uses_incremental=*/false, + /*use_priority_header=*/false); int packet_num2 = 1; partitioned_mock_quic_data1.AddWrite( @@ -7403,13 +7454,17 @@ quic::QuicUtils::CreateRandomConnectionId( context_.random_generator()), context_.clock(), kDefaultServerHostName, - quic::Perspective::IS_CLIENT, true); + quic::Perspective::IS_CLIENT, + /*client_priority_uses_incremental=*/true, + /*use_priority_header=*/true); QuicTestPacketMaker server_maker3( version_, quic::QuicUtils::CreateRandomConnectionId( context_.random_generator()), context_.clock(), kDefaultServerHostName, - quic::Perspective::IS_SERVER, false); + quic::Perspective::IS_SERVER, + /*client_priority_uses_incremental=*/false, + /*use_priority_header=*/false); int packet_num3 = 1; partitioned_mock_quic_data2.AddWrite( @@ -7947,7 +8002,7 @@ version_, quic::QuicUtils::CreateRandomConnectionId(context_.random_generator()), context_.clock(), kDefaultServerHostName, quic::Perspective::IS_CLIENT, - true); + /*client_priority_uses_incremental=*/true, /*use_priority_header=*/true); int write_packet_number2 = 1; mock_quic_data2.AddWrite(SYNCHRONOUS, client_maker2.MakeInitialSettingsPacket( write_packet_number2++)); @@ -7962,7 +8017,8 @@ version_, quic::QuicUtils::CreateRandomConnectionId(context_.random_generator()), context_.clock(), kDefaultServerHostName, quic::Perspective::IS_SERVER, - false); + /*client_priority_uses_incremental=*/false, + /*use_priority_header=*/false); int read_packet_number2 = 1; mock_quic_data2.AddRead(ASYNC, server_maker2.MakeResponseHeadersPacket( read_packet_number2++, stream_id1, false,
diff --git a/net/quic/quic_proxy_client_socket.cc b/net/quic/quic_proxy_client_socket.cc index 2056091..5c29e63 100644 --- a/net/quic/quic_proxy_client_socket.cc +++ b/net/quic/quic_proxy_client_socket.cc
@@ -358,7 +358,8 @@ request_line, &request_.extra_headers); spdy::Http2HeaderBlock headers; - CreateSpdyHeadersFromHttpRequest(request_, request_.extra_headers, &headers); + CreateSpdyHeadersFromHttpRequest(request_, absl::nullopt, + request_.extra_headers, &headers); return stream_->WriteHeaders(std::move(headers), false, nullptr); }
diff --git a/net/quic/quic_stream_factory_test.cc b/net/quic/quic_stream_factory_test.cc index f0e9b6d..d6e48ac 100644 --- a/net/quic/quic_stream_factory_test.cc +++ b/net/quic/quic_stream_factory_test.cc
@@ -130,11 +130,14 @@ // and enable_connection_racting. struct TestParams { quic::ParsedQuicVersion version; + bool priority_header_enabled; }; // Used by ::testing::PrintToStringParamName(). std::string PrintToString(const TestParams& p) { - return ParsedQuicVersionToString(p.version); + return base::StrCat({ParsedQuicVersionToString(p.version), "_", + p.priority_header_enabled ? "PriorityHeaderEnabled" + : "PriorityHeaderDisabled"}); } std::vector<TestParams> GetTestParams() { @@ -142,7 +145,8 @@ quic::ParsedQuicVersionVector all_supported_versions = AllSupportedQuicVersions(); for (const auto& version : all_supported_versions) { - params.push_back(TestParams{version}); + params.push_back(TestParams{version, true}); + params.push_back(TestParams{version, false}); } return params; } @@ -266,14 +270,16 @@ context_.clock(), kDefaultServerHostName, quic::Perspective::IS_CLIENT, - true), + /*client_priority_uses_incremental=*/true, + /*use_priority_header=*/true), server_maker_(version_, quic::QuicUtils::CreateRandomConnectionId( context_.random_generator()), context_.clock(), kDefaultServerHostName, quic::Perspective::IS_SERVER, - false), + /*client_priority_uses_incremental=*/false, + /*use_priority_header=*/false), http_server_properties_(std::make_unique<HttpServerProperties>()), cert_verifier_(std::make_unique<MockCertVerifier>()), failed_on_default_network_callback_(base::BindRepeating( @@ -976,7 +982,16 @@ class QuicStreamFactoryTest : public QuicStreamFactoryTestBase, public ::testing::TestWithParam<TestParams> { protected: - QuicStreamFactoryTest() : QuicStreamFactoryTestBase(GetParam().version) {} + QuicStreamFactoryTest() : QuicStreamFactoryTestBase(GetParam().version) { + if (GetParam().priority_header_enabled) { + feature_list_.InitAndEnableFeature(net::features::kPriorityHeader); + } else { + feature_list_.InitAndDisableFeature(net::features::kPriorityHeader); + } + } + + private: + base::test::ScopedFeatureList feature_list_; }; INSTANTIATE_TEST_SUITE_P(VersionIncludeStreamDependencySequence, @@ -15035,7 +15050,16 @@ : QuicStreamFactoryTestBase(GetParam().version, /*enabled_features=*/ {features::kEncryptedClientHello, - features::kEncryptedClientHelloQuic}) {} + features::kEncryptedClientHelloQuic}) { + if (GetParam().priority_header_enabled) { + feature_list_.InitAndEnableFeature(net::features::kPriorityHeader); + } else { + feature_list_.InitAndDisableFeature(net::features::kPriorityHeader); + } + } + + private: + base::test::ScopedFeatureList feature_list_; }; INSTANTIATE_TEST_SUITE_P(VersionIncludeStreamDependencySequence,
diff --git a/net/quic/quic_test_packet_maker.cc b/net/quic/quic_test_packet_maker.cc index c2b74b20..2df886d 100644 --- a/net/quic/quic_test_packet_maker.cc +++ b/net/quic/quic_test_packet_maker.cc
@@ -13,6 +13,7 @@ #include "net/quic/mock_crypto_client_stream.h" #include "net/quic/quic_chromium_client_session.h" #include "net/quic/quic_http_utils.h" +#include "net/spdy/spdy_http_utils.h" #include "net/third_party/quiche/src/quiche/quic/core/http/http_constants.h" #include "net/third_party/quiche/src/quiche/quic/core/quic_framer.h" #include "net/third_party/quiche/src/quiche/quic/core/quic_stream.h" @@ -97,14 +98,16 @@ const quic::QuicClock* clock, const std::string& host, quic::Perspective perspective, - bool client_priority_uses_incremental) + bool client_priority_uses_incremental, + bool use_priority_header) : version_(version), connection_id_(connection_id), clock_(clock), host_(host), qpack_encoder_(&decoder_stream_error_delegate_), perspective_(perspective), - client_priority_uses_incremental_(client_priority_uses_incremental) { + client_priority_uses_incremental_(client_priority_uses_incremental), + use_priority_header_(use_priority_header) { DCHECK(!(perspective_ == quic::Perspective::IS_SERVER && client_priority_uses_incremental_)); @@ -764,6 +767,7 @@ AddQuicStreamFrame(2, false, priority_data); } + AddPriorityHeader(spdy_priority, &headers); std::string data = QpackEncodeHeaders(stream_id, std::move(headers), spdy_headers_frame_length); for (const auto& data_write : data_writes) { @@ -795,6 +799,7 @@ } } + AddPriorityHeader(spdy_priority, &headers); std::string data = QpackEncodeHeaders(stream_id, std::move(headers), spdy_headers_frame_length); AddQuicStreamFrame(stream_id, fin, data); @@ -830,6 +835,7 @@ AddQuicStreamFrame(2, false, priority_data); } + AddPriorityHeader(spdy_priority, &headers); std::string data = QpackEncodeHeaders(stream_id, std::move(headers), spdy_headers_frame_length); AddQuicStreamFrame(stream_id, fin, data); @@ -856,6 +862,7 @@ AddQuicStreamFrame(2, false, priority_data); } + AddPriorityHeader(spdy_priority, &headers); std::string data = QpackEncodeHeaders(stream_id, std::move(headers), spdy_headers_frame_length); AddQuicStreamFrame(stream_id, fin, data); @@ -1420,6 +1427,20 @@ return priority_data; } +void QuicTestPacketMaker::AddPriorityHeader(spdy::SpdyPriority spdy_priority, + spdy::Http2HeaderBlock* headers) { + if (use_priority_header_ && + base::FeatureList::IsEnabled(net::features::kPriorityHeader)) { + quic::HttpStreamPriority priority{ + spdy_priority, quic::HttpStreamPriority::kDefaultIncremental}; + if (client_priority_uses_incremental_) { + priority.incremental = kDefaultPriorityIncremental; + } + (*headers)[net::kHttp2PriorityHeader] = + quic::SerializePriorityFieldValue(priority); + } +} + std::string QuicTestPacketMaker::GenerateHttp3GreaseData() { return quic::HttpEncoder::SerializeGreasingFrame(); }
diff --git a/net/quic/quic_test_packet_maker.h b/net/quic/quic_test_packet_maker.h index 74a94d0..3afd9ce 100644 --- a/net/quic/quic_test_packet_maker.h +++ b/net/quic/quic_test_packet_maker.h
@@ -39,7 +39,8 @@ const quic::QuicClock* clock, const std::string& host, quic::Perspective perspective, - bool client_priority_uses_incremental = false); + bool client_priority_uses_incremental = false, + bool use_priority_header = false); QuicTestPacketMaker(const QuicTestPacketMaker&) = delete; QuicTestPacketMaker& operator=(const QuicTestPacketMaker&) = delete; @@ -468,6 +469,8 @@ void AddQuicCryptoFrame(quic::EncryptionLevel level, quic::QuicStreamOffset offset, quic::QuicPacketLength data_length); + void AddPriorityHeader(spdy::SpdyPriority spdy_priority, + spdy::Http2HeaderBlock* headers); // Build packet using |header_|, |frames_|, and |data_producer_|, // and clear |frames_| and |data_producer_| afterwards. @@ -516,6 +519,9 @@ // The value of incremental flag in generated priority headers. bool client_priority_uses_incremental_; + // Add the priority header to outbound requests + bool use_priority_header_; + // Save a copy of stream frame data that QuicStreamFrame objects can refer to. std::vector<std::unique_ptr<std::string>> saved_stream_data_; // If |save_packet_frames_| is true, save generated packets in
diff --git a/net/spdy/bidirectional_stream_spdy_impl.cc b/net/spdy/bidirectional_stream_spdy_impl.cc index 9d2f338..acf84099 100644 --- a/net/spdy/bidirectional_stream_spdy_impl.cc +++ b/net/spdy/bidirectional_stream_spdy_impl.cc
@@ -290,7 +290,7 @@ http_request_info.method = request_info_->method; http_request_info.extra_headers = request_info_->extra_headers; - CreateSpdyHeadersFromHttpRequest(http_request_info, + CreateSpdyHeadersFromHttpRequest(http_request_info, absl::nullopt, http_request_info.extra_headers, &headers); written_end_of_stream_ = request_info_->end_stream_on_headers; return stream_->SendRequestHeaders(std::move(headers),
diff --git a/net/spdy/spdy_http_stream.cc b/net/spdy/spdy_http_stream.cc index 5a3a3b9f..d16f6a5c 100644 --- a/net/spdy/spdy_http_stream.cc +++ b/net/spdy/spdy_http_stream.cc
@@ -68,6 +68,7 @@ if (!spdy_session_) return ERR_CONNECTION_CLOSED; + priority_ = priority; int rv = stream_request_.StartRequest( SPDY_REQUEST_RESPONSE_STREAM, spdy_session_, request_info_->url, can_send_early, priority, request_info_->socket_tag, stream_net_log, @@ -238,7 +239,8 @@ response_info_->remote_endpoint = address; spdy::Http2HeaderBlock headers; - CreateSpdyHeadersFromHttpRequest(*request_info_, request_headers, &headers); + CreateSpdyHeadersFromHttpRequest(*request_info_, priority_, request_headers, + &headers); DispatchRequestHeadersCallback(headers); bool will_send_data = @@ -578,6 +580,7 @@ } void SpdyHttpStream::SetPriority(RequestPriority priority) { + priority_ = priority; if (stream_) { stream_->SetPriority(priority); }
diff --git a/net/spdy/spdy_http_stream.h b/net/spdy/spdy_http_stream.h index 4cf7bbb..1657b13 100644 --- a/net/spdy/spdy_http_stream.h +++ b/net/spdy/spdy_http_stream.h
@@ -219,6 +219,10 @@ // of the session due to complications related to IP-pooling. std::set<std::string> dns_aliases_; + // Keep track of the priority of the request for setting the priority header + // right before sending the request. + RequestPriority priority_ = RequestPriority::DEFAULT_PRIORITY; + base::WeakPtrFactory<SpdyHttpStream> weak_factory_{this}; };
diff --git a/net/spdy/spdy_http_stream_unittest.cc b/net/spdy/spdy_http_stream_unittest.cc index f8efb65..1fb2c97 100644 --- a/net/spdy/spdy_http_stream_unittest.cc +++ b/net/spdy/spdy_http_stream_unittest.cc
@@ -13,10 +13,12 @@ #include "base/memory/raw_ptr.h" #include "base/run_loop.h" #include "base/task/single_thread_task_runner.h" +#include "base/test/scoped_feature_list.h" #include "crypto/ec_private_key.h" #include "crypto/ec_signature_creator.h" #include "crypto/signature_creator.h" #include "net/base/chunked_upload_data_stream.h" +#include "net/base/features.h" #include "net/base/load_timing_info.h" #include "net/base/load_timing_info_test_util.h" #include "net/base/test_completion_callback.h" @@ -26,6 +28,7 @@ #include "net/http/http_response_headers.h" #include "net/http/http_response_info.h" #include "net/log/net_log_with_source.h" +#include "net/quic/quic_http_utils.h" #include "net/socket/socket_tag.h" #include "net/socket/socket_test_util.h" #include "net/spdy/spdy_http_utils.h" @@ -124,10 +127,12 @@ } // namespace -class SpdyHttpStreamTest : public TestWithTaskEnvironment { +class SpdyHttpStreamTest : public testing::TestWithParam<bool>, + public WithTaskEnvironment { public: SpdyHttpStreamTest() - : url_(kDefaultUrl), + : spdy_util_(/*use_priority_header=*/true), + url_(kDefaultUrl), host_port_pair_(HostPortPair::FromURL(url_)), key_(host_port_pair_, ProxyServer::Direct(), @@ -137,6 +142,11 @@ NetworkAnonymizationKey(), SecureDnsPolicy::kAllow), ssl_(SYNCHRONOUS, OK) { + if (PriorityHeaderEnabled()) { + feature_list_.InitAndEnableFeature(net::features::kPriorityHeader); + } else { + feature_list_.InitAndDisableFeature(net::features::kPriorityHeader); + } session_deps_.net_log = NetLog::Get(); } @@ -164,6 +174,8 @@ session_ = CreateSpdySession(http_session_.get(), key_, NetLogWithSource()); } + bool PriorityHeaderEnabled() const { return GetParam(); } + SpdyTestUtil spdy_util_; SpdySessionDependencies session_deps_; const GURL url_; @@ -175,9 +187,12 @@ private: SSLSocketDataProvider ssl_; + base::test::ScopedFeatureList feature_list_; }; -TEST_F(SpdyHttpStreamTest, SendRequest) { +INSTANTIATE_TEST_SUITE_P(All, SpdyHttpStreamTest, testing::Values(true, false)); + +TEST_P(SpdyHttpStreamTest, SendRequest) { spdy::SpdySerializedFrame req( spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST)); MockWrite writes[] = { @@ -238,7 +253,7 @@ http_stream->GetTotalReceivedBytes()); } -TEST_F(SpdyHttpStreamTest, RequestInfoDestroyedBeforeRead) { +TEST_P(SpdyHttpStreamTest, RequestInfoDestroyedBeforeRead) { spdy::SpdySerializedFrame req( spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST)); MockWrite writes[] = {CreateMockWrite(req, 0)}; @@ -300,7 +315,7 @@ http_stream->GetTotalReceivedBytes()); } -TEST_F(SpdyHttpStreamTest, LoadTimingTwoRequests) { +TEST_P(SpdyHttpStreamTest, LoadTimingTwoRequests) { spdy::SpdySerializedFrame req1( spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST)); spdy::SpdySerializedFrame req2( @@ -409,7 +424,7 @@ http_stream2->GetTotalReceivedBytes()); } -TEST_F(SpdyHttpStreamTest, SendChunkedPost) { +TEST_P(SpdyHttpStreamTest, SendChunkedPost) { spdy::SpdySerializedFrame req( spdy_util_.ConstructChunkedSpdyPost(nullptr, 0)); spdy::SpdySerializedFrame body( @@ -472,7 +487,7 @@ } // This unittest tests the request callback is properly called and handled. -TEST_F(SpdyHttpStreamTest, SendChunkedPostLastEmpty) { +TEST_P(SpdyHttpStreamTest, SendChunkedPostLastEmpty) { spdy::SpdySerializedFrame req( spdy_util_.ConstructChunkedSpdyPost(nullptr, 0)); spdy::SpdySerializedFrame chunk( @@ -529,7 +544,7 @@ EXPECT_FALSE(HasSpdySession(http_session_->spdy_session_pool(), key_)); } -TEST_F(SpdyHttpStreamTest, ConnectionClosedDuringChunkedPost) { +TEST_P(SpdyHttpStreamTest, ConnectionClosedDuringChunkedPost) { spdy::SpdySerializedFrame req( spdy_util_.ConstructChunkedSpdyPost(nullptr, 0)); spdy::SpdySerializedFrame body( @@ -600,7 +615,7 @@ // Test to ensure the SpdyStream state machine does not get confused when a // chunk becomes available while a write is pending. -TEST_F(SpdyHttpStreamTest, DelayedSendChunkedPost) { +TEST_P(SpdyHttpStreamTest, DelayedSendChunkedPost) { const char kUploadData1[] = "12345678"; const int kUploadData1Size = std::size(kUploadData1) - 1; spdy::SpdySerializedFrame req( @@ -708,7 +723,7 @@ // Test that the SpdyStream state machine can handle sending a final empty data // frame when uploading a chunked data stream. -TEST_F(SpdyHttpStreamTest, DelayedSendChunkedPostWithEmptyFinalDataFrame) { +TEST_P(SpdyHttpStreamTest, DelayedSendChunkedPostWithEmptyFinalDataFrame) { spdy::SpdySerializedFrame req( spdy_util_.ConstructChunkedSpdyPost(nullptr, 0)); spdy::SpdySerializedFrame chunk1(spdy_util_.ConstructSpdyDataFrame(1, false)); @@ -802,7 +817,7 @@ // Test that the SpdyStream state machine handles a chunked upload with no // payload. Unclear if this is a case worth supporting. -TEST_F(SpdyHttpStreamTest, ChunkedPostWithEmptyPayload) { +TEST_P(SpdyHttpStreamTest, ChunkedPostWithEmptyPayload) { spdy::SpdySerializedFrame req( spdy_util_.ConstructChunkedSpdyPost(nullptr, 0)); spdy::SpdySerializedFrame chunk( @@ -874,7 +889,7 @@ } // Test case for https://crbug.com/50058. -TEST_F(SpdyHttpStreamTest, SpdyURLTest) { +TEST_P(SpdyHttpStreamTest, SpdyURLTest) { const char* const full_url = "https://www.example.org/foo?query=what#anchor"; const char* const base_url = "https://www.example.org/foo?query=what"; spdy::SpdySerializedFrame req( @@ -925,7 +940,7 @@ // Test the receipt of a WINDOW_UPDATE frame while waiting for a chunk to be // made available is handled correctly. -TEST_F(SpdyHttpStreamTest, DelayedSendChunkedPostWithWindowUpdate) { +TEST_P(SpdyHttpStreamTest, DelayedSendChunkedPostWithWindowUpdate) { spdy::SpdySerializedFrame req( spdy_util_.ConstructChunkedSpdyPost(nullptr, 0)); spdy::SpdySerializedFrame chunk1(spdy_util_.ConstructSpdyDataFrame(1, true)); @@ -1028,7 +1043,7 @@ ASSERT_EQ(200, response.headers->response_code()); } -TEST_F(SpdyHttpStreamTest, DataReadErrorSynchronous) { +TEST_P(SpdyHttpStreamTest, DataReadErrorSynchronous) { spdy::SpdySerializedFrame req( spdy_util_.ConstructChunkedSpdyPost(nullptr, 0)); @@ -1085,7 +1100,7 @@ EXPECT_FALSE(HasSpdySession(http_session_->spdy_session_pool(), key_)); } -TEST_F(SpdyHttpStreamTest, DataReadErrorAsynchronous) { +TEST_P(SpdyHttpStreamTest, DataReadErrorAsynchronous) { spdy::SpdySerializedFrame req( spdy_util_.ConstructChunkedSpdyPost(nullptr, 0)); @@ -1144,7 +1159,7 @@ } // Regression test for https://crbug.com/622447. -TEST_F(SpdyHttpStreamTest, RequestCallbackCancelsStream) { +TEST_P(SpdyHttpStreamTest, RequestCallbackCancelsStream) { spdy::SpdySerializedFrame req( spdy_util_.ConstructChunkedSpdyPost(nullptr, 0)); spdy::SpdySerializedFrame chunk( @@ -1198,7 +1213,7 @@ // Regression test for https://crbug.com/1082683. // SendRequest() callback should be called as soon as sending is done, // even when sending greased frame type is allowed. -TEST_F(SpdyHttpStreamTest, DownloadWithEmptyDataFrame) { +TEST_P(SpdyHttpStreamTest, DownloadWithEmptyDataFrame) { session_deps_.http2_end_stream_with_data_frame = true; // HEADERS frame without END_STREAM
diff --git a/net/spdy/spdy_http_utils.cc b/net/spdy/spdy_http_utils.cc index bcc75d4..e353c4b 100644 --- a/net/spdy/spdy_http_utils.cc +++ b/net/spdy/spdy_http_utils.cc
@@ -14,6 +14,7 @@ #include "base/strings/string_split.h" #include "base/strings/string_util.h" #include "base/time/time.h" +#include "net/base/features.h" #include "net/base/load_flags.h" #include "net/base/url_util.h" #include "net/http/http_request_headers.h" @@ -21,9 +22,13 @@ #include "net/http/http_response_headers.h" #include "net/http/http_response_info.h" #include "net/http/http_util.h" +#include "net/quic/quic_http_utils.h" +#include "net/third_party/quiche/src/quiche/quic/core/quic_stream_priority.h" namespace net { +const char* const kHttp2PriorityHeader = "priority"; + namespace { // The number of bytes to reserve for the raw headers string to avoid having to @@ -104,6 +109,7 @@ } void CreateSpdyHeadersFromHttpRequest(const HttpRequestInfo& info, + absl::optional<RequestPriority> priority, const HttpRequestHeaders& request_headers, spdy::Http2HeaderBlock* headers) { (*headers)[spdy::kHttp2MethodHeader] = info.method; @@ -125,6 +131,19 @@ } AddSpdyHeader(name, it.value(), headers); } + + // Add the priority header if there is not already one set. This uses the + // quic helpers but the header values for HTTP extensible priorities are + // independent of quic. + if (priority && + base::FeatureList::IsEnabled(net::features::kPriorityHeader) && + headers->find(kHttp2PriorityHeader) == headers->end()) { + uint8_t urgency = ConvertRequestPriorityToQuicPriority(priority.value()); + bool incremental = info.priority_incremental; + quic::HttpStreamPriority quic_priority{urgency, incremental}; + AddSpdyHeader(kHttp2PriorityHeader, + quic::SerializePriorityFieldValue(quic_priority), headers); + } } void CreateSpdyHeadersFromHttpRequestForWebSocket(
diff --git a/net/spdy/spdy_http_utils.h b/net/spdy/spdy_http_utils.h index 41de046..f6c5b8a 100644 --- a/net/spdy/spdy_http_utils.h +++ b/net/spdy/spdy_http_utils.h
@@ -10,6 +10,7 @@ #include "net/third_party/quiche/src/quiche/spdy/core/http2_header_block.h" #include "net/third_party/quiche/src/quiche/spdy/core/spdy_framer.h" #include "net/third_party/quiche/src/quiche/spdy/core/spdy_protocol.h" +#include "third_party/abseil-cpp/absl/types/optional.h" #include "url/gurl.h" namespace net { @@ -18,6 +19,10 @@ struct HttpRequestInfo; class HttpRequestHeaders; +// HTTP Extensible Priorities header (in lowercase HTTP2/3). +// RFC 9218. +NET_EXPORT extern const char* const kHttp2PriorityHeader; + // Convert a spdy::Http2HeaderBlock into an HttpResponseInfo with some checks. // `headers` input parameter with the spdy::Http2HeaderBlock. // `response` output parameter for the HttpResponseInfo. @@ -30,6 +35,7 @@ // Create a spdy::Http2HeaderBlock from HttpRequestInfo and HttpRequestHeaders. NET_EXPORT void CreateSpdyHeadersFromHttpRequest( const HttpRequestInfo& info, + absl::optional<RequestPriority> priority, const HttpRequestHeaders& request_headers, spdy::Http2HeaderBlock* headers);
diff --git a/net/spdy/spdy_http_utils_unittest.cc b/net/spdy/spdy_http_utils_unittest.cc index 0a1b875..03d6ae4 100644 --- a/net/spdy/spdy_http_utils_unittest.cc +++ b/net/spdy/spdy_http_utils_unittest.cc
@@ -8,6 +8,8 @@ #include <limits> +#include "base/test/scoped_feature_list.h" +#include "net/base/features.h" #include "net/http/http_request_info.h" #include "net/third_party/quiche/src/quiche/spdy/core/spdy_framer.h" #include "net/third_party/quiche/src/quiche/spdy/test_tools/spdy_test_utils.h" @@ -15,6 +17,27 @@ namespace net { +class SpdyHttpUtilsTestParam : public testing::TestWithParam<bool> { + public: + SpdyHttpUtilsTestParam() { + if (PriorityHeaderEnabled()) { + feature_list_.InitAndEnableFeature(net::features::kPriorityHeader); + } else { + feature_list_.InitAndDisableFeature(net::features::kPriorityHeader); + } + } + + protected: + bool PriorityHeaderEnabled() const { return GetParam(); } + + private: + base::test::ScopedFeatureList feature_list_; +}; + +INSTANTIATE_TEST_SUITE_P(All, + SpdyHttpUtilsTestParam, + testing::Values(true, false)); + TEST(SpdyHttpUtilsTest, ConvertRequestPriorityToSpdy3Priority) { EXPECT_EQ(0, ConvertRequestPriorityToSpdyPriority(HIGHEST)); EXPECT_EQ(1, ConvertRequestPriorityToSpdyPriority(MEDIUM)); @@ -38,19 +61,47 @@ } } -TEST(SpdyHttpUtilsTest, CreateSpdyHeadersFromHttpRequestHTTP2) { +TEST_P(SpdyHttpUtilsTestParam, CreateSpdyHeadersFromHttpRequestHTTP2) { GURL url("https://www.google.com/index.html"); HttpRequestInfo request; request.method = "GET"; request.url = url; + request.priority_incremental = true; request.extra_headers.SetHeader(HttpRequestHeaders::kUserAgent, "Chrome/1.1"); spdy::Http2HeaderBlock headers; - CreateSpdyHeadersFromHttpRequest(request, request.extra_headers, &headers); + CreateSpdyHeadersFromHttpRequest(request, RequestPriority::HIGHEST, + request.extra_headers, &headers); EXPECT_EQ("GET", headers[":method"]); EXPECT_EQ("https", headers[":scheme"]); EXPECT_EQ("www.google.com", headers[":authority"]); EXPECT_EQ("/index.html", headers[":path"]); - EXPECT_TRUE(headers.end() == headers.find(":version")); + if (base::FeatureList::IsEnabled(net::features::kPriorityHeader)) { + EXPECT_EQ("u=0, i", headers[net::kHttp2PriorityHeader]); + } else { + EXPECT_EQ(headers.end(), headers.find(net::kHttp2PriorityHeader)); + } + EXPECT_EQ(headers.end(), headers.find(":version")); + EXPECT_EQ("Chrome/1.1", headers["user-agent"]); +} + +TEST_P(SpdyHttpUtilsTestParam, CreateSpdyHeadersWithExistingPriority) { + GURL url("https://www.google.com/index.html"); + HttpRequestInfo request; + request.method = "GET"; + request.url = url; + request.priority_incremental = true; + request.extra_headers.SetHeader(HttpRequestHeaders::kUserAgent, "Chrome/1.1"); + request.extra_headers.SetHeader(net::kHttp2PriorityHeader, + "explicit-priority"); + spdy::Http2HeaderBlock headers; + CreateSpdyHeadersFromHttpRequest(request, RequestPriority::HIGHEST, + request.extra_headers, &headers); + EXPECT_EQ("GET", headers[":method"]); + EXPECT_EQ("https", headers[":scheme"]); + EXPECT_EQ("www.google.com", headers[":authority"]); + EXPECT_EQ("/index.html", headers[":path"]); + EXPECT_EQ("explicit-priority", headers[net::kHttp2PriorityHeader]); + EXPECT_EQ(headers.end(), headers.find(":version")); EXPECT_EQ("Chrome/1.1", headers["user-agent"]); } @@ -61,7 +112,8 @@ request.url = url; request.extra_headers.SetHeader(HttpRequestHeaders::kUserAgent, "Chrome/1.1"); spdy::Http2HeaderBlock headers; - CreateSpdyHeadersFromHttpRequest(request, request.extra_headers, &headers); + CreateSpdyHeadersFromHttpRequest(request, RequestPriority::DEFAULT_PRIORITY, + request.extra_headers, &headers); EXPECT_EQ("CONNECT", headers[":method"]); EXPECT_TRUE(headers.end() == headers.find(":scheme")); EXPECT_EQ("www.google.com:443", headers[":authority"]);
diff --git a/net/spdy/spdy_network_transaction_unittest.cc b/net/spdy/spdy_network_transaction_unittest.cc index 427b3b1..44dfbcd 100644 --- a/net/spdy/spdy_network_transaction_unittest.cc +++ b/net/spdy/spdy_network_transaction_unittest.cc
@@ -24,6 +24,7 @@ #include "net/base/completion_once_callback.h" #include "net/base/elements_upload_data_stream.h" #include "net/base/features.h" +#include "net/base/hex_utils.h" #include "net/base/ip_endpoint.h" #include "net/base/network_anonymization_key.h" #include "net/base/proxy_delegate.h" @@ -94,13 +95,21 @@ const char kPushedUrl[] = "https://www.example.org/foo.dat"; -class SpdyNetworkTransactionTest : public TestWithTaskEnvironment { +class SpdyNetworkTransactionTest : public TestWithTaskEnvironment, + public ::testing::WithParamInterface<bool> { protected: SpdyNetworkTransactionTest() : TestWithTaskEnvironment( base::test::TaskEnvironment::TimeSource::MOCK_TIME), default_url_(kDefaultUrl), - host_port_pair_(HostPortPair::FromURL(default_url_)) {} + host_port_pair_(HostPortPair::FromURL(default_url_)), + spdy_util_(/*use_priority_header=*/true) { + if (PriorityHeaderEnabled()) { + feature_list_.InitAndEnableFeature(net::features::kPriorityHeader); + } else { + feature_list_.InitAndDisableFeature(net::features::kPriorityHeader); + } + } ~SpdyNetworkTransactionTest() override { // UploadDataStream may post a deletion task back to the message loop on @@ -474,6 +483,8 @@ base::Unretained(this), delta); } + bool PriorityHeaderEnabled() const { return GetParam(); } + const GURL default_url_; const HostPortPair host_port_pair_; HttpRequestInfo request_; @@ -484,10 +495,15 @@ std::unique_ptr<ChunkedUploadDataStream> upload_chunked_data_stream_; std::unique_ptr<UploadDataStream> upload_data_stream_; base::ScopedTempDir temp_dir_; + base::test::ScopedFeatureList feature_list_; }; +INSTANTIATE_TEST_SUITE_P(All, + SpdyNetworkTransactionTest, + testing::Values(true, false)); + // Verify HttpNetworkTransaction constructor. -TEST_F(SpdyNetworkTransactionTest, Constructor) { +TEST_P(SpdyNetworkTransactionTest, Constructor) { auto session_deps = std::make_unique<SpdySessionDependencies>(); std::unique_ptr<HttpNetworkSession> session( SpdySessionDependencies::SpdyCreateSession(session_deps.get())); @@ -495,7 +511,7 @@ std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get()); } -TEST_F(SpdyNetworkTransactionTest, Get) { +TEST_P(SpdyNetworkTransactionTest, Get) { // Construct the request. spdy::SpdySerializedFrame req( spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST)); @@ -518,9 +534,9 @@ EXPECT_EQ("hello!", out.response_data); } -TEST_F(SpdyNetworkTransactionTest, SetPriority) { +TEST_P(SpdyNetworkTransactionTest, SetPriority) { for (bool set_priority_before_starting_transaction : {true, false}) { - SpdyTestUtil spdy_test_util; + SpdyTestUtil spdy_test_util(/*use_priority_header=*/true); spdy::SpdySerializedFrame req( spdy_test_util.ConstructSpdyGet(nullptr, 0, 1, LOWEST)); MockWrite writes[] = {CreateMockWrite(req, 0)}; @@ -558,7 +574,7 @@ // Test that changing the request priority of an existing stream triggers // sending PRIORITY frames in case there are multiple open streams and their // relative priorities change. -TEST_F(SpdyNetworkTransactionTest, SetPriorityOnExistingStream) { +TEST_P(SpdyNetworkTransactionTest, SetPriorityOnExistingStream) { const char* kUrl2 = "https://www.example.org/bar"; spdy::SpdySerializedFrame req1( @@ -629,7 +645,7 @@ // Create two requests: a lower priority one first, then a higher priority one. // Test that the second request gets sent out first. -TEST_F(SpdyNetworkTransactionTest, RequestsOrderedByPriority) { +TEST_P(SpdyNetworkTransactionTest, RequestsOrderedByPriority) { const char* kUrl2 = "https://www.example.org/foo"; // First send second request on stream 1, then first request on stream 3. @@ -707,14 +723,19 @@ // Test that already enqueued HEADERS frames are reordered if their relative // priority changes. -TEST_F(SpdyNetworkTransactionTest, QueuedFramesReorderedOnPriorityChange) { +TEST_P(SpdyNetworkTransactionTest, QueuedFramesReorderedOnPriorityChange) { const char* kUrl2 = "https://www.example.org/foo"; const char* kUrl3 = "https://www.example.org/bar"; spdy::SpdySerializedFrame req1( spdy_util_.ConstructSpdyGet(nullptr, 0, 1, DEFAULT_PRIORITY)); spdy::SpdySerializedFrame req3(spdy_util_.ConstructSpdyGet(kUrl3, 3, MEDIUM)); - spdy::SpdySerializedFrame req2(spdy_util_.ConstructSpdyGet(kUrl2, 5, LOWEST)); + // The headers for request 2 are set before the request is sent to SPDY and + // are populated with the initial value (HIGHEST). The priority when it is + // actually sent (later) is "LOWEST" which is sent on the actual priority + // frame. + spdy::SpdySerializedFrame req2(spdy_util_.ConstructSpdyGet( + kUrl2, 5, LOWEST, kDefaultPriorityIncremental, HIGHEST)); MockWrite writes[] = {MockWrite(ASYNC, ERR_IO_PENDING, 0), CreateMockWrite(req1, 1), CreateMockWrite(req3, 2), CreateMockWrite(req2, 3)}; @@ -814,10 +835,10 @@ helper.VerifyDataConsumed(); } -TEST_F(SpdyNetworkTransactionTest, GetAtEachPriority) { +TEST_P(SpdyNetworkTransactionTest, GetAtEachPriority) { for (RequestPriority p = MINIMUM_PRIORITY; p <= MAXIMUM_PRIORITY; p = RequestPriority(p + 1)) { - SpdyTestUtil spdy_test_util; + SpdyTestUtil spdy_test_util(/*use_priority_header=*/true); // Construct the request. spdy::SpdySerializedFrame req( @@ -882,7 +903,7 @@ // TODO(gavinp): create a working generalized TransactionHelper that // can allow multiple streams in flight. -TEST_F(SpdyNetworkTransactionTest, ThreeGets) { +TEST_P(SpdyNetworkTransactionTest, ThreeGets) { spdy::SpdySerializedFrame req( spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST)); spdy::SpdySerializedFrame resp( @@ -968,7 +989,7 @@ EXPECT_EQ("hello!hello!", out.response_data); } -TEST_F(SpdyNetworkTransactionTest, TwoGetsLateBinding) { +TEST_P(SpdyNetworkTransactionTest, TwoGetsLateBinding) { spdy::SpdySerializedFrame req( spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST)); spdy::SpdySerializedFrame resp( @@ -1045,7 +1066,7 @@ helper.VerifyDataConsumed(); } -TEST_F(SpdyNetworkTransactionTest, TwoGetsLateBindingFromPreconnect) { +TEST_P(SpdyNetworkTransactionTest, TwoGetsLateBindingFromPreconnect) { spdy::SpdySerializedFrame req( spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST)); spdy::SpdySerializedFrame resp( @@ -1135,7 +1156,7 @@ // the first transaction completion, and sets a maximum concurrent // stream limit of 1. This means that our IO loop exists after the // second transaction completes, so we can assert on read_index(). -TEST_F(SpdyNetworkTransactionTest, ThreeGetsWithMaxConcurrent) { +TEST_P(SpdyNetworkTransactionTest, ThreeGetsWithMaxConcurrent) { // Construct the request. // Each request fully completes before the next starts. spdy::SpdySerializedFrame req( @@ -1258,7 +1279,7 @@ // different data ("hello!" vs "hello!hello!") and because of the // user specified priority, we expect to see them inverted in // the response from the server. -TEST_F(SpdyNetworkTransactionTest, FourGetsWithMaxConcurrentPriority) { +TEST_P(SpdyNetworkTransactionTest, FourGetsWithMaxConcurrentPriority) { // Construct the request. spdy::SpdySerializedFrame req( spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST)); @@ -1404,7 +1425,7 @@ // deletes a session in the middle of the transaction to ensure // that we properly remove pendingcreatestream objects from // the spdy_session -TEST_F(SpdyNetworkTransactionTest, ThreeGetsWithMaxConcurrentDelete) { +TEST_P(SpdyNetworkTransactionTest, ThreeGetsWithMaxConcurrentDelete) { // Construct the request. spdy::SpdySerializedFrame req( spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST)); @@ -1524,7 +1545,7 @@ // Similar to ThreeGetsMaxConcurrrentDelete above, however, this test // closes the socket while we have a pending transaction waiting for // a pending stream creation. http://crbug.com/52901 -TEST_F(SpdyNetworkTransactionTest, ThreeGetsWithMaxConcurrentSocketClose) { +TEST_P(SpdyNetworkTransactionTest, ThreeGetsWithMaxConcurrentSocketClose) { // Construct the request. Each stream uses a different priority to provide // more useful failure information if the requests are made in an unexpected // order. @@ -1628,7 +1649,7 @@ } // Test that a simple PUT request works. -TEST_F(SpdyNetworkTransactionTest, Put) { +TEST_P(SpdyNetworkTransactionTest, Put) { // Setup the request. request_.method = "PUT"; @@ -1658,7 +1679,7 @@ } // Test that a simple HEAD request works. -TEST_F(SpdyNetworkTransactionTest, Head) { +TEST_P(SpdyNetworkTransactionTest, Head) { // Setup the request. request_.method = "HEAD"; @@ -1688,7 +1709,7 @@ } // Test that a simple POST works. -TEST_F(SpdyNetworkTransactionTest, Post) { +TEST_P(SpdyNetworkTransactionTest, Post) { spdy::SpdySerializedFrame req(spdy_util_.ConstructSpdyPost( kDefaultUrl, 1, kUploadDataSize, LOWEST, nullptr, 0)); spdy::SpdySerializedFrame body(spdy_util_.ConstructSpdyDataFrame(1, true)); @@ -1713,7 +1734,7 @@ } // Test that a POST with a file works. -TEST_F(SpdyNetworkTransactionTest, FilePost) { +TEST_P(SpdyNetworkTransactionTest, FilePost) { spdy::SpdySerializedFrame req(spdy_util_.ConstructSpdyPost( kDefaultUrl, 1, kUploadDataSize, LOWEST, nullptr, 0)); spdy::SpdySerializedFrame body(spdy_util_.ConstructSpdyDataFrame(1, true)); @@ -1738,7 +1759,7 @@ } // Test that a POST with a unreadable file fails. -TEST_F(SpdyNetworkTransactionTest, UnreadableFilePost) { +TEST_P(SpdyNetworkTransactionTest, UnreadableFilePost) { MockWrite writes[] = { MockWrite(ASYNC, 0, 0) // EOF }; @@ -1759,7 +1780,7 @@ } // Test that a complex POST works. -TEST_F(SpdyNetworkTransactionTest, ComplexPost) { +TEST_P(SpdyNetworkTransactionTest, ComplexPost) { spdy::SpdySerializedFrame req(spdy_util_.ConstructSpdyPost( kDefaultUrl, 1, kUploadDataSize, LOWEST, nullptr, 0)); spdy::SpdySerializedFrame body(spdy_util_.ConstructSpdyDataFrame(1, true)); @@ -1784,7 +1805,7 @@ } // Test that a chunked POST works. -TEST_F(SpdyNetworkTransactionTest, ChunkedPost) { +TEST_P(SpdyNetworkTransactionTest, ChunkedPost) { spdy::SpdySerializedFrame req( spdy_util_.ConstructChunkedSpdyPost(nullptr, 0)); spdy::SpdySerializedFrame body(spdy_util_.ConstructSpdyDataFrame(1, true)); @@ -1816,7 +1837,7 @@ } // Test that a chunked POST works with chunks appended after transaction starts. -TEST_F(SpdyNetworkTransactionTest, DelayedChunkedPost) { +TEST_P(SpdyNetworkTransactionTest, DelayedChunkedPost) { spdy::SpdySerializedFrame req( spdy_util_.ConstructChunkedSpdyPost(nullptr, 0)); spdy::SpdySerializedFrame chunk1(spdy_util_.ConstructSpdyDataFrame(1, false)); @@ -1864,7 +1885,7 @@ } // Test that a POST without any post data works. -TEST_F(SpdyNetworkTransactionTest, NullPost) { +TEST_P(SpdyNetworkTransactionTest, NullPost) { // Setup the request. request_.method = "POST"; // Create an empty UploadData. @@ -1899,7 +1920,7 @@ } // Test that a simple POST works. -TEST_F(SpdyNetworkTransactionTest, EmptyPost) { +TEST_P(SpdyNetworkTransactionTest, EmptyPost) { // Create an empty UploadDataStream. std::vector<std::unique_ptr<UploadElementReader>> element_readers; ElementsUploadDataStream stream(std::move(element_readers), 0); @@ -1937,7 +1958,7 @@ } // While we're doing a post, the server sends the reply before upload completes. -TEST_F(SpdyNetworkTransactionTest, ResponseBeforePostCompletes) { +TEST_P(SpdyNetworkTransactionTest, ResponseBeforePostCompletes) { spdy::SpdySerializedFrame req( spdy_util_.ConstructChunkedSpdyPost(nullptr, 0)); spdy::SpdySerializedFrame body(spdy_util_.ConstructSpdyDataFrame(1, true)); @@ -1984,7 +2005,7 @@ // The client upon cancellation tries to send a RST_STREAM frame. The mock // socket causes the TCP write to return zero. This test checks that the client // tries to queue up the RST_STREAM frame again. -TEST_F(SpdyNetworkTransactionTest, SocketWriteReturnsZero) { +TEST_P(SpdyNetworkTransactionTest, SocketWriteReturnsZero) { spdy::SpdySerializedFrame req( spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST)); spdy::SpdySerializedFrame rst( @@ -2018,7 +2039,7 @@ } // Test that the transaction doesn't crash when we don't have a reply. -TEST_F(SpdyNetworkTransactionTest, ResponseWithoutHeaders) { +TEST_P(SpdyNetworkTransactionTest, ResponseWithoutHeaders) { spdy::SpdySerializedFrame body(spdy_util_.ConstructSpdyDataFrame(1, true)); MockRead reads[] = { CreateMockRead(body, 1), MockRead(ASYNC, 0, 3) // EOF @@ -2040,7 +2061,7 @@ // Test that the transaction doesn't crash when we get two replies on the same // stream ID. See http://crbug.com/45639. -TEST_F(SpdyNetworkTransactionTest, ResponseWithTwoSynReplies) { +TEST_P(SpdyNetworkTransactionTest, ResponseWithTwoSynReplies) { spdy::SpdySerializedFrame req( spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST)); spdy::SpdySerializedFrame rst( @@ -2084,7 +2105,7 @@ helper.VerifyDataConsumed(); } -TEST_F(SpdyNetworkTransactionTest, ResetReplyWithTransferEncoding) { +TEST_P(SpdyNetworkTransactionTest, ResetReplyWithTransferEncoding) { // Construct the request. spdy::SpdySerializedFrame req( spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST)); @@ -2115,7 +2136,7 @@ helper.VerifyDataConsumed(); } -TEST_F(SpdyNetworkTransactionTest, CancelledTransaction) { +TEST_P(SpdyNetworkTransactionTest, CancelledTransaction) { // Construct the request. spdy::SpdySerializedFrame req( spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST)); @@ -2153,7 +2174,7 @@ } // Verify that the client sends a Rst Frame upon cancelling the stream. -TEST_F(SpdyNetworkTransactionTest, CancelledTransactionSendRst) { +TEST_P(SpdyNetworkTransactionTest, CancelledTransactionSendRst) { spdy::SpdySerializedFrame req( spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST)); spdy::SpdySerializedFrame rst( @@ -2190,7 +2211,7 @@ // Verify that the client can correctly deal with the user callback attempting // to start another transaction on a session that is closing down. See // http://crbug.com/47455 -TEST_F(SpdyNetworkTransactionTest, StartTransactionOnReadCallback) { +TEST_P(SpdyNetworkTransactionTest, StartTransactionOnReadCallback) { spdy::SpdySerializedFrame req( spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST)); MockWrite writes[] = {CreateMockWrite(req)}; @@ -2254,7 +2275,7 @@ // Verify that the client can correctly deal with the user callback deleting // the transaction. Failures will usually be flagged by thread and/or memory // checking tools. See http://crbug.com/46925 -TEST_F(SpdyNetworkTransactionTest, DeleteSessionOnReadCallback) { +TEST_P(SpdyNetworkTransactionTest, DeleteSessionOnReadCallback) { spdy::SpdySerializedFrame req( spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST)); MockWrite writes[] = {CreateMockWrite(req, 0)}; @@ -2297,7 +2318,7 @@ helper.VerifyDataConsumed(); } -TEST_F(SpdyNetworkTransactionTest, RedirectGetRequest) { +TEST_P(SpdyNetworkTransactionTest, RedirectGetRequest) { MockClientSocketFactory socket_factory; auto context_builder = CreateSpdyTestURLRequestContextBuilder(&socket_factory); @@ -2337,7 +2358,7 @@ ssl_provider1.next_proto = kProtoHTTP2; socket_factory.AddSSLSocketDataProvider(&ssl_provider1); - SpdyTestUtil spdy_util1; + SpdyTestUtil spdy_util1(/*use_priority_header=*/true); spdy::Http2HeaderBlock headers1( spdy_util1.ConstructGetHeaderBlock(kRedirectUrl)); headers1["user-agent"] = ""; @@ -2382,7 +2403,7 @@ EXPECT_TRUE(data1.AllWriteDataConsumed()); } -TEST_F(SpdyNetworkTransactionTest, RedirectMultipleLocations) { +TEST_P(SpdyNetworkTransactionTest, RedirectMultipleLocations) { const spdy::SpdyStreamId kStreamId = 1; // Construct the request and the RST frame. spdy::SpdySerializedFrame req(spdy_util_.ConstructSpdyGet( @@ -2415,7 +2436,7 @@ EXPECT_THAT(out.rv, IsError(ERR_RESPONSE_HEADERS_MULTIPLE_LOCATION)); } -TEST_F(SpdyNetworkTransactionTest, NoConnectionPoolingOverTunnel) { +TEST_P(SpdyNetworkTransactionTest, NoConnectionPoolingOverTunnel) { // Use port 443 for two reasons: This makes the endpoint is port 443 check in // NormalSpdyTransactionHelper pass, and this means that the tunnel uses the // same port as the servers, to further confuse things. @@ -2468,7 +2489,7 @@ ASSERT_TRUE(session1); // The second request uses a second connection. - SpdyTestUtil spdy_util2; + SpdyTestUtil spdy_util2(/*use_priority_header=*/true); spdy::SpdySerializedFrame req2( spdy_util2.ConstructSpdyGet("https://example.test", 1, LOWEST)); MockWrite writes2[] = { @@ -2535,7 +2556,7 @@ // Check that if a session is found after host resolution, but is closed before // the task to try to use it executes, the request will continue to create a new // socket and use it. -TEST_F(SpdyNetworkTransactionTest, ConnectionPoolingSessionClosedBeforeUse) { +TEST_P(SpdyNetworkTransactionTest, ConnectionPoolingSessionClosedBeforeUse) { NormalSpdyTransactionHelper helper(request_, DEFAULT_PRIORITY, log_, nullptr); // Only one request uses the first connection. @@ -2571,7 +2592,7 @@ NetLogWithSource())); // The second request uses a second connection. - SpdyTestUtil spdy_util2; + SpdyTestUtil spdy_util2(/*use_priority_header=*/true); spdy::SpdySerializedFrame req2( spdy_util2.ConstructSpdyGet("https://example.test", 1, LOWEST)); MockWrite writes2[] = { @@ -2651,7 +2672,7 @@ // Test this if two HttpNetworkTransactions try to repurpose the same // SpdySession with two different SocketTags, only one request gets the session, // while the other makes a new SPDY session. -TEST_F(SpdyNetworkTransactionTest, ConnectionPoolingMultipleSocketTags) { +TEST_P(SpdyNetworkTransactionTest, ConnectionPoolingMultipleSocketTags) { const SocketTag kSocketTag1(SocketTag::UNSET_UID, 1); const SocketTag kSocketTag2(SocketTag::UNSET_UID, 2); const SocketTag kSocketTag3(SocketTag::UNSET_UID, 3); @@ -2692,7 +2713,7 @@ helper.AddData(&data2); // The second request uses a second connection. - SpdyTestUtil spdy_util2; + SpdyTestUtil spdy_util2(/*use_priority_header=*/true); spdy::SpdySerializedFrame req2( spdy_util2.ConstructSpdyGet("https://example.test/request2", 1, LOWEST)); MockWrite writes2[] = { @@ -2808,7 +2829,7 @@ helper.VerifyDataConsumed(); } -TEST_F(SpdyNetworkTransactionTest, SocketTagChangeSessionTagWithDnsAliases) { +TEST_P(SpdyNetworkTransactionTest, SocketTagChangeSessionTagWithDnsAliases) { SocketTag socket_tag_1(SocketTag::UNSET_UID, 1); SocketTag socket_tag_2(SocketTag::UNSET_UID, 2); request_.socket_tag = socket_tag_1; @@ -2927,7 +2948,7 @@ helper.VerifyDataConsumed(); } -TEST_F(SpdyNetworkTransactionTest, +TEST_P(SpdyNetworkTransactionTest, SocketTagChangeFromIPAliasedSessionWithDnsAliases) { SocketTag socket_tag_1(SocketTag::UNSET_UID, 1); SocketTag socket_tag_2(SocketTag::UNSET_UID, 2); @@ -3161,7 +3182,7 @@ #endif // BUILDFLAG(IS_ANDROID) // Verify that various response headers parse correctly through the HTTP layer. -TEST_F(SpdyNetworkTransactionTest, ResponseHeaders) { +TEST_P(SpdyNetworkTransactionTest, ResponseHeaders) { struct ResponseHeadersTests { int extra_header_count; const char* extra_headers[4]; @@ -3194,7 +3215,7 @@ for (size_t i = 0; i < std::size(test_cases); ++i) { SCOPED_TRACE(i); - SpdyTestUtil spdy_test_util; + SpdyTestUtil spdy_test_util(/*use_priority_header=*/true); spdy::SpdySerializedFrame req( spdy_test_util.ConstructSpdyGet(nullptr, 0, 1, LOWEST)); MockWrite writes[] = {CreateMockWrite(req, 0)}; @@ -3237,7 +3258,7 @@ } // Verify that we don't crash on invalid response headers. -TEST_F(SpdyNetworkTransactionTest, InvalidResponseHeaders) { +TEST_P(SpdyNetworkTransactionTest, InvalidResponseHeaders) { struct InvalidResponseHeadersTests { int num_headers; const char* headers[10]; @@ -3248,7 +3269,7 @@ for (size_t i = 0; i < std::size(test_cases); ++i) { SCOPED_TRACE(i); - SpdyTestUtil spdy_test_util; + SpdyTestUtil spdy_test_util(/*use_priority_header=*/true); spdy::SpdySerializedFrame req( spdy_test_util.ConstructSpdyGet(nullptr, 0, 1, LOWEST)); @@ -3278,7 +3299,7 @@ } } -TEST_F(SpdyNetworkTransactionTest, CorruptFrameSessionError) { +TEST_P(SpdyNetworkTransactionTest, CorruptFrameSessionError) { spdy::SpdySerializedFrame req( spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST)); spdy::SpdySerializedFrame goaway(spdy_util_.ConstructSpdyGoAway( @@ -3305,7 +3326,7 @@ EXPECT_THAT(out.rv, IsError(ERR_HTTP2_COMPRESSION_ERROR)); } -TEST_F(SpdyNetworkTransactionTest, GoAwayOnDecompressionFailure) { +TEST_P(SpdyNetworkTransactionTest, GoAwayOnDecompressionFailure) { spdy::SpdySerializedFrame req( spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST)); spdy::SpdySerializedFrame goaway(spdy_util_.ConstructSpdyGoAway( @@ -3326,7 +3347,7 @@ EXPECT_THAT(out.rv, IsError(ERR_HTTP2_COMPRESSION_ERROR)); } -TEST_F(SpdyNetworkTransactionTest, GoAwayOnFrameSizeError) { +TEST_P(SpdyNetworkTransactionTest, GoAwayOnFrameSizeError) { spdy::SpdySerializedFrame req( spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST)); spdy::SpdySerializedFrame goaway(spdy_util_.ConstructSpdyGoAway( @@ -3348,7 +3369,7 @@ } // Test that we shutdown correctly on write errors. -TEST_F(SpdyNetworkTransactionTest, WriteError) { +TEST_P(SpdyNetworkTransactionTest, WriteError) { spdy::SpdySerializedFrame req( spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST)); MockWrite writes[] = { @@ -3376,7 +3397,7 @@ } // Test that partial writes work. -TEST_F(SpdyNetworkTransactionTest, PartialWrite) { +TEST_P(SpdyNetworkTransactionTest, PartialWrite) { // Chop the HEADERS frame into 5 chunks. spdy::SpdySerializedFrame req( spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST)); @@ -3404,7 +3425,7 @@ } // Test that the NetLog contains good data for a simple GET request. -TEST_F(SpdyNetworkTransactionTest, NetLog) { +TEST_P(SpdyNetworkTransactionTest, NetLog) { static const char* const kExtraHeaders[] = { "user-agent", "Chrome", @@ -3469,7 +3490,11 @@ ASSERT_TRUE(entries[pos].HasParams()); auto* header_list = entries[pos].params.FindList("headers"); ASSERT_TRUE(header_list); - ASSERT_EQ(5u, header_list->size()); + if (base::FeatureList::IsEnabled(net::features::kPriorityHeader)) { + ASSERT_EQ(6u, header_list->size()); + } else { + ASSERT_EQ(5u, header_list->size()); + } ASSERT_TRUE((*header_list)[0].is_string()); EXPECT_EQ(":method: GET", (*header_list)[0].GetString()); @@ -3491,7 +3516,7 @@ // that when we read out the maximum amount of data (e.g. we received 50 bytes // on the network, but issued a Read for only 5 of those bytes) that the data // flow still works correctly. -TEST_F(SpdyNetworkTransactionTest, BufferFull) { +TEST_P(SpdyNetworkTransactionTest, BufferFull) { spdy::SpdySerializedFrame req( spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST)); MockWrite writes[] = {CreateMockWrite(req, 0)}; @@ -3577,7 +3602,7 @@ // Verify that basic buffering works; when multiple data frames arrive // at the same time, ensure that we don't notify a read completion for // each data frame individually. -TEST_F(SpdyNetworkTransactionTest, Buffering) { +TEST_P(SpdyNetworkTransactionTest, Buffering) { spdy::SpdySerializedFrame req( spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST)); MockWrite writes[] = {CreateMockWrite(req, 0)}; @@ -3660,7 +3685,7 @@ } // Verify the case where we buffer data but read it after it has been buffered. -TEST_F(SpdyNetworkTransactionTest, BufferedAll) { +TEST_P(SpdyNetworkTransactionTest, BufferedAll) { spdy::SpdySerializedFrame req( spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST)); MockWrite writes[] = {CreateMockWrite(req, 0)}; @@ -3737,7 +3762,7 @@ } // Verify the case where we buffer data and close the connection. -TEST_F(SpdyNetworkTransactionTest, BufferedClosed) { +TEST_P(SpdyNetworkTransactionTest, BufferedClosed) { spdy::SpdySerializedFrame req( spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST)); MockWrite writes[] = {CreateMockWrite(req, 0)}; @@ -3812,7 +3837,7 @@ } // Verify the case where we buffer data and cancel the transaction. -TEST_F(SpdyNetworkTransactionTest, BufferedCancelled) { +TEST_P(SpdyNetworkTransactionTest, BufferedCancelled) { spdy::SpdySerializedFrame req( spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST)); spdy::SpdySerializedFrame rst( @@ -3878,7 +3903,7 @@ // Request should fail upon receiving a GOAWAY frame // with Last-Stream-ID lower than the stream id corresponding to the request // and with error code other than NO_ERROR. -TEST_F(SpdyNetworkTransactionTest, FailOnGoAway) { +TEST_P(SpdyNetworkTransactionTest, FailOnGoAway) { spdy::SpdySerializedFrame req( spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST)); MockWrite writes[] = {CreateMockWrite(req, 0)}; @@ -3899,7 +3924,7 @@ // Request should be retried on a new connection upon receiving a GOAWAY frame // with Last-Stream-ID lower than the stream id corresponding to the request // and with error code NO_ERROR. -TEST_F(SpdyNetworkTransactionTest, RetryOnGoAway) { +TEST_P(SpdyNetworkTransactionTest, RetryOnGoAway) { NormalSpdyTransactionHelper helper(request_, DEFAULT_PRIORITY, log_, nullptr); // First connection. @@ -3935,7 +3960,7 @@ // with maximum last-stream-id value. // Transactions started before receiving such a GOAWAY frame should succeed, // but SpdySession should be unavailable for new streams. -TEST_F(SpdyNetworkTransactionTest, GracefulGoaway) { +TEST_P(SpdyNetworkTransactionTest, GracefulGoaway) { spdy::SpdySerializedFrame req1( spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST)); spdy_util_.UpdateWithStreamDestruction(1); @@ -4024,7 +4049,7 @@ // Verify that an active stream with ID not exceeding the Last-Stream-ID field // of the incoming GOAWAY frame can receive data both before and after the // GOAWAY frame. -TEST_F(SpdyNetworkTransactionTest, ActiveStreamWhileGoingAway) { +TEST_P(SpdyNetworkTransactionTest, ActiveStreamWhileGoingAway) { spdy::SpdySerializedFrame req( spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST)); MockWrite writes[] = {CreateMockWrite(req, 0)}; @@ -4066,7 +4091,7 @@ EXPECT_EQ("foobar", response_data); } -TEST_F(SpdyNetworkTransactionTest, CloseWithActiveStream) { +TEST_P(SpdyNetworkTransactionTest, CloseWithActiveStream) { spdy::SpdySerializedFrame req( spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST)); MockWrite writes[] = {CreateMockWrite(req, 0)}; @@ -4096,7 +4121,7 @@ helper.VerifyDataConsumed(); } -TEST_F(SpdyNetworkTransactionTest, GoAwayImmediately) { +TEST_P(SpdyNetworkTransactionTest, GoAwayImmediately) { spdy::SpdySerializedFrame goaway(spdy_util_.ConstructSpdyGoAway(1)); MockRead reads[] = {CreateMockRead(goaway, 0, SYNCHRONOUS)}; SequencedSocketData data(reads, base::span<MockWrite>()); @@ -4121,7 +4146,7 @@ // Retry with HTTP/1.1 when receiving HTTP_1_1_REQUIRED. Note that no actual // protocol negotiation happens, instead this test forces protocols for both // sockets. -TEST_F(SpdyNetworkTransactionTest, HTTP11RequiredRetry) { +TEST_P(SpdyNetworkTransactionTest, HTTP11RequiredRetry) { request_.method = "GET"; // Do not force SPDY so that second socket can negotiate HTTP/1.1. NormalSpdyTransactionHelper helper(request_, DEFAULT_PRIORITY, log_, nullptr); @@ -4193,7 +4218,7 @@ } // Same as above test, but checks that NetworkAnonymizationKeys are respected. -TEST_F(SpdyNetworkTransactionTest, +TEST_P(SpdyNetworkTransactionTest, HTTP11RequiredRetryWithNetworkAnonymizationKey) { const SchemefulSite kSite1(GURL("https://foo.test/")); const SchemefulSite kSite2(GURL("https://bar.test/")); @@ -4229,7 +4254,7 @@ kNetworkIsolationKeys[i]); // First socket: HTTP/2 request rejected with HTTP_1_1_REQUIRED. - SpdyTestUtil spdy_util; + SpdyTestUtil spdy_util(/*use_priority_header=*/true); spdy::Http2HeaderBlock headers( spdy_util.ConstructGetHeaderBlock(kDefaultUrl)); spdy::SpdySerializedFrame req( @@ -4316,7 +4341,7 @@ // Retry with HTTP/1.1 to the proxy when receiving HTTP_1_1_REQUIRED from the // proxy. Note that no actual protocol negotiation happens, instead this test // forces protocols for both sockets. -TEST_F(SpdyNetworkTransactionTest, HTTP11RequiredProxyRetry) { +TEST_P(SpdyNetworkTransactionTest, HTTP11RequiredProxyRetry) { request_.method = "GET"; auto session_deps = std::make_unique<SpdySessionDependencies>( ConfiguredProxyResolutionService::CreateFixedFromPacResultForTest( @@ -4407,7 +4432,7 @@ } // Same as above, but also test that NetworkAnonymizationKeys are respected. -TEST_F(SpdyNetworkTransactionTest, +TEST_P(SpdyNetworkTransactionTest, HTTP11RequiredProxyRetryWithNetworkAnonymizationKey) { const SchemefulSite kSite1(GURL("https://foo.test/")); const SchemefulSite kSite2(GURL("https://bar.test/")); @@ -4446,7 +4471,7 @@ for (size_t i = 0; i < std::size(kNetworkAnonymizationKeys); ++i) { // First socket: HTTP/2 CONNECT rejected with HTTP_1_1_REQUIRED. - SpdyTestUtil spdy_util; + SpdyTestUtil spdy_util(/*use_priority_header=*/true); spdy::SpdySerializedFrame req(spdy_util.ConstructSpdyConnect( nullptr, 0, 1, HttpProxyConnectJob::kH2QuicTunnelPriority, HostPortPair("www.example.org", 443))); @@ -4549,7 +4574,7 @@ } // Test to make sure we can correctly connect through a proxy. -TEST_F(SpdyNetworkTransactionTest, ProxyConnect) { +TEST_P(SpdyNetworkTransactionTest, ProxyConnect) { auto session_deps = std::make_unique<SpdySessionDependencies>( ConfiguredProxyResolutionService::CreateFixedFromPacResultForTest( "PROXY myproxy:70", TRAFFIC_ANNOTATION_FOR_TESTS)); @@ -4604,7 +4629,7 @@ // Test to make sure we can correctly connect through a proxy to // www.example.org, if there already exists a direct spdy connection to // www.example.org. See https://crbug.com/49874. -TEST_F(SpdyNetworkTransactionTest, DirectConnectProxyReconnect) { +TEST_P(SpdyNetworkTransactionTest, DirectConnectProxyReconnect) { // Use a proxy service which returns a proxy fallback list from DIRECT to // myproxy:70. For this test there will be no fallback, so it is equivalent // to simply DIRECT. The reason for appending the second proxy is to verify @@ -4670,7 +4695,7 @@ // New SpdyTestUtil instance for the session that will be used for the // proxy connection. - SpdyTestUtil spdy_util_2; + SpdyTestUtil spdy_util_2(/*use_priority_header=*/true); // Set up data for the proxy connection. const char kConnect443[] = { @@ -4730,7 +4755,7 @@ // on a new connection, if the connection was previously known to be good. // This can happen when a server reboots without saying goodbye, or when // we're behind a NAT that masked the RST. -TEST_F(SpdyNetworkTransactionTest, VerifyRetryOnConnectionReset) { +TEST_P(SpdyNetworkTransactionTest, VerifyRetryOnConnectionReset) { spdy::SpdySerializedFrame resp( spdy_util_.ConstructSpdyGetReply(nullptr, 0, 1)); spdy::SpdySerializedFrame body(spdy_util_.ConstructSpdyDataFrame(1, true)); @@ -4816,7 +4841,7 @@ } // Tests that Basic authentication works over SPDY -TEST_F(SpdyNetworkTransactionTest, SpdyBasicAuth) { +TEST_P(SpdyNetworkTransactionTest, SpdyBasicAuth) { // The first request will be a bare GET, the second request will be a // GET with an Authorization header. spdy::SpdySerializedFrame req_get( @@ -4899,7 +4924,7 @@ EXPECT_FALSE(response_restart->auth_challenge); } -TEST_F(SpdyNetworkTransactionTest, ResponseHeadersTwice) { +TEST_P(SpdyNetworkTransactionTest, ResponseHeadersTwice) { spdy::SpdySerializedFrame req( spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST)); spdy::SpdySerializedFrame rst( @@ -4934,7 +4959,7 @@ // Tests that receiving HEADERS, DATA, HEADERS, and DATA in that sequence will // trigger a ERR_HTTP2_PROTOCOL_ERROR because trailing HEADERS must not be // followed by any DATA frames. -TEST_F(SpdyNetworkTransactionTest, SyncReplyDataAfterTrailers) { +TEST_P(SpdyNetworkTransactionTest, SyncReplyDataAfterTrailers) { spdy::SpdySerializedFrame req( spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST)); spdy::SpdySerializedFrame rst( @@ -4969,7 +4994,7 @@ EXPECT_THAT(out.rv, IsError(ERR_HTTP2_PROTOCOL_ERROR)); } -TEST_F(SpdyNetworkTransactionTest, RetryAfterRefused) { +TEST_P(SpdyNetworkTransactionTest, RetryAfterRefused) { // Construct the request. spdy::SpdySerializedFrame req( spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST)); @@ -5019,7 +5044,7 @@ EXPECT_EQ("HTTP/1.1 200", response.headers->GetStatusLine()); } -TEST_F(SpdyNetworkTransactionTest, OutOfOrderHeaders) { +TEST_P(SpdyNetworkTransactionTest, OutOfOrderHeaders) { // This first request will start to establish the SpdySession. // Then we will start the second (MEDIUM priority) and then third // (HIGHEST priority) request in such a way that the third will actually @@ -5137,7 +5162,7 @@ // all these tests using it. Right now we are working around the // limitations as described above and it's not deterministic, tests may // fail under specific circumstances. -TEST_F(SpdyNetworkTransactionTest, WindowUpdateReceived) { +TEST_P(SpdyNetworkTransactionTest, WindowUpdateReceived) { static int kFrameCount = 2; std::string content(kMaxSpdyFrameChunkSize, 'a'); spdy::SpdySerializedFrame req(spdy_util_.ConstructSpdyPost( @@ -5220,7 +5245,7 @@ // Test that received data frames and sent WINDOW_UPDATE frames change // the recv_window_size_ correctly. -TEST_F(SpdyNetworkTransactionTest, WindowUpdateSent) { +TEST_P(SpdyNetworkTransactionTest, WindowUpdateSent) { // Session level maximum window size that is more than twice the default // initial window size so that an initial window update is sent. const int32_t session_max_recv_window_size = 5 * 64 * 1024; @@ -5362,7 +5387,7 @@ } // Test that WINDOW_UPDATE frame causing overflow is handled correctly. -TEST_F(SpdyNetworkTransactionTest, WindowUpdateOverflow) { +TEST_P(SpdyNetworkTransactionTest, WindowUpdateOverflow) { // Number of full frames we hope to write (but will not, used to // set content-length header correctly) static int kFrameCount = 3; @@ -5422,7 +5447,7 @@ // RFC7540 Section 6.9.2: A spdy::SETTINGS_INITIAL_WINDOW_SIZE change that // causes any stream flow control window to overflow MUST be treated as a // connection error. -TEST_F(SpdyNetworkTransactionTest, InitialWindowSizeOverflow) { +TEST_P(SpdyNetworkTransactionTest, InitialWindowSizeOverflow) { spdy::SpdySerializedFrame window_update( spdy_util_.ConstructSpdyWindowUpdate(1, 0x60000000)); spdy::SettingsMap settings; @@ -5453,7 +5478,7 @@ // Tests that we close the connection if we try to enqueue more frames than // the cap allows. -TEST_F(SpdyNetworkTransactionTest, SessionMaxQueuedCappedFramesExceeded) { +TEST_P(SpdyNetworkTransactionTest, SessionMaxQueuedCappedFramesExceeded) { const int kTestSessionMaxQueuedCappedFrames = 5; const int kTestNumPings = kTestSessionMaxQueuedCappedFrames + 1; spdy::SettingsMap settings; @@ -5516,7 +5541,7 @@ // ensure that last data frame is still there and stream has stalled. // After that, next read is artifically enforced, which causes a // WINDOW_UPDATE to be read and I/O process resumes. -TEST_F(SpdyNetworkTransactionTest, FlowControlStallResume) { +TEST_P(SpdyNetworkTransactionTest, FlowControlStallResume) { const int32_t initial_window_size = kDefaultInitialWindowSize; // Number of upload data buffers we need to send to zero out the window size // is the minimal number of upload buffers takes to be bigger than @@ -5665,7 +5690,7 @@ // Test we correctly handle the case where the SETTINGS frame results in // unstalling the send window. -TEST_F(SpdyNetworkTransactionTest, FlowControlStallResumeAfterSettings) { +TEST_P(SpdyNetworkTransactionTest, FlowControlStallResumeAfterSettings) { const int32_t initial_window_size = kDefaultInitialWindowSize; // Number of upload data buffers we need to send to zero out the window size // is the minimal number of upload buffers takes to be bigger than @@ -5826,7 +5851,7 @@ // Test we correctly handle the case where the SETTINGS frame results in a // negative send window size. -TEST_F(SpdyNetworkTransactionTest, FlowControlNegativeSendWindowSize) { +TEST_P(SpdyNetworkTransactionTest, FlowControlNegativeSendWindowSize) { const int32_t initial_window_size = kDefaultInitialWindowSize; // Number of upload data buffers we need to send to zero out the window size // is the minimal number of upload buffers takes to be bigger than @@ -5981,7 +6006,7 @@ helper.VerifyDataConsumed(); } -TEST_F(SpdyNetworkTransactionTest, ReceivingPushIsConnectionError) { +TEST_P(SpdyNetworkTransactionTest, ReceivingPushIsConnectionError) { spdy::Http2HeaderBlock push_headers; spdy_util_.AddUrlToHeaderBlock("http://www.example.org/a.dat", &push_headers); spdy::SpdySerializedFrame push( @@ -6006,7 +6031,7 @@ // Push streams must have even stream IDs. Test that an incoming push stream // with odd ID is reset the same way as one with even ID. -TEST_F(SpdyNetworkTransactionTest, +TEST_P(SpdyNetworkTransactionTest, ReceivingPushWithOddStreamIdIsConnectionError) { spdy::Http2HeaderBlock push_headers; spdy_util_.AddUrlToHeaderBlock("http://www.example.org/a.dat", &push_headers); @@ -6032,7 +6057,7 @@ // Regression test for https://crbug.com/493348: request header exceeds 16 kB // and thus sent in multiple frames when using HTTP/2. -TEST_F(SpdyNetworkTransactionTest, LargeRequest) { +TEST_P(SpdyNetworkTransactionTest, LargeRequest) { const std::string kKey("foo"); const std::string kValue(1 << 15, 'z'); @@ -6066,7 +6091,7 @@ } // Regression test for https://crbug.com/535629: response header exceeds 16 kB. -TEST_F(SpdyNetworkTransactionTest, LargeResponseHeader) { +TEST_P(SpdyNetworkTransactionTest, LargeResponseHeader) { spdy::Http2HeaderBlock headers( spdy_util_.ConstructGetHeaderBlock(kDefaultUrl)); spdy::SpdySerializedFrame req( @@ -6103,7 +6128,7 @@ } // End of line delimiter is forbidden according to RFC 7230 Section 3.2. -TEST_F(SpdyNetworkTransactionTest, CRLFInHeaderValue) { +TEST_P(SpdyNetworkTransactionTest, CRLFInHeaderValue) { spdy::SpdySerializedFrame req( spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST)); spdy::SpdySerializedFrame rst( @@ -6126,7 +6151,7 @@ // Regression test for https://crbug.com/603182. // No response headers received before RST_STREAM: error. -TEST_F(SpdyNetworkTransactionTest, RstStreamNoError) { +TEST_P(SpdyNetworkTransactionTest, RstStreamNoError) { spdy::SpdySerializedFrame req( spdy_util_.ConstructChunkedSpdyPost(nullptr, 0)); MockWrite writes[] = {CreateMockWrite(req, 0, ASYNC)}; @@ -6146,7 +6171,7 @@ // Regression test for https://crbug.com/603182. // Response headers and data, then RST_STREAM received, // before request body is sent: success. -TEST_F(SpdyNetworkTransactionTest, RstStreamNoErrorAfterResponse) { +TEST_P(SpdyNetworkTransactionTest, RstStreamNoErrorAfterResponse) { spdy::SpdySerializedFrame req( spdy_util_.ConstructChunkedSpdyPost(nullptr, 0)); MockWrite writes[] = {CreateMockWrite(req, 0, ASYNC)}; @@ -6168,7 +6193,7 @@ EXPECT_EQ("hello!", out.response_data); } -TEST_F(SpdyNetworkTransactionTest, 100Continue) { +TEST_P(SpdyNetworkTransactionTest, 100Continue) { spdy::SpdySerializedFrame req( spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST)); MockWrite writes[] = {CreateMockWrite(req, 0)}; @@ -6200,7 +6225,7 @@ // Regression test for https://crbug.com/606990. Server responds before POST // data are sent and closes connection: this must result in // ERR_CONNECTION_CLOSED (as opposed to ERR_HTTP2_PROTOCOL_ERROR). -TEST_F(SpdyNetworkTransactionTest, ResponseBeforePostDataSent) { +TEST_P(SpdyNetworkTransactionTest, ResponseBeforePostDataSent) { spdy::SpdySerializedFrame req( spdy_util_.ConstructChunkedSpdyPost(nullptr, 0)); MockWrite writes[] = {CreateMockWrite(req, 0)}; @@ -6224,7 +6249,7 @@ // Regression test for https://crbug.com/606990. // Server responds before POST data are sent and resets stream with NO_ERROR. -TEST_F(SpdyNetworkTransactionTest, ResponseAndRstStreamBeforePostDataSent) { +TEST_P(SpdyNetworkTransactionTest, ResponseAndRstStreamBeforePostDataSent) { spdy::SpdySerializedFrame req( spdy_util_.ConstructChunkedSpdyPost(nullptr, 0)); MockWrite writes[] = {CreateMockWrite(req, 0)}; @@ -6252,7 +6277,7 @@ // type 0xb, which used to be the BLOCKED frame in previous versions of SPDY, // but is going to be used for the ORIGIN frame. // TODO(bnc): Implement ORIGIN frame support. https://crbug.com/697333 -TEST_F(SpdyNetworkTransactionTest, IgnoreUnsupportedOriginFrame) { +TEST_P(SpdyNetworkTransactionTest, IgnoreUnsupportedOriginFrame) { spdy::SpdySerializedFrame req( spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST)); MockWrite writes[] = {CreateMockWrite(req, 0)}; @@ -6312,7 +6337,11 @@ } }; -TEST_F(SpdyNetworkTransactionTLSUsageCheckTest, TLSVersionTooOld) { +INSTANTIATE_TEST_SUITE_P(All, + SpdyNetworkTransactionTLSUsageCheckTest, + testing::Values(true, false)); + +TEST_P(SpdyNetworkTransactionTLSUsageCheckTest, TLSVersionTooOld) { auto ssl_provider = std::make_unique<SSLSocketDataProvider>(ASYNC, OK); SSLConnectionStatusSetVersion(SSL_CONNECTION_VERSION_SSL3, &ssl_provider->ssl_info.connection_status); @@ -6320,7 +6349,7 @@ RunTLSUsageCheckTest(std::move(ssl_provider)); } -TEST_F(SpdyNetworkTransactionTLSUsageCheckTest, TLSCipherSuiteSucky) { +TEST_P(SpdyNetworkTransactionTLSUsageCheckTest, TLSCipherSuiteSucky) { auto ssl_provider = std::make_unique<SSLSocketDataProvider>(ASYNC, OK); // Set to TLS_RSA_WITH_NULL_MD5 SSLConnectionStatusSetCipherSuite(0x1, @@ -6333,7 +6362,7 @@ // This test sets up an old TLS version just like in TLSVersionTooOld, // and makes sure that it results in an spdy::ERROR_CODE_INADEQUATE_SECURITY // even for a non-secure request URL. -TEST_F(SpdyNetworkTransactionTest, InsecureUrlCreatesSecureSpdySession) { +TEST_P(SpdyNetworkTransactionTest, InsecureUrlCreatesSecureSpdySession) { auto ssl_provider = std::make_unique<SSLSocketDataProvider>(ASYNC, OK); SSLConnectionStatusSetVersion(SSL_CONNECTION_VERSION_SSL3, &ssl_provider->ssl_info.connection_status); @@ -6357,7 +6386,7 @@ EXPECT_THAT(out.rv, IsError(ERR_HTTP2_INADEQUATE_TRANSPORT_SECURITY)); } -TEST_F(SpdyNetworkTransactionTest, RequestHeadersCallback) { +TEST_P(SpdyNetworkTransactionTest, RequestHeadersCallback) { spdy::SpdySerializedFrame req( spdy_util_.ConstructSpdyGet(nullptr, 0, 1, DEFAULT_PRIORITY)); MockWrite writes[] = {CreateMockWrite(req, 0)}; @@ -6391,7 +6420,7 @@ #if BUILDFLAG(ENABLE_WEBSOCKETS) -TEST_F(SpdyNetworkTransactionTest, WebSocketOpensNewConnection) { +TEST_P(SpdyNetworkTransactionTest, WebSocketOpensNewConnection) { base::HistogramTester histogram_tester; NormalSpdyTransactionHelper helper(request_, DEFAULT_PRIORITY, log_, nullptr); helper.RunPreTestSetup(); @@ -6508,7 +6537,7 @@ // Make sure that a WebSocket job doesn't pick up a newly created SpdySession // that doesn't support WebSockets through // HttpStreamFactory::Job::OnSpdySessionAvailable(). -TEST_F(SpdyNetworkTransactionTest, +TEST_P(SpdyNetworkTransactionTest, WebSocketDoesUseNewH2SessionWithoutWebSocketSupport) { base::HistogramTester histogram_tester; auto session_deps = std::make_unique<SpdySessionDependencies>(); @@ -6626,7 +6655,7 @@ helper.VerifyDataConsumed(); } -TEST_F(SpdyNetworkTransactionTest, WebSocketOverHTTP2) { +TEST_P(SpdyNetworkTransactionTest, WebSocketOverHTTP2) { base::HistogramTester histogram_tester; auto session_deps = std::make_unique<SpdySessionDependencies>(); NormalSpdyTransactionHelper helper(request_, HIGHEST, log_, @@ -6754,7 +6783,7 @@ // Make sure that a WebSocket job doesn't pick up a newly created SpdySession // that supports WebSockets through an HTTPS proxy when an H2 server doesn't // support websockets. See https://crbug.com/1010491. -TEST_F(SpdyNetworkTransactionTest, +TEST_P(SpdyNetworkTransactionTest, WebSocketDoesNotUseNewH2SessionWithoutWebSocketSupportOverHttpsProxy) { auto session_deps = std::make_unique<SpdySessionDependencies>( ConfiguredProxyResolutionService::CreateFixedForTest( @@ -6899,7 +6928,7 @@ // Same as above, but checks that a WebSocket connection avoids creating a new // socket if it detects an H2 session when host resolution completes, and // requests also use different hostnames. -TEST_F(SpdyNetworkTransactionTest, +TEST_P(SpdyNetworkTransactionTest, WebSocketOverHTTP2DetectsNewSessionWithAliasing) { base::HistogramTester histogram_tester; auto session_deps = std::make_unique<SpdySessionDependencies>(); @@ -7044,7 +7073,7 @@ // Same as above, but the SpdySession is closed just before use, so the // WebSocket is sent over a new HTTP/1.x connection instead. -TEST_F(SpdyNetworkTransactionTest, +TEST_P(SpdyNetworkTransactionTest, WebSocketOverDetectsNewSessionWithAliasingButClosedBeforeUse) { base::HistogramTester histogram_tester; auto session_deps = std::make_unique<SpdySessionDependencies>(); @@ -7181,7 +7210,7 @@ helper.VerifyDataConsumed(); } -TEST_F(SpdyNetworkTransactionTest, WebSocketNegotiatesHttp2) { +TEST_P(SpdyNetworkTransactionTest, WebSocketNegotiatesHttp2) { HttpRequestInfo request; request.method = "GET"; request.url = GURL("wss://www.example.org/"); @@ -7224,7 +7253,7 @@ helper.VerifyDataConsumed(); } -TEST_F(SpdyNetworkTransactionTest, WebSocketHttp11Required) { +TEST_P(SpdyNetworkTransactionTest, WebSocketHttp11Required) { base::HistogramTester histogram_tester; auto session_deps = std::make_unique<SpdySessionDependencies>(); NormalSpdyTransactionHelper helper(request_, HIGHEST, log_, @@ -7350,7 +7379,7 @@ // When using an HTTP(S) proxy, plaintext WebSockets use CONNECT tunnels. This // should work for HTTP/2 proxies. -TEST_F(SpdyNetworkTransactionTest, PlaintextWebSocketOverHttp2Proxy) { +TEST_P(SpdyNetworkTransactionTest, PlaintextWebSocketOverHttp2Proxy) { spdy::SpdySerializedFrame req(spdy_util_.ConstructSpdyConnect( nullptr, 0, 1, HttpProxyConnectJob::kH2QuicTunnelPriority, HostPortPair("www.example.org", 80))); @@ -7411,7 +7440,7 @@ helper.VerifyDataConsumed(); } -TEST_F(SpdyNetworkTransactionTest, SecureWebSocketOverHttp2Proxy) { +TEST_P(SpdyNetworkTransactionTest, SecureWebSocketOverHttp2Proxy) { spdy::SpdySerializedFrame connect_request(spdy_util_.ConstructSpdyConnect( nullptr, 0, 1, HttpProxyConnectJob::kH2QuicTunnelPriority, HostPortPair("www.example.org", 443))); @@ -7493,7 +7522,7 @@ } // Regression test for https://crbug.com/828865. -TEST_F(SpdyNetworkTransactionTest, +TEST_P(SpdyNetworkTransactionTest, SecureWebSocketOverHttp2ProxyNegotiatesHttp2) { spdy::SpdySerializedFrame connect_request(spdy_util_.ConstructSpdyConnect( nullptr, 0, 1, HttpProxyConnectJob::kH2QuicTunnelPriority, @@ -7545,7 +7574,7 @@ #endif // BUILDFLAG(ENABLE_WEBSOCKETS) -TEST_F(SpdyNetworkTransactionTest, ZeroRTTDoesntConfirm) { +TEST_P(SpdyNetworkTransactionTest, ZeroRTTDoesntConfirm) { static const base::TimeDelta kDelay = base::Milliseconds(10); spdy::SpdySerializedFrame req( spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST)); @@ -7588,7 +7617,7 @@ } // Run multiple concurrent streams that don't require handshake confirmation. -TEST_F(SpdyNetworkTransactionTest, ZeroRTTNoConfirmMultipleStreams) { +TEST_P(SpdyNetworkTransactionTest, ZeroRTTNoConfirmMultipleStreams) { spdy::SpdySerializedFrame req1( spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST)); spdy::SpdySerializedFrame req2( @@ -7644,7 +7673,7 @@ } // Run multiple concurrent streams that require handshake confirmation. -TEST_F(SpdyNetworkTransactionTest, ZeroRTTConfirmMultipleStreams) { +TEST_P(SpdyNetworkTransactionTest, ZeroRTTConfirmMultipleStreams) { spdy::Http2HeaderBlock req_block1( spdy_util_.ConstructPostHeaderBlock(kDefaultUrl, 0)); spdy::SpdySerializedFrame req1( @@ -7732,7 +7761,7 @@ // Run multiple concurrent streams, the first require a confirmation and the // second not requiring confirmation. -TEST_F(SpdyNetworkTransactionTest, ZeroRTTConfirmNoConfirmStreams) { +TEST_P(SpdyNetworkTransactionTest, ZeroRTTConfirmNoConfirmStreams) { // This test orders the writes such that the GET (no confirmation) is written // before the POST (confirmation required). spdy::Http2HeaderBlock req_block1( @@ -7825,7 +7854,7 @@ // Run multiple concurrent streams, the first not requiring confirmation and the // second requiring confirmation. -TEST_F(SpdyNetworkTransactionTest, ZeroRTTNoConfirmConfirmStreams) { +TEST_P(SpdyNetworkTransactionTest, ZeroRTTNoConfirmConfirmStreams) { // This test orders the writes such that the GET (no confirmation) is written // before the POST (confirmation required). spdy::Http2HeaderBlock req_block1( @@ -7916,7 +7945,7 @@ helper.VerifyDataConsumed(); } -TEST_F(SpdyNetworkTransactionTest, ZeroRTTSyncConfirmSyncWrite) { +TEST_P(SpdyNetworkTransactionTest, ZeroRTTSyncConfirmSyncWrite) { static const base::TimeDelta kDelay = base::Milliseconds(10); spdy::SpdySerializedFrame req(spdy_util_.ConstructSpdyPost( kDefaultUrl, 1, kUploadDataSize, LOWEST, nullptr, 0)); @@ -7961,7 +7990,7 @@ EXPECT_EQ(load_timing_info.connect_timing.connect_end, start_time + kDelay); } -TEST_F(SpdyNetworkTransactionTest, ZeroRTTSyncConfirmAsyncWrite) { +TEST_P(SpdyNetworkTransactionTest, ZeroRTTSyncConfirmAsyncWrite) { spdy::SpdySerializedFrame req(spdy_util_.ConstructSpdyPost( kDefaultUrl, 1, kUploadDataSize, LOWEST, nullptr, 0)); spdy::SpdySerializedFrame body(spdy_util_.ConstructSpdyDataFrame(1, true)); @@ -7991,7 +8020,7 @@ EXPECT_EQ("hello!", out.response_data); } -TEST_F(SpdyNetworkTransactionTest, ZeroRTTAsyncConfirmSyncWrite) { +TEST_P(SpdyNetworkTransactionTest, ZeroRTTAsyncConfirmSyncWrite) { static const base::TimeDelta kDelay = base::Milliseconds(10); spdy::SpdySerializedFrame req(spdy_util_.ConstructSpdyPost( kDefaultUrl, 1, kUploadDataSize, LOWEST, nullptr, 0)); @@ -8035,7 +8064,7 @@ start_time + 2 * kDelay); } -TEST_F(SpdyNetworkTransactionTest, ZeroRTTAsyncConfirmAsyncWrite) { +TEST_P(SpdyNetworkTransactionTest, ZeroRTTAsyncConfirmAsyncWrite) { spdy::SpdySerializedFrame req(spdy_util_.ConstructSpdyPost( kDefaultUrl, 1, kUploadDataSize, LOWEST, nullptr, 0)); spdy::SpdySerializedFrame body(spdy_util_.ConstructSpdyDataFrame(1, true)); @@ -8065,7 +8094,7 @@ EXPECT_EQ("hello!", out.response_data); } -TEST_F(SpdyNetworkTransactionTest, ZeroRTTConfirmErrorSync) { +TEST_P(SpdyNetworkTransactionTest, ZeroRTTConfirmErrorSync) { spdy::SpdySerializedFrame req(spdy_util_.ConstructSpdyPost( kDefaultUrl, 1, kUploadDataSize, LOWEST, nullptr, 0)); spdy::SpdySerializedFrame body(spdy_util_.ConstructSpdyDataFrame(1, true)); @@ -8094,7 +8123,7 @@ EXPECT_THAT(out.rv, IsError(ERR_SSL_PROTOCOL_ERROR)); } -TEST_F(SpdyNetworkTransactionTest, ZeroRTTConfirmErrorAsync) { +TEST_P(SpdyNetworkTransactionTest, ZeroRTTConfirmErrorAsync) { spdy::SpdySerializedFrame req(spdy_util_.ConstructSpdyPost( kDefaultUrl, 1, kUploadDataSize, LOWEST, nullptr, 0)); spdy::SpdySerializedFrame body(spdy_util_.ConstructSpdyDataFrame(1, true)); @@ -8123,7 +8152,7 @@ EXPECT_THAT(out.rv, IsError(ERR_SSL_PROTOCOL_ERROR)); } -TEST_F(SpdyNetworkTransactionTest, GreaseSettings) { +TEST_P(SpdyNetworkTransactionTest, GreaseSettings) { RecordingNetLogObserver net_log_observer; auto session_deps = std::make_unique<SpdySessionDependencies>(); @@ -8190,7 +8219,7 @@ // GET request will close the stream using the END_STREAM flag. Test that // |greased_http2_frame| is ignored and no reserved frames are sent on a closed // stream. -TEST_F(SpdyNetworkTransactionTest, +TEST_P(SpdyNetworkTransactionTest, DoNotGreaseFrameTypeWithGetRequestIfHeadersFrameClosesStream) { auto session_deps = std::make_unique<SpdySessionDependencies>(); @@ -8234,7 +8263,7 @@ // both set, then the HEADERS frame does not have the END_STREAM flag set, it is // followed by a greased frame, and then by an empty DATA frame with END_STREAM // set. -TEST_F(SpdyNetworkTransactionTest, GreaseFrameTypeWithGetRequest) { +TEST_P(SpdyNetworkTransactionTest, GreaseFrameTypeWithGetRequest) { auto session_deps = std::make_unique<SpdySessionDependencies>(); const uint8_t type = 0x0b; @@ -8293,7 +8322,7 @@ // Test sending a greased frame before DATA frame that closes the stream when // |http2_end_stream_with_data_frame| is false. -TEST_F(SpdyNetworkTransactionTest, +TEST_P(SpdyNetworkTransactionTest, GreaseFrameTypeWithPostRequestWhenHeadersFrameClosesStream) { UsePostRequest(); @@ -8353,7 +8382,7 @@ // Test sending a greased frame before DATA frame that closes the stream. // |http2_end_stream_with_data_frame| is true but should make no difference, // because the stream is already closed by a DATA frame. -TEST_F(SpdyNetworkTransactionTest, +TEST_P(SpdyNetworkTransactionTest, GreaseFrameTypeWithPostRequestWhenEmptyDataFrameClosesStream) { UsePostRequest(); @@ -8415,7 +8444,7 @@ // PRIORITY) MUST NOT be sent on a connected stream". // Also test that |http2_end_stream_with_data_frame| has no effect on proxy // streams. -TEST_F(SpdyNetworkTransactionTest, DoNotGreaseFrameTypeWithConnect) { +TEST_P(SpdyNetworkTransactionTest, DoNotGreaseFrameTypeWithConnect) { auto session_deps = std::make_unique<SpdySessionDependencies>( ConfiguredProxyResolutionService::CreateFixedFromPacResultForTest( "HTTPS myproxy:70", TRAFFIC_ANNOTATION_FOR_TESTS)); @@ -8499,7 +8528,7 @@ // frame of reserved type, then an empty DATA frame to close the stream. // Response arrives before reserved frame and DATA frame can be sent. // SpdyHttpStream::OnDataSent() must not crash. -TEST_F(SpdyNetworkTransactionTest, OnDataSentDoesNotCrashWithGreasedFrameType) { +TEST_P(SpdyNetworkTransactionTest, OnDataSentDoesNotCrashWithGreasedFrameType) { auto session_deps = std::make_unique<SpdySessionDependencies>(); const uint8_t type = 0x0b; @@ -8561,7 +8590,7 @@ helper.VerifyDataConsumed(); } -TEST_F(SpdyNetworkTransactionTest, NotAllowHTTP1NotBlockH2Post) { +TEST_P(SpdyNetworkTransactionTest, NotAllowHTTP1NotBlockH2Post) { spdy::SpdySerializedFrame req( spdy_util_.ConstructChunkedSpdyPost(nullptr, 0)); spdy::SpdySerializedFrame body(spdy_util_.ConstructSpdyDataFrame(1, true)); @@ -8587,7 +8616,7 @@ EXPECT_EQ("hello!", out.response_data); } -TEST_F(SpdyNetworkTransactionTest, AlpsFramingError) { +TEST_P(SpdyNetworkTransactionTest, AlpsFramingError) { base::HistogramTester histogram_tester; spdy::SpdySerializedFrame goaway(spdy_util_.ConstructSpdyGoAway(
diff --git a/net/spdy/spdy_proxy_client_socket.cc b/net/spdy/spdy_proxy_client_socket.cc index 87cbdd1..8956c56 100644 --- a/net/spdy/spdy_proxy_client_socket.cc +++ b/net/spdy/spdy_proxy_client_socket.cc
@@ -390,7 +390,8 @@ request_line, &request_.extra_headers); spdy::Http2HeaderBlock headers; - CreateSpdyHeadersFromHttpRequest(request_, request_.extra_headers, &headers); + CreateSpdyHeadersFromHttpRequest(request_, absl::nullopt, + request_.extra_headers, &headers); return spdy_stream_->SendRequestHeaders(std::move(headers), MORE_DATA_TO_SEND);
diff --git a/net/spdy/spdy_test_util_common.cc b/net/spdy/spdy_test_util_common.cc index fb59d15e..409b10b 100644 --- a/net/spdy/spdy_test_util_common.cc +++ b/net/spdy/spdy_test_util_common.cc
@@ -17,6 +17,7 @@ #include "base/strings/string_piece.h" #include "base/strings/string_split.h" #include "build/build_config.h" +#include "net/base/features.h" #include "net/base/host_port_pair.h" #include "net/base/http_user_agent_settings.h" #include "net/cert/ct_policy_enforcer.h" @@ -31,6 +32,7 @@ #include "net/log/net_log_with_source.h" #include "net/proxy_resolution/configured_proxy_resolution_service.h" #include "net/quic/quic_context.h" +#include "net/quic/quic_http_utils.h" #include "net/socket/client_socket_handle.h" #include "net/socket/next_proto.h" #include "net/socket/socket_tag.h" @@ -582,11 +584,12 @@ pool_->enable_sending_initial_data_ = enabled; } -SpdyTestUtil::SpdyTestUtil() +SpdyTestUtil::SpdyTestUtil(bool use_priority_header) : headerless_spdy_framer_(spdy::SpdyFramer::ENABLE_COMPRESSION), request_spdy_framer_(spdy::SpdyFramer::ENABLE_COMPRESSION), response_spdy_framer_(spdy::SpdyFramer::ENABLE_COMPRESSION), - default_url_(GURL(kDefaultUrl)) {} + default_url_(GURL(kDefaultUrl)), + use_priority_header_(use_priority_header) {} SpdyTestUtil::~SpdyTestUtil() = default; @@ -599,6 +602,20 @@ (*headers)[spdy::kHttp2PathHeader] = path; } +void SpdyTestUtil::AddPriorityToHeaderBlock( + RequestPriority request_priority, + bool priority_incremental, + spdy::Http2HeaderBlock* headers) const { + if (use_priority_header_ && + base::FeatureList::IsEnabled(net::features::kPriorityHeader)) { + uint8_t urgency = ConvertRequestPriorityToQuicPriority(request_priority); + bool incremental = priority_incremental; + quic::HttpStreamPriority priority{urgency, incremental}; + (*headers)[kHttp2PriorityHeader] = + quic::SerializePriorityFieldValue(priority); + } +} + // static spdy::Http2HeaderBlock SpdyTestUtil::ConstructGetHeaderBlock( base::StringPiece url) { @@ -729,23 +746,29 @@ spdy::SpdySerializedFrame SpdyTestUtil::ConstructSpdyGet( const char* const url, spdy::SpdyStreamId stream_id, - RequestPriority request_priority) { + RequestPriority request_priority, + bool priority_incremental, + absl::optional<RequestPriority> header_request_priority) { spdy::Http2HeaderBlock block(ConstructGetHeaderBlock(url)); return ConstructSpdyHeaders(stream_id, std::move(block), request_priority, - true); + true, priority_incremental, + header_request_priority); } spdy::SpdySerializedFrame SpdyTestUtil::ConstructSpdyGet( const char* const extra_headers[], int extra_header_count, int stream_id, - RequestPriority request_priority) { + RequestPriority request_priority, + bool priority_incremental, + absl::optional<RequestPriority> header_request_priority) { spdy::Http2HeaderBlock block; block[spdy::kHttp2MethodHeader] = "GET"; AddUrlToHeaderBlock(default_url_.spec(), &block); AppendToHeaderBlock(extra_headers, extra_header_count, &block); return ConstructSpdyHeaders(stream_id, std::move(block), request_priority, - true); + true, priority_incremental, + header_request_priority); } spdy::SpdySerializedFrame SpdyTestUtil::ConstructSpdyConnect( @@ -785,7 +808,9 @@ int stream_id, spdy::Http2HeaderBlock block, RequestPriority priority, - bool fin) { + bool fin, + bool priority_incremental, + absl::optional<RequestPriority> header_request_priority) { // Get the stream id of the next highest priority request // (most recent request of the same priority, or last request of // an earlier priority). @@ -804,6 +829,12 @@ priority_to_stream_id_list_[priority].push_back(stream_id); + if (block[spdy::kHttp2MethodHeader] != "CONNECT") { + RequestPriority header_priority = + header_request_priority.value_or(priority); + AddPriorityToHeaderBlock(header_priority, priority_incremental, &block); + } + spdy::SpdyHeadersIR headers(stream_id, std::move(block)); headers.set_has_priority(true); headers.set_weight(spdy::Spdy3PriorityToHttp2Weight( @@ -856,22 +887,27 @@ const char* url, spdy::SpdyStreamId stream_id, int64_t content_length, - RequestPriority priority, + RequestPriority request_priority, const char* const extra_headers[], - int extra_header_count) { + int extra_header_count, + bool priority_incremental) { spdy::Http2HeaderBlock block(ConstructPostHeaderBlock(url, content_length)); AppendToHeaderBlock(extra_headers, extra_header_count, &block); - return ConstructSpdyHeaders(stream_id, std::move(block), priority, false); + return ConstructSpdyHeaders(stream_id, std::move(block), request_priority, + false, priority_incremental); } spdy::SpdySerializedFrame SpdyTestUtil::ConstructChunkedSpdyPost( const char* const extra_headers[], - int extra_header_count) { + int extra_header_count, + RequestPriority request_priority, + bool priority_incremental) { spdy::Http2HeaderBlock block; block[spdy::kHttp2MethodHeader] = "POST"; AddUrlToHeaderBlock(default_url_.spec(), &block); AppendToHeaderBlock(extra_headers, extra_header_count, &block); - return ConstructSpdyHeaders(1, std::move(block), LOWEST, false); + return ConstructSpdyHeaders(1, std::move(block), request_priority, false, + priority_incremental); } spdy::SpdySerializedFrame SpdyTestUtil::ConstructSpdyPostReply(
diff --git a/net/spdy/spdy_test_util_common.h b/net/spdy/spdy_test_util_common.h index 8d232332..b99cf13 100644 --- a/net/spdy/spdy_test_util_common.h +++ b/net/spdy/spdy_test_util_common.h
@@ -264,13 +264,18 @@ class SpdyTestUtil { public: - SpdyTestUtil(); + explicit SpdyTestUtil(bool use_priority_header = false); ~SpdyTestUtil(); // Add the appropriate headers to put |url| into |block|. void AddUrlToHeaderBlock(base::StringPiece url, spdy::Http2HeaderBlock* headers) const; + // Add the appropriate priority header if PriorityHeaders is enabled. + void AddPriorityToHeaderBlock(RequestPriority request_priority, + bool priority_incremental, + spdy::Http2HeaderBlock* headers) const; + static spdy::Http2HeaderBlock ConstructGetHeaderBlock(base::StringPiece url); static spdy::Http2HeaderBlock ConstructGetHeaderBlockForProxy( base::StringPiece url); @@ -333,18 +338,24 @@ // compression. // |extra_headers| are the extra header-value pairs, which typically // will vary the most between calls. - spdy::SpdySerializedFrame ConstructSpdyGet(const char* const url, - spdy::SpdyStreamId stream_id, - RequestPriority request_priority); + spdy::SpdySerializedFrame ConstructSpdyGet( + const char* const url, + spdy::SpdyStreamId stream_id, + RequestPriority request_priority, + bool priority_incremental = kDefaultPriorityIncremental, + absl::optional<RequestPriority> header_request_priority = absl::nullopt); // Constructs a standard SPDY GET HEADERS frame with header compression. // |extra_headers| are the extra header-value pairs, which typically // will vary the most between calls. If |direct| is false, the // the full url will be used instead of simply the path. - spdy::SpdySerializedFrame ConstructSpdyGet(const char* const extra_headers[], - int extra_header_count, - int stream_id, - RequestPriority request_priority); + spdy::SpdySerializedFrame ConstructSpdyGet( + const char* const extra_headers[], + int extra_header_count, + int stream_id, + RequestPriority request_priority, + bool priority_incremental = kDefaultPriorityIncremental, + absl::optional<RequestPriority> header_request_priority = absl::nullopt); // Constructs a SPDY HEADERS frame for a CONNECT request. spdy::SpdySerializedFrame ConstructSpdyConnect( @@ -368,10 +379,13 @@ bool fin); // Construct a HEADERS frame carrying exactly the given headers and priority. - spdy::SpdySerializedFrame ConstructSpdyHeaders(int stream_id, - spdy::Http2HeaderBlock headers, - RequestPriority priority, - bool fin); + spdy::SpdySerializedFrame ConstructSpdyHeaders( + int stream_id, + spdy::Http2HeaderBlock headers, + RequestPriority priority, + bool fin, + bool priority_incremental = kDefaultPriorityIncremental, + absl::optional<RequestPriority> header_request_priority = absl::nullopt); // Construct a reply HEADERS frame carrying exactly the given headers and the // default priority. @@ -400,19 +414,23 @@ // Constructs a standard SPDY POST HEADERS frame. // |extra_headers| are the extra header-value pairs, which typically // will vary the most between calls. - spdy::SpdySerializedFrame ConstructSpdyPost(const char* url, - spdy::SpdyStreamId stream_id, - int64_t content_length, - RequestPriority priority, - const char* const extra_headers[], - int extra_header_count); + spdy::SpdySerializedFrame ConstructSpdyPost( + const char* url, + spdy::SpdyStreamId stream_id, + int64_t content_length, + RequestPriority request_priority, + const char* const extra_headers[], + int extra_header_count, + bool priority_incremental = kDefaultPriorityIncremental); // Constructs a chunked transfer SPDY POST HEADERS frame. // |extra_headers| are the extra header-value pairs, which typically // will vary the most between calls. spdy::SpdySerializedFrame ConstructChunkedSpdyPost( const char* const extra_headers[], - int extra_header_count); + int extra_header_count, + RequestPriority request_priority = RequestPriority::DEFAULT_PRIORITY, + bool priority_incremental = kDefaultPriorityIncremental); // Constructs a standard SPDY HEADERS frame to match the SPDY POST. // |extra_headers| are the extra header-value pairs, which typically @@ -468,6 +486,9 @@ GURL default_url_; + // Enable support for addint the "priority" header to requests. + bool use_priority_header_; + // Track a FIFO list of the stream_id of all created requests by priority. std::map<int, std::vector<int>> priority_to_stream_id_list_; };
diff --git a/net/websockets/websocket_stream_test.cc b/net/websockets/websocket_stream_test.cc index 8d978339..f1ebcc5 100644 --- a/net/websockets/websocket_stream_test.cc +++ b/net/websockets/websocket_stream_test.cc
@@ -98,15 +98,26 @@ origin, SiteForCookies::FromOrigin(origin)); } -class WebSocketStreamCreateTest : public TestWithParam<HandshakeStreamType>, - public WebSocketStreamCreateTestBase { +class WebSocketStreamCreateTest + : public TestWithParam<std::tuple<HandshakeStreamType, bool>>, + public WebSocketStreamCreateTestBase { protected: - WebSocketStreamCreateTest() : stream_type_(GetParam()) { + WebSocketStreamCreateTest() + : stream_type_(std::get<HandshakeStreamType>(GetParam())), + spdy_util_(/*use_priority_header=*/true) { // Make sure these tests all pass with connection partitioning enabled. The // disabled case is less interesting, and is tested more directly at lower // layers. - feature_list_.InitAndEnableFeature( - features::kPartitionConnectionsByNetworkIsolationKey); + if (PriorityHeaderEnabled()) { + feature_list_.InitWithFeatures( + {features::kPartitionConnectionsByNetworkIsolationKey, + net::features::kPriorityHeader}, + {}); + } else { + feature_list_.InitWithFeatures( + {features::kPartitionConnectionsByNetworkIsolationKey}, + {net::features::kPriorityHeader}); + } } ~WebSocketStreamCreateTest() override { @@ -373,6 +384,8 @@ std::move(timer_)); } + bool PriorityHeaderEnabled() const { return std::get<bool>(GetParam()); } + private: void AddWrite(const spdy::SpdySerializedFrame* frame) { writes_.emplace_back(ASYNC, frame->data(), frame->size(), @@ -409,14 +422,16 @@ INSTANTIATE_TEST_SUITE_P(All, WebSocketStreamCreateTest, - Values(BASIC_HANDSHAKE_STREAM)); + testing::Combine(Values(BASIC_HANDSHAKE_STREAM), + testing::Bool())); using WebSocketMultiProtocolStreamCreateTest = WebSocketStreamCreateTest; INSTANTIATE_TEST_SUITE_P(All, WebSocketMultiProtocolStreamCreateTest, - Values(BASIC_HANDSHAKE_STREAM, - HTTP2_HANDSHAKE_STREAM)); + testing::Combine(Values(BASIC_HANDSHAKE_STREAM, + HTTP2_HANDSHAKE_STREAM), + testing::Bool())); // There are enough tests of the Sec-WebSocket-Extensions header that they // deserve their own test fixture. @@ -438,8 +453,9 @@ INSTANTIATE_TEST_SUITE_P(All, WebSocketStreamCreateExtensionTest, - Values(BASIC_HANDSHAKE_STREAM, - HTTP2_HANDSHAKE_STREAM)); + testing::Combine(Values(BASIC_HANDSHAKE_STREAM, + HTTP2_HANDSHAKE_STREAM), + testing::Bool())); // Common code to construct expectations for authentication tests that receive // the auth challenge on one connection and then create a second connection to @@ -522,7 +538,8 @@ INSTANTIATE_TEST_SUITE_P(All, WebSocketStreamCreateBasicAuthTest, - Values(BASIC_HANDSHAKE_STREAM)); + testing::Combine(Values(BASIC_HANDSHAKE_STREAM), + testing::Bool())); class WebSocketStreamCreateDigestAuthTest : public WebSocketStreamCreateTest { protected: @@ -534,7 +551,8 @@ INSTANTIATE_TEST_SUITE_P(All, WebSocketStreamCreateDigestAuthTest, - Values(BASIC_HANDSHAKE_STREAM)); + testing::Combine(Values(BASIC_HANDSHAKE_STREAM), + testing::Bool())); const char WebSocketStreamCreateBasicAuthTest::kUnauthorizedResponse[] = "HTTP/1.1 401 Unauthorized\r\n"
diff --git a/services/network/trust_tokens/trust_token_persister_unittest.cc b/services/network/trust_tokens/trust_token_persister_unittest.cc index 0b338dc..3a580151 100644 --- a/services/network/trust_tokens/trust_token_persister_unittest.cc +++ b/services/network/trust_tokens/trust_token_persister_unittest.cc
@@ -12,6 +12,7 @@ #include "base/functional/callback.h" #include "base/task/single_thread_task_runner.h" #include "base/test/bind.h" +#include "base/test/protobuf_matchers.h" #include "base/test/task_environment.h" #include "base/time/time.h" #include "services/network/public/mojom/trust_tokens.mojom.h" @@ -26,6 +27,7 @@ #include "testing/gtest/include/gtest/gtest.h" #include "url/gurl.h" +using ::base::EqualsProto; using ::testing::IsNull; using ::testing::Pointee; @@ -94,15 +96,6 @@ const auto AlwaysTrueTimeMatcher = base::BindRepeating( [](const base::Time& creation_time) -> bool { return true; }); -MATCHER_P(EqualsProto, - message, - "Match a proto Message equal to the matcher's argument.") { - std::string expected_serialized, actual_serialized; - message.SerializeToString(&expected_serialized); - arg.SerializeToString(&actual_serialized); - return expected_serialized == actual_serialized; -} - class InMemoryTrustTokenPersisterFactory { public: static std::unique_ptr<TrustTokenPersister> Create() {
diff --git a/services/network/trust_tokens/trust_token_store_unittest.cc b/services/network/trust_tokens/trust_token_store_unittest.cc index d49a3d0..3c2acb9 100644 --- a/services/network/trust_tokens/trust_token_store_unittest.cc +++ b/services/network/trust_tokens/trust_token_store_unittest.cc
@@ -8,6 +8,7 @@ #include <utility> #include "base/functional/bind.h" +#include "base/test/protobuf_matchers.h" #include "base/test/task_environment.h" #include "base/time/time.h" #include "services/network/public/cpp/trust_token_parameterization.h" @@ -24,22 +25,12 @@ #include "url/gurl.h" #include "url/origin.h" +using ::base::EqualsProto; using ::testing::ElementsAre; using ::testing::Optional; namespace network::trust_tokens { -namespace { -MATCHER_P(EqualsProto, - message, - "Match a proto Message equal to the matcher's argument.") { - std::string expected_serialized, actual_serialized; - message.SerializeToString(&expected_serialized); - arg.SerializeToString(&actual_serialized); - return expected_serialized == actual_serialized; -} -} // namespace - TEST(TrustTokenStoreTest, RecordsIssuances) { // A newly initialized store should not think it's // recorded any issuances.
diff --git a/testing/buildbot/chrome.gpu.fyi.json b/testing/buildbot/chrome.gpu.fyi.json index 8426d68..ebcf181 100644 --- a/testing/buildbot/chrome.gpu.fyi.json +++ b/testing/buildbot/chrome.gpu.fyi.json
@@ -35,7 +35,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -84,7 +83,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -126,7 +124,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -167,7 +164,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -222,7 +218,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -271,7 +266,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -313,7 +307,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -354,7 +347,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": {
diff --git a/testing/buildbot/chrome.json b/testing/buildbot/chrome.json index 120ba79e..d0317d863 100644 --- a/testing/buildbot/chrome.json +++ b/testing/buildbot/chrome.json
@@ -1652,6 +1652,144 @@ "variant_id": "DEDEDE_RELEASE_STABLE" }, { + "cros_board": "fizz", + "cros_img": "fizz-release/R116-15509.50.0", + "dut_pool": "chrome", + "name": "lacros_all_tast_tests FIZZ_RELEASE_BETA", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "shards": 2, + "tast_expr": "(\"group:mainline\" && (\"dep:lacros_stable\" || \"dep:lacros\") && !informational)", + "test": "lacros_all_tast_tests", + "test_id_prefix": "ninja://chromeos/lacros:lacros_all_tast_tests/", + "test_level_retries": 2, + "timeout_sec": 10800, + "variant_id": "FIZZ_RELEASE_BETA" + }, + { + "cros_board": "fizz", + "cros_img": "fizz-release/R117-15563.0.0", + "dut_pool": "chrome", + "name": "lacros_all_tast_tests FIZZ_RELEASE_DEV", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "shards": 2, + "tast_expr": "(\"group:mainline\" && (\"dep:lacros_stable\" || \"dep:lacros\") && !informational)", + "test": "lacros_all_tast_tests", + "test_id_prefix": "ninja://chromeos/lacros:lacros_all_tast_tests/", + "test_level_retries": 2, + "timeout_sec": 10800, + "variant_id": "FIZZ_RELEASE_DEV" + }, + { + "autotest_name": "tast.lacros-from-gcs", + "cros_board": "fizz", + "cros_img": "fizz-release/R119-15619.0.0", + "dut_pool": "chrome", + "name": "lacros_all_tast_tests FIZZ_RELEASE_LKGM", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "shards": 2, + "tast_expr": "(\"group:mainline\" && (\"dep:lacros_stable\" || \"dep:lacros\") && !informational)", + "test": "lacros_all_tast_tests", + "test_id_prefix": "ninja://chromeos/lacros:lacros_all_tast_tests/", + "test_level_retries": 2, + "timeout_sec": 10800, + "variant_id": "FIZZ_RELEASE_LKGM" + }, + { + "cros_board": "fizz", + "cros_img": "fizz-release/R115-15474.70.0", + "dut_pool": "chrome", + "name": "lacros_all_tast_tests FIZZ_RELEASE_STABLE", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "shards": 2, + "tast_expr": "(\"group:mainline\" && (\"dep:lacros_stable\" || \"dep:lacros\") && !informational)", + "test": "lacros_all_tast_tests", + "test_id_prefix": "ninja://chromeos/lacros:lacros_all_tast_tests/", + "test_level_retries": 2, + "timeout_sec": 10800, + "variant_id": "FIZZ_RELEASE_STABLE" + }, + { + "cros_board": "guybrush", + "cros_img": "guybrush-release/R116-15509.50.0", + "dut_pool": "chrome", + "name": "lacros_all_tast_tests GUYBRUSH_RELEASE_BETA", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "shards": 2, + "tast_expr": "(\"group:mainline\" && (\"dep:lacros_stable\" || \"dep:lacros\") && !informational)", + "test": "lacros_all_tast_tests", + "test_id_prefix": "ninja://chromeos/lacros:lacros_all_tast_tests/", + "test_level_retries": 2, + "timeout_sec": 10800, + "variant_id": "GUYBRUSH_RELEASE_BETA" + }, + { + "cros_board": "guybrush", + "cros_img": "guybrush-release/R117-15563.0.0", + "dut_pool": "chrome", + "name": "lacros_all_tast_tests GUYBRUSH_RELEASE_DEV", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "shards": 2, + "tast_expr": "(\"group:mainline\" && (\"dep:lacros_stable\" || \"dep:lacros\") && !informational)", + "test": "lacros_all_tast_tests", + "test_id_prefix": "ninja://chromeos/lacros:lacros_all_tast_tests/", + "test_level_retries": 2, + "timeout_sec": 10800, + "variant_id": "GUYBRUSH_RELEASE_DEV" + }, + { + "autotest_name": "tast.lacros-from-gcs", + "cros_board": "guybrush", + "cros_img": "guybrush-release/R119-15619.0.0", + "dut_pool": "chrome", + "name": "lacros_all_tast_tests GUYBRUSH_RELEASE_LKGM", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "shards": 2, + "tast_expr": "(\"group:mainline\" && (\"dep:lacros_stable\" || \"dep:lacros\") && !informational)", + "test": "lacros_all_tast_tests", + "test_id_prefix": "ninja://chromeos/lacros:lacros_all_tast_tests/", + "test_level_retries": 2, + "timeout_sec": 10800, + "variant_id": "GUYBRUSH_RELEASE_LKGM" + }, + { + "cros_board": "guybrush", + "cros_img": "guybrush-release/R115-15474.70.0", + "dut_pool": "chrome", + "name": "lacros_all_tast_tests GUYBRUSH_RELEASE_STABLE", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "shards": 2, + "tast_expr": "(\"group:mainline\" && (\"dep:lacros_stable\" || \"dep:lacros\") && !informational)", + "test": "lacros_all_tast_tests", + "test_id_prefix": "ninja://chromeos/lacros:lacros_all_tast_tests/", + "test_level_retries": 2, + "timeout_sec": 10800, + "variant_id": "GUYBRUSH_RELEASE_STABLE" + }, + { "cros_board": "puff", "cros_img": "puff-release/R116-15509.50.0", "dut_pool": "chrome",
diff --git a/testing/buildbot/chromium.angle.json b/testing/buildbot/chromium.angle.json index acfdda2..88f1bfb 100644 --- a/testing/buildbot/chromium.angle.json +++ b/testing/buildbot/chromium.angle.json
@@ -24,7 +24,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -347,7 +346,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -380,7 +378,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -415,7 +412,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -450,7 +446,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -544,7 +539,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -577,7 +571,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -612,7 +605,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -647,7 +639,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -745,7 +736,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -783,7 +773,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -823,7 +812,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -861,7 +849,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -900,7 +887,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -937,7 +923,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -1034,7 +1019,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -1070,7 +1054,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -1108,7 +1091,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -1144,7 +1126,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -1181,7 +1162,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -1216,7 +1196,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -1263,7 +1242,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -1299,7 +1277,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -1335,7 +1312,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -1371,7 +1347,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -1406,7 +1381,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -1448,7 +1422,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -1484,7 +1457,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -1520,7 +1492,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -1556,7 +1527,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -1591,7 +1561,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": {
diff --git a/testing/buildbot/chromium.chromiumos.json b/testing/buildbot/chromium.chromiumos.json index 0cfafb9..8e56ce25 100644 --- a/testing/buildbot/chromium.chromiumos.json +++ b/testing/buildbot/chromium.chromiumos.json
@@ -1057,7 +1057,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -5076,9 +5075,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.6021.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6022.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 119.0.6021.0", + "description": "Run with ash-chrome version 119.0.6022.0", "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -5088,8 +5087,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v119.0.6021.0", - "revision": "version:119.0.6021.0" + "location": "lacros_version_skew_tests_v119.0.6022.0", + "revision": "version:119.0.6022.0" } ], "dimensions": { @@ -5224,9 +5223,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.6021.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6022.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 119.0.6021.0", + "description": "Run with ash-chrome version 119.0.6022.0", "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -5236,8 +5235,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v119.0.6021.0", - "revision": "version:119.0.6021.0" + "location": "lacros_version_skew_tests_v119.0.6022.0", + "revision": "version:119.0.6022.0" } ], "dimensions": { @@ -5356,9 +5355,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.6021.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6022.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 119.0.6021.0", + "description": "Run with ash-chrome version 119.0.6022.0", "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -5368,8 +5367,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v119.0.6021.0", - "revision": "version:119.0.6021.0" + "location": "lacros_version_skew_tests_v119.0.6022.0", + "revision": "version:119.0.6022.0" } ], "dimensions": {
diff --git a/testing/buildbot/chromium.coverage.json b/testing/buildbot/chromium.coverage.json index 3dde977..e8ac148 100644 --- a/testing/buildbot/chromium.coverage.json +++ b/testing/buildbot/chromium.coverage.json
@@ -24662,7 +24662,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "gpu": "10de:2184-440.100", @@ -25385,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.6021.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6022.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 119.0.6021.0", + "description": "Run with ash-chrome version 119.0.6022.0", "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -25397,8 +25396,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v119.0.6021.0", - "revision": "version:119.0.6021.0" + "location": "lacros_version_skew_tests_v119.0.6022.0", + "revision": "version:119.0.6022.0" } ], "dimensions": { @@ -25533,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.6021.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6022.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 119.0.6021.0", + "description": "Run with ash-chrome version 119.0.6022.0", "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -25545,8 +25544,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v119.0.6021.0", - "revision": "version:119.0.6021.0" + "location": "lacros_version_skew_tests_v119.0.6022.0", + "revision": "version:119.0.6022.0" } ], "dimensions": { @@ -25665,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.6021.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6022.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 119.0.6021.0", + "description": "Run with ash-chrome version 119.0.6022.0", "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -25677,8 +25676,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v119.0.6021.0", - "revision": "version:119.0.6021.0" + "location": "lacros_version_skew_tests_v119.0.6022.0", + "revision": "version:119.0.6022.0" } ], "dimensions": { @@ -29160,7 +29159,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "gpu": "10de:2184-27.21.14.5638",
diff --git a/testing/buildbot/chromium.dawn.json b/testing/buildbot/chromium.dawn.json index 237524c..95b8470 100644 --- a/testing/buildbot/chromium.dawn.json +++ b/testing/buildbot/chromium.dawn.json
@@ -21,7 +21,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "device_os": "N2G48C", @@ -162,7 +161,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "device_os": "R", @@ -202,7 +200,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "device_os": "R", @@ -242,7 +239,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "device_os": "N2G48C", @@ -383,7 +379,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "device_os": "R", @@ -423,7 +418,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "device_os": "R", @@ -566,7 +560,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "device_os": "TP1A.220624.021", @@ -606,7 +599,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "device_os": "TP1A.220624.021", @@ -749,7 +741,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "device_os": "TP1A.220624.021", @@ -789,7 +780,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "device_os": "TP1A.220624.021", @@ -1235,7 +1225,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "gpu": "8086:9bc5-20.0.8", @@ -1273,7 +1262,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "gpu": "8086:9bc5-20.0.8", @@ -1372,7 +1360,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "gpu": "8086:9bc5-20.0.8", @@ -1412,7 +1399,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "gpu": "8086:9bc5-20.0.8", @@ -1746,7 +1732,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "gpu": "10de:2184-440.100", @@ -1783,7 +1768,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "gpu": "10de:2184-440.100", @@ -1882,7 +1866,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "gpu": "10de:2184-440.100", @@ -1921,7 +1904,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "gpu": "10de:2184-440.100", @@ -2255,7 +2237,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "gpu": "8086:9bc5-20.0.8", @@ -2293,7 +2274,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "gpu": "8086:9bc5-20.0.8", @@ -2392,7 +2372,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "gpu": "8086:9bc5-20.0.8", @@ -2432,7 +2411,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "gpu": "8086:9bc5-20.0.8", @@ -2766,7 +2744,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "gpu": "10de:2184-440.100", @@ -2803,7 +2780,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "gpu": "10de:2184-440.100", @@ -2902,7 +2878,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "gpu": "10de:2184-440.100", @@ -2941,7 +2916,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "gpu": "10de:2184-440.100", @@ -3299,7 +3273,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "arm64", @@ -3339,7 +3312,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "arm64", @@ -3445,7 +3417,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "arm64", @@ -3487,7 +3458,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "arm64", @@ -3848,7 +3818,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "arm64", @@ -3888,7 +3857,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "arm64", @@ -3994,7 +3962,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "arm64", @@ -4036,7 +4003,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "arm64", @@ -4399,7 +4365,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -4439,7 +4404,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -4545,7 +4509,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -4587,7 +4550,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -4926,7 +4888,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -4964,7 +4925,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -5064,7 +5024,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -5104,7 +5063,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -5139,7 +5097,6 @@ "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, "name": "noop_sleep_tests", - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -5176,7 +5133,6 @@ "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, "name": "noop_sleep_tests", - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -5535,7 +5491,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -5575,7 +5530,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -5681,7 +5635,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -5723,7 +5676,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -6062,7 +6014,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -6100,7 +6051,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -6200,7 +6150,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -6240,7 +6189,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -6578,7 +6526,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "display_attached": "1", @@ -6976,7 +6923,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "display_attached": "1", @@ -7400,7 +7346,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "display_attached": "1", @@ -7440,7 +7385,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "display_attached": "1", @@ -7477,7 +7421,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "display_attached": "1", @@ -7577,7 +7520,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "display_attached": "1", @@ -7969,7 +7911,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "display_attached": "1", @@ -8009,7 +7950,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "display_attached": "1", @@ -8046,7 +7986,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "display_attached": "1", @@ -8084,7 +8023,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "display_attached": "1", @@ -8184,7 +8122,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "display_attached": "1", @@ -8224,7 +8161,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "display_attached": "1", @@ -8259,7 +8195,6 @@ "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, "name": "noop_sleep_tests", - "should_retry_with_patch": false, "swarming": { "dimensions": { "display_attached": "1", @@ -8620,7 +8555,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "display_attached": "1", @@ -8660,7 +8594,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "display_attached": "1", @@ -8697,7 +8630,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "display_attached": "1", @@ -8797,7 +8729,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "display_attached": "1", @@ -9189,7 +9120,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "display_attached": "1", @@ -9229,7 +9159,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "display_attached": "1", @@ -9266,7 +9195,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "display_attached": "1", @@ -9304,7 +9232,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "display_attached": "1", @@ -9404,7 +9331,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "display_attached": "1", @@ -9444,7 +9370,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "display_attached": "1", @@ -9781,7 +9706,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "display_attached": "1", @@ -9879,7 +9803,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "display_attached": "1", @@ -10214,7 +10137,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "display_attached": "1", @@ -10312,7 +10234,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "display_attached": "1", @@ -10352,7 +10273,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "display_attached": "1", @@ -10387,7 +10307,6 @@ "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, "name": "noop_sleep_tests", - "should_retry_with_patch": false, "swarming": { "dimensions": { "display_attached": "1", @@ -10722,7 +10641,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "display_attached": "1", @@ -10820,7 +10738,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "display_attached": "1", @@ -11155,7 +11072,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "display_attached": "1", @@ -11253,7 +11169,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "display_attached": "1", @@ -11293,7 +11208,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "display_attached": "1",
diff --git a/testing/buildbot/chromium.fuchsia.json b/testing/buildbot/chromium.fuchsia.json index 9850f54..9b03c33 100644 --- a/testing/buildbot/chromium.fuchsia.json +++ b/testing/buildbot/chromium.fuchsia.json
@@ -3156,7 +3156,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "kvm": "1", @@ -3196,7 +3195,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "kvm": "1", @@ -3227,7 +3225,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "kvm": "1", @@ -3258,7 +3255,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "kvm": "1", @@ -4410,7 +4406,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "kvm": "1", @@ -4449,7 +4444,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "kvm": "1", @@ -4479,7 +4473,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "kvm": "1", @@ -4509,7 +4502,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "kvm": "1",
diff --git a/testing/buildbot/chromium.fyi.json b/testing/buildbot/chromium.fyi.json index 39dcaa3e..3b3a7b3 100644 --- a/testing/buildbot/chromium.fyi.json +++ b/testing/buildbot/chromium.fyi.json
@@ -4400,7 +4400,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -43321,9 +43320,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.6021.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6022.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 119.0.6021.0", + "description": "Run with ash-chrome version 119.0.6022.0", "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, @@ -43332,8 +43331,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v119.0.6021.0", - "revision": "version:119.0.6021.0" + "location": "lacros_version_skew_tests_v119.0.6022.0", + "revision": "version:119.0.6022.0" } ], "dimensions": { @@ -43469,9 +43468,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.6021.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6022.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 119.0.6021.0", + "description": "Run with ash-chrome version 119.0.6022.0", "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, @@ -43480,8 +43479,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v119.0.6021.0", - "revision": "version:119.0.6021.0" + "location": "lacros_version_skew_tests_v119.0.6022.0", + "revision": "version:119.0.6022.0" } ], "dimensions": { @@ -43601,9 +43600,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.6021.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6022.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 119.0.6021.0", + "description": "Run with ash-chrome version 119.0.6022.0", "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, @@ -43612,8 +43611,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v119.0.6021.0", - "revision": "version:119.0.6021.0" + "location": "lacros_version_skew_tests_v119.0.6022.0", + "revision": "version:119.0.6022.0" } ], "dimensions": { @@ -44925,9 +44924,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.6021.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6022.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 119.0.6021.0", + "description": "Run with ash-chrome version 119.0.6022.0", "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, @@ -44936,8 +44935,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v119.0.6021.0", - "revision": "version:119.0.6021.0" + "location": "lacros_version_skew_tests_v119.0.6022.0", + "revision": "version:119.0.6022.0" } ], "dimensions": { @@ -45073,9 +45072,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.6021.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6022.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 119.0.6021.0", + "description": "Run with ash-chrome version 119.0.6022.0", "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, @@ -45084,8 +45083,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v119.0.6021.0", - "revision": "version:119.0.6021.0" + "location": "lacros_version_skew_tests_v119.0.6022.0", + "revision": "version:119.0.6022.0" } ], "dimensions": { @@ -45205,9 +45204,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.6021.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6022.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 119.0.6021.0", + "description": "Run with ash-chrome version 119.0.6022.0", "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, @@ -45216,8 +45215,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v119.0.6021.0", - "revision": "version:119.0.6021.0" + "location": "lacros_version_skew_tests_v119.0.6022.0", + "revision": "version:119.0.6022.0" } ], "dimensions": { @@ -45915,9 +45914,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.6021.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6022.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 119.0.6021.0", + "description": "Run with ash-chrome version 119.0.6022.0", "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, @@ -45926,8 +45925,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v119.0.6021.0", - "revision": "version:119.0.6021.0" + "location": "lacros_version_skew_tests_v119.0.6022.0", + "revision": "version:119.0.6022.0" } ], "dimensions": {
diff --git a/testing/buildbot/chromium.gpu.fyi.json b/testing/buildbot/chromium.gpu.fyi.json index 8fdaf60..33faf07 100644 --- a/testing/buildbot/chromium.gpu.fyi.json +++ b/testing/buildbot/chromium.gpu.fyi.json
@@ -219,7 +219,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -264,7 +263,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -300,7 +298,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -336,7 +333,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -376,7 +372,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -422,7 +417,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -459,7 +453,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -496,7 +489,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -534,7 +526,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -708,7 +699,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -745,7 +735,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -790,7 +779,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -826,7 +814,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -862,7 +849,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -902,7 +888,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -938,7 +923,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -974,7 +958,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -1020,7 +1003,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -1057,7 +1039,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -1094,7 +1075,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -1132,7 +1112,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -1170,7 +1149,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -1209,7 +1187,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -1457,7 +1434,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -1494,7 +1470,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -1533,7 +1508,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -1573,7 +1547,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -1821,7 +1794,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -1858,7 +1830,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -1895,7 +1866,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -1940,7 +1910,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -1985,7 +1954,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -2021,7 +1989,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -2057,7 +2024,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -2097,7 +2063,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -2133,7 +2098,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -2169,7 +2133,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -2215,7 +2178,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -2261,7 +2223,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -2298,7 +2259,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -2335,7 +2295,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -2372,7 +2331,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -2409,7 +2367,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -2448,7 +2405,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -2488,7 +2444,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -2527,7 +2482,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -2566,7 +2520,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -2805,7 +2758,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -2842,7 +2794,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -2887,7 +2838,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -2932,7 +2882,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -2968,7 +2917,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -3004,7 +2952,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -3044,7 +2991,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -3080,7 +3026,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -3116,7 +3061,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -3162,7 +3106,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -3208,7 +3151,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -3245,7 +3187,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -3282,7 +3223,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -3319,7 +3259,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -3356,7 +3295,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -3394,7 +3332,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -3433,7 +3370,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -3679,7 +3615,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -3726,7 +3661,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -3764,7 +3698,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -3802,7 +3735,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -3844,7 +3776,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -3892,7 +3823,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -3931,7 +3861,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -3970,7 +3899,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -4010,7 +3938,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -4257,7 +4184,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -4304,7 +4230,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -4342,7 +4267,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -4380,7 +4304,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -4422,7 +4345,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -4470,7 +4392,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -4509,7 +4430,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -4548,7 +4468,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -4588,7 +4507,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -4720,7 +4638,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -4778,7 +4695,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -4827,7 +4743,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -4876,7 +4791,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -4929,7 +4843,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -4978,7 +4891,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -5037,7 +4949,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -5087,7 +4998,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -5137,7 +5047,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -5187,7 +5096,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -5239,7 +5147,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -5293,7 +5200,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -5345,7 +5251,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -5466,7 +5371,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -5514,7 +5418,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -5553,7 +5456,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -5592,7 +5494,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -5635,7 +5536,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -5674,7 +5574,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -5723,7 +5622,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -5763,7 +5661,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -5803,7 +5700,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -5843,7 +5739,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -5885,7 +5780,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -5927,7 +5821,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -5975,7 +5868,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "test": "telemetry_gpu_integration_test", "test_id_prefix": "ninja://chrome/test:telemetry_gpu_integration_test/", "timeout_sec": 10800, @@ -6010,7 +5902,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "test": "telemetry_gpu_integration_test", "test_id_prefix": "ninja://chrome/test:telemetry_gpu_integration_test/", "timeout_sec": 10800, @@ -6035,7 +5926,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "test": "telemetry_gpu_integration_test", "test_id_prefix": "ninja://chrome/test:telemetry_gpu_integration_test/", "timeout_sec": 10800, @@ -6060,7 +5950,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "test": "telemetry_gpu_integration_test", "test_id_prefix": "ninja://chrome/test:telemetry_gpu_integration_test/", "timeout_sec": 10800, @@ -6089,7 +5978,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "test": "telemetry_gpu_integration_test", "test_id_prefix": "ninja://chrome/test:telemetry_gpu_integration_test/", "timeout_sec": 10800, @@ -6114,7 +6002,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "test": "telemetry_gpu_integration_test", "test_id_prefix": "ninja://chrome/test:telemetry_gpu_integration_test/", "timeout_sec": 10800, @@ -6150,7 +6037,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "test": "telemetry_gpu_integration_test", "test_id_prefix": "ninja://chrome/test:telemetry_gpu_integration_test/", "timeout_sec": 10800, @@ -6176,7 +6062,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "test": "telemetry_gpu_integration_test", "test_id_prefix": "ninja://chrome/test:telemetry_gpu_integration_test/", "timeout_sec": 10800, @@ -6202,7 +6087,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "test": "telemetry_gpu_integration_test", "test_id_prefix": "ninja://chrome/test:telemetry_gpu_integration_test/", "timeout_sec": 10800, @@ -6228,7 +6112,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "test": "telemetry_gpu_integration_test", "test_id_prefix": "ninja://chrome/test:telemetry_gpu_integration_test/", "timeout_sec": 10800, @@ -6256,7 +6139,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "test": "telemetry_gpu_integration_test", "test_id_prefix": "ninja://chrome/test:telemetry_gpu_integration_test/", "timeout_sec": 10800, @@ -6284,7 +6166,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "test": "telemetry_gpu_integration_test", "test_id_prefix": "ninja://chrome/test:telemetry_gpu_integration_test/", "timeout_sec": 10800, @@ -6311,7 +6192,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "test": "telemetry_gpu_integration_test", "test_id_prefix": "ninja://chrome/test:telemetry_gpu_integration_test/", "timeout_sec": 10800, @@ -6347,7 +6227,6 @@ "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, "name": "noop_sleep_tests", - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -6391,7 +6270,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -6438,7 +6316,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -6476,7 +6353,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -6514,7 +6390,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -6556,7 +6431,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -6594,7 +6468,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -6642,7 +6515,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -6681,7 +6553,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -6720,7 +6591,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -6759,7 +6629,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -6799,7 +6668,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -6918,7 +6786,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -6961,7 +6828,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -6995,7 +6861,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -7029,7 +6894,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -7067,7 +6931,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -7111,7 +6974,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -7146,7 +7008,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -7181,7 +7042,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -7217,7 +7077,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -7252,7 +7111,6 @@ "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, "name": "noop_sleep_tests", - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -7287,7 +7145,6 @@ "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, "name": "noop_sleep_tests", - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -7565,7 +7422,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -7609,7 +7465,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -7644,7 +7499,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -7679,7 +7533,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -7718,7 +7571,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -7753,7 +7605,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -7798,7 +7649,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -7834,7 +7684,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -7870,7 +7719,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -7908,7 +7756,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -7946,7 +7793,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -8112,7 +7958,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -8155,7 +8000,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -8189,7 +8033,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -8223,7 +8066,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -8261,7 +8103,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -8295,7 +8136,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -8339,7 +8179,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -8374,7 +8213,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -8409,7 +8247,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -8446,7 +8283,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -8483,7 +8319,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -8648,7 +8483,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -8691,7 +8525,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -8725,7 +8558,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -8759,7 +8591,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -8797,7 +8628,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -8831,7 +8661,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -8875,7 +8704,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -8910,7 +8738,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -8945,7 +8772,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -8989,7 +8815,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -9026,7 +8851,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -9063,7 +8887,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -9274,7 +9097,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -9310,7 +9132,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -9346,7 +9167,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -9390,7 +9210,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -9434,7 +9253,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -9478,7 +9296,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -9513,7 +9330,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -9548,7 +9364,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -9587,7 +9402,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -9622,7 +9436,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -9667,7 +9480,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -9712,7 +9524,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -9757,7 +9568,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -9793,7 +9603,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -9829,7 +9638,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -9865,7 +9673,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -9901,7 +9708,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -9937,7 +9743,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -9975,7 +9780,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -10013,7 +9817,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -10051,7 +9854,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -10236,7 +10038,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -10280,7 +10081,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -10315,7 +10115,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -10350,7 +10149,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -10389,7 +10187,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -10434,7 +10231,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -10470,7 +10266,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -10506,7 +10301,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -10543,7 +10337,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -10579,7 +10372,6 @@ "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, "name": "noop_sleep_tests", - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -10615,7 +10407,6 @@ "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, "name": "noop_sleep_tests", - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -10651,7 +10442,6 @@ "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, "name": "noop_sleep_tests", - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -10689,7 +10479,6 @@ "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, "name": "noop_sleep_tests", - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -10910,7 +10699,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -10947,7 +10735,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -10984,7 +10771,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -11029,7 +10815,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -11074,7 +10859,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -11119,7 +10903,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -11155,7 +10938,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -11191,7 +10973,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -11231,7 +11012,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -11267,7 +11047,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -11313,7 +11092,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -11359,7 +11137,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -11405,7 +11182,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -11442,7 +11218,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -11479,7 +11254,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -11516,7 +11290,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -11553,7 +11326,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -11590,7 +11362,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -11629,7 +11400,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -11670,7 +11440,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -11709,7 +11478,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -11749,7 +11517,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -11787,7 +11554,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -11999,7 +11765,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -12035,7 +11800,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -12079,7 +11843,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -12123,7 +11886,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -12158,7 +11920,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -12193,7 +11954,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -12228,7 +11988,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -12273,7 +12032,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -12318,7 +12076,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -12354,7 +12111,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -12390,7 +12146,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -12426,7 +12181,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -12464,7 +12218,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -12504,7 +12257,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -12542,7 +12294,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -12580,7 +12331,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -12805,7 +12555,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -12851,7 +12600,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -12898,7 +12646,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -12936,7 +12683,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -12976,7 +12722,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -13016,7 +12761,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -13056,7 +12800,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -13255,7 +12998,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -13301,7 +13043,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -13338,7 +13079,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -13375,7 +13115,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -13416,7 +13155,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -13463,7 +13201,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -13501,7 +13238,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -13539,7 +13275,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -13578,7 +13313,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -13806,7 +13540,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -13844,7 +13577,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -13890,7 +13622,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -13936,7 +13667,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -13973,7 +13703,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -14010,7 +13739,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -14047,7 +13775,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -14094,7 +13821,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -14141,7 +13867,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -14179,7 +13904,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -14217,7 +13941,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -14255,7 +13978,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -14295,7 +14017,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -14337,7 +14058,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -14377,7 +14097,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -14417,7 +14136,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -14644,7 +14362,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -14682,7 +14399,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -14720,7 +14436,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -14766,7 +14481,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -14812,7 +14526,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -14858,7 +14571,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -14895,7 +14607,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -14932,7 +14643,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -14973,7 +14683,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -15010,7 +14719,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -15057,7 +14765,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -15104,7 +14811,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -15151,7 +14857,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -15189,7 +14894,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -15227,7 +14931,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -15265,7 +14968,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -15303,7 +15005,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -15341,7 +15042,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -15381,7 +15081,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -15423,7 +15122,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -15463,7 +15161,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -15504,7 +15201,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -15543,7 +15239,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -15770,7 +15465,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -15816,7 +15510,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -15853,7 +15546,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -15890,7 +15582,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -15931,7 +15622,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -15968,7 +15658,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -16015,7 +15704,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -16053,7 +15741,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -16091,7 +15778,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -16129,7 +15815,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -16169,7 +15854,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -16209,7 +15893,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -16249,7 +15932,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -16450,7 +16132,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -16496,7 +16177,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -16533,7 +16213,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -16570,7 +16249,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -16611,7 +16289,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -16658,7 +16335,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -16696,7 +16372,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -16734,7 +16409,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -16775,7 +16449,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -16816,7 +16489,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -16853,7 +16525,6 @@ "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, "name": "noop_sleep_tests", - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -16888,7 +16559,6 @@ "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, "name": "noop_sleep_tests", - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -17145,7 +16815,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -17189,7 +16858,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -17224,7 +16892,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -17259,7 +16926,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -17298,7 +16964,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -17343,7 +17008,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -17379,7 +17043,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -17415,7 +17078,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -17452,7 +17114,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -17490,7 +17151,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -17527,7 +17187,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -17563,7 +17222,6 @@ "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, "name": "noop_sleep_tests", - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -17599,7 +17257,6 @@ "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, "name": "noop_sleep_tests", - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -17893,7 +17550,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -17938,7 +17594,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -17974,7 +17629,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -18010,7 +17664,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -18050,7 +17703,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -18086,7 +17738,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -18132,7 +17783,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -18169,7 +17819,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -18206,7 +17855,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -18243,7 +17891,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -18282,7 +17929,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -18321,7 +17967,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -18360,7 +18005,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -18669,7 +18313,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -18713,7 +18356,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -18748,7 +18390,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -18783,7 +18424,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -18822,7 +18462,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -18857,7 +18496,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -18902,7 +18540,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -18938,7 +18575,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -18974,7 +18610,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -19010,7 +18645,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -19048,7 +18682,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -19086,7 +18719,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -19124,7 +18756,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -19161,7 +18792,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -19445,7 +19075,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -19489,7 +19118,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -19524,7 +19152,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -19559,7 +19186,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -19598,7 +19224,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -19630,7 +19255,6 @@ "script": "//tools/perf/process_perf_results.py" }, "name": "passthrough_command_buffer_perftests", - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -19674,7 +19298,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -19710,7 +19333,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -19746,7 +19368,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -19782,7 +19403,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -19820,7 +19440,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -19858,7 +19477,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -19896,7 +19514,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -19933,7 +19550,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -20249,7 +19865,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -20293,7 +19908,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -20328,7 +19942,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -20363,7 +19976,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -20402,7 +20014,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -20434,7 +20045,6 @@ "script": "//tools/perf/process_perf_results.py" }, "name": "passthrough_command_buffer_perftests", - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -20478,7 +20088,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -20514,7 +20123,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -20550,7 +20158,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -20586,7 +20193,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -20624,7 +20230,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -20662,7 +20267,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -20700,7 +20304,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -20737,7 +20340,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": {
diff --git a/testing/buildbot/chromium.gpu.json b/testing/buildbot/chromium.gpu.json index e14b5f6..dd7d5c7 100644 --- a/testing/buildbot/chromium.gpu.json +++ b/testing/buildbot/chromium.gpu.json
@@ -22,7 +22,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -66,7 +65,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -101,7 +99,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -136,7 +133,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -175,7 +171,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -220,7 +215,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -256,7 +250,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -292,7 +285,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -330,7 +322,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -455,7 +446,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -498,7 +488,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -532,7 +521,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -566,7 +554,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -604,7 +591,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -648,7 +634,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -683,7 +668,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -718,7 +702,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -754,7 +737,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -874,7 +856,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -917,7 +898,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -951,7 +931,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -985,7 +964,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -1023,7 +1001,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -1067,7 +1044,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -1102,7 +1078,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -1137,7 +1112,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -1173,7 +1147,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -1291,7 +1264,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -1335,7 +1307,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -1370,7 +1341,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -1405,7 +1375,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -1444,7 +1413,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -1489,7 +1457,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -1525,7 +1492,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -1561,7 +1527,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -1599,7 +1564,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -1743,7 +1707,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -1787,7 +1750,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -1822,7 +1784,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -1857,7 +1818,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -1896,7 +1856,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -1941,7 +1900,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -1977,7 +1935,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -2013,7 +1970,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -2051,7 +2007,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -2175,7 +2130,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -2221,7 +2175,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -2258,7 +2211,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -2295,7 +2247,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -2336,7 +2287,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -2383,7 +2333,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -2421,7 +2370,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -2459,7 +2407,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -2499,7 +2446,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -2653,7 +2599,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -2699,7 +2644,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -2736,7 +2680,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -2773,7 +2716,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -2814,7 +2756,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -2861,7 +2802,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -2899,7 +2839,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -2937,7 +2876,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -2977,7 +2915,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -3146,7 +3083,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -3190,7 +3126,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -3225,7 +3160,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -3260,7 +3194,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -3299,7 +3232,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -3344,7 +3276,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -3380,7 +3311,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -3416,7 +3346,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -3453,7 +3382,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -3621,7 +3549,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -3665,7 +3592,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -3700,7 +3626,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -3735,7 +3660,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -3774,7 +3698,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -3819,7 +3742,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -3855,7 +3777,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -3891,7 +3812,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -3928,7 +3848,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": {
diff --git a/testing/buildbot/chromium.memory.json b/testing/buildbot/chromium.memory.json index 34a4b89..00cee14 100644 --- a/testing/buildbot/chromium.memory.json +++ b/testing/buildbot/chromium.memory.json
@@ -16439,12 +16439,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.6021.0/test_ash_chrome", + "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6022.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.6021.0", + "description": "Run with ash-chrome version 119.0.6022.0", "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -16454,8 +16454,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v119.0.6021.0", - "revision": "version:119.0.6021.0" + "location": "lacros_version_skew_tests_v119.0.6022.0", + "revision": "version:119.0.6022.0" } ], "dimensions": { @@ -16607,12 +16607,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.6021.0/test_ash_chrome", + "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6022.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.6021.0", + "description": "Run with ash-chrome version 119.0.6022.0", "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -16622,8 +16622,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v119.0.6021.0", - "revision": "version:119.0.6021.0" + "location": "lacros_version_skew_tests_v119.0.6022.0", + "revision": "version:119.0.6022.0" } ], "dimensions": { @@ -16754,12 +16754,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.6021.0/test_ash_chrome", + "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6022.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.6021.0", + "description": "Run with ash-chrome version 119.0.6022.0", "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -16769,8 +16769,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v119.0.6021.0", - "revision": "version:119.0.6021.0" + "location": "lacros_version_skew_tests_v119.0.6022.0", + "revision": "version:119.0.6022.0" } ], "dimensions": {
diff --git a/testing/buildbot/chromium.swangle.json b/testing/buildbot/chromium.swangle.json index 62093c959..c696d6e 100644 --- a/testing/buildbot/chromium.swangle.json +++ b/testing/buildbot/chromium.swangle.json
@@ -24,7 +24,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -748,7 +747,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -786,7 +784,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64",
diff --git a/testing/buildbot/client.v8.fyi.json b/testing/buildbot/client.v8.fyi.json index d3e2260..1602cfc 100644 --- a/testing/buildbot/client.v8.fyi.json +++ b/testing/buildbot/client.v8.fyi.json
@@ -22,7 +22,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "device_os": "N2G48C", @@ -63,7 +62,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "device_os": "N2G48C", @@ -95,7 +93,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "device_os": "N2G48C", @@ -127,7 +124,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "device_os": "N2G48C", @@ -169,7 +165,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "device_os": "N2G48C", @@ -202,7 +197,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "device_os": "N2G48C", @@ -235,7 +229,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "device_os": "N2G48C", @@ -269,7 +262,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "device_os": "N2G48C", @@ -304,7 +296,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "device_os": "N2G48C", @@ -349,7 +340,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "gpu": "10de:2184-440.100", @@ -389,7 +379,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "gpu": "10de:2184-440.100", @@ -420,7 +409,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "gpu": "10de:2184-440.100", @@ -451,7 +439,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "gpu": "10de:2184-440.100", @@ -482,7 +469,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "gpu": "10de:2184-440.100", @@ -523,7 +509,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "gpu": "10de:2184-440.100", @@ -555,7 +540,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "gpu": "10de:2184-440.100", @@ -587,7 +571,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "gpu": "10de:2184-440.100", @@ -628,7 +611,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "gpu": "10de:2184-440.100", @@ -661,7 +643,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "gpu": "10de:2184-440.100", @@ -698,7 +679,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "gpu": "10de:2184-440.100", @@ -738,7 +718,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "gpu": "10de:2184-440.100", @@ -769,7 +748,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "gpu": "10de:2184-440.100", @@ -800,7 +778,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "gpu": "10de:2184-440.100", @@ -831,7 +808,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "gpu": "10de:2184-440.100", @@ -872,7 +848,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "gpu": "10de:2184-440.100", @@ -904,7 +879,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "gpu": "10de:2184-440.100", @@ -936,7 +910,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "gpu": "10de:2184-440.100", @@ -977,7 +950,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "gpu": "10de:2184-440.100", @@ -1010,7 +982,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "gpu": "10de:2184-440.100", @@ -1047,7 +1018,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -1080,7 +1050,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -1113,7 +1082,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -1154,7 +1122,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -1195,7 +1162,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -1236,7 +1202,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -1268,7 +1233,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -1300,7 +1264,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -1332,7 +1295,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -1374,7 +1336,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -1416,7 +1377,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -1458,7 +1418,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -1491,7 +1450,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -1524,7 +1482,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -1557,7 +1514,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -1590,7 +1546,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -1623,7 +1578,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -1657,7 +1611,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -1693,7 +1646,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -1727,7 +1679,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -2202,7 +2153,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "display_attached": "1", @@ -2243,7 +2193,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "display_attached": "1", @@ -2275,7 +2224,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "display_attached": "1", @@ -2307,7 +2255,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "display_attached": "1", @@ -2349,7 +2296,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "display_attached": "1", @@ -2382,7 +2328,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "display_attached": "1", @@ -2415,7 +2360,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "display_attached": "1", @@ -2448,7 +2392,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "display_attached": "1", @@ -2482,7 +2425,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "display_attached": "1", @@ -2517,7 +2459,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "display_attached": "1", @@ -2551,7 +2492,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "display_attached": "1",
diff --git a/testing/buildbot/filters/fuchsia.net_unittests.filter b/testing/buildbot/filters/fuchsia.net_unittests.filter index 582cd576..8521763 100644 --- a/testing/buildbot/filters/fuchsia.net_unittests.filter +++ b/testing/buildbot/filters/fuchsia.net_unittests.filter
@@ -4,8 +4,8 @@ -PacFileFetcherImplTest.Priority # base::MakeFileUnreadable() doesn't work. https://crbug.com/759853 --HttpNetworkTransactionTest.UploadUnreadableFile --SpdyNetworkTransactionTest.UnreadableFilePost +-All/HttpNetworkTransactionTest.UploadUnreadableFile/* +-All/SpdyNetworkTransactionTest.UnreadableFilePost/* # These stress tests take a very long time on emulated ARM cores. -SupportedVersion/QuicConnectionTest.TooManySentPackets/*
diff --git a/testing/buildbot/filters/linux-chromeos.browser_tests.require_lacros.filter b/testing/buildbot/filters/linux-chromeos.browser_tests.require_lacros.filter index 3d71fca..8bfbefd 100644 --- a/testing/buildbot/filters/linux-chromeos.browser_tests.require_lacros.filter +++ b/testing/buildbot/filters/linux-chromeos.browser_tests.require_lacros.filter
@@ -26,14 +26,8 @@ TestAsNormalAndGuestUser/SpokenFeedbackTest.* # TODO(b/262789941) Enable more accessibility tests. -ChromeVoxBackgroundTest.TabSwitchAndRefreshRecovery --ChromeVoxDesktopAutomationHandlerTest.TaskManagerTableView --ChromeVoxISearchTest.Simple --ChromeVoxPanelTest.FormControlsMenu --ChromeVoxPanelTest.InternationalFormControlsMenu --ChromeVoxPanelTest.LinkMenu -ChromeVoxPortalsTest.PortalName -ChromeVoxPortalsTest.ShouldFocusPortal --ChromeVoxAutoScrollHandlerTest.RecyclerViewByPredicate # TODO(b/301253962): Some Switch Access tests fail/flake on Lacros. -SwitchAccessItemScanManagerTest.* -SwitchAccessPointScanManagerTest.PointScanLeftClick @@ -41,21 +35,10 @@ -SwitchAccessPointScanManagerTest.PointScanRightClick # TODO(https://crbug.com/1378291) Ash and Lacros browser window sizes differ. -ChromeVoxEditingTest.SelectAcrossSoftLineWraps --ChromeVoxLiveRegionsTest.FocusThenLiveRegion --ChromeVoxLiveRegionsTest.LiveRegionAddElement --ChromeVoxLiveRegionsTest.LiveRegionRemoveElement --ChromeVoxUserActionMonitorTest.Gestures # TODO(crbug.com/1339456) Disabled when switch to LacrosOnly. -DesksTemplatesClientLacrosTest.SystemUILaunchBrowser -# TODO(crbug.com/1356103) Disabled when switch to LacrosOnly. --SwitchAccessPointScanManagerTest.PointScanRightClick # TODO(b/277821091) Flaky -ChromeVoxEditingTest.GiantTextAreaPerformance --ChromeVoxAutoScrollHandlerTest.RecyclerViewByCharacter --ChromeVoxAutoScrollHandlerTest.ScrollForward --ChromeVoxPanelTest.TouchGesturesMenuAvailableWhenInTouchMode --ChromeVoxPanelTest.ActionsMenu --ChromeVoxPanelTest.SearchMenu # TODO(accessibility): these are native C++ tests that need investigation. -TestAsNormalAndGuestUser/SpokenFeedbackTest.LandmarkNavigation* -TestAsNormalAndGuestUser/SpokenFeedbackTest.NavigateChromeVoxMenu*
diff --git a/testing/buildbot/filters/linux-lacros.browser_tests.filter b/testing/buildbot/filters/linux-lacros.browser_tests.filter index 8aeb05e..1a64561 100644 --- a/testing/buildbot/filters/linux-lacros.browser_tests.filter +++ b/testing/buildbot/filters/linux-lacros.browser_tests.filter
@@ -58,9 +58,9 @@ -PageLoadMetricsBrowserTest.SameOriginNavigation -PageLoadMetricsBrowserTest.ServiceWorkerMetrics -PageLoadMetricsBrowserTest.ServiceWorkerSkippableFetchHandlerMetrics --PageLoadMetricsBrowserTestClosedPage.UkmIsRecordedForClosedTabPage* --PageLoadMetricsBrowserTestCrashedPage.UkmIsRecordedForCrashedTabPage* --PageLoadMetricsBrowserTestDiscardedPage.UkmIsRecordedForDiscardedTabPage* +-*PageLoadMetricsBrowserTestClosedPage.UkmIsRecordedForClosedTabPage* +-*PageLoadMetricsBrowserTestCrashedPage.UkmIsRecordedForCrashedTabPage* +-*PageLoadMetricsBrowserTestDiscardedPage.UkmIsRecordedForDiscardedTabPage* -PageLoadMetricsBrowserTestTerminatedPage.UkmIsRecordedWhenRenderProcessShutsDown -PageLoadMetricsBrowserTestWithFencedFrames.PageLoadPrivacySandboxAdsFencedFramesMetrics -PrerenderPageLoadMetricsObserverBrowserTest.Activate_Embedder_DirectURLInput
diff --git a/testing/buildbot/generate_buildbot_json.py b/testing/buildbot/generate_buildbot_json.py index 5148d91d..92055bc 100755 --- a/testing/buildbot/generate_buildbot_json.py +++ b/testing/buildbot/generate_buildbot_json.py
@@ -913,13 +913,6 @@ if 'swarming' in result: result['swarming']['idempotent'] = False - # The GPU tests act much like integration tests for the entire browser, and - # tend to uncover flakiness bugs more readily than other test suites. In - # order to surface any flakiness more readily to the developer of the CL - # which is introducing it, we disable retries with patch on the commit - # queue. - result['should_retry_with_patch'] = False - browser = '' if is_cast_streaming: browser = 'cast-streaming-shell'
diff --git a/testing/buildbot/test_suites.pyl b/testing/buildbot/test_suites.pyl index 736abfb..e8a1885 100644 --- a/testing/buildbot/test_suites.pyl +++ b/testing/buildbot/test_suites.pyl
@@ -2491,7 +2491,6 @@ '--smoke-test-mode', ], }, - 'should_retry_with_patch': False, }, }, @@ -7958,6 +7957,14 @@ 'CROS_DEDEDE_RELEASE_DEV', 'CROS_DEDEDE_RELEASE_BETA', 'CROS_DEDEDE_RELEASE_STABLE', + 'CROS_FIZZ_RELEASE_LKGM', + 'CROS_FIZZ_RELEASE_DEV', + 'CROS_FIZZ_RELEASE_BETA', + 'CROS_FIZZ_RELEASE_STABLE', + 'CROS_GUYBRUSH_RELEASE_LKGM', + 'CROS_GUYBRUSH_RELEASE_DEV', + 'CROS_GUYBRUSH_RELEASE_BETA', + 'CROS_GUYBRUSH_RELEASE_STABLE', 'CROS_PUFF_RELEASE_LKGM', 'CROS_PUFF_RELEASE_DEV', 'CROS_PUFF_RELEASE_BETA',
diff --git a/testing/buildbot/tryserver.chromium.android.json b/testing/buildbot/tryserver.chromium.android.json index d77995a..6e06040 100644 --- a/testing/buildbot/tryserver.chromium.android.json +++ b/testing/buildbot/tryserver.chromium.android.json
@@ -137,7 +137,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "device_os": "R", @@ -171,7 +170,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "device_os": "R", @@ -205,7 +203,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "device_os": "R", @@ -247,7 +244,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "device_os": "R", @@ -289,7 +285,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "device_os": "R", @@ -322,7 +317,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "device_os": "R", @@ -355,7 +349,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "device_os": "R", @@ -392,7 +385,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "device_os": "R", @@ -425,7 +417,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "device_os": "R", @@ -458,7 +449,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "device_os": "R", @@ -501,7 +491,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "device_os": "R", @@ -544,7 +533,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "device_os": "R", @@ -578,7 +566,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "device_os": "R", @@ -612,7 +599,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "device_os": "R", @@ -646,7 +632,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "device_os": "R", @@ -680,7 +665,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "device_os": "R", @@ -716,7 +700,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "device_os": "R", @@ -753,7 +736,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "device_os": "R", @@ -789,7 +771,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "device_os": "R", @@ -825,7 +806,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "device_os": "R",
diff --git a/testing/buildbot/tryserver.chromium.linux.json b/testing/buildbot/tryserver.chromium.linux.json index 8f5584d..0faa456 100644 --- a/testing/buildbot/tryserver.chromium.linux.json +++ b/testing/buildbot/tryserver.chromium.linux.json
@@ -130,7 +130,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "gpu": "10de:2184-440.100", @@ -166,7 +165,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "gpu": "8086:9bc5-20.0.8", @@ -198,7 +196,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "gpu": "10de:2184-440.100", @@ -230,7 +227,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "gpu": "8086:9bc5-20.0.8", @@ -263,7 +259,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "gpu": "10de:2184-440.100", @@ -296,7 +291,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "gpu": "8086:9bc5-20.0.8", @@ -329,7 +323,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "gpu": "10de:2184-440.100", @@ -362,7 +355,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "gpu": "8086:9bc5-20.0.8", @@ -397,7 +389,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "gpu": "10de:2184-440.100", @@ -433,7 +424,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "gpu": "8086:9bc5-20.0.8", @@ -468,7 +458,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "gpu": "10de:2184-440.100", @@ -503,7 +492,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "gpu": "8086:9bc5-20.0.8",
diff --git a/testing/buildbot/tryserver.chromium.mac.json b/testing/buildbot/tryserver.chromium.mac.json index 78c4214..e789e5a 100644 --- a/testing/buildbot/tryserver.chromium.mac.json +++ b/testing/buildbot/tryserver.chromium.mac.json
@@ -219,7 +219,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -255,7 +254,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -289,7 +287,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -325,7 +322,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -367,7 +363,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -411,7 +406,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -453,7 +447,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -497,7 +490,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -530,7 +522,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -565,7 +556,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -598,7 +588,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -633,7 +622,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -670,7 +658,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -709,7 +696,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -748,7 +734,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -781,7 +766,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -816,7 +800,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -851,7 +834,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -894,7 +876,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -939,7 +920,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -982,7 +962,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -1027,7 +1006,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -1061,7 +1039,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -1097,7 +1074,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -1131,7 +1107,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -1167,7 +1142,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -1201,7 +1175,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -1237,7 +1210,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -1273,7 +1245,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -1307,7 +1278,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -1343,7 +1313,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -1379,7 +1348,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -1416,7 +1384,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -1456,7 +1423,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -1492,7 +1458,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -1530,7 +1495,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -1566,7 +1530,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64", @@ -1603,7 +1566,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "cpu": "x86-64",
diff --git a/testing/buildbot/tryserver.chromium.win.json b/testing/buildbot/tryserver.chromium.win.json index 7fb59264e..21f7a85d 100644 --- a/testing/buildbot/tryserver.chromium.win.json +++ b/testing/buildbot/tryserver.chromium.win.json
@@ -310,7 +310,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "display_attached": "1", @@ -347,7 +346,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -381,7 +379,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "display_attached": "1", @@ -414,7 +411,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -445,7 +441,6 @@ "script": "//tools/perf/process_perf_results.py" }, "name": "passthrough_command_buffer_perftests 10de:2184", - "should_retry_with_patch": false, "swarming": { "dimensions": { "display_attached": "1", @@ -478,7 +473,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "display_attached": "1", @@ -512,7 +506,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -547,7 +540,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "display_attached": "1", @@ -581,7 +573,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -618,7 +609,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "display_attached": "1", @@ -655,7 +645,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -692,7 +681,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "display_attached": "1", @@ -728,7 +716,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -765,7 +752,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "display_attached": "1", @@ -801,7 +787,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": { @@ -837,7 +822,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "dimensions": { "display_attached": "1", @@ -872,7 +856,6 @@ "enable": true, "has_native_resultdb_integration": true }, - "should_retry_with_patch": false, "swarming": { "containment_type": "AUTO", "dimensions": {
diff --git a/testing/buildbot/unittest_expectations/test_dimension_gpu/chromium.test.json b/testing/buildbot/unittest_expectations/test_dimension_gpu/chromium.test.json index 114e30f..0322096 100644 --- a/testing/buildbot/unittest_expectations/test_dimension_gpu/chromium.test.json +++ b/testing/buildbot/unittest_expectations/test_dimension_gpu/chromium.test.json
@@ -17,7 +17,6 @@ "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, "name": "foo_test", - "should_retry_with_patch": false, "swarming": { "dimensions": { "iama": "mixin",
diff --git a/testing/buildbot/unittest_expectations/test_gpu_telemetry_tests/chromium.test.json b/testing/buildbot/unittest_expectations/test_gpu_telemetry_tests/chromium.test.json index d9efdf7..d4d83001 100644 --- a/testing/buildbot/unittest_expectations/test_gpu_telemetry_tests/chromium.test.json +++ b/testing/buildbot/unittest_expectations/test_gpu_telemetry_tests/chromium.test.json
@@ -17,7 +17,6 @@ "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, "name": "foo_tests", - "should_retry_with_patch": false, "swarming": { "dimensions": { "gpu": "10de:1cb3",
diff --git a/testing/buildbot/unittest_expectations/test_gpu_telemetry_tests_android/chromium.test.json b/testing/buildbot/unittest_expectations/test_gpu_telemetry_tests_android/chromium.test.json index 8e9df76..00c30ea07 100644 --- a/testing/buildbot/unittest_expectations/test_gpu_telemetry_tests_android/chromium.test.json +++ b/testing/buildbot/unittest_expectations/test_gpu_telemetry_tests_android/chromium.test.json
@@ -17,7 +17,6 @@ "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, "name": "foo_tests", - "should_retry_with_patch": false, "swarming": { "dimensions": { "device_type": "bullhead",
diff --git a/testing/buildbot/unittest_expectations/test_gpu_telemetry_tests_android_webview/chromium.test.json b/testing/buildbot/unittest_expectations/test_gpu_telemetry_tests_android_webview/chromium.test.json index 06517a86..389675b 100644 --- a/testing/buildbot/unittest_expectations/test_gpu_telemetry_tests_android_webview/chromium.test.json +++ b/testing/buildbot/unittest_expectations/test_gpu_telemetry_tests_android_webview/chromium.test.json
@@ -17,7 +17,6 @@ "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, "name": "foo_tests", - "should_retry_with_patch": false, "swarming": { "dimensions": { "device_type": "bullhead",
diff --git a/testing/buildbot/unittest_expectations/test_gpu_telemetry_tests_cast_streaming/chromium.test.json b/testing/buildbot/unittest_expectations/test_gpu_telemetry_tests_cast_streaming/chromium.test.json index c741eaf..1ce1b36 100644 --- a/testing/buildbot/unittest_expectations/test_gpu_telemetry_tests_cast_streaming/chromium.test.json +++ b/testing/buildbot/unittest_expectations/test_gpu_telemetry_tests_cast_streaming/chromium.test.json
@@ -17,7 +17,6 @@ "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, "name": "foo_tests", - "should_retry_with_patch": false, "swarming": { "dimensions": { "kvm": "1",
diff --git a/testing/buildbot/unittest_expectations/test_gpu_telemetry_tests_fuchsia/chromium.test.json b/testing/buildbot/unittest_expectations/test_gpu_telemetry_tests_fuchsia/chromium.test.json index 70406808..96613852 100644 --- a/testing/buildbot/unittest_expectations/test_gpu_telemetry_tests_fuchsia/chromium.test.json +++ b/testing/buildbot/unittest_expectations/test_gpu_telemetry_tests_fuchsia/chromium.test.json
@@ -17,7 +17,6 @@ "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, "name": "foo_tests", - "should_retry_with_patch": false, "swarming": { "dimensions": { "kvm": "1",
diff --git a/testing/buildbot/unittest_expectations/test_gpu_telemetry_tests_skylab/chromium.test.json b/testing/buildbot/unittest_expectations/test_gpu_telemetry_tests_skylab/chromium.test.json index a0bf6f9..497dee2b 100644 --- a/testing/buildbot/unittest_expectations/test_gpu_telemetry_tests_skylab/chromium.test.json +++ b/testing/buildbot/unittest_expectations/test_gpu_telemetry_tests_skylab/chromium.test.json
@@ -15,7 +15,6 @@ "autotest_name": "chromium_Graphics", "extra_browser_args": "--log-level=0 --js-flags=--expose-gc", "name": "foo_tests", - "should_retry_with_patch": false, "test": "telemetry_gpu_integration_test", "test_id_prefix": "ninja://chrome/test:telemetry_gpu_integration_test/" }
diff --git a/testing/buildbot/unittest_expectations/test_gpu_telemetry_tests_with_variants/chromium.test.json b/testing/buildbot/unittest_expectations/test_gpu_telemetry_tests_with_variants/chromium.test.json index 00a7e69..23c0177 100644 --- a/testing/buildbot/unittest_expectations/test_gpu_telemetry_tests_with_variants/chromium.test.json +++ b/testing/buildbot/unittest_expectations/test_gpu_telemetry_tests_with_variants/chromium.test.json
@@ -21,7 +21,6 @@ "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, "name": "swarming_test a_variant", - "should_retry_with_patch": false, "swarming": { "dimensions": { "gpu": "8086:3e92-24.20.100.6286", @@ -51,7 +50,6 @@ "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, "name": "swarming_test b_variant", - "should_retry_with_patch": false, "swarming": { "dimensions": { "gpu": "8086:3e92-24.20.100.6286",
diff --git a/testing/buildbot/unittest_expectations/test_intel_gpu_telemetry_tests/chromium.test.json b/testing/buildbot/unittest_expectations/test_intel_gpu_telemetry_tests/chromium.test.json index c4c5f0e..b3454c6 100644 --- a/testing/buildbot/unittest_expectations/test_intel_gpu_telemetry_tests/chromium.test.json +++ b/testing/buildbot/unittest_expectations/test_intel_gpu_telemetry_tests/chromium.test.json
@@ -21,7 +21,6 @@ "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, "name": "foo_tests", - "should_retry_with_patch": false, "swarming": { "dimensions": { "gpu": "8086:5912-24.20.100.6286",
diff --git a/testing/buildbot/unittest_expectations/test_intel_uhd_gpu_telemetry_tests/chromium.test.json b/testing/buildbot/unittest_expectations/test_intel_uhd_gpu_telemetry_tests/chromium.test.json index a378c6fe9..49f01cd 100644 --- a/testing/buildbot/unittest_expectations/test_intel_uhd_gpu_telemetry_tests/chromium.test.json +++ b/testing/buildbot/unittest_expectations/test_intel_uhd_gpu_telemetry_tests/chromium.test.json
@@ -21,7 +21,6 @@ "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, "name": "foo_tests", - "should_retry_with_patch": false, "swarming": { "dimensions": { "gpu": "8086:3e92-24.20.100.6286",
diff --git a/testing/buildbot/unittest_expectations/test_nvidia_gpu_telemetry_tests/chromium.test.json b/testing/buildbot/unittest_expectations/test_nvidia_gpu_telemetry_tests/chromium.test.json index 1e426d9..41a1fec 100644 --- a/testing/buildbot/unittest_expectations/test_nvidia_gpu_telemetry_tests/chromium.test.json +++ b/testing/buildbot/unittest_expectations/test_nvidia_gpu_telemetry_tests/chromium.test.json
@@ -21,7 +21,6 @@ "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, "name": "foo_tests", - "should_retry_with_patch": false, "swarming": { "dimensions": { "gpu": "10de:1cb3-26.21.14.3102",
diff --git a/testing/buildbot/variants.pyl b/testing/buildbot/variants.pyl index 9deba00..b8a1c979 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.6021.0', + 'description': 'Run with ash-chrome version 119.0.6022.0', 'args': [ - '--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6021.0/test_ash_chrome', + '--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6022.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.6021.0', - 'revision': 'version:119.0.6021.0', + 'location': 'lacros_version_skew_tests_v119.0.6022.0', + 'revision': 'version:119.0.6022.0', }, ], }, @@ -465,6 +465,72 @@ 'cros_img': 'dedede-release/R115-15474.70.0', }, }, + 'CROS_FIZZ_RELEASE_LKGM': { + 'identifier': 'FIZZ_RELEASE_LKGM', + 'skylab': { + 'cros_board': 'fizz', + 'cros_img': 'fizz-release/R119-15619.0.0', + 'autotest_name': 'tast.lacros-from-gcs', + 'dut_pool': 'chrome', + }, + }, + 'CROS_FIZZ_RELEASE_DEV': { + 'identifier': 'FIZZ_RELEASE_DEV', + 'skylab': { + 'cros_board': 'fizz', + 'cros_img': 'fizz-release/R117-15563.0.0', + 'dut_pool': 'chrome', + }, + }, + 'CROS_FIZZ_RELEASE_BETA': { + 'identifier': 'FIZZ_RELEASE_BETA', + 'skylab': { + 'cros_board': 'fizz', + 'cros_img': 'fizz-release/R116-15509.50.0', + 'dut_pool': 'chrome', + }, + }, + 'CROS_FIZZ_RELEASE_STABLE': { + 'identifier': 'FIZZ_RELEASE_STABLE', + 'skylab': { + 'cros_board': 'fizz', + 'cros_img': 'fizz-release/R115-15474.70.0', + 'dut_pool': 'chrome', + }, + }, + 'CROS_GUYBRUSH_RELEASE_LKGM': { + 'identifier': 'GUYBRUSH_RELEASE_LKGM', + 'skylab': { + 'cros_board': 'guybrush', + 'cros_img': 'guybrush-release/R119-15619.0.0', + 'autotest_name': 'tast.lacros-from-gcs', + 'dut_pool': 'chrome', + }, + }, + 'CROS_GUYBRUSH_RELEASE_DEV': { + 'identifier': 'GUYBRUSH_RELEASE_DEV', + 'skylab': { + 'cros_board': 'guybrush', + 'cros_img': 'guybrush-release/R117-15563.0.0', + 'dut_pool': 'chrome', + }, + }, + 'CROS_GUYBRUSH_RELEASE_BETA': { + 'identifier': 'GUYBRUSH_RELEASE_BETA', + 'skylab': { + 'cros_board': 'guybrush', + 'cros_img': 'guybrush-release/R116-15509.50.0', + 'dut_pool': 'chrome', + }, + }, + 'CROS_GUYBRUSH_RELEASE_STABLE': { + 'identifier': 'GUYBRUSH_RELEASE_STABLE', + 'skylab': { + 'cros_board': 'guybrush', + 'cros_img': 'guybrush-release/R115-15474.70.0', + 'dut_pool': 'chrome', + }, + }, 'CROS_PUFF_RELEASE_LKGM': { 'identifier': 'PUFF_RELEASE_LKGM', 'skylab': {
diff --git a/testing/variations/fieldtrial_testing_config.json b/testing/variations/fieldtrial_testing_config.json index 87b9806b..361dd00 100644 --- a/testing/variations/fieldtrial_testing_config.json +++ b/testing/variations/fieldtrial_testing_config.json
@@ -4963,6 +4963,25 @@ ] } ], + "DesktopNtpRealboxLensDirectUpload": [ + { + "platforms": [ + "chromeos", + "chromeos_lacros", + "linux", + "mac", + "windows" + ], + "experiments": [ + { + "name": "Enabled", + "enable_features": [ + "NtpLensDirectUpload" + ] + } + ] + } + ], "DesktopOmniboxCalculatorProvider": [ { "platforms": [ @@ -10897,14 +10916,7 @@ ], "experiments": [ { - "name": "Enabled_AllowLateAcks", - "enable_features": [ - "OnBeginFrameAcks", - "OnBeginFrameAllowLateAcks" - ] - }, - { - "name": "Enabled_OnlyBatched", + "name": "Enabled", "enable_features": [ "OnBeginFrameAcks" ] @@ -12559,6 +12571,28 @@ ] } ], + "PriorityHeader": [ + { + "platforms": [ + "android", + "android_webview", + "chromeos", + "chromeos_lacros", + "fuchsia", + "linux", + "mac", + "windows" + ], + "experiments": [ + { + "name": "Enabled", + "enable_features": [ + "PriorityHeader" + ] + } + ] + } + ], "PrivacyBudgetClockSkewMetrics": [ { "platforms": [ @@ -13269,9 +13303,6 @@ "params": { "BlockListByDevice": "amber|chopin|secret|a03|SO-51B|on7xelte|j7xelte|F41B|doha|HWYAL|a20s|begonia|b2q|t2s|channel|galahad|rk322x_box|a32|ellis|dandelion|tonga|RMX3231" }, - "enable_features": [ - "EnableDrDcVulkan" - ], "disable_features": [ "RawDraw" ]
diff --git a/third_party/androidx_javascriptengine/BUILD.gn b/third_party/androidx_javascriptengine/BUILD.gn index 9c0f75f..ca4eae17 100644 --- a/third_party/androidx_javascriptengine/BUILD.gn +++ b/third_party/androidx_javascriptengine/BUILD.gn
@@ -16,6 +16,7 @@ "src/main/stableAidl/org/chromium/android_webview/js_sandbox/common/IJsSandboxConsoleCallback.aidl", "src/main/stableAidl/org/chromium/android_webview/js_sandbox/common/IJsSandboxIsolate.aidl", "src/main/stableAidl/org/chromium/android_webview/js_sandbox/common/IJsSandboxIsolateCallback.aidl", + "src/main/stableAidl/org/chromium/android_webview/js_sandbox/common/IJsSandboxIsolateClient.aidl", "src/main/stableAidl/org/chromium/android_webview/js_sandbox/common/IJsSandboxIsolateSyncCallback.aidl", "src/main/stableAidl/org/chromium/android_webview/js_sandbox/common/IJsSandboxService.aidl", ] @@ -55,6 +56,7 @@ "src/main/java/androidx/javascriptengine/MemoryLimitExceededException.java", "src/main/java/androidx/javascriptengine/SandboxDeadException.java", "src/main/java/androidx/javascriptengine/SandboxUnsupportedException.java", + "src/main/java/androidx/javascriptengine/TerminationInfo.java", ] deps = [
diff --git a/third_party/androidx_javascriptengine/src b/third_party/androidx_javascriptengine/src index 30ea6d6..b925e80 160000 --- a/third_party/androidx_javascriptengine/src +++ b/third_party/androidx_javascriptengine/src
@@ -1 +1 @@ -Subproject commit 30ea6d647887c3bdfc47b04764b3444d0179f61b +Subproject commit b925e8051e8de9df7dc71c4c9c790afd463d3da8
diff --git a/third_party/angle b/third_party/angle index 120e90e..9ca025d 160000 --- a/third_party/angle +++ b/third_party/angle
@@ -1 +1 @@ -Subproject commit 120e90eb917674434a5b49dbe871c501aeb31b33 +Subproject commit 9ca025d2b54e10fcd6f38d390ac5442a3631302b
diff --git a/third_party/blink/common/interest_group/interest_group.cc b/third_party/blink/common/interest_group/interest_group.cc index d5899b2..bbb7dd1 100644 --- a/third_party/blink/common/interest_group/interest_group.cc +++ b/third_party/blink/common/interest_group/interest_group.cc
@@ -379,8 +379,8 @@ const GURL& bidding_url, const blink::AdDescriptor& ad_descriptor) { // TODO(crbug.com/1442242): Add size back to this check. - return "AdBid\n" + owner.GetURL().spec() + '\n' + bidding_url.spec() + '\n' + - ad_descriptor.url.spec(); + return base::StrCat({kKAnonKeyForAdBidPrefix, owner.GetURL().spec(), "\n", + bidding_url.spec(), "\n", ad_descriptor.url.spec()}); } std::string KAnonKeyForAdComponentBid(const GURL& ad_url) { @@ -390,7 +390,8 @@ std::string KAnonKeyForAdComponentBid( const blink::AdDescriptor& ad_descriptor) { // TODO(crbug.com/1442242): Add size back to this check. - return "ComponentBid\n" + ad_descriptor.url.spec(); + return base::StrCat( + {kKAnonKeyForAdComponentBidPrefix, ad_descriptor.url.spec()}); } std::string KAnonKeyForAdNameReporting(const blink::InterestGroup& group, @@ -402,13 +403,15 @@ group.bidding_url.value_or(GURL()).spec(), "\n", ad.render_url.spec(), "\n"}); if (ad.buyer_and_seller_reporting_id.has_value()) { - return base::StrCat({"BuyerAndSellerReportId\n", middle, - *ad.buyer_and_seller_reporting_id}); + return base::StrCat({kKAnonKeyForAdNameReportingBuyerAndSellerIdPrefix, + middle, *ad.buyer_and_seller_reporting_id}); } if (ad.buyer_reporting_id.has_value()) { - return base::StrCat({"BuyerReportId\n", middle, *ad.buyer_reporting_id}); + return base::StrCat({kKAnonKeyForAdNameReportingBuyerReportIdPrefix, middle, + *ad.buyer_reporting_id}); } - return base::StrCat({"NameReport\n", middle, group.name}); + return base::StrCat( + {kKAnonKeyForAdNameReportingNamePrefix, middle, group.name}); } } // namespace blink
diff --git a/third_party/blink/common/permissions_policy/permissions_policy_features.cc b/third_party/blink/common/permissions_policy/permissions_policy_features.cc index 8a5821d..86c9c14f 100644 --- a/third_party/blink/common/permissions_policy/permissions_policy_features.cc +++ b/third_party/blink/common/permissions_policy/permissions_policy_features.cc
@@ -4,6 +4,10 @@ #include "third_party/blink/public/common/permissions_policy/permissions_policy_features.h" +#include <stdint.h> + +#include <string> + #include "base/command_line.h" #include "base/strings/string_util.h" #include "third_party/blink/common/permissions_policy/permissions_policy_features_generated.h" @@ -19,7 +23,7 @@ namespace { // Return true if we should use EnabledForNone as the default for "unload" // feature. This is special logic for https://crbug.com/1432116 -// `bucket` is cast to a char, so there should be no more than 256 possible +// `bucket` is cast to a uint8_t, so there should be no more than 256 possible // buckets. // If `origin` is an opaque origin, its precursor host will be used. bool ShouldUnloadBeNone(const url::Origin& origin, int percent, int bucket) { @@ -38,11 +42,10 @@ // adding the bucket afterwards), a user in bucket `hash` is identical to a // user in buckets `hash+1`, `hash+2`, ..., `hash+percent-1`. With this, no // buckets get identical behaviour. - const int hash = - (base::PersistentHash({static_cast<char>(base::PersistentHash(host)), - static_cast<char>(bucket)})) % - 100; - return hash < percent; + const uint8_t hash[2] = {static_cast<uint8_t>(base::PersistentHash(host)), + static_cast<uint8_t>(bucket)}; + const int hash_bucket = base::PersistentHash(hash) % 100; + return hash_bucket < percent; } } // namespace
diff --git a/third_party/blink/public/common/interest_group/interest_group.h b/third_party/blink/public/common/interest_group/interest_group.h index 5e51463..9a9df2a 100644 --- a/third_party/blink/public/common/interest_group/interest_group.h +++ b/third_party/blink/public/common/interest_group/interest_group.h
@@ -25,6 +25,14 @@ namespace blink { +constexpr char kKAnonKeyForAdComponentBidPrefix[] = "ComponentBid\n"; +constexpr char kKAnonKeyForAdBidPrefix[] = "AdBid\n"; +constexpr char kKAnonKeyForAdNameReportingBuyerAndSellerIdPrefix[] = + "BuyerAndSellerReportId\n"; +constexpr char kKAnonKeyForAdNameReportingBuyerReportIdPrefix[] = + "BuyerReportId\n"; +constexpr char kKAnonKeyForAdNameReportingNamePrefix[] = "NameReport\n"; + // Interest group used by FLEDGE auctions. Typemapped to // blink::mojom::InterestGroup, primarily so the typemap can include validity // checks on the origins of the provided URLs. @@ -122,7 +130,7 @@ absl::optional<AdditionalBidKey> additional_bid_key; - static_assert(__LINE__ == 125, R"( + static_assert(__LINE__ == 133, R"( If modifying InterestGroup fields, make sure to also modify: * IsValid(), EstimateSize(), and IsEqualForTesting() in this class
diff --git a/third_party/blink/public/mojom/interest_group/interest_group_types.mojom b/third_party/blink/public/mojom/interest_group/interest_group_types.mojom index a484af0f..3a3666ed 100644 --- a/third_party/blink/public/mojom/interest_group/interest_group_types.mojom +++ b/third_party/blink/public/mojom/interest_group/interest_group_types.mojom
@@ -188,9 +188,9 @@ // https (uuid-in-package isn't supported since it doesn't support CORS), and // each origin must match `seller` in AuctionAdConfig. The response must be // served with the legacy headers `X-FLEDGE-Auction-Only: true` and -// `X-Allow-Fledge: true` or the new header `Ad-Auction-Allowed: true`. The -// request is made with CORS, using the caller of runAdAuction()'s frame as the -// initiator. +// `X-Allow-Fledge: true` or the new headers `Ad-Auction-Only: true` and +// `Ad-Auction-Allowed: true`. The request is made with CORS, using the caller +// of runAdAuction()'s frame as the initiator. // // The worklet process will parse the signals object and deliver it to worklet // functions (generateBid(), scoreAd(), reportWin(), reportResult()).
diff --git a/third_party/blink/renderer/core/css/selector_checker.cc b/third_party/blink/renderer/core/css/selector_checker.cc index a96e28d..ee774c1 100644 --- a/third_party/blink/renderer/core/css/selector_checker.cc +++ b/third_party/blink/renderer/core/css/selector_checker.cc
@@ -47,6 +47,7 @@ #include "third_party/blink/renderer/core/dom/nth_index_cache.h" #include "third_party/blink/renderer/core/dom/popover_data.h" #include "third_party/blink/renderer/core/dom/shadow_root.h" +#include "third_party/blink/renderer/core/dom/slot_assignment_engine.h" #include "third_party/blink/renderer/core/dom/text.h" #include "third_party/blink/renderer/core/editing/frame_selection.h" #include "third_party/blink/renderer/core/frame/local_frame.h" @@ -1765,6 +1766,15 @@ } if (auto* html_element = DynamicTo<HTMLElement>(element)) { + // Recomputing the slot assignment can update cached directionality. + // This should already have been done unless this an API call like + // Element.matches(). + Document& document = element.GetDocument(); + if (document.IsSlotAssignmentDirty()) { + CHECK_EQ(mode_, kQueryingRules); + document.GetSlotAssignmentEngine().RecalcSlotAssignments(); + } + return html_element->CachedDirectionality() == direction; } break;
diff --git a/third_party/blink/renderer/core/dom/element.cc b/third_party/blink/renderer/core/dom/element.cc index 6edf8bca..140e7b0 100644 --- a/third_party/blink/renderer/core/dom/element.cc +++ b/third_party/blink/renderer/core/dom/element.cc
@@ -2671,6 +2671,8 @@ DCHECK(!HasRareData() || !GetElementRareData()->HasPseudoElements()); + RecomputeDirectionFromParent(); + if (!insertion_point.IsInTreeScope()) { return kInsertionDone; } @@ -2796,6 +2798,8 @@ } } + RecomputeDirectionFromParent(); + document.GetRootScrollerController().ElementRemoved(*this); if (IsInTopLayer()) { @@ -4008,6 +4012,33 @@ } } +void Element::RecomputeDirectionFromParent() { + // This function recomputes the inherited direction if an element inherits + // direction from a parent or shadow host. + // + // It should match the computation done in + // HTMLElement::UpdateDirectionalityAndDescendant that applies an inherited + // direction change to the descendants that need updating. + if (GetDocument().HasDirAttribute() && + RuntimeEnabledFeatures::CSSPseudoDirEnabled() && + !HTMLElement::ElementAffectsDirectionality(this)) { + if (HTMLSlotElement* slot = + ToHTMLSlotElementIfSupportsAssignmentOrNull(this)) { + SetCachedDirectionality( + ContainingShadowRoot()->host().CachedDirectionality()); + } else { + Node* parent = parentNode(); + if (Element* parent_element = DynamicTo<Element>(parent)) { + SetCachedDirectionality(parent_element->CachedDirectionality()); + } else if (ShadowRoot* shadow_root = DynamicTo<ShadowRoot>(parent)) { + SetCachedDirectionality(shadow_root->host().CachedDirectionality()); + } else { + SetCachedDirectionality(TextDirection::kLtr); + } + } + } +} + ShadowRoot& Element::CreateAndAttachShadowRoot(ShadowRootType type) { #if DCHECK_IS_ON() NestingLevelIncrementer slot_assignment_recalc_forbidden_scope(
diff --git a/third_party/blink/renderer/core/dom/element.h b/third_party/blink/renderer/core/dom/element.h index ba1deaf..32bb211 100644 --- a/third_party/blink/renderer/core/dom/element.h +++ b/third_party/blink/renderer/core/dom/element.h
@@ -1446,6 +1446,8 @@ DetachPseudoElement(kPseudoIdFirstLetter, performing_reattach); } + void RecomputeDirectionFromParent(); + ShadowRoot& CreateAndAttachShadowRoot(ShadowRootType); // FIXME: Everyone should allow author shadows.
diff --git a/third_party/blink/renderer/core/dom/node.cc b/third_party/blink/renderer/core/dom/node.cc index 1dcdc3e1..94d0ade 100644 --- a/third_party/blink/renderer/core/dom/node.cc +++ b/third_party/blink/renderer/core/dom/node.cc
@@ -3387,6 +3387,11 @@ } void Node::AddCandidateDirectionalityForSlot() { + if (RuntimeEnabledFeatures::CSSPseudoDirEnabled()) { + // This code is not needed for the new dir=auto inheritance rules. + return; + } + ShadowRoot* root = ShadowRootOfParent(); if (!root || !root->HasSlotAssignment()) { // We should add this node as a candidate that needs to recalculate its @@ -3446,6 +3451,11 @@ return ancestor_tree_scopes; } +void Node::SetNeedsInheritDirectionalityFromParent() { + CHECK(!RuntimeEnabledFeatures::CSSPseudoDirEnabled()); + SetFlag(kNeedsInheritDirectionalityFromParent); +} + void Node::Trace(Visitor* visitor) const { visitor->Trace(parent_or_shadow_host_node_); visitor->Trace(previous_);
diff --git a/third_party/blink/renderer/core/dom/node.h b/third_party/blink/renderer/core/dom/node.h index bb6ab141..ffc6a58 100644 --- a/third_party/blink/renderer/core/dom/node.h +++ b/third_party/blink/renderer/core/dom/node.h
@@ -1015,9 +1015,7 @@ bool NeedsInheritDirectionalityFromParent() const { return GetFlag(kNeedsInheritDirectionalityFromParent); } - void SetNeedsInheritDirectionalityFromParent() { - SetFlag(kNeedsInheritDirectionalityFromParent); - } + void SetNeedsInheritDirectionalityFromParent(); void ClearNeedsInheritDirectionalityFromParent() { ClearFlag(kNeedsInheritDirectionalityFromParent); } @@ -1071,6 +1069,8 @@ kSelfOrAncestorHasDirAutoAttribute = 1 << 28, kCachedDirectionalityIsRtl = 1 << 29, + // TODO(https://crbug.com/576815): Remove this once new dir=auto handling + // ships as part of RuntimeEnabledFeatures::CSSPseudoDirEnabled(). kNeedsInheritDirectionalityFromParent = 1u << 30, kDefaultNodeFlags = kIsFinishedParsingChildrenFlag,
diff --git a/third_party/blink/renderer/core/dom/slot_assignment.cc b/third_party/blink/renderer/core/dom/slot_assignment.cc index e57ff551..ff6e1335 100644 --- a/third_party/blink/renderer/core/dom/slot_assignment.cc +++ b/third_party/blink/renderer/core/dom/slot_assignment.cc
@@ -331,11 +331,23 @@ } } + if (RuntimeEnabledFeatures::CSSPseudoDirEnabled()) { + // TODO(https://crbug.com/576815): Once incorrect use of + // FlatTreeTraversal is fixed, this can probably move into + // DidRecalcAssignedNodes above. + for (HTMLSlotElement* slot : Slots()) { + if (slot->HasDirectionAuto()) { + slot->AdjustDirectionAutoAfterRecalcAssignedNodes(); + } + } + } + // Update an dir=auto flag from a host of slots to its all descendants. // We should call below functions outside FlatTreeTraversalForbiddenScope // because we can go a tree walk to either their ancestors or descendants // if needed. if (owner_->NeedsDirAutoAttributeUpdate()) { + CHECK(!RuntimeEnabledFeatures::CSSPseudoDirEnabled()); owner_->SetNeedsDirAutoAttributeUpdate(false); if (auto* element = DynamicTo<HTMLElement>(owner_->host())) { element->UpdateDescendantHasDirAutoAttribute(
diff --git a/third_party/blink/renderer/core/editing/frame_selection.cc b/third_party/blink/renderer/core/editing/frame_selection.cc index 849c56ff..b22d99c 100644 --- a/third_party/blink/renderer/core/editing/frame_selection.cc +++ b/third_party/blink/renderer/core/editing/frame_selection.cc
@@ -905,14 +905,13 @@ if (!GetDocument().HaveRenderBlockingStylesheetsLoaded()) { return; } - GetDocument().UpdateStyleAndLayoutTree(); - // Because LayoutObject::selectionBackgroundColor() and - // LayoutObject::selectionForegroundColor() check if the frame is active, - // we have to update places those colors were painted. + // Selection style may depend on the active state of the document, so style + // and paint must be invalidated when active status changes. if (GetDocument().GetLayoutView()) { - layout_selection_->InvalidatePaintForSelection(); + layout_selection_->InvalidateStyleAndPaintForSelection(); } + GetDocument().UpdateStyleAndLayoutTree(); // Caret appears in the active frame. if (active_and_focused) {
diff --git a/third_party/blink/renderer/core/editing/layout_selection.cc b/third_party/blink/renderer/core/editing/layout_selection.cc index df57aae..73541f1 100644 --- a/third_party/blink/renderer/core/editing/layout_selection.cc +++ b/third_party/blink/renderer/core/editing/layout_selection.cc
@@ -21,6 +21,7 @@ #include "third_party/blink/renderer/core/editing/layout_selection.h" +#include "third_party/blink/renderer/core/css/style_change_reason.h" #include "third_party/blink/renderer/core/dom/document.h" #include "third_party/blink/renderer/core/dom/node_computed_style.h" #include "third_party/blink/renderer/core/editing/editing_utilities.h" @@ -343,7 +344,7 @@ } template <typename Visitor> -static void VisitSelectedInclusiveDescendantsOfInternal(const Node& node, +static void VisitSelectedInclusiveDescendantsOfInternal(Node& node, Visitor* visitor) { // Display:content element appears in a flat tree even it doesn't have // a LayoutObject but we need to visit its children. @@ -365,14 +366,13 @@ } template <typename Visitor> -static void VisitSelectedInclusiveDescendantsOf(const Node& node, - Visitor* visitor) { +static void VisitSelectedInclusiveDescendantsOf(Node& node, Visitor* visitor) { DCHECK(IsFlatTreeClean(node)); return VisitSelectedInclusiveDescendantsOfInternal(node, visitor); } static OldSelectedNodes ResetOldSelectedNodes( - const Node& root, + Node& root, absl::optional<unsigned> old_start_offset, absl::optional<unsigned> old_end_offset) { class OldSelectedVisitor { @@ -384,7 +384,7 @@ : old_start_offset(passed_old_start_offset), old_end_offset(passed_old_end_offset) {} - void Visit(const Node& node) { + void Visit(Node& node) { LayoutObject* layout_object = node.GetLayoutObject(); const SelectionState old_state = layout_object->GetSelectionState(); DCHECK_NE(old_state, SelectionState::kNone) << node; @@ -988,7 +988,7 @@ return ToPixelSnappedRect(visitor.selected_rect); } -void LayoutSelection::InvalidatePaintForSelection() { +void LayoutSelection::InvalidateStyleAndPaintForSelection() { if (paint_range_->IsNull()) return; @@ -996,7 +996,29 @@ STACK_ALLOCATED(); public: - void Visit(const Node& node) { VisitLayoutObjectsOf(node, this); } + void Visit(Node& node) { + if (!node.GetLayoutObject()) { + return; + } + + // Invalidate style to force an update to ::selection pseudo + // elements so that ::selection::inactive-window style is applied + // (or removed). + if (auto* this_element = DynamicTo<Element>(node)) { + const ComputedStyle* element_style = node.GetComputedStyle(); + if (element_style && + element_style->HasPseudoElementStyle(kPseudoIdSelection)) { + node.SetNeedsStyleRecalc( + kLocalStyleChange, + StyleChangeReasonForTracing::CreateWithExtraData( + style_change_reason::kPseudoClass, + style_change_extra_data::g_active)); + this_element->PseudoStateChanged(CSSSelector::kPseudoSelection); + } + } + + VisitLayoutObjectsOf(node, this); + } void Visit(LayoutObject* layout_object) { layout_object->SetShouldInvalidateSelection(); }
diff --git a/third_party/blink/renderer/core/editing/layout_selection.h b/third_party/blink/renderer/core/editing/layout_selection.h index 706bee4..711b416 100644 --- a/third_party/blink/renderer/core/editing/layout_selection.h +++ b/third_party/blink/renderer/core/editing/layout_selection.h
@@ -51,7 +51,7 @@ void Commit(); gfx::Rect AbsoluteSelectionBounds(); - void InvalidatePaintForSelection(); + void InvalidateStyleAndPaintForSelection(); LayoutTextSelectionStatus ComputeSelectionStatus(const LayoutText&) const; LayoutSelectionStatus ComputeSelectionStatus(const NGInlineCursor&) const;
diff --git a/third_party/blink/renderer/core/fragment_directive/text_fragment_selector.cc b/third_party/blink/renderer/core/fragment_directive/text_fragment_selector.cc index eb5d4ec0..17d300f 100644 --- a/third_party/blink/renderer/core/fragment_directive/text_fragment_selector.cc +++ b/third_party/blink/renderer/core/fragment_directive/text_fragment_selector.cc
@@ -61,6 +61,10 @@ DCHECK_EQ(directive.find('&'), kNotFound); + if (HasInvalidURLEscapeSequences(directive)) { + return kInvalidSelector; + } + Vector<String> terms; directive.Split(",", true, terms);
diff --git a/third_party/blink/renderer/core/frame/attribution_src_loader.cc b/third_party/blink/renderer/core/frame/attribution_src_loader.cc index e49eef2..39fe51f 100644 --- a/third_party/blink/renderer/core/frame/attribution_src_loader.cc +++ b/third_party/blink/renderer/core/frame/attribution_src_loader.cc
@@ -22,6 +22,7 @@ #include "components/attribution_reporting/registration_eligibility.mojom-shared.h" #include "components/attribution_reporting/source_registration.h" #include "components/attribution_reporting/source_registration_error.mojom-shared.h" +#include "components/attribution_reporting/source_type.mojom-shared.h" #include "components/attribution_reporting/suitable_origin.h" #include "components/attribution_reporting/trigger_registration.h" #include "components/attribution_reporting/trigger_registration_error.mojom-shared.h" @@ -80,6 +81,7 @@ namespace { using ::attribution_reporting::mojom::RegistrationEligibility; +using ::attribution_reporting::mojom::SourceType; using ::network::mojom::AttributionReportingEligibility; // These values are persisted to logs. Entries should not be renumbered and @@ -225,9 +227,11 @@ ResourceClient( AttributionSrcLoader* loader, RegistrationEligibility eligibility, + SourceType source_type, mojo::SharedRemote<mojom::blink::AttributionDataHost> data_host) : loader_(loader), eligibility_(eligibility), + source_type_(source_type), data_host_(std::move(data_host)) { DCHECK(loader_); DCHECK(loader_->local_frame_); @@ -285,6 +289,10 @@ // Type of events this request can register. const RegistrationEligibility eligibility_; + // Used to parse source registrations associated with this resource client. + // Irrelevant for trigger registrations. + const SourceType source_type_; + // Remote used for registering responses with the browser-process. GC_PLUGIN_IGNORE("https://crbug.com/1381979") mojo::SharedRemote<mojom::blink::AttributionDataHost> data_host_; @@ -418,13 +426,16 @@ &conversion_host); mojo::SharedRemote<mojom::blink::AttributionDataHost> data_host; + SourceType source_type; if (attribution_src_token.has_value()) { conversion_host->RegisterNavigationDataHost( data_host.BindNewPipeAndPassReceiver(), *attribution_src_token); + source_type = SourceType::kNavigation; } else { conversion_host->RegisterDataHost(data_host.BindNewPipeAndPassReceiver(), eligibility); + source_type = SourceType::kEvent; } for (const KURL& url : urls) { @@ -452,8 +463,8 @@ params.MutableOptions().initiator_info.name = fetch_initiator_type_names::kAttributionsrc; - auto* client = - MakeGarbageCollected<ResourceClient>(this, eligibility, data_host); + auto* client = MakeGarbageCollected<ResourceClient>(this, eligibility, + source_type, data_host); // TODO(https://crbug.com/1374121): If this registration is // `associated_with_navigation`, there is a risk that the navigation will // complete before the resource fetch here is complete. In this case, the @@ -662,7 +673,7 @@ // TODO(johnidel): Consider refactoring this such that we can share clients // for redirect chain, or not create the client at all. auto* client = MakeGarbageCollected<ResourceClient>( - this, registration_eligibility, std::move(data_host)); + this, registration_eligibility, SourceType::kEvent, std::move(data_host)); client->HandleResponseHeaders(std::move(reporting_origin), headers, trigger_verifications); client->Finish(); @@ -811,7 +822,7 @@ return; } auto source_data = attribution_reporting::SourceRegistration::Parse( - StringUTF8Adaptor(headers.web_source).AsStringPiece()); + StringUTF8Adaptor(headers.web_source).AsStringPiece(), source_type_); if (!source_data.has_value()) { LogAuditIssue(loader_->local_frame_->DomWindow(), AttributionReportingIssueType::kInvalidRegisterSourceHeader,
diff --git a/third_party/blink/renderer/core/highlight/highlight_style_utils_test.cc b/third_party/blink/renderer/core/highlight/highlight_style_utils_test.cc index 427d936..de0cc9b5 100644 --- a/third_party/blink/renderer/core/highlight/highlight_style_utils_test.cc +++ b/third_party/blink/renderer/core/highlight/highlight_style_utils_test.cc
@@ -22,19 +22,6 @@ #include "third_party/blink/renderer/platform/testing/runtime_enabled_features_test_helpers.h" namespace blink { -namespace { - -Color SelectionWebkitTextFillColor(const Document& document, - Node* node, - const ComputedStyle& originating_style) { - const ComputedStyle* pseudo_style = HighlightStyleUtils::HighlightPseudoStyle( - node, originating_style, kPseudoIdSelection); - return HighlightStyleUtils::ResolveColor( - document, originating_style, pseudo_style, kPseudoIdSelection, - GetCSSPropertyWebkitTextFillColor(), Color::kBlack); -} - -} // namespace class HighlightStyleUtilsTest : public SimTest, private ScopedHighlightInheritanceForTest { @@ -44,119 +31,6 @@ HighlightStyleUtilsTest() : ScopedHighlightInheritanceForTest(false) {} }; -TEST_F(HighlightStyleUtilsTest, CachedPseudoStylesWindowInactive) { - // Test that we are only caching active selection styles as so that we don't - // incorrectly use a cached ComputedStyle when the active state changes. - - SimRequest main_resource("https://example.com/test.html", "text/html"); - - LoadURL("https://example.com/test.html"); - - main_resource.Complete(R"HTML( - <!doctype html> - <style> - ::selection:window-inactive {color: red } - ::selection { color: green } - </style> - <body>Text to select.</body> - )HTML"); - - auto* body = GetDocument().body(); - auto* text_node = body->firstChild(); - - Compositor().BeginFrame(); - - const ComputedStyle& body_style = body->ComputedStyleRef(); - const ComputedStyle& text_style = text_node->ComputedStyleRef(); - - EXPECT_FALSE(body_style.GetCachedPseudoElementStyle(kPseudoIdSelection)); - - // Select some text. - Window().getSelection()->setBaseAndExtent(body, 0, body, 1); - Compositor().BeginFrame(); - - // We don't cache ::selection styles for :window-inactive. - EXPECT_FALSE(body_style.GetCachedPseudoElementStyle(kPseudoIdSelection)); - - EXPECT_FALSE(GetPage().IsActive()); - EXPECT_EQ(Color(255, 0, 0), - SelectionWebkitTextFillColor(GetDocument(), text_node, text_style)); - - // Focus the window. - GetPage().SetActive(true); - Compositor().BeginFrame(); - EXPECT_EQ(Color(0, 128, 0), - SelectionWebkitTextFillColor(GetDocument(), text_node, text_style)); - const ComputedStyle* active_style = - body_style.GetCachedPseudoElementStyle(kPseudoIdSelection); - EXPECT_TRUE(active_style); - - // Unfocus the window. - GetPage().SetActive(false); - Compositor().BeginFrame(); - EXPECT_EQ(Color(255, 0, 0), - SelectionWebkitTextFillColor(GetDocument(), text_node, text_style)); - EXPECT_EQ(active_style, - body_style.GetCachedPseudoElementStyle(kPseudoIdSelection)); -} - -TEST_F(HighlightStyleUtilsTest, CachedPseudoStylesNoWindowInactive) { - // Test that we share a cached ComputedStyle for active and inactive - // selections when there are no :window-inactive styles. - - SimRequest main_resource("https://example.com/test.html", "text/html"); - - LoadURL("https://example.com/test.html"); - - main_resource.Complete(R"HTML( - <!doctype html> - <style> - ::selection { color: green } - </style> - <body>Text to select.</body> - )HTML"); - - auto* body = GetDocument().body(); - auto* text_node = body->firstChild(); - - Compositor().BeginFrame(); - - const ComputedStyle& body_style = body->ComputedStyleRef(); - const ComputedStyle& text_style = text_node->ComputedStyleRef(); - - EXPECT_FALSE(body_style.GetCachedPseudoElementStyle(kPseudoIdSelection)); - - // Select some text. - Window().getSelection()->setBaseAndExtent(body, 0, body, 1); - Compositor().BeginFrame(); - - // We cache inactive ::selection styles when there are no :window-inactive - // selectors. - const ComputedStyle* active_style = - body_style.GetCachedPseudoElementStyle(kPseudoIdSelection); - EXPECT_TRUE(active_style); - - EXPECT_FALSE(GetPage().IsActive()); - EXPECT_EQ(Color(0, 128, 0), - SelectionWebkitTextFillColor(GetDocument(), text_node, text_style)); - - // Focus the window. - GetPage().SetActive(true); - Compositor().BeginFrame(); - EXPECT_EQ(Color(0, 128, 0), - SelectionWebkitTextFillColor(GetDocument(), text_node, text_style)); - EXPECT_EQ(active_style, - body_style.GetCachedPseudoElementStyle(kPseudoIdSelection)); - - // Unfocus the window. - GetPage().SetActive(false); - Compositor().BeginFrame(); - EXPECT_EQ(Color(0, 128, 0), - SelectionWebkitTextFillColor(GetDocument(), text_node, text_style)); - EXPECT_EQ(active_style, - body_style.GetCachedPseudoElementStyle(kPseudoIdSelection)); -} - TEST_F(HighlightStyleUtilsTest, SelectedTextInputShadow) { // Test that we apply input ::selection style to the value text.
diff --git a/third_party/blink/renderer/core/html/canvas/html_canvas_element.cc b/third_party/blink/renderer/core/html/canvas/html_canvas_element.cc index 47007f3..1cc50bf7 100644 --- a/third_party/blink/renderer/core/html/canvas/html_canvas_element.cc +++ b/third_party/blink/renderer/core/html/canvas/html_canvas_element.cc
@@ -623,9 +623,6 @@ } else { dirty_rect_.Union(gfx::RectF(gfx::SkIRectToRect(rect))); } - if (is_rendering_context2d && canvas2d_bridge_) { - canvas2d_bridge_->DidDraw(); - } } void HTMLCanvasElement::PreFinalizeFrame() {
diff --git a/third_party/blink/renderer/core/html/html_element.cc b/third_party/blink/renderer/core/html/html_element.cc index dab1882..241a6a9 100644 --- a/third_party/blink/renderer/core/html/html_element.cc +++ b/third_party/blink/renderer/core/html/html_element.cc
@@ -169,6 +169,7 @@ HTMLElement* GetParentForDirectionality(const HTMLElement& element, bool& needs_slot_assignment_recalc) { + CHECK(!RuntimeEnabledFeatures::CSSPseudoDirEnabled()); if (element.IsPseudoElement()) return DynamicTo<HTMLElement>(element.ParentOrShadowHostNode()); @@ -2427,7 +2428,7 @@ return Traversal<HTMLFormElement>::FirstAncestor(*this); } -static inline bool ElementAffectsDirectionality(const Node* node) { +bool HTMLElement::ElementAffectsDirectionality(const Node* node) { auto* html_element = DynamicTo<HTMLElement>(node); auto* input_element = DynamicTo<HTMLInputElement>(node); return (html_element && (IsA<HTMLBDIElement>(*html_element) || @@ -2442,7 +2443,10 @@ if (GetDocument().HasDirAttribute()) { AdjustDirectionalityIfNeededAfterChildrenChanged(change); - if (change.IsChildInsertion() && !SelfOrAncestorHasDirAutoAttribute()) { + if (change.IsChildInsertion() && !SelfOrAncestorHasDirAutoAttribute() && + // The new code for handling this is in Element::InsertedInto and + // Element::RemovedFrom. + !RuntimeEnabledFeatures::CSSPseudoDirEnabled()) { auto* element = DynamicTo<HTMLElement>(change.sibling_changed); if (element && !element->NeedsInheritDirectionalityFromParent() && !ElementAffectsDirectionality(element)) @@ -2463,6 +2467,22 @@ EqualIgnoringASCIICase(direction, "auto"); } +const TextControlElement* ElementIfAutoDirShouldUseValueOrNull( + const Element* element) { + const TextControlElement* text_element = + DynamicTo<TextControlElement>(element); + if (text_element && text_element->ShouldAutoDirUseValue()) { + return text_element; + } + return nullptr; +} + +inline TextControlElement* ElementIfAutoDirShouldUseValueOrNull( + Element* element) { + return const_cast<TextControlElement*>(ElementIfAutoDirShouldUseValueOrNull( + const_cast<const Element*>(element))); +} + // TODO(https://crbug.com/576815): Once the CSSPseudoDir flag is // removed, this function no longer needs to be templatized over // Traversal since it can always use NodeTraversal. @@ -2471,10 +2491,9 @@ bool& is_deferred, Node* stay_within) const { is_deferred = false; - if (auto* text_element = DynamicTo<TextControlElement>(*this)) { - if (text_element->ShouldAutoDirUseValue()) { - return BidiParagraph::BaseDirectionForStringOrLtr(text_element->Value()); - } + if (const TextControlElement* text_element = + ElementIfAutoDirShouldUseValueOrNull(this)) { + return BidiParagraph::BaseDirectionForStringOrLtr(text_element->Value()); } // For <textarea>, the heuristic is applied on a per-paragraph level, and @@ -2551,6 +2570,7 @@ void HTMLElement::AdjustDirectionalityIfNeededAfterChildAttributeChanged( Element* child) { + DCHECK(!RuntimeEnabledFeatures::CSSPseudoDirEnabled()); DCHECK(SelfOrAncestorHasDirAutoAttribute()); bool is_deferred; TextDirection text_direction = @@ -2579,6 +2599,7 @@ } bool HTMLElement::CalculateAndAdjustAutoDirectionality(Node* stay_within) { + CHECK(!RuntimeEnabledFeatures::CSSPseudoDirEnabled() || this == stay_within); bool is_deferred = false; TextDirection text_direction = ResolveAutoDirectionality<NodeTraversal>(is_deferred, stay_within) @@ -2630,26 +2651,91 @@ UpdateDescendantHasDirAutoAttribute(true /* has_dir_auto */); + // We have some fixes to dir=auto calculation behind the + // CSSPseudoDirEnabled() flag. This code has two branches to account + // for *both* those fixes *and* for the :dir() pseudo-class itself. + if (RuntimeEnabledFeatures::CSSPseudoDirEnabled()) { + this->UpdateAncestorWithDirAuto(UpdateAncestorTraversal::IncludeSelf); + } else { + for (Element* element_to_adjust = this; element_to_adjust; + element_to_adjust = + FlatTreeTraversal::ParentElement(*element_to_adjust)) { + if (ElementAffectsDirectionality(element_to_adjust)) { + if (To<HTMLElement>(element_to_adjust) + ->CalculateAndAdjustAutoDirectionality( + stay_within ? stay_within : element_to_adjust)) { + SetNeedsStyleRecalc(kLocalStyleChange, + StyleChangeReasonForTracing::Create( + style_change_reason::kPseudoClass)); + } + return; + } + } + } +} + +void HTMLElement::UpdateAncestorWithDirAuto(UpdateAncestorTraversal traversal) { + CHECK(RuntimeEnabledFeatures::CSSPseudoDirEnabled()); + + bool skip = traversal == UpdateAncestorTraversal::ExcludeSelf; + for (Element* element_to_adjust = this; element_to_adjust; - element_to_adjust = - FlatTreeTraversal::ParentElement(*element_to_adjust)) { - if (ElementAffectsDirectionality(element_to_adjust)) { - if (To<HTMLElement>(element_to_adjust) - ->CalculateAndAdjustAutoDirectionality( - stay_within ? stay_within : element_to_adjust)) { + element_to_adjust = element_to_adjust->parentElement()) { + if (!skip) { + if (ElementAffectsDirectionality(element_to_adjust)) { + HTMLElement* html_element_to_adjust = + To<HTMLElement>(element_to_adjust); + if (html_element_to_adjust->HasDirectionAuto() && + html_element_to_adjust->CalculateAndAdjustAutoDirectionality( + element_to_adjust)) { + SetNeedsStyleRecalc(kLocalStyleChange, + StyleChangeReasonForTracing::Create( + style_change_reason::kPseudoClass)); + element_to_adjust->PseudoStateChanged(CSSSelector::kPseudoDir); + } + return; + } + if (!element_to_adjust->SelfOrAncestorHasDirAutoAttribute()) { + return; + } + } + skip = false; + // Directionality mostly operates on the node tree rather than the + // flat tree. However, a <slot>'s dir=auto is affected by its + // assigned nodes. + if (HTMLSlotElement* slot = element_to_adjust->AssignedSlot()) { + if (slot->HasDirectionAuto() && + slot->CalculateAndAdjustAutoDirectionality(slot)) { SetNeedsStyleRecalc(kLocalStyleChange, StyleChangeReasonForTracing::Create( style_change_reason::kPseudoClass)); + slot->PseudoStateChanged(CSSSelector::kPseudoDir); } - if (RuntimeEnabledFeatures::CSSPseudoDirEnabled()) - element_to_adjust->PseudoStateChanged(CSSSelector::kPseudoDir); - return; + } + // And the values of many text form controls influence dir=auto on + // the control. + if (ShadowRoot* shadow_root = + DynamicTo<ShadowRoot>(element_to_adjust->parentNode())) { + if (TextControlElement* text_control = + ElementIfAutoDirShouldUseValueOrNull(&shadow_root->host())) { + if (text_control->HasDirectionAuto() && + text_control->CalculateAndAdjustAutoDirectionality(text_control)) { + SetNeedsStyleRecalc(kLocalStyleChange, + StyleChangeReasonForTracing::Create( + style_change_reason::kPseudoClass)); + text_control->PseudoStateChanged(CSSSelector::kPseudoDir); + } + } } } } void HTMLElement::AdjustDirectionalityIfNeededAfterShadowRootChanged() { DCHECK(IsShadowHost(this)); + if (RuntimeEnabledFeatures::CSSPseudoDirEnabled()) { + return; + } + if (SelfOrAncestorHasDirAutoAttribute()) { for (auto* element_to_adjust = this; element_to_adjust; element_to_adjust = DynamicTo<HTMLElement>( @@ -2673,8 +2759,29 @@ AttributeModificationReason::kDirectly)); } +void HTMLElement::AdjustDirectionAutoAfterRecalcAssignedNodes() { + if (!RuntimeEnabledFeatures::CSSPseudoDirEnabled()) { + return; + } + + // If the slot has dir=auto, then the resulting directionality may + // have changed. + ChildrenChange fakeChange = { + .type = ChildrenChangeType::kAllChildrenRemoved, + .by_parser = ChildrenChangeSource::kAPI, + .affects_elements = ChildrenChangeAffectsElements::kYes, + }; + AdjustDirectionalityIfNeededAfterChildrenChanged(fakeChange); +} + void HTMLElement::AdjustCandidateDirectionalityForSlot( HeapHashSet<Member<Node>> candidate_set) { + if (RuntimeEnabledFeatures::CSSPseudoDirEnabled()) { + // This code should not be used for the new dir=auto inheritance rules. + CHECK(candidate_set.empty()); + return; + } + HeapHashSet<Member<HTMLElement>> directionality_set; // Transfer a candidate directionality set to |directionality_set| to avoid // the tree walk to the duplicated parent node for the directionality. @@ -3069,53 +3176,187 @@ return layout_object->OffsetParent(this); } -void HTMLElement::UpdateDescendantHasDirAutoAttribute(bool has_dir_auto) { - Node* node = FlatTreeTraversal::FirstChild(*this); - while (node) { - if (auto* element = DynamicTo<Element>(node)) { - AtomicString dir_attribute_value = - element->FastGetAttribute(html_names::kDirAttr); - if (IsValidDirAttribute(dir_attribute_value)) { - node = FlatTreeTraversal::NextSkippingChildren(*node, this); - continue; - } +// Because the self-or-ancestor has dir=auto state could come from either a +// node tree ancestor, a slot, or an input, we have a method to +// recalculate it (just for this element) based on all three sources. +// +// TODO(https://crbug.com/576815): When this code moves to Element, this could +// be a member function. +namespace { - if (auto* slot = ToHTMLSlotElementIfSupportsAssignmentOrNull(node)) { - ShadowRoot* root = slot->ContainingShadowRoot(); - // Defer to adjust the directionality to avoid recalcuating slot - // assignment in FlatTreeTraversal when updating slot. - // Slot and its children will be updated after recalculating children. - if (root->NeedsSlotAssignmentRecalc()) { - root->SetNeedsDirAutoAttributeUpdate(true); - node = FlatTreeTraversal::NextSkippingChildren(*node, this); - continue; - } - } - - if (!has_dir_auto) { - if (!element->SelfOrAncestorHasDirAutoAttribute()) { - node = FlatTreeTraversal::NextSkippingChildren(*node, this); - continue; - } - element->ClearSelfOrAncestorHasDirAutoAttribute(); - } else { - if (element->SelfOrAncestorHasDirAutoAttribute()) { - node = FlatTreeTraversal::NextSkippingChildren(*node, this); - continue; - } - element->SetSelfOrAncestorHasDirAutoAttribute(); +bool RecalcSelfOrAncestorHasDirAuto(Element* element) { + if (DynamicTo<HTMLElement>(element)) { + AtomicString dir_attribute_value = + element->FastGetAttribute(html_names::kDirAttr); + if (IsValidDirAttribute(dir_attribute_value)) { + return EqualIgnoringASCIICase(dir_attribute_value, "auto"); + } + } + Node* parent = element->parentNode(); + if (parent && parent->SelfOrAncestorHasDirAutoAttribute()) { + return true; + } + if (HTMLSlotElement* slot = element->AssignedSlot()) { + if (slot->HasDirectionAuto()) { + return true; + } + } + if (ShadowRoot* shadow_root = DynamicTo<ShadowRoot>(parent)) { + if (TextControlElement* text_element = + ElementIfAutoDirShouldUseValueOrNull(&shadow_root->host())) { + if (text_element->HasDirectionAuto()) { + return true; } } - node = FlatTreeTraversal::Next(*node, this); + } + return false; +} + +} // namespace + +void HTMLElement::UpdateDescendantHasDirAutoAttribute(bool has_dir_auto) { + if (RuntimeEnabledFeatures::CSSPseudoDirEnabled()) { + if (ToHTMLSlotElementIfSupportsAssignmentOrNull(this) || + ElementIfAutoDirShouldUseValueOrNull(this)) { + for (Node& node : FlatTreeTraversal::ChildrenOf(*this)) { + if (HTMLElement* element = DynamicTo<HTMLElement>(node)) { + if (!IsValidDirAttribute( + element->FastGetAttribute(html_names::kDirAttr))) { + if (!has_dir_auto) { + if (!element->SelfOrAncestorHasDirAutoAttribute() || + RecalcSelfOrAncestorHasDirAuto(element)) { + continue; + } + element->ClearSelfOrAncestorHasDirAutoAttribute(); + } else { + if (element->SelfOrAncestorHasDirAutoAttribute()) { + continue; + } + element->SetSelfOrAncestorHasDirAutoAttribute(); + } + element->UpdateDescendantHasDirAutoAttribute(has_dir_auto); + } + } + } + } else { + Element* element = ElementTraversal::FirstChild(*this); + while (element) { + AtomicString dir_attribute_value = + element->FastGetAttribute(html_names::kDirAttr); + if (IsValidDirAttribute(dir_attribute_value)) { + element = ElementTraversal::NextSkippingChildren(*element, this); + continue; + } + + if (!has_dir_auto) { + if (!element->SelfOrAncestorHasDirAutoAttribute() || + RecalcSelfOrAncestorHasDirAuto(element)) { + element = ElementTraversal::NextSkippingChildren(*element, this); + continue; + } + element->ClearSelfOrAncestorHasDirAutoAttribute(); + } else { + if (element->SelfOrAncestorHasDirAutoAttribute()) { + element = ElementTraversal::NextSkippingChildren(*element, this); + continue; + } + element->SetSelfOrAncestorHasDirAutoAttribute(); + } + element = ElementTraversal::Next(*element, this); + } + } + } else { + Node* node = FlatTreeTraversal::FirstChild(*this); + while (node) { + if (auto* element = DynamicTo<Element>(node)) { + AtomicString dir_attribute_value = + element->FastGetAttribute(html_names::kDirAttr); + if (IsValidDirAttribute(dir_attribute_value)) { + node = FlatTreeTraversal::NextSkippingChildren(*node, this); + continue; + } + + if (auto* slot = ToHTMLSlotElementIfSupportsAssignmentOrNull(node)) { + ShadowRoot* root = slot->ContainingShadowRoot(); + // Defer to adjust the directionality to avoid recalcuating slot + // assignment in FlatTreeTraversal when updating slot. + // Slot and its children will be updated after recalculating children. + if (root->NeedsSlotAssignmentRecalc()) { + root->SetNeedsDirAutoAttributeUpdate(true); + node = FlatTreeTraversal::NextSkippingChildren(*node, this); + continue; + } + } + + if (!has_dir_auto) { + if (!element->SelfOrAncestorHasDirAutoAttribute()) { + node = FlatTreeTraversal::NextSkippingChildren(*node, this); + continue; + } + element->ClearSelfOrAncestorHasDirAutoAttribute(); + } else { + if (element->SelfOrAncestorHasDirAutoAttribute()) { + node = FlatTreeTraversal::NextSkippingChildren(*node, this); + continue; + } + element->SetSelfOrAncestorHasDirAutoAttribute(); + } + } + node = FlatTreeTraversal::Next(*node, this); + } } } void HTMLElement::UpdateDirectionalityAndDescendant(TextDirection direction) { - SetCachedDirectionality(direction); - UpdateDescendantDirectionality(direction); + if (!RuntimeEnabledFeatures::CSSPseudoDirEnabled()) { + SetCachedDirectionality(direction); + UpdateDescendantDirectionality(direction); + } else { + // This code applies a direction change to an element and to any elements + // that inherit from it. It should match the code in + // Element::RecomputeDirectionFromParent that determines whether a single + // element should inherit direction and recomputes it if it does. + Element* element = this; + do { + if (element != this && + (ToHTMLSlotElementIfSupportsAssignmentOrNull(element) || + ElementAffectsDirectionality(element) || + element->CachedDirectionality() == direction)) { + element = ElementTraversal::NextSkippingChildren(*element, this); + continue; + } + + element->SetCachedDirectionality(direction); + element->PseudoStateChanged(CSSSelector::kPseudoDir); + + if (ShadowRoot* shadow_root = element->GetShadowRoot()) { + for (Node& child : ElementTraversal::ChildrenOf(*shadow_root)) { + // TODO(https://crbug.com/576815): This should work for + // non-HTML elements too. + if (HTMLElement* child_element = DynamicTo<HTMLElement>(child)) { + if (!ElementAffectsDirectionality(child_element) && + child_element->CachedDirectionality() != direction) { + child_element->UpdateDirectionalityAndDescendant(direction); + } + } + } + if (shadow_root->HasSlotAssignment()) { + for (HTMLSlotElement* slot : + shadow_root->GetSlotAssignment().Slots()) { + if (!ElementAffectsDirectionality(slot) && + slot->CachedDirectionality() != direction) { + slot->UpdateDirectionalityAndDescendant(direction); + } + } + } + } + element = ElementTraversal::Next(*element, this); + } while (element); + } } void HTMLElement::UpdateDescendantDirectionality(TextDirection direction) { + CHECK(!RuntimeEnabledFeatures::CSSPseudoDirEnabled()); Node* node = FlatTreeTraversal::FirstChild(*this); while (node) { if (IsA<HTMLElement>(node)) { @@ -3143,9 +3384,11 @@ void HTMLElement::OnDirAttrChanged(const AttributeModificationParams& params) { // If an ancestor has dir=auto, and this node has the first character, // changes to dir attribute may affect the ancestor. - if (!IsValidDirAttribute(params.old_value) && - !IsValidDirAttribute(params.new_value)) + bool is_old_valid = IsValidDirAttribute(params.old_value); + bool is_new_valid = IsValidDirAttribute(params.new_value); + if (!is_old_valid && !is_new_valid) { return; + } GetDocument().SetHasDirAttribute(); @@ -3159,11 +3402,18 @@ } bool needs_slot_assignment_recalc = false; - auto* parent = - GetParentForDirectionality(*this, needs_slot_assignment_recalc); - if (!is_old_auto || !is_new_auto) { - if (parent && parent->SelfOrAncestorHasDirAutoAttribute()) { - parent->AdjustDirectionalityIfNeededAfterChildAttributeChanged(this); + HTMLElement* parent = nullptr; + if (RuntimeEnabledFeatures::CSSPseudoDirEnabled()) { + parent = DynamicTo<HTMLElement>(parentElement()); + if (is_old_valid != is_new_valid) { + UpdateAncestorWithDirAuto(UpdateAncestorTraversal::ExcludeSelf); + } + } else { + parent = GetParentForDirectionality(*this, needs_slot_assignment_recalc); + if (!is_old_auto || !is_new_auto) { + if (parent && parent->SelfOrAncestorHasDirAutoAttribute()) { + parent->AdjustDirectionalityIfNeededAfterChildAttributeChanged(this); + } } }
diff --git a/third_party/blink/renderer/core/html/html_element.h b/third_party/blink/renderer/core/html/html_element.h index 47f3460..0d1d8695 100644 --- a/third_party/blink/renderer/core/html/html_element.h +++ b/third_party/blink/renderer/core/html/html_element.h
@@ -158,6 +158,8 @@ bool HasDirectionAuto() const; + static bool ElementAffectsDirectionality(const Node* node); + virtual bool IsHTMLBodyElement() const { return false; } // TODO(crbug.com/1123606): Remove this virtual method once the fenced frame // origin trial is over. @@ -215,7 +217,13 @@ void UpdateDescendantDirectionality(TextDirection direction); void UpdateDirectionalityAfterInputTypeChange(const AtomicString& old_value, const AtomicString& new_value); + enum class UpdateAncestorTraversal { + IncludeSelf, // self and ancestors + ExcludeSelf, // ancestors, but not self + }; + void UpdateAncestorWithDirAuto(UpdateAncestorTraversal traversal); void AdjustDirectionalityIfNeededAfterShadowRootChanged(); + void AdjustDirectionAutoAfterRecalcAssignedNodes(); V8UnionBooleanOrStringOrUnrestrictedDouble* hidden() const; void setHidden(const V8UnionBooleanOrStringOrUnrestrictedDouble*);
diff --git a/third_party/blink/renderer/core/imagebitmap/image_bitmap_test.cc b/third_party/blink/renderer/core/imagebitmap/image_bitmap_test.cc index 7dd28a1..601e922 100644 --- a/third_party/blink/renderer/core/imagebitmap/image_bitmap_test.cc +++ b/third_party/blink/renderer/core/imagebitmap/image_bitmap_test.cc
@@ -85,7 +85,7 @@ blink::scheduler::GetSingleThreadTaskRunnerForTesting())); test_context_provider_ = viz::TestContextProvider::Create(); - InitializeSharedGpuContext(test_context_provider_.get()); + InitializeSharedGpuContextGLES2(test_context_provider_.get()); } void TearDown() override {
diff --git a/third_party/blink/renderer/core/layout/layout_object.cc b/third_party/blink/renderer/core/layout/layout_object.cc index 3290b06..bc60d30 100644 --- a/third_party/blink/renderer/core/layout/layout_object.cc +++ b/third_party/blink/renderer/core/layout/layout_object.cc
@@ -4910,7 +4910,7 @@ Vector<PhysicalRect> LayoutObject::CollectOutlineRectsAndAdvance( NGOutlineType outline_type, - FragmentDataIterator& iterator) const { + AccompaniedFragmentIterator& iterator) const { NOT_DESTROYED(); Vector<PhysicalRect> outline_rects; PhysicalOffset paint_offset = iterator.GetFragmentData()->PaintOffset();
diff --git a/third_party/blink/renderer/core/layout/layout_object.h b/third_party/blink/renderer/core/layout/layout_object.h index 52e51338..8dbd4ee 100644 --- a/third_party/blink/renderer/core/layout/layout_object.h +++ b/third_party/blink/renderer/core/layout/layout_object.h
@@ -75,8 +75,8 @@ } namespace blink { +class AccompaniedFragmentIterator; class AffineTransform; -class FragmentDataIterator; class HitTestLocation; class HitTestRequest; class LayoutBlock; @@ -2858,7 +2858,7 @@ // FragmentData (and therefore also next fragmentainer), if any. Vector<PhysicalRect> CollectOutlineRectsAndAdvance( NGOutlineType, - FragmentDataIterator& iterator) const; + AccompaniedFragmentIterator& iterator) const; struct OutlineInfo { int width = 0;
diff --git a/third_party/blink/renderer/core/layout/layout_tree_as_text.cc b/third_party/blink/renderer/core/layout/layout_tree_as_text.cc index 0c0578bd..bd1d5b9 100644 --- a/third_party/blink/renderer/core/layout/layout_tree_as_text.cc +++ b/third_party/blink/renderer/core/layout/layout_tree_as_text.cc
@@ -55,6 +55,7 @@ #include "third_party/blink/renderer/core/layout/svg/layout_svg_shape.h" #include "third_party/blink/renderer/core/layout/svg/svg_layout_tree_as_text.h" #include "third_party/blink/renderer/core/page/print_context.h" +#include "third_party/blink/renderer/core/paint/fragment_data_iterator.h" #include "third_party/blink/renderer/core/paint/paint_layer.h" #include "third_party/blink/renderer/core/paint/paint_layer_paint_order_iterator.h" #include "third_party/blink/renderer/core/paint/paint_layer_scrollable_area.h" @@ -343,22 +344,20 @@ ts << "fragments:\n"; } int fragment_index = 0; - for (const auto* fragment = &o.FirstFragment(); fragment; - fragment = fragment->NextFragment(), ++fragment_index) { + for (const FragmentData& fragment : FragmentDataIterator(o)) { WriteIndent(ts, indent); if (has_fragments) - ts << " " << fragment_index << ":"; - ts << " paint_offset=(" << fragment->PaintOffset().ToString() << ")"; - if (fragment->HasLocalBorderBoxProperties()) { + ts << " " << fragment_index++ << ":"; + ts << " paint_offset=(" << fragment.PaintOffset().ToString() << ")"; + if (fragment.HasLocalBorderBoxProperties()) { // To know where they point into the paint property tree, you can dump // the tree using ShowAllPropertyTrees(frame_view). - ts << " state=(" << fragment->LocalBorderBoxProperties().ToString() - << ")"; + ts << " state=(" << fragment.LocalBorderBoxProperties().ToString() << ")"; } if (o.HasLayer()) { - ts << " cull_rect=(" << fragment->GetCullRect().ToString() + ts << " cull_rect=(" << fragment.GetCullRect().ToString() << ") contents_cull_rect=(" - << fragment->GetContentsCullRect().ToString() << ")"; + << fragment.GetContentsCullRect().ToString() << ")"; } ts << "\n"; }
diff --git a/third_party/blink/renderer/core/messaging/blink_transferable_message_mojom_traits_test.cc b/third_party/blink/renderer/core/messaging/blink_transferable_message_mojom_traits_test.cc index efbd24d..4307939 100644 --- a/third_party/blink/renderer/core/messaging/blink_transferable_message_mojom_traits_test.cc +++ b/third_party/blink/renderer/core/messaging/blink_transferable_message_mojom_traits_test.cc
@@ -219,7 +219,7 @@ auto sii = std::make_unique<viz::TestSharedImageInterface>(); sii_ = sii.get(); context_provider_ = viz::TestContextProvider::Create(std::move(sii)); - InitializeSharedGpuContext(context_provider_.get()); + InitializeSharedGpuContextGLES2(context_provider_.get()); } void TearDown() override {
diff --git a/third_party/blink/renderer/core/page/print_context_test.cc b/third_party/blink/renderer/core/page/print_context_test.cc index 3f279e2..1c9dbc5 100644 --- a/third_party/blink/renderer/core/page/print_context_test.cc +++ b/third_party/blink/renderer/core/page/print_context_test.cc
@@ -969,7 +969,7 @@ accelerated_canvas_scope_ = std::make_unique<ScopedAccelerated2dCanvasForTest>(true); test_context_provider_ = viz::TestContextProvider::Create(); - InitializeSharedGpuContext(test_context_provider_.get()); + InitializeSharedGpuContextGLES2(test_context_provider_.get()); PrintContextTest::SetUp(); @@ -1032,7 +1032,7 @@ /*shared_image_interface=*/nullptr, /*support_locking=*/false); - InitializeSharedGpuContext(test_context_provider_.get()); + InitializeSharedGpuContextGLES2(test_context_provider_.get()); PrintContextTest::SetUp();
diff --git a/third_party/blink/renderer/core/paint/cull_rect_updater.cc b/third_party/blink/renderer/core/paint/cull_rect_updater.cc index b8e0d6d..2b27a319 100644 --- a/third_party/blink/renderer/core/paint/cull_rect_updater.cc +++ b/third_party/blink/renderer/core/paint/cull_rect_updater.cc
@@ -10,6 +10,7 @@ #include "third_party/blink/renderer/core/layout/layout_embedded_content.h" #include "third_party/blink/renderer/core/layout/layout_view.h" #include "third_party/blink/renderer/core/layout/ng/ng_physical_box_fragment.h" +#include "third_party/blink/renderer/core/paint/fragment_data_iterator.h" #include "third_party/blink/renderer/core/paint/object_paint_properties.h" #include "third_party/blink/renderer/core/paint/paint_layer.h" #include "third_party/blink/renderer/core/paint/paint_layer_paint_order_iterator.h" @@ -272,8 +273,7 @@ } if (!context.current.subtree_is_out_of_cull_rect && - object.ShouldClipOverflowAlongBothAxis() && - !object.FirstFragment().NextFragment()) { + object.ShouldClipOverflowAlongBothAxis() && !object.IsFragmented()) { const auto* box = layer.GetLayoutBox(); DCHECK(box); PhysicalRect clip_rect = @@ -346,10 +346,7 @@ } bool CullRectUpdater::UpdateForSelf(Context& context, PaintLayer& layer) { - const auto& first_parent_fragment = - context.current.container->GetLayoutObject().FirstFragment(); - auto& first_fragment = - layer.GetLayoutObject().GetMutableForPainting().FirstFragment(); + const auto& parent_object = context.current.container->GetLayoutObject(); // If the containing layer is fragmented, try to match fragments from the // container to |layer|, so that any fragment clip for // |context.current.container|'s fragment matches |layer|'s. @@ -358,7 +355,7 @@ // correctly here. In order to fix that, we most likely need to move over to // some sort of fragment tree traversal (rather than pure PaintLayer tree // traversal). - bool should_match_fragments = first_parent_fragment.NextFragment(); + bool should_match_fragments = parent_object.IsFragmented(); bool force_update_children = false; bool should_use_infinite_cull_rect = !context.current.subtree_is_out_of_cull_rect && @@ -366,8 +363,8 @@ layer, view_transition_supplement_, context.current.subtree_should_use_infinite_cull_rect); - for (auto* fragment = &first_fragment; fragment; - fragment = fragment->NextFragment()) { + for (FragmentData& fragment : + MutableFragmentDataIterator(layer.GetLayoutObject())) { CullRect cull_rect; CullRect contents_cull_rect; if (context.current.subtree_is_out_of_cull_rect) { @@ -378,13 +375,15 @@ const FragmentData* parent_fragment = nullptr; if (!should_use_infinite_cull_rect) { if (should_match_fragments) { - for (parent_fragment = &first_parent_fragment; parent_fragment; - parent_fragment = parent_fragment->NextFragment()) { - if (parent_fragment->FragmentID() == fragment->FragmentID()) + for (const FragmentData& walker : + FragmentDataIterator(parent_object)) { + parent_fragment = &walker; + if (parent_fragment->FragmentID() == fragment.FragmentID()) { break; + } } } else { - parent_fragment = &first_parent_fragment; + parent_fragment = &parent_object.FirstFragment(); } } @@ -392,16 +391,16 @@ cull_rect = CullRect::Infinite(); contents_cull_rect = CullRect::Infinite(); } else { - cull_rect = ComputeFragmentCullRect(context, layer, *fragment, - *parent_fragment); + cull_rect = + ComputeFragmentCullRect(context, layer, fragment, *parent_fragment); contents_cull_rect = ComputeFragmentContentsCullRect( - context, layer, *fragment, cull_rect); + context, layer, fragment, cull_rect); } } - SetFragmentCullRect(layer, *fragment, cull_rect); + SetFragmentCullRect(layer, fragment, cull_rect); force_update_children |= - SetFragmentContentsCullRect(layer, *fragment, contents_cull_rect); + SetFragmentContentsCullRect(layer, fragment, contents_cull_rect); } return force_update_children;
diff --git a/third_party/blink/renderer/core/paint/fragment_data_iterator.cc b/third_party/blink/renderer/core/paint/fragment_data_iterator.cc index ce4d79df..dbf773e9 100644 --- a/third_party/blink/renderer/core/paint/fragment_data_iterator.cc +++ b/third_party/blink/renderer/core/paint/fragment_data_iterator.cc
@@ -11,8 +11,9 @@ namespace blink { -FragmentDataIterator::FragmentDataIterator(const LayoutObject& object) { - fragment_data_ = &object.FirstFragment(); +AccompaniedFragmentIterator::AccompaniedFragmentIterator( + const LayoutObject& object) + : FragmentDataIterator(object) { if (const auto* box = DynamicTo<LayoutBox>(&object)) { if (box->IsLayoutNGObject()) ng_layout_box_ = box; @@ -25,14 +26,14 @@ } } -const NGPhysicalBoxFragment* FragmentDataIterator::GetPhysicalBoxFragment() - const { +const NGPhysicalBoxFragment* +AccompaniedFragmentIterator::GetPhysicalBoxFragment() const { if (ng_layout_box_) return ng_layout_box_->GetPhysicalFragment(box_fragment_index_); return nullptr; } -bool FragmentDataIterator::Advance() { +bool AccompaniedFragmentIterator::Advance() { if (!fragment_data_) return false; @@ -46,7 +47,8 @@ return true; } - fragment_data_ = fragment_data_->NextFragment(); + FragmentDataIterator::Advance(); + if (!fragment_data_) { #if DCHECK_IS_ON() // We're done, since there are no more FragmentData entries. Assert that @@ -58,6 +60,7 @@ box_fragment_index_ + 1); } #endif + ng_layout_box_ = nullptr; return false; }
diff --git a/third_party/blink/renderer/core/paint/fragment_data_iterator.h b/third_party/blink/renderer/core/paint/fragment_data_iterator.h index a370e6d..c42fba8 100644 --- a/third_party/blink/renderer/core/paint/fragment_data_iterator.h +++ b/third_party/blink/renderer/core/paint/fragment_data_iterator.h
@@ -7,6 +7,7 @@ #include "third_party/abseil-cpp/absl/types/optional.h" #include "third_party/blink/renderer/core/layout/ng/inline/ng_inline_cursor.h" +#include "third_party/blink/renderer/core/paint/fragment_data.h" namespace blink { @@ -14,17 +15,72 @@ class LayoutObject; class NGPhysicalBoxFragment; -// FragmentData iterator, accompanied by "corresponding" NG layout structures. -// For LayoutBox, this means NGPhysicalBoxFragment. For non-atomic inlines, it -// means NGInlineCursor. -class FragmentDataIterator { +template <typename Iterator, typename Data> +class FragmentDataIteratorBase { STACK_ALLOCATED(); public: - explicit FragmentDataIterator(const LayoutObject&); + explicit FragmentDataIteratorBase(Data* data) : fragment_data_(data) {} + + Data* GetFragmentData() const { return fragment_data_; } + bool Advance() { + if (fragment_data_) { + fragment_data_ = fragment_data_->NextFragment(); + } + return !!fragment_data_; + } + bool IsDone() const { return !fragment_data_; } + + Iterator& begin() { return *static_cast<Iterator*>(this); } + Iterator end() { return Iterator(nullptr); } + bool operator!=(const Iterator& other) { + return fragment_data_ != other.fragment_data_; + } + Data& operator*() const { return *fragment_data_; } + Iterator& operator++() { + Advance(); + return *static_cast<Iterator*>(this); + } + + protected: + Data* fragment_data_; +}; + +class FragmentDataIterator + : public FragmentDataIteratorBase<FragmentDataIterator, + const FragmentData> { + public: + explicit FragmentDataIterator(const LayoutObject& object) + : FragmentDataIteratorBase(&object.FirstFragment()) {} + explicit FragmentDataIterator(nullptr_t) + : FragmentDataIteratorBase(nullptr) {} +}; + +class MutableFragmentDataIterator + : public FragmentDataIteratorBase<MutableFragmentDataIterator, + FragmentData> { + public: + explicit MutableFragmentDataIterator(const LayoutObject& object) + : FragmentDataIteratorBase( + &object.GetMutableForPainting().FirstFragment()) {} + explicit MutableFragmentDataIterator(nullptr_t) + : FragmentDataIteratorBase(nullptr) {} +}; + +// FragmentData iterator, accompanied by "corresponding" NG layout structures. +// For LayoutBox, this means NGPhysicalBoxFragment. For non-atomic inlines, it +// means NGInlineCursor. For non-atomic inlines, this also means that Advance() +// will stop for each line on which the LayoutObject is represented. There may +// be multiple lines per FragmentData (whereas there's just one FragmentData per +// fragmentainer), meaning that Advance() may stop several times at the same +// FragmentData while progressing through the lines. +class AccompaniedFragmentIterator : public FragmentDataIterator { + STACK_ALLOCATED(); + + public: + explicit AccompaniedFragmentIterator(const LayoutObject&); const NGInlineCursor* Cursor() { return cursor_ ? &(*cursor_) : nullptr; } - const FragmentData* GetFragmentData() const { return fragment_data_; } const NGPhysicalBoxFragment* GetPhysicalBoxFragment() const; // Advance the iterator. For LayoutBox fragments this also means that we're @@ -34,12 +90,9 @@ // fragmentainer, for instance). bool Advance(); - bool IsDone() const { return !fragment_data_; } - private: absl::optional<NGInlineCursor> cursor_; const LayoutBox* ng_layout_box_ = nullptr; - const FragmentData* fragment_data_; wtf_size_t box_fragment_index_ = 0u; };
diff --git a/third_party/blink/renderer/core/paint/html_canvas_painter_test.cc b/third_party/blink/renderer/core/paint/html_canvas_painter_test.cc index 6da60958..0856c933 100644 --- a/third_party/blink/renderer/core/paint/html_canvas_painter_test.cc +++ b/third_party/blink/renderer/core/paint/html_canvas_painter_test.cc
@@ -31,7 +31,7 @@ protected: void SetUp() override { test_context_provider_ = viz::TestContextProvider::Create(); - InitializeSharedGpuContext(test_context_provider_.get()); + InitializeSharedGpuContextGLES2(test_context_provider_.get()); PaintControllerPaintTestBase::SetUp(); }
diff --git a/third_party/blink/renderer/core/paint/link_highlight_impl.cc b/third_party/blink/renderer/core/paint/link_highlight_impl.cc index 23d68e6c..cf00014 100644 --- a/third_party/blink/renderer/core/paint/link_highlight_impl.cc +++ b/third_party/blink/renderer/core/paint/link_highlight_impl.cc
@@ -304,7 +304,8 @@ !object->IsFragmented(); wtf_size_t index = 0; - for (FragmentDataIterator iterator(*object); !iterator.IsDone(); index++) { + for (AccompaniedFragmentIterator iterator(*object); !iterator.IsDone(); + index++) { const auto* fragment = iterator.GetFragmentData(); ScopedDisplayItemFragment scoped_fragment(context, fragment->FragmentID()); Vector<PhysicalRect> rects = object->CollectOutlineRectsAndAdvance(
diff --git a/third_party/blink/renderer/core/paint/link_highlight_impl_test.cc b/third_party/blink/renderer/core/paint/link_highlight_impl_test.cc index 111a6a4..3e1f2b4 100644 --- a/third_party/blink/renderer/core/paint/link_highlight_impl_test.cc +++ b/third_party/blink/renderer/core/paint/link_highlight_impl_test.cc
@@ -45,6 +45,7 @@ #include "third_party/blink/renderer/core/layout/layout_object.h" #include "third_party/blink/renderer/core/page/link_highlight.h" #include "third_party/blink/renderer/core/page/page.h" +#include "third_party/blink/renderer/core/paint/fragment_data_iterator.h" #include "third_party/blink/renderer/platform/bindings/exception_state.h" #include "third_party/blink/renderer/platform/graphics/compositing/paint_artifact_compositor.h" #include "third_party/blink/renderer/platform/heap/thread_state.h" @@ -343,10 +344,12 @@ EXPECT_EQ(effect.GetCompositorElementId(), highlight->ElementIdForTesting()); EXPECT_TRUE(effect.HasActiveOpacityAnimation()); - const auto& first_fragment = touch_node->GetLayoutObject()->FirstFragment(); - const auto* second_fragment = first_fragment.NextFragment(); + FragmentDataIterator iterator1(*touch_node->GetLayoutObject()); + const auto* first_fragment = iterator1.GetFragmentData(); + iterator1.Advance(); + const auto* second_fragment = iterator1.GetFragmentData(); ASSERT_TRUE(second_fragment); - EXPECT_FALSE(second_fragment->NextFragment()); + EXPECT_FALSE(iterator1.Advance()); auto check_layer = [&](const cc::PictureLayer* layer) { ASSERT_TRUE(layer); @@ -371,12 +374,15 @@ // Make multicol shorter to create 3 total columns for touch_node. multicol->setAttribute(html_names::kStyleAttr, AtomicString("height: 25px")); UpdateAllLifecyclePhases(); - ASSERT_EQ(&first_fragment, &touch_node->GetLayoutObject()->FirstFragment()); - second_fragment = first_fragment.NextFragment(); + ASSERT_EQ(first_fragment, &touch_node->GetLayoutObject()->FirstFragment()); + FragmentDataIterator iterator2(*touch_node->GetLayoutObject()); + iterator2.Advance(); + second_fragment = iterator2.GetFragmentData(); ASSERT_TRUE(second_fragment); - const auto* third_fragment = second_fragment->NextFragment(); + iterator2.Advance(); + const auto* third_fragment = iterator2.GetFragmentData(); ASSERT_TRUE(third_fragment); - EXPECT_FALSE(third_fragment->NextFragment()); + EXPECT_FALSE(iterator2.Advance()); EXPECT_EQ(layer_count_before_highlight + 3, LayerCount()); EXPECT_EQ(3u, highlight->FragmentCountForTesting()); @@ -387,8 +393,9 @@ // Make multicol taller to create only 1 column for touch_node. multicol->setAttribute(html_names::kStyleAttr, AtomicString("height: 100px")); UpdateAllLifecyclePhases(); - ASSERT_EQ(&first_fragment, &touch_node->GetLayoutObject()->FirstFragment()); - EXPECT_FALSE(first_fragment.NextFragment()); + ASSERT_EQ(first_fragment, &touch_node->GetLayoutObject()->FirstFragment()); + FragmentDataIterator iterator3(*touch_node->GetLayoutObject()); + EXPECT_FALSE(iterator3.Advance()); EXPECT_EQ(layer_count_before_highlight + 1, LayerCount()); EXPECT_EQ(1u, highlight->FragmentCountForTesting());
diff --git a/third_party/blink/renderer/core/paint/ng/ng_box_fragment_painter.cc b/third_party/blink/renderer/core/paint/ng/ng_box_fragment_painter.cc index 16c7549..87a2264 100644 --- a/third_party/blink/renderer/core/paint/ng/ng_box_fragment_painter.cc +++ b/third_party/blink/renderer/core/paint/ng/ng_box_fragment_painter.cc
@@ -1795,7 +1795,6 @@ bool object_has_multiple_boxes) { PaintInfo mask_paint_info(paint_info.context, CullRect(mask_rect), PaintPhase::kTextClip); - mask_paint_info.SetFragmentID(paint_info.FragmentID()); if (!object_has_multiple_boxes) { PaintObject(mask_paint_info, paint_offset); return;
diff --git a/third_party/blink/renderer/core/paint/paint_info.h b/third_party/blink/renderer/core/paint/paint_info.h index 22dfed5..9934225 100644 --- a/third_party/blink/renderer/core/paint/paint_info.h +++ b/third_party/blink/renderer/core/paint/paint_info.h
@@ -136,7 +136,6 @@ return FragmentToPaint(*fragment.GetLayoutObject()); } - wtf_size_t FragmentID() const { return fragment_id_; } void SetFragmentID(wtf_size_t id) { fragment_id_ = id; } void SetIsInFragmentTraversal() { fragment_id_ = WTF::kNotFound; }
diff --git a/third_party/blink/renderer/core/paint/paint_layer.cc b/third_party/blink/renderer/core/paint/paint_layer.cc index 3fddc086..1059e1a 100644 --- a/third_party/blink/renderer/core/paint/paint_layer.cc +++ b/third_party/blink/renderer/core/paint/paint_layer.cc
@@ -83,6 +83,7 @@ #include "third_party/blink/renderer/core/paint/compositing/compositing_reason_finder.h" #include "third_party/blink/renderer/core/paint/cull_rect_updater.h" #include "third_party/blink/renderer/core/paint/filter_effect_builder.h" +#include "third_party/blink/renderer/core/paint/fragment_data_iterator.h" #include "third_party/blink/renderer/core/paint/hit_testing_transform_state.h" #include "third_party/blink/renderer/core/paint/ng/ng_box_fragment_painter.h" #include "third_party/blink/renderer/core/paint/object_paint_invalidator.h" @@ -946,7 +947,6 @@ ShouldRespectOverflowClipType respect_overflow_clip, const FragmentData* root_fragment_arg) const { PaintLayerFragment fragment; - const auto& first_fragment_data = GetLayoutObject().FirstFragment(); const auto& first_root_fragment_data = root_layer->GetLayoutObject().FirstFragment(); @@ -962,8 +962,9 @@ // The inherited offset_from_root does not include any pagination offsets. // In the presence of fragmentation, we cannot use it. wtf_size_t physical_fragment_idx = 0u; - for (auto* fragment_data = &first_fragment_data; fragment_data; - fragment_data = fragment_data->NextFragment(), physical_fragment_idx++) { + for (FragmentDataIterator iterator(GetLayoutObject()); !iterator.IsDone(); + ++iterator, physical_fragment_idx++) { + const FragmentData* fragment_data = iterator.GetFragmentData(); const FragmentData* root_fragment_data = nullptr; if (root_fragment_arg) { DCHECK(this != root_layer); @@ -1353,14 +1354,15 @@ DCHECK(!Preserves3D()); // We need transform state for the first time, or to offset the container // state, so create it here. + FragmentDataIterator iterator(layout_object); const FragmentData* local_fragment_for_transform_state = - &layout_object.FirstFragment(); + iterator.GetFragmentData(); const FragmentData* container_fragment_for_transform_state; if (container_fragment_data) { container_fragment_for_transform_state = container_fragment_data; const auto& container_transform = container_fragment_data->ContentsProperties().Transform(); - while (local_fragment_for_transform_state) { + while (!iterator.IsDone()) { // Find the first local fragment that is a descendant of // container_fragment. if (container_transform.IsAncestorOf( @@ -1368,8 +1370,8 @@ .Transform())) { break; } - local_fragment_for_transform_state = - local_fragment_for_transform_state->NextFragment(); + ++iterator; + local_fragment_for_transform_state = iterator.GetFragmentData(); } if (!local_fragment_for_transform_state) return nullptr;
diff --git a/third_party/blink/renderer/core/paint/paint_layer_clipper_test.cc b/third_party/blink/renderer/core/paint/paint_layer_clipper_test.cc index efc438e..d653c5bfb 100644 --- a/third_party/blink/renderer/core/paint/paint_layer_clipper_test.cc +++ b/third_party/blink/renderer/core/paint/paint_layer_clipper_test.cc
@@ -8,6 +8,7 @@ #include "third_party/blink/renderer/core/frame/local_dom_window.h" #include "third_party/blink/renderer/core/layout/layout_box_model_object.h" #include "third_party/blink/renderer/core/layout/layout_view.h" +#include "third_party/blink/renderer/core/paint/fragment_data_iterator.h" #include "third_party/blink/renderer/core/paint/paint_layer.h" #include "third_party/blink/renderer/core/testing/core_unit_test_helper.h" #include "third_party/blink/renderer/platform/testing/unit_test_helpers.h" @@ -508,12 +509,10 @@ ClipRect background_rect, foreground_rect; PaintLayer* target_paint_layer = GetPaintLayerByElementId("target"); - EXPECT_TRUE( - target_paint_layer->GetLayoutObject().FirstFragment().NextFragment()); - EXPECT_FALSE(target_paint_layer->GetLayoutObject() - .FirstFragment() - .NextFragment() - ->NextFragment()); + FragmentDataIterator iterator(target_paint_layer->GetLayoutObject()); + ASSERT_TRUE(iterator.Advance()); + const FragmentData* second_fragment = iterator.GetFragmentData(); + EXPECT_FALSE(iterator.Advance()); target_paint_layer->Clipper().CalculateRects( context, target_paint_layer->GetLayoutObject().FirstFragment(), @@ -523,10 +522,9 @@ EXPECT_TRUE(foreground_rect.IsInfinite()); EXPECT_EQ(PhysicalOffset(), layer_offset); - target_paint_layer->Clipper().CalculateRects( - context, - *target_paint_layer->GetLayoutObject().FirstFragment().NextFragment(), - layer_offset, background_rect, foreground_rect); + target_paint_layer->Clipper().CalculateRects(context, *second_fragment, + layer_offset, background_rect, + foreground_rect); EXPECT_TRUE(background_rect.IsInfinite()); EXPECT_TRUE(foreground_rect.IsInfinite());
diff --git a/third_party/blink/renderer/core/paint/paint_layer_painter.cc b/third_party/blink/renderer/core/paint/paint_layer_painter.cc index 9d9099161..0dc8bed 100644 --- a/third_party/blink/renderer/core/paint/paint_layer_painter.cc +++ b/third_party/blink/renderer/core/paint/paint_layer_painter.cc
@@ -14,6 +14,7 @@ #include "third_party/blink/renderer/core/layout/layout_view.h" #include "third_party/blink/renderer/core/layout/ng/ng_fragmentation_utils.h" #include "third_party/blink/renderer/core/paint/clip_path_clipper.h" +#include "third_party/blink/renderer/core/paint/fragment_data_iterator.h" #include "third_party/blink/renderer/core/paint/ng/ng_box_fragment_painter.h" #include "third_party/blink/renderer/core/paint/object_paint_properties.h" #include "third_party/blink/renderer/core/paint/paint_info.h" @@ -405,8 +406,8 @@ layout_box_with_fragments || CanPaintMultipleFragments(paint_layer_.GetLayoutObject()); - for (const auto* fragment = &paint_layer_.GetLayoutObject().FirstFragment(); - fragment; fragment = fragment->NextFragment(), ++fragment_idx) { + for (const FragmentData& fragment : + FragmentDataIterator(paint_layer_.GetLayoutObject())) { const NGPhysicalBoxFragment* physical_fragment = nullptr; if (layout_box_with_fragments) { physical_fragment = @@ -418,11 +419,13 @@ if (fragment_idx) scoped_display_item_fragment.emplace(context, fragment_idx); - PaintFragmentWithPhase(phase, *fragment, physical_fragment, context, + PaintFragmentWithPhase(phase, fragment, physical_fragment, context, paint_flags); if (!multiple_fragments_allowed) break; + + fragment_idx++; } }
diff --git a/third_party/blink/renderer/core/paint/paint_property_tree_builder_test.cc b/third_party/blink/renderer/core/paint/paint_property_tree_builder_test.cc index 0d2f069c..0def6f8 100644 --- a/third_party/blink/renderer/core/paint/paint_property_tree_builder_test.cc +++ b/third_party/blink/renderer/core/paint/paint_property_tree_builder_test.cc
@@ -18,6 +18,7 @@ #include "third_party/blink/renderer/core/layout/layout_tree_as_text.h" #include "third_party/blink/renderer/core/layout/ng/ng_physical_box_fragment.h" #include "third_party/blink/renderer/core/layout/svg/layout_svg_root.h" +#include "third_party/blink/renderer/core/paint/fragment_data_iterator.h" #include "third_party/blink/renderer/core/paint/object_paint_properties.h" #include "third_party/blink/renderer/core/paint/paint_property_tree_printer.h" #include "third_party/blink/renderer/platform/graphics/compositing/paint_artifact_compositor.h" @@ -5536,11 +5537,13 @@ PaintPropertiesForElement("container")->PaintOffsetTranslation()); const auto* content = GetLayoutObjectByElementId("content"); - const auto& first_fragment = content->FirstFragment(); - const auto* second_fragment = first_fragment.NextFragment(); + FragmentDataIterator iterator(*content); + const auto* first_fragment = iterator.GetFragmentData(); + ASSERT_TRUE(iterator.Advance()); + const auto* second_fragment = iterator.GetFragmentData(); ASSERT_NE(nullptr, second_fragment); - EXPECT_EQ(PhysicalOffset(), first_fragment.PaintOffset()); + EXPECT_EQ(PhysicalOffset(), first_fragment->PaintOffset()); EXPECT_EQ(PhysicalOffset(390, 0), second_fragment->PaintOffset()); }
diff --git a/third_party/blink/renderer/core/paint/paint_property_tree_printer.cc b/third_party/blink/renderer/core/paint/paint_property_tree_printer.cc index 36a7ce1..6495d06 100644 --- a/third_party/blink/renderer/core/paint/paint_property_tree_printer.cc +++ b/third_party/blink/renderer/core/paint/paint_property_tree_printer.cc
@@ -12,6 +12,7 @@ #include "third_party/blink/renderer/core/layout/layout_object.h" #include "third_party/blink/renderer/core/layout/layout_view.h" #include "third_party/blink/renderer/core/page/page.h" +#include "third_party/blink/renderer/core/paint/fragment_data_iterator.h" #include "third_party/blink/renderer/core/paint/object_paint_properties.h" #include "third_party/blink/renderer/core/view_transition/view_transition.h" #include "third_party/blink/renderer/core/view_transition/view_transition_utils.h" @@ -58,10 +59,10 @@ void CollectNodes(const LayoutObject& object) { Traits::AddViewTransitionProperties(object, *this); - for (const auto* fragment = &object.FirstFragment(); fragment; - fragment = fragment->NextFragment()) { - if (const auto* properties = fragment->PaintProperties()) + for (const FragmentData& fragment : FragmentDataIterator(object)) { + if (const auto* properties = fragment.PaintProperties()) { Traits::AddObjectPaintProperties(*properties, *this); + } } for (const auto* child = object.SlowFirstChild(); child; child = child->NextSibling()) {
diff --git a/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d_test.cc b/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d_test.cc index cf0f0938..f226c3f 100644 --- a/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d_test.cc +++ b/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d_test.cc
@@ -263,7 +263,7 @@ auto_flush_params); test_context_provider_ = CreateContextProvider(); - InitializeSharedGpuContext(test_context_provider_.get()); + InitializeSharedGpuContextGLES2(test_context_provider_.get()); allow_accelerated_ = std::make_unique<ScopedAccelerated2dCanvasForTest>(AllowsAcceleration()); web_view_helper_ = std::make_unique<frame_test_helpers::WebViewHelper>();
diff --git a/third_party/blink/renderer/modules/canvas/htmlcanvas/html_canvas_element_module_test.cc b/third_party/blink/renderer/modules/canvas/htmlcanvas/html_canvas_element_module_test.cc index 3231656..2289028 100644 --- a/third_party/blink/renderer/modules/canvas/htmlcanvas/html_canvas_element_module_test.cc +++ b/third_party/blink/renderer/modules/canvas/htmlcanvas/html_canvas_element_module_test.cc
@@ -116,7 +116,7 @@ context_provider->UnboundTestContextGL() ->set_supports_gpu_memory_buffer_format(buffer_format, true); - InitializeSharedGpuContext(context_provider.get()); + InitializeSharedGpuContextGLES2(context_provider.get()); // To intercept SubmitCompositorFrame/SubmitCompositorFrameSync messages sent // by a canvas's CanvasResourceDispatcher, we have to override the Mojo
diff --git a/third_party/blink/renderer/modules/cookie_deprecation_label/cookie_deprecation_label.cc b/third_party/blink/renderer/modules/cookie_deprecation_label/cookie_deprecation_label.cc index b5773d2..a69a5ac 100644 --- a/third_party/blink/renderer/modules/cookie_deprecation_label/cookie_deprecation_label.cc +++ b/third_party/blink/renderer/modules/cookie_deprecation_label/cookie_deprecation_label.cc
@@ -68,7 +68,7 @@ // The label will be null if cookie deprecation label is not allowed // for the profile. if (label.IsNull()) { - resolver->Reject(); + resolver->Resolve(String()); } else { resolver->Resolve(label); }
diff --git a/third_party/blink/renderer/modules/file_system_access/file_system_underlying_sink.cc b/third_party/blink/renderer/modules/file_system_access/file_system_underlying_sink.cc index f1ab9be..44ed944 100644 --- a/third_party/blink/renderer/modules/file_system_access/file_system_underlying_sink.cc +++ b/third_party/blink/renderer/modules/file_system_access/file_system_underlying_sink.cc
@@ -471,27 +471,41 @@ mojom::blink::FileSystemAccessErrorPtr result, uint64_t bytes_written) { DCHECK(pending_operation_); - file_system_access_error::ResolveOrReject(pending_operation_, *result); - pending_operation_ = nullptr; if (result->status == mojom::blink::FileSystemAccessStatus::kOk) { // Advance offset. offset_ += bytes_written; + + pending_operation_->Resolve(); + } else { + // An error of any kind puts the underlying stream into an unrecoverable + // error state. See https://crbug.com/1380650#c5. Close the mojo pipe to + // clean up resources held by the browser process - including the file lock. + writer_remote_.reset(); + file_system_access_error::Reject(pending_operation_, *result); } + pending_operation_ = nullptr; } void FileSystemUnderlyingSink::TruncateComplete( uint64_t to_size, mojom::blink::FileSystemAccessErrorPtr result) { DCHECK(pending_operation_); - file_system_access_error::ResolveOrReject(pending_operation_, *result); - pending_operation_ = nullptr; if (result->status == mojom::blink::FileSystemAccessStatus::kOk) { // Set offset to smallest last set size so that a subsequent write is not // out of bounds. offset_ = to_size < offset_ ? to_size : offset_; + + pending_operation_->Resolve(); + } else { + // An error of any kind puts the underlying stream into an unrecoverable + // error state. See https://crbug.com/1380650#c5. Close the mojo pipe to + // clean up resources held by the browser process - including the file lock. + writer_remote_.reset(); + file_system_access_error::Reject(pending_operation_, *result); } + pending_operation_ = nullptr; } void FileSystemUnderlyingSink::CloseComplete(
diff --git a/third_party/blink/renderer/modules/webaudio/README.md b/third_party/blink/renderer/modules/webaudio/README.md new file mode 100644 index 0000000..8e50d45 --- /dev/null +++ b/third_party/blink/renderer/modules/webaudio/README.md
@@ -0,0 +1,5 @@ +# Web Audio API + +This directory contains the implementation of +https://webaudio.github.io/web-audio-api/, which is a high-level Web API for +processing and synthesizing audio in web applications.
diff --git a/third_party/blink/renderer/modules/webcodecs/video_frame_test.cc b/third_party/blink/renderer/modules/webcodecs/video_frame_test.cc index fe359b1..4e0ad26 100644 --- a/third_party/blink/renderer/modules/webcodecs/video_frame_test.cc +++ b/third_party/blink/renderer/modules/webcodecs/video_frame_test.cc
@@ -43,7 +43,7 @@ public: void SetUp() override { test_context_provider_ = viz::TestContextProvider::Create(); - InitializeSharedGpuContext(test_context_provider_.get()); + InitializeSharedGpuContextGLES2(test_context_provider_.get()); } void TearDown() override { SharedGpuContext::ResetForTesting(); }
diff --git a/third_party/blink/renderer/modules/webmidi/README.md b/third_party/blink/renderer/modules/webmidi/README.md new file mode 100644 index 0000000..bb13b3b --- /dev/null +++ b/third_party/blink/renderer/modules/webmidi/README.md
@@ -0,0 +1,6 @@ +# Web MIDI API + +This directory contains the implementation of +https://webaudio.github.io/web-midi-api/, which is an API supporting the MIDI +protocol, enabling web applications to enumerate and select MIDI input and +output devices on the client system and send and receive MIDI messages.
diff --git a/third_party/blink/renderer/platform/BUILD.gn b/third_party/blink/renderer/platform/BUILD.gn index 20f669fe6..ddfefe32 100644 --- a/third_party/blink/renderer/platform/BUILD.gn +++ b/third_party/blink/renderer/platform/BUILD.gn
@@ -1149,6 +1149,8 @@ "graphics/replaying_canvas.h", "graphics/resource_id_traits.h", "graphics/scoped_interpolation_quality.h", + "graphics/scoped_raster_timer.cc", + "graphics/scoped_raster_timer.h", "graphics/scrollbar_theme_settings.cc", "graphics/scrollbar_theme_settings.h", "graphics/skia/sk_image_info_hash.h", @@ -2693,6 +2695,7 @@ "graphics/image_frame_generator_test.cc", "graphics/offscreen_canvas_placeholder_test.cc", "graphics/paint_worklet_paint_dispatcher_test.cc", + "graphics/scoped_raster_timer_test.cc", "graphics/test/stub_image.h", # Tests migrated from the web/tests directory.
diff --git a/third_party/blink/renderer/platform/audio/README.md b/third_party/blink/renderer/platform/audio/README.md new file mode 100644 index 0000000..c68b169 --- /dev/null +++ b/third_party/blink/renderer/platform/audio/README.md
@@ -0,0 +1,4 @@ +# Platform Audio + +This directory contains low-level audio handling and signal processing, mostly +intended to support [modules/webaudio](../../modules/webaudio/)
diff --git a/third_party/blink/renderer/platform/fonts/shaping/shape_result.cc b/third_party/blink/renderer/platform/fonts/shaping/shape_result.cc index 7e1fa9ad..211e267 100644 --- a/third_party/blink/renderer/platform/fonts/shaping/shape_result.cc +++ b/third_party/blink/renderer/platform/fonts/shaping/shape_result.cc
@@ -1001,6 +1001,7 @@ ApplyTextAutoSpacingCore<TextDirection::kRtl>(offsets_with_spacing.rbegin(), offsets_with_spacing.rend()); } + RecalcCharacterPositions(); } template <TextDirection direction, class Iterator> @@ -1883,12 +1884,12 @@ float x_position = !rtl ? last_x_position : total_advance; for (unsigned i = next_character_index; i < character_index; i++) { DCHECK_LT(i, num_characters_); - data[i] = {x_position, false, false}; + data[i].SetCachedData(x_position, false, false); } } - data[character_index] = {total_advance, true, - glyph_data.safe_to_break_before}; + data[character_index].SetCachedData(total_advance, true, + glyph_data.safe_to_break_before); last_x_position = total_advance; } @@ -1903,7 +1904,7 @@ if (next_character_index < num_characters_) { float x_position = !rtl ? last_x_position : run_advance; for (unsigned i = next_character_index; i < num_characters_; i++) { - data[i] = {x_position, false, false}; + data[i].SetCachedData(x_position, false, false); } } @@ -1916,10 +1917,16 @@ character_position_ = std::make_unique<CharacterPositionData>(num_characters_, width_); - if (Direction() == TextDirection::kLtr) + RecalcCharacterPositions(); +} + +void ShapeResult::RecalcCharacterPositions() const { + DCHECK(character_position_); + if (IsLtr()) { ComputePositionData<false>(); - else + } else { ComputePositionData<true>(); + } } unsigned ShapeResult::CachedOffsetForPosition(float x) const {
diff --git a/third_party/blink/renderer/platform/fonts/shaping/shape_result.h b/third_party/blink/renderer/platform/fonts/shaping/shape_result.h index 1a51446..4372634 100644 --- a/third_party/blink/renderer/platform/fonts/shaping/shape_result.h +++ b/third_party/blink/renderer/platform/fonts/shaping/shape_result.h
@@ -74,22 +74,20 @@ struct ShapeResultCharacterData { DISALLOW_NEW(); - ShapeResultCharacterData() : ShapeResultCharacterData(0, false, false) {} - ShapeResultCharacterData(float position, - bool is_cluster_base, - bool safe_to_break_before) - : x_position(position), - is_cluster_base(is_cluster_base), - safe_to_break_before(safe_to_break_before), + ShapeResultCharacterData() + : is_cluster_base(false), + safe_to_break_before(false), has_auto_spacing_after(false) {} - ShapeResultCharacterData(float position, - bool is_cluster_base, - unsigned safe_to_break_before) - : ShapeResultCharacterData(position, - is_cluster_base, - static_cast<bool>(safe_to_break_before)) {} - float x_position; + void SetCachedData(float new_x_position, + bool new_is_cluster_base, + bool new_safe_to_break_before) { + x_position = new_x_position; + is_cluster_base = new_is_cluster_base; + safe_to_break_before = new_safe_to_break_before; + } + + float x_position = 0; // Set for the logical first character of a cluster. unsigned is_cluster_base : 1; unsigned safe_to_break_before : 1; @@ -499,6 +497,7 @@ template <bool> void ComputePositionData() const; + void RecalcCharacterPositions() const; template <typename TextContainerType> void ApplySpacingImpl(ShapeResultSpacing<TextContainerType>&,
diff --git a/third_party/blink/renderer/platform/graphics/accelerated_static_bitmap_image_test.cc b/third_party/blink/renderer/platform/graphics/accelerated_static_bitmap_image_test.cc index 0dfcfb7c..5b3dd4a 100644 --- a/third_party/blink/renderer/platform/graphics/accelerated_static_bitmap_image_test.cc +++ b/third_party/blink/renderer/platform/graphics/accelerated_static_bitmap_image_test.cc
@@ -65,7 +65,7 @@ auto gl = std::make_unique<MockGLES2InterfaceWithSyncTokenSupport>(); gl_ = gl.get(); context_provider_ = viz::TestContextProvider::Create(std::move(gl)); - InitializeSharedGpuContext(context_provider_.get()); + InitializeSharedGpuContextGLES2(context_provider_.get()); } void TearDown() override { gl_ = nullptr;
diff --git a/third_party/blink/renderer/platform/graphics/canvas_2d_layer_bridge.cc b/third_party/blink/renderer/platform/graphics/canvas_2d_layer_bridge.cc index 26cf34f3..8667fb1 100644 --- a/third_party/blink/renderer/platform/graphics/canvas_2d_layer_bridge.cc +++ b/third_party/blink/renderer/platform/graphics/canvas_2d_layer_bridge.cc
@@ -26,7 +26,6 @@ #include "third_party/blink/renderer/platform/graphics/canvas_2d_layer_bridge.h" #include "base/feature_list.h" -#include "base/timer/elapsed_timer.h" #include "cc/layers/texture_layer.h" #include "gpu/GLES2/gl2extchromium.h" #include "gpu/command_buffer/client/context_support.h" @@ -51,7 +50,6 @@ Canvas2DLayerBridge::Canvas2DLayerBridge(OpacityMode opacity_mode) : logger_(std::make_unique<Logger>()), - have_recorded_draw_commands_(false), opacity_mode_(opacity_mode), snapshot_state_(kInitialSnapshotState), resource_host_(nullptr) { @@ -61,7 +59,6 @@ } Canvas2DLayerBridge::~Canvas2DLayerBridge() { - ClearPendingRasterTimers(); if (IsHibernating()) logger_->ReportHibernationEvent(kHibernationEndedWithTeardown); ResetResourceProvider(); @@ -162,7 +159,7 @@ // case because flushRecording should only fail it it fails to allocate // a surface, and we have an early exit at the top of this function for when // 'this' does not already have a surface. - DCHECK(!have_recorded_draw_commands_); + DCHECK(!resource_host_->ResourceProvider()->HasRecordedDrawOps()); SkPaint copy_paint; copy_paint.setBlendMode(SkBlendMode::kSrc); scoped_refptr<StaticBitmapImage> snapshot = @@ -200,7 +197,7 @@ } SkipQueuedDrawCommands(); - DCHECK(!have_recorded_draw_commands_); + DCHECK(!resource_host_->ResourceProvider()->HasRecordedDrawOps()); // Frees canvas resource. lose_context_in_background_ = true; @@ -264,11 +261,6 @@ if (!resource_provider || !resource_provider->IsValid()) return nullptr; - // Calling to DidDraw because GetOrCreateResourceProvider created a new - // provider and cleared it - // TODO crbug/1090081: Check possibility to move DidDraw inside Clear. - DidDraw(); - if (resource_host_->IsComposited() && !layer_) { layer_ = cc::TextureLayer::CreateForMailbox(this); layer_->SetIsDrawable(true); @@ -402,7 +394,6 @@ if (!GetOrCreateResourceProvider()) return false; } - have_recorded_draw_commands_ = false; bool wrote_pixels = ResourceProvider()->WritePixels(orig_info, pixels, row_bytes, x, y); @@ -414,135 +405,26 @@ void Canvas2DLayerBridge::SkipQueuedDrawCommands() { ResourceProvider()->SkipQueuedDrawCommands(); - have_recorded_draw_commands_ = false; -} - -void Canvas2DLayerBridge::ClearPendingRasterTimers() { - gpu::raster::RasterInterface* raster_interface = nullptr; - if (IsAccelerated() && SharedGpuContext::ContextProviderWrapper() && - SharedGpuContext::ContextProviderWrapper()->ContextProvider()) { - raster_interface = SharedGpuContext::ContextProviderWrapper() - ->ContextProvider() - ->RasterInterface(); - } - - if (raster_interface) { - while (!pending_raster_timers_.empty()) { - RasterTimer rt = pending_raster_timers_.TakeFirst(); - raster_interface->DeleteQueriesEXT(1, &rt.gl_query_id); - } - } else { - pending_raster_timers_.clear(); - } -} - -void Canvas2DLayerBridge::FinishRasterTimers( - gpu::raster::RasterInterface* raster_interface) { - // If the context was lost, then the old queries are not valid anymore - if (!IsValid()) { - ClearPendingRasterTimers(); - return; - } - - // Finish up any pending queries that are complete - while (!pending_raster_timers_.empty()) { - auto it = pending_raster_timers_.begin(); - GLuint complete = 1; - raster_interface->GetQueryObjectuivEXT( - it->gl_query_id, GL_QUERY_RESULT_AVAILABLE_NO_FLUSH_CHROMIUM_EXT, - &complete); - if (!complete) { - break; - } - - GLuint raw_gpu_duration = 0u; - raster_interface->GetQueryObjectuivEXT(it->gl_query_id, GL_QUERY_RESULT_EXT, - &raw_gpu_duration); - base::TimeDelta gpu_duration_microseconds = - base::Microseconds(raw_gpu_duration); - base::TimeDelta total_time = - gpu_duration_microseconds + it->cpu_raster_duration; - - base::TimeDelta min = base::Microseconds(1); - base::TimeDelta max = base::Milliseconds(100); - int num_buckets = 100; - UMA_HISTOGRAM_CUSTOM_MICROSECONDS_TIMES( - "Blink.Canvas.RasterDuration.Accelerated.GPU", - gpu_duration_microseconds, min, max, num_buckets); - UMA_HISTOGRAM_CUSTOM_MICROSECONDS_TIMES( - "Blink.Canvas.RasterDuration.Accelerated.CPU", it->cpu_raster_duration, - min, max, num_buckets); - UMA_HISTOGRAM_CUSTOM_MICROSECONDS_TIMES( - "Blink.Canvas.RasterDuration.Accelerated.Total", total_time, min, max, - num_buckets); - - raster_interface->DeleteQueriesEXT(1, &it->gl_query_id); - - pending_raster_timers_.erase(it); - } } void Canvas2DLayerBridge::FlushRecording(FlushReason reason) { - if (!have_recorded_draw_commands_ || !GetOrCreateResourceProvider()) + CanvasResourceProvider* provider = GetOrCreateResourceProvider(); + if (!provider || !provider->HasRecordedDrawOps()) { return; + } TRACE_EVENT0("cc", "Canvas2DLayerBridge::flushRecording"); - gpu::raster::RasterInterface* raster_interface = nullptr; - if (IsAccelerated() && SharedGpuContext::ContextProviderWrapper() && - SharedGpuContext::ContextProviderWrapper()->ContextProvider()) { - raster_interface = SharedGpuContext::ContextProviderWrapper() - ->ContextProvider() - ->RasterInterface(); - FinishRasterTimers(raster_interface); - } - - // Sample one out of every kRasterMetricProbability frames to time - // If the canvas is accelerated, we also need access to the raster_interface - const bool will_measure = - always_measure_for_testing_ || - metrics_subsampler_.ShouldSample(kRasterMetricProbability); - const bool measure_raster_metric = - (raster_interface || !IsAccelerated()) && will_measure; - - RasterTimer rasterTimer; - absl::optional<base::ElapsedTimer> timer; - // Start Recording the raster duration - if (measure_raster_metric) { - if (IsAccelerated()) { - GLuint gl_id = 0u; - raster_interface->GenQueriesEXT(1, &gl_id); - raster_interface->BeginQueryEXT(GL_COMMANDS_ISSUED_CHROMIUM, gl_id); - rasterTimer.gl_query_id = gl_id; - } - timer.emplace(); - } - last_recording_ = ResourceProvider()->FlushCanvas(reason); last_record_tainted_by_write_pixels_ = false; - // Finish up the timing operation - if (measure_raster_metric) { - if (IsAccelerated()) { - rasterTimer.cpu_raster_duration = timer->Elapsed(); - raster_interface->EndQueryEXT(GL_COMMANDS_ISSUED_CHROMIUM); - pending_raster_timers_.push_back(rasterTimer); - } else { - UMA_HISTOGRAM_CUSTOM_MICROSECONDS_TIMES( - "Blink.Canvas.RasterDuration.Unaccelerated", timer->Elapsed(), - base::Microseconds(1), base::Milliseconds(100), 100); - } - } - // Rastering the recording would have locked images, since we've flushed // all recorded ops, we should release all locked images as well. // A new null check on the resource provider is necessary just in case // the playback crashed the context. if (GetOrCreateResourceProvider()) ResourceProvider()->ReleaseLockedImages(); - - have_recorded_draw_commands_ = false; } bool Canvas2DLayerBridge::IsValid() { @@ -560,7 +442,6 @@ if (ResourceProvider() && IsAccelerated() && ResourceProvider()->IsGpuContextLost()) { context_lost_ = true; - ClearPendingRasterTimers(); ResetResourceProvider(); if (resource_host_) { resource_host_->NotifyGpuContextLost(); @@ -685,10 +566,6 @@ return layer_.get(); } -void Canvas2DLayerBridge::DidDraw() { - have_recorded_draw_commands_ = true; -} - void Canvas2DLayerBridge::FinalizeFrame(FlushReason reason) { TRACE_EVENT0("blink", "Canvas2DLayerBridge::FinalizeFrame"); CHECK(resource_host_);
diff --git a/third_party/blink/renderer/platform/graphics/canvas_2d_layer_bridge.h b/third_party/blink/renderer/platform/graphics/canvas_2d_layer_bridge.h index 57b3ea76..4272264 100644 --- a/third_party/blink/renderer/platform/graphics/canvas_2d_layer_bridge.h +++ b/third_party/blink/renderer/platform/graphics/canvas_2d_layer_bridge.h
@@ -71,7 +71,6 @@ void PageVisibilityChanged(); void SetFilterQuality(cc::PaintFlags::FilterQuality filter_quality); void SetHdrMetadata(const gfx::HDRMetadata& hdr_metadata); - void DidDraw(); void DoPaintInvalidation(const gfx::Rect& dirty_rect); cc::Layer* Layer(); bool Restore(); @@ -90,7 +89,6 @@ size_t row_bytes, int x, int y); - void AlwaysMeasureForTesting() { always_measure_for_testing_ = true; } void SetCanvasResourceHost(CanvasResourceHost* host); void Hibernate(); @@ -99,8 +97,6 @@ void LoseContext(); bool IsHibernating() const { return hibernation_handler_.IsHibernating(); } - bool HasRecordedDrawCommands() { return have_recorded_draw_commands_; } - scoped_refptr<StaticBitmapImage> NewImageSnapshot(FlushReason); cc::TextureLayer* layer_for_testing() { return layer_.get(); } @@ -166,9 +162,7 @@ scoped_refptr<cc::TextureLayer> layer_; std::unique_ptr<Logger> logger_; - bool have_recorded_draw_commands_; bool hibernation_scheduled_ = false; - bool always_measure_for_testing_ = false; bool context_lost_ = false; bool lose_context_in_background_ = false; bool lose_context_in_background_scheduled_ = false; @@ -185,25 +179,9 @@ }; mutable SnapshotState snapshot_state_; - void ClearPendingRasterTimers(); - void FinishRasterTimers(gpu::raster::RasterInterface*); - struct RasterTimer { - // The id for querying the duration of the gpu-side of the draw - GLuint gl_query_id = 0u; - - // The duration of the CPU-side of the draw - base::TimeDelta cpu_raster_duration; - }; - CanvasResourceHost* resource_host_; viz::TransferableResource previous_frame_resource_; - // For measuring a sample of frames for end-to-end raster time - // Every frame has a 1% chance of being sampled - static constexpr float kRasterMetricProbability = 0.01; - base::MetricsSubSampler metrics_subsampler_; - Deque<RasterTimer> pending_raster_timers_; - absl::optional<cc::PaintRecord> last_recording_; base::WeakPtrFactory<Canvas2DLayerBridge> weak_ptr_factory_{this};
diff --git a/third_party/blink/renderer/platform/graphics/canvas_2d_layer_bridge_test.cc b/third_party/blink/renderer/platform/graphics/canvas_2d_layer_bridge_test.cc index bd28928..34171fa 100644 --- a/third_party/blink/renderer/platform/graphics/canvas_2d_layer_bridge_test.cc +++ b/third_party/blink/renderer/platform/graphics/canvas_2d_layer_bridge_test.cc
@@ -118,20 +118,20 @@ std::unique_ptr<FakeCanvasResourceHost> custom_host = nullptr) { std::unique_ptr<Canvas2DLayerBridge> bridge = std::make_unique<Canvas2DLayerBridge>(opacity_mode); - bridge->AlwaysMeasureForTesting(); if (custom_host) host_ = std::move(custom_host); if (!host_) host_ = std::make_unique<FakeCanvasResourceHost>(size); host_->SetPreferred2DRasterMode(raster_mode); + host_->AlwaysEnableRasterTimersForTesting(); bridge->SetCanvasResourceHost(host_.get()); return bridge; } void SetUp() override { test_context_provider_ = viz::TestContextProvider::Create(); - InitializeSharedGpuContext(test_context_provider_.get(), - &image_decode_cache_); + InitializeSharedGpuContextGLES2(test_context_provider_.get(), + &image_decode_cache_); } virtual bool NeedsMockGL() { return false; } @@ -334,7 +334,7 @@ } void DrawSomething(Canvas2DLayerBridge* bridge) { - bridge->DidDraw(); + bridge->GetPaintCanvas()->drawLine(0, 0, 2, 2, cc::PaintFlags()); bridge->FinalizeFrame(FlushReason::kTesting); // Grabbing an image forces a flush bridge->NewImageSnapshot(FlushReason::kTesting); @@ -363,7 +363,7 @@ host_ = std::make_unique<FakeCanvasResourceHost>(gfx::Size(300, 150)); host_->SetPreferred2DRasterMode(RasterModeHint::kPreferGPU); bridge->SetCanvasResourceHost(host_.get()); - bridge->AlwaysMeasureForTesting(); + host_->AlwaysEnableRasterTimersForTesting(); EXPECT_TRUE(bridge->IsValid()); EXPECT_TRUE(bridge->IsAccelerated()); // We don't yet know that // allocation will fail. @@ -986,7 +986,6 @@ EXPECT_EQ(bridge->GetPaintCanvas()->getLocalToDevice().rc(0, 3), 5); // Drawline so WritePixels has something to flush bridge->GetPaintCanvas()->drawLine(0, 0, 2, 2, flags); - bridge->DidDraw(); // WritePixels flushes recording. Post flush, a new drawing canvas is created // that should have the matrix restored onto it.
diff --git a/third_party/blink/renderer/platform/graphics/canvas_hibernation_handler_test.cc b/third_party/blink/renderer/platform/graphics/canvas_hibernation_handler_test.cc index 7111cd0..fefe517 100644 --- a/third_party/blink/renderer/platform/graphics/canvas_hibernation_handler_test.cc +++ b/third_party/blink/renderer/platform/graphics/canvas_hibernation_handler_test.cc
@@ -33,7 +33,6 @@ std::unique_ptr<FakeCanvasResourceHost> custom_host = nullptr) { std::unique_ptr<Canvas2DLayerBridge> bridge = std::make_unique<Canvas2DLayerBridge>(opacity_mode); - bridge->AlwaysMeasureForTesting(); if (custom_host) { host_ = std::move(custom_host); } @@ -47,7 +46,7 @@ void SetUp() override { test_context_provider_ = viz::TestContextProvider::Create(); - InitializeSharedGpuContext(test_context_provider_.get()); + InitializeSharedGpuContextGLES2(test_context_provider_.get()); } virtual bool NeedsMockGL() { return false; } @@ -101,7 +100,7 @@ } void DrawSomething(Canvas2DLayerBridge* bridge) { - bridge->DidDraw(); + bridge->GetPaintCanvas()->drawLine(0, 0, 2, 2, cc::PaintFlags()); bridge->FinalizeFrame(FlushReason::kTesting); // Grabbing an image forces a flush bridge->NewImageSnapshot(FlushReason::kTesting);
diff --git a/third_party/blink/renderer/platform/graphics/canvas_resource_host.cc b/third_party/blink/renderer/platform/graphics/canvas_resource_host.cc index 6adb23b..652a4af 100644 --- a/third_party/blink/renderer/platform/graphics/canvas_resource_host.cc +++ b/third_party/blink/renderer/platform/graphics/canvas_resource_host.cc
@@ -39,6 +39,8 @@ resource_provider_ = std::move(new_resource_provider); UpdateMemoryUsage(); if (resource_provider_) { + resource_provider_->AlwaysEnableRasterTimersForTesting( + always_enable_raster_timers_for_testing_); resource_provider_->SetCanvasResourceHost(this); resource_provider_->Canvas()->restoreToCount(1); InitializeForRecording(resource_provider_->Canvas());
diff --git a/third_party/blink/renderer/platform/graphics/canvas_resource_host.h b/third_party/blink/renderer/platform/graphics/canvas_resource_host.h index 8e69b57..a39a9bbd 100644 --- a/third_party/blink/renderer/platform/graphics/canvas_resource_host.h +++ b/third_party/blink/renderer/platform/graphics/canvas_resource_host.h
@@ -81,6 +81,9 @@ return ++frames_since_last_commit_; } void ResetFramesSinceLastCommit() { frames_since_last_commit_ = 0; } + void AlwaysEnableRasterTimersForTesting() { + always_enable_raster_timers_for_testing_ = true; + } private: void InitializeForRecording(cc::PaintCanvas* canvas); @@ -94,6 +97,7 @@ gfx::HDRMetadata hdr_metadata_; RasterModeHint preferred_2d_raster_mode_ = RasterModeHint::kPreferCPU; gfx::Size size_; + bool always_enable_raster_timers_for_testing_ = false; }; } // namespace blink
diff --git a/third_party/blink/renderer/platform/graphics/canvas_resource_provider.cc b/third_party/blink/renderer/platform/graphics/canvas_resource_provider.cc index f7c5aa0..51885ab 100644 --- a/third_party/blink/renderer/platform/graphics/canvas_resource_provider.cc +++ b/third_party/blink/renderer/platform/graphics/canvas_resource_provider.cc
@@ -1020,7 +1020,6 @@ // can be used for rendering with Skia, and Skia's Graphite backend doesn't // support bottom left origin SkSurfaces. constexpr bool kIsOriginTopLeft = true; - auto provider = std::make_unique<CanvasResourceProviderSharedImage>( adjusted_info, filter_quality, context_provider_wrapper, kIsOriginTopLeft, is_accelerated, shared_image_usage_flags); @@ -1279,6 +1278,11 @@ if (context_provider_wrapper_) context_provider_wrapper_->RemoveObserver(this); CanvasMemoryDumpProvider::Instance()->UnregisterClient(this); + + // Last chance for outstanding GPU timers to record metrics. + if (RasterInterface()) { + CheckGpuTimers(RasterInterface()); + } } void CanvasResourceProvider::FlushIfRecordingLimitExceeded() { @@ -1458,6 +1462,8 @@ if (!HasRecordedDrawOps()) { return absl::nullopt; } + ScopedRasterTimer timer(IsAccelerated() ? RasterInterface() : nullptr, *this, + always_enable_raster_timers_for_testing_); DCHECK(reason != FlushReason::kNone); bool want_to_preserve_recording = (IsPrinting() && reason != FlushReason::kClear) ||
diff --git a/third_party/blink/renderer/platform/graphics/canvas_resource_provider.h b/third_party/blink/renderer/platform/graphics/canvas_resource_provider.h index dffa05e..c8885c6 100644 --- a/third_party/blink/renderer/platform/graphics/canvas_resource_provider.h +++ b/third_party/blink/renderer/platform/graphics/canvas_resource_provider.h
@@ -16,6 +16,7 @@ #include "third_party/blink/renderer/platform/graphics/image_orientation.h" #include "third_party/blink/renderer/platform/graphics/memory_managed_paint_recorder.h" #include "third_party/blink/renderer/platform/graphics/paint/paint_recorder.h" +#include "third_party/blink/renderer/platform/graphics/scoped_raster_timer.h" #include "third_party/blink/renderer/platform/instrumentation/canvas_memory_dump_provider.h" #include "third_party/blink/renderer/platform/wtf/thread_specific.h" #include "third_party/blink/renderer/platform/wtf/vector.h" @@ -69,7 +70,8 @@ : public WebGraphicsContext3DProviderWrapper::DestructionObserver, public base::CheckedObserver, public CanvasMemoryDumpClient, - public MemoryManagedPaintCanvas::Client { + public MemoryManagedPaintCanvas::Client, + public ScopedRasterTimer::Host { public: // These values are persisted to logs. Entries should not be renumbered and // numeric values should never be reused. @@ -262,6 +264,10 @@ static void NotifyWillTransfer(cc::PaintImage::ContentId content_id); + void AlwaysEnableRasterTimersForTesting(bool value) { + always_enable_raster_timers_for_testing_ = value; + } + protected: class CanvasImageProvider; @@ -361,6 +367,7 @@ bool resource_recycling_enabled_ = true; bool is_single_buffered_ = false; bool oopr_uses_dmsaa_ = false; + bool always_enable_raster_timers_for_testing_ = false; // The maximum number of in-flight resources waiting to be used for // recycling.
diff --git a/third_party/blink/renderer/platform/graphics/canvas_resource_provider_test.cc b/third_party/blink/renderer/platform/graphics/canvas_resource_provider_test.cc index 95798bda..052411f 100644 --- a/third_party/blink/renderer/platform/graphics/canvas_resource_provider_test.cc +++ b/third_party/blink/renderer/platform/graphics/canvas_resource_provider_test.cc
@@ -58,8 +58,8 @@ true); test_gl->set_supports_gpu_memory_buffer_format(gfx::BufferFormat::RGBA_F16, true); - InitializeSharedGpuContext(test_context_provider_.get(), - &image_decode_cache_); + InitializeSharedGpuContextGLES2(test_context_provider_.get(), + &image_decode_cache_); context_provider_wrapper_ = SharedGpuContext::ContextProviderWrapper(); }
diff --git a/third_party/blink/renderer/platform/graphics/gpu/shared_gpu_context_test.cc b/third_party/blink/renderer/platform/graphics/gpu/shared_gpu_context_test.cc index 59a4c0479..51d835a 100644 --- a/third_party/blink/renderer/platform/graphics/gpu/shared_gpu_context_test.cc +++ b/third_party/blink/renderer/platform/graphics/gpu/shared_gpu_context_test.cc
@@ -140,9 +140,9 @@ std::make_unique<base::SingleThreadTaskRunner::CurrentDefaultHandle>( task_runner_); test_context_provider_ = viz::TestContextProvider::Create(); - InitializeSharedGpuContext(test_context_provider_.get(), - /*cache = */ nullptr, - SetIsContextLost::kSetToFalse); + InitializeSharedGpuContextGLES2(test_context_provider_.get(), + /*cache = */ nullptr, + SetIsContextLost::kSetToFalse); } void TearDown() override {
diff --git a/third_party/blink/renderer/platform/graphics/gpu/webgpu_resource_provider_cache_test.cc b/third_party/blink/renderer/platform/graphics/gpu/webgpu_resource_provider_cache_test.cc index 949171f..b66fa9f6 100644 --- a/third_party/blink/renderer/platform/graphics/gpu/webgpu_resource_provider_cache_test.cc +++ b/third_party/blink/renderer/platform/graphics/gpu/webgpu_resource_provider_cache_test.cc
@@ -36,8 +36,8 @@ void WebGPURecyclableResourceCacheTest::SetUp() { Platform::SetMainThreadTaskRunnerForTesting(); test_context_provider_ = viz::TestContextProvider::Create(); - InitializeSharedGpuContext(test_context_provider_.get(), - &image_decode_cache_); + InitializeSharedGpuContextGLES2(test_context_provider_.get(), + &image_decode_cache_); recyclable_resource_cache_ = std::make_unique<WebGPURecyclableResourceCache>( SharedGpuContext::ContextProviderWrapper(),
diff --git a/third_party/blink/renderer/platform/graphics/scoped_raster_timer.cc b/third_party/blink/renderer/platform/graphics/scoped_raster_timer.cc new file mode 100644 index 0000000..3dde618 --- /dev/null +++ b/third_party/blink/renderer/platform/graphics/scoped_raster_timer.cc
@@ -0,0 +1,114 @@ +// 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 "third_party/blink/renderer/platform/graphics/scoped_raster_timer.h" + +#include "base/metrics/histogram_macros.h" +#include "base/rand_util.h" +#include "gpu/GLES2/gl2extchromium.h" + +namespace blink { + +ScopedRasterTimer::ScopedRasterTimer( + gpu::raster::RasterInterface* raster_interface, + Host& host, + bool always_measure_for_testing) + : raster_interface_(raster_interface), host_(host) { + // Subsample the RasterTimer metrics to reduce overhead. + constexpr float kRasterMetricProbability = 0.01; + DEFINE_THREAD_SAFE_STATIC_LOCAL(base::MetricsSubSampler, metrics_subsampler, + ()); + if (!metrics_subsampler.ShouldSample(kRasterMetricProbability) && + !always_measure_for_testing) { + return; + } + + active_ = true; // Metric was activated by subsampler. + if (raster_interface_) { + host_.CheckGpuTimers(raster_interface_); + gpu_timer_ = std::make_unique<AsyncGpuRasterTimer>(*raster_interface_); + } + timer_.emplace(); +} + +ScopedRasterTimer::~ScopedRasterTimer() { + if (active_) { + if (gpu_timer_) { + gpu_timer_->FinishedIssuingCommands(*raster_interface_, + timer_->Elapsed()); + host_.AddGpuTimer(std::move(gpu_timer_)); + } else { + UMA_HISTOGRAM_CUSTOM_MICROSECONDS_TIMES( + kRasterDurationUnacceleratedHistogram, timer_->Elapsed(), + base::Microseconds(1), base::Milliseconds(100), 100); + } + } +} + +// ScopedRasterTimer::AsyncGpuRasterTimer +//======================================== + +ScopedRasterTimer::AsyncGpuRasterTimer::AsyncGpuRasterTimer( + gpu::raster::RasterInterface& raster_interface) { + raster_interface.GenQueriesEXT(1, &gl_query_id_); + raster_interface.BeginQueryEXT(GL_COMMANDS_ISSUED_CHROMIUM, gl_query_id_); +} + +void ScopedRasterTimer::AsyncGpuRasterTimer::FinishedIssuingCommands( + gpu::raster::RasterInterface& raster_interface, + base::TimeDelta cpu_raster_duration) { + cpu_raster_duration_ = cpu_raster_duration; + raster_interface.EndQueryEXT(GL_COMMANDS_ISSUED_CHROMIUM); +} + +bool ScopedRasterTimer::AsyncGpuRasterTimer::CheckTimer( + gpu::raster::RasterInterface& raster_interface) { + CHECK(!done_); + raster_interface.GetQueryObjectuivEXT( + gl_query_id_, GL_QUERY_RESULT_AVAILABLE_NO_FLUSH_CHROMIUM_EXT, &done_); + if (done_) { + GLuint raw_gpu_duration = 0u; + raster_interface.GetQueryObjectuivEXT(gl_query_id_, GL_QUERY_RESULT_EXT, + &raw_gpu_duration); + base::TimeDelta gpu_duration_microseconds = + base::Microseconds(raw_gpu_duration); + base::TimeDelta total_time = + gpu_duration_microseconds + cpu_raster_duration_; + + constexpr base::TimeDelta min = base::Microseconds(1); + constexpr base::TimeDelta max = base::Milliseconds(100); + constexpr int num_buckets = 100; + UMA_HISTOGRAM_CUSTOM_MICROSECONDS_TIMES( + kRasterDurationAcceleratedGpuHistogram, gpu_duration_microseconds, min, + max, num_buckets); + UMA_HISTOGRAM_CUSTOM_MICROSECONDS_TIMES( + kRasterDurationAcceleratedCpuHistogram, cpu_raster_duration_, min, max, + num_buckets); + UMA_HISTOGRAM_CUSTOM_MICROSECONDS_TIMES( + kRasterDurationAcceleratedTotalHistogram, total_time, min, max, + num_buckets); + + raster_interface.DeleteQueriesEXT(1, &gl_query_id_); + } + return done_; +} + +// ScopedRasterTimer::Host +//========================= + +void ScopedRasterTimer::Host::CheckGpuTimers( + gpu::raster::RasterInterface* raster_interface) { + CHECK(raster_interface); + WTF::EraseIf(gpu_timers_, + [raster_interface](std::unique_ptr<AsyncGpuRasterTimer>& timer) { + return timer->CheckTimer(*raster_interface); + }); +} + +void ScopedRasterTimer::Host::AddGpuTimer( + std::unique_ptr<AsyncGpuRasterTimer> timer) { + gpu_timers_.push_back(std::move(timer)); +} + +} // namespace blink
diff --git a/third_party/blink/renderer/platform/graphics/scoped_raster_timer.h b/third_party/blink/renderer/platform/graphics/scoped_raster_timer.h new file mode 100644 index 0000000..bc5408c0 --- /dev/null +++ b/third_party/blink/renderer/platform/graphics/scoped_raster_timer.h
@@ -0,0 +1,85 @@ +// 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 THIRD_PARTY_BLINK_RENDERER_PLATFORM_GRAPHICS_SCOPED_RASTER_TIMER_H_ +#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_GRAPHICS_SCOPED_RASTER_TIMER_H_ + +#include "base/timer/elapsed_timer.h" +#include "gpu/command_buffer/client/raster_interface.h" +#include "third_party/abseil-cpp/absl/types/optional.h" +#include "third_party/blink/renderer/platform/platform_export.h" +#include "third_party/blink/renderer/platform/wtf/vector.h" + +namespace blink { + +class PLATFORM_EXPORT ScopedRasterTimer { + STACK_ALLOCATED(); + + public: + class Host; + // raster_interface: pass null if rasterization is not gpu-accelerated + ScopedRasterTimer(gpu::raster::RasterInterface* raster_interface, + Host& host, + bool always_measure_for_testing); + ~ScopedRasterTimer(); + + // Histogram names. + static constexpr const char* const kRasterDurationUnacceleratedHistogram = + "Blink.Canvas.RasterDuration.Unaccelerated"; + static constexpr const char* const kRasterDurationAcceleratedCpuHistogram = + "Blink.Canvas.RasterDuration.Accelerated.CPU"; + static constexpr const char* const kRasterDurationAcceleratedGpuHistogram = + "Blink.Canvas.RasterDuration.Accelerated.GPU"; + static constexpr const char* const kRasterDurationAcceleratedTotalHistogram = + "Blink.Canvas.RasterDuration.Accelerated.Total"; + + private: + class AsyncGpuRasterTimer { + public: + // At construction time: starts tracking commands issued to the gpu + // interface. + explicit AsyncGpuRasterTimer( + gpu::raster::RasterInterface& raster_interface); + + // Stop tracking issue command + void FinishedIssuingCommands(gpu::raster::RasterInterface& raster_interface, + base::TimeDelta cpu_raster_duration); + + // Returns true if the timer is done (i.e. all commands issued before + // call to FinishedIssuingCommands have been executed and timed on the + // service side). Must wait for this method to return true before + // destroying `this`, otherwise the measurement will be lost. + bool CheckTimer(gpu::raster::RasterInterface& raster_interface); + ~AsyncGpuRasterTimer() = default; + + private: + GLuint done_ = 0; + GLuint gl_query_id_ = 0u; + base::TimeDelta cpu_raster_duration_; + }; + + public: + // Classes with methods that use ScopedRasterTimer must inherit + // ScopedRasterTimer::Host + class Host { + public: + void CheckGpuTimers(gpu::raster::RasterInterface* raster_interface); + void AddGpuTimer(std::unique_ptr<AsyncGpuRasterTimer>); + + private: + WTF::Vector<std::unique_ptr<AsyncGpuRasterTimer>> gpu_timers_; + }; + + private: + bool active_ = false; + // Optional. nullptr indicates that raster work load is not GPU accelerated. + gpu::raster::RasterInterface* const raster_interface_; + absl::optional<base::ElapsedTimer> timer_; + std::unique_ptr<AsyncGpuRasterTimer> gpu_timer_; + Host& host_; +}; + +} // namespace blink + +#endif
diff --git a/third_party/blink/renderer/platform/graphics/scoped_raster_timer_test.cc b/third_party/blink/renderer/platform/graphics/scoped_raster_timer_test.cc new file mode 100644 index 0000000..cd1bdde --- /dev/null +++ b/third_party/blink/renderer/platform/graphics/scoped_raster_timer_test.cc
@@ -0,0 +1,150 @@ +// 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 "third_party/blink/renderer/platform/graphics/scoped_raster_timer.h" + +#include "base/test/metrics/histogram_tester.h" +#include "cc/test/stub_decode_cache.h" +#include "components/viz/test/test_context_provider.h" +#include "components/viz/test/test_gles2_interface.h" +#include "components/viz/test/test_raster_interface.h" +#include "gpu/command_buffer/common/shared_image_usage.h" +#include "testing/gtest/include/gtest/gtest.h" +#include "third_party/blink/renderer/platform/graphics/canvas_resource_provider.h" +#include "third_party/blink/renderer/platform/graphics/gpu/shared_gpu_context.h" +#include "third_party/blink/renderer/platform/graphics/test/gpu_memory_buffer_test_platform.h" +#include "third_party/blink/renderer/platform/graphics/test/gpu_test_utils.h" +#include "third_party/blink/renderer/platform/graphics/web_graphics_context_3d_provider_wrapper.h" + +namespace blink { + +using testing::Test; + +constexpr base::TimeDelta kExpectedCPUDuration = + base::ScopedMockElapsedTimersForTest::kMockElapsedTime; +// kExpectedGPUDuration does not need to be related to kMockElapsedTime. +// We chose kMockElapsedTime * 2 arbitrarily to ensure that CPU, GPU, and +// Total duration values all end up in different histogram buckets. +constexpr base::TimeDelta kExpectedGPUDuration = + base::ScopedMockElapsedTimersForTest::kMockElapsedTime * 2; + +// This is a fake raster interface that will always report that GPU +// commands have finished executing in kExpectedGPUDuration microseconds. +class FakeRasterCommandsCompleted : public viz::TestRasterInterface { + public: + void GetQueryObjectuivEXT(GLuint id, GLenum pname, GLuint* params) override { + if (pname == GL_QUERY_RESULT_AVAILABLE_NO_FLUSH_CHROMIUM_EXT) { + // Signal that commands have completed. + *params = 1; + } else if (pname == GL_QUERY_RESULT_EXT) { + *params = kExpectedGPUDuration.InMicroseconds(); + } else { + viz::TestRasterInterface::GetQueryObjectuivEXT(id, pname, params); + } + } +}; + +class ScopedRasterTimerTest : public Test { + public: + void SetUp() override { + auto fake_raster_context = std::make_unique<FakeRasterCommandsCompleted>(); + test_context_provider_ = + viz::TestContextProvider::CreateRaster(std::move(fake_raster_context)); + auto* test_raster = test_context_provider_->UnboundTestRasterInterface(); + test_raster->set_gpu_rasterization(true); + test_raster->set_supports_scanout_shared_images(true); + test_raster->set_supports_gpu_memory_buffer_format( + gfx::BufferFormat::RGBA_8888, true); + test_raster->set_supports_gpu_memory_buffer_format( + gfx::BufferFormat::BGRA_8888, true); + InitializeSharedGpuContextRaster(test_context_provider_.get(), + &image_decode_cache_); + context_provider_wrapper_ = SharedGpuContext::ContextProviderWrapper(); + } + + void TearDown() override { SharedGpuContext::ResetForTesting(); } + + protected: + cc::StubDecodeCache image_decode_cache_; + scoped_refptr<viz::TestContextProvider> test_context_provider_; + base::WeakPtr<WebGraphicsContext3DProviderWrapper> context_provider_wrapper_; + ScopedTestingPlatformSupport<GpuMemoryBufferTestPlatform> platform_; +}; + +TEST_F(ScopedRasterTimerTest, UnacceleratedRasterDuration) { + base::ScopedMockElapsedTimersForTest mock_timer; + const SkImageInfo kInfo = SkImageInfo::MakeN32Premul(10, 10); + + const uint32_t shared_image_usage_flags = + gpu::SHARED_IMAGE_USAGE_DISPLAY_READ | gpu::SHARED_IMAGE_USAGE_SCANOUT; + + std::unique_ptr<CanvasResourceProvider> provider = + CanvasResourceProvider::CreateSharedImageProvider( + kInfo, cc::PaintFlags::FilterQuality::kMedium, + CanvasResourceProvider::ShouldInitialize::kCallClear, + context_provider_wrapper_, RasterMode::kCPU, + shared_image_usage_flags); + + ASSERT_NE(provider.get(), nullptr); + + provider->AlwaysEnableRasterTimersForTesting(true); + + base::HistogramTester histograms; + + // Trigger a flush, which will capture a raster duration measurement. + provider->Canvas()->clear(SkColors::kBlue); + provider->ProduceCanvasResource(FlushReason::kTesting); + provider = nullptr; + + histograms.ExpectUniqueSample( + ScopedRasterTimer::kRasterDurationUnacceleratedHistogram, + kExpectedCPUDuration.InMicroseconds(), 1); + histograms.ExpectTotalCount( + ScopedRasterTimer::kRasterDurationAcceleratedCpuHistogram, 0); + histograms.ExpectTotalCount( + ScopedRasterTimer::kRasterDurationAcceleratedGpuHistogram, 0); + histograms.ExpectTotalCount( + ScopedRasterTimer::kRasterDurationAcceleratedTotalHistogram, 0); + + SharedGpuContext::ResetForTesting(); +} + +TEST_F(ScopedRasterTimerTest, AcceleratedRasterDuration) { + base::ScopedMockElapsedTimersForTest mock_timer; + const SkImageInfo kInfo = SkImageInfo::MakeN32Premul(10, 10); + + auto provider = CanvasResourceProvider::CreateSharedImageProvider( + kInfo, cc::PaintFlags::FilterQuality::kMedium, + CanvasResourceProvider::ShouldInitialize::kCallClear, + context_provider_wrapper_, RasterMode::kGPU, + /*shared_image_usage_flags=*/0u); + + ASSERT_TRUE(!!provider); + + provider->AlwaysEnableRasterTimersForTesting(true); + + // Trigger a flush, which will capture a raster duration measurement. + provider->Canvas()->clear(SkColors::kBlue); + provider->ProduceCanvasResource(FlushReason::kTesting); + + base::HistogramTester histograms; + + // CanvasResourceProvider destructor performs a timer check + // on the async GPU timers. + provider = nullptr; + + histograms.ExpectTotalCount( + ScopedRasterTimer::kRasterDurationUnacceleratedHistogram, 0); + histograms.ExpectUniqueSample( + ScopedRasterTimer::kRasterDurationAcceleratedCpuHistogram, + kExpectedCPUDuration.InMicroseconds(), 1); + histograms.ExpectUniqueSample( + ScopedRasterTimer::kRasterDurationAcceleratedGpuHistogram, + kExpectedGPUDuration.InMicroseconds(), 1); + histograms.ExpectUniqueSample( + ScopedRasterTimer::kRasterDurationAcceleratedTotalHistogram, + (kExpectedCPUDuration + kExpectedGPUDuration).InMicroseconds(), 1); +} + +} // namespace blink
diff --git a/third_party/blink/renderer/platform/graphics/test/DEPS b/third_party/blink/renderer/platform/graphics/test/DEPS index 08ac18fb..019c7aa3 100644 --- a/third_party/blink/renderer/platform/graphics/test/DEPS +++ b/third_party/blink/renderer/platform/graphics/test/DEPS
@@ -1,7 +1,8 @@ include_rules = [ + "+components/viz/test/test_context_provider.h", "+components/viz/test/test_gles2_interface.h", "+components/viz/test/test_gpu_memory_buffer_manager.h", - "+components/viz/test/test_context_provider.h", + "+components/viz/test/test_raster_interface.h", "+gpu/command_buffer/client/gles2_interface_stub.h", "+gpu/command_buffer/client/raster_implementation_gles.h", "+gpu/command_buffer/client/webgpu_interface_stub.h",
diff --git a/third_party/blink/renderer/platform/graphics/test/fake_web_graphics_context_3d_provider.h b/third_party/blink/renderer/platform/graphics/test/fake_web_graphics_context_3d_provider.h index 416b709..45912af3 100644 --- a/third_party/blink/renderer/platform/graphics/test/fake_web_graphics_context_3d_provider.h +++ b/third_party/blink/renderer/platform/graphics/test/fake_web_graphics_context_3d_provider.h
@@ -49,11 +49,26 @@ webgpu_interface_ = std::make_unique<gpu::webgpu::WebGPUInterfaceStub>(); // enable all gpu features. - for (unsigned feature = 0; feature < gpu::NUMBER_OF_GPU_FEATURE_TYPES; - ++feature) { - gpu_feature_info_.status_values[feature] = gpu::kGpuFeatureStatusEnabled; + for (gpu::GpuFeatureStatus& status : gpu_feature_info_.status_values) { + status = gpu::kGpuFeatureStatusEnabled; } } + + explicit FakeWebGraphicsContext3DProvider( + gpu::raster::RasterInterface* raster, + cc::ImageDecodeCache* cache = nullptr) + : external_raster_interface_(raster), + image_decode_cache_(cache ? cache : &stub_image_decode_cache_) { + CHECK(raster); + + webgpu_interface_ = std::make_unique<gpu::webgpu::WebGPUInterfaceStub>(); + + // enable all gpu features. + for (gpu::GpuFeatureStatus& status : gpu_feature_info_.status_values) { + status = gpu::kGpuFeatureStatusEnabled; + } + } + ~FakeWebGraphicsContext3DProvider() override = default; GrDirectContext* GetGrContext() override { return gr_context_.get(); } @@ -73,9 +88,18 @@ gpu::GLHelper* GetGLHelper() override { return nullptr; } - gpu::InterfaceBase* InterfaceBase() override { return gl_; } + gpu::InterfaceBase* InterfaceBase() override { + if (external_raster_interface_) { + return external_raster_interface_; + } + return gl_; + } + gpu::gles2::GLES2Interface* ContextGL() override { return gl_; } gpu::raster::RasterInterface* RasterInterface() override { + if (external_raster_interface_) { + return external_raster_interface_; + } return raster_context_provider_ ? raster_context_provider_->RasterInterface() : raster_interface_.get(); @@ -113,15 +137,16 @@ private: cc::StubDecodeCache stub_image_decode_cache_; viz::TestSharedImageInterface test_shared_image_interface_; - gpu::gles2::GLES2Interface* gl_; + gpu::gles2::GLES2Interface* gl_ = nullptr; std::unique_ptr<gpu::raster::RasterInterface> raster_interface_; + gpu::raster::RasterInterface* external_raster_interface_ = nullptr; std::unique_ptr<gpu::webgpu::WebGPUInterfaceStub> webgpu_interface_; sk_sp<GrDirectContext> gr_context_; gpu::Capabilities capabilities_; gpu::GpuFeatureInfo gpu_feature_info_; WebglPreferences webgl_preferences_; - cc::ImageDecodeCache* image_decode_cache_; - viz::RasterContextProvider* raster_context_provider_; + cc::ImageDecodeCache* image_decode_cache_ = nullptr; + viz::RasterContextProvider* raster_context_provider_ = nullptr; }; } // namespace blink
diff --git a/third_party/blink/renderer/platform/graphics/test/gpu_test_utils.cc b/third_party/blink/renderer/platform/graphics/test/gpu_test_utils.cc index bba5640..1de66a3 100644 --- a/third_party/blink/renderer/platform/graphics/test/gpu_test_utils.cc +++ b/third_party/blink/renderer/platform/graphics/test/gpu_test_utils.cc
@@ -6,15 +6,17 @@ #include "components/viz/test/test_context_provider.h" #include "components/viz/test/test_gles2_interface.h" +#include "components/viz/test/test_raster_interface.h" #include "third_party/blink/renderer/platform/graphics/gpu/shared_gpu_context.h" #include "third_party/blink/renderer/platform/graphics/test/fake_web_graphics_context_3d_provider.h" #include "third_party/blink/renderer/platform/wtf/functional.h" namespace blink { -void InitializeSharedGpuContext(viz::TestContextProvider* test_context_provider, - cc::ImageDecodeCache* cache, - SetIsContextLost set_context_lost) { +void InitializeSharedGpuContextGLES2( + viz::TestContextProvider* test_context_provider, + cc::ImageDecodeCache* cache, + SetIsContextLost set_context_lost) { auto factory = [](viz::TestGLES2Interface* gl, GrDirectContext* context, cc::ImageDecodeCache* cache, viz::RasterContextProvider* raster_context_provider, @@ -43,4 +45,34 @@ set_context_lost)); } +void InitializeSharedGpuContextRaster( + viz::TestContextProvider* test_context_provider, + cc::ImageDecodeCache* cache, + SetIsContextLost set_context_lost) { + auto factory = + [](viz::TestRasterInterface* raster, cc::ImageDecodeCache* cache, + SetIsContextLost set_context_lost, bool* gpu_compositing_disabled) + -> std::unique_ptr<WebGraphicsContext3DProvider> { + *gpu_compositing_disabled = false; + + if (set_context_lost == SetIsContextLost::kSetToFalse) { + raster->set_context_lost(false); + } else if (set_context_lost == SetIsContextLost::kSetToTrue) { + raster->set_context_lost(true); + } + // else set_context_lost will not be modified + + auto context_provider = + std::make_unique<FakeWebGraphicsContext3DProvider>(raster, cache); + context_provider->SetCapabilities(raster->capabilities()); + return context_provider; + }; + test_context_provider->BindToCurrentSequence(); + viz::TestRasterInterface* raster = + test_context_provider->GetTestRasterInterface(); + SharedGpuContext::SetContextProviderFactoryForTesting( + WTF::BindRepeating(factory, WTF::Unretained(raster), + WTF::Unretained(cache), set_context_lost)); +} + } // namespace blink
diff --git a/third_party/blink/renderer/platform/graphics/test/gpu_test_utils.h b/third_party/blink/renderer/platform/graphics/test/gpu_test_utils.h index 96e1ce4..03c6f38 100644 --- a/third_party/blink/renderer/platform/graphics/test/gpu_test_utils.h +++ b/third_party/blink/renderer/platform/graphics/test/gpu_test_utils.h
@@ -17,10 +17,16 @@ enum class SetIsContextLost { kNotModifyValue, kSetToTrue, kSetToFalse }; -void InitializeSharedGpuContext( +void InitializeSharedGpuContextGLES2( viz::TestContextProvider* context_provider, cc::ImageDecodeCache* cache = nullptr, SetIsContextLost set_context_lost = SetIsContextLost::kNotModifyValue); -} + +void InitializeSharedGpuContextRaster( + viz::TestContextProvider* context_provider, + cc::ImageDecodeCache* cache = nullptr, + SetIsContextLost set_context_lost = SetIsContextLost::kNotModifyValue); + +} // namespace blink #endif // THIRD_PARTY_BLINK_RENDERER_PLATFORM_GRAPHICS_TEST_GPU_TEST_UTILS_H_
diff --git a/third_party/blink/renderer/platform/graphics/video_frame_image_util_test.cc b/third_party/blink/renderer/platform/graphics/video_frame_image_util_test.cc index 7995420..525f9dc 100644 --- a/third_party/blink/renderer/platform/graphics/video_frame_image_util_test.cc +++ b/third_party/blink/renderer/platform/graphics/video_frame_image_util_test.cc
@@ -40,7 +40,7 @@ DISABLE_IMAGEBITMAP_FROM_VIDEO_USING_GPU); } - InitializeSharedGpuContext(test_context_provider_.get()); + InitializeSharedGpuContextGLES2(test_context_provider_.get()); } scoped_refptr<viz::ContextProvider> context_provider() const {
diff --git a/third_party/blink/renderer/platform/loader/fetch/url_loader/navigation_body_loader.cc b/third_party/blink/renderer/platform/loader/fetch/url_loader/navigation_body_loader.cc index bb2b5863c..ecb0801 100644 --- a/third_party/blink/renderer/platform/loader/fetch/url_loader/navigation_body_loader.cc +++ b/third_party/blink/renderer/platform/loader/fetch/url_loader/navigation_body_loader.cc
@@ -607,11 +607,10 @@ if (redirect_count != commit_params->redirects.size()) { // We currently incorrectly send empty redirect_response and redirect_infos - // on frame reloads and some cases involving throttles. + // on frame reloads and some cases involving throttles. There are also other + // reports of non-empty cases, so further investigation is still needed. // TODO(https://crbug.com/1171225): Fix this. - DCHECK_EQ(0u, redirect_count); - DCHECK_EQ(0u, commit_params->redirect_infos.size()); - DCHECK_NE(0u, commit_params->redirects.size()); + redirect_count = std::min(redirect_count, commit_params->redirects.size()); } navigation_params->redirects.reserve(redirect_count); navigation_params->redirects.resize(redirect_count);
diff --git a/third_party/blink/renderer/platform/weborigin/kurl.cc b/third_party/blink/renderer/platform/weborigin/kurl.cc index 5e9bcaf4..affdea3 100644 --- a/third_party/blink/renderer/platform/weborigin/kurl.cc +++ b/third_party/blink/renderer/platform/weborigin/kurl.cc
@@ -815,6 +815,11 @@ return escaped; } +bool HasInvalidURLEscapeSequences(const String& string) { + StringUTF8Adaptor string_utf8(string); + return url::HasInvalidURLEscapeSequences(string_utf8.AsStringPiece()); +} + bool KURL::IsHierarchical() const { if (string_.IsNull() || parsed_.scheme.is_empty()) return false;
diff --git a/third_party/blink/renderer/platform/weborigin/kurl.h b/third_party/blink/renderer/platform/weborigin/kurl.h index b74cb786..ed74512 100644 --- a/third_party/blink/renderer/platform/weborigin/kurl.h +++ b/third_party/blink/renderer/platform/weborigin/kurl.h
@@ -312,6 +312,13 @@ PLATFORM_EXPORT String EncodeWithURLEscapeSequences(const String&); +// Checks an arbitrary string for invalid escape sequences. +// +// A valid percent-encoding is '%' followed by exactly two hex-digits. This +// function returns true if an occurrence of '%' is found and followed by +// anything other than two hex-digits. +PLATFORM_EXPORT bool HasInvalidURLEscapeSequences(const String&); + } // namespace blink namespace WTF {
diff --git a/third_party/blink/web_tests/TestExpectations b/third_party/blink/web_tests/TestExpectations index aa9414a..3ac87e9 100644 --- a/third_party/blink/web_tests/TestExpectations +++ b/third_party/blink/web_tests/TestExpectations
@@ -1692,8 +1692,6 @@ # Only virtual/threaded version of these tests pass (or running them with --enable-threaded-compositing). crbug.com/936891 fast/scrolling/document-level-touchmove-event-listener-passive-by-default.html [ Failure ] -crbug.com/889952 fast/selectors/selection-window-inactive.html [ Failure Pass ] - crbug.com/1107923 inspector-protocol/debugger/wasm-streaming-url.js [ Failure Pass Timeout ] # Will be re-enabled and rebaselined once we remove the '--enable-file-cookies' flag. @@ -2719,6 +2717,20 @@ crbug.com/1484043 [ Win ] virtual/fetch-later/external/wpt/fetch/fetch-later/send-on-deactivate.tentative.https.window.html [ Pass Timeout ] # ====== New tests from wpt-importer added here ====== +crbug.com/626703 external/wpt/css/css-align/blocks/align-content-block-001.html [ Failure ] +crbug.com/626703 external/wpt/css/css-align/blocks/align-content-block-002.html [ Failure ] +crbug.com/626703 external/wpt/css/css-align/blocks/align-content-block-003.html [ Failure ] +crbug.com/626703 external/wpt/css/css-align/blocks/align-content-block-004.html [ Failure ] +crbug.com/626703 external/wpt/css/css-align/blocks/align-content-block-005.html [ Failure ] +crbug.com/626703 external/wpt/css/css-align/blocks/align-content-block-006.html [ Failure ] +crbug.com/626703 external/wpt/css/css-align/blocks/align-content-block-007.html [ Failure ] +crbug.com/626703 external/wpt/css/css-align/blocks/align-content-block-008.html [ Failure ] +crbug.com/626703 external/wpt/css/css-align/blocks/align-content-block-009.html [ Failure ] +crbug.com/626703 external/wpt/css/css-align/blocks/align-content-block-010.html [ Failure ] +crbug.com/626703 external/wpt/css/css-align/blocks/align-content-block-011.html [ Failure ] +crbug.com/626703 external/wpt/css/css-align/blocks/align-content-block-break-content-020.html [ Failure ] +crbug.com/626703 external/wpt/css/css-align/blocks/align-content-block-break-overflow-020.html [ Failure ] +crbug.com/626703 external/wpt/css/css-align/blocks/align-content-block-overflow-000.html [ Failure ] crbug.com/626703 [ Mac12 ] external/wpt/pointerevents/coalesced_events_attributes_under_load.html?pen [ Timeout ] crbug.com/626703 external/wpt/css/compositing/root-element-background-image-transparency-001.html [ Failure ] crbug.com/626703 [ Mac ] external/wpt/css/compositing/root-element-background-image-transparency-002.html [ Failure ] @@ -6743,5 +6755,9 @@ crbug.com/1482345 [ Mac13-arm64 Release ] fast/events/touch/touch-handler-count.html [ Failure Pass ] # NotRestoredReasons flaky +crbug.com/1485427 [ Linux ] external/wpt/performance-timeline/not-restored-reasons/performance-navigation-timing-fetch.tentative.window.html [ Failure ] crbug.com/1485427 [ Mac ] external/wpt/performance-timeline/not-restored-reasons/performance-navigation-timing-fetch.tentative.window.html [ Failure ] -crbug.com/1485427 [ Win ] external/wpt/performance-timeline/not-restored-reasons/performance-navigation-timing-fetch.tentative.window.html [ Failure ] \ No newline at end of file +crbug.com/1485427 [ Win ] external/wpt/performance-timeline/not-restored-reasons/performance-navigation-timing-fetch.tentative.window.html [ Failure ] + +# Gardener 2023-09-21 +external/wpt/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/window-open-204-fragment.html [ Failure ] \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/WPT_BASE_MANIFEST_8.json b/third_party/blink/web_tests/external/WPT_BASE_MANIFEST_8.json index 79e78ea..3d3afe662 100644 --- a/third_party/blink/web_tests/external/WPT_BASE_MANIFEST_8.json +++ b/third_party/blink/web_tests/external/WPT_BASE_MANIFEST_8.json
@@ -3471,6 +3471,15 @@ ] }, "css-scroll-snap": { + "crashtests": { + "fractional-covering-area-crash.html": [ + "6905b0fd394052d7c26e80857a05c212b1a3e7a4", + [ + null, + {} + ] + ] + }, "scroll-snap-stop-dynamic-crash.html": [ "0039a0168e816f37198fec55d19bacd72a36dcde", [ @@ -77159,6 +77168,224 @@ ] ] }, + "blocks": { + "align-content-block-001.html": [ + "472ecae5765278beb410172af54ee4b1b7bf6864", + [ + null, + [ + [ + "/css/css-align/blocks/align-content-block-001-ref.html", + "==" + ] + ], + {} + ] + ], + "align-content-block-002.html": [ + "bad174d86f78c9166070a87947ecd072c0a528d5", + [ + null, + [ + [ + "/css/css-align/blocks/align-content-block-002-ref.html", + "==" + ] + ], + {} + ] + ], + "align-content-block-003.html": [ + "9356d2a3ff5b5accd9478c3f9db4b4a209c7109f", + [ + null, + [ + [ + "/css/css-align/blocks/align-content-block-003-ref.html", + "==" + ] + ], + {} + ] + ], + "align-content-block-004.html": [ + "38a330909d4aad60214d45c6b7704d8245682ec9", + [ + null, + [ + [ + "/css/css-align/blocks/align-content-block-004-ref.html", + "==" + ] + ], + {} + ] + ], + "align-content-block-005.html": [ + "97fe6c97fe978dbf0ae2f73e8c8859f271eacac0", + [ + null, + [ + [ + "/css/css-align/blocks/align-content-block-003-ref.html", + "==" + ] + ], + {} + ] + ], + "align-content-block-006.html": [ + "be62e78a706676585614f08b4203a0f946dd49fd", + [ + null, + [ + [ + "/css/css-align/blocks/align-content-block-004-ref.html", + "==" + ] + ], + {} + ] + ], + "align-content-block-007.html": [ + "61c4c684cd803f4353e0664851912ebe1f75f72a", + [ + null, + [ + [ + "/css/css-align/blocks/align-content-block-005-ref.html", + "==" + ] + ], + {} + ] + ], + "align-content-block-008.html": [ + "e9a861c71487a24def6c08559579d073a50bc3be", + [ + null, + [ + [ + "/css/css-align/blocks/align-content-block-004-ref.html", + "==" + ] + ], + {} + ] + ], + "align-content-block-009.html": [ + "0b2e8ec9fc4f5f0326599ff8fd1b922663bafb02", + [ + null, + [ + [ + "/css/css-align/blocks/align-content-block-005-ref.html", + "==" + ] + ], + {} + ] + ], + "align-content-block-010.html": [ + "ffb0e9cc4dbd6faf9381d79a24938a9dbd663651", + [ + null, + [ + [ + "/css/css-align/blocks/align-content-block-004-ref.html", + "==" + ] + ], + {} + ] + ], + "align-content-block-011.html": [ + "44b8d8987298f236197f1df4d7d453a2362226e1", + [ + null, + [ + [ + "/css/css-align/blocks/align-content-block-005-ref.html", + "==" + ] + ], + {} + ] + ], + "align-content-block-break-content-010.html": [ + "27a56a608f4d915327d168ddc6ad8075eed095f4", + [ + null, + [ + [ + "/css/css-align/blocks/align-content-block-break-content-010-aligned-ref.html", + "==" + ], + [ + "/css/css-align/blocks/align-content-block-break-content-010-unaligned-ref.html", + "==" + ] + ], + {} + ] + ], + "align-content-block-break-content-020.html": [ + "83267301b4c1c9d54598b71165a8ddb0fc3ddc44", + [ + null, + [ + [ + "/css/css-align/blocks/align-content-block-break-content-010-aligned-ref.html", + "==" + ], + [ + "/css/css-align/blocks/align-content-block-break-content-010-unaligned-ref.html", + "==" + ] + ], + {} + ] + ], + "align-content-block-break-overflow-010.html": [ + "cde57ad7a32ce14271777af7d0066d857af255b4", + [ + null, + [ + [ + "/css/css-align/blocks/align-content-block-break-overflow-010-ref.html", + "==" + ] + ], + {} + ] + ], + "align-content-block-break-overflow-020.html": [ + "5f4b3d9555a0811aeb42bf0312c1dca997afc28e", + [ + null, + [ + [ + "/css/css-align/blocks/align-content-block-break-overflow-010-ref.html", + "==" + ] + ], + {} + ] + ], + "align-content-block-overflow-000.html": [ + "c53606a0589af0bbd9c0bd7c513621b88f90687e", + [ + null, + [ + [ + "/css/css-align/blocks/align-content-block-overflow-000-ref.html", + "==" + ] + ], + {} + ] + ] + }, "content-distribution": { "place-content-shorthand-007.html": [ "be954c9712189d31aeb92914ab6a078f66087d0e", @@ -93741,6 +93968,45 @@ {} ] ], + "inline-with-float-001.html": [ + "b6a6e1958ff9bb8cd216af572cf3a092fa9a3ac8", + [ + null, + [ + [ + "/css/reference/ref-filled-green-100px-square.xht", + "==" + ] + ], + {} + ] + ], + "inline-with-float-002.html": [ + "d9235b421a16f783ad58505f157682a5a739eae7", + [ + null, + [ + [ + "/css/reference/ref-filled-green-100px-square.xht", + "==" + ] + ], + {} + ] + ], + "inline-with-float-004.html": [ + "6b404d9570005a327bd0943334ca518b479e5175", + [ + null, + [ + [ + "/css/reference/ref-filled-green-100px-square.xht", + "==" + ] + ], + {} + ] + ], "line-after-unbreakable-float-after-padding.html": [ "d3a4018cd809fc09eb68c1b25f4dda4736e64131", [ @@ -249592,6 +249858,19 @@ {} ] ], + "drop-shadow-currentcolor-dynamic-001.html": [ + "9c70274d5d85878737414d18515f2eb384bd3070", + [ + null, + [ + [ + "/css/filter-effects/reference/green-100x100.html", + "==" + ] + ], + {} + ] + ], "dynamic-filter-changes-001.html": [ "e2a28a3fe45ba90ad512e47b8756a01680b36511", [ @@ -253307,7 +253586,7 @@ ] ], "offset-path-shape-inset-002.html": [ - "5ca502e8b1c30124204d9fd61d2db9fdcb630312", + "ceafdd8cd2389de91e78ceeec7ea00723dcf4fa3", [ null, [ @@ -253323,7 +253602,7 @@ [ [ 0, - 75 + 170 ], [ 0, @@ -253420,7 +253699,7 @@ ] ], "offset-path-shape-rect-002.html": [ - "114143b18d1440caa926f54ca8ac35d57c0d3457", + "204eadcfc34ea4ef895e0501319b3a22f006dcb3", [ null, [ @@ -253436,11 +253715,11 @@ [ [ 0, - 96 + 160 ], [ 0, - 440 + 520 ] ] ] @@ -253475,7 +253754,7 @@ ] ], "offset-path-shape-xywh-002.html": [ - "4c4f4ac86c1bab87b5a11678013a3470c7f733c0", + "ef6a9e6324249621a112498e9b8075e98cae53e8", [ null, [ @@ -253491,11 +253770,11 @@ [ [ 0, - 130 + 140 ], [ 0, - 250 + 500 ] ] ] @@ -281626,11 +281905,11 @@ "support": { ".cache": { "gitignore2.json": [ - "652fd08fa0961d76b81af94b79bceb9fe90e4486", + "400ff0f438824a5e270b3d571d4637b1dc4f63e8", [] ], "mtime.json": [ - "dc8794bcde69f781a7c5dd247d1180c4658cfef0", + "cad9d87270a7472c097b66ca2db9244f1327805c", [] ] }, @@ -297594,6 +297873,112 @@ [] ] }, + "blocks": { + "align-content-block-001-ref.html": [ + "6a454d60d7689bcd3e7f028d8357032f545a19c4", + [] + ], + "align-content-block-001.html.ini": [ + "9cec50f150162e2e1c79792d38d96161c8b3cb77", + [] + ], + "align-content-block-002-ref.html": [ + "d7bde74e9eb000fc20174fda459b59b919df08d3", + [] + ], + "align-content-block-002.html.ini": [ + "5f0d16e92864ed0dd9166a09c506904abfea8704", + [] + ], + "align-content-block-003-ref.html": [ + "34414804bfa93627ba54a51ae5ccd6d4cb456c79", + [] + ], + "align-content-block-003.html.ini": [ + "c1bb47466473fd0159385e8a9bad4452714345fd", + [] + ], + "align-content-block-004-ref.html": [ + "ba1182b643d45064db6e0b7781aa1339ea7c6ad9", + [] + ], + "align-content-block-004.html.ini": [ + "229571e9dfac126c5c24f0a5c94f3f21ca7a0e3f", + [] + ], + "align-content-block-005-ref.html": [ + "c3712610dcd1cc2202ade91d627b7db20b32336d", + [] + ], + "align-content-block-005.html.ini": [ + "5fe5827c5382f72ac62b542296608b257549d825", + [] + ], + "align-content-block-006.html.ini": [ + "e9f535875410996f80e9c16497333807f4108f64", + [] + ], + "align-content-block-007.html.ini": [ + "3b67273e03573a7a0da8d713e501fe405c3409b1", + [] + ], + "align-content-block-008.html.ini": [ + "356c710dc1cbbc0579febe14b157e8736776017c", + [] + ], + "align-content-block-009.html.ini": [ + "e919dc96173e4df5bf3071ca5acd034db35bcdd3", + [] + ], + "align-content-block-010.html.ini": [ + "62eaa1ec49442750eeda019eec921cbd5330e6d0", + [] + ], + "align-content-block-011.html.ini": [ + "74a96e7fbb7149aaffcffd6eb273ee3a5eed384a", + [] + ], + "align-content-block-break-content-010-aligned-ref.html": [ + "4c92cc9b45fccb0e71446c78d443cac25ce5af60", + [] + ], + "align-content-block-break-content-010-unaligned-ref.html": [ + "458fcf289373ccb7b84fcfd6f0726f260404a004", + [] + ], + "align-content-block-break-content-020-aligned-ref.html": [ + "6a0e3871496869ccf983d9cb595103bf3718ae94", + [] + ], + "align-content-block-break-content-020-unaligned-ref.html": [ + "730c8741d700d9953039b6c6a8d8f9b9bad66de0", + [] + ], + "align-content-block-break-content-020.html.ini": [ + "c19c67ff247437b3381949b3b614198f168fc854", + [] + ], + "align-content-block-break-overflow-010-ref.html": [ + "68af3244e533bec565f21924fceee2a6473798a4", + [] + ], + "align-content-block-break-overflow-020-ref.html": [ + "7b27284cdf42896765b1cf05c1e8ab74d1ab3649", + [] + ], + "align-content-block-break-overflow-020.html.ini": [ + "e1ec410dff5ca18cac7632b4c15443b5edb24dd3", + [] + ], + "align-content-block-overflow-000-ref.html": [ + "8ca5407e4ca0a65d3a98e322c90d4cada8fef15b", + [] + ], + "align-content-block-overflow-000.html.ini": [ + "b896ff655731b241a186808468d6740cfab68ab2", + [] + ] + }, "content-distribution": { "parse-align-content-001-expected.txt": [ "e482c099c88b85d9041cd272c0463bf823370c12", @@ -298256,6 +298641,10 @@ "8d4c3f785c8e84ffa121128cda96269574e27e73", [] ], + "background-attachment-fixed-inside-transform-1.html.ini": [ + "494b85a763ed8be80de7b9f462df8e93d03909c1", + [] + ], "background-attachment-local": { "aqua-yellow-32x32.png": [ "42f8a2100b241aebf5c62e5057a51a933e6ff4d6", @@ -298285,6 +298674,10 @@ "113fb415e8637c3f48f2566e13da5c846ad2d1c0", [] ], + "attachment-local-clipping-color-5.html.ini": [ + "c822e139cb57df9bdfa6b52b8e9c6b47871adbd9", + [] + ], "attachment-local-clipping-color-6-ref.html": [ "f23e2274a62ad0eba3bdae294ebfd55464658ab0", [] @@ -298346,7 +298739,7 @@ [] ], "attachment-scroll-positioning-1.html.ini": [ - "6b5222c2e189b189d40252a60955f5eadfc2d4ef", + "e1db925c270f149f9719ca5c6c98e9f315183ab7", [] ] }, @@ -298515,6 +298908,10 @@ "4b5a1e966eaddc24427967d2a4bbcd07e9cfe2f9", [] ], + "background-repeat-space.xht.ini": [ + "5ff9cc5b05f3f7b1d60a830eff5cd429f47268f6", + [] + ], "reference": { "background-repeat-no-repeat.xht": [ "92bc4346decd7401b08adc8d2865b59c1581b02e", @@ -308166,7 +308563,7 @@ [] ], "font-display-feature-policy-02.tentative.html.ini": [ - "85fc069690120ebdf491e6b1f4d61d871056ce76", + "f6f1655597d823917fbf413e6ba7b25d97f1c2cc", [] ], "font-display-preload-ref.html": [ @@ -321002,7 +321399,7 @@ [] ], "clip-filter-order.html.ini": [ - "295b75166e9333f4bfbdfabf28e1033f5a48fbd3", + "e0fab8ee5cca3e5d05132de006416122d87a8ad5", [] ], "clip-fixed-pos-transform-descendant-001-ref.html": [ @@ -327934,10 +328331,18 @@ "179826fbc97a50ff04015b8f393f6696f008bbd9", [] ], + "shape-image-004.html.ini": [ + "1c53d48eb2e95d03939a8a0eedf80d24ca1f047c", + [] + ], "shape-image-007.html.ini": [ "7c9c5d84bcc324ca153f748e53ca0e503e560faa", [] ], + "shape-image-009.html.ini": [ + "74a2ff6409f1e70255dfb2fec6af650f945f981d", + [] + ], "shape-image-015.html.ini": [ "2b81201f42deab533c349472ba22cbb7a66a4590", [] @@ -327946,6 +328351,10 @@ "8f529e412cff1dcf89660eb975392e4890f45a4a", [] ], + "shape-image-026.html.ini": [ + "433b21a7f625079de9aa282f43fb3b3ca4c2aabb", + [] + ], "support": { "animated.gif": [ "9e424df7cdfb6b228b18297334fba7cabdb270cd", @@ -333798,7 +334207,7 @@ [] ], "text-transform-capitalize-010.html.ini": [ - "5952a4792f2f833ba7059f3ccfd05bca808c5169", + "017a372173804570a1f9d8be6db269232d85f274", [] ], "text-transform-capitalize-014.html.ini": [ @@ -333817,6 +334226,10 @@ "c094f855697377364fd9791321dcc20484db95db", [] ], + "text-transform-capitalize-030.html.ini": [ + "c3e6d0fc941b942b35af00cf0986f758e875a3b3", + [] + ], "text-transform-capitalize-033-ref.html": [ "7bbacef735c08e8f214f341d77179edc1b90d315", [] @@ -339683,6 +340096,10 @@ "30611dc21c6a0bd019377edf69d584d42183318c", [] ], + "kind-of-widget-fallback-input-text-border-inline-end-width-001.html.ini": [ + "d0362fbc5283210678527c76e8ef492ec7f71079", + [] + ], "kind-of-widget-fallback-meter-background-attachment-001.html.ini": [ "5c85d4c8e2f214d8e5287e8ac98f6b1d3a9a274c", [] @@ -346347,7 +346764,7 @@ [] ], "backdrop-filter-isolation.html.ini": [ - "dca10f8b8b15a2604b504c20574d6886c7a4a465", + "fb9469a64f9799451e3a8a829438bda08e543797", [] ], "backdrop-filter-non-isolation-ref.html": [ @@ -355279,6 +355696,10 @@ "2a2ba00abceec7b802d93a97b805b8de59fcc13a", [] ], + "intersection-observer.https.html.ini": [ + "c365ca8e7d6e1d1bbc2c8f267bdb8f48b2584b09", + [] + ], "load-ad-with-size.https.html.ini": [ "3db75d1a4b8e6f24c13556fa58b0a16bff7abaa7", [] @@ -355625,11 +356046,11 @@ [] ], "fledge-bidding-logic.py": [ - "6db171ede27cebb6235ca20c6ca96e5099deaa68", + "d1178c8a7a07b1c246a67d8d1f82598293705c24", [] ], "fledge-decision-logic.py": [ - "bd615af835bfab6f3f07951d50c4db90f2e3a9f6", + "63b544552c0d7f4678ef5e4d6504f982f51fa23f", [] ], "frame-navigation-inner-create-nested.https.html": [ @@ -358381,7 +358802,7 @@ [] ], "fenced-frame.tentative.https.window.js.ini": [ - "887e7f8a445bac5c0d4df10e892b33ca20407d82", + "5541b59e2f19e5936dfbe120ab4665378243e885", [] ], "fetch.tentative.https.window.js.ini": [ @@ -358425,7 +358846,7 @@ [] ], "mixed-content-fetch.tentative.https.window.js.ini": [ - "ace03288bb0456f4c45d91fe399640fe932a56fc", + "169b250c88c5c13599f8dfb141e041e6de5d1663", [] ], "mixed-content-fetch.tentative.https.window_include=from-private-expected.txt": [ @@ -358551,7 +358972,7 @@ ] }, "service-worker-background-fetch.tentative.https.window.js.ini": [ - "dd189950c968cd260b39faa10208c1f721d7d8e9", + "3a09b19d49b9181e6b54f8a7c652b39d9d2ebe30", [] ], "service-worker-fetch.tentative.https.window.js.ini": [ @@ -358595,7 +359016,7 @@ [] ], "shared-worker-fetch.tentative.https.window.js.ini": [ - "0cf0d94d541b47f6f7405cc9b78199bb08fbdeb4", + "d58c1b99d4f650eca7b3554bc3286402dec0cd7e", [] ], "shared-worker-fetch.tentative.window-expected.txt": [ @@ -358906,11 +359327,11 @@ ], "resources": { "bidding-logic.sub.py": [ - "f661842c732fdd108b4838ff0dbe1453e19f32d6", + "89707470d25a09f7d87f6f5f6349d7155af078f8", [] ], "decision-logic.sub.py": [ - "9a97d45bd1247cd6c566f4f3cfb5b7e6d40876e8", + "165d98400283c1af965b7feb270c939a5c691b84", [] ], "empty.html": [ @@ -360414,7 +360835,7 @@ [] ], "FileSystemFileHandle-cross-primitive-locking.https.tentative.worker.js.ini": [ - "3848bcfc8f917d22375eaca72149372fd49b465c", + "efebfaa9755a007f32eb93c867a630d5987751a0", [] ], "META.yml": [ @@ -362272,7 +362693,7 @@ [] ], "executor-window.py": [ - "e5c83cafb487349f816e1838abfa40ac33ae26ed", + "3ccba723892403e119cab1593bdf3040cf3295a6", [] ], "executor-worker.js": [ @@ -362280,7 +362701,7 @@ [] ], "remote-context-helper.js": [ - "184d1c8d174b9f45e41127adcc45fd3ea0b4548c", + "b62c9ac491a7643becdf0f8bc56c18e519eae06a", [] ] } @@ -366510,11 +366931,11 @@ }, "the-offscreen-canvas": { "offscreencanvas.getcontext.html.ini": [ - "d06ce2113ce8624641296493819d3f2e88cb99bf", + "2c33b0ff17477ca04d3d3cabccd46e0db0b3d646", [] ], "offscreencanvas.getcontext.worker.js.ini": [ - "fecd57dc106779c662412edd1d5819a13737e894", + "28883613341b79f301f3e4f9b45acff5c496c5f1", [] ], "offscreencanvas.resize.html.ini": [ @@ -366522,15 +366943,15 @@ [] ], "offscreencanvas.transfer.to.imagebitmap.html.ini": [ - "09857ba095d3f23a6265ef1d1eb22ffb0b89d74a", + "ffac485b878f72c760fc46d890a107cd32b83389", [] ], "offscreencanvas.transfer.to.imagebitmap.w.html.ini": [ - "aa685996f3dade86c597b8b5659fcd5e99d67860", + "1ec1f142a0f84453e5d1bc3e62de9575cbad4180", [] ], "offscreencanvas.transferrable.w.html.ini": [ - "4373bca5dbc0d0786985518569204eb9595fc5a2", + "750844c4aaba6b3caade229f2e663e5c11d40a18", [] ] } @@ -374007,7 +374428,7 @@ } }, "pixel-length-attributes-expected.txt": [ - "7594f785f96381293188af8b5e82f1b05f996f15", + "6b782e7e9b897b084f9dba368131b221b3d9f7c2", [] ], "pixel-length-attributes.html.ini": [ @@ -388274,6 +388695,10 @@ "c62eb8e3f7dc9ab4f00977db2e52ba98dd02d6ee", [] ], + "mediasource-worker-detach-element.html.ini": [ + "95ca78cd1c3ef315e3189bffd098b1db716e72d3", + [] + ], "mediasource-worker-detach-element.js": [ "54b1d815f2529932a153440db3cb3f1033fd84a6", [] @@ -390815,7 +391240,7 @@ }, "with-first-paint": { "first-contentful-canvas-webgl2.html.ini": [ - "87f0f0c48ff96e3d4629341badca03c218c3df4f", + "2767d72858538c59ec468fac2f60f8e02011989e", [] ] } @@ -391232,12 +391657,28 @@ "5bf9480fc385a3dd1f853e8aabf8206d04a9dbbc", [] ], + "performance-navigation-timing-fetch.tentative.window-expected.txt": [ + "cd24f186f4fc2adff72c706efdc326f1ca9ff011", + [] + ], + "performance-navigation-timing-fetch.tentative.window.js.ini": [ + "876710cd31f029e908dec5803d5c2b6d045f2e2f", + [] + ], "performance-navigation-timing-lock.https.tentative.window-expected.txt": [ - "49082f07b07634632d066550f3d214af0993b98b", + "bb685612add2fb60bf596db6b38db31f52a7c625", [] ], "performance-navigation-timing-lock.https.tentative.window.js.ini": [ - "0af6603a7a31ab54cf1beef899124542443b6268", + "3bc9e436aac74e821a000d855cfed259e939aede", + [] + ], + "performance-navigation-timing-navigation-failure.tentative.window-expected.txt": [ + "d35c91b871814e853920c2dcd3dab7038bc09ac8", + [] + ], + "performance-navigation-timing-navigation-failure.tentative.window.js.ini": [ + "2863298772f6dcb7de4b7a4234230de50eb64091", [] ], "performance-navigation-timing-not-bfcached.tentative.window.js.ini": [ @@ -392212,7 +392653,7 @@ [] ], "pointerevent_pointerId_scope.html.ini": [ - "f1ce564559af85ea3ba6f6e937130913e80c26a2", + "c05ae959dac56a015786a6111ffcee2852c6e3a8", [] ], "pointerevent_pointercancel_touch.html.ini": [ @@ -396357,7 +396798,7 @@ [] ], "scroll-timeline-frame-size-changed.html.ini": [ - "3db269a9f603cc31eadb84502400acefc738340c", + "01fe483de2c5666b623745d98e4ca27794731b25", [] ], "scroll-timeline-inactive-expected.txt": [ @@ -400031,7 +400472,7 @@ "tentative": { "static-router": { "README.md": [ - "8826b3c78276fbf8c7f2ebee0498f40d817a30e9", + "5429b61d40e4c65fcdecd9d24d71fa2876a8d353", [] ], "resources": { @@ -400043,12 +400484,16 @@ "0c3e3e78707b14dcca98bf1a435a34f402b3dadd", [] ], + "simple.csv": [ + "ecbef786e73889df94e3ced833c18a15d3f73fa2", + [] + ], "simple.html": [ "0c3e3e78707b14dcca98bf1a435a34f402b3dadd", [] ], "static-router-sw.js": [ - "4655ab5321c45cd98e62a2599df5e42825a317bd", + "e95bdadaddbf634b7ba7f6e6c40a0135423a1040", [] ], "test-helpers.sub.js": [ @@ -400061,7 +400506,7 @@ [] ], "static-router-subresource.https.html.ini": [ - "c576d3326b74aaf68792a72705e6f1ed3d1784e3", + "164eadf8df841fa4272703dc1156066b7ef0bc50", [] ] } @@ -406536,7 +406981,7 @@ ] }, "toascii.window-expected.txt": [ - "dd29d99c21e58ce715821e39be8dc3b995b23511", + "b98d0e1a8329542edfc0ae8513654e9c0f8e5ddb", [] ], "toascii.window.js.ini": [ @@ -406742,11 +407187,11 @@ [] ], "request-video-frame-callback-before-xr-session.https.html.ini": [ - "6576db273930307e793f9692daf51eab8ccaf0e3", + "20dee3a15964fb02868b34d665c65f4b2bffb4a3", [] ], "request-video-frame-callback-during-xr-session.https.html.ini": [ - "80df3e5e1286adf7986dc622e446acb8d2e2fdf0", + "b369f36b16f304c54290b6cecbdccc98990355b5", [] ], "request-video-frame-callback-webrtc.https.html.ini": [ @@ -409122,6 +409567,14 @@ "retrospective-test.js": [ "bbda190f099e4e08c686bb7d2b063e753ba0f606", [] + ], + "setTargetAtTime-after-event-within-block-expected.txt": [ + "d8469277081d9fa3398d2189e5c5b8b80d07d8e3", + [] + ], + "setTargetAtTime-after-event-within-block.html.ini": [ + "a72c951f5b0e545413a5c67faaaa9099ac4e93f8", + [] ] }, "the-audioworklet-interface": { @@ -409524,7 +409977,7 @@ [] ], "full-cycle-test.https.any.js.ini": [ - "2343a9db66c33f29b29cc0a920755a3fb4ce612c", + "50541b4972c2ec5336602061c0c1b44f676dd389", [] ], "h264.annexb": [ @@ -409600,7 +410053,7 @@ [] ], "temporal-svc-encoding.https.any.js.ini": [ - "0d66776e95fe4d3d0f2bf6dd6ece57379c74e6cc", + "39f4b80b6e5bc11b084d98b81bedc7bb2743b3ba", [] ], "utils.js": [ @@ -409615,18 +410068,10 @@ "81dc9475c4d2246b2ea4a5687944240d0e564802", [] ], - "video-decoder.https.any-expected.txt": [ - "dcfb04ce95e932d28ebea477522ced0859111f91", - [] - ], "video-decoder.https.any.js.ini": [ "ab66347a20168fb3ccef960b0972b4ce7a5bb1bd", [] ], - "video-decoder.https.any.worker-expected.txt": [ - "dcfb04ce95e932d28ebea477522ced0859111f91", - [] - ], "video-encoder-config.https.any.js.ini": [ "8d68b8ee5ed3b63667b3c0105878113247c25c63", [] @@ -409643,62 +410088,6 @@ "0aa2f53c4cc4bcfca80b1af268895145e63febd4", [] ], - "videoDecoder-codec-specific.https.any.worker_av1-expected.txt": [ - "553b3f0f60902e1ebb477c1c9cea880dfa3835af", - [] - ], - "videoDecoder-codec-specific.https.any.worker_h264_annexb-expected.txt": [ - "553b3f0f60902e1ebb477c1c9cea880dfa3835af", - [] - ], - "videoDecoder-codec-specific.https.any.worker_h264_avc-expected.txt": [ - "553b3f0f60902e1ebb477c1c9cea880dfa3835af", - [] - ], - "videoDecoder-codec-specific.https.any.worker_h265_annexb-expected.txt": [ - "553b3f0f60902e1ebb477c1c9cea880dfa3835af", - [] - ], - "videoDecoder-codec-specific.https.any.worker_h265_hevc-expected.txt": [ - "553b3f0f60902e1ebb477c1c9cea880dfa3835af", - [] - ], - "videoDecoder-codec-specific.https.any.worker_vp8-expected.txt": [ - "553b3f0f60902e1ebb477c1c9cea880dfa3835af", - [] - ], - "videoDecoder-codec-specific.https.any.worker_vp9-expected.txt": [ - "553b3f0f60902e1ebb477c1c9cea880dfa3835af", - [] - ], - "videoDecoder-codec-specific.https.any_av1-expected.txt": [ - "553b3f0f60902e1ebb477c1c9cea880dfa3835af", - [] - ], - "videoDecoder-codec-specific.https.any_h264_annexb-expected.txt": [ - "553b3f0f60902e1ebb477c1c9cea880dfa3835af", - [] - ], - "videoDecoder-codec-specific.https.any_h264_avc-expected.txt": [ - "553b3f0f60902e1ebb477c1c9cea880dfa3835af", - [] - ], - "videoDecoder-codec-specific.https.any_h265_annexb-expected.txt": [ - "553b3f0f60902e1ebb477c1c9cea880dfa3835af", - [] - ], - "videoDecoder-codec-specific.https.any_h265_hevc-expected.txt": [ - "553b3f0f60902e1ebb477c1c9cea880dfa3835af", - [] - ], - "videoDecoder-codec-specific.https.any_vp8-expected.txt": [ - "553b3f0f60902e1ebb477c1c9cea880dfa3835af", - [] - ], - "videoDecoder-codec-specific.https.any_vp9-expected.txt": [ - "553b3f0f60902e1ebb477c1c9cea880dfa3835af", - [] - ], "videoFrame-construction.any.js.ini": [ "c4bf9a20af6c63da0f7323c8217428410bdb5610", [] @@ -409989,6 +410378,10 @@ "626dbad1476143e71fac622976bfe37235f81054", [] ], + "invalid.py.ini": [ + "a6e61e33c443dc97bcc2a96fcf40584e46d6270c", + [] + ], "key.py.ini": [ "4b62ac058dca5fe58c63c748075e92ce4ec36378", [] @@ -415115,7 +415508,7 @@ [] ], "embedded_style_multiple_tracks.html.ini": [ - "e1419852045043f471ac44c62a7951ca934542dc", + "94eaa0d045668f95fa028bc2f386a1473ef6b36b", [] ], "embedded_style_selectors-ref.html": [ @@ -417253,27 +417646,27 @@ [] ], "ar_anchor_freefloating_create_move.https.html.ini": [ - "65325445617149c099e743443cca16d2bc8abc4c", + "ad835de372443b638c3768885bde6af55ae6be7e", [] ], "ar_anchor_freefloating_delay_creation.https.html.ini": [ - "0e054c603afd720dad9703a077763d8e2cf4fea4", + "1e1bbf27c3e1f66da55f08054fba49484335e03c", [] ], "ar_anchor_freefloating_failure.https.html.ini": [ - "ad384cfc7a6a7cc8b7abf27c9745c2ef9ef72b70", + "614055a06422f06468edb8ef8ae12ce568b039ee", [] ], "ar_anchor_freefloating_pause_resume_stop.https.html.ini": [ - "e09e783444540f5a5be18e5c76ae444a28dabdf2", + "ed289e8f059697a249eca4023a116ab8be4465f2", [] ], "ar_anchor_getAnchors.https.html.ini": [ - "4b27fc1f650b1590941f98e769ef37f36ad09dda", + "a9716ee09f03e1ac8c86b09aa04cfa35dadbb7f1", [] ], "ar_anchor_states.https.html.ini": [ - "8e80c908cd3545107eef537c5150624593772e60", + "35690f5dbcc2a8a7c575838a9e4c7ac7921ccb46", [] ], "idlharness.https.window-expected.txt": [ @@ -417291,44 +417684,44 @@ [] ], "xrDevice_requestSession_immersive-ar.https.html.ini": [ - "1a26797ee78ece4780ec9f319e622b90154cdedd", + "57fa96e13bfaf9210b701a55f411c778c05a5f44", [] ], "xrSession_environmentBlendMode.https.html.ini": [ - "957affa816f79339a78c079ae25cbdd28a4d0684", + "2fa3f05049cef8ade925bfc9df03b468e29e6fac", [] ], "xrSession_interactionMode.https.html.ini": [ - "db5531ad1a21504848fd41a62d1b7288ff091503", + "d41ac90179bcbd9c09137b38d7a2400477022323", [] ] }, "camera-access": { "xrCamera_resolution.https.html.ini": [ - "59d62d786709b77ce67227b0e70606b368cae05b", + "8b56b643b77dc18d358c90623090dd997b29ee5d", [] ] }, "depth-sensing": { "cpu": { "depth_sensing_cpu_dataUnavailable.https.html.ini": [ - "6774c6d52a04b8dad032638bcc67294d24033f0a", + "958064d608fc9d4af255090bc2c751594dcab2d7", [] ], "depth_sensing_cpu_inactiveFrame.https.html.ini": [ - "5efcca349bdd730c3e15c514565bed26b68a7359", + "68007dd7e4c3c801beaa161cff99286c59a4f1d9", [] ], "depth_sensing_cpu_incorrectUsage.https.html.ini": [ - "daa8ce48fe5d0574285b69d415f17f751fb6351b", + "91bdcc1e6d6883c7c0e04ff001aa310e8d2f6a0a", [] ], "depth_sensing_cpu_luminance_alpha_dataValid.https.html.ini": [ - "d5bce71737c2fb032a2348b53f33f7ea18bca3f6", + "cfecd5b40cc9d3d9a8556e7341c3607dec75eef7", [] ], "depth_sensing_cpu_staleView.https.html.ini": [ - "2a81bd6409c5fb8c4dd99f3f32d6765b17e3196e", + "8dd273a7f1deb94e6b3c22ba8079b8fb3521803a", [] ] }, @@ -417337,7 +417730,7 @@ [] ], "depth_sensing_notEnabled.https.html.ini": [ - "7483d386aaab79b03ae61eeebee2b747dcddeb89", + "35cd511175aa682fbbc0f4335ebbf729a336c0c1", [] ], "gpu": { @@ -417373,48 +417766,48 @@ [] ], "ar_dom_overlay.https.html.ini": [ - "02b3b2a1b655dda2ea4ba60065a92452feafd870", + "8c9838319f4bc86158e902754de91d81166a757e", [] ], "ar_dom_overlay_hit_test.https.html.ini": [ - "5e6593d7361009e8096e2401d418d6db217014e4", + "673305ba20ef80354bb80042260a008d6e944d4c", [] ], "nested_fullscreen.https.html.ini": [ - "0568f6d0afb934e208908034e81715b78ee69df4", + "2e1e41d18b1e9a38cf92e54dd59686196c283dae", [] ] }, "events_input_source_recreation.https.html.ini": [ - "aebd13666f75dc9bac9fee71ab12fd32b7cba1ff", + "a47f9576bd3d33f825b8df689a075fcf84fdc798", [] ], "events_input_sources_change.https.html.ini": [ - "169944d7b7e7a85bedfc011c25b3c9ec38e37293", + "5dc6b108804e70448762bfa437c166cb2a1daf07", [] ], "events_referenceSpace_reset_immersive.https.html.ini": [ - "0edd9f011ae0a32656301a995e48f6f3dccffa97", + "e8097d03857eb42e29b765c86646a1bf8b6e379e", [] ], "events_referenceSpace_reset_inline.https.html.ini": [ - "625fb4d6fdfb37de51fb911f34fc9ba4b38c553c", + "31b85504522f9e98df72d0dbfcd2e974a3671dc6", [] ], "events_session_select.https.html.ini": [ - "b50141b411f8989ba5fee8c404362970bac4996d", + "f5d6a1d86a32dd8d1f77eb70fe505d5e7979e55e", [] ], "events_session_select_subframe.https.html.ini": [ - "f61851b31366723cf2d053b2be7866f0baec0957", + "04c6e1f257bdf05e0ff48b6ebe18456bbc019143", [] ], "events_session_squeeze.https.html.ini": [ - "ccb439f674e19b1ea5d964b2c278c84a4f412104", + "3102bc8cd172fc057534fabb3f8b6d7fd8560f14", [] ], "exclusive_requestFrame_nolayer.https.html.ini": [ - "b8eaccfa787d419beada49a697226071b2cb6187", + "83f8d80c19b142d591a3cbd10eb9d46bec5cbcaf", [] ], "gamepads-module": { @@ -417423,24 +417816,24 @@ [] ], "xrInputSource_gamepad_disconnect.https.html.ini": [ - "b167e698bde6885c9d89ebc2d0c5dcf845651c85", + "0cd0996d6d2527df4e0ad61537426c03720ce4fa", [] ], "xrInputSource_gamepad_input_registered.https.html.ini": [ - "60989eb639bf287f6f7883e7b54b51a990322960", + "7334865c307c2c07df4f4c8eecb9cdd1f760928e", [] ] }, "getInputPose_handedness.https.html.ini": [ - "3e654dc83e91dcddc79d55e4a0c262ccd46948f6", + "f80f1610fb0d7f6c9aee309c9f90c76e69ec3fc1", [] ], "getInputPose_pointer.https.html.ini": [ - "86b62947398172160a3410e622e4674775d4ba55", + "0b4816b86275a0536328e352cf89a935c40652ae", [] ], "getViewerPose_emulatedPosition.https.html.ini": [ - "fd9d6be4a9a1544ef6c39e868ba53ebd34f740f6", + "ff5ed77f0b37771fbd3e88989fc9a8647d58b8a7", [] ], "hand-input": { @@ -417455,31 +417848,31 @@ [] ], "ar_hittest_source_cancel.https.html.ini": [ - "44832a33dd234cc3b29dc97391999605da476d0a", + "95e881e14befe15853f8745a50870ca01f4a890f", [] ], "ar_hittest_subscription_inputSources.https.html.ini": [ - "5f9ad4a3c03d928a16d1171d48248ff658caceb2", + "b108a4727adcd3aa2db970cd413828e4c530620c", [] ], "ar_hittest_subscription_refSpaces.https.html.ini": [ - "c7bbdb8cecb1ccd6fbcbbcd90a5bc66e606b2849", + "841b5b65e2d8631bec74f817906aee4d7a017c30", [] ], "ar_hittest_subscription_states_regular.https.html.ini": [ - "f637caef0d39aec1fd0d5c312885c85148995a33", + "d1c591f44fcae89c9ee83106b609e0bfdb3d3149", [] ], "ar_hittest_subscription_states_transient.https.html.ini": [ - "17a8eb464d8944bdaf4e87e1b3ca5a0fb9127542", + "d12d26858270a88a294b5bd8bedc248d952bd875", [] ], "ar_hittest_subscription_transientInputSources.https.html.ini": [ - "5223cf209e08edfd39446fe9953c63ae8d0440a1", + "0c493b391e4f7053215a66e7cca9ac348eafd611", [] ], "ar_hittest_subscription_unlocalizable.https.html.ini": [ - "a91e830a75207a0468bba62dcc653c3a8382373f", + "7010e78bd68a755f55be0fd81dbf06528260bba0", [] ] }, @@ -417488,7 +417881,7 @@ [] ], "idlharness.https.window.js.ini": [ - "74fe81ac4f0c24f8ed9d8200b7d7f74cfba25e36", + "31f5108e88e9dd9028dfa4006c799b2b2433d00a", [] ], "layers": { @@ -417497,58 +417890,58 @@ [] ], "xrSession_updateRenderState.https.html.ini": [ - "cfd9bc2d4abf4dd05b61bc9811195d032cace7e3", + "514efa3e9033287123f354a6eced95c0b9ef512b", [] ], "xrWebGLBinding_constructor.https.html.ini": [ - "962d95b93aa4234ca46c3b45951234c4139b25bc", + "3a679b0d97287a32d5a5a46145e5ca0bf4bd6617", [] ] }, "light-estimation": { "xrFrame_getLightEstimate_oldSession.https.html.ini": [ - "8e7e47505800d37ee6944739fc9dd9e5135841f1", + "a5df2733a1f93157978039d605044b27132b55ec", [] ], "xrFrame_getLightEstimate_staleFrame.https.html.ini": [ - "8c99ddee7c5c5082b35c377840491c10dd3d134c", + "ab682d15f5a841c2d61f00e38bd6978bcf2e13b4", [] ], "xrFrame_getLightEstimate_valid.https.html.ini": [ - "3fc53be6ad372bcf3d865dd4e727c67a4490baa9", + "7760a787682a9d10227feff89f54cdb87b9d09e3", [] ], "xrSession_getLightProbe_ended.https.html.ini": [ - "27dc76ad6759f1863177ccd6975f70d96d29f14f", + "dc41e246103517d0707b310462dc8575e43cc54b", [] ], "xrSession_getLightProbe_notEnabled.https.html.ini": [ - "69e71d2b02a0e6e552601435967ae403060116fe", + "fc95c691cf35976c579190c71070b36f55145055", [] ], "xrSession_getLightProbe_valid.https.html.ini": [ - "4dfec597c17167e27802f619b6af364414a5d580", + "c38a381b739f3b61f3c36412f778287d15531b1c", [] ], "xrWebGLBinding_getReflectionCubeMap.https.html.ini": [ - "cc118c4de33771feb7e9397c5b23a9c5449d6d0a", + "898d6cca364c4f812ae91cf3628c34709097b53c", [] ] }, "navigator_xr_sameObject.https.html.ini": [ - "9b5887f87ff75653123b7dc3dcbaeb5cd64fb6e3", + "d5699ba2ab7a559ffc3729c73b146c490a4bb7af", [] ], "render_state_update.https.html.ini": [ - "9e24c5d87d1700942e76366a7d0a8b577e028131", + "0d08107917e9081fa171acd0b9c50d466005ea18", [] ], "render_state_vertical_fov_immersive.https.html.ini": [ - "0f558a3a62692e77dbf12179b08c90844048dc0c", + "f81016bd00b56a57b68af54e7387ac2d735294fd", [] ], "render_state_vertical_fov_inline.https.html.ini": [ - "fae5c9356f6b1624607413f6ee970098cd501c59", + "371bb190500ac4179c39b03dd730f7471c3ddab1", [] ], "resources": { @@ -417582,15 +417975,15 @@ ] }, "webGLCanvasContext_create_xrcompatible.https.html.ini": [ - "39372d859a12f2d95b19f15cd1e2b113c23df817", + "49cfd7943f2e6ef039adb168bee5825ccfa53b3b", [] ], "webGLCanvasContext_makecompatible_contextlost.https.html.ini": [ - "18f32fb90c63cb6444b1f46f0f1d59630ba358cb", + "a18b5150352157050b0e1214fcbd9db5c2f884c8", [] ], "webGLCanvasContext_makecompatible_reentrant.https.html.ini": [ - "0b7492924dd95edfc41efc3d10e0f226ae408e72", + "a10eea0bf0c43db95b83f957943385ae675733e2", [] ], "webxr_permissions_policy.https.html.headers": [ @@ -417598,215 +417991,215 @@ [] ], "webxr_permissions_policy.https.html.ini": [ - "7b3aecda0ea366e9e10e781563dafe7bbe909f95", + "0e8b9cd0cf6068f6d7117537c51c5089fdfd5467", [] ], "xrBoundedReferenceSpace_updates.https.html.ini": [ - "064b9a34ee876047fd9819ffe5b1e0f9b9eaa9bf", + "a44108bb8992fe2520aa5f786b94c079ce0c5cec", [] ], "xrDevice_disconnect_ends.https.html.ini": [ - "0a472da241bb77a0149e340248bbc155108dcb06", + "0a01258c00a28b247ee09e6fa35c791d058ec242", [] ], "xrDevice_requestSession_immersive.https.html.ini": [ - "3e36f2d489a4751d46339d9099e62a1e99684987", + "811cb43c84fb57e15701564e31f5ee58a3a4c166", [] ], "xrDevice_requestSession_optionalFeatures.https.html.ini": [ - "18d898e04e1792464465144fab0e0350b60b7fc9", + "c51c31229d9737f130210fb57cc1e1fe3260214f", [] ], "xrFrame_getPose.https.html.ini": [ - "8d74a9eb145c8bdaddc200fc428ec2348490a280", + "ac4203c40d47d1087f827761724383759affc8df", [] ], "xrFrame_getViewerPose_getPose.https.html.ini": [ - "66001d4e244159cb7da6c3d35df45343e8f10983", + "e14c763dedbf75da42f04a788eb270ce550e3b1e", [] ], "xrFrame_getViewerPose_getPose_identities.https.html.ini": [ - "0638e0893fdaef932c47c465b60bc167147caa58", + "67f80a43d4ed42485cbedd3b6aaa512ddeac6630", [] ], "xrFrame_lifetime.https.html.ini": [ - "a7bd836c51468a6b947725c4c87751222cb6c7ea", + "e7b132aab02445f40898aeeef6f5129b09542bab", [] ], "xrFrame_session_sameObject.https.html.ini": [ - "a38a1b0ea933b395a427f810df67849a7d60c968", + "dd686bfe49c61a7b4ba3ca4c806eb2f3cc446d75", [] ], "xrInputSource_add_remove.https.html.ini": [ - "3bcb5d2f65bb4edbed82bba7d1532c69b3bc3f06", + "83d64e534abb53bc6e5fa207acdf696df326d9c5", [] ], "xrInputSource_emulatedPosition.https.html.ini": [ - "ca67a199ca8c29792c6dce19ca1bf628786e6602", + "eaebd39ef05541ee2b046e4faa71f05041795b08", [] ], "xrInputSource_getPose_targetRay_grip.https.html.ini": [ - "194cf023d2013bc17f0799796ec7575f7f974365", + "44245c94504d63d9df21705d2972494730c74dbc", [] ], "xrInputSource_profiles.https.html.ini": [ - "b95565bf5e71d62dd89bb83ceeb7c0c78bea072b", + "882276a544a2f4bd6abf1f81ef0b00b9c2b61924", [] ], "xrInputSource_sameObject.https.html.ini": [ - "2ea1e3188f39644b83b593353b6bf476c60154b7", + "5f8046a3981a47f3a72716af4d6992b965eb9d5d", [] ], "xrPose_transform_sameObject.https.html.ini": [ - "c2bb63276fae402eef2916f2302efbccff2c7a80", + "0fc5406795e60bec5907567efe80eb3e302d4269", [] ], "xrReferenceSpace_originOffset.https.html.ini": [ - "dbcbe71831cb48a65e3235c2b7480dff2c382e2b", + "2c9967f9e9d693eb5eecce7fe84e3890d8e1abdd", [] ], "xrReferenceSpace_originOffsetBounded.https.html.ini": [ - "0c6fdf92224ca6853e74c92afa98a8c853632829", + "b52f079e22e9207db2032e97ba19bba1779ccd50", [] ], "xrReferenceSpace_originOffset_viewer.https.html.ini": [ - "dcd8c246141dc879583ae5588085da955eebaef9", + "fed3815e9652c359a0124a17109d8ace2c174c4a", [] ], "xrReferenceSpace_relationships.https.html.ini": [ - "16287159c1ee23bafb50a79fd1c0acac12f3e807", + "56446d37fea57882411dcbc68e5f12c64a83ff90", [] ], "xrRigidTransform_constructor.https.html.ini": [ - "8b178b0e9f6d0a426dec6e0bf0f2a0eac35f6991", + "7b302daef583f1aadfb735578bfae2c48b8d38f4", [] ], "xrRigidTransform_inverse.https.html.ini": [ - "9eb81ea6f81edb34676fb86d48d9aeea6c7ec694", + "d92348ac624189160b675343374d7fdcb57e89e4", [] ], "xrRigidTransform_sameObject.https.html.ini": [ - "d495a1dd03e76e0d20d579a86f1a97f5789a07c4", + "19b5f385f1c7d667e5018667bded0b079c9f531d", [] ], "xrSession_cancelAnimationFrame.https.html.ini": [ - "6247ba86cb2a44c4b58aa9d7b98ff13b88d12383", + "6681e48012afb20bb409764a8b704d0399321457", [] ], "xrSession_cancelAnimationFrame_invalidhandle.https.html.ini": [ - "13a5a6a7e3c4a92b1f9fa37268e50a4a65560fd3", + "0b1496234eeca50e39213a54405321596dd395bf", [] ], "xrSession_enabledFeatures.https.html.ini": [ - "f337bf4f7850df6b6a7a85afb7314d21bfb514fa", + "4145c8aa8d1caa56c120d534faf3a996b3b1248a", [] ], "xrSession_end.https.html.ini": [ - "5ca5c59cf1e8ea5f4770c043304fcda2dada4b61", + "866b99bc24182fdf6f56a2d8796d271ae67faa3c", [] ], "xrSession_input_events_end.https.html.ini": [ - "f7c09c79153f699d57969a6221796e4bccf02f0e", + "275b2098d68bcd9bfa3ee9d511667f91fa77f18c", [] ], "xrSession_requestAnimationFrame_callback_calls.https.html.ini": [ - "2e82b0de0a634f0ce7ecf4bd679a0c54ebf58942", + "d311d40b12e1f03b6d09f0c98436e5b35a58d8e0", [] ], "xrSession_requestAnimationFrame_data_valid.https.html.ini": [ - "abde8c98baee0c2524c1469223584fe6cff87f73", + "8a2471a06483a8e64bc0b52c6294fb4b1bd68f88", [] ], "xrSession_requestAnimationFrame_getViewerPose.https.html.ini": [ - "0c0e02e3ebb02a5d14eb364b66eb067bd6010c4c", + "25e7901229c10526ed80596c5f6b43e5c45e3ddb", [] ], "xrSession_requestAnimationFrame_timestamp.https.html.ini": [ - "30a869bdf1dd7bb66517840a7ab6b079b989b395", + "e217ecd068fae873b81258221e148247384247da", [] ], "xrSession_requestReferenceSpace.https.html.ini": [ - "46863d8d2c7dd0200b49234d27ff18ea59a6c62c", + "debb9ac3c5ab1682c25c827acd3c7e65c3f18a72", [] ], "xrSession_requestReferenceSpace_features.https.html.ini": [ - "bf5fa38f8e95a45774045aeb1d02e4c227513120", + "00daae0d667f05c70e35bbad2e26d6bd71feae46", [] ], "xrSession_requestSessionDuringEnd.https.html.ini": [ - "fe9cf4e3d9256d324e795790503a48c1e58d1832", + "71f627f42040f6dbf64d5b307a753fcd948878ce", [] ], "xrSession_sameObject.https.html.ini": [ - "bfb3728472ade17b2df01f90c7d19f6077c712ae", + "4813784091c6aade2534d8366c0d6f28888dfb39", [] ], "xrSession_viewer_referenceSpace.https.html.ini": [ - "b56e330b7113c9cb5277e3ef8f4d1db4bba80ad5", + "894b3f4b8ac5d6207c521ea424fcfafaff4965e5", [] ], "xrSession_visibilityState.https.html.ini": [ - "203208e96f9b23e288bf6f1738cc4784f2f25632", + "4daeb994022aae9a9a464d0cc8ab20eab0eeb3ec", [] ], "xrStationaryReferenceSpace_floorlevel_updates.https.html.ini": [ - "917af6efa7503abd7403a92686fd872c802b3c8f", + "4ca56e21d439a9346238c02023e555e9af6eac17", [] ], "xrView_eyes.https.html.ini": [ - "629772e006fae4627466c7da1cbd6f18dc65d26b", + "34ca3b736f3b356155bc7fb9cc41023501e0876f", [] ], "xrView_match.https.html.ini": [ - "2136648dd2aaece672c88bb28361d14cda1c4584", + "ebe90cd72e2314d6b1c7768f1e155afb5f35d996", [] ], "xrView_oneframeupdate.https.html.ini": [ - "9d9beeae043edeea8ab152fcb142e63c74edaf1a", + "625875cc6712f77462f92e2f7e2e27d2021cfe80", [] ], "xrView_sameObject.https.html.ini": [ - "6a79ecc283c42535cda6836d0043fff680932203", + "0900d476477459bb3a1327ac7c9b2f0c08cd6153", [] ], "xrViewerPose_secondaryViews.https.html.ini": [ - "0cf38b7cb0f274630da04017feddd54a58ffed5c", + "9e72af73eb758310806625fcf0cf24d899d8a825", [] ], "xrViewerPose_views_sameObject.https.html.ini": [ - "dff3bd9aa115b8d846a5d3e6b0d40a88a2ee7bf9", + "d4d19c52873076bdeff620aaf16ba76beb01f8db", [] ], "xrViewport_valid.https.html.ini": [ - "14206f66b55e0edec87a5613b794fb6ef75cf7e4", + "de350c7f264639524318550a3912287e5f1f3d93", [] ], "xrWebGLLayer_constructor.https.html.ini": [ - "78362cd9affafb4f3eccaf5abefd75b098851768", + "63c8a6f189d4a7722d1fd9eeff39e61bc1b957c5", [] ], "xrWebGLLayer_framebuffer_draw.https.html.ini": [ - "d464403ec55ba2e54477723717bdb1d63b80c595", + "516fc9304a2416bd73adbea9e39000b99f32002f", [] ], "xrWebGLLayer_framebuffer_sameObject.https.html.ini": [ - "c24b054914977d00dbfb6fcdaadc77dd27553e88", + "f1428e04d0d122dc9cc2e13598d7336fd67ca38c", [] ], "xrWebGLLayer_framebuffer_scale.https.html.ini": [ - "f89555d301f6201239a6a903e0f846e6d4972925", + "bcd2012d5d4f9522b82cbd2449f2db8915c82bec", [] ], "xrWebGLLayer_opaque_framebuffer.https.html.ini": [ - "6c894cfde060a604cf548e65584a1de631f2c97a", + "666c7ee73137dca2e7293e25ea843860260d355c", [] ], "xrWebGLLayer_opaque_framebuffer_stencil.https.html.ini": [ - "598ae0b9fa45c2f8de9d3579775c7de318fec96f", + "13f51862d8de757004c64fd159ba3d641ca3df02", [] ], "xrWebGLLayer_viewports.https.html.ini": [ - "a2a7abc72c8e7cb7a335721fc31fefe86145dfe6", + "394938a485839988157ad6a92a5267b932e8fa9d", [] ], "xr_viewport_scale.https-expected.txt": [ @@ -417814,7 +418207,7 @@ [] ], "xr_viewport_scale.https.html.ini": [ - "96be9aa54f78c3a7ea172f735b1976038ae2c007", + "970383d5d6c78dc29b71dd34705d010028e8ebf5", [] ] }, @@ -456755,7 +457148,7 @@ ] ], "at-fallback-position-allowed-declarations.html": [ - "25f6a14577f06bca4d321cceb826f1dbac04b692", + "873fa13140047c0943dde64faa8ab7dc54b28203", [ null, {} @@ -456817,13 +457210,6 @@ {} ] ], - "position-fallback-004.html": [ - "e4dbd718664fca1d5aa1276b32a8c6e94f907c3a", - [ - null, - {} - ] - ], "position-fallback-basics.html": [ "bfeb921de1bab4b194f0bb07b46bc7208c5e2166", [ @@ -459086,6 +459472,13 @@ {} ] ], + "inline-with-float-003.html": [ + "377548768a1dae539871f202915283ea3706d153", + [ + null, + {} + ] + ], "offset-top-block-in-inline.html": [ "72b35087e424cbf13289686dcc9436309320b27e", [ @@ -532521,10 +532914,10 @@ } ] ], - "FileSystemFileHandle-create-sync-access-handle.https.tentative.window.js": [ + "FileSystemFileHandle-create-sync-access-handle.https.window.js": [ "6e20b57cb7b4bfb7556284d983752a2cc55eaf52", [ - "fs/FileSystemFileHandle-create-sync-access-handle.https.tentative.window.html", + "fs/FileSystemFileHandle-create-sync-access-handle.https.window.html", { "script_metadata": [ [ @@ -532650,38 +533043,38 @@ {} ] ], - "FileSystemSyncAccessHandle-close.https.tentative.worker.js": [ + "FileSystemSyncAccessHandle-close.https.worker.js": [ "1c6aaf38a32a8341085ff83580dc874c3624c29a", [ - "fs/FileSystemSyncAccessHandle-close.https.tentative.worker.html", + "fs/FileSystemSyncAccessHandle-close.https.worker.html", {} ] ], - "FileSystemSyncAccessHandle-flush.https.tentative.worker.js": [ + "FileSystemSyncAccessHandle-flush.https.worker.js": [ "96953a88f2eaa7383bf80a1fe49bd7204cb46863", [ - "fs/FileSystemSyncAccessHandle-flush.https.tentative.worker.html", + "fs/FileSystemSyncAccessHandle-flush.https.worker.html", {} ] ], - "FileSystemSyncAccessHandle-getSize.https.tentative.worker.js": [ + "FileSystemSyncAccessHandle-getSize.https.worker.js": [ "4b62b280b96044ea85d2e31fbd79829ce39b9c13", [ - "fs/FileSystemSyncAccessHandle-getSize.https.tentative.worker.html", + "fs/FileSystemSyncAccessHandle-getSize.https.worker.html", {} ] ], - "FileSystemSyncAccessHandle-read-write.https.tentative.worker.js": [ - "a22608a2c7da86e80d747a119759c95321d86f73", + "FileSystemSyncAccessHandle-read-write.https.worker.js": [ + "1c8fda94bbeb09bec8f395364bcea3a6343c3a3d", [ - "fs/FileSystemSyncAccessHandle-read-write.https.tentative.worker.html", + "fs/FileSystemSyncAccessHandle-read-write.https.worker.html", {} ] ], - "FileSystemSyncAccessHandle-truncate.https.tentative.worker.js": [ + "FileSystemSyncAccessHandle-truncate.https.worker.js": [ "e5f557e070caba40b861fd83bac7f2bae3bea492", [ - "fs/FileSystemSyncAccessHandle-truncate.https.tentative.worker.html", + "fs/FileSystemSyncAccessHandle-truncate.https.worker.html", {} ] ], @@ -571375,6 +571768,27 @@ ] ] }, + "form-sizing-input-number.tentative.html": [ + "59835805a07148061b3e37b12d98d345a7f6b4cb", + [ + null, + {} + ] + ], + "form-sizing-input-text.tentative.html": [ + "32cabc557f6fc2d7cc22dcfa5eac7bd9059d5615", + [ + null, + {} + ] + ], + "form-sizing-textarea.tentative.html": [ + "ae20e59290c7d4d8bef9d36af583356f08819014", + [ + null, + {} + ] + ], "input-date-no-resize-on-hover.html": [ "74952ca239524b08890dc670c4972fa794bcfce4", [ @@ -580192,7 +580606,7 @@ ] ], "popover-light-dismiss-flat-tree.html": [ - "d2792a895cce9acb17d1c0a22ccbd880dcf81588", + "26c8d7af4c1c18fc1cd0e1a5663dcd815537bc11", [ null, { @@ -580272,7 +580686,7 @@ ] ], "popover-shadowhost-focus.html": [ - "4dcf6692420d249ccc42d64464cd32ecf3ba3418", + "d5899d21bb00f9202d19f216a2623570b88be3a0", [ null, {} @@ -597991,7 +598405,7 @@ ] ], "MediaStreamTrack-video-stats.https.html": [ - "461be1f0ef6a625a760ee4a46ab0e5242f9baf8e", + "0f85f75b665b53fece76902410a7227e28caeab5", [ null, { @@ -606196,15 +606610,15 @@ } ] ], - "performance-navigation-timing-lock.https.tentative.window.js": [ - "c2c3c0b9a624e7f1e12c46647022c81fad367e37", + "performance-navigation-timing-fetch.tentative.window.js": [ + "5cd35c7ba362e1a1b844fab38fe72e4991005192", [ - "performance-timeline/not-restored-reasons/performance-navigation-timing-lock.https.tentative.window.html", + "performance-timeline/not-restored-reasons/performance-navigation-timing-fetch.tentative.window.html", { "script_metadata": [ [ "title", - "RemoteContextHelper navigation using BFCache" + "Ensure that ongoing fetch upon entering bfcache blocks bfcache and recorded." ], [ "script", @@ -606239,6 +606653,96 @@ } ] ], + "performance-navigation-timing-lock.https.tentative.window.js": [ + "46d8752f20d9674f64999c2693ae60855f07dc9b", + [ + "performance-timeline/not-restored-reasons/performance-navigation-timing-lock.https.tentative.window.html", + { + "script_metadata": [ + [ + "title", + "Ensure that if WebLock is held upon entering bfcache, it cannot enter bfcache and gets reported." + ], + [ + "script", + "./test-helper.js" + ], + [ + "script", + "/common/dispatcher/dispatcher.js" + ], + [ + "script", + "/common/get-host-info.sub.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "/html/browsers/browsing-the-web/back-forward-cache/resources/rc-helper.js" + ], + [ + "script", + "/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js" + ], + [ + "timeout", + "long" + ] + ], + "timeout": "long" + } + ] + ], + "performance-navigation-timing-navigation-failure.tentative.window.js": [ + "4022e6e59f1c010207051697d0bf098143bfc309", + [ + "performance-timeline/not-restored-reasons/performance-navigation-timing-navigation-failure.tentative.window.html", + { + "script_metadata": [ + [ + "title", + "Ensure that navigation failure blocks bfcache and gets recorded." + ], + [ + "script", + "./test-helper.js" + ], + [ + "script", + "/common/dispatcher/dispatcher.js" + ], + [ + "script", + "/common/get-host-info.sub.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "/html/browsers/browsing-the-web/back-forward-cache/resources/rc-helper.js" + ], + [ + "script", + "/html/browsers/browsing-the-web/back-forward-cache/resources/404.py" + ], + [ + "script", + "/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js" + ], + [ + "timeout", + "long" + ] + ], + "timeout": "long" + } + ] + ], "performance-navigation-timing-not-bfcached.tentative.window.js": [ "0dc1519d1bb1c05026029f5ff644738f74fcd744", [ @@ -632475,7 +632979,7 @@ ] ], "static-router-subresource.https.html": [ - "721c2797603bb568172c6804b07e195d14d2018e", + "7d956363e681c1c3ee03ade088fbf371ae5b0b8c", [ null, {} @@ -660029,7 +660533,7 @@ ] ], "setTargetAtTime-after-event-within-block.html": [ - "827aeeabd47962ca52ff187f770cce3deb58d077", + "0e6863986ab676e1a6394e83ff4e611c2b028089", [ null, {} @@ -661600,7 +662104,7 @@ ] ], "audio-decoder.https.any.js": [ - "f83efe17a0ffd24042c3f7ae21f810dc25efab8b", + "52e6d7683d29fbb3005bf20374b46da5f6eb36d0", [ "webcodecs/audio-decoder.https.any.html", { @@ -661651,7 +662155,7 @@ ] ], "audio-encoder-config.https.any.js": [ - "379c83cfa94757d25b1a72571d0033afac41ea0d", + "99b64cd4ab86d819c44a6f7b0a4d8a6c438a4b7b", [ "webcodecs/audio-encoder-config.https.any.html", { @@ -661684,7 +662188,7 @@ ] ], "audio-encoder.https.any.js": [ - "7db9148ed58433c0686b6117097a01f6dfc55b2f", + "cd7739bcd26deb4fb8e5970d39180d68e3a331d3", [ "webcodecs/audio-encoder.https.any.html", { @@ -664141,7 +664645,7 @@ ] ], "video-decoder.https.any.js": [ - "b96c12479c71cd9f3dece7a8523598067d2b5689", + "38e0338a06436629d6e65a0699ed00f3fd0b3d66", [ "webcodecs/video-decoder.https.any.html", { @@ -664174,7 +664678,7 @@ ] ], "video-encoder-config.https.any.js": [ - "bbf9a3fdd35144c6b81ca1c811f86402a50c83c4", + "996684878890058be62d468cc7609a1a5d9842f8", [ "webcodecs/video-encoder-config.https.any.html", { @@ -664206,6 +664710,55 @@ } ] ], + "video-encoder-flush.https.any.js": [ + "8f1724bc8571df44127cbb32a80915ded9b74687", + [ + "webcodecs/video-encoder-flush.https.any.html", + { + "script_metadata": [ + [ + "global", + "window,dedicatedworker" + ], + [ + "script", + "/common/media.js" + ], + [ + "script", + "/webcodecs/utils.js" + ], + [ + "script", + "/webcodecs/video-encoder-utils.js" + ] + ] + } + ], + [ + "webcodecs/video-encoder-flush.https.any.worker.html", + { + "script_metadata": [ + [ + "global", + "window,dedicatedworker" + ], + [ + "script", + "/common/media.js" + ], + [ + "script", + "/webcodecs/utils.js" + ], + [ + "script", + "/webcodecs/video-encoder-utils.js" + ] + ] + } + ] + ], "video-encoder-h264.https.any.js": [ "82370a8338c2c46a42449d0111cd5f97cd85ddbd", [ @@ -664420,7 +664973,7 @@ ] ], "video-encoder.https.any.js": [ - "c8db068e12fa29ee2bb5c39840af6e1ab2636255", + "2746e60917b9e920a9015c925f7dc003021ebd04", [ "webcodecs/video-encoder.https.any.html", { @@ -664535,7 +665088,7 @@ ] ], "videoDecoder-codec-specific.https.any.js": [ - "09e20379898aad8035f683f6f0065b977ed14436", + "6b759da536186e4d27c6c464111e4f89b1f0ff2d", [ "webcodecs/videoDecoder-codec-specific.https.any.html?av1", { @@ -707278,14 +707831,14 @@ "input": { "perform_actions": { "invalid.py": [ - "19b7a57dd11b9294f339706fd2acf08acdb71b97", + "7513ab93976a1a02afbe0c36d389ebe6a371ee36", [ null, {} ] ], "key.py": [ - "e721393c0d0a2ff54a06dd800f4c69a1e7ee40bc", + "ac3099a1ba34054a0d69ba516a7be71449043f9f", [ null, {} @@ -707307,8 +707860,15 @@ {} ] ], + "pointer.py": [ + "6109450a23c1d49215a2cc4ef8547789d568eb79", + [ + null, + {} + ] + ], "pointer_mouse.py": [ - "a1b2532dd729797323728c429533f39e7ffbb4aa", + "c0c4d6ff9530464b8b39c934baf44e5e9e01641d", [ null, {} @@ -707338,7 +707898,7 @@ ] ], "pointer_origin.py": [ - "8667574602d2363d7a16fb74ae346de20cd0f5ab", + "f6721e07f39bf1c5a4804d0b82ccaf061003fd22", [ null, {} @@ -707359,7 +707919,14 @@ ] ], "wheel.py": [ - "c4999fe55dafbed5aadecef449fef94f863fbd0b", + "2da3861f9377b00d30b0e9f9ba1c77e7ff79f066", + [ + null, + {} + ] + ], + "wheel_origin.py": [ + "999b1415006aa95d2eb91c141c7f3b4e26ca4781", [ null, {} @@ -709141,7 +709708,7 @@ }, "perform_actions": { "invalid.py": [ - "7f34a657e1f939f14ce74ff2339fa5ca15265d83", + "b0302131a0ac28b9c704806deaf4585f39919126", [ null, {
diff --git a/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-001-ref.html b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-001-ref.html new file mode 100644 index 0000000..6a454d60 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-001-ref.html
@@ -0,0 +1,66 @@ +<!DOCTYPE html> +<title>CSS Box Alignment: non-normal align-content establishes block formatting context root on blocks</title> +<link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"> + +<style> + html, body { margin: 0; font-size: 10px; line-height: 1; color: transparent; } + /* show bounds of test box without interfering with margin-collapsing */ + .test { background: black; padding-right: 2px; margin: 0.5em; } + /* ensure float cannot penetrate */ + .outer-float { float: left; height: 600px; /* reftest limit = 600px */ + margin: 0 1em; background: gray; } + /* ensure float is contained */ + .float { float: left; background: orange; height: 2em } + /* ensure margin is contained */ + .in-flow { margin-top: 1em; background: orange } + + /* reference code */ + .test { overflow: hidden; display: flow-root; } +</style> + +<div class="outer-float">FLT</div> +<div class="test"> + <div class="in-flow"><div class="float">FLT</div>BLOCK</div> +</div> +<div class="test"> + <div class="in-flow"><div class="float">FLT</div>BLOCK</div> +</div> +<div class="test"> + <div class="in-flow"><div class="float">FLT</div>BLOCK</div> +</div> +<div class="test"> + <div class="in-flow"><div class="float">FLT</div>BLOCK</div> +</div> +<div class="test"> + <div class="in-flow"><div class="float">FLT</div>BLOCK</div> +</div> +<div class="test"> + <div class="in-flow"><div class="float">FLT</div>BLOCK</div> +</div> +<div class="test"> + <div class="in-flow"><div class="float">FLT</div>BLOCK</div> +</div> +<div class="test"> + <div class="in-flow"><div class="float">FLT</div>BLOCK</div> +</div> +<div class="test"> + <div class="in-flow"><div class="float">FLT</div>BLOCK</div> +</div> +<div class="test"> + <div class="in-flow"><div class="float">FLT</div>BLOCK</div> +</div> +<div class="test"> + <div class="in-flow"><div class="float">FLT</div>BLOCK</div> +</div> +<div class="test"> + <div class="in-flow"><div class="float">FLT</div>BLOCK</div> +</div> +<div class="test"> + <div class="in-flow"><div class="float">FLT</div>BLOCK</div> +</div> +<div class="test"> + <div class="in-flow"><div class="float">FLT</div>BLOCK</div> +</div> +<div class="test" style="overflow: visible; display: block"> + <div class="in-flow"><div class="float">FLT</div>BLOCK</div> +</div>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-001.html b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-001.html new file mode 100644 index 0000000..472ecae --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-001.html
@@ -0,0 +1,65 @@ +<!DOCTYPE html> +<title>CSS Box Alignment: non-normal align-content establishes block formatting context root on blocks</title> +<link rel="help" href="https://www.w3.org/TR/css-align-3/#align-block"> +<link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"> +<link rel="match" href="align-content-block-001-ref.html"> + +<style> + html, body { margin: 0; font-size: 10px; line-height: 1; color: transparent; } + /* show bounds of test box without interfering with margin-collapsing */ + .test { background: black; padding-right: 2px; margin: 0.5em; } + /* ensure float cannot penetrate */ + .outer-float { float: left; height: 600px; /* reftest limit = 600px */ + margin: 0 1em; background: gray; } + /* ensure float is contained */ + .float { float: left; background: orange; height: 2em } + /* ensure margin is contained */ + .in-flow { margin-top: 1em; background: orange } +</style> + +<div class="outer-float">FLT</div> +<div class="test" style="align-content: start"> + <div class="in-flow"><div class="float">FLT</div>BLOCK</div> +</div> +<div class="test" style="align-content: center"> + <div class="in-flow"><div class="float">FLT</div>BLOCK</div> +</div> +<div class="test" style="align-content: end"> + <div class="in-flow"><div class="float">FLT</div>BLOCK</div> +</div> +<div class="test" style="align-content: baseline"> + <div class="in-flow"><div class="float">FLT</div>BLOCK</div> +</div> +<div class="test" style="align-content: flex-start"> + <div class="in-flow"><div class="float">FLT</div>BLOCK</div> +</div> +<div class="test" style="align-content: flex-end"> + <div class="in-flow"><div class="float">FLT</div>BLOCK</div> +</div> +<div class="test" style="align-content: unsafe start"> + <div class="in-flow"><div class="float">FLT</div>BLOCK</div> +</div> +<div class="test" style="align-content: unsafe center"> + <div class="in-flow"><div class="float">FLT</div>BLOCK</div> +</div> +<div class="test" style="align-content: unsafe end"> + <div class="in-flow"><div class="float">FLT</div>BLOCK</div> +</div> +<div class="test" style="align-content: safe start"> + <div class="in-flow"><div class="float">FLT</div>BLOCK</div> +</div> +<div class="test" style="align-content: safe center"> + <div class="in-flow"><div class="float">FLT</div>BLOCK</div> +</div> +<div class="test" style="align-content: safe end"> + <div class="in-flow"><div class="float">FLT</div>BLOCK</div> +</div> +<div class="test" style="align-content: space-between"> + <div class="in-flow"><div class="float">FLT</div>BLOCK</div> +</div> +<div class="test" style="align-content: space-around"> + <div class="in-flow"><div class="float">FLT</div>BLOCK</div> +</div> +<div class="test" style="align-content: start; align-content: normal"> + <div class="in-flow"><div class="float">FLT</div>BLOCK</div> +</div>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-001.html.ini b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-001.html.ini new file mode 100644 index 0000000..9cec50f --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-001.html.ini
@@ -0,0 +1,2 @@ +[align-content-block-001.html] + expected: FAIL
diff --git a/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-002-ref.html b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-002-ref.html new file mode 100644 index 0000000..d7bde74e --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-002-ref.html
@@ -0,0 +1,231 @@ +<!DOCTYPE html> +<title>CSS Box Alignment: align-content on large block container</title> +<link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"> + +<style title="Needed for automation; delete to review/debug"> + @import "/fonts/ahem.css"; + html { font: 10px/1 Ahem; max-width: 800px; } + .label { display: none; } +</style> + +<style> + html, body { margin: 0; padding: 0; } + + .test { height: 5em; margin: 0.5em 2em; + /* show bounds of test box without interfering with margin-collapsing */ + background: black; padding-right: 2px; + /* ensure bullet follows first line */ + display: list-item; } + /* ensure margin is contained */ + .in-flow { margin: 1em 0 0.4em; background: orange } + /* ensure relpos is ignored */ + .relpos { position: relative; top: -1.5em; } + /* ensure abspos static position follows alignment */ + .wrapper { position: relative; } + .abspos { position: absolute; right: 0; margin-top: -1.5em; } + /* ensure overflow is not counted */ + .overflow { height: 0; } + + /* cram into 800x600 */ + html { max-height: 600px; columns: 3 } + .wrapper { break-inside: avoid; border: solid 2px gray; } + + /* readability */ + .test > * { color: #8888; } + .label { color: black; font-weight: bold; } + + /* reference code */ + .test { box-sizing: border-box; } + .in-flow { margin: 0; } +</style> + +<div class="wrapper"> + <div class="test" style="padding-top: 1em"> + <div class="in-flow"></div> + <div class="in-flow"> + <span class="label">START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="padding-top: 2.3em"> + <div class="in-flow"></div> + <div class="in-flow"> + <span class="label">CENTER</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="padding-top: 3.6em"> + <div class="in-flow"></div> + <div class="in-flow"> + <span class="label">END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="padding-top: 1em"> + <div class="in-flow"></div> + <div class="in-flow"> + <span class="label">BASELINE</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="padding-top: 3.6em"> + <div class="in-flow"></div> + <div class="in-flow"> + <span class="label">LAST BASELINE</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="padding-top: 1em"> + <div class="in-flow"></div> + <div class="in-flow"> + <span class="label">FLEX-START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="padding-top: 3.6em"> + <div class="in-flow"></div> + <div class="in-flow"> + <span class="label">FLEX-END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="padding-top: 1em"> + <div class="in-flow"></div> + <div class="in-flow"> + <span class="label">UNSAFE START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="padding-top: 2.3em"> + <div class="in-flow"></div> + <div class="in-flow"> + <span class="label">UNSAFE CENTER</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="padding-top: 3.6em"> + <div class="in-flow"></div> + <div class="in-flow"> + <span class="label">UNSAFE END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="padding-top: 1em"> + <div class="in-flow"></div> + <div class="in-flow"> + <span class="label">SAFE START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="padding-top: 2.3em"> + <div class="in-flow"></div> + <div class="in-flow"> + <span class="label">SAFE CENTER</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="padding-top: 3.6em"> + <div class="in-flow"></div> + <div class="in-flow"> + <span class="label">SAFE END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="padding-top: 2.3em"> + <div class="in-flow"></div> + <div class="in-flow"> + <span class="label">SPACE-EVENLY</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="padding-top: 1em"> + <div class="in-flow"></div> + <div class="in-flow"> + <span class="label">SPACE-BETWEEN</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="padding-top: 2.3em"> + <div class="in-flow"></div> + <div class="in-flow"> + <span class="label">SPACE-AROUND</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="margin-top: 1em"> + <div class="in-flow"></div> + <div class="in-flow"> + <span class="label">NORMAL</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> + +<p> + <button onclick="document.querySelector('style[title]').textContent = 'html { font-size: 12px; }'">Show Text</button>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-002.html b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-002.html new file mode 100644 index 0000000..bad174d --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-002.html
@@ -0,0 +1,229 @@ +<!DOCTYPE html> +<title>CSS Box Alignment: align-content on large block container</title> +<link rel="help" href="https://www.w3.org/TR/css-align-3/#align-block"> +<link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"> +<link rel="match" href="align-content-block-002-ref.html"> + +<style title="Needed for automation; delete to review/debug"> + @import "/fonts/ahem.css"; + html { font: 10px/1 Ahem; max-width: 800px; } + .label { display: none; } +</style> + +<style> + html, body { margin: 0; padding: 0; } + + .test { height: 5em; margin: 0.5em 2em; + /* show bounds of test box without interfering with margin-collapsing */ + background: black; padding-right: 2px; + /* ensure bullet follows first line */ + display: list-item; } + /* ensure margin is contained */ + .in-flow { margin: 1em 0 0.4em; background: orange } + /* ensure relpos is ignored */ + .relpos { position: relative; top: -1.5em; } + /* ensure abspos static position follows alignment */ + .wrapper { position: relative; } + .abspos { position: absolute; right: 0; margin-top: -1.5em; } + /* ensure overflow is not counted */ + .overflow { height: 0; } + + /* cram into 800x600 */ + html { max-height: 600px; columns: 3 } + .wrapper { break-inside: avoid; border: solid 2px gray; } + + /* readability */ + .test > * { color: #8888; } + .label { color: black; font-weight: bold; } +</style> + +<div class="wrapper"> + <div class="test" style="align-content: start"> + <div class="in-flow"></div> + <div class="in-flow"> + <span class="label">START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: center"> + <div class="in-flow"></div> + <div class="in-flow"> + <span class="label">CENTER</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: end"> + <div class="in-flow"></div> + <div class="in-flow"> + <span class="label">END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: baseline"> + <div class="in-flow"></div> + <div class="in-flow"> + <span class="label">BASELINE</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: last baseline"> + <div class="in-flow"></div> + <div class="in-flow"> + <span class="label">LAST BASELINE</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: flex-start"> + <div class="in-flow"></div> + <div class="in-flow"> + <span class="label">FLEX-START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: flex-end"> + <div class="in-flow"></div> + <div class="in-flow"> + <span class="label">FLEX-END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: unsafe start"> + <div class="in-flow"></div> + <div class="in-flow"> + <span class="label">UNSAFE START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: unsafe center"> + <div class="in-flow"></div> + <div class="in-flow"> + <span class="label">UNSAFE CENTER</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: unsafe end"> + <div class="in-flow"></div> + <div class="in-flow"> + <span class="label">UNSAFE END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: safe start"> + <div class="in-flow"></div> + <div class="in-flow"> + <span class="label">SAFE START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: safe center"> + <div class="in-flow"></div> + <div class="in-flow"> + <span class="label">SAFE CENTER</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: safe end"> + <div class="in-flow"></div> + <div class="in-flow"> + <span class="label">SAFE END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: space-evenly"> + <div class="in-flow"></div> + <div class="in-flow"> + <span class="label">SPACE-EVENLY</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: space-between"> + <div class="in-flow"></div> + <div class="in-flow"> + <span class="label">SPACE-BETWEEN</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: space-around"> + <div class="in-flow"></div> + <div class="in-flow"> + <span class="label">SPACE-AROUND</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: normal"> + <div class="in-flow"></div> + <div class="in-flow"> + <span class="label">NORMAL</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> + +<p> + <button onclick="document.querySelector('style[title]').textContent = 'html { font-size: 12px; }'">Show Text</button>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-002.html.ini b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-002.html.ini new file mode 100644 index 0000000..5f0d16e --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-002.html.ini
@@ -0,0 +1,2 @@ +[align-content-block-002.html] + expected: FAIL
diff --git a/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-003-ref.html b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-003-ref.html new file mode 100644 index 0000000..34414804 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-003-ref.html
@@ -0,0 +1,230 @@ +<!DOCTYPE html> +<title>CSS Box Alignment: align-content on small block container</title> +<link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"> + +<style title="Needed for automation; delete to review/debug"> + @import "/fonts/ahem.css"; + html { font: 10px/1 Ahem; max-width: 800px; } + .label { display: none; } +</style> + +<style> + html, body { margin: 0; padding: 0; } + + .test { height: 0.5em; margin: 0.5em 2em; + /* show bounds of test box without interfering with margin-collapsing */ + background: black; padding-right: 2px; + /* ensure bullet follows first line */ + display: list-item; } + /* ensure margin is contained */ + .in-flow { margin: 1em 0 0.5em; background: orange } + /* ensure relpos is ignored */ + .relpos { position: relative; top: -1.5em; } + /* ensure abspos static position follows alignment */ + .wrapper { position: relative; } + .abspos { position: absolute; right: 0; margin-top: -1.5em; } + /* ensure overflow is not counted */ + .overflow { height: 0; } + + /* cram into 800x600 */ + html { max-height: 600px; columns: 3 } + .wrapper { break-inside: avoid; border: solid 2px gray; padding: 2em 0; } + + /* readability */ + .test > * { color: #8888; } + .label { color: black; font-weight: bold; } + + /* reference code */ + .in-flow { margin: 0; } +</style> + +<div class="wrapper"> + <div class="test"> + <div style="padding-top: 1em"></div> + <div class="in-flow"> + <span class="label">START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test"> + <div style="padding-top: 1em"></div> + <div class="in-flow"> + <span class="label">CENTER</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test"> + <div style="padding-top: 1em"></div> + <div class="in-flow"> + <span class="label">END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test"> + <div style="padding-top: 1em"></div> + <div class="in-flow"> + <span class="label">BASELINE</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test"> + <div style="padding-top: 1em"></div> + <div class="in-flow"> + <span class="label">LAST BASELINE</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test"> + <div style="padding-top: 1em"></div> + <div class="in-flow"> + <span class="label">FLEX-START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test"> + <div style="padding-top: 1em"></div> + <div class="in-flow"> + <span class="label">FLEX-END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test"> + <div style="padding-top: 1em"></div> + <div class="in-flow"> + <span class="label">UNSAFE START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test"> + <div style="padding-top: 1em; margin-bottom: -1em"></div> + <div class="in-flow"> + <span class="label">UNSAFE CENTER</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test"> + <div style="padding-top: 1em; margin-bottom: -2em"></div> + <div class="in-flow"> + <span class="label">UNSAFE END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test"> + <div style="padding-top: 1em"></div> + <div class="in-flow"> + <span class="label">SAFE START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test"> + <div style="padding-top: 1em"></div> + <div class="in-flow"> + <span class="label">SAFE CENTER</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test"> + <div style="padding-top: 1em"></div> + <div class="in-flow"> + <span class="label">SAFE END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test"> + <div style="padding-top: 1em"></div> + <div class="in-flow"> + <span class="label">SPACE-EVENLY</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test"> + <div style="padding-top: 1em"></div> + <div class="in-flow"> + <span class="label">SPACE-BETWEEN</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test"> + <div style="padding-top: 1em"></div> + <div class="in-flow"> + <span class="label">SPACE-AROUND</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test"> + <div style="margin-top: 1em"></div> + <div class="in-flow"> + <span class="label">NORMAL</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> + +<p> + <button onclick="document.querySelector('style[title]').textContent = 'html { font-size: 12px; }'">Show Text</button>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-003.html b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-003.html new file mode 100644 index 0000000..9356d2a --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-003.html
@@ -0,0 +1,229 @@ +<!DOCTYPE html> +<title>CSS Box Alignment: align-content on small block container</title> +<link rel="help" href="https://www.w3.org/TR/css-align-3/#align-block"> +<link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"> +<link rel="match" href="align-content-block-003-ref.html"> + +<style title="Needed for automation; delete to review/debug"> + @import "/fonts/ahem.css"; + html { font: 10px/1 Ahem; max-width: 800px; } + .label { display: none; } +</style> + +<style> + html, body { margin: 0; padding: 0; } + + .test { height: 0.5em; margin: 0.5em 2em; + /* show bounds of test box without interfering with margin-collapsing */ + background: black; padding-right: 2px; + /* ensure bullet follows first line */ + display: list-item; } + /* ensure margin is contained */ + .in-flow { margin: 1em 0 0.5em; background: orange } + /* ensure relpos is ignored */ + .relpos { position: relative; top: -1.5em; } + /* ensure abspos static position follows alignment */ + .wrapper { position: relative; } + .abspos { position: absolute; right: 0; margin-top: -1.5em; } + /* ensure overflow is not counted */ + .overflow { height: 0; } + + /* cram into 800x600 */ + html { max-height: 600px; columns: 3 } + .wrapper { break-inside: avoid; border: solid 2px gray; padding: 2em 0; } + + /* readability */ + .test > * { color: #8888; } + .label { color: black; font-weight: bold; } +</style> + +<div class="wrapper"> + <div class="test" style="align-content: start"> + <div class="in-flow"></div> + <div class="in-flow"> + <span class="label">START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: center"> + <div class="in-flow"></div> + <div class="in-flow"> + <span class="label">CENTER</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: end"> + <div class="in-flow"></div> + <div class="in-flow"> + <span class="label">END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: baseline"> + <div class="in-flow"></div> + <div class="in-flow"> + <span class="label">BASELINE</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: last baseline"> + <div class="in-flow"></div> + <div class="in-flow"> + <span class="label">LAST BASELINE</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: flex-start"> + <div class="in-flow"></div> + <div class="in-flow"> + <span class="label">FLEX-START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: flex-end"> + <div class="in-flow"></div> + <div class="in-flow"> + <span class="label">FLEX-END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: unsafe start"> + <div class="in-flow"></div> + <div class="in-flow"> + <span class="label">UNSAFE START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: unsafe center"> + <div class="in-flow"></div> + <div class="in-flow"> + <span class="label">UNSAFE CENTER</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: unsafe end"> + <div class="in-flow"></div> + <div class="in-flow"> + <span class="label">UNSAFE END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: safe start"> + <div class="in-flow"></div> + <div class="in-flow"> + <span class="label">SAFE START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: safe center"> + <div class="in-flow"></div> + <div class="in-flow"> + <span class="label">SAFE CENTER</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: safe end"> + <div class="in-flow"></div> + <div class="in-flow"> + <span class="label">SAFE END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: space-evenly"> + <div class="in-flow"></div> + <div class="in-flow"> + <span class="label">SPACE-EVENLY</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: space-between"> + <div class="in-flow"></div> + <div class="in-flow"> + <span class="label">SPACE-BETWEEN</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: space-around"> + <div class="in-flow"></div> + <div class="in-flow"> + <span class="label">SPACE-AROUND</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: normal"> + <div class="in-flow"></div> + <div class="in-flow"> + <span class="label">NORMAL</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> + +<p> + <button onclick="document.querySelector('style[title]').textContent = 'html { font-size: 12px; }'">Show Text</button>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-003.html.ini b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-003.html.ini new file mode 100644 index 0000000..c1bb474 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-003.html.ini
@@ -0,0 +1,2 @@ +[align-content-block-003.html] + expected: FAIL
diff --git a/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-004-ref.html b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-004-ref.html new file mode 100644 index 0000000..ba1182b --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-004-ref.html
@@ -0,0 +1,264 @@ +<!DOCTYPE html> +<title>CSS Box Alignment: align-content on large block container with floats</title> +<link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"> + +<style title="Needed for automation; delete to review/debug"> + @import "/fonts/ahem.css"; + html { font: 10px/1 Ahem; max-width: 800px; } + .label { display: none; } +</style> + +<style> + html, body { margin: 0; padding: 0; } + + .test { height: 5em; margin: 0.5em 1em; + /* show bounds of test box without interfering with margin-collapsing */ + background: black; padding-right: 2px; } + /* ensure float is contained */ + .float { float: right; background: orange; height: 2em } + /* ensure margin is contained */ + .in-flow { margin-top: 1em; background: orange } + /* ensure relpos is ignored */ + .relpos { position: relative; top: -1.5em; } + /* ensure abspos static position follows alignment */ + .wrapper { position: relative; } + .abspos { position: absolute; right: 0; margin-top: -1.5em; } + /* ensure overflow is not counted */ + .overflow { height: 0; } + + /* cram into 800x600 */ + html { max-height: 600px; columns: 3 } + .wrapper { break-inside: avoid; border: solid 2px gray; } + + /* readability */ + .test > * { color: #8888; } + .label { color: black; font-weight: bold; } + + /* reference code */ + .test { display: flow-root; box-sizing: border-box; } +</style> + +<div class="wrapper"> + <div class="test" style="padding-top: 0"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="padding-top: 1em"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">CENTER</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="padding-top: 2em"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="padding-top: 0"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">BASELINE</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="padding-top: 2em"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">LAST BASELINE</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="padding-top: 0"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">FLEX-START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="padding-top: 2em"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">FLEX-END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="padding-top: 0"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">UNSAFE START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="padding-top: 1em"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">UNSAFE CENTER</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="padding-top: 2em"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">UNSAFE END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="padding-top: 0"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SAFE START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="padding-top: 1em"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SAFE CENTER</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="padding-top: 2em"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SAFE END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="padding-top: 1em"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SPACE-EVENLY</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="padding-top: 0"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SPACE-BETWEEN</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="padding-top: 1em"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SPACE-AROUND</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="display: block"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">NORMAL</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> + +<p> + <button onclick="document.querySelector('style[title]').textContent = 'html { font-size: 12px; }'">Show Text</button>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-004.html b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-004.html new file mode 100644 index 0000000..38a3309 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-004.html
@@ -0,0 +1,263 @@ +<!DOCTYPE html> +<title>CSS Box Alignment: align-content on large block container with floats</title> +<link rel="help" href="https://www.w3.org/TR/css-align-3/#align-block"> +<link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"> +<link rel="match" href="align-content-block-004-ref.html"> + +<style title="Needed for automation; delete to review/debug"> + @import "/fonts/ahem.css"; + html { font: 10px/1 Ahem; max-width: 800px; } + .label { display: none; } +</style> + +<style> + html, body { margin: 0; padding: 0; } + + .test { height: 5em; margin: 0.5em 1em; + /* show bounds of test box without interfering with margin-collapsing */ + background: black; padding-right: 2px; } + /* ensure float is contained */ + .float { float: right; background: orange; height: 2em } + /* ensure margin is contained */ + .in-flow { margin-top: 1em; background: orange } + /* ensure relpos is ignored */ + .relpos { position: relative; top: -1.5em; } + /* ensure abspos static position follows alignment */ + .wrapper { position: relative; } + .abspos { position: absolute; right: 0; margin-top: -1.5em; } + /* ensure overflow is not counted */ + .overflow { height: 0; } + + /* cram into 800x600 */ + html { max-height: 600px; columns: 3 } + .wrapper { break-inside: avoid; border: solid 2px gray; } + + /* readability */ + .test > * { color: #8888; } + .label { color: black; font-weight: bold; } +</style> + +<div class="wrapper"> + <div class="test" style="align-content: start"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: center"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">CENTER</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: end"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: baseline"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">BASELINE</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: last baseline"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">LAST BASELINE</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: flex-start"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">FLEX-START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: flex-end"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">FLEX-END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: unsafe start"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">UNSAFE START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: unsafe center"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">UNSAFE CENTER</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: unsafe end"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">UNSAFE END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: safe start"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SAFE START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: safe center"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SAFE CENTER</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: safe end"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SAFE END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: space-evenly"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SPACE-EVENLY</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: space-between"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SPACE-BETWEEN</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: space-around"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SPACE-AROUND</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: normal"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">NORMAL</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> + +<p> + <button onclick="document.querySelector('style[title]').textContent = 'html { font-size: 12px; }'">Show Text</button>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-004.html.ini b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-004.html.ini new file mode 100644 index 0000000..229571e --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-004.html.ini
@@ -0,0 +1,2 @@ +[align-content-block-004.html] + expected: FAIL
diff --git a/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-005-ref.html b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-005-ref.html new file mode 100644 index 0000000..c3712610 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-005-ref.html
@@ -0,0 +1,261 @@ +<!DOCTYPE html> +<title>CSS Box Alignment: align-content on small block container with floats</title> +<link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"> + +<style title="Needed for automation; delete to review/debug"> + @import "/fonts/ahem.css"; + html { font: 10px/1 Ahem; max-width: 800px; } + .label { display: none; } +</style> + +<style> + html, body { margin: 0; padding: 0; } + + .test { height: 1em; margin: 0.5em 2em; + /* show bounds of test box without interfering with margin-collapsing */ + background: black; padding-right: 2px; } + /* ensure float is contained */ + .float { float: right; background: orange; height: 2em } + /* ensure margin is contained */ + .in-flow { margin-top: 1em; background: orange } + /* ensure relpos is ignored */ + .relpos { position: relative; top: -1.5em; } + /* ensure abspos static position follows alignment */ + .wrapper { position: relative; } + .abspos { position: absolute; right: 0; margin-top: -1.5em; } + /* ensure overflow is not counted */ + .overflow { height: 0; } + + /* cram into 800x600 */ + html { max-height: 600px; columns: 3 } + .wrapper { break-inside: avoid; border: solid 2px gray; padding: 3em 0; } + + /* readability */ + .test > * { color: #8888; } + .label { color: black; font-weight: bold; } +</style> + +<div class="wrapper"> + <div class="test"> + <div class="float">FLT</div> + <div style="padding-top: 0.5em; margin-bottom: -0.5em"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test"> + <div class="float">FLT</div> + <div style="padding-top: 0.5em; margin-bottom: -0.5em"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">CENTER</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test"> + <div class="float">FLT</div> + <div style="padding-top: 0.5em; margin-bottom: -0.5em"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test"> + <div class="float">FLT</div> + <div style="padding-top: 0.5em; margin-bottom: -0.5em"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">BASELINE</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test"> + <div class="float">FLT</div> + <div style="padding-top: 0.5em; margin-bottom: -0.5em"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">LAST BASELINE</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test"> + <div class="float">FLT</div> + <div style="padding-top: 0.5em; margin-bottom: -0.5em"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">FLEX-START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test"> + <div class="float">FLT</div> + <div style="padding-top: 0.5em; margin-bottom: -0.5em"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">FLEX-END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test"> + <div class="float">FLT</div> + <div style="padding-top: 0.5em; margin-bottom: -0.5em"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">UNSAFE START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test"> + <div class="float" style="margin-top: -1em">FLT</div> + <div style="padding-top: 0.5em; margin-bottom: -1.5em"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">UNSAFE CENTER</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test"> + <div style="padding-top: 0.5em; margin-bottom: -2.5em"></div> + <div class="in-flow"> + <div class="float" style="margin-top: -1em">FLT</div> + <div class="float">FLT</div> + <span class="label">UNSAFE END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test"> + <div class="float">FLT</div> + <div style="padding-top: 0.5em; margin-bottom: -0.5em"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SAFE START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test"> + <div class="float">FLT</div> + <div style="padding-top: 0.5em; margin-bottom: -0.5em"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SAFE CENTER</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test"> + <div class="float">FLT</div> + <div style="padding-top: 0.5em; margin-bottom: -0.5em"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SAFE END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test"> + <div class="float">FLT</div> + <div style="padding-top: 0.5em; margin-bottom: -0.5em"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SPACE-EVENLY</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test"> + <div class="float">FLT</div> + <div style="padding-top: 0.5em; margin-bottom: -0.5em"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SPACE-BETWEEN</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test"> + <div class="float">FLT</div> + <div style="padding-top: 0.5em; margin-bottom: -0.5em"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SPACE-AROUND</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test"> + <div class="float">FLT</div> + <div></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">NORMAL</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> + +<p> + <button onclick="document.querySelector('style[title]').textContent = 'html { font-size: 12px; }'">Show Text</button>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-005.html b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-005.html new file mode 100644 index 0000000..97fe6c9 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-005.html
@@ -0,0 +1,264 @@ +<!DOCTYPE html> +<title>CSS Box Alignment: align-content on small block container with floats</title> +<link rel="help" href="https://www.w3.org/TR/css-align-3/#align-block"> +<link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"> +<link rel="match" href="align-content-block-003-ref.html"> + +<style title="Needed for automation; delete to review/debug"> + @import "/fonts/ahem.css"; + html { font: 10px/1 Ahem; max-width: 800px; } + .label { display: none; } +</style> + +<style> + html, body { margin: 0; padding: 0; } + + .test { height: 1em; margin: 0.5em 2em; + /* show bounds of test box without interfering with margin-collapsing */ + background: black; padding-right: 2px; } + /* ensure float is contained */ + .float { float: right; background: orange; height: 2em } + /* ensure margin is contained */ + .in-flow { margin-top: 1em; background: orange } + /* ensure relpos is ignored */ + .relpos { position: relative; top: -1.5em; } + /* ensure abspos static position follows alignment */ + .wrapper { position: relative; } + .abspos { position: absolute; right: 0; margin-top: -1.5em; } + /* ensure overflow is not counted */ + .overflow { height: 0; } + + /* cram into 800x600 */ + html { max-height: 600px; columns: 3 } + .wrapper { break-inside: avoid; border: solid 2px gray; padding: 3em 0; } + + /* readability */ + .test > * { color: #8888; } + .label { color: black; font-weight: bold; } +</style> + +<div class="wrapper"> + <div class="test" style="align-content: start"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: center"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">CENTER</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: end"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: baseline"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">BASELINE</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: last baseline"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">LAST BASELINE</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: flex-start"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">FLEX-START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: flex-end"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">FLEX-END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: unsafe start"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">UNSAFE START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: unsafe center"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">UNSAFE CENTER</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: unsafe end"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">UNSAFE END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: safe start"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SAFE START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: safe center"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SAFE CENTER</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: safe end"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SAFE END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: space-evenly"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SPACE-EVENLY</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> + +<div class="wrapper"> + <div class="test" style="align-content: space-between"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SPACE-BETWEEN</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: space-around"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SPACE-AROUND</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: normal"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">NORMAL</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> + +<p> + <button onclick="document.querySelector('style[title]').textContent = 'html { font-size: 12px; }'">Show Text</button>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-005.html.ini b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-005.html.ini new file mode 100644 index 0000000..5fe5827 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-005.html.ini
@@ -0,0 +1,2 @@ +[align-content-block-005.html] + expected: FAIL
diff --git a/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-006.html b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-006.html new file mode 100644 index 0000000..be62e78 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-006.html
@@ -0,0 +1,282 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<title>CSS Box Alignment: align-content container change to large block container with floats</title> +<link rel="help" href="https://www.w3.org/TR/css-align-3/#align-block"> +<link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"> +<link rel="match" href="align-content-block-004-ref.html"> + +<style title="Needed for automation; delete to review/debug"> + @import "/fonts/ahem.css"; + html { font: 10px/1 Ahem; max-width: 800px; } + .label { display: none; } + #manual { display: none; } +</style> + +<style id="initial"> + .test { height: 1em !important; } +</style> +<script> + function test() + { + document.body.offsetHeight; // trigger layout + document.getElementById('initial').type = 'text/plain'; // invalidate stylesheet + document.documentElement.removeAttribute("class"); + }; + document.addEventListener("TestRendered", test); + window.addEventListener("click", () => { document.getElementById('manual').style.display = "inline"; }); +</script> + +<style> + html, body { margin: 0; padding: 0; } + + .test { height: 5em; margin: 0.5em 1em; + /* show bounds of test box without interfering with margin-collapsing */ + background: black; padding-right: 2px; } + /* ensure float is contained */ + .float { float: right; background: orange; height: 2em } + /* ensure margin is contained */ + .in-flow { margin-top: 1em; background: orange } + /* ensure relpos is ignored */ + .relpos { position: relative; top: -1.5em; } + /* ensure abspos static position follows alignment */ + .wrapper { position: relative; } + .abspos { position: absolute; right: 0; margin-top: -1.5em; } + /* ensure overflow is not counted */ + .overflow { height: 0; } + + /* cram into 800x600 */ + html { max-height: 600px; columns: 3 } + .wrapper { break-inside: avoid; border: solid 2px gray; } + + /* readability */ + .test > * { color: #8888; } + .label { color: black; font-weight: bold; } +</style> + +<body> + +<div class="wrapper"> + <div class="test" style="align-content: start"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: center"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">CENTER</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: end"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: baseline"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">BASELINE</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: last baseline"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">LAST BASELINE</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: flex-start"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">FLEX-START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: flex-end"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">FLEX-END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: unsafe start"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">UNSAFE START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: unsafe center"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">UNSAFE CENTER</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: unsafe end"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">UNSAFE END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: safe start"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SAFE START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: safe center"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SAFE CENTER</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: safe end"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SAFE END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: space-evenly"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SPACE-EVENLY</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: space-between"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SPACE-BETWEEN</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: space-around"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SPACE-AROUND</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: normal"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">NORMAL</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> + +<p> + <button onclick="document.querySelector('style[title]').textContent = 'html { font-size: 12px; }'">Show Text</button> + <button onclick="test()" id="manual">Run Test (Manual Trigger)</button>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-006.html.ini b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-006.html.ini new file mode 100644 index 0000000..e9f53587 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-006.html.ini
@@ -0,0 +1,2 @@ +[align-content-block-006.html] + expected: FAIL
diff --git a/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-007.html b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-007.html new file mode 100644 index 0000000..61c4c684 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-007.html
@@ -0,0 +1,280 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<title>CSS Box Alignment: align-content container change to small block container with floats</title> +<link rel="help" href="https://www.w3.org/TR/css-align-3/#align-block"> +<link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"> +<link rel="match" href="align-content-block-005-ref.html"> + +<style title="Needed for automation; delete to review/debug"> + @import "/fonts/ahem.css"; + html { font: 10px/1 Ahem; max-width: 800px; } + .label { display: none; } + #manual { display: none; } +</style> + +<style id="initial"> + .test { height: 5em !important; } +</style> +<script> + function test() + { + document.body.offsetHeight; // trigger layout + document.getElementById('initial').type = 'text/plain'; // invalidate stylesheet + document.documentElement.removeAttribute("class"); + }; + document.addEventListener("TestRendered", test); + window.addEventListener("click", () => { document.getElementById('manual').style.display = "inline"; }); +</script> + +<style> + html, body { margin: 0; padding: 0; } + + .test { height: 1em; margin: 0.5em 2em; + /* show bounds of test box without interfering with margin-collapsing */ + background: black; padding-right: 2px; } + /* ensure float is contained */ + .float { float: right; background: orange; height: 2em } + /* ensure margin is contained */ + .in-flow { margin-top: 1em; background: orange } + /* ensure relpos is ignored */ + .relpos { position: relative; top: -1.5em; } + /* ensure abspos static position follows alignment */ + .wrapper { position: relative; } + .abspos { position: absolute; right: 0; margin-top: -1.5em; } + /* ensure overflow is not counted */ + .overflow { height: 0; } + + /* cram into 800x600 */ + html { max-height: 600px; columns: 3 } + .wrapper { break-inside: avoid; border: solid 2px gray; padding: 3em 0; } + + /* readability */ + .test > * { color: #8888; } + .label { color: black; font-weight: bold; } +</style> + +<div class="wrapper"> + <div class="test" style="align-content: start"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: center"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">CENTER</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: end"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: baseline"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">BASELINE</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: last baseline"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">LAST BASELINE</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: flex-start"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">FLEX-START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: flex-end"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">FLEX-END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: unsafe start"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">UNSAFE START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: unsafe center"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">UNSAFE CENTER</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: unsafe end"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">UNSAFE END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: safe start"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SAFE START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: safe center"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SAFE CENTER</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: safe end"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SAFE END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: space-evenly"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SPACE-EVENLY</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: space-between"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SPACE-BETWEEN</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: space-around"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SPACE-AROUND</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: normal"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">NORMAL</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> + +<p> + <button onclick="document.querySelector('style[title]').textContent = 'html { font-size: 12px; }'">Show Text</button> + <button onclick="test()" id="manual">Run Test (Manual Trigger)</button>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-007.html.ini b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-007.html.ini new file mode 100644 index 0000000..3b67273 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-007.html.ini
@@ -0,0 +1,2 @@ +[align-content-block-007.html] + expected: FAIL
diff --git a/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-008.html b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-008.html new file mode 100644 index 0000000..e9a861c --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-008.html
@@ -0,0 +1,299 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<title>CSS Box Alignment: align-content style change on large block container with floats</title> +<link rel="help" href="https://www.w3.org/TR/css-align-3/#align-block"> +<link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"> +<link rel="match" href="align-content-block-004-ref.html"> + +<style title="Needed for automation; delete to review/debug"> + @import "/fonts/ahem.css"; + html { font: 10px/1 Ahem; max-width: 800px; } + .label { display: none; } + #manual { display: none; } +</style> + +<style id="initial"> + /* scramble test styles */ + [style$="start" ] { align-content: end !important; } + [style$="center" ] { align-content: unsafe end !important; } + [style$="end" ] { align-content: start !important; } + [style$="baseline" ] { align-content: unsafe end !important; } + [style$="last baseline"] { align-content: start !important; } + [style$="flex-start" ] { align-content: normal !important; } + [style$="flex-end" ] { align-content: start !important; } + [style$="unsafe start" ] { align-content: center !important; } + [style$="unsafe center"] { align-content: baseline !important; } + [style$="unsafe end" ] { align-content: unsafe center !important; } + [style$="safe start" ] { align-content: unsafe end !important; } + [style$="safe center" ] { align-content: normal !important; } + [style$="safe end" ] { align-content: unsafe end !important; } + [style$="space-evenly" ] { align-content: end !important; } + [style$="space-between"] { align-content: unsafe center !important; } + [style$="space-around" ] { align-content: start !important; } + [style$="normal" ] { align-content: unsafe end !important; } +</style> +<script> + function test() + { + document.body.offsetHeight; // trigger layout + document.getElementById('initial').type = 'text/plain'; // invalidate stylesheet + document.documentElement.removeAttribute("class"); + }; + document.addEventListener("TestRendered", test); + window.addEventListener("click", () => { document.getElementById('manual').style.display = "inline"; }); +</script> + +<style> + html, body { margin: 0; padding: 0; } + + .test { height: 5em; margin: 0.5em 1em; + /* show bounds of test box without interfering with margin-collapsing */ + background: black; padding-right: 2px; } + /* ensure float is contained */ + .float { float: right; background: orange; height: 2em } + /* ensure margin is contained */ + .in-flow { margin-top: 1em; background: orange } + /* ensure relpos is ignored */ + .relpos { position: relative; top: -1.5em; } + /* ensure abspos static position follows alignment */ + .wrapper { position: relative; } + .abspos { position: absolute; right: 0; margin-top: -1.5em; } + /* ensure overflow is not counted */ + .overflow { height: 0; } + + /* cram into 800x600 */ + html { max-height: 600px; columns: 3 } + .wrapper { break-inside: avoid; border: solid 2px gray; } + + /* readability */ + .test > * { color: #8888; } + .label { color: black; font-weight: bold; } +</style> + +<body> + +<div class="wrapper"> + <div class="test" style="align-content: start"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: center"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">CENTER</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: end"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: baseline"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">BASELINE</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: last baseline"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">LAST BASELINE</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: flex-start"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">FLEX-START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: flex-end"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">FLEX-END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: unsafe start"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">UNSAFE START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: unsafe center"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">UNSAFE CENTER</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: unsafe end"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">UNSAFE END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: safe start"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SAFE START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: safe center"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SAFE CENTER</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: safe end"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SAFE END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: space-evenly"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SPACE-EVENLY</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: space-between"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SPACE-BETWEEN</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: space-around"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SPACE-AROUND</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: normal"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">NORMAL</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> + +<p> + <button onclick="document.querySelector('style[title]').textContent = 'html { font-size: 12px; }'">Show Text</button> + <button onclick="test()" id="manual">Run Test (Manual Trigger)</button>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-008.html.ini b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-008.html.ini new file mode 100644 index 0000000..356c710 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-008.html.ini
@@ -0,0 +1,2 @@ +[align-content-block-008.html] + expected: FAIL
diff --git a/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-009.html b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-009.html new file mode 100644 index 0000000..0b2e8ec --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-009.html
@@ -0,0 +1,297 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<title>CSS Box Alignment: align-content style change on small block container with floats</title> +<link rel="help" href="https://www.w3.org/TR/css-align-3/#align-block"> +<link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"> +<link rel="match" href="align-content-block-005-ref.html"> + +<style title="Needed for automation; delete to review/debug"> + @import "/fonts/ahem.css"; + html { font: 10px/1 Ahem; max-width: 800px; } + .label { display: none; } + #manual { display: none; } +</style> + +<style id="initial"> + /* scramble test styles */ + [style$="start" ] { align-content: end !important; } + [style$="center" ] { align-content: unsafe end !important; } + [style$="end" ] { align-content: start !important; } + [style$="baseline" ] { align-content: unsafe end !important; } + [style$="last baseline"] { align-content: start !important; } + [style$="flex-start" ] { align-content: normal !important; } + [style$="flex-end" ] { align-content: start !important; } + [style$="unsafe start" ] { align-content: center !important; } + [style$="unsafe center"] { align-content: baseline !important; } + [style$="unsafe end" ] { align-content: unsafe center !important; } + [style$="safe start" ] { align-content: unsafe end !important; } + [style$="safe center" ] { align-content: normal !important; } + [style$="safe end" ] { align-content: unsafe end !important; } + [style$="space-evenly" ] { align-content: end !important; } + [style$="space-between"] { align-content: unsafe center !important; } + [style$="space-around" ] { align-content: start !important; } + [style$="normal" ] { align-content: unsafe end !important; } +</style> +<script> + function test() + { + document.body.offsetHeight; // trigger layout + document.getElementById('initial').type = 'text/plain'; // invalidate stylesheet + document.documentElement.removeAttribute("class"); + }; + document.addEventListener("TestRendered", test); + window.addEventListener("click", () => { document.getElementById('manual').style.display = "inline"; }); +</script> + +<style> + html, body { margin: 0; padding: 0; } + + .test { height: 1em; margin: 0.5em 2em; + /* show bounds of test box without interfering with margin-collapsing */ + background: black; padding-right: 2px; } + /* ensure float is contained */ + .float { float: right; background: orange; height: 2em } + /* ensure margin is contained */ + .in-flow { margin-top: 1em; background: orange } + /* ensure relpos is ignored */ + .relpos { position: relative; top: -1.5em; } + /* ensure abspos static position follows alignment */ + .wrapper { position: relative; } + .abspos { position: absolute; right: 0; margin-top: -1.5em; } + /* ensure overflow is not counted */ + .overflow { height: 0; } + + /* cram into 800x600 */ + html { max-height: 600px; columns: 3 } + .wrapper { break-inside: avoid; border: solid 2px gray; padding: 3em 0; } + + /* readability */ + .test > * { color: #8888; } + .label { color: black; font-weight: bold; } +</style> + +<div class="wrapper"> + <div class="test" style="align-content: start"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: center"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">CENTER</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: end"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: baseline"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">BASELINE</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: last baseline"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">LAST BASELINE</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: flex-start"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">FLEX-START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: flex-end"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">FLEX-END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: unsafe start"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">UNSAFE START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: unsafe center"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">UNSAFE CENTER</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: unsafe end"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">UNSAFE END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: safe start"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SAFE START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: safe center"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SAFE CENTER</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: safe end"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SAFE END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: space-evenly"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SPACE-EVENLY</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: space-between"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SPACE-BETWEEN</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: space-around"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SPACE-AROUND</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: normal"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">NORMAL</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> + +<p> + <button onclick="document.querySelector('style[title]').textContent = 'html { font-size: 12px; }'">Show Text</button> + <button onclick="test()" id="manual">Run Test (Manual Trigger)</button>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-009.html.ini b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-009.html.ini new file mode 100644 index 0000000..e919dc9 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-009.html.ini
@@ -0,0 +1,2 @@ +[align-content-block-009.html] + expected: FAIL
diff --git a/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-010.html b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-010.html new file mode 100644 index 0000000..ffb0e9c --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-010.html
@@ -0,0 +1,282 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<title>CSS Box Alignment: align-content content change in large block container with floats</title> +<link rel="help" href="https://www.w3.org/TR/css-align-3/#align-block"> +<link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"> +<link rel="match" href="align-content-block-004-ref.html"> + +<style title="Needed for automation; delete to review/debug"> + @import "/fonts/ahem.css"; + html { font: 10px/1 Ahem; max-width: 800px; } + .label { display: none; } + #manual { display: none; } +</style> + +<style id="initial"> + .in-flow .float { height: 0; !important } +</style> +<script> + function test() + { + document.body.offsetHeight; // trigger layout + document.getElementById('initial').type = 'text/plain'; // invalidate stylesheet + document.documentElement.removeAttribute("class"); + }; + document.addEventListener("TestRendered", test); + window.addEventListener("click", () => { document.getElementById('manual').style.display = "inline"; }); +</script> + +<style> + html, body { margin: 0; padding: 0; } + + .test { height: 5em; margin: 0.5em 1em; + /* show bounds of test box without interfering with margin-collapsing */ + background: black; padding-right: 2px; } + /* ensure float is contained */ + .float { float: right; background: orange; height: 2em } + /* ensure margin is contained */ + .in-flow { margin-top: 1em; background: orange } + /* ensure relpos is ignored */ + .relpos { position: relative; top: -1.5em; } + /* ensure abspos static position follows alignment */ + .wrapper { position: relative; } + .abspos { position: absolute; right: 0; margin-top: -1.5em; } + /* ensure overflow is not counted */ + .overflow { height: 0; } + + /* cram into 800x600 */ + html { max-height: 600px; columns: 3 } + .wrapper { break-inside: avoid; border: solid 2px gray; } + + /* readability */ + .test > * { color: #8888; } + .label { color: black; font-weight: bold; } +</style> + +<body> + +<div class="wrapper"> + <div class="test" style="align-content: start"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: center"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">CENTER</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: end"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: baseline"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">BASELINE</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: last baseline"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">LAST BASELINE</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: flex-start"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">FLEX-START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: flex-end"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">FLEX-END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: unsafe start"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">UNSAFE START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: unsafe center"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">UNSAFE CENTER</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: unsafe end"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">UNSAFE END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: safe start"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SAFE START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: safe center"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SAFE CENTER</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: safe end"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SAFE END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: space-evenly"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SPACE-EVENLY</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: space-between"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SPACE-BETWEEN</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: space-around"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SPACE-AROUND</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: normal"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">NORMAL</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> + +<p> + <button onclick="document.querySelector('style[title]').textContent = 'html { font-size: 12px; }'">Show Text</button> + <button onclick="test()" id="manual">Run Test (Manual Trigger)</button>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-010.html.ini b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-010.html.ini new file mode 100644 index 0000000..62eaa1ec4 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-010.html.ini
@@ -0,0 +1,2 @@ +[align-content-block-010.html] + expected: FAIL
diff --git a/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-011.html b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-011.html new file mode 100644 index 0000000..44b8d89 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-011.html
@@ -0,0 +1,280 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<title>CSS Box Alignment: align-content content change on small block container with floats</title> +<link rel="help" href="https://www.w3.org/TR/css-align-3/#align-block"> +<link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"> +<link rel="match" href="align-content-block-005-ref.html"> + +<style title="Needed for automation; delete to review/debug"> + @import "/fonts/ahem.css"; + html { font: 10px/1 Ahem; max-width: 800px; } + .label { display: none; } + #manual { display: none; } +</style> + +<style id="initial"> + .in-flow .float { height: 0; !important } +</style> +<script> + function test() + { + document.body.offsetHeight; // trigger layout + document.getElementById('initial').type = 'text/plain'; // invalidate stylesheet + document.documentElement.removeAttribute("class"); + }; + document.addEventListener("TestRendered", test); + window.addEventListener("click", () => { document.getElementById('manual').style.display = "inline"; }); +</script> + +<style> + html, body { margin: 0; padding: 0; } + + .test { height: 1em; margin: 0.5em 2em; + /* show bounds of test box without interfering with margin-collapsing */ + background: black; padding-right: 2px; } + /* ensure float is contained */ + .float { float: right; background: orange; height: 2em } + /* ensure margin is contained */ + .in-flow { margin-top: 1em; background: orange } + /* ensure relpos is ignored */ + .relpos { position: relative; top: -1.5em; } + /* ensure abspos static position follows alignment */ + .wrapper { position: relative; } + .abspos { position: absolute; right: 0; margin-top: -1.5em; } + /* ensure overflow is not counted */ + .overflow { height: 0; } + + /* cram into 800x600 */ + html { max-height: 600px; columns: 3 } + .wrapper { break-inside: avoid; border: solid 2px gray; padding: 3em 0; } + + /* readability */ + .test > * { color: #8888; } + .label { color: black; font-weight: bold; } +</style> + +<div class="wrapper"> + <div class="test" style="align-content: start"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: center"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">CENTER</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: end"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: baseline"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">BASELINE</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: last baseline"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">LAST BASELINE</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: flex-start"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">FLEX-START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: flex-end"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">FLEX-END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: unsafe start"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">UNSAFE START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: unsafe center"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">UNSAFE CENTER</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: unsafe end"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">UNSAFE END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: safe start"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SAFE START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: safe center"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SAFE CENTER</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: safe end"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SAFE END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: space-evenly"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SPACE-EVENLY</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: space-between"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SPACE-BETWEEN</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: space-around"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SPACE-AROUND</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: normal"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">NORMAL</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> + +<p> + <button onclick="document.querySelector('style[title]').textContent = 'html { font-size: 12px; }'">Show Text</button> + <button onclick="test()" id="manual">Run Test (Manual Trigger)</button>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-011.html.ini b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-011.html.ini new file mode 100644 index 0000000..74a96e7f --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-011.html.ini
@@ -0,0 +1,2 @@ +[align-content-block-011.html] + expected: FAIL
diff --git a/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-break-content-010-aligned-ref.html b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-break-content-010-aligned-ref.html new file mode 100644 index 0000000..4c92cc9 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-break-content-010-aligned-ref.html
@@ -0,0 +1,186 @@ +<!DOCTYPE html> +<title>CSS Box Alignment: align-content block fragmentation: simple content</title> +<link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"> +<link rel="help" href="https://www.w3.org/TR/css-align-3/#align-block"> + +<style title="Needed for automation; delete to review/debug"> + @import "/fonts/ahem.css"; + html { font: 10px/1 Ahem; max-width: 780px; } +</style> + +<style> + .pager { + column-fill: auto; + column-width: 15em; + height: 5em; + } + .test { + height: 5em; break-inside: avoid; + /* show bounds of test box without interfering with margin-collapsing */ + border-inline: solid black 1em; + } + .test:last-child { + height: 4em; + } + .large, .float { + height: 2.5em; + break-inside: avoid; + padding: 2px; /* using padding because of margin handling bugs + margin: 2px; +switch back once fixed */ + background: orange; + } + .float { + float: right; + } + .nobr { + break-inside: avoid; + } + + /* readability */ + .pager { border: solid 2px gray; margin: 0.5em 0; } + .test { color: #8888; text-align: center; } + .label { color: black; font-weight: bold; } + + /* reference */ + .center .test { align-content: center; } + .end .test { align-content: end; } + /* margins are truncated by unforced breaks, so mimic that */ + .test .large:first-child { margin-top: 0; } + .test .large:last-child { margin-bottom: 0; } +</style> + +<!-- + This test creates breaks: + * after some directly-contained text + * after a fixed-height block + * through some nested text + * after a block containing text +--> + +<div class="pager center"> + <div class="test"> + <span class="label">CENTER</span><br>LINE 2<br>LINE 3 + </div> + <div class="test"> + <div class="large"></div> + </div> + <div class="test"> + <div class="large"></div> + <div> + LINE 4 + </div> + </div> + <div class="test"> + <div> + <div class="nobr">LINE 5<br>LINE 6</div> + </div> + </div> + </div> +</div> + + +<div class="pager end"> + <div class="test"> + <span class="label">END</span><br>LINE 2<br>LINE 3 + </div> + <div class="test"> + <div class="large"></div> + </div> + <div class="test"> + <div class="large"></div> + <div> + LINE 4 + </div> + </div> + <div class="test"> + <div> + <div class="nobr">LINE 5<br>LINE 6</div> + </div> + </div> + </div> +</div> + +<div class="pager"> + <div class="test"> + <span class="label">BASELINE</span><br>LINE 2<br>LINE 3 + </div> + <div class="test"> + <div class="large"></div> + </div> + <div class="test"> + <div class="large"></div> + <div> + LINE 4 + </div> + </div> + <div class="test"> + <div> + <div class="nobr">LINE 5<br>LINE 6</div> + </div> + </div> + </div> +</div> + +<div class="pager"> + <div class="test"> + <span class="label">LAST BASELINE</span><br>LINE 2<br>LINE 3 + </div> + <div class="test"> + <div class="large"></div> + </div> + <div class="test"> + <div class="large"></div> + <div> + LINE 4 + </div> + </div> + <div class="test"> + <div> + <div class="nobr">LINE 5<br>LINE 6</div> + </div> + </div> + </div> +</div> + +<div class="pager center"> + <div class="test"> + <span class="label">UNSAFE CENTER</span><br>LINE 2<br>LINE 3 + </div> + <div class="test"> + <div class="large"></div> + </div> + <div class="test"> + <div class="large"></div> + <div> + LINE 4 + </div> + </div> + <div class="test"> + <div> + <div class="nobr">LINE 5<br>LINE 6</div> + </div> + </div> + </div> +</div> + +<div class="pager end"> + <div class="test"> + <span class="label">UNSAFE END</span><br>LINE 2<br>LINE 3 + </div> + <div class="test"> + <div class="large"></div> + </div> + <div class="test"> + <div class="large"></div> + <div> + LINE 4 + </div> + </div> + <div class="test"> + <div> + <div class="nobr">LINE 5<br>LINE 6</div> + </div> + </div> + </div> +</div>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-break-content-010-unaligned-ref.html b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-break-content-010-unaligned-ref.html new file mode 100644 index 0000000..458fcf2 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-break-content-010-unaligned-ref.html
@@ -0,0 +1,130 @@ +<!DOCTYPE html> +<title>CSS Box Alignment: align-content block fragmentation: simple content</title> +<link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"> +<link rel="help" href="https://www.w3.org/TR/css-align-3/#align-block"> + +<style title="Needed for automation; delete to review/debug"> + @import "/fonts/ahem.css"; + html { font: 10px/1 Ahem; max-width: 780px; } +</style> + +<style> + .pager { + column-fill: auto; + column-width: 15em; + height: 5em; + } + .test { + height: 19em; + /* show bounds of test box without interfering with margin-collapsing */ + border-inline: solid black 1em; + } + .large, .float { + height: 2.5em; + break-inside: avoid; + padding: 2px; /* using padding because of margin handling bugs + margin: 2px; +switch back once fixed */ + background: orange; + } + .float { + float: right; + } + .nobr { + break-inside: avoid; + } + + /* readability */ + .pager { border: solid 2px gray; margin: 0.5em 0; } + .test { color: #8888; text-align: center; } + .label { color: black; font-weight: bold; } + .test .large { margin-top: 0; } /* margins truncated by unforced breaks */ +</style> + +<!-- + This test creates breaks: + * after some directly-contained text + * after a fixed-height block + * through some nested text + * after a block containing text +--> + +<div class="pager"> + <div class="test"> + <span class="label">CENTER</span><br>LINE 2<br>LINE 3 + <div class="large"></div> + <div class="large"></div> + <div> + LINE 4 + <div class="nobr">LINE 5<br>LINE 6</div> + </div> + </div> + </div> +</div> + + +<div class="pager"> + <div class="test"> + <span class="label">END</span><br>LINE 2<br>LINE 3 + <div class="large"></div> + <div class="large"></div> + <div> + LINE 4 + <div class="nobr">LINE 5<br>LINE 6</div> + </div> + </div> + </div> +</div> + +<div class="pager"> + <div class="test"> + <span class="label">BASELINE</span><br>LINE 2<br>LINE 3 + <div class="large"></div> + <div class="large"></div> + <div> + LINE 4 + <div class="nobr">LINE 5<br>LINE 6</div> + </div> + </div> + </div> +</div> + +<div class="pager"> + <div class="test"> + <span class="label">LAST BASELINE</span><br>LINE 2<br>LINE 3 + <div class="large"></div> + <div class="large"></div> + <div> + LINE 4 + <div class="nobr">LINE 5<br>LINE 6</div> + </div> + </div> + </div> +</div> + +<div class="pager"> + <div class="test"> + <span class="label">UNSAFE CENTER</span><br>LINE 2<br>LINE 3 + <div class="large"></div> + <div class="large"></div> + <div> + LINE 4 + <div class="nobr">LINE 5<br>LINE 6</div> + </div> + </div> + </div> +</div> + + +<div class="pager"> + <div class="test"> + <span class="label">UNSAFE END</span><br>LINE 2<br>LINE 3 + <div class="large"></div> + <div class="large"></div> + <div> + LINE 4 + <div class="nobr">LINE 5<br>LINE 6</div> + </div> + </div> + </div> +</div>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-break-content-010.html b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-break-content-010.html new file mode 100644 index 0000000..27a56a60 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-break-content-010.html
@@ -0,0 +1,133 @@ +<!DOCTYPE html> +<title>CSS Box Alignment: align-content block fragmentation: simple content</title> +<link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"> +<link rel="help" href="https://www.w3.org/TR/css-align-3/#align-block"> +<meta name="flags" content="may"> +<!-- fragmented alignment is underdefined; these are two possibilities --> +<link rel="match" href="align-content-block-break-content-010-aligned-ref.html"> +<link rel="match" href="align-content-block-break-content-010-unaligned-ref.html"> + +<style title="Needed for automation; delete to review/debug"> + @import "/fonts/ahem.css"; + html { font: 10px/1 Ahem; max-width: 780px; } +</style> + +<style> + .pager { + column-fill: auto; + column-width: 15em; + height: 5em; + } + .test { + height: 19em; + /* show bounds of test box without interfering with margin-collapsing */ + border-inline: solid black 1em; + } + .large, .float { + height: 2.5em; + break-inside: avoid; + padding: 2px; /* using padding because of margin handling bugs + margin: 2px; +switch back once fixed */ + background: orange; + } + .float { + float: right; + } + .nobr { + break-inside: avoid; + } + + /* readability */ + .pager { border: solid 2px gray; margin: 0.5em 0; } + .test { color: #8888; text-align: center; } + .label { color: black; font-weight: bold; } +</style> + +<!-- + This test creates breaks: + * after some directly-contained text + * after a fixed-height block + * through some nested text + * after a block containing text +--> + +<div class="pager"> + <div class="test" style="align-content: center"> + <span class="label">CENTER</span><br>LINE 2<br>LINE 3 + <div class="large"></div> + <div class="large"></div> + <div> + LINE 4 + <div class="nobr">LINE 5<br>LINE 6</div> + </div> + </div> + </div> +</div> + + +<div class="pager"> + <div class="test" style="align-content: end"> + <span class="label">END</span><br>LINE 2<br>LINE 3 + <div class="large"></div> + <div class="large"></div> + <div> + LINE 4 + <div class="nobr">LINE 5<br>LINE 6</div> + </div> + </div> + </div> +</div> + +<div class="pager"> + <div class="test" style="align-content: baseline"> + <span class="label">BASELINE</span><br>LINE 2<br>LINE 3 + <div class="large"></div> + <div class="large"></div> + <div> + LINE 4 + <div class="nobr">LINE 5<br>LINE 6</div> + </div> + </div> + </div> +</div> + +<div class="pager"> + <div class="test" style="align-content: last baseline"> + <span class="label">LAST BASELINE</span><br>LINE 2<br>LINE 3 + <div class="large"></div> + <div class="large"></div> + <div> + LINE 4 + <div class="nobr">LINE 5<br>LINE 6</div> + </div> + </div> + </div> +</div> + +<div class="pager"> + <div class="test" style="align-content: unsafe center"> + <span class="label">UNSAFE CENTER</span><br>LINE 2<br>LINE 3 + <div class="large"></div> + <div class="large"></div> + <div> + LINE 4 + <div class="nobr">LINE 5<br>LINE 6</div> + </div> + </div> + </div> +</div> + + +<div class="pager"> + <div class="test" style="align-content: unsafe end"> + <span class="label">UNSAFE END</span><br>LINE 2<br>LINE 3 + <div class="large"></div> + <div class="large"></div> + <div> + LINE 4 + <div class="nobr">LINE 5<br>LINE 6</div> + </div> + </div> + </div> +</div>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-break-content-020-aligned-ref.html b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-break-content-020-aligned-ref.html new file mode 100644 index 0000000..6a0e387 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-break-content-020-aligned-ref.html
@@ -0,0 +1,244 @@ +<!DOCTYPE html> +<title>CSS Box Alignment: align-content block fragmentation: complex block content</title> +<link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"> +<link rel="help" href="https://www.w3.org/TR/css-align-3/#align-block"> + +<style title="Needed for automation; delete to review/debug"> + @import "/fonts/ahem.css"; + html { font: 10px/1 Ahem; max-width: 800px; } +</style> + +<style> + .pager { + column-fill: auto; + column-width: 15em; + height: 5em; + } + .test { + height: 5em; break-inside: avoid; + /* show bounds of test box without interfering with margin-collapsing */ + border-inline: solid black 1em; + } + .test:last-child { + height: 4.5em; + } + .large, .float { + height: 2.5em; + break-inside: avoid; + background: orange; + } + .float { + float: right; + } + .margin { + padding: 0.2em; /* using padding because of margin handling bugs + margin-block: 0.5em; + } + .margin > * { + margin-block: -0.3em; +switch back once fixed */ + } + hr { + border: solid 1px; margin: 0.5em; + } + + /* readability */ + .pager { border: solid 2px gray; margin: 0.5em 0; } + .test { color: #8888; text-align: center; } + .label { color: black; font-weight: bold; } + + /* reference */ + .center .test { align-content: center; } + .end .test { align-content: end; } + /* margins are truncated by unforced breaks, so mimic that */ + .test .large:first-child { margin-top: 0; } + .test .large:last-child { margin-bottom: 0; } +</style> + +<!-- + This test creates breaks: + * between two blocks with collapsing negative margins + * through the middle of a float + * through some nested text + * after a nested float +--> + +<div class="pager center"> + <div class="test"> + <span class="label">CENTER</span> + <div class="margin"> + <div class="large"></div> + </div> + </div> + <div class="test"> + <div class="margin"> + <div class="large"></div> + </div> + LINE 1<br>LINE 2 + </div> + <div class="test"> + <div class="float">FLT</div> + LINE 3 + <hr> + <div> + LINE 4<br>LINE 5 + </div> + </div> + <div class="test"> + <div> + LINE 6 + <div class="float">FLT</div> + </div> + LINE 7 + </div> +</div> + +<div class="pager end"> + <div class="test"> + <span class="label">END</span> + <div class="margin"> + <div class="large"></div> + </div> + </div> + <div class="test"> + <div class="margin"> + <div class="large"></div> + </div> + LINE 1<br>LINE 2 + </div> + <div class="test"> + <div class="float">FLT</div> + LINE 3 + <hr> + <div> + LINE 4<br>LINE 5 + </div> + </div> + <div class="test"> + <div> + LINE 6 + <div class="float">FLT</div> + </div> + LINE 7 + </div> +</div> + +<div class="pager"> + <div class="test"> + <span class="label">BASELINE</span> + <div class="margin"> + <div class="large"></div> + </div> + </div> + <div class="test"> + <div class="margin"> + <div class="large"></div> + </div> + LINE 1<br>LINE 2 + </div> + <div class="test"> + <div class="float">FLT</div> + LINE 3 + <hr> + <div> + LINE 4<br>LINE 5 + </div> + </div> + <div class="test"> + <div> + LINE 6 + <div class="float">FLT</div> + </div> + LINE 7 + </div> +</div> + +<div class="pager"> + <div class="test"> + <span class="label">LAST BASELINE</span> + <div class="margin"> + <div class="large"></div> + </div> + </div> + <div class="test"> + <div class="margin"> + <div class="large"></div> + </div> + LINE 1<br>LINE 2 + </div> + <div class="test"> + <div class="float">FLT</div> + LINE 3 + <hr> + <div> + LINE 4<br>LINE 5 + </div> + </div> + <div class="test"> + <div> + LINE 6 + <div class="float">FLT</div> + </div> + LINE 7 + </div> +</div> + +<div class="pager center"> + <div class="test"> + <span class="label">UNSAFE CENTER</span> + <div class="margin"> + <div class="large"></div> + </div> + </div> + <div class="test"> + <div class="margin"> + <div class="large"></div> + </div> + LINE 1<br>LINE 2 + </div> + <div class="test"> + <div class="float">FLT</div> + LINE 3 + <hr> + <div> + LINE 4<br>LINE 5 + </div> + </div> + <div class="test"> + <div> + LINE 6 + <div class="float">FLT</div> + </div> + LINE 7 + </div> +</div> + +<div class="pager end"> + <div class="test"> + <span class="label">UNSAFE END</span> + <div class="margin"> + <div class="large"></div> + </div> + </div> + <div class="test"> + <div class="margin"> + <div class="large"></div> + </div> + LINE 1<br>LINE 2 + </div> + <div class="test"> + <div class="float">FLT</div> + LINE 3 + <hr> + <div> + LINE 4<br>LINE 5 + </div> + </div> + <div class="test"> + <div> + LINE 6 + <div class="float">FLT</div> + </div> + LINE 7 + </div> +</div>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-break-content-020-unaligned-ref.html b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-break-content-020-unaligned-ref.html new file mode 100644 index 0000000..730c874 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-break-content-020-unaligned-ref.html
@@ -0,0 +1,174 @@ +<!DOCTYPE html> +<title>CSS Box Alignment: align-content block fragmentation: complex block content</title> +<link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"> +<link rel="help" href="https://www.w3.org/TR/css-align-3/#align-block"> + +<style title="Needed for automation; delete to review/debug"> + @import "/fonts/ahem.css"; + html { font: 10px/1 Ahem; max-width: 800px; } +</style> + +<style> + .pager { + column-fill: auto; + column-width: 15em; + height: 5em; + } + .test { + height: 19.5em; + /* show bounds of test box without interfering with margin-collapsing */ + border-inline: solid black 1em; + } + .large, .float { + height: 2.5em; + break-inside: avoid; + background: orange; + } + .float { + float: right; + } + .margin { + padding: 0.2em; /* using padding because of margin handling bugs + margin-block: 0.5em; + } + .margin > * { + margin-block: -0.3em; +switch back once fixed */ + } + hr { + border: solid 1px; margin: 0.5em; + } + + /* readability */ + .pager { border: solid 2px gray; margin: 0.5em 0; } + .test { color: #8888; text-align: center; } + .label { color: black; font-weight: bold; } +</style> + +<!-- + This test creates breaks: + * between two blocks with collapsing negative margins + * through the middle of a float + * through some nested text + * after a nested float +--> + +<div class="pager"> + <div class="test"> + <span class="label">CENTER</span> + <div class="margin"> + <div class="large"></div> + <div class="large"></div> + </div> + LINE 1<br> + <div class="float">FLT</div> + LINE 2<br>LINE 3 + <hr> + <div> + LINE 4<br>LINE 5<br>LINE 6 + <div class="float">FLT</div> + </div> + LINE 7 + </div> + </div> +</div> + +<div class="pager"> + <div class="test"> + <span class="label">END</span> + <div class="margin"> + <div class="large"></div> + <div class="large"></div> + </div> + LINE 1<br> + <div class="float">FLT</div> + LINE 2<br>LINE 3 + <hr> + <div> + LINE 4<br>LINE 5<br>LINE 6 + <div class="float">FLT</div> + </div> + LINE 7 + </div> + </div> +</div> + +<div class="pager"> + <div class="test"> + <span class="label">BASELINE</span> + <div class="margin"> + <div class="large"></div> + <div class="large"></div> + </div> + LINE 1<br> + <div class="float">FLT</div> + LINE 2<br>LINE 3 + <hr> + <div> + LINE 4<br>LINE 5<br>LINE 6 + <div class="float">FLT</div> + </div> + LINE 7 + </div> + </div> +</div> + +<div class="pager"> + <div class="test"> + <span class="label">LAST BASELINE</span> + <div class="margin"> + <div class="large"></div> + <div class="large"></div> + </div> + LINE 1<br> + <div class="float">FLT</div> + LINE 2<br>LINE 3 + <hr> + <div> + LINE 4<br>LINE 5<br>LINE 6 + <div class="float">FLT</div> + </div> + LINE 7 + </div> + </div> +</div> + +<div class="pager"> + <div class="test"> + <span class="label">UNSAFE CENTER</span> + <div class="margin"> + <div class="large"></div> + <div class="large"></div> + </div> + LINE 1<br> + <div class="float">FLT</div> + LINE 2<br>LINE 3 + <hr> + <div> + LINE 4<br>LINE 5<br>LINE 6 + <div class="float">FLT</div> + </div> + LINE 7 + </div> + </div> +</div> + +<div class="pager"> + <div class="test"> + <span class="label">UNSAFE END</span> + <div class="margin"> + <div class="large"></div> + <div class="large"></div> + </div> + LINE 1<br> + <div class="float">FLT</div> + LINE 2<br>LINE 3 + <hr> + <div> + LINE 4<br>LINE 5<br>LINE 6 + <div class="float">FLT</div> + </div> + LINE 7 + </div> + </div> +</div>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-break-content-020.html b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-break-content-020.html new file mode 100644 index 0000000..8326730 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-break-content-020.html
@@ -0,0 +1,177 @@ +<!DOCTYPE html> +<title>CSS Box Alignment: align-content block fragmentation: complex block content</title> +<link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"> +<link rel="help" href="https://www.w3.org/TR/css-align-3/#align-block"> +<meta name="flags" content="may"> +<!-- fragmented alignment is underdefined; these are two possibilities --> +<link rel="match" href="align-content-block-break-content-010-aligned-ref.html"> +<link rel="match" href="align-content-block-break-content-010-unaligned-ref.html"> + +<style title="Needed for automation; delete to review/debug"> + @import "/fonts/ahem.css"; + html { font: 10px/1 Ahem; max-width: 800px; } +</style> + +<style> + .pager { + column-fill: auto; + column-width: 15em; + height: 5em; + } + .test { + height: 19.5em; + /* show bounds of test box without interfering with margin-collapsing */ + border-inline: solid black 1em; + } + .large, .float { + height: 2.5em; + break-inside: avoid; + background: orange; + } + .float { + float: right; + } + .margin { + padding: 0.2em; /* using padding because of margin handling bugs + margin-block: 0.5em; + } + .margin > * { + margin-block: -0.3em; +switch back once fixed */ + } + hr { + border: solid 1px; margin: 0.5em; } + + /* readability */ + .pager { border: solid 2px gray; margin: 0.5em 0; } + .test { color: #8888; text-align: center; } + .label { color: black; font-weight: bold; } +</style> + +<!-- + This test creates breaks: + * between two blocks with collapsing negative margins + * through the middle of a float + * through some nested text + * after a nested float +--> + +<div class="pager"> + <div class="test" style="align-content: center"> + <span class="label">CENTER</span> + <div class="margin"> + <div class="large"></div> + <div class="large"></div> + </div> + LINE 1<br> + <div class="float">FLT</div> + LINE 2<br>LINE 3 + <hr> + <div> + LINE 4<br>LINE 5<br>LINE 6 + <div class="float">FLT</div> + </div> + LINE 7 + </div> + </div> +</div> + +<div class="pager"> + <div class="test" style="align-content: end"> + <span class="label">END</span> + <div class="margin"> + <div class="large"></div> + <div class="large"></div> + </div> + LINE 1<br> + <div class="float">FLT</div> + LINE 2<br>LINE 3 + <hr> + <div> + LINE 4<br>LINE 5<br>LINE 6 + <div class="float">FLT</div> + </div> + LINE 7 + </div> + </div> +</div> + +<div class="pager"> + <div class="test" style="align-content: baseline"> + <span class="label">BASELINE</span> + <div class="margin"> + <div class="large"></div> + <div class="large"></div> + </div> + LINE 1<br> + <div class="float">FLT</div> + LINE 2<br>LINE 3 + <hr> + <div> + LINE 4<br>LINE 5<br>LINE 6 + <div class="float">FLT</div> + </div> + LINE 7 + </div> + </div> +</div> + +<div class="pager"> + <div class="test" style="align-content: last baseline"> + <span class="label">LAST BASELINE</span> + <div class="margin"> + <div class="large"></div> + <div class="large"></div> + </div> + LINE 1<br> + <div class="float">FLT</div> + LINE 2<br>LINE 3 + <hr> + <div> + LINE 4<br>LINE 5<br>LINE 6 + <div class="float">FLT</div> + </div> + LINE 7 + </div> + </div> +</div> + +<div class="pager"> + <div class="test" style="align-content: unsafe center"> + <span class="label">UNSAFE CENTER</span> + <div class="margin"> + <div class="large"></div> + <div class="large"></div> + </div> + LINE 1<br> + <div class="float">FLT</div> + LINE 2<br>LINE 3 + <hr> + <div> + LINE 4<br>LINE 5<br>LINE 6 + <div class="float">FLT</div> + </div> + LINE 7 + </div> + </div> +</div> + +<div class="pager"> + <div class="test" style="align-content: unsafe end"> + <span class="label">UNSAFE END</span> + <div class="margin"> + <div class="large"></div> + <div class="large"></div> + </div> + LINE 1<br> + <div class="float">FLT</div> + LINE 2<br>LINE 3 + <hr> + <div> + LINE 4<br>LINE 5<br>LINE 6 + <div class="float">FLT</div> + </div> + LINE 7 + </div> + </div> +</div>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-break-content-020.html.ini b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-break-content-020.html.ini new file mode 100644 index 0000000..c19c67f --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-break-content-020.html.ini
@@ -0,0 +1,2 @@ +[align-content-block-break-content-020.html] + expected: FAIL
diff --git a/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-break-overflow-010-ref.html b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-break-overflow-010-ref.html new file mode 100644 index 0000000..68af324 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-break-overflow-010-ref.html
@@ -0,0 +1,162 @@ +<!DOCTYPE html> +<title>CSS Box Alignment: align-content fragmentation: simple block content</title> +<link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"> +<link rel="help" href="https://www.w3.org/TR/css-align-3/#align-block"> + +<style title="Needed for automation; delete to review/debug"> + @import "/fonts/ahem.css"; + html { font: 10px/1 Ahem; max-width: 780px; } +</style> + +<style> + .pager { + column-fill: auto; + column-width: 15em; + height: 5em; + } + .test { + height: 5em; + break-inside: avoid; + /* show bounds of test box without interfering with margin-collapsing */ + border-inline: solid black 1em; + } + .test:last-child { + height: 4em; + } + .large, .float { + height: 2.5em; + break-inside: avoid; + padding: 2px; /* using padding because of margin handling bugs + margin: 2px; +switch back once fixed */ + background: orange; + } + .float { + float: right; + } + .nobr { + break-inside: avoid; + } + + /* readability */ + .pager { border: solid 2px gray; margin: 0.5em 0; } + .test { color: #8888; text-align: center; } + .label { color: black; font-weight: bold; } +</style> + +<!-- + This test creates breaks in overflow: + * after some directly-contained text + * after a fixed-height block + * through some nested text + * after a block containing text +--> + +<div class="pager"> + <div class="test"> + <span class="label">CENTER</span> + <br>LINE 2<br>LINE 3 + </div> + <div class="test"> + <div class="large"></div> + </div> + <div class="test"> + <div class="large"></div> + LINE 4 + </div> + <div class="test"> + <div class="nobr">LINE 5<br>LINE 6</div> + </div> + </div> +</div> + + +<div class="pager"> + <div class="test"> + <span class="label">END</span> + <br>LINE 2<br>LINE 3 + </div> + <div class="test"> + <div class="large"></div> + </div> + <div class="test"> + <div class="large"></div> + LINE 4 + </div> + <div class="test"> + <div class="nobr">LINE 5<br>LINE 6</div> + </div> + </div> +</div> + +<div class="pager"> + <div class="test"> + <span class="label">BASELINE</span> + <br>LINE 2<br>LINE 3 + </div> + <div class="test"> + <div class="large"></div> + </div> + <div class="test"> + <div class="large"></div> + LINE 4 + </div> + <div class="test"> + <div class="nobr">LINE 5<br>LINE 6</div> + </div> + </div> +</div> + +<div class="pager"> + <div class="test"> + <span class="label">LAST BASELINE</span> + <br>LINE 2<br>LINE 3 + </div> + <div class="test"> + <div class="large"></div> + </div> + <div class="test"> + <div class="large"></div> + LINE 4 + </div> + <div class="test"> + <div class="nobr">LINE 5<br>LINE 6</div> + </div> + </div> +</div> + +<div class="pager"> + <div class="test"> + <span class="label">UNSAFE CENTER</span> + <br>LINE 2<br>LINE 3 + </div> + <div class="test"> + <div class="large"></div> + </div> + <div class="test"> + <div class="large"></div> + LINE 4 + </div> + <div class="test"> + <div class="nobr">LINE 5<br>LINE 6</div> + </div> + </div> +</div> + +<div class="pager"> + <div class="test"> + <span class="label">UNSAFE END</span> + <br>LINE 2<br>LINE 3 + </div> + <div class="test"> + <div class="large"></div> + </div> + <div class="test"> + <div class="large"></div> + LINE 4 + </div> + <div class="test"> + <div class="nobr">LINE 5<br>LINE 6</div> + </div> + </div> +</div>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-break-overflow-010.html b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-break-overflow-010.html new file mode 100644 index 0000000..cde57ad7 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-break-overflow-010.html
@@ -0,0 +1,154 @@ +<!DOCTYPE html> +<title>CSS Box Alignment: align-content fragmentation: simple block content</title> +<link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"> +<link rel="help" href="https://www.w3.org/TR/css-align-3/#align-block"> +<meta name="flags" content="may"> +<!-- fragmented alignment is underdefined; this is one possibility --> +<link rel="match" href="align-content-block-break-overflow-010-ref.html"> + +<style title="Needed for automation; delete to review/debug"> + @import "/fonts/ahem.css"; + html { font: 10px/1 Ahem; max-width: 780px; } +</style> + +<style> + .pager { + column-fill: auto; + column-width: 15em; + height: 5em; + } + .test { + height: 19em; + /* show bounds of test box without interfering with margin-collapsing */ + border-inline: solid black 1em; + } + .overflow { + height: 0; + /* show bounds of overflow box without interfering with margin-collapsing */ + background: red; + } + .large, .float { + height: 2.5em; + break-inside: avoid; + padding: 2px; /* using padding because of margin handling bugs + margin: 2px; +switch back once fixed */ + background: orange; + } + .float { + float: right; + } + .nobr { + break-inside: avoid; + } + + /* readability */ + .pager { border: solid 2px gray; margin: 0.5em 0; } + .test { color: #8888; text-align: center; } + .label { color: black; font-weight: bold; } +</style> + +<!-- + This test creates breaks in overflow: + * after some directly-contained text + * after a fixed-height block + * through some nested text + * after a block containing text +--> + +<div class="pager"> + <div class="test" style="align-content: center"> + <span class="label">CENTER</span> + <div class="overflow"> + LINE 2<br>LINE 3 + <div class="large"></div> + <div class="large"></div> + <div> + LINE 4 + <div class="nobr">LINE 5<br>LINE 6</div> + </div> + </div> + </div> + </div> +</div> + + +<div class="pager"> + <div class="test" style="align-content: end"> + <span class="label">END</span> + <div class="overflow"> + LINE 2<br>LINE 3 + <div class="large"></div> + <div class="large"></div> + <div> + LINE 4 + <div class="nobr">LINE 5<br>LINE 6</div> + </div> + </div> + </div> + </div> +</div> + +<div class="pager"> + <div class="test" style="align-content: baseline"> + <span class="label">BASELINE</span> + <div class="overflow"> + LINE 2<br>LINE 3 + <div class="large"></div> + <div class="large"></div> + <div> + LINE 4 + <div class="nobr">LINE 5<br>LINE 6</div> + </div> + </div> + </div> + </div> +</div> + +<div class="pager"> + <div class="test" style="align-content: last baseline"> + <span class="label">LAST BASELINE</span> + <div class="overflow"> + LINE 2<br>LINE 3 + <div class="large"></div> + <div class="large"></div> + <div> + LINE 4 + <div class="nobr">LINE 5<br>LINE 6</div> + </div> + </div> + </div> + </div> +</div> + +<div class="pager"> + <div class="test" style="align-content: unsafe center"> + <span class="label">UNSAFE CENTER</span> + <div class="overflow"> + LINE 2<br>LINE 3 + <div class="large"></div> + <div class="large"></div> + <div> + LINE 4 + <div class="nobr">LINE 5<br>LINE 6</div> + </div> + </div> + </div> + </div> +</div> + +<div class="pager"> + <div class="test" style="align-content: unsafe end"> + <span class="label">UNSAFE END</span> + <div class="overflow"> + LINE 2<br>LINE 3 + <div class="large"></div> + <div class="large"></div> + <div> + LINE 4 + <div class="nobr">LINE 5<br>LINE 6</div> + </div> + </div> + </div> + </div> +</div>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-break-overflow-020-ref.html b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-break-overflow-020-ref.html new file mode 100644 index 0000000..7b27284c --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-break-overflow-020-ref.html
@@ -0,0 +1,215 @@ +<!DOCTYPE html> +<title>CSS Box Alignment: align-content block fragmentation: complex block content</title> +<link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"> +<link rel="help" href="https://www.w3.org/TR/css-align-3/#align-block"> + +<style title="Needed for automation; delete to review/debug"> + @import "/fonts/ahem.css"; + html { font: 10px/1 Ahem; max-width: 800px; } +</style> + +<style> + .pager { + column-fill: auto; + column-width: 15em; + height: 5em; + } + .test { + height: 5em; + break-inside: avoid; + /* show bounds of test box without interfering with margin-collapsing */ + border-left: solid black 1em; + } + .test:last-child { + height: 4.5em; + } + .large, .float { + height: 2.5em; + break-inside: avoid; + background: orange; + } + .float { + float: right; + } + .margin { + padding: 0.2em; /* using padding because of margin handling bugs + margin-block: 0.5em; + } + .margin > * { + margin-block: -0.3em; +switch back once fixed */ + } + hr { + border: solid 1px; + margin: 0.5em; + } + + /* readability */ + .pager { border: solid 2px gray; margin: 0.5em 0; } + .test { color: #8888; text-align: center; } + .label { color: black; font-weight: bold; } + + /* reference */ + /* margins are truncated by unforced breaks, so mimic that */ + .margin:first-child { margin-top: 0; padding-top: 0; } + .margin:last-child { margin-bottom: 0; padding-bottom: 0; } + +</style> + +<!-- + This test creates breaks in overflow: + * between two blocks with collapsing negative margins + * through the middle of a float + * through some nested text + * after a nested float +--> + +<div class="pager"> + <div class="test"> + <span class="label">CENTER</span> + <div class="margin"> + <div class="large"></div> + </div> + </div> + <div class="test"> + <div class="margin"> + <div class="large"></div> + </div> + LINE 1<br>LINE 2 + </div> + <div class="test"> + <div class="float">FLT</div> + LINE 3 + <hr> + LINE 4<br>LINE 5 + </div> + <div class="test"> + <div class="float">FLT</div> + LINE 6<br>LINE 7 + </div> +</div> + +<div class="pager"> + <div class="test"> + <span class="label">END</span> + <div class="margin"> + <div class="large"></div> + </div> + </div> + <div class="test"> + <div class="margin"> + <div class="large"></div> + </div> + LINE 1<br>LINE 2 + </div> + <div class="test"> + <div class="float">FLT</div> + LINE 3 + <hr> + LINE 4<br>LINE 5 + </div> + <div class="test"> + <div class="float">FLT</div> + LINE 6<br>LINE 7 + </div> +</div> + +<div class="pager"> + <div class="test"> + <span class="label">BASELINE</span> + <div class="margin"> + <div class="large"></div> + </div> + </div> + <div class="test"> + <div class="margin"> + <div class="large"></div> + </div> + LINE 1<br>LINE 2 + </div> + <div class="test"> + <div class="float">FLT</div> + LINE 3 + <hr> + LINE 4<br>LINE 5 + </div> + <div class="test"> + <div class="float">FLT</div> + LINE 6<br>LINE 7 + </div> +</div> + +<div class="pager"> + <div class="test"> + <span class="label">LAST BASELINE</span> + <div class="margin"> + <div class="large"></div> + </div> + </div> + <div class="test"> + <div class="margin"> + <div class="large"></div> + </div> + LINE 1<br>LINE 2 + </div> + <div class="test"> + <div class="float">FLT</div> + LINE 3 + <hr> + LINE 4<br>LINE 5 + </div> + <div class="test"> + <div class="float">FLT</div> + LINE 6<br>LINE 7 + </div> +</div> + +<div class="pager"> + <div class="test"> + <span class="label">UNSAFE CENTER</span> + <div class="margin"> + <div class="large"></div> + </div> + </div> + <div class="test"> + <div class="margin"> + <div class="large"></div> + </div> + LINE 1<br>LINE 2 + </div> + <div class="test"> + <div class="float">FLT</div> + LINE 3 + <hr> + LINE 4<br>LINE 5 + </div> + <div class="test"> + <div class="float">FLT</div> + LINE 6<br>LINE 7 + </div> +</div> + +<div class="pager"> + <div class="test"> + <span class="label">UNSAFE END</span> + <div class="margin"> + <div class="large"></div> + </div> + </div> + <div class="test"> + <div class="margin"> + <div class="large"></div> + </div> + LINE 1<br>LINE 2 + </div> + <div class="test"> + <div class="float">FLT</div> + LINE 3 + <hr> + LINE 4<br>LINE 5 + </div> + <div class="test"> + <div class="float">FLT</div> + LINE 6<br>LINE 7 + </div> +</div>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-break-overflow-020.html b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-break-overflow-020.html new file mode 100644 index 0000000..5f4b3d95 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-break-overflow-020.html
@@ -0,0 +1,195 @@ +<!DOCTYPE html> +<title>CSS Box Alignment: align-content block fragmentation: complex block content</title> +<link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"> +<link rel="help" href="https://www.w3.org/TR/css-align-3/#align-block"> +<meta name="flags" content="may"> +<!-- fragmented alignment is underdefined; this is one possibility --> +<link rel="match" href="align-content-block-break-overflow-010-ref.html"> + +<style title="Needed for automation; delete to review/debug"> + @import "/fonts/ahem.css"; + html { font: 10px/1 Ahem; max-width: 800px; } +</style> + +<style> + .pager { + column-fill: auto; + column-width: 15em; + height: 5em; + } + .test { + height: 19.5em; + /* show bounds of test box without interfering with margin-collapsing */ + border-left: solid black 1em; + } + .overflow { + height: 0; + /* show bounds of overflow box without interfering with margin-collapsing */ + background: red; + } + .large, .float { + height: 2.5em; + break-inside: avoid; + background: orange; + } + .float { + float: right; + } + .margin { + padding: 0.2em; /* using padding because of margin handling bugs + margin-block: 0.5em; + } + .margin > * { + margin-block: -0.3em; +switch back once fixed */ + } + hr { + border: solid 1px; + margin: 0.5em; + } + + /* readability */ + .pager { border: solid 2px gray; margin: 0.5em 0; } + .test { color: #8888; text-align: center; } + .label { color: black; font-weight: bold; } +</style> + +<!-- + This test creates breaks in overflow: + * between two blocks with collapsing negative margins + * through the middle of a float + * through some nested text + * after a nested float +--> + +<div class="pager"> + <div class="test" style="align-content: center"> + <span class="label">CENTER</span> + <div class="overflow"> + <div class="margin"> + <div class="large"></div> + <div class="large"></div> + </div> + LINE 1<br> + <div class="float">FLT</div> + LINE 2<br>LINE 3 + <hr> + <div> + LINE 4<br>LINE 5<br>LINE 6 + <div class="float">FLT</div> + </div> + LINE 7 + </div> + </div> + </div> +</div> + +<div class="pager"> + <div class="test" style="align-content: end"> + <span class="label">END</span> + <div class="overflow"> + <div class="margin"> + <div class="large"></div> + <div class="large"></div> + </div> + LINE 1<br> + <div class="float">FLT</div> + LINE 2<br>LINE 3 + <hr> + <div> + LINE 4<br>LINE 5<br>LINE 6 + <div class="float">FLT</div> + </div> + LINE 7 + </div> + </div> + </div> +</div> + +<div class="pager"> + <div class="test" style="align-content: baseline"> + <span class="label">BASELINE</span> + <div class="overflow"> + <div class="margin"> + <div class="large"></div> + <div class="large"></div> + </div> + LINE 1<br> + <div class="float">FLT</div> + LINE 2<br>LINE 3 + <hr> + <div> + LINE 4<br>LINE 5<br>LINE 6 + <div class="float">FLT</div> + </div> + LINE 7 + </div> + </div> + </div> +</div> + +<div class="pager"> + <div class="test" style="align-content: last baseline"> + <span class="label">LAST BASELINE</span> + <div class="overflow"> + <div class="margin"> + <div class="large"></div> + <div class="large"></div> + </div> + LINE 1<br> + <div class="float">FLT</div> + LINE 2<br>LINE 3 + <hr> + <div> + LINE 4<br>LINE 5<br>LINE 6 + <div class="float">FLT</div> + </div> + LINE 7 + </div> + </div> + </div> +</div> + +<div class="pager"> + <div class="test" style="align-content: unsafe center"> + <span class="label">UNSAFE CENTER</span> + <div class="overflow"> + <div class="margin"> + <div class="large"></div> + <div class="large"></div> + </div> + LINE 1<br> + <div class="float">FLT</div> + LINE 2<br>LINE 3 + <hr> + <div> + LINE 4<br>LINE 5<br>LINE 6 + <div class="float">FLT</div> + </div> + LINE 7 + </div> + </div> + </div> +</div> + +<div class="pager"> + <div class="test" style="align-content: unsafe end"> + <span class="label">UNSAFE END</span> + <div class="overflow"> + <div class="margin"> + <div class="large"></div> + <div class="large"></div> + </div> + LINE 1<br> + <div class="float">FLT</div> + LINE 2<br>LINE 3 + <hr> + <div> + LINE 4<br>LINE 5<br>LINE 6 + <div class="float">FLT</div> + </div> + LINE 7 + </div> + </div> + </div> +</div>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-break-overflow-020.html.ini b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-break-overflow-020.html.ini new file mode 100644 index 0000000..e1ec410 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-break-overflow-020.html.ini
@@ -0,0 +1,2 @@ +[align-content-block-break-overflow-020.html] + expected: FAIL
diff --git a/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-overflow-000-ref.html b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-overflow-000-ref.html new file mode 100644 index 0000000..8ca5407e --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-overflow-000-ref.html
@@ -0,0 +1,261 @@ +<!DOCTYPE html> +<title>CSS Box Alignment: align-content on small block container with floats</title> +<link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"> + +<style title="Needed for automation; delete to review/debug"> + @import "/fonts/ahem.css"; + html { font: 10px/1 Ahem; max-width: 800px; } + .label { display: none; } +</style> + +<style> + html, body { margin: 0; padding: 0; } + + .test { height: 1.8em; margin: 0.5em 2em; overflow: hidden; + /* show bounds of test box without interfering with margin-collapsing */ + background: black; padding-right: 2px; } + /* ensure float is contained */ + .float { float: right; background: orange; height: 2em } + /* ensure margin is contained */ + .in-flow { margin-top: 1em; background: orange } + /* ensure relpos is ignored */ + .relpos { position: relative; top: -1.5em; } + /* ensure abspos static position follows alignment */ + .wrapper { position: relative; } + .abspos { position: absolute; right: 0; margin-top: -1.5em; } + /* ensure overflow is not counted */ + .overflow { height: 0; } + + /* cram into 800x600 */ + html { max-height: 600px; columns: 3 } + .wrapper { break-inside: avoid; border: solid 2px gray; padding: 3em 0; } + + /* readability */ + .test > * { color: #8888; } + .label { color: black; font-weight: bold; } +</style> + +<div class="wrapper"> + <div class="test"> + <div class="float">FLT</div> + <div style="padding-top: 0.5em; margin-bottom: -0.5em"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test"> + <div class="float">FLT</div> + <div style="padding-top: 0.5em; margin-bottom: -0.5em"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">CENTER</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test"> + <div class="float">FLT</div> + <div style="padding-top: 0.5em; margin-bottom: -0.5em"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test"> + <div class="float">FLT</div> + <div style="padding-top: 0.5em; margin-bottom: -0.5em"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">BASELINE</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test"> + <div class="float">FLT</div> + <div style="padding-top: 0.5em; margin-bottom: -0.5em"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">LAST BASELINE</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test"> + <div class="float">FLT</div> + <div style="padding-top: 0.5em; margin-bottom: -0.5em"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">FLEX-START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test"> + <div class="float">FLT</div> + <div style="padding-top: 0.5em; margin-bottom: -0.5em"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">FLEX-END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test"> + <div class="float">FLT</div> + <div style="padding-top: 0.5em; margin-bottom: -0.5em"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">UNSAFE START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test"> + <div class="float" style="margin-top: -0.6em">FLT</div> + <div style="margin-bottom: -0.6em"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">UNSAFE CENTER</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test"> + <div style="margin-bottom: -1.2em"></div> + <div class="in-flow"> + <div class="float" style="margin-top: -1em">FLT</div> + <div class="float">FLT</div> + <span class="label">UNSAFE END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test"> + <div class="float">FLT</div> + <div style="padding-top: 0.5em; margin-bottom: -0.5em"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SAFE START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test"> + <div class="float">FLT</div> + <div style="padding-top: 0.5em; margin-bottom: -0.5em"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SAFE CENTER</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test"> + <div class="float">FLT</div> + <div style="padding-top: 0.5em; margin-bottom: -0.5em"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SAFE END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test"> + <div class="float">FLT</div> + <div style="padding-top: 0.5em; margin-bottom: -0.5em"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SPACE-EVENLY</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test"> + <div class="float">FLT</div> + <div style="padding-top: 0.5em; margin-bottom: -0.5em"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SPACE-BETWEEN</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test"> + <div class="float">FLT</div> + <div style="padding-top: 0.5em; margin-bottom: -0.5em"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SPACE-AROUND</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test"> + <div class="float">FLT</div> + <div></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">NORMAL</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> + +<p> + <button onclick="document.querySelector('style[title]').textContent = 'html { font: 10px/1 sans-serif; }'">Show Text</button>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-overflow-000.html b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-overflow-000.html new file mode 100644 index 0000000..c53606a --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-overflow-000.html
@@ -0,0 +1,264 @@ +<!DOCTYPE html> +<html> +<title>CSS Box Alignment: align-content + overflow:hidden on small block container with floats</title> +<link rel="help" href="https://www.w3.org/TR/css-align-3/#align-block"> +<link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"> +<link rel="match" href="align-content-block-overflow-000-ref.html"> + +<style title="Needed for automation; delete to review/debug"> + @import "/fonts/ahem.css"; + html { font: 10px/1 Ahem; max-width: 800px; } + .label { display: none; } +</style> + +<style> + html, body { margin: 0; padding: 0; } + + .test { height: 1.8em; margin: 0.5em 2em; overflow: hidden; + /* show bounds of test box without interfering with margin-collapsing */ + background: black; padding-right: 2px; } + /* ensure float is contained */ + .float { float: right; background: orange; height: 2em } + /* ensure margin is contained */ + .in-flow { margin-top: 1em; background: orange } + /* ensure relpos is ignored */ + .relpos { position: relative; top: -1.5em; } + /* ensure abspos static position follows alignment */ + .wrapper { position: relative; } + .abspos { position: absolute; right: 0; margin-top: -1.5em; } + /* ensure overflow is not counted */ + .overflow { height: 0; } + + /* cram into 800x600 */ + html { max-height: 600px; columns: 3 } + .wrapper { break-inside: avoid; border: solid 2px gray; padding: 3em 0; } + + /* readability */ + .test > * { color: #8888; } + .label { color: black; font-weight: bold; } +</style> + +<div class="wrapper"> + <div class="test" style="align-content: start"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: center"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">CENTER</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: end"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: baseline"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">BASELINE</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: last baseline"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">LAST BASELINE</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: flex-start"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">FLEX-START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: flex-end"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">FLEX-END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: unsafe start"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">UNSAFE START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: unsafe center"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">UNSAFE CENTER</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: unsafe end"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">UNSAFE END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: safe start"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SAFE START</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: safe center"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SAFE CENTER</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: safe end"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SAFE END</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: space-evenly"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SPACE-EVENLY</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: space-between"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SPACE-BETWEEN</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: space-around"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">SPACE-AROUND</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> +<div class="wrapper"> + <div class="test" style="align-content: normal"> + <div class="float">FLT</div> + <div class="in-flow"></div> + <div class="in-flow"> + <div class="float">FLT</div> + <span class="label">NORMAL</span> + <span class="abspos">ABS</span> + <span class="relpos">REL</span> + <div class="overflow">OVERFLOW</div> + </div> + </div> +</div> + +<p> + <button onclick="document.querySelector('style[title]').textContent = 'html { font: 10px/1 sans-serif; }'">Show Text</button>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-overflow-000.html.ini b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-overflow-000.html.ini new file mode 100644 index 0000000..b896ff6 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-align/blocks/align-content-block-overflow-000.html.ini
@@ -0,0 +1,2 @@ +[align-content-block-overflow-000.html] + expected: FAIL
diff --git a/third_party/blink/web_tests/external/wpt/css/css-backgrounds/background-attachment-fixed-inside-transform-1.html.ini b/third_party/blink/web_tests/external/wpt/css/css-backgrounds/background-attachment-fixed-inside-transform-1.html.ini new file mode 100644 index 0000000..494b85a --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-backgrounds/background-attachment-fixed-inside-transform-1.html.ini
@@ -0,0 +1,3 @@ +[background-attachment-fixed-inside-transform-1.html] + expected: + if (product == "content_shell") and (virtual_suite == "threaded") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/css/css-backgrounds/background-attachment-local/attachment-local-clipping-color-5.html.ini b/third_party/blink/web_tests/external/wpt/css/css-backgrounds/background-attachment-local/attachment-local-clipping-color-5.html.ini new file mode 100644 index 0000000..c822e139 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-backgrounds/background-attachment-local/attachment-local-clipping-color-5.html.ini
@@ -0,0 +1,3 @@ +[attachment-local-clipping-color-5.html] + expected: + if (product == "content_shell") and (virtual_suite == "threaded") and (os == "mac") and (port == "mac12-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/css/css-backgrounds/background-attachment-local/attachment-scroll-positioning-1.html.ini b/third_party/blink/web_tests/external/wpt/css/css-backgrounds/background-attachment-local/attachment-scroll-positioning-1.html.ini index 6b5222c2..e1db925 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-backgrounds/background-attachment-local/attachment-scroll-positioning-1.html.ini +++ b/third_party/blink/web_tests/external/wpt/css/css-backgrounds/background-attachment-local/attachment-scroll-positioning-1.html.ini
@@ -1,3 +1,4 @@ [attachment-scroll-positioning-1.html] expected: if (product == "content_shell") and (virtual_suite == "threaded") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (virtual_suite == "threaded") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/css/css-backgrounds/background-repeat/background-repeat-space.xht.ini b/third_party/blink/web_tests/external/wpt/css/css-backgrounds/background-repeat/background-repeat-space.xht.ini new file mode 100644 index 0000000..5ff9cc5 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-backgrounds/background-repeat/background-repeat-space.xht.ini
@@ -0,0 +1,3 @@ +[background-repeat-space.xht] + expected: + if (product == "content_shell") and (virtual_suite == "threaded") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/css/css-fonts/font-display/font-display-feature-policy-02.tentative.html.ini b/third_party/blink/web_tests/external/wpt/css/css-fonts/font-display/font-display-feature-policy-02.tentative.html.ini index 85fc069..f6f1655 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-fonts/font-display/font-display-feature-policy-02.tentative.html.ini +++ b/third_party/blink/web_tests/external/wpt/css/css-fonts/font-display/font-display-feature-policy-02.tentative.html.ini
@@ -1,3 +1,3 @@ [font-display-feature-policy-02.tentative.html] expected: - if (product == "content_shell") and (os == "win") and (port == "win11"): FAIL + if (product == "content_shell") and (os == "win"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/css/css-masking/clip/clip-filter-order.html.ini b/third_party/blink/web_tests/external/wpt/css/css-masking/clip/clip-filter-order.html.ini index 295b751..e0fab8e 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-masking/clip/clip-filter-order.html.ini +++ b/third_party/blink/web_tests/external/wpt/css/css-masking/clip/clip-filter-order.html.ini
@@ -1,3 +1,4 @@ [clip-filter-order.html] expected: if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/css/css-shapes/shape-outside/shape-image/shape-image-004.html.ini b/third_party/blink/web_tests/external/wpt/css/css-shapes/shape-outside/shape-image/shape-image-004.html.ini new file mode 100644 index 0000000..1c53d48 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-shapes/shape-outside/shape-image/shape-image-004.html.ini
@@ -0,0 +1,3 @@ +[shape-image-004.html] + expected: + if (product == "content_shell") and (os == "linux") and (flag_specific == ""): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/css/css-shapes/shape-outside/shape-image/shape-image-009.html.ini b/third_party/blink/web_tests/external/wpt/css/css-shapes/shape-outside/shape-image/shape-image-009.html.ini new file mode 100644 index 0000000..74a2ff6 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-shapes/shape-outside/shape-image/shape-image-009.html.ini
@@ -0,0 +1,3 @@ +[shape-image-009.html] + expected: + if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/css/css-shapes/shape-outside/shape-image/shape-image-026.html.ini b/third_party/blink/web_tests/external/wpt/css/css-shapes/shape-outside/shape-image/shape-image-026.html.ini new file mode 100644 index 0000000..433b21a --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-shapes/shape-outside/shape-image/shape-image-026.html.ini
@@ -0,0 +1,3 @@ +[shape-image-026.html] + expected: + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/css/css-text/text-transform/text-transform-capitalize-010.html.ini b/third_party/blink/web_tests/external/wpt/css/css-text/text-transform/text-transform-capitalize-010.html.ini index 5952a47..017a372 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-text/text-transform/text-transform-capitalize-010.html.ini +++ b/third_party/blink/web_tests/external/wpt/css/css-text/text-transform/text-transform-capitalize-010.html.ini
@@ -1,3 +1,3 @@ [text-transform-capitalize-010.html] expected: - if (product == "content_shell") and (os == "win") and (port == "win11"): FAIL + if (product == "content_shell") and (os == "win"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/css/css-text/text-transform/text-transform-capitalize-030.html.ini b/third_party/blink/web_tests/external/wpt/css/css-text/text-transform/text-transform-capitalize-030.html.ini new file mode 100644 index 0000000..c3e6d0f --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-text/text-transform/text-transform-capitalize-030.html.ini
@@ -0,0 +1,3 @@ +[text-transform-capitalize-030.html] + expected: + if (product == "content_shell") and (os == "win") and (port == "win10.20h2"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/css/css-transforms/transform-2d-getComputedStyle-001-expected.txt b/third_party/blink/web_tests/external/wpt/css/css-transforms/transform-2d-getComputedStyle-001-expected.txt deleted file mode 100644 index 0ccf5a9..0000000 --- a/third_party/blink/web_tests/external/wpt/css/css-transforms/transform-2d-getComputedStyle-001-expected.txt +++ /dev/null
@@ -1,8 +0,0 @@ -This is a testharness.js-based test. -FAIL Matrix for translation transforms assert_equals: Computed style for an element with 'display: none' shouldn't be changed expected "matrix(1, 0, 0, 1, 10, 20)" but got "none" -FAIL Matrix for rotate assert_equals: Computed style for an element with 'display: none' shouldn't be changed expected "matrix(0, 1, -1, 0, 0, 0)" but got "none" -FAIL Matrix for scaling assert_equals: Computed style for an element with 'display: none' shouldn't be changed expected "matrix(2, 0, 0, 2, 0, 0)" but got "none" -FAIL Matrix for skew assert_equals: Computed style for an element with 'display: none' shouldn't be changed expected "matrix(1, 0, 1, 1, 0, 0)" but got "none" -FAIL Matrix for general transform assert_equals: Computed style for an element with 'display: none' shouldn't be changed expected "matrix(1, 2, 3, 4, 5, 6)" but got "none" -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/external/wpt/css/css-transforms/transform-2d-getComputedStyle-001.html b/third_party/blink/web_tests/external/wpt/css/css-transforms/transform-2d-getComputedStyle-001.html index 804b626..c70cfa9 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-transforms/transform-2d-getComputedStyle-001.html +++ b/third_party/blink/web_tests/external/wpt/css/css-transforms/transform-2d-getComputedStyle-001.html
@@ -77,13 +77,14 @@ const element = document.getElementById(id); const value = window.getComputedStyle(element).transform; element.style.display = 'none'; - // Per spec, the resolved value doesn't depend on display value. // https://drafts.csswg.org/css-transforms-2/#serialization-of-the-computed-value - // https://github.com/w3c/csswg-drafts/issues/9121 - assert_equals( - window.getComputedStyle(element).transform, value, - "Computed style for an element with 'display: none' " + - "shouldn't be changed"); + // For now both 'none' and 'matrix()' are accepted as resolved value of + // transform for an element with 'display: none' until we get a consensus + // in https://github.com/w3c/csswg-drafts/issues/9121. + assert_in_array( + window.getComputedStyle(element).transform, ['none', value], + "The resolved value of 'transform' for an element with 'display: none' " + + "should be 'none' or should not depend on display value."); } test(function() {
diff --git a/third_party/blink/web_tests/external/wpt/css/css-transitions/all-with-discrete.tentative.html b/third_party/blink/web_tests/external/wpt/css/css-transitions/all-with-discrete.tentative.html index c8734f2..c3642ee 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-transitions/all-with-discrete.tentative.html +++ b/third_party/blink/web_tests/external/wpt/css/css-transitions/all-with-discrete.tentative.html
@@ -22,13 +22,11 @@ <script> promise_test(async () => { - let transitionstartFired = false; - target.addEventListener('transitionstart', () => { - transitionstartFired = true; - }); await waitForAnimationFrames(2); target.classList.add('animated'); - await waitForAnimationFrames(1); - assert_true(transitionstartFired); + const anims = document.getAnimations(); + assert_equals(anims.length, 1, + "Did not start a discrete-property transition"); + assert_equals(anims[0].transitionProperty, 'float'); }, 'transition:all with transition-behavior:allow-discrete should animate discrete properties.'); </script>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-ui/compute-kind-widget-generated/kind-of-widget-fallback-input-text-border-inline-end-width-001.html.ini b/third_party/blink/web_tests/external/wpt/css/css-ui/compute-kind-widget-generated/kind-of-widget-fallback-input-text-border-inline-end-width-001.html.ini new file mode 100644 index 0000000..d0362fb --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-ui/compute-kind-widget-generated/kind-of-widget-fallback-input-text-border-inline-end-width-001.html.ini
@@ -0,0 +1,3 @@ +[kind-of-widget-fallback-input-text-border-inline-end-width-001.html] + expected: + if (product == "content_shell") and (os == "win") and (port == "win11"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/css/filter-effects/backdrop-filter-isolation.html.ini b/third_party/blink/web_tests/external/wpt/css/filter-effects/backdrop-filter-isolation.html.ini index dca10f8b..fb9469a 100644 --- a/third_party/blink/web_tests/external/wpt/css/filter-effects/backdrop-filter-isolation.html.ini +++ b/third_party/blink/web_tests/external/wpt/css/filter-effects/backdrop-filter-isolation.html.ini
@@ -2,4 +2,5 @@ expected: if (product == "content_shell") and (virtual_suite == "") and (os == "mac") and (port == "mac13-arm64"): FAIL if (product == "content_shell") and (virtual_suite == "") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (virtual_suite == "") and (os == "mac") and (port == "mac11-arm64"): FAIL if product == "chrome": FAIL
diff --git a/third_party/blink/web_tests/external/wpt/css/filter-effects/drop-shadow-currentcolor-dynamic-002.html b/third_party/blink/web_tests/external/wpt/css/filter-effects/drop-shadow-currentcolor-dynamic-002.html new file mode 100644 index 0000000..3f17b5d --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/filter-effects/drop-shadow-currentcolor-dynamic-002.html
@@ -0,0 +1,30 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<title>Filter Effects: Dynamic 'currentcolor' in drop-shadow(); SVG content</title> +<link rel="help" href="https://drafts.fxtf.org/filter-effects/#funcdef-filter-drop-shadow"> +<link rel="match" href="reference/green-100x100.html"> +<script src="/common/reftest-wait.js"></script> +<script src="/common/rendering-utils.js"></script> +<style> +#target { + fill: green; + filter: drop-shadow(50px 0px 0px currentcolor); +} +.red { + color: red; +} +.green { + color: green; +} +</style> +<svg id="container" class="red"> + <rect id="target" width="50" height="100"/> +</svg> +<script> +waitForAtLeastOneFrame().then(() => { + const container = document.getElementById('container'); + container.classList.toggle('red'); + container.classList.toggle('green'); + takeScreenshot(); +}); +</script>
diff --git a/third_party/blink/web_tests/external/wpt/css/motion/offset-path-shape-inset-002.html b/third_party/blink/web_tests/external/wpt/css/motion/offset-path-shape-inset-002.html index 5ca502e..ceafdd8c 100644 --- a/third_party/blink/web_tests/external/wpt/css/motion/offset-path-shape-inset-002.html +++ b/third_party/blink/web_tests/external/wpt/css/motion/offset-path-shape-inset-002.html
@@ -1,7 +1,7 @@ <!doctype html> <meta charset="utf-8"> <title>CSS Motion Path test: <basic-shape> inset() path with explicit arguments and radius</title> -<meta name=fuzzy content="0-75;0-500"> +<meta name="fuzzy" content="maxDifference=0-170; totalPixels=0-500"> <link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com"> <link rel="match" href="offset-path-shape-inset-002-ref.html"> <link rel="help" href="https://drafts.fxtf.org/motion/#valdef-offset-path-basic-shape">
diff --git a/third_party/blink/web_tests/external/wpt/css/motion/offset-path-shape-rect-002.html b/third_party/blink/web_tests/external/wpt/css/motion/offset-path-shape-rect-002.html index 114143b..204eadc 100644 --- a/third_party/blink/web_tests/external/wpt/css/motion/offset-path-shape-rect-002.html +++ b/third_party/blink/web_tests/external/wpt/css/motion/offset-path-shape-rect-002.html
@@ -1,7 +1,7 @@ <!doctype html> <meta charset="utf-8"> <title>CSS Motion Path test: <basic-shape> rect() path with explicit arguments and radius</title> -<meta name=fuzzy content="0-96;0-440"> +<meta name="fuzzy" content="maxDifference=0-160; totalPixels=0-520"> <link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com"> <link rel="match" href="offset-path-shape-rect-002-ref.html"> <link rel="help" href="https://drafts.fxtf.org/motion/#valdef-offset-path-basic-shape">
diff --git a/third_party/blink/web_tests/external/wpt/css/motion/offset-path-shape-xywh-002.html b/third_party/blink/web_tests/external/wpt/css/motion/offset-path-shape-xywh-002.html index 4c4f4ac..ef6a9e6 100644 --- a/third_party/blink/web_tests/external/wpt/css/motion/offset-path-shape-xywh-002.html +++ b/third_party/blink/web_tests/external/wpt/css/motion/offset-path-shape-xywh-002.html
@@ -1,7 +1,7 @@ <!doctype html> <meta charset="utf-8"> <title>CSS Motion Path test: <basic-shape> xywh() path with explicit arguments and radius</title> -<meta name=fuzzy content="0-130;0-250"> +<meta name="fuzzy" content="maxDifference=0-140; totalPixels=0-500"> <link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com"> <link rel="match" href="offset-path-shape-xywh-002-ref.html"> <link rel="help" href="https://drafts.fxtf.org/motion/#valdef-offset-path-basic-shape">
diff --git a/third_party/blink/web_tests/external/wpt/fenced-frame/intersection-observer.https.html.ini b/third_party/blink/web_tests/external/wpt/fenced-frame/intersection-observer.https.html.ini new file mode 100644 index 0000000..c365ca8 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/fenced-frame/intersection-observer.https.html.ini
@@ -0,0 +1,3 @@ +[intersection-observer.https.html] + [Intersection Observer Test] + expected: [PASS, FAIL]
diff --git a/third_party/blink/web_tests/external/wpt/fetch/private-network-access/fenced-frame.tentative.https.window.js.ini b/third_party/blink/web_tests/external/wpt/fetch/private-network-access/fenced-frame.tentative.https.window.js.ini index 887e7f8a..5541b59e 100644 --- a/third_party/blink/web_tests/external/wpt/fetch/private-network-access/fenced-frame.tentative.https.window.js.ini +++ b/third_party/blink/web_tests/external/wpt/fetch/private-network-access/fenced-frame.tentative.https.window.js.ini
@@ -6,8 +6,7 @@ [private to local: failed preflight.] expected: - if (product == "content_shell") and (virtual_suite == "fenced-frame-mparch") and (os == "linux") and (flag_specific == "disable-site-isolation-trials"): [FAIL, PASS] - if (product == "content_shell") and (virtual_suite == "fenced-frame-mparch") and (os == "linux") and (flag_specific == ""): [FAIL, PASS] + if (product == "content_shell") and (virtual_suite == "fenced-frame-mparch") and (os == "linux"): [FAIL, PASS] FAIL [private to local: missing CORS headers.] @@ -27,8 +26,7 @@ [public to local: failed preflight.] expected: - if (product == "content_shell") and (virtual_suite == "fenced-frame-mparch") and (os == "linux") and (flag_specific == "disable-site-isolation-trials"): [FAIL, PASS] - if (product == "content_shell") and (virtual_suite == "fenced-frame-mparch") and (os == "linux") and (flag_specific == ""): [FAIL, PASS] + if (product == "content_shell") and (virtual_suite == "fenced-frame-mparch") and (os == "linux"): [FAIL, PASS] FAIL [public to local: missing CORS headers.] @@ -48,8 +46,7 @@ [public to private: failed preflight.] expected: - if (product == "content_shell") and (virtual_suite == "fenced-frame-mparch") and (os == "linux") and (flag_specific == "disable-site-isolation-trials"): [FAIL, PASS] - if (product == "content_shell") and (virtual_suite == "fenced-frame-mparch") and (os == "linux") and (flag_specific == ""): [FAIL, PASS] + if (product == "content_shell") and (virtual_suite == "fenced-frame-mparch") and (os == "linux"): [FAIL, PASS] FAIL [public to private: missing CORS headers.] @@ -64,8 +61,7 @@ [treat-as-public-address to local (same-origin): fenced frame embedder initiated navigation has opaque origin.] expected: - if (product == "content_shell") and (virtual_suite == "fenced-frame-mparch") and (os == "linux") and (flag_specific == "disable-site-isolation-trials"): [FAIL, PASS] - if (product == "content_shell") and (virtual_suite == "fenced-frame-mparch") and (os == "linux") and (flag_specific == ""): [FAIL, PASS] + if (product == "content_shell") and (virtual_suite == "fenced-frame-mparch") and (os == "linux"): [FAIL, PASS] FAIL [treat-as-public-address to local: failed because fenced frames are incompatible with PNA.] @@ -75,8 +71,7 @@ [treat-as-public-address to local: failed preflight.] expected: - if (product == "content_shell") and (virtual_suite == "fenced-frame-mparch") and (os == "linux") and (flag_specific == "disable-site-isolation-trials"): [FAIL, PASS] - if (product == "content_shell") and (virtual_suite == "fenced-frame-mparch") and (os == "linux") and (flag_specific == ""): [FAIL, PASS] + if (product == "content_shell") and (virtual_suite == "fenced-frame-mparch") and (os == "linux"): [FAIL, PASS] FAIL [treat-as-public-address to local: missing CORS headers.] @@ -98,8 +93,7 @@ [treat-as-public-address to private: failed preflight.] expected: - if (product == "content_shell") and (virtual_suite == "fenced-frame-mparch") and (os == "linux") and (flag_specific == "disable-site-isolation-trials"): [FAIL, PASS] - if (product == "content_shell") and (virtual_suite == "fenced-frame-mparch") and (os == "linux") and (flag_specific == ""): [FAIL, PASS] + if (product == "content_shell") and (virtual_suite == "fenced-frame-mparch") and (os == "linux"): [FAIL, PASS] FAIL [treat-as-public-address to private: missing CORS headers.]
diff --git a/third_party/blink/web_tests/external/wpt/fetch/private-network-access/mixed-content-fetch.tentative.https.window.js.ini b/third_party/blink/web_tests/external/wpt/fetch/private-network-access/mixed-content-fetch.tentative.https.window.js.ini index ace0328..169b250 100644 --- a/third_party/blink/web_tests/external/wpt/fetch/private-network-access/mixed-content-fetch.tentative.https.window.js.ini +++ b/third_party/blink/web_tests/external/wpt/fetch/private-network-access/mixed-content-fetch.tentative.https.window.js.ini
@@ -3,6 +3,7 @@ if (product == "content_shell") and (virtual_suite == "pna-workers-disabled") and (os == "mac") and (port == "mac11"): [TIMEOUT, OK] if (product == "content_shell") and (virtual_suite == "pna-iframes-warning") and (os == "mac") and (port == "mac12"): [OK, TIMEOUT] if (product == "content_shell") and (virtual_suite == "pna-iframes-warning") and (os == "mac") and (port == "mac11"): [OK, TIMEOUT] + if (product == "content_shell") and (virtual_suite == "pna-iframes-warning") and (os == "linux") and (flag_specific == ""): [OK, TIMEOUT] if (product == "content_shell") and (virtual_suite == "keepalive-in-browser-migration") and (os == "mac") and (port == "mac12"): [OK, TIMEOUT] if (product == "content_shell") and (virtual_suite == "keepalive-in-browser-migration") and (os == "mac") and (port == "mac11"): [TIMEOUT, OK] if (product == "content_shell") and (virtual_suite == "") and (os == "linux") and (flag_specific == ""): [OK, TIMEOUT]
diff --git a/third_party/blink/web_tests/external/wpt/fetch/private-network-access/service-worker-background-fetch.tentative.https.window.js.ini b/third_party/blink/web_tests/external/wpt/fetch/private-network-access/service-worker-background-fetch.tentative.https.window.js.ini index dd18995..3a09b19 100644 --- a/third_party/blink/web_tests/external/wpt/fetch/private-network-access/service-worker-background-fetch.tentative.https.window.js.ini +++ b/third_party/blink/web_tests/external/wpt/fetch/private-network-access/service-worker-background-fetch.tentative.https.window.js.ini
@@ -12,11 +12,8 @@ expected: if (product == "content_shell") and (os == "win") and (virtual_suite == "pna-iframes-warning") and (port == "win11"): [PASS, FAIL] if (product == "content_shell") and (os == "win") and (virtual_suite == "pna-iframes-warning") and (port == "win10.20h2"): PASS - if (product == "content_shell") and (os == "win") and (virtual_suite == "keepalive-in-browser-migration") and (port == "win11"): [PASS, FAIL] - if (product == "content_shell") and (os == "win") and (virtual_suite == "keepalive-in-browser-migration") and (port == "win10.20h2"): [PASS, FAIL] if (product == "content_shell") and (os == "win") and (virtual_suite == "") and (port == "win11"): [PASS, FAIL] if (product == "content_shell") and (os == "win") and (virtual_suite == "") and (port == "win10.20h2"): PASS - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64") and (virtual_suite == "pna-workers-disabled"): [FAIL, PASS] if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64") and (virtual_suite == "pna-permission"): [PASS, FAIL] if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64") and (virtual_suite == "pna-iframes-warning"): [FAIL, PASS] if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64") and (virtual_suite == ""): [FAIL, PASS] @@ -25,6 +22,7 @@ if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64") and (virtual_suite == "pna-workers-enabled"): [FAIL, PASS] if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64") and (virtual_suite == "pna-iframes-warning"): [FAIL, PASS] if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64") and (virtual_suite == "pna-iframes-enabled"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64") and (virtual_suite == ""): [PASS, FAIL] if (product == "content_shell") and (os == "mac") and (port == "mac12") and (virtual_suite == "pna-permission"): [FAIL, PASS] if (product == "content_shell") and (os == "mac") and (port == "mac12") and (virtual_suite == "keepalive-in-browser-migration"): [FAIL, PASS] if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64") and (virtual_suite == "pna-workers-enabled"): PASS @@ -33,7 +31,6 @@ if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64") and (virtual_suite == "pna-iframes-enabled"): [FAIL, PASS] if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64") and (virtual_suite == "keepalive-in-browser-migration"): [FAIL, PASS] if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64") and (virtual_suite == ""): [FAIL, PASS] - if (product == "content_shell") and (os == "mac") and (port == "mac11") and (virtual_suite == "pna-workers-disabled"): PASS if (product == "content_shell") and (os == "mac") and (port == "mac11") and (virtual_suite == "pna-permission"): PASS if (product == "content_shell") and (os == "mac") and (port == "mac11") and (virtual_suite == "pna-iframes-warning"): PASS if (product == "content_shell") and (os == "mac") and (port == "mac11") and (virtual_suite == "pna-iframes-enabled"): [PASS, FAIL] @@ -51,16 +48,16 @@ if (product == "content_shell") and (os == "linux") and (virtual_suite == "pna-iframes-enabled") and (flag_specific == ""): [FAIL, PASS] if (product == "content_shell") and (os == "linux") and (virtual_suite == "plz-dedicated-worker") and (flag_specific == "disable-site-isolation-trials"): PASS if (product == "content_shell") and (os == "linux") and (virtual_suite == "plz-dedicated-worker") and (flag_specific == ""): [PASS, FAIL] - if (product == "content_shell") and (os == "linux") and (virtual_suite == "keepalive-in-browser-migration") and (flag_specific == "disable-site-isolation-trials"): [PASS, FAIL] - if (product == "content_shell") and (os == "linux") and (virtual_suite == "keepalive-in-browser-migration") and (flag_specific == ""): PASS if (product == "content_shell") and (os == "win") and (virtual_suite == "pna-workers-enabled"): PASS if (product == "content_shell") and (os == "win") and (virtual_suite == "pna-workers-disabled"): PASS if (product == "content_shell") and (os == "win") and (virtual_suite == "pna-permission"): PASS if (product == "content_shell") and (os == "win") and (virtual_suite == "pna-iframes-enabled"): [PASS, FAIL] + if (product == "content_shell") and (os == "win") and (virtual_suite == "keepalive-in-browser-migration"): [PASS, FAIL] if (product == "content_shell") and (os == "linux") and (virtual_suite == "produce-compile-hints"): PASS if (product == "content_shell") and (os == "linux") and (virtual_suite == "pna-workers-enabled"): PASS if (product == "content_shell") and (os == "linux") and (virtual_suite == "pna-permission"): PASS if (product == "content_shell") and (os == "linux") and (virtual_suite == "pna-iframes-warning"): PASS + if (product == "content_shell") and (os == "linux") and (virtual_suite == "keepalive-in-browser-migration"): [PASS, FAIL] if (product == "content_shell") and (os == "linux") and (virtual_suite == ""): [PASS, FAIL] FAIL @@ -109,7 +106,6 @@ expected: if (product == "content_shell") and (virtual_suite == "pna-workers-enabled") and (os == "mac") and (port == "mac12-arm64"): [PASS, FAIL] if (product == "content_shell") and (virtual_suite == "pna-workers-enabled") and (os == "mac") and (port == "mac12"): [PASS, FAIL] - if (product == "content_shell") and (virtual_suite == "pna-workers-disabled") and (os == "mac") and (port == "mac13-arm64"): [PASS, FAIL] if (product == "content_shell") and (virtual_suite == "pna-workers-disabled") and (os == "mac") and (port == "mac12-arm64"): [PASS, FAIL] if (product == "content_shell") and (virtual_suite == "pna-workers-disabled") and (os == "linux") and (flag_specific == "disable-site-isolation-trials"): [PASS, FAIL] if (product == "content_shell") and (virtual_suite == "pna-permission") and (os == "mac") and (port == "mac13"): [PASS, FAIL] @@ -119,6 +115,7 @@ if (product == "content_shell") and (virtual_suite == "pna-iframes-warning") and (os == "mac") and (port == "mac13"): [PASS, FAIL] if (product == "content_shell") and (virtual_suite == "pna-iframes-warning") and (os == "mac") and (port == "mac12-arm64"): [PASS, FAIL] if (product == "content_shell") and (virtual_suite == "pna-iframes-warning") and (os == "mac") and (port == "mac12"): [PASS, FAIL] + if (product == "content_shell") and (virtual_suite == "pna-iframes-warning") and (os == "mac") and (port == "mac11-arm64"): [PASS, FAIL] if (product == "content_shell") and (virtual_suite == "pna-iframes-enabled") and (os == "win") and (port == "win11"): [PASS, FAIL] if (product == "content_shell") and (virtual_suite == "pna-iframes-enabled") and (os == "mac") and (port == "mac13"): [PASS, FAIL] if (product == "content_shell") and (virtual_suite == "pna-iframes-enabled") and (os == "mac") and (port == "mac12-arm64"): [PASS, FAIL]
diff --git a/third_party/blink/web_tests/external/wpt/fetch/private-network-access/shared-worker-fetch.tentative.https.window.js.ini b/third_party/blink/web_tests/external/wpt/fetch/private-network-access/shared-worker-fetch.tentative.https.window.js.ini index 0cf0d94..d58c1b9 100644 --- a/third_party/blink/web_tests/external/wpt/fetch/private-network-access/shared-worker-fetch.tentative.https.window.js.ini +++ b/third_party/blink/web_tests/external/wpt/fetch/private-network-access/shared-worker-fetch.tentative.https.window.js.ini
@@ -1,6 +1,7 @@ [shared-worker-fetch.tentative.https.window.html] expected: if (product == "content_shell") and (virtual_suite == "pna-permission") and (os == "linux") and (flag_specific == ""): [OK, TIMEOUT] + if (product == "content_shell") and (virtual_suite == "produce-compile-hints"): [OK, TIMEOUT] [private to local: failure.] expected: if (product == "content_shell") and (virtual_suite == "pna-workers-enabled") and (os == "linux") and (flag_specific == ""): PASS @@ -10,8 +11,14 @@ expected: if (product == "content_shell") and (virtual_suite == "pna-workers-disabled") and (os == "win") and (port == "win11"): FAIL if (product == "content_shell") and (virtual_suite == "pna-workers-disabled") and (os == "win") and (port == "win10.20h2"): [FAIL, PASS] + if (product == "content_shell") and (virtual_suite == "pna-workers-disabled") and (os == "mac") and (port == "mac13-arm64"): [PASS, FAIL] + if (product == "content_shell") and (virtual_suite == "pna-workers-disabled") and (os == "mac") and (port == "mac13"): FAIL + if (product == "content_shell") and (virtual_suite == "pna-workers-disabled") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (virtual_suite == "pna-workers-disabled") and (os == "mac") and (port == "mac12"): FAIL + if (product == "content_shell") and (virtual_suite == "pna-workers-disabled") and (os == "mac") and (port == "mac11-arm64"): FAIL + if (product == "content_shell") and (virtual_suite == "pna-workers-disabled") and (os == "mac") and (port == "mac11"): FAIL + if (product == "content_shell") and (virtual_suite == "pna-workers-disabled") and (os == "mac") and (port == "mac10.15"): FAIL if (product == "content_shell") and (virtual_suite == "keepalive-in-browser-migration") and (os == "mac") and (port == "mac10.15"): [PASS, FAIL] - if (product == "content_shell") and (virtual_suite == "pna-workers-disabled") and (os == "mac"): FAIL if (product == "content_shell") and (virtual_suite == "pna-workers-disabled") and (os == "linux"): [FAIL, PASS] if product == "chrome": FAIL @@ -24,8 +31,14 @@ expected: if (product == "content_shell") and (virtual_suite == "pna-workers-disabled") and (os == "win") and (port == "win11"): FAIL if (product == "content_shell") and (virtual_suite == "pna-workers-disabled") and (os == "win") and (port == "win10.20h2"): [FAIL, PASS] + if (product == "content_shell") and (virtual_suite == "pna-workers-disabled") and (os == "mac") and (port == "mac13-arm64"): [PASS, FAIL] + if (product == "content_shell") and (virtual_suite == "pna-workers-disabled") and (os == "mac") and (port == "mac13"): FAIL + if (product == "content_shell") and (virtual_suite == "pna-workers-disabled") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (virtual_suite == "pna-workers-disabled") and (os == "mac") and (port == "mac12"): FAIL + if (product == "content_shell") and (virtual_suite == "pna-workers-disabled") and (os == "mac") and (port == "mac11-arm64"): FAIL + if (product == "content_shell") and (virtual_suite == "pna-workers-disabled") and (os == "mac") and (port == "mac11"): FAIL + if (product == "content_shell") and (virtual_suite == "pna-workers-disabled") and (os == "mac") and (port == "mac10.15"): FAIL if (product == "content_shell") and (virtual_suite == "keepalive-in-browser-migration") and (os == "mac") and (port == "mac10.15"): [PASS, FAIL] - if (product == "content_shell") and (virtual_suite == "pna-workers-disabled") and (os == "mac"): FAIL if (product == "content_shell") and (virtual_suite == "pna-workers-disabled") and (os == "linux"): [FAIL, PASS] [public to private: failed preflight.] @@ -37,8 +50,14 @@ expected: if (product == "content_shell") and (virtual_suite == "pna-workers-disabled") and (os == "win") and (port == "win11"): FAIL if (product == "content_shell") and (virtual_suite == "pna-workers-disabled") and (os == "win") and (port == "win10.20h2"): [FAIL, PASS] + if (product == "content_shell") and (virtual_suite == "pna-workers-disabled") and (os == "mac") and (port == "mac13-arm64"): [PASS, FAIL] + if (product == "content_shell") and (virtual_suite == "pna-workers-disabled") and (os == "mac") and (port == "mac13"): FAIL + if (product == "content_shell") and (virtual_suite == "pna-workers-disabled") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (virtual_suite == "pna-workers-disabled") and (os == "mac") and (port == "mac12"): FAIL + if (product == "content_shell") and (virtual_suite == "pna-workers-disabled") and (os == "mac") and (port == "mac11-arm64"): FAIL + if (product == "content_shell") and (virtual_suite == "pna-workers-disabled") and (os == "mac") and (port == "mac11"): FAIL + if (product == "content_shell") and (virtual_suite == "pna-workers-disabled") and (os == "mac") and (port == "mac10.15"): FAIL if (product == "content_shell") and (virtual_suite == "keepalive-in-browser-migration") and (os == "mac") and (port == "mac10.15"): [PASS, FAIL] - if (product == "content_shell") and (virtual_suite == "pna-workers-disabled") and (os == "mac"): FAIL if (product == "content_shell") and (virtual_suite == "pna-workers-disabled") and (os == "linux"): [FAIL, PASS] if product == "chrome": [PASS, FAIL] @@ -51,8 +70,14 @@ expected: if (product == "content_shell") and (virtual_suite == "pna-workers-disabled") and (os == "win") and (port == "win11"): FAIL if (product == "content_shell") and (virtual_suite == "pna-workers-disabled") and (os == "win") and (port == "win10.20h2"): [FAIL, PASS] + if (product == "content_shell") and (virtual_suite == "pna-workers-disabled") and (os == "mac") and (port == "mac13-arm64"): [PASS, FAIL] + if (product == "content_shell") and (virtual_suite == "pna-workers-disabled") and (os == "mac") and (port == "mac13"): FAIL + if (product == "content_shell") and (virtual_suite == "pna-workers-disabled") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (virtual_suite == "pna-workers-disabled") and (os == "mac") and (port == "mac12"): FAIL + if (product == "content_shell") and (virtual_suite == "pna-workers-disabled") and (os == "mac") and (port == "mac11-arm64"): FAIL + if (product == "content_shell") and (virtual_suite == "pna-workers-disabled") and (os == "mac") and (port == "mac11"): FAIL + if (product == "content_shell") and (virtual_suite == "pna-workers-disabled") and (os == "mac") and (port == "mac10.15"): FAIL if (product == "content_shell") and (virtual_suite == "keepalive-in-browser-migration") and (os == "mac") and (port == "mac10.15"): [PASS, FAIL] - if (product == "content_shell") and (virtual_suite == "pna-workers-disabled") and (os == "mac"): FAIL if (product == "content_shell") and (virtual_suite == "pna-workers-disabled") and (os == "linux"): [FAIL, PASS] if product == "chrome": [PASS, FAIL] @@ -65,7 +90,13 @@ expected: if (product == "content_shell") and (virtual_suite == "pna-workers-disabled") and (os == "win") and (port == "win11"): FAIL if (product == "content_shell") and (virtual_suite == "pna-workers-disabled") and (os == "win") and (port == "win10.20h2"): [FAIL, PASS] + if (product == "content_shell") and (virtual_suite == "pna-workers-disabled") and (os == "mac") and (port == "mac13-arm64"): [PASS, FAIL] + if (product == "content_shell") and (virtual_suite == "pna-workers-disabled") and (os == "mac") and (port == "mac13"): FAIL + if (product == "content_shell") and (virtual_suite == "pna-workers-disabled") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (virtual_suite == "pna-workers-disabled") and (os == "mac") and (port == "mac12"): FAIL + if (product == "content_shell") and (virtual_suite == "pna-workers-disabled") and (os == "mac") and (port == "mac11-arm64"): FAIL + if (product == "content_shell") and (virtual_suite == "pna-workers-disabled") and (os == "mac") and (port == "mac11"): FAIL + if (product == "content_shell") and (virtual_suite == "pna-workers-disabled") and (os == "mac") and (port == "mac10.15"): FAIL if (product == "content_shell") and (virtual_suite == "keepalive-in-browser-migration") and (os == "mac") and (port == "mac10.15"): [PASS, FAIL] - if (product == "content_shell") and (virtual_suite == "pna-workers-disabled") and (os == "mac"): FAIL if (product == "content_shell") and (virtual_suite == "pna-workers-disabled") and (os == "linux"): [FAIL, PASS] if product == "chrome": [PASS, FAIL]
diff --git a/third_party/blink/web_tests/external/wpt/fs/FileSystemFileHandle-cross-primitive-locking.https.tentative.worker.js.ini b/third_party/blink/web_tests/external/wpt/fs/FileSystemFileHandle-cross-primitive-locking.https.tentative.worker.js.ini index 3848bcf..efebfaa 100644 --- a/third_party/blink/web_tests/external/wpt/fs/FileSystemFileHandle-cross-primitive-locking.https.tentative.worker.js.ini +++ b/third_party/blink/web_tests/external/wpt/fs/FileSystemFileHandle-cross-primitive-locking.https.tentative.worker.js.ini
@@ -2,247 +2,498 @@ [A directory cannot be removed if it contains a file that has an open access handle in read-only mode.] expected: if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [FAIL, PASS] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] [A directory cannot be removed if it contains a file that has an open access handle in readwrite mode.] expected: if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [PASS, FAIL] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] [A directory cannot be removed if it contains a file that has an open access handle in readwrite-unsafe mode.] expected: if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [FAIL, PASS] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] + + [A directory cannot be removed if it contains a file that has an open writable stream in exclusive mode.] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] + + [A directory cannot be removed if it contains a file that has an open writable stream in siloed mode.] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] [A directory cannot be removed if it contains a file that has an open writable stream.] expected: - if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [FAIL, PASS] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito"): [FAIL, PASS] [A file cannot be moved to a location with an open access handle in read-only mode] expected: if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [PASS, FAIL] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] [A file cannot be moved to a location with an open access handle in readwrite mode] expected: if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [PASS, FAIL] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] [A file cannot be moved to a location with an open access handle in readwrite-unsafe mode] expected: if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [FAIL, PASS] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] [A file cannot be moved to a location with an open writable stream] expected: - if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [FAIL, PASS] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito"): [FAIL, PASS] + + [A file cannot be moved to a location with an open writable stream in exclusive mode] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] + + [A file cannot be moved to a location with an open writable stream in siloed mode] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] [A file with an ongoing move operation does not interfere with an open access handle in read-only mode on another file] expected: if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [PASS, FAIL] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] [A file with an ongoing move operation does not interfere with an open access handle in readwrite-unsafe mode on another file] expected: if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [FAIL, PASS] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] + + [A file with an ongoing move operation does not interfere with an open writable stream in exclusive mode on another file] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] + + [A file with an ongoing move operation does not interfere with an open writable stream in siloed mode on another file] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] [A file with an ongoing move operation does not interfere with an open writable stream on another file] expected: - if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [FAIL, PASS] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito"): [FAIL, PASS] [A file with an ongoing remove operation does not interfere with the creation of an open access handle in read-only mode on another file] expected: if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [PASS, FAIL] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] [A file with an ongoing remove operation does not interfere with the creation of an open access handle in readwrite mode on another file] expected: if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [PASS, FAIL] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] [A file with an ongoing remove operation does not interfere with the creation of an open access handle in readwrite-unsafe mode on another file] expected: if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [FAIL, PASS] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] + + [A file with an ongoing remove operation does not interfere with the creation of an open writable stream in exclusive mode on another file] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] + + [A file with an ongoing remove operation does not interfere with the creation of an open writable stream in siloed mode on another file] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] [A file with an ongoing remove operation does not interfere with the creation of an open writable stream on another file] expected: - if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [FAIL, PASS] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito"): [FAIL, PASS] [A file with an open access handle in read-only mode cannot be moved] expected: if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [PASS, FAIL] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] [A file with an open access handle in read-only mode cannot be removed] expected: if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [FAIL, PASS] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] [A file with an open access handle in read-only mode does not interfere with moving another file] expected: if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [PASS, FAIL] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] [A file with an open access handle in read-only mode does not interfere with removing another file] expected: if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [FAIL, PASS] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] [A file with an open access handle in read-only mode does not interfere with the creation of a writable stream on another file] expected: - if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [FAIL, PASS] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito"): [FAIL, PASS] + + [A file with an open access handle in read-only mode does not interfere with the creation of an open writable stream in exclusive mode on another file] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] + + [A file with an open access handle in read-only mode does not interfere with the creation of an open writable stream in siloed mode on another file] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] [A file with an open access handle in readwrite mode cannot be moved] expected: if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [PASS, FAIL] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] [A file with an open access handle in readwrite mode cannot be removed] expected: if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [PASS, FAIL] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] [A file with an open access handle in readwrite mode does not interfere with moving another file] expected: if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [PASS, FAIL] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] [A file with an open access handle in readwrite mode does not interfere with removing another file] expected: if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [PASS, FAIL] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] [A file with an open access handle in readwrite mode does not interfere with the creation of a writable stream on another file] expected: - if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [PASS, FAIL] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito"): [PASS, FAIL] + + [A file with an open access handle in readwrite mode does not interfere with the creation of an open writable stream in exclusive mode on another file] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] + + [A file with an open access handle in readwrite mode does not interfere with the creation of an open writable stream in siloed mode on another file] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] [A file with an open access handle in readwrite-unsafe mode cannot be moved] expected: if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [FAIL, PASS] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] [A file with an open access handle in readwrite-unsafe mode cannot be removed] expected: if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [FAIL, PASS] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] [A file with an open access handle in readwrite-unsafe mode does not interfere with moving another file] expected: if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [FAIL, PASS] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] [A file with an open access handle in readwrite-unsafe mode does not interfere with removing another file] expected: if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [FAIL, PASS] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] [A file with an open access handle in readwrite-unsafe mode does not interfere with the creation of a writable stream on another file] expected: - if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [FAIL, PASS] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito"): [FAIL, PASS] + + [A file with an open access handle in readwrite-unsafe mode does not interfere with the creation of an open writable stream in exclusive mode on another file] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] + + [A file with an open access handle in readwrite-unsafe mode does not interfere with the creation of an open writable stream in siloed mode on another file] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] + + [A file with an open writable stream in exclusive mode does not interfere with an ongoing move operation on another file] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] + + [A file with an open writable stream in exclusive mode does not interfere with an ongoing remove operation on another file] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] + + [A file with an open writable stream in exclusive mode does not interfere with an open access handle in read-only mode on another file] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] + + [A file with an open writable stream in exclusive mode does not interfere with an open access handle in readwrite mode on another file] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] + + [A file with an open writable stream in exclusive mode does not interfere with an open access handle in readwrite-unsafe mode on another file] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] + + [A file with an open writable stream in siloed mode does not interfere with an ongoing move operation on another file] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] + + [A file with an open writable stream in siloed mode does not interfere with an ongoing remove operation on another file] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] + + [A file with an open writable stream in siloed mode does not interfere with an open access handle in read-only mode on another file] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] + + [A file with an open writable stream in siloed mode does not interfere with an open access handle in readwrite mode on another file] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] + + [A file with an open writable stream in siloed mode does not interfere with an open access handle in readwrite-unsafe mode on another file] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] [A writable stream from one file does not interfere with a an ongoing move operation on another file] expected: - if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [FAIL, PASS] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito"): [FAIL, PASS] [A writable stream from one file does not interfere with a an ongoing remove operation on another file] expected: - if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [FAIL, PASS] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito"): [FAIL, PASS] [A writable stream from one file does not interfere with a an open access handle in read-only mode on another file] expected: - if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [FAIL, PASS] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito"): [FAIL, PASS] [A writable stream from one file does not interfere with a an open access handle in readwrite mode on another file] expected: - if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [PASS, FAIL] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito"): [PASS, FAIL] [A writable stream from one file does not interfere with a an open access handle in readwrite-unsafe mode on another file] expected: - if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [FAIL, PASS] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito"): [FAIL, PASS] [After a file has finished being removed, that file can have an open access handle in read-only mode] expected: if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [FAIL, PASS] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] [After a file has finished being removed, that file can have an open access handle in readwrite mode] expected: if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [PASS, FAIL] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] [After a file has finished being removed, that file can have an open access handle in readwrite-unsafe mode] expected: if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [FAIL, PASS] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] [After a file has finished being removed, that file can have an open writable stream] expected: - if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [FAIL, PASS] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito"): [FAIL, PASS] + + [After a file has finished being removed, that file can have an open writable stream in exclusive mode] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] + + [After a file has finished being removed, that file can have an open writable stream in siloed mode] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] [After a file has finished moving, that file can have an open access handle in read-only mode] expected: if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [PASS, FAIL] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] [After a file has finished moving, that file can have an open access handle in readwrite mode] expected: if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [PASS, FAIL] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] [After a file has finished moving, that file can have an open access handle in readwrite-unsafe mode] expected: if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [FAIL, PASS] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] [After a file has finished moving, that file can have an open writable stream] expected: - if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [FAIL, PASS] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito"): [FAIL, PASS] + + [After a file has finished moving, that file can have an open writable stream in exclusive mode] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] + + [After a file has finished moving, that file can have an open writable stream in siloed mode] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] + + [After a writable stream in exclusive mode has been closed for a file, that file can have an ongoing move operation] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] + + [After a writable stream in exclusive mode has been closed for a file, that file can have an ongoing remove operation] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] + + [After a writable stream in exclusive mode has been closed for a file, that file can have an open access handle in read-only mode] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] + + [After a writable stream in exclusive mode has been closed for a file, that file can have an open access handle in readwrite mode] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] + + [After a writable stream in exclusive mode has been closed for a file, that file can have an open access handle in readwrite-unsafe mode] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] [After all writable streams have been closed for a file, that file can have an ongoing move operation] expected: - if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [FAIL, PASS] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito"): [FAIL, PASS] [After all writable streams have been closed for a file, that file can have an ongoing remove operation] expected: - if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [FAIL, PASS] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito"): [FAIL, PASS] [After all writable streams have been closed for a file, that file can have an open access handle in read-only mode] expected: - if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [FAIL, PASS] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito"): [FAIL, PASS] [After all writable streams have been closed for a file, that file can have an open access handle in readwrite mode] expected: - if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [PASS, FAIL] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito"): [PASS, FAIL] [After all writable streams have been closed for a file, that file can have an open access handle in readwrite-unsafe mode] expected: - if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [FAIL, PASS] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito"): [FAIL, PASS] + + [After all writable streams in siloed mode have been closed for a file, that file can have an ongoing move operation] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] + + [After all writable streams in siloed mode have been closed for a file, that file can have an ongoing remove operation] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] + + [After all writable streams in siloed mode have been closed for a file, that file can have an open access handle in read-only mode] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] + + [After all writable streams in siloed mode have been closed for a file, that file can have an open access handle in readwrite mode] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] + + [After all writable streams in siloed mode have been closed for a file, that file can have an open access handle in readwrite-unsafe mode] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] [After an open access handle in read-only mode on a file has been closed, that file can be moved] expected: if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [PASS, FAIL] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] [After an open access handle in read-only mode on a file has been closed, that file can be removed] expected: if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [FAIL, PASS] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] [After an open access handle in readwrite mode on a file has been closed, that file can be moved] expected: if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [PASS, FAIL] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] [After an open access handle in readwrite mode on a file has been closed, that file can be removed] expected: if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [PASS, FAIL] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] [After an open access handle in readwrite-unsafe mode on a file has been closed, that file can be moved] expected: if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [FAIL, PASS] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] [After an open access handle in readwrite-unsafe mode on a file has been closed, that file can be removed] expected: if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [FAIL, PASS] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] [When there's an open access handle in read-only mode on a file, cannot open a writable stream on that same file] expected: - if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [FAIL, PASS] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito"): [FAIL, PASS] + + [When there's an open access handle in read-only mode on a file, cannot open an open writable stream in exclusive mode on that same file] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] + + [When there's an open access handle in read-only mode on a file, cannot open an open writable stream in siloed mode on that same file] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] [When there's an open access handle in readwrite mode on a file, cannot open a writable stream on that same file] expected: - if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [PASS, FAIL] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito"): [PASS, FAIL] + + [When there's an open access handle in readwrite mode on a file, cannot open an open writable stream in exclusive mode on that same file] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] + + [When there's an open access handle in readwrite mode on a file, cannot open an open writable stream in siloed mode on that same file] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] [When there's an open access handle in readwrite-unsafe mode on a file, cannot open a writable stream on that same file] expected: - if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [FAIL, PASS] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito"): [FAIL, PASS] + + [When there's an open access handle in readwrite-unsafe mode on a file, cannot open an open writable stream in exclusive mode on that same file] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] + + [When there's an open access handle in readwrite-unsafe mode on a file, cannot open an open writable stream in siloed mode on that same file] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] + + [When there's an open writable stream in exclusive mode on a file, cannot have an ongoing move operation on that same file] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] + + [When there's an open writable stream in exclusive mode on a file, cannot have an ongoing remove operation on that same file] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] + + [When there's an open writable stream in exclusive mode on a file, cannot have an open access handle in read-only mode on that same file] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] + + [When there's an open writable stream in exclusive mode on a file, cannot have an open access handle in readwrite mode on that same file] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] + + [When there's an open writable stream in exclusive mode on a file, cannot have an open access handle in readwrite-unsafe mode on that same file] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] + + [When there's an open writable stream in siloed mode on a file, cannot have an ongoing move operation on that same file] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] + + [When there's an open writable stream in siloed mode on a file, cannot have an ongoing remove operation on that same file] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] + + [When there's an open writable stream in siloed mode on a file, cannot have an open access handle in read-only mode on that same file] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] + + [When there's an open writable stream in siloed mode on a file, cannot have an open access handle in readwrite mode on that same file] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] + + [When there's an open writable stream in siloed mode on a file, cannot have an open access handle in readwrite-unsafe mode on that same file] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == ""): [FAIL, PASS] [When there's an open writable stream on a file, cannot have a an ongoing move operation on that same file] expected: - if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [FAIL, PASS] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito"): [FAIL, PASS] [When there's an open writable stream on a file, cannot have a an ongoing remove operation on that same file] expected: - if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [FAIL, PASS] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito"): [FAIL, PASS] [When there's an open writable stream on a file, cannot have a an open access handle in read-only mode on that same file] expected: - if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [FAIL, PASS] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito"): [FAIL, PASS] [When there's an open writable stream on a file, cannot have a an open access handle in readwrite mode on that same file] expected: - if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [PASS, FAIL] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito"): [PASS, FAIL] [When there's an open writable stream on a file, cannot have a an open access handle in readwrite-unsafe mode on that same file] expected: - if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito") and (flag_specific == "disable-site-isolation-trials"): [FAIL, PASS] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "fsa-incognito"): [FAIL, PASS]
diff --git a/third_party/blink/web_tests/external/wpt/fs/script-tests/FileSystemWritableFileStream-write.js b/third_party/blink/web_tests/external/wpt/fs/script-tests/FileSystemWritableFileStream-write.js index a91a206..0b12def 100644 --- a/third_party/blink/web_tests/external/wpt/fs/script-tests/FileSystemWritableFileStream-write.js +++ b/third_party/blink/web_tests/external/wpt/fs/script-tests/FileSystemWritableFileStream-write.js
@@ -345,3 +345,20 @@ assert_equals(await getFileContents(handle), ''); assert_equals(await getFileSize(handle), 0); }, 'write() with an invalid blob to an empty file should reject'); + +directory_test(async (t, root) => { + const handle = await createFileWithContents(t, 'file.txt', 'contents', root); + const stream = await handle.createWritable({mode: 'exclusive'}); + + await stream.write('12345'); + await promise_rejects_js( + t, TypeError, stream.write({type: 'write', data: null}), + 'write with null data'); + + // The file contents should not have been changed. + assert_equals(await getFileContents(handle), 'contents'); + + // The file's lock was released. + const newStream = await handle.createWritable({mode: 'exclusive'}); + await newStream.close(); +}, 'an errored writable stream releases its lock');
diff --git a/third_party/blink/web_tests/external/wpt/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext.html.ini b/third_party/blink/web_tests/external/wpt/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext.html.ini index d06ce21..2c33b0ff 100644 --- a/third_party/blink/web_tests/external/wpt/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext.html.ini +++ b/third_party/blink/web_tests/external/wpt/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext.html.ini
@@ -1,12 +1,15 @@ [offscreencanvas.getcontext.html] [Test that getContext twice with different context type returns null the second time] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Test that getContext with supported string returns correct results] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Test that webglcontext.canvas should return the original OffscreenCanvas] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext.worker.js.ini b/third_party/blink/web_tests/external/wpt/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext.worker.js.ini index fecd57d..28883613 100644 --- a/third_party/blink/web_tests/external/wpt/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext.worker.js.ini +++ b/third_party/blink/web_tests/external/wpt/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext.worker.js.ini
@@ -1,12 +1,15 @@ [offscreencanvas.getcontext.worker.html] [Test that getContext twice with different context type returns null the second time] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Test that getContext with supported string returns correct results] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Test that webglcontext.canvas should return the original OffscreenCanvas] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfer.to.imagebitmap.html.ini b/third_party/blink/web_tests/external/wpt/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfer.to.imagebitmap.html.ini index 09857ba0..ffac485 100644 --- a/third_party/blink/web_tests/external/wpt/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfer.to.imagebitmap.html.ini +++ b/third_party/blink/web_tests/external/wpt/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfer.to.imagebitmap.html.ini
@@ -1,4 +1,5 @@ [offscreencanvas.transfer.to.imagebitmap.html] [Test that transferToImageBitmap returns an ImageBitmap with correct width and height] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfer.to.imagebitmap.w.html.ini b/third_party/blink/web_tests/external/wpt/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfer.to.imagebitmap.w.html.ini index aa68599..1ec1f14 100644 --- a/third_party/blink/web_tests/external/wpt/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfer.to.imagebitmap.w.html.ini +++ b/third_party/blink/web_tests/external/wpt/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfer.to.imagebitmap.w.html.ini
@@ -1,4 +1,5 @@ [offscreencanvas.transfer.to.imagebitmap.w.html] [Test that transferToImageBitmap returns an ImageBitmap with correct width and height in a worker] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transferrable.w.html.ini b/third_party/blink/web_tests/external/wpt/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transferrable.w.html.ini index 4373bca5..750844c4 100644 --- a/third_party/blink/web_tests/external/wpt/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transferrable.w.html.ini +++ b/third_party/blink/web_tests/external/wpt/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transferrable.w.html.ini
@@ -1,4 +1,5 @@ [offscreencanvas.transferrable.w.html] [Test that transfer an OffscreenCanvas that has a webgl context throws exception in a worker.] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/html/dom/elements/global-attributes/dir-assorted.window-expected.txt b/third_party/blink/web_tests/external/wpt/html/dom/elements/global-attributes/dir-assorted.window-expected.txt index 1e523a7..9f0481f 100644 --- a/third_party/blink/web_tests/external/wpt/html/dom/elements/global-attributes/dir-assorted.window-expected.txt +++ b/third_party/blink/web_tests/external/wpt/html/dom/elements/global-attributes/dir-assorted.window-expected.txt
@@ -4,5 +4,6 @@ FAIL Non-HTML element outside the document tree has a direction assert_true: expected true got false PASS Element without direction has parent element direction FAIL Non-HTML element without direction has parent element direction assert_true: expected true got false +PASS dir inheritance is correct after insertion and removal from document Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/external/wpt/html/dom/elements/global-attributes/dir-assorted.window.js b/third_party/blink/web_tests/external/wpt/html/dom/elements/global-attributes/dir-assorted.window.js index 64f99724..a4b30f0 100644 --- a/third_party/blink/web_tests/external/wpt/html/dom/elements/global-attributes/dir-assorted.window.js +++ b/third_party/blink/web_tests/external/wpt/html/dom/elements/global-attributes/dir-assorted.window.js
@@ -27,3 +27,21 @@ ele.append(ele2); assert_true(ele2.matches(":dir(rtl)")); }, "Non-HTML element without direction has parent element direction"); + +test(() => { + let container1 = document.createElement("div"); + document.body.appendChild(container1); + let container2 = document.createElement("div"); + + for (let container of [container1, container2]) { + container.dir = "rtl"; + let e = document.createElement("div"); + assert_true(e.matches(":dir(ltr)")); + container.appendChild(e); + assert_false(e.matches(":dir(ltr)")); + e.remove(); + assert_true(e.matches(":dir(ltr)")); + } + + container1.remove(); +}, "dir inheritance is correct after insertion and removal from document");
diff --git a/third_party/blink/web_tests/external/wpt/html/dom/elements/global-attributes/dir-auto-dynamic-changes.window-expected.txt b/third_party/blink/web_tests/external/wpt/html/dom/elements/global-attributes/dir-auto-dynamic-changes.window-expected.txt new file mode 100644 index 0000000..7d67e3ba --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/dom/elements/global-attributes/dir-auto-dynamic-changes.window-expected.txt
@@ -0,0 +1,8 @@ +This is a testharness.js-based test. +PASS dynamic insertion of RTL text in a child element +PASS dir=auto changes for content insertion and removal, in and out of document +FAIL dir=auto changes for slot reassignment assert_false: #two with RTL child span expected false got true +PASS text changes affecting both slot and ancestor with dir=auto +PASS dynamic changes to subtrees excluded as a result of the dir attribute +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/external/wpt/html/dom/elements/global-attributes/dir-auto-dynamic-changes.window.js b/third_party/blink/web_tests/external/wpt/html/dom/elements/global-attributes/dir-auto-dynamic-changes.window.js new file mode 100644 index 0000000..5df996d --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/dom/elements/global-attributes/dir-auto-dynamic-changes.window.js
@@ -0,0 +1,169 @@ +function setup_tree(light_tree, shadow_tree) { + let body = document.body; + let old_length = body.childNodes.length; + body.insertAdjacentHTML("beforeend", light_tree.trim()); + if (body.childNodes.length != old_length + 1) { + throw "unexpected markup"; + } + let result = body.lastChild; + if (shadow_tree) { + let shadow = result.querySelector("#root").attachShadow({mode: "open"}); + shadow.innerHTML = shadow_tree.trim(); + return [result, shadow]; + } + return result; +} + +test(t => { + let a = setup_tree(` + <div id="a" dir="auto"> + <div id="b"></div> + hello + </div> + `); + + let acs = getComputedStyle(a); + assert_true(a.matches(":dir(ltr)"), ":dir(ltr) matches before insertion"); + assert_false(a.matches(":dir(rtl)"), ":dir(rtl) does not match before insertion"); + assert_equals(acs.direction, "ltr", "CSSdirection before insertion"); + b.innerHTML = "\u05D0"; + assert_false(a.matches(":dir(ltr)"), ":dir(ltr) does not match after insertion"); + assert_true(a.matches(":dir(rtl)"), ":dir(rtl) matches after insertion"); + assert_equals(acs.direction, "rtl", "CSSdirection after insertion"); + + a.remove(); +}, "dynamic insertion of RTL text in a child element"); + +test(() => { + let div_rtlchar = document.createElement("div"); + div_rtlchar.innerHTML = "\u05D0"; + + let container1 = document.createElement("div"); + document.body.appendChild(container1); + let container2 = document.createElement("div"); + + for (let container of [container1, container2]) { + container.dir = "auto"; + assert_true(container.matches(":dir(ltr)")); + container.appendChild(div_rtlchar); + assert_false(container.matches(":dir(ltr)")); + div_rtlchar.remove(); + assert_true(container.matches(":dir(ltr)")); + } + + container1.remove(); +}, "dir=auto changes for content insertion and removal, in and out of document"); + +test(() => { + let tree, shadow; + [tree, shadow] = setup_tree(` + <div> + <div id="root"> + <span id="l">A</span> + <span id="r">\u05D0</span> + </div> + </div> + `, ` + <slot id="one" name="one" dir="auto">\u05D0</slot> + <slot id="two" dir="auto"></slot> + `); + + let one = shadow.getElementById("one"); + let two = shadow.getElementById("two"); + let l = tree.querySelector("#l"); + let r = tree.querySelector("#r"); + assert_false(one.matches(":dir(ltr)"), "#one while empty"); + assert_true(two.matches(":dir(ltr)"), "#two with both spans"); + l.slot = "one"; + assert_true(one.matches(":dir(ltr)"), "#one with LTR child span"); + assert_false(two.matches(":dir(ltr)"), "#two with RTL child span"); + r.slot = "one"; + assert_true(one.matches(":dir(ltr)"), "#one with both child spans"); + assert_true(two.matches(":dir(ltr)"), "#two while empty"); + l.slot = ""; + assert_false(one.matches(":dir(ltr)"), "#one with RTL child span"); + assert_true(two.matches(":dir(ltr)"), "#two with LTR child span"); + + tree.remove(); +}, "dir=auto changes for slot reassignment"); + +test(() => { + let tree, shadow; + [tree, shadow] = setup_tree(` + <div dir=auto> + <div id=root> + <div id=text>A</div> + </div> + </div> + `, ` + <div dir=ltr> + <slot id=slot dir=auto></slot> + </div> + `); + + let text = tree.querySelector("#text"); + let slot = shadow.querySelector("#slot"); + + assert_true(tree.matches(":dir(ltr)"), "node tree ancestor before first text change"); + assert_true(slot.matches(":dir(ltr)"), "slot before first text change"); + text.innerText = "\u05D0"; + assert_false(tree.matches(":dir(ltr)"), "node tree ancestor after first text change"); + assert_false(slot.matches(":dir(ltr)"), "slot after first text change"); + tree.dir = "rtl"; + assert_false(tree.matches(":dir(ltr)"), "node tree ancestor before second text change"); + assert_false(slot.matches(":dir(ltr)"), "slot before second text change"); + text.innerText = "A"; + assert_false(tree.matches(":dir(ltr)"), "node tree ancestor after second text change"); + assert_true(slot.matches(":dir(ltr)"), "slot after second text change"); + slot.dir = "ltr"; + assert_false(tree.matches(":dir(ltr)"), "node tree ancestor before third text change"); + assert_true(slot.matches(":dir(ltr)"), "slot before third text change"); + text.innerText = "\u05D0"; + assert_false(tree.matches(":dir(ltr)"), "node tree ancestor after third text change"); + assert_true(slot.matches(":dir(ltr)"), "slot after third text change"); + slot.dir = "auto"; + tree.dir = "auto"; + assert_false(tree.matches(":dir(ltr)"), "node tree ancestor after fourth text change"); + assert_false(slot.matches(":dir(ltr)"), "slot after fourth text change"); + text.innerText = "A"; + assert_true(tree.matches(":dir(ltr)"), "node tree ancestor before fourth text change"); + assert_true(slot.matches(":dir(ltr)"), "slot before fourth text change"); + slot.dir = "rtl"; + assert_true(tree.matches(":dir(ltr)"), "node tree ancestor before fifth text change"); + assert_false(slot.matches(":dir(ltr)"), "slot before fifth text change"); + text.innerText = "\u05D0"; + assert_false(tree.matches(":dir(ltr)"), "node tree ancestor before fifth text change"); + assert_false(slot.matches(":dir(ltr)"), "slot before fifth text change"); +}, "text changes affecting both slot and ancestor with dir=auto"); + +test(() => { + let tree = setup_tree(` + <div dir="auto"> + <span id="a1">A</span> + <span id="aleph1">\u05D0</span> + <span id="a2">A</span> + <span id="aleph2">\u05D0</span> + </div> + `); + + let a1 = tree.querySelector("#a1"); + let aleph1 = tree.querySelector("#aleph1"); + assert_true(tree.matches(":dir(ltr)"), "initial state"); + assert_false(tree.matches(":dir(rtl)"), "initial state"); + a1.dir = "ltr"; + assert_false(tree.matches(":dir(ltr)"), "after change 1"); + a1.dir = "invalid"; + assert_true(tree.matches(":dir(ltr)"), "after change 2"); + a1.dir = "rtl"; + assert_false(tree.matches(":dir(ltr)"), "after change 3"); + a1.removeAttribute("dir"); + assert_true(tree.matches(":dir(ltr)"), "after change 4"); + a1.dir = "invalid"; + assert_true(tree.matches(":dir(ltr)"), "after change 5"); + a1.dir = "rtl"; + assert_false(tree.matches(":dir(ltr)"), "after change 6"); + aleph1.dir = "auto"; + assert_true(tree.matches(":dir(ltr)"), "after change 7"); + aleph1.dir = "invalid"; + assert_false(tree.matches(":dir(ltr)"), "after change 8"); +}, "dynamic changes to subtrees excluded as a result of the dir attribute");
diff --git a/third_party/blink/web_tests/external/wpt/html/dom/elements/global-attributes/dir-slots-directionality.tentative-expected.txt b/third_party/blink/web_tests/external/wpt/html/dom/elements/global-attributes/dir-slots-directionality.tentative-expected.txt deleted file mode 100644 index 73de097..0000000 --- a/third_party/blink/web_tests/external/wpt/html/dom/elements/global-attributes/dir-slots-directionality.tentative-expected.txt +++ /dev/null
@@ -1,9 +0,0 @@ -This is a testharness.js-based test. -FAIL Slots: Directionality: dir=rtl on slot assert_true: expected true got false -PASS Slots: Directionality: dir=rtl on host -PASS Slots: Directionality: dir=auto on host with Arabic shadow tree content -PASS Slots: Directionality: dir=auto in shadow tree with Arabic light tree content -PASS Slots: Directionality: dir=auto in shadow tree with Arabic shadow tree content -PASS Slots: Directionality: dir=auto on slot with Arabic light tree content -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/external/wpt/html/dom/elements/global-attributes/dir-slots-directionality.tentative.html.ini b/third_party/blink/web_tests/external/wpt/html/dom/elements/global-attributes/dir-slots-directionality.tentative.html.ini deleted file mode 100644 index e67010d..0000000 --- a/third_party/blink/web_tests/external/wpt/html/dom/elements/global-attributes/dir-slots-directionality.tentative.html.ini +++ /dev/null
@@ -1,4 +0,0 @@ -[dir-slots-directionality.tentative.html] - [Slots: Directionality: dir=rtl on slot] - expected: - FAIL
diff --git a/third_party/blink/web_tests/external/wpt/html/semantics/popovers/popover-light-dismiss-flat-tree.html b/third_party/blink/web_tests/external/wpt/html/semantics/popovers/popover-light-dismiss-flat-tree.html index d2792a8..26c8d7a 100644 --- a/third_party/blink/web_tests/external/wpt/html/semantics/popovers/popover-light-dismiss-flat-tree.html +++ b/third_party/blink/web_tests/external/wpt/html/semantics/popovers/popover-light-dismiss-flat-tree.html
@@ -26,6 +26,7 @@ <script src="resources/popover-utils.js"></script> <script> promise_test(async () => { + polyfill_declarative_shadow_dom(outerPopover); const innerPopoverToggle = outerPopover.shadowRoot.querySelector("#innerPopoverToggle"); const innerPopover = outerPopover.shadowRoot.querySelector("#innerPopover");
diff --git a/third_party/blink/web_tests/external/wpt/html/semantics/popovers/popover-shadowhost-focus.html b/third_party/blink/web_tests/external/wpt/html/semantics/popovers/popover-shadowhost-focus.html index 4dcf669..d5899d2 100644 --- a/third_party/blink/web_tests/external/wpt/html/semantics/popovers/popover-shadowhost-focus.html +++ b/third_party/blink/web_tests/external/wpt/html/semantics/popovers/popover-shadowhost-focus.html
@@ -3,6 +3,7 @@ <link rel=help href="https://github.com/whatwg/html/issues/8994"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> +<script src="/resources/declarative-shadow-dom-polyfill.js"></script> <div popover=auto tabindex=0 data-test="autofocus=true, delegatesfocus=false" autofocus class=should-be-focused> <template shadowrootmode=open> @@ -31,16 +32,7 @@ </div> <script> -(function attachShadowRoots(root) { - root.querySelectorAll("template[shadowrootmode]").forEach(template => { - const mode = template.getAttribute("shadowrootmode"); - const delegatesFocus = template.hasAttribute("shadowrootdelegatesfocus"); - const shadowRoot = template.parentNode.attachShadow({ mode, delegatesFocus }); - shadowRoot.appendChild(template.content); - template.remove(); - attachShadowRoots(shadowRoot); - }); -})(document); +polyfill_declarative_shadow_dom(document); document.querySelectorAll('body > [popover]').forEach(popover => { promise_test(async () => {
diff --git a/third_party/blink/web_tests/external/wpt/media-source/dedicated-worker/mediasource-worker-detach-element.html.ini b/third_party/blink/web_tests/external/wpt/media-source/dedicated-worker/mediasource-worker-detach-element.html.ini new file mode 100644 index 0000000..95ca78c --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/media-source/dedicated-worker/mediasource-worker-detach-element.html.ini
@@ -0,0 +1,3 @@ +[mediasource-worker-detach-element.html] + expected: + if (product == "content_shell") and (virtual_suite == "media-foundation-for-clear-dcomp"): [TIMEOUT, OK]
diff --git a/third_party/blink/web_tests/external/wpt/paint-timing/with-first-paint/first-contentful-canvas-webgl2.html.ini b/third_party/blink/web_tests/external/wpt/paint-timing/with-first-paint/first-contentful-canvas-webgl2.html.ini index 87f0f0c..2767d72 100644 --- a/third_party/blink/web_tests/external/wpt/paint-timing/with-first-paint/first-contentful-canvas-webgl2.html.ini +++ b/third_party/blink/web_tests/external/wpt/paint-timing/with-first-paint/first-contentful-canvas-webgl2.html.ini
@@ -1,4 +1,5 @@ [first-contentful-canvas-webgl2.html] [First contentful paint fires due to webgl2 canvas render.] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): PRECONDITION_FAILED + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): PRECONDITION_FAILED + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): PRECONDITION_FAILED
diff --git a/third_party/blink/web_tests/external/wpt/performance-timeline/not-restored-reasons/performance-navigation-timing-fetch.tentative.window.js.ini b/third_party/blink/web_tests/external/wpt/performance-timeline/not-restored-reasons/performance-navigation-timing-fetch.tentative.window.js.ini new file mode 100644 index 0000000..876710c --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/performance-timeline/not-restored-reasons/performance-navigation-timing-fetch.tentative.window.js.ini
@@ -0,0 +1,3 @@ +[performance-navigation-timing-fetch.tentative.window.html] + [Ensure that ongoing fetch upon entering bfcache blocks bfcache and recorded.] + expected: FAIL
diff --git a/third_party/blink/web_tests/external/wpt/performance-timeline/not-restored-reasons/performance-navigation-timing-lock.https.tentative.window.js.ini b/third_party/blink/web_tests/external/wpt/performance-timeline/not-restored-reasons/performance-navigation-timing-lock.https.tentative.window.js.ini index 0af6603..3bc9e43 100644 --- a/third_party/blink/web_tests/external/wpt/performance-timeline/not-restored-reasons/performance-navigation-timing-lock.https.tentative.window.js.ini +++ b/third_party/blink/web_tests/external/wpt/performance-timeline/not-restored-reasons/performance-navigation-timing-lock.https.tentative.window.js.ini
@@ -1,3 +1,3 @@ [performance-navigation-timing-lock.https.tentative.window.html] - [RemoteContextHelper navigation using BFCache] + [Ensure that if WebLock is held upon entering bfcache, it cannot enter bfcache and gets reported.] expected: FAIL
diff --git a/third_party/blink/web_tests/external/wpt/performance-timeline/not-restored-reasons/performance-navigation-timing-navigation-failure.tentative.window.js.ini b/third_party/blink/web_tests/external/wpt/performance-timeline/not-restored-reasons/performance-navigation-timing-navigation-failure.tentative.window.js.ini new file mode 100644 index 0000000..28632987 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/performance-timeline/not-restored-reasons/performance-navigation-timing-navigation-failure.tentative.window.js.ini
@@ -0,0 +1,3 @@ +[performance-navigation-timing-navigation-failure.tentative.window.html] + [Ensure that navigation failure blocks bfcache and gets recorded.] + expected: FAIL
diff --git a/third_party/blink/web_tests/external/wpt/pointerevents/pointerevent_pointerId_scope.html.ini b/third_party/blink/web_tests/external/wpt/pointerevents/pointerevent_pointerId_scope.html.ini index f1ce5645..c05ae95 100644 --- a/third_party/blink/web_tests/external/wpt/pointerevents/pointerevent_pointerId_scope.html.ini +++ b/third_party/blink/web_tests/external/wpt/pointerevents/pointerevent_pointerId_scope.html.ini
@@ -1,4 +1,8 @@ [pointerevent_pointerId_scope.html] expected: if (product == "content_shell") and (os == "win") and (port == "win11"): TIMEOUT + if (product == "content_shell") and (os == "win") and (port == "win10.20h2"): [TIMEOUT, OK] if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): [TIMEOUT, OK] + [pointerId of an active pointer is the same across iframes] + expected: + if (product == "content_shell") and (os == "win") and (port == "win10.20h2"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/scroll-animations/css/scroll-timeline-frame-size-changed.html.ini b/third_party/blink/web_tests/external/wpt/scroll-animations/css/scroll-timeline-frame-size-changed.html.ini index 3db269a..01fe483d 100644 --- a/third_party/blink/web_tests/external/wpt/scroll-animations/css/scroll-timeline-frame-size-changed.html.ini +++ b/third_party/blink/web_tests/external/wpt/scroll-animations/css/scroll-timeline-frame-size-changed.html.ini
@@ -1,3 +1,4 @@ [scroll-timeline-frame-size-changed.html] expected: - if (product == "content_shell") and (virtual_suite == "threaded") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64") and (virtual_suite == "threaded-prefer-compositing"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64") and (virtual_suite == "threaded"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/scroll-to-text-fragment/percent-encoding.html b/third_party/blink/web_tests/external/wpt/scroll-to-text-fragment/percent-encoding.html new file mode 100644 index 0000000..696734b --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/scroll-to-text-fragment/percent-encoding.html
@@ -0,0 +1,121 @@ +<!DOCTYPE html> +<title>Percent-encoding in a text directive</title> +<meta charset=utf-8> +<link rel="help" href="https://wicg.github.io/ScrollToTextFragment/"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/testdriver.js"></script> +<script src="/resources/testdriver-vendor.js"></script> +<script src="/common/utils.js"></script> +<script src="stash.js"></script> +<script src="resources/util.js"></script> +<style> + .target { + margin-top: 2000px; + margin-bottom: 2000px; + } +</style> +<script> +const params = new URLSearchParams(location.search); +const is_popup = params.has('key'); + +// This test opens a popup to this document which invokes a text directive. The +// popup checks the result of navigating the text directive and communicates it +// back to the original page via Stash (since text fragments require noopener). +if (is_popup) { + const key = params.get('key'); + + function sendResult() { + let result = 'unknown'; + if (window.scrollY == 0) + result = 'noscroll'; + else { + for (let target of document.querySelectorAll('.target')) { + if (isInViewport(target)) { + result = target.id; + break; + } + } + } + + stashResultsThenClose(key, result); + } + + // Ensure two animation frames on load to test the fallback to element anchor, + // which gets queued for the next frame if the text fragment is not found. + onload = () => { requestAnimationFrame( () => requestAnimationFrame(sendResult) ); }; +} else { + let test_cases = [ + { + fragment: '#:~:text=%25', + expect: 'singlepercent', + description: 'Percent-encoded "%" char.' + }, + { + fragment: '#:~:text=%', + expect: 'noscroll', + description: 'Percent char without hex digits is invalid.' + }, + { + fragment: '#:~:text=%%', + expect: 'noscroll', + description: 'Percent char followed by percent char is invalid.' + }, + { + fragment: '#:~:text=%F', + expect: 'noscroll', + description: 'Single digit percent-encoding is invalid.' + }, + { + fragment: '#:~:text=%25F', + expect: 'percentf', + description: 'Percent-encoding limited to two digits.' + }, + { + fragment: '#:~:text=%25%25F', + expect: 'doublepercentf', + description: 'Percent-encoded "%%F"' + }, + { + fragment: '#:~:text=%E2%9C%85', + expect: 'checkmark', + description: 'Percent-encoding multibyte codepoint (CHECKMARK).' + }, + ]; + + for (const test_case of test_cases) { + promise_test(t => new Promise((resolve, reject) => { + let key = token(); + + test_driver.bless('Open a URL with a text fragment directive', () => { + window.open(`${location.href}?key=${key}${test_case.fragment}`, '_blank', 'noopener'); + }); + + fetchResults(key, resolve, reject); + }).then(result => { + assert_equals(result, test_case.expect); + }), `Test navigation with fragment: ${test_case.description}.`); + } +} +</script> + +<p class="target" id="singlepercent"> + % +</p> +<p class="target" id="doublepercent"> + %% +</p> +<p class="target" id="percentf"> + %F +</p> +<p class="target" id="doublepercentf"> + %%f +</p> +<p class="target" id="checkmark"> + <!-- U+2705 WHITE HEAVY CHECK MARK - UTF-8 percent encoding: %E2%9C%85 --> + ✅ +</p> +<p class="target" id="helloworld"> + Hello world +</p> +
diff --git a/third_party/blink/web_tests/external/wpt/scroll-to-text-fragment/resources/util.js b/third_party/blink/web_tests/external/wpt/scroll-to-text-fragment/resources/util.js new file mode 100644 index 0000000..00e12929 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/scroll-to-text-fragment/resources/util.js
@@ -0,0 +1,21 @@ +// Returns true if element's center is within the visual viewport bounds. +function isInViewport(element) { + const viewportRect = { + left: visualViewport.offsetLeft, + top: visualViewport.offsetTop, + right: visualViewport.offsetLeft + visualViewport.width, + bottom: visualViewport.offsetTop + visualViewport.height + }; + + const elementRect = element.getBoundingClientRect(); + const elementCenter = { + x: elementRect.left + elementRect.width / 2, + y: elementRect.top + elementRect.height / 2 + }; + + return elementCenter.x > viewportRect.left && + elementCenter.x < viewportRect.right && + elementCenter.y > viewportRect.top && + elementCenter.y < viewportRect.bottom; +} +
diff --git a/third_party/blink/web_tests/external/wpt/scroll-to-text-fragment/same-document-tests.html b/third_party/blink/web_tests/external/wpt/scroll-to-text-fragment/same-document-tests.html index be9bed9..85db2de 100644 --- a/third_party/blink/web_tests/external/wpt/scroll-to-text-fragment/same-document-tests.html +++ b/third_party/blink/web_tests/external/wpt/scroll-to-text-fragment/same-document-tests.html
@@ -4,32 +4,13 @@ <link rel="help" href="https://wicg.github.io/ScrollToTextFragment/"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> +<script src="resources/util.js"></script> <script> function reset() { location.hash = ''; window.scrollTo(0, 0); } - function isInViewport(element) { - const viewportRect = { - left: visualViewport.offsetLeft, - top: visualViewport.offsetTop, - right: visualViewport.offsetLeft + visualViewport.width, - bottom: visualViewport.offsetTop + visualViewport.height - }; - - const elementRect = element.getBoundingClientRect(); - const elementCenter = { - x: elementRect.left + elementRect.width / 2, - y: elementRect.top + elementRect.height / 2 - }; - - return elementCenter.x > viewportRect.left && - elementCenter.x < viewportRect.right && - elementCenter.y > viewportRect.top && - elementCenter.y < viewportRect.bottom; - } - function runTests() { // Ensure a simple text directive works correctly when navigated to the // same document using `location.hash`.
diff --git a/third_party/blink/web_tests/external/wpt/service-workers/service-worker/tentative/static-router/static-router-subresource.https.html.ini b/third_party/blink/web_tests/external/wpt/service-workers/service-worker/tentative/static-router/static-router-subresource.https.html.ini index bc37b58..164eadf8 100644 --- a/third_party/blink/web_tests/external/wpt/service-workers/service-worker/tentative/static-router/static-router-subresource.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/service-workers/service-worker/tentative/static-router/static-router-subresource.https.html.ini
@@ -1,3 +1,8 @@ [static-router-subresource.https.html] + [Subresource load matched with RequestMode condition] + expected: + if (product == "content_shell") and (virtual_suite == "static-routing-api"): PASS + FAIL + [Subresource load matched with URLPattern condition] expected: FAIL
diff --git a/third_party/blink/web_tests/external/wpt/video-rvfc/request-video-frame-callback-before-xr-session.https.html.ini b/third_party/blink/web_tests/external/wpt/video-rvfc/request-video-frame-callback-before-xr-session.https.html.ini index 6576db2..20dee3a 100644 --- a/third_party/blink/web_tests/external/wpt/video-rvfc/request-video-frame-callback-before-xr-session.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/video-rvfc/request-video-frame-callback-before-xr-session.https.html.ini
@@ -4,16 +4,20 @@ if (product == "content_shell") and (os == "mac") and (port == "mac12"): TIMEOUT [Make sure video.rVFC works during a non-immersive session - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Make sure video.rVFC works during a non-immersive session - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Make sure video.rVFC works during an immersive session - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Make sure video.rVFC works during an immersive session - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/video-rvfc/request-video-frame-callback-during-xr-session.https.html.ini b/third_party/blink/web_tests/external/wpt/video-rvfc/request-video-frame-callback-during-xr-session.https.html.ini index 80df3e5e..b369f36 100644 --- a/third_party/blink/web_tests/external/wpt/video-rvfc/request-video-frame-callback-during-xr-session.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/video-rvfc/request-video-frame-callback-during-xr-session.https.html.ini
@@ -1,8 +1,10 @@ [request-video-frame-callback-during-xr-session.https.html] [Make sure video.rVFC callbacks started during an immersive session continue after it ends - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Make sure video.rVFC callbacks started during an immersive session continue after it ends - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webaudio/the-audio-api/the-audioparam-interface/setTargetAtTime-after-event-within-block-expected.txt b/third_party/blink/web_tests/external/wpt/webaudio/the-audio-api/the-audioparam-interface/setTargetAtTime-after-event-within-block-expected.txt new file mode 100644 index 0000000..d846927 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/webaudio/the-audio-api/the-audioparam-interface/setTargetAtTime-after-event-within-block-expected.txt
@@ -0,0 +1,5 @@ +This is a testharness.js-based test. +PASS setTargetAtTime() after setValueAtTime() +FAIL setTargetAtTime() after setTargetAtTime() assert_approx_equals: scheduled value at startSample2 expected 0.9999999403953552 +/- 5.960464477539063e-8 but got 0 +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/external/wpt/webaudio/the-audio-api/the-audioparam-interface/setTargetAtTime-after-event-within-block.html b/third_party/blink/web_tests/external/wpt/webaudio/the-audio-api/the-audioparam-interface/setTargetAtTime-after-event-within-block.html index 827aeea..0e68639 100644 --- a/third_party/blink/web_tests/external/wpt/webaudio/the-audio-api/the-audioparam-interface/setTargetAtTime-after-event-within-block.html +++ b/third_party/blink/web_tests/external/wpt/webaudio/the-audio-api/the-audioparam-interface/setTargetAtTime-after-event-within-block.html
@@ -50,5 +50,43 @@ "scheduled value at sample " + i); } }); -}); +}, "setTargetAtTime() after setValueAtTime()"); + +promise_test(async function() { + const bufferSize = 128; + const sampleRate = 16384; + const startSample1 = 125; + const target1 = Math.fround(-1./Math.expm1(-1.)); + const startSample2 = startSample1 + 1; + const target2 = 0.; + const timeConstant = 1./sampleRate; + const tolerance = Math.pow(2, -24); // Allow single precision math. + const context = new OfflineAudioContext(1, bufferSize, sampleRate); + + const source = new ConstantSourceNode(context, {offset: 0.}); + source.start(); + source.offset.setTargetAtTime(target1, startSample1/sampleRate, + timeConstant); + source.offset.setTargetAtTime(target2, startSample2/sampleRate, + timeConstant); + source.connect(context.destination); + + const buffer = await context.startRendering(); + + assert_equals(buffer.length, bufferSize, "output buffer length"); + const output = buffer.getChannelData(0); + for (let i = 0; i <= startSample1; ++i) { + assert_equals(output[i], 0., "initial offset at sample " + i); + } + assert_approx_equals( + output[startSample2], + Math.fround(target1 * -Math.expm1(-(startSample2 - startSample1))), + tolerance, + "scheduled value at startSample2"); + assert_approx_equals( + output[startSample2 + 1], + Math.fround(output[startSample2] * Math.exp(-1.)), + tolerance, + "scheduled value at startSample2 + 1"); +}, "setTargetAtTime() after setTargetAtTime()"); </script>
diff --git a/third_party/blink/web_tests/external/wpt/webaudio/the-audio-api/the-audioparam-interface/setTargetAtTime-after-event-within-block.html.ini b/third_party/blink/web_tests/external/wpt/webaudio/the-audio-api/the-audioparam-interface/setTargetAtTime-after-event-within-block.html.ini new file mode 100644 index 0000000..a72c951 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/webaudio/the-audio-api/the-audioparam-interface/setTargetAtTime-after-event-within-block.html.ini
@@ -0,0 +1,3 @@ +[setTargetAtTime-after-event-within-block.html] + [setTargetAtTime() after setTargetAtTime()] + expected: FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webcodecs/full-cycle-test.https.any.js.ini b/third_party/blink/web_tests/external/wpt/webcodecs/full-cycle-test.https.any.js.ini index 2343a9d..50541b4 100644 --- a/third_party/blink/web_tests/external/wpt/webcodecs/full-cycle-test.https.any.js.ini +++ b/third_party/blink/web_tests/external/wpt/webcodecs/full-cycle-test.https.any.js.ini
@@ -26,7 +26,6 @@ [full-cycle-test.https.any.html?h264_avc] expected: if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64") and (virtual_suite == ""): [ERROR, CRASH] - if (product == "content_shell") and (os == "mac") and (port == "mac12") and (virtual_suite == ""): OK if (product == "content_shell") and (os == "mac") and (port == "mac10.15"): TIMEOUT if (product == "content_shell") and (os == "win"): OK if (product == "content_shell") and (os == "linux"): OK @@ -34,19 +33,13 @@ CRASH [Encoding and decoding cycle] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac12") and (virtual_suite == ""): PRECONDITION_FAILED - if (product == "content_shell") and (os == "win"): PRECONDITION_FAILED - if (product == "content_shell") and (os == "linux"): PRECONDITION_FAILED - if product == "chrome": PRECONDITION_FAILED - FAIL + if (product == "content_shell") and (os == "mac"): FAIL + PRECONDITION_FAILED [Encoding and decoding cycle w/ stripped color space] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac12") and (virtual_suite == ""): PRECONDITION_FAILED - if (product == "content_shell") and (os == "win"): PRECONDITION_FAILED - if (product == "content_shell") and (os == "linux"): PRECONDITION_FAILED - if product == "chrome": PRECONDITION_FAILED - FAIL + if (product == "content_shell") and (os == "mac"): FAIL + PRECONDITION_FAILED [full-cycle-test.https.any.html?h265_annexb]
diff --git a/third_party/blink/web_tests/external/wpt/webcodecs/temporal-svc-encoding.https.any.js.ini b/third_party/blink/web_tests/external/wpt/webcodecs/temporal-svc-encoding.https.any.js.ini index 0d66776e..39f4b80 100644 --- a/third_party/blink/web_tests/external/wpt/webcodecs/temporal-svc-encoding.https.any.js.ini +++ b/third_party/blink/web_tests/external/wpt/webcodecs/temporal-svc-encoding.https.any.js.ini
@@ -2,15 +2,15 @@ expected: if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64") and (virtual_suite == "webcodecs-without-task-runner-with-custom-deleter"): CRASH if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64") and (virtual_suite == ""): [ERROR, CRASH] - if (product == "content_shell") and (os == "mac") and (port == "mac13"): CRASH if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): CRASH - if (product == "content_shell") and (os == "mac") and (port == "mac12"): CRASH if (product == "content_shell") and (os == "mac") and (port == "mac11"): CRASH if (product == "content_shell") and (os == "mac") and (port == "mac10.15"): CRASH [SVC L1T2] expected: if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac13"): FAIL if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12"): FAIL PRECONDITION_FAILED [SVC L1T3]
diff --git a/third_party/blink/web_tests/external/wpt/webdriver/tests/bidi/input/perform_actions/invalid.py b/third_party/blink/web_tests/external/wpt/webdriver/tests/bidi/input/perform_actions/invalid.py index 19b7a57..7513ab9 100644 --- a/third_party/blink/web_tests/external/wpt/webdriver/tests/bidi/input/perform_actions/invalid.py +++ b/third_party/blink/web_tests/external/wpt/webdriver/tests/bidi/input/perform_actions/invalid.py
@@ -1,117 +1,797 @@ import pytest +import pytest_asyncio -from webdriver.bidi.modules.input import Actions, get_element_origin -from webdriver.bidi.error import ( - InvalidArgumentException, - MoveTargetOutOfBoundsException, - NoSuchElementException, - NoSuchFrameException, - NoSuchNodeException, -) -from webdriver.bidi.modules.script import ContextTarget +from webdriver.bidi.modules.input import Actions +from webdriver.bidi.error import InvalidArgumentException pytestmark = pytest.mark.asyncio +MAX_INT = 9007199254740991 +MIN_INT = -MAX_INT + + +@pytest_asyncio.fixture +async def perform_actions(bidi_session, top_context): + async def perform_actions(actions, context=top_context["context"]): + return await bidi_session.input.perform_actions( + actions=actions, context=context + ) + + yield perform_actions + + +def create_key_action(key_action, overrides=None, removals=None): + action = { + "type": key_action, + "value": "", + } + + if overrides is not None: + action.update(overrides) + + if removals is not None: + for removal in removals: + del action[removal] + + return action + + +def create_pointer_action(pointer_action, overrides=None, removals=None): + action = { + "type": pointer_action, + "width": 0, + "height": 0, + "pressure": 0.0, + "tangentialPressure": 0.0, + "twist": 0, + "tiltX": 0, + "tiltY": 0, + } + + if pointer_action == "pointerMove": + action.update({"x": 0, "y": 0}) + elif pointer_action in ["pointerDown", "pointerUp"]: + action.update({"button": 0}) + + if overrides is not None: + action.update(overrides) + + if removals is not None: + for removal in removals: + del action[removal] + + return action + + +def create_wheel_action(wheel_action, overrides=None, removals=None): + action = { + "type": wheel_action, + "x": 0, + "y": 0, + "deltaX": 0, + "deltaY": 0, + "deltaZ": 0, + "deltaMode": 0, + "origin": "viewport", + } + + if overrides is not None: + action.update(overrides) + + if removals is not None: + for removal in removals: + del action[removal] + + return action + + @pytest.mark.parametrize("value", [None, True, 42, {}, []]) -async def test_params_context_invalid_type(bidi_session, value): +async def test_params_context_invalid_type(perform_actions, value): actions = Actions() actions.add_key() + with pytest.raises(InvalidArgumentException): - await bidi_session.input.perform_actions(actions=actions, context=value) + await perform_actions(actions, context=value) -async def test_params_contexts_value_invalid_value(bidi_session): - actions = Actions() - actions.add_key() - with pytest.raises(NoSuchFrameException): - await bidi_session.input.perform_actions(actions=actions, context="foo") +@pytest.mark.parametrize("value", [None, "foo", True, 42, {}]) +async def test_params_input_source_actions_invalid_type(perform_actions, value): + with pytest.raises(InvalidArgumentException): + await perform_actions(value) + + +@pytest.mark.parametrize("value", [None, "foo", True, 42, {}]) +async def test_params_input_source_action_sequence_invalid_type(perform_actions, value): + with pytest.raises(InvalidArgumentException): + await perform_actions([value]) + + +async def test_params_input_source_action_sequence_type_missing(perform_actions): + actions = [ + { + "id": "foo", + "actions": [], + } + ] + + with pytest.raises(InvalidArgumentException): + await perform_actions(actions) + + +@pytest.mark.parametrize("action_type", ["none", "key", "pointer", "wheel"]) +async def test_params_input_source_action_sequence_id_missing( + perform_actions, action_type +): + actions = [ + { + "type": action_type, + "actions": [], + } + ] + + with pytest.raises(InvalidArgumentException): + await perform_actions(actions) + + +@pytest.mark.parametrize("action_type", ["none", "key", "pointer", "wheel"]) +async def test_params_input_source_action_sequence_actions_missing( + perform_actions, action_type +): + actions = [ + { + "type": action_type, + "id": "foo", + } + ] + + with pytest.raises(InvalidArgumentException): + await perform_actions(actions) + + +@pytest.mark.parametrize("value", [None, True, 42, [], {}]) +async def test_params_input_source_action_sequence_type_invalid_type( + perform_actions, value +): + actions = [ + { + "type": value, + "id": "foo", + "actions": [], + } + ] + + with pytest.raises(InvalidArgumentException): + await perform_actions(actions) + + +@pytest.mark.parametrize("action_type", ["", "nones", "keys", "pointers", "wheels"]) +async def test_params_input_source_action_sequence_type_invalid_value( + perform_actions, action_type +): + actions = [ + { + "type": action_type, + "id": "foo", + "actions": [], + } + ] + + with pytest.raises(InvalidArgumentException): + await perform_actions(actions) + + +@pytest.mark.parametrize("action_type", ["none", "key", "pointer", "wheel"]) +@pytest.mark.parametrize("value", [None, True, 42, [], {}]) +async def test_params_input_source_action_sequence_id_invalid_type( + perform_actions, action_type, value +): + actions = [ + { + "type": action_type, + "id": value, + "actions": [], + } + ] + + with pytest.raises(InvalidArgumentException): + await perform_actions(actions) + + +@pytest.mark.parametrize("action_type", ["none", "key", "pointer", "wheel"]) +@pytest.mark.parametrize("value", [None, "foo", True, 42, {}]) +async def test_params_input_source_action_sequence_actions_invalid_type( + perform_actions, action_type, value +): + actions = [ + { + "type": action_type, + "id": "foo", + "actions": value, + } + ] + + with pytest.raises(InvalidArgumentException): + await perform_actions(actions) + + +@pytest.mark.parametrize("action_type", ["none", "key", "pointer", "wheel"]) +@pytest.mark.parametrize("value", [None, "foo", True, 42, {}]) +async def test_params_input_source_action_sequence_actions_actions_invalid_type( + perform_actions, action_type, value +): + actions = [ + { + "type": action_type, + "id": "foo", + "actions": [value], + } + ] + + with pytest.raises(InvalidArgumentException): + await perform_actions(actions) + + +@pytest.mark.parametrize("value", [None, "foo", True, 42, []]) +async def test_params_input_source_action_sequence_pointer_parameters_invalid_type( + perform_actions, value +): + actions = [{"type": "pointer", "id": "foo", "actions": [], "parameters": value}] + + with pytest.raises(InvalidArgumentException): + await perform_actions(actions) + + +@pytest.mark.parametrize("value", [None, True, 42, [], {}]) +async def test_params_input_source_action_sequence_pointer_parameters_pointer_type_invalid_type( + perform_actions, value +): + actions = [ + { + "type": "pointer", + "id": "foo", + "actions": [], + "parameters": { + "pointerType": value, + }, + } + ] + + with pytest.raises(InvalidArgumentException): + await perform_actions(actions) + + +@pytest.mark.parametrize("value", ["", "mouses", "pens", "touchs"]) +async def test_params_input_source_action_sequence_pointer_parameters_pointer_type_invalid_value( + perform_actions, value +): + actions = [ + { + "type": "pointer", + "id": "foo", + "actions": [], + "parameters": { + "pointerType": value, + }, + } + ] + + with pytest.raises(InvalidArgumentException): + await perform_actions(actions) + + +@pytest.mark.parametrize("action_type", ["none", "key", "pointer", "wheel"]) +@pytest.mark.parametrize("value", [None, True, 42, [], {}]) +async def test_params_input_source_action_sequence_actions_type_invalid_type( + perform_actions, action_type, value +): + action = {"type": value, "duration": 0} + + with pytest.raises(InvalidArgumentException): + await perform_actions([{"type": action_type, "id": "foo", "actions": [action]}]) + + +@pytest.mark.parametrize("action_type", ["none", "key", "pointer", "wheel"]) +@pytest.mark.parametrize("value", ["", "pauses"]) +async def test_params_input_source_action_sequence_actions_subtype_invalid_value( + perform_actions, action_type, value +): + action = {"type": value, "duration": 0} + + with pytest.raises(InvalidArgumentException): + await perform_actions([{"type": action_type, "id": "foo", "actions": [action]}]) + + +@pytest.mark.parametrize("action_type", ["none", "key", "pointer", "wheel"]) +@pytest.mark.parametrize("value", [None, "foo", True, 0.1, [], {}]) +async def test_params_input_source_action_sequence_actions_pause_duration_invalid_type( + perform_actions, action_type, value +): + action = {"type": "pause", "duration": value} + + with pytest.raises(InvalidArgumentException): + await perform_actions([{"type": action_type, "id": "foo", "actions": [action]}]) + + +@pytest.mark.parametrize("action_type", ["none", "key", "pointer", "wheel"]) +@pytest.mark.parametrize("value", [-1, MAX_INT + 1]) +async def test_params_input_source_action_sequence_actions_pause_duration_invalid_value( + perform_actions, action_type, value +): + action = {"type": "pause", "duration": value} + + with pytest.raises(InvalidArgumentException): + await perform_actions([{"type": action_type, "id": "foo", "actions": [action]}]) + + +@pytest.mark.parametrize("value", ["", "pauses"]) +async def test_params_null_action_type_invalid_value(perform_actions, value): + action = {"type": value, "duration": 0} + + with pytest.raises(InvalidArgumentException): + await perform_actions([{"type": "none", "id": "foo", "actions": [action]}]) + + +async def test_params_key_action_subtype_missing(perform_actions): + action = create_key_action("keyDown", {"value": "f"}, removals=["type"]) + + with pytest.raises(InvalidArgumentException): + await perform_actions([{"type": "key", "id": "foo", "actions": [action]}]) + + +@pytest.mark.parametrize("value", ["", "keyDowns", "keyUps"]) +async def test_params_key_action_subtype_invalid_value(perform_actions, value): + action = create_key_action(value, {"value": "f"}) + + with pytest.raises(InvalidArgumentException): + await perform_actions([{"type": "key", "id": "foo", "actions": [action]}]) + + +@pytest.mark.parametrize("key_action", ["keyDown", "keyUp"]) +async def test_params_key_action_value_missing(perform_actions, key_action): + action = create_key_action(key_action, {"value": "f"}, removals=["value"]) + + with pytest.raises(InvalidArgumentException): + await perform_actions([{"type": "key", "id": "foo", "actions": [action]}]) + + +@pytest.mark.parametrize("key_action", ["keyDown", "keyUp"]) +@pytest.mark.parametrize("value", [None, True, 42, [], {}]) +async def test_params_key_action_value_invalid_type(perform_actions, key_action, value): + action = create_key_action(key_action, {"value": value}) + + with pytest.raises(InvalidArgumentException): + await perform_actions([{"type": "key", "id": "foo", "actions": [action]}]) @pytest.mark.parametrize( "value", - [("fa"), ("\u0BA8\u0BBFb"), ("\u0BA8\u0BBF\u0BA8"), ("\u1100\u1161\u11A8c")], + ["fa", "\u0BA8\u0BBFb", "\u0BA8\u0BBF\u0BA8", "\u1100\u1161\u11A8c"], ) -async def test_params_actions_invalid_value_multiple_codepoints( - bidi_session, top_context, setup_key_test, value +async def test_params_key_action_value_invalid_multiple_codepoints(perform_actions, value): + actions = [ + create_key_action("keyDown", {"value": value}), + create_key_action("keyUp", {"value": value}), + ] + + with pytest.raises(InvalidArgumentException): + await perform_actions([{"type": "key", "id": "foo", "actions": actions}]) + + +@pytest.mark.parametrize("value", ["", "pointerDowns", "pointerMoves", "pointerUps"]) +async def test_params_pointer_action_subtype_invalid_value(perform_actions, value): + if value == "pointerMoves": + action = create_pointer_action(value, {"x": 0, "y": 0}) + else: + action = create_pointer_action(value, {"button": 0}) + + with pytest.raises(InvalidArgumentException): + await perform_actions([{"type": "pointer", "id": "foo", "actions": [action]}]) + + +@pytest.mark.parametrize("coordinate", ["x", "y"]) +async def test_params_pointer_action_up_down_button_missing(perform_actions, coordinate): + action = create_pointer_action("pointerMove", removals=[coordinate]) + + with pytest.raises(InvalidArgumentException): + await perform_actions([{"type": "pointer", "id": "foo", "actions": [action]}]) + + +@pytest.mark.parametrize("coordinate", ["x", "y"]) +@pytest.mark.parametrize("value", [None, "foo", True, 0.1, [], {}]) +async def test_params_pointer_action_move_coordinate_invalid_type( + perform_actions, coordinate, value ): - actions = Actions() - actions.add_key().key_down(value).key_up(value) - with pytest.raises(InvalidArgumentException): - await bidi_session.input.perform_actions( - actions=actions, context=top_context["context"] - ) - - -@pytest.mark.parametrize("missing", ["x", "y"]) -async def test_params_actions_missing_coordinates(bidi_session, top_context, missing): - actions = Actions() - actions.add_pointer().pointer_move(x=0, y=0) - - json_actions = actions.to_json() - pointer_input_source_json = json_actions[-1]["actions"] - del pointer_input_source_json[-1][missing] + action = create_pointer_action( + "pointerMove", + { + "x": value if coordinate == "x" else 0, + "y": value if coordinate == "y" else 0, + }, + ) with pytest.raises(InvalidArgumentException): - await bidi_session.input.perform_actions( - actions=json_actions, context=top_context["context"] - ) + await perform_actions([{"type": "pointer", "id": "foo", "actions": [action]}]) + + +@pytest.mark.parametrize("coordinate", ["x", "y"]) +@pytest.mark.parametrize("value", [MIN_INT - 1, MAX_INT + 1]) +async def test_params_pointer_action_move_coordinate_invalid_value( + perform_actions, coordinate, value +): + action = create_pointer_action( + "pointerMove", + { + "x": value if coordinate == "x" else 0, + "y": value if coordinate == "y" else 0, + }, + ) + + with pytest.raises(InvalidArgumentException): + await perform_actions([{"type": "pointer", "id": "foo", "actions": [action]}]) + + +@pytest.mark.parametrize("value", [None, True, 42, [], {}]) +async def test_params_pointer_action_move_origin_invalid_type(perform_actions, value): + action = create_pointer_action("pointerMove", {"origin": value}) + + with pytest.raises(InvalidArgumentException): + await perform_actions([{"type": "pointer", "id": "foo", "actions": [action]}]) + + +@pytest.mark.parametrize("value", ["", "pointers", "viewports"]) +async def test_params_pointer_action_move_origin_invalid_value(perform_actions, value): + action = create_pointer_action("pointerMove", {"origin": value}) + + with pytest.raises(InvalidArgumentException): + await perform_actions([{"type": "pointer", "id": "foo", "actions": [action]}]) + + +@pytest.mark.parametrize("pointer_action", ["pointerDown", "pointerUp"]) +async def test_params_pointer_action_up_down_button_missing(perform_actions, pointer_action): + action = create_pointer_action(pointer_action, removals=["button"]) + + with pytest.raises(InvalidArgumentException): + await perform_actions([{"type": "pointer", "id": "foo", "actions": [action]}]) + + +@pytest.mark.parametrize("pointer_action", ["pointerDown", "pointerUp"]) +@pytest.mark.parametrize("value", [None, "foo", True, 0.1, [], {}]) +async def test_params_pointer_action_up_down_button_invalid_type( + perform_actions, pointer_action, value +): + action = create_pointer_action(pointer_action, {"button": value}) + + with pytest.raises(InvalidArgumentException): + await perform_actions([{"type": "pointer", "id": "foo", "actions": [action]}]) + + +@pytest.mark.parametrize("pointer_action", ["pointerDown", "pointerUp"]) +@pytest.mark.parametrize("value", [-1, MAX_INT + 1]) +async def test_params_pointer_action_up_down_button_invalid_value( + perform_actions, pointer_action, value +): + action = create_pointer_action(pointer_action, {"button": value}) + + with pytest.raises(InvalidArgumentException): + await perform_actions([{"type": "pointer", "id": "foo", "actions": [action]}]) + + +@pytest.mark.parametrize("pointer_action", ["pointerDown", "pointerMove", "pointerUp"]) +@pytest.mark.parametrize("dimension", ["width", "height"]) +@pytest.mark.parametrize("value", [None, "foo", True, 0.1, [], {}]) +async def test_params_pointer_action_common_properties_dimensions_invalid_type( + perform_actions, dimension, pointer_action, value +): + action = create_pointer_action( + pointer_action, + { + "width": value if dimension == "width" else 0, + "height": value if dimension == "height" else 0, + }, + ) + + with pytest.raises(InvalidArgumentException): + await perform_actions([{"type": "pointer", "id": "foo", "actions": [action]}]) + + +@pytest.mark.parametrize("dimension", ["width", "height"]) +@pytest.mark.parametrize("pointer_action", ["pointerDown", "pointerMove", "pointerUp"]) +@pytest.mark.parametrize("value", [-1, MAX_INT + 1]) +async def test_params_pointer_action_common_properties_dimensions_invalid_value( + perform_actions, dimension, pointer_action, value +): + action = create_pointer_action( + pointer_action, + { + "width": value if dimension == "width" else 0, + "height": value if dimension == "height" else 0, + }, + ) + + with pytest.raises(InvalidArgumentException): + await perform_actions([{"type": "pointer", "id": "foo", "actions": [action]}]) + + +@pytest.mark.parametrize("pointer_action", ["pointerDown", "pointerMove", "pointerUp"]) +@pytest.mark.parametrize("pressure", ["pressure", "tangentialPressure"]) +@pytest.mark.parametrize("value", [None, "foo", True, [], {}]) +async def test_params_pointer_action_common_properties_pressure_invalid_type( + perform_actions, pointer_action, pressure, value +): + action = create_pointer_action( + pointer_action, + { + "pressure": value if pressure == "pressure" else 0.0, + "tangentialPressure": value if pressure == "tangentialPressure" else 0.0, + }, + ) + + with pytest.raises(InvalidArgumentException): + await perform_actions([{"type": "pointer", "id": "foo", "actions": [action]}]) + + +@pytest.mark.parametrize("pointer_action", ["pointerDown", "pointerMove", "pointerUp"]) +@pytest.mark.parametrize("value", [None, "foo", True, 0.1, [], {}]) +async def test_params_pointer_action_common_properties_twist_invalid_type( + perform_actions, pointer_action, value +): + action = create_pointer_action(pointer_action, {"twist": value}) + + with pytest.raises(InvalidArgumentException): + await perform_actions([{"type": "pointer", "id": "foo", "actions": [action]}]) + + +@pytest.mark.parametrize("pointer_action", ["pointerDown", "pointerMove", "pointerUp"]) +@pytest.mark.parametrize("value", [-1, 360]) +async def test_params_pointer_action_common_properties_twist_invalid_value( + perform_actions, pointer_action, value +): + action = create_pointer_action(pointer_action, {"twist": value}) + + with pytest.raises(InvalidArgumentException): + await perform_actions([{"type": "pointer", "id": "foo", "actions": [action]}]) + + +@pytest.mark.parametrize("pointer_action", ["pointerDown", "pointerMove", "pointerUp"]) +@pytest.mark.parametrize("angle", ["altitudeAngle", "azimuthAngle"]) +@pytest.mark.parametrize("value", [None, "foo", True, [], {}]) +async def test_params_pointer_action_common_properties_angle_invalid_type( + perform_actions, pointer_action, angle, value +): + action = create_pointer_action( + pointer_action, + { + "altitudeAngle": value if angle == "altitudeAngle" else 0.0, + "azimuthAngle": value if angle == "azimuthAngle" else 0.0, + }, + ) + + with pytest.raises(InvalidArgumentException): + await perform_actions([{"type": "pointer", "id": "foo", "actions": [action]}]) + + +@pytest.mark.parametrize("pointer_action", ["pointerDown", "pointerMove", "pointerUp"]) +@pytest.mark.parametrize("tilt", ["tiltX", "tiltY"]) +@pytest.mark.parametrize("value", [None, "foo", True, 0.1, [], {}]) +async def test_params_pointer_action_common_properties_tilt_invalid_type( + perform_actions, pointer_action, tilt, value +): + action = create_pointer_action( + pointer_action, + { + "tiltX": value if tilt == "tiltX" else 0, + "tiltY": value if tilt == "tiltY" else 0, + }, + ) + + with pytest.raises(InvalidArgumentException): + await perform_actions([{"type": "pointer", "id": "foo", "actions": [action]}]) + + +@pytest.mark.parametrize("pointer_action", ["pointerDown", "pointerMove", "pointerUp"]) +@pytest.mark.parametrize("tilt", ["tiltX", "tiltY"]) +@pytest.mark.parametrize("value", [-91, 91]) +async def test_params_pointer_action_common_properties_tilt_invalid_value( + perform_actions, pointer_action, tilt, value +): + action = create_pointer_action( + pointer_action, + { + "tiltX": value if tilt == "tiltX" else 0, + "tiltY": value if tilt == "tiltY" else 0, + }, + ) + + with pytest.raises(InvalidArgumentException): + await perform_actions([{"type": "pointer", "id": "foo", "actions": [action]}]) + + +@pytest.mark.parametrize("coordinate", ["x", "y"]) +@pytest.mark.parametrize("value", [None, "foo", True, 0.1, [], {}]) +async def test_params_wheel_action_scroll_coordinate_invalid_type( + perform_actions, coordinate, value +): + action = create_wheel_action( + "scroll", + { + "x": value if coordinate == "x" else 0, + "y": value if coordinate == "y" else 0, + }, + ) + + with pytest.raises(InvalidArgumentException): + await perform_actions([{"type": "wheel", "id": "foo", "actions": [action]}]) + + +@pytest.mark.parametrize("coordinate", ["x", "y"]) +@pytest.mark.parametrize("value", [MIN_INT - 1, MAX_INT + 1]) +async def test_params_wheel_action_scroll_coordinate_invalid_value( + perform_actions, coordinate, value +): + action = create_wheel_action( + "scroll", + { + "x": value if coordinate == "x" else 0, + "y": value if coordinate == "y" else 0, + }, + ) + + with pytest.raises(InvalidArgumentException): + await perform_actions([{"type": "wheel", "id": "foo", "actions": [action]}]) + + +@pytest.mark.parametrize("delta", ["x", "y"]) +@pytest.mark.parametrize("value", [None, "foo", True, 0.1, [], {}]) +async def test_params_wheel_action_scroll_delta_invalid_type( + perform_actions, delta, value +): + action = create_wheel_action( + "scroll", + { + "deltaX": value if delta == "x" else 0, + "deltaY": value if delta == "y" else 0, + }, + ) + + with pytest.raises(InvalidArgumentException): + await perform_actions([{"type": "wheel", "id": "foo", "actions": [action]}]) + + +@pytest.mark.parametrize("delta", ["x", "y"]) +@pytest.mark.parametrize("value", [MIN_INT - 1, MAX_INT + 1]) +async def test_params_wheel_action_scroll_delta_invalid_value( + perform_actions, delta, value +): + action = create_wheel_action( + "scroll", + { + "deltaX": value if delta == "x" else 0, + "deltaY": value if delta == "y" else 0, + }, + ) + + with pytest.raises(InvalidArgumentException): + await perform_actions([{"type": "wheel", "id": "foo", "actions": [action]}]) + + +@pytest.mark.parametrize("value", [None, True, 42, [], {}]) +async def test_params_wheel_action_scroll_origin_invalid_type(perform_actions, value): + action = create_wheel_action("scroll", {"origin": value}) + + with pytest.raises(InvalidArgumentException): + await perform_actions([{"type": "wheel", "id": "foo", "actions": [action]}]) + + +@pytest.mark.parametrize("value", ["", "pointers", "viewports"]) +async def test_params_wheel_action_scroll_origin_invalid_value(perform_actions, value): + action = create_wheel_action("scroll", {"origin": value}) + + with pytest.raises(InvalidArgumentException): + await perform_actions([{"type": "wheel", "id": "foo", "actions": [action]}]) + + +async def test_params_wheel_action_scroll_origin_pointer_not_supported(perform_actions): + # Pointer origin isn't currently supported for wheel input source + # See: https://github.com/w3c/webdriver/issues/1758 + action = create_wheel_action("scroll", {"origin": "pointer"}) + + with pytest.raises(InvalidArgumentException): + await perform_actions([{"type": "wheel", "id": "foo", "actions": [action]}]) @pytest.mark.parametrize("missing", ["x", "y", "deltaX", "deltaY"]) -async def test_params_actions_missing_wheel_property( - bidi_session, top_context, missing -): - actions = Actions() - actions.add_wheel().scroll(x=0, y=0, delta_x=5, delta_y=10) - - json_actions = actions.to_json() - wheel_input_actions_json = json_actions[-1]["actions"] - del wheel_input_actions_json[-1][missing] +async def test_params_wheel_action_scroll_property_missing(perform_actions, missing): + action = create_wheel_action("scroll", removals=[missing]) with pytest.raises(InvalidArgumentException): - await bidi_session.input.perform_actions( - actions=json_actions, context=top_context["context"] - ) + await perform_actions([{"type": "wheel", "id": "foo", "actions": [action]}]) -async def test_params_actions_origin_element_outside_viewport( - bidi_session, top_context, get_actions_origin_page, get_element +# Element origin tests for pointer and wheel input sources + +@pytest.mark.parametrize("input_source", ["pointer", "wheel"]) +@pytest.mark.parametrize("value", [None, False, 42, [], {}]) +async def test_params_origin_element_type_invalid_type( + perform_actions, input_source, value ): - url = get_actions_origin_page( - """width: 100px; height: 50px; background: green; - position: relative; left: -200px; top: -100px;""" - ) - await bidi_session.browsing_context.navigate( - context=top_context["context"], - url=url, - wait="complete", - ) + origin = {"origin": {"type": value}} - elem = await get_element("#inner") + if input_source == "pointer": + action = create_pointer_action("pointerMove", origin) + elif input_source == "wheel": + action = create_wheel_action("scroll", origin) - actions = Actions() - actions.add_pointer().pointer_move(x=0, y=0, origin=get_element_origin(elem)) - with pytest.raises(MoveTargetOutOfBoundsException): - await bidi_session.input.perform_actions( - actions=actions, context=top_context["context"] - ) - - -@pytest.mark.parametrize("value", [True, 42, []]) -async def test_params_actions_origin_invalid_type(bidi_session, top_context, value): - actions = Actions() - actions.add_pointer().pointer_move(x=0, y=0, origin=value) with pytest.raises(InvalidArgumentException): - await bidi_session.input.perform_actions( - actions=actions, context=top_context["context"] - ) + await perform_actions([{"type": input_source, "id": "foo", "actions": [action]}]) -@pytest.mark.parametrize("value", [None, True, 42, {}, [], "foo"]) -async def test_params_actions_origin_invalid_value_type( - bidi_session, top_context, get_actions_origin_page, get_element, value +@pytest.mark.parametrize("input_source", ["pointer", "wheel"]) +async def test_params_origin_element_element_missing( + perform_actions, input_source +): + origin = {"origin": {"type": "element"}} + + if input_source == "pointer": + action = create_pointer_action("pointerMove", origin) + elif input_source == "wheel": + action = create_wheel_action("scroll", origin) + + with pytest.raises(InvalidArgumentException): + await perform_actions([{"type": input_source, "id": "foo", "actions": [action]}]) + + +@pytest.mark.parametrize("input_source", ["pointer", "wheel"]) +@pytest.mark.parametrize("value", [None, False, 42, "foo", []]) +async def test_params_origin_element_element_invalid_type( + perform_actions, input_source, value +): + origin = {"origin": {"type": "element", "element": value}} + + if input_source == "pointer": + action = create_pointer_action("pointerMove", origin) + elif input_source == "wheel": + action = create_wheel_action("scroll", origin) + + with pytest.raises(InvalidArgumentException): + await perform_actions([{"type": input_source, "id": "foo", "actions": [action]}]) + + +@pytest.mark.parametrize("input_source", ["pointer", "wheel"]) +async def test_params_origin_element_element_sharedid_missing( + perform_actions, input_source +): + origin = {"origin": {"type": "element", "element": {}}} + + if input_source == "pointer": + action = create_pointer_action("pointerMove", origin) + elif input_source == "wheel": + action = create_wheel_action("scroll", origin) + + with pytest.raises(InvalidArgumentException): + await perform_actions([{"type": input_source, "id": "foo", "actions": [action]}]) + + +@pytest.mark.parametrize("input_source", ["pointer", "wheel"]) +@pytest.mark.parametrize("value", [None, False, 42, [], {}]) +async def test_params_origin_element_element_sharedid_invalid_type( + perform_actions, input_source, value +): + origin = {"origin": {"type": "element", "element": {"sharedId": value}}} + + if input_source == "pointer": + action = create_pointer_action("pointerMove", origin) + elif input_source == "wheel": + action = create_wheel_action("scroll", origin) + + with pytest.raises(InvalidArgumentException): + await perform_actions([{"type": input_source, "id": "foo", "actions": [action]}]) + + +@pytest.mark.parametrize("input_source", ["pointer", "wheel"]) +async def test_params_origin_element_invalid_with_shared_reference( + bidi_session, top_context, get_actions_origin_page, get_element, perform_actions, input_source ): await bidi_session.browsing_context.navigate( context=top_context["context"], @@ -119,114 +799,12 @@ wait="complete", ) - elem = await get_element("#inner") - actions = Actions() - actions.add_pointer().pointer_move( - x=0, y=0, origin={"type": value, "element": {"sharedId": elem["sharedId"]}} - ) + origin = {"origin": await get_element("#inner")} + + if input_source == "pointer": + action = create_pointer_action("pointerMove", origin) + elif input_source == "wheel": + action = create_wheel_action("scroll", origin) + with pytest.raises(InvalidArgumentException): - await bidi_session.input.perform_actions( - actions=actions, context=top_context["context"] - ) - - -@pytest.mark.parametrize("value", [None, True, 42, {}, [], "foo"]) -async def test_params_actions_origin_invalid_value_element( - bidi_session, top_context, value -): - actions = Actions() - actions.add_pointer().pointer_move( - x=0, y=0, origin={"type": "element", "element": value} - ) - with pytest.raises(InvalidArgumentException): - await bidi_session.input.perform_actions( - actions=actions, context=top_context["context"] - ) - - -async def test_params_actions_origin_invalid_value_serialized_element( - bidi_session, top_context, get_actions_origin_page, get_element -): - await bidi_session.browsing_context.navigate( - context=top_context["context"], - url=get_actions_origin_page(""), - wait="complete", - ) - - elem = await get_element("#inner") - - actions = Actions() - actions.add_pointer().pointer_move(x=0, y=0, origin=elem) - with pytest.raises(InvalidArgumentException): - await bidi_session.input.perform_actions( - actions=actions, context=top_context["context"] - ) - - -@pytest.mark.parametrize( - "expression", - [ - "document.querySelector('input#button').attributes[0]", - "document.querySelector('#with-text-node').childNodes[0]", - """document.createProcessingInstruction("xml-stylesheet", "href='foo.css'")""", - "document.querySelector('#with-comment').childNodes[0]", - "document", - "document.doctype", - "document.createDocumentFragment()", - "document.querySelector('#custom-element').shadowRoot", - ], - ids=[ - "attribute", - "text node", - "processing instruction", - "comment", - "document", - "doctype", - "document fragment", - "shadow root", - ] -) -async def test_params_actions_origin_no_such_element( - bidi_session, top_context, get_test_page, expression -): - await bidi_session.browsing_context.navigate( - context=top_context["context"], - url=get_test_page(), - wait="complete", - ) - - node = await bidi_session.script.evaluate( - expression=expression, - target=ContextTarget(top_context["context"]), - await_promise=False, - ) - - actions = Actions() - actions.add_pointer().pointer_move(x=0, y=0, origin=get_element_origin(node)) - with pytest.raises(NoSuchElementException): - await bidi_session.input.perform_actions( - actions=actions, context=top_context["context"] - ) - - -async def test_params_actions_origin_no_such_node(bidi_session, top_context): - actions = Actions() - actions.add_pointer().pointer_move( - x=0, y=0, origin={"type": "element", "element": {"sharedId": "foo"}} - ) - with pytest.raises(NoSuchNodeException): - await bidi_session.input.perform_actions( - actions=actions, context=top_context["context"] - ) - - -@pytest.mark.parametrize("origin", ["viewport", "pointer"]) -async def test_params_actions_origin_outside_viewport( - bidi_session, top_context, origin -): - actions = Actions() - actions.add_pointer().pointer_move(x=-50, y=-50, origin=origin) - with pytest.raises(MoveTargetOutOfBoundsException): - await bidi_session.input.perform_actions( - actions=actions, context=top_context["context"] - ) + await perform_actions([{"type": input_source, "id": "foo", "actions": [action]}])
diff --git a/third_party/blink/web_tests/external/wpt/webdriver/tests/bidi/input/perform_actions/invalid.py.ini b/third_party/blink/web_tests/external/wpt/webdriver/tests/bidi/input/perform_actions/invalid.py.ini new file mode 100644 index 0000000..a6e61e3 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/webdriver/tests/bidi/input/perform_actions/invalid.py.ini
@@ -0,0 +1,2 @@ +[invalid.py] + expected: TIMEOUT
diff --git a/third_party/blink/web_tests/external/wpt/webdriver/tests/bidi/input/perform_actions/key.py b/third_party/blink/web_tests/external/wpt/webdriver/tests/bidi/input/perform_actions/key.py index e721393..ac3099a1 100644 --- a/third_party/blink/web_tests/external/wpt/webdriver/tests/bidi/input/perform_actions/key.py +++ b/third_party/blink/web_tests/external/wpt/webdriver/tests/bidi/input/perform_actions/key.py
@@ -1,5 +1,6 @@ import pytest +from webdriver.bidi.error import NoSuchFrameException from webdriver.bidi.modules.input import Actions from webdriver.bidi.modules.script import ContextTarget @@ -10,6 +11,14 @@ pytestmark = pytest.mark.asyncio +async def test_invalid_browsing_context(bidi_session): + actions = Actions() + actions.add_key() + + with pytest.raises(NoSuchFrameException): + await bidi_session.input.perform_actions(actions=actions, context="foo") + + async def test_key_backspace(bidi_session, top_context, setup_key_test): actions = Actions() actions.add_key().send_keys("efcd").send_keys([Keys.BACKSPACE, Keys.BACKSPACE])
diff --git a/third_party/blink/web_tests/external/wpt/webdriver/tests/bidi/input/perform_actions/pointer.py b/third_party/blink/web_tests/external/wpt/webdriver/tests/bidi/input/perform_actions/pointer.py new file mode 100644 index 0000000..6109450 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/webdriver/tests/bidi/input/perform_actions/pointer.py
@@ -0,0 +1,15 @@ +import pytest + +from webdriver.bidi.error import NoSuchFrameException +from webdriver.bidi.modules.input import Actions + + +pytestmark = pytest.mark.asyncio + + +async def test_invalid_browsing_context(bidi_session): + actions = Actions() + actions.add_pointer() + + with pytest.raises(NoSuchFrameException): + await bidi_session.input.perform_actions(actions=actions, context="foo")
diff --git a/third_party/blink/web_tests/external/wpt/webdriver/tests/bidi/input/perform_actions/pointer_mouse.py b/third_party/blink/web_tests/external/wpt/webdriver/tests/bidi/input/perform_actions/pointer_mouse.py index a1b2532d..c0c4d6ff 100644 --- a/third_party/blink/web_tests/external/wpt/webdriver/tests/bidi/input/perform_actions/pointer_mouse.py +++ b/third_party/blink/web_tests/external/wpt/webdriver/tests/bidi/input/perform_actions/pointer_mouse.py
@@ -1,5 +1,6 @@ import pytest +from webdriver.bidi.error import MoveTargetOutOfBoundsException from webdriver.bidi.modules.input import Actions, get_element_origin from tests.support.asserts import assert_move_to_coordinates @@ -53,6 +54,41 @@ assert expected == filtered_events[1:] +@pytest.mark.parametrize("origin", ["pointer", "viewport"]) +async def test_params_actions_origin_outside_viewport(bidi_session, top_context, origin): + actions = Actions() + actions.add_pointer().pointer_move(x=-50, y=-50, origin=origin) + + with pytest.raises(MoveTargetOutOfBoundsException): + await bidi_session.input.perform_actions( + actions=actions, context=top_context["context"] + ) + + +async def test_params_actions_origin_element_outside_viewport( + bidi_session, top_context, get_actions_origin_page, get_element +): + url = get_actions_origin_page( + """width: 100px; height: 50px; background: green; + position: relative; left: -200px; top: -100px;""" + ) + await bidi_session.browsing_context.navigate( + context=top_context["context"], + url=url, + wait="complete", + ) + + elem = await get_element("#inner") + + actions = Actions() + actions.add_pointer().pointer_move(x=0, y=0, origin=get_element_origin(elem)) + + with pytest.raises(MoveTargetOutOfBoundsException): + await bidi_session.input.perform_actions( + actions=actions, context=top_context["context"] + ) + + async def test_context_menu_at_coordinates( bidi_session, top_context, load_static_test_page ):
diff --git a/third_party/blink/web_tests/external/wpt/webdriver/tests/bidi/input/perform_actions/pointer_origin.py b/third_party/blink/web_tests/external/wpt/webdriver/tests/bidi/input/perform_actions/pointer_origin.py index 8667574..f6721e0 100644 --- a/third_party/blink/web_tests/external/wpt/webdriver/tests/bidi/input/perform_actions/pointer_origin.py +++ b/third_party/blink/web_tests/external/wpt/webdriver/tests/bidi/input/perform_actions/pointer_origin.py
@@ -1,5 +1,6 @@ import pytest +from webdriver.bidi.error import NoSuchElementException from webdriver.bidi.modules.input import Actions, get_element_origin from webdriver.bidi.modules.script import ContextTarget @@ -146,3 +147,50 @@ context=top_context) assert click_coords["x"] == pytest.approx(center["x"], abs=1.0) assert click_coords["y"] == pytest.approx(center["y"], abs=1.0) + + +@pytest.mark.parametrize( + "expression", + [ + "document.querySelector('input#button').attributes[0]", + "document.querySelector('#with-text-node').childNodes[0]", + """document.createProcessingInstruction("xml-stylesheet", "href='foo.css'")""", + "document.querySelector('#with-comment').childNodes[0]", + "document", + "document.doctype", + "document.createDocumentFragment()", + "document.querySelector('#custom-element').shadowRoot", + ], + ids=[ + "attribute", + "text node", + "processing instruction", + "comment", + "document", + "doctype", + "document fragment", + "shadow root", + ] +) +async def test_params_actions_origin_no_such_element( + bidi_session, top_context, get_test_page, expression +): + await bidi_session.browsing_context.navigate( + context=top_context["context"], + url=get_test_page(), + wait="complete", + ) + + node = await bidi_session.script.evaluate( + expression=expression, + target=ContextTarget(top_context["context"]), + await_promise=False, + ) + + actions = Actions() + actions.add_pointer().pointer_move(x=0, y=0, origin=get_element_origin(node)) + + with pytest.raises(NoSuchElementException): + await bidi_session.input.perform_actions( + actions=actions, context=top_context["context"] + )
diff --git a/third_party/blink/web_tests/external/wpt/webdriver/tests/bidi/input/perform_actions/wheel.py b/third_party/blink/web_tests/external/wpt/webdriver/tests/bidi/input/perform_actions/wheel.py index c4999fe..2da3861 100644 --- a/third_party/blink/web_tests/external/wpt/webdriver/tests/bidi/input/perform_actions/wheel.py +++ b/third_party/blink/web_tests/external/wpt/webdriver/tests/bidi/input/perform_actions/wheel.py
@@ -1,5 +1,6 @@ import pytest +from webdriver.bidi.error import NoSuchFrameException from webdriver.bidi.modules.input import Actions, get_element_origin from webdriver.bidi.modules.script import ContextTarget @@ -9,6 +10,14 @@ pytestmark = pytest.mark.asyncio +async def test_invalid_browsing_context(bidi_session): + actions = Actions() + actions.add_wheel() + + with pytest.raises(NoSuchFrameException): + await bidi_session.input.perform_actions(actions=actions, context="foo") + + @pytest.mark.parametrize("delta_x, delta_y", [(0, 10), (5, 0), (5, 10)]) async def test_scroll_not_scrollable( bidi_session, setup_wheel_test, top_context, get_element, delta_x, delta_y
diff --git a/third_party/blink/web_tests/external/wpt/webdriver/tests/bidi/input/perform_actions/wheel_origin.py b/third_party/blink/web_tests/external/wpt/webdriver/tests/bidi/input/perform_actions/wheel_origin.py new file mode 100644 index 0000000..999b141 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/webdriver/tests/bidi/input/perform_actions/wheel_origin.py
@@ -0,0 +1,55 @@ +import pytest + +from webdriver.bidi.error import NoSuchElementException +from webdriver.bidi.modules.input import Actions, get_element_origin +from webdriver.bidi.modules.script import ContextTarget + + +pytestmark = pytest.mark.asyncio + + +@pytest.mark.parametrize( + "expression", + [ + "document.querySelector('input#button').attributes[0]", + "document.querySelector('#with-text-node').childNodes[0]", + """document.createProcessingInstruction("xml-stylesheet", "href='foo.css'")""", + "document.querySelector('#with-comment').childNodes[0]", + "document", + "document.doctype", + "document.createDocumentFragment()", + "document.querySelector('#custom-element').shadowRoot", + ], + ids=[ + "attribute", + "text node", + "processing instruction", + "comment", + "document", + "doctype", + "document fragment", + "shadow root", + ] +) +async def test_params_actions_origin_no_such_element( + bidi_session, top_context, get_test_page, expression +): + await bidi_session.browsing_context.navigate( + context=top_context["context"], + url=get_test_page(), + wait="complete", + ) + + node = await bidi_session.script.evaluate( + expression=expression, + target=ContextTarget(top_context["context"]), + await_promise=False, + ) + + actions = Actions() + actions.add_wheel().scroll(x=0, y=0, delta_x=5, delta_y=10, origin=get_element_origin(node)) + + with pytest.raises(NoSuchElementException): + await bidi_session.input.perform_actions( + actions=actions, context=top_context["context"] + )
diff --git a/third_party/blink/web_tests/external/wpt/webdriver/tests/classic/perform_actions/invalid.py b/third_party/blink/web_tests/external/wpt/webdriver/tests/classic/perform_actions/invalid.py index 7f34a657..b0302131 100644 --- a/third_party/blink/web_tests/external/wpt/webdriver/tests/classic/perform_actions/invalid.py +++ b/third_party/blink/web_tests/external/wpt/webdriver/tests/classic/perform_actions/invalid.py
@@ -200,7 +200,7 @@ ): actions = [ { - "type": value, + "type": action_type, "id": "foo", "actions": [ { @@ -461,38 +461,22 @@ @pytest.mark.parametrize("pointer_action", ["pointerDown", "pointerUp"]) @pytest.mark.parametrize("value", [None, "foo", True, 0.1, [], {}]) def test_pointer_action_up_down_button_invalid_type(session, pointer_action, value): - actions = [ - { - "type": "pointer", - "id": "foo", - "actions": [ - { - "type": pointer_action, - "button": value, - } - ], - } - ] - response = perform_actions(session, actions) + action = create_pointer_common_object(pointer_action, {"button": value}) + + response = perform_actions( + session, [{"type": "pointer", "id": "foo", "actions": [action]}] + ) assert_error(response, "invalid argument") @pytest.mark.parametrize("pointer_action", ["pointerDown", "pointerUp"]) @pytest.mark.parametrize("value", [-1, MAX_INT + 1]) def test_pointer_action_up_down_button_invalid_value(session, pointer_action, value): - actions = [ - { - "type": "pointer", - "id": "foo", - "actions": [ - { - "type": pointer_action, - "button": value, - } - ], - } - ] - response = perform_actions(session, actions) + action = create_pointer_common_object(pointer_action, {"button": value}) + + response = perform_actions( + session, [{"type": "pointer", "id": "foo", "actions": [action]}] + ) assert_error(response, "invalid argument") @@ -518,7 +502,7 @@ @pytest.mark.parametrize("pointer_action", ["pointerDown", "pointerMove", "pointerUp"]) @pytest.mark.parametrize("dimension", ["width", "height"]) -@pytest.mark.parametrize("value", [MIN_INT - 1, MAX_INT + 1]) +@pytest.mark.parametrize("value", [-1, MAX_INT + 1]) def test_pointer_action_common_properties_dimensions_invalid_value( session, dimension, pointer_action, value ): @@ -853,9 +837,7 @@ def test_wheel_action_scroll_missing_property( session, test_actions_scroll_page, wheel_chain, missing ): - target = session.find.css("#scrollable", all=False) - - actions = wheel_chain.scroll(0, 0, 5, 10, origin=target) + actions = wheel_chain.scroll(0, 0, 5, 10, origin="viewport") del actions._actions[-1][missing] with pytest.raises(InvalidArgumentException):
diff --git a/third_party/blink/web_tests/external/wpt/webvtt/rendering/cues-with-video/processing-model/embedded_style_multiple_tracks.html.ini b/third_party/blink/web_tests/external/wpt/webvtt/rendering/cues-with-video/processing-model/embedded_style_multiple_tracks.html.ini index e141985..94eaa0d 100644 --- a/third_party/blink/web_tests/external/wpt/webvtt/rendering/cues-with-video/processing-model/embedded_style_multiple_tracks.html.ini +++ b/third_party/blink/web_tests/external/wpt/webvtt/rendering/cues-with-video/processing-model/embedded_style_multiple_tracks.html.ini
@@ -1,4 +1,4 @@ [embedded_style_multiple_tracks.html] expected: - if (product == "content_shell") and (os == "win") and (port == "win11"): FAIL if (product == "content_shell") and (os == "linux") and (flag_specific == ""): FAIL + if (product == "content_shell") and (os == "win"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/anchors/ar_anchor_freefloating_create_move.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/anchors/ar_anchor_freefloating_create_move.https.html.ini index 6532544..ad835de3 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/anchors/ar_anchor_freefloating_create_move.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/anchors/ar_anchor_freefloating_create_move.https.html.ini
@@ -1,8 +1,10 @@ [ar_anchor_freefloating_create_move.https.html] [Ensures free-floating anchor move gets propagated to anchor poses - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Ensures free-floating anchor move gets propagated to anchor poses - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/anchors/ar_anchor_freefloating_delay_creation.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/anchors/ar_anchor_freefloating_delay_creation.https.html.ini index 0e054c6..1e1bbf27 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/anchors/ar_anchor_freefloating_delay_creation.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/anchors/ar_anchor_freefloating_delay_creation.https.html.ini
@@ -1,16 +1,20 @@ [ar_anchor_freefloating_delay_creation.https.html] [Ensures free-floating anchor creation with delayed failure is handled correctly - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Ensures free-floating anchor creation with delayed failure is handled correctly - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Ensures free-floating anchor creation with delayed success is handled correctly - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Ensures free-floating anchor creation with delayed success is handled correctly - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/anchors/ar_anchor_freefloating_failure.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/anchors/ar_anchor_freefloating_failure.https.html.ini index ad384cf..614055a0 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/anchors/ar_anchor_freefloating_failure.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/anchors/ar_anchor_freefloating_failure.https.html.ini
@@ -1,8 +1,10 @@ [ar_anchor_freefloating_failure.https.html] [Ensures free-floating anchor creation failure is handled correctly - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Ensures free-floating anchor creation failure is handled correctly - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/anchors/ar_anchor_freefloating_pause_resume_stop.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/anchors/ar_anchor_freefloating_pause_resume_stop.https.html.ini index e09e783..ed289e8f 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/anchors/ar_anchor_freefloating_pause_resume_stop.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/anchors/ar_anchor_freefloating_pause_resume_stop.https.html.ini
@@ -1,8 +1,10 @@ [ar_anchor_freefloating_pause_resume_stop.https.html] [Ensures free-floating anchor state changes get propagated - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Ensures free-floating anchor state changes get propagated - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/anchors/ar_anchor_getAnchors.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/anchors/ar_anchor_getAnchors.https.html.ini index 4b27fc1..a9716ee0 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/anchors/ar_anchor_getAnchors.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/anchors/ar_anchor_getAnchors.https.html.ini
@@ -1,16 +1,20 @@ [ar_anchor_getAnchors.https.html] [XRFrame's trackedAnchors is empty when the feature was not requested - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRFrame's trackedAnchors is empty when the feature was not requested - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRFrame's trackedAnchors is empty when the feature was requested - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRFrame's trackedAnchors is empty when the feature was requested - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/anchors/ar_anchor_states.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/anchors/ar_anchor_states.https.html.ini index 8e80c90..35690f5d 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/anchors/ar_anchor_states.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/anchors/ar_anchor_states.https.html.ini
@@ -1,24 +1,30 @@ [ar_anchor_states.https.html] [Anchor creation fails if the feature was not requested - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Anchor creation fails if the feature was not requested - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Anchor creation fails if the feature was requested but the session already ended - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Anchor creation fails if the feature was requested but the session already ended - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Anchor creation succeeds if the feature was requested - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Anchor creation succeeds if the feature was requested - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/ar-module/xrDevice_requestSession_immersive-ar.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/ar-module/xrDevice_requestSession_immersive-ar.https.html.ini index 1a26797e..57fa96e 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/ar-module/xrDevice_requestSession_immersive-ar.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/ar-module/xrDevice_requestSession_immersive-ar.https.html.ini
@@ -1,8 +1,10 @@ [xrDevice_requestSession_immersive-ar.https.html] [Tests requestSession accepts immersive-ar mode - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Tests requestSession accepts immersive-ar mode - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/ar-module/xrSession_environmentBlendMode.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/ar-module/xrSession_environmentBlendMode.https.html.ini index 957affa..2fa3f05 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/ar-module/xrSession_environmentBlendMode.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/ar-module/xrSession_environmentBlendMode.https.html.ini
@@ -1,16 +1,20 @@ [xrSession_environmentBlendMode.https.html] [Tests environmentBlendMode for a VR device - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Tests environmentBlendMode for a VR device - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Tests environmentBlendMode for an AR device - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Tests environmentBlendMode for an AR device - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/ar-module/xrSession_interactionMode.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/ar-module/xrSession_interactionMode.https.html.ini index db5531ad1..d41ac90 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/ar-module/xrSession_interactionMode.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/ar-module/xrSession_interactionMode.https.html.ini
@@ -1,40 +1,50 @@ [xrSession_interactionMode.https.html] [Tests interactionMode for a INLINE_SCREEN_DEVICE - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Tests interactionMode for a INLINE_SCREEN_DEVICE - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Tests interactionMode for an AR_HMD_DEVICE - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Tests interactionMode for an AR_HMD_DEVICE - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Tests interactionMode for an AR_SCREEN_DEVICE - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Tests interactionMode for an AR_SCREEN_DEVICE - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Tests interactionMode for an VR_HMD_DEVICE - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Tests interactionMode for an VR_HMD_DEVICE - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Tests interactionMode for an VR_SCREEN_DEVICE - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Tests interactionMode for an VR_SCREEN_DEVICE - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/camera-access/xrCamera_resolution.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/camera-access/xrCamera_resolution.https.html.ini index 59d62d786..8b56b643 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/camera-access/xrCamera_resolution.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/camera-access/xrCamera_resolution.https.html.ini
@@ -1,8 +1,10 @@ [xrCamera_resolution.https.html] [XRCamera object is present and carries expected dimensions - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRCamera object is present and carries expected dimensions - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/depth-sensing/cpu/depth_sensing_cpu_dataUnavailable.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/depth-sensing/cpu/depth_sensing_cpu_dataUnavailable.https.html.ini index 6774c6d..958064d6 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/depth-sensing/cpu/depth_sensing_cpu_dataUnavailable.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/depth-sensing/cpu/depth_sensing_cpu_dataUnavailable.https.html.ini
@@ -1,8 +1,10 @@ [depth_sensing_cpu_dataUnavailable.https.html] [Ensures depth data is not available when cleared in the controller, `cpu-optimized` - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Ensures depth data is not available when cleared in the controller, `cpu-optimized` - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/depth-sensing/cpu/depth_sensing_cpu_inactiveFrame.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/depth-sensing/cpu/depth_sensing_cpu_inactiveFrame.https.html.ini index 5efcca3..68007dd7 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/depth-sensing/cpu/depth_sensing_cpu_inactiveFrame.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/depth-sensing/cpu/depth_sensing_cpu_inactiveFrame.https.html.ini
@@ -1,8 +1,10 @@ [depth_sensing_cpu_inactiveFrame.https.html] [Ensures getDepthInformation() throws when not run in an active frame, `cpu-optimized` - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Ensures getDepthInformation() throws when not run in an active frame, `cpu-optimized` - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/depth-sensing/cpu/depth_sensing_cpu_incorrectUsage.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/depth-sensing/cpu/depth_sensing_cpu_incorrectUsage.https.html.ini index daa8ce48..91bdcc1 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/depth-sensing/cpu/depth_sensing_cpu_incorrectUsage.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/depth-sensing/cpu/depth_sensing_cpu_incorrectUsage.https.html.ini
@@ -1,8 +1,10 @@ [depth_sensing_cpu_incorrectUsage.https.html] [Ensures XRWebGLDepthInformation is not obtainable in `cpu-optimized` usage mode - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Ensures XRWebGLDepthInformation is not obtainable in `cpu-optimized` usage mode - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/depth-sensing/cpu/depth_sensing_cpu_luminance_alpha_dataValid.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/depth-sensing/cpu/depth_sensing_cpu_luminance_alpha_dataValid.https.html.ini index d5bce71..cfecd5b 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/depth-sensing/cpu/depth_sensing_cpu_luminance_alpha_dataValid.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/depth-sensing/cpu/depth_sensing_cpu_luminance_alpha_dataValid.https.html.ini
@@ -1,8 +1,10 @@ [depth_sensing_cpu_luminance_alpha_dataValid.https.html] [Ensures depth data is returned and values match expectation, cpu-optimized, luminance-alpha. - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Ensures depth data is returned and values match expectation, cpu-optimized, luminance-alpha. - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/depth-sensing/cpu/depth_sensing_cpu_staleView.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/depth-sensing/cpu/depth_sensing_cpu_staleView.https.html.ini index 2a81bd6..8dd273a 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/depth-sensing/cpu/depth_sensing_cpu_staleView.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/depth-sensing/cpu/depth_sensing_cpu_staleView.https.html.ini
@@ -1,8 +1,10 @@ [depth_sensing_cpu_staleView.https.html] [Ensures getDepthInformation() throws when run with stale XRView, `cpu-optimized` - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Ensures getDepthInformation() throws when run with stale XRView, `cpu-optimized` - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/depth-sensing/depth_sensing_notEnabled.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/depth-sensing/depth_sensing_notEnabled.https.html.ini index 7483d386..35cd511 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/depth-sensing/depth_sensing_notEnabled.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/depth-sensing/depth_sensing_notEnabled.https.html.ini
@@ -1,16 +1,20 @@ [depth_sensing_notEnabled.https.html] [XRFrame.getDepthInformation() rejects if depth sensing is not enabled on a session - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRFrame.getDepthInformation() rejects if depth sensing is not enabled on a session - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRWebGLBinding.getDepthInformation() rejects if depth sensing is not enabled on a session - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRWebGLBinding.getDepthInformation() rejects if depth sensing is not enabled on a session - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/dom-overlay/ar_dom_overlay.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/dom-overlay/ar_dom_overlay.https.html.ini index 02b3b2a..8c98383 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/dom-overlay/ar_dom_overlay.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/dom-overlay/ar_dom_overlay.https.html.ini
@@ -4,37 +4,43 @@ if product == "chrome": TIMEOUT [Ensures DOM Overlay Fullscreen API doesn't change DOM overlay - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL if (product == "content_shell") and (os == "linux") and (flag_specific == "disable-site-isolation-trials"): [PASS, NOTRUN] if product == "chrome": NOTRUN [Ensures DOM Overlay Fullscreen API doesn't change DOM overlay - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL if (product == "content_shell") and (os == "linux") and (flag_specific == "disable-site-isolation-trials"): [PASS, NOTRUN] if product == "chrome": NOTRUN [Ensures DOM Overlay feature works for immersive-ar, body element - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL if (product == "content_shell") and (os == "linux") and (flag_specific == "disable-site-isolation-trials"): [PASS, TIMEOUT] if product == "chrome": TIMEOUT [Ensures DOM Overlay feature works for immersive-ar, body element - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL if (product == "content_shell") and (os == "linux") and (flag_specific == "disable-site-isolation-trials"): [PASS, NOTRUN] if product == "chrome": NOTRUN [Ensures DOM Overlay feature works for immersive-ar, div element - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL if (product == "content_shell") and (os == "linux") and (flag_specific == "disable-site-isolation-trials"): [PASS, NOTRUN] if product == "chrome": NOTRUN [Ensures DOM Overlay feature works for immersive-ar, div element - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL if (product == "content_shell") and (os == "linux") and (flag_specific == "disable-site-isolation-trials"): [PASS, NOTRUN] if product == "chrome": NOTRUN
diff --git a/third_party/blink/web_tests/external/wpt/webxr/dom-overlay/ar_dom_overlay_hit_test.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/dom-overlay/ar_dom_overlay_hit_test.https.html.ini index 5e6593d..673305b 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/dom-overlay/ar_dom_overlay_hit_test.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/dom-overlay/ar_dom_overlay_hit_test.https.html.ini
@@ -1,13 +1,16 @@ [ar_dom_overlay_hit_test.https.html] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): OK + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): OK + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): OK TIMEOUT [Ensures DOM Overlay interactions on cross origin iframe do not cause hit test results to come up - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL TIMEOUT [Ensures DOM Overlay interactions on cross origin iframe do not cause hit test results to come up - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL NOTRUN
diff --git a/third_party/blink/web_tests/external/wpt/webxr/dom-overlay/nested_fullscreen.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/dom-overlay/nested_fullscreen.https.html.ini index 0568f6d..2e1e41d 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/dom-overlay/nested_fullscreen.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/dom-overlay/nested_fullscreen.https.html.ini
@@ -1,16 +1,20 @@ [nested_fullscreen.https.html] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): OK + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): OK + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): OK TIMEOUT [Check XR session from fullscreen - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Check XR session from fullscreen - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [fullscreen setup] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): PASS + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): PASS + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): PASS TIMEOUT
diff --git a/third_party/blink/web_tests/external/wpt/webxr/events_input_source_recreation.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/events_input_source_recreation.https.html.ini index aebd1366..a47f9576 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/events_input_source_recreation.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/events_input_source_recreation.https.html.ini
@@ -1,8 +1,10 @@ [events_input_source_recreation.https.html] [Input sources are re-created when handedness or target ray mode changes - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Input sources are re-created when handedness or target ray mode changes - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/events_input_sources_change.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/events_input_sources_change.https.html.ini index 169944d..5dc6b10 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/events_input_sources_change.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/events_input_sources_change.https.html.ini
@@ -1,8 +1,10 @@ [events_input_sources_change.https.html] [Transient input sources fire events in the right order - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Transient input sources fire events in the right order - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/events_referenceSpace_reset_immersive.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/events_referenceSpace_reset_immersive.https.html.ini index 0edd9f0..e8097d0 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/events_referenceSpace_reset_immersive.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/events_referenceSpace_reset_immersive.https.html.ini
@@ -1,8 +1,10 @@ [events_referenceSpace_reset_immersive.https.html] [XRSession resetpose from a device properly fires off the right events for immersive sessions - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRSession resetpose from a device properly fires off the right events for immersive sessions - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/events_referenceSpace_reset_inline.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/events_referenceSpace_reset_inline.https.html.ini index 625fb4d..31b8550 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/events_referenceSpace_reset_inline.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/events_referenceSpace_reset_inline.https.html.ini
@@ -1,15 +1,18 @@ [events_referenceSpace_reset_inline.https.html] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): OK + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): OK + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): OK TIMEOUT [XRSession resetpose from a device properly fires off the right events for non-immersive sessions - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL if product == "chrome": [PASS, TIMEOUT] TIMEOUT [XRSession resetpose from a device properly fires off the right events for non-immersive sessions - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL if product == "chrome": [TIMEOUT, NOTRUN] NOTRUN
diff --git a/third_party/blink/web_tests/external/wpt/webxr/events_session_select.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/events_session_select.https.html.ini index b50141b..f5d6a1d 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/events_session_select.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/events_session_select.https.html.ini
@@ -1,8 +1,10 @@ [events_session_select.https.html] [XRInputSources primary input presses properly fires off the right events - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRInputSources primary input presses properly fires off the right events - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/events_session_select_subframe.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/events_session_select_subframe.https.html.ini index f61851b..04c6e1f2 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/events_session_select_subframe.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/events_session_select_subframe.https.html.ini
@@ -1,8 +1,10 @@ [events_session_select_subframe.https.html] [Ensures that an XRInputSources primary input being pressed and released in the space of a single frame properly fires off the right events - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Ensures that an XRInputSources primary input being pressed and released in the space of a single frame properly fires off the right events - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/events_session_squeeze.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/events_session_squeeze.https.html.ini index ccb439f6..3102bc8 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/events_session_squeeze.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/events_session_squeeze.https.html.ini
@@ -1,8 +1,10 @@ [events_session_squeeze.https.html] [XRInputSources primary input presses properly fires off the right events - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRInputSources primary input presses properly fires off the right events - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/exclusive_requestFrame_nolayer.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/exclusive_requestFrame_nolayer.https.html.ini index b8eaccf..83f8d80 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/exclusive_requestFrame_nolayer.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/exclusive_requestFrame_nolayer.https.html.ini
@@ -1,16 +1,20 @@ [exclusive_requestFrame_nolayer.https.html] [XRSession requestAnimationFrame must fail if the session has no baseLayer for immersive - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRSession requestAnimationFrame must fail if the session has no baseLayer for immersive - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRSession requestAnimationFrame must fail if the session has no baseLayer for non immersive - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRSession requestAnimationFrame must fail if the session has no baseLayer for non immersive - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/gamepads-module/xrInputSource_gamepad_disconnect.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/gamepads-module/xrInputSource_gamepad_disconnect.https.html.ini index b167e69..0cd0996 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/gamepads-module/xrInputSource_gamepad_disconnect.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/gamepads-module/xrInputSource_gamepad_disconnect.https.html.ini
@@ -1,8 +1,10 @@ [xrInputSource_gamepad_disconnect.https.html] [WebXR InputSource's gamepad gets disconnected when the input source is removed - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [WebXR InputSource's gamepad gets disconnected when the input source is removed - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/gamepads-module/xrInputSource_gamepad_input_registered.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/gamepads-module/xrInputSource_gamepad_input_registered.https.html.ini index 60989eb..7334865c 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/gamepads-module/xrInputSource_gamepad_input_registered.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/gamepads-module/xrInputSource_gamepad_input_registered.https.html.ini
@@ -1,8 +1,10 @@ [xrInputSource_gamepad_input_registered.https.html] [WebXR InputSource's gamepad properly registers input - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [WebXR InputSource's gamepad properly registers input - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/getInputPose_handedness.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/getInputPose_handedness.https.html.ini index 3e654dc8..f80f161 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/getInputPose_handedness.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/getInputPose_handedness.https.html.ini
@@ -1,8 +1,10 @@ [getInputPose_handedness.https.html] [XRInputSources properly communicate their handedness - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRInputSources properly communicate their handedness - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/getInputPose_pointer.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/getInputPose_pointer.https.html.ini index 86b62947..0b4816b 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/getInputPose_pointer.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/getInputPose_pointer.https.html.ini
@@ -1,8 +1,10 @@ [getInputPose_pointer.https.html] [XRInputSources with a target ray mode of 'tracked-pointer' properly communicate their poses - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRInputSources with a target ray mode of 'tracked-pointer' properly communicate their poses - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/getViewerPose_emulatedPosition.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/getViewerPose_emulatedPosition.https.html.ini index fd9d6be..ff5ed77f 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/getViewerPose_emulatedPosition.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/getViewerPose_emulatedPosition.https.html.ini
@@ -1,8 +1,10 @@ [getViewerPose_emulatedPosition.https.html] [XRFrame getViewerPose has emulatedPosition set properly. - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRFrame getViewerPose has emulatedPosition set properly. - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/hit-test/ar_hittest_source_cancel.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/hit-test/ar_hittest_source_cancel.https.html.ini index 44832a3..95e881e 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/hit-test/ar_hittest_source_cancel.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/hit-test/ar_hittest_source_cancel.https.html.ini
@@ -1,32 +1,40 @@ [ar_hittest_source_cancel.https.html] [Ensures hit test source cancellation works when the session has ended - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Ensures hit test source cancellation works when the session has ended - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Ensures hit test source cancellation works when the session has not ended. - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Ensures hit test source cancellation works when the session has not ended. - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Ensures transient input hit test source cancellation works when the session has ended - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Ensures transient input hit test source cancellation works when the session has ended - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Ensures transient input hit test source cancellation works when the session has not ended. - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Ensures transient input hit test source cancellation works when the session has not ended. - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/hit-test/ar_hittest_subscription_inputSources.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/hit-test/ar_hittest_subscription_inputSources.https.html.ini index 5f9ad4a..b108a47 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/hit-test/ar_hittest_subscription_inputSources.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/hit-test/ar_hittest_subscription_inputSources.https.html.ini
@@ -1,24 +1,30 @@ [ar_hittest_subscription_inputSources.https.html] [Ensures subscription to hit test works with an XRSpace from input source - after move - 1 result - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Ensures subscription to hit test works with an XRSpace from input source - after move - 1 result - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Ensures subscription to hit test works with an XRSpace from input source - after move - no results - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Ensures subscription to hit test works with an XRSpace from input source - after move - no results - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Ensures subscription to hit test works with an XRSpace from input source - no move - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Ensures subscription to hit test works with an XRSpace from input source - no move - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/hit-test/ar_hittest_subscription_refSpaces.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/hit-test/ar_hittest_subscription_refSpaces.https.html.ini index c7bbdb8..841b5b65 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/hit-test/ar_hittest_subscription_refSpaces.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/hit-test/ar_hittest_subscription_refSpaces.https.html.ini
@@ -1,32 +1,40 @@ [ar_hittest_subscription_refSpaces.https.html] [Ensures subscription to hit test works with local space - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Ensures subscription to hit test works with local space - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Ensures subscription to hit test works with local-floor space - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Ensures subscription to hit test works with local-floor space - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Ensures subscription to hit test works with viewer space - straight ahead - plane - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Ensures subscription to hit test works with viewer space - straight ahead - plane - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Ensures subscription to hit test works with viewer space - straight up - no results - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Ensures subscription to hit test works with viewer space - straight up - no results - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/hit-test/ar_hittest_subscription_states_regular.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/hit-test/ar_hittest_subscription_states_regular.https.html.ini index f637cae..d1c591f 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/hit-test/ar_hittest_subscription_states_regular.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/hit-test/ar_hittest_subscription_states_regular.https.html.ini
@@ -1,24 +1,30 @@ [ar_hittest_subscription_states_regular.https.html] [Hit test subscription fails if the feature was not requested - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Hit test subscription fails if the feature was not requested - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Hit test subscription fails if the feature was requested but the session already ended - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Hit test subscription fails if the feature was requested but the session already ended - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Hit test subscription succeeds if the feature was requested - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Hit test subscription succeeds if the feature was requested - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/hit-test/ar_hittest_subscription_states_transient.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/hit-test/ar_hittest_subscription_states_transient.https.html.ini index 17a8eb46..d12d268 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/hit-test/ar_hittest_subscription_states_transient.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/hit-test/ar_hittest_subscription_states_transient.https.html.ini
@@ -1,24 +1,30 @@ [ar_hittest_subscription_states_transient.https.html] [Transient hit test subscription fails if the feature was not requested - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Transient hit test subscription fails if the feature was not requested - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Transient hit test subscription succeeds if the feature was requested - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Transient hit test subscription succeeds if the feature was requested - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Transient test subscription fails if the feature was requested but the session already ended - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Transient test subscription fails if the feature was requested but the session already ended - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/hit-test/ar_hittest_subscription_transientInputSources.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/hit-test/ar_hittest_subscription_transientInputSources.https.html.ini index 5223cf2..0c493b3 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/hit-test/ar_hittest_subscription_transientInputSources.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/hit-test/ar_hittest_subscription_transientInputSources.https.html.ini
@@ -1,24 +1,30 @@ [ar_hittest_subscription_transientInputSources.https.html] [Ensures subscription to transient hit test works with an XRSpace from input source - after move - 1 result - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Ensures subscription to transient hit test works with an XRSpace from input source - after move - 1 result - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Ensures subscription to transient hit test works with an XRSpace from input source - after move - no results - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Ensures subscription to transient hit test works with an XRSpace from input source - after move - no results - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Ensures subscription to transient hit test works with an XRSpace from input source - no move - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Ensures subscription to transient hit test works with an XRSpace from input source - no move - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/hit-test/ar_hittest_subscription_unlocalizable.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/hit-test/ar_hittest_subscription_unlocalizable.https.html.ini index a91e830a..7010e78 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/hit-test/ar_hittest_subscription_unlocalizable.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/hit-test/ar_hittest_subscription_unlocalizable.https.html.ini
@@ -1,8 +1,10 @@ [ar_hittest_subscription_unlocalizable.https.html] [Ensures hit test result returns null pose w/unlocalizable space - viewer space - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Ensures hit test result returns null pose w/unlocalizable space - viewer space - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/idlharness.https.window.js.ini b/third_party/blink/web_tests/external/wpt/webxr/idlharness.https.window.js.ini index 74fe81a..31f5108 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/idlharness.https.window.js.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/idlharness.https.window.js.ini
@@ -1,14 +1,16 @@ [idlharness.https.window.html] [Stringification of xrWebGLLayer] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [WebGLRenderingContext includes WebGLRenderingContextOverloads: member names are unique] expected: FAIL [WebGLRenderingContextBase interface: webGLRenderingContextBase must inherit property "makeXRCompatible()" with the proper type] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRFrame interface: attribute predictedDisplayTime] expected: FAIL @@ -45,47 +47,58 @@ [XRWebGLLayer interface: calling getNativeFramebufferScaleFactor(XRSession) on xrWebGLLayer with too few arguments must throw TypeError] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRWebGLLayer interface: calling getViewport(XRView) on xrWebGLLayer with too few arguments must throw TypeError] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRWebGLLayer interface: xrWebGLLayer must inherit property "antialias" with the proper type] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRWebGLLayer interface: xrWebGLLayer must inherit property "fixedFoveation" with the proper type] expected: FAIL [XRWebGLLayer interface: xrWebGLLayer must inherit property "framebuffer" with the proper type] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRWebGLLayer interface: xrWebGLLayer must inherit property "framebufferHeight" with the proper type] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRWebGLLayer interface: xrWebGLLayer must inherit property "framebufferWidth" with the proper type] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRWebGLLayer interface: xrWebGLLayer must inherit property "getNativeFramebufferScaleFactor(XRSession)" with the proper type] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRWebGLLayer interface: xrWebGLLayer must inherit property "getViewport(XRView)" with the proper type] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRWebGLLayer interface: xrWebGLLayer must inherit property "ignoreDepthValues" with the proper type] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRWebGLLayer must be primary interface of xrWebGLLayer] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [idl_test setup] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/layers/xrSession_updateRenderState.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/layers/xrSession_updateRenderState.https.html.ini index cfd9bc2..514efa3e 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/layers/xrSession_updateRenderState.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/layers/xrSession_updateRenderState.https.html.ini
@@ -1,16 +1,20 @@ [xrSession_updateRenderState.https.html] [Ensure XRSession throws appropriate errors when updating render state with layers feature enabled - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Ensure XRSession throws appropriate errors when updating render state with layers feature enabled - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Ensure XRSession throws appropriate errors when updating render state without layers feature enabled - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Ensure XRSession throws appropriate errors when updating render state without layers feature enabled - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/layers/xrWebGLBinding_constructor.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/layers/xrWebGLBinding_constructor.https.html.ini index 962d95b..3a679b0 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/layers/xrWebGLBinding_constructor.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/layers/xrWebGLBinding_constructor.https.html.ini
@@ -1,8 +1,10 @@ [xrWebGLBinding_constructor.https.html] [Ensure that XRWebGLBinding's constructor throws appropriate errors using webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Ensure that XRWebGLBinding's constructor throws appropriate errors using webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/light-estimation/xrFrame_getLightEstimate_oldSession.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/light-estimation/xrFrame_getLightEstimate_oldSession.https.html.ini index 8e7e475..a5df2733 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/light-estimation/xrFrame_getLightEstimate_oldSession.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/light-estimation/xrFrame_getLightEstimate_oldSession.https.html.ini
@@ -1,8 +1,10 @@ [xrFrame_getLightEstimate_oldSession.https.html] [getLightEstimate rejects if probe is from wrong session - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [getLightEstimate rejects if probe is from wrong session - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/light-estimation/xrFrame_getLightEstimate_staleFrame.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/light-estimation/xrFrame_getLightEstimate_staleFrame.https.html.ini index 8c99ddee..ab682d1 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/light-estimation/xrFrame_getLightEstimate_staleFrame.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/light-estimation/xrFrame_getLightEstimate_staleFrame.https.html.ini
@@ -1,8 +1,10 @@ [xrFrame_getLightEstimate_staleFrame.https.html] [Cannot get XrLightEstimate from stale frame - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Cannot get XrLightEstimate from stale frame - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/light-estimation/xrFrame_getLightEstimate_valid.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/light-estimation/xrFrame_getLightEstimate_valid.https.html.ini index 3fc53be..7760a78 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/light-estimation/xrFrame_getLightEstimate_valid.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/light-estimation/xrFrame_getLightEstimate_valid.https.html.ini
@@ -1,8 +1,10 @@ [xrFrame_getLightEstimate_valid.https.html] [Can get XRLightEstimates during frame - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Can get XRLightEstimates during frame - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/light-estimation/xrSession_getLightProbe_ended.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/light-estimation/xrSession_getLightProbe_ended.https.html.ini index 27dc76a..dc41e24 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/light-estimation/xrSession_getLightProbe_ended.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/light-estimation/xrSession_getLightProbe_ended.https.html.ini
@@ -1,8 +1,10 @@ [xrSession_getLightProbe_ended.https.html] [getLightProbe rejects on an ended session - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [getLightProbe rejects on an ended session - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/light-estimation/xrSession_getLightProbe_notEnabled.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/light-estimation/xrSession_getLightProbe_notEnabled.https.html.ini index 69e71d2b..fc95c69 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/light-estimation/xrSession_getLightProbe_notEnabled.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/light-estimation/xrSession_getLightProbe_notEnabled.https.html.ini
@@ -1,8 +1,10 @@ [xrSession_getLightProbe_notEnabled.https.html] [getLightProbe rejects if not enabled on session - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [getLightProbe rejects if not enabled on session - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/light-estimation/xrSession_getLightProbe_valid.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/light-estimation/xrSession_getLightProbe_valid.https.html.ini index 4dfec59..c38a381b 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/light-estimation/xrSession_getLightProbe_valid.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/light-estimation/xrSession_getLightProbe_valid.https.html.ini
@@ -1,8 +1,10 @@ [xrSession_getLightProbe_valid.https.html] [Can create valid XRLightProbe objects - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Can create valid XRLightProbe objects - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/light-estimation/xrWebGLBinding_getReflectionCubeMap.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/light-estimation/xrWebGLBinding_getReflectionCubeMap.https.html.ini index cc118c4d..898d6cca 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/light-estimation/xrWebGLBinding_getReflectionCubeMap.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/light-estimation/xrWebGLBinding_getReflectionCubeMap.https.html.ini
@@ -1,8 +1,10 @@ [xrWebGLBinding_getReflectionCubeMap.https.html] [Test that getReflectionCubeMap returns or throws appropriately without a reflection map. - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Test that getReflectionCubeMap returns or throws appropriately without a reflection map. - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/navigator_xr_sameObject.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/navigator_xr_sameObject.https.html.ini index 9b5887f..d5699ba 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/navigator_xr_sameObject.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/navigator_xr_sameObject.https.html.ini
@@ -1,8 +1,10 @@ [navigator_xr_sameObject.https.html] [Navigator.xr meets [SameObject\] requirement - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Navigator.xr meets [SameObject\] requirement - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/render_state_update.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/render_state_update.https.html.ini index 9e24c5d..0d08107 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/render_state_update.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/render_state_update.https.html.ini
@@ -1,40 +1,50 @@ [render_state_update.https.html] [updateRenderState handles appropriately XRRenderStateInit params - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [updateRenderState handles appropriately XRRenderStateInit params - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [updateRenderState handles appropriately XRRenderStateInit with no params - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [updateRenderState handles appropriately XRRenderStateInit with no params - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [updateRenderState handles appropriately baseLayers created with different sessions - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [updateRenderState handles appropriately baseLayers created with different sessions - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [updateRenderState handles appropriately ended sessions - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [updateRenderState handles appropriately ended sessions - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [updateRenderState handles appropriately immersive sessions with specified inlineVerticalFieldOfView - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [updateRenderState handles appropriately immersive sessions with specified inlineVerticalFieldOfView - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/render_state_vertical_fov_immersive.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/render_state_vertical_fov_immersive.https.html.ini index 0f558a3a..f81016b 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/render_state_vertical_fov_immersive.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/render_state_vertical_fov_immersive.https.html.ini
@@ -1,8 +1,10 @@ [render_state_vertical_fov_immersive.https.html] [inlineVerticalFieldOfView is set appropriately on immersively sessions - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [inlineVerticalFieldOfView is set appropriately on immersively sessions - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/render_state_vertical_fov_inline.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/render_state_vertical_fov_inline.https.html.ini index fae5c93..371bb190 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/render_state_vertical_fov_inline.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/render_state_vertical_fov_inline.https.html.ini
@@ -1,8 +1,10 @@ [render_state_vertical_fov_inline.https.html] [inlineVerticalFieldOfView is set appropriately on inline sessions - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [inlineVerticalFieldOfView is set appropriately on inline sessions - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/webGLCanvasContext_create_xrcompatible.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/webGLCanvasContext_create_xrcompatible.https.html.ini index 39372d85..49cfd79 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/webGLCanvasContext_create_xrcompatible.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/webGLCanvasContext_create_xrcompatible.https.html.ini
@@ -1,16 +1,20 @@ [webGLCanvasContext_create_xrcompatible.https.html] [An XR-compatible webgl context can be created] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [An XR-compatible webgl2 context can be created] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Creating a webgl context with no device] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Creating a webgl2 context with no device] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/webGLCanvasContext_makecompatible_contextlost.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/webGLCanvasContext_makecompatible_contextlost.https.html.ini index 18f32fb..a18b515 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/webGLCanvasContext_makecompatible_contextlost.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/webGLCanvasContext_makecompatible_contextlost.https.html.ini
@@ -1,8 +1,10 @@ [webGLCanvasContext_makecompatible_contextlost.https.html] [A lost webgl context should not be able to set xr compatibility] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [A lost webgl2 context should not be able to set xr compatibility] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/webGLCanvasContext_makecompatible_reentrant.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/webGLCanvasContext_makecompatible_reentrant.https.html.ini index 0b74929..a10eea0b 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/webGLCanvasContext_makecompatible_reentrant.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/webGLCanvasContext_makecompatible_reentrant.https.html.ini
@@ -1,16 +1,20 @@ [webGLCanvasContext_makecompatible_reentrant.https.html] [Verify promise from a non-reentrant call to makeXRCompatible() is resolved for webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Verify promise from a non-reentrant call to makeXRCompatible() is resolved for webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Verify promises from reentrant calls to makeXRCompatible() are resolved for webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Verify promises from reentrant calls to makeXRCompatible() are resolved for webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/webxr_permissions_policy.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/webxr_permissions_policy.https.html.ini index 7b3aecda..0e8b9cd 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/webxr_permissions_policy.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/webxr_permissions_policy.https.html.ini
@@ -1,4 +1,5 @@ [webxr_permissions_policy.https.html] [Validate xr compatibility requests without xr-spatial-tracking policy] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/xrBoundedReferenceSpace_updates.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/xrBoundedReferenceSpace_updates.https.html.ini index 064b9a34..a44108bb8 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/xrBoundedReferenceSpace_updates.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/xrBoundedReferenceSpace_updates.https.html.ini
@@ -1,8 +1,10 @@ [xrBoundedReferenceSpace_updates.https.html] ['XRBoundedReferenceSpace updates properly when the changes are applied - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL ['XRBoundedReferenceSpace updates properly when the changes are applied - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/xrDevice_disconnect_ends.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/xrDevice_disconnect_ends.https.html.ini index 0a472da..0a01258 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/xrDevice_disconnect_ends.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/xrDevice_disconnect_ends.https.html.ini
@@ -1,8 +1,10 @@ [xrDevice_disconnect_ends.https.html] [Immersive session ends when device is disconnected - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Immersive session ends when device is disconnected - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/xrDevice_requestSession_immersive.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/xrDevice_requestSession_immersive.https.html.ini index 3e36f2d..811cb43 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/xrDevice_requestSession_immersive.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/xrDevice_requestSession_immersive.https.html.ini
@@ -1,24 +1,30 @@ [xrDevice_requestSession_immersive.https.html] [Tests requestSession accepts XRSessionInit dictionary - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Tests requestSession accepts XRSessionInit dictionary - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Tests requestSession ignores unknown optionalFeatures - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Tests requestSession ignores unknown optionalFeatures - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Tests requestSession resolves when supported - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Tests requestSession resolves when supported - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/xrDevice_requestSession_optionalFeatures.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/xrDevice_requestSession_optionalFeatures.https.html.ini index 18d898e0..c51c312 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/xrDevice_requestSession_optionalFeatures.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/xrDevice_requestSession_optionalFeatures.https.html.ini
@@ -1,32 +1,40 @@ [xrDevice_requestSession_optionalFeatures.https.html] [Tests requestSession accepts XRSessionInit dictionary - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Tests requestSession accepts XRSessionInit dictionary - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Tests requestSession accepts XRSessionInit dictionary with empty feature lists - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Tests requestSession accepts XRSessionInit dictionary with empty feature lists - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Tests requestSession ignores unknown objects in optionalFeatures - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Tests requestSession ignores unknown objects in optionalFeatures - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Tests requestSession ignores unknown strings in optionalFeatures - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Tests requestSession ignores unknown strings in optionalFeatures - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/xrFrame_getPose.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/xrFrame_getPose.https.html.ini index 8d74a9eb..ac4203c4 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/xrFrame_getPose.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/xrFrame_getPose.https.html.ini
@@ -1,16 +1,20 @@ [xrFrame_getPose.https.html] [XRFrame.getPose works for immersive sessions - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRFrame.getPose works for immersive sessions - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRFrame.getPose works for non-immersive sessions - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRFrame.getPose works for non-immersive sessions - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/xrFrame_getViewerPose_getPose.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/xrFrame_getViewerPose_getPose.https.html.ini index 66001d4..e14c763 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/xrFrame_getViewerPose_getPose.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/xrFrame_getViewerPose_getPose.https.html.ini
@@ -1,8 +1,10 @@ [xrFrame_getViewerPose_getPose.https.html] [XRFrame getViewerPose(refSpace) matches getPose(viewer, refSpace). - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRFrame getViewerPose(refSpace) matches getPose(viewer, refSpace). - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/xrFrame_getViewerPose_getPose_identities.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/xrFrame_getViewerPose_getPose_identities.https.html.ini index 0638e08..67f80a43 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/xrFrame_getViewerPose_getPose_identities.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/xrFrame_getViewerPose_getPose_identities.https.html.ini
@@ -1,8 +1,10 @@ [xrFrame_getViewerPose_getPose_identities.https.html] [XRFrame getViewerPose(viewerSpace) & getPose(space, space) return identity even during tracking loss - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRFrame getViewerPose(viewerSpace) & getPose(space, space) return identity even during tracking loss - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/xrFrame_lifetime.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/xrFrame_lifetime.https.html.ini index a7bd836..e7b132a 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/xrFrame_lifetime.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/xrFrame_lifetime.https.html.ini
@@ -1,16 +1,20 @@ [xrFrame_lifetime.https.html] [XRFrame methods throw exceptions outside of the requestAnimationFrame callback for immersive sessions - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRFrame methods throw exceptions outside of the requestAnimationFrame callback for immersive sessions - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRFrame methods throw exceptions outside of the requestAnimationFrame callback for non-immersive sessions - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRFrame methods throw exceptions outside of the requestAnimationFrame callback for non-immersive sessions - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/xrFrame_session_sameObject.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/xrFrame_session_sameObject.https.html.ini index a38a1b0..dd686bf 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/xrFrame_session_sameObject.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/xrFrame_session_sameObject.https.html.ini
@@ -1,8 +1,10 @@ [xrFrame_session_sameObject.https.html] [XRFrame.session meets [SameObject\] requirement - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRFrame.session meets [SameObject\] requirement - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/xrInputSource_add_remove.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/xrInputSource_add_remove.https.html.ini index 3bcb5d2..83d64e53 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/xrInputSource_add_remove.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/xrInputSource_add_remove.https.html.ini
@@ -1,8 +1,10 @@ [xrInputSource_add_remove.https.html] [XRInputSources can be properly added and removed from the session - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRInputSources can be properly added and removed from the session - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/xrInputSource_emulatedPosition.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/xrInputSource_emulatedPosition.https.html.ini index ca67a19..eaebd39e 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/xrInputSource_emulatedPosition.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/xrInputSource_emulatedPosition.https.html.ini
@@ -1,8 +1,10 @@ [xrInputSource_emulatedPosition.https.html] [Poses from XRInputSource.gripSpace have emulatedPosition set properly - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Poses from XRInputSource.gripSpace have emulatedPosition set properly - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/xrInputSource_getPose_targetRay_grip.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/xrInputSource_getPose_targetRay_grip.https.html.ini index 194cf02..44245c9 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/xrInputSource_getPose_targetRay_grip.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/xrInputSource_getPose_targetRay_grip.https.html.ini
@@ -1,8 +1,10 @@ [xrInputSource_getPose_targetRay_grip.https.html] [Poses between targetRaySpace and gripSpace can be obtained and behave correctly - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Poses between targetRaySpace and gripSpace can be obtained and behave correctly - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/xrInputSource_profiles.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/xrInputSource_profiles.https.html.ini index b95565bf..882276a 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/xrInputSource_profiles.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/xrInputSource_profiles.https.html.ini
@@ -1,8 +1,10 @@ [xrInputSource_profiles.https.html] [WebXR InputSource's profiles list can be set - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [WebXR InputSource's profiles list can be set - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/xrInputSource_sameObject.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/xrInputSource_sameObject.https.html.ini index 2ea1e318..5f8046a 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/xrInputSource_sameObject.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/xrInputSource_sameObject.https.html.ini
@@ -1,8 +1,10 @@ [xrInputSource_sameObject.https.html] [XRInputSource attributes meet [SameObject\] requirement - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRInputSource attributes meet [SameObject\] requirement - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/xrPose_transform_sameObject.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/xrPose_transform_sameObject.https.html.ini index c2bb6327..0fc5406 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/xrPose_transform_sameObject.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/xrPose_transform_sameObject.https.html.ini
@@ -1,8 +1,10 @@ [xrPose_transform_sameObject.https.html] [XRPose.transform meets [SameObject\] requirement - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRPose.transform meets [SameObject\] requirement - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/xrReferenceSpace_originOffset.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/xrReferenceSpace_originOffset.https.html.ini index dbcbe71..2c9967f 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/xrReferenceSpace_originOffset.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/xrReferenceSpace_originOffset.https.html.ini
@@ -1,8 +1,10 @@ [xrReferenceSpace_originOffset.https.html] [Updating XRReferenceSpace origin offset updates view and input matrices. - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Updating XRReferenceSpace origin offset updates view and input matrices. - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/xrReferenceSpace_originOffsetBounded.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/xrReferenceSpace_originOffsetBounded.https.html.ini index 0c6fdf9..b52f079 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/xrReferenceSpace_originOffsetBounded.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/xrReferenceSpace_originOffsetBounded.https.html.ini
@@ -1,8 +1,10 @@ [xrReferenceSpace_originOffsetBounded.https.html] [Updating XRBoundedReferenceSpace origin offset updates view, input matrices, and bounds geometry. - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Updating XRBoundedReferenceSpace origin offset updates view, input matrices, and bounds geometry. - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/xrReferenceSpace_originOffset_viewer.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/xrReferenceSpace_originOffset_viewer.https.html.ini index dcd8c246..fed3815 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/xrReferenceSpace_originOffset_viewer.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/xrReferenceSpace_originOffset_viewer.https.html.ini
@@ -1,8 +1,10 @@ [xrReferenceSpace_originOffset_viewer.https.html] [Creating XRReferenceSpace origin offset off of `viewer` space works. - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Creating XRReferenceSpace origin offset off of `viewer` space works. - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/xrReferenceSpace_relationships.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/xrReferenceSpace_relationships.https.html.ini index 16287159..56446d3 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/xrReferenceSpace_relationships.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/xrReferenceSpace_relationships.https.html.ini
@@ -1,8 +1,10 @@ [xrReferenceSpace_relationships.https.html] [Bounded space, viewer space, local and local-floor space have correct poses w.r.t. each other - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Bounded space, viewer space, local and local-floor space have correct poses w.r.t. each other - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/xrRigidTransform_constructor.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/xrRigidTransform_constructor.https.html.ini index 8b178b0e..7b302da 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/xrRigidTransform_constructor.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/xrRigidTransform_constructor.https.html.ini
@@ -1,8 +1,10 @@ [xrRigidTransform_constructor.https.html] [XRRigidTransform constructor works - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRRigidTransform constructor works - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/xrRigidTransform_inverse.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/xrRigidTransform_inverse.https.html.ini index 9eb81ea..d92348a 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/xrRigidTransform_inverse.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/xrRigidTransform_inverse.https.html.ini
@@ -1,8 +1,10 @@ [xrRigidTransform_inverse.https.html] [XRRigidTransform inverse works - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRRigidTransform inverse works - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/xrRigidTransform_sameObject.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/xrRigidTransform_sameObject.https.html.ini index d495a1dd..19b5f38 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/xrRigidTransform_sameObject.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/xrRigidTransform_sameObject.https.html.ini
@@ -1,8 +1,10 @@ [xrRigidTransform_sameObject.https.html] [XRRigidTransform position and orientation meet [SameObject\] requirements - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRRigidTransform position and orientation meet [SameObject\] requirements - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/xrSession_cancelAnimationFrame.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/xrSession_cancelAnimationFrame.https.html.ini index 6247ba8..6681e48 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/xrSession_cancelAnimationFrame.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/xrSession_cancelAnimationFrame.https.html.ini
@@ -1,16 +1,20 @@ [xrSession_cancelAnimationFrame.https.html] [XRSession requestAnimationFrame callbacks can be unregistered with cancelAnimationFrame for immersive sessions - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRSession requestAnimationFrame callbacks can be unregistered with cancelAnimationFrame for immersive sessions - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRSession requestAnimationFrame callbacks can be unregistered with cancelAnimationFrame for non-immersive sessions - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRSession requestAnimationFrame callbacks can be unregistered with cancelAnimationFrame for non-immersive sessions - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/xrSession_cancelAnimationFrame_invalidhandle.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/xrSession_cancelAnimationFrame_invalidhandle.https.html.ini index 13a5a6a..0b14962 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/xrSession_cancelAnimationFrame_invalidhandle.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/xrSession_cancelAnimationFrame_invalidhandle.https.html.ini
@@ -1,16 +1,20 @@ [xrSession_cancelAnimationFrame_invalidhandle.https.html] [XRSession cancelAnimationFrame does not have unexpected behavior when given invalid handles on immersive testSession - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRSession cancelAnimationFrame does not have unexpected behavior when given invalid handles on immersive testSession - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRSession cancelAnimationFrame does not have unexpected behavior when given invalid handles on non-immersive testSession - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRSession cancelAnimationFrame does not have unexpected behavior when given invalid handles on non-immersive testSession - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/xrSession_enabledFeatures.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/xrSession_enabledFeatures.https.html.ini index f337bf4..4145c8aa8 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/xrSession_enabledFeatures.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/xrSession_enabledFeatures.https.html.ini
@@ -1,8 +1,10 @@ [xrSession_enabledFeatures.https.html] [Validate enabledFeatures on XRSession - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Validate enabledFeatures on XRSession - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/xrSession_end.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/xrSession_end.https.html.ini index 5ca5c59..866b99b 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/xrSession_end.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/xrSession_end.https.html.ini
@@ -1,16 +1,20 @@ [xrSession_end.https.html] [end event fires when immersive session ends - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [end event fires when immersive session ends - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [end event fires when non-immersive session ends - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [end event fires when non-immersive session ends - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/xrSession_input_events_end.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/xrSession_input_events_end.https.html.ini index f7c09c7..275b209 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/xrSession_input_events_end.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/xrSession_input_events_end.https.html.ini
@@ -1,8 +1,10 @@ [xrSession_input_events_end.https.html] [Calling end during an input callback stops processing at the right time - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Calling end during an input callback stops processing at the right time - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/xrSession_requestAnimationFrame_callback_calls.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/xrSession_requestAnimationFrame_callback_calls.https.html.ini index 2e82b0d..d311d40 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/xrSession_requestAnimationFrame_callback_calls.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/xrSession_requestAnimationFrame_callback_calls.https.html.ini
@@ -1,16 +1,20 @@ [xrSession_requestAnimationFrame_callback_calls.https.html] [XRSession requestAnimationFrame calls the provided callback a non-immersive session - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRSession requestAnimationFrame calls the provided callback a non-immersive session - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRSession requestAnimationFrame calls the provided callback for an immersive session - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRSession requestAnimationFrame calls the provided callback for an immersive session - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/xrSession_requestAnimationFrame_data_valid.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/xrSession_requestAnimationFrame_data_valid.https.html.ini index abde8c9..8a2471a 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/xrSession_requestAnimationFrame_data_valid.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/xrSession_requestAnimationFrame_data_valid.https.html.ini
@@ -1,8 +1,10 @@ [xrSession_requestAnimationFrame_data_valid.https.html] [RequestAnimationFrame resolves with good data - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [RequestAnimationFrame resolves with good data - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/xrSession_requestAnimationFrame_getViewerPose.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/xrSession_requestAnimationFrame_getViewerPose.https.html.ini index 0c0e02e..25e7901 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/xrSession_requestAnimationFrame_getViewerPose.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/xrSession_requestAnimationFrame_getViewerPose.https.html.ini
@@ -1,15 +1,18 @@ [xrSession_requestAnimationFrame_getViewerPose.https.html] [XRFrame getViewerPose updates on the next frame for immersive sessions - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRFrame getViewerPose updates on the next frame for immersive sessions - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRFrame getViewerPose updates on the next frame for non-immersive sessions - webgl] expected: FAIL [XRFrame getViewerPose updates on the next frame for non-immersive sessions - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/xrSession_requestAnimationFrame_timestamp.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/xrSession_requestAnimationFrame_timestamp.https.html.ini index 30a869bd..e217ecd 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/xrSession_requestAnimationFrame_timestamp.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/xrSession_requestAnimationFrame_timestamp.https.html.ini
@@ -1,16 +1,20 @@ [xrSession_requestAnimationFrame_timestamp.https.html] [XRFrame getViewerPose updates on the next frame for immersive - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRFrame getViewerPose updates on the next frame for immersive - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRFrame getViewerPose updates on the next frame for non-immersive - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRFrame getViewerPose updates on the next frame for non-immersive - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/xrSession_requestReferenceSpace.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/xrSession_requestReferenceSpace.https.html.ini index 46863d8d..debb9ac 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/xrSession_requestReferenceSpace.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/xrSession_requestReferenceSpace.https.html.ini
@@ -1,16 +1,20 @@ [xrSession_requestReferenceSpace.https.html] [Immersive XRSession requestReferenceSpace returns expected objects - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Immersive XRSession requestReferenceSpace returns expected objects - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Non-immersive XRSession requestReferenceSpace returns expected objects - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Non-immersive XRSession requestReferenceSpace returns expected objects - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/xrSession_requestReferenceSpace_features.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/xrSession_requestReferenceSpace_features.https.html.ini index bf5fa38..00daae0 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/xrSession_requestReferenceSpace_features.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/xrSession_requestReferenceSpace_features.https.html.ini
@@ -3,117 +3,141 @@ if (product == "content_shell") and (os == "mac") and (port == "mac12"): TIMEOUT [Immersive session rejects local-floor space if not requested - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Immersive session rejects local-floor space if not requested - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Immersive session supports local space by default - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Immersive session supports local space by default - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): [FAIL, PASS] [PASS, FAIL] [Immersive session supports local-floor space when optional - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): [FAIL, PASS] [PASS, FAIL] [Immersive session supports local-floor space when optional - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): [FAIL, PASS] [PASS, FAIL] [Immersive session supports local-floor space when required - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): [FAIL, PASS] [PASS, FAIL] [Immersive session supports local-floor space when required - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): [FAIL, PASS] [PASS, FAIL] [Immersive session supports viewer space by default - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): [FAIL, PASS] [PASS, FAIL] [Immersive session supports viewer space by default - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): [FAIL, PASS] [PASS, FAIL] [Non-immersive session rejects bounded-floor space even when requested - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): [FAIL, PASS] [PASS, FAIL] [Non-immersive session rejects bounded-floor space even when requested - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): [FAIL, PASS] [PASS, FAIL] [Non-immersive session rejects local space if not requested - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): [FAIL, PASS] [PASS, FAIL] [Non-immersive session rejects local space if not requested - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): [FAIL, PASS] [PASS, FAIL] [Non-immersive session rejects unbounded space even when requested - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): [FAIL, PASS] [PASS, FAIL] [Non-immersive session rejects unbounded space even when requested - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): [FAIL, PASS] [PASS, FAIL] [Non-immersive session supports local space when optional - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): [FAIL, PASS] [PASS, FAIL] [Non-immersive session supports local space when optional - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): [FAIL, PASS] [PASS, FAIL] [Non-immersive session supports local space when required - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): [FAIL, PASS] [PASS, FAIL] [Non-immersive session supports local space when required - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): [FAIL, PASS] [PASS, FAIL] [Non-immersive session supports local-floor space when required - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): [FAIL, PASS] [PASS, FAIL] [Non-immersive session supports local-floor space when required - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): [FAIL, PASS] [PASS, FAIL] [Non-immersive session supports viewer space by default - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): [FAIL, PASS] [PASS, FAIL] [Non-immersive session supports viewer space by default - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): [FAIL, PASS] [PASS, FAIL]
diff --git a/third_party/blink/web_tests/external/wpt/webxr/xrSession_requestSessionDuringEnd.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/xrSession_requestSessionDuringEnd.https.html.ini index fe9cf4e..71f627f 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/xrSession_requestSessionDuringEnd.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/xrSession_requestSessionDuringEnd.https.html.ini
@@ -1,16 +1,20 @@ [xrSession_requestSessionDuringEnd.https.html] [Create mew session in end promise - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Create mew session in end promise - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Create new session in OnSessionEnded event - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Create new session in OnSessionEnded event - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/xrSession_sameObject.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/xrSession_sameObject.https.html.ini index bfb3728..4813784 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/xrSession_sameObject.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/xrSession_sameObject.https.html.ini
@@ -1,8 +1,10 @@ [xrSession_sameObject.https.html] [XRSession attributes meet [SameObject\] requirement - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRSession attributes meet [SameObject\] requirement - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/xrSession_viewer_referenceSpace.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/xrSession_viewer_referenceSpace.https.html.ini index b56e330..894b3f4b 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/xrSession_viewer_referenceSpace.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/xrSession_viewer_referenceSpace.https.html.ini
@@ -1,16 +1,20 @@ [xrSession_viewer_referenceSpace.https.html] [Identity reference space provides correct poses for immersive sessions - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Identity reference space provides correct poses for immersive sessions - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Identity reference space provides correct poses for inline sessions - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Identity reference space provides correct poses for inline sessions - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/xrSession_visibilityState.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/xrSession_visibilityState.https.html.ini index 203208e..4daeb9940 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/xrSession_visibilityState.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/xrSession_visibilityState.https.html.ini
@@ -1,8 +1,10 @@ [xrSession_visibilityState.https.html] [Ensures that the XRSession's visibilityState is correctly reported and that the associated visibilitychange event fires. - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Ensures that the XRSession's visibilityState is correctly reported and that the associated visibilitychange event fires. - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/xrStationaryReferenceSpace_floorlevel_updates.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/xrStationaryReferenceSpace_floorlevel_updates.https.html.ini index 917af6ef..4ca56e2 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/xrStationaryReferenceSpace_floorlevel_updates.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/xrStationaryReferenceSpace_floorlevel_updates.https.html.ini
@@ -1,16 +1,20 @@ [xrStationaryReferenceSpace_floorlevel_updates.https.html] ['floor-level' XRStationaryReferenceSpace updates properly when the transform changes for immersive sessions - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL ['floor-level' XRStationaryReferenceSpace updates properly when the transform changes for immersive sessions - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL ['floor-level' XRStationaryReferenceSpace updates properly when the transform changes for non-immersive sessions - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL ['floor-level' XRStationaryReferenceSpace updates properly when the transform changes for non-immersive sessions - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/xrView_eyes.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/xrView_eyes.https.html.ini index 629772e0..34ca3b7 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/xrView_eyes.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/xrView_eyes.https.html.ini
@@ -1,16 +1,20 @@ [xrView_eyes.https.html] [XRView.eye is correct for immersive sessions - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRView.eye is correct for immersive sessions - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRView.eye is correct for non-immersive sessions - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRView.eye is correct for non-immersive sessions - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/xrView_match.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/xrView_match.https.html.ini index 2136648..ebe90cd 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/xrView_match.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/xrView_match.https.html.ini
@@ -1,8 +1,10 @@ [xrView_match.https.html] [XRFrame contains the expected views - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRFrame contains the expected views - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/xrView_oneframeupdate.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/xrView_oneframeupdate.https.html.ini index 9d9beea..625875c 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/xrView_oneframeupdate.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/xrView_oneframeupdate.https.html.ini
@@ -1,8 +1,10 @@ [xrView_oneframeupdate.https.html] [XRView projection matrices update near and far depths on the next frame - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRView projection matrices update near and far depths on the next frame - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/xrView_sameObject.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/xrView_sameObject.https.html.ini index 6a79ecc..0900d47 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/xrView_sameObject.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/xrView_sameObject.https.html.ini
@@ -1,8 +1,10 @@ [xrView_sameObject.https.html] [XRView attributes meet [SameObject\] requirement - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRView attributes meet [SameObject\] requirement - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/xrViewerPose_secondaryViews.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/xrViewerPose_secondaryViews.https.html.ini index 0cf38b7..9e72af7 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/xrViewerPose_secondaryViews.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/xrViewerPose_secondaryViews.https.html.ini
@@ -1,32 +1,40 @@ [xrViewerPose_secondaryViews.https.html] [Only primary views are returned if secondary views are not requested for immersive - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Only primary views are returned if secondary views are not requested for immersive - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Only primary views are returned if secondary views are not requested for non-immersive - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Only primary views are returned if secondary views are not requested for non-immersive - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Requesting secondary views only returns primary views for non-immersive - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Requesting secondary views only returns primary views for non-immersive - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Requesting secondary views returns both primary and secondary views for immersive - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Requesting secondary views returns both primary and secondary views for immersive - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/xrViewerPose_views_sameObject.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/xrViewerPose_views_sameObject.https.html.ini index dff3bd9..d4d19c52 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/xrViewerPose_views_sameObject.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/xrViewerPose_views_sameObject.https.html.ini
@@ -1,8 +1,10 @@ [xrViewerPose_views_sameObject.https.html] [XRViewerPose.views meets [SameObject\] requirement - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRViewerPose.views meets [SameObject\] requirement - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/xrViewport_valid.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/xrViewport_valid.https.html.ini index 14206f6..de350c7f 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/xrViewport_valid.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/xrViewport_valid.https.html.ini
@@ -1,16 +1,20 @@ [xrViewport_valid.https.html] [XRViewport attributes are valid - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRViewport attributes are valid - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRViewport attributes are valid with secondary views requested - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRViewport attributes are valid with secondary views requested - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/xrWebGLLayer_constructor.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/xrWebGLLayer_constructor.https.html.ini index 78362cd..63c8a6f1 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/xrWebGLLayer_constructor.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/xrWebGLLayer_constructor.https.html.ini
@@ -1,8 +1,10 @@ [xrWebGLLayer_constructor.https.html] [Ensure that XRWebGLLayer's constructor throws appropriate errors using webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Ensure that XRWebGLLayer's constructor throws appropriate errors using webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/xrWebGLLayer_framebuffer_draw.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/xrWebGLLayer_framebuffer_draw.https.html.ini index d464403..516fc93 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/xrWebGLLayer_framebuffer_draw.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/xrWebGLLayer_framebuffer_draw.https.html.ini
@@ -1,8 +1,10 @@ [xrWebGLLayer_framebuffer_draw.https.html] [Ensure a WebGL layer's framebuffer can only be drawn to inside a XR frame - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Ensure a WebGL layer's framebuffer can only be drawn to inside a XR frame - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/xrWebGLLayer_framebuffer_sameObject.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/xrWebGLLayer_framebuffer_sameObject.https.html.ini index c24b054..f1428e0 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/xrWebGLLayer_framebuffer_sameObject.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/xrWebGLLayer_framebuffer_sameObject.https.html.ini
@@ -1,8 +1,10 @@ [xrWebGLLayer_framebuffer_sameObject.https.html] [XRWebGLLayer.framebuffer meets [SameObject\] requirement - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRWebGLLayer.framebuffer meets [SameObject\] requirement - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/xrWebGLLayer_framebuffer_scale.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/xrWebGLLayer_framebuffer_scale.https.html.ini index f89555d..bcd2012 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/xrWebGLLayer_framebuffer_scale.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/xrWebGLLayer_framebuffer_scale.https.html.ini
@@ -1,8 +1,10 @@ [xrWebGLLayer_framebuffer_scale.https.html] [Ensure framebuffer scaling works as expected. - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Ensure framebuffer scaling works as expected. - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/xrWebGLLayer_opaque_framebuffer.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/xrWebGLLayer_opaque_framebuffer.https.html.ini index 6c894cf..666c7ee 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/xrWebGLLayer_opaque_framebuffer.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/xrWebGLLayer_opaque_framebuffer.https.html.ini
@@ -1,16 +1,20 @@ [xrWebGLLayer_opaque_framebuffer.https.html] [Ensure that the framebuffer given by the WebGL layer is opaque for immersive - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Ensure that the framebuffer given by the WebGL layer is opaque for immersive - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Ensure that the framebuffer given by the WebGL layer is opaque for non-immersive - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Ensure that the framebuffer given by the WebGL layer is opaque for non-immersive - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/xrWebGLLayer_opaque_framebuffer_stencil.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/xrWebGLLayer_opaque_framebuffer_stencil.https.html.ini index 598ae0b..13f5186 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/xrWebGLLayer_opaque_framebuffer_stencil.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/xrWebGLLayer_opaque_framebuffer_stencil.https.html.ini
@@ -1,8 +1,10 @@ [xrWebGLLayer_opaque_framebuffer_stencil.https.html] [Ensure that the framebuffer given by the WebGL layer works with stencil for immersive - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Ensure that the framebuffer given by the WebGL layer works with stencil for immersive - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/xrWebGLLayer_viewports.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/xrWebGLLayer_viewports.https.html.ini index a2a7abc7..394938a 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/xrWebGLLayer_viewports.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/xrWebGLLayer_viewports.https.html.ini
@@ -1,32 +1,40 @@ [xrWebGLLayer_viewports.https.html] [XRWebGLLayer reports a valid viewports for immersive sessions - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRWebGLLayer reports a valid viewports for immersive sessions - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRWebGLLayer reports a valid viewports for immersive sessions with secondary views requested - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRWebGLLayer reports a valid viewports for immersive sessions with secondary views requested - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRWebGLLayer reports a valid viewports for inline sessions - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRWebGLLayer reports a valid viewports for inline sessions - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRWebGLLayer reports a valid viewports for inline sessions with secondary views requested - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRWebGLLayer reports a valid viewports for inline sessions with secondary views requested - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/webxr/xr_viewport_scale.https.html.ini b/third_party/blink/web_tests/external/wpt/webxr/xr_viewport_scale.https.html.ini index 96be9aa..970383d5 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/xr_viewport_scale.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webxr/xr_viewport_scale.https.html.ini
@@ -1,153 +1,186 @@ [xr_viewport_scale.https.html] expected: - if (product == "content_shell") and (os == "win") and (port == "win11"): OK if (product == "content_shell") and (os == "win") and (port == "win10.20h2"): [OK, TIMEOUT] - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): OK if (product == "content_shell") and (os == "mac") and (port == "mac13"): TIMEOUT + if (product == "content_shell") and (os == "mac") and (port == "mac12"): [TIMEOUT, OK] + if (product == "content_shell") and (os == "mac") and (port == "mac11"): [TIMEOUT, OK] + if (product == "content_shell") and (os == "mac") and (port == "mac10.15"): [TIMEOUT, OK] if (product == "content_shell") and (os == "linux") and (flag_specific == "disable-site-isolation-trials"): [OK, TIMEOUT] - if (product == "content_shell") and (os == "linux") and (flag_specific == ""): OK - [TIMEOUT, OK] + if product == "chrome": [TIMEOUT, OK] [recommendedViewportScale for immersive-vr session - webgl] expected: if (product == "content_shell") and (os == "win") and (port == "win10.20h2"): [NOTRUN, TIMEOUT, PRECONDITION_FAILED] - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL if product == "chrome": [NOTRUN, TIMEOUT, PRECONDITION_FAILED] PRECONDITION_FAILED [recommendedViewportScale for immersive-vr session - webgl2] expected: if (product == "content_shell") and (os == "win") and (port == "win10.20h2"): [TIMEOUT, PRECONDITION_FAILED, NOTRUN] - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL if product == "chrome": [TIMEOUT, NOTRUN, PRECONDITION_FAILED] PRECONDITION_FAILED [recommendedViewportScale for inline session - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL PRECONDITION_FAILED [recommendedViewportScale for inline session - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL PRECONDITION_FAILED [requestViewportScale applied next frame for immersive-vr session - webgl] expected: if (product == "content_shell") and (os == "win") and (port == "win10.20h2"): [PASS, NOTRUN] - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL if product == "chrome": [PASS, NOTRUN] [requestViewportScale applied next frame for immersive-vr session - webgl2] expected: if (product == "content_shell") and (os == "win") and (port == "win10.20h2"): [PASS, TIMEOUT, NOTRUN] - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL if product == "chrome": [PASS, TIMEOUT, NOTRUN] [requestViewportScale applied next frame for inline session - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL PRECONDITION_FAILED [requestViewportScale applied next frame for inline session - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL PRECONDITION_FAILED [requestViewportScale same frame for immersive-vr session - webgl] expected: if (product == "content_shell") and (os == "win") and (port == "win10.20h2"): [PASS, NOTRUN] - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL if product == "chrome": [PASS, NOTRUN] [requestViewportScale same frame for immersive-vr session - webgl2] expected: if (product == "content_shell") and (os == "win") and (port == "win10.20h2"): [PASS, NOTRUN] - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL if product == "chrome": [PASS, NOTRUN] [requestViewportScale same frame for inline session - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL PRECONDITION_FAILED [requestViewportScale same frame for inline session - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL PRECONDITION_FAILED [requestViewportScale valid viewport for immersive-vr session - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [requestViewportScale valid viewport for immersive-vr session - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [requestViewportScale valid viewport for inline session - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [requestViewportScale valid viewport for inline session - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [requestViewportScale valid viewport w/ null scale for immersive-vr session - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [requestViewportScale valid viewport w/ null scale for immersive-vr session - webgl2] expected: if (product == "content_shell") and (os == "win") and (port == "win10.20h2"): [PASS, TIMEOUT] - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac10.15"): [PASS, TIMEOUT] if product == "chrome": [PASS, TIMEOUT] [requestViewportScale valid viewport w/ null scale for inline session - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [requestViewportScale valid viewport w/ null scale for inline session - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [requestViewportScale valid viewport w/ undefined scale for immersive-vr session - webgl] expected: if (product == "content_shell") and (os == "win") and (port == "win10.20h2"): [PASS, NOTRUN] - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac10.15"): [PASS, NOTRUN] if product == "chrome": [PASS, NOTRUN] [requestViewportScale valid viewport w/ undefined scale for immersive-vr session - webgl2] expected: if (product == "content_shell") and (os == "win") and (port == "win10.20h2"): [PASS, NOTRUN] - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac10.15"): [PASS, NOTRUN] if (product == "content_shell") and (os == "linux") and (flag_specific == "disable-site-isolation-trials"): [PASS, NOTRUN] if product == "chrome": [PASS, NOTRUN] [requestViewportScale valid viewport w/ undefined scale for inline session - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [requestViewportScale valid viewport w/ undefined scale for inline session - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [requestViewportScale valid viewport w/ very small scale for immersive-vr session - webgl] expected: if (product == "content_shell") and (os == "win") and (port == "win10.20h2"): [PASS, NOTRUN] - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac10.15"): [PASS, NOTRUN] if (product == "content_shell") and (os == "linux") and (flag_specific == "disable-site-isolation-trials"): [PASS, NOTRUN] if product == "chrome": [PASS, NOTRUN] [requestViewportScale valid viewport w/ very small scale for immersive-vr session - webgl2] expected: if (product == "content_shell") and (os == "win") and (port == "win10.20h2"): [PASS, NOTRUN] - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac10.15"): [PASS, NOTRUN] if (product == "content_shell") and (os == "linux") and (flag_specific == "disable-site-isolation-trials"): [PASS, NOTRUN] if product == "chrome": [PASS, NOTRUN] [requestViewportScale valid viewport w/ very small scale for inline session - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [requestViewportScale valid viewport w/ very small scale for inline session - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/fast/selectors/selection-window-inactive-expected.html b/third_party/blink/web_tests/fast/selectors/selection-window-inactive-expected.html index 6816d18..f74b5bd 100644 --- a/third_party/blink/web_tests/fast/selectors/selection-window-inactive-expected.html +++ b/third_party/blink/web_tests/fast/selectors/selection-window-inactive-expected.html
@@ -1,8 +1,12 @@ <!DOCTYPE html> <style> -span { +::selection { background-color: rgba(63, 128, 33, 0.95); color: black; } </style> <span>Any textual selection in this sentence should have a green background when the window is inactive.</span> +<script> +var span = document.querySelector("span"); +window.getSelection().setBaseAndExtent(span, 0, span, 1); +</script>
diff --git a/third_party/blink/web_tests/fast/selectors/selection-window-inactive.html b/third_party/blink/web_tests/fast/selectors/selection-window-inactive.html index d880f9b..e5a2fbb 100644 --- a/third_party/blink/web_tests/fast/selectors/selection-window-inactive.html +++ b/third_party/blink/web_tests/fast/selectors/selection-window-inactive.html
@@ -1,4 +1,5 @@ <!DOCTYPE html> +<script src="../../resources/run-after-layout-and-paint.js"></script> <style> ::selection { background-color: blue; @@ -11,8 +12,18 @@ </style> <span>Any textual selection in this sentence should have a green background when the window is inactive.</span> <script> -var span = document.querySelector("span"); -window.getSelection().setBaseAndExtent(span, 0, span, 1); -if (window.testRunner) - testRunner.setWindowFocus(false); +if (window.testRunner) { + testRunner.waitUntilDone(); +} +onload = function() { + var span = document.querySelector("span"); + window.getSelection().setBaseAndExtent(span, 0, span, 1); + + runAfterLayoutAndPaint(function() { + if (window.testRunner) + testRunner.setWindowFocus(false); + runAfterLayoutAndPaint(function() { + }, true); + }, false); +} </script>
diff --git a/third_party/blink/web_tests/wpt_internal/webxr/ar/ar_anchor_getAnchors_null.https.html.ini b/third_party/blink/web_tests/wpt_internal/webxr/ar/ar_anchor_getAnchors_null.https.html.ini index 6a90baaa..bde13a6 100644 --- a/third_party/blink/web_tests/wpt_internal/webxr/ar/ar_anchor_getAnchors_null.https.html.ini +++ b/third_party/blink/web_tests/wpt_internal/webxr/ar/ar_anchor_getAnchors_null.https.html.ini
@@ -1,8 +1,10 @@ [ar_anchor_getAnchors_null.https.html] [XRFrame's trackedAnchors is empty when the feature was requested & device returned null anchorsData - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRFrame's trackedAnchors is empty when the feature was requested & device returned null anchorsData - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/wpt_internal/webxr/ar/ar_hittestsource_lifetimes.https.html.ini b/third_party/blink/web_tests/wpt_internal/webxr/ar/ar_hittestsource_lifetimes.https.html.ini index 9b9ee9c2..0e8db89 100644 --- a/third_party/blink/web_tests/wpt_internal/webxr/ar/ar_hittestsource_lifetimes.https.html.ini +++ b/third_party/blink/web_tests/wpt_internal/webxr/ar/ar_hittestsource_lifetimes.https.html.ini
@@ -1,32 +1,40 @@ [ar_hittestsource_lifetimes.https.html] [Ensures hit test source cancellation propagates to the device when manually cancelled. - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Ensures hit test source cancellation propagates to the device when manually cancelled. - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Ensures hit test source cancellation propagates to the device when relying on GC - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Ensures hit test source cancellation propagates to the device when relying on GC - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Ensures transient input hit test source cancellation propagates to the device when manually cancelled. - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Ensures transient input hit test source cancellation propagates to the device when manually cancelled. - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Ensures transient input hit test source cancellation propagates to the device when relying on GC - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Ensures transient input hit test source cancellation propagates to the device when relying on GC - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/wpt_internal/webxr/ar/ar_light_estimation.https.html.ini b/third_party/blink/web_tests/wpt_internal/webxr/ar/ar_light_estimation.https.html.ini index 14c3700..491f26e7 100644 --- a/third_party/blink/web_tests/wpt_internal/webxr/ar/ar_light_estimation.https.html.ini +++ b/third_party/blink/web_tests/wpt_internal/webxr/ar/ar_light_estimation.https.html.ini
@@ -1,16 +1,20 @@ [ar_light_estimation.https.html] [Ensure lighting estimation feature does not work when not explicitly enabled - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Ensure lighting estimation feature does not work when not explicitly enabled - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Ensures lighting estimation feature works when enabled - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Ensures lighting estimation feature works when enabled - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/wpt_internal/webxr/render_state_vertical_fov_inline.https.html.ini b/third_party/blink/web_tests/wpt_internal/webxr/render_state_vertical_fov_inline.https.html.ini index fae5c93..371bb190 100644 --- a/third_party/blink/web_tests/wpt_internal/webxr/render_state_vertical_fov_inline.https.html.ini +++ b/third_party/blink/web_tests/wpt_internal/webxr/render_state_vertical_fov_inline.https.html.ini
@@ -1,8 +1,10 @@ [render_state_vertical_fov_inline.https.html] [inlineVerticalFieldOfView is set appropriately on inline sessions - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [inlineVerticalFieldOfView is set appropriately on inline sessions - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/wpt_internal/webxr/xrFrame_getPose.https.html.ini b/third_party/blink/web_tests/wpt_internal/webxr/xrFrame_getPose.https.html.ini index b1f394e..6277f22 100644 --- a/third_party/blink/web_tests/wpt_internal/webxr/xrFrame_getPose.https.html.ini +++ b/third_party/blink/web_tests/wpt_internal/webxr/xrFrame_getPose.https.html.ini
@@ -1,8 +1,10 @@ [xrFrame_getPose.https.html] [XRFrame.getPose works between eye-level and floor-level spaces - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [XRFrame.getPose works between eye-level and floor-level spaces - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/wpt_internal/webxr/xrSession_dataProviderDisconnect_immersive.https.html.ini b/third_party/blink/web_tests/wpt_internal/webxr/xrSession_dataProviderDisconnect_immersive.https.html.ini index bb73acc..e354ba4 100644 --- a/third_party/blink/web_tests/wpt_internal/webxr/xrSession_dataProviderDisconnect_immersive.https.html.ini +++ b/third_party/blink/web_tests/wpt_internal/webxr/xrSession_dataProviderDisconnect_immersive.https.html.ini
@@ -1,8 +1,10 @@ [xrSession_dataProviderDisconnect_immersive.https.html] [Immersive session ends if data provider disconnects. - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Immersive session ends if data provider disconnects. - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/wpt_internal/webxr/xrSession_dataProviderDisconnect_inline.https.html.ini b/third_party/blink/web_tests/wpt_internal/webxr/xrSession_dataProviderDisconnect_inline.https.html.ini index 92dd9b2..2630c64 100644 --- a/third_party/blink/web_tests/wpt_internal/webxr/xrSession_dataProviderDisconnect_inline.https.html.ini +++ b/third_party/blink/web_tests/wpt_internal/webxr/xrSession_dataProviderDisconnect_inline.https.html.ini
@@ -1,8 +1,10 @@ [xrSession_dataProviderDisconnect_inline.https.html] [Inline session ends if magic window data provider disconnects. - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Inline session ends if magic window data provider disconnects. - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/wpt_internal/webxr/xrSession_environmentBlendMode.https.html.ini b/third_party/blink/web_tests/wpt_internal/webxr/xrSession_environmentBlendMode.https.html.ini index 1dc14d86..02f14ae 100644 --- a/third_party/blink/web_tests/wpt_internal/webxr/xrSession_environmentBlendMode.https.html.ini +++ b/third_party/blink/web_tests/wpt_internal/webxr/xrSession_environmentBlendMode.https.html.ini
@@ -1,16 +1,20 @@ [xrSession_environmentBlendMode.https.html] [environmentBlendMode is correct for a VR device in immersive - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [environmentBlendMode is correct for a VR device in immersive - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [environmentBlendMode is correct for a VR device in non-immersive - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [environmentBlendMode is correct for a VR device in non-immersive - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/wpt_internal/webxr/xrSession_environmentProviderDisconnect.https.html.ini b/third_party/blink/web_tests/wpt_internal/webxr/xrSession_environmentProviderDisconnect.https.html.ini index 785c00db..c66b84c 100644 --- a/third_party/blink/web_tests/wpt_internal/webxr/xrSession_environmentProviderDisconnect.https.html.ini +++ b/third_party/blink/web_tests/wpt_internal/webxr/xrSession_environmentProviderDisconnect.https.html.ini
@@ -1,8 +1,10 @@ [xrSession_environmentProviderDisconnect.https.html] [Outstanding promises get rejected if environmentProvider disconnects - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Outstanding promises get rejected if environmentProvider disconnects - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/wpt_internal/webxr/xrSession_framesThrottled.https.html.ini b/third_party/blink/web_tests/wpt_internal/webxr/xrSession_framesThrottled.https.html.ini index 7ac4932..beaecfc1 100644 --- a/third_party/blink/web_tests/wpt_internal/webxr/xrSession_framesThrottled.https.html.ini +++ b/third_party/blink/web_tests/wpt_internal/webxr/xrSession_framesThrottled.https.html.ini
@@ -1,8 +1,10 @@ [xrSession_framesThrottled.https.html] [Blink appropriately reports when frames are throttled - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [Blink appropriately reports when frames are throttled - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/wpt_internal/webxr/xrWebGLLayer_dirty_framebuffer.https.html.ini b/third_party/blink/web_tests/wpt_internal/webxr/xrWebGLLayer_dirty_framebuffer.https.html.ini index e36f815d..0c4d3f0 100644 --- a/third_party/blink/web_tests/wpt_internal/webxr/xrWebGLLayer_dirty_framebuffer.https.html.ini +++ b/third_party/blink/web_tests/wpt_internal/webxr/xrWebGLLayer_dirty_framebuffer.https.html.ini
@@ -1,8 +1,10 @@ [xrWebGLLayer_dirty_framebuffer.https.html] [A frame should be submitted if the base layer was written to during requestAnimationFrame - webgl] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL [A frame should be submitted if the base layer was written to during requestAnimationFrame - webgl2] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/blink/web_tests/wpt_internal/webxr/xr_view_projection_detached.https.html.ini b/third_party/blink/web_tests/wpt_internal/webxr/xr_view_projection_detached.https.html.ini index 8e771ff2..d3db1e0 100644 --- a/third_party/blink/web_tests/wpt_internal/webxr/xr_view_projection_detached.https.html.ini +++ b/third_party/blink/web_tests/wpt_internal/webxr/xr_view_projection_detached.https.html.ini
@@ -1,4 +1,5 @@ [xr_view_projection_detached.https.html] [Test that xrview.projection being detached doesn't cause a crash.] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac11-arm64"): FAIL
diff --git a/third_party/chromite b/third_party/chromite index 1bed66f..de31ec1 160000 --- a/third_party/chromite +++ b/third_party/chromite
@@ -1 +1 @@ -Subproject commit 1bed66f42f424d8bcab90f4bedc39d922492e2d3 +Subproject commit de31ec113475ca2a9323fa584b1d49eeeb42563a
diff --git a/third_party/closure_compiler/externs/accessibility_private.js b/third_party/closure_compiler/externs/accessibility_private.js index 75420a4..b739273 100644 --- a/third_party/closure_compiler/externs/accessibility_private.js +++ b/third_party/closure_compiler/externs/accessibility_private.js
@@ -545,6 +545,13 @@ chrome.accessibilityPrivate.setSelectToSpeakState = function(state) {}; /** + * Called by the Select-to-Speak extension to request a clipboard copy in the + * active Lacros Google Docs tab for the copy-paste fallback. + * @param {string} url URL of the Google Docs tab. + */ +chrome.accessibilityPrivate.clipboardCopyInActiveLacrosGoogleDoc = function(url) {}; + +/** * Called by the Accessibility Common extension when * onScrollableBoundsForPointRequested has found a scrolling container. |rect| * will be the bounds of the nearest scrollable ancestor of the node at the
diff --git a/third_party/dawn b/third_party/dawn index f67a4b3..39aef37 160000 --- a/third_party/dawn +++ b/third_party/dawn
@@ -1 +1 @@ -Subproject commit f67a4b3311d966077996a33a1152111cffe94431 +Subproject commit 39aef37759a479717fd40edb1069f230d15236bf
diff --git a/third_party/devtools-frontend-internal b/third_party/devtools-frontend-internal index 403ea0c..88a8222 160000 --- a/third_party/devtools-frontend-internal +++ b/third_party/devtools-frontend-internal
@@ -1 +1 @@ -Subproject commit 403ea0c7874ee42f06bedbf86a258f57fbe817dd +Subproject commit 88a822273e94788edfe19d912122565cc7e8b2d1
diff --git a/third_party/devtools-frontend/src b/third_party/devtools-frontend/src index df5e9ff..cba3d1f 160000 --- a/third_party/devtools-frontend/src +++ b/third_party/devtools-frontend/src
@@ -1 +1 @@ -Subproject commit df5e9ffed2b0afa906d7169d24dc1250762314a4 +Subproject commit cba3d1f0b8f005be884136dd1015c455789ec590
diff --git a/third_party/pdfium b/third_party/pdfium index 1dc2fc9..e473197 160000 --- a/third_party/pdfium +++ b/third_party/pdfium
@@ -1 +1 @@ -Subproject commit 1dc2fc9894094165089a60b2fb75164e592bcb8c +Subproject commit e47319725ba84de9bea195de31c7751b5fd20364
diff --git a/third_party/perfetto b/third_party/perfetto index 90f8e7c..49ef5c5 160000 --- a/third_party/perfetto +++ b/third_party/perfetto
@@ -1 +1 @@ -Subproject commit 90f8e7ccdd9d1c2b32bf6cf9d0accc2cd5e41e96 +Subproject commit 49ef5c5916fc1304549b681a1129a7a85c82db9f
diff --git a/third_party/private_membership/OWNERS b/third_party/private_membership/OWNERS index b3e13a4..bc3564dc1 100644 --- a/third_party/private_membership/OWNERS +++ b/third_party/private_membership/OWNERS
@@ -1,2 +1,3 @@ amraboelkher@chromium.org -kwlyeo@chromium.org +sergiyb@chromium.org +igorcov@chromium.org
diff --git a/third_party/skia b/third_party/skia index 322abac..f0912b2 160000 --- a/third_party/skia +++ b/third_party/skia
@@ -1 +1 @@ -Subproject commit 322abacca561b5c81c1950213a04676d05c8e68f +Subproject commit f0912b21daf21ac010a5999092a2b63896e5f726
diff --git a/third_party/webgpu-cts/src b/third_party/webgpu-cts/src index b1a998f..c295665 160000 --- a/third_party/webgpu-cts/src +++ b/third_party/webgpu-cts/src
@@ -1 +1 @@ -Subproject commit b1a998fade8e8689acf1e700baf8a7245a0d58c1 +Subproject commit c2956655378dc2f27ba8e5b5f84cac1f73df3c45
diff --git a/third_party/webrtc b/third_party/webrtc index e887cbe..e3e030e 160000 --- a/third_party/webrtc +++ b/third_party/webrtc
@@ -1 +1 @@ -Subproject commit e887cbefa32dddb30bed30930e9fddc0df0244ff +Subproject commit e3e030e54e96d7934dc70428b9fc7cf412c4c748
diff --git a/tools/gritsettings/resource_ids.spec b/tools/gritsettings/resource_ids.spec index 1f99aac..34aeda7e 100644 --- a/tools/gritsettings/resource_ids.spec +++ b/tools/gritsettings/resource_ids.spec
@@ -386,6 +386,10 @@ "META": {"sizes": {"includes": [20],}}, "includes": [3680], }, + "<(SHARED_INTERMEDIATE_DIR)/chrome/browser/resources/side_panel/performance_controls/resources.grd": { + "META": {"sizes": {"includes": [20],}}, + "includes": [3690], + }, "<(SHARED_INTERMEDIATE_DIR)/chrome/browser/resources/ash/settings/resources.grd": { "META": {"sizes": {"includes": [1000],}}, "includes": [3700],
diff --git a/tools/mb/mb_config.pyl b/tools/mb/mb_config.pyl index e69c1b4d..561af30 100644 --- a/tools/mb/mb_config.pyl +++ b/tools/mb/mb_config.pyl
@@ -1209,6 +1209,7 @@ 'dawn-mac-x64-deps-rel': 'dawn_tests_release_bot_reclient', 'dawn-try-linux-tsan-rel': 'dawn_tests_tsan_release_bot_reclient', 'dawn-try-mac-amd-exp': 'dawn_tests_release_bot_reclient', + 'dawn-try-mac-arm64-deps-rel': 'dawn_tests_arm64_release_bot_reclient', 'dawn-try-mac-arm64-rel': 'dawn_tests_arm64_release_bot_reclient', 'dawn-try-mac-intel-exp': 'dawn_tests_release_bot_reclient', 'dawn-try-win-x64-intel-exp': 'dawn_tests_win_release_bot_reclient', @@ -1233,7 +1234,9 @@ 'fuchsia-compile-x64-dbg': 'debug_bot_fuchsia_compile_only_reclient', 'fuchsia-deterministic-dbg': 'debug_bot_fuchsia_reclient', 'fuchsia-fyi-arm64-dbg': 'debug_bot_fuchsia_arm64_reclient', + 'fuchsia-fyi-x64-asan': 'asan_lsan_bot_fuchsia_reclient', 'fuchsia-fyi-x64-dbg': 'debug_bot_fuchsia_reclient', + 'fuchsia-fyi-x64-dbg-persistent-emulator': 'debug_bot_fuchsia_reclient', 'fuchsia-x64-cast-receiver-rel': 'release_trybot_fuchsia_cast_receiver_reclient', 'fuchsia-x64-cast-receiver-siso-rel': 'release_trybot_fuchsia_cast_receiver_reclient', 'fuchsia-x64-chrome-rel': 'release_trybot_fuchsia_chrome_reclient', @@ -1241,6 +1244,27 @@ 'fuchsia-x64-workstation': 'release_trybot_fuchsia_chrome', }, + 'tryserver.chromium.fuzz': { + 'linux-asan-dbg': 'asan_lsan_debug_bot_reclient', + 'linux-asan-media-rel': 'asan_lsan_fuzzer_v8_heap_chromeos_codecs_release_bot_reclient', + 'linux-asan-media-v8-arm-rel': 'asan_fuzzer_v8_heap_chromeos_codecs_release_bot_hybrid_reclient', + 'linux-asan-rel': 'asan_lsan_fuzzer_v8_heap_release_bot_reclient', + 'linux-asan-v8-arm-dbg': 'asan_v8_heap_debug_bot_hybrid_reclient', + 'linux-asan-v8-arm-rel': 'asan_fuzzer_v8_heap_release_bot_hybrid_reclient', + 'linux-chromeos-asan-rel': 'chromeos_asan_lsan_fuzzer_v8_heap_release_bot_reclient', + 'linux-msan-chained-origins-rel': 'msan_release_bot_reclient', + 'linux-msan-no-origins-rel': 'msan_no_origins_release_bot_reclient', + 'linux-tsan-dbg': 'tsan_disable_nacl_debug_bot_reclient', + 'linux-tsan-rel': 'tsan_disable_nacl_release_bot_reclient', + 'linux-ubsan-rel': 'ubsan_release_bot_reclient', + 'linux-ubsan-vptr-rel': 'ubsan_vptr_release_bot_reclient', + 'mac-asan-media-rel': 'asan_disable_nacl_fuzzer_v8_heap_chrome_with_codecs_release_bot_reclient', + 'mac-asan-rel': 'asan_disable_nacl_fuzzer_v8_heap_release_bot_reclient', + 'win-asan-media-rel': 'asan_fuzzer_v8_heap_chrome_with_codecs_release_bot_reclient', + 'win-asan-rel': 'asan_fuzzer_v8_heap_release_bot_reclient', + + }, + 'tryserver.chromium.linux': { 'cast-binary-size': 'cast_binary_size', 'chromeos-js-code-coverage': 'chromeos_js_coverage_reclient', @@ -4169,8 +4193,7 @@ 'cronet_android_mainline_clang': { 'gn_args': ('clang_base_path = \"//third_party/cronet_android_mainline_clang/linux-amd64\" ' 'clang_use_chrome_plugins=false ' - 'use_lenient_compiler_flags=true ' - 'use_ml_inliner=false ' # https://crbug.com/1468680 + 'llvm_android_mainline=true ' # https://crbug.com/1481060 ), },
diff --git a/tools/mb/mb_config_expectations/chromium.android.json b/tools/mb/mb_config_expectations/chromium.android.json index b67337e4..9a1d2caf 100644 --- a/tools/mb/mb_config_expectations/chromium.android.json +++ b/tools/mb/mb_config_expectations/chromium.android.json
@@ -429,6 +429,7 @@ "is_component_build": false, "is_cronet_build": true, "is_debug": true, + "llvm_android_mainline": true, "media_use_ffmpeg": false, "proprietary_codecs": true, "symbol_level": 1, @@ -436,8 +437,6 @@ "target_os": "android", "use_crash_key_stubs": true, "use_hashed_jni_names": true, - "use_lenient_compiler_flags": true, - "use_ml_inliner": false, "use_partition_alloc": false, "use_platform_icu_alternatives": true, "use_remoteexec": true, @@ -463,6 +462,7 @@ "is_cronet_build": true, "is_debug": false, "is_official_build": true, + "llvm_android_mainline": true, "media_use_ffmpeg": false, "proprietary_codecs": true, "strip_debug_info": true, @@ -471,8 +471,6 @@ "target_os": "android", "use_crash_key_stubs": true, "use_hashed_jni_names": true, - "use_lenient_compiler_flags": true, - "use_ml_inliner": false, "use_partition_alloc": false, "use_platform_icu_alternatives": true, "use_remoteexec": true, @@ -496,6 +494,7 @@ "is_component_build": false, "is_cronet_build": true, "is_debug": true, + "llvm_android_mainline": true, "media_use_ffmpeg": false, "proprietary_codecs": true, "symbol_level": 1, @@ -503,8 +502,6 @@ "target_os": "android", "use_crash_key_stubs": true, "use_hashed_jni_names": true, - "use_lenient_compiler_flags": true, - "use_ml_inliner": false, "use_partition_alloc": false, "use_platform_icu_alternatives": true, "use_remoteexec": true, @@ -530,6 +527,7 @@ "is_cronet_build": true, "is_debug": false, "is_official_build": true, + "llvm_android_mainline": true, "media_use_ffmpeg": false, "proprietary_codecs": true, "strip_debug_info": true, @@ -538,8 +536,6 @@ "target_os": "android", "use_crash_key_stubs": true, "use_hashed_jni_names": true, - "use_lenient_compiler_flags": true, - "use_ml_inliner": false, "use_partition_alloc": false, "use_platform_icu_alternatives": true, "use_remoteexec": true,
diff --git a/tools/mb/mb_config_expectations/tryserver.chromium.android.json b/tools/mb/mb_config_expectations/tryserver.chromium.android.json index 424cc68..4188a92 100644 --- a/tools/mb/mb_config_expectations/tryserver.chromium.android.json +++ b/tools/mb/mb_config_expectations/tryserver.chromium.android.json
@@ -521,6 +521,7 @@ "is_component_build": false, "is_cronet_build": true, "is_debug": true, + "llvm_android_mainline": true, "media_use_ffmpeg": false, "proprietary_codecs": true, "symbol_level": 1, @@ -528,8 +529,6 @@ "target_os": "android", "use_crash_key_stubs": true, "use_hashed_jni_names": true, - "use_lenient_compiler_flags": true, - "use_ml_inliner": false, "use_partition_alloc": false, "use_platform_icu_alternatives": true, "use_remoteexec": true, @@ -555,6 +554,7 @@ "is_cronet_build": true, "is_debug": false, "is_official_build": true, + "llvm_android_mainline": true, "media_use_ffmpeg": false, "proprietary_codecs": true, "strip_debug_info": true, @@ -563,8 +563,6 @@ "target_os": "android", "use_crash_key_stubs": true, "use_hashed_jni_names": true, - "use_lenient_compiler_flags": true, - "use_ml_inliner": false, "use_partition_alloc": false, "use_platform_icu_alternatives": true, "use_remoteexec": true,
diff --git a/tools/mb/mb_config_expectations/tryserver.chromium.dawn.json b/tools/mb/mb_config_expectations/tryserver.chromium.dawn.json index a156418c..e7eb00a 100644 --- a/tools/mb/mb_config_expectations/tryserver.chromium.dawn.json +++ b/tools/mb/mb_config_expectations/tryserver.chromium.dawn.json
@@ -94,6 +94,17 @@ "use_remoteexec": true } }, + "dawn-try-mac-arm64-deps-rel": { + "gn_args": { + "dawn_enable_opengles": true, + "dcheck_always_on": true, + "is_component_build": false, + "is_debug": false, + "symbol_level": 1, + "target_cpu": "arm64", + "use_remoteexec": true + } + }, "dawn-try-mac-arm64-rel": { "gn_args": { "dawn_enable_opengles": true,
diff --git a/tools/mb/mb_config_expectations/tryserver.chromium.fuchsia.json b/tools/mb/mb_config_expectations/tryserver.chromium.fuchsia.json index d181f06..e29c082 100644 --- a/tools/mb/mb_config_expectations/tryserver.chromium.fuchsia.json +++ b/tools/mb/mb_config_expectations/tryserver.chromium.fuchsia.json
@@ -101,6 +101,17 @@ "use_remoteexec": true } }, + "fuchsia-fyi-x64-asan": { + "gn_args": { + "dcheck_always_on": false, + "is_asan": true, + "is_component_build": false, + "is_debug": false, + "is_lsan": true, + "target_os": "fuchsia", + "use_remoteexec": true + } + }, "fuchsia-fyi-x64-dbg": { "gn_args": { "is_component_build": true, @@ -110,6 +121,15 @@ "use_remoteexec": true } }, + "fuchsia-fyi-x64-dbg-persistent-emulator": { + "gn_args": { + "is_component_build": true, + "is_debug": true, + "symbol_level": 1, + "target_os": "fuchsia", + "use_remoteexec": true + } + }, "fuchsia-x64-cast-receiver-rel": { "args_file": "//build/config/fuchsia/size_optimized_cast_receiver_args.gn", "gn_args": {
diff --git a/tools/mb/mb_config_expectations/tryserver.chromium.fuzz.json b/tools/mb/mb_config_expectations/tryserver.chromium.fuzz.json new file mode 100644 index 0000000..7dd3c84d --- /dev/null +++ b/tools/mb/mb_config_expectations/tryserver.chromium.fuzz.json
@@ -0,0 +1,204 @@ +{ + "linux-asan-dbg": { + "gn_args": { + "is_asan": true, + "is_component_build": true, + "is_debug": true, + "is_lsan": true, + "symbol_level": 1, + "use_remoteexec": true + } + }, + "linux-asan-media-rel": { + "gn_args": { + "dcheck_always_on": false, + "ffmpeg_branding": "ChromeOS", + "is_asan": true, + "is_component_build": false, + "is_debug": false, + "is_lsan": true, + "proprietary_codecs": true, + "use_remoteexec": true, + "v8_enable_verify_heap": true + } + }, + "linux-asan-media-v8-arm-rel": { + "gn_args": { + "dcheck_always_on": false, + "enable_ipc_fuzzer": true, + "enable_nacl": false, + "ffmpeg_branding": "ChromeOS", + "is_asan": true, + "is_component_build": false, + "is_debug": false, + "proprietary_codecs": true, + "target_cpu": "x86", + "use_remoteexec": true, + "v8_enable_verify_heap": true, + "v8_target_cpu": "arm" + } + }, + "linux-asan-rel": { + "gn_args": { + "dcheck_always_on": false, + "enable_ipc_fuzzer": true, + "is_asan": true, + "is_component_build": false, + "is_debug": false, + "is_lsan": true, + "use_remoteexec": true, + "v8_enable_verify_heap": true + } + }, + "linux-asan-v8-arm-dbg": { + "gn_args": { + "enable_nacl": false, + "is_asan": true, + "is_component_build": true, + "is_debug": true, + "symbol_level": 1, + "target_cpu": "x86", + "use_remoteexec": true, + "v8_enable_verify_heap": true, + "v8_target_cpu": "arm" + } + }, + "linux-asan-v8-arm-rel": { + "gn_args": { + "dcheck_always_on": false, + "enable_ipc_fuzzer": true, + "enable_nacl": false, + "is_asan": true, + "is_component_build": false, + "is_debug": false, + "target_cpu": "x86", + "use_remoteexec": true, + "v8_enable_verify_heap": true, + "v8_target_cpu": "arm" + } + }, + "linux-chromeos-asan-rel": { + "gn_args": { + "dcheck_always_on": false, + "enable_ipc_fuzzer": true, + "is_asan": true, + "is_component_build": false, + "is_debug": false, + "is_lsan": true, + "target_os": "chromeos", + "use_remoteexec": true, + "v8_enable_verify_heap": true + } + }, + "linux-msan-chained-origins-rel": { + "gn_args": { + "dcheck_always_on": false, + "is_component_build": false, + "is_debug": false, + "is_msan": true, + "msan_track_origins": 2, + "use_remoteexec": true + } + }, + "linux-msan-no-origins-rel": { + "gn_args": { + "dcheck_always_on": false, + "is_component_build": false, + "is_debug": false, + "is_msan": true, + "msan_track_origins": 0, + "use_remoteexec": true + } + }, + "linux-tsan-dbg": { + "gn_args": { + "enable_nacl": false, + "is_component_build": true, + "is_debug": true, + "is_tsan": true, + "symbol_level": 1, + "use_remoteexec": true + } + }, + "linux-tsan-rel": { + "gn_args": { + "dcheck_always_on": false, + "enable_nacl": false, + "is_component_build": false, + "is_debug": false, + "is_tsan": true, + "use_remoteexec": true + } + }, + "linux-ubsan-rel": { + "gn_args": { + "dcheck_always_on": false, + "is_component_build": false, + "is_debug": false, + "is_ubsan": true, + "use_remoteexec": true + } + }, + "linux-ubsan-vptr-rel": { + "gn_args": { + "dcheck_always_on": false, + "is_component_build": false, + "is_debug": false, + "is_ubsan_no_recover": true, + "is_ubsan_vptr": true, + "use_remoteexec": true + } + }, + "mac-asan-media-rel": { + "gn_args": { + "dcheck_always_on": false, + "enable_ipc_fuzzer": true, + "enable_nacl": false, + "ffmpeg_branding": "Chrome", + "is_asan": true, + "is_component_build": false, + "is_debug": false, + "proprietary_codecs": true, + "use_remoteexec": true, + "v8_enable_verify_heap": true + } + }, + "mac-asan-rel": { + "gn_args": { + "dcheck_always_on": false, + "enable_ipc_fuzzer": true, + "enable_nacl": false, + "is_asan": true, + "is_component_build": false, + "is_debug": false, + "use_remoteexec": true, + "v8_enable_verify_heap": true + } + }, + "win-asan-media-rel": { + "gn_args": { + "dcheck_always_on": false, + "enable_ipc_fuzzer": true, + "ffmpeg_branding": "Chrome", + "is_asan": true, + "is_clang": true, + "is_component_build": false, + "is_debug": false, + "proprietary_codecs": true, + "use_remoteexec": true, + "v8_enable_verify_heap": true + } + }, + "win-asan-rel": { + "gn_args": { + "dcheck_always_on": false, + "enable_ipc_fuzzer": true, + "is_asan": true, + "is_clang": true, + "is_component_build": false, + "is_debug": false, + "use_remoteexec": true, + "v8_enable_verify_heap": true + } + } +} \ No newline at end of file
diff --git a/tools/metrics/actions/actions.xml b/tools/metrics/actions/actions.xml index 6410d45..4747b4b2 100644 --- a/tools/metrics/actions/actions.xml +++ b/tools/metrics/actions/actions.xml
@@ -32361,6 +32361,14 @@ <description>Recorded when the Lens side panel entry is shown.</description> </action> +<action name="SidePanel.Performance.Shown"> + <owner>agale@chromium.org</owner> + <owner>chrome-performance-ui-sea@google.com</owner> + <description> + Recorded when the performance side panel entry is shown. + </description> +</action> + <action name="SidePanel.ReadAnything.Shown"> <owner>abigailbklein@chromium.org</owner> <owner>chrome-desktop-ui-sea@google.com</owner> @@ -34640,146 +34648,6 @@ <description>Please enter the description of this user action.</description> </action> -<action name="SoftwareReporter.CleanupWebui_CleanupFailureDone"> - <owner>alito@chromium.org</owner> - <description> - The user dismissed the Chrome Cleaner webui after a failed cleanup by - clicking on the 'Done' button. - </description> -</action> - -<action name="SoftwareReporter.CleanupWebui_CleanupSuccessDone"> - <owner>alito@chromium.org</owner> - <description> - The user dismissed the Chrome Cleaner webui after a successful cleanup by - clicking on the 'Done' button. - </description> -</action> - -<action name="SoftwareReporter.CleanupWebui_HideDetails"> - <owner>alito@chromium.org</owner> - <description> - The user closed the details section of the Chrome Cleaner webui. - </description> -</action> - -<action name="SoftwareReporter.CleanupWebui_LearnMore"> - <owner>alito@chromium.org</owner> - <description> - The user clicked the 'Learn more' link on the Chrome Cleaner webui. - </description> -</action> - -<action name="SoftwareReporter.CleanupWebui_LogsUploadDisabled"> - <owner>alito@chromium.org</owner> - <description> - The user disabled logs upload by toggling the permission checkbox in the - Chrome Cleaner webui. - </description> -</action> - -<action name="SoftwareReporter.CleanupWebui_LogsUploadEnabled"> - <owner>alito@chromium.org</owner> - <description> - The user enabled logs upload by toggling the permission checkbox in the - Chrome Cleaner webui. - </description> -</action> - -<action name="SoftwareReporter.CleanupWebui_RestartComputer"> - <owner>alito@chromium.org</owner> - <description> - The user clicked the 'Restart Computer' button in the Chrome Cleaner webui. - </description> -</action> - -<action name="SoftwareReporter.CleanupWebui_ShowDetails"> - <owner>alito@chromium.org</owner> - <description> - The user opened the details section of the Chrome Cleaner webui. - </description> -</action> - -<action name="SoftwareReporter.CleanupWebui_Shown"> - <owner>alito@chromium.org</owner> - <description>The Chrome Cleaner webui was shown.</description> -</action> - -<action name="SoftwareReporter.CleanupWebui_StartCleanup"> - <owner>alito@chromium.org</owner> - <description> - The cleaner started the cleanup operation offered on the Chrome Cleaner - webui. - </description> -</action> - -<action name="SoftwareReporter.CleanupWebui_StartScanning"> - <owner>ftirelo@chromium.org</owner> - <description> - The cleaner started the scan operation offered on the Chrome Cleaner webui. - </description> -</action> - -<action name="SoftwareReporter.PromptDialog.LogsPermissionCheckbox_Disabled"> - <owner>alito@chromium.org</owner> - <description> - The user clicked the logs upload permission checkbox and disabled logs - uploading. - </description> -</action> - -<action name="SoftwareReporter.PromptDialog.LogsPermissionCheckbox_Enabled"> - <owner>alito@chromium.org</owner> - <description> - The user clicked the logs upload permission checkbox and enabled logs - uploading. - </description> -</action> - -<action name="SoftwareReporter.PromptDialog_Accepted"> - <owner>alito@chromium.org</owner> - <description>The user accepted the Chrome Cleaner prompt.</description> -</action> - -<action name="SoftwareReporter.PromptDialog_Canceled"> - <owner>alito@chromium.org</owner> - <description> - The user clicked the cancel button in the Chrome Cleaner prompt dialog. - </description> -</action> - -<action name="SoftwareReporter.PromptDialog_ClosedWithoutUserInteraction"> - <owner>alito@chromium.org</owner> - <description> - The Chrome Cleaner prompt dialog was closed without any user interaction. - This can happen, for example, if something goes wrong with the Chrome - Cleaner IPC or if the user interacts with the Chrome Cleaner webui page from - another browser window. - </description> -</action> - -<action name="SoftwareReporter.PromptDialog_DetailsButtonClicked"> - <owner>alito@chromium.org</owner> - <description> - The user clicked the 'Details' button in the Chrome Cleaner prompt dialog. - </description> -</action> - -<action name="SoftwareReporter.PromptDialog_Dismissed"> - <owner>alito@chromium.org</owner> - <description> - The user dismissed the Chrome Cleaner prompt dialog, for example by clicking - the x in the top right corner or pressing the Escape key. - </description> -</action> - -<action name="SoftwareReporter.PromptDialog_Shown"> - <owner>alito@chromium.org</owner> - <description> - The Chrome Cleaner prompt dialog was shown to the user. - </description> -</action> - <action name="SoundContentSetting.MuteBy.DefaultSwitch"> <owner>steimel@chromium.org</owner> <owner>media-dev@chromium.org</owner>
diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums.xml index afc2e04..9a0345b5 100644 --- a/tools/metrics/histograms/enums.xml +++ b/tools/metrics/histograms/enums.xml
@@ -19954,7 +19954,7 @@ <int value="5" label="Deduplicated against existing report"/> <int value="6" label="Excessive attributions"/> <int value="7" label="Priority lower than existing reports"/> - <int value="8" label="Dropped for noise"/> + <int value="8" label="Source never attributed (noised)"/> <int value="9" label="Excessive reporting origins"/> <int value="10" label="No matching source filter data"/> <int value="11" label="Prohibited by browser policy"/> @@ -23092,6 +23092,7 @@ <int value="3" label="ResumeAttempt"/> <int value="4" label="ResumeSuccess"/> <int value="5" label="ResumeFailure"/> + <int value="6" label="ResumePending"/> </enum> <enum name="CrosHibernateFileSystemStatus"> @@ -35742,6 +35743,8 @@ <int value="545" label="FILE_MANAGER_PRIVATE_ON_DEVICE_CONNECTION_STATUS_CHANGED"/> <int value="546" label="OS_DIAGNOSTICS_ON_ROUTINE_EXCEPTION"/> + <int value="547" + label="ACCESSIBILITY_SERVICE_PRIVATE_CLIPBOARD_COPY_IN_ACTIVE_GOOGLE_DOC"/> </enum> <enum name="ExtensionFileWriteResult"> @@ -37667,6 +37670,8 @@ <int value="1827" label="OS_DIAGNOSTICS_STARTROUTINE"/> <int value="1828" label="OS_DIAGNOSTICS_CANCELROUTINE"/> <int value="1829" label="OS_DIAGNOSTICS_ISMEMORYROUTINEARGUMENTSUPPORTED"/> + <int value="1830" + label="ACCESSIBILITY_PRIVATE_CLIPBOARDCOPYINACTIVELACROSGOOGLEDOC"/> </enum> <enum name="ExtensionIconState"> @@ -60642,6 +60647,7 @@ <int value="-2039343702" label="KeepAliveRendererForKeepaliveRequests:enabled"/> <int value="-2038973140" label="VideoConference:enabled"/> + <int value="-2038281501" label="ClipboardHistoryWebContentsPaste:enabled"/> <int value="-2038175774" label="AndroidAutofillViewStructureWithFormHierarchyLayer:enabled"/> <int value="-2038132420" label="OmniboxCacheSuggestionResources:enabled"/> @@ -61519,6 +61525,7 @@ label="AutofillLocalCardMigrationUsesStrikeSystemV2:disabled"/> <int value="-1615589080" label="EmitHistogramsEarlier:disabled"/> <int value="-1614912400" label="enable-link-disambiguation-popup"/> + <int value="-1613833640" label="ClipboardHistoryWebContentsPaste:disabled"/> <int value="-1613583483" label="UseNewAcceptLanguageHeader:enabled"/> <int value="-1612641543" label="CCTRealTimeEngagementSignals:disabled"/> <int value="-1612418793" @@ -63108,6 +63115,7 @@ <int value="-844381918" label="ArcNativeBridgeExperiment:disabled"/> <int value="-844067635" label="InterestFeedV2Autoplay:enabled"/> <int value="-843496368" label="AutofillRejectCompanyBirthyear:disabled"/> + <int value="-842798026" label="LinkCrossDeviceInternals:disabled"/> <int value="-842597982" label="ShelfPalmRejectionTouchArea:disabled"/> <int value="-842438090" label="enable-md-feedback"/> <int value="-842236618" label="CrOSSystemVoiceIsolationOption:disabled"/> @@ -65988,6 +65996,7 @@ <int value="602117675" label="NTPBookmarkSuggestions:enabled"/> <int value="602452004" label="WebBluetoothBondOnDemand:disabled"/> <int value="603326800" label="UsePasswordSeparatedSigninFlow:enabled"/> + <int value="603897763" label="AutofillPageLanguageDetection:disabled"/> <int value="603988014" label="NetworkService:enabled"/> <int value="603999562" label="LauncherImageSearchOcr:disabled"/> <int value="604334859" label="Prerender2:enabled"/> @@ -66284,6 +66293,7 @@ label="AccessibilitySelectToSpeakHoverTextImprovements:disabled"/> <int value="735393448" label="InsertKeyToggleMode:disabled"/> <int value="736911267" label="ExperimentalCrostiniUI:disabled"/> + <int value="737195667" label="AutofillPageLanguageDetection:enabled"/> <int value="737421745" label="enable-accessibility-object-model"/> <int value="738868972" label="GdiTextPrinting:disabled"/> <int value="738962107" label="ExoOrdinalMotion:disabled"/> @@ -66968,6 +66978,7 @@ <int value="1090442943" label="SemanticColorDebugOverride:enabled"/> <int value="1090937981" label="ImeFstDecoderParamsUpdate:enabled"/> <int value="1091157601" label="SearchNavigationPrefetch:enabled"/> + <int value="1091197787" label="LinkCrossDeviceInternals:enabled"/> <int value="1091520021" label="LauncherKeywordExtractionScoring:disabled"/> <int value="1091624595" label="BluetoothAdvertisementMonitoring:enabled"/> <int value="1091631619" label="disable-accelerated-video-encode"/> @@ -81872,6 +81883,16 @@ label="Click on lock within 20 seconds after confirmation chip collapse"/> </enum> +<enum name="PageInsightsEvent"> + <int value="0" label="Tap on Page Insights tab from Overflow menu"/> + <int value="1" label="Page Insights is auto-triggered in Peek state"/> + <int value="2" label="Page Insights is in Peek state"/> + <int value="3" label="Page Insights is in Expanded state"/> + <int value="4" label="Dismiss Page Insights from Peek state"/> + <int value="5" label="Dismiss Page Insights from Expanded state"/> + <int value="6" label="Tap on a xSurface in Page Insights"/> +</enum> + <enum name="PageLoadBackForwardCacheEvent"> <int value="0" label="Enter back-forward cache"/> <int value="1" label="Restore from back-forward cache"/> @@ -114752,6 +114773,7 @@ <int value="-1743341803" label="chrome://bookmarks/"/> <int value="-1737358104" label="chrome://account-migration-welcome/"/> <int value="-1729122580" label="chrome://chrome-urls/"/> + <int value="-1716340463" label="chrome://safe-browsing/"/> <int value="-1704400468" label="chrome://quit/"/> <int value="-1700864659" label="chrome://slow/"/> <int value="-1697612520" label="chrome://print-management/"/>
diff --git a/tools/metrics/histograms/histograms_index.txt b/tools/metrics/histograms/histograms_index.txt index c6c24dc9..0e11972b 100644 --- a/tools/metrics/histograms/histograms_index.txt +++ b/tools/metrics/histograms/histograms_index.txt
@@ -127,7 +127,6 @@ tools/metrics/histograms/metadata/side_search/histograms.xml tools/metrics/histograms/metadata/signin/histograms.xml tools/metrics/histograms/metadata/simple/histograms.xml -tools/metrics/histograms/metadata/software/histograms.xml tools/metrics/histograms/metadata/stability/histograms.xml tools/metrics/histograms/metadata/start_surface/histograms.xml tools/metrics/histograms/metadata/startup/histograms.xml
diff --git a/tools/metrics/histograms/metadata/autofill/histograms.xml b/tools/metrics/histograms/metadata/autofill/histograms.xml index 6a58652..037c3dd9 100644 --- a/tools/metrics/histograms/metadata/autofill/histograms.xml +++ b/tools/metrics/histograms/metadata/autofill/histograms.xml
@@ -171,8 +171,16 @@ <variants name="Autofill.ShadowPredictions.SourcePair"> <variant name="DefaultHeuristicToDefaultServer" summary="the default heuristics, the default server prediction"/> + <variant name="DefaultPatternSourceToMLModel" + summary="the default pattern source, the machine learning model + prediction"/> + <variant name="DefaultServerToMLModel" + summary="the default server, the machine learning model prediction"/> <variant name="ExperimentalToDefault" summary="the heuristics being rolled out, the default heuristics"/> + <variant name="LegacyPatternSourceToMLModel" + summary="the legacy pattern source, the machine learning model + prediction"/> <variant name="NextGenToDefault" summary="the next-gen heuristics, the default heuristics"/> <variant name="NextGenToExperimental"
diff --git a/tools/metrics/histograms/metadata/cookie/histograms.xml b/tools/metrics/histograms/metadata/cookie/histograms.xml index 46269627..18fa8213 100644 --- a/tools/metrics/histograms/metadata/cookie/histograms.xml +++ b/tools/metrics/histograms/metadata/cookie/histograms.xml
@@ -111,7 +111,7 @@ </histogram> <histogram name="Cookie.CookiePrefix.CaseVariant" enum="CookiePrefix" - expires_after="2023-09-17"> + expires_after="2024-03-17"> <owner>bingler@chromium.org</owner> <owner>miketaylr@chromium.org</owner> <summary> @@ -129,7 +129,7 @@ </histogram> <histogram name="Cookie.CookiePrefix.CaseVariantCount" enum="Boolean" - expires_after="2023-09-17"> + expires_after="2024-03-17"> <owner>bingler@chromium.org</owner> <owner>miketaylr@chromium.org</owner> <summary> @@ -144,7 +144,7 @@ </histogram> <histogram name="Cookie.CookiePrefix.CaseVariantValid" enum="Boolean" - expires_after="2023-09-17"> + expires_after="2024-03-17"> <owner>bingler@chromium.org</owner> <owner>miketaylr@chromium.org</owner> <summary> @@ -575,7 +575,7 @@ </histogram> <histogram name="Cookie.HasNonASCII.{CookieField}" enum="Boolean" - expires_after="2023-10-01"> + expires_after="2024-04-01"> <owner>bingler@chromium.org</owner> <owner>miketaylr@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/custom_tabs/histograms.xml b/tools/metrics/histograms/metadata/custom_tabs/histograms.xml index 0df05a0..35ea8f4 100644 --- a/tools/metrics/histograms/metadata/custom_tabs/histograms.xml +++ b/tools/metrics/histograms/metadata/custom_tabs/histograms.xml
@@ -394,6 +394,18 @@ </summary> </histogram> +<histogram name="CustomTabs.PageInsights.Event" enum="PageInsightsEvent" + expires_after="2024-04-01"> + <owner>jinsukkim@chromium.org</owner> + <owner>chrome-connective-tissue@google.com</owner> + <summary> + Recorded only on Android. Holds the interaction that the user has with Page + Insights BottomSheet, such as invoking PIH manually or by being auto + triggered, the bottom sheet's states and when it is dismissed, and + interactions with xSurface views. + </summary> +</histogram> + <histogram name="CustomTabs.ParallelRequestStatusOnStart" enum="CustomTabsParallelRequestStatusOnStart" expires_after="M120"> <owner>lizeb@chromium.org</owner>
diff --git a/tools/metrics/histograms/metadata/histogram_suffixes_list.xml b/tools/metrics/histograms/metadata/histogram_suffixes_list.xml index d7e64dc7..daae198 100644 --- a/tools/metrics/histograms/metadata/histogram_suffixes_list.xml +++ b/tools/metrics/histograms/metadata/histogram_suffixes_list.xml
@@ -927,14 +927,6 @@ <affected-histogram name="MobileStartup.ToolbarInflationTime"/> </histogram_suffixes> -<histogram_suffixes name="ChromeCleanerFetchCompletedReason" separator="_"> - <suffix name="DownloadFailure" - label="Download failed without an OK HTTP response code."/> - <suffix name="DownloadSuccess" label="Download succeeded."/> - <suffix name="NetworkError" label="Download failed due to a network error."/> - <affected-histogram name="SoftwareReporter.Cleaner.TimeToCompleteDownload"/> -</histogram_suffixes> - <histogram_suffixes name="ChromeOS_Camera_JpegProcessMethod" separator="."> <suffix name="Hardware" label=""/> <suffix name="Software" label=""/>
diff --git a/tools/metrics/histograms/metadata/omnibox/histograms.xml b/tools/metrics/histograms/metadata/omnibox/histograms.xml index 78568622..79e0ab0 100644 --- a/tools/metrics/histograms/metadata/omnibox/histograms.xml +++ b/tools/metrics/histograms/metadata/omnibox/histograms.xml
@@ -2650,7 +2650,7 @@ </histogram> <histogram name="Omnibox.ZeroSuggestProvider.{ResultType}.{RequestType}" - enum="ZeroSuggestProviderEvent" expires_after="2023-09-30"> + enum="ZeroSuggestProviderEvent" expires_after="2024-02-04"> <owner>mahmadi@chromium.org</owner> <owner>chrome-omnibox-team@google.com</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/settings/histograms.xml b/tools/metrics/histograms/metadata/settings/histograms.xml index 1d36aba..081deb7b 100644 --- a/tools/metrics/histograms/metadata/settings/histograms.xml +++ b/tools/metrics/histograms/metadata/settings/histograms.xml
@@ -1060,6 +1060,18 @@ </summary> </histogram> +<histogram name="Settings.TrackingProtection.Redirect" enum="BooleanRedirected" + expires_after="2024-12-30"> + <owner>fmacintosh@google.com</owner> + <owner>koilos@google.com</owner> + <summary> + Whether or not navigations to the tracking protection page occured because + the user was redirected from the cookies page. Records true on redirect from + chrome://settings/cookies to chrome://settings/trackingProtection. Records + false on standard navigation to chrome://settings/trackingProtection. + </summary> +</histogram> + <histogram name="SettingsResetBubble.NumNoThanksPerReset" units="units" expires_after="M85"> <owner>mad@chromium.org</owner>
diff --git a/tools/metrics/histograms/metadata/software/OWNERS b/tools/metrics/histograms/metadata/software/OWNERS deleted file mode 100644 index 21c63f77..0000000 --- a/tools/metrics/histograms/metadata/software/OWNERS +++ /dev/null
@@ -1,7 +0,0 @@ -per-file OWNERS=file://tools/metrics/histograms/metadata/METRIC_REVIEWER_OWNERS - -# Prefer sending CLs to the owners listed below. -# Use chromium-metrics-reviews@google.com as a backup. -drubery@chromium.org -thefrog@chromium.org -xinghuilu@chromium.org
diff --git a/tools/metrics/histograms/metadata/software/histograms.xml b/tools/metrics/histograms/metadata/software/histograms.xml deleted file mode 100644 index 4cd1c486..0000000 --- a/tools/metrics/histograms/metadata/software/histograms.xml +++ /dev/null
@@ -1,361 +0,0 @@ -<!-- -Copyright 2020 The Chromium Authors -Use of this source code is governed by a BSD-style license that can be -found in the LICENSE file. ---> - -<!-- -This file is used to generate a comprehensive list of Software histograms -along with a detailed description for each histogram. - -For best practices on writing histogram descriptions, see -https://chromium.googlesource.com/chromium/src.git/+/HEAD/tools/metrics/histograms/README.md - -Please follow the instructions in the OWNERS file in this directory to find a -reviewer. If no OWNERS file exists, please consider signing up at -go/reviewing-metrics (Googlers only), as all subdirectories are expected to -have an OWNERS file. As a last resort you can send the CL to -chromium-metrics-reviews@google.com. ---> - -<histogram-configuration> - -<histograms> - -<!-- -The SoftwareReporterEngine variants used to be defined as suffixes with a _ -separator. The leading _ keeps the generated histogram names the same. ---> - -<variants name="SoftwareReporterEngine"> - <variant name=""/> - <variant name="_ESET" summary="the ESET engine"/> - <variant name="_URZA" summary="the discontinued legacy engine"/> -</variants> - -<histogram name="SoftwareReporter.Cleaner.ChromePromptChannelError" - enum="SoftwareReporterChromePromptChannelError" expires_after="2023-05-14"> - <owner>drubery@chromium.org</owner> - <owner>chrome-counter-abuse-alerts@google.com</owner> - <summary> - Keeps a tally of IPC related errors between chrome_cleaner and chrome. The - first two bytes of the bucket represent the error category and the two last - bytes represent the actual error code. Warning: this histogram was expired - in M91 and extended in M92; data may be missing in M91. - </summary> -</histogram> - -<histogram name="SoftwareReporter.Cleaner.CleaningTime" units="ms" - expires_after="2023-08-25"> - <owner>drubery@chromium.org</owner> - <owner>chrome-counter-abuse-alerts@google.com</owner> - <summary> - The time between sending the user's response to the Chrome Cleaner process - and the Cleaner process terminating. This histogram is logged only for - successfully completed runs of the cleaner. Warning: this histogram was - expired in M91 and extended in M92; data may be missing in M91. - </summary> -</histogram> - -<histogram name="SoftwareReporter.Cleaner.DownloadStatusErrorCode" - enum="CombinedHttpResponseAndNetErrorCode" expires_after="2023-08-25"> - <owner>drubery@chromium.org</owner> - <owner>chrome-counter-abuse-alerts@google.com</owner> - <summary> - The HTTP response or net error code when trying to download the Chrome - Cleanup Tool. Warning: this histogram was expired in M91 and extended in - M92; data may be missing in M91. - </summary> -</histogram> - -<histogram name="SoftwareReporter.Cleaner.RunningTime" units="ms" - expires_after="2023-08-25"> - <owner>drubery@chromium.org</owner> - <owner>chrome-counter-abuse-alerts@google.com</owner> - <summary> - How long it took to run the software reporter cleaner tool. Warning: this - histogram was expired in M91 and extended in M92; data may be missing in - M91. - </summary> -</histogram> - -<histogram name="SoftwareReporter.Cleaner.ScanningTime" units="ms" - expires_after="2023-08-25"> - <owner>drubery@chromium.org</owner> - <owner>chrome-counter-abuse-alerts@google.com</owner> - <summary> - The time between launching the Chrome Cleaner process and the cleaner having - scanned the user's machine and Chrome receiving an IPC call with the - results. Warning: this histogram was expired in M91 and extended in M92; - data may be missing in M91. - </summary> -</histogram> - -<histogram name="SoftwareReporter.Cleaner.TimeToCompleteDownload" units="ms" - expires_after="2023-09-16"> - <owner>drubery@chromium.org</owner> - <owner>chrome-counter-abuse-alerts@google.com</owner> - <summary> - Expired in 2021-07-21 so there may be some missing data. The time between - the first attempt to download the Chrome Cleanup tool and a successful - download or the last unsuccessful attempt to download without retrying. - </summary> -</histogram> - -<histogram name="SoftwareReporter.CleanerLogsAcceptance" enum="BooleanAccepted" - expires_after="2023-08-25"> - <owner>drubery@chromium.org</owner> - <owner>chrome-counter-abuse-alerts@google.com</owner> - <summary> - Whether the user accepted to upload logs from Chrome Cleanup Tool. This is - logged when the user accepts the Chrome prompt to start a cleanup either - from the prompt dialog or from the cleanup card in the Settings page. - Warning: this histogram was expired in M91 and extended in M92; data may be - missing in M91. - </summary> -</histogram> - -<histogram name="SoftwareReporter.CleanupStarted" - enum="SoftwareReporterCleanupStarted" expires_after="2022-03-16"> - <obsolete> - Removed 03-2022 due to lack of use - </obsolete> - <owner>drubery@chromium.org</owner> - <owner>chrome-counter-abuse-alerts@google.com</owner> - <summary> - Indicates where the user started a cleanup from (e.g. from the prompt dialog - or the settings page). Warning: this histogram was expired in M91 and - extended in M92; data may be missing in M91. - </summary> -</histogram> - -<histogram name="SoftwareReporter.ConfigurationErrors" - enum="SoftwareReporterConfigurationError" expires_after="2023-08-25"> - <owner>drubery@chromium.org</owner> - <owner>chrome-counter-abuse-alerts@google.com</owner> - <summary> - Whether a configuration error prevented the experimental Software Reporter - from running. - </summary> -</histogram> - -<histogram name="SoftwareReporter.CreateJobResult{Engine}" - enum="WinGetLastError" expires_after="2022-08-21"> - <obsolete> - Removed 08-2022 since it only ever logged SUCCESS - </obsolete> - <owner>joenotcharles@google.com</owner> - <owner>chrome-counter-abuse-alerts@google.com</owner> - <summary> - The Windows error code from CreateJobObject, which is called just before - launching the Software Reporter using {Engine}. If this is not - ERROR_SUCCESS, the reporter process is not attached to a job and may outlive - the browser. Not logged on Windows 7, where CreateJobObject is not called - because nested job objects aren't supported. - </summary> - <token key="Engine" variants="SoftwareReporterEngine"/> -</histogram> - -<histogram name="SoftwareReporter.FoundUwSReadError{Engine}" - enum="BooleanError" expires_after="2023-05-25"> - <owner>drubery@chromium.org</owner> - <owner>chrome-counter-abuse-alerts@google.com</owner> - <summary> - Whether there was an error reading the registry key containing UwS found by - the Software Removal Tool when using {Engine}. - </summary> - <token key="Engine" variants="SoftwareReporterEngine"/> -</histogram> - -<histogram name="SoftwareReporter.IPCDisconnected" - enum="SoftwareReporterIPCDisconnected" expires_after="2023-08-25"> - <owner>drubery@chromium.org</owner> - <owner>chrome-counter-abuse-alerts@google.com</owner> - <summary> - Indicates when the IPC with the Chrome Cleanup Tool process is disconnected - from Chrome. Success is logged when it's disconnected and no longer needed - (the user already responded to the prompt in Chrome or the cleaner process - terminated normally); failures are logged when the IPC is disconnected, but - communication between Chrome and the cleaner process is still required (e.g. - while Chrome is waiting for scanning results or when the cleaner is waiting - for the user's response from Chrome). Warning: this histogram was expired in - M91 and extended in M92; data may be missing in M91. - </summary> -</histogram> - -<histogram name="SoftwareReporter.LastUploadResult" enum="BooleanSuccess" - expires_after="2023-09-16"> - <owner>drubery@chromium.org</owner> - <owner>chrome-counter-abuse-alerts@google.com</owner> - <summary>The result of the most recent SRT log upload.</summary> -</histogram> - -<histogram name="SoftwareReporter.LogsUploadEnabled{Engine}" - enum="SoftwareReporterLogsUploadEnabled" expires_after="2023-08-25"> - <owner>drubery@chromium.org</owner> - <owner>chrome-counter-abuse-alerts@google.com</owner> - <summary> - If logs uploads are enabled in the Software Reporter or the reason why it is - disabled. Recorded before each run of the Software Reporter using {Engine}. - Warning: this histogram was expired in M91 and extended in M92; data may be - missing in M91. - </summary> - <token key="Engine" variants="SoftwareReporterEngine"/> -</histogram> - -<histogram name="SoftwareReporter.LogsUploadResultRegistryError{Engine}" - enum="SoftwareReporterLogsUploadResultRegistryError" - expires_after="2023-08-25"> - <owner>drubery@chromium.org</owner> - <owner>chrome-counter-abuse-alerts@google.com</owner> - <summary> - Error encountered when reading the Software Reporter logs upload result from - the registry for. Recorded at the same time as - SoftwareReporter.LogsUploadResult after the SoftwareReporter finishes when - using {Engine}. Warning: this histogram was expired in M91 and extended in - M92; data may be missing in M91. - </summary> - <token key="Engine" variants="SoftwareReporterEngine"/> -</histogram> - -<histogram name="SoftwareReporter.LogsUploadResult{Engine}" - enum="SoftwareReporterLogsUploadResult" expires_after="2023-08-25"> - <owner>drubery@chromium.org</owner> - <owner>chrome-counter-abuse-alerts@google.com</owner> - <summary> - The result of the most recent Software Reporter logs upload. Written by the - Software Reporter in the registry and sent by Chrome after the reporter - finishes when using {Engine}. Warning: this histogram was expired in M91 and - extended in M92; data may be missing in M91. - </summary> - <token key="Engine" variants="SoftwareReporterEngine"/> -</histogram> - -<histogram name="SoftwareReporter.MajorVersion{Engine}" units="units" - expires_after="2023-08-25"> - <owner>drubery@chromium.org</owner> - <owner>chrome-counter-abuse-alerts@google.com</owner> - <summary> - As SoftwareReporter.MinorVersion, but a double word combination of the other - components of the version of the software reporter. The high word is the - first component when there are more than one, and the low word is either the - second or third one, depending if there are at least 3, or 4 components. - Recorded after the reporter finishes when using {Engine}. - </summary> - <token key="Engine" variants="SoftwareReporterEngine"/> -</histogram> - -<histogram name="SoftwareReporter.MemoryUsed{Engine}" units="KB" - expires_after="2023-08-25"> - <owner>drubery@chromium.org</owner> - <owner>chrome-counter-abuse-alerts@google.com</owner> - <summary> - The memory used by the software reporter tool as reported by the tool itself - via the registry. Logged just after the software reporter tool has finished - when using {Engine}. - </summary> - <token key="Engine" variants="SoftwareReporterEngine"/> -</histogram> - -<histogram name="SoftwareReporter.MinorVersion{Engine}" units="units" - expires_after="2023-08-25"> - <owner>drubery@chromium.org</owner> - <owner>chrome-counter-abuse-alerts@google.com</owner> - <summary> - The last component of the version of the software reporter that was executed - so we can identify when users are not getting their component updated as - quickly as we expect it. Recorded after the reporter finishes when using - {Engine}. - </summary> - <token key="Engine" variants="SoftwareReporterEngine"/> -</histogram> - -<histogram name="SoftwareReporter.NoPromptReason" - enum="SoftwareReporterNoPromptReason" expires_after="2023-08-05"> - <owner>drubery@chromium.org</owner> - <owner>chrome-counter-abuse-alerts@google.com</owner> - <summary> - The reason why the user has not been prompted to run the Chrome Cleanup Tool - (e.g. no unwanted software found, user recently prompted). Warning: this - histogram was expired in M91 and extended in M92; data may be missing in - M91. - </summary> -</histogram> - -<histogram name="SoftwareReporter.OnDemandUpdateSucceeded" - enum="BooleanSuccess" expires_after="2023-08-25"> - <owner>drubery@chromium.org</owner> - <owner>chrome-counter-abuse-alerts@google.com</owner> - <summary> - Whether an on-demand update of the Software Reporter component succeeded, - when needed for a user-initiated cleanup. Warning: this histogram was - expired in M91 and extended in M92; data may be missing in M91. - </summary> -</histogram> - -<histogram name="SoftwareReporter.PostCleanupSettingsReset" units="counts" - expires_after="2023-08-25"> - <owner>drubery@chromium.org</owner> - <owner>chrome-counter-abuse-alerts@google.com</owner> - <summary> - The number of profiles whose settings will be reset once a successful - cleanup completes. Warning: this histogram was expired in M91 and extended - in M92; data may be missing in M91. - </summary> -</histogram> - -<histogram name="SoftwareReporter.PromptDialogResponse" - enum="SoftwareReporterPromptDialogResponse" expires_after="2023-07-30"> - <owner>drubery@chromium.org</owner> - <owner>chrome-counter-abuse-alerts@google.com</owner> - <summary> - The user response on the modal Chrome Cleanup Tool prompt dialog (e.g. - accepted, cancelled). Warning: this histogram was expired in M91 and - extended in M92; data may be missing in M91. - </summary> -</histogram> - -<histogram name="SoftwareReporter.ReporterSequenceType" - enum="SoftwareReporterSequenceType" expires_after="2023-08-25"> - <owner>drubery@chromium.org</owner> - <owner>chrome-counter-abuse-alerts@google.com</owner> - <summary> - Indicates the type of a reporter sequence run on the user system. Logged - when the sequence is scheduled to start. Warning: this histogram was expired - in M91 and extended in M92; data may be missing in M91. - </summary> -</histogram> - -<histogram name="SoftwareReporter.RunningTimeAccordingToChrome2{Engine}" - units="ms" expires_after="2023-08-21"> - <owner>drubery@chromium.org</owner> - <owner>chrome-counter-abuse-alerts@google.com</owner> - <summary> - The amount of time from the Software Reporter process launch to the time it - exits, in milliseconds. This includes time the computer was asleep or - hibernating. SoftwareReporter.RunningTimeWithoutSleep2 excludes those - periods. This replaces SoftwareReporter.RunningTimeAccordingToChrome which - also included queuing time of tasks before and after launch. Recorded after - the reporter finishes when using {Engine}. - </summary> - <token key="Engine" variants="SoftwareReporterEngine"/> -</histogram> - -<histogram name="SoftwareReporter.RunningTimeWithoutSleep2{Engine}" units="ms" - expires_after="2023-08-21"> - <owner>drubery@chromium.org</owner> - <owner>chrome-counter-abuse-alerts@google.com</owner> - <summary> - The amount of time from the Software Reporter process launch to the time it - exits, in milliseconds. This does not include time the computer was asleep - or hibernating. SoftwareReporter.RunningTimeAccordingToChrome2 includes - those periods. This replaces SoftwareReporter.RunningTimeWithoutSleep which - also included queuing time of tasks before and after launch. Recorded after - the reporter finishes when using {Engine}. - </summary> - <token key="Engine" variants="SoftwareReporterEngine"/> -</histogram> - -</histograms> - -</histogram-configuration>
diff --git a/tools/metrics/histograms/metadata/tab/histograms.xml b/tools/metrics/histograms/metadata/tab/histograms.xml index 778426e..233aa980 100644 --- a/tools/metrics/histograms/metadata/tab/histograms.xml +++ b/tools/metrics/histograms/metadata/tab/histograms.xml
@@ -1734,7 +1734,7 @@ </histogram> <histogram name="Tabs.TabCountInGroupPerLoad" units="tabs" - expires_after="2023-06-18"> + expires_after="2024-06-18"> <owner>dpenning@chromium.org</owner> <owner>chrome-desktop-ui-sea@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 f8dc252..b4bc432 100644 --- a/tools/perf/core/perfetto_binary_roller/binary_deps.json +++ b/tools/perf/core/perfetto_binary_roller/binary_deps.json
@@ -1,16 +1,16 @@ { "trace_processor_shell": { "linux_arm64": { - "hash": "5fc414422e62ff61de2954ad821264a6c38b454b", - "full_remote_path": "perfetto-luci-artifacts/v35.0/linux-arm64/trace_processor_shell" + "hash": "5225dddda98c1258201ff3af665e0422494addbc", + "full_remote_path": "perfetto-luci-artifacts/v37.0/linux-arm64/trace_processor_shell" }, "win": { - "hash": "0d3a88847d5e5ec8ea6bf732dbb71475e85b8082", - "full_remote_path": "chromium-telemetry/perfetto_binaries/trace_processor_shell/win/a4e9e26e3958f4d15e12ae84073252ba3f9f471b/trace_processor_shell.exe" + "hash": "0da0643b99b5905b364c8e9e2deeced6ad1d2309", + "full_remote_path": "chromium-telemetry/perfetto_binaries/trace_processor_shell/win/90f8e7ccdd9d1c2b32bf6cf9d0accc2cd5e41e96/trace_processor_shell.exe" }, "linux_arm": { - "hash": "c9c575015c295fda07a48ff69169904e2c52863b", - "full_remote_path": "perfetto-luci-artifacts/v35.0/linux-arm/trace_processor_shell" + "hash": "4ad0dc8eeae3ad92d6a1da2f1653a81fb9e3c4c1", + "full_remote_path": "perfetto-luci-artifacts/v37.0/linux-arm/trace_processor_shell" }, "mac": { "hash": "23db28cb6ee6df58c2c6249293a14f64c6ac842d",
diff --git a/tools/typescript/definitions/accessibility_service_private.d.ts b/tools/typescript/definitions/accessibility_service_private.d.ts index f9a8e08..8fcd02b 100644 --- a/tools/typescript/definitions/accessibility_service_private.d.ts +++ b/tools/typescript/definitions/accessibility_service_private.d.ts
@@ -8,15 +8,21 @@ * chrome/common/extensions/api/accessibility_service_private.idl run * `tools/json_schema_compiler/compiler.py * chrome/common/extensions/api/accessibility_service_private.idl -g - * definitions` to regenerate. + * ts_definitions` to regenerate. */ +import {ChromeEvent} from './chrome_event.js'; +declare global { + export namespace chrome { -declare namespace chrome { - export namespace accessibilityServicePrivate { + export namespace accessibilityServicePrivate { - export function speakSelectedText(): void; + export function speakSelectedText(): Promise<void>; + export const clipboardCopyInActiveGoogleDoc: + ChromeEvent<(url: string) => void>; + + } } -} +} \ No newline at end of file
diff --git a/ui/accessibility/accessibility_features.cc b/ui/accessibility/accessibility_features.cc index f3591ef..d17994c 100644 --- a/ui/accessibility/accessibility_features.cc +++ b/ui/accessibility/accessibility_features.cc
@@ -225,12 +225,12 @@ return base::FeatureList::IsEnabled( ::features::kAccessibilityGameFaceIntegration); } +#endif // BUILDFLAG(IS_CHROMEOS_ASH) BASE_FEATURE(kBacklightOcr, "BacklightOcr", base::FEATURE_DISABLED_BY_DEFAULT); bool IsBacklightOcrEnabled() { return base::FeatureList::IsEnabled(features::kBacklightOcr); } -#endif // BUILDFLAG(IS_CHROMEOS_ASH) BASE_FEATURE(kAugmentExistingImageLabels, "AugmentExistingImageLabels",
diff --git a/ui/accessibility/accessibility_features.h b/ui/accessibility/accessibility_features.h index 24ad6e3..488a7cce 100644 --- a/ui/accessibility/accessibility_features.h +++ b/ui/accessibility/accessibility_features.h
@@ -172,12 +172,12 @@ // Returns true if the GameFace integration is enabled. AX_BASE_EXPORT bool IsAccessibilityGameFaceIntegrationEnabled(); +#endif // BUILDFLAG(IS_CHROMEOS_ASH) // A feature that makes PDFs displayed in the ChromeOS Media App (AKA Backlight) // accessible by performing OCR on the images for each page. AX_BASE_EXPORT BASE_DECLARE_FEATURE(kBacklightOcr); AX_BASE_EXPORT bool IsBacklightOcrEnabled(); -#endif // BUILDFLAG(IS_CHROMEOS_ASH) // Enables Get Image Descriptions to augment existing images labels, // rather than only provide descriptions for completely unlabeled images.
diff --git a/ui/base/ui_base_features.cc b/ui/base/ui_base_features.cc index 680d1f3e..9e39c1c 100644 --- a/ui/base/ui_base_features.cc +++ b/ui/base/ui_base_features.cc
@@ -570,6 +570,10 @@ return level; } +BASE_FEATURE(kBubbleMetricsApi, + "BubbleMetricsApi", + base::FEATURE_DISABLED_BY_DEFAULT); + #if !BUILDFLAG(IS_LINUX) BASE_FEATURE(kWebUiSystemFont, "WebUiSystemFont",
diff --git a/ui/base/ui_base_features.h b/ui/base/ui_base_features.h index a87fa6d9..f149469 100644 --- a/ui/base/ui_base_features.h +++ b/ui/base/ui_base_features.h
@@ -273,6 +273,9 @@ COMPONENT_EXPORT(UI_BASE_FEATURES) ChromeRefresh2023Level GetChromeRefresh2023Level(); +COMPONENT_EXPORT(UI_BASE_FEATURES) +BASE_DECLARE_FEATURE(kBubbleMetricsApi); + #if !BUILDFLAG(IS_LINUX) COMPONENT_EXPORT(UI_BASE_FEATURES) BASE_DECLARE_FEATURE(kWebUiSystemFont); #endif
diff --git a/ui/base/wayland/color_manager_util.h b/ui/base/wayland/color_manager_util.h index 9aac42a..2efa825 100644 --- a/ui/base/wayland/color_manager_util.h +++ b/ui/base/wayland/color_manager_util.h
@@ -199,7 +199,9 @@ {{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_LINEAR, TransferFnVersion(SkNamedTransferFn::kLinear, kDefaultSinceVersion)}, {ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SRGB_HDR, - TransferFnVersion(SkNamedTransferFnExt::kSRGB, kDefaultSinceVersion)}, + TransferFnVersion( + SkNamedTransferFnExt::kSRGB, + ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SRGB_HDR_SINCE_VERSION)}, {ZCR_COLOR_MANAGER_V1_EOTF_NAMES_PQ, TransferFnVersion(SkNamedTransferFn::kPQ, kDefaultSinceVersion)}, {ZCR_COLOR_MANAGER_V1_EOTF_NAMES_HLG,
diff --git a/ui/gfx/render_text_unittest.cc b/ui/gfx/render_text_unittest.cc index 3d1e6d32..3584ac3 100644 --- a/ui/gfx/render_text_unittest.cc +++ b/ui/gfx/render_text_unittest.cc
@@ -8674,7 +8674,7 @@ private: void SetUp() override { - // Using "en" locale, which is a LTR langulage. + // Set default locale to a LTR language. base::i18n::SetICUDefaultLocale("en"); if (!GetParam().empty()) { @@ -8711,9 +8711,7 @@ EXPECT_EQ(ALIGN_CENTER, GetCurrentHorizontalAlignment()); render_text()->SetHorizontalAlignment(ALIGN_TO_HEAD); - if (GetParam() == switches::kForceDirectionLTR) { - EXPECT_EQ(ALIGN_LEFT, GetCurrentHorizontalAlignment()); - } else if (GetParam() == switches::kForceDirectionRTL) { + if (GetParam() == switches::kForceDirectionRTL) { EXPECT_EQ(ALIGN_RIGHT, GetCurrentHorizontalAlignment()); } else { EXPECT_EQ(ALIGN_LEFT, GetCurrentHorizontalAlignment());
diff --git a/ui/linux/BUILD.gn b/ui/linux/BUILD.gn index 20f1b9ae..62d3caf 100644 --- a/ui/linux/BUILD.gn +++ b/ui/linux/BUILD.gn
@@ -79,6 +79,7 @@ deps = [ "//base", "//skia", + "//ui/base/ime/linux", "//ui/gfx", "//ui/native_theme", "//ui/shell_dialogs",
diff --git a/ui/linux/fake_linux_ui.cc b/ui/linux/fake_linux_ui.cc index 8b67f04..77a01a0 100644 --- a/ui/linux/fake_linux_ui.cc +++ b/ui/linux/fake_linux_ui.cc
@@ -5,10 +5,12 @@ #include "ui/linux/fake_linux_ui.h" #include "base/time/time.h" +#include "ui/base/ime/linux/linux_input_method_context.h" #include "ui/gfx/color_palette.h" #include "ui/gfx/font_render_params.h" #include "ui/gfx/geometry/size.h" #include "ui/gfx/image/image.h" +#include "ui/linux/nav_button_provider.h" #include "ui/shell_dialogs/select_file_policy.h" namespace ui {
diff --git a/ui/ozone/platform/wayland/host/wayland_zcr_color_manager.cc b/ui/ozone/platform/wayland/host/wayland_zcr_color_manager.cc index 39242cc..c258be2 100644 --- a/ui/ozone/platform/wayland/host/wayland_zcr_color_manager.cc +++ b/ui/ozone/platform/wayland/host/wayland_zcr_color_manager.cc
@@ -22,7 +22,7 @@ namespace { constexpr uint32_t kMinVersion = 1; -constexpr uint32_t kMaxVersion = 5; +constexpr uint32_t kMaxVersion = 6; } // namespace // static
diff --git a/ui/views/animation/pulsing_ink_drop_mask.cc b/ui/views/animation/pulsing_ink_drop_mask.cc index 743f4a4..0360283d 100644 --- a/ui/views/animation/pulsing_ink_drop_mask.cc +++ b/ui/views/animation/pulsing_ink_drop_mask.cc
@@ -3,7 +3,10 @@ // found in the LICENSE file. #include "ui/views/animation/pulsing_ink_drop_mask.h" + +#include "base/i18n/rtl.h" #include "ui/compositor/paint_recorder.h" +#include "ui/views/view_class_properties.h" namespace { // Cycle duration of ink drop pulsing animation used for in-product help. @@ -33,6 +36,18 @@ gfx::RectF bounds(layer()->bounds()); + const gfx::Insets* const internal_padding = + layer_container_->GetProperty(views::kInternalPaddingKey); + if (internal_padding) { + gfx::Insets insets(*internal_padding); + if (layer_container_->GetFlipCanvasOnPaintForRTLUI() && + base::i18n::IsRTL()) { + insets.set_left(internal_padding->right()); + insets.set_right(internal_padding->left()); + } + bounds.Inset(gfx::InsetsF(insets)); + } + const float current_inset = throb_animation_.CurrentValueBetween(0.0f, kFeaturePromoPulseInsetDip); bounds.Inset(gfx::InsetsF(current_inset));
diff --git a/ui/views/bubble/bubble_dialog_delegate_view.cc b/ui/views/bubble/bubble_dialog_delegate_view.cc index 3fa1e00..9594634 100644 --- a/ui/views/bubble/bubble_dialog_delegate_view.cc +++ b/ui/views/bubble/bubble_dialog_delegate_view.cc
@@ -15,7 +15,7 @@ #include "base/memory/ptr_util.h" #include "base/memory/raw_ptr.h" #include "base/memory/weak_ptr.h" -#include "base/metrics/histogram_macros.h" +#include "base/metrics/histogram_functions.h" #include "build/build_config.h" #include "build/chromeos_buildflags.h" #include "ui/accessibility/ax_enums.mojom.h" @@ -25,9 +25,11 @@ #include "ui/base/default_style.h" #include "ui/base/metadata/metadata_impl_macros.h" #include "ui/base/resource/resource_bundle.h" +#include "ui/base/ui_base_features.h" #include "ui/color/color_id.h" #include "ui/color/color_provider.h" #include "ui/color/color_provider_key.h" +#include "ui/compositor/compositor.h" #include "ui/compositor/layer.h" #include "ui/compositor/layer_animation_element.h" #include "ui/compositor/layer_animator.h" @@ -436,8 +438,8 @@ BubbleBorder::Shadow shadow) : arrow_(arrow), shadow_(shadow), - close_on_deactivate_pins_( - std::make_unique<CloseOnDeactivatePin::Pins>()) { + close_on_deactivate_pins_(std::make_unique<CloseOnDeactivatePin::Pins>()), + bubble_created_time_(base::TimeTicks::Now()) { SetOwnedByWidget(true); SetAnchorView(anchor_view); SetArrow(arrow); @@ -459,6 +461,25 @@ bubble_delegate->UpdateColorsFromTheme(); }, this)); + + // Bind a callback to the compositor for logging time from bubble creation to + // successful presentation of the next frame. + if (base::FeatureList::IsEnabled(::features::kBubbleMetricsApi)) { + RegisterWidgetInitializedCallback(base::BindOnce( + [](WidgetDelegate* delegate, base::TimeTicks bubble_created_time) { + delegate->GetWidget() + ->GetCompositor() + ->RequestSuccessfulPresentationTimeForNextFrame(base::BindOnce( + [](base::TimeTicks bubble_created_time, + base::TimeTicks presentation_timestamp) { + base::UmaHistogramMediumTimes( + "Bubble.All.CreateToPresentationTime", + presentation_timestamp - bubble_created_time); + }, + bubble_created_time)); + }, + base::Unretained(this), *bubble_created_time_)); + } } BubbleDialogDelegate::~BubbleDialogDelegate() { @@ -947,6 +968,22 @@ } void BubbleDialogDelegate::OnBubbleWidgetVisibilityChanged(bool visible) { + // Log time from bubble dialog delegate creation to bubble becoming + // visible. + if (base::FeatureList::IsEnabled(::features::kBubbleMetricsApi) && visible && + bubble_created_time_.has_value()) { + GetWidget()->GetCompositor()->RequestSuccessfulPresentationTimeForNextFrame( + base::BindOnce( + [](base::TimeTicks bubble_created_time, + base::TimeTicks presentation_timestamp) { + base::UmaHistogramMediumTimes( + "Bubble.All.CreateToVisibleTime", + presentation_timestamp - bubble_created_time); + }, + *bubble_created_time_)); + bubble_created_time_.reset(); + } + UpdateHighlightedButton(visible); // Fire ax::mojom::Event::kAlert for bubbles marked as
diff --git a/ui/views/bubble/bubble_dialog_delegate_view.h b/ui/views/bubble/bubble_dialog_delegate_view.h index 965864e8..ca2fc07 100644 --- a/ui/views/bubble/bubble_dialog_delegate_view.h +++ b/ui/views/bubble/bubble_dialog_delegate_view.h
@@ -457,6 +457,8 @@ // Used to ensure the button remains anchored while this dialog is open. absl::optional<Button::ScopedAnchorHighlight> button_anchor_higlight_; + + absl::optional<base::TimeTicks> bubble_created_time_; }; // BubbleDialogDelegateView is a BubbleDialogDelegate that is also a View.
diff --git a/url/url_util.cc b/url/url_util.cc index d624baae..3cadd6e 100644 --- a/url/url_util.cc +++ b/url/url_util.cc
@@ -934,4 +934,16 @@ return DoCompareSchemeComponent(spec, component, compare_to); } +bool HasInvalidURLEscapeSequences(std::string_view input) { + for (size_t i = 0; i < input.size(); i++) { + if (input[i] == '%') { + unsigned char ch; + if (!DecodeEscaped(input.data(), &i, input.size(), &ch)) { + return true; + } + } + } + return false; +} + } // namespace url
diff --git a/url/url_util.h b/url/url_util.h index d1e101c..fe816ca 100644 --- a/url/url_util.h +++ b/url/url_util.h
@@ -7,6 +7,7 @@ #include <memory> #include <string> +#include <string_view> #include <vector> #include "base/component_export.h" @@ -316,6 +317,14 @@ COMPONENT_EXPORT(URL) bool IsURIComponentChar(char c); +// Checks an arbitrary string for invalid escape sequences. +// +// A valid percent-encoding is '%' followed by exactly two hex-digits. This +// function returns true if an occurrence of '%' is found and followed by +// anything other than two hex-digits. +COMPONENT_EXPORT(URL) +bool HasInvalidURLEscapeSequences(std::string_view input); + } // namespace url #endif // URL_URL_UTIL_H_
diff --git a/url/url_util_unittest.cc b/url/url_util_unittest.cc index 3a2e6e6d..fc6ab4e3 100644 --- a/url/url_util_unittest.cc +++ b/url/url_util_unittest.cc
@@ -635,4 +635,87 @@ } } +TEST_F(URLUtilTest, TestHasInvalidURLEscapeSequences) { + struct TestCase { + const char* input; + bool is_invalid; + } cases[] = { + // Edge cases. + {"", false}, + {"%", true}, + + // Single regular chars with no escaping are valid. + {"a", false}, + {"g", false}, + {"A", false}, + {"G", false}, + {":", false}, + {"]", false}, + {"\x00", false}, // ASCII 'NUL' char + {"\x01", false}, // ASCII 'SOH' char + {"\xC2\xA3", false}, // UTF-8 encoded '£'. + + // Longer strings without escaping are valid. + {"Hello world", false}, + {"Here: [%25] <-- a percent-encoded percent character.", false}, + + // Valid %-escaped sequences ('%' followed by two hex digits). + {"%00", false}, + {"%20", false}, + {"%02", false}, + {"%ff", false}, + {"%FF", false}, + {"%0a", false}, + {"%0A", false}, + {"abc%FF", false}, + {"%FFabc", false}, + {"abc%FFabc", false}, + {"hello %FF world", false}, + {"%20hello%20world", false}, + {"%25", false}, + {"%25%25", false}, + {"%250", false}, + {"%259", false}, + {"%25A", false}, + {"%25F", false}, + {"%0a:", false}, + + // '%' followed by a single character is never a valid sequence. + {"%%", true}, + {"%2", true}, + {"%a", true}, + {"%A", true}, + {"%g", true}, + {"%G", true}, + {"%:", true}, + {"%[", true}, + {"%F", true}, + {"%\xC2\xA3", true}, //% followed by UTF-8 encoded '£'. + + // String ends on a potential escape sequence but without two hex-digits + // is invalid. + {"abc%", true}, + {"abc%%", true}, + {"abc%%%", true}, + {"abc%a", true}, + + // One hex and one non-hex digit is invalid. + {"%a:", true}, + {"%:a", true}, + {"%::", true}, + {"%ag", true}, + {"%ga", true}, + {"%-1", true}, + {"%1-", true}, + {"%0\xC2\xA3", true}, // %0£. + }; + + for (TestCase test_case : cases) { + const char* input = test_case.input; + bool result = HasInvalidURLEscapeSequences(input); + EXPECT_EQ(test_case.is_invalid, result) + << "Invalid result for '" << input << "'"; + } +} + } // namespace url
diff --git a/v8 b/v8 index 5ad4aa2..d355ef6 160000 --- a/v8 +++ b/v8
@@ -1 +1 @@ -Subproject commit 5ad4aa20994468c3773ecdd3b8aef60af1c9ee1f +Subproject commit d355ef6eb6fc29c270bdc0b8d7e5abe905343076