diff --git a/DEPS b/DEPS index 1dddf331..3dac07b 100644 --- a/DEPS +++ b/DEPS
@@ -322,11 +322,11 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling V8 # and whatever else without interference from each other. - 'v8_revision': '389dcb03ad1e7ee7f050248439e9ef296f859d3b', + 'v8_revision': 'e35809924c4af3f7b2d45833d9991b8469fa0e20', # 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': 'bc7fc3997be824e3029da785ba5bc2e3df25e546', + 'angle_revision': '8330fcd33f07607b3900cde853be747f1c8f8e52', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling SwiftShader # and whatever else without interference from each other. @@ -389,11 +389,11 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling catapult # and whatever else without interference from each other. - 'catapult_revision': '69c19224a71dddb0fd47899947ca4c50ed000da8', + 'catapult_revision': '47ca2824260532b624f9b3c6afa4d538870ecc47', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling chromium_variations # and whatever else without interference from each other. - 'chromium_variations_revision': 'a4b56f7af2b0959c36f9da4f8ab35dd7bb05cc71', + 'chromium_variations_revision': 'c77d65814a897738e9b99ff9b7baa8973abe1d57', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling CrossBench # and whatever else without interference from each other. @@ -409,7 +409,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': 'f5943cd8a7ae161fbec5be57e76aa8fc37a69e76', + 'devtools_frontend_revision': '08177f7681df01be5548ef82313096d7587b5801', # 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. @@ -849,7 +849,7 @@ 'src/clank': { 'url': Var('chrome_git') + '/clank/internal/apps.git' + '@' + - 'a750aaa5d035918cb1e2c927521827a15c82c9c8', + '530817b617518e29e7faca7d81cdd5e2c7f07181', 'condition': 'checkout_android and checkout_src_internal', }, @@ -1055,7 +1055,7 @@ 'packages': [ { 'package': 'chromium/third_party/androidx', - 'version': 'x3LXBT0Dy8ROMd3aWRcLKHgL0a0c6siwpcA-jDz39V4C', + 'version': 'd3SZeP-0r67zTi3JXOzM68IUhwn1ub7W3a7J1ZHqSjIC', }, ], 'condition': 'checkout_android', @@ -1299,13 +1299,13 @@ }, 'src/third_party/depot_tools': - Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + 'b9d7c8558207b5cbe5bc7fa41a0f46832cc35d6a', + Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + 'abf4847b0412cac3617c231af35f998eb9141748', 'src/third_party/devtools-frontend/src': Var('chromium_git') + '/devtools/devtools-frontend' + '@' + Var('devtools_frontend_revision'), 'src/third_party/devtools-frontend-internal': { - 'url': Var('chrome_git') + '/devtools/devtools-internal.git' + '@' + '698aeffe4942c5018875c07800e939a3cac87c27', + 'url': Var('chrome_git') + '/devtools/devtools-internal.git' + '@' + 'e36123ccdb7d601e4708ef8bb2a490186de1e695', 'condition': 'checkout_src_internal', }, @@ -2085,7 +2085,7 @@ 'packages': [ { 'package': 'chromeos_internal/apps/help_app/app', - 'version': 'wVUx_McjlwF1WgI1djyi2UMJQGW98jcOAtDAQBFFDe0C', + 'version': 'zSBhFB4y1Nw1ELBcO5mTApyUursIYurPzuCloH4yJs4C', }, ], 'condition': 'checkout_chromeos and checkout_src_internal', @@ -2096,7 +2096,7 @@ 'packages': [ { 'package': 'chromeos_internal/apps/media_app/app', - 'version': 'OUzKO3xCD-kMCiuWqnKuUaVT4dgMTYSTGlw_U2yEZ8AC', + 'version': '6r37UYR8-zXiUmWZyd6BGP6k5_z9HZDyQI155UfO2iIC', }, ], 'condition': 'checkout_chromeos and checkout_src_internal',
diff --git a/android_webview/variables.gni b/android_webview/variables.gni index c7bc8d1..0b7e34d 100644 --- a/android_webview/variables.gni +++ b/android_webview/variables.gni
@@ -18,6 +18,7 @@ "//android_webview:platform_service_bridge_upstream_implementation_java", "//android_webview/nonembedded:icon_resources", "//components/environment_integrity/android:integrity_service_bridge_public_impl_java", + "//content/public/android:identity_credentials_public_impl_java", ] if (webview_includes_weblayer) {
diff --git a/ash/app_list/views/app_list_view_pixeltest.cc b/ash/app_list/views/app_list_view_pixeltest.cc index 2388234..cb3a137 100644 --- a/ash/app_list/views/app_list_view_pixeltest.cc +++ b/ash/app_list/views/app_list_view_pixeltest.cc
@@ -362,7 +362,7 @@ TEST_P(AppListViewTabletPixelTest, Basic) { EXPECT_TRUE(GetPixelDiffer()->CompareUiComponentsOnPrimaryScreen( "tablet_launcher_basics", - /*revision_number=*/IsJellyEnabled() ? 5 : 4, + /*revision_number=*/IsJellyEnabled() ? 6 : 5, GetAppListTestHelper()->GetAppsContainerView())); } @@ -406,7 +406,7 @@ EXPECT_TRUE(GetPixelDiffer()->CompareUiComponentsOnPrimaryScreen( "tablet_launcher_bottom_gradient_zone", - /*revision_number=*/IsJellyEnabled() ? 5 : 4, + /*revision_number=*/IsJellyEnabled() ? 6 : 5, GetAppListTestHelper()->GetAppsContainerView())); }
diff --git a/ash/glanceables/glanceables_v2_controller.cc b/ash/glanceables/glanceables_v2_controller.cc index e3fe10d4..07c9ba1b 100644 --- a/ash/glanceables/glanceables_v2_controller.cc +++ b/ash/glanceables/glanceables_v2_controller.cc
@@ -4,11 +4,11 @@ #include "ash/glanceables/glanceables_v2_controller.h" -#include "ash/constants/ash_features.h" #include "ash/constants/ash_pref_names.h" #include "ash/glanceables/classroom/glanceables_classroom_client.h" #include "ash/glanceables/tasks/glanceables_tasks_client.h" #include "ash/public/cpp/session/session_controller.h" +#include "ash/system/unified/classroom_bubble_student_view.h" #include "base/check.h" #include "components/account_id/account_id.h" #include "components/prefs/pref_registry_simple.h" @@ -29,6 +29,7 @@ void GlanceablesV2Controller::RegisterUserProfilePrefs( PrefRegistrySimple* registry) { registry->RegisterBooleanPref(prefs::kGlanceablesEnabled, true); + ClassroomBubbleStudentView::RegisterUserProfilePrefs(registry); } void GlanceablesV2Controller::OnActiveUserSessionChanged(
diff --git a/ash/login/ui/lock_contents_view.cc b/ash/login/ui/lock_contents_view.cc index 6075ee9..9b3d2864 100644 --- a/ash/login/ui/lock_contents_view.cc +++ b/ash/login/ui/lock_contents_view.cc
@@ -285,8 +285,9 @@ label_->SetText(message); SetPaintToLayer(); - layer()->SetBackgroundBlur(ColorProvider::kBackgroundBlurSigma); layer()->SetFillsBoundsOpaquely(false); + layer()->SetBackgroundBlur(ColorProvider::kBackgroundBlurSigma); + layer()->SetBackdropFilterQuality(ColorProvider::kBackgroundBlurQuality); SetBackground(views::CreateThemedRoundedRectBackground( kColorAshShieldAndBase80, kBubbleBorderRadius));
diff --git a/ash/login/ui/login_base_bubble_view.cc b/ash/login/ui/login_base_bubble_view.cc index d27d6818..83eb5dd 100644 --- a/ash/login/ui/login_base_bubble_view.cc +++ b/ash/login/ui/login_base_bubble_view.cc
@@ -177,8 +177,9 @@ } // Layer rendering is needed for animation. SetPaintToLayer(); - layer()->SetBackgroundBlur(ColorProvider::kBackgroundBlurSigma); layer()->SetFillsBoundsOpaquely(false); + layer()->SetBackgroundBlur(ColorProvider::kBackgroundBlurSigma); + layer()->SetBackdropFilterQuality(ColorProvider::kBackgroundBlurQuality); } LoginBaseBubbleView::~LoginBaseBubbleView() = default;
diff --git a/ash/quick_pair/companion_app/BUILD.gn b/ash/quick_pair/companion_app/BUILD.gn index 187b37eb..70184e1 100644 --- a/ash/quick_pair/companion_app/BUILD.gn +++ b/ash/quick_pair/companion_app/BUILD.gn
@@ -11,14 +11,37 @@ output_name = "quick_pair_companion_app" sources = [ + "companion_app_broker.h", + "companion_app_broker_impl.cc", + "companion_app_broker_impl.h", + "companion_app_installer.h", "companion_app_parser.cc", "companion_app_parser.h", ] deps = [ + "//ash/constants", + "//ash/public/cpp:cpp", "//ash/quick_pair/common", "//ash/quick_pair/repository", "//base", + "//url", + ] +} + +static_library("test_support") { + testonly = true + + sources = [ + "mock_companion_app_broker.cc", + "mock_companion_app_broker.h", + ] + + deps = [ + ":companion_app", + "//base", + "//base/test:test_support", + "//testing/gtest", ] }
diff --git a/ash/quick_pair/companion_app/companion_app_broker.h b/ash/quick_pair/companion_app/companion_app_broker.h new file mode 100644 index 0000000..1820d22 --- /dev/null +++ b/ash/quick_pair/companion_app/companion_app_broker.h
@@ -0,0 +1,45 @@ +// 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 ASH_QUICK_PAIR_COMPANION_APP_COMPANION_APP_BROKER_H_ +#define ASH_QUICK_PAIR_COMPANION_APP_COMPANION_APP_BROKER_H_ + +#include "ash/quick_pair/common/device.h" +#include "base/memory/scoped_refptr.h" +#include "base/observer_list_types.h" + +namespace ash { +namespace quick_pair { + +class CompanionAppBroker { + public: + class Observer : public base::CheckedObserver { + public: + virtual void ShowInstallCompanionApp(scoped_refptr<Device> device) = 0; + virtual void ShowLaunchCompanionApp(scoped_refptr<Device> device) = 0; + virtual void OnCompanionAppInstalled(scoped_refptr<Device> device) = 0; + }; + + virtual ~CompanionAppBroker() = default; + + virtual void AddObserver(Observer* observer) = 0; + virtual void RemoveObserver(Observer* observer) = 0; + + // Depending on whether the companion app is (a) available and + // (b) installed, call observers to ShowInstall/ShowLaunchCompanionApp. + // Returns true if a companion app is available OR installed, causing a + // notification to be shown; false if no notification was shown. + virtual bool MaybeShowCompanionAppActions(scoped_refptr<Device> device) = 0; + + // Install the companion app for this device if not already installed. + virtual void InstallCompanionApp(scoped_refptr<Device> device) = 0; + + // Launch an already-installed companion app. + virtual void LaunchCompanionApp(scoped_refptr<Device> device) = 0; +}; + +} // namespace quick_pair +} // namespace ash + +#endif // ASH_QUICK_PAIR_COMPANION_APP_COMPANION_APP_BROKER_H_
diff --git a/ash/quick_pair/companion_app/companion_app_broker_impl.cc b/ash/quick_pair/companion_app/companion_app_broker_impl.cc new file mode 100644 index 0000000..94eeb77 --- /dev/null +++ b/ash/quick_pair/companion_app/companion_app_broker_impl.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 "ash/quick_pair/companion_app/companion_app_broker_impl.h" + +#include <set> +#include <string> + +#include "ash/constants/ash_features.h" +#include "ash/public/cpp/new_window_delegate.h" +#include "url/gurl.h" + +namespace ash { +namespace quick_pair { + +CompanionAppBrokerImpl::CompanionAppBrokerImpl() {} + +CompanionAppBrokerImpl::~CompanionAppBrokerImpl() = default; + +void CompanionAppBrokerImpl::AddObserver(Observer* observer) { + observers_.AddObserver(observer); +} + +void CompanionAppBrokerImpl::RemoveObserver(Observer* observer) { + observers_.RemoveObserver(observer); +} + +bool CompanionAppBrokerImpl::MaybeShowCompanionAppActions( + scoped_refptr<Device> device) { + CHECK(features::IsFastPairPwaCompanionEnabled()); + + const auto metadata_id = device->metadata_id(); + std::set<std::string> target_ids{ + "08A97F", "5A36A5", "6EDAF7", "9ADB11", "A7D7A0", "C8E228", + "D87A3E", "F2020E", "F58DE7", "30346C", "7862CE", + }; + + if (!target_ids.contains(metadata_id)) { + return false; + } + + for (auto& observer : observers_) { + observer.ShowLaunchCompanionApp(device); + } + return true; +} + +// TODO(b/274973687): Implement this function +void CompanionAppBrokerImpl::InstallCompanionApp(scoped_refptr<Device> device) { +} + +void CompanionAppBrokerImpl::LaunchCompanionApp(scoped_refptr<Device> device) { + CHECK(features::IsFastPairPwaCompanionEnabled()); + + NewWindowDelegate::GetPrimary()->OpenUrl( + GURL("https://www.google.com/"), + NewWindowDelegate::OpenUrlFrom::kUserInteraction, + NewWindowDelegate::Disposition::kNewForegroundTab); +} + +} // namespace quick_pair +} // namespace ash
diff --git a/ash/quick_pair/companion_app/companion_app_broker_impl.h b/ash/quick_pair/companion_app/companion_app_broker_impl.h new file mode 100644 index 0000000..703585a --- /dev/null +++ b/ash/quick_pair/companion_app/companion_app_broker_impl.h
@@ -0,0 +1,36 @@ +// 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 ASH_QUICK_PAIR_COMPANION_APP_COMPANION_APP_BROKER_IMPL_H_ +#define ASH_QUICK_PAIR_COMPANION_APP_COMPANION_APP_BROKER_IMPL_H_ + +#include "ash/quick_pair/companion_app/companion_app_broker.h" + +#include "base/observer_list.h" + +namespace ash { +namespace quick_pair { + +class CompanionAppBrokerImpl : public CompanionAppBroker { + public: + CompanionAppBrokerImpl(); + CompanionAppBrokerImpl(const CompanionAppBrokerImpl&) = delete; + CompanionAppBrokerImpl& operator=(const CompanionAppBrokerImpl&) = delete; + ~CompanionAppBrokerImpl() override; + + // CompanionAppBroker: + void AddObserver(Observer* observer) override; + void RemoveObserver(Observer* observer) override; + bool MaybeShowCompanionAppActions(scoped_refptr<Device> device) override; + void InstallCompanionApp(scoped_refptr<Device> device) override; + void LaunchCompanionApp(scoped_refptr<Device> device) override; + + private: + base::ObserverList<Observer> observers_; +}; + +} // namespace quick_pair +} // namespace ash + +#endif // ASH_QUICK_PAIR_COMPANION_APP_COMPANION_APP_BROKER_IMPL_H_
diff --git a/ash/quick_pair/companion_app/companion_app_installer.h b/ash/quick_pair/companion_app/companion_app_installer.h new file mode 100644 index 0000000..3038d68 --- /dev/null +++ b/ash/quick_pair/companion_app/companion_app_installer.h
@@ -0,0 +1,23 @@ +// 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 ASH_QUICK_PAIR_COMPANION_APP_COMPANION_APP_INSTALLER_H_ +#define ASH_QUICK_PAIR_COMPANION_APP_COMPANION_APP_INSTALLER_H_ + +namespace ash { +namespace quick_pair { + +// CompanionAppInstaller downloads and installs the device's companion app +class CompanionAppInstaller { + public: + CompanionAppInstaller(); + CompanionAppInstaller(const CompanionAppInstaller&) = delete; + CompanionAppInstaller& operator=(const CompanionAppInstaller&) = delete; + ~CompanionAppInstaller(); +}; + +} // namespace quick_pair +} // namespace ash + +#endif // ASH_QUICK_PAIR_COMPANION_APP_COMPANION_APP_INSTALLER_H_
diff --git a/ash/quick_pair/companion_app/mock_companion_app_broker.cc b/ash/quick_pair/companion_app/mock_companion_app_broker.cc new file mode 100644 index 0000000..e868111 --- /dev/null +++ b/ash/quick_pair/companion_app/mock_companion_app_broker.cc
@@ -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. + +#include "ash/quick_pair/companion_app/mock_companion_app_broker.h" + +#include "testing/gmock/include/gmock/gmock.h" + +namespace ash { +namespace quick_pair { + +MockCompanionAppBroker::MockCompanionAppBroker() = default; + +MockCompanionAppBroker::~MockCompanionAppBroker() = default; + +void MockCompanionAppBroker::AddObserver(Observer* observer) { + observers_.AddObserver(observer); +} + +void MockCompanionAppBroker::RemoveObserver(Observer* observer) { + observers_.RemoveObserver(observer); +} + +} // namespace quick_pair +} // namespace ash
diff --git a/ash/quick_pair/companion_app/mock_companion_app_broker.h b/ash/quick_pair/companion_app/mock_companion_app_broker.h new file mode 100644 index 0000000..6e75fa2b --- /dev/null +++ b/ash/quick_pair/companion_app/mock_companion_app_broker.h
@@ -0,0 +1,41 @@ +// 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 ASH_QUICK_PAIR_COMPANION_APP_MOCK_COMPANION_APP_BROKER_H_ +#define ASH_QUICK_PAIR_COMPANION_APP_MOCK_COMPANION_APP_BROKER_H_ + +#include "ash/quick_pair/companion_app/companion_app_broker.h" + +#include "base/observer_list.h" +#include "testing/gmock/include/gmock/gmock.h" + +namespace ash { +namespace quick_pair { + +class MockCompanionAppBroker : public CompanionAppBroker { + public: + MockCompanionAppBroker(); + MockCompanionAppBroker(const MockCompanionAppBroker&) = delete; + MockCompanionAppBroker& operator=(const MockCompanionAppBroker&) = delete; + ~MockCompanionAppBroker() override; + + // CompanionAppBroker: + MOCK_METHOD(bool, + MaybeShowCompanionAppActions, + (scoped_refptr<Device>), + (override)); + MOCK_METHOD(void, InstallCompanionApp, (scoped_refptr<Device>), (override)); + MOCK_METHOD(void, LaunchCompanionApp, (scoped_refptr<Device>), (override)); + + void AddObserver(Observer* observer) override; + void RemoveObserver(Observer* observer) override; + + private: + base::ObserverList<Observer> observers_; +}; + +} // namespace quick_pair +} // namespace ash + +#endif // ASH_QUICK_PAIR_COMPANION_APP_MOCK_COMPANION_APP_BROKER_H_
diff --git a/ash/quick_pair/fast_pair_handshake/async_fast_pair_handshake_lookup_impl_unittest.cc b/ash/quick_pair/fast_pair_handshake/async_fast_pair_handshake_lookup_impl_unittest.cc index c3754534..d690a1d 100644 --- a/ash/quick_pair/fast_pair_handshake/async_fast_pair_handshake_lookup_impl_unittest.cc +++ b/ash/quick_pair/fast_pair_handshake/async_fast_pair_handshake_lookup_impl_unittest.cc
@@ -54,7 +54,7 @@ return fake_fast_pair_gatt_service_client; } - raw_ptr<FakeFastPairGattServiceClient, ExperimentalAsh> + raw_ptr<FakeFastPairGattServiceClient, DanglingUntriaged> fake_fast_pair_gatt_service_client_ = nullptr; };
diff --git a/ash/quick_pair/keyed_service/BUILD.gn b/ash/quick_pair/keyed_service/BUILD.gn index ea478e5..c8d3630 100644 --- a/ash/quick_pair/keyed_service/BUILD.gn +++ b/ash/quick_pair/keyed_service/BUILD.gn
@@ -25,6 +25,7 @@ deps = [ "//ash/public/cpp", "//ash/quick_pair/common", + "//ash/quick_pair/companion_app", "//ash/quick_pair/fast_pair_handshake", "//ash/quick_pair/feature_status_tracker", "//ash/quick_pair/message_stream", @@ -55,6 +56,7 @@ deps = [ ":keyed_service", + "//ash/quick_pair/companion_app", "//ash/quick_pair/fast_pair_handshake", "//ash/quick_pair/feature_status_tracker", "//ash/quick_pair/message_stream", @@ -83,6 +85,8 @@ "//ash/constants:constants", "//ash/quick_pair/common", "//ash/quick_pair/common:test_support", + "//ash/quick_pair/companion_app", + "//ash/quick_pair/companion_app:test_support", "//ash/quick_pair/fast_pair_handshake:test_support", "//ash/quick_pair/feature_status_tracker:test_support", "//ash/quick_pair/message_stream",
diff --git a/ash/quick_pair/keyed_service/fake_quick_pair_mediator_factory.cc b/ash/quick_pair/keyed_service/fake_quick_pair_mediator_factory.cc index d802ad4..507c3c8 100644 --- a/ash/quick_pair/keyed_service/fake_quick_pair_mediator_factory.cc +++ b/ash/quick_pair/keyed_service/fake_quick_pair_mediator_factory.cc
@@ -4,6 +4,7 @@ #include "ash/quick_pair/keyed_service/fake_quick_pair_mediator_factory.h" +#include "ash/quick_pair/companion_app/companion_app_broker_impl.h" #include "ash/quick_pair/feature_status_tracker/quick_pair_feature_status_tracker_impl.h" #include "ash/quick_pair/message_stream/message_stream_lookup_impl.h" #include "ash/quick_pair/pairing/pairer_broker_impl.h" @@ -27,6 +28,7 @@ pairer_broker.get(), message_stream_lookup.get()), std::move(message_stream_lookup), std::move(pairer_broker), std::make_unique<UIBrokerImpl>(), + std::make_unique<CompanionAppBrokerImpl>(), std::make_unique<FakeFastPairRepository>(), std::move(process_manager)); }
diff --git a/ash/quick_pair/keyed_service/quick_pair_mediator.cc b/ash/quick_pair/keyed_service/quick_pair_mediator.cc index 4d254ce..b1a31c5 100644 --- a/ash/quick_pair/keyed_service/quick_pair_mediator.cc +++ b/ash/quick_pair/keyed_service/quick_pair_mediator.cc
@@ -11,6 +11,7 @@ #include "ash/public/cpp/bluetooth_config_service.h" #include "ash/quick_pair/common/device.h" #include "ash/quick_pair/common/logging.h" +#include "ash/quick_pair/companion_app/companion_app_broker_impl.h" #include "ash/quick_pair/fast_pair_handshake/fast_pair_handshake_lookup.h" #include "ash/quick_pair/feature_status_tracker/fast_pair_pref_enabled_provider.h" #include "ash/quick_pair/feature_status_tracker/quick_pair_feature_status_tracker.h" @@ -60,6 +61,7 @@ pairer_broker.get(), message_stream_lookup.get()), std::move(message_stream_lookup), std::move(pairer_broker), std::make_unique<UIBrokerImpl>(), + std::make_unique<CompanionAppBrokerImpl>(), std::make_unique<FastPairRepositoryImpl>(), std::move(process_manager)); } @@ -70,6 +72,7 @@ std::unique_ptr<MessageStreamLookup> message_stream_lookup, std::unique_ptr<PairerBroker> pairer_broker, std::unique_ptr<UIBroker> ui_broker, + std::unique_ptr<CompanionAppBroker> companion_app_broker, std::unique_ptr<FastPairRepository> fast_pair_repository, std::unique_ptr<QuickPairProcessManager> process_manager) : feature_status_tracker_(std::move(feature_status_tracker)), @@ -78,6 +81,7 @@ pairer_broker_(std::move(pairer_broker)), retroactive_pairing_detector_(std::move(retroactive_pairing_detector)), ui_broker_(std::move(ui_broker)), + companion_app_broker_(std::move(companion_app_broker)), fast_pair_repository_(std::move(fast_pair_repository)), process_manager_(std::move(process_manager)), fast_pair_bluetooth_config_delegate_( @@ -90,6 +94,7 @@ std::make_unique<BatteryUpdateMessageHandler>( message_stream_lookup_.get()); feature_status_tracker_observation_.Observe(feature_status_tracker_.get()); + companion_app_broker_observation_.Observe(companion_app_broker_.get()); scanner_broker_observation_.Observe(scanner_broker_.get()); retroactive_pairing_detector_observation_.Observe( retroactive_pairing_detector_.get()); @@ -322,9 +327,16 @@ void Mediator::OnDevicePaired(scoped_refptr<Device> device) { QP_LOG(VERBOSE) << __func__ << ": Device=" << device; ui_broker_->RemoveNotifications(); - device_currently_showing_notification_ = nullptr; scanner_broker_->OnDevicePaired(device); + if (features::IsFastPairPwaCompanionEnabled()) { + if (!companion_app_broker_->MaybeShowCompanionAppActions(device)) { + device_currently_showing_notification_ = nullptr; + } + } else { + device_currently_showing_notification_ = nullptr; + } + // Try saving mac address to model ID mapping one more time. // TODO(b/235117226): we aren't really fetching device images here, // since the images are already saved. We just want to save the mapping @@ -483,7 +495,24 @@ void Mediator::OnCompanionAppAction(scoped_refptr<Device> device, CompanionAppAction action) { + CHECK(features::IsFastPairPwaCompanionEnabled()); + QP_LOG(VERBOSE) << __func__ << ": Device=" << device << ", Action=" << action; + + switch (action) { + case CompanionAppAction::kDownloadAndLaunchApp: + NOTREACHED(); + break; + case CompanionAppAction::kLaunchApp: + ui_broker_->RemoveNotifications(); + companion_app_broker_->LaunchCompanionApp(device); + [[fallthrough]]; + case CompanionAppAction::kDismissedByUser: + [[fallthrough]]; + case CompanionAppAction::kDismissed: + device_currently_showing_notification_ = nullptr; + break; + } } void Mediator::OnAssociateAccountAction(scoped_refptr<Device> device, @@ -512,6 +541,18 @@ } } +// TODO(b/274973687): Implement this function +void Mediator::ShowInstallCompanionApp(scoped_refptr<Device> device) {} + +void Mediator::ShowLaunchCompanionApp(scoped_refptr<Device> device) { + CHECK(features::IsFastPairPwaCompanionEnabled()); + + ui_broker_->ShowCompanionApp(device); +} + +// TODO(b/274973687): Implement this function +void Mediator::OnCompanionAppInstalled(scoped_refptr<Device> device) {} + void Mediator::OnAdapterStateControllerChanged( bluetooth_config::AdapterStateController* adapter_state_controller) { // Always reset the observation first to handle the case where the ptr
diff --git a/ash/quick_pair/keyed_service/quick_pair_mediator.h b/ash/quick_pair/keyed_service/quick_pair_mediator.h index 9ca3ca9..dfce85d 100644 --- a/ash/quick_pair/keyed_service/quick_pair_mediator.h +++ b/ash/quick_pair/keyed_service/quick_pair_mediator.h
@@ -7,6 +7,7 @@ #include <memory> +#include "ash/quick_pair/companion_app/companion_app_broker.h" #include "ash/quick_pair/feature_status_tracker/quick_pair_feature_status_tracker.h" #include "ash/quick_pair/keyed_service/fast_pair_bluetooth_config_delegate.h" #include "ash/quick_pair/pairing/pairer_broker.h" @@ -46,6 +47,7 @@ public ScannerBroker::Observer, public PairerBroker::Observer, public UIBroker::Observer, + public CompanionAppBroker::Observer, public RetroactivePairingDetector::Observer, public FastPairBluetoothConfigDelegate::Delegate, public bluetooth_config::AdapterStateController::Observer, @@ -70,6 +72,7 @@ std::unique_ptr<MessageStreamLookup> message_stream_lookup, std::unique_ptr<PairerBroker> pairer_broker, std::unique_ptr<UIBroker> ui_broker, + std::unique_ptr<CompanionAppBroker> companion_app_broker, std::unique_ptr<FastPairRepository> fast_pair_repository, std::unique_ptr<QuickPairProcessManager> process_manager); Mediator(const Mediator&) = delete; @@ -105,6 +108,11 @@ void OnAssociateAccountAction(scoped_refptr<Device> device, AssociateAccountAction action) override; + // CompanionAppBroker::Observer + void ShowInstallCompanionApp(scoped_refptr<Device> device) override; + void ShowLaunchCompanionApp(scoped_refptr<Device> device) override; + void OnCompanionAppInstalled(scoped_refptr<Device> device) override; + // RetroactivePairingDetector::Observer void OnRetroactivePairFound(scoped_refptr<Device> device) override; @@ -179,6 +187,7 @@ std::unique_ptr<PairerBroker> pairer_broker_; std::unique_ptr<RetroactivePairingDetector> retroactive_pairing_detector_; std::unique_ptr<UIBroker> ui_broker_; + std::unique_ptr<CompanionAppBroker> companion_app_broker_; std::unique_ptr<FastPairRepository> fast_pair_repository_; std::unique_ptr<QuickPairProcessManager> process_manager_; std::unique_ptr<QuickPairMetricsLogger> metrics_logger_; @@ -197,6 +206,8 @@ retroactive_pairing_detector_observation_{this}; base::ScopedObservation<UIBroker, UIBroker::Observer> ui_broker_observation_{ this}; + base::ScopedObservation<CompanionAppBroker, CompanionAppBroker::Observer> + companion_app_broker_observation_{this}; base::ScopedObservation<bluetooth_config::AdapterStateController, bluetooth_config::AdapterStateController::Observer> adapter_state_controller_observation_{this};
diff --git a/ash/quick_pair/keyed_service/quick_pair_mediator_unittest.cc b/ash/quick_pair/keyed_service/quick_pair_mediator_unittest.cc index 27e45a5..40f30b5a 100644 --- a/ash/quick_pair/keyed_service/quick_pair_mediator_unittest.cc +++ b/ash/quick_pair/keyed_service/quick_pair_mediator_unittest.cc
@@ -13,6 +13,7 @@ #include "ash/quick_pair/common/mock_quick_pair_browser_delegate.h" #include "ash/quick_pair/common/pair_failure.h" #include "ash/quick_pair/common/protocol.h" +#include "ash/quick_pair/companion_app/mock_companion_app_broker.h" #include "ash/quick_pair/fast_pair_handshake/fake_fast_pair_handshake.h" #include "ash/quick_pair/fast_pair_handshake/fast_pair_data_encryptor.h" #include "ash/quick_pair/fast_pair_handshake/fast_pair_gatt_service_client.h" @@ -137,6 +138,11 @@ std::unique_ptr<UIBroker> ui_broker = std::make_unique<MockUIBroker>(); mock_ui_broker_ = static_cast<MockUIBroker*>(ui_broker.get()); + std::unique_ptr<CompanionAppBroker> companion_app_broker = + std::make_unique<MockCompanionAppBroker>(); + mock_companion_app_broker_ = + static_cast<MockCompanionAppBroker*>(companion_app_broker.get()); + std::unique_ptr<FastPairRepository> fast_pair_repository = std::make_unique<MockFastPairRepository>(); mock_fast_pair_repository_ = @@ -147,7 +153,8 @@ std::move(tracker), std::move(scanner_broker), std::move(retroactive_pairing_detector), std::make_unique<FakeMessageStreamLookup>(), std::move(pairer_broker), - std::move(ui_broker), std::move(fast_pair_repository), + std::move(ui_broker), std::move(companion_app_broker), + std::move(fast_pair_repository), std::make_unique<QuickPairProcessManagerImpl>()); initial_device_ = base::MakeRefCounted<Device>( @@ -199,6 +206,8 @@ raw_ptr<MockPairerBroker, DanglingUntriaged | ExperimentalAsh> mock_pairer_broker_; raw_ptr<MockUIBroker, DanglingUntriaged | ExperimentalAsh> mock_ui_broker_; + raw_ptr<MockCompanionAppBroker, DanglingUntriaged | ExperimentalAsh> + mock_companion_app_broker_; raw_ptr<MockFastPairRepository, DanglingUntriaged | ExperimentalAsh> mock_fast_pair_repository_; bluetooth_config::FakeAdapterStateController fake_adapter_state_controller_; @@ -626,28 +635,90 @@ initial_device_, AssociateAccountAction::kDismissedByUser); } -TEST_F(MediatorTest, CompanionAppAction_DownloadApp) { +TEST_F(MediatorTest, CompanionAppAction_DownloadApp_Disabled) { + base::test::ScopedFeatureList feature_list; + feature_list.InitWithFeatures( + /*enabled_features=*/{}, + /*disabled_features=*/{ash::features::kFastPairPwaCompanion}); + feature_status_tracker_->SetIsFastPairEnabled(true); - EXPECT_CALL(*mock_pairer_broker_, PairDevice).Times(0); - mock_ui_broker_->NotifyCompanionAppAction( - initial_device_, CompanionAppAction::kDownloadAndLaunchApp); + EXPECT_DEATH_IF_SUPPORTED( + { + mock_ui_broker_->NotifyCompanionAppAction( + initial_device_, CompanionAppAction::kDownloadAndLaunchApp); + }, + ""); } -TEST_F(MediatorTest, CompanionAppAction_LaunchApp) { +TEST_F(MediatorTest, CompanionAppAction_LaunchApp_Disabled) { + base::test::ScopedFeatureList feature_list; + feature_list.InitWithFeatures( + /*enabled_features=*/{}, + /*disabled_features=*/{ash::features::kFastPairPwaCompanion}); + + feature_status_tracker_->SetIsFastPairEnabled(true); + EXPECT_DEATH_IF_SUPPORTED( + { + mock_ui_broker_->NotifyCompanionAppAction( + initial_device_, CompanionAppAction::kLaunchApp); + }, + ""); +} + +TEST_F(MediatorTest, CompanionAppAction_LaunchApp_Enabled) { + base::test::ScopedFeatureList feature_list{ + ash::features::kFastPairPwaCompanion}; + feature_status_tracker_->SetIsFastPairEnabled(true); EXPECT_CALL(*mock_pairer_broker_, PairDevice).Times(0); mock_ui_broker_->NotifyCompanionAppAction(initial_device_, CompanionAppAction::kLaunchApp); } -TEST_F(MediatorTest, CompanionAppAction_DismissedByUser) { +TEST_F(MediatorTest, CompanionAppAction_DismissedByUser_Disabled) { + base::test::ScopedFeatureList feature_list; + feature_list.InitWithFeatures( + /*enabled_features=*/{}, + /*disabled_features=*/{ash::features::kFastPairPwaCompanion}); + + feature_status_tracker_->SetIsFastPairEnabled(true); + EXPECT_DEATH_IF_SUPPORTED( + { + mock_ui_broker_->NotifyCompanionAppAction( + initial_device_, CompanionAppAction::kDismissedByUser); + }, + ""); +} + +TEST_F(MediatorTest, CompanionAppAction_DismissedByUser_Enabled) { + base::test::ScopedFeatureList feature_list{ + ash::features::kFastPairPwaCompanion}; + feature_status_tracker_->SetIsFastPairEnabled(true); EXPECT_CALL(*mock_pairer_broker_, PairDevice).Times(0); mock_ui_broker_->NotifyCompanionAppAction( initial_device_, CompanionAppAction::kDismissedByUser); } -TEST_F(MediatorTest, CompanionAppAction_Dismissed) { +TEST_F(MediatorTest, CompanionAppAction_Dismissed_Disabled) { + base::test::ScopedFeatureList feature_list; + feature_list.InitWithFeatures( + /*enabled_features=*/{}, + /*disabled_features=*/{ash::features::kFastPairPwaCompanion}); + + feature_status_tracker_->SetIsFastPairEnabled(true); + EXPECT_DEATH_IF_SUPPORTED( + { + mock_ui_broker_->NotifyCompanionAppAction( + initial_device_, CompanionAppAction::kDismissed); + }, + ""); +} + +TEST_F(MediatorTest, CompanionAppAction_Dismissed_Enabled) { + base::test::ScopedFeatureList feature_list{ + ash::features::kFastPairPwaCompanion}; + feature_status_tracker_->SetIsFastPairEnabled(true); EXPECT_CALL(*mock_pairer_broker_, PairDevice).Times(0); mock_ui_broker_->NotifyCompanionAppAction(initial_device_, @@ -967,5 +1038,27 @@ /*error=*/absl::nullopt); } +TEST_F(MediatorTest, ShowCompanionApp_OnDevicePaired_Disabled) { + base::test::ScopedFeatureList feature_list; + feature_list.InitWithFeatures( + /*enabled_features=*/{}, + /*disabled_features=*/{ash::features::kFastPairPwaCompanion}); + + feature_status_tracker_->SetIsFastPairEnabled(true); + EXPECT_CALL(*mock_companion_app_broker_, MaybeShowCompanionAppActions) + .Times(0); + mock_pairer_broker_->NotifyDevicePaired(initial_device_); +} + +TEST_F(MediatorTest, ShowCompanionApp_OnDevicePaired_Enabled) { + base::test::ScopedFeatureList feature_list{ + ash::features::kFastPairPwaCompanion}; + + feature_status_tracker_->SetIsFastPairEnabled(true); + EXPECT_CALL(*mock_companion_app_broker_, MaybeShowCompanionAppActions) + .Times(1); + mock_pairer_broker_->NotifyDevicePaired(initial_device_); +} + } // namespace quick_pair } // namespace ash
diff --git a/ash/quick_pair/ui/BUILD.gn b/ash/quick_pair/ui/BUILD.gn index 9a7e99b2..6ac02766 100644 --- a/ash/quick_pair/ui/BUILD.gn +++ b/ash/quick_pair/ui/BUILD.gn
@@ -24,6 +24,7 @@ ] deps = [ + "//ash/constants", "//ash/public/cpp:cpp", "//ash/quick_pair/common", "//ash/quick_pair/proto:fastpair_proto",
diff --git a/ash/quick_pair/ui/fast_pair/fast_pair_notification_controller.cc b/ash/quick_pair/ui/fast_pair/fast_pair_notification_controller.cc index 2e9ae14b..275c459 100644 --- a/ash/quick_pair/ui/fast_pair/fast_pair_notification_controller.cc +++ b/ash/quick_pair/ui/fast_pair/fast_pair_notification_controller.cc
@@ -399,10 +399,6 @@ base::MakeRefCounted<NotificationDelegate>( /*on_primary_click=*/launch_app_callback, /*on_close=*/std::move(on_close))); - application_installed_notification->set_type( - message_center::NOTIFICATION_TYPE_PROGRESS); - application_installed_notification->set_progress( - kInfiniteLoadingProgressValue); application_installed_notification->set_image(device_image); message_center_->AddNotification(
diff --git a/ash/quick_pair/ui/fast_pair/fast_pair_presenter_impl.cc b/ash/quick_pair/ui/fast_pair/fast_pair_presenter_impl.cc index 4a75773..beb06a8 100644 --- a/ash/quick_pair/ui/fast_pair/fast_pair_presenter_impl.cc +++ b/ash/quick_pair/ui/fast_pair/fast_pair_presenter_impl.cc
@@ -443,7 +443,72 @@ } void FastPairPresenterImpl::ShowCompanionApp(scoped_refptr<Device> device, - CompanionAppCallback callback) {} + CompanionAppCallback callback) { + CHECK(features::IsFastPairPwaCompanionEnabled()); + + const auto metadata_id = device->metadata_id(); + FastPairRepository::Get()->GetDeviceMetadata( + metadata_id, + base::BindOnce(&FastPairPresenterImpl::OnCompanionAppMetadataRetrieved, + weak_pointer_factory_.GetWeakPtr(), device, callback)); +} + +void FastPairPresenterImpl::OnCompanionAppMetadataRetrieved( + scoped_refptr<Device> device, + CompanionAppCallback callback, + DeviceMetadata* device_metadata, + bool has_retryable_error) { + CHECK(features::IsFastPairPwaCompanionEnabled()); + + if (!device_metadata) { + return; + } + + std::u16string device_name; + // If the name of the device has been set by the user, use that name, + // otherwise use the OEM default name. + if (device->display_name().has_value()) { + device_name = base::UTF8ToUTF16(device->display_name().value()); + } else { + device_name = base::ASCIIToUTF16(device_metadata->GetDetails().name()); + } + + // Temporarily skipping ShowApplicationAvailableNotification to shortcut to + // companion website. + notification_controller_->ShowApplicationInstalledNotification( + // temporarily hardcoded text in place of companion app name + device_name, device_metadata->image(), u"the web companion", + base::BindRepeating(&FastPairPresenterImpl::OnCompanionAppSetupClicked, + weak_pointer_factory_.GetWeakPtr(), callback), + base::BindOnce(&FastPairPresenterImpl::OnCompanionAppDismissed, + weak_pointer_factory_.GetWeakPtr(), callback)); +} + +void FastPairPresenterImpl::OnCompanionAppSetupClicked( + CompanionAppCallback callback) { + CHECK(features::IsFastPairPwaCompanionEnabled()); + + callback.Run(CompanionAppAction::kLaunchApp); +} + +void FastPairPresenterImpl::OnCompanionAppDismissed( + CompanionAppCallback callback, + FastPairNotificationDismissReason dismiss_reason) { + CHECK(features::IsFastPairPwaCompanionEnabled()); + + switch (dismiss_reason) { + case FastPairNotificationDismissReason::kDismissedByUser: + callback.Run(CompanionAppAction::kDismissedByUser); + break; + case FastPairNotificationDismissReason::kDismissedByOs: + [[fallthrough]]; + case FastPairNotificationDismissReason::kDismissedByTimeout: + callback.Run(CompanionAppAction::kDismissed); + break; + default: + NOTREACHED(); + } +} void FastPairPresenterImpl::RemoveNotifications() { notification_controller_->RemoveNotifications();
diff --git a/ash/quick_pair/ui/fast_pair/fast_pair_presenter_impl.h b/ash/quick_pair/ui/fast_pair/fast_pair_presenter_impl.h index 5bf7aef..10e22fbc 100644 --- a/ash/quick_pair/ui/fast_pair/fast_pair_presenter_impl.h +++ b/ash/quick_pair/ui/fast_pair/fast_pair_presenter_impl.h
@@ -101,6 +101,11 @@ AssociateAccountCallback callback, FastPairNotificationDismissReason dismiss_reason); + void OnCompanionAppSetupClicked(CompanionAppCallback callback); + void OnCompanionAppDismissed( + CompanionAppCallback callback, + FastPairNotificationDismissReason dismiss_reason); + void OnDiscoveryMetadataRetrieved(scoped_refptr<Device> device, DiscoveryCallback callback, DeviceMetadata* device_metadata, @@ -116,6 +121,10 @@ AssociateAccountCallback callback, DeviceMetadata* device_metadata, bool has_retryable_error); + void OnCompanionAppMetadataRetrieved(scoped_refptr<Device> device, + CompanionAppCallback callback, + DeviceMetadata* device_metadata, + bool has_retryable_error); std::unique_ptr<FastPairNotificationController> notification_controller_; base::WeakPtrFactory<FastPairPresenterImpl> weak_pointer_factory_{this};
diff --git a/ash/quick_pair/ui/fast_pair/fast_pair_presenter_impl_unittest.cc b/ash/quick_pair/ui/fast_pair/fast_pair_presenter_impl_unittest.cc index 7a16870..19714af 100644 --- a/ash/quick_pair/ui/fast_pair/fast_pair_presenter_impl_unittest.cc +++ b/ash/quick_pair/ui/fast_pair/fast_pair_presenter_impl_unittest.cc
@@ -53,6 +53,8 @@ "cros_fast_pair_discovery_guest_notification_id"; const char kFastPairDiscoveryUserNotificationId[] = "cros_fast_pair_discovery_user_notification_id"; +const char kFastPairApplicationInstalledNotificationId[] = + "cros_fast_pair_application_installed_notification_id"; const char kFastPairPairingNotificationId[] = "cros_fast_pair_pairing_notification_id"; const char kFastPairAssociateAccountNotificationId[] = @@ -204,6 +206,11 @@ pairing_failed_action_ = action; } + void OnCompanionAppAction(scoped_refptr<Device> device, + CompanionAppAction action) { + companion_app_action_ = action; + } + void OnAssociateAccountAction(scoped_refptr<Device> device, AssociateAccountAction action) { associate_account_action_ = action; @@ -224,6 +231,7 @@ DiscoveryAction discovery_action_; DiscoveryAction secondary_discovery_action_; PairingFailedAction pairing_failed_action_; + CompanionAppAction companion_app_action_; AssociateAccountAction associate_account_action_; TestMessageCenter test_message_center_; scoped_refptr<Device> initially_paired_device_; @@ -1094,6 +1102,144 @@ EXPECT_EQ(pairing_failed_action_, PairingFailedAction::kDismissed); } +TEST_F(FastPairPresenterImplTest, ShowCompanionAppDisabled) { + base::test::ScopedFeatureList feature_list; + feature_list.InitWithFeatures( + /*enabled_features=*/{}, + /*disabled_features=*/{ash::features::kFastPairPwaCompanion}); + + EXPECT_FALSE(test_message_center_.FindVisibleNotificationById( + kFastPairApplicationInstalledNotificationId)); + + SetIdentityManager(identity_manager_); + + Login(user_manager::UserType::USER_TYPE_REGULAR); + base::RunLoop().RunUntilIdle(); + EXPECT_DEATH_IF_SUPPORTED( + { + fast_pair_presenter_->ShowCompanionApp( + initially_paired_device_, + base::BindRepeating( + &FastPairPresenterImplTest::OnCompanionAppAction, + weak_pointer_factory_.GetWeakPtr(), initially_paired_device_)); + }, + ""); +} + +TEST_F(FastPairPresenterImplTest, ShowCompanionAppEnabled) { + base::test::ScopedFeatureList feature_list{ + ash::features::kFastPairPwaCompanion}; + + EXPECT_FALSE(test_message_center_.FindVisibleNotificationById( + kFastPairApplicationInstalledNotificationId)); + + SetIdentityManager(identity_manager_); + + Login(user_manager::UserType::USER_TYPE_REGULAR); + base::RunLoop().RunUntilIdle(); + fast_pair_presenter_->ShowCompanionApp( + initially_paired_device_, + base::BindRepeating(&FastPairPresenterImplTest::OnCompanionAppAction, + weak_pointer_factory_.GetWeakPtr(), + initially_paired_device_)); + base::RunLoop().RunUntilIdle(); + + EXPECT_TRUE(test_message_center_.FindVisibleNotificationById( + kFastPairApplicationInstalledNotificationId)); +} + +TEST_F(FastPairPresenterImplTest, ShowCompanionApp_SetupClicked) { + base::test::ScopedFeatureList feature_list{ + ash::features::kFastPairPwaCompanion}; + + SetIdentityManager(identity_manager_); + Login(user_manager::UserType::USER_TYPE_REGULAR); + base::RunLoop().RunUntilIdle(); + fast_pair_presenter_->ShowCompanionApp( + initially_paired_device_, + base::BindRepeating(&FastPairPresenterImplTest::OnCompanionAppAction, + weak_pointer_factory_.GetWeakPtr(), + initially_paired_device_)); + base::RunLoop().RunUntilIdle(); + + EXPECT_TRUE(test_message_center_.FindVisibleNotificationById( + kFastPairApplicationInstalledNotificationId)); + test_message_center_.ClickOnNotificationButton( + /*id=*/kFastPairApplicationInstalledNotificationId, /*button_index=*/0); + base::RunLoop().RunUntilIdle(); + + EXPECT_EQ(companion_app_action_, CompanionAppAction::kLaunchApp); +} + +TEST_F(FastPairPresenterImplTest, ShowCompanionApp_NoDeviceMetadata) { + base::test::ScopedFeatureList feature_list{ + ash::features::kFastPairPwaCompanion}; + + EXPECT_FALSE(test_message_center_.FindVisibleNotificationById( + kFastPairApplicationInstalledNotificationId)); + + SetIdentityManager(identity_manager_); + repository_->ClearFakeMetadata(kValidModelId); + + Login(user_manager::UserType::USER_TYPE_REGULAR); + base::RunLoop().RunUntilIdle(); + fast_pair_presenter_->ShowCompanionApp( + initially_paired_device_, + base::BindRepeating(&FastPairPresenterImplTest::OnCompanionAppAction, + weak_pointer_factory_.GetWeakPtr(), + initially_paired_device_)); + base::RunLoop().RunUntilIdle(); + + EXPECT_FALSE(test_message_center_.FindVisibleNotificationById( + kFastPairApplicationInstalledNotificationId)); +} + +TEST_F(FastPairPresenterImplTest, ShowCompanionApp_DismissedByUser) { + base::test::ScopedFeatureList feature_list{ + ash::features::kFastPairPwaCompanion}; + + SetIdentityManager(identity_manager_); + Login(user_manager::UserType::USER_TYPE_REGULAR); + base::RunLoop().RunUntilIdle(); + fast_pair_presenter_->ShowCompanionApp( + initially_paired_device_, + base::BindRepeating(&FastPairPresenterImplTest::OnCompanionAppAction, + weak_pointer_factory_.GetWeakPtr(), + initially_paired_device_)); + base::RunLoop().RunUntilIdle(); + + EXPECT_TRUE(test_message_center_.FindVisibleNotificationById( + kFastPairApplicationInstalledNotificationId)); + test_message_center_.Close( + /*id=*/kFastPairApplicationInstalledNotificationId, /*by_user=*/true); + base::RunLoop().RunUntilIdle(); + + EXPECT_EQ(companion_app_action_, CompanionAppAction::kDismissedByUser); +} + +TEST_F(FastPairPresenterImplTest, ShowCompanionApp_DismissedByOS) { + base::test::ScopedFeatureList feature_list{ + ash::features::kFastPairPwaCompanion}; + + SetIdentityManager(identity_manager_); + Login(user_manager::UserType::USER_TYPE_REGULAR); + base::RunLoop().RunUntilIdle(); + fast_pair_presenter_->ShowCompanionApp( + initially_paired_device_, + base::BindRepeating(&FastPairPresenterImplTest::OnCompanionAppAction, + weak_pointer_factory_.GetWeakPtr(), + initially_paired_device_)); + base::RunLoop().RunUntilIdle(); + + EXPECT_TRUE(test_message_center_.FindVisibleNotificationById( + kFastPairApplicationInstalledNotificationId)); + test_message_center_.Close( + /*id=*/kFastPairApplicationInstalledNotificationId, /*by_user=*/false); + base::RunLoop().RunUntilIdle(); + + EXPECT_EQ(companion_app_action_, CompanionAppAction::kDismissed); +} + TEST_F(FastPairPresenterImplTest, ShowAssociateAccount) { EXPECT_FALSE(test_message_center_.FindVisibleNotificationById( kFastPairAssociateAccountNotificationId));
diff --git a/ash/quick_pair/ui/ui_broker_impl.cc b/ash/quick_pair/ui/ui_broker_impl.cc index a7ef102..c3ea3d9 100644 --- a/ash/quick_pair/ui/ui_broker_impl.cc +++ b/ash/quick_pair/ui/ui_broker_impl.cc
@@ -6,6 +6,7 @@ #include <memory> +#include "ash/constants/ash_features.h" #include "ash/quick_pair/common/device.h" #include "ash/quick_pair/common/protocol.h" #include "ash/quick_pair/ui/actions.h" @@ -89,6 +90,8 @@ } void UIBrokerImpl::ShowCompanionApp(scoped_refptr<Device> device) { + CHECK(features::IsFastPairPwaCompanionEnabled()); + switch (device->protocol()) { case Protocol::kFastPairInitial: case Protocol::kFastPairRetroactive:
diff --git a/ash/quick_pair/ui/ui_broker_impl_unittest.cc b/ash/quick_pair/ui/ui_broker_impl_unittest.cc index 8cd8ff7..b1f7634 100644 --- a/ash/quick_pair/ui/ui_broker_impl_unittest.cc +++ b/ash/quick_pair/ui/ui_broker_impl_unittest.cc
@@ -4,6 +4,7 @@ #include "ash/quick_pair/ui/ui_broker_impl.h" +#include "ash/constants/ash_features.h" #include "ash/quick_pair/common/constants.h" #include "ash/quick_pair/common/device.h" #include "ash/quick_pair/ui/fast_pair/fast_pair_presenter.h" @@ -12,6 +13,7 @@ #include "ash/test/ash_test_base.h" #include "base/memory/raw_ptr.h" #include "base/memory/scoped_refptr.h" +#include "base/test/scoped_feature_list.h" #include "testing/gtest/include/gtest/gtest.h" #include "ui/message_center/message_center.h" @@ -236,7 +238,21 @@ EXPECT_EQ(associate_account_action_, AssociateAccountAction::kLearnMore); } -TEST_F(UIBrokerImplTest, ShowCompanionApp_Initial) { +TEST_F(UIBrokerImplTest, ShowCompanionApp_Initial_Disabled) { + base::test::ScopedFeatureList feature_list; + feature_list.InitWithFeatures( + /*enabled_features=*/{}, + /*disabled_features=*/{ash::features::kFastPairPwaCompanion}); + + auto device = base::MakeRefCounted<Device>(kValidModelId, kTestDeviceAddress, + Protocol::kFastPairInitial); + EXPECT_DEATH_IF_SUPPORTED({ ui_broker_->ShowCompanionApp(device); }, ""); +} + +TEST_F(UIBrokerImplTest, ShowCompanionApp_Initial_Enabled) { + base::test::ScopedFeatureList feature_list{ + ash::features::kFastPairPwaCompanion}; + auto device = base::MakeRefCounted<Device>(kValidModelId, kTestDeviceAddress, Protocol::kFastPairInitial); ui_broker_->ShowCompanionApp(device); @@ -245,7 +261,21 @@ EXPECT_EQ(companion_app_action_, CompanionAppAction::kDownloadAndLaunchApp); } -TEST_F(UIBrokerImplTest, ShowCompanionApp_Subsequent) { +TEST_F(UIBrokerImplTest, ShowCompanionApp_Subsequent_Disabled) { + base::test::ScopedFeatureList feature_list; + feature_list.InitWithFeatures( + /*enabled_features=*/{}, + /*disabled_features=*/{ash::features::kFastPairPwaCompanion}); + + auto device = base::MakeRefCounted<Device>(kValidModelId, kTestDeviceAddress, + Protocol::kFastPairSubsequent); + EXPECT_DEATH_IF_SUPPORTED({ ui_broker_->ShowCompanionApp(device); }, ""); +} + +TEST_F(UIBrokerImplTest, ShowCompanionApp_Subsequent_Enabled) { + base::test::ScopedFeatureList feature_list{ + ash::features::kFastPairPwaCompanion}; + auto device = base::MakeRefCounted<Device>(kValidModelId, kTestDeviceAddress, Protocol::kFastPairSubsequent); ui_broker_->ShowCompanionApp(device); @@ -254,7 +284,21 @@ EXPECT_EQ(companion_app_action_, CompanionAppAction::kDownloadAndLaunchApp); } -TEST_F(UIBrokerImplTest, ShowCompanionApp_Retroactive) { +TEST_F(UIBrokerImplTest, ShowCompanionApp_Retroactive_Disabled) { + base::test::ScopedFeatureList feature_list; + feature_list.InitWithFeatures( + /*enabled_features=*/{}, + /*disabled_features=*/{ash::features::kFastPairPwaCompanion}); + + auto device = base::MakeRefCounted<Device>(kValidModelId, kTestDeviceAddress, + Protocol::kFastPairRetroactive); + EXPECT_DEATH_IF_SUPPORTED({ ui_broker_->ShowCompanionApp(device); }, ""); +} + +TEST_F(UIBrokerImplTest, ShowCompanionApp_Retroactive_Enabled) { + base::test::ScopedFeatureList feature_list{ + ash::features::kFastPairPwaCompanion}; + auto device = base::MakeRefCounted<Device>(kValidModelId, kTestDeviceAddress, Protocol::kFastPairRetroactive); ui_broker_->ShowCompanionApp(device);
diff --git a/ash/shelf/home_button.cc b/ash/shelf/home_button.cc index feb023c..62112f7 100644 --- a/ash/shelf/home_button.cc +++ b/ash/shelf/home_button.cc
@@ -190,6 +190,7 @@ void UpdateForShelfConfigChange() { layer()->SetBackgroundBlur( ShelfConfig::Get()->GetShelfControlButtonBlurRadius()); + layer()->SetBackdropFilterQuality(ColorProvider::kBackgroundBlurQuality); UpdateBackground(); }
diff --git a/ash/shelf/hotseat_widget.cc b/ash/shelf/hotseat_widget.cc index 1576170..0b1caa7 100644 --- a/ash/shelf/hotseat_widget.cc +++ b/ash/shelf/hotseat_widget.cc
@@ -651,8 +651,11 @@ const int blur_radius = enable_blur ? ShelfConfig::Get()->shelf_blur_radius() : 0; - if (translucent_background_->layer()->background_blur() != blur_radius) + if (translucent_background_->layer()->background_blur() != blur_radius) { translucent_background_->layer()->SetBackgroundBlur(blur_radius); + translucent_background_->layer()->SetBackdropFilterQuality( + ColorProvider::kBackgroundBlurQuality); + } } void HotseatWidget::DelegateView::OnHotseatTransitionAnimationWillStart(
diff --git a/ash/shelf/shelf_navigation_widget.cc b/ash/shelf/shelf_navigation_widget.cc index 01bd9d90..5166c06 100644 --- a/ash/shelf/shelf_navigation_widget.cc +++ b/ash/shelf/shelf_navigation_widget.cc
@@ -485,7 +485,8 @@ gfx::Size nav_size = CalculateIdealSize(/*only_visible_area=*/false); if (shelf_->IsHorizontalAlignment() && base::i18n::IsRTL()) { - nav_origin.set_x(shelf_->shelf_widget()->GetTargetBounds().size().width() - + nav_origin.set_x(shelf_origin.x() + + shelf_->shelf_widget()->GetTargetBounds().size().width() - nav_size.width()); } target_bounds_ = gfx::Rect(nav_origin, nav_size);
diff --git a/ash/style/combobox.cc b/ash/style/combobox.cc index 766d341..975066d 100644 --- a/ash/style/combobox.cc +++ b/ash/style/combobox.cc
@@ -35,9 +35,11 @@ #include "ui/views/controls/label.h" #include "ui/views/controls/scroll_view.h" #include "ui/views/highlight_border.h" -#include "ui/views/layout/box_layout.h" #include "ui/views/layout/fill_layout.h" +#include "ui/views/layout/flex_layout.h" +#include "ui/views/layout/flex_layout_types.h" #include "ui/views/mouse_constants.h" +#include "ui/views/view_class_properties.h" #include "ui/views/widget/widget.h" #include "ui/wm/core/coordinate_conversion.h" @@ -295,9 +297,14 @@ OnComboboxModelChanged(model_); // Set up layout. - SetLayoutManager(std::make_unique<views::BoxLayout>( - /*orientation=*/views::BoxLayout::Orientation::kHorizontal, - /*inside_border_insets=*/kComboboxBorderInsets)); + auto* const layout = SetLayoutManager(std::make_unique<views::FlexLayout>()); + layout->SetInteriorMargin(kComboboxBorderInsets); + // Allow `title_` to shrink and elide, so that `drop_down_arrow_` on the + // right always remains visible. + title_->SetProperty( + views::kFlexBehaviorKey, + views::FlexSpecification(views::MinimumFlexSizeRule::kScaleToZero, + views::MaximumFlexSizeRule::kUnbounded)); // Stylize the title. TypographyProvider::Get()->StyleLabel(TypographyToken::kCrosTitle1,
diff --git a/ash/system/power/power_button_menu_curtain_view.cc b/ash/system/power/power_button_menu_curtain_view.cc index 56a56521..8bfb87a 100644 --- a/ash/system/power/power_button_menu_curtain_view.cc +++ b/ash/system/power/power_button_menu_curtain_view.cc
@@ -92,7 +92,8 @@ layer()->SetFillsBoundsOpaquely(false); layer()->SetRoundedCornerRadius( gfx::RoundedCornersF(kPowerButtonMenuCornerRadius)); - layer()->SetBackgroundBlur(kPowerButtonMenuBlurType); + layer()->SetBackgroundBlur(ColorProvider::kBackgroundBlurSigma); + layer()->SetBackdropFilterQuality(ColorProvider::kBackgroundBlurQuality); GetViewAccessibility().OverrideRole(ax::mojom::Role::kDialog); Initialize();
diff --git a/ash/system/power/power_button_menu_view.cc b/ash/system/power/power_button_menu_view.cc index 855d9731..800e189 100644 --- a/ash/system/power/power_button_menu_view.cc +++ b/ash/system/power/power_button_menu_view.cc
@@ -70,7 +70,7 @@ layer()->SetRoundedCornerRadius( gfx::RoundedCornersF(kPowerButtonMenuCornerRadius)); if (features::IsBackgroundBlurEnabled()) { - layer()->SetBackgroundBlur(kPowerButtonMenuBlurType); + layer()->SetBackgroundBlur(ColorProvider::kBackgroundBlurSigma); layer()->SetBackdropFilterQuality(ColorProvider::kBackgroundBlurQuality); } GetViewAccessibility().OverrideRole(ax::mojom::Role::kMenu);
diff --git a/ash/system/power/power_button_menu_view_util.h b/ash/system/power/power_button_menu_view_util.h index 97c4227..91805e6f 100644 --- a/ash/system/power/power_button_menu_view_util.h +++ b/ash/system/power/power_button_menu_view_util.h
@@ -32,9 +32,6 @@ // The color id for widget background. constexpr auto kPowerButtonMenuBackgroundColorId = kColorAshShieldAndBase80; -// The blur type for widget background. -constexpr auto kPowerButtonMenuBlurType = ColorProvider::kBackgroundBlurSigma; - void SetLayerAnimation(ui::Layer* layer, ui::ImplicitAnimationObserver* observer, bool show,
diff --git a/ash/system/unified/classroom_bubble_base_view.cc b/ash/system/unified/classroom_bubble_base_view.cc index ad12893..04383cc28 100644 --- a/ash/system/unified/classroom_bubble_base_view.cc +++ b/ash/system/unified/classroom_bubble_base_view.cc
@@ -79,7 +79,6 @@ std::make_unique<Combobox>(std::move(combobox_model))); combo_box_view_->SetID( base::to_underlying(GlanceablesViewId::kClassroomBubbleComboBox)); - combo_box_view_->SetSelectedIndex(0); combo_box_view_->SetTooltipText(l10n_util::GetStringUTF16( IDS_GLANCEABLES_CLASSROOM_DROPDOWN_ACCESSIBLE_NAME)); combo_box_view_->SetAccessibleDescription(u"");
diff --git a/ash/system/unified/classroom_bubble_student_view.cc b/ash/system/unified/classroom_bubble_student_view.cc index 91816d6..328fbdae 100644 --- a/ash/system/unified/classroom_bubble_student_view.cc +++ b/ash/system/unified/classroom_bubble_student_view.cc
@@ -4,6 +4,7 @@ #include "ash/system/unified/classroom_bubble_student_view.h" +#include <algorithm> #include <array> #include <memory> #include <utility> @@ -18,9 +19,12 @@ #include "base/check.h" #include "base/functional/bind.h" #include "base/strings/string_piece_forward.h" +#include "base/types/cxx23_to_underlying.h" +#include "components/prefs/pref_registry_simple.h" +#include "components/prefs/pref_service.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/metadata/metadata_impl_macros.h" -#include "ui/views/controls/combobox/combobox.h" +#include "ui/base/models/combobox_model.h" #include "ui/views/controls/label.h" #include "url/gurl.h" @@ -61,6 +65,9 @@ constexpr char kClassroomWebUIDoneUrl[] = "https://classroom.google.com/u/0/a/turned-in/all"; +const char kLastSelectedAssignmentsListPref[] = + "ash.glanceables.classroom.student.last_selected_assignments_list"; + std::u16string GetAssignmentListName(size_t index) { CHECK(index >= 0 || index < kStudentAssignmentsListTypeOrdered.size()); @@ -87,7 +94,17 @@ return GetAssignmentListName(index); } - absl::optional<size_t> GetDefaultIndex() const override { return 0; } + absl::optional<size_t> GetDefaultIndex() const override { + const auto selected_list_type = static_cast<StudentAssignmentsListType>( + Shell::Get()->session_controller()->GetActivePrefService()->GetInteger( + kLastSelectedAssignmentsListPref)); + const auto* const iter = + std::find(kStudentAssignmentsListTypeOrdered.begin(), + kStudentAssignmentsListTypeOrdered.end(), selected_list_type); + return iter != kStudentAssignmentsListTypeOrdered.end() + ? iter - kStudentAssignmentsListTypeOrdered.begin() + : 0; + } }; } // namespace @@ -106,6 +123,14 @@ ClassroomBubbleStudentView::~ClassroomBubbleStudentView() = default; +// static +void ClassroomBubbleStudentView::RegisterUserProfilePrefs( + PrefRegistrySimple* registry) { + registry->RegisterIntegerPref( + kLastSelectedAssignmentsListPref, + base::to_underlying(StudentAssignmentsListType::kAssigned)); +} + void ClassroomBubbleStudentView::OnSeeAllPressed() { CHECK(combo_box_view_->GetSelectedIndex()); const auto selected_index = combo_box_view_->GetSelectedIndex().value(); @@ -138,6 +163,10 @@ CHECK(selected_index >= 0 || selected_index < kStudentAssignmentsListTypeOrdered.size()); + Shell::Get()->session_controller()->GetActivePrefService()->SetInteger( + kLastSelectedAssignmentsListPref, + base::to_underlying(kStudentAssignmentsListTypeOrdered[selected_index])); + // Cancel any old pending assignment requests. weak_ptr_factory_.InvalidateWeakPtrs();
diff --git a/ash/system/unified/classroom_bubble_student_view.h b/ash/system/unified/classroom_bubble_student_view.h index 0c3b1c94..73ced148 100644 --- a/ash/system/unified/classroom_bubble_student_view.h +++ b/ash/system/unified/classroom_bubble_student_view.h
@@ -7,6 +7,8 @@ #include "ash/system/unified/classroom_bubble_base_view.h" +class PrefRegistrySimple; + namespace ash { // class ClassroomBubbleStudentView : public views::View { @@ -20,6 +22,9 @@ delete; ~ClassroomBubbleStudentView() override; + // Registers syncable user profile prefs with the specified `registry`. + static void RegisterUserProfilePrefs(PrefRegistrySimple* registry); + private: // ClassroomBubbleBaseView: void OnSeeAllPressed() override;
diff --git a/ash/system/unified/classroom_bubble_view_unittest.cc b/ash/system/unified/classroom_bubble_view_unittest.cc index dfa93d6..e2edb4ba 100644 --- a/ash/system/unified/classroom_bubble_view_unittest.cc +++ b/ash/system/unified/classroom_bubble_view_unittest.cc
@@ -24,6 +24,7 @@ #include "base/test/scoped_feature_list.h" #include "base/types/cxx23_to_underlying.h" #include "components/account_id/account_id.h" +#include "components/prefs/pref_service.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" #include "third_party/abseil-cpp/absl/types/optional.h" @@ -180,6 +181,14 @@ view_ = widget_->SetContentsView( std::make_unique<ClassroomBubbleStudentView>(&detailed_view_delegate_)); } + + int GetLastSelectedAssignmentsListPrefValue() const { + return Shell::Get() + ->session_controller() + ->GetActivePrefService() + ->GetInteger( + "ash.glanceables.classroom.student.last_selected_assignments_list"); + } }; class ClassroomBubbleTeacherViewTest : public ClassroomBubbleViewTest { @@ -227,21 +236,25 @@ ASSERT_TRUE(combobox_view->GetSelectedIndex()); EXPECT_EQ(0u, *combobox_view->GetSelectedIndex()); EXPECT_EQ(u"Due soon", combobox_view->GetTextForRow(0u)); + EXPECT_EQ(0, GetLastSelectedAssignmentsListPrefValue()); PressAndReleaseKey(ui::KeyboardCode::VKEY_DOWN); ASSERT_TRUE(combobox_view->GetSelectedIndex()); EXPECT_EQ(1u, *combobox_view->GetSelectedIndex()); EXPECT_EQ(u"No due date", combobox_view->GetTextForRow(1u)); + EXPECT_EQ(1, GetLastSelectedAssignmentsListPrefValue()); PressAndReleaseKey(ui::KeyboardCode::VKEY_DOWN); ASSERT_TRUE(combobox_view->GetSelectedIndex()); EXPECT_EQ(2u, *combobox_view->GetSelectedIndex()); EXPECT_EQ(u"Missing", combobox_view->GetTextForRow(2u)); + EXPECT_EQ(2, GetLastSelectedAssignmentsListPrefValue()); PressAndReleaseKey(ui::KeyboardCode::VKEY_DOWN); ASSERT_TRUE(combobox_view->GetSelectedIndex()); EXPECT_EQ(3u, *combobox_view->GetSelectedIndex()); EXPECT_EQ(u"Done", combobox_view->GetTextForRow(3u)); + EXPECT_EQ(3, GetLastSelectedAssignmentsListPrefValue()); PressAndReleaseKey(ui::KeyboardCode::VKEY_DOWN); ASSERT_TRUE(combobox_view->GetSelectedIndex()); @@ -289,6 +302,34 @@ EXPECT_EQ(3u, *combobox_view->GetSelectedIndex()); } +TEST_F(ClassroomBubbleStudentViewTest, ReadsInitialComboBoxViewValueFromPrefs) { + EXPECT_CALL(classroom_client_, GetCompletedStudentAssignments(_)) + .Times(2) + .WillRepeatedly( + [](GlanceablesClassroomClient::GetAssignmentsCallback cb) { + std::move(cb).Run(/*success=*/true, {}); + }); + + ASSERT_TRUE(GetComboBoxView()); + + // The first menu item is selected initially. + EXPECT_EQ(GetLastSelectedAssignmentsListPrefValue(), 0); + EXPECT_EQ(GetComboBoxView()->GetSelectedIndex(), 0u); + + // Update selection in the `combobox_view`, this should update prefs. + GetComboBoxView()->SelectMenuItemForTest(3u); + EXPECT_EQ(GetLastSelectedAssignmentsListPrefValue(), 3); + EXPECT_EQ(GetComboBoxView()->GetSelectedIndex(), 3u); + + // Swap `widget_`'s content. Verify that the new `view_` contains a combobox + // with the correct initial value. + view_ = widget_->SetContentsView( + std::make_unique<ClassroomBubbleStudentView>(&detailed_view_delegate_)); + ASSERT_TRUE(GetComboBoxView()); + EXPECT_EQ(GetLastSelectedAssignmentsListPrefValue(), 3); + EXPECT_EQ(GetComboBoxView()->GetSelectedIndex(), 3u); +} + TEST_F(ClassroomBubbleStudentViewTest, CallsClassroomClientAfterChangingActiveList) { ASSERT_TRUE(GetComboBoxView());
diff --git a/ash/system/unified/glanceable_tray_bubble_view.cc b/ash/system/unified/glanceable_tray_bubble_view.cc index 47336f9..3b54eef 100644 --- a/ash/system/unified/glanceable_tray_bubble_view.cc +++ b/ash/system/unified/glanceable_tray_bubble_view.cc
@@ -147,6 +147,7 @@ scroll_view_->ClipHeightTo(0, std::numeric_limits<int>::max()); scroll_view_->SetBackgroundColor(absl::nullopt); scroll_view_->layer()->SetIsFastRoundedCorner(true); + scroll_view_->SetDrawOverflowIndicator(false); scroll_view_->SetVerticalScrollBarMode( views::ScrollView::ScrollBarMode::kHiddenButEnabled); @@ -279,6 +280,9 @@ if (default_focused_child != calendar_view_) { calendar_view_->InsertBeforeInFocusList(default_focused_child); } + if (tasks_bubble_view_) { + tasks_bubble_view_->InsertAfterInFocusList(calendar_view_); + } } void GlanceableTrayBubbleView::AddTaskBubbleViewIfNeeded( @@ -298,6 +302,7 @@ if (default_focused_child != calendar_view_) { calendar_view_->InsertBeforeInFocusList(default_focused_child); } + tasks_bubble_view_->InsertAfterInFocusList(calendar_view_); } void GlanceableTrayBubbleView::OnGlanceablesContainerPreferredSizeChanged() {
diff --git a/ash/system/unified/tasks_bubble_view.cc b/ash/system/unified/tasks_bubble_view.cc index 46cf29c..1902a67 100644 --- a/ash/system/unified/tasks_bubble_view.cc +++ b/ash/system/unified/tasks_bubble_view.cc
@@ -37,6 +37,7 @@ #include "ui/views/controls/focus_ring.h" #include "ui/views/controls/highlight_path_generator.h" #include "ui/views/layout/box_layout.h" +#include "ui/views/layout/flex_layout_types.h" #include "ui/views/layout/flex_layout_view.h" #include "ui/views/view_class_properties.h" #include "url/gurl.h" @@ -104,9 +105,8 @@ tasks_header_view_->SetOrientation(views::LayoutOrientation::kHorizontal); tasks_header_view_->SetProperty( views::kFlexBehaviorKey, - views::FlexSpecification(views::MinimumFlexSizeRule::kScaleToMinimum, - views::MaximumFlexSizeRule::kPreferred) - .WithOrder(1)); + views::FlexSpecification(views::MinimumFlexSizeRule::kScaleToZero, + views::MaximumFlexSizeRule::kPreferred)); progress_bar_ = AddChildView(std::make_unique<GlanceablesProgressBarView>()); progress_bar_->UpdateProgressBarVisibility(/*visible=*/false); @@ -143,6 +143,10 @@ std::make_unique<Combobox>(tasks_combobox_model_.get())); task_list_combo_box_view_->SetID( base::to_underlying(GlanceablesViewId::kTasksBubbleComboBox)); + task_list_combo_box_view_->SetProperty( + views::kFlexBehaviorKey, + views::FlexSpecification(views::MinimumFlexSizeRule::kScaleToZero, + views::MaximumFlexSizeRule::kPreferred)); combobox_view_observation_.Observe(task_list_combo_box_view_); task_list_combo_box_view_->SetTooltipText(l10n_util::GetStringUTF16(
diff --git a/ash/webui/common/resources/navigation_selector.js b/ash/webui/common/resources/navigation_selector.js index bec6697..412d8b35 100644 --- a/ash/webui/common/resources/navigation_selector.js +++ b/ash/webui/common/resources/navigation_selector.js
@@ -67,6 +67,8 @@ * @private */ onSelected_(e) { + this.dispatchEvent(new CustomEvent( + 'navigation-selected', {bubbles: true, composed: true})); this.selectedItem = e.model.item; }
diff --git a/ash/webui/common/resources/navigation_view_panel.js b/ash/webui/common/resources/navigation_view_panel.js index 1b15ac9..048ccda3 100644 --- a/ash/webui/common/resources/navigation_view_panel.js +++ b/ash/webui/common/resources/navigation_view_panel.js
@@ -119,6 +119,8 @@ constructor() { super(); window.addEventListener('menu-tap', () => this.onMenuButtonTap_()); + window.addEventListener( + 'navigation-selected', () => this.onNavigationSelected_()); /** * Event callback for 'scroll'. @@ -330,6 +332,14 @@ pageExists(selectorId) { return !!this.selectorItems_.find(({id}) => id === selectorId); } + + /** @private */ + onNavigationSelected_() { + // Don't toggle, but rather only close the drawer if it's opened. + if (this.$.drawer.open) { + this.$.drawer.close(); + } + } } customElements.define(NavigationViewPanelElement.is,
diff --git a/ash/webui/diagnostics_ui/backend/session_log_handler_unittest.cc b/ash/webui/diagnostics_ui/backend/session_log_handler_unittest.cc index fd61670c..f0c872c 100644 --- a/ash/webui/diagnostics_ui/backend/session_log_handler_unittest.cc +++ b/ash/webui/diagnostics_ui/backend/session_log_handler_unittest.cc
@@ -132,7 +132,7 @@ bool IsRunning(gfx::NativeWindow owning_window) const override { return true; } - void ListenerDestroyed() override {} + void ListenerDestroyed() override { listener_ = nullptr; } bool HasMultipleFileTypeChoicesImpl() override { return false; } private:
diff --git a/ash/webui/scanning/scanning_handler_unittest.cc b/ash/webui/scanning/scanning_handler_unittest.cc index ea687fe5..2e8bc2f 100644 --- a/ash/webui/scanning/scanning_handler_unittest.cc +++ b/ash/webui/scanning/scanning_handler_unittest.cc
@@ -83,7 +83,7 @@ bool IsRunning(gfx::NativeWindow owning_window) const override { return true; } - void ListenerDestroyed() override {} + void ListenerDestroyed() override { listener_ = nullptr; } bool HasMultipleFileTypeChoicesImpl() override { return false; } private:
diff --git a/ash/wm/overview/overview_focus_cycler.h b/ash/wm/overview/overview_focus_cycler.h index 470728f..f21433a 100644 --- a/ash/wm/overview/overview_focus_cycler.h +++ b/ash/wm/overview/overview_focus_cycler.h
@@ -115,14 +115,15 @@ // The overview session which owns this object. Guaranteed to be non-null for // the lifetime of `this`. - const raw_ptr<OverviewSession, ExperimentalAsh> overview_session_; + const raw_ptr<OverviewSession> overview_session_; // If an item that is selected is deleted, store its index, so the next // traversal can pick up where it left off. absl::optional<int> deleted_index_ = absl::nullopt; // The current view that is being focused, if any. - raw_ptr<OverviewFocusableView, ExperimentalAsh> focused_view_ = nullptr; + raw_ptr<OverviewFocusableView, LeakedDanglingUntriaged> focused_view_ = + nullptr; // Helps to update the current a11y override window. And accessibility // features will focus on the window that is being set. Once `this` goes out
diff --git a/base/android/build_info.h b/base/android/build_info.h index 076029c..12e42d19 100644 --- a/base/android/build_info.h +++ b/base/android/build_info.h
@@ -87,10 +87,21 @@ return gms_version_code_; } + // The package name of the host app which has loaded WebView, retrieved from + // the application context. In the context of the SDK Runtime, the package + // name of the app that owns this particular instance of the SDK Runtime will + // also be included. e.g. + // com.google.android.sdksandbox:com:com.example.myappwithads const char* host_package_name() const { return host_package_name_; } + // The application name (e.g. "Chrome"). For WebView, this is name of the + // embedding app. In the context of the SDK Runtime, this is the name of the + // app that owns this particular instance of the SDK Runtime. const char* host_version_code() const { return host_version_code_; } + // By default: same as versionCode. For WebView: versionCode of the embedding + // app. In the context of the SDK Runtime, this is the versionCode of the app + // that owns this particular instance of the SDK Runtime. const char* host_package_label() const { return host_package_label_; } const char* package_version_code() const {
diff --git a/base/android/java/src/org/chromium/base/BuildInfo.java b/base/android/java/src/org/chromium/base/BuildInfo.java index f6ca0cb0..bdd15c5 100644 --- a/base/android/java/src/org/chromium/base/BuildInfo.java +++ b/base/android/java/src/org/chromium/base/BuildInfo.java
@@ -15,6 +15,7 @@ import android.content.res.Configuration; import android.os.Build; import android.os.Build.VERSION_CODES; +import android.os.Process; import android.text.TextUtils; import androidx.annotation.OptIn; @@ -36,11 +37,29 @@ private static ApplicationInfo sBrowserApplicationInfo; private static boolean sInitialized; - /** The application name (e.g. "Chrome"). For WebView, this is name of the embedding app. */ + /** + * The package name of the host app which has loaded WebView, retrieved from the application + * context. In the context of the SDK Runtime, the package name of the app that owns this + * particular instance of the SDK Runtime will also be included. + * e.g. com.google.android.sdksandbox:com:com.example.myappwithads + */ + public final String hostPackageName; + /** + * The application name (e.g. "Chrome"). For WebView, this is name of the embedding app. + * In the context of the SDK Runtime, this is the name of the app that owns this particular + * instance of the SDK Runtime. + */ public final String hostPackageLabel; - /** By default: same as versionCode. For WebView: versionCode of the embedding app. */ + /** + * By default: same as versionCode. For WebView: versionCode of the embedding app. + * In the context of the SDK Runtime, this is the versionCode of the app that owns this + * particular instance of the SDK Runtime. + */ public final long hostVersionCode; - /** The packageName of Chrome/WebView. Use application context for host app packageName. */ + /** + * The packageName of Chrome/WebView. Use application context for host app packageName. + * Same as the host information within any child process. + */ public final String packageName; /** The versionCode of the apk. */ public final long versionCode; @@ -79,7 +98,6 @@ /** Returns a serialized string array of all properties of this class. */ @OptIn(markerClass = androidx.core.os.BuildCompat.PrereleaseSdkCheck.class) private String[] getAllProperties() { - String hostPackageName = ContextUtils.getApplicationContext().getPackageName(); // This implementation needs to be kept in sync with the native BuildInfo constructor. return new String[] { Build.BRAND, @@ -160,25 +178,102 @@ private BuildInfo() { sInitialized = true; Context appContext = ContextUtils.getApplicationContext(); - String hostPackageName = appContext.getPackageName(); + String appContextPackageName = appContext.getPackageName(); PackageManager pm = appContext.getPackageManager(); - PackageInfo pi = PackageUtils.getPackageInfo(hostPackageName, 0); - hostVersionCode = packageVersionCode(pi); - if (sBrowserPackageInfo != null) { - packageName = sBrowserPackageInfo.packageName; - versionCode = packageVersionCode(sBrowserPackageInfo); - versionName = nullToEmpty(sBrowserPackageInfo.versionName); - sBrowserApplicationInfo = sBrowserPackageInfo.applicationInfo; - sBrowserPackageInfo = null; - } else { - packageName = hostPackageName; - versionCode = hostVersionCode; - versionName = nullToEmpty(pi.versionName); - sBrowserApplicationInfo = appContext.getApplicationInfo(); + + String providedHostPackageName = null; + String providedHostPackageLabel = null; + String providedPackageName = null; + String providedPackageVersionName = null; + Long providedHostVersionCode = null; + Long providedPackageVersionCode = null; + + // The child processes are running in an isolated process so they can't grab a lot of + // package information in the same way that we normally would retrieve them. To get around + // this, we feed the information as command line switches. + if (CommandLine.isInitialized()) { + CommandLine commandLine = CommandLine.getInstance(); + providedHostPackageName = commandLine.getSwitchValue(BaseSwitches.HOST_PACKAGE_NAME); + providedHostPackageLabel = commandLine.getSwitchValue(BaseSwitches.HOST_PACKAGE_LABEL); + providedPackageName = commandLine.getSwitchValue(BaseSwitches.PACKAGE_NAME); + providedPackageVersionName = + commandLine.getSwitchValue(BaseSwitches.PACKAGE_VERSION_NAME); + + if (commandLine.hasSwitch(BaseSwitches.HOST_VERSION_CODE)) { + providedHostVersionCode = + Long.parseLong(commandLine.getSwitchValue(BaseSwitches.HOST_VERSION_CODE)); + } + + if (commandLine.hasSwitch(BaseSwitches.PACKAGE_VERSION_CODE)) { + providedPackageVersionCode = Long.parseLong( + commandLine.getSwitchValue(BaseSwitches.PACKAGE_VERSION_CODE)); + } } - hostPackageLabel = nullToEmpty(pm.getApplicationLabel(pi.applicationInfo)); - installerPackageName = nullToEmpty(pm.getInstallerPackageName(packageName)); + boolean hostInformationProvided = providedHostPackageName != null + && providedHostPackageLabel != null && providedHostVersionCode != null + && providedPackageName != null && providedPackageVersionName != null + && providedPackageVersionCode != null; + + // We want to retrieve the original package installed to verify to host package name. + // In the case of the SDK Runtime, we would like to retrieve the package name loading the + // SDK. + String appInstalledPackageName = appContextPackageName; + + if (hostInformationProvided) { + hostPackageName = providedHostPackageName; + hostPackageLabel = providedHostPackageLabel; + hostVersionCode = providedHostVersionCode; + versionName = providedPackageVersionName; + packageName = providedPackageName; + versionCode = providedPackageVersionCode; + + sBrowserApplicationInfo = appContext.getApplicationInfo(); + } else { + // The SDK Qualified package name will retrieve the same information as + // appInstalledPackageName but prefix it with the SDK Sandbox process so that we can + // tell SDK Runtime data apart from regular data in our logs and metrics. + String sdkQualifiedName = appInstalledPackageName; + + // TODO(bewise): There isn't currently an official API to grab the host package name + // with the SDK Runtime. We can work around this because SDKs loaded in the SDK + // Runtime have the host UID + 10000. This should be updated if a public API comes + // along that we can use. + // You can see more about this in the Android source: + // https://cs.android.com/android/platform/superproject/main/+/main:frameworks/base/core/java/android/os/Process.java;l=292;drc=47fffdd53115a9af1820e3f89d8108745be4b55d + if (ContextUtils.isSdkSandboxProcess()) { + final int hostId = Process.myUid() - 10000; + final String[] packageNames = pm.getPackagesForUid(hostId); + + if (packageNames.length > 0) { + // We could end up with more than one package name if the app used a + // sharedUserId but these are deprecated so this is a safe bet to rely on the + // first package name. + appInstalledPackageName = packageNames[0]; + sdkQualifiedName += ":" + appInstalledPackageName; + } + } + + PackageInfo pi = PackageUtils.getPackageInfo(appInstalledPackageName, 0); + hostPackageName = sdkQualifiedName; + hostPackageLabel = nullToEmpty(pm.getApplicationLabel(pi.applicationInfo)); + hostVersionCode = packageVersionCode(pi); + + if (sBrowserPackageInfo != null) { + packageName = sBrowserPackageInfo.packageName; + versionCode = packageVersionCode(sBrowserPackageInfo); + versionName = nullToEmpty(sBrowserPackageInfo.versionName); + sBrowserApplicationInfo = sBrowserPackageInfo.applicationInfo; + sBrowserPackageInfo = null; + } else { + packageName = appContextPackageName; + versionCode = hostVersionCode; + versionName = nullToEmpty(pi.versionName); + sBrowserApplicationInfo = appContext.getApplicationInfo(); + } + } + + installerPackageName = nullToEmpty(pm.getInstallerPackageName(appInstalledPackageName)); PackageInfo gmsPackageInfo = PackageUtils.getPackageInfo("com.google.android.gms", 0); gmsVersionCode = gmsPackageInfo != null ? String.valueOf(packageVersionCode(gmsPackageInfo))
diff --git a/base/base_switches.cc b/base/base_switches.cc index f552729b..d2ea9e6 100644 --- a/base/base_switches.cc +++ b/base/base_switches.cc
@@ -160,6 +160,24 @@ // The field trial parameters and their values when testing changes locally. const char kForceFieldTrialParams[] = "force-fieldtrial-params"; +// When we retrieve the package name within the SDK Runtime, we need to use +// a bit of a hack to do this by taking advantage of the fact that the pid +// is the same pid as the application's pid + 10000. +// see: +// https://cs.android.com/android/platform/superproject/main/+/main:frameworks/base/core/java/android/os/Process.java;l=292;drc=47fffdd53115a9af1820e3f89d8108745be4b55d +// When the render process is created however, it is just a regular isolated +// process with no particular association so we can't perform the same hack. +// When creating minidumps, the package name is retrieved from the process +// meaning the render process minidumps would end up reporting a generic +// process name not associated with the app. +// We work around this by feeding through the host package information to the +// render process when launching it. +const char kHostPackageName[] = "host-package-name"; +const char kHostPackageLabel[] = "host-package-label"; +const char kHostVersionCode[] = "host-version-code"; +const char kPackageName[] = "package-name"; +const char kPackageVersionName[] = "package-version-name"; +const char kPackageVersionCode[] = "package-version-code"; #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
diff --git a/base/base_switches.h b/base/base_switches.h index 57873ea..ebc5870 100644 --- a/base/base_switches.h +++ b/base/base_switches.h
@@ -54,6 +54,12 @@ extern const char kDefaultCountryCodeAtInstall[]; extern const char kEnableIdleTracing[]; extern const char kForceFieldTrialParams[]; +extern const char kHostPackageName[]; +extern const char kHostPackageLabel[]; +extern const char kHostVersionCode[]; +extern const char kPackageName[]; +extern const char kPackageVersionName[]; +extern const char kPackageVersionCode[]; #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
diff --git a/base/trace_event/builtin_categories.h b/base/trace_event/builtin_categories.h index c175e89..292e5ce 100644 --- a/base/trace_event/builtin_categories.h +++ b/base/trace_event/builtin_categories.h
@@ -234,6 +234,7 @@ X(TRACE_DISABLED_BY_DEFAULT("gpu.debug")) \ X(TRACE_DISABLED_BY_DEFAULT("gpu.decoder")) \ X(TRACE_DISABLED_BY_DEFAULT("gpu.device")) \ + X(TRACE_DISABLED_BY_DEFAULT("gpu.graphite.dawn")) \ X(TRACE_DISABLED_BY_DEFAULT("gpu.service")) \ X(TRACE_DISABLED_BY_DEFAULT("gpu.vulkan.vma")) \ X(TRACE_DISABLED_BY_DEFAULT("histogram_samples")) \
diff --git a/base/win/scoped_com_initializer.cc b/base/win/scoped_com_initializer.cc index b7d659c..83195ec4 100644 --- a/base/win/scoped_com_initializer.cc +++ b/base/win/scoped_com_initializer.cc
@@ -9,7 +9,6 @@ #include <ostream> #include "base/check_op.h" -#include "base/debug/alias.h" namespace base { namespace win { @@ -54,15 +53,6 @@ init | COINIT_DISABLE_OLE1DDE); } hr_ = ::CoInitializeEx(nullptr, init | COINIT_DISABLE_OLE1DDE); - // TODO(crbug.com/1473487): consider changing this assertion to a CHECK. When - // this code fails, it is possible that the calling thread joins the wrong - // apartement, for example, the caller requested an STA but the thread - // remained in an MTA instead. Continuing the program execution under these - // conditions is hazardous and it may lead to data races. - const HRESULT hr = hr_; - base::debug::Alias(&hr); - base::debug::Alias(&init); - DUMP_WILL_BE_CHECK(SUCCEEDED(hr)); DCHECK_NE(RPC_E_CHANGED_MODE, hr_) << "Invalid COM thread model change"; }
diff --git a/build/config/android/config.gni b/build/config/android/config.gni index daeaaf6b..d8d9a6b8 100644 --- a/build/config/android/config.gni +++ b/build/config/android/config.gni
@@ -110,6 +110,10 @@ if (!defined(default_android_ndk_root)) { default_android_ndk_root = "//third_party/android_toolchain/ndk" + if (current_cpu == "riscv64") { + # Today (2023-08-30) only the canary Android NDK supports RISC-V64. + default_android_ndk_root = "//third_party/android_toolchain_canary/ndk" + } default_android_ndk_version = "r25c" default_android_ndk_major_version = 25 } else { @@ -196,6 +200,10 @@ # Android did not support 64 bit before API 21. android64_ndk_api_level = 21 } + if (current_cpu == "riscv64" && default_min_sdk_version < 35) { + # Android did not support RISC-V64 before API 35. + android64_ndk_api_level = 35 + } android_sdk_root = default_android_sdk_root android_sdk_version = default_android_sdk_version
diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn index 0bbb5b86..e8d4b15b 100644 --- a/chrome/android/BUILD.gn +++ b/chrome/android/BUILD.gn
@@ -266,6 +266,7 @@ "//components/externalauth/android:google_delegate_public_impl_java", "//components/language/android:ulp_delegate_public_java", "//components/signin/public/android:account_email_domain_displayability_java", + "//content/public/android:identity_credentials_public_impl_java", ] }
diff --git a/chrome/android/chrome_public_apk_tmpl.gni b/chrome/android/chrome_public_apk_tmpl.gni index 5122a76..ba3b253 100644 --- a/chrome/android/chrome_public_apk_tmpl.gni +++ b/chrome/android/chrome_public_apk_tmpl.gni
@@ -478,8 +478,11 @@ "//components/language/android:ulp_delegate_public_java", ] if (_is_monochrome) { - # WebView needs this in the base module. - deps += [ "//components/environment_integrity/android:integrity_service_bridge_public_impl_java" ] + # WebView needs these in the base module. + deps += [ + "//components/environment_integrity/android:integrity_service_bridge_public_impl_java", + "//content/public/android:identity_credentials_public_impl_java", + ] } } else { deps += [
diff --git a/chrome/android/features/keyboard_accessory/javatests/res/layout/test_main.xml b/chrome/android/features/keyboard_accessory/javatests/res/layout/test_main.xml index b01ae3f..b1e03c83 100644 --- a/chrome/android/features/keyboard_accessory/javatests/res/layout/test_main.xml +++ b/chrome/android/features/keyboard_accessory/javatests/res/layout/test_main.xml
@@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- Copyright 2022 The Chromium Authors. All rights reserved. +<!-- Copyright 2022 The Chromium Authors Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. -->
diff --git a/chrome/android/features/tab_ui/java/res/drawable/ic_close_tabs_24dp.xml b/chrome/android/features/tab_ui/java/res/drawable/ic_close_tabs_24dp.xml index a0642bf..82278a3 100644 --- a/chrome/android/features/tab_ui/java/res/drawable/ic_close_tabs_24dp.xml +++ b/chrome/android/features/tab_ui/java/res/drawable/ic_close_tabs_24dp.xml
@@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- Copyright 2022 The Chromium Authors. All rights reserved. +<!-- Copyright 2022 The Chromium Authors Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. -->
diff --git a/chrome/android/features/tab_ui/java/res/drawable/ic_deselect_all_24dp.xml b/chrome/android/features/tab_ui/java/res/drawable/ic_deselect_all_24dp.xml index d183fc4..357e8305 100644 --- a/chrome/android/features/tab_ui/java/res/drawable/ic_deselect_all_24dp.xml +++ b/chrome/android/features/tab_ui/java/res/drawable/ic_deselect_all_24dp.xml
@@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- Copyright 2022 The Chromium Authors. All rights reserved. +<!-- Copyright 2022 The Chromium Authors Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. -->
diff --git a/chrome/android/features/tab_ui/java/res/drawable/ic_select_all_24dp.xml b/chrome/android/features/tab_ui/java/res/drawable/ic_select_all_24dp.xml index 427d9b60..f400601 100644 --- a/chrome/android/features/tab_ui/java/res/drawable/ic_select_all_24dp.xml +++ b/chrome/android/features/tab_ui/java/res/drawable/ic_select_all_24dp.xml
@@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- Copyright 2022 The Chromium Authors. All rights reserved. +<!-- Copyright 2022 The Chromium Authors Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. -->
diff --git a/chrome/android/features/tab_ui/java/res/drawable/ic_tab_placeholder.xml b/chrome/android/features/tab_ui/java/res/drawable/ic_tab_placeholder.xml index 7dec2e3..67b6883 100644 --- a/chrome/android/features/tab_ui/java/res/drawable/ic_tab_placeholder.xml +++ b/chrome/android/features/tab_ui/java/res/drawable/ic_tab_placeholder.xml
@@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- Copyright 2023 The Chromium Authors. All rights reserved. +<!-- 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. -->
diff --git a/chrome/android/features/tab_ui/java/res/drawable/tab_selection_editor_share_icon.xml b/chrome/android/features/tab_ui/java/res/drawable/tab_selection_editor_share_icon.xml index 27b98fd..bb2c15ff 100644 --- a/chrome/android/features/tab_ui/java/res/drawable/tab_selection_editor_share_icon.xml +++ b/chrome/android/features/tab_ui/java/res/drawable/tab_selection_editor_share_icon.xml
@@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- Copyright 2022 The Chromium Authors. All rights reserved. +<!-- Copyright 2022 The Chromium Authors Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. -->
diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabSelectionEditorActionViewLayout.java b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabSelectionEditorActionViewLayout.java index 718e71d..e9ef855 100644 --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabSelectionEditorActionViewLayout.java +++ b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabSelectionEditorActionViewLayout.java
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabSelectionEditorShareAction.java b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabSelectionEditorShareAction.java index 11bab5ec..92033e24 100644 --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabSelectionEditorShareAction.java +++ b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabSelectionEditorShareAction.java
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/android/features/tab_ui/junit/src/org/chromium/chrome/browser/tasks/tab_management/TabSelectionEditorShareActionUnitTest.java b/chrome/android/features/tab_ui/junit/src/org/chromium/chrome/browser/tasks/tab_management/TabSelectionEditorShareActionUnitTest.java index ad14701..f8de4c94f 100644 --- a/chrome/android/features/tab_ui/junit/src/org/chromium/chrome/browser/tasks/tab_management/TabSelectionEditorShareActionUnitTest.java +++ b/chrome/android/features/tab_ui/junit/src/org/chromium/chrome/browser/tasks/tab_management/TabSelectionEditorShareActionUnitTest.java
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/android/java/res/drawable/ic_select_tabs.xml b/chrome/android/java/res/drawable/ic_select_tabs.xml index 2dd25f9fa..8317f077 100644 --- a/chrome/android/java/res/drawable/ic_select_tabs.xml +++ b/chrome/android/java/res/drawable/ic_select_tabs.xml
@@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- Copyright 2022 The Chromium Authors. All rights reserved. +<!-- Copyright 2022 The Chromium Authors Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. -->
diff --git a/chrome/android/java/res/layout/autofill_card_name_and_number.xml b/chrome/android/java/res/layout/autofill_card_name_and_number.xml index cc1e89be..8c2eb8e4 100644 --- a/chrome/android/java/res/layout/autofill_card_name_and_number.xml +++ b/chrome/android/java/res/layout/autofill_card_name_and_number.xml
@@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- Copyright 2023 The Chromium Authors. All rights reserved. +<!-- 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. -->
diff --git a/chrome/android/java/res/layout/autofill_cc_details_new.xml b/chrome/android/java/res/layout/autofill_cc_details_new.xml index 9793c52..370831ad 100644 --- a/chrome/android/java/res/layout/autofill_cc_details_new.xml +++ b/chrome/android/java/res/layout/autofill_cc_details_new.xml
@@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- Copyright 2023 The Chromium Authors. All rights reserved. +<!-- 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. -->
diff --git a/chrome/android/java/res/layout/autofill_server_data_text_label.xml b/chrome/android/java/res/layout/autofill_server_data_text_label.xml index ae08ea368..93e5d9a 100644 --- a/chrome/android/java/res/layout/autofill_server_data_text_label.xml +++ b/chrome/android/java/res/layout/autofill_server_data_text_label.xml
@@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- Copyright 2022 The Chromium Authors. All rights reserved. +<!-- Copyright 2022 The Chromium Authors Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. -->
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/BackupSigninProcessor.java b/chrome/android/java/src/org/chromium/chrome/browser/BackupSigninProcessor.java index 6778ddf..17178d95 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/BackupSigninProcessor.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/BackupSigninProcessor.java
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/bookmarks/BookmarkFolderPickerActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/app/bookmarks/BookmarkFolderPickerActivity.java index 80aef5f..4addce5d 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/app/bookmarks/BookmarkFolderPickerActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/app/bookmarks/BookmarkFolderPickerActivity.java
@@ -30,6 +30,7 @@ import org.chromium.chrome.browser.profiles.Profile; import org.chromium.components.bookmarks.BookmarkId; import org.chromium.components.browser_ui.modaldialog.AppModalPresenter; +import org.chromium.components.commerce.core.ShoppingService; import org.chromium.components.favicon.LargeIconBridge; import org.chromium.components.image_fetcher.ImageFetcherConfig; import org.chromium.components.image_fetcher.ImageFetcherFactory; @@ -80,13 +81,15 @@ mBookmarkModel); BookmarkUiPrefs bookmarkUiPrefs = new BookmarkUiPrefs(SharedPreferencesManager.getInstance()); + ShoppingService shoppingService = ShoppingServiceFactory.getForProfile(profile); // TODO(crbug.com/1472832): Consider initializing this in #onCreateOptionsMenu to avoid the // possibility that the menu is null when the first parent is set. - mCoordinator = new BookmarkFolderPickerCoordinator(this, mBookmarkModel, - mBookmarkImageFetcher, mBookmarkIds, this::finish, addNewFolderCoordinator, - bookmarkUiPrefs, - new ImprovedBookmarkRowCoordinator(this, mBookmarkImageFetcher, mBookmarkModel, - bookmarkUiPrefs, ShoppingServiceFactory.getForProfile(profile))); + mCoordinator = + new BookmarkFolderPickerCoordinator(this, mBookmarkModel, mBookmarkImageFetcher, + mBookmarkIds, this::finish, addNewFolderCoordinator, bookmarkUiPrefs, + new ImprovedBookmarkRowCoordinator(this, mBookmarkImageFetcher, + mBookmarkModel, bookmarkUiPrefs, shoppingService), + shoppingService); if (BackPressManager.isSecondaryActivityEnabled()) { BackPressHelper.create(this, getOnBackPressedDispatcher(), mCoordinator,
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/autofill/settings/AutofillPaymentMethodsFragment.java b/chrome/android/java/src/org/chromium/chrome/browser/autofill/settings/AutofillPaymentMethodsFragment.java index 9ed2d838..990e08b 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/autofill/settings/AutofillPaymentMethodsFragment.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/autofill/settings/AutofillPaymentMethodsFragment.java
@@ -12,6 +12,9 @@ import android.hardware.biometrics.BiometricManager; import android.os.Build; import android.os.Bundle; +import android.text.SpannableString; +import android.text.Spanned; +import android.text.style.ForegroundColorSpan; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; @@ -39,6 +42,7 @@ import org.chromium.chrome.browser.settings.SettingsLauncherImpl; import org.chromium.components.autofill.MandatoryReauthAuthenticationFlowEvent; import org.chromium.components.autofill.VirtualCardEnrollmentState; +import org.chromium.components.browser_ui.settings.ChromeBasePreference; import org.chromium.components.browser_ui.settings.ChromeSwitchPreference; import org.chromium.components.browser_ui.settings.SettingsLauncher; import org.chromium.components.browser_ui.styles.SemanticColorUtils; @@ -54,6 +58,7 @@ // The Fido pref is used as a key on the settings toggle. This key helps in the retrieval of the // Fido toggle during tests. static final String PREF_FIDO = "fido"; + static final String PREF_DELETE_SAVED_CVCS = "delete_saved_cvcs"; static final String PREF_MANDATORY_REAUTH = "mandatory_reauth"; static final String PREF_SAVE_CVC = "save_cvc"; private static final String PREF_PAYMENT_APPS = "payment_apps"; @@ -210,6 +215,13 @@ // is ON, show the cvc storage pref value. saveCvcSwitch.setChecked(PersonalDataManager.isAutofillCreditCardEnabled() && PersonalDataManager.isPaymentCvcStorageEnabled()); + + // Add the deletion button for saved Cvc. Note that this button's presence doesn't + // depend on "Save And Fill Payments Methods" value. Since we would like to allow user + // to delete saved cvcs even when "Save And Fill Payments Methods" is disabled. + // TODO(crbug.com/1474710): Conditionally show the deletion button based on whether + // there is cvc stored. + createDeleteSavedCvcs(); } for (CreditCard card : PersonalDataManager.getInstance().getCreditCardsForSettings()) { @@ -418,6 +430,24 @@ getActivity(), AutofillLocalCardEditor.class, preference.getExtras()); } + /** + * Create a clickable "Delete saved cvcs" button and add it to the preference screen. + * No divider line above this preference. + */ + private void createDeleteSavedCvcs() { + ChromeBasePreference deleteSavedCvcs = new ChromeBasePreference(getStyledContext()); + deleteSavedCvcs.setKey(PREF_DELETE_SAVED_CVCS); + SpannableString spannableString = new SpannableString( + getResources().getString(R.string.autofill_settings_page_bulk_remove_cvc_label)); + spannableString.setSpan(new ForegroundColorSpan(getContext().getColor( + R.color.default_text_color_link_baseline)), + 0, spannableString.length(), Spanned.SPAN_INCLUSIVE_EXCLUSIVE); + deleteSavedCvcs.setSummary(spannableString); + deleteSavedCvcs.setDividerAllowedAbove(false); + // TODO(crbug.com/1474710): Add click listener. + getPreferenceScreen().addPreference(deleteSavedCvcs); + } + @Override public void onPersonalDataChanged() { rebuildPage();
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/base/ServiceTracingProxyProvider.java b/chrome/android/java/src/org/chromium/chrome/browser/base/ServiceTracingProxyProvider.java index c299d61..97e496f8 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/base/ServiceTracingProxyProvider.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/base/ServiceTracingProxyProvider.java
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/base/SplitCompatApplication.java b/chrome/android/java/src/org/chromium/chrome/browser/base/SplitCompatApplication.java index f8328715..ebeaae23 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/base/SplitCompatApplication.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/base/SplitCompatApplication.java
@@ -1,4 +1,4 @@ -// Copyright 2020 The Chromium Authors. All rights reserved. +// 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.
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkFolderPickerCoordinator.java b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkFolderPickerCoordinator.java index 18b310bc9..926571f 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkFolderPickerCoordinator.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkFolderPickerCoordinator.java
@@ -24,6 +24,7 @@ import org.chromium.components.browser_ui.widget.FadingShadowView; import org.chromium.components.browser_ui.widget.gesture.BackPressHandler; import org.chromium.components.browser_ui.widget.selectable_list.SelectionDelegate; +import org.chromium.components.commerce.core.ShoppingService; import org.chromium.ui.modelutil.MVCListAdapter.ModelList; import org.chromium.ui.modelutil.PropertyModel; import org.chromium.ui.modelutil.PropertyModelChangeProcessor; @@ -57,7 +58,8 @@ BookmarkImageFetcher bookmarkImageFetcher, List<BookmarkId> bookmarkIds, Runnable finishRunnable, BookmarkAddNewFolderCoordinator addNewFolderCoordinator, BookmarkUiPrefs bookmarkUiPrefs, - ImprovedBookmarkRowCoordinator improvedBookmarkRowCoordinator) { + ImprovedBookmarkRowCoordinator improvedBookmarkRowCoordinator, + ShoppingService shoppingService) { mContext = context; mView = LayoutInflater.from(mContext).inflate(R.layout.bookmark_folder_picker, null); mMoveButton = mView.findViewById(R.id.move_button); @@ -75,7 +77,7 @@ mMediator = new BookmarkFolderPickerMediator(context, bookmarkModel, bookmarkImageFetcher, bookmarkIds, finishRunnable, new BookmarkUiPrefs(SharedPreferencesManager.getInstance()), model, mModelList, - addNewFolderCoordinator, improvedBookmarkRowCoordinator); + addNewFolderCoordinator, improvedBookmarkRowCoordinator, shoppingService); FadingShadowView shadow = (FadingShadowView) mView.findViewById(R.id.shadow); shadow.init(mContext.getColor(R.color.toolbar_shadow_color), FadingShadow.POSITION_TOP);
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkFolderPickerMediator.java b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkFolderPickerMediator.java index 1d31fd9a..a91d681 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkFolderPickerMediator.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkFolderPickerMediator.java
@@ -13,6 +13,7 @@ import org.chromium.chrome.browser.bookmarks.ImprovedBookmarkRowProperties.ImageVisibility; import org.chromium.components.bookmarks.BookmarkId; import org.chromium.components.bookmarks.BookmarkItem; +import org.chromium.components.commerce.core.ShoppingService; import org.chromium.ui.modelutil.MVCListAdapter.ListItem; import org.chromium.ui.modelutil.MVCListAdapter.ModelList; import org.chromium.ui.modelutil.PropertyModel; @@ -68,14 +69,16 @@ BookmarkImageFetcher bookmarkImageFetcher, List<BookmarkId> bookmarkIds, Runnable finishRunnable, BookmarkUiPrefs bookmarkUiPrefs, PropertyModel model, ModelList modelList, BookmarkAddNewFolderCoordinator addNewFolderCoordinator, - ImprovedBookmarkRowCoordinator improvedBookmarkRowCoordinator) { + ImprovedBookmarkRowCoordinator improvedBookmarkRowCoordinator, + ShoppingService shoppingService) { mContext = context; mBookmarkModel = bookmarkModel; mBookmarkModel.addObserver(mBookmarkModelObserver); mBookmarkImageFetcher = bookmarkImageFetcher; mBookmarkIds = bookmarkIds; mFinishRunnable = finishRunnable; - mQueryHandler = new ImprovedBookmarkQueryHandler(mBookmarkModel, bookmarkUiPrefs); + mQueryHandler = + new ImprovedBookmarkQueryHandler(mBookmarkModel, bookmarkUiPrefs, shoppingService); mModel = model; mModelList = modelList; mAddNewFolderCoordinator = addNewFolderCoordinator;
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkManagerMediator.java b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkManagerMediator.java index 5aa7ad1c..5d60a9b 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkManagerMediator.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkManagerMediator.java
@@ -225,6 +225,12 @@ setBookmarks(mBookmarkQueryHandler.buildBookmarkListForParent(getCurrentFolderId())); updateEmptyViewText(); + + // Unclear if the search box still has focus or not, and what caused us to switch here. + // But if this is a result of a folder navigation, we need to clear out the search UI. + if (BookmarkFeatures.isAndroidImprovedBookmarksEnabled()) { + setSearchTextAndUpdateButtonVisibility(""); + } } private void updateEmptyViewText() { @@ -389,17 +395,6 @@ mIsIncognito = isIncognito; mBackPressStateSupplier = backPressStateSupplier; mProfile = profile; - - mPromoHeaderManager = new BookmarkPromoHeader(mContext, mProfile, this::updateHeader); - mBookmarkUndoController = bookmarkUndoController; - if (BookmarkFeatures.isAndroidImprovedBookmarksEnabled()) { - mBookmarkQueryHandler = - new ImprovedBookmarkQueryHandler(mBookmarkModel, bookmarkUiPrefs); - } else { - mBookmarkQueryHandler = new LegacyBookmarkQueryHandler( - mBookmarkModel, bookmarkUiPrefs, SyncServiceFactory.getForProfile(mProfile)); - } - mModelList = modelList; mBookmarkUiPrefs = bookmarkUiPrefs; mBookmarkUiPrefs.addObserver(mBookmarkUiPrefsObserver); @@ -407,6 +402,16 @@ mBookmarkImageFetcher = bookmarkImageFetcher; mShoppingService = shoppingService; mSnackbarManager = snackbarManager; + mPromoHeaderManager = new BookmarkPromoHeader(mContext, mProfile, this::updateHeader); + mBookmarkUndoController = bookmarkUndoController; + + if (BookmarkFeatures.isAndroidImprovedBookmarksEnabled()) { + mBookmarkQueryHandler = new ImprovedBookmarkQueryHandler( + mBookmarkModel, bookmarkUiPrefs, mShoppingService); + } else { + mBookmarkQueryHandler = new LegacyBookmarkQueryHandler( + mBookmarkModel, bookmarkUiPrefs, SyncServiceFactory.getForProfile(mProfile)); + } if (BookmarkFeatures.isAndroidImprovedBookmarksEnabled()) { onScrollListenerConsumer.accept(new OnScrollListener() { @@ -628,6 +633,9 @@ RecordUserAction.record("MobileBookmarkManagerOpenFolder"); setState(BookmarkUiState.createFolderState(folder, mBookmarkModel)); mRecyclerView.scrollToPosition(0); + if (BookmarkFeatures.isAndroidImprovedBookmarksEnabled()) { + setSearchBoxFocusAndHideKeyboardIfNeeded(false); + } } @Override @@ -1377,19 +1385,28 @@ private void onSearchTextChangeCallback(String searchText) { searchText = searchText == null ? "" : searchText; if (BookmarkFeatures.isAndroidImprovedBookmarksEnabled()) { - getSearchBoxPropertyModel().set(BookmarkSearchBoxRowProperties.SEARCH_TEXT, searchText); - getSearchBoxPropertyModel().set( - BookmarkSearchBoxRowProperties.CLEAR_SEARCH_TEXT_BUTTON_VISIBILITY, - !TextUtils.isEmpty(searchText)); + setSearchTextAndUpdateButtonVisibility(searchText); } onSearchChange(searchText, getCurrentSearchPowerFilter()); } private void onClearSearchTextRunnable() { - getSearchBoxPropertyModel().set(BookmarkSearchBoxRowProperties.SEARCH_TEXT, ""); + setSearchTextAndUpdateButtonVisibility(""); + } + + private void setSearchTextAndUpdateButtonVisibility(String searchText) { + getSearchBoxPropertyModel().set(BookmarkSearchBoxRowProperties.SEARCH_TEXT, searchText); + boolean isVisible = !TextUtils.isEmpty(searchText); + getSearchBoxPropertyModel().set( + BookmarkSearchBoxRowProperties.CLEAR_SEARCH_TEXT_BUTTON_VISIBILITY, isVisible); } private void onSearchBoxFocusChange(Boolean hasFocus) { + assert hasFocus != null; + setSearchBoxFocusAndHideKeyboardIfNeeded(hasFocus); + } + + private void setSearchBoxFocusAndHideKeyboardIfNeeded(boolean hasFocus) { getSearchBoxPropertyModel().set(BookmarkSearchBoxRowProperties.HAS_FOCUS, hasFocus); if (!hasFocus) { mHideKeyboardRunnable.run();
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/ImprovedBookmarkQueryHandler.java b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/ImprovedBookmarkQueryHandler.java index 6d14b5c1..672556f 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/ImprovedBookmarkQueryHandler.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/ImprovedBookmarkQueryHandler.java
@@ -4,9 +4,13 @@ package org.chromium.chrome.browser.bookmarks; +import androidx.annotation.Nullable; + import org.chromium.chrome.browser.bookmarks.BookmarkUiPrefs.BookmarkRowSortOrder; import org.chromium.components.bookmarks.BookmarkId; import org.chromium.components.bookmarks.BookmarkItem; +import org.chromium.components.commerce.core.ShoppingService; +import org.chromium.components.power_bookmarks.PowerBookmarkMeta; import org.chromium.components.power_bookmarks.PowerBookmarkType; import java.util.Collections; @@ -19,16 +23,19 @@ private final BookmarkModel mBookmarkModel; private final BasicBookmarkQueryHandler mBasicBookmarkQueryHandler; private final BookmarkUiPrefs mBookmarkUiPrefs; + private final ShoppingService mShoppingService; /** * Constructs a handle that operates on the given backend. * @param bookmarkModel The backend that holds the truth of what the bookmark state looks like. * @param bookmarkUiPrefs Stores the display prefs for bookmarks. + * @param shoppingService Supports queries about shopping data. */ - public ImprovedBookmarkQueryHandler( - BookmarkModel bookmarkModel, BookmarkUiPrefs bookmarkUiPrefs) { + public ImprovedBookmarkQueryHandler(BookmarkModel bookmarkModel, + BookmarkUiPrefs bookmarkUiPrefs, ShoppingService shoppingService) { mBookmarkModel = bookmarkModel; mBookmarkUiPrefs = bookmarkUiPrefs; + mShoppingService = shoppingService; mBasicBookmarkQueryHandler = new BasicBookmarkQueryHandler(bookmarkModel, mBookmarkUiPrefs); } @@ -56,6 +63,7 @@ List<BookmarkListEntry> bookmarkListEntries = mBasicBookmarkQueryHandler.buildBookmarkListForSearch(query, powerFilter); sortByStoredPref(bookmarkListEntries); + applyPowerFilters(bookmarkListEntries, powerFilter); return bookmarkListEntries; } @@ -101,4 +109,27 @@ } return 0; } + + private void applyPowerFilters(List<BookmarkListEntry> bookmarkListEntries, + @Nullable Set<PowerBookmarkType> powerFilter) { + if (powerFilter == null || powerFilter.isEmpty()) return; + + // Remove entries from the list if the any filter from powerFilter doesn't match. + bookmarkListEntries.removeIf(bookmarkListEntry -> { + // Remove bookmarks which aren't price-tracked if the shopping filter is active. + if (powerFilter.contains(PowerBookmarkType.SHOPPING)) { + if (!isPriceTracked(bookmarkListEntry)) return true; + } + + return false; + }); + } + + private boolean isPriceTracked(BookmarkListEntry bookmarkListEntry) { + PowerBookmarkMeta meta = bookmarkListEntry.getPowerBookmarkMeta(); + if (meta == null || !meta.hasShoppingSpecifics()) return false; + return mShoppingService.isSubscribedFromCache( + PowerBookmarkUtils.createCommerceSubscriptionForShoppingSpecifics( + meta.getShoppingSpecifics())); + } }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabObserver.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabObserver.java index 974b0e33..bfb2469 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabObserver.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabObserver.java
@@ -27,6 +27,7 @@ import org.chromium.chrome.browser.dependency_injection.ActivityScope; import org.chromium.chrome.browser.intents.BrowserIntentUtils; import org.chromium.chrome.browser.metrics.SimpleStartupForegroundSessionDetector; +import org.chromium.chrome.browser.page_load_metrics.PageLoadMetrics; import org.chromium.chrome.browser.tab.EmptyTabObserver; import org.chromium.chrome.browser.tab.Tab; import org.chromium.chrome.browser.tab.TabHidingType; @@ -35,6 +36,7 @@ import org.chromium.components.browser_ui.share.ShareImageFileUtils; import org.chromium.content_public.browser.LoadUrlParams; import org.chromium.content_public.browser.NavigationHandle; +import org.chromium.content_public.browser.WebContents; import org.chromium.url.GURL; import java.lang.annotation.Retention; @@ -56,11 +58,25 @@ private int mContentBitmapWidth; private int mContentBitmapHeight; + // The time at which Chrome received the intent that resulted in the most recent Custom Tab + // launch, in Realtime and Uptime timebases - not set when the mayLaunchUrl speculation is used. private long mIntentReceivedRealtimeMillis; + private long mIntentReceivedUptimeMillis; + + // The time at which Chrome received the intent that resulted in the most recent Custom Tab + // launch, in Realtime and Uptime timebases, when the mayLaunchUrl API was used. private long mLaunchedForSpeculationRealtimeMillis; + private long mLaunchedForSpeculationUptimeMillis; + + // true/false if the mayLaunchUrl API was used and the speculation was used/not used. null if + // the API was not used. @Nullable private Boolean mUsedHiddenTabSpeculation; + + // The time page load started in the most recent Custom Tab launch. private long mPageLoadStartedRealtimeMillis; + + // The time of the first navigation commit in the most recent Custom Tab launch. private long mFirstCommitRealtimeMillis; @IntDef({State.RESET, State.WAITING_LOAD_START, State.WAITING_LOAD_FINISH}) @@ -71,8 +87,22 @@ int WAITING_LOAD_FINISH = 2; } + // Tracks what point in the first navigation after a Custom Tab launch we're in. private @State int mCurrentState; + private LargestContentfulPaintObserver mLCPObserver; + + private class LargestContentfulPaintObserver implements PageLoadMetrics.Observer { + @Override + public void onLargestContentfulPaint(WebContents webContents, long navigationId, + long navigationStartMicros, long largestContentfulPaintMs, + long largestContentfulPaintSize) { + recordLargestContentfulPaint(navigationStartMicros / 1000 + largestContentfulPaintMs); + PageLoadMetrics.removeObserver(mLCPObserver); + mLCPObserver = null; + } + }; + @Inject public CustomTabObserver(@Named(APP_CONTEXT) Context appContext, BrowserServicesIntentDataProvider intentDataProvider, CustomTabsConnection connection) { @@ -101,6 +131,12 @@ resetPageLoadTracking(); } + private void trackNextLCP() { + if (mLCPObserver != null) return; + mLCPObserver = new LargestContentfulPaintObserver(); + PageLoadMetrics.addObserver(mLCPObserver, true); + } + /** * Tracks the next page load, with timestamp as the origin of time. * If a load is already happening, we track its PLT. @@ -108,18 +144,23 @@ */ public void trackNextPageLoadForLaunch(Tab tab, Intent sourceIntent) { mIntentReceivedRealtimeMillis = BrowserIntentUtils.getStartupRealtimeMillis(sourceIntent); + mIntentReceivedUptimeMillis = BrowserIntentUtils.getStartupUptimeMillis(sourceIntent); if (tab.isLoading()) { mPageLoadStartedRealtimeMillis = -1; mCurrentState = State.WAITING_LOAD_FINISH; } else { mCurrentState = State.WAITING_LOAD_START; } + trackNextLCP(); } public void trackNextPageLoadForHiddenTab(boolean usedSpeculation, Intent sourceIntent) { mUsedHiddenTabSpeculation = usedSpeculation; mLaunchedForSpeculationRealtimeMillis = BrowserIntentUtils.getStartupRealtimeMillis(sourceIntent); + mLaunchedForSpeculationUptimeMillis = + BrowserIntentUtils.getStartupUptimeMillis(sourceIntent); + trackNextLCP(); } @Override @@ -201,6 +242,14 @@ resetPageLoadTracking(); } + private boolean wasWarmedUp() { + @CalledWarmup + int warmedState = mCustomTabsConnection.getWarmupState(mSession); + return warmedState == CalledWarmup.SESSION_NO_WARMUP_ALREADY_CALLED + || warmedState == CalledWarmup.SESSION_WARMUP + || warmedState == CalledWarmup.NO_SESSION_WARMUP; + } + @Override public void onDidFinishNavigationInPrimaryMainFrame(Tab tab, NavigationHandle navigation) { boolean firstNavigation = mFirstCommitRealtimeMillis == 0; @@ -214,17 +263,16 @@ String histogram = null; long duration = 0; - @CalledWarmup - int warmedState = mCustomTabsConnection.getWarmupState(mSession); - boolean warmedUp = warmedState == CalledWarmup.SESSION_NO_WARMUP_ALREADY_CALLED - || warmedState == CalledWarmup.SESSION_WARMUP; // Note that this will exclude Webapp launches in all cases due to either // mUsedHiddenTabSpeculation being null, or mIntentReceivedTimestamp being 0. if (mUsedHiddenTabSpeculation != null && mUsedHiddenTabSpeculation) { duration = mFirstCommitRealtimeMillis - mLaunchedForSpeculationRealtimeMillis; histogram = "CustomTabs.Startup.TimeToFirstCommitNavigation.Speculated"; } else if (mIntentReceivedRealtimeMillis > 0) { - if (warmedUp) { + // When the process is already warm the earliest measurable point in startup is when the + // intent is received so we measure from there. In the cold start case we measure from + // when the process was started as the best comparison against the warm case. + if (wasWarmedUp()) { duration = mFirstCommitRealtimeMillis - mIntentReceivedRealtimeMillis; histogram = "CustomTabs.Startup.TimeToFirstCommitNavigation.WarmedUp"; } else if (SimpleStartupForegroundSessionDetector.runningCleanForegroundSession()) { @@ -241,6 +289,37 @@ } } + public void recordLargestContentfulPaint(long lcpUptimeMillis) { + if (mCustomTabsConnection == null) return; + + String histogram = null; + long duration = 0; + // Note that this will exclude Webapp launches in all cases due to either + // mUsedHiddenTabSpeculation being null, or mIntentReceivedTimestamp being 0. + if (mUsedHiddenTabSpeculation != null && mUsedHiddenTabSpeculation) { + duration = lcpUptimeMillis - mLaunchedForSpeculationUptimeMillis; + histogram = "CustomTabs.Startup.TimeToLargestContentfulPaint.Speculated"; + } else if (mIntentReceivedRealtimeMillis > 0) { + // When the process is already warm the earliest measurable point in startup is when the + // intent is received so we measure from there. In the cold start case we measure from + // when the process was started as the best comparison against the warm case. + if (wasWarmedUp()) { + duration = lcpUptimeMillis - mIntentReceivedUptimeMillis; + histogram = "CustomTabs.Startup.TimeToLargestContentfulPaint.WarmedUp"; + } else if (SimpleStartupForegroundSessionDetector.runningCleanForegroundSession()) { + duration = lcpUptimeMillis - Process.getStartUptimeMillis(); + histogram = "CustomTabs.Startup.TimeToLargestContentfulPaint.Cold"; + } else { + duration = lcpUptimeMillis - mIntentReceivedUptimeMillis; + histogram = "CustomTabs.Startup.TimeToLargestContentfulPaint.Warm"; + } + } + if (histogram != null) { + RecordHistogram.recordCustomTimesHistogram( + histogram, duration, 50, DateUtils.MINUTE_IN_MILLIS, 50); + } + } + @Override public void onDestroyed(Tab tab) { TabInteractionRecorder observer = TabInteractionRecorder.getFromTab(tab); @@ -258,7 +337,6 @@ private void resetPageLoadTracking() { mCurrentState = State.RESET; - mIntentReceivedRealtimeMillis = -1; } private void captureNavigationInfo(final Tab tab) {
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/segmentation_platform/PriceTrackingActionProviderTest.java b/chrome/android/java/src/org/chromium/chrome/browser/segmentation_platform/PriceTrackingActionProviderTest.java index 902cdd5..4f6f895 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/segmentation_platform/PriceTrackingActionProviderTest.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/segmentation_platform/PriceTrackingActionProviderTest.java
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/segmentation_platform/ReaderModeActionProviderTest.java b/chrome/android/java/src/org/chromium/chrome/browser/segmentation_platform/ReaderModeActionProviderTest.java index e6b63d4..0d6c653e 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/segmentation_platform/ReaderModeActionProviderTest.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/segmentation_platform/ReaderModeActionProviderTest.java
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/segmentation_platform/SignalAccumulatorTest.java b/chrome/android/java/src/org/chromium/chrome/browser/segmentation_platform/SignalAccumulatorTest.java index 9e4bced..ec46755 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/segmentation_platform/SignalAccumulatorTest.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/segmentation_platform/SignalAccumulatorTest.java
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/VirtualKeyboardResizeTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/VirtualKeyboardResizeTest.java index ffc89d5..e47388c9 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/VirtualKeyboardResizeTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/VirtualKeyboardResizeTest.java
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/autofill/settings/AutofillPaymentMethodsFragmentTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/autofill/settings/AutofillPaymentMethodsFragmentTest.java index 9d6c9d7..a4a4278 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/autofill/settings/AutofillPaymentMethodsFragmentTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/autofill/settings/AutofillPaymentMethodsFragmentTest.java
@@ -719,6 +719,28 @@ Assert.assertTrue(saveCvcToggle.isChecked()); } + @Test + @MediumTest + @Features.DisableFeatures({ChromeFeatureList.AUTOFILL_ENABLE_CVC_STORAGE}) + public void testDeleteSavedCvcsButton_notShownWhenFeatureDisabled() throws Exception { + SettingsActivity activity = mSettingsActivityTestRule.startSettingsActivity(); + + Preference expectedNullDeleteSavedCvcsToggle = getPreferenceScreen(activity).findPreference( + AutofillPaymentMethodsFragment.PREF_DELETE_SAVED_CVCS); + Assert.assertNull(expectedNullDeleteSavedCvcsToggle); + } + + @Test + @MediumTest + @Features.EnableFeatures({ChromeFeatureList.AUTOFILL_ENABLE_CVC_STORAGE}) + public void testDeleteSavedCvcsButton_shown() throws Exception { + SettingsActivity activity = mSettingsActivityTestRule.startSettingsActivity(); + + Preference deleteSavedCvcsToggle = getPreferenceScreen(activity).findPreference( + AutofillPaymentMethodsFragment.PREF_DELETE_SAVED_CVCS); + Assert.assertNotNull(deleteSavedCvcsToggle); + } + private void setUpBiometricAuthenticationResult(boolean success) { // We have to manually invoke the passed-in callback. doAnswer(invocation -> {
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/bookmarks/BookmarkFolderPickerRenderTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/bookmarks/BookmarkFolderPickerRenderTest.java index 43019fd..daafb45 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/bookmarks/BookmarkFolderPickerRenderTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/bookmarks/BookmarkFolderPickerRenderTest.java
@@ -243,7 +243,8 @@ mCoordinator = new BookmarkFolderPickerCoordinator(mActivity, mBookmarkModel, mBookmarkImageFetcher, Arrays.asList(mUserBookmarkId), mFinishRunnable, - mAddNewFolderCoordinator, mBookmarkUiPrefs, mImprovedBookmarkRowCoordinator); + mAddNewFolderCoordinator, mBookmarkUiPrefs, mImprovedBookmarkRowCoordinator, + mShoppingService); mContentView.addView(mCoordinator.getView()); Toolbar toolbar = (Toolbar) mContentView.findViewById(R.id.toolbar);
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/bookmarks/BookmarkFolderPickerMediatorTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/bookmarks/BookmarkFolderPickerMediatorTest.java index 189ecee..9f9d9c7d 100644 --- a/chrome/android/junit/src/org/chromium/chrome/browser/bookmarks/BookmarkFolderPickerMediatorTest.java +++ b/chrome/android/junit/src/org/chromium/chrome/browser/bookmarks/BookmarkFolderPickerMediatorTest.java
@@ -214,7 +214,8 @@ mBookmarkImageFetcher, Arrays.asList(mUserBookmarkId), mFinishRunnable, mBookmarkUiPrefs, mModel, mModelList, mAddNewFolderCoordinator, new ImprovedBookmarkRowCoordinator(mActivity, mBookmarkImageFetcher, mBookmarkModel, - mBookmarkUiPrefs, mShoppingService)); + mBookmarkUiPrefs, mShoppingService), + mShoppingService); } @Test @@ -223,7 +224,8 @@ mBookmarkImageFetcher, Arrays.asList(mUserFolderId), mFinishRunnable, mBookmarkUiPrefs, mModel, mModelList, mAddNewFolderCoordinator, new ImprovedBookmarkRowCoordinator(mActivity, mBookmarkImageFetcher, mBookmarkModel, - mBookmarkUiPrefs, mShoppingService)); + mBookmarkUiPrefs, mShoppingService), + mShoppingService); mMediator.populateFoldersForParentId(mMobileFolderId); // Check that the UserFolder isn't a row since it should be filtered out because it's the @@ -310,7 +312,8 @@ mBookmarkImageFetcher, Arrays.asList(mUserBookmarkId, mUserBookmarkId1), mFinishRunnable, mBookmarkUiPrefs, mModel, mModelList, mAddNewFolderCoordinator, new ImprovedBookmarkRowCoordinator(mActivity, mBookmarkImageFetcher, mBookmarkModel, - mBookmarkUiPrefs, mShoppingService)); + mBookmarkUiPrefs, mShoppingService), + mShoppingService); assertEquals("UserFolder", mModel.get(BookmarkFolderPickerProperties.TOOLBAR_TITLE)); assertFalse(mModel.get(BookmarkFolderPickerProperties.MOVE_BUTTON_ENABLED)); @@ -322,7 +325,8 @@ mBookmarkImageFetcher, Arrays.asList(mUserFolderId, mUserBookmarkId1), mFinishRunnable, mBookmarkUiPrefs, mModel, mModelList, mAddNewFolderCoordinator, new ImprovedBookmarkRowCoordinator(mActivity, mBookmarkImageFetcher, mBookmarkModel, - mBookmarkUiPrefs, mShoppingService)); + mBookmarkUiPrefs, mShoppingService), + mShoppingService); assertEquals("Move to…", mModel.get(BookmarkFolderPickerProperties.TOOLBAR_TITLE)); assertFalse(mModel.get(BookmarkFolderPickerProperties.MOVE_BUTTON_ENABLED)); @@ -334,7 +338,8 @@ mBookmarkImageFetcher, Arrays.asList(mReadingListItemId1, mReadingListItemId2), mFinishRunnable, mBookmarkUiPrefs, mModel, mModelList, mAddNewFolderCoordinator, new ImprovedBookmarkRowCoordinator(mActivity, mBookmarkImageFetcher, mBookmarkModel, - mBookmarkUiPrefs, mShoppingService)); + mBookmarkUiPrefs, mShoppingService), + mShoppingService); assertEquals("Reading List", mModel.get(BookmarkFolderPickerProperties.TOOLBAR_TITLE)); assertFalse(mModel.get(BookmarkFolderPickerProperties.MOVE_BUTTON_ENABLED));
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/bookmarks/BookmarkManagerMediatorTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/bookmarks/BookmarkManagerMediatorTest.java index d0b0a94..91dce2e8 100644 --- a/chrome/android/junit/src/org/chromium/chrome/browser/bookmarks/BookmarkManagerMediatorTest.java +++ b/chrome/android/junit/src/org/chromium/chrome/browser/bookmarks/BookmarkManagerMediatorTest.java
@@ -1204,12 +1204,16 @@ assertTrue(mModelList.get(0).model.get( BookmarkSearchBoxRowProperties.CLEAR_SEARCH_TEXT_BUTTON_VISIBILITY)); + reset(mHideKeyboardRunnable); searchTextChangeCallback.onResult(""); assertEquals(BookmarkUiMode.FOLDER, mMediator.getCurrentUiMode()); verify(mBookmarkModel, never()).searchBookmarks(eq(""), anyInt()); verify(mBookmarkModel, never()).searchBookmarks(eq(null), anyInt()); assertFalse(mModelList.get(0).model.get( BookmarkSearchBoxRowProperties.CLEAR_SEARCH_TEXT_BUTTON_VISIBILITY)); + assertFalse(propertyModel.get( + BookmarkSearchBoxRowProperties.CLEAR_SEARCH_TEXT_BUTTON_VISIBILITY)); + verifyNoInteractions(mHideKeyboardRunnable); } @Test @@ -1339,6 +1343,7 @@ public void testClearFocusOnScroll() { finishLoading(); mMediator.openFolder(mFolderId1); + reset(mHideKeyboardRunnable); assertEquals(ViewType.SEARCH_BOX, mModelList.get(0).type); verify(mOnScrollListenerConsumer).accept(mOnScrollListenerCaptor.capture()); @@ -1363,6 +1368,7 @@ public void testHideKeyboardOnLostSearchFocus() { finishLoading(); mMediator.openFolder(mFolderId1); + reset(mHideKeyboardRunnable); assertEquals(ViewType.SEARCH_BOX, mModelList.get(0).type); PropertyModel searchBoxRowPropertyModel = mModelList.get(0).model; @@ -1408,9 +1414,13 @@ String searchText = "foo"; searchTextCallback.onResult(searchText); assertEquals(searchText, propertyModel.get(BookmarkSearchBoxRowProperties.SEARCH_TEXT)); + assertTrue(propertyModel.get( + BookmarkSearchBoxRowProperties.CLEAR_SEARCH_TEXT_BUTTON_VISIBILITY)); clearSearchTextRunnable.run(); assertEquals("", propertyModel.get(BookmarkSearchBoxRowProperties.SEARCH_TEXT)); + assertFalse(propertyModel.get( + BookmarkSearchBoxRowProperties.CLEAR_SEARCH_TEXT_BUTTON_VISIBILITY)); } @Test
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/bookmarks/ImprovedBookmarkQueryHandlerTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/bookmarks/ImprovedBookmarkQueryHandlerTest.java index 75f966b..ea63bb1 100644 --- a/chrome/android/junit/src/org/chromium/chrome/browser/bookmarks/ImprovedBookmarkQueryHandlerTest.java +++ b/chrome/android/junit/src/org/chromium/chrome/browser/bookmarks/ImprovedBookmarkQueryHandlerTest.java
@@ -42,6 +42,7 @@ import org.chromium.chrome.browser.profiles.Profile; import org.chromium.components.bookmarks.BookmarkId; import org.chromium.components.bookmarks.BookmarkItem; +import org.chromium.components.commerce.core.ShoppingService; import org.chromium.components.feature_engagement.Tracker; import org.chromium.components.power_bookmarks.PowerBookmarkMeta; import org.chromium.components.power_bookmarks.PowerBookmarkType; @@ -67,6 +68,8 @@ private Profile mProfile; @Mock private BookmarkUiPrefs mBookmarkUiPrefs; + @Mock + private ShoppingService mShoppingService; private ImprovedBookmarkQueryHandler mHandler; @@ -76,7 +79,8 @@ TrackerFactory.setTrackerForTests(mTracker); SharedBookmarkModelMocks.initMocks(mBookmarkModel); - mHandler = new ImprovedBookmarkQueryHandler(mBookmarkModel, mBookmarkUiPrefs); + mHandler = new ImprovedBookmarkQueryHandler( + mBookmarkModel, mBookmarkUiPrefs, mShoppingService); } @Test @@ -177,17 +181,34 @@ @Test public void testSearchWithShoppingFilter() { - List<BookmarkId> queryIds = Arrays.asList(URL_BOOKMARK_ID_A, URL_BOOKMARK_ID_B); + List<BookmarkId> queryIds = Arrays.asList( + URL_BOOKMARK_ID_A, URL_BOOKMARK_ID_B, URL_BOOKMARK_ID_C, URL_BOOKMARK_ID_D); doReturn(queryIds) .when(mBookmarkModel) .searchBookmarks(ArgumentMatchers.any(), ArgumentMatchers.anyInt()); - PowerBookmarkMeta metaWithShopping = + ShoppingSpecifics trackedShoppingSpecifics = + ShoppingSpecifics.newBuilder().setProductClusterId(1).build(); + PowerBookmarkMeta shoppingMetaTracked = PowerBookmarkMeta.newBuilder() - .setShoppingSpecifics(ShoppingSpecifics.newBuilder().build()) + .setShoppingSpecifics(trackedShoppingSpecifics) .build(); - doReturn(metaWithShopping).when(mBookmarkModel).getPowerBookmarkMeta(URL_BOOKMARK_ID_A); - PowerBookmarkMeta metaWithoutShopping = PowerBookmarkMeta.newBuilder().build(); - doReturn(metaWithoutShopping).when(mBookmarkModel).getPowerBookmarkMeta(URL_BOOKMARK_ID_B); + doReturn(true) + .when(mShoppingService) + .isSubscribedFromCache( + PowerBookmarkUtils.createCommerceSubscriptionForShoppingSpecifics( + trackedShoppingSpecifics)); + doReturn(shoppingMetaTracked).when(mBookmarkModel).getPowerBookmarkMeta(URL_BOOKMARK_ID_A); + PowerBookmarkMeta shoppingMetaNotTracked = + PowerBookmarkMeta.newBuilder() + .setShoppingSpecifics( + ShoppingSpecifics.newBuilder().setProductClusterId(2).build()) + .build(); + doReturn(shoppingMetaNotTracked) + .when(mBookmarkModel) + .getPowerBookmarkMeta(URL_BOOKMARK_ID_B); + PowerBookmarkMeta metaNoShopping = PowerBookmarkMeta.newBuilder().build(); + doReturn(metaNoShopping).when(mBookmarkModel).getPowerBookmarkMeta(URL_BOOKMARK_ID_C); + doReturn(null).when(mBookmarkModel).getPowerBookmarkMeta(URL_BOOKMARK_ID_D); List<BookmarkListEntry> result = mHandler.buildBookmarkListForSearch( "", Collections.singleton(PowerBookmarkType.SHOPPING));
diff --git a/chrome/android/trichrome.gni b/chrome/android/trichrome.gni index 8b36c95..087f1080 100644 --- a/chrome/android/trichrome.gni +++ b/chrome/android/trichrome.gni
@@ -185,14 +185,7 @@ # parameters, and is used by SuperSize-archive to create multi-container .size # files. This is used to support SuperSize on Trichrome. template("write_ssargs_trichrome") { - if (defined(invoker.abi_filter)) { - _abi_filter = invoker.abi_filter - } else { - # For backwards compatility. - # TODO(huangs): Remove after updating //clank/java/BUILD.gn. - _abi_filter = android_app_abi - } - _extra_args = " --abi-filter $_abi_filter" + _extra_args = " --abi-filter ${invoker.abi_filter}" # Base names (i.e., no full path) are used because .ssargs files specifies # files using paths relative to itself. It is expected for |ssargs_path| to
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd index b6e2af6..18025fb 100644 --- a/chrome/app/generated_resources.grd +++ b/chrome/app/generated_resources.grd
@@ -15989,6 +15989,22 @@ translateable="false"> Lorem ipsum dolor sit amet </message> + <message name="IDS_SEARCH_ENGINE_CHOICE_INFO_DIALOG_BODY_FIRST_PARAGRAPH" desc="The first paragraph of the info dialog body of the Search Engine Choice page." + translateable="false"> + 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. + </message> + <message name="IDS_SEARCH_ENGINE_CHOICE_INFO_DIALOG_BODY_SECOND_PARAGRAPH" desc="The second paragraph of the info dialog body of the Search Engine Choice page." + translateable="false"> + <ph name="BEGIN_BOLD"><b></ph>Nisi ut aliquip ex ea commodo consequat. Duis aute irure dolorin reprehenderit in voluptate<ph name="END_BOLD"></b></ph> velit esse cillum dolore eufugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident,sunt in culpa qui officia deserunt mollit anim id est laborum. + </message> + <message name="IDS_SEARCH_ENGINE_CHOICE_INFO_DIALOG_BODY_THIRD_PARAGRAPH" desc="The third paragraph of the info dialog body of the Search Engine Choice page." + translateable="false"> + Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque. + </message> + <message name="IDS_SEARCH_ENGINE_CHOICE_INFO_DIALOG_BUTTON_TITLE" desc="The title of the button of the Search Engine Choice info dialog." + translateable="false"> + Lorem ipsum + </message> </if> <!-- Infobar shown when Protected Audiences Debugging is enabled -->
diff --git a/chrome/app/printing_strings.grdp b/chrome/app/printing_strings.grdp index ba0e217..9264f74 100644 --- a/chrome/app/printing_strings.grdp +++ b/chrome/app/printing_strings.grdp
@@ -86,6 +86,9 @@ <message name="IDS_PRINT_PREVIEW_OPTION_SHORT_EDGE" desc="Option to do two-sided (duplex) printing with the page flipped on the short edge of the paper."> Flip on short edge </message> + <message name="IDS_PRINT_PREVIEW_BORDERLESS_LABEL" desc="Label for checkbox to enable borderless (zero margins) printing."> + No border + </message> <message name="IDS_PRINT_PREVIEW_PAGES_LABEL" desc="Page range option label."> Pages </message>
diff --git a/chrome/app/printing_strings_grdp/IDS_PRINT_PREVIEW_BORDERLESS_LABEL.png.sha1 b/chrome/app/printing_strings_grdp/IDS_PRINT_PREVIEW_BORDERLESS_LABEL.png.sha1 new file mode 100644 index 0000000..7584a1c --- /dev/null +++ b/chrome/app/printing_strings_grdp/IDS_PRINT_PREVIEW_BORDERLESS_LABEL.png.sha1
@@ -0,0 +1 @@ +ece069a0b5734b75fc9f402143eb761466456b61 \ No newline at end of file
diff --git a/chrome/app/vector_icons/side_panel_left.icon b/chrome/app/vector_icons/side_panel_left.icon index 8a007cdcb..d22a411 100644 --- a/chrome/app/vector_icons/side_panel_left.icon +++ b/chrome/app/vector_icons/side_panel_left.icon
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/app/vector_icons/side_panel_left_touch.icon b/chrome/app/vector_icons/side_panel_left_touch.icon index c2076fa3..99f779635 100644 --- a/chrome/app/vector_icons/side_panel_left_touch.icon +++ b/chrome/app/vector_icons/side_panel_left_touch.icon
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/accessibility/hierarchysnapshotter/android/BUILD.gn b/chrome/browser/accessibility/hierarchysnapshotter/android/BUILD.gn index aeee856..4888398 100644 --- a/chrome/browser/accessibility/hierarchysnapshotter/android/BUILD.gn +++ b/chrome/browser/accessibility/hierarchysnapshotter/android/BUILD.gn
@@ -1,4 +1,4 @@ -# Copyright 2022 The Chromium Authors. All rights reserved. +# Copyright 2022 The Chromium Authors # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file.
diff --git a/chrome/browser/accessibility/service/accessibility_service_router.cc b/chrome/browser/accessibility/service/accessibility_service_router.cc index cf1b6ca5..9ed7d59 100644 --- a/chrome/browser/accessibility/service/accessibility_service_router.cc +++ b/chrome/browser/accessibility/service/accessibility_service_router.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/accessibility/service/accessibility_service_router.h b/chrome/browser/accessibility/service/accessibility_service_router.h index a8f7b139..2965868 100644 --- a/chrome/browser/accessibility/service/accessibility_service_router.h +++ b/chrome/browser/accessibility/service/accessibility_service_router.h
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/accessibility/service/accessibility_service_router_factory.cc b/chrome/browser/accessibility/service/accessibility_service_router_factory.cc index f0e7d83..ebc2d0c7 100644 --- a/chrome/browser/accessibility/service/accessibility_service_router_factory.cc +++ b/chrome/browser/accessibility/service/accessibility_service_router_factory.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/accessibility/service/accessibility_service_router_factory.h b/chrome/browser/accessibility/service/accessibility_service_router_factory.h index 6cbcc140..a908ec1 100644 --- a/chrome/browser/accessibility/service/accessibility_service_router_factory.h +++ b/chrome/browser/accessibility/service/accessibility_service_router_factory.h
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/android/browserservices/verification/java/src/org/chromium/chrome/browser/browserservices/verification/ChromeOriginVerifier.java b/chrome/browser/android/browserservices/verification/java/src/org/chromium/chrome/browser/browserservices/verification/ChromeOriginVerifier.java index 13853f5a..6ecbc996 100644 --- a/chrome/browser/android/browserservices/verification/java/src/org/chromium/chrome/browser/browserservices/verification/ChromeOriginVerifier.java +++ b/chrome/browser/android/browserservices/verification/java/src/org/chromium/chrome/browser/browserservices/verification/ChromeOriginVerifier.java
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/android/customtabs/chrome_origin_verifier.cc b/chrome/browser/android/customtabs/chrome_origin_verifier.cc index 174efab..468232f 100644 --- a/chrome/browser/android/customtabs/chrome_origin_verifier.cc +++ b/chrome/browser/android/customtabs/chrome_origin_verifier.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/android/customtabs/chrome_origin_verifier.h b/chrome/browser/android/customtabs/chrome_origin_verifier.h index 06d4f1e1..88e1a69e 100644 --- a/chrome/browser/android/customtabs/chrome_origin_verifier.h +++ b/chrome/browser/android/customtabs/chrome_origin_verifier.h
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/android/examples/custom_tabs_client/src/java/org/chromium/customtabsclient/MainActivity.java b/chrome/browser/android/examples/custom_tabs_client/src/java/org/chromium/customtabsclient/MainActivity.java index d61ef9e..64546d93 100644 --- a/chrome/browser/android/examples/custom_tabs_client/src/java/org/chromium/customtabsclient/MainActivity.java +++ b/chrome/browser/android/examples/custom_tabs_client/src/java/org/chromium/customtabsclient/MainActivity.java
@@ -1,4 +1,4 @@ -// Copyright 2015 The Chromium Authors. All rights reserved. +// Copyright 2015 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.customtabsclient;
diff --git a/chrome/browser/android/historical_tab_saver_browsertest.cc b/chrome/browser/android/historical_tab_saver_browsertest.cc index a0761eae..53a712a 100644 --- a/chrome/browser/android/historical_tab_saver_browsertest.cc +++ b/chrome/browser/android/historical_tab_saver_browsertest.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/apps/app_service/metrics/website_metrics_service_lacros.cc b/chrome/browser/apps/app_service/metrics/website_metrics_service_lacros.cc index f934269..8b0507e 100644 --- a/chrome/browser/apps/app_service/metrics/website_metrics_service_lacros.cc +++ b/chrome/browser/apps/app_service/metrics/website_metrics_service_lacros.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/apps/app_service/metrics/website_metrics_service_lacros.h b/chrome/browser/apps/app_service/metrics/website_metrics_service_lacros.h index e3f931a..127e70a 100644 --- a/chrome/browser/apps/app_service/metrics/website_metrics_service_lacros.h +++ b/chrome/browser/apps/app_service/metrics/website_metrics_service_lacros.h
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/apps/app_service/policy_util.cc b/chrome/browser/apps/app_service/policy_util.cc index 87ac7e8..8b283aa 100644 --- a/chrome/browser/apps/app_service/policy_util.cc +++ b/chrome/browser/apps/app_service/policy_util.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/apps/app_service/policy_util.h b/chrome/browser/apps/app_service/policy_util.h index b9123c9..11809ee 100644 --- a/chrome/browser/apps/app_service/policy_util.h +++ b/chrome/browser/apps/app_service/policy_util.h
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. //
diff --git a/chrome/browser/apps/app_service/subscriber_crosapi.cc b/chrome/browser/apps/app_service/subscriber_crosapi.cc index 8dd471b..b9e262f 100644 --- a/chrome/browser/apps/app_service/subscriber_crosapi.cc +++ b/chrome/browser/apps/app_service/subscriber_crosapi.cc
@@ -15,7 +15,7 @@ #include "chrome/browser/apps/app_service/metrics/app_service_metrics.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/chrome_pages.h" -#include "chrome/browser/ui/webui/settings/ash/app_management/app_management_uma.h" +#include "chrome/browser/ui/webui/ash/settings/app_management/app_management_uma.h" #include "components/services/app_service/public/cpp/app_registry_cache.h" #include "components/services/app_service/public/cpp/app_types.h"
diff --git a/chrome/browser/ash/accessibility/service/accessibility_service_client.cc b/chrome/browser/ash/accessibility/service/accessibility_service_client.cc index 041a85e..a951ef3 100644 --- a/chrome/browser/ash/accessibility/service/accessibility_service_client.cc +++ b/chrome/browser/ash/accessibility/service/accessibility_service_client.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ash/accessibility/service/accessibility_service_client.h b/chrome/browser/ash/accessibility/service/accessibility_service_client.h index 23e9d787..f3b68b7 100644 --- a/chrome/browser/ash/accessibility/service/accessibility_service_client.h +++ b/chrome/browser/ash/accessibility/service/accessibility_service_client.h
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ash/accessibility/service/accessibility_service_client_browsertest.cc b/chrome/browser/ash/accessibility/service/accessibility_service_client_browsertest.cc index 20f05c4..7ef99ca7 100644 --- a/chrome/browser/ash/accessibility/service/accessibility_service_client_browsertest.cc +++ b/chrome/browser/ash/accessibility/service/accessibility_service_client_browsertest.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ash/accessibility/service/automation_client_impl.cc b/chrome/browser/ash/accessibility/service/automation_client_impl.cc index f2d7d1e..5ae274fa 100644 --- a/chrome/browser/ash/accessibility/service/automation_client_impl.cc +++ b/chrome/browser/ash/accessibility/service/automation_client_impl.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ash/accessibility/service/automation_client_impl.h b/chrome/browser/ash/accessibility/service/automation_client_impl.h index 5fe816d2..722ef75 100644 --- a/chrome/browser/ash/accessibility/service/automation_client_impl.h +++ b/chrome/browser/ash/accessibility/service/automation_client_impl.h
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ash/accessibility/service/fake_accessibility_service.cc b/chrome/browser/ash/accessibility/service/fake_accessibility_service.cc index 78a09813..a68e7f5 100644 --- a/chrome/browser/ash/accessibility/service/fake_accessibility_service.cc +++ b/chrome/browser/ash/accessibility/service/fake_accessibility_service.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ash/accessibility/service/fake_accessibility_service.h b/chrome/browser/ash/accessibility/service/fake_accessibility_service.h index faed6b5e..d1d3286a 100644 --- a/chrome/browser/ash/accessibility/service/fake_accessibility_service.h +++ b/chrome/browser/ash/accessibility/service/fake_accessibility_service.h
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ash/app_list/app_list_controller_delegate.cc b/chrome/browser/ash/app_list/app_list_controller_delegate.cc index d2bb265a..1546a05a 100644 --- a/chrome/browser/ash/app_list/app_list_controller_delegate.cc +++ b/chrome/browser/ash/app_list/app_list_controller_delegate.cc
@@ -16,7 +16,7 @@ #include "chrome/browser/extensions/launch_util.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/chrome_pages.h" -#include "chrome/browser/ui/webui/settings/ash/app_management/app_management_uma.h" +#include "chrome/browser/ui/webui/ash/settings/app_management/app_management_uma.h" #include "chrome/common/extensions/extension_constants.h" #include "components/services/app_service/public/cpp/app_types.h" #include "extensions/browser/extension_prefs.h"
diff --git a/chrome/browser/ash/app_list/app_service/app_service_context_menu.cc b/chrome/browser/ash/app_list/app_service/app_service_context_menu.cc index 5fc6580..c44788f 100644 --- a/chrome/browser/ash/app_list/app_service/app_service_context_menu.cc +++ b/chrome/browser/ash/app_list/app_service/app_service_context_menu.cc
@@ -33,7 +33,7 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/ash/shelf/standalone_browser_extension_app_context_menu.h" #include "chrome/browser/ui/chrome_pages.h" -#include "chrome/browser/ui/webui/settings/ash/app_management/app_management_uma.h" +#include "chrome/browser/ui/webui/ash/settings/app_management/app_management_uma.h" #include "chrome/grit/generated_resources.h" #include "components/app_constants/constants.h" #include "components/services/app_service/public/cpp/types_util.h"
diff --git a/chrome/browser/ash/arc/input_overlay/arc_input_overlay_ukm.cc b/chrome/browser/ash/arc/input_overlay/arc_input_overlay_ukm.cc index 50334412..1d43d33c 100644 --- a/chrome/browser/ash/arc/input_overlay/arc_input_overlay_ukm.cc +++ b/chrome/browser/ash/arc/input_overlay/arc_input_overlay_ukm.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ash/arc/input_overlay/arc_input_overlay_ukm.h b/chrome/browser/ash/arc/input_overlay/arc_input_overlay_ukm.h index 63b55170..85f3c50c 100644 --- a/chrome/browser/ash/arc/input_overlay/arc_input_overlay_ukm.h +++ b/chrome/browser/ash/arc/input_overlay/arc_input_overlay_ukm.h
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ash/arc/policy/arc_policy_util_unittest.cc b/chrome/browser/ash/arc/policy/arc_policy_util_unittest.cc index 65262e7..64037bc 100644 --- a/chrome/browser/ash/arc/policy/arc_policy_util_unittest.cc +++ b/chrome/browser/ash/arc/policy/arc_policy_util_unittest.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ash/camera_mic/vm_camera_mic_manager.cc b/chrome/browser/ash/camera_mic/vm_camera_mic_manager.cc index 140b024..0e8b8a8 100644 --- a/chrome/browser/ash/camera_mic/vm_camera_mic_manager.cc +++ b/chrome/browser/ash/camera_mic/vm_camera_mic_manager.cc
@@ -31,7 +31,7 @@ #include "chrome/browser/notifications/notification_display_service.h" #include "chrome/browser/ui/chrome_pages.h" #include "chrome/browser/ui/settings_window_manager_chromeos.h" -#include "chrome/browser/ui/webui/settings/ash/app_management/app_management_uma.h" +#include "chrome/browser/ui/webui/ash/settings/app_management/app_management_uma.h" #include "chrome/grit/generated_resources.h" #include "components/vector_icons/vector_icons.h" #include "content/public/browser/browser_task_traits.h"
diff --git a/chrome/browser/ash/crosapi/device_attributes_ash_unittest.cc b/chrome/browser/ash/crosapi/device_attributes_ash_unittest.cc index bd1c82d..9b27bb2 100644 --- a/chrome/browser/ash/crosapi/device_attributes_ash_unittest.cc +++ b/chrome/browser/ash/crosapi/device_attributes_ash_unittest.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ash/crosapi/device_local_account_extension_service_ash.cc b/chrome/browser/ash/crosapi/device_local_account_extension_service_ash.cc index 68b2e81..d156449 100644 --- a/chrome/browser/ash/crosapi/device_local_account_extension_service_ash.cc +++ b/chrome/browser/ash/crosapi/device_local_account_extension_service_ash.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ash/crosapi/device_local_account_extension_service_ash.h b/chrome/browser/ash/crosapi/device_local_account_extension_service_ash.h index 34e08f6..deaeff8 100644 --- a/chrome/browser/ash/crosapi/device_local_account_extension_service_ash.h +++ b/chrome/browser/ash/crosapi/device_local_account_extension_service_ash.h
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ash/crosapi/device_settings_ash_unittest.cc b/chrome/browser/ash/crosapi/device_settings_ash_unittest.cc index e99bcc8..081fd625 100644 --- a/chrome/browser/ash/crosapi/device_settings_ash_unittest.cc +++ b/chrome/browser/ash/crosapi/device_settings_ash_unittest.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ash/crosapi/parent_access_ash.cc b/chrome/browser/ash/crosapi/parent_access_ash.cc index afc6565..fee5faa 100644 --- a/chrome/browser/ash/crosapi/parent_access_ash.cc +++ b/chrome/browser/ash/crosapi/parent_access_ash.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ash/crosapi/parent_access_ash.h b/chrome/browser/ash/crosapi/parent_access_ash.h index b6d0b8e..6907ebe 100644 --- a/chrome/browser/ash/crosapi/parent_access_ash.h +++ b/chrome/browser/ash/crosapi/parent_access_ash.h
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ash/crosapi/parent_access_ash_unittest.cc b/chrome/browser/ash/crosapi/parent_access_ash_unittest.cc index 8281674a..9e2a246 100644 --- a/chrome/browser/ash/crosapi/parent_access_ash_unittest.cc +++ b/chrome/browser/ash/crosapi/parent_access_ash_unittest.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ash/dbus/vm/plugin_vm_service_provider.cc b/chrome/browser/ash/dbus/vm/plugin_vm_service_provider.cc index 78717aa..60fdef14 100644 --- a/chrome/browser/ash/dbus/vm/plugin_vm_service_provider.cc +++ b/chrome/browser/ash/dbus/vm/plugin_vm_service_provider.cc
@@ -18,7 +18,7 @@ #include "chrome/browser/profiles/profile_manager.h" #include "chrome/browser/ui/chrome_pages.h" #include "chrome/browser/ui/settings_window_manager_chromeos.h" -#include "chrome/browser/ui/webui/settings/ash/app_management/app_management_uma.h" +#include "chrome/browser/ui/webui/ash/settings/app_management/app_management_uma.h" #include "chrome/common/webui_url_constants.h" #include "chromeos/ash/components/dbus/plugin_vm_service/plugin_vm_service.pb.h" #include "components/prefs/pref_service.h"
diff --git a/chrome/browser/ash/drive/drive_integration_service.cc b/chrome/browser/ash/drive/drive_integration_service.cc index aa68a6f..551a235 100644 --- a/chrome/browser/ash/drive/drive_integration_service.cc +++ b/chrome/browser/ash/drive/drive_integration_service.cc
@@ -1788,15 +1788,15 @@ } void DriveIntegrationService::UpdateNetworkState() { - const util::ConnectionStatus status = + const util::ConnectionStatusType status = util::GetDriveConnectionStatus(profile_); VLOG(1) << "UpdateNetworkState: " << status; - using enum util::ConnectionStatus; - is_online_ = status == kMetered || status == kConnected; + using enum util::ConnectionStatusType; + is_online_ = status == DRIVE_CONNECTED_METERED || status == DRIVE_CONNECTED; if (DriveFs* const drivefs = GetDriveFsInterface()) { - const bool pause_syncing = status == kMetered; + const bool pause_syncing = status == DRIVE_CONNECTED_METERED; drivefs->UpdateNetworkState(pause_syncing, !is_online_); }
diff --git a/chrome/browser/ash/drive/drive_integration_service.h b/chrome/browser/ash/drive/drive_integration_service.h index 7cfb74a..8ce4095 100644 --- a/chrome/browser/ash/drive/drive_integration_service.h +++ b/chrome/browser/ash/drive/drive_integration_service.h
@@ -101,7 +101,8 @@ virtual void OnBulkPinInitialized() {} // Triggered when the network connection to Drive could have changed. - virtual void OnDriveConnectionStatusChanged(util::ConnectionStatus status) {} + virtual void OnDriveConnectionStatusChanged( + util::ConnectionStatusType status) {} }; // DriveIntegrationService is used to integrate Drive to Chrome. This class
diff --git a/chrome/browser/ash/drive/drive_integration_service_browser_test_base.cc b/chrome/browser/ash/drive/drive_integration_service_browser_test_base.cc index cffb49a..38a5495 100644 --- a/chrome/browser/ash/drive/drive_integration_service_browser_test_base.cc +++ b/chrome/browser/ash/drive/drive_integration_service_browser_test_base.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ash/drive/drive_integration_service_browser_test_base.h b/chrome/browser/ash/drive/drive_integration_service_browser_test_base.h index b47543c..8b0e7bf 100644 --- a/chrome/browser/ash/drive/drive_integration_service_browser_test_base.h +++ b/chrome/browser/ash/drive/drive_integration_service_browser_test_base.h
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ash/drive/file_system_util.cc b/chrome/browser/ash/drive/file_system_util.cc index ce36308..c773b5ae 100644 --- a/chrome/browser/ash/drive/file_system_util.cc +++ b/chrome/browser/ash/drive/file_system_util.cc
@@ -8,7 +8,6 @@ #include <memory> #include <string> -#include <type_traits> #include <vector> #include "ash/constants/ash_constants.h" @@ -175,35 +174,17 @@ return IsOobeDrivePinningEnabled(ProfileManager::GetActiveUserProfile()); } -std::ostream& operator<<(std::ostream& out, const ConnectionStatus status) { - switch (status) { -#define PRINT(s) \ - case ConnectionStatus::k##s: \ - return out << #s; - PRINT(NoService) - PRINT(NoNetwork) - PRINT(NotReady) - PRINT(Metered) - PRINT(Connected) -#undef PRINT - } - - return out << "ConnectionStatus(" - << static_cast<std::underlying_type_t<ConnectionStatus>>(status) - << ")"; -} - -ConnectionStatus GetDriveConnectionStatus(Profile* const profile) { - using enum ConnectionStatus; +ConnectionStatusType GetDriveConnectionStatus(Profile* const profile) { + using enum ConnectionStatusType; if (!GetIntegrationServiceByProfile(profile)) { VLOG(1) << "GetDriveConnectionStatus: no Drive integration service"; - return kNoService; + return DRIVE_DISCONNECTED_NOSERVICE; } if (!ash::NetworkHandler::IsInitialized()) { VLOG(1) << "GetDriveConnectionStatus: no network handler"; - return kNoNetwork; + return DRIVE_DISCONNECTED_NONETWORK; } ash::NetworkStateHandler* const handler = @@ -213,23 +194,23 @@ const ash::NetworkState* const network = handler->DefaultNetwork(); if (!network) { VLOG(1) << "GetDriveConnectionStatus: no network"; - return kNoNetwork; + return DRIVE_DISCONNECTED_NONETWORK; } if (!network->IsOnline()) { VLOG(1) << "GetDriveConnectionStatus: not ready"; - return kNotReady; + return DRIVE_DISCONNECTED_NOTREADY; } DCHECK(profile); if (profile->GetPrefs()->GetBoolean(prefs::kDisableDriveOverCellular) && handler->default_network_is_metered()) { VLOG(1) << "GetDriveConnectionStatus: metered"; - return kMetered; + return DRIVE_CONNECTED_METERED; } VLOG(1) << "GetDriveConnectionStatus: connected"; - return kConnected; + return DRIVE_CONNECTED; } bool IsPinnableGDocMimeType(const std::string& mime_type) { @@ -243,25 +224,24 @@ return base::Contains(kPinnableGDocMimeTypes, mime_type); } -int64_t ComputeDriveFsContentCacheSize(const base::FilePath& path) { - int64_t blocks = 0; +int64_t ComputeDriveFsContentCacheSize( + const base::FilePath& content_cache_path) { + int64_t running_size = 0; + base::FileEnumerator file_iter(content_cache_path, + /*recursive=*/true, + base::FileEnumerator::FILES); + while (!file_iter.Next().empty()) { + const base::FileEnumerator::FileInfo& file_info = file_iter.GetInfo(); - using base::FileEnumerator; - FileEnumerator it(path, true, FileEnumerator::FILES); - while (!it.Next().empty()) { - const FileEnumerator::FileInfo& info = it.GetInfo(); - - // Skip the `chunks.db*` files. - if (base::StartsWith(info.GetName().value(), "chunks.db")) { + // Ignore the `chunks.db*` files when calculating the size of the content + // cache. + if (base::StartsWith(file_info.GetName().value(), "chunks.db")) { continue; } - - blocks += info.stat().st_blocks; + running_size += file_info.GetSize(); } - - const int64_t size = blocks << 9; - VLOG(1) << "DriveFs cache: " << (size >> 20) << " M"; - return size; + LOG(ERROR) << "ComputeDriveFsContentCacheSize: " << running_size; + return running_size; } } // namespace drive::util
diff --git a/chrome/browser/ash/drive/file_system_util.h b/chrome/browser/ash/drive/file_system_util.h index d4826da..2d701b73 100644 --- a/chrome/browser/ash/drive/file_system_util.h +++ b/chrome/browser/ash/drive/file_system_util.h
@@ -5,8 +5,6 @@ #ifndef CHROME_BROWSER_ASH_DRIVE_FILE_SYSTEM_UTIL_H_ #define CHROME_BROWSER_ASH_DRIVE_FILE_SYSTEM_UTIL_H_ -#include <ostream> - #include "base/files/file_path.h" class Profile; @@ -45,34 +43,32 @@ [[nodiscard]] bool IsOobeDrivePinningEnabled(const Profile* profile); [[nodiscard]] bool IsOobeDrivePinningEnabled(); -// Connection status to Drive. -enum class ConnectionStatus { +// Enum type for describing the current connection status to Drive. +enum ConnectionStatusType { // Disconnected because Drive service is unavailable for this account (either // disabled by a flag or the account has no Google account (e.g., guests)). - kNoService, + DRIVE_DISCONNECTED_NOSERVICE, // Disconnected because no network is available. - kNoNetwork, + DRIVE_DISCONNECTED_NONETWORK, // Disconnected because authentication is not ready. - kNotReady, - // Connected by metered network (eg cellular network, or metered WiFi.) - // Background sync is disabled. - kMetered, - // Connected without limitation (WiFi, Ethernet, or cellular with the + DRIVE_DISCONNECTED_NOTREADY, + // Connected by cellular network. Background sync is disabled. + DRIVE_CONNECTED_METERED, + // Connected without condition (WiFi, Ethernet, or cellular with the // disable-sync preference turned off.) - kConnected, + DRIVE_CONNECTED, }; -std::ostream& operator<<(std::ostream& out, ConnectionStatus status); - // Returns the Drive connection status for the |profile|. -ConnectionStatus GetDriveConnectionStatus(Profile* profile); +ConnectionStatusType GetDriveConnectionStatus(Profile* profile); // Returns true if the supplied mime type is of a pinnable type. This indicates // the file can be made available offline. bool IsPinnableGDocMimeType(const std::string& mime_type); // Computes the total content cache size (minus the chunks.db* metadata files). -int64_t ComputeDriveFsContentCacheSize(const base::FilePath& path); +int64_t ComputeDriveFsContentCacheSize( + const base::FilePath& content_cache_path); } // namespace util } // namespace drive
diff --git a/chrome/browser/ash/extensions/file_manager/event_router.cc b/chrome/browser/ash/extensions/file_manager/event_router.cc index cab070a7..4b15bc0 100644 --- a/chrome/browser/ash/extensions/file_manager/event_router.cc +++ b/chrome/browser/ash/extensions/file_manager/event_router.cc
@@ -1102,7 +1102,7 @@ } void EventRouter::OnDriveConnectionStatusChanged( - drive::util::ConnectionStatus status) { + drive::util::ConnectionStatusType status) { NotifyDriveConnectionStatusChanged(); }
diff --git a/chrome/browser/ash/extensions/file_manager/event_router.h b/chrome/browser/ash/extensions/file_manager/event_router.h index bb305f4..647a60a 100644 --- a/chrome/browser/ash/extensions/file_manager/event_router.h +++ b/chrome/browser/ash/extensions/file_manager/event_router.h
@@ -169,7 +169,7 @@ // DriveIntegrationServiceObserver override. void OnFileSystemMountFailed() override; void OnDriveConnectionStatusChanged( - drive::util::ConnectionStatus status) override; + drive::util::ConnectionStatusType status) override; // guest_os::GuestOsSharePath::Observer overrides. void OnPersistedPathRegistered(const std::string& vm_name,
diff --git a/chrome/browser/ash/extensions/file_manager/private_api_drive.cc b/chrome/browser/ash/extensions/file_manager/private_api_drive.cc index 4588a383..21a3d94 100644 --- a/chrome/browser/ash/extensions/file_manager/private_api_drive.cc +++ b/chrome/browser/ash/extensions/file_manager/private_api_drive.cc
@@ -828,28 +828,32 @@ FileManagerPrivateGetDriveConnectionStateFunction::Run() { api::file_manager_private::DriveConnectionState result; - using enum drive::util::ConnectionStatus; - using enum api::file_manager_private::DriveConnectionStateType; - using enum api::file_manager_private::DriveOfflineReason; switch (drive::util::GetDriveConnectionStatus( Profile::FromBrowserContext(browser_context()))) { - case kNoService: - result.type = DRIVE_CONNECTION_STATE_TYPE_OFFLINE; - result.reason = DRIVE_OFFLINE_REASON_NO_SERVICE; + case drive::util::DRIVE_DISCONNECTED_NOSERVICE: + result.type = + api::file_manager_private::DRIVE_CONNECTION_STATE_TYPE_OFFLINE; + result.reason = + api::file_manager_private::DRIVE_OFFLINE_REASON_NO_SERVICE; break; - case kNoNetwork: - result.type = DRIVE_CONNECTION_STATE_TYPE_OFFLINE; - result.reason = DRIVE_OFFLINE_REASON_NO_NETWORK; + case drive::util::DRIVE_DISCONNECTED_NONETWORK: + result.type = + api::file_manager_private::DRIVE_CONNECTION_STATE_TYPE_OFFLINE; + result.reason = + api::file_manager_private::DRIVE_OFFLINE_REASON_NO_NETWORK; break; - case kNotReady: - result.type = DRIVE_CONNECTION_STATE_TYPE_OFFLINE; - result.reason = DRIVE_OFFLINE_REASON_NOT_READY; + case drive::util::DRIVE_DISCONNECTED_NOTREADY: + result.type = + api::file_manager_private::DRIVE_CONNECTION_STATE_TYPE_OFFLINE; + result.reason = api::file_manager_private::DRIVE_OFFLINE_REASON_NOT_READY; break; - case kMetered: - result.type = DRIVE_CONNECTION_STATE_TYPE_METERED; + case drive::util::DRIVE_CONNECTED_METERED: + result.type = + api::file_manager_private::DRIVE_CONNECTION_STATE_TYPE_METERED; break; - case kConnected: - result.type = DRIVE_CONNECTION_STATE_TYPE_ONLINE; + case drive::util::DRIVE_CONNECTED: + result.type = + api::file_manager_private::DRIVE_CONNECTION_STATE_TYPE_ONLINE; break; } @@ -857,7 +861,7 @@ ash::NetworkHandler::Get()->network_state_handler()->FirstNetworkByType( ash::NetworkTypePattern::Mobile()); - const ExtensionSet& enabled_extensions = + const auto& enabled_extensions = extensions::ExtensionRegistry::Get(browser_context()) ->enabled_extensions(); result.can_pin_hosted_files =
diff --git a/chrome/browser/ash/extensions/file_manager/private_api_sharesheet.cc b/chrome/browser/ash/extensions/file_manager/private_api_sharesheet.cc index 8102173..93f433e 100644 --- a/chrome/browser/ash/extensions/file_manager/private_api_sharesheet.cc +++ b/chrome/browser/ash/extensions/file_manager/private_api_sharesheet.cc
@@ -110,12 +110,11 @@ if (file_system_urls_.size() == 1 && file_system_urls_[0].type() == storage::kFileSystemTypeDriveFs) { - using drive::util::ConnectionStatus; - const ConnectionStatus status = drive::util::GetDriveConnectionStatus( + auto connection_status = drive::util::GetDriveConnectionStatus( Profile::FromBrowserContext(browser_context())); - using enum ConnectionStatus; - if (status == kMetered || status == kConnected) { + if (connection_status == drive::util::DRIVE_CONNECTED_METERED || + connection_status == drive::util::DRIVE_CONNECTED) { file_manager::util::SingleEntryPropertiesGetterForDriveFs::Start( file_system_urls_[0], profile_, base::BindOnce( @@ -246,12 +245,11 @@ if (file_system_urls_.size() == 1 && file_system_urls_[0].type() == storage::kFileSystemTypeDriveFs) { - using drive::util::ConnectionStatus; - const ConnectionStatus status = drive::util::GetDriveConnectionStatus( + auto connection_status = drive::util::GetDriveConnectionStatus( Profile::FromBrowserContext(browser_context())); - using enum ConnectionStatus; - if (status == kMetered || status == kConnected) { + if (connection_status == drive::util::DRIVE_CONNECTED_METERED || + connection_status == drive::util::DRIVE_CONNECTED) { file_manager::util::SingleEntryPropertiesGetterForDriveFs::Start( file_system_urls_[0], profile_, base::BindOnce(&FileManagerPrivateInternalInvokeSharesheetFunction::
diff --git a/chrome/browser/ash/file_manager/file_tasks.cc b/chrome/browser/ash/file_manager/file_tasks.cc index 90d0bf2..830825b 100644 --- a/chrome/browser/ash/file_manager/file_tasks.cc +++ b/chrome/browser/ash/file_manager/file_tasks.cc
@@ -439,8 +439,8 @@ gfx::NativeWindow modal_parent) { drive::DriveIntegrationService* integration_service = drive::DriveIntegrationServiceFactory::FindForProfile(profile); - const bool offline = drive::util::GetDriveConnectionStatus(profile) != - drive::util::ConnectionStatus::kConnected; + bool offline = drive::util::GetDriveConnectionStatus(profile) != + drive::util::DRIVE_CONNECTED; if (!integration_service || !integration_service->IsMounted() || !integration_service->GetDriveFsInterface()) { return GetUserFallbackChoice( @@ -870,7 +870,7 @@ UMA_HISTOGRAM_ENUMERATION("FileBrowser.ViewingTaskType", task.task_type, NUM_TASK_TYPE); if (drive::util::GetDriveConnectionStatus(profile) == - drive::util::ConnectionStatus::kNoNetwork) { + drive::util::DRIVE_DISCONNECTED_NONETWORK) { UMA_HISTOGRAM_ENUMERATION("FileBrowser.ViewingTaskType.Offline", task.task_type, NUM_TASK_TYPE); } else {
diff --git a/chrome/browser/ash/login/app_mode/test/test_browser_closed_waiter.cc b/chrome/browser/ash/login/app_mode/test/test_browser_closed_waiter.cc index 9ab1b83..c8c7ff9a 100644 --- a/chrome/browser/ash/login/app_mode/test/test_browser_closed_waiter.cc +++ b/chrome/browser/ash/login/app_mode/test/test_browser_closed_waiter.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ash/login/app_mode/test/test_browser_closed_waiter.h b/chrome/browser/ash/login/app_mode/test/test_browser_closed_waiter.h index 4d886b9..f1e0f97e 100644 --- a/chrome/browser/ash/login/app_mode/test/test_browser_closed_waiter.h +++ b/chrome/browser/ash/login/app_mode/test/test_browser_closed_waiter.h
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ash/login/reporting/lock_unlock_reporter.cc b/chrome/browser/ash/login/reporting/lock_unlock_reporter.cc index fb634368..40c557b 100644 --- a/chrome/browser/ash/login/reporting/lock_unlock_reporter.cc +++ b/chrome/browser/ash/login/reporting/lock_unlock_reporter.cc
@@ -1,4 +1,4 @@ -// Copyright 2021 The Chromium Authors. All rights reserved. +// Copyright 2021 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ash/login/reporting/lock_unlock_reporter.h b/chrome/browser/ash/login/reporting/lock_unlock_reporter.h index 81c9e7f..eb2a9ca3 100644 --- a/chrome/browser/ash/login/reporting/lock_unlock_reporter.h +++ b/chrome/browser/ash/login/reporting/lock_unlock_reporter.h
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ash/login/reporting/lock_unlock_reporter_unittest.cc b/chrome/browser/ash/login/reporting/lock_unlock_reporter_unittest.cc index c721d139..4099d74 100644 --- a/chrome/browser/ash/login/reporting/lock_unlock_reporter_unittest.cc +++ b/chrome/browser/ash/login/reporting/lock_unlock_reporter_unittest.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ash/login/screens/cryptohome_recovery_screen.cc b/chrome/browser/ash/login/screens/cryptohome_recovery_screen.cc index df02afb5..527b4e8 100644 --- a/chrome/browser/ash/login/screens/cryptohome_recovery_screen.cc +++ b/chrome/browser/ash/login/screens/cryptohome_recovery_screen.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ash/login/screens/cryptohome_recovery_screen.h b/chrome/browser/ash/login/screens/cryptohome_recovery_screen.h index dde75c7f3..ae7bb55f 100644 --- a/chrome/browser/ash/login/screens/cryptohome_recovery_screen.h +++ b/chrome/browser/ash/login/screens/cryptohome_recovery_screen.h
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ash/policy/reporting/metrics_reporting/cros_healthd_sampler_handlers/cros_healthd_psr_sampler_handler.cc b/chrome/browser/ash/policy/reporting/metrics_reporting/cros_healthd_sampler_handlers/cros_healthd_psr_sampler_handler.cc index 366c346..0b717abe 100644 --- a/chrome/browser/ash/policy/reporting/metrics_reporting/cros_healthd_sampler_handlers/cros_healthd_psr_sampler_handler.cc +++ b/chrome/browser/ash/policy/reporting/metrics_reporting/cros_healthd_sampler_handlers/cros_healthd_psr_sampler_handler.cc
@@ -6,22 +6,16 @@ #include <utility> -#include "base/functional/bind.h" #include "base/functional/callback_helpers.h" #include "base/logging.h" #include "base/metrics/histogram_functions.h" -#include "base/threading/platform_thread.h" -#include "base/time/time.h" #include "base/types/cxx23_to_underlying.h" -#include "chromeos/ash/services/cros_healthd/public/cpp/service_connection.h" #include "components/reporting/metrics/sampler.h" #include "components/reporting/proto/synced/metric_data.pb.h" #include "third_party/abseil-cpp/absl/types/optional.h" namespace reporting { -namespace cros_healthd = ::ash::cros_healthd::mojom; - namespace { // These values are persisted to logs. Entries should not be renumbered and // numeric values should never be reused. @@ -37,8 +31,6 @@ kMaxValue = kUnknownPsrLogState }; -constexpr size_t kMaxRetries = 1u; - // Records PSR result to UMA. void RecordPsrResult(EnterpriseReportingPsrResult result) { base::UmaHistogramEnumeration("Browser.ERP.PsrResult", result); @@ -46,50 +38,20 @@ } // namespace -CrosHealthdPsrSamplerHandler::CrosHealthdPsrSamplerHandler() = default; +namespace cros_healthd = ::ash::cros_healthd::mojom; + CrosHealthdPsrSamplerHandler::~CrosHealthdPsrSamplerHandler() = default; void CrosHealthdPsrSamplerHandler::HandleResult( OptionalMetricCallback callback, cros_healthd::TelemetryInfoPtr result) const { - DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); - HandleResultImpl(std::move(callback), /*num_retries_left=*/kMaxRetries, - std::move(result)); -} - -void CrosHealthdPsrSamplerHandler::HandleResultImpl( - OptionalMetricCallback callback, - size_t num_retries_left, - cros_healthd::TelemetryInfoPtr result) const { - DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); absl::optional<MetricData> metric_data; base::ScopedClosureRunner run_callback_on_return(base::BindOnce( - [](base::WeakPtr<const CrosHealthdPsrSamplerHandler> self, - OptionalMetricCallback callback, - absl::optional<MetricData>* metric_data, size_t num_retries_left) { - if (!metric_data->has_value() && num_retries_left > 0) { - // Failed to obtain PSR info, try again in 10 seconds. May be due to - // some race condition as specified in the bug below. - // TODO(b/280068539): Reevaluate the error handling here when - // b/297413010 is fixed. - // TODO(b/280068539): Add a unit test for the scenario when the first - // try fails and second try succeeds. - base::PlatformThread::Sleep(base::Seconds(10)); - auto healthd_callback = - base::BindOnce(&CrosHealthdPsrSamplerHandler::HandleResultImpl, - self, std::move(callback), num_retries_left - 1); - ash::cros_healthd::ServiceConnection::GetInstance() - ->GetProbeService() - ->ProbeTelemetryInfo( - std::vector<cros_healthd::ProbeCategoryEnum>{ - cros_healthd::ProbeCategoryEnum::kSystem}, - std::move(healthd_callback)); - return; - } + [](OptionalMetricCallback callback, + absl::optional<MetricData>* metric_data) { std::move(callback).Run(std::move(*metric_data)); }, - weak_ptr_factory_.GetWeakPtr(), std::move(callback), &metric_data, - num_retries_left)); + std::move(callback), &metric_data)); const auto& system_result = result->system_result; if (system_result.is_null()) {
diff --git a/chrome/browser/ash/policy/reporting/metrics_reporting/cros_healthd_sampler_handlers/cros_healthd_psr_sampler_handler.h b/chrome/browser/ash/policy/reporting/metrics_reporting/cros_healthd_sampler_handlers/cros_healthd_psr_sampler_handler.h index 3c92841..cde241f 100644 --- a/chrome/browser/ash/policy/reporting/metrics_reporting/cros_healthd_sampler_handlers/cros_healthd_psr_sampler_handler.h +++ b/chrome/browser/ash/policy/reporting/metrics_reporting/cros_healthd_sampler_handlers/cros_healthd_psr_sampler_handler.h
@@ -5,8 +5,6 @@ #ifndef CHROME_BROWSER_ASH_POLICY_REPORTING_METRICS_REPORTING_CROS_HEALTHD_SAMPLER_HANDLERS_CROS_HEALTHD_PSR_SAMPLER_HANDLER_H_ #define CHROME_BROWSER_ASH_POLICY_REPORTING_METRICS_REPORTING_CROS_HEALTHD_SAMPLER_HANDLERS_CROS_HEALTHD_PSR_SAMPLER_HANDLER_H_ -#include "base/memory/weak_ptr.h" -#include "base/sequence_checker.h" #include "chrome/browser/ash/policy/reporting/metrics_reporting/cros_healthd_sampler_handlers/cros_healthd_sampler_handler.h" #include "chromeos/ash/services/cros_healthd/public/mojom/cros_healthd_probe.mojom.h" #include "components/reporting/metrics/sampler.h" @@ -20,7 +18,7 @@ // PSR. class CrosHealthdPsrSamplerHandler : public CrosHealthdSamplerHandler { public: - CrosHealthdPsrSamplerHandler(); + CrosHealthdPsrSamplerHandler() = default; CrosHealthdPsrSamplerHandler(const CrosHealthdPsrSamplerHandler&) = delete; CrosHealthdPsrSamplerHandler& operator=(const CrosHealthdPsrSamplerHandler&) = @@ -31,20 +29,8 @@ // CrosHealthdSamplerHandler override void HandleResult(OptionalMetricCallback callback, cros_healthd::TelemetryInfoPtr result) const override; - - private: - // Implementation of `HandleResult`. If it fails to obtain PSR info, it will - // get PSR info from healthd again for at most `num_retries_left` times with - // itself as the callback. A zero `num_retries_left` implies no retry on - // failure. - void HandleResultImpl(OptionalMetricCallback callback, - size_t num_retries_left, - cros_healthd::TelemetryInfoPtr result) const; - - SEQUENCE_CHECKER(sequence_checker_); - base::WeakPtrFactory<CrosHealthdPsrSamplerHandler> weak_ptr_factory_ - GUARDED_BY_CONTEXT(sequence_checker_){this}; }; + } // namespace reporting #endif // CHROME_BROWSER_ASH_POLICY_REPORTING_METRICS_REPORTING_CROS_HEALTHD_SAMPLER_HANDLERS_CROS_HEALTHD_PSR_SAMPLER_HANDLER_H_
diff --git a/chrome/browser/ash/privacy_hub/privacy_hub_util.cc b/chrome/browser/ash/privacy_hub/privacy_hub_util.cc index 65d2e595..43b3f96 100644 --- a/chrome/browser/ash/privacy_hub/privacy_hub_util.cc +++ b/chrome/browser/ash/privacy_hub/privacy_hub_util.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ash/privacy_hub/privacy_hub_util.h b/chrome/browser/ash/privacy_hub/privacy_hub_util.h index 38e2f48..61d4d8f1 100644 --- a/chrome/browser/ash/privacy_hub/privacy_hub_util.h +++ b/chrome/browser/ash/privacy_hub/privacy_hub_util.h
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ash/system_extensions/api/managed_device_health_services/BUILD.gn b/chrome/browser/ash/system_extensions/api/managed_device_health_services/BUILD.gn index 24d75a1..f99d9e3 100644 --- a/chrome/browser/ash/system_extensions/api/managed_device_health_services/BUILD.gn +++ b/chrome/browser/ash/system_extensions/api/managed_device_health_services/BUILD.gn
@@ -1,4 +1,4 @@ -# Copyright 2022 The Chromium Authors. All rights reserved. +# Copyright 2022 The Chromium Authors # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file.
diff --git a/chrome/browser/ash/system_extensions/api/managed_device_health_services/managed_device_health_services_browsertest.cc b/chrome/browser/ash/system_extensions/api/managed_device_health_services/managed_device_health_services_browsertest.cc index 5e488e07a..7b029a1 100644 --- a/chrome/browser/ash/system_extensions/api/managed_device_health_services/managed_device_health_services_browsertest.cc +++ b/chrome/browser/ash/system_extensions/api/managed_device_health_services/managed_device_health_services_browsertest.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ash/system_extensions/api/managed_device_health_services/test/smoke_test.js b/chrome/browser/ash/system_extensions/api/managed_device_health_services/test/smoke_test.js index c60199a..b2a895e 100644 --- a/chrome/browser/ash/system_extensions/api/managed_device_health_services/test/smoke_test.js +++ b/chrome/browser/ash/system_extensions/api/managed_device_health_services/test/smoke_test.js
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ash/system_extensions/api/window_management/test/accelerator_event_wake_up_sw.js b/chrome/browser/ash/system_extensions/api/window_management/test/accelerator_event_wake_up_sw.js index cf94abd3..c25fc7d9 100644 --- a/chrome/browser/ash/system_extensions/api/window_management/test/accelerator_event_wake_up_sw.js +++ b/chrome/browser/ash/system_extensions/api/window_management/test/accelerator_event_wake_up_sw.js
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/autofill/android/save_update_address_profile_prompt_controller.cc b/chrome/browser/autofill/android/save_update_address_profile_prompt_controller.cc index dd465218..9838b63 100644 --- a/chrome/browser/autofill/android/save_update_address_profile_prompt_controller.cc +++ b/chrome/browser/autofill/android/save_update_address_profile_prompt_controller.cc
@@ -99,7 +99,7 @@ // to their Google account. if (is_migration_to_account_) { return l10n_util::GetStringFUTF16( - personal_data_->IsSyncEnabledFor(syncer::UserSelectableType::kAutofill) + personal_data_->IsSyncFeatureEnabledForAutofill() ? IDS_AUTOFILL_SYNCABLE_PROFILE_MIGRATION_PROMPT_NOTICE : IDS_AUTOFILL_LOCAL_PROFILE_MIGRATION_PROMPT_NOTICE, base::UTF8ToUTF16(account_info.email));
diff --git a/chrome/browser/bluetooth/bluetooth_chooser_context_unittest.cc b/chrome/browser/bluetooth/bluetooth_chooser_context_unittest.cc index c0b9bab7..357d758 100644 --- a/chrome/browser/bluetooth/bluetooth_chooser_context_unittest.cc +++ b/chrome/browser/bluetooth/bluetooth_chooser_context_unittest.cc
@@ -221,9 +221,9 @@ expected_services.Set(kGlucoseUUIDString, /*value=*/true); expected_services.Set(kBloodPressureUUIDString, /*value=*/true); expected_object.Set(kServicesKey, std::move(expected_services)); - base::Value::List expected_manufacturer_data; - expected_manufacturer_data.Append(0x01); - expected_manufacturer_data.Append(0x02); + base::Value::Dict expected_manufacturer_data; + expected_manufacturer_data.Set("1", /*value=*/true); + expected_manufacturer_data.Set("2", /*value=*/true); expected_object.Set(kManufacturerDataKey, std::move(expected_manufacturer_data));
diff --git a/chrome/browser/bookmarks/chrome_bookmark_client.cc b/chrome/browser/bookmarks/chrome_bookmark_client.cc index e6abc56..b75e51d 100644 --- a/chrome/browser/bookmarks/chrome_bookmark_client.cc +++ b/chrome/browser/bookmarks/chrome_bookmark_client.cc
@@ -5,7 +5,9 @@ #include "chrome/browser/bookmarks/chrome_bookmark_client.h" #include "base/notreached.h" +#include "base/time/time.h" #include "build/build_config.h" +#include "chrome/browser/commerce/shopping_service_factory.h" #include "chrome/browser/favicon/favicon_service_factory.h" #include "chrome/browser/history/history_service_factory.h" #include "chrome/browser/profiles/profile.h" @@ -14,11 +16,15 @@ #include "components/bookmarks/browser/bookmark_storage.h" #include "components/bookmarks/managed/managed_bookmark_service.h" #include "components/bookmarks/managed/managed_bookmark_util.h" +#include "components/commerce/core/commerce_feature_list.h" +#include "components/commerce/core/price_tracking_utils.h" +#include "components/commerce/core/shopping_service.h" #include "components/favicon/core/favicon_util.h" #include "components/favicon_base/favicon_types.h" #include "components/history/core/browser/history_service.h" #include "components/history/core/browser/url_database.h" #include "components/offline_pages/buildflags/buildflags.h" +#include "components/power_bookmarks/core/suggested_save_location_provider.h" #include "components/sync_bookmarks/bookmark_sync_service.h" #include "components/undo/bookmark_undo_service.h" @@ -26,6 +32,39 @@ #include "chrome/browser/offline_pages/offline_page_bookmark_observer.h" #endif +namespace { + +class ShoppingCollectionProvider + : public power_bookmarks::SuggestedSaveLocationProvider { + public: + ShoppingCollectionProvider(bookmarks::BookmarkModel* model, Profile* profile) + : model_(model), profile_(profile) {} + ShoppingCollectionProvider(const ShoppingCollectionProvider&) = delete; + ShoppingCollectionProvider& operator=(const ShoppingCollectionProvider&) = + delete; + ~ShoppingCollectionProvider() override = default; + + const bookmarks::BookmarkNode* GetSuggestion(const GURL& url) override { + commerce::ShoppingService* service = + commerce::ShoppingServiceFactory::GetForBrowserContext(profile_); + if (!service || !service->GetAvailableProductInfoForUrl(url).has_value()) { + return nullptr; + } + return commerce::GetShoppingCollectionBookmarkFolder(model_.get(), true); + } + + const base::TimeDelta GetBackoffTime() override { + // TODO(b:291326480): Make this configurable. + return base::Hours(2); + } + + private: + raw_ptr<bookmarks::BookmarkModel> model_; + raw_ptr<Profile> profile_; +}; + +} // namespace + ChromeBookmarkClient::ChromeBookmarkClient( Profile* profile, bookmarks::ManagedBookmarkService* managed_bookmark_service, @@ -36,13 +75,25 @@ bookmark_sync_service_(bookmark_sync_service), bookmark_undo_service_(bookmark_undo_service) {} -ChromeBookmarkClient::~ChromeBookmarkClient() = default; +ChromeBookmarkClient::~ChromeBookmarkClient() { + if (shopping_save_location_provider_) { + RemoveSuggestedSaveLocationProvider(shopping_save_location_provider_.get()); + } +} void ChromeBookmarkClient::Init(bookmarks::BookmarkModel* model) { + BookmarkClientBase::Init(model); if (managed_bookmark_service_) managed_bookmark_service_->BookmarkModelCreated(model); model_ = model; + if (base::FeatureList::IsEnabled(commerce::kShoppingCollection)) { + shopping_save_location_provider_ = + std::make_unique<ShoppingCollectionProvider>(model, profile_); + + AddSuggestedSaveLocationProvider(shopping_save_location_provider_.get()); + } + #if BUILDFLAG(ENABLE_OFFLINE_PAGES) offline_page_observer_ = std::make_unique<offline_pages::OfflinePageBookmarkObserver>(profile_);
diff --git a/chrome/browser/bookmarks/chrome_bookmark_client.h b/chrome/browser/bookmarks/chrome_bookmark_client.h index 483b7051..84f2f46 100644 --- a/chrome/browser/bookmarks/chrome_bookmark_client.h +++ b/chrome/browser/bookmarks/chrome_bookmark_client.h
@@ -15,9 +15,9 @@ #include "base/scoped_observation.h" #include "base/task/deferred_sequenced_task_runner.h" #include "components/bookmarks/browser/base_bookmark_model_observer.h" -#include "components/bookmarks/browser/bookmark_client.h" #include "components/bookmarks/browser/bookmark_model.h" #include "components/offline_pages/buildflags/buildflags.h" +#include "components/power_bookmarks/core/bookmark_client_base.h" class BookmarkUndoService; class GURL; @@ -39,7 +39,11 @@ } // namespace offline_pages #endif -class ChromeBookmarkClient : public bookmarks::BookmarkClient { +namespace power_bookmarks { +class SuggestedSaveLocationProvider; +} + +class ChromeBookmarkClient : public power_bookmarks::BookmarkClientBase { public: ChromeBookmarkClient( Profile* profile, @@ -95,6 +99,9 @@ raw_ptr<bookmarks::BookmarkModel> model_ = nullptr; + std::unique_ptr<power_bookmarks::SuggestedSaveLocationProvider> + shopping_save_location_provider_; + #if BUILDFLAG(ENABLE_OFFLINE_PAGES) // Owns the observer used by Offline Page listening to Bookmark Model events. std::unique_ptr<offline_pages::OfflinePageBookmarkObserver>
diff --git a/chrome/browser/chromeos/policy/dlp/dlp_copy_or_move_hook_delegate.cc b/chrome/browser/chromeos/policy/dlp/dlp_copy_or_move_hook_delegate.cc index 61208ad..351b8793 100644 --- a/chrome/browser/chromeos/policy/dlp/dlp_copy_or_move_hook_delegate.cc +++ b/chrome/browser/chromeos/policy/dlp/dlp_copy_or_move_hook_delegate.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/chromeos/policy/dlp/dlp_copy_or_move_hook_delegate.h b/chrome/browser/chromeos/policy/dlp/dlp_copy_or_move_hook_delegate.h index ef6a6f2..ceb3bb3 100644 --- a/chrome/browser/chromeos/policy/dlp/dlp_copy_or_move_hook_delegate.h +++ b/chrome/browser/chromeos/policy/dlp/dlp_copy_or_move_hook_delegate.h
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/chromeos/policy/dlp/dlp_copy_or_move_hook_delegate_unittest.cc b/chrome/browser/chromeos/policy/dlp/dlp_copy_or_move_hook_delegate_unittest.cc index c6f1d18..62fff81 100644 --- a/chrome/browser/chromeos/policy/dlp/dlp_copy_or_move_hook_delegate_unittest.cc +++ b/chrome/browser/chromeos/policy/dlp/dlp_copy_or_move_hook_delegate_unittest.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/chromeos/policy/dlp/dlp_file_access_copy_or_move_delegate_factory.cc b/chrome/browser/chromeos/policy/dlp/dlp_file_access_copy_or_move_delegate_factory.cc index 4f8d155..bfd436b 100644 --- a/chrome/browser/chromeos/policy/dlp/dlp_file_access_copy_or_move_delegate_factory.cc +++ b/chrome/browser/chromeos/policy/dlp/dlp_file_access_copy_or_move_delegate_factory.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/chromeos/policy/dlp/dlp_file_access_copy_or_move_delegate_factory.h b/chrome/browser/chromeos/policy/dlp/dlp_file_access_copy_or_move_delegate_factory.h index 2767c47..1d79ec3 100644 --- a/chrome/browser/chromeos/policy/dlp/dlp_file_access_copy_or_move_delegate_factory.h +++ b/chrome/browser/chromeos/policy/dlp/dlp_file_access_copy_or_move_delegate_factory.h
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/chromeos/policy/dlp/dlp_file_access_copy_or_move_delegate_factory_unittest.cc b/chrome/browser/chromeos/policy/dlp/dlp_file_access_copy_or_move_delegate_factory_unittest.cc index 6873d9b..d817e6c 100644 --- a/chrome/browser/chromeos/policy/dlp/dlp_file_access_copy_or_move_delegate_factory_unittest.cc +++ b/chrome/browser/chromeos/policy/dlp/dlp_file_access_copy_or_move_delegate_factory_unittest.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/chromeos/reporting/metric_reporting_manager_lacros.cc b/chrome/browser/chromeos/reporting/metric_reporting_manager_lacros.cc index 022fdc1..b65af0048 100644 --- a/chrome/browser/chromeos/reporting/metric_reporting_manager_lacros.cc +++ b/chrome/browser/chromeos/reporting/metric_reporting_manager_lacros.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/chromeos/reporting/metric_reporting_manager_lacros.h b/chrome/browser/chromeos/reporting/metric_reporting_manager_lacros.h index 6f259f8..4ea09f64 100644 --- a/chrome/browser/chromeos/reporting/metric_reporting_manager_lacros.h +++ b/chrome/browser/chromeos/reporting/metric_reporting_manager_lacros.h
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/chromeos/reporting/metric_reporting_manager_lacros_unittest.cc b/chrome/browser/chromeos/reporting/metric_reporting_manager_lacros_unittest.cc index 5fb389f..981f102 100644 --- a/chrome/browser/chromeos/reporting/metric_reporting_manager_lacros_unittest.cc +++ b/chrome/browser/chromeos/reporting/metric_reporting_manager_lacros_unittest.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/commerce/price_tracking/android/javatests/src/org/chromium/chrome/browser/price_tracking/PriceTrackingButtonControllerUnitTest.java b/chrome/browser/commerce/price_tracking/android/javatests/src/org/chromium/chrome/browser/price_tracking/PriceTrackingButtonControllerUnitTest.java index cba7607..6c307cf 100644 --- a/chrome/browser/commerce/price_tracking/android/javatests/src/org/chromium/chrome/browser/price_tracking/PriceTrackingButtonControllerUnitTest.java +++ b/chrome/browser/commerce/price_tracking/android/javatests/src/org/chromium/chrome/browser/price_tracking/PriceTrackingButtonControllerUnitTest.java
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/creator/android/java/res/drawable/follow_add.xml b/chrome/browser/creator/android/java/res/drawable/follow_add.xml index fc479af..b10b49c 100644 --- a/chrome/browser/creator/android/java/res/drawable/follow_add.xml +++ b/chrome/browser/creator/android/java/res/drawable/follow_add.xml
@@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- Copyright 2022 The Chromium Authors. All rights reserved. +<!-- Copyright 2022 The Chromium Authors Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. -->
diff --git a/chrome/browser/creator/android/java/res/drawable/following_checkmark.xml b/chrome/browser/creator/android/java/res/drawable/following_checkmark.xml index 26f4103c..ea606dd 100644 --- a/chrome/browser/creator/android/java/res/drawable/following_checkmark.xml +++ b/chrome/browser/creator/android/java/res/drawable/following_checkmark.xml
@@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- Copyright 2022 The Chromium Authors. All rights reserved. +<!-- Copyright 2022 The Chromium Authors Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. -->
diff --git a/chrome/browser/creator/android/java/res/drawable/profile_background.xml b/chrome/browser/creator/android/java/res/drawable/profile_background.xml index 5a5fc1a..bb12135 100644 --- a/chrome/browser/creator/android/java/res/drawable/profile_background.xml +++ b/chrome/browser/creator/android/java/res/drawable/profile_background.xml
@@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- Copyright 2022 The Chromium Authors. All rights reserved. +<!-- Copyright 2022 The Chromium Authors Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. -->
diff --git a/chrome/browser/creator/android/java/res/layout/creator_activity.xml b/chrome/browser/creator/android/java/res/layout/creator_activity.xml index d9661828..ecdb1b7 100644 --- a/chrome/browser/creator/android/java/res/layout/creator_activity.xml +++ b/chrome/browser/creator/android/java/res/layout/creator_activity.xml
@@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- Copyright 2022 The Chromium Authors. All rights reserved. +<!-- Copyright 2022 The Chromium Authors Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. -->
diff --git a/chrome/browser/creator/android/java/res/layout/creator_layout.xml b/chrome/browser/creator/android/java/res/layout/creator_layout.xml index ce3637c..4d48abb 100644 --- a/chrome/browser/creator/android/java/res/layout/creator_layout.xml +++ b/chrome/browser/creator/android/java/res/layout/creator_layout.xml
@@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- Copyright 2022 The Chromium Authors. All rights reserved. +<!-- Copyright 2022 The Chromium Authors Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. -->
diff --git a/chrome/browser/creator/android/java/res/layout/creator_privacy.xml b/chrome/browser/creator/android/java/res/layout/creator_privacy.xml index e7add19..17cd3b5 100644 --- a/chrome/browser/creator/android/java/res/layout/creator_privacy.xml +++ b/chrome/browser/creator/android/java/res/layout/creator_privacy.xml
@@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- Copyright 2023 The Chromium Authors. All rights reserved. +<!-- 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. -->
diff --git a/chrome/browser/creator/android/java/res/layout/creator_profile.xml b/chrome/browser/creator/android/java/res/layout/creator_profile.xml index 4e877e9..08636e27 100644 --- a/chrome/browser/creator/android/java/res/layout/creator_profile.xml +++ b/chrome/browser/creator/android/java/res/layout/creator_profile.xml
@@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- Copyright 2022 The Chromium Authors. All rights reserved. +<!-- Copyright 2022 The Chromium Authors Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. -->
diff --git a/chrome/browser/creator/android/java/src/org/chromium/chrome/browser/creator/CreatorCoordinator.java b/chrome/browser/creator/android/java/src/org/chromium/chrome/browser/creator/CreatorCoordinator.java index 3a903aef..5f569fc 100644 --- a/chrome/browser/creator/android/java/src/org/chromium/chrome/browser/creator/CreatorCoordinator.java +++ b/chrome/browser/creator/android/java/src/org/chromium/chrome/browser/creator/CreatorCoordinator.java
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/creator/android/java/src/org/chromium/chrome/browser/creator/CreatorCoordinatorTest.java b/chrome/browser/creator/android/java/src/org/chromium/chrome/browser/creator/CreatorCoordinatorTest.java index 20b1604..cec879d6 100644 --- a/chrome/browser/creator/android/java/src/org/chromium/chrome/browser/creator/CreatorCoordinatorTest.java +++ b/chrome/browser/creator/android/java/src/org/chromium/chrome/browser/creator/CreatorCoordinatorTest.java
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/creator/android/java/src/org/chromium/chrome/browser/creator/CreatorMediator.java b/chrome/browser/creator/android/java/src/org/chromium/chrome/browser/creator/CreatorMediator.java index 22961e8..10b10957 100644 --- a/chrome/browser/creator/android/java/src/org/chromium/chrome/browser/creator/CreatorMediator.java +++ b/chrome/browser/creator/android/java/src/org/chromium/chrome/browser/creator/CreatorMediator.java
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/creator/android/java/src/org/chromium/chrome/browser/creator/CreatorMediatorTest.java b/chrome/browser/creator/android/java/src/org/chromium/chrome/browser/creator/CreatorMediatorTest.java index 33f9ebd..4552ce78 100644 --- a/chrome/browser/creator/android/java/src/org/chromium/chrome/browser/creator/CreatorMediatorTest.java +++ b/chrome/browser/creator/android/java/src/org/chromium/chrome/browser/creator/CreatorMediatorTest.java
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/device_reauth/win/authenticator_win.cc b/chrome/browser/device_reauth/win/authenticator_win.cc index 672c1e9..1d9342a9 100644 --- a/chrome/browser/device_reauth/win/authenticator_win.cc +++ b/chrome/browser/device_reauth/win/authenticator_win.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/device_reauth/win/authenticator_win.h b/chrome/browser/device_reauth/win/authenticator_win.h index 274deb5..f3349eb 100644 --- a/chrome/browser/device_reauth/win/authenticator_win.h +++ b/chrome/browser/device_reauth/win/authenticator_win.h
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/dips/dips_bounce_detector_unittest.cc b/chrome/browser/dips/dips_bounce_detector_unittest.cc index 756fafa8..e6ef484d 100644 --- a/chrome/browser/dips/dips_bounce_detector_unittest.cc +++ b/chrome/browser/dips/dips_bounce_detector_unittest.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/dips/dips_database.cc b/chrome/browser/dips/dips_database.cc index da84273..3189b75 100644 --- a/chrome/browser/dips/dips_database.cc +++ b/chrome/browser/dips/dips_database.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/dips/dips_database.h b/chrome/browser/dips/dips_database.h index bf8eeea..cb97e80 100644 --- a/chrome/browser/dips/dips_database.h +++ b/chrome/browser/dips/dips_database.h
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/dips/dips_database_unittest.cc b/chrome/browser/dips/dips_database_unittest.cc index 51fdaac..2cc9581 100644 --- a/chrome/browser/dips/dips_database_unittest.cc +++ b/chrome/browser/dips/dips_database_unittest.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/enterprise/connectors/analysis/local_binary_upload_service_unittest.cc b/chrome/browser/enterprise/connectors/analysis/local_binary_upload_service_unittest.cc index 4ba0b02..dc7c6e1 100644 --- a/chrome/browser/enterprise/connectors/analysis/local_binary_upload_service_unittest.cc +++ b/chrome/browser/enterprise/connectors/analysis/local_binary_upload_service_unittest.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/enterprise/platform_auth/BUILD.gn b/chrome/browser/enterprise/platform_auth/BUILD.gn index 27b4bab..85c55f6b 100644 --- a/chrome/browser/enterprise/platform_auth/BUILD.gn +++ b/chrome/browser/enterprise/platform_auth/BUILD.gn
@@ -1,4 +1,4 @@ -# Copyright 2022 The Chromium Authors. All rights reserved. +# Copyright 2022 The Chromium Authors # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file.
diff --git a/chrome/browser/extensions/api/autofill_private/autofill_util.cc b/chrome/browser/extensions/api/autofill_private/autofill_util.cc index 81aa7c9..a630230 100644 --- a/chrome/browser/extensions/api/autofill_private/autofill_util.cc +++ b/chrome/browser/extensions/api/autofill_private/autofill_util.cc
@@ -351,7 +351,7 @@ api::autofill_private::AccountInfo api_account; api_account.email = account->email; api_account.is_sync_enabled_for_autofill_profiles = - personal_data.IsSyncEnabledFor(syncer::UserSelectableType::kAutofill); + personal_data.IsSyncFeatureEnabledForAutofill(); api_account.is_eligible_for_address_account_storage = personal_data.IsEligibleForAddressAccountStorage(); return std::move(api_account);
diff --git a/chrome/browser/extensions/api/enterprise_device_attributes/enterprise_device_attributes_lacros_apitest.cc b/chrome/browser/extensions/api/enterprise_device_attributes/enterprise_device_attributes_lacros_apitest.cc index 26a26ad5..20d4c80 100644 --- a/chrome/browser/extensions/api/enterprise_device_attributes/enterprise_device_attributes_lacros_apitest.cc +++ b/chrome/browser/extensions/api/enterprise_device_attributes/enterprise_device_attributes_lacros_apitest.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/extensions/api/file_system/file_entry_picker.cc b/chrome/browser/extensions/api/file_system/file_entry_picker.cc index 0b1b877..deeba618 100644 --- a/chrome/browser/extensions/api/file_system/file_entry_picker.cc +++ b/chrome/browser/extensions/api/file_system/file_entry_picker.cc
@@ -41,7 +41,9 @@ base::FilePath::StringType(), owning_window, /*params=*/nullptr, caller); } -FileEntryPicker::~FileEntryPicker() = default; +FileEntryPicker::~FileEntryPicker() { + select_file_dialog_->ListenerDestroyed(); +} void FileEntryPicker::FileSelected(const base::FilePath& path, int index,
diff --git a/chrome/browser/fast_checkout/fast_checkout_tab_helper.cc b/chrome/browser/fast_checkout/fast_checkout_tab_helper.cc index cb5a36f9..9da87c9 100644 --- a/chrome/browser/fast_checkout/fast_checkout_tab_helper.cc +++ b/chrome/browser/fast_checkout/fast_checkout_tab_helper.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/fast_checkout/fast_checkout_tab_helper.h b/chrome/browser/fast_checkout/fast_checkout_tab_helper.h index 6e4b189..d016ec0 100644 --- a/chrome/browser/fast_checkout/fast_checkout_tab_helper.h +++ b/chrome/browser/fast_checkout/fast_checkout_tab_helper.h
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/fast_checkout/fast_checkout_tab_helper_browsertest.cc b/chrome/browser/fast_checkout/fast_checkout_tab_helper_browsertest.cc index 1e805ff..9cb9932 100644 --- a/chrome/browser/fast_checkout/fast_checkout_tab_helper_browsertest.cc +++ b/chrome/browser/fast_checkout/fast_checkout_tab_helper_browsertest.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/fast_checkout/mock_fast_checkout_capabilities_fetcher.cc b/chrome/browser/fast_checkout/mock_fast_checkout_capabilities_fetcher.cc index 907bfdfc..5c284b1c 100644 --- a/chrome/browser/fast_checkout/mock_fast_checkout_capabilities_fetcher.cc +++ b/chrome/browser/fast_checkout/mock_fast_checkout_capabilities_fetcher.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/fast_checkout/mock_fast_checkout_capabilities_fetcher.h b/chrome/browser/fast_checkout/mock_fast_checkout_capabilities_fetcher.h index 319f8c0f..c691c17 100644 --- a/chrome/browser/fast_checkout/mock_fast_checkout_capabilities_fetcher.h +++ b/chrome/browser/fast_checkout/mock_fast_checkout_capabilities_fetcher.h
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/favicon/favicon_utils_unittest.cc b/chrome/browser/favicon/favicon_utils_unittest.cc index 87ff27f..d12d8a16 100644 --- a/chrome/browser/favicon/favicon_utils_unittest.cc +++ b/chrome/browser/favicon/favicon_utils_unittest.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/k_anonymity_service/k_anonymity_service_client.cc b/chrome/browser/k_anonymity_service/k_anonymity_service_client.cc index 86f0cedf..db70791 100644 --- a/chrome/browser/k_anonymity_service/k_anonymity_service_client.cc +++ b/chrome/browser/k_anonymity_service/k_anonymity_service_client.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/k_anonymity_service/k_anonymity_service_client.h b/chrome/browser/k_anonymity_service/k_anonymity_service_client.h index 4fa9e50..ad7b726 100644 --- a/chrome/browser/k_anonymity_service/k_anonymity_service_client.h +++ b/chrome/browser/k_anonymity_service/k_anonymity_service_client.h
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/k_anonymity_service/k_anonymity_service_client_unittest.cc b/chrome/browser/k_anonymity_service/k_anonymity_service_client_unittest.cc index 5619826..181b672c 100644 --- a/chrome/browser/k_anonymity_service/k_anonymity_service_client_unittest.cc +++ b/chrome/browser/k_anonymity_service/k_anonymity_service_client_unittest.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/k_anonymity_service/k_anonymity_service_metrics.cc b/chrome/browser/k_anonymity_service/k_anonymity_service_metrics.cc index 1ddd286..23f6d70 100644 --- a/chrome/browser/k_anonymity_service/k_anonymity_service_metrics.cc +++ b/chrome/browser/k_anonymity_service/k_anonymity_service_metrics.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/k_anonymity_service/k_anonymity_service_metrics.h b/chrome/browser/k_anonymity_service/k_anonymity_service_metrics.h index 675fe73..018fc1c1 100644 --- a/chrome/browser/k_anonymity_service/k_anonymity_service_metrics.h +++ b/chrome/browser/k_anonymity_service/k_anonymity_service_metrics.h
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/k_anonymity_service/remote_trust_token_query_answerer.cc b/chrome/browser/k_anonymity_service/remote_trust_token_query_answerer.cc index 9c8066a..8eea9b3 100644 --- a/chrome/browser/k_anonymity_service/remote_trust_token_query_answerer.cc +++ b/chrome/browser/k_anonymity_service/remote_trust_token_query_answerer.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/k_anonymity_service/remote_trust_token_query_answerer.h b/chrome/browser/k_anonymity_service/remote_trust_token_query_answerer.h index 53bb9c78..10c0a67 100644 --- a/chrome/browser/k_anonymity_service/remote_trust_token_query_answerer.h +++ b/chrome/browser/k_anonymity_service/remote_trust_token_query_answerer.h
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/lacros/app_mode/device_local_account_extension_installer_lacros.cc b/chrome/browser/lacros/app_mode/device_local_account_extension_installer_lacros.cc index 6c88e3bc..3df0beeb 100644 --- a/chrome/browser/lacros/app_mode/device_local_account_extension_installer_lacros.cc +++ b/chrome/browser/lacros/app_mode/device_local_account_extension_installer_lacros.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/lacros/app_mode/device_local_account_extension_installer_lacros.h b/chrome/browser/lacros/app_mode/device_local_account_extension_installer_lacros.h index 33480f33..689b8ba 100644 --- a/chrome/browser/lacros/app_mode/device_local_account_extension_installer_lacros.h +++ b/chrome/browser/lacros/app_mode/device_local_account_extension_installer_lacros.h
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/lacros/cros_apps/api/BUILD.gn b/chrome/browser/lacros/cros_apps/api/BUILD.gn index 216407046..ad6b81e8 100644 --- a/chrome/browser/lacros/cros_apps/api/BUILD.gn +++ b/chrome/browser/lacros/cros_apps/api/BUILD.gn
@@ -1,4 +1,4 @@ -# Copyright 2023 The Chromium Authors. All rights reserved. +# 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.
diff --git a/chrome/browser/lacros/cros_apps/api/diagnostics/BUILD.gn b/chrome/browser/lacros/cros_apps/api/diagnostics/BUILD.gn index 475537e..9480346 100644 --- a/chrome/browser/lacros/cros_apps/api/diagnostics/BUILD.gn +++ b/chrome/browser/lacros/cros_apps/api/diagnostics/BUILD.gn
@@ -1,4 +1,4 @@ -# Copyright 2023 The Chromium Authors. All rights reserved. +# 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.
diff --git a/chrome/browser/metrics/chromeos_system_profile_provider.cc b/chrome/browser/metrics/chromeos_system_profile_provider.cc index d62ac2c5..17e0aec 100644 --- a/chrome/browser/metrics/chromeos_system_profile_provider.cc +++ b/chrome/browser/metrics/chromeos_system_profile_provider.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/metrics/chromeos_system_profile_provider.h b/chrome/browser/metrics/chromeos_system_profile_provider.h index 36fd869..4d16ba9 100644 --- a/chrome/browser/metrics/chromeos_system_profile_provider.h +++ b/chrome/browser/metrics/chromeos_system_profile_provider.h
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/metrics/chromeos_system_profile_provider_unittest.cc b/chrome/browser/metrics/chromeos_system_profile_provider_unittest.cc index 0786a7e..ef43e84 100644 --- a/chrome/browser/metrics/chromeos_system_profile_provider_unittest.cc +++ b/chrome/browser/metrics/chromeos_system_profile_provider_unittest.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/metrics/power/battery_discharge_reporter.cc b/chrome/browser/metrics/power/battery_discharge_reporter.cc index 346312e..5be316f0 100644 --- a/chrome/browser/metrics/power/battery_discharge_reporter.cc +++ b/chrome/browser/metrics/power/battery_discharge_reporter.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/metrics/power/battery_discharge_reporter.h b/chrome/browser/metrics/power/battery_discharge_reporter.h index b285044..680f5f8d 100644 --- a/chrome/browser/metrics/power/battery_discharge_reporter.h +++ b/chrome/browser/metrics/power/battery_discharge_reporter.h
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/net/fake_nss_service.cc b/chrome/browser/net/fake_nss_service.cc index 65b9c73..c9967ac 100644 --- a/chrome/browser/net/fake_nss_service.cc +++ b/chrome/browser/net/fake_nss_service.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/net/fake_nss_service.h b/chrome/browser/net/fake_nss_service.h index 1cf78b73..dc3fcfc 100644 --- a/chrome/browser/net/fake_nss_service.h +++ b/chrome/browser/net/fake_nss_service.h
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/origin_trials/origin_trials_browsertest.cc b/chrome/browser/origin_trials/origin_trials_browsertest.cc index 22e1979..b5f37f35 100644 --- a/chrome/browser/origin_trials/origin_trials_browsertest.cc +++ b/chrome/browser/origin_trials/origin_trials_browsertest.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/origin_trials/origin_trials_factory.cc b/chrome/browser/origin_trials/origin_trials_factory.cc index 10dfa35c..033e5b0 100644 --- a/chrome/browser/origin_trials/origin_trials_factory.cc +++ b/chrome/browser/origin_trials/origin_trials_factory.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/origin_trials/origin_trials_factory.h b/chrome/browser/origin_trials/origin_trials_factory.h index 02eef46d..b3ee440 100644 --- a/chrome/browser/origin_trials/origin_trials_factory.h +++ b/chrome/browser/origin_trials/origin_trials_factory.h
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/page_info/page_info_features.cc b/chrome/browser/page_info/page_info_features.cc index 85a11aa..dedae6f7 100644 --- a/chrome/browser/page_info/page_info_features.cc +++ b/chrome/browser/page_info/page_info_features.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/page_info/page_info_features.h b/chrome/browser/page_info/page_info_features.h index 877a8cc..d99e9451 100644 --- a/chrome/browser/page_info/page_info_features.h +++ b/chrome/browser/page_info/page_info_features.h
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/performance_manager/metrics/page_timeline_monitor.cc b/chrome/browser/performance_manager/metrics/page_timeline_monitor.cc index b64cd119a..df6d79f8d 100644 --- a/chrome/browser/performance_manager/metrics/page_timeline_monitor.cc +++ b/chrome/browser/performance_manager/metrics/page_timeline_monitor.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/performance_manager/metrics/page_timeline_monitor.h b/chrome/browser/performance_manager/metrics/page_timeline_monitor.h index 3a47e43..cbcee21 100644 --- a/chrome/browser/performance_manager/metrics/page_timeline_monitor.h +++ b/chrome/browser/performance_manager/metrics/page_timeline_monitor.h
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/performance_manager/metrics/page_timeline_monitor_unittest.cc b/chrome/browser/performance_manager/metrics/page_timeline_monitor_unittest.cc index 826fa89..cc65d67 100644 --- a/chrome/browser/performance_manager/metrics/page_timeline_monitor_unittest.cc +++ b/chrome/browser/performance_manager/metrics/page_timeline_monitor_unittest.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/permissions/prediction_model_handler_provider_factory.h b/chrome/browser/permissions/prediction_model_handler_provider_factory.h index da3616fb..7c973fd 100644 --- a/chrome/browser/permissions/prediction_model_handler_provider_factory.h +++ b/chrome/browser/permissions/prediction_model_handler_provider_factory.h
@@ -1,4 +1,4 @@ -// Copyright 2021 The Chromium Authors. All rights reserved. +// Copyright 2021 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/picture_in_picture/auto_pip_setting_overlay_view.cc b/chrome/browser/picture_in_picture/auto_pip_setting_overlay_view.cc index 14876826..f4031ca 100644 --- a/chrome/browser/picture_in_picture/auto_pip_setting_overlay_view.cc +++ b/chrome/browser/picture_in_picture/auto_pip_setting_overlay_view.cc
@@ -19,7 +19,6 @@ // Create the content setting UI. SetLayoutManager(std::make_unique<views::FillLayout>()); SetPaintToLayer(ui::LAYER_NOT_DRAWN); - SetEventTargeter(std::make_unique<views::ViewTargeter>(this)); // Add the semi-opaque background layer. auto* background = @@ -74,35 +73,3 @@ SetVisible(false); std::move(result_cb_).Run(result); } - -bool AutoPipSettingOverlayView::DoesIntersectRect(const views::View* target, - const gfx::Rect& rect) const { - DCHECK_EQ(target, this); - if (allow_button_->HitTestRect( - ConvertRectToTarget(target, allow_button_, rect))) { - return true; - } - - if (block_button_->HitTestRect( - ConvertRectToTarget(this, block_button_, rect))) { - return true; - } - - return false; -} - -views::View* AutoPipSettingOverlayView::TargetForRect(views::View* root, - const gfx::Rect& rect) { - // The background does not consume events. - if (allow_button_->HitTestRect( - ConvertRectToTarget(root, allow_button_, rect))) { - return allow_button_; - } - - if (block_button_->HitTestRect( - ConvertRectToTarget(root, block_button_, rect))) { - return block_button_; - } - - return nullptr; -}
diff --git a/chrome/browser/picture_in_picture/auto_pip_setting_overlay_view.h b/chrome/browser/picture_in_picture/auto_pip_setting_overlay_view.h index f3a9d4ff..b3bdde9 100644 --- a/chrome/browser/picture_in_picture/auto_pip_setting_overlay_view.h +++ b/chrome/browser/picture_in_picture/auto_pip_setting_overlay_view.h
@@ -7,12 +7,10 @@ #include "base/functional/callback.h" #include "ui/views/view.h" -#include "ui/views/view_targeter_delegate.h" // Creates and manages the content setting overlay for autopip. This is used // both for video-only and document pip on desktop. It is not used on Android. -class AutoPipSettingOverlayView : public views::View, - public views::ViewTargeterDelegate { +class AutoPipSettingOverlayView : public views::View { public: enum class UiResult { // User selected 'Allow'. @@ -33,11 +31,6 @@ AutoPipSettingOverlayView(const AutoPipSettingOverlayView&) = delete; AutoPipSettingOverlayView(AutoPipSettingOverlayView&&) = delete; - // views::ViewTargeterDelegate - bool DoesIntersectRect(const views::View* target, - const gfx::Rect& rect) const override; - views::View* TargetForRect(views::View* root, const gfx::Rect& rect) override; - const views::View* get_block_button_for_testing() const { return block_button_; }
diff --git a/chrome/browser/policy/policy_value_and_status_aggregator.cc b/chrome/browser/policy/policy_value_and_status_aggregator.cc index 508c0e7..0660d6fb 100644 --- a/chrome/browser/policy/policy_value_and_status_aggregator.cc +++ b/chrome/browser/policy/policy_value_and_status_aggregator.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/policy/policy_value_and_status_aggregator.h b/chrome/browser/policy/policy_value_and_status_aggregator.h index 6baa2bd7..617a995 100644 --- a/chrome/browser/policy/policy_value_and_status_aggregator.h +++ b/chrome/browser/policy/policy_value_and_status_aggregator.h
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/resources/ash/settings/os_languages_page/input_method_options_page.html b/chrome/browser/resources/ash/settings/os_languages_page/input_method_options_page.html index 9814b40..9d06544 100644 --- a/chrome/browser/resources/ash/settings/os_languages_page/input_method_options_page.html +++ b/chrome/browser/resources/ash/settings/os_languages_page/input_method_options_page.html
@@ -20,110 +20,110 @@ } </style> - <template is="dom-repeat" items="[[optionSections_]]" as="section"> - <template is="dom-if" if="[[shouldShowTitle(section)]]"> - <h2>[[section.title]]</h2> - </template> - <div class="list-frame" +<template is="dom-repeat" items="[[optionSections_]]" as="section"> + <template is="dom-if" if="[[shouldShowTitle(section)]]"> + <h2>[[section.title]]</h2> + </template> + <div class="list-frame" use-cr-section-left-padding$="[[!shouldShowTitle(section)]]"> - <template is="dom-repeat" items="[[section.options]]" as="option"> - <div class="list-item"> - <template is="dom-if" if="[[isSubmenuButton_(option.uiType)]]"> - <cr-button class="margin-matches-padding" - submenu-button-type$="[[option.submenuButtonType]]" - on-click="onSubmenuButtonClick_"> - [[option.label]] - </cr-button> - </template> - <template is="dom-if" if="[[!isSubmenuButton_(option.uiType)]]"> - <div class="start" id="option-label" role="heading" aria-level="2" - aria-hidden="[[shouldShowTitle(section)]]"> - [[option.label]] - <template is="dom-if" if="[[option.subtitle]]" aria-hidden="true"> - <span class="secondary label subtitle"> - [[option.subtitle]] - </span> - </template> - </div> - </template> - <template is="dom-if" if="[[isToggleButton_(option.uiType)]]"> - <cr-toggle checked="{{option.value}}" - on-change="onToggleButtonOrDropdownChange_" - aria-label="[[option.label]]" - aria-description="[[option.subtitle]]" - deep-link-focus-id$="[[option.deepLink]]"> + <template is="dom-repeat" items="[[section.options]]" as="option"> + <div class="list-item"> + <template is="dom-if" if="[[isSubmenuButton_(option.uiType)]]"> + <cr-button class="margin-matches-padding" + submenu-button-type$="[[option.submenuButtonType]]" + on-click="onSubmenuButtonClick_"> + [[option.label]] + </cr-button> + </template> + <template is="dom-if" if="[[!isSubmenuButton_(option.uiType)]]"> + <div class="start" id="option-label" role="heading" aria-level="2" + aria-hidden="[[shouldShowTitle(section)]]"> + [[option.label]] + <template is="dom-if" if="[[option.subtitle]]" aria-hidden="true"> + <span class="secondary label subtitle"> + [[option.subtitle]] + </span> + </template> + </div> + </template> + <template is="dom-if" if="[[isToggleButton_(option.uiType)]]"> + <cr-toggle checked="{{option.value}}" + on-change="onToggleButtonOrDropdownChange_" + aria-label="[[option.label]]" + aria-description="[[option.subtitle]]" + deep-link-focus-id$="[[option.deepLink]]"> + </cr-toggle> + </template> + <template is="dom-if" if="[[isDropdown_(option.uiType)]]"> + <!-- TODO(b/265557721): Stop using Polymer "two-way native binding" + on <select>s as values are casted to strings, and use + <dom-repeat> events instead. --> + <select class="md-select" value="{{option.value::change}}" + on-change="onToggleButtonOrDropdownChange_" + aria-label="[[option.label]]" + deep-link-focus-id$="[[option.deepLink]]"> + <template is="dom-repeat" items="[[option.menuItems]]"> + <option selected="[[item.selected]]" value="[[item.value]]"> + [[item.label]] + </option> + </template> + </select> + </template> + <template is="dom-if" if="[[isLink_(option.uiType)]]"> + <cr-icon-button iron-icon="cr:arrow-right" + on-click="navigateToOtherPageInSettings_" + aria-label="[[option.label]]" role="link"> + </cr-icon-button> + </template> + </div> + <!--TODO(b/189280771): Reduce this duplication.--> + <template is="dom-repeat" items="[[option.dependentOptions]]" + as="dependent" id="dependent-settings"> + <div class="list-item dependent" + align-with-options$="[[!shouldShowTitle(section)]]"> + <div class="start" aria-hidden="true"> + [[dependent.label]] + <template is="dom-if" if="[[dependent.subtitle]]"> + <span class="secondary label subtitle"> + [[dependent.subtitle]] + </span> + </template> + </div> + <template is="dom-if" + if="[[isToggleButton_(dependent.uiType)]]"> + <cr-toggle checked="{{dependent.value}}" + on-click="onToggleButtonOrDropdownChange_" + aria-label="[[dependent.label]]" + aria-description="[[dependent.subtitle]]" + disabled="[[dependentOptionsDisabled_(option.value)]]"> </cr-toggle> </template> - <template is="dom-if" if="[[isDropdown_(option.uiType)]]"> - <!-- TODO(b/265557721): Stop using Polymer "two-way native binding" - on <select>s as values are casted to strings, and use - <dom-repeat> events instead. --> - <select class="md-select" value="{{option.value::change}}" + <template is="dom-if" if="[[isDropdown_(dependent.uiType)]]"> + <!-- TODO(b/265557721): Stop using Polymer "two-way native + binding" on <select>s as values are casted to strings, and + use <dom-repeat> events instead. --> + <select class="md-select" value="{{dependent.value::change}}" on-change="onToggleButtonOrDropdownChange_" - aria-label="[[option.label]]" - deep-link-focus-id$="[[option.deepLink]]"> - <template is="dom-repeat" items="[[option.menuItems]]"> - <option selected="[[item.selected]]" value="[[item.value]]"> + aria-label="[[dependent.label]]"> + <template is="dom-repeat" items="[[dependent.menuItems]]"> + <option selected="[[item.selected]]" + value="[[item.value]]"> [[item.label]] </option> </template> </select> </template> - <template is="dom-if" if="[[isLink_(option.uiType)]]"> - <cr-icon-button iron-icon="cr:arrow-right" + <template is="dom-if" if="[[isLink_(dependent.uiType)]]"> + <cr-icon-button class="icon-external" on-click="navigateToOtherPageInSettings_" - aria-label="[[option.label]]" role="link"> + aria-label="[[dependent.label]]"> </cr-icon-button> </template> </div> - <!--TODO(b/189280771): Reduce this duplication.--> - <template is="dom-repeat" items="[[option.dependentOptions]]" - as="dependent" id="dependent-settings"> - <div class="list-item dependent" - align-with-options$="[[!shouldShowTitle(section)]]"> - <div class="start" aria-hidden="true"> - [[dependent.label]] - <template is="dom-if" if="[[dependent.subtitle]]"> - <span class="secondary label subtitle"> - [[dependent.subtitle]] - </span> - </template> - </div> - <template is="dom-if" - if="[[isToggleButton_(dependent.uiType)]]"> - <cr-toggle checked="{{dependent.value}}" - on-click="onToggleButtonOrDropdownChange_" - aria-label="[[dependent.label]]" - aria-description="[[dependent.subtitle]]" - disabled="[[dependentOptionsDisabled_(option.value)]]"> - </cr-toggle> - </template> - <template is="dom-if" if="[[isDropdown_(dependent.uiType)]]"> - <!-- TODO(b/265557721): Stop using Polymer "two-way native - binding" on <select>s as values are casted to strings, and - use <dom-repeat> events instead. --> - <select class="md-select" value="{{dependent.value::change}}" - on-change="onToggleButtonOrDropdownChange_" - aria-label="[[dependent.label]]"> - <template is="dom-repeat" items="[[dependent.menuItems]]"> - <option selected="[[item.selected]]" - value="[[item.value]]"> - [[item.label]] - </option> - </template> - </select> - </template> - <template is="dom-if" if="[[isLink_(dependent.uiType)]]"> - <cr-icon-button class="icon-external" - on-click="navigateToOtherPageInSettings_" - aria-label="[[dependent.label]]"> - </cr-icon-button> - </template> - </div> - </template> </template> - </div> - </template> + </template> + </div> +</template> <template is="dom-if" if="[[showClearPersonalizedData_]]" restamp> <!-- TODO(b/238031866): Remove languages and language-helper if not used. -->
diff --git a/chrome/browser/resources/ash/settings/os_languages_page/input_page.html b/chrome/browser/resources/ash/settings/os_languages_page/input_page.html index 2b895eec..c0242fee 100644 --- a/chrome/browser/resources/ash/settings/os_languages_page/input_page.html +++ b/chrome/browser/resources/ash/settings/os_languages_page/input_page.html
@@ -101,192 +101,192 @@ } </style> - <template is="dom-if" if="[[shouldShowLanguagePacksNotice_]]"> - <div class="cr-row first bottom-margin"> - <localized-link id="languagePacksNotice" - class="cr-secondary-text" - localized-string="$i18n{languagePacksNotice}" - on-link-clicked="onLanguagePackNoticeLinkClick_"> - </localized-link> +<template is="dom-if" if="[[shouldShowLanguagePacksNotice_]]"> + <div class="cr-row first bottom-margin"> + <localized-link id="languagePacksNotice" + class="cr-secondary-text" + localized-string="$i18n{languagePacksNotice}" + on-link-clicked="onLanguagePackNoticeLinkClick_"> + </localized-link> + </div> +</template> +<settings-toggle-button + class="first" id="showImeMenu" + pref="{{prefs.settings.language.ime_menu_activated}}" + label="$i18n{showImeMenu}" + on-settings-boolean-control-change="onShowImeMenuChange_" + deep-link-focus-id$="[[Setting.kShowInputOptionsInShelf]]"> +</settings-toggle-button> + +<div class="hr bottom-margin"> + <template is="dom-if" if="[[shouldShowShortcutReminder_( + shortcutReminderBody_.length)]]"> + <keyboard-shortcut-banner header="$i18n{imeShortcutReminderTitle}" + body="[[shortcutReminderBody_]]" + on-dismiss="onShortcutReminderDismiss_"> + </keyboard-shortcut-banner> + </template> + <h2>$i18n{inputMethodListTitle}</h2> + <template is="dom-if" if="[[inputMethodsLimitedByPolicy_( + prefs.settings.language.allowed_input_methods.*)]]"> + <div class="cr-row continuation" id="inputMethodsManagedbyPolicy"> + <iron-icon icon="cr20:domain"></iron-icon> + <div class="secondary">$i18n{inputMethodsManagedbyPolicy}</div> </div> </template> - <settings-toggle-button - class="first" id="showImeMenu" - pref="{{prefs.settings.language.ime_menu_activated}}" - label="$i18n{showImeMenu}" - on-settings-boolean-control-change="onShowImeMenuChange_" - deep-link-focus-id$="[[Setting.kShowInputOptionsInShelf]]"> - </settings-toggle-button> - - <div class="hr bottom-margin"> - <template is="dom-if" if="[[shouldShowShortcutReminder_( - shortcutReminderBody_.length)]]"> - <keyboard-shortcut-banner header="$i18n{imeShortcutReminderTitle}" - body="[[shortcutReminderBody_]]" - on-dismiss="onShortcutReminderDismiss_"> - </keyboard-shortcut-banner> - </template> - <h2>$i18n{inputMethodListTitle}</h2> - <template is="dom-if" if="[[inputMethodsLimitedByPolicy_( - prefs.settings.language.allowed_input_methods.*)]]"> - <div class="cr-row continuation" id="inputMethodsManagedbyPolicy"> - <iron-icon icon="cr20:domain"></iron-icon> - <div class="secondary">$i18n{inputMethodsManagedbyPolicy}</div> + <div class="list-frame vertical-list" id="inputMethodsList"> + <template is="dom-repeat" + items="[[languages.inputMethods.enabled]]"> + <div class$="list-item [[getInputMethodItemClass_( + item.id, languages.inputMethods.currentId)]]" + actionable on-click="onInputMethodClick_" + on-keypress="onInputMethodKeyPress_" + tabindex$="[[getInputMethodTabIndex_( + item.id, languages.inputMethods.currentId)]]" + aria-labelledby$="language-[[index]]" role="button"> + <div class="start" id="language-[[index]]" aria-hidden="true"> + <div class="display-name">[[item.displayName]]</div> + <div class="explain-selected" + hidden="[[!isCurrentInputMethod_( + item.id, languages.inputMethods.currentId)]]"> + $i18n{inputMethodEnabled} + </div> + </div> + <template is="dom-if" + if="[[hasOptionsPageInSettings_(item.id)]]"> + <div class="internal-wrapper" + hidden="[[!item.hasOptionsPage]]"> + <cr-icon-button class="subpage-arrow" + aria-label$="[[getOpenOptionsPageLabel_( + item.displayName)]]" + on-click="navigateToOptionsPageInSettings_"> + </cr-icon-button> + </div> + </template> + <template is="dom-if" + if="[[!hasOptionsPageInSettings_(item.id)]]"> + <div class="external-wrapper" + hidden="[[!item.hasOptionsPage]]"> + <cr-icon-button class="icon-external" + aria-label$="[[getOpenOptionsPageLabel_( + item.displayName)]]" + on-click="openExtensionOptionsPage_"> + </cr-icon-button> + </div> + </template> + <div class="separator"></div> + <cr-icon-button class="icon-clear" + disabled$="[[disableRemoveInputMethod_(item, + languages.inputMethods.enabled.*)]]" + on-click="onRemoveInputMethodClick_" + title="[[getRemoveInputMethodTooltip_(item)]]"> + </cr-icon-button> </div> </template> - <div class="list-frame vertical-list" id="inputMethodsList"> + <div class="list-item"> + <cr-button id="addInputMethod" on-click="onAddInputMethodClick_" + deep-link-focus-id$="[[Setting.kAddInputMethod]]"> + <iron-icon icon="cr:add" slot="prefix-icon"></iron-icon> + $i18n{addInputMethodLabel} + </cr-button> + </div> + </div> +</div> +<template is="dom-if" if="[[onDeviceGrammarCheckEnabled_]]"> + <settings-toggle-button id="enableSpellcheckingToggle" class="hr" + label="$i18n{spellAndGrammarCheckTitle}" + sub-label="$i18n{spellAndGrammarCheckDescription}" + pref="{{prefs.browser.enable_spellchecking}}" no-set-pref + on-settings-boolean-control-change="onSpellcheckToggleChange_" + deep-link-focus-id$="[[Setting.kSpellCheck]]" + aria-describedby="spellAndGrammarCheckDescription"> + </settings-toggle-button> +</template> +<template is="dom-if" if="[[!onDeviceGrammarCheckEnabled_]]"> + <!-- This uses the same id as the toggle above, causing |querySelector|s and + |getElementById|s to potentially fail. + TODO: b/289955380 - Remove this toggle, or change the id of this + toggle. --> + <settings-toggle-button id="enableSpellcheckingToggle" class="hr" + label="$i18n{spellCheckTitle}" + pref="{{prefs.browser.enable_spellchecking}}" no-set-pref + on-settings-boolean-control-change="onSpellcheckToggleChange_" + deep-link-focus-id$="[[Setting.kSpellCheck]]"> + </settings-toggle-button> +</template> +<iron-collapse class="subsection" opened="[[ + prefs.browser.enable_spellchecking.value]]"> + <template is="dom-if" if="[[!onDeviceGrammarCheckEnabled_]]"> + <settings-toggle-button id="enhancedSpellCheckToggle" + label="$i18n{spellCheckEnhancedLabel}" + pref="{{prefs.spellcheck.use_spelling_service}}" + disabled="[[!prefs.browser.enable_spellchecking.value]]"> + </settings-toggle-button> + </template> + <cr-link-row class="hr" label="$i18n{editDictionaryLabel}" + on-click="onEditDictionaryClick_" + id="editDictionarySubpageTrigger" + disabled="[[!prefs.browser.enable_spellchecking.value]]" + role-description="$i18n{subpageArrowRoleDescription}"> + </cr-link-row> + <div id="spellCheckLanguagesListV2"> + <div class="cr-row hr"> + <div> + $i18n{spellCheckLanguagesListTitle} + </div> + </div> + <div class="list-frame vertical-list" role="list"> <template is="dom-repeat" - items="[[languages.inputMethods.enabled]]"> - <div class$="list-item [[getInputMethodItemClass_( - item.id, languages.inputMethods.currentId)]]" - actionable on-click="onInputMethodClick_" - on-keypress="onInputMethodKeyPress_" - tabindex$="[[getInputMethodTabIndex_( - item.id, languages.inputMethods.currentId)]]" - aria-labelledby$="language-[[index]]" role="button"> - <div class="start" id="language-[[index]]" aria-hidden="true"> - <div class="display-name">[[item.displayName]]</div> - <div class="explain-selected" - hidden="[[!isCurrentInputMethod_( - item.id, languages.inputMethods.currentId)]]"> - $i18n{inputMethodEnabled} + items="[[spellCheckLanguages_]]" + mutable-data> + <div class="list-item"> + <div class="flex name-with-error" aria-hidden="true" + disabled$="[[isSpellCheckNameClickDisabled_(item, item.*, + prefs.browser.enable_spellchecking.*)]]"> + [[item.language.displayName]] + <div hidden="[[!item.downloadDictionaryFailureCount]]" + aria-hidden="true"> + <iron-icon icon="cr:error"></iron-icon> + <span>$i18n{languagesDictionaryDownloadError}</span> </div> </div> - <template is="dom-if" - if="[[hasOptionsPageInSettings_(item.id)]]"> - <div class="internal-wrapper" - hidden="[[!item.hasOptionsPage]]"> - <cr-icon-button class="subpage-arrow" - aria-label$="[[getOpenOptionsPageLabel_( - item.displayName)]]" - on-click="navigateToOptionsPageInSettings_"> - </cr-icon-button> - </div> + <cr-button on-click="onRetryDictionaryDownloadClick_" + hidden="[[!item.downloadDictionaryFailureCount]]" + disabled="[[!prefs.browser.enable_spellchecking.value]]" + aria-label$="[[getDictionaryDownloadRetryAriaLabel_( + item)]]"> + $i18n{languagesDictionaryDownloadRetryLabel} + </cr-button> + <template is="dom-if" if="[[!item.isManaged]]"> + <cr-icon-button class="icon-clear" + disabled="[[!prefs.browser.enable_spellchecking.value]]" + on-click="onRemoveSpellcheckLanguageClick_" + title="[[getRemoveSpellcheckLanguageTooltip_(item)]]"> + </cr-icon-button> </template> - <template is="dom-if" - if="[[!hasOptionsPageInSettings_(item.id)]]"> - <div class="external-wrapper" - hidden="[[!item.hasOptionsPage]]"> - <cr-icon-button class="icon-external" - aria-label$="[[getOpenOptionsPageLabel_( - item.displayName)]]" - on-click="openExtensionOptionsPage_"> - </cr-icon-button> - </div> + <template is="dom-if" if="[[item.isManaged]]"> + <cr-policy-pref-indicator + pref="[[getIndicatorPrefForManagedSpellcheckLanguage_( + item.spellCheckEnabled)]]"> + </cr-policy-pref-indicator> + <cr-icon-button class="icon-clear managed-button" + disabled="true" + title="[[getRemoveSpellcheckLanguageTooltip_(item)]]"> + </cr-icon-button> </template> - <div class="separator"></div> - <cr-icon-button class="icon-clear" - disabled$="[[disableRemoveInputMethod_(item, - languages.inputMethods.enabled.*)]]" - on-click="onRemoveInputMethodClick_" - title="[[getRemoveInputMethodTooltip_(item)]]"> - </cr-icon-button> </div> </template> <div class="list-item"> - <cr-button id="addInputMethod" on-click="onAddInputMethodClick_" - deep-link-focus-id$="[[Setting.kAddInputMethod]]"> + <cr-button id="addSpellcheckLanguages" + on-click="onAddSpellcheckLanguagesClick_" + disabled="[[!prefs.browser.enable_spellchecking.value]]"> <iron-icon icon="cr:add" slot="prefix-icon"></iron-icon> - $i18n{addInputMethodLabel} + $i18n{addLanguages} </cr-button> </div> </div> </div> - <template is="dom-if" if="[[onDeviceGrammarCheckEnabled_]]"> - <settings-toggle-button id="enableSpellcheckingToggle" class="hr" - label="$i18n{spellAndGrammarCheckTitle}" - sub-label="$i18n{spellAndGrammarCheckDescription}" - pref="{{prefs.browser.enable_spellchecking}}" no-set-pref - on-settings-boolean-control-change="onSpellcheckToggleChange_" - deep-link-focus-id$="[[Setting.kSpellCheck]]" - aria-describedby="spellAndGrammarCheckDescription"> - </settings-toggle-button> - </template> - <template is="dom-if" if="[[!onDeviceGrammarCheckEnabled_]]"> - <!-- This uses the same id as the toggle above, causing |querySelector|s and - |getElementById|s to potentially fail. - TODO: b/289955380 - Remove this toggle, or change the id of this - toggle. --> - <settings-toggle-button id="enableSpellcheckingToggle" class="hr" - label="$i18n{spellCheckTitle}" - pref="{{prefs.browser.enable_spellchecking}}" no-set-pref - on-settings-boolean-control-change="onSpellcheckToggleChange_" - deep-link-focus-id$="[[Setting.kSpellCheck]]"> - </settings-toggle-button> - </template> - <iron-collapse class="subsection" opened="[[ - prefs.browser.enable_spellchecking.value]]"> - <template is="dom-if" if="[[!onDeviceGrammarCheckEnabled_]]"> - <settings-toggle-button id="enhancedSpellCheckToggle" - label="$i18n{spellCheckEnhancedLabel}" - pref="{{prefs.spellcheck.use_spelling_service}}" - disabled="[[!prefs.browser.enable_spellchecking.value]]"> - </settings-toggle-button> - </template> - <cr-link-row class="hr" label="$i18n{editDictionaryLabel}" - on-click="onEditDictionaryClick_" - id="editDictionarySubpageTrigger" - disabled="[[!prefs.browser.enable_spellchecking.value]]" - role-description="$i18n{subpageArrowRoleDescription}"> - </cr-link-row> - <div id="spellCheckLanguagesListV2"> - <div class="cr-row hr"> - <div> - $i18n{spellCheckLanguagesListTitle} - </div> - </div> - <div class="list-frame vertical-list" role="list"> - <template is="dom-repeat" - items="[[spellCheckLanguages_]]" - mutable-data> - <div class="list-item"> - <div class="flex name-with-error" aria-hidden="true" - disabled$="[[isSpellCheckNameClickDisabled_(item, item.*, - prefs.browser.enable_spellchecking.*)]]"> - [[item.language.displayName]] - <div hidden="[[!item.downloadDictionaryFailureCount]]" - aria-hidden="true"> - <iron-icon icon="cr:error"></iron-icon> - <span>$i18n{languagesDictionaryDownloadError}</span> - </div> - </div> - <cr-button on-click="onRetryDictionaryDownloadClick_" - hidden="[[!item.downloadDictionaryFailureCount]]" - disabled="[[!prefs.browser.enable_spellchecking.value]]" - aria-label$="[[getDictionaryDownloadRetryAriaLabel_( - item)]]"> - $i18n{languagesDictionaryDownloadRetryLabel} - </cr-button> - <template is="dom-if" if="[[!item.isManaged]]"> - <cr-icon-button class="icon-clear" - disabled="[[!prefs.browser.enable_spellchecking.value]]" - on-click="onRemoveSpellcheckLanguageClick_" - title="[[getRemoveSpellcheckLanguageTooltip_(item)]]"> - </cr-icon-button> - </template> - <template is="dom-if" if="[[item.isManaged]]"> - <cr-policy-pref-indicator - pref="[[getIndicatorPrefForManagedSpellcheckLanguage_( - item.spellCheckEnabled)]]"> - </cr-policy-pref-indicator> - <cr-icon-button class="icon-clear managed-button" - disabled="true" - title="[[getRemoveSpellcheckLanguageTooltip_(item)]]"> - </cr-icon-button> - </template> - </div> - </template> - <div class="list-item"> - <cr-button id="addSpellcheckLanguages" - on-click="onAddSpellcheckLanguagesClick_" - disabled="[[!prefs.browser.enable_spellchecking.value]]"> - <iron-icon icon="cr:add" slot="prefix-icon"></iron-icon> - $i18n{addLanguages} - </cr-button> - </div> - </div> - </div> - </iron-collapse> +</iron-collapse> <template is="dom-if" if="[[showAddInputMethodsDialog_]]" restamp> <os-settings-add-input-methods-dialog languages="[[languages]]"
diff --git a/chrome/browser/resources/ash/settings/os_languages_page/os_japanese_clear_ime_data_dialog.html b/chrome/browser/resources/ash/settings/os_languages_page/os_japanese_clear_ime_data_dialog.html index 40a615a..23f6ffe3 100644 --- a/chrome/browser/resources/ash/settings/os_languages_page/os_japanese_clear_ime_data_dialog.html +++ b/chrome/browser/resources/ash/settings/os_languages_page/os_japanese_clear_ime_data_dialog.html
@@ -21,15 +21,13 @@ <cr-checkbox class="list-item no-outline is-width-of-dialog"> Suggestion History </cr-checkbox> - <div> - <div slot="button-container"> - <cr-button class="action-button" > - Clear Personalized data - </cr-button> - <cr-button class="cancel-button" on-click="onCancelButtonClick_"> - $i18n{cancel} - </cr-button> - </div> + <div slot="button-container"> + <cr-button class="action-button" > + Clear Personalized data + </cr-button> + <cr-button class="cancel-button" on-click="onCancelButtonClick_"> + $i18n{cancel} + </cr-button> + </div> </div> </cr-dialog> -
diff --git a/chrome/browser/resources/ash/settings/os_languages_page/os_languages_page_v2.html b/chrome/browser/resources/ash/settings/os_languages_page/os_languages_page_v2.html index 1d90a5f..8bf9b74 100644 --- a/chrome/browser/resources/ash/settings/os_languages_page/os_languages_page_v2.html +++ b/chrome/browser/resources/ash/settings/os_languages_page/os_languages_page_v2.html
@@ -50,138 +50,137 @@ } </style> - <div class="cr-row first"> - <div class="flex cr-padded-text" aria-hidden="true"> - $i18n{deviceLanguageTitle} - <div class="secondary"> - [[getLanguageDisplayName_(languages.prospectiveUILanguage)]] - </div> - </div> - <template is="dom-if" if="[[isSecondaryUser_]]"> - <cr-policy-indicator id="changeDeviceLanguagePolicyIndicator" - indicator-type="primary_user" - indicator-source-name="[[primaryUserEmail_]]"> - </cr-policy-indicator> - </template> - <template is="dom-if" if="[[!isGuest_]]"> - <cr-button id="changeDeviceLanguage" - on-click="onChangeDeviceLanguageClick_" - disabled="[[isSecondaryUser_]]" - aria-label="[[getChangeDeviceLanguageButtonDescription_( - languages.prospectiveUILanguage)]]" - deep-link-focus-id$="[[Setting.kChangeDeviceLanguage]]"> - $i18n{changeDeviceLanguageLabel} - </cr-button> - </template> - - </div> - - <div class="hr bottom-margin"> - <h2 aria-hidden="true"> - [[getLanguagePreferenceTitle_(languageSettingsV2Update2Enabled_)]] - </h2> - <div class="cr-row first bottom-margin"> - <localized-link id="webLanguagesDescription" - localized-string="[[getLanguagePreferenceDescription_( - languageSettingsV2Update2Enabled_)]]" - on-link-clicked="onLanguagePreferenceDescriptionLinkClick_"> - </localized-link> - </div> - <div class="list-frame vertical-list" id="languagesList"> - <template is="dom-repeat" items="[[languages.enabled]]"> - <div class$="list-item [[getTranslationTargetClass_( - item.language.code, languages.translateTarget)]]"> - <div class="flex" id="displayText-[[index]]" - aria-hidden="true"> - <div title="[[item.language.nativeDisplayName]]"> - [[item.language.displayName]] - </div> - <div class="target-info secondary"> - $i18n{translateTargetLabel} - </div> - </div> - <cr-icon-button class="icon-more-vert" - title="$i18n{moreActions}" id="more-[[item.language.code]]" - on-click="onDotsClick_" - aria-labelledby$="displayText-[[index]]"> - </cr-icon-button> - </div> - </template> - <div class="list-item"> - <cr-button id="addLanguages" - disabled="[[!canEnableSomeSupportedLanguage_(languages)]]" - on-click="onAddLanguagesClick_" - deep-link-focus-id$="[[Setting.kAddLanguage]]"> - <iron-icon id="addLanguagesIcon" icon="cr:add" slot="prefix-icon"> - </iron-icon> - $i18n{addLanguages} - </cr-button> - </div> +<div class="cr-row first"> + <div class="flex cr-padded-text" aria-hidden="true"> + $i18n{deviceLanguageTitle} + <div class="secondary"> + [[getLanguageDisplayName_(languages.prospectiveUILanguage)]] </div> </div> - - <template is="dom-if" if="[[languageSettingsV2Update2Enabled_]]"> - <div class="hr"> - <h2 aria-hidden="true">$i18n{googleAccountLanguageTitle}</h2> - <div class="cr-row first"> - $i18n{googleAccountLanguageDescription} - </div> - <div class="subsection cr-padded-text"> - <cr-link-row id="manageGoogleAccountLanguage" - label="$i18n{manageGoogleAccountLanguageLabel}" - on-click="openManageGoogleAccountLanguage_" - external> - </cr-link-row> - </div> - </div> + <template is="dom-if" if="[[isSecondaryUser_]]"> + <cr-policy-indicator id="changeDeviceLanguagePolicyIndicator" + indicator-type="primary_user" + indicator-source-name="[[primaryUserEmail_]]"> + </cr-policy-indicator> </template> + <template is="dom-if" if="[[!isGuest_]]"> + <cr-button id="changeDeviceLanguage" + on-click="onChangeDeviceLanguageClick_" + disabled="[[isSecondaryUser_]]" + aria-label="[[getChangeDeviceLanguageButtonDescription_( + languages.prospectiveUILanguage)]]" + deep-link-focus-id$="[[Setting.kChangeDeviceLanguage]]"> + $i18n{changeDeviceLanguageLabel} + </cr-button> + </template> +</div> - <settings-toggle-button id="offerTranslation" class="hr" - pref="{{prefs.translate.enabled}}" - label="[[getOfferTranslationLabel_( - languageSettingsV2Update2Enabled_)]]" - sub-label="[[getOfferTranslationSublabel_( - languageSettingsV2Update2Enabled_)]]" - on-settings-boolean-control-change="onTranslateToggleChange_" - deep-link-focus-id$="[[Setting.kOfferTranslation]]"> - </settings-toggle-button> - - <cr-lazy-render id="menu"> - <template> - <cr-action-menu class="complex" - role-description="$i18n{menu}"> - <cr-checkbox id="offerTranslations" - class="dropdown-item" - checked="[[detailLanguage_.state.translateEnabled]]" - on-change="onTranslateCheckboxChange_" - hidden="[[!prefs.translate.enabled.value]]" - disabled="[[disableTranslateCheckbox_( - detailLanguage_.state, languages.translateTarget)]]" noink> - $i18n{offerToTranslateThisLanguage} - </cr-checkbox> - <button class="dropdown-item" role="menuitem" - on-click="onMoveToTopClick_" - hidden="[[showMoveToTop_(detailLanguage_)]]"> - $i18n{moveToTop} - </button> - <button class="dropdown-item" role="menuitem" - on-click="onMoveUpClick_" - hidden="[[!showMoveUp_(detailLanguage_)]]"> - $i18n{moveUp} - </button> - <button class="dropdown-item" role="menuitem" - on-click="onMoveDownClick_" - hidden="[[!showMoveDown_(detailLanguage_)]]"> - $i18n{moveDown} - </button> - <button class="dropdown-item" role="menuitem" - on-click="onRemoveLanguageClick_" - disabled="[[!detailLanguage_.state.removable]]"> - $i18n{removeLanguage} - </button> - </cr-action-menu> +<div class="hr bottom-margin"> + <h2 aria-hidden="true"> + [[getLanguagePreferenceTitle_(languageSettingsV2Update2Enabled_)]] + </h2> + <div class="cr-row first bottom-margin"> + <localized-link id="webLanguagesDescription" + localized-string="[[getLanguagePreferenceDescription_( + languageSettingsV2Update2Enabled_)]]" + on-link-clicked="onLanguagePreferenceDescriptionLinkClick_"> + </localized-link> + </div> + <div class="list-frame vertical-list" id="languagesList"> + <template is="dom-repeat" items="[[languages.enabled]]"> + <div class$="list-item [[getTranslationTargetClass_( + item.language.code, languages.translateTarget)]]"> + <div class="flex" id="displayText-[[index]]" + aria-hidden="true"> + <div title="[[item.language.nativeDisplayName]]"> + [[item.language.displayName]] + </div> + <div class="target-info secondary"> + $i18n{translateTargetLabel} + </div> + </div> + <cr-icon-button class="icon-more-vert" + title="$i18n{moreActions}" id="more-[[item.language.code]]" + on-click="onDotsClick_" + aria-labelledby$="displayText-[[index]]"> + </cr-icon-button> + </div> </template> - </cr-lazy-render> + <div class="list-item"> + <cr-button id="addLanguages" + disabled="[[!canEnableSomeSupportedLanguage_(languages)]]" + on-click="onAddLanguagesClick_" + deep-link-focus-id$="[[Setting.kAddLanguage]]"> + <iron-icon id="addLanguagesIcon" icon="cr:add" slot="prefix-icon"> + </iron-icon> + $i18n{addLanguages} + </cr-button> + </div> + </div> +</div> + +<template is="dom-if" if="[[languageSettingsV2Update2Enabled_]]"> + <div class="hr"> + <h2 aria-hidden="true">$i18n{googleAccountLanguageTitle}</h2> + <div class="cr-row first"> + $i18n{googleAccountLanguageDescription} + </div> + <div class="subsection cr-padded-text"> + <cr-link-row id="manageGoogleAccountLanguage" + label="$i18n{manageGoogleAccountLanguageLabel}" + on-click="openManageGoogleAccountLanguage_" + external> + </cr-link-row> + </div> + </div> +</template> + +<settings-toggle-button id="offerTranslation" class="hr" + pref="{{prefs.translate.enabled}}" + label="[[getOfferTranslationLabel_( + languageSettingsV2Update2Enabled_)]]" + sub-label="[[getOfferTranslationSublabel_( + languageSettingsV2Update2Enabled_)]]" + on-settings-boolean-control-change="onTranslateToggleChange_" + deep-link-focus-id$="[[Setting.kOfferTranslation]]"> +</settings-toggle-button> + +<cr-lazy-render id="menu"> + <template> + <cr-action-menu class="complex" + role-description="$i18n{menu}"> + <cr-checkbox id="offerTranslations" + class="dropdown-item" + checked="[[detailLanguage_.state.translateEnabled]]" + on-change="onTranslateCheckboxChange_" + hidden="[[!prefs.translate.enabled.value]]" + disabled="[[disableTranslateCheckbox_( + detailLanguage_.state, languages.translateTarget)]]" noink> + $i18n{offerToTranslateThisLanguage} + </cr-checkbox> + <button class="dropdown-item" role="menuitem" + on-click="onMoveToTopClick_" + hidden="[[showMoveToTop_(detailLanguage_)]]"> + $i18n{moveToTop} + </button> + <button class="dropdown-item" role="menuitem" + on-click="onMoveUpClick_" + hidden="[[!showMoveUp_(detailLanguage_)]]"> + $i18n{moveUp} + </button> + <button class="dropdown-item" role="menuitem" + on-click="onMoveDownClick_" + hidden="[[!showMoveDown_(detailLanguage_)]]"> + $i18n{moveDown} + </button> + <button class="dropdown-item" role="menuitem" + on-click="onRemoveLanguageClick_" + disabled="[[!detailLanguage_.state.removable]]"> + $i18n{removeLanguage} + </button> + </cr-action-menu> + </template> +</cr-lazy-render> <template is="dom-if" if="[[showChangeDeviceLanguageDialog_]]" restamp> <os-settings-change-device-language-dialog languages="[[languages]]"
diff --git a/chrome/browser/resources/chromeos/accessibility/switch_access/saatlite/compiler/package.json b/chrome/browser/resources/chromeos/accessibility/switch_access/saatlite/compiler/package.json index e6b892a3..4826aa06 100644 --- a/chrome/browser/resources/chromeos/accessibility/switch_access/saatlite/compiler/package.json +++ b/chrome/browser/resources/chromeos/accessibility/switch_access/saatlite/compiler/package.json
@@ -7,5 +7,5 @@ "compiler.js": "node compiler.js" }, "author": "The Chromium Authors", - "license": "Copyright 2021 The Chromium Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file." + "license": "Copyright 2021 The Chromium Authors Use of this source code is governed by a BSD-style license that can be found in the LICENSE file." }
diff --git a/chrome/browser/resources/chromeos/arc_support/event_tracker.js b/chrome/browser/resources/chromeos/arc_support/event_tracker.js index bc4a384..7087f12 100644 --- a/chrome/browser/resources/chromeos/arc_support/event_tracker.js +++ b/chrome/browser/resources/chromeos/arc_support/event_tracker.js
@@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright 2011 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/resources/chromeos/arc_support/i18n_template_no_process.js b/chrome/browser/resources/chromeos/arc_support/i18n_template_no_process.js index 8a90356..a00e0768 100644 --- a/chrome/browser/resources/chromeos/arc_support/i18n_template_no_process.js +++ b/chrome/browser/resources/chromeos/arc_support/i18n_template_no_process.js
@@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Copyright 2012 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/resources/chromeos/chromebox_for_meetings/cfm_network_settings_browser_proxy.js b/chrome/browser/resources/chromeos/chromebox_for_meetings/cfm_network_settings_browser_proxy.js index ae4b756..354481e8 100644 --- a/chrome/browser/resources/chromeos/chromebox_for_meetings/cfm_network_settings_browser_proxy.js +++ b/chrome/browser/resources/chromeos/chromebox_for_meetings/cfm_network_settings_browser_proxy.js
@@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import {addSingletonGetter} from 'chrome://resources/ash/common/cr_deprecated.js'; - /** @interface */ export class CfmNetworkSettingsBrowserProxy { /** @param {string} guid */ @@ -38,6 +36,17 @@ showManageCerts() { chrome.send('showManageCerts'); } + + /** @return {!CfmNetworkSettingsBrowserProxy} */ + static getInstance() { + return instance || (instance = new CfmNetworkSettingsBrowserProxyImpl()); + } + + /** @param {!CfmNetworkSettingsBrowserProxy} obj */ + static setInstance(obj) { + instance = obj; + } } -addSingletonGetter(CfmNetworkSettingsBrowserProxyImpl); +/** @type {?CfmNetworkSettingsBrowserProxy} */ +let instance = null;
diff --git a/chrome/browser/resources/chromeos/desk_api/BUILD.gn b/chrome/browser/resources/chromeos/desk_api/BUILD.gn index 9fa384ee..22dc030b 100644 --- a/chrome/browser/resources/chromeos/desk_api/BUILD.gn +++ b/chrome/browser/resources/chromeos/desk_api/BUILD.gn
@@ -1,4 +1,4 @@ -# Copyright 2022 The Chromium Authors. All rights reserved. +# Copyright 2022 The Chromium Authors # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file.
diff --git a/chrome/browser/resources/chromeos/enterprise_reporting/BUILD.gn b/chrome/browser/resources/chromeos/enterprise_reporting/BUILD.gn index 0a40dc9..f17294ff 100644 --- a/chrome/browser/resources/chromeos/enterprise_reporting/BUILD.gn +++ b/chrome/browser/resources/chromeos/enterprise_reporting/BUILD.gn
@@ -1,4 +1,4 @@ -# Copyright 2023 The Chromium Authors. All rights reserved. +# 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.
diff --git a/chrome/browser/resources/chromeos/login/components/oobe_display_size_selector.html b/chrome/browser/resources/chromeos/login/components/oobe_display_size_selector.html index 217d69ec..39e8cca8 100644 --- a/chrome/browser/resources/chromeos/login/components/oobe_display_size_selector.html +++ b/chrome/browser/resources/chromeos/login/components/oobe_display_size_selector.html
@@ -1,4 +1,4 @@ -<!-- Copyright 2023 The Chromium Authors. All rights reserved. +<!-- 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. -->
diff --git a/chrome/browser/resources/chromeos/login/components/oobe_screens_list.html b/chrome/browser/resources/chromeos/login/components/oobe_screens_list.html index 2b0c5a49..7363c92 100644 --- a/chrome/browser/resources/chromeos/login/components/oobe_screens_list.html +++ b/chrome/browser/resources/chromeos/login/components/oobe_screens_list.html
@@ -1,4 +1,4 @@ -<!-- Copyright 2022 The Chromium Authors. All rights reserved. +<!-- Copyright 2022 The Chromium Authors Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. -->
diff --git a/chrome/browser/resources/chromeos/login/screens/login/cryptohome_recovery.html b/chrome/browser/resources/chromeos/login/screens/login/cryptohome_recovery.html index f1f3659..1b9bebc 100644 --- a/chrome/browser/resources/chromeos/login/screens/login/cryptohome_recovery.html +++ b/chrome/browser/resources/chromeos/login/screens/login/cryptohome_recovery.html
@@ -1,4 +1,4 @@ -<!-- Copyright 2022 The Chromium Authors. All rights reserved. +<!-- Copyright 2022 The Chromium Authors Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. -->
diff --git a/chrome/browser/resources/chromeos/login/screens/login/cryptohome_recovery.js b/chrome/browser/resources/chromeos/login/screens/login/cryptohome_recovery.js index 9f1b97f..4aa21cc 100644 --- a/chrome/browser/resources/chromeos/login/screens/login/cryptohome_recovery.js +++ b/chrome/browser/resources/chromeos/login/screens/login/cryptohome_recovery.js
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/resources/chromeos/password_change/password_change_app.js b/chrome/browser/resources/chromeos/password_change/password_change_app.js index d2ec223..a9e342e 100644 --- a/chrome/browser/resources/chromeos/password_change/password_change_app.js +++ b/chrome/browser/resources/chromeos/password_change/password_change_app.js
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/resources/chromeos/status_area_internals/main.html b/chrome/browser/resources/chromeos/status_area_internals/main.html index 4d297d3..7a77744 100644 --- a/chrome/browser/resources/chromeos/status_area_internals/main.html +++ b/chrome/browser/resources/chromeos/status_area_internals/main.html
@@ -1,4 +1,4 @@ -<!-- Copyright 2023 The Chromium Authors. All rights reserved. +<!-- 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. -->
diff --git a/chrome/browser/resources/chromeos/status_area_internals/privacy_indicator_app.html b/chrome/browser/resources/chromeos/status_area_internals/privacy_indicator_app.html index 8f282ec..b1adf97 100644 --- a/chrome/browser/resources/chromeos/status_area_internals/privacy_indicator_app.html +++ b/chrome/browser/resources/chromeos/status_area_internals/privacy_indicator_app.html
@@ -1,4 +1,4 @@ -<!-- Copyright 2023 The Chromium Authors. All rights reserved. +<!-- 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. -->
diff --git a/chrome/browser/resources/chromeos/status_area_internals/privacy_indicator_app_manager.html b/chrome/browser/resources/chromeos/status_area_internals/privacy_indicator_app_manager.html index 1292edb..8f80927 100644 --- a/chrome/browser/resources/chromeos/status_area_internals/privacy_indicator_app_manager.html +++ b/chrome/browser/resources/chromeos/status_area_internals/privacy_indicator_app_manager.html
@@ -1,4 +1,4 @@ -<!-- Copyright 2023 The Chromium Authors. All rights reserved. +<!-- 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. -->
diff --git a/chrome/browser/resources/chromeos/status_area_internals/status_area_internals.html b/chrome/browser/resources/chromeos/status_area_internals/status_area_internals.html index 4421fd4..3e61dae 100644 --- a/chrome/browser/resources/chromeos/status_area_internals/status_area_internals.html +++ b/chrome/browser/resources/chromeos/status_area_internals/status_area_internals.html
@@ -1,4 +1,4 @@ -<!-- Copyright 2023 The Chromium Authors. All rights reserved. +<!-- 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. -->
diff --git a/chrome/browser/resources/chromeos/vc_tray_tester/main.html b/chrome/browser/resources/chromeos/vc_tray_tester/main.html index 5ad38bec..818d84c 100644 --- a/chrome/browser/resources/chromeos/vc_tray_tester/main.html +++ b/chrome/browser/resources/chromeos/vc_tray_tester/main.html
@@ -1,4 +1,4 @@ -<!-- Copyright 2023 The Chromium Authors. All rights reserved. +<!-- 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. -->
diff --git a/chrome/browser/resources/chromeos/vc_tray_tester/vc_tray_tester.html b/chrome/browser/resources/chromeos/vc_tray_tester/vc_tray_tester.html index cbbdefd3..119c4f40 100644 --- a/chrome/browser/resources/chromeos/vc_tray_tester/vc_tray_tester.html +++ b/chrome/browser/resources/chromeos/vc_tray_tester/vc_tray_tester.html
@@ -1,4 +1,4 @@ -<!-- Copyright 2023 The Chromium Authors. All rights reserved. +<!-- 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. -->
diff --git a/chrome/browser/resources/new_tab_page/app.ts b/chrome/browser/resources/new_tab_page/app.ts index 51fba64f..4cc4702e 100644 --- a/chrome/browser/resources/new_tab_page/app.ts +++ b/chrome/browser/resources/new_tab_page/app.ts
@@ -459,6 +459,9 @@ 'background-image-loaded', this.backgroundImageLoadStart_ + duration); } + }, + () => { + // Ignore. Failed to capture background image load time. }); } FocusOutlineManager.forDocument(document);
diff --git a/chrome/browser/resources/new_tab_page/lens_upload_dialog.ts b/chrome/browser/resources/new_tab_page/lens_upload_dialog.ts index 3dd44cbf..14409cad 100644 --- a/chrome/browser/resources/new_tab_page/lens_upload_dialog.ts +++ b/chrome/browser/resources/new_tab_page/lens_upload_dialog.ts
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/resources/password_manager/site_favicon.ts b/chrome/browser/resources/password_manager/site_favicon.ts index 6606745..cbce064 100644 --- a/chrome/browser/resources/password_manager/site_favicon.ts +++ b/chrome/browser/resources/password_manager/site_favicon.ts
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/resources/print_preview/data/cdd.ts b/chrome/browser/resources/print_preview/data/cdd.ts index 2993bc00..d164560 100644 --- a/chrome/browser/resources/print_preview/data/cdd.ts +++ b/chrome/browser/resources/print_preview/data/cdd.ts
@@ -101,6 +101,11 @@ export type MediaSizeOption = { type?: string, vendor_id?: string, height_microns: number, width_microns: number, + imageable_area_left_microns?: number, + imageable_area_bottom_microns?: number, + imageable_area_right_microns?: number, + imageable_area_top_microns?: number, + has_borderless_variant?: boolean, }&SelectOption; export type MediaSizeCapability = {
diff --git a/chrome/browser/resources/print_preview/data/model.ts b/chrome/browser/resources/print_preview/data/model.ts index c4deb00e..7ab1fa1 100644 --- a/chrome/browser/resources/print_preview/data/model.ts +++ b/chrome/browser/resources/print_preview/data/model.ts
@@ -46,6 +46,7 @@ color: Setting; customMargins: Setting; mediaSize: Setting; + borderless: Setting; mediaType: Setting; margins: Setting; dpi: Setting; @@ -73,6 +74,7 @@ recentDestinations?: RecentDestination[]; dpi?: DpiOption; mediaSize?: MediaSizeOption; + borderless?: boolean; mediaType?: MediaTypeOption; marginsType?: MarginsType; customMargins?: MarginsSetting; @@ -140,6 +142,7 @@ imageable_area_bottom_microns?: number; imageable_area_right_microns?: number; imageable_area_top_microns?: number; + has_borderless_variant?: boolean; } export interface Ticket { @@ -162,6 +165,7 @@ scalingType: ScalingType; shouldPrintBackgrounds: boolean; shouldPrintSelectionOnly: boolean; + borderless?: boolean; mediaType?: string; advancedSettings?: object; capabilities?: string; @@ -223,6 +227,7 @@ */ const STICKY_SETTING_NAMES: string[] = [ 'recentDestinations', + 'borderless', 'collate', 'color', 'cssBackground', @@ -375,6 +380,16 @@ key: 'mediaSize', updatesPreview: true, }, + borderless: { + value: false, + unavailableValue: false, + valid: true, + available: false, + setByPolicy: false, + setFromUi: false, + key: 'borderless', + updatesPreview: true, + }, mediaType: { value: '', unavailableValue: '', @@ -840,6 +855,8 @@ 'mediaSize.available', !!caps && !!caps.media_size && !knownSizeToSaveAsPdf); this.setSettingPath_( + 'borderless.available', this.isBorderlessAvailable_(caps)); + this.setSettingPath_( 'mediaType.available', loadTimeData.getBoolean('isBorderlessPrintingEnabled') && !!caps && !!caps.media_type && !!caps.media_type.option && @@ -978,6 +995,16 @@ return hasLandscapeOption && hasAutoOrPortraitOption; } + /** + * @return Whether the borderless setting should be available. + */ + private isBorderlessAvailable_(caps: CddCapabilities|null): boolean { + return loadTimeData.getBoolean('isBorderlessPrintingEnabled') && !!caps && + !!caps.media_size?.option?.find(o => { + return o.has_borderless_variant; + }); + } + private updateSettingsValues_(caps: CddCapabilities|null) { if (this.settings.mediaSize.available) { const defaultOption = @@ -997,6 +1024,14 @@ this.setSetting('mediaSize', matchingOption || defaultOption, true); } + if (this.settings.borderless.available) { + this.setSetting( + 'borderless', + this.settings.borderless.setFromUi && + this.getSettingValue('borderless'), + true); + } + if (this.settings.mediaType.available) { const defaultOption = caps!.media_type!.option.find(o => !!o.is_default) || @@ -1634,6 +1669,9 @@ 'scalingType'; const ticket: PrintTicket = { mediaSize: this.getSettingValue('mediaSize') as MediaSizeValue, + borderless: loadTimeData.getBoolean('isBorderlessPrintingEnabled') && + this.getSettingValue('mediaSize')?.has_borderless_variant && + this.getSettingValue('borderless'), mediaType: this.getSettingValue('mediaType')?.vendor_id, pageCount: this.getSettingValue('pages').length, landscape: this.getSettingValue('layout'),
diff --git a/chrome/browser/resources/print_preview/ui/media_size_settings.html b/chrome/browser/resources/print_preview/ui/media_size_settings.html index bcf5dec9..9183bb3d 100644 --- a/chrome/browser/resources/print_preview/ui/media_size_settings.html +++ b/chrome/browser/resources/print_preview/ui/media_size_settings.html
@@ -12,3 +12,16 @@ </print-preview-settings-select> </div> </print-preview-settings-section> + +<iron-collapse opened="[[settings.borderless.available]]"> + <print-preview-settings-section> + <div slot="title"></div> + <div slot="controls" class="checkbox"> + <cr-checkbox id="borderless" aria-labelledby="borderless-label" + disabled$="[[disabled]]" + on-change="onBorderlessCheckboxChange_"> + <span id="borderless-label">$i18n{borderlessLabel}</span> + </cr-checkbox> + </div> + </print-preview-settings-section> +</iron-collapse>
diff --git a/chrome/browser/resources/print_preview/ui/media_size_settings.ts b/chrome/browser/resources/print_preview/ui/media_size_settings.ts index 40ecf4b0..307ad60 100644 --- a/chrome/browser/resources/print_preview/ui/media_size_settings.ts +++ b/chrome/browser/resources/print_preview/ui/media_size_settings.ts
@@ -6,6 +6,8 @@ import './settings_section.js'; import './settings_select.js'; +import {CrCheckboxElement} from 'chrome://resources/cr_elements/cr_checkbox/cr_checkbox.js'; +import {loadTimeData} from 'chrome://resources/js/load_time_data.js'; import {PolymerElement} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; import {MediaSizeCapability} from '../data/cdd.js'; @@ -13,6 +15,12 @@ import {getTemplate} from './media_size_settings.html.js'; import {SettingsMixin} from './settings_mixin.js'; +export interface PrintPreviewMediaSizeSettingsElement { + $: { + borderless: CrCheckboxElement, + }; +} + const PrintPreviewMediaSizeSettingsElementBase = SettingsMixin(PolymerElement); export class PrintPreviewMediaSizeSettingsElement extends @@ -39,6 +47,8 @@ static get observers() { return [ 'onMediaSizeSettingChange_(settings.mediaSize.*, capability.option)', + 'updateBorderlessAvailabilityForSize_(settings.mediaSize.*)', + 'onBorderlessSettingChange_(settings.borderless.*)', ]; } @@ -59,6 +69,45 @@ this.capability.option[0]; this.setSetting('mediaSize', defaultOption); } + + private updateBorderlessAvailabilityForSize_() { + if (!loadTimeData.getBoolean('isBorderlessPrintingEnabled')) { + return; + } + const size = this.getSettingValue('mediaSize'); + if (size?.has_borderless_variant) { + this.$.borderless.disabled = false; + this.$.borderless.checked = this.getSettingValue('borderless'); + } else { + // If a size only supports borderless and has no bordered variant, + // has_borderless_variant will be false. In this case, the checkbox + // will be disabled (it wouldn't have any effect), but will display + // as checked to indicate that the print will be borderless. This is + // a corner case, but printers are allowed to do it, so it's best to + // handle it as well as possible. If a size only supports bordered and + // not borderless, disable the checkbox and leave it unchecked. + this.$.borderless.disabled = true; + this.$.borderless.checked = + (size?.imageable_area_left_microns === 0 && + size?.imageable_area_bottom_microns === 0 && + size?.imageable_area_right_microns === size.width_microns && + size?.imageable_area_top_microns === size.height_microns); + } + } + + private onBorderlessSettingChange_() { + if (!loadTimeData.getBoolean('isBorderlessPrintingEnabled')) { + return; + } + this.$.borderless.checked = this.getSettingValue('borderless'); + } + + private onBorderlessCheckboxChange_() { + if (!loadTimeData.getBoolean('isBorderlessPrintingEnabled')) { + return; + } + this.setSetting('borderless', this.$.borderless.checked); + } } declare global {
diff --git a/chrome/browser/resources/search_engine_choice/app.html b/chrome/browser/resources/search_engine_choice/app.html index e426718..f38ef54 100644 --- a/chrome/browser/resources/search_engine_choice/app.html +++ b/chrome/browser/resources/search_engine_choice/app.html
@@ -125,6 +125,33 @@ color: var(--google-blue-600); } + cr-dialog { + --cr-dialog-body-padding-horizontal: 24px; + --cr-dialog-button-container-padding-horizontal: 24px; + --cr-dialog-button-container-padding-bottom: 24px; + --cr-dialog-button-container-padding-top: 20px; + --cr-dialog-title-font-size: 1.375rem; + --cr-dialog-title-slot-padding-bottom: 24px; + --cr-dialog-title-slot-padding-end: 24px; + --cr-dialog-title-slot-padding-start: 24px; + --cr-dialog-title-slot-padding-top: 24px; + } + + cr-dialog h1 { + font-size: 1.375rem; + font-weight: 400; + line-height: 28px; + margin: 0; + } + + cr-dialog p { + font-family: Roboto; + font-size: 0.875rem; + font-weight: 400; + line-height: 20px; + margin: 0 0 24px; + } + @media (prefers-color-scheme: dark) { .tangible-sync-style-left-banner { content: url(images/left_illustration_dark.svg); @@ -189,6 +216,16 @@ <cr-dialog id="infoDialog"> <div slot="title"> - $i18n{infoTitle} + <h1>$i18n{infoDialogTitle}</h1> + </div> + <div slot="body"> + <p>$i18n{infoDialogFirstParagraph}</p> + <p>$i18nRaw{infoDialogSecondParagraph}</p> + <p>$i18n{infoDialogThirdParagraph}</p> + </div> + <div slot="button-container"> + <cr-button class="action-button" on-click="onInfoDialogButtonClicked_"> + $i18n{infoDialogButtonText} + </cr-button> </div> </cr-dialog>
diff --git a/chrome/browser/resources/search_engine_choice/app.ts b/chrome/browser/resources/search_engine_choice/app.ts index 3fcdaec..f48098fe 100644 --- a/chrome/browser/resources/search_engine_choice/app.ts +++ b/chrome/browser/resources/search_engine_choice/app.ts
@@ -94,6 +94,10 @@ SearchEngineChoiceBrowserProxy.getInstance() .handler.handleSearchEngineChoiceSelected(this.selectedChoice_); } + + private onInfoDialogButtonClicked_() { + this.$.infoDialog.close(); + } } declare global {
diff --git a/chrome/browser/resources/settings/privacy_page/privacy_guide/privacy_guide_safe_browsing_fragment.html b/chrome/browser/resources/settings/privacy_page/privacy_guide/privacy_guide_safe_browsing_fragment.html index 5d531e2..2dd08c1 100644 --- a/chrome/browser/resources/settings/privacy_page/privacy_guide/privacy_guide_safe_browsing_fragment.html +++ b/chrome/browser/resources/settings/privacy_page/privacy_guide/privacy_guide_safe_browsing_fragment.html
@@ -97,17 +97,17 @@ </privacy-guide-description-item> <privacy-guide-description-item role="listitem" - icon="settings20:vpn-key-new" + icon="settings20:gshield" label="$i18n{safeBrowsingEnhancedWhenOnBulThree}"> </privacy-guide-description-item> <privacy-guide-description-item role="listitem" - icon="settings20:gshield" + icon="settings:language" label="$i18n{safeBrowsingEnhancedWhenOnBulFour}"> </privacy-guide-description-item> <privacy-guide-description-item role="listitem" - icon="settings:language" + icon="settings20:vpn-key-new" label="$i18n{safeBrowsingEnhancedWhenOnBulFive}"> </privacy-guide-description-item> </div> @@ -129,7 +129,7 @@ </privacy-guide-description-item> <privacy-guide-description-item role="listitem" - icon="settings20:speed" + icon="settings:performance" label="$i18n{safeBrowsingEnhancedThingsToConsiderBulThree}"> </privacy-guide-description-item> </div>
diff --git a/chrome/browser/resources/webui_gallery/BUILD.gn b/chrome/browser/resources/webui_gallery/BUILD.gn index d482edd..7d7e5c5 100644 --- a/chrome/browser/resources/webui_gallery/BUILD.gn +++ b/chrome/browser/resources/webui_gallery/BUILD.gn
@@ -26,6 +26,7 @@ "demos/cr_a11y_announcer/cr_a11y_announcer_demo.ts", "demos/cr_action_menu/cr_action_menu_demo.ts", "demos/cr_checkbox/cr_checkbox_demo.ts", + "demos/cr_chip/cr_chip_demo.ts", "demos/cr_dialog/cr_dialog_demo.ts", "demos/cr_icons/cr_icons_demo.ts", "demos/cr_input/cr_input_demo.ts",
diff --git a/chrome/browser/resources/webui_gallery/app.ts b/chrome/browser/resources/webui_gallery/app.ts index d170048..d291a0ef 100644 --- a/chrome/browser/resources/webui_gallery/app.ts +++ b/chrome/browser/resources/webui_gallery/app.ts
@@ -69,6 +69,11 @@ src: 'cr_checkbox/cr_checkbox_demo.js', }, { + name: 'Chips', + path: 'chips', + src: 'cr_chip/cr_chip_demo.js', + }, + { name: 'Dialogs', path: 'dialogs', src: 'cr_dialog/cr_dialog_demo.js',
diff --git a/chrome/browser/resources/webui_gallery/demos/cr_chip/cr_chip_demo.html b/chrome/browser/resources/webui_gallery/demos/cr_chip/cr_chip_demo.html new file mode 100644 index 0000000..55c2293 --- /dev/null +++ b/chrome/browser/resources/webui_gallery/demos/cr_chip/cr_chip_demo.html
@@ -0,0 +1,30 @@ +<style include="demo"> +</style> + +<h1>cr-chip</h1> +<div class="demos"> + <cr-chip> + <iron-icon icon="cr:print"></iron-icon> + Action + </cr-chip> + + <cr-chip chip-role="link"> + <iron-icon icon="cr:print"></iron-icon> + Action Link + </cr-chip> + + <cr-chip> + <iron-icon icon="cr:add"></iron-icon> + Filter + </cr-chip> + + <cr-chip selected> + <iron-icon icon="cr:check"></iron-icon> + Selected filter + </cr-chip> + + <cr-chip disabled> + <iron-icon icon="cr:clear"></iron-icon> + Disabled filter + </cr-chip> +</div>
diff --git a/chrome/browser/resources/webui_gallery/demos/cr_chip/cr_chip_demo.ts b/chrome/browser/resources/webui_gallery/demos/cr_chip/cr_chip_demo.ts new file mode 100644 index 0000000..2d8cfd6 --- /dev/null +++ b/chrome/browser/resources/webui_gallery/demos/cr_chip/cr_chip_demo.ts
@@ -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. + +import '//resources/cr_elements/cr_chip/cr_chip.js'; +import '//resources/cr_elements/icons.html.js'; +import '//resources/polymer/v3_0/iron-icon/iron-icon.js'; +import '../demo.css.js'; + +import {PolymerElement} from '//resources/polymer/v3_0/polymer/polymer_bundled.min.js'; + +import {getTemplate} from './cr_chip_demo.html.js'; + +class CrChipDemoElement extends PolymerElement { + static get is() { + return 'cr-chip-demo'; + } + + static get template() { + return getTemplate(); + } +} + +export const tagName = CrChipDemoElement.is; + +customElements.define(CrChipDemoElement.is, CrChipDemoElement);
diff --git a/chrome/browser/resources/webui_gallery/demos/cr_icons/cr_icons_demo.ts b/chrome/browser/resources/webui_gallery/demos/cr_icons/cr_icons_demo.ts index 85013322..a140b92 100644 --- a/chrome/browser/resources/webui_gallery/demos/cr_icons/cr_icons_demo.ts +++ b/chrome/browser/resources/webui_gallery/demos/cr_icons/cr_icons_demo.ts
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/resources/webui_gallery/demos/md_select/md_select_demo.ts b/chrome/browser/resources/webui_gallery/demos/md_select/md_select_demo.ts index c7450dd..abe546b 100644 --- a/chrome/browser/resources/webui_gallery/demos/md_select/md_select_demo.ts +++ b/chrome/browser/resources/webui_gallery/demos/md_select/md_select_demo.ts
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/safe_browsing/extension_telemetry/cookies_get_signal.h b/chrome/browser/safe_browsing/extension_telemetry/cookies_get_signal.h index c3c06ba..62a76ba 100644 --- a/chrome/browser/safe_browsing/extension_telemetry/cookies_get_signal.h +++ b/chrome/browser/safe_browsing/extension_telemetry/cookies_get_signal.h
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/safe_browsing/extension_telemetry/password_reuse_signal.cc b/chrome/browser/safe_browsing/extension_telemetry/password_reuse_signal.cc index ffc2cf92..c06c086 100644 --- a/chrome/browser/safe_browsing/extension_telemetry/password_reuse_signal.cc +++ b/chrome/browser/safe_browsing/extension_telemetry/password_reuse_signal.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/safe_browsing/extension_telemetry/password_reuse_signal.h b/chrome/browser/safe_browsing/extension_telemetry/password_reuse_signal.h index 36fc885..28b14e1 100644 --- a/chrome/browser/safe_browsing/extension_telemetry/password_reuse_signal.h +++ b/chrome/browser/safe_browsing/extension_telemetry/password_reuse_signal.h
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/safe_browsing/extension_telemetry/potential_password_theft_signal_processor.cc b/chrome/browser/safe_browsing/extension_telemetry/potential_password_theft_signal_processor.cc index f68dd26c..501d2190a 100644 --- a/chrome/browser/safe_browsing/extension_telemetry/potential_password_theft_signal_processor.cc +++ b/chrome/browser/safe_browsing/extension_telemetry/potential_password_theft_signal_processor.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/safe_browsing/extension_telemetry/potential_password_theft_signal_processor.h b/chrome/browser/safe_browsing/extension_telemetry/potential_password_theft_signal_processor.h index 54367604..befefceb 100644 --- a/chrome/browser/safe_browsing/extension_telemetry/potential_password_theft_signal_processor.h +++ b/chrome/browser/safe_browsing/extension_telemetry/potential_password_theft_signal_processor.h
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/safe_browsing/extension_telemetry/potential_password_theft_signal_processor_unittest.cc b/chrome/browser/safe_browsing/extension_telemetry/potential_password_theft_signal_processor_unittest.cc index c5c5da2..0f48b5e 100644 --- a/chrome/browser/safe_browsing/extension_telemetry/potential_password_theft_signal_processor_unittest.cc +++ b/chrome/browser/safe_browsing/extension_telemetry/potential_password_theft_signal_processor_unittest.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/supervised_user/android/supervised_user_settings_service_bridge.cc b/chrome/browser/supervised_user/android/supervised_user_settings_service_bridge.cc index fc8725c..45992e4 100644 --- a/chrome/browser/supervised_user/android/supervised_user_settings_service_bridge.cc +++ b/chrome/browser/supervised_user/android/supervised_user_settings_service_bridge.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/supervised_user/chromeos/supervised_user_favicon_request_handler.cc b/chrome/browser/supervised_user/chromeos/supervised_user_favicon_request_handler.cc index 8e8d5642..3540423 100644 --- a/chrome/browser/supervised_user/chromeos/supervised_user_favicon_request_handler.cc +++ b/chrome/browser/supervised_user/chromeos/supervised_user_favicon_request_handler.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/supervised_user/chromeos/supervised_user_favicon_request_handler.h b/chrome/browser/supervised_user/chromeos/supervised_user_favicon_request_handler.h index 024a49c..606f407 100644 --- a/chrome/browser/supervised_user/chromeos/supervised_user_favicon_request_handler.h +++ b/chrome/browser/supervised_user/chromeos/supervised_user_favicon_request_handler.h
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/supervised_user/chromeos/supervised_user_favicon_request_handler_unittest.cc b/chrome/browser/supervised_user/chromeos/supervised_user_favicon_request_handler_unittest.cc index 52a9dcb..8b326f7 100644 --- a/chrome/browser/supervised_user/chromeos/supervised_user_favicon_request_handler_unittest.cc +++ b/chrome/browser/supervised_user/chromeos/supervised_user_favicon_request_handler_unittest.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/support_tool/policy_data_collector.cc b/chrome/browser/support_tool/policy_data_collector.cc index 36e6fbf1..e052195 100644 --- a/chrome/browser/support_tool/policy_data_collector.cc +++ b/chrome/browser/support_tool/policy_data_collector.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/support_tool/policy_data_collector.h b/chrome/browser/support_tool/policy_data_collector.h index d0b2012f..76f6a84 100644 --- a/chrome/browser/support_tool/policy_data_collector.h +++ b/chrome/browser/support_tool/policy_data_collector.h
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn index 2159569..f4b818f6 100644 --- a/chrome/browser/ui/BUILD.gn +++ b/chrome/browser/ui/BUILD.gn
@@ -3131,6 +3131,7 @@ "webui/ash/sensor_info/sensor_info_ui.h", "webui/ash/set_time_ui.cc", "webui/ash/set_time_ui.h", + "webui/ash/settings/app_management/app_management_uma.h", "webui/ash/settings/search/search_concept.h", "webui/ash/settings/search/search_handler.cc", "webui/ash/settings/search/search_handler.h", @@ -3208,7 +3209,6 @@ "webui/settings/ash/account_manager_ui_handler.h", "webui/settings/ash/android_apps_handler.cc", "webui/settings/ash/android_apps_handler.h", - "webui/settings/ash/app_management/app_management_uma.h", "webui/settings/ash/apps_section.cc", "webui/settings/ash/apps_section.h", "webui/settings/ash/bluetooth_handler.cc",
diff --git a/chrome/browser/ui/android/infobars/permission_infobar.h b/chrome/browser/ui/android/infobars/permission_infobar.h index 90cad8bd..4152b10 100644 --- a/chrome/browser/ui/android/infobars/permission_infobar.h +++ b/chrome/browser/ui/android/infobars/permission_infobar.h
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/DropdownItemViewInfoListBuilder.java b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/DropdownItemViewInfoListBuilder.java index c50fd0ba..9aa6361 100644 --- a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/DropdownItemViewInfoListBuilder.java +++ b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/DropdownItemViewInfoListBuilder.java
@@ -208,26 +208,17 @@ } /** - * Build ListModel for new set of Omnibox suggestions. + * Adaptive Suggestions logic: perform partial grouping by Search vs URL on the + * AutocompleteResult. * - * @param autocompleteResult New set of suggestions. - * @return List of DropdownItemViewInfo representing the corresponding content of the - * suggestions list. + * @param autocompleteResult the result to apply adaptive suggestions to */ - @NonNull - List<DropdownItemViewInfo> buildDropdownViewInfoList(AutocompleteResult autocompleteResult) { - mHeaderProcessor.onSuggestionsReceived(); - for (int index = 0; index < mPriorityOrderedSuggestionProcessors.size(); index++) { - mPriorityOrderedSuggestionProcessors.get(index).onSuggestionsReceived(); - } - - final int suggestionsCount = autocompleteResult.getSuggestionsList().size(); - var groupConfigs = autocompleteResult.getGroupsInfo().getGroupConfigsMap(); - + @VisibleForTesting + void performPartialGroupingBySearchVsUrl(AutocompleteResult autocompleteResult) { // When Adaptive Suggestions are set, perform partial grouping by search vs url. // Take action only if we have more suggestions to offer than just a default match and // one suggestion (otherwise no need to perform grouping). - if (suggestionsCount > 2) { + if (autocompleteResult.getSuggestionsList().size() > 2) { final int firstSuggestionWithHeader = getIndexOfFirstSuggestionWithHeader(autocompleteResult); final int numVisibleSuggestions = getVisibleSuggestionsCount(autocompleteResult); @@ -243,6 +234,25 @@ numVisibleSuggestions, firstSuggestionWithHeader); } } + } + + /** + * Build ListModel for new set of Omnibox suggestions. + * + * @param autocompleteResult New set of suggestions. + * @return List of DropdownItemViewInfo representing the corresponding content of the + * suggestions list. + */ + @NonNull + List<DropdownItemViewInfo> buildDropdownViewInfoList(AutocompleteResult autocompleteResult) { + mHeaderProcessor.onSuggestionsReceived(); + for (int index = 0; index < mPriorityOrderedSuggestionProcessors.size(); index++) { + mPriorityOrderedSuggestionProcessors.get(index).onSuggestionsReceived(); + } + + performPartialGroupingBySearchVsUrl(autocompleteResult); + + var groupConfigs = autocompleteResult.getGroupsInfo().getGroupConfigsMap(); final List<AutocompleteMatch> newSuggestions = autocompleteResult.getSuggestionsList(); final int newSuggestionsCount = newSuggestions.size();
diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/DropdownItemViewInfoListBuilderUnitTest.java b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/DropdownItemViewInfoListBuilderUnitTest.java index 28c1c3a..2b70fd6 100644 --- a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/DropdownItemViewInfoListBuilderUnitTest.java +++ b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/DropdownItemViewInfoListBuilderUnitTest.java
@@ -7,6 +7,7 @@ import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyInt; import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.atLeastOnce; import static org.mockito.Mockito.clearInvocations; import static org.mockito.Mockito.doNothing; import static org.mockito.Mockito.inOrder; @@ -20,8 +21,6 @@ import static org.chromium.components.omnibox.GroupConfigTestSupport.SECTION_2_WITH_HEADER; import static org.chromium.components.omnibox.GroupConfigTestSupport.SECTION_3_WITH_HEADER; -import androidx.test.filters.SmallTest; - import org.junit.Assert; import org.junit.Before; import org.junit.Rule; @@ -101,7 +100,6 @@ } @Test - @SmallTest public void headers_buildsHeaderForFirstSuggestion() { final List<AutocompleteMatch> actualList = new ArrayList<>(); final var groupsDetails = @@ -140,7 +138,6 @@ } @Test - @SmallTest public void headers_buildsHeadersOnlyWhenGroupChanges() { final List<AutocompleteMatch> actualList = new ArrayList<>(); final var groupsDetails = GroupsInfo.newBuilder() @@ -206,7 +203,6 @@ } @Test - @SmallTest public void headers_respectGroupHeadersWithNoTitle() { final List<AutocompleteMatch> actualList = new ArrayList<>(); final var groupsDetails = GroupsInfo.newBuilder() @@ -272,7 +268,6 @@ } @Test - @SmallTest public void builder_propagatesFocusChangeEvents() { mBuilder.onUrlFocusChange(true); verify(mMockHeaderProcessor, times(1)).onUrlFocusChange(eq(true)); @@ -287,7 +282,6 @@ } @Test - @SmallTest public void builder_propagatesNativeInitializedEvent() { mBuilder.onNativeInitialized(); verify(mMockHeaderProcessor, times(1)).onNativeInitialized(); @@ -298,7 +292,6 @@ } @Test - @SmallTest public void visibleSuggestions_missingDropdownHeightAssumesDefaultGroupSize() { final AutocompleteMatchBuilder builder = AutocompleteMatchBuilder.searchWithType(OmniboxSuggestionType.SEARCH_SUGGEST); @@ -319,7 +312,6 @@ } @Test - @SmallTest public void visibleSuggestions_computeNumberOfVisibleSuggestionsFromDropdownHeight() { when(mMockSuggestionProcessor.doesProcessSuggestion(any(AutocompleteMatch.class), anyInt())) .thenReturn(true); @@ -343,7 +335,6 @@ } @Test - @SmallTest public void visibleSuggestions_partiallyVisibleSuggestionsAreCountedAsVisible() { final AutocompleteMatchBuilder builder = AutocompleteMatchBuilder.searchWithType(OmniboxSuggestionType.SEARCH_SUGGEST); @@ -368,7 +359,6 @@ } @Test - @SmallTest public void visibleSuggestions_queriesCorrespondingProcessorsToDetermineViewAllocation() { final SuggestionProcessor mockProcessor1 = mock(SuggestionProcessor.class); final SuggestionProcessor mockProcessor2 = mock(SuggestionProcessor.class); @@ -413,8 +403,70 @@ } @Test - @SmallTest - public void partialGrouping_matchesWithHeaderAreNotPromotedAboveURLs() { + public void performPartialGroupingBySearchVsUrl_noActionWithNoMatches() { + AutocompleteResult mockResult = mock(AutocompleteResult.class); + when(mockResult.getSuggestionsList()).thenReturn(Arrays.asList()); + mBuilder.performPartialGroupingBySearchVsUrl(mockResult); + verify(mockResult).getSuggestionsList(); + verifyNoMoreInteractions(mockResult); + } + + @Test + public void performPartialGroupingBySearchVsUrl_noActionWithTooFewMatches() { + // Adaptive Suggestions needs a Default match (always first, cannot be moved) and + // at least two more that need to be grouped or rearranged. + final AutocompleteMatch match = + AutocompleteMatchBuilder.searchWithType(OmniboxSuggestionType.SEARCH_SUGGEST) + .build(); + AutocompleteResult mockResult = mock(AutocompleteResult.class); + when(mockResult.getSuggestionsList()).thenReturn(Arrays.asList(match, match)); + mBuilder.performPartialGroupingBySearchVsUrl(mockResult); + verify(mockResult).getSuggestionsList(); + verifyNoMoreInteractions(mockResult); + } + + @Test + public void performPartialGroupingBySearchVsUrl_groupSuggestionsAboveFold() { + // Adaptive Suggestions needs a Default match (always first, cannot be moved) and + // at least two more that need to be grouped or rearranged. + when(mMockSuggestionProcessor.doesProcessSuggestion(any(), anyInt())).thenReturn(true); + when(mMockSuggestionProcessor.getMinimumViewHeight()).thenReturn(10); + mBuilder.setDropdownHeightWithKeyboardActive(50); + + final AutocompleteMatch search = + AutocompleteMatchBuilder.searchWithType(OmniboxSuggestionType.SEARCH_SUGGEST) + .build(); + AutocompleteResult mockResult = mock(AutocompleteResult.class); + when(mockResult.getSuggestionsList()).thenReturn(Arrays.asList(search, search, search)); + mBuilder.performPartialGroupingBySearchVsUrl(mockResult); + verify(mockResult, atLeastOnce()).getSuggestionsList(); + verify(mockResult).groupSuggestionsBySearchVsURL(1, 3); + verifyNoMoreInteractions(mockResult); + } + + @Test + public void performPartialGroupingBySearchVsUrl_groupSuggestionsAboveAndBelowFold() { + // Adaptive Suggestions needs a Default match (always first, cannot be moved) and + // at least two more that need to be grouped or rearranged. + when(mMockSuggestionProcessor.doesProcessSuggestion(any(), anyInt())).thenReturn(true); + when(mMockSuggestionProcessor.getMinimumViewHeight()).thenReturn(10); + mBuilder.setDropdownHeightWithKeyboardActive(30); + + final AutocompleteMatch search = + AutocompleteMatchBuilder.searchWithType(OmniboxSuggestionType.SEARCH_SUGGEST) + .build(); + AutocompleteResult mockResult = mock(AutocompleteResult.class); + when(mockResult.getSuggestionsList()) + .thenReturn(Arrays.asList(search, search, search, search, search)); + mBuilder.performPartialGroupingBySearchVsUrl(mockResult); + verify(mockResult, atLeastOnce()).getSuggestionsList(); + verify(mockResult).groupSuggestionsBySearchVsURL(1, 3); + verify(mockResult).groupSuggestionsBySearchVsURL(3, 5); + verifyNoMoreInteractions(mockResult); + } + + @Test + public void performPartialGroupingBySearchVsUrl_matchesWithHeaderAreNotPromotedAboveURLs() { final SuggestionProcessor mockProcessor = mock(SuggestionProcessor.class); mBuilder.registerSuggestionProcessor(mockProcessor); final AutocompleteMatch match1 = @@ -472,7 +524,6 @@ } @Test - @SmallTest public void dividerLineOnTop() { when(mMockDividerLineProcessor.createModel()) .thenAnswer((mock) -> new PropertyModel(SuggestionCommonProperties.ALL_KEYS)); @@ -506,7 +557,6 @@ } @Test - @SmallTest public void noDividerLineForEmptyList() { when(mMockDividerLineProcessor.createModel()) .thenAnswer((mock) -> new PropertyModel(SuggestionCommonProperties.ALL_KEYS)); @@ -522,7 +572,6 @@ } @Test - @SmallTest public void visibleSuggestions_updatedVisibleGroupEligibilityLogic() { final SuggestionProcessor mockProcessor = mock(SuggestionProcessor.class); mBuilder.registerSuggestionProcessor(mockProcessor);
diff --git a/chrome/browser/ui/ash/network/network_portal_signin_controller.cc b/chrome/browser/ui/ash/network/network_portal_signin_controller.cc index 77642b7f..62d8d9f2 100644 --- a/chrome/browser/ui/ash/network/network_portal_signin_controller.cc +++ b/chrome/browser/ui/ash/network/network_portal_signin_controller.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ui/ash/network/network_portal_signin_controller.h b/chrome/browser/ui/ash/network/network_portal_signin_controller.h index 286f8ff3..f710f316 100644 --- a/chrome/browser/ui/ash/network/network_portal_signin_controller.h +++ b/chrome/browser/ui/ash/network/network_portal_signin_controller.h
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ui/ash/network/network_portal_signin_controller_unittest.cc b/chrome/browser/ui/ash/network/network_portal_signin_controller_unittest.cc index 0766f35c..05ca46a8c 100644 --- a/chrome/browser/ui/ash/network/network_portal_signin_controller_unittest.cc +++ b/chrome/browser/ui/ash/network/network_portal_signin_controller_unittest.cc
@@ -1,4 +1,4 @@ -// Copyright 2014 The Chromium Authors. All rights reserved. +// Copyright 2014 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ui/ash/shelf/app_service/app_service_shelf_context_menu.cc b/chrome/browser/ui/ash/shelf/app_service/app_service_shelf_context_menu.cc index d54f556c..fbd87ac 100644 --- a/chrome/browser/ui/ash/shelf/app_service/app_service_shelf_context_menu.cc +++ b/chrome/browser/ui/ash/shelf/app_service/app_service_shelf_context_menu.cc
@@ -37,7 +37,7 @@ #include "chrome/browser/ui/ash/shelf/chrome_shelf_controller_util.h" #include "chrome/browser/ui/chrome_pages.h" #include "chrome/browser/ui/views/crostini/crostini_app_restart_dialog.h" -#include "chrome/browser/ui/webui/settings/ash/app_management/app_management_uma.h" +#include "chrome/browser/ui/webui/ash/settings/app_management/app_management_uma.h" #include "chrome/grit/generated_resources.h" #include "components/app_constants/constants.h" #include "components/services/app_service/public/cpp/app_types.h"
diff --git a/chrome/browser/ui/ash/shelf/chrome_shelf_controller.cc b/chrome/browser/ui/ash/shelf/chrome_shelf_controller.cc index 7404a65a..905acac 100644 --- a/chrome/browser/ui/ash/shelf/chrome_shelf_controller.cc +++ b/chrome/browser/ui/ash/shelf/chrome_shelf_controller.cc
@@ -90,7 +90,7 @@ #include "chrome/browser/ui/settings_window_manager_chromeos.h" #include "chrome/browser/ui/tabs/tab_enums.h" #include "chrome/browser/ui/tabs/tab_strip_model.h" -#include "chrome/browser/ui/webui/settings/ash/app_management/app_management_uma.h" +#include "chrome/browser/ui/webui/ash/settings/app_management/app_management_uma.h" #include "chrome/browser/web_applications/web_app_helpers.h" #include "chrome/browser/web_applications/web_app_utils.h" #include "chrome/common/chrome_features.h"
diff --git a/chrome/browser/ui/ash/shelf/standalone_browser_extension_app_context_menu.cc b/chrome/browser/ui/ash/shelf/standalone_browser_extension_app_context_menu.cc index 1d239264..683df11 100644 --- a/chrome/browser/ui/ash/shelf/standalone_browser_extension_app_context_menu.cc +++ b/chrome/browser/ui/ash/shelf/standalone_browser_extension_app_context_menu.cc
@@ -22,7 +22,7 @@ #include "chrome/browser/ui/ash/shelf/chrome_shelf_prefs.h" #include "chrome/browser/ui/ash/shelf/standalone_browser_extension_app_shelf_item_controller.h" #include "chrome/browser/ui/chrome_pages.h" -#include "chrome/browser/ui/webui/settings/ash/app_management/app_management_uma.h" +#include "chrome/browser/ui/webui/ash/settings/app_management/app_management_uma.h" #include "chrome/grit/generated_resources.h" #include "components/services/app_service/public/cpp/app_types.h" #include "ui/base/models/image_model.h"
diff --git a/chrome/browser/ui/autofill/save_update_address_profile_bubble_controller_impl.cc b/chrome/browser/ui/autofill/save_update_address_profile_bubble_controller_impl.cc index cd77ecc..b6d770df 100644 --- a/chrome/browser/ui/autofill/save_update_address_profile_bubble_controller_impl.cc +++ b/chrome/browser/ui/autofill/save_update_address_profile_bubble_controller_impl.cc
@@ -215,7 +215,7 @@ GetPrimaryAccountInfoFromBrowserContext( web_contents()->GetBrowserContext()); - int string_id = pdm->IsSyncEnabledFor(syncer::UserSelectableType::kAutofill) + int string_id = pdm->IsSyncFeatureEnabledForAutofill() ? IDS_AUTOFILL_SYNCABLE_PROFILE_MIGRATION_PROMPT_NOTICE : IDS_AUTOFILL_LOCAL_PROFILE_MIGRATION_PROMPT_NOTICE;
diff --git a/chrome/browser/ui/chrome_pages.h b/chrome/browser/ui/chrome_pages.h index 1ca3199fae..c307407 100644 --- a/chrome/browser/ui/chrome_pages.h +++ b/chrome/browser/ui/chrome_pages.h
@@ -22,7 +22,7 @@ #endif #if BUILDFLAG(IS_CHROMEOS_ASH) -#include "chrome/browser/ui/webui/settings/ash/app_management/app_management_uma.h" +#include "chrome/browser/ui/webui/ash/settings/app_management/app_management_uma.h" #endif namespace apps {
diff --git a/chrome/browser/ui/commerce/price_tracking/mock_shopping_list_ui_tab_helper.cc b/chrome/browser/ui/commerce/price_tracking/mock_shopping_list_ui_tab_helper.cc index c64f44ae..59d347b 100644 --- a/chrome/browser/ui/commerce/price_tracking/mock_shopping_list_ui_tab_helper.cc +++ b/chrome/browser/ui/commerce/price_tracking/mock_shopping_list_ui_tab_helper.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ui/commerce/price_tracking/shopping_list_ui_tab_helper.cc b/chrome/browser/ui/commerce/price_tracking/shopping_list_ui_tab_helper.cc index b3cc715..4e66f9a 100644 --- a/chrome/browser/ui/commerce/price_tracking/shopping_list_ui_tab_helper.cc +++ b/chrome/browser/ui/commerce/price_tracking/shopping_list_ui_tab_helper.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ui/commerce/price_tracking/shopping_list_ui_tab_helper.h b/chrome/browser/ui/commerce/price_tracking/shopping_list_ui_tab_helper.h index 02afee6..15c8c35 100644 --- a/chrome/browser/ui/commerce/price_tracking/shopping_list_ui_tab_helper.h +++ b/chrome/browser/ui/commerce/price_tracking/shopping_list_ui_tab_helper.h
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ui/extensions/extensions_overrides/simple_overrides.cc b/chrome/browser/ui/extensions/extensions_overrides/simple_overrides.cc index cce8868..c04d588 100644 --- a/chrome/browser/ui/extensions/extensions_overrides/simple_overrides.cc +++ b/chrome/browser/ui/extensions/extensions_overrides/simple_overrides.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ui/extensions/extensions_overrides/simple_overrides.h b/chrome/browser/ui/extensions/extensions_overrides/simple_overrides.h index ebb2286..710cc54 100644 --- a/chrome/browser/ui/extensions/extensions_overrides/simple_overrides.h +++ b/chrome/browser/ui/extensions/extensions_overrides/simple_overrides.h
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ui/extensions/extensions_overrides/simple_overrides_unittest.cc b/chrome/browser/ui/extensions/extensions_overrides/simple_overrides_unittest.cc index 2d2c589..f21c973f 100644 --- a/chrome/browser/ui/extensions/extensions_overrides/simple_overrides_unittest.cc +++ b/chrome/browser/ui/extensions/extensions_overrides/simple_overrides_unittest.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ui/page_info/chrome_page_info_delegate.cc b/chrome/browser/ui/page_info/chrome_page_info_delegate.cc index 6bfdf18..6e43f64 100644 --- a/chrome/browser/ui/page_info/chrome_page_info_delegate.cc +++ b/chrome/browser/ui/page_info/chrome_page_info_delegate.cc
@@ -46,7 +46,7 @@ #include "url/origin.h" #if BUILDFLAG(IS_CHROMEOS_ASH) -#include "chrome/browser/ui/webui/settings/ash/app_management/app_management_uma.h" +#include "chrome/browser/ui/webui/ash/settings/app_management/app_management_uma.h" #endif #if !BUILDFLAG(IS_ANDROID)
diff --git a/chrome/browser/ui/passwords/bubble_controllers/biometric_authentication_for_filling_bubble_controller.cc b/chrome/browser/ui/passwords/bubble_controllers/biometric_authentication_for_filling_bubble_controller.cc index e7bc757..2c7072fe9 100644 --- a/chrome/browser/ui/passwords/bubble_controllers/biometric_authentication_for_filling_bubble_controller.cc +++ b/chrome/browser/ui/passwords/bubble_controllers/biometric_authentication_for_filling_bubble_controller.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ui/passwords/bubble_controllers/biometric_authentication_for_filling_bubble_controller.h b/chrome/browser/ui/passwords/bubble_controllers/biometric_authentication_for_filling_bubble_controller.h index e8fc652..ec3d4109 100644 --- a/chrome/browser/ui/passwords/bubble_controllers/biometric_authentication_for_filling_bubble_controller.h +++ b/chrome/browser/ui/passwords/bubble_controllers/biometric_authentication_for_filling_bubble_controller.h
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ui/passwords/settings/password_manager_porter_unittest.cc b/chrome/browser/ui/passwords/settings/password_manager_porter_unittest.cc index daac68a..4686164 100644 --- a/chrome/browser/ui/passwords/settings/password_manager_porter_unittest.cc +++ b/chrome/browser/ui/passwords/settings/password_manager_porter_unittest.cc
@@ -78,7 +78,7 @@ bool IsRunning(gfx::NativeWindow owning_window) const override { return false; } - void ListenerDestroyed() override {} + void ListenerDestroyed() override { listener_ = nullptr; } bool HasMultipleFileTypeChoicesImpl() override { return false; } private: @@ -143,7 +143,7 @@ bool IsRunning(gfx::NativeWindow owning_window) const override { return false; } - void ListenerDestroyed() override {} + void ListenerDestroyed() override { listener_ = nullptr; } bool HasMultipleFileTypeChoicesImpl() override { return false; } private:
diff --git a/chrome/browser/ui/performance_controls/high_efficiency_bubble_delegate.cc b/chrome/browser/ui/performance_controls/high_efficiency_bubble_delegate.cc index 514ac0c..5050f29 100644 --- a/chrome/browser/ui/performance_controls/high_efficiency_bubble_delegate.cc +++ b/chrome/browser/ui/performance_controls/high_efficiency_bubble_delegate.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ui/performance_controls/high_efficiency_bubble_delegate.h b/chrome/browser/ui/performance_controls/high_efficiency_bubble_delegate.h index 1014c1faf4..f719127 100644 --- a/chrome/browser/ui/performance_controls/high_efficiency_bubble_delegate.h +++ b/chrome/browser/ui/performance_controls/high_efficiency_bubble_delegate.h
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ui/performance_controls/high_efficiency_bubble_observer.h b/chrome/browser/ui/performance_controls/high_efficiency_bubble_observer.h index 31259a9..be32284 100644 --- a/chrome/browser/ui/performance_controls/high_efficiency_bubble_observer.h +++ b/chrome/browser/ui/performance_controls/high_efficiency_bubble_observer.h
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ui/tabs/saved_tab_groups/local_tab_group_listener.cc b/chrome/browser/ui/tabs/saved_tab_groups/local_tab_group_listener.cc index 5638f07..db088cb 100644 --- a/chrome/browser/ui/tabs/saved_tab_groups/local_tab_group_listener.cc +++ b/chrome/browser/ui/tabs/saved_tab_groups/local_tab_group_listener.cc
@@ -80,6 +80,19 @@ } } +void LocalTabGroupListener::OnReplaceWebContents( + content::WebContents* old_web_contents, + content::WebContents* new_web_contents) { + CHECK(web_contents_to_tab_id_map_.find(old_web_contents) != + web_contents_to_tab_id_map_.end()); + base::Token local_tab_id = + web_contents_to_tab_id_map_.at(old_web_contents).token(); + web_contents_to_tab_id_map_.erase(old_web_contents); + + web_contents_to_tab_id_map_.try_emplace(new_web_contents, new_web_contents, + local_tab_id, model_); +} + void LocalTabGroupListener::AddWebContentsFromLocal( content::WebContents* web_contents, TabStripModel* tab_strip_model,
diff --git a/chrome/browser/ui/tabs/saved_tab_groups/local_tab_group_listener.h b/chrome/browser/ui/tabs/saved_tab_groups/local_tab_group_listener.h index 6a2c6a22..6ebda06 100644 --- a/chrome/browser/ui/tabs/saved_tab_groups/local_tab_group_listener.h +++ b/chrome/browser/ui/tabs/saved_tab_groups/local_tab_group_listener.h
@@ -48,6 +48,10 @@ TabStripModel* tab_strip_model, int index); + // Replaces the webcontents associated with the SavedTabGroupTab. + void OnReplaceWebContents(content::WebContents* old_web_contents, + content::WebContents* new_web_contents); + // Moves the SavedTab associated with `web_contents` in the TabStripModel to // its new relative position in the SavedTabGroup. void MoveWebContentsFromLocal(TabStripModel* tab_strip_model,
diff --git a/chrome/browser/ui/tabs/saved_tab_groups/saved_tab_group_keyed_service_unittest.cc b/chrome/browser/ui/tabs/saved_tab_groups/saved_tab_group_keyed_service_unittest.cc index 78e9195ca..06287543 100644 --- a/chrome/browser/ui/tabs/saved_tab_groups/saved_tab_group_keyed_service_unittest.cc +++ b/chrome/browser/ui/tabs/saved_tab_groups/saved_tab_group_keyed_service_unittest.cc
@@ -56,6 +56,7 @@ return web_contents_ptr; } + TestingProfile* profile() { return profile_.get(); } SavedTabGroupKeyedService* service() { return service_.get(); } private: @@ -727,3 +728,42 @@ // TODO Fill out this test once swap tabs from sync is implemented } + +TEST_F(SavedTabGroupKeyedServiceUnitTest, + DiscardingATabDoesntCrashWhenReordering) { + Browser* const browser = AddBrowser(); + TabStripModel* const tabstrip = browser->tab_strip_model(); + + // Create a saved tab group with two tabs. + content::WebContents* web_contents_0 = AddTabToBrowser(browser, 0); + content::WebContents* web_contents_1 = AddTabToBrowser(browser, 1); + const tab_groups::TabGroupId group_id = tabstrip->AddToNewGroup({0, 1}); + service()->SaveGroup(group_id); + + const SavedTabGroup* group = service()->model()->Get(group_id); + + std::unordered_map<content::WebContents*, SavedTabGroupWebContentsListener>& + web_contents_listener_map = service() + ->listener() + ->GetLocalTabGroupListenerMapForTesting() + .at(group_id) + .GetWebContentsTokenMapForTesting(); + base::Token web_contents_0_token = + web_contents_listener_map.at(web_contents_0).token(); + base::Token web_contents_1_token = + web_contents_listener_map.at(web_contents_1).token(); + + std::unique_ptr<content::WebContents> replacement_web_contents = + content::WebContentsTester::CreateTestWebContents(profile(), nullptr); + browser->tab_strip_model()->ReplaceWebContentsAt( + 0, std::move(replacement_web_contents)); + + // Expect after moving the first tab to the right of the second, that the + // group updated the positions of the tabs accordingly. + browser->tab_strip_model()->MoveWebContentsAt(0, 1, false); + + EXPECT_EQ(web_contents_1_token, + group->saved_tabs()[0].local_tab_id().value()); + EXPECT_EQ(web_contents_0_token, + group->saved_tabs()[1].local_tab_id().value()); +}
diff --git a/chrome/browser/ui/tabs/saved_tab_groups/saved_tab_group_model_listener.cc b/chrome/browser/ui/tabs/saved_tab_groups/saved_tab_group_model_listener.cc index 459f5cc8..8aa55e4 100644 --- a/chrome/browser/ui/tabs/saved_tab_groups/saved_tab_group_model_listener.cc +++ b/chrome/browser/ui/tabs/saved_tab_groups/saved_tab_group_model_listener.cc
@@ -109,28 +109,57 @@ TabStripModel* tab_strip_model, const TabStripModelChange& change, const TabStripSelectionChange& selection) { - if (change.type() != TabStripModelChange::kMoved) { - return; + switch (change.type()) { + case TabStripModelChange::kReplaced: { + absl::optional<tab_groups::TabGroupId> local_id = + tab_strip_model->GetTabGroupForTab(change.GetReplace()->index); + + // Do nothing if the tab is no longer in a group. + if (!local_id.has_value()) { + return; + } + + // Do nothing if the tab is not part of a saved group. + if (!local_tab_group_listeners_.contains(local_id.value())) { + return; + } + + LocalTabGroupListener& local_tab_group_listener = + local_tab_group_listeners_.at(local_id.value()); + + local_tab_group_listener.OnReplaceWebContents( + change.GetReplace()->old_contents, change.GetReplace()->new_contents); + return; + } + case TabStripModelChange::kMoved: { + absl::optional<tab_groups::TabGroupId> local_id = + tab_strip_model->GetTabGroupForTab(change.GetMove()->to_index); + + // Do nothing if the tab is no longer in a group. + if (!local_id.has_value()) { + return; + } + + // Do nothing if the tab is not part of a saved group. + if (!local_tab_group_listeners_.contains(local_id.value())) { + return; + } + + LocalTabGroupListener& local_tab_group_listener = + local_tab_group_listeners_.at(local_id.value()); + + local_tab_group_listener.MoveWebContentsFromLocal( + tab_strip_model, change.GetMove()->contents, + change.GetMove()->to_index); + + return; + } + case TabStripModelChange::kSelectionOnly: + case TabStripModelChange::kInserted: + case TabStripModelChange::kRemoved: { + return; + } } - - absl::optional<tab_groups::TabGroupId> local_id = - tab_strip_model->GetTabGroupForTab(change.GetMove()->to_index); - - // Do nothing if the tab is no longer in a group. - if (!local_id.has_value()) { - return; - } - - // Do nothing if the tab is not part of a saved group. - if (!local_tab_group_listeners_.contains(local_id.value())) { - return; - } - - LocalTabGroupListener& local_tab_group_listener = - local_tab_group_listeners_.at(local_id.value()); - - local_tab_group_listener.MoveWebContentsFromLocal( - tab_strip_model, change.GetMove()->contents, change.GetMove()->to_index); } void SavedTabGroupModelListener::WillCloseAllTabs(
diff --git a/chrome/browser/ui/views/chrome_widget_sublevel.h b/chrome/browser/ui/views/chrome_widget_sublevel.h index bbb7748..78b055a 100644 --- a/chrome/browser/ui/views/chrome_widget_sublevel.h +++ b/chrome/browser/ui/views/chrome_widget_sublevel.h
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ui/views/commerce/price_tracking_bubble_dialog_view.cc b/chrome/browser/ui/views/commerce/price_tracking_bubble_dialog_view.cc index 08bd4aa1..d071065 100644 --- a/chrome/browser/ui/views/commerce/price_tracking_bubble_dialog_view.cc +++ b/chrome/browser/ui/views/commerce/price_tracking_bubble_dialog_view.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ui/views/commerce/price_tracking_bubble_dialog_view.h b/chrome/browser/ui/views/commerce/price_tracking_bubble_dialog_view.h index e4899b1..fbc3874 100644 --- a/chrome/browser/ui/views/commerce/price_tracking_bubble_dialog_view.h +++ b/chrome/browser/ui/views/commerce/price_tracking_bubble_dialog_view.h
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ui/views/commerce/price_tracking_icon_view.cc b/chrome/browser/ui/views/commerce/price_tracking_icon_view.cc index 007e473..a84d562 100644 --- a/chrome/browser/ui/views/commerce/price_tracking_icon_view.cc +++ b/chrome/browser/ui/views/commerce/price_tracking_icon_view.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ui/views/commerce/price_tracking_icon_view.h b/chrome/browser/ui/views/commerce/price_tracking_icon_view.h index ac0f9d8..7b644a3 100644 --- a/chrome/browser/ui/views/commerce/price_tracking_icon_view.h +++ b/chrome/browser/ui/views/commerce/price_tracking_icon_view.h
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ui/views/commerce/price_tracking_icon_view_browsertest.cc b/chrome/browser/ui/views/commerce/price_tracking_icon_view_browsertest.cc index c0ce7634..5492502 100644 --- a/chrome/browser/ui/views/commerce/price_tracking_icon_view_browsertest.cc +++ b/chrome/browser/ui/views/commerce/price_tracking_icon_view_browsertest.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -26,7 +26,8 @@ class PriceTrackingIconViewBrowserTest : public UiBrowserTest { public: PriceTrackingIconViewBrowserTest() { - test_features_.InitAndEnableFeature(commerce::kShoppingList); + test_features_.InitWithFeatures({commerce::kShoppingList}, + {commerce::kPriceInsights}); } // UiBrowserTest:
diff --git a/chrome/browser/ui/views/commerce/price_tracking_icon_view_integration_test.cc b/chrome/browser/ui/views/commerce/price_tracking_icon_view_integration_test.cc index d11d5a2..baef164a 100644 --- a/chrome/browser/ui/views/commerce/price_tracking_icon_view_integration_test.cc +++ b/chrome/browser/ui/views/commerce/price_tracking_icon_view_integration_test.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ui/views/commerce/price_tracking_icon_view_interactive_uitest.cc b/chrome/browser/ui/views/commerce/price_tracking_icon_view_interactive_uitest.cc index 928e92fc..98daf01 100644 --- a/chrome/browser/ui/views/commerce/price_tracking_icon_view_interactive_uitest.cc +++ b/chrome/browser/ui/views/commerce/price_tracking_icon_view_interactive_uitest.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -62,7 +62,7 @@ test_features_.InitAndEnableFeatures( {commerce::kShoppingList, feature_engagement::kIPHPriceTrackingInSidePanelFeature}, - {}); + {commerce::kPriceInsights}); } PriceTrackingIconViewInteractiveTest( @@ -424,7 +424,7 @@ test_features_.InitWithFeaturesAndParameters( {{commerce::kShoppingList, {{commerce::kRevertIconOnFailureParam, "true"}}}}, - {}); + {commerce::kPriceInsights}); } private: @@ -488,7 +488,8 @@ PriceTrackingIconViewEngagementTest() { test_features_.InitAndEnableFeatures( {commerce::kShoppingList, - feature_engagement::kIPHPriceTrackingPageActionIconLabelFeature}); + feature_engagement::kIPHPriceTrackingPageActionIconLabelFeature}, + {commerce::kPriceInsights}); } void SetUpOnMainThread() override { @@ -875,7 +876,8 @@ PriceTrackingIconViewUnifiedSidePanelInteractiveTest() { test_features_.InitAndEnableFeatures( {commerce::kShoppingList, - feature_engagement::kIPHPriceTrackingInSidePanelFeature}); + feature_engagement::kIPHPriceTrackingInSidePanelFeature}, + {commerce::kPriceInsights}); } private:
diff --git a/chrome/browser/ui/views/editor_menu/editor_menu_chip_view.cc b/chrome/browser/ui/views/editor_menu/editor_menu_chip_view.cc index 4f10ee2..55d695f4 100644 --- a/chrome/browser/ui/views/editor_menu/editor_menu_chip_view.cc +++ b/chrome/browser/ui/views/editor_menu/editor_menu_chip_view.cc
@@ -8,9 +8,11 @@ #include "ui/chromeos/styles/cros_tokens_color_mappings.h" #include "ui/gfx/geometry/size.h" #include "ui/gfx/paint_vector_icon.h" +#include "ui/views/animation/ink_drop.h" #include "ui/views/border.h" #include "ui/views/controls/button/button.h" #include "ui/views/controls/button/label_button.h" +#include "ui/views/controls/highlight_path_generator.h" namespace chromeos::editor_menu { @@ -30,6 +32,13 @@ : views::LabelButton(std::move(callback), text), icon_(icon) { CHECK(icon_); + views::InkDrop::Get(this)->SetMode(views::InkDropHost::InkDropMode::ON); + views::InkDrop::Get(this)->SetBaseColorId(ui::kColorIcon); + SetHasInkDropActionOnClick(true); + views::HighlightPathGenerator::Install( + this, std::make_unique<views::RoundRectHighlightPathGenerator>( + gfx::Insets(), kRadiusDip)); + SetTooltipText(text); SetImageLabelSpacing(kImageLabelSpacingDip); }
diff --git a/chrome/browser/ui/views/editor_menu/editor_menu_textfield_view.cc b/chrome/browser/ui/views/editor_menu/editor_menu_textfield_view.cc index 2a58637a..2982197 100644 --- a/chrome/browser/ui/views/editor_menu/editor_menu_textfield_view.cc +++ b/chrome/browser/ui/views/editor_menu/editor_menu_textfield_view.cc
@@ -17,6 +17,7 @@ #include "ui/color/color_id.h" #include "ui/gfx/geometry/insets.h" #include "ui/views/accessibility/view_accessibility.h" +#include "ui/views/animation/ink_drop.h" #include "ui/views/background.h" #include "ui/views/border.h" #include "ui/views/controls/button/image_button.h" @@ -115,6 +116,10 @@ views::Button::ButtonState::STATE_NORMAL, ui::ImageModel::FromVectorIcon(vector_icons::kProductIcon)); arrow_button_->SetVisible(false); + views::InkDrop::Get(arrow_button_) + ->SetMode(views::InkDropHost::InkDropMode::ON); + views::InkDrop::Get(arrow_button_)->SetBaseColorId(ui::kColorIcon); + arrow_button_->SetHasInkDropActionOnClick(true); } void EditorMenuTextfieldView::OnTextfieldArrowButtonPressed() {
diff --git a/chrome/browser/ui/views/editor_menu/editor_menu_view.cc b/chrome/browser/ui/views/editor_menu/editor_menu_view.cc index b6ac65be..812197e 100644 --- a/chrome/browser/ui/views/editor_menu/editor_menu_view.cc +++ b/chrome/browser/ui/views/editor_menu/editor_menu_view.cc
@@ -32,6 +32,7 @@ #include "ui/gfx/geometry/rounded_corners_f.h" #include "ui/gfx/skia_paint_util.h" #include "ui/views/accessibility/view_accessibility.h" +#include "ui/views/animation/ink_drop.h" #include "ui/views/background.h" #include "ui/views/controls/button/image_button.h" #include "ui/views/controls/label.h" @@ -281,6 +282,10 @@ ui::ImageModel::FromVectorIcon(vector_icons::kSettingsOutlineIcon, cros_tokens::kCrosSysOnSurface, kSettingsIconSizeDip)); + views::InkDrop::Get(settings_button_) + ->SetMode(views::InkDropHost::InkDropMode::ON); + views::InkDrop::Get(settings_button_)->SetBaseColorId(ui::kColorIcon); + settings_button_->SetHasInkDropActionOnClick(true); title_container_->SetProperty(views::kMarginsKey, kTitleContainerInsets);
diff --git a/chrome/browser/ui/views/file_system_access/file_system_access_test_utils.cc b/chrome/browser/ui/views/file_system_access/file_system_access_test_utils.cc index 67a019c..949d5d4 100644 --- a/chrome/browser/ui/views/file_system_access/file_system_access_test_utils.cc +++ b/chrome/browser/ui/views/file_system_access/file_system_access_test_utils.cc
@@ -36,7 +36,9 @@ return false; } -void SelectPredeterminedFileDialog::ListenerDestroyed() {} +void SelectPredeterminedFileDialog::ListenerDestroyed() { + listener_ = nullptr; +} bool SelectPredeterminedFileDialog::HasMultipleFileTypeChoicesImpl() { return false;
diff --git a/chrome/browser/ui/views/frame/immersive_mode_controller_mac.mm b/chrome/browser/ui/views/frame/immersive_mode_controller_mac.mm index 247ab9a..2239686 100644 --- a/chrome/browser/ui/views/frame/immersive_mode_controller_mac.mm +++ b/chrome/browser/ui/views/frame/immersive_mode_controller_mac.mm
@@ -25,6 +25,7 @@ #include "chrome/browser/ui/web_applications/app_browser_controller.h" #include "chrome/common/chrome_features.h" #include "chrome/common/pref_names.h" +#include "components/constrained_window/constrained_window_views.h" #include "ui/gfx/geometry/insets.h" #include "ui/gfx/geometry/rect.h" #include "ui/gfx/geometry/size.h" @@ -34,6 +35,7 @@ #include "ui/views/focus/focus_manager.h" #include "ui/views/focus/focus_search.h" #include "ui/views/view_observer.h" +#include "ui/views/widget/native_widget.h" #include "ui/views/widget/widget.h" namespace { @@ -498,6 +500,11 @@ } } + if (child->GetNativeWindowProperty(views::kWidgetIdentifierKey) == + constrained_window::kConstrainedWindowWidgetIdentifier) { + return true; + } + // Widgets that have an anchor view contained within top chrome should be // reparented. views::WidgetDelegate* widget_delegate = child->widget_delegate();
diff --git a/chrome/browser/ui/views/omnibox/omnibox_popup_presenter.cc b/chrome/browser/ui/views/omnibox/omnibox_popup_presenter.cc index 44b188f..57b88c8 100644 --- a/chrome/browser/ui/views/omnibox/omnibox_popup_presenter.cc +++ b/chrome/browser/ui/views/omnibox/omnibox_popup_presenter.cc
@@ -63,21 +63,7 @@ widget_->SetContentsView( std::make_unique<RoundedOmniboxResultsFrame>(this, location_bar_view_)); widget_->AddObserver(this); - - // Ideally this would have no size until determined by web contents, but - // zero size causes problems on some platforms. - // TODO(crbug.com/1396174): Don't size dynamically. Set widget to maximum - // possible popup size, and let the webui content render at the appropriate - // size including decorations like rounded borders, frame shadows, etc. - // Such holistic sizing and rendering is necessary to avoid latency & state - // disconnects between renderer process and browser UI (Views). Blending - // the two rendering engines results in flashes and jank because they're - // updating and drawing in completely separate processes. - SetPreferredSize(gfx::Size(640, 480)); - gfx::Rect content_rect = GetTargetBounds(GetPreferredSize().height()); - widget_->SetBounds(content_rect); - EnableSizingFromWebContents(gfx::Size(content_rect.width(), 1), - content_rect.size()); + FrameSizeChanged(nullptr, gfx::Size(0, 0)); } } @@ -103,13 +89,29 @@ return omnibox_popup_ui->handler(); } +// TODO(crbug.com/1396174): This should also be called when LocationBarView +// size is changed. void OmniboxPopupPresenter::FrameSizeChanged( content::RenderFrameHost* render_frame_host, const gfx::Size& frame_size) { if (widget_) { - gfx::Rect bounds = GetTargetBounds(frame_size.height()); - bounds.set_height(std::min(bounds.height(), max_size().height())); - widget_->SetBounds(bounds); + gfx::Rect widget_bounds = location_bar_view_->GetBoundsInScreen(); + widget_bounds.Inset( + -RoundedOmniboxResultsFrame::GetLocationBarAlignmentInsets()); + + // The width is known, and is the basis for consistent web content rendering + // so width is specified exactly; then only height adjusts dynamically. + // TODO(crbug.com/1396174): Change max height according to max suggestion + // count and calculated row height, or use a more general maximum value. + const int width = widget_bounds.width(); + constexpr int kMaxHeight = 480; + EnableSizingFromWebContents(gfx::Size(width, 1), + gfx::Size(width, kMaxHeight)); + + widget_bounds.set_height(widget_bounds.height() + + std::min(kMaxHeight, frame_size.height())); + widget_bounds.Inset(-RoundedOmniboxResultsFrame::GetShadowInsets()); + widget_->SetBounds(widget_bounds); } } @@ -121,30 +123,6 @@ } } -gfx::Rect OmniboxPopupPresenter::GetTargetBounds(int start_height) const { - int popup_height = start_height; - - // Add enough space on the top and bottom so it looks like there is the same - // amount of space between the text and the popup border as there is in the - // interior between each row of text. - popup_height += RoundedOmniboxResultsFrame::GetNonResultSectionHeight(); - - // Add 8dp at the bottom for aesthetic reasons. https://crbug.com/1076646 - // It's expected that this space is dead unclickable/unhighlightable space. - constexpr int kExtraBottomPadding = 8; - popup_height += kExtraBottomPadding; - - // The rounded popup is always offset the same amount from the omnibox. - gfx::Rect content_rect = location_bar_view_->GetBoundsInScreen(); - content_rect.Inset( - -RoundedOmniboxResultsFrame::GetLocationBarAlignmentInsets()); - content_rect.set_height(popup_height); - - // Finally, expand the widget to accommodate the custom-drawn shadows. - content_rect.Inset(-RoundedOmniboxResultsFrame::GetShadowInsets()); - return content_rect; -} - void OmniboxPopupPresenter::WaitForHandler() { bool ready = IsHandlerReady(); base::UmaHistogramBoolean("Omnibox.WebUI.HandlerReady", ready);
diff --git a/chrome/browser/ui/views/omnibox/omnibox_popup_presenter.h b/chrome/browser/ui/views/omnibox/omnibox_popup_presenter.h index 8d77608c..6dafce71 100644 --- a/chrome/browser/ui/views/omnibox/omnibox_popup_presenter.h +++ b/chrome/browser/ui/views/omnibox/omnibox_popup_presenter.h
@@ -51,10 +51,6 @@ // views::WidgetObserver: void OnWidgetDestroyed(views::Widget* widget) override; - // Returns the target popup bounds in screen coordinates based on the bounds - // of `location_bar_view_` and given preferred size `start_height`. - gfx::Rect GetTargetBounds(int start_height) const; - private: friend class OmniboxPopupViewWebUITest;
diff --git a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc index 609f37f..9e5e40c 100644 --- a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc +++ b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
@@ -14,7 +14,6 @@ #include "base/time/time.h" #include "base/timer/timer.h" #include "build/build_config.h" -#include "chrome/browser/picture_in_picture/picture_in_picture_window_manager.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_finder.h" @@ -326,10 +325,7 @@ VideoOverlayWindowViews::kControlHideDelayAfterMove, base::BindRepeating( &VideoOverlayWindowViews::ReEnableControlsAfterMove, - base::Unretained(this))), - get_overlay_view_cb_(base::BindRepeating( - &PictureInPictureWindowManager::GetOverlayView, - base::Unretained(PictureInPictureWindowManager::GetInstance()))) { + base::Unretained(this))) { display::Screen::GetScreen()->AddObserver(this); } @@ -601,9 +597,8 @@ return; } - // If the overlay view is shown, then the other controls are always hidden. GetControlsContainerView()->SetVisible( - !IsOverlayViewShown() && force_controls_visible_.value_or(is_visible)); + force_controls_visible_.value_or(is_visible)); } void VideoOverlayWindowViews::UpdateControlsBounds() { @@ -689,13 +684,6 @@ bool VideoOverlayWindowViews::ControlsHitTestContainsPoint( const gfx::Point& point) { - if (IsOverlayViewShown()) { - // Let the overlay view consume this event if it wants to. If not, then - // ignore any of our controls as well. This will still permit dragging the - // window by any parts that aren't consumed by the overlay view. - return overlay_view_->GetEventHandlerForPoint(point); - } - if (!AreControlsVisible()) return false; if (GetBackToTabControlsBounds().Contains(point) || @@ -1017,10 +1005,6 @@ if (video_view_->layer()->has_external_content()) video_view_->layer()->SetSurfaceSize(video_bounds.size()); - if (IsOverlayViewShown()) { - overlay_view_->SetBoundsRect(gfx::Rect(GetBounds().size())); - } - // Notify the controller that the bounds have changed. controller_->UpdateLayerBounds(); } @@ -1226,20 +1210,6 @@ chromeos::kPipRoundedCornerRadius); #endif - // If there is an existing overlay view, remove it now. - if (overlay_view_) { - GetContentsView()->RemoveChildView(overlay_view_); - overlay_view_ = nullptr; - } - - // Re-add it if needed. - if (auto overlay_view = get_overlay_view_cb_.Run()) { - overlay_view_ = GetContentsView()->AddChildView(std::move(overlay_view)); - // Also update the bounds, since that's already happened for everything - // else, potentially, during widget resize. - overlay_view_->SetBoundsRect(gfx::Rect(GetBounds().size())); - } - // If this is not the first time the window is shown, this will be a no-op. has_been_shown_ = true; } @@ -1586,7 +1556,3 @@ has_registered_frame_sink_hierarchy_ = false; } } - -bool VideoOverlayWindowViews::IsOverlayViewShown() const { - return overlay_view_ && overlay_view_->GetVisible(); -}
diff --git a/chrome/browser/ui/views/overlay/video_overlay_window_views.h b/chrome/browser/ui/views/overlay/video_overlay_window_views.h index 541bc182..1e283ff 100644 --- a/chrome/browser/ui/views/overlay/video_overlay_window_views.h +++ b/chrome/browser/ui/views/overlay/video_overlay_window_views.h
@@ -37,9 +37,6 @@ public views::Widget, public display::DisplayObserver { public: - using GetOverlayViewCb = - base::RepeatingCallback<std::unique_ptr<views::View>()>; - static std::unique_ptr<VideoOverlayWindowViews> Create( content::VideoPictureInPictureWindowController* controller); @@ -160,10 +157,6 @@ void ForceControlsVisibleForTesting(bool visible); - void set_overlay_view_cb_for_testing(GetOverlayViewCb get_overlay_view_cb) { - get_overlay_view_cb_ = std::move(get_overlay_view_cb); - } - // Determines whether a layout of the window controls has been scheduled but // is not done yet. bool IsLayoutPendingForTesting() const; @@ -241,10 +234,6 @@ // visibility to the last requested state. void ReEnableControlsAfterMove(); - // Returns true if and only if `overlay_view_` is currently shown. In - // practice, the is the allow / block UI for auto-pip. - bool IsOverlayViewShown() const; - // Not owned; |controller_| owns |this|. raw_ptr<content::VideoPictureInPictureWindowController> controller_; @@ -311,7 +300,6 @@ raw_ptr<SimpleOverlayWindowImageButton> previous_slide_controls_view_ = nullptr; raw_ptr<SimpleOverlayWindowImageButton> next_slide_controls_view_ = nullptr; - raw_ptr<views::View> overlay_view_ = nullptr; #if BUILDFLAG(IS_CHROMEOS_ASH) // Generates a nine patch layer painted with a highlight border for ChromeOS @@ -359,10 +347,6 @@ // Whether or not the current frame sink for the surface displayed in the // |video_view_| is registered as the child of the overlay window frame sink. bool has_registered_frame_sink_hierarchy_ = false; - - // Callback to get / create an overlay view. This is a callback to let tests - // provide alternate implementations. - GetOverlayViewCb get_overlay_view_cb_; }; #endif // CHROME_BROWSER_UI_VIEWS_OVERLAY_VIDEO_OVERLAY_WINDOW_VIEWS_H_
diff --git a/chrome/browser/ui/views/overlay/video_overlay_window_views_unittest.cc b/chrome/browser/ui/views/overlay/video_overlay_window_views_unittest.cc index 64af94d..e79de26b 100644 --- a/chrome/browser/ui/views/overlay/video_overlay_window_views_unittest.cc +++ b/chrome/browser/ui/views/overlay/video_overlay_window_views_unittest.cc
@@ -8,7 +8,6 @@ #include <utility> #include "base/memory/raw_ptr.h" -#include "base/test/mock_callback.h" #include "build/build_config.h" #include "build/chromeos_buildflags.h" #include "chrome/browser/ui/views/overlay/close_image_button.h" @@ -24,13 +23,9 @@ #include "ui/display/test/test_screen.h" #include "ui/events/base_event_utils.h" #include "ui/events/event.h" -#include "ui/events/test/event_generator.h" #include "ui/gfx/geometry/point.h" #include "ui/gfx/geometry/vector2d.h" -#include "ui/views/controls/button/label_button.h" #include "ui/views/test/button_test_api.h" -#include "ui/views/test/views_test_base.h" -#include "ui/views/widget/widget_utils.h" namespace { @@ -38,8 +33,6 @@ } // namespace -using testing::_; - class TestVideoPictureInPictureWindowController : public content::VideoPictureInPictureWindowController { public: @@ -104,16 +97,9 @@ SetDisplayWorkArea({0, 0, 1000, 1000}); overlay_window_ = VideoOverlayWindowViews::Create(&pip_window_controller_); - overlay_window_->set_overlay_view_cb_for_testing( - base::BindRepeating(&VideoOverlayWindowViewsTest::GetOverlayViewImpl, - base::Unretained(this))); - // On some platforms, OnNativeWidgetMove is invoked on creation. WaitForMove(); overlay_window_->set_minimum_size_for_testing(kMinWindowSize); - - event_generator_ = std::make_unique<ui::test::EventGenerator>( - views::GetRootWindow(overlay_window_.get())); } void TearDown() override { @@ -136,13 +122,6 @@ return pip_window_controller_; } - views::View* SetOverlayView(std::unique_ptr<views::View> overlay_view) { - overlay_view_ = std::move(overlay_view); - return overlay_view_.get(); - } - - ui::test::EventGenerator* event_generator() { return event_generator_.get(); } - protected: void WaitForMove() { task_environment()->FastForwardBy( @@ -151,10 +130,6 @@ } private: - std::unique_ptr<views::View> GetOverlayViewImpl() { - return std::move(overlay_view_); - } - TestingProfile profile_; content::TestWebContentsFactory web_contents_factory_; raw_ptr<content::WebContents> web_contents_; @@ -162,11 +137,6 @@ display::test::TestScreen test_screen_; - // Overlay view that we'll send to the window. May be null. - std::unique_ptr<views::View> overlay_view_; - - std::unique_ptr<ui::test::EventGenerator> event_generator_; - std::unique_ptr<VideoOverlayWindowViews> overlay_window_; }; @@ -536,53 +506,3 @@ // Only the last one should have any effect. EXPECT_FALSE(overlay_window().AreControlsVisible()); } - -TEST_F(VideoOverlayWindowViewsTest, OverlayViewIsSizedCorrectly) { - // Set the bound of the window before showing it, to make sure the size - // propagates to the overlay view. - const gfx::Rect bounds(0, 0, 200, 200); - overlay_window().UpdateNaturalSize(bounds.size()); - overlay_window().SetBounds(bounds); - // Setting the overlay view before show should be sufficient for it to take - // effect when shown. - auto* overlay_view = SetOverlayView(std::make_unique<views::View>()); - overlay_window().ShowInactive(); - EXPECT_TRUE(overlay_view->GetVisible()); - EXPECT_EQ(overlay_view->bounds(), bounds); -} - -TEST_F(VideoOverlayWindowViewsTest, OverlayViewCanBeClicked) { - // Make sure that the overlay view is z-ordered to get input events. - auto* overlay_view = SetOverlayView(std::make_unique<views::View>()); - - // Add a button! - base::MockRepeatingCallback<void(const ui::Event&)> cb; - auto* button = overlay_view->AddChildView( - std::make_unique<views::LabelButton>(cb.Get())); - button->SetBounds(0, 0, 50, 50); - - // Show the window and click the button. - overlay_window().ShowInactive(); - EXPECT_CALL(cb, Run(_)); - event_generator()->MoveMouseTo(button->GetBoundsInScreen().CenterPoint()); - event_generator()->ClickLeftButton(); - - // Clear the callback since `cb` is going away. Note that `DoNothing()` - // doesn't work here because type inference fails. - button->SetCallback(base::BindRepeating([](const ui::Event&) {})); -} - -TEST_F(VideoOverlayWindowViewsTest, OverlayWindowBlocksInput) { - // Make sure that the playback controls don't receive input events while the - // overlay view is visible. - SetOverlayView(std::make_unique<views::View>()); - overlay_window().ShowInactive(); - - // When the play/pause controls are visible, closing via the close button - // should pause the video. - overlay_window().SetPlayPauseButtonVisibility(true); - EXPECT_CALL(pip_window_controller(), Close(true)).Times(0); - event_generator()->MoveMouseTo( - overlay_window().GetCloseControlsBounds().CenterPoint()); - event_generator()->ClickLeftButton(); -}
diff --git a/chrome/browser/ui/views/page_info/page_info_main_view.cc b/chrome/browser/ui/views/page_info/page_info_main_view.cc index 0c3ee85..b4ca6a5 100644 --- a/chrome/browser/ui/views/page_info/page_info_main_view.cc +++ b/chrome/browser/ui/views/page_info/page_info_main_view.cc
@@ -498,6 +498,28 @@ } } +gfx::Size PageInfoMainView::CalculatePreferredSize() const { + if (site_settings_view_ == nullptr && permissions_view_ == nullptr && + security_container_view_ == nullptr) { + return views::View::CalculatePreferredSize(); + } + + int width = 0; + if (site_settings_view_) { + width = std::max(width, site_settings_view_->GetPreferredSize().width()); + } + + if (permissions_view_) { + width = std::max(width, permissions_view_->GetPreferredSize().width()); + } + + if (security_container_view_) { + width = + std::max(width, security_container_view_->GetPreferredSize().width()); + } + return gfx::Size(width, views::View::GetHeightForWidth(width)); +} + void PageInfoMainView::ChildPreferredSizeChanged(views::View* child) { PreferredSizeChanged(); }
diff --git a/chrome/browser/ui/views/page_info/page_info_main_view.h b/chrome/browser/ui/views/page_info/page_info_main_view.h index 20dbf89..8e85b5a1 100644 --- a/chrome/browser/ui/views/page_info/page_info_main_view.h +++ b/chrome/browser/ui/views/page_info/page_info_main_view.h
@@ -69,6 +69,7 @@ void SetPageFeatureInfo(const PageFeatureInfo& info) override; void SetAdPersonalizationInfo(const AdPersonalizationInfo& info) override; + gfx::Size CalculatePreferredSize() const override; void ChildPreferredSizeChanged(views::View* child) override; // PermissionToggleRowViewObserver:
diff --git a/chrome/browser/ui/views/passwords/biometric_authentication_for_filling_bubble_view.cc b/chrome/browser/ui/views/passwords/biometric_authentication_for_filling_bubble_view.cc index 71a90a4c..5c2e29f0 100644 --- a/chrome/browser/ui/views/passwords/biometric_authentication_for_filling_bubble_view.cc +++ b/chrome/browser/ui/views/passwords/biometric_authentication_for_filling_bubble_view.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ui/views/passwords/biometric_authentication_for_filling_bubble_view.h b/chrome/browser/ui/views/passwords/biometric_authentication_for_filling_bubble_view.h index 17e73c3d..e0725270 100644 --- a/chrome/browser/ui/views/passwords/biometric_authentication_for_filling_bubble_view.h +++ b/chrome/browser/ui/views/passwords/biometric_authentication_for_filling_bubble_view.h
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ui/views/performance_controls/high_efficiency_bubble_view.cc b/chrome/browser/ui/views/performance_controls/high_efficiency_bubble_view.cc index 58c0d30..3b3daa5 100644 --- a/chrome/browser/ui/views/performance_controls/high_efficiency_bubble_view.cc +++ b/chrome/browser/ui/views/performance_controls/high_efficiency_bubble_view.cc
@@ -1,4 +1,4 @@ -// Copyright (c) 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ui/views/performance_controls/high_efficiency_bubble_view.h b/chrome/browser/ui/views/performance_controls/high_efficiency_bubble_view.h index ed5cc93..c31ba6e 100644 --- a/chrome/browser/ui/views/performance_controls/high_efficiency_bubble_view.h +++ b/chrome/browser/ui/views/performance_controls/high_efficiency_bubble_view.h
@@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Copyright 2012 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ui/views/select_file_dialog_extension_browsertest.cc b/chrome/browser/ui/views/select_file_dialog_extension_browsertest.cc index 3c572b20..148a45b 100644 --- a/chrome/browser/ui/views/select_file_dialog_extension_browsertest.cc +++ b/chrome/browser/ui/views/select_file_dialog_extension_browsertest.cc
@@ -404,6 +404,12 @@ // The dialog should be resizable. ASSERT_EQ(!GetParam().tablet_mode, OpenDialogIsResizable()); + + // Click the "Cancel" button. This closes the dialog thus removing it from + // `PendingDialog::map_`. `PendingDialog::map_` otherwise prevents the dialog + // from being destroyed on `reset()` in test TearDown and the + // `SelectFileDialog::listener_` becomes dangling. + CloseDialog(DIALOG_BTN_CANCEL, owning_window); }
diff --git a/chrome/browser/ui/web_applications/diagnostics/BUILD.gn b/chrome/browser/ui/web_applications/diagnostics/BUILD.gn index 1d85bdb..c2c1896 100644 --- a/chrome/browser/ui/web_applications/diagnostics/BUILD.gn +++ b/chrome/browser/ui/web_applications/diagnostics/BUILD.gn
@@ -1,4 +1,4 @@ -# Copyright 2022 The Chromium Authors. All rights reserved. +# Copyright 2022 The Chromium Authors # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file.
diff --git a/chrome/browser/ui/web_applications/diagnostics/web_app_icon_diagnostic.cc b/chrome/browser/ui/web_applications/diagnostics/web_app_icon_diagnostic.cc index b360478..f9fa05b 100644 --- a/chrome/browser/ui/web_applications/diagnostics/web_app_icon_diagnostic.cc +++ b/chrome/browser/ui/web_applications/diagnostics/web_app_icon_diagnostic.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ui/web_applications/diagnostics/web_app_icon_diagnostic.h b/chrome/browser/ui/web_applications/diagnostics/web_app_icon_diagnostic.h index de25fb99..a87e11c 100644 --- a/chrome/browser/ui/web_applications/diagnostics/web_app_icon_diagnostic.h +++ b/chrome/browser/ui/web_applications/diagnostics/web_app_icon_diagnostic.h
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ui/web_applications/diagnostics/web_app_icon_health_checks.cc b/chrome/browser/ui/web_applications/diagnostics/web_app_icon_health_checks.cc index 7ea2a4e..9335674 100644 --- a/chrome/browser/ui/web_applications/diagnostics/web_app_icon_health_checks.cc +++ b/chrome/browser/ui/web_applications/diagnostics/web_app_icon_health_checks.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ui/web_applications/diagnostics/web_app_icon_health_checks.h b/chrome/browser/ui/web_applications/diagnostics/web_app_icon_health_checks.h index d92415e5..3ebd359b 100644 --- a/chrome/browser/ui/web_applications/diagnostics/web_app_icon_health_checks.h +++ b/chrome/browser/ui/web_applications/diagnostics/web_app_icon_health_checks.h
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ui/web_applications/diagnostics/web_app_icon_health_checks_browsertest.cc b/chrome/browser/ui/web_applications/diagnostics/web_app_icon_health_checks_browsertest.cc index 5c2feca3..4498ceff4 100644 --- a/chrome/browser/ui/web_applications/diagnostics/web_app_icon_health_checks_browsertest.cc +++ b/chrome/browser/ui/web_applications/diagnostics/web_app_icon_health_checks_browsertest.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ui/webui/ash/borealis_installer/BUILD.gn b/chrome/browser/ui/webui/ash/borealis_installer/BUILD.gn index fceb63d5..be19397 100644 --- a/chrome/browser/ui/webui/ash/borealis_installer/BUILD.gn +++ b/chrome/browser/ui/webui/ash/borealis_installer/BUILD.gn
@@ -1,4 +1,4 @@ -# Copyright 2023 The Chromium Authors. All rights reserved. +# 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.
diff --git a/chrome/browser/ui/webui/ash/cloud_upload/drive_upload_handler.cc b/chrome/browser/ui/webui/ash/cloud_upload/drive_upload_handler.cc index 66143a8..4fe8d40 100644 --- a/chrome/browser/ui/webui/ash/cloud_upload/drive_upload_handler.cc +++ b/chrome/browser/ui/webui/ash/cloud_upload/drive_upload_handler.cc
@@ -152,7 +152,7 @@ } if (drive::util::GetDriveConnectionStatus(profile_) != - drive::util::ConnectionStatus::kConnected) { + drive::util::DRIVE_CONNECTED) { LOG(ERROR) << "No connection to Drive"; OnEndCopy(base::unexpected(GetGenericErrorMessage()), OfficeFilesUploadResult::kNoConnection); @@ -519,8 +519,8 @@ } void DriveUploadHandler::OnDriveConnectionStatusChanged( - drive::util::ConnectionStatus status) { - if (status != drive::util::ConnectionStatus::kConnected) { + drive::util::ConnectionStatusType status) { + if (status != drive::util::DRIVE_CONNECTED) { LOG(ERROR) << "Lost connection to Drive during upload"; OnEndCopy(base::unexpected(GetGenericErrorMessage()), OfficeFilesUploadResult::kNoConnection);
diff --git a/chrome/browser/ui/webui/ash/cloud_upload/drive_upload_handler.h b/chrome/browser/ui/webui/ash/cloud_upload/drive_upload_handler.h index b885e20..dd3c621 100644 --- a/chrome/browser/ui/webui/ash/cloud_upload/drive_upload_handler.h +++ b/chrome/browser/ui/webui/ash/cloud_upload/drive_upload_handler.h
@@ -107,7 +107,7 @@ void OnError(const drivefs::mojom::DriveError& error) override; void OnDriveConnectionStatusChanged( - drive::util::ConnectionStatus status) override; + drive::util::ConnectionStatusType status) override; // Checks the alternate URL from the request file's metadata. void OnGetDriveMetadata(bool timed_out,
diff --git a/chrome/browser/ui/webui/ash/cloud_upload/drive_upload_handler_browsertest.cc b/chrome/browser/ui/webui/ash/cloud_upload/drive_upload_handler_browsertest.cc index 7a01f31..10a0f1d0 100644 --- a/chrome/browser/ui/webui/ash/cloud_upload/drive_upload_handler_browsertest.cc +++ b/chrome/browser/ui/webui/ash/cloud_upload/drive_upload_handler_browsertest.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ui/webui/ash/cloud_upload/one_drive_upload_handler_browsertest.cc b/chrome/browser/ui/webui/ash/cloud_upload/one_drive_upload_handler_browsertest.cc index 866d29c..af683b7 100644 --- a/chrome/browser/ui/webui/ash/cloud_upload/one_drive_upload_handler_browsertest.cc +++ b/chrome/browser/ui/webui/ash/cloud_upload/one_drive_upload_handler_browsertest.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ui/webui/ash/drive_internals_ui.cc b/chrome/browser/ui/webui/ash/drive_internals_ui.cc index c27dd04..19f2386 100644 --- a/chrome/browser/ui/webui/ash/drive_internals_ui.cc +++ b/chrome/browser/ui/webui/ash/drive_internals_ui.cc
@@ -429,9 +429,27 @@ void UpdateConnectionStatusSection() { SetSectionEnabled("connection-status-section", true); + std::string status; + switch (drive::util::GetDriveConnectionStatus(profile())) { + case drive::util::DRIVE_DISCONNECTED_NOSERVICE: + status = "no service"; + break; + case drive::util::DRIVE_DISCONNECTED_NONETWORK: + status = "no network"; + break; + case drive::util::DRIVE_DISCONNECTED_NOTREADY: + status = "not ready"; + break; + case drive::util::DRIVE_CONNECTED_METERED: + status = "metered"; + break; + case drive::util::DRIVE_CONNECTED: + status = "connected"; + break; + } + Value::Dict connection_status; - connection_status.Set( - "status", ToString(drive::util::GetDriveConnectionStatus(profile()))); + connection_status.Set("status", std::move(status)); drive::DriveNotificationManager* const manager = drive::DriveNotificationManagerFactory::FindForBrowserContext( profile());
diff --git a/chrome/browser/ui/webui/settings/ash/app_management/DIR_METADATA b/chrome/browser/ui/webui/ash/settings/app_management/DIR_METADATA similarity index 100% rename from chrome/browser/ui/webui/settings/ash/app_management/DIR_METADATA rename to chrome/browser/ui/webui/ash/settings/app_management/DIR_METADATA
diff --git a/chrome/browser/ui/webui/settings/ash/app_management/OWNERS b/chrome/browser/ui/webui/ash/settings/app_management/OWNERS similarity index 100% rename from chrome/browser/ui/webui/settings/ash/app_management/OWNERS rename to chrome/browser/ui/webui/ash/settings/app_management/OWNERS
diff --git a/chrome/browser/ui/webui/settings/ash/app_management/app_management_uma.h b/chrome/browser/ui/webui/ash/settings/app_management/app_management_uma.h similarity index 80% rename from chrome/browser/ui/webui/settings/ash/app_management/app_management_uma.h rename to chrome/browser/ui/webui/ash/settings/app_management/app_management_uma.h index ef9f8c1..b63116b 100644 --- a/chrome/browser/ui/webui/settings/ash/app_management/app_management_uma.h +++ b/chrome/browser/ui/webui/ash/settings/app_management/app_management_uma.h
@@ -2,11 +2,10 @@ // 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_SETTINGS_ASH_APP_MANAGEMENT_APP_MANAGEMENT_UMA_H_ -#define CHROME_BROWSER_UI_WEBUI_SETTINGS_ASH_APP_MANAGEMENT_APP_MANAGEMENT_UMA_H_ +#ifndef CHROME_BROWSER_UI_WEBUI_ASH_SETTINGS_APP_MANAGEMENT_APP_MANAGEMENT_UMA_H_ +#define CHROME_BROWSER_UI_WEBUI_ASH_SETTINGS_APP_MANAGEMENT_APP_MANAGEMENT_UMA_H_ -namespace ash { -namespace settings { +namespace ash::settings { // These are used in histograms, do not remove/renumber entries. If you're // adding to this enum with the intention that it will be logged, update the @@ -32,7 +31,6 @@ kMaxValue = kPrivacyIndicatorsNotificationSettings, }; -} // namespace settings -} // namespace ash +} // namespace ash::settings -#endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_ASH_APP_MANAGEMENT_APP_MANAGEMENT_UMA_H_ +#endif // CHROME_BROWSER_UI_WEBUI_ASH_SETTINGS_APP_MANAGEMENT_APP_MANAGEMENT_UMA_H_
diff --git a/chrome/browser/ui/webui/policy/policy_ui_browsertest.cc b/chrome/browser/ui/webui/policy/policy_ui_browsertest.cc index d834d16..c628905 100644 --- a/chrome/browser/ui/webui/policy/policy_ui_browsertest.cc +++ b/chrome/browser/ui/webui/policy/policy_ui_browsertest.cc
@@ -280,7 +280,7 @@ return false; } - void ListenerDestroyed() override {} + void ListenerDestroyed() override { listener_ = nullptr; } bool HasMultipleFileTypeChoicesImpl() override { return false; }
diff --git a/chrome/browser/ui/webui/print_preview/pdf_printer_handler.cc b/chrome/browser/ui/webui/print_preview/pdf_printer_handler.cc index bc904b4b..ca963fa 100644 --- a/chrome/browser/ui/webui/print_preview/pdf_printer_handler.cc +++ b/chrome/browser/ui/webui/print_preview/pdf_printer_handler.cc
@@ -158,6 +158,7 @@ .WithCustomName(paper.display_name(), paper.vendor_id()) .WithSizeAndPrintableArea(paper.size_um(), paper.printable_area_um()) + .WithBorderlessVariant(paper.has_borderless_variant()) .Build()); } media.SaveTo(&description);
diff --git a/chrome/browser/ui/webui/print_preview/print_preview_ui.cc b/chrome/browser/ui/webui/print_preview/print_preview_ui.cc index 5edb54b..9e61639 100644 --- a/chrome/browser/ui/webui/print_preview/print_preview_ui.cc +++ b/chrome/browser/ui/webui/print_preview/print_preview_ui.cc
@@ -160,6 +160,7 @@ IDS_PRINT_PREVIEW_ADVANCED_SETTINGS_DIALOG_TITLE}, {"advancedSettingsSearchBoxPlaceholder", IDS_PRINT_PREVIEW_ADVANCED_SETTINGS_SEARCH_BOX_PLACEHOLDER}, + {"borderlessLabel", IDS_PRINT_PREVIEW_BORDERLESS_LABEL}, {"bottom", IDS_PRINT_PREVIEW_BOTTOM_MARGIN_LABEL}, {"cancel", IDS_CANCEL}, {"clearSearch", IDS_CLEAR_SEARCH},
diff --git a/chrome/browser/ui/webui/search_engine_choice/search_engine_choice_ui.cc b/chrome/browser/ui/webui/search_engine_choice/search_engine_choice_ui.cc index 8f6fdd7..f8cd208 100644 --- a/chrome/browser/ui/webui/search_engine_choice/search_engine_choice_ui.cc +++ b/chrome/browser/ui/webui/search_engine_choice/search_engine_choice_ui.cc
@@ -64,8 +64,19 @@ IDS_SEARCH_ENGINE_CHOICE_PAGE_SUBTITLE_INFO_LINK); source->AddLocalizedString("buttonText", IDS_SEARCH_ENGINE_CHOICE_BUTTON_TITLE); - source->AddLocalizedString("infoTitle", + source->AddLocalizedString("infoDialogTitle", IDS_SEARCH_ENGINE_CHOICE_INFO_DIALOG_TITLE); + source->AddLocalizedString( + "infoDialogFirstParagraph", + IDS_SEARCH_ENGINE_CHOICE_INFO_DIALOG_BODY_FIRST_PARAGRAPH); + source->AddLocalizedString( + "infoDialogSecondParagraph", + IDS_SEARCH_ENGINE_CHOICE_INFO_DIALOG_BODY_SECOND_PARAGRAPH); + source->AddLocalizedString( + "infoDialogThirdParagraph", + IDS_SEARCH_ENGINE_CHOICE_INFO_DIALOG_BODY_THIRD_PARAGRAPH); + source->AddLocalizedString("infoDialogButtonText", + IDS_SEARCH_ENGINE_CHOICE_INFO_DIALOG_BUTTON_TITLE); source->AddLocalizedString("productLogoAltText", IDS_SHORT_PRODUCT_LOGO_ALT_TEXT);
diff --git a/chrome/browser/ui/webui/settings/ash/cups_printers_handler_unittest.cc b/chrome/browser/ui/webui/settings/ash/cups_printers_handler_unittest.cc index 5f8e62a..cd2751ebc 100644 --- a/chrome/browser/ui/webui/settings/ash/cups_printers_handler_unittest.cc +++ b/chrome/browser/ui/webui/settings/ash/cups_printers_handler_unittest.cc
@@ -126,7 +126,7 @@ bool IsRunning(gfx::NativeWindow owning_window) const override { return true; } - void ListenerDestroyed() override {} + void ListenerDestroyed() override { listener_ = nullptr; } bool HasMultipleFileTypeChoicesImpl() override { return false; } void VerifyExtensions(const FileTypeInfo* file_types) {
diff --git a/chrome/browser/ui/webui/settings/ash/device_section.cc b/chrome/browser/ui/webui/settings/ash/device_section.cc index d84e063..dda5172 100644 --- a/chrome/browser/ui/webui/settings/ash/device_section.cc +++ b/chrome/browser/ui/webui/settings/ash/device_section.cc
@@ -325,32 +325,6 @@ return *tags; } -const std::vector<SearchConcept>& -GetTouchpadScrollAccelerationSearchConcepts() { - static const base::NoDestructor<std::vector<SearchConcept>> tags({ - {IDS_OS_SETTINGS_TAG_TOUCHPAD_SCROLL_ACCELERATION, - mojom::kPointersSubpagePath, - mojom::SearchResultIcon::kLaptop, - mojom::SearchResultDefaultRank::kMedium, - mojom::SearchResultType::kSetting, - {.setting = mojom::Setting::kTouchpadScrollAcceleration}}, - }); - return *tags; -} - -const std::vector<SearchConcept>& -GetPerDeviceTouchpadScrollAccelerationSearchConcepts() { - static const base::NoDestructor<std::vector<SearchConcept>> tags({ - {IDS_OS_SETTINGS_TAG_TOUCHPAD_SCROLL_ACCELERATION, - mojom::kPerDeviceTouchpadSubpagePath, - mojom::SearchResultIcon::kLaptop, - mojom::SearchResultDefaultRank::kMedium, - mojom::SearchResultType::kSetting, - {.setting = mojom::Setting::kTouchpadScrollAcceleration}}, - }); - return *tags; -} - const std::vector<SearchConcept>& GetTouchpadHapticSearchConcepts() { static const base::NoDestructor<std::vector<SearchConcept>> tags({ {IDS_OS_SETTINGS_TAG_TOUCHPAD_HAPTIC_FEEDBACK, @@ -792,10 +766,6 @@ return base::FeatureList::IsEnabled(features::kAllowScrollSettings); } -bool AreTouchpadScrollSettingsAllowed() { - return base::FeatureList::IsEnabled(features::kAllowTouchpadScrollSettings); -} - bool IsUnifiedDesktopAvailable() { return base::CommandLine::ForCurrentProcess()->HasSwitch( ::switches::kEnableUnifiedDesktop); @@ -1550,27 +1520,17 @@ if (!ash::features::IsInputDeviceSettingsSplitEnabled()) { updater.RemoveSearchTags(GetTouchpadSearchConcepts()); - updater.RemoveSearchTags(GetTouchpadScrollAccelerationSearchConcepts()); if (exists) { updater.AddSearchTags(GetTouchpadSearchConcepts()); - if (base::FeatureList::IsEnabled(features::kAllowScrollSettings)) { - updater.AddSearchTags(GetTouchpadScrollAccelerationSearchConcepts()); - } } return; } updater.RemoveSearchTags(GetPerDeviceTouchpadSearchConcepts()); - updater.RemoveSearchTags( - GetPerDeviceTouchpadScrollAccelerationSearchConcepts()); if (exists) { updater.AddSearchTags(GetPerDeviceTouchpadSearchConcepts()); - if (base::FeatureList::IsEnabled((features::kAllowScrollSettings))) { - updater.AddSearchTags( - GetPerDeviceTouchpadScrollAccelerationSearchConcepts()); - } } } @@ -1901,8 +1861,6 @@ GetHelpUrlWithBoard(chrome::kHapticFeedbackHelpURL)); html_source->AddBoolean("allowScrollSettings", AreScrollSettingsAllowed()); - html_source->AddBoolean("allowTouchpadScrollSettings", - AreTouchpadScrollSettingsAllowed()); } void DeviceSection::AddDeviceGraphicsTabletStrings(
diff --git a/chrome/browser/ui/webui/settings/performance_handler.cc b/chrome/browser/ui/webui/settings/performance_handler.cc index 279281c..05b023a 100644 --- a/chrome/browser/ui/webui/settings/performance_handler.cc +++ b/chrome/browser/ui/webui/settings/performance_handler.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ui/webui/settings/performance_handler.h b/chrome/browser/ui/webui/settings/performance_handler.h index df435f08..80ca0fa2 100644 --- a/chrome/browser/ui/webui/settings/performance_handler.h +++ b/chrome/browser/ui/webui/settings/performance_handler.h
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/ui/webui/side_panel/customize_chrome/customize_chrome_page_handler_unittest.cc b/chrome/browser/ui/webui/side_panel/customize_chrome/customize_chrome_page_handler_unittest.cc index 1b8e057..fc672aa 100644 --- a/chrome/browser/ui/webui/side_panel/customize_chrome/customize_chrome_page_handler_unittest.cc +++ b/chrome/browser/ui/webui/side_panel/customize_chrome/customize_chrome_page_handler_unittest.cc
@@ -96,7 +96,7 @@ bool IsRunning(gfx::NativeWindow owning_window) const override { return false; } - void ListenerDestroyed() override {} + void ListenerDestroyed() override { listener_ = nullptr; } bool HasMultipleFileTypeChoicesImpl() override { return false; } private:
diff --git a/chrome/browser/web_applications/isolated_web_apps/pending_install_info.cc b/chrome/browser/web_applications/isolated_web_apps/pending_install_info.cc index 7b81f81..e90309e1 100644 --- a/chrome/browser/web_applications/isolated_web_apps/pending_install_info.cc +++ b/chrome/browser/web_applications/isolated_web_apps/pending_install_info.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/web_applications/isolated_web_apps/pending_install_info.h b/chrome/browser/web_applications/isolated_web_apps/pending_install_info.h index 605c930..c5f3834 100644 --- a/chrome/browser/web_applications/isolated_web_apps/pending_install_info.h +++ b/chrome/browser/web_applications/isolated_web_apps/pending_install_info.h
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/web_applications/isolated_web_apps/pending_install_info_unittest.cc b/chrome/browser/web_applications/isolated_web_apps/pending_install_info_unittest.cc index 3ffb2035..f7a6aac6 100644 --- a/chrome/browser/web_applications/isolated_web_apps/pending_install_info_unittest.cc +++ b/chrome/browser/web_applications/isolated_web_apps/pending_install_info_unittest.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/webapps/web_app_offline.cc b/chrome/browser/webapps/web_app_offline.cc index d5fabef..130fe99b 100644 --- a/chrome/browser/webapps/web_app_offline.cc +++ b/chrome/browser/webapps/web_app_offline.cc
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/webauthn/chrome_authenticator_request_delegate.cc b/chrome/browser/webauthn/chrome_authenticator_request_delegate.cc index e3e2aa9..573ed2a86 100644 --- a/chrome/browser/webauthn/chrome_authenticator_request_delegate.cc +++ b/chrome/browser/webauthn/chrome_authenticator_request_delegate.cc
@@ -617,6 +617,14 @@ DCHECK(request_type == device::FidoRequestType::kGetAssertion || resident_key_requirement.has_value()); + // Without the UI enabled, discoveries like caBLE, Android AOA, iCloud + // keychain, and the enclave, don't make sense. + if (base::FeatureList::IsEnabled( + device::kWebAuthnRequireUIForComplexDiscoveries) && + disable_ui_) { + return; + } + const bool cable_extension_permitted = ShouldPermitCableExtension(origin); const bool cable_extension_provided = cable_extension_permitted && !pairings_from_extension.empty();
diff --git a/chrome/browser/webauthn/chrome_authenticator_request_delegate_unittest.cc b/chrome/browser/webauthn/chrome_authenticator_request_delegate_unittest.cc index 246c86dd..bba6c98 100644 --- a/chrome/browser/webauthn/chrome_authenticator_request_delegate_unittest.cc +++ b/chrome/browser/webauthn/chrome_authenticator_request_delegate_unittest.cc
@@ -448,6 +448,36 @@ } } +TEST_F(ChromeAuthenticatorRequestDelegateTest, NoExtraDiscoveriesWithoutUI) { + const std::string rp_id = "https://example.com"; + const std::string origin = "https://" + rp_id; + + for (const bool disable_ui : {false, true}) { + SCOPED_TRACE(disable_ui); + + ChromeAuthenticatorRequestDelegate delegate(main_rfh()); + delegate.SetRelyingPartyId(rp_id); + delegate.SetPassEmptyUsbDeviceManagerForTesting(true); + if (disable_ui) { + delegate.DisableUI(); + } + MockCableDiscoveryFactory discovery_factory; + delegate.ConfigureDiscoveries(url::Origin::Create(GURL(origin)), origin, + content::AuthenticatorRequestClientDelegate:: + RequestSource::kWebAuthentication, + device::FidoRequestType::kMakeCredential, + device::ResidentKeyRequirement::kPreferred, + {}, &discovery_factory); + + EXPECT_EQ(discovery_factory.qr_key.has_value(), !disable_ui); + EXPECT_EQ(discovery_factory.aoa_configured, !disable_ui); + + // `discovery_factory.nswindow_` won't be set in any case because it depends + // on the `RenderFrameHost` having a `BrowserWindow`, which it doesn't in + // this context. + } +} + TEST_F(ChromeAuthenticatorRequestDelegateTest, ConditionalUI) { // The RenderFrame has to be live for the ChromeWebAuthnCredentialsDelegate to // be created.
diff --git a/chrome/build/mac-arm.pgo.txt b/chrome/build/mac-arm.pgo.txt index 46063354..b24c1b56d 100644 --- a/chrome/build/mac-arm.pgo.txt +++ b/chrome/build/mac-arm.pgo.txt
@@ -1 +1 @@ -chrome-mac-arm-main-1693403685-0d5b66a8137cb8e4db929db7dfc5a0ce53560237.profdata +chrome-mac-arm-main-1693411119-a402c23d0c1d5386c4cdbab77700cbcdee9d18f5.profdata
diff --git a/chrome/build/win32.pgo.txt b/chrome/build/win32.pgo.txt index 1d6fe3d..1b7c02eb 100644 --- a/chrome/build/win32.pgo.txt +++ b/chrome/build/win32.pgo.txt
@@ -1 +1 @@ -chrome-win32-main-1693385947-af3c05c2a466cef8ec7fb47cae6174e88c66ce50.profdata +chrome-win32-main-1693396730-8f8b47295070132968f371cb24c3021b2113023f.profdata
diff --git a/chrome/build/win64.pgo.txt b/chrome/build/win64.pgo.txt index 6ce1da8..19440234 100644 --- a/chrome/build/win64.pgo.txt +++ b/chrome/build/win64.pgo.txt
@@ -1 +1 @@ -chrome-win64-main-1693396730-40a2f81c7608d933a778823a6e15acafed39fb31.profdata +chrome-win64-main-1693407573-e889cf4846f5deb94e43ea787dfa1a3e0635b14a.profdata
diff --git a/chrome/common/extensions/api/tabs.json b/chrome/common/extensions/api/tabs.json index fe71a16..4cad18d 100644 --- a/chrome/common/extensions/api/tabs.json +++ b/chrome/common/extensions/api/tabs.json
@@ -172,7 +172,7 @@ { "name": "getCurrent", "type": "function", - "description": "Gets the tab that this script call is being made from. May be undefined if called from a non-tab context (for example, a background page or popup view).", + "description": "Gets the tab that this script call is being made from. Returns <code>undefined</code> if called from a non-tab context (for example, a background page or popup view).", "parameters": [], "returns_async": { "name": "callback",
diff --git a/chrome/services/speech/speech_recognition_service_impl.cc b/chrome/services/speech/speech_recognition_service_impl.cc index 78786cd..64a8701 100644 --- a/chrome/services/speech/speech_recognition_service_impl.cc +++ b/chrome/services/speech/speech_recognition_service_impl.cc
@@ -1,4 +1,4 @@ -// Copyright 2020 The Chromium Authors. All rights reserved. +// 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.
diff --git a/chrome/services/speech/speech_recognition_service_impl.h b/chrome/services/speech/speech_recognition_service_impl.h index 00aa2d2..f158b67 100644 --- a/chrome/services/speech/speech_recognition_service_impl.h +++ b/chrome/services/speech/speech_recognition_service_impl.h
@@ -1,4 +1,4 @@ -// Copyright 2020 The Chromium Authors. All rights reserved. +// 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.
diff --git a/chrome/test/data/extensions/api_test/autotest_private/test.js b/chrome/test/data/extensions/api_test/autotest_private/test.js index 3114f9a..f8de19b8 100644 --- a/chrome/test/data/extensions/api_test/autotest_private/test.js +++ b/chrome/test/data/extensions/api_test/autotest_private/test.js
@@ -1,4 +1,4 @@ -// Copyright 2012 The Chromium Authors. All rights reserved. +// Copyright 2012 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/test/data/extensions/api_test/tts/is_speaking/test.html b/chrome/test/data/extensions/api_test/tts/is_speaking/test.html index f39ab08a..87b7b6f 100644 --- a/chrome/test/data/extensions/api_test/tts/is_speaking/test.html +++ b/chrome/test/data/extensions/api_test/tts/is_speaking/test.html
@@ -1,6 +1,6 @@ <!-- - * Copyright 2023 The Chromium Authors. All rights reserved. Use of this - * source code is governed by a BSD-style license that can be found in the - * LICENSE file. + * 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. --> <script src="test.js"></script>
diff --git a/chrome/test/data/extensions/api_test/tts_engine/lacros_tts_support/register_ash_engine/test.html b/chrome/test/data/extensions/api_test/tts_engine/lacros_tts_support/register_ash_engine/test.html index 5a5ee3d..db3a7a65 100644 --- a/chrome/test/data/extensions/api_test/tts_engine/lacros_tts_support/register_ash_engine/test.html +++ b/chrome/test/data/extensions/api_test/tts_engine/lacros_tts_support/register_ash_engine/test.html
@@ -1,6 +1,6 @@ <!-- - * Copyright 2022 The Chromium Authors. All rights reserved. Use of this - * source code is governed by a BSD-style license that can be found in the - * LICENSE file. + * Copyright 2022 The Chromium Authors + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. --> <script src="test.js"></script>
diff --git a/chrome/test/data/extensions/api_test/tts_engine/lacros_tts_support/register_lacros_tts_engine/test.html b/chrome/test/data/extensions/api_test/tts_engine/lacros_tts_support/register_lacros_tts_engine/test.html index 5a5ee3d..db3a7a65 100644 --- a/chrome/test/data/extensions/api_test/tts_engine/lacros_tts_support/register_lacros_tts_engine/test.html +++ b/chrome/test/data/extensions/api_test/tts_engine/lacros_tts_support/register_lacros_tts_engine/test.html
@@ -1,6 +1,6 @@ <!-- - * Copyright 2022 The Chromium Authors. All rights reserved. Use of this - * source code is governed by a BSD-style license that can be found in the - * LICENSE file. + * Copyright 2022 The Chromium Authors + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. --> <script src="test.js"></script>
diff --git a/chrome/test/data/extensions/api_test/tts_engine/lacros_tts_support/tts_pause_before_speak_lacros_engine/test.html b/chrome/test/data/extensions/api_test/tts_engine/lacros_tts_support/tts_pause_before_speak_lacros_engine/test.html index f39ab08a..87b7b6f 100644 --- a/chrome/test/data/extensions/api_test/tts_engine/lacros_tts_support/tts_pause_before_speak_lacros_engine/test.html +++ b/chrome/test/data/extensions/api_test/tts_engine/lacros_tts_support/tts_pause_before_speak_lacros_engine/test.html
@@ -1,6 +1,6 @@ <!-- - * Copyright 2023 The Chromium Authors. All rights reserved. Use of this - * source code is governed by a BSD-style license that can be found in the - * LICENSE file. + * 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. --> <script src="test.js"></script>
diff --git a/chrome/test/data/extensions/api_test/tts_engine/lacros_tts_support/tts_pause_during_speak_lacros_engine/test.html b/chrome/test/data/extensions/api_test/tts_engine/lacros_tts_support/tts_pause_during_speak_lacros_engine/test.html index f39ab08a..87b7b6f 100644 --- a/chrome/test/data/extensions/api_test/tts_engine/lacros_tts_support/tts_pause_during_speak_lacros_engine/test.html +++ b/chrome/test/data/extensions/api_test/tts_engine/lacros_tts_support/tts_pause_during_speak_lacros_engine/test.html
@@ -1,6 +1,6 @@ <!-- - * Copyright 2023 The Chromium Authors. All rights reserved. Use of this - * source code is governed by a BSD-style license that can be found in the - * LICENSE file. + * 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. --> <script src="test.js"></script>
diff --git a/chrome/test/data/extensions/api_test/tts_engine/lacros_tts_support/tts_speak_lacros_utterance_with_ash_engine/test.html b/chrome/test/data/extensions/api_test/tts_engine/lacros_tts_support/tts_speak_lacros_utterance_with_ash_engine/test.html index 5a5ee3d..db3a7a65 100644 --- a/chrome/test/data/extensions/api_test/tts_engine/lacros_tts_support/tts_speak_lacros_utterance_with_ash_engine/test.html +++ b/chrome/test/data/extensions/api_test/tts_engine/lacros_tts_support/tts_speak_lacros_utterance_with_ash_engine/test.html
@@ -1,6 +1,6 @@ <!-- - * Copyright 2022 The Chromium Authors. All rights reserved. Use of this - * source code is governed by a BSD-style license that can be found in the - * LICENSE file. + * Copyright 2022 The Chromium Authors + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. --> <script src="test.js"></script>
diff --git a/chrome/test/data/extensions/api_test/tts_engine/lacros_tts_support/tts_speak_lacros_utterance_with_lacros_engine/test.html b/chrome/test/data/extensions/api_test/tts_engine/lacros_tts_support/tts_speak_lacros_utterance_with_lacros_engine/test.html index 5a5ee3d..db3a7a65 100644 --- a/chrome/test/data/extensions/api_test/tts_engine/lacros_tts_support/tts_speak_lacros_utterance_with_lacros_engine/test.html +++ b/chrome/test/data/extensions/api_test/tts_engine/lacros_tts_support/tts_speak_lacros_utterance_with_lacros_engine/test.html
@@ -1,6 +1,6 @@ <!-- - * Copyright 2022 The Chromium Authors. All rights reserved. Use of this - * source code is governed by a BSD-style license that can be found in the - * LICENSE file. + * Copyright 2022 The Chromium Authors + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. --> <script src="test.js"></script>
diff --git a/chrome/test/data/extensions/api_test/tts_engine/lacros_tts_support/tts_stop_lacros_engine/test.html b/chrome/test/data/extensions/api_test/tts_engine/lacros_tts_support/tts_stop_lacros_engine/test.html index 5a5ee3d..db3a7a65 100644 --- a/chrome/test/data/extensions/api_test/tts_engine/lacros_tts_support/tts_stop_lacros_engine/test.html +++ b/chrome/test/data/extensions/api_test/tts_engine/lacros_tts_support/tts_stop_lacros_engine/test.html
@@ -1,6 +1,6 @@ <!-- - * Copyright 2022 The Chromium Authors. All rights reserved. Use of this - * source code is governed by a BSD-style license that can be found in the - * LICENSE file. + * Copyright 2022 The Chromium Authors + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. --> <script src="test.js"></script>
diff --git a/chrome/test/data/webapps_integration/screenshots/service_worker.js b/chrome/test/data/webapps_integration/screenshots/service_worker.js index df04e70..30c174a 100644 --- a/chrome/test/data/webapps_integration/screenshots/service_worker.js +++ b/chrome/test/data/webapps_integration/screenshots/service_worker.js
@@ -1,4 +1,4 @@ -// Copyright 2020 The Chromium Authors. All rights reserved. +// 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.
diff --git a/chrome/test/data/webui/app_home/app_list_test.ts b/chrome/test/data/webui/app_home/app_list_test.ts index 6039da0..839ffd8 100644 --- a/chrome/test/data/webui/app_home/app_list_test.ts +++ b/chrome/test/data/webui/app_home/app_list_test.ts
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/test/data/webui/app_home/test_app_home_browser_proxy.ts b/chrome/test/data/webui/app_home/test_app_home_browser_proxy.ts index 22a993e..9def166 100644 --- a/chrome/test/data/webui/app_home/test_app_home_browser_proxy.ts +++ b/chrome/test/data/webui/app_home/test_app_home_browser_proxy.ts
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. import {AppInfo, ClickEvent, PageCallbackRouter, PageHandlerInterface, PageRemote, RunOnOsLoginMode} from 'chrome://apps/app_home.mojom-webui.js';
diff --git a/chrome/test/data/webui/chromeos/ash_common/navigation_view_panel_test.js b/chrome/test/data/webui/chromeos/ash_common/navigation_view_panel_test.js index 4ab4bae..085660c 100644 --- a/chrome/test/data/webui/chromeos/ash_common/navigation_view_panel_test.js +++ b/chrome/test/data/webui/chromeos/ash_common/navigation_view_panel_test.js
@@ -256,6 +256,54 @@ assertTrue(drawer.wasCanceled()); }); + test('CloseDrawerWhenClickingSameItem', async () => { + const pageType = 'myPageType'; + const id1 = 'id1'; + const id2 = 'id2'; + + viewElement.title = 'title'; + + await addNavigationSections([ + viewElement.createSelectorItem('Page 1', pageType, /*icon=*/ '', 'id1'), + viewElement.createSelectorItem('Page 2', pageType, /*icon=*/ '', 'id2'), + ]); + + // The first element is visible, others hidden. + assertTrue(!!viewElement.shadowRoot.querySelector(`#${id1}`)); + assertFalse(viewElement.shadowRoot.querySelector(`#${id1}`).hidden); + assertFalse(!!viewElement.shadowRoot.querySelector(`#${id2}`)); + + const drawer = getDrawer(); + drawer.openDrawer(); + await eventToPromise('cr-drawer-opened', drawer); + assertTrue(drawer.open); + + // Clicking the first entry closes the drawer. + const navElements = getNavElements(); + navElements[0].click(); + await flushTasks(); + + await eventToPromise('close', drawer); + assertFalse(drawer.open); + + // The first element is visible, others hidden. + assertTrue(!!viewElement.shadowRoot.querySelector(`#${id1}`)); + assertFalse(viewElement.shadowRoot.querySelector(`#${id1}`).hidden); + assertFalse(!!viewElement.shadowRoot.querySelector(`#${id2}`)); + + // Re-open and click the first navigation item, expect drawer to close. + drawer.openDrawer(); + await eventToPromise('cr-drawer-opened', drawer); + assertTrue(drawer.open); + + const navElements1 = getNavElements(); + navElements1[0].click(); + await flushTasks(); + + await eventToPromise('close', drawer); + assertFalse(drawer.open); + }); + test('removeSelectedPage', async () => { await addNavigationSections([ viewElement.createSelectorItem(
diff --git a/chrome/test/data/webui/chromeos/chromebox_for_meetings/cfm_network_settings_test.js b/chrome/test/data/webui/chromeos/chromebox_for_meetings/cfm_network_settings_test.js index 1e79781a..6ab4750 100644 --- a/chrome/test/data/webui/chromeos/chromebox_for_meetings/cfm_network_settings_test.js +++ b/chrome/test/data/webui/chromeos/chromebox_for_meetings/cfm_network_settings_test.js
@@ -66,7 +66,7 @@ PolymerTest.clearBody(); browserProxy = new TestCfmNetworkSettingsBrowserProxy(); - CfmNetworkSettingsBrowserProxyImpl.instance_ = browserProxy; + CfmNetworkSettingsBrowserProxyImpl.setInstance(browserProxy); mojoApi.resetForTest();
diff --git a/chrome/test/data/webui/gaia_auth_host/saml_password_attributes_test.js b/chrome/test/data/webui/gaia_auth_host/saml_password_attributes_test.js index cf1324a47..27f910c 100644 --- a/chrome/test/data/webui/gaia_auth_host/saml_password_attributes_test.js +++ b/chrome/test/data/webui/gaia_auth_host/saml_password_attributes_test.js
@@ -1,4 +1,4 @@ -// Copyright 2019 The Chromium Authors. All rights reserved. +// 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.
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 5387a0e9..99f6bf2 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
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/test/data/webui/new_tab_page/lens_upload_dialog_test.ts b/chrome/test/data/webui/new_tab_page/lens_upload_dialog_test.ts index da35d49..9fafb16 100644 --- a/chrome/test/data/webui/new_tab_page/lens_upload_dialog_test.ts +++ b/chrome/test/data/webui/new_tab_page/lens_upload_dialog_test.ts
@@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/test/data/webui/print_preview/media_size_settings_test.ts b/chrome/test/data/webui/print_preview/media_size_settings_test.ts index 8d93de89..d0ef91f2 100644 --- a/chrome/test/data/webui/print_preview/media_size_settings_test.ts +++ b/chrome/test/data/webui/print_preview/media_size_settings_test.ts
@@ -5,7 +5,8 @@ import 'chrome://print/print_preview.js'; import {MediaSizeCapability, PrintPreviewMediaSizeSettingsElement} from 'chrome://print/print_preview.js'; -import {assertDeepEquals, assertEquals, assertFalse} from 'chrome://webui-test/chai_assert.js'; +import {loadTimeData} from 'chrome://resources/js/load_time_data.js'; +import {assertDeepEquals, assertEquals, assertFalse, assertTrue} from 'chrome://webui-test/chai_assert.js'; import {fakeDataBind} from 'chrome://webui-test/polymer_test_util.js'; import {getCddTemplate} from './print_preview_test_utils.js'; @@ -18,6 +19,7 @@ setup(function() { document.body.innerHTML = window.trustedTypes!.emptyHTML; + loadTimeData.overrideValues({isBorderlessPrintingEnabled: true}); const model = document.createElement('print-preview-model'); document.body.appendChild(model); @@ -27,6 +29,7 @@ mediaSizeSection.capability = mediaSizeCapability; mediaSizeSection.disabled = false; model.set('settings.mediaSize.available', true); + model.set('settings.borderless.available', true); fakeDataBind(model, mediaSizeSection, 'settings'); document.body.appendChild(mediaSizeSection); }); @@ -42,17 +45,42 @@ test('update from setting', function() { const letterOption = mediaSizeCapability.option[0]!; const squareOption = mediaSizeCapability.option[1]!; + const legalOption = mediaSizeCapability.option[2]!; + const fourbysixOption = mediaSizeCapability.option[3]!; // Default is letter const settingsSelect = mediaSizeSection.shadowRoot!.querySelector( 'print-preview-settings-select')!; + const borderlessCheckbox = + mediaSizeSection.shadowRoot!.querySelector('cr-checkbox')!; assertDeepEquals(letterOption, JSON.parse(settingsSelect.selectedValue)); assertDeepEquals( letterOption, mediaSizeSection.getSettingValue('mediaSize')); + assertTrue(borderlessCheckbox.disabled); + assertFalse(borderlessCheckbox.checked); // Change to square mediaSizeSection.setSetting('mediaSize', mediaSizeCapability.option[1]!); assertDeepEquals(squareOption, JSON.parse(settingsSelect.selectedValue)); + assertFalse(borderlessCheckbox.disabled); + assertFalse(borderlessCheckbox.checked); + + // Enable the option for borderless printing. + mediaSizeSection.setSetting('borderless', true); + assertFalse(borderlessCheckbox.disabled); + assertTrue(borderlessCheckbox.checked); + + // Change to legal + mediaSizeSection.setSetting('mediaSize', mediaSizeCapability.option[2]!); + assertDeepEquals(legalOption, JSON.parse(settingsSelect.selectedValue)); + assertTrue(borderlessCheckbox.disabled); + assertFalse(borderlessCheckbox.checked); + + // Change to 4x6 + mediaSizeSection.setSetting('mediaSize', mediaSizeCapability.option[3]!); + assertDeepEquals(fourbysixOption, JSON.parse(settingsSelect.selectedValue)); + assertTrue(borderlessCheckbox.disabled); + assertTrue(borderlessCheckbox.checked); // Set the setting to an option that is not supported by the // printer. This can occur if sticky settings are for a different
diff --git a/chrome/test/data/webui/print_preview/model_settings_availability_test.ts b/chrome/test/data/webui/print_preview/model_settings_availability_test.ts index 4765bb9..16c47d9 100644 --- a/chrome/test/data/webui/print_preview/model_settings_availability_test.ts +++ b/chrome/test/data/webui/print_preview/model_settings_availability_test.ts
@@ -263,6 +263,29 @@ assertFalse(model.settings.color.setFromUi); }); + test('borderless', function() { + // Check that borderless setting is unavailable without the feature flag. + loadTimeData.overrideValues({isBorderlessPrintingEnabled: false}); + model.set( + 'destination.capabilities', + getCddTemplate(model.destination.id).capabilities); + assertFalse(model.settings.borderless.available); + + // Enable the feature flag and set capabilities again to update borderless + // availability. + loadTimeData.overrideValues({isBorderlessPrintingEnabled: true}); + model.set( + 'destination.capabilities', + getCddTemplate(model.destination.id).capabilities); + assertTrue(model.settings.borderless.available); + + // Remove the only media size with a borderless variant. + const capabilities = getCddTemplate(model.destination.id).capabilities!; + capabilities.printer!.media_size!.option.splice(1, 1); + model.set('destination.capabilities', capabilities); + assertFalse(model.settings.borderless.available); + }); + test('mediaType', function() { // Check that media type setting is unavailable without the feature flag. loadTimeData.overrideValues({isBorderlessPrintingEnabled: false});
diff --git a/chrome/test/data/webui/print_preview/model_test.ts b/chrome/test/data/webui/print_preview/model_test.ts index 0b345483..6a6b93d 100644 --- a/chrome/test/data/webui/print_preview/model_test.ts +++ b/chrome/test/data/webui/print_preview/model_test.ts
@@ -331,6 +331,7 @@ const newTicket = model.createPrintTicket(testDestination, false, false); const expectedNewTicketObject: PrintTicket = { mediaSize: testDestination.capabilities!.printer!.media_size!.option[1]!, + borderless: false, mediaType: testDestination.capabilities!.printer!.media_type!.option[1]! .vendor_id, pageCount: 1,
diff --git a/chrome/test/data/webui/print_preview/print_preview_test_utils.ts b/chrome/test/data/webui/print_preview/print_preview_test_utils.ts index 6f68c899..1b43e21b 100644 --- a/chrome/test/data/webui/print_preview/print_preview_test_utils.ts +++ b/chrome/test/data/webui/print_preview/print_preview_test_utils.ts
@@ -86,6 +86,28 @@ width_microns: 215900, height_microns: 215900, custom_display_name: 'CUSTOM_SQUARE', + has_borderless_variant: true, + }, + { + name: 'LEGAL', + width_microns: 215900, + height_microns: 355600, + custom_display_name: 'Legal', + imageable_area_left_microns: 5000, + imageable_area_bottom_microns: 5000, + imageable_area_right_microns: 5000, + imageable_area_top_microns: 5000, + has_borderless_variant: false, + }, + { + name: '4x6', + width_microns: 101600, + height_microns: 152400, + custom_display_name: '4 x 6 in', + imageable_area_left_microns: 0, + imageable_area_bottom_microns: 0, + imageable_area_right_microns: 101600, + imageable_area_top_microns: 152400, }, ] as MediaSizeOption[], },
diff --git a/chrome/test/data/webui/print_preview/restore_state_test.ts b/chrome/test/data/webui/print_preview/restore_state_test.ts index e5bc3d7..acd606fa 100644 --- a/chrome/test/data/webui/print_preview/restore_state_test.ts +++ b/chrome/test/data/webui/print_preview/restore_state_test.ts
@@ -122,6 +122,7 @@ width_microns: 215900, height_microns: 215900, custom_display_name: 'CUSTOM_SQUARE', + has_borderless_variant: true, }, customMargins: { marginTop: 74, @@ -236,6 +237,7 @@ width_microns: 215900, height_microns: 215900, custom_display_name: 'CUSTOM_SQUARE', + has_borderless_variant: true, }, }, {
diff --git a/chrome/test/enterprise/e2e/connector/__init__.py b/chrome/test/enterprise/e2e/connector/__init__.py index a04fbf5b..a4c5a1b6 100644 --- a/chrome/test/enterprise/e2e/connector/__init__.py +++ b/chrome/test/enterprise/e2e/connector/__init__.py
@@ -1,4 +1,4 @@ -# Copyright 2022 The Chromium Authors. All rights reserved. +# Copyright 2022 The Chromium Authors # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file.
diff --git a/chrome/test/enterprise/e2e/connector/reporting_connector_pubsub/pubsub_api_service.py b/chrome/test/enterprise/e2e/connector/reporting_connector_pubsub/pubsub_api_service.py index 8e7590f..2da7b3d 100644 --- a/chrome/test/enterprise/e2e/connector/reporting_connector_pubsub/pubsub_api_service.py +++ b/chrome/test/enterprise/e2e/connector/reporting_connector_pubsub/pubsub_api_service.py
@@ -1,4 +1,4 @@ -# Copyright 2022 The Chromium Authors. All rights reserved. +# Copyright 2022 The Chromium Authors # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file.
diff --git a/chrome/test/enterprise/e2e/connector/reporting_connector_pubsub/reporting_connector_pubsub_test.py b/chrome/test/enterprise/e2e/connector/reporting_connector_pubsub/reporting_connector_pubsub_test.py index 7a9b899..b83bd61 100644 --- a/chrome/test/enterprise/e2e/connector/reporting_connector_pubsub/reporting_connector_pubsub_test.py +++ b/chrome/test/enterprise/e2e/connector/reporting_connector_pubsub/reporting_connector_pubsub_test.py
@@ -1,4 +1,4 @@ -# Copyright 2022 The Chromium Authors. All rights reserved. +# Copyright 2022 The Chromium Authors # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file.
diff --git a/chrome/test/ppapi/ppapi_test_select_file_dialog_factory.cc b/chrome/test/ppapi/ppapi_test_select_file_dialog_factory.cc index b52a50b0..e46d731 100644 --- a/chrome/test/ppapi/ppapi_test_select_file_dialog_factory.cc +++ b/chrome/test/ppapi/ppapi_test_select_file_dialog_factory.cc
@@ -70,7 +70,7 @@ bool IsRunning(gfx::NativeWindow owning_window) const override { return false; } - void ListenerDestroyed() override {} + void ListenerDestroyed() override { listener_ = nullptr; } private: void RespondToFileSelectionRequest(void* params) {
diff --git a/chrome/updater/test/integration_tests.cc b/chrome/updater/test/integration_tests.cc index 3c4c078..51971ac 100644 --- a/chrome/updater/test/integration_tests.cc +++ b/chrome/updater/test/integration_tests.cc
@@ -458,6 +458,23 @@ #if BUILDFLAG(IS_WIN) void RunFakeLegacyUpdater() { test_commands_->RunFakeLegacyUpdater(); } + + void ExpectAppInstalled(const std::string& appid, + const base::Version& expected_version) { + ASSERT_NO_FATAL_FAILURE(ExpectAppVersion(appid, expected_version)); + + std::wstring pv; + EXPECT_EQ( + ERROR_SUCCESS, + base::win::RegKey(UpdaterScopeToHKeyRoot(UpdaterScope::kSystem), + GetAppClientsKey(appid).c_str(), Wow6432(KEY_READ)) + .ReadValue(kRegValuePV, &pv)); + EXPECT_EQ(pv, base::ASCIIToWide(expected_version.GetString())); + } + + base::FilePath GetInstallerPath(const std::string& installer) const { + return base::FilePath::FromASCII("test_installer").AppendASCII(installer); + } #endif // BUILDFLAG(IS_WIN) void ExpectLegacyUpdaterMigrated() { @@ -1565,16 +1582,21 @@ IntegrationTest::TearDown(); } - base::FilePath GetInstallerPath(const std::string& installer) const { - return base::FilePath::FromASCII("test_installer").AppendASCII(installer); - } - void PushEnrollmentToken(const std::string& enrollment_token) { scoped_refptr<DMStorage> storage = GetDefaultDMStorage(); EXPECT_TRUE(storage->StoreEnrollmentToken(enrollment_token)); EXPECT_TRUE(storage->DeleteDMToken()); } + std::string BuildCommandLineArgs(UpdaterScope scope, + const std::string& app_id, + const base::Version& to_version) { + return base::StringPrintf("%s --appid=%s --company=%s --product_version=%s", + IsSystemInstall(scope) ? "--system" : "", + app_id.c_str(), COMPANY_SHORTNAME_STRING, + to_version.GetString().c_str()); + } + void InstallAppWithVersion(const std::string& app_id, const base::Version& version) { InstallApp(app_id, version, [&]() { @@ -1582,18 +1604,19 @@ // version. base::FilePath exe_path; ASSERT_TRUE(base::PathService::Get(base::DIR_EXE, &exe_path)); - base::CommandLine command( - exe_path.Append(GetInstallerPath(kAppCRX).ReplaceExtension( - FILE_PATH_LITERAL(".exe")))); - command.AppendArg("--system"); - command.AppendSwitchASCII("--company", COMPANY_SHORTNAME_STRING); - command.AppendSwitchASCII("--appid", app_id); - command.AppendSwitchASCII("--product_version", version.GetString()); - VLOG(2) << "Launch app setup command: " << command.GetCommandLineString(); + const std::wstring command(base::StrCat( + {base::CommandLine::QuoteForCommandLineToArgvW( + exe_path + .Append(GetInstallerPath(kAppCRX).ReplaceExtension( + FILE_PATH_LITERAL(".exe"))) + .value()), + L" ", + base::ASCIIToWide( + BuildCommandLineArgs(GetTestScope(), app_id, version))})); + VLOG(2) << "Launch app setup command: " << command; base::Process process = base::LaunchProcess(command, {}); if (!process.IsValid()) { - VLOG(2) << "Invalid process launching command: " - << command.GetCommandLineString(); + VLOG(2) << "Invalid process launching command: " << command; } int exit_code = -1; EXPECT_TRUE(process.WaitForExitWithTimeout(TestTimeouts::action_timeout(), @@ -1611,33 +1634,6 @@ .WriteValue(L"CloudPolicyOverridesPlatformPolicy", 1)); } - void ExpectAppInstalled(const std::string& appid, - const base::Version& expected_version) { - ASSERT_NO_FATAL_FAILURE(ExpectAppVersion(appid, expected_version)); - - std::wstring pv; - EXPECT_EQ( - ERROR_SUCCESS, - base::win::RegKey(UpdaterScopeToHKeyRoot(UpdaterScope::kSystem), - GetAppClientsKey(appid).c_str(), Wow6432(KEY_READ)) - .ReadValue(kRegValuePV, &pv)); - EXPECT_EQ(pv, base::ASCIIToWide(expected_version.GetString())); - } - - void RemoveMsiProductData(const std::wstring& msi_product_id) { - ASSERT_FALSE(msi_product_id.empty()); - for (const auto& [root, key] : - {std::make_pair(HKEY_LOCAL_MACHINE, - L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Instal" - L"ler\\UserData\\S-1-5-18\\Products"), - std::make_pair(HKEY_CLASSES_ROOT, L"Installer\\Products")}) { - for (const auto& access_mask : {KEY_WOW64_32KEY, KEY_WOW64_64KEY}) { - base::win::RegKey(root, key, DELETE | access_mask) - .DeleteKey(msi_product_id.c_str()); - } - } - } - std::unique_ptr<ScopedServer> test_server_; static constexpr char kEnrollmentToken[] = "integration-enrollment-token"; static constexpr char kDMToken[] = "integration-dm-token"; @@ -1707,10 +1703,11 @@ ExpectAppsUpdateSequence( UpdaterScope::kSystem, test_server_.get(), { - AppUpdateExpectation({kAppId1, base::Version({0, 0, 0, 0}), - kApp1Version, - /*is_install=*/true, - /*should_update=*/true, false, "", crx_path}), + AppUpdateExpectation( + BuildCommandLineArgs(GetTestScope(), kAppId1, kApp1Version), + kAppId1, base::Version({0, 0, 0, 0}), kApp1Version, + /*is_install=*/true, + /*should_update=*/true, false, "", crx_path), }); ASSERT_NO_FATAL_FAILURE(InstallAppViaService(kAppId1)); @@ -1752,10 +1749,11 @@ { // TODO(crbug.com/1476655): change `is_install` to `true` after // the issue is fixed. - AppUpdateExpectation({kAppId1, base::Version({0, 0, 0, 0}), - kApp1Version, - /*is_install=*/false, - /*should_update=*/true, false, "", crx_path}), + AppUpdateExpectation( + BuildCommandLineArgs(GetTestScope(), kAppId1, kApp1Version), + kAppId1, base::Version({0, 0, 0, 0}), kApp1Version, + /*is_install=*/false, + /*should_update=*/true, false, "", crx_path), }); ExpectUpdateCheckRequest(test_server_.get()); @@ -1808,18 +1806,24 @@ ExpectAppsUpdateSequence( UpdaterScope::kSystem, test_server_.get(), { - AppUpdateExpectation({kAppId1, kApp1InitialVersion, - kApp1UpdatedVersion, - /*is_install=*/false, - /*should_update=*/true, false, "", crx_path}), - AppUpdateExpectation({kAppId2, kApp2InitialVersion, - kApp2UpdatedVersion, - /*is_install=*/false, - /*should_update=*/true, false, "", crx_path}), - AppUpdateExpectation({kAppId3, kApp3InitialVersion, - kApp3UpdatedVersion, - /*is_install=*/false, - /*should_update=*/false, false, "", crx_path}), + AppUpdateExpectation(BuildCommandLineArgs(GetTestScope(), kAppId1, + kApp1UpdatedVersion), + kAppId1, kApp1InitialVersion, + kApp1UpdatedVersion, + /*is_install=*/false, + /*should_update=*/true, false, "", crx_path), + AppUpdateExpectation(BuildCommandLineArgs(GetTestScope(), kAppId2, + kApp2UpdatedVersion), + kAppId2, kApp2InitialVersion, + kApp2UpdatedVersion, + /*is_install=*/false, + /*should_update=*/true, false, "", crx_path), + AppUpdateExpectation(BuildCommandLineArgs(GetTestScope(), kAppId3, + kApp3UpdatedVersion), + kAppId3, kApp3InitialVersion, + kApp3UpdatedVersion, + /*is_install=*/false, + /*should_update=*/false, false, "", crx_path), }); ASSERT_NO_FATAL_FAILURE(RunWake(0)); ASSERT_TRUE(WaitForUpdaterExit()); @@ -1873,18 +1877,24 @@ ExpectAppsUpdateSequence( UpdaterScope::kSystem, test_server_.get(), { - AppUpdateExpectation({kAppId1, kApp1InitialVersion, - kApp1UpdatedVersion, - /*is_install=*/false, - /*should_update=*/true, false, "", crx_path}), - AppUpdateExpectation({kAppId2, kApp2InitialVersion, - kApp2InitialVersion, - /*is_install=*/false, - /*should_update=*/false, false, "", crx_path}), - AppUpdateExpectation({kAppId3, kApp3InitialVersion, - kApp3UpdatedVersion, - /*is_install=*/false, - /*should_update=*/true, false, "", crx_path}), + AppUpdateExpectation(BuildCommandLineArgs(GetTestScope(), kAppId1, + kApp1UpdatedVersion), + kAppId1, kApp1InitialVersion, + kApp1UpdatedVersion, + /*is_install=*/false, + /*should_update=*/true, false, "", crx_path), + AppUpdateExpectation(BuildCommandLineArgs(GetTestScope(), kAppId2, + kApp2UpdatedVersion), + kAppId2, kApp2InitialVersion, + kApp2InitialVersion, + /*is_install=*/false, + /*should_update=*/false, false, "", crx_path), + AppUpdateExpectation(BuildCommandLineArgs(GetTestScope(), kAppId3, + kApp3UpdatedVersion), + kAppId3, kApp3InitialVersion, + kApp3UpdatedVersion, + /*is_install=*/false, + /*should_update=*/true, false, "", crx_path), }); ASSERT_NO_FATAL_FAILURE(RunWake(0)); ASSERT_TRUE(WaitForUpdaterExit()); @@ -1921,10 +1931,12 @@ ExpectAppsUpdateSequence( UpdaterScope::kSystem, test_server_.get(), - {AppUpdateExpectation(kAppId1, kAppInitialVersion, kAppRollbackVersion, - /*is_install=*/false, - /*should_update=*/true, /*allow_rollback=*/true, - kTargetVersionPrefix, GetInstallerPath(kAppCRX))}); + {AppUpdateExpectation( + BuildCommandLineArgs(GetTestScope(), kAppId1, kAppRollbackVersion), + kAppId1, kAppInitialVersion, kAppRollbackVersion, + /*is_install=*/false, + /*should_update=*/true, /*allow_rollback=*/true, kTargetVersionPrefix, + GetInstallerPath(kAppCRX))}); ASSERT_NO_FATAL_FAILURE(RunWake(0)); ASSERT_TRUE(WaitForUpdaterExit()); ASSERT_NO_FATAL_FAILURE(ExpectAppInstalled(kAppId1, kAppRollbackVersion)); @@ -1932,68 +1944,100 @@ ASSERT_NO_FATAL_FAILURE(ExpectUninstallPing(test_server_.get())); ASSERT_NO_FATAL_FAILURE(Uninstall()); } +#endif // !defined(COMPONENT_BUILD) -TEST_F(IntegrationTestDeviceManagement, MsiInstallUpgrade) { - constexpr char kMsiAppId[] = "{c28fcf72-bcf2-45c5-8def-31a74ac02012}"; - constexpr char kMsiCrx[] = "TestSystemMsiInstaller.msi.crx3"; +class IntegrationTestMsi : public IntegrationTest { + public: + IntegrationTestMsi() = default; + ~IntegrationTestMsi() override = default; + + protected: + void SetUp() override { + if (!IsSystemInstall(GetTestScope())) { + GTEST_SKIP(); + } + IntegrationTest::SetUp(); + test_server_ = std::make_unique<ScopedServer>(test_commands_); + ASSERT_NO_FATAL_FAILURE(RemoveMsiProductData(kMsiProductIdInitialVersion)); + ASSERT_NO_FATAL_FAILURE(RemoveMsiProductData(kMsiProductIdUpdatedVersion)); + } + + void TearDown() override { + if (!IsSystemInstall(GetTestScope())) { + return; + } + ASSERT_NO_FATAL_FAILURE(RemoveMsiProductData(kMsiProductIdInitialVersion)); + ASSERT_NO_FATAL_FAILURE(RemoveMsiProductData(kMsiProductIdUpdatedVersion)); + IntegrationTest::TearDown(); + } + + void InstallMsiWithVersion(const base::Version& version) { + InstallApp(kMsiAppId, version, [&]() { + base::FilePath msi_path; + ASSERT_TRUE(base::PathService::Get(base::DIR_EXE, &msi_path)); + msi_path = msi_path.Append( + GetInstallerPath(base::StrCat({kMsiAppId, ".", version.GetString()})) + .AppendASCII(kMsiCrx) + .RemoveExtension()); + const std::wstring command = BuildMsiCommandLine({}, {}, msi_path); + base::Process process = base::LaunchProcess(command, {}); + if (!process.IsValid()) { + LOG(ERROR) << "Invalid process launching command: " << command; + } + int exit_code = -1; + EXPECT_TRUE(process.WaitForExitWithTimeout(TestTimeouts::action_timeout(), + &exit_code)); + EXPECT_EQ(0, exit_code); + }); + + ExpectAppInstalled(kMsiAppId, version); + } + + void RemoveMsiProductData(const std::wstring& msi_product_id) { + ASSERT_FALSE(msi_product_id.empty()); + for (const auto& [root, key] : + {std::make_pair(HKEY_LOCAL_MACHINE, + L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Instal" + L"ler\\UserData\\S-1-5-18\\Products"), + std::make_pair(HKEY_CLASSES_ROOT, L"Installer\\Products")}) { + for (const auto& access_mask : {KEY_WOW64_32KEY, KEY_WOW64_64KEY}) { + base::win::RegKey(root, key, DELETE | access_mask) + .DeleteKey(msi_product_id.c_str()); + } + } + } + + std::unique_ptr<ScopedServer> test_server_; + static constexpr char kMsiAppId[] = "{c28fcf72-bcf2-45c5-8def-31a74ac02012}"; + static constexpr char kMsiCrx[] = "TestSystemMsiInstaller.msi.crx3"; + static constexpr wchar_t kMsiProductIdInitialVersion[] = + L"40C670A26D240095081B31C3EDEF2BD2"; + static constexpr wchar_t kMsiProductIdUpdatedVersion[] = + L"D2B2AC298EFCE2757A975961532CDE7D"; const base::Version kMsiInitialVersion = base::Version("1.0.0.0"); const base::Version kMsiUpdatedVersion = base::Version("2.0.0.0"); - constexpr wchar_t kMsiProductIdInitialVersion[] = - L"40C670A26D240095081B31C3EDEF2BD2"; - constexpr wchar_t kMsiProductIdUpdatedVersion[] = - L"D2B2AC298EFCE2757A975961532CDE7D"; +}; - ASSERT_NO_FATAL_FAILURE(RemoveMsiProductData(kMsiProductIdInitialVersion)); - ASSERT_NO_FATAL_FAILURE(RemoveMsiProductData(kMsiProductIdUpdatedVersion)); +TEST_F(IntegrationTestMsi, MsiInstallUpgrade) { ASSERT_NO_FATAL_FAILURE(Install()); ASSERT_NO_FATAL_FAILURE(ExpectInstalled()); - InstallApp(kMsiAppId, kMsiInitialVersion, [&]() { - base::FilePath msi_path; - ASSERT_TRUE(base::PathService::Get(base::DIR_EXE, &msi_path)); - msi_path = msi_path.Append( - GetInstallerPath( - base::StrCat({kMsiAppId, ".", kMsiInitialVersion.GetString()})) - .AppendASCII(kMsiCrx) - .RemoveExtension()); - const std::wstring command = BuildMsiCommandLine({}, {}, msi_path); - base::Process process = base::LaunchProcess(command, {}); - if (!process.IsValid()) { - LOG(ERROR) << "Invalid process launching command: " << command; - } - int exit_code = -1; - EXPECT_TRUE(process.WaitForExitWithTimeout(TestTimeouts::action_timeout(), - &exit_code)); - EXPECT_EQ(0, exit_code); - }); - ExpectAppInstalled(kMsiAppId, kMsiInitialVersion); - - // Cloud policy sets update default to enabled. - PushEnrollmentToken(kEnrollmentToken); - ExpectDeviceManagementRegistrationRequest(test_server_.get(), - kEnrollmentToken, kDMToken); - OmahaSettingsClientProto omaha_settings; - omaha_settings.set_update_default(enterprise_management::UPDATES_ENABLED); - ExpectDeviceManagementPolicyFetchRequest(test_server_.get(), kDMToken, - omaha_settings); + InstallMsiWithVersion(kMsiInitialVersion); const base::FilePath crx_path = GetInstallerPath(kMsiCrx); ExpectAppsUpdateSequence( UpdaterScope::kSystem, test_server_.get(), { - AppUpdateExpectation({kMsiAppId, kMsiInitialVersion, - kMsiUpdatedVersion, - /*is_install=*/false, - /*should_update=*/true, false, "", crx_path}), + AppUpdateExpectation({}, kMsiAppId, kMsiInitialVersion, + kMsiUpdatedVersion, + /*is_install=*/false, + /*should_update=*/true, false, "", crx_path), }); ASSERT_NO_FATAL_FAILURE(RunWake(0)); ASSERT_TRUE(WaitForUpdaterExit()); ASSERT_NO_FATAL_FAILURE(ExpectAppInstalled(kMsiAppId, kMsiUpdatedVersion)); ASSERT_NO_FATAL_FAILURE(ExpectUninstallPing(test_server_.get())); ASSERT_NO_FATAL_FAILURE(Uninstall()); - ASSERT_NO_FATAL_FAILURE(RemoveMsiProductData(kMsiProductIdInitialVersion)); - ASSERT_NO_FATAL_FAILURE(RemoveMsiProductData(kMsiProductIdUpdatedVersion)); } -#endif // !defined(COMPONENT_BUILD) #endif // BUILDFLAG(IS_WIN) #endif // BUILDFLAG(IS_WIN) || !defined(COMPONENT_BUILD)
diff --git a/chrome/updater/test/integration_tests_impl.cc b/chrome/updater/test/integration_tests_impl.cc index 3814f81..14fce660 100644 --- a/chrome/updater/test/integration_tests_impl.cc +++ b/chrome/updater/test/integration_tests_impl.cc
@@ -314,6 +314,7 @@ } // namespace AppUpdateExpectation::AppUpdateExpectation( + const std::string& args, const std::string& app_id, const base::Version& from_version, const base::Version& to_version, @@ -322,7 +323,8 @@ bool allow_rollback, const std::string& target_version_prefix, const base::FilePath& crx_relative_path) - : app_id(app_id), + : args(args), + app_id(app_id), from_version(from_version), to_version(to_version), is_install(is_install), @@ -511,16 +513,9 @@ const base::FilePath run_action = base_name.Extension().empty() ? base_name.AddExtension(kExeExtension) : base_name; - const std::string args = - base_name.Extension().empty() - ? base::StringPrintf( - "%s --appid=%s --company=%s --product_version=%s", - IsSystemInstall(scope) ? "--system" : "", app.app_id.c_str(), - COMPANY_SHORTNAME_STRING, app.to_version.GetString().c_str()) - : ""; app_responses.push_back(GetUpdateResponseForApp( app.app_id, "", test_server->update_url().spec(), app.to_version, - crx_path, run_action.MaybeAsASCII().c_str(), args)); + crx_path, run_action.MaybeAsASCII().c_str(), app.args)); } test_server->ExpectOnce({request::GetPathMatcher(test_server->update_path()), request::GetContentMatcher(app_requests),
diff --git a/chrome/updater/test/integration_tests_impl.h b/chrome/updater/test/integration_tests_impl.h index a1987838..158e852 100644 --- a/chrome/updater/test/integration_tests_impl.h +++ b/chrome/updater/test/integration_tests_impl.h
@@ -42,7 +42,8 @@ }; struct AppUpdateExpectation { - AppUpdateExpectation(const std::string& app_id, + AppUpdateExpectation(const std::string& args, + const std::string& app_id, const base::Version& from_version, const base::Version& to_version, bool is_install, @@ -53,6 +54,7 @@ AppUpdateExpectation(const AppUpdateExpectation&); ~AppUpdateExpectation(); + const std::string args; const std::string app_id; const base::Version from_version; const base::Version to_version;
diff --git a/chromeos/ash/components/network/hotspot_capabilities_provider.cc b/chromeos/ash/components/network/hotspot_capabilities_provider.cc index 9f69673a..f456b87 100644 --- a/chromeos/ash/components/network/hotspot_capabilities_provider.cc +++ b/chromeos/ash/components/network/hotspot_capabilities_provider.cc
@@ -115,11 +115,7 @@ } if (network->IsConnectedState()) { - ShillManagerClient::Get()->CheckTetheringReadiness( - base::BindOnce(&HotspotCapabilitiesProvider::OnCheckReadinessSuccess, - weak_ptr_factory_.GetWeakPtr(), base::DoNothing()), - base::BindOnce(&HotspotCapabilitiesProvider::OnCheckReadinessFailure, - weak_ptr_factory_.GetWeakPtr(), base::DoNothing())); + CheckTetheringReadiness(base::DoNothing()); } } @@ -233,7 +229,7 @@ CheckTetheringReadinessCallback callback, const std::string& result) { using HotspotAllowStatus = hotspot_config::mojom::HotspotAllowStatus; - + NET_LOG(EVENT) << "Check tethering readiness result: " << result; if (result == shill::kTetheringReadinessReady) { SetHotspotAllowStatus(policy_allow_hotspot_ ? HotspotAllowStatus::kAllowed @@ -244,7 +240,7 @@ return; } if (result == shill::kTetheringReadinessUpstreamNetworkNotAvailable) { - SetHotspotAllowStatus(HotspotAllowStatus::kDisallowedReadinessCheckFail); + SetHotspotAllowStatus(HotspotAllowStatus::kDisallowedNoMobileData); HotspotMetricsHelper::RecordCheckTetheringReadinessResult( CheckTetheringReadinessResult::kUpstreamNetworkNotAvailable); std::move(callback).Run( @@ -259,6 +255,7 @@ return; } NET_LOG(ERROR) << "Unexpected check tethering readiness result: " << result; + SetHotspotAllowStatus(HotspotAllowStatus::kDisallowedReadinessCheckFail); HotspotMetricsHelper::RecordCheckTetheringReadinessResult( CheckTetheringReadinessResult::kUnknownResult); std::move(callback).Run(CheckTetheringReadinessResult::kUnknownResult);
diff --git a/chromeos/ash/components/network/hotspot_capabilities_provider_unittest.cc b/chromeos/ash/components/network/hotspot_capabilities_provider_unittest.cc index b20e566..59166e4 100644 --- a/chromeos/ash/components/network/hotspot_capabilities_provider_unittest.cc +++ b/chromeos/ash/components/network/hotspot_capabilities_provider_unittest.cc
@@ -202,19 +202,24 @@ EXPECT_EQ(7u, observer_.hotspot_capabilities_changed_count()); } -TEST_F(HotspotCapabilitiesProviderTest, CheckTetheringReadiness) { +TEST_F(HotspotCapabilitiesProviderTest, CheckTetheringReadiness_Ready) { network_state_test_helper_.manager_test() ->SetSimulateCheckTetheringReadinessResult( FakeShillSimulatedResult::kSuccess, shill::kTetheringReadinessReady); base::RunLoop().RunUntilIdle(); EXPECT_EQ(CheckTetheringReadiness(), HotspotCapabilitiesProvider::CheckTetheringReadinessResult::kReady); + EXPECT_EQ( + hotspot_config::mojom::HotspotAllowStatus::kAllowed, + hotspot_capabilities_provider_->GetHotspotCapabilities().allow_status); histogram_tester_.ExpectTotalCount( HotspotMetricsHelper::kHotspotCheckReadinessResultHistogram, 1); histogram_tester_.ExpectBucketCount( HotspotMetricsHelper::kHotspotCheckReadinessResultHistogram, HotspotMetricsHelper::HotspotMetricsCheckReadinessResult::kReady, 1); +} +TEST_F(HotspotCapabilitiesProviderTest, CheckTetheringReadiness_NotAllowed) { network_state_test_helper_.manager_test() ->SetSimulateCheckTetheringReadinessResult( FakeShillSimulatedResult::kSuccess, @@ -223,12 +228,40 @@ EXPECT_EQ( CheckTetheringReadiness(), HotspotCapabilitiesProvider::CheckTetheringReadinessResult::kNotAllowed); + EXPECT_EQ( + hotspot_config::mojom::HotspotAllowStatus::kDisallowedReadinessCheckFail, + hotspot_capabilities_provider_->GetHotspotCapabilities().allow_status); histogram_tester_.ExpectTotalCount( - HotspotMetricsHelper::kHotspotCheckReadinessResultHistogram, 2); + HotspotMetricsHelper::kHotspotCheckReadinessResultHistogram, 1); histogram_tester_.ExpectBucketCount( HotspotMetricsHelper::kHotspotCheckReadinessResultHistogram, HotspotMetricsHelper::HotspotMetricsCheckReadinessResult::kNotAllowed, 1); +} +TEST_F(HotspotCapabilitiesProviderTest, + CheckTetheringReadiness_UpstreamNotAvailable) { + network_state_test_helper_.manager_test() + ->SetSimulateCheckTetheringReadinessResult( + FakeShillSimulatedResult::kSuccess, + /*readiness_status=*/shill:: + kTetheringReadinessUpstreamNetworkNotAvailable); + base::RunLoop().RunUntilIdle(); + EXPECT_EQ(CheckTetheringReadiness(), + HotspotCapabilitiesProvider::CheckTetheringReadinessResult:: + kUpstreamNetworkNotAvailable); + EXPECT_EQ( + hotspot_config::mojom::HotspotAllowStatus::kDisallowedNoMobileData, + hotspot_capabilities_provider_->GetHotspotCapabilities().allow_status); + histogram_tester_.ExpectTotalCount( + HotspotMetricsHelper::kHotspotCheckReadinessResultHistogram, 1); + histogram_tester_.ExpectBucketCount( + HotspotMetricsHelper::kHotspotCheckReadinessResultHistogram, + HotspotMetricsHelper::HotspotMetricsCheckReadinessResult:: + kUpstreamNetworkNotAvailable, + 1); +} + +TEST_F(HotspotCapabilitiesProviderTest, CheckTetheringReadiness_EmptyResult) { network_state_test_helper_.manager_test() ->SetSimulateCheckTetheringReadinessResult( FakeShillSimulatedResult::kSuccess, @@ -237,13 +270,18 @@ EXPECT_EQ(CheckTetheringReadiness(), HotspotCapabilitiesProvider::CheckTetheringReadinessResult:: kUnknownResult); + EXPECT_EQ( + hotspot_config::mojom::HotspotAllowStatus::kDisallowedReadinessCheckFail, + hotspot_capabilities_provider_->GetHotspotCapabilities().allow_status); histogram_tester_.ExpectTotalCount( - HotspotMetricsHelper::kHotspotCheckReadinessResultHistogram, 3); + HotspotMetricsHelper::kHotspotCheckReadinessResultHistogram, 1); histogram_tester_.ExpectBucketCount( HotspotMetricsHelper::kHotspotCheckReadinessResultHistogram, HotspotMetricsHelper::HotspotMetricsCheckReadinessResult::kUnknownResult, 1); +} +TEST_F(HotspotCapabilitiesProviderTest, CheckTetheringReadiness_Failure) { network_state_test_helper_.manager_test() ->SetSimulateCheckTetheringReadinessResult( FakeShillSimulatedResult::kFailure, @@ -252,8 +290,11 @@ EXPECT_EQ(CheckTetheringReadiness(), HotspotCapabilitiesProvider::CheckTetheringReadinessResult:: kShillOperationFailed); + EXPECT_EQ( + hotspot_config::mojom::HotspotAllowStatus::kDisallowedReadinessCheckFail, + hotspot_capabilities_provider_->GetHotspotCapabilities().allow_status); histogram_tester_.ExpectTotalCount( - HotspotMetricsHelper::kHotspotCheckReadinessResultHistogram, 4); + HotspotMetricsHelper::kHotspotCheckReadinessResultHistogram, 1); histogram_tester_.ExpectBucketCount( HotspotMetricsHelper::kHotspotCheckReadinessResultHistogram, HotspotMetricsHelper::HotspotMetricsCheckReadinessResult::
diff --git a/chromeos/ash/components/network/metrics/hotspot_metrics_helper.h b/chromeos/ash/components/network/metrics/hotspot_metrics_helper.h index 33ddf2e7..7c8e49e 100644 --- a/chromeos/ash/components/network/metrics/hotspot_metrics_helper.h +++ b/chromeos/ash/components/network/metrics/hotspot_metrics_helper.h
@@ -88,7 +88,15 @@ FRIEND_TEST_ALL_PREFIXES(HotspotConfigurationHandlerTest, SetAndGetHotspotConfig); FRIEND_TEST_ALL_PREFIXES(HotspotCapabilitiesProviderTest, - CheckTetheringReadiness); + CheckTetheringReadiness_Ready); + FRIEND_TEST_ALL_PREFIXES(HotspotCapabilitiesProviderTest, + CheckTetheringReadiness_NotAllowed); + FRIEND_TEST_ALL_PREFIXES(HotspotCapabilitiesProviderTest, + CheckTetheringReadiness_UpstreamNotAvailable); + FRIEND_TEST_ALL_PREFIXES(HotspotCapabilitiesProviderTest, + CheckTetheringReadiness_EmptyResult); + FRIEND_TEST_ALL_PREFIXES(HotspotCapabilitiesProviderTest, + CheckTetheringReadiness_Failure); enum class HotspotMetricsSetEnabledResult; enum class HotspotMetricsSetConfigResult;
diff --git a/chromeos/ash/services/recording/BUILD.gn b/chromeos/ash/services/recording/BUILD.gn index 5c30fc9..bc76dfb 100644 --- a/chromeos/ash/services/recording/BUILD.gn +++ b/chromeos/ash/services/recording/BUILD.gn
@@ -10,8 +10,6 @@ sources = [ "audio_capture_util.cc", "audio_capture_util.h", - "audio_capturer.cc", - "audio_capturer.h", "audio_stream.cc", "audio_stream.h", "audio_stream_mixer.cc", @@ -42,6 +40,7 @@ "//ash/constants", "//base", "//chromeos/ash/services/recording/public/mojom", + "//components/capture_mode", "//media", "//services/audio/public/cpp", ]
diff --git a/chromeos/ash/services/recording/DEPS b/chromeos/ash/services/recording/DEPS index d980dac..13eb5b3 100644 --- a/chromeos/ash/services/recording/DEPS +++ b/chromeos/ash/services/recording/DEPS
@@ -5,6 +5,7 @@ include_rules = [ "+ash/constants", "+base", + "+components/capture_mode", "+components/viz/common", "+media", "+mojo/public",
diff --git a/chromeos/ash/services/recording/audio_stream_mixer.cc b/chromeos/ash/services/recording/audio_stream_mixer.cc index d6d05e1..46d28fb 100644 --- a/chromeos/ash/services/recording/audio_stream_mixer.cc +++ b/chromeos/ash/services/recording/audio_stream_mixer.cc
@@ -10,9 +10,8 @@ #include "base/functional/bind.h" #include "base/task/bind_post_task.h" #include "chromeos/ash/services/recording/audio_capture_util.h" -#include "chromeos/ash/services/recording/audio_capturer.h" #include "chromeos/ash/services/recording/audio_stream.h" -#include "chromeos/ash/services/recording/recording_service_constants.h" +#include "components/capture_mode/audio_capturer.h" #include "media/base/audio_bus.h" #include "media/base/audio_parameters.h" @@ -71,9 +70,7 @@ streams_.emplace_back(std::make_unique<AudioStream>(device_id)); - // TODO(b/286325436): Refactor this to make sure audio mixing is not done on - // the main thread of the recording service. - audio_capturers_.emplace_back(std::make_unique<AudioCapturer>( + audio_capturers_.emplace_back(std::make_unique<capture_mode::AudioCapturer>( device_id, std::move(audio_stream_factory), audio_params, base::BindPostTaskToCurrentDefault(base::BindRepeating( &AudioStreamMixer::OnAudioCaptured, weak_ptr_factory_.GetWeakPtr(),
diff --git a/chromeos/ash/services/recording/audio_stream_mixer.h b/chromeos/ash/services/recording/audio_stream_mixer.h index 8775b574..1cbe85c 100644 --- a/chromeos/ash/services/recording/audio_stream_mixer.h +++ b/chromeos/ash/services/recording/audio_stream_mixer.h
@@ -8,7 +8,6 @@ #include <memory> #include <vector> -#include "base/functional/callback_forward.h" #include "base/sequence_checker.h" #include "base/strings/string_piece_forward.h" #include "base/threading/sequence_bound.h" @@ -17,13 +16,16 @@ #include "media/mojo/mojom/audio_stream_factory.mojom-forward.h" #include "mojo/public/cpp/bindings/pending_remote.h" +namespace capture_mode { +class AudioCapturer; +} // namespace capture_mode + namespace media { class AudioBus; } // namespace media namespace recording { -class AudioCapturer; class AudioStream; // Defines a type for the callback that the mixer uses to provide the mixed @@ -128,7 +130,7 @@ // A list of audio capturers and their corresponding audio streams. std::vector<std::unique_ptr<AudioStream>> streams_; - std::vector<std::unique_ptr<AudioCapturer>> audio_capturers_; + std::vector<std::unique_ptr<capture_mode::AudioCapturer>> audio_capturers_; base::WeakPtrFactory<AudioStreamMixer> weak_ptr_factory_{this}; };
diff --git a/chromeos/ash/services/recording/recording_service.cc b/chromeos/ash/services/recording/recording_service.cc index ddeb38e..929d1fd 100644 --- a/chromeos/ash/services/recording/recording_service.cc +++ b/chromeos/ash/services/recording/recording_service.cc
@@ -20,7 +20,6 @@ #include "base/task/thread_pool.h" #include "base/time/time.h" #include "chromeos/ash/services/recording/audio_capture_util.h" -#include "chromeos/ash/services/recording/audio_capturer.h" #include "chromeos/ash/services/recording/audio_stream_mixer.h" #include "chromeos/ash/services/recording/gif_encoder.h" #include "chromeos/ash/services/recording/recording_encoder.h"
diff --git a/chromeos/services/tts/BUILD.gn b/chromeos/services/tts/BUILD.gn index f17e2ede..548e0f1 100644 --- a/chromeos/services/tts/BUILD.gn +++ b/chromeos/services/tts/BUILD.gn
@@ -50,6 +50,7 @@ functions = [ "GoogleTtsSetLogger", + "GoogleTtsPreSandboxInit", "GoogleTtsInit", "GoogleTtsShutdown", "GoogleTtsInstallVoice",
diff --git a/chromeos/services/tts/OWNERS b/chromeos/services/tts/OWNERS index 976b955..fcd8cbc4 100644 --- a/chromeos/services/tts/OWNERS +++ b/chromeos/services/tts/OWNERS
@@ -1 +1,4 @@ file://ui/accessibility/OWNERS + +per-file tts_sandbox_hook.*=set noparent +per-file tts_sandbox_hook.*=file://sandbox/linux/OWNERS \ No newline at end of file
diff --git a/chromeos/services/tts/chrome_tts.h b/chromeos/services/tts/chrome_tts.h index 5b43caf..47bce5a6 100644 --- a/chromeos/services/tts/chrome_tts.h +++ b/chromeos/services/tts/chrome_tts.h
@@ -10,6 +10,8 @@ void GoogleTtsSetLogger(void (*logger_func)(int severity, const char* message)); +void GoogleTtsPreSandboxInit(); + bool GoogleTtsInit(const char* pipeline_path, const char* path_prefix); void GoogleTtsShutdown();
diff --git a/chromeos/services/tts/tts_sandbox_hook.cc b/chromeos/services/tts/tts_sandbox_hook.cc index 4a522c6..73a96f0 100644 --- a/chromeos/services/tts/tts_sandbox_hook.cc +++ b/chromeos/services/tts/tts_sandbox_hook.cc
@@ -11,6 +11,7 @@ #include "base/files/file_util.h" #include "base/logging.h" #include "chromeos/services/tts/constants.h" +#include "library_loaders/libchrometts.h" #include "sandbox/linux/syscall_broker/broker_command.h" #include "sandbox/linux/syscall_broker/broker_file_permission.h" @@ -40,7 +41,6 @@ // These files are required for some syscalls e.g. get_nprocs, sysinfo. permissions->push_back(BrokerFilePermission::ReadOnly("/proc/stat")); permissions->push_back(BrokerFilePermission::ReadOnly("/proc/meminfo")); - permissions->push_back(BrokerFilePermission::ReadOnly("/proc/cpuinfo")); } std::vector<BrokerFilePermission> GetTtsFilePermissions() { @@ -55,6 +55,14 @@ if (!dlopen(kLibchromettsPath, RTLD_LAZY)) LOG(ERROR) << "Unable to open libchrometts.so: " << dlerror(); + LibChromeTtsLoader loader; + if (loader.Load(kLibchromettsPath)) { + loader.GoogleTtsPreSandboxInit(); + } else { + LOG(ERROR) << "Unable to load libchrometts.so and perform pre-sandbox " + "initialization"; + } + // Ensure this directory is created. base::FilePath temp_data_dir(kTempDataDirectory); base::CreateDirectoryAndGetError(temp_data_dir, nullptr);
diff --git a/clank b/clank index a750aaa..530817b 160000 --- a/clank +++ b/clank
@@ -1 +1 @@ -Subproject commit a750aaa5d035918cb1e2c927521827a15c82c9c8 +Subproject commit 530817b617518e29e7faca7d81cdd5e2c7f07181
diff --git a/components/BUILD.gn b/components/BUILD.gn index f3d560c..a7b1262 100644 --- a/components/BUILD.gn +++ b/components/BUILD.gn
@@ -152,6 +152,7 @@ "//components/content_settings/core/common:unit_tests", "//components/country_codes:unit_tests", "//components/crash/core/common:unit_tests", + "//components/cross_device/logging:unit_tests", "//components/crx_file:unit_tests", "//components/device_event_log:unit_tests", "//components/device_signals/core:unit_tests",
diff --git a/components/autofill/core/browser/personal_data_manager.cc b/components/autofill/core/browser/personal_data_manager.cc index 3959bd7..f322d4d 100644 --- a/components/autofill/core/browser/personal_data_manager.cc +++ b/components/autofill/core/browser/personal_data_manager.cc
@@ -2067,13 +2067,12 @@ GetProfileUpdateStrikeDatabase()->ClearStrikes(guid); } -bool PersonalDataManager::IsSyncEnabledFor( - syncer::UserSelectableType data_type) const { - // TODO(crbug.com/1462286): Investigate usage of IsSyncFeatureEnabled() below - // and consider if it can be removed, since GetSelectedTypes() deals well - // with all sign-in states. +bool PersonalDataManager::IsSyncFeatureEnabledForAutofill() const { + // TODO(crbug.com/1462552): Remove this method once ConsentLevel::kSync and + // SyncService::IsSyncFeatureEnabled() are deleted from the codebase. return sync_service_ != nullptr && sync_service_->IsSyncFeatureEnabled() && - sync_service_->GetUserSettings()->GetSelectedTypes().Has(data_type); + sync_service_->GetUserSettings()->GetSelectedTypes().Has( + syncer::UserSelectableType::kAutofill); } void PersonalDataManager::SetPaymentMethodsMandatoryReauthEnabled(
diff --git a/components/autofill/core/browser/personal_data_manager.h b/components/autofill/core/browser/personal_data_manager.h index e0291d0d..89841cc2 100644 --- a/components/autofill/core/browser/personal_data_manager.h +++ b/components/autofill/core/browser/personal_data_manager.h
@@ -620,8 +620,11 @@ // updates. Does nothing if the strike database is not available. void RemoveStrikesToBlockProfileUpdate(const std::string& guid); - // Returns true if Sync is enabled for `data_type`. - bool IsSyncEnabledFor(syncer::UserSelectableType data_type) const; + // Returns true if Sync-the-feature is enabled and + // UserSelectableType::kAutofill is among the user's selected data types. + // TODO(crbug.com/1462552): Remove this method once ConsentLevel::kSync and + // SyncService::IsSyncFeatureEnabled() are deleted from the codebase. + bool IsSyncFeatureEnabledForAutofill() const; // The functions below are related to the payments mandatory re-auth feature. // All of this functionality is done through per-profile per-device prefs.
diff --git a/components/autofill/core/browser/personal_data_manager_cleaner.cc b/components/autofill/core/browser/personal_data_manager_cleaner.cc index 7dc7ffc..81e98a9 100644 --- a/components/autofill/core/browser/personal_data_manager_cleaner.cc +++ b/components/autofill/core/browser/personal_data_manager_cleaner.cc
@@ -57,8 +57,10 @@ // If sync is enabled for autofill, defer running cleanups until address // sync and card sync have started; otherwise, do it now. - if (!personal_data_manager_->IsSyncEnabledFor( - syncer::UserSelectableType::kAutofill)) { + // TODO(crbug.com/1477292): This should also cover Sync-the-transport (not + // only Sync-the-feature), and for the credit card fixes, it should check + // whether Payments specifically is enabled, not the overall Autofill. + if (!personal_data_manager_->IsSyncFeatureEnabledForAutofill()) { ApplyAddressFixesAndCleanups(); ApplyCardFixesAndCleanups(); }
diff --git a/components/autofill_payments_strings.grdp b/components/autofill_payments_strings.grdp index 043f732..ce28dad 100644 --- a/components/autofill_payments_strings.grdp +++ b/components/autofill_payments_strings.grdp
@@ -975,4 +975,9 @@ All security codes saved on your device and in Google Account will be deleted </message> </if> + <if expr="is_android"> + <message name="IDS_AUTOFILL_SETTINGS_PAGE_BULK_REMOVE_CVC_LABEL" desc="Label for the payments settings page button that allows the user to bulk delete all the CVCs stored locally and on Google servers." formatter_data="android_java"> + Delete saved security codes + </message> + </if> </grit-part>
diff --git a/components/autofill_payments_strings_grdp/IDS_AUTOFILL_SETTINGS_PAGE_BULK_REMOVE_CVC_LABEL.png.sha1 b/components/autofill_payments_strings_grdp/IDS_AUTOFILL_SETTINGS_PAGE_BULK_REMOVE_CVC_LABEL.png.sha1 new file mode 100644 index 0000000..e5fe7a6 --- /dev/null +++ b/components/autofill_payments_strings_grdp/IDS_AUTOFILL_SETTINGS_PAGE_BULK_REMOVE_CVC_LABEL.png.sha1
@@ -0,0 +1 @@ +9100f442841411d6b30351256ad22457927dc841 \ No newline at end of file
diff --git a/components/capture_mode/BUILD.gn b/components/capture_mode/BUILD.gn index 4736268..460371e 100644 --- a/components/capture_mode/BUILD.gn +++ b/components/capture_mode/BUILD.gn
@@ -4,6 +4,8 @@ component("capture_mode") { sources = [ + "audio_capturer.cc", + "audio_capturer.h", "camera_video_frame_handler.cc", "camera_video_frame_handler.h", "capture_mode_export.h", @@ -16,6 +18,7 @@ "//components/viz/common", "//media", "//mojo/public/cpp/bindings", + "//services/audio/public/cpp", "//services/video_capture/public/mojom", "//ui/compositor", "//ui/gfx",
diff --git a/components/capture_mode/DEPS b/components/capture_mode/DEPS index e95c20c..33a51d1a 100644 --- a/components/capture_mode/DEPS +++ b/components/capture_mode/DEPS
@@ -9,6 +9,7 @@ "+gpu/ipc/common/gpu_memory_buffer_support.h", "+media", "+mojo/public", + "+services/audio/public/cpp/device_factory.h", "+services/video_capture/public", "+ui/compositor/compositor.h", "+ui/gfx",
diff --git a/chromeos/ash/services/recording/audio_capturer.cc b/components/capture_mode/audio_capturer.cc similarity index 97% rename from chromeos/ash/services/recording/audio_capturer.cc rename to components/capture_mode/audio_capturer.cc index adbd16c9..14cfb17 100644 --- a/chromeos/ash/services/recording/audio_capturer.cc +++ b/components/capture_mode/audio_capturer.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 "chromeos/ash/services/recording/audio_capturer.h" +#include "components/capture_mode/audio_capturer.h" #include "base/functional/bind.h" #include "base/sequence_checker.h" @@ -10,7 +10,7 @@ #include "media/base/audio_bus.h" #include "services/audio/public/cpp/device_factory.h" -namespace recording { +namespace capture_mode { namespace { @@ -108,4 +108,4 @@ audio_bus_pool_.InsertAudioBus(std::move(backing_audio_bus)); } -} // namespace recording +} // namespace capture_mode
diff --git a/chromeos/ash/services/recording/audio_capturer.h b/components/capture_mode/audio_capturer.h similarity index 90% rename from chromeos/ash/services/recording/audio_capturer.h rename to components/capture_mode/audio_capturer.h index 35fbf94..028dffc4 100644 --- a/chromeos/ash/services/recording/audio_capturer.h +++ b/components/capture_mode/audio_capturer.h
@@ -2,16 +2,16 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROMEOS_ASH_SERVICES_RECORDING_AUDIO_CAPTURER_H_ -#define CHROMEOS_ASH_SERVICES_RECORDING_AUDIO_CAPTURER_H_ +#ifndef COMPONENTS_CAPTURE_MODE_AUDIO_CAPTURER_H_ +#define COMPONENTS_CAPTURE_MODE_AUDIO_CAPTURER_H_ #include <memory> -#include "base/functional/callback_forward.h" #include "base/memory/weak_ptr.h" #include "base/sequence_checker.h" #include "base/strings/string_piece_forward.h" #include "base/time/time.h" +#include "components/capture_mode/capture_mode_export.h" #include "media/audio/audio_bus_pool.h" #include "media/base/audio_bus.h" #include "media/base/audio_capturer_source.h" @@ -19,7 +19,7 @@ #include "media/mojo/mojom/audio_stream_factory.mojom-forward.h" #include "mojo/public/cpp/bindings/pending_remote.h" -namespace recording { +namespace capture_mode { // Defines the type of the callback that will be triggered repeatedly by the // audio input device to deliver a stream of buffers containing the captured @@ -37,7 +37,8 @@ // underlying `AudioInputDevice` can communicate with audio service via IPC. The // provided `audio_params` will be used to initialize the underlying audio // capturer. `callback` will be invoked according to the rules specified above. -class AudioCapturer : public media::AudioCapturerSource::CaptureCallback { +class CAPTURE_MODE_EXPORT AudioCapturer + : public media::AudioCapturerSource::CaptureCallback { public: AudioCapturer(base::StringPiece device_id, mojo::PendingRemote<media::mojom::AudioStreamFactory> @@ -89,6 +90,6 @@ base::WeakPtrFactory<AudioCapturer> weak_ptr_factory_{this}; }; -} // namespace recording +} // namespace capture_mode -#endif // CHROMEOS_ASH_SERVICES_RECORDING_AUDIO_CAPTURER_H_ +#endif // COMPONENTS_CAPTURE_MODE_AUDIO_CAPTURER_H_
diff --git a/components/commerce/core/price_tracking_utils.cc b/components/commerce/core/price_tracking_utils.cc index 9b3c342..b61e2f7b3 100644 --- a/components/commerce/core/price_tracking_utils.cc +++ b/components/commerce/core/price_tracking_utils.cc
@@ -473,10 +473,12 @@ return nullptr; } - collection_node = model->AddFolder( - model->other_node(), model->other_node()->children().size(), - l10n_util::GetStringUTF16(IDS_SHOPPING_COLLECTION_FOLDER_NAME), nullptr, - absl::nullopt, collection_uuid); + if (!collection_node) { + collection_node = model->AddFolder( + model->other_node(), model->other_node()->children().size(), + l10n_util::GetStringUTF16(IDS_SHOPPING_COLLECTION_FOLDER_NAME), nullptr, + absl::nullopt, collection_uuid); + } return collection_node; }
diff --git a/components/constrained_window/constrained_window_views.cc b/components/constrained_window/constrained_window_views.cc index dc648ad1..819da6b0 100644 --- a/components/constrained_window/constrained_window_views.cc +++ b/components/constrained_window/constrained_window_views.cc
@@ -19,6 +19,7 @@ #include "ui/display/display.h" #include "ui/display/screen.h" #include "ui/views/bubble/bubble_dialog_model_host.h" +#include "ui/views/widget/native_widget.h" #include "ui/views/widget/widget.h" #include "ui/views/widget/widget_observer.h" #include "ui/views/window/dialog_delegate.h" @@ -32,6 +33,9 @@ using web_modal::ModalDialogHostObserver; namespace constrained_window { + +const void* kConstrainedWindowWidgetIdentifier = "ConstrainedWindowWidget"; + namespace { // Storage access for the currently active ConstrainedWindowViewsClient. @@ -213,9 +217,14 @@ << ", scheme=" << url.scheme_piece() << ", host=" << url.host_piece(); } - return views::DialogDelegate::CreateDialogWidget( + views::Widget* widget = views::DialogDelegate::CreateDialogWidget( dialog, nullptr, manager->delegate()->GetWebContentsModalDialogHost()->GetHostView()); + widget->SetNativeWindowProperty( + views::kWidgetIdentifierKey, + const_cast<void*>(kConstrainedWindowWidgetIdentifier)); + + return widget; } views::Widget* CreateBrowserModalDialogViews( @@ -234,6 +243,9 @@ parent ? CurrentClient()->GetDialogHostView(parent) : nullptr; views::Widget* widget = views::DialogDelegate::CreateDialogWidget(dialog, nullptr, parent_view); + widget->SetNativeWindowProperty( + views::kWidgetIdentifierKey, + const_cast<void*>(kConstrainedWindowWidgetIdentifier)); bool requires_positioning = dialog->use_custom_frame();
diff --git a/components/constrained_window/constrained_window_views.h b/components/constrained_window/constrained_window_views.h index e69b44d..5810ddc 100644 --- a/components/constrained_window/constrained_window_views.h +++ b/components/constrained_window/constrained_window_views.h
@@ -31,6 +31,8 @@ namespace constrained_window { +extern const void* kConstrainedWindowWidgetIdentifier; + class ConstrainedWindowViewsClient; // Sets the ConstrainedWindowClient impl.
diff --git a/components/cronet/android/BUILD.gn b/components/cronet/android/BUILD.gn index 700a2af..460cc2c 100644 --- a/components/cronet/android/BUILD.gn +++ b/components/cronet/android/BUILD.gn
@@ -398,6 +398,7 @@ android_library("cronet_impl_native_base_java") { sources = [ "java/src/org/chromium/net/httpflags/HttpFlagsLoader.java", + "java/src/org/chromium/net/httpflags/ResolvedFlags.java", "java/src/org/chromium/net/impl/BidirectionalStreamBuilderImpl.java", "java/src/org/chromium/net/impl/BidirectionalStreamNetworkException.java", "java/src/org/chromium/net/impl/CronetBidirectionalStream.java", @@ -1082,6 +1083,7 @@ "test/javatests/src/org/chromium/net/apihelpers/ContentTypeParametersParserTest.java", "test/javatests/src/org/chromium/net/apihelpers/UploadDataProvidersTest.java", "test/javatests/src/org/chromium/net/httpflags/HttpFlagsLoaderTest.java", + "test/javatests/src/org/chromium/net/httpflags/ResolvedFlagsTest.java", "test/javatests/src/org/chromium/net/impl/CronetLoggerTest.java", "test/javatests/src/org/chromium/net/impl/CronetManifestTest.java", "test/javatests/src/org/chromium/net/urlconnection/CronetBufferedOutputStreamTest.java",
diff --git a/components/cronet/android/java/src/org/chromium/net/httpflags/HttpFlagsLoader.java b/components/cronet/android/java/src/org/chromium/net/httpflags/HttpFlagsLoader.java index a907f8a..ab23e82ce 100644 --- a/components/cronet/android/java/src/org/chromium/net/httpflags/HttpFlagsLoader.java +++ b/components/cronet/android/java/src/org/chromium/net/httpflags/HttpFlagsLoader.java
@@ -15,6 +15,7 @@ import androidx.annotation.VisibleForTesting; import org.chromium.base.Log; +import org.chromium.net.impl.CronetManifest; import java.io.File; import java.io.FileInputStream; @@ -63,9 +64,16 @@ * * @return The contents of the flags file, or null if the flags file could not be loaded for any * reason. In the latter case, the callee will take care of logging the failure. + * + * @see ResolvedFlags */ @Nullable public static Flags load(Context context) { + if (!CronetManifest.shouldReadHttpFlags(context)) { + Log.d(TAG, "Not loading HTTP flags because they are disabled in the manifest"); + return null; + } + try { ApplicationInfo providerApplicationInfo = getProviderApplicationInfo(context); if (providerApplicationInfo == null) return null;
diff --git a/components/cronet/android/java/src/org/chromium/net/httpflags/ResolvedFlags.java b/components/cronet/android/java/src/org/chromium/net/httpflags/ResolvedFlags.java new file mode 100644 index 0000000..785abca --- /dev/null +++ b/components/cronet/android/java/src/org/chromium/net/httpflags/ResolvedFlags.java
@@ -0,0 +1,170 @@ +// 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.net.httpflags; + +import androidx.annotation.Nullable; + +import com.google.protobuf.ByteString; + +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; + +/** + * Holds the effective HTTP flags that apply to a given instance of the Cronet library. + * + * <p>Cronet business logic code is expected to use this class to enquire about the HTTP flag values + * that it should use. + */ +public final class ResolvedFlags { + /** + * Provides type-safe access to the value of a given HTTP flag. + * + * <p>This object can never hold a null flag value. + */ + public static final class Value { + public static enum Type { BOOL, INT, FLOAT, STRING, BYTES } + + private final Object mValue; + + @Nullable + private static Value resolve(FlagValue flagValue, String appId) { + for (var constrainedValue : flagValue.getConstrainedValuesList()) { + // TODO: add support for the `min_version` filter + if (constrainedValue.hasAppId() && !constrainedValue.getAppId().equals(appId)) { + continue; + } + return fromConstrainedValue(constrainedValue); + } + return null; + } + + private static Value fromConstrainedValue(FlagValue.ConstrainedValue constrainedValue) { + FlagValue.ConstrainedValue.ValueCase valueCase = constrainedValue.getValueCase(); + switch (valueCase) { + case BOOL_VALUE: + return new Value(constrainedValue.getBoolValue()); + case INT_VALUE: + return new Value(constrainedValue.getIntValue()); + case FLOAT_VALUE: + return new Value(constrainedValue.getFloatValue()); + case STRING_VALUE: + return new Value(constrainedValue.getStringValue()); + case BYTES_VALUE: + return new Value(constrainedValue.getBytesValue()); + case VALUE_NOT_SET: + return null; + default: + throw new IllegalArgumentException( + "Flag value uses unknown value type " + valueCase); + } + } + + private Value(Object value) { + mValue = value; + } + + public Type getType() { + if (mValue instanceof Boolean) { + return Type.BOOL; + } else if (mValue instanceof Long) { + return Type.INT; + } else if (mValue instanceof Float) { + return Type.FLOAT; + } else if (mValue instanceof String) { + return Type.STRING; + } else if (mValue instanceof ByteString) { + return Type.BYTES; + } else { + throw new IllegalStateException( + "Unexpected flag value type: " + mValue.getClass().getName()); + } + } + + private void checkType(Type requestedType) { + Type actualType = getType(); + if (requestedType != actualType) { + throw new IllegalStateException("Attempted to access flag value as " + requestedType + + ", but actual type is " + actualType); + } + } + + /** + * @throws IllegalStateException Iff {@link #getType} is not {@link Type#BOOL} + */ + public boolean getBoolValue() { + checkType(Type.BOOL); + return (Boolean) mValue; + } + /** + * @throws IllegalStateException Iff {@link #getType} is not {@link Type#INT} + */ + public long getIntValue() { + checkType(Type.INT); + return (Long) mValue; + } + /** + * @throws IllegalStateException Iff {@link #getType} is not {@link Type#FLOAT} + */ + public float getFloatValue() { + checkType(Type.FLOAT); + return (Float) mValue; + } + /** + * @throws IllegalStateException Iff {@link #getType} is not {@link Type#STRING} + */ + public String getStringValue() { + checkType(Type.STRING); + return (String) mValue; + } + /** + * @throws IllegalStateException Iff {@link #getType} is not {@link Type#BYTES} + */ + public ByteString getBytesValue() { + checkType(Type.BYTES); + return (ByteString) mValue; + } + } + + private final Map<String, Value> mFlags; + + /** + * Computes effective flag values based on the contents of a {@link Flags} proto. + * + * <p>This method will resolve {@link FlagValue.ConstrainedValue} filters according to the + * other arguments, producing the final values that should apply to the caller. + * + * <p>Note that a {@link FlagValue} that has no {@link FlagValue.ConstrainedValue} entry, or + * where the matching entry has no value set, will not be mentioned at all in the resulting + * {@link #flags}. + * + * @param flags The {@link Flags} proto to extract the flag values from. This would normally be + * the return value of {@link HttpFlagsLoader#load}. + * @param appId The App ID for resolving the {@link FlagValue.ConstrainedValue#getAppId} field. + * This would normally be the return value of + * {@link android.content.Context#getPackageName}. + */ + public static ResolvedFlags resolve(Flags flags, String appId) { + Map<String, Value> resolvedFlags = new HashMap<String, Value>(); + for (var flag : flags.getFlagsMap().entrySet()) { + Value value = Value.resolve(flag.getValue(), appId); + if (value == null) continue; + resolvedFlags.put(flag.getKey(), value); + } + return new ResolvedFlags(resolvedFlags); + } + + private ResolvedFlags(Map<String, Value> flags) { + mFlags = flags; + } + + /** + * @return The effective HTTP flag values, keyed by flag name. Neither keys nor values can be + * null. Only flags that have actual values are included in the result. + */ + public Map<String, Value> flags() { + return Collections.unmodifiableMap(mFlags); + } +}
diff --git a/components/cronet/android/java/src/org/chromium/net/impl/CronetManifest.java b/components/cronet/android/java/src/org/chromium/net/impl/CronetManifest.java index 111aa892..ddd7524 100644 --- a/components/cronet/android/java/src/org/chromium/net/impl/CronetManifest.java +++ b/components/cronet/android/java/src/org/chromium/net/impl/CronetManifest.java
@@ -44,6 +44,12 @@ static final String META_DATA_HOLDER_SERVICE_NAME = "android.net.http.MetaDataHolder"; @VisibleForTesting static final String ENABLE_TELEMETRY_META_DATA_KEY = "android.net.http.EnableTelemetry"; + // DO NOT ENABLE this manifest flag in production apps. The code gated behind this flag is not + // ready yet. + // TODO: remove the "Experimental" prefix once the code for reading HTTP flags is ready. + @VisibleForTesting + public static final String READ_HTTP_FLAGS_META_DATA_KEY = + "android.net.http.EXPERIMENTAL_ReadHttpFlags"; /** * @return True if telemetry should be enabled, based on the {@link @@ -57,6 +63,17 @@ } /** + * @return True if HTTP flags (typically used for experiments) should be enabled, based on the + * {@link #READ_HTTP_FLAGS_META_DATA_KEY} meta-data entry in the Android manifest. + * @see HttpFlagsLoader + */ + public static boolean shouldReadHttpFlags(Context context) { + // TODO: switch the default to true once we confirm the HTTP flags system is working as + // intended. + return getMetaData(context).getBoolean(READ_HTTP_FLAGS_META_DATA_KEY, /*default=*/false); + } + + /** * @return The meta-data contained within the Cronet meta-data holder service definition in the * Android manifest, or an empty Bundle if there is no such definition. Never returns null. */
diff --git a/components/cronet/android/test/javatests/src/org/chromium/net/httpflags/HttpFlagsLoaderTest.java b/components/cronet/android/test/javatests/src/org/chromium/net/httpflags/HttpFlagsLoaderTest.java index dd8a6ea1..f8bb82e 100644 --- a/components/cronet/android/test/javatests/src/org/chromium/net/httpflags/HttpFlagsLoaderTest.java +++ b/components/cronet/android/test/javatests/src/org/chromium/net/httpflags/HttpFlagsLoaderTest.java
@@ -7,6 +7,8 @@ import static com.google.common.truth.Truth.assertThat; +import android.os.Bundle; + import androidx.test.ext.junit.runners.AndroidJUnit4; import androidx.test.filters.SmallTest; @@ -19,6 +21,8 @@ import org.chromium.net.CronetTestRule; import org.chromium.net.CronetTestRule.CronetTestFramework; import org.chromium.net.CronetTestRule.OnlyRunNativeCronet; +import org.chromium.net.impl.CronetManifest; +import org.chromium.net.impl.CronetManifestInterceptor; /** * Tests {@link HttpFlagsLoader} @@ -35,10 +39,17 @@ mCronetTestFramework = mTestRule.getTestFramework(); } + private void setShouldReadHttpFlagsInManifest(boolean value) { + Bundle metaData = new Bundle(); + metaData.putBoolean(CronetManifest.READ_HTTP_FLAGS_META_DATA_KEY, value); + mCronetTestFramework.interceptContext(new CronetManifestInterceptor(metaData)); + } + @Test @SmallTest @OnlyRunNativeCronet public void testLoad_returnsNullIfNoFlags() { + setShouldReadHttpFlagsInManifest(true); mCronetTestFramework.setHttpFlags(null); assertThat(HttpFlagsLoader.load(mCronetTestFramework.getContext())).isNull(); } @@ -47,6 +58,7 @@ @SmallTest @OnlyRunNativeCronet public void testLoad_returnsFileFlagContents() { + setShouldReadHttpFlagsInManifest(true); Flags flags = Flags.newBuilder() .putFlags("test_flag_name", FlagValue.newBuilder() @@ -59,4 +71,13 @@ mCronetTestFramework.setHttpFlags(flags); assertThat(HttpFlagsLoader.load(mCronetTestFramework.getContext())).isEqualTo(flags); } + + @Test + @SmallTest + @OnlyRunNativeCronet + public void testLoad_returnsNullIfDisabledInManifest() { + setShouldReadHttpFlagsInManifest(false); + mCronetTestFramework.setHttpFlags(Flags.newBuilder().build()); + assertThat(HttpFlagsLoader.load(mCronetTestFramework.getContext())).isNull(); + } }
diff --git a/components/cronet/android/test/javatests/src/org/chromium/net/httpflags/ResolvedFlagsTest.java b/components/cronet/android/test/javatests/src/org/chromium/net/httpflags/ResolvedFlagsTest.java new file mode 100644 index 0000000..665203f3 --- /dev/null +++ b/components/cronet/android/test/javatests/src/org/chromium/net/httpflags/ResolvedFlagsTest.java
@@ -0,0 +1,369 @@ +// 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.net.httpflags; + +import static com.google.common.truth.Truth.assertThat; + +import static org.junit.Assert.assertThrows; + +import androidx.test.ext.junit.runners.AndroidJUnit4; +import androidx.test.filters.SmallTest; + +import com.google.common.truth.Correspondence; +import com.google.protobuf.ByteString; + +import org.junit.Test; +import org.junit.runner.RunWith; + +import org.chromium.base.test.util.Batch; + +/** + * Tests {@link ResolvedFlags} + */ +@Batch(Batch.UNIT_TESTS) +@RunWith(AndroidJUnit4.class) +public final class ResolvedFlagsTest { + private static final Correspondence<ResolvedFlags.Value, String> FLAG_STRING_VALUE_EQUALS = + Correspondence.transforming( + ResolvedFlags.Value::getStringValue, "has a string value of"); + + private static FlagValue.ConstrainedValue.Builder stringConstrainedValue(String value) { + return FlagValue.ConstrainedValue.newBuilder().setStringValue(value); + } + + private static Flags singleFlag(String flagName, FlagValue.Builder flagValue) { + return Flags.newBuilder().putFlags(flagName, flagValue.build()).build(); + } + + @Test + @SmallTest + public void testResolve_emptyOnEmptyProto() { + assertThat(ResolvedFlags.resolve(Flags.newBuilder().build(), "test_app_id").flags()) + .isEmpty(); + } + + @Test + @SmallTest + public void testResolve_returnsAllFlags() { + assertThat(ResolvedFlags + .resolve(Flags.newBuilder() + .putFlags("test_flag_1", + FlagValue.newBuilder() + .addConstrainedValues( + stringConstrainedValue( + "test_flag_1_value")) + .build()) + .putFlags("test_flag_2", + FlagValue.newBuilder() + .addConstrainedValues( + stringConstrainedValue( + "test_flag_2_value")) + .build()) + .build(), + "test_app_id") + .flags()) + .comparingValuesUsing(FLAG_STRING_VALUE_EQUALS) + .containsExactly( + "test_flag_1", "test_flag_1_value", "test_flag_2", "test_flag_2_value"); + } + + @Test + @SmallTest + public void testResolve_doesNotReturnFlagWithEmptyConstrainedValue() { + assertThat(ResolvedFlags + .resolve(singleFlag("test_flag", + FlagValue.newBuilder().addConstrainedValues( + FlagValue.ConstrainedValue.newBuilder())), + "test_app_id") + .flags()) + .isEmpty(); + } + + @Test + @SmallTest + public void testResolve_doesNotReturnFlagWithNoConstrainedValues() { + assertThat(ResolvedFlags + .resolve(singleFlag("test_flag", FlagValue.newBuilder()), "test_app_id") + .flags()) + .isEmpty(); + } + + @Test + @SmallTest + public void testResolve_returnsFlagThatMatchesAppId() { + assertThat(ResolvedFlags + .resolve(singleFlag("test_flag", + FlagValue.newBuilder().addConstrainedValues( + stringConstrainedValue("test_flag_value") + .setAppId("test_app_id"))), + "test_app_id") + .flags()) + .comparingValuesUsing(FLAG_STRING_VALUE_EQUALS) + .containsExactly("test_flag", "test_flag_value"); + } + + @Test + @SmallTest + public void testResolve_doesNotReturnFlagThatDoesNotMatchAppId() { + assertThat(ResolvedFlags + .resolve(singleFlag("test_flag", + FlagValue.newBuilder().addConstrainedValues( + stringConstrainedValue("test_flag_value") + .setAppId("nonmatching_app_id"))), + "test_app_id") + .flags()) + .isEmpty(); + } + + @Test + @SmallTest + public void testResolve_returnsOnlyMatchingConstrainedValue() { + FlagValue.ConstrainedValue matching_value = + stringConstrainedValue("matching_test_flag_value").setAppId("test_app_id").build(); + FlagValue.ConstrainedValue nonmatching_value = + stringConstrainedValue("nonmatching_test_flag_value") + .setAppId("nonmatching_app_id") + .build(); + + assertThat(ResolvedFlags + .resolve(singleFlag("test_flag", + FlagValue.newBuilder() + .addConstrainedValues(matching_value) + .addConstrainedValues(nonmatching_value)), + "test_app_id") + .flags()) + .comparingValuesUsing(FLAG_STRING_VALUE_EQUALS) + .containsExactly("test_flag", "matching_test_flag_value"); + assertThat(ResolvedFlags + .resolve(singleFlag("test_flag", + FlagValue.newBuilder() + .addConstrainedValues(nonmatching_value) + .addConstrainedValues(matching_value)), + "test_app_id") + .flags()) + .comparingValuesUsing(FLAG_STRING_VALUE_EQUALS) + .containsExactly("test_flag", "matching_test_flag_value"); + } + + @Test + @SmallTest + public void testResolve_returnsFirstMatchingConstrainedValue() { + assertThat(ResolvedFlags + .resolve(singleFlag("test_flag", + FlagValue.newBuilder() + .addConstrainedValues(stringConstrainedValue( + "test_flag_value_1")) + .addConstrainedValues(stringConstrainedValue( + "test_flag_value_2"))), + "test_app_id") + .flags()) + .comparingValuesUsing(FLAG_STRING_VALUE_EQUALS) + .containsExactly("test_flag", "test_flag_value_1"); + } + + @Test + @SmallTest + public void testResolve_doesNotReturnFlagIfMatchingValueIsEmpty() { + assertThat(ResolvedFlags + .resolve(singleFlag("test_flag", + FlagValue.newBuilder() + .addConstrainedValues( + FlagValue.ConstrainedValue.newBuilder()) + .addConstrainedValues(stringConstrainedValue( + "test_flag_value_should_be_skipped"))), + "test_app_id") + .flags()) + .isEmpty(); + } + + @Test + @SmallTest + public void testResolve_returnsFalseValue() { + ResolvedFlags.Value value = + ResolvedFlags + .resolve(singleFlag("test_flag", + FlagValue.newBuilder().addConstrainedValues( + FlagValue.ConstrainedValue.newBuilder() + .setBoolValue(false))), + "test_app_id") + .flags() + .get("test_flag"); + assertThat(value).isNotNull(); + assertThat(value.getType()).isEqualTo(ResolvedFlags.Value.Type.BOOL); + assertThat(value.getBoolValue()).isFalse(); + } + + @Test + @SmallTest + public void testResolve_returnsTrueValue() { + ResolvedFlags.Value value = + ResolvedFlags + .resolve(singleFlag("test_flag", + FlagValue.newBuilder().addConstrainedValues( + FlagValue.ConstrainedValue.newBuilder() + .setBoolValue(true))), + "test_app_id") + .flags() + .get("test_flag"); + assertThat(value).isNotNull(); + assertThat(value.getType()).isEqualTo(ResolvedFlags.Value.Type.BOOL); + assertThat(value.getBoolValue()).isTrue(); + } + + @Test + @SmallTest + public void testResolve_returnsZeroIntValue() { + ResolvedFlags.Value value = + ResolvedFlags + .resolve( + singleFlag("test_flag", + FlagValue.newBuilder().addConstrainedValues( + FlagValue.ConstrainedValue.newBuilder().setIntValue( + 0))), + "test_app_id") + .flags() + .get("test_flag"); + assertThat(value).isNotNull(); + assertThat(value.getType()).isEqualTo(ResolvedFlags.Value.Type.INT); + assertThat(value.getIntValue()).isEqualTo(0); + } + + @Test + @SmallTest + public void testResolve_returnsNonZeroIntValue() { + ResolvedFlags.Value value = + ResolvedFlags + .resolve( + singleFlag("test_flag", + FlagValue.newBuilder().addConstrainedValues( + FlagValue.ConstrainedValue.newBuilder().setIntValue( + 42))), + "test_app_id") + .flags() + .get("test_flag"); + assertThat(value).isNotNull(); + assertThat(value.getType()).isEqualTo(ResolvedFlags.Value.Type.INT); + assertThat(value.getIntValue()).isEqualTo(42); + } + + @Test + @SmallTest + public void testResolve_returnsZeroFloatValue() { + ResolvedFlags.Value value = + ResolvedFlags + .resolve(singleFlag("test_flag", + FlagValue.newBuilder().addConstrainedValues( + FlagValue.ConstrainedValue.newBuilder() + .setFloatValue(0))), + "test_app_id") + .flags() + .get("test_flag"); + assertThat(value).isNotNull(); + assertThat(value.getType()).isEqualTo(ResolvedFlags.Value.Type.FLOAT); + assertThat(value.getFloatValue()).isEqualTo(0f); + } + + @Test + @SmallTest + public void testResolve_returnsNonZeroFloatValue() { + ResolvedFlags.Value value = + ResolvedFlags + .resolve(singleFlag("test_flag", + FlagValue.newBuilder().addConstrainedValues( + FlagValue.ConstrainedValue.newBuilder() + .setFloatValue(42))), + "test_app_id") + .flags() + .get("test_flag"); + assertThat(value).isNotNull(); + assertThat(value.getType()).isEqualTo(ResolvedFlags.Value.Type.FLOAT); + assertThat(value.getFloatValue()).isEqualTo(42f); + } + + @Test + @SmallTest + public void testResolve_returnsEmptyStringValue() { + ResolvedFlags.Value value = + ResolvedFlags + .resolve(singleFlag("test_flag", + FlagValue.newBuilder().addConstrainedValues( + FlagValue.ConstrainedValue.newBuilder() + .setStringValue(""))), + "test_app_id") + .flags() + .get("test_flag"); + assertThat(value).isNotNull(); + assertThat(value.getType()).isEqualTo(ResolvedFlags.Value.Type.STRING); + assertThat(value.getStringValue()).isEqualTo(""); + } + + @Test + @SmallTest + public void testResolve_returnsNonEmptyStringValue() { + ResolvedFlags.Value value = + ResolvedFlags + .resolve(singleFlag("test_flag", + FlagValue.newBuilder().addConstrainedValues( + FlagValue.ConstrainedValue.newBuilder() + .setStringValue("test_string_value"))), + "test_app_id") + .flags() + .get("test_flag"); + assertThat(value).isNotNull(); + assertThat(value.getType()).isEqualTo(ResolvedFlags.Value.Type.STRING); + assertThat(value.getStringValue()).isEqualTo("test_string_value"); + } + + @Test + @SmallTest + public void testResolve_returnsEmptyBytesValue() { + ResolvedFlags.Value value = + ResolvedFlags + .resolve(singleFlag("test_flag", + FlagValue.newBuilder().addConstrainedValues( + FlagValue.ConstrainedValue.newBuilder() + .setBytesValue(ByteString.EMPTY))), + "test_app_id") + .flags() + .get("test_flag"); + assertThat(value).isNotNull(); + assertThat(value.getType()).isEqualTo(ResolvedFlags.Value.Type.BYTES); + assertThat(value.getBytesValue()).isEqualTo(ByteString.EMPTY); + } + + @Test + @SmallTest + public void testResolve_returnsNonEmptyBytesValue() { + ByteString byteString = ByteString.copyFrom(new byte[] {0, 1, 2, 42, -128, 127}); + ResolvedFlags.Value value = + ResolvedFlags + .resolve(singleFlag("test_flag", + FlagValue.newBuilder().addConstrainedValues( + FlagValue.ConstrainedValue.newBuilder() + .setBytesValue(byteString))), + "test_app_id") + .flags() + .get("test_flag"); + assertThat(value).isNotNull(); + assertThat(value.getType()).isEqualTo(ResolvedFlags.Value.Type.BYTES); + assertThat(value.getBytesValue()).isEqualTo(byteString); + } + + @Test + @SmallTest + public void testResolve_throwsOnWrongTypeAccess() { + ResolvedFlags.Value value = + ResolvedFlags + .resolve(singleFlag("test_flag", + FlagValue.newBuilder().addConstrainedValues( + FlagValue.ConstrainedValue.newBuilder() + .setStringValue("test_string"))), + "test_app_id") + .flags() + .get("test_flag"); + assertThat(value.getType()).isEqualTo(ResolvedFlags.Value.Type.STRING); + assertThrows(IllegalStateException.class, () -> { value.getIntValue(); }); + } +}
diff --git a/components/cronet/android/test/javatests/src/org/chromium/net/impl/CronetManifestInterceptor.java b/components/cronet/android/test/javatests/src/org/chromium/net/impl/CronetManifestInterceptor.java index b63c1ae..c7906f6 100644 --- a/components/cronet/android/test/javatests/src/org/chromium/net/impl/CronetManifestInterceptor.java +++ b/components/cronet/android/test/javatests/src/org/chromium/net/impl/CronetManifestInterceptor.java
@@ -20,7 +20,7 @@ * * @see org.chromium.net.impl.CronetManifest */ -final class CronetManifestInterceptor implements ContextInterceptor { +public final class CronetManifestInterceptor implements ContextInterceptor { private final Bundle mMetaData; /**
diff --git a/components/cronet/android/test/javatests/src/org/chromium/net/impl/CronetManifestTest.java b/components/cronet/android/test/javatests/src/org/chromium/net/impl/CronetManifestTest.java index 7180170..23feca693 100644 --- a/components/cronet/android/test/javatests/src/org/chromium/net/impl/CronetManifestTest.java +++ b/components/cronet/android/test/javatests/src/org/chromium/net/impl/CronetManifestTest.java
@@ -4,6 +4,7 @@ package org.chromium.net.impl; +import static com.google.common.truth.Truth.assertThat; import static com.google.common.truth.Truth.assertWithMessage; import android.os.Bundle; @@ -107,4 +108,30 @@ .isFalse(); } } + + private void setReadHttpFlags(boolean value) { + Bundle metaData = new Bundle(); + metaData.putBoolean(CronetManifest.READ_HTTP_FLAGS_META_DATA_KEY, value); + mCronetTestFramework.interceptContext(new CronetManifestInterceptor(metaData)); + } + + @Test + @SmallTest + public void testShouldReadHttpFlags_whenNoMetadata() throws Exception { + assertThat(CronetManifest.shouldReadHttpFlags(mCronetTestFramework.getContext())).isFalse(); + } + + @Test + @SmallTest + public void testShouldReadHttpFlags_whenMetadataIsTrue() throws Exception { + setReadHttpFlags(true); + assertThat(CronetManifest.shouldReadHttpFlags(mCronetTestFramework.getContext())).isTrue(); + } + + @Test + @SmallTest + public void testShouldReadHttpFlags_whenMetadataIsFalse() throws Exception { + setReadHttpFlags(false); + assertThat(CronetManifest.shouldReadHttpFlags(mCronetTestFramework.getContext())).isFalse(); + } }
diff --git a/components/cross_device/DIR_METADATA b/components/cross_device/DIR_METADATA new file mode 100644 index 0000000..a692f60 --- /dev/null +++ b/components/cross_device/DIR_METADATA
@@ -0,0 +1,3 @@ +buganizer { + component_id: 1108889 +}
diff --git a/components/cross_device/OWNERS b/components/cross_device/OWNERS new file mode 100644 index 0000000..cedfca3 --- /dev/null +++ b/components/cross_device/OWNERS
@@ -0,0 +1,3 @@ +hansberry@chromium.org +julietlevesque@google.com +akingsb@google.com
diff --git a/components/cross_device/logging/BUILD.gn b/components/cross_device/logging/BUILD.gn new file mode 100644 index 0000000..38f4057 --- /dev/null +++ b/components/cross_device/logging/BUILD.gn
@@ -0,0 +1,24 @@ +# 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. + +source_set("logging") { + sources = [ + "log_buffer.cc", + "log_buffer.h", + "logging.cc", + "logging.h", + ] + deps = [ "//base" ] +} + +source_set("unit_tests") { + testonly = true + sources = [ "logging_unittest.cc" ] + + deps = [ + ":logging", + "//base/test:test_support", + "//testing/gtest", + ] +}
diff --git a/components/cross_device/logging/log_buffer.cc b/components/cross_device/logging/log_buffer.cc new file mode 100644 index 0000000..b11bd0a --- /dev/null +++ b/components/cross_device/logging/log_buffer.cc
@@ -0,0 +1,68 @@ +// 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 "components/cross_device/logging/log_buffer.h" +#include "base/no_destructor.h" + +namespace { + +// The maximum number of logs that can be stored in the buffer. +constexpr size_t kMaxBufferSize = 10000; + +} // namespace + +CrossDeviceLogBuffer::LogMessage::LogMessage(const std::string& text, + Feature feature, + base::Time time, + const std::string& file, + int line, + logging::LogSeverity severity) + : text(text), + feature(feature), + time(time), + file(file), + line(line), + severity(severity) {} + +CrossDeviceLogBuffer::LogMessage::LogMessage(const LogMessage& message) = + default; +CrossDeviceLogBuffer::CrossDeviceLogBuffer() = default; + +CrossDeviceLogBuffer::~CrossDeviceLogBuffer() = default; + +CrossDeviceLogBuffer* CrossDeviceLogBuffer::GetInstance() { + static base::NoDestructor<CrossDeviceLogBuffer> log_buffer; + return log_buffer.get(); +} + +void CrossDeviceLogBuffer::AddObserver(Observer* observer) { + observers_.AddObserver(observer); +} + +void CrossDeviceLogBuffer::RemoveObserver(Observer* observer) { + observers_.RemoveObserver(observer); +} + +void CrossDeviceLogBuffer::AddLogMessage(const LogMessage& log_message) { + log_messages_.push_back(log_message); + if (log_messages_.size() > MaxBufferSize()) { + log_messages_.pop_front(); + } + + for (auto& observer : observers_) { + observer.OnLogMessageAdded(log_message); + } +} + +void CrossDeviceLogBuffer::Clear() { + log_messages_.clear(); + + for (auto& observer : observers_) { + observer.OnCrossDeviceLogBufferCleared(); + } +} + +size_t CrossDeviceLogBuffer::MaxBufferSize() const { + return kMaxBufferSize; +}
diff --git a/components/cross_device/logging/log_buffer.h b/components/cross_device/logging/log_buffer.h new file mode 100644 index 0000000..fe7a3f4 --- /dev/null +++ b/components/cross_device/logging/log_buffer.h
@@ -0,0 +1,86 @@ +// 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 COMPONENTS_CROSS_DEVICE_LOGGING_LOG_BUFFER_H_ +#define COMPONENTS_CROSS_DEVICE_LOGGING_LOG_BUFFER_H_ + +#include <stddef.h> + +#include <list> + +#include "base/logging.h" +#include "base/observer_list.h" +#include "base/time/time.h" + +enum class Feature { + NS = 0, + NC = 1, + NP = 2, + FP = 3, +}; + +// Contains logs specific to Nearby Sharing. This buffer has a maximum size +// and will discard entries in FIFO order. +// Call CrossDeviceLogBuffer::GetInstance() to get the global +// CrossDeviceLogBuffer instance. +class CrossDeviceLogBuffer { + public: + // Represents a single log entry in the log buffer. + struct LogMessage { + const std::string text; + Feature feature; + base::Time time; + const std::string file; + int line; + const logging::LogSeverity severity; + + LogMessage(const std::string& text, + Feature feature, + base::Time time, + const std::string& file, + int line, + logging::LogSeverity severity); + LogMessage(const LogMessage&); + }; + + class Observer { + public: + // Called when a new message is added to the log buffer. + virtual void OnLogMessageAdded(const LogMessage& log_message) = 0; + + // Called when all messages in the log buffer are cleared. + virtual void OnCrossDeviceLogBufferCleared() = 0; + }; + + CrossDeviceLogBuffer(); + CrossDeviceLogBuffer(const CrossDeviceLogBuffer&) = delete; + CrossDeviceLogBuffer& operator=(const CrossDeviceLogBuffer&) = delete; + ~CrossDeviceLogBuffer(); + + // Returns the global instance. + static CrossDeviceLogBuffer* GetInstance(); + + // Adds and removes log buffer observers. + void AddObserver(Observer* observer); + void RemoveObserver(Observer* observer); + + // Adds a new log message to the buffer. If the number of log messages exceeds + // the maximum, then the earliest added log will be removed. + void AddLogMessage(const LogMessage& log_message); + + // Clears all logs in the buffer. + void Clear(); + + // Returns the maximum number of logs that can be stored. + size_t MaxBufferSize() const; + + // Returns the list of logs in the buffer. + const std::list<LogMessage>* logs() { return &log_messages_; } + + private: + std::list<LogMessage> log_messages_; + base::ObserverList<Observer>::Unchecked observers_; +}; + +#endif // COMPONENTS_CROSS_DEVICE_LOGGING_LOG_BUFFER_H_
diff --git a/components/cross_device/logging/logging.cc b/components/cross_device/logging/logging.cc new file mode 100644 index 0000000..f23d729b --- /dev/null +++ b/components/cross_device/logging/logging.cc
@@ -0,0 +1,32 @@ +// 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 "components/cross_device/logging/logging.h" +#include "base/command_line.h" + +CrossDeviceScopedLogMessage::CrossDeviceScopedLogMessage( + const char* file, + int line, + logging::LogSeverity severity, + Feature feature) + : file_(file), feature_(feature), line_(line), severity_(severity) {} + +CrossDeviceScopedLogMessage::~CrossDeviceScopedLogMessage() { + const std::string string_from_stream = stream_.str(); + CrossDeviceLogBuffer::GetInstance()->AddLogMessage( + CrossDeviceLogBuffer::LogMessage(string_from_stream, feature_, + base::Time::Now(), file_, line_, + severity_)); + + // Don't emit VERBOSE-level logging to the standard logging system. + if (severity_ <= logging::LOGGING_VERBOSE && + logging::GetVlogLevelHelper(file_, strlen(file_) + 1) <= 0) { + return; + } + + // The destructor of |log_message| also creates a log for the standard logging + // system. + logging::LogMessage log_message(file_, line_, severity_); + log_message.stream() << string_from_stream; +}
diff --git a/components/cross_device/logging/logging.h b/components/cross_device/logging/logging.h new file mode 100644 index 0000000..3ca30a6 --- /dev/null +++ b/components/cross_device/logging/logging.h
@@ -0,0 +1,46 @@ +// 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 COMPONENTS_CROSS_DEVICE_LOGGING_LOGGING_H_ +#define COMPONENTS_CROSS_DEVICE_LOGGING_LOGGING_H_ + +#include <sstream> + +#include "base/logging.h" +#include "components/cross_device/logging/log_buffer.h" + +// Use the CD_LOG() macro for all logging related to Cross Device Features so +// the debug page can reflect all logs related to this feature in the internal +// debug WebUI (chrome://nearby-internals). +#define CD_LOG(severity, feature) \ + CrossDeviceScopedLogMessage(__FILE__, __LINE__, logging::LOG_##severity, \ + feature) \ + .stream() + +// An intermediate object used by the CD_LOG macro, wrapping a +// logging::LogMessage instance. When this object is destroyed, the message will +// be logged with the standard logging system and also added to Nearby Sharing +// specific log buffer. +class CrossDeviceScopedLogMessage { + public: + CrossDeviceScopedLogMessage(const char* file, + int line, + logging::LogSeverity severity, + Feature feature); + CrossDeviceScopedLogMessage(const CrossDeviceScopedLogMessage&) = delete; + CrossDeviceScopedLogMessage& operator=(const CrossDeviceScopedLogMessage&) = + delete; + ~CrossDeviceScopedLogMessage(); + + std::ostream& stream() { return stream_; } + + private: + const char* file_; + Feature feature_; + int line_; + logging::LogSeverity severity_; + std::ostringstream stream_; +}; + +#endif // COMPONENTS_CROSS_DEVICE_LOGGING_LOGGING_H_
diff --git a/components/cross_device/logging/logging_unittest.cc b/components/cross_device/logging/logging_unittest.cc new file mode 100644 index 0000000..7588a475 --- /dev/null +++ b/components/cross_device/logging/logging_unittest.cc
@@ -0,0 +1,130 @@ +// 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 <stddef.h> + +#include "base/no_destructor.h" +#include "base/numerics/safe_conversions.h" +#include "base/strings/string_number_conversions.h" +#include "testing/gtest/include/gtest/gtest.h" + +#include "components/cross_device/logging/log_buffer.h" +#include "components/cross_device/logging/logging.h" + +namespace { + +const char kLog1[] = "Mahogony destined to make a sturdy table"; +const char kLog2[] = "Construction grade cedar"; +const char kLog3[] = "Pine infested by hungry beetles"; +const char kLog4[] = "Unremarkable maple"; + +// Called for every log message added to the standard logging system. The new +// log is saved in |standard_logs| and consumed so it does not flood stdout. +std::vector<std::string>& GetStandardLogs() { + static base::NoDestructor<std::vector<std::string>> standard_logs; + return *standard_logs; +} + +bool HandleStandardLogMessage(int severity, + const char* file, + int line, + size_t message_start, + const std::string& str) { + GetStandardLogs().push_back(str); + return true; +} + +} // namespace + +class NearbyShareInternalsLoggingTest : public testing::Test { + public: + NearbyShareInternalsLoggingTest() = default; + + void SetUp() override { + CrossDeviceLogBuffer::GetInstance()->Clear(); + GetStandardLogs().clear(); + + previous_handler_ = logging::GetLogMessageHandler(); + logging::SetLogMessageHandler(&HandleStandardLogMessage); + } + + void TearDown() override { logging::SetLogMessageHandler(previous_handler_); } + + private: + logging::LogMessageHandlerFunction previous_handler_{nullptr}; +}; + +TEST_F(NearbyShareInternalsLoggingTest, LogsSavedToBuffer) { + int base_line_number = __LINE__; + CD_LOG(INFO, Feature::NS) << kLog1; + CD_LOG(WARNING, Feature::NS) << kLog2; + CD_LOG(ERROR, Feature::NS) << kLog3; + CD_LOG(VERBOSE, Feature::NS) << kLog3; + + auto* logs = CrossDeviceLogBuffer::GetInstance()->logs(); + ASSERT_EQ(4u, logs->size()); + + auto iterator = logs->begin(); + const CrossDeviceLogBuffer::LogMessage& log_message1 = *iterator; + EXPECT_EQ(kLog1, log_message1.text); + EXPECT_EQ(__FILE__, log_message1.file); + EXPECT_EQ(base_line_number + 1, log_message1.line); + EXPECT_EQ(logging::LOGGING_INFO, log_message1.severity); + + ++iterator; + const CrossDeviceLogBuffer::LogMessage& log_message2 = *iterator; + EXPECT_EQ(kLog2, log_message2.text); + EXPECT_EQ(__FILE__, log_message2.file); + EXPECT_EQ(base_line_number + 2, log_message2.line); + EXPECT_EQ(logging::LOGGING_WARNING, log_message2.severity); + + ++iterator; + const CrossDeviceLogBuffer::LogMessage& log_message3 = *iterator; + EXPECT_EQ(kLog3, log_message3.text); + EXPECT_EQ(__FILE__, log_message3.file); + EXPECT_EQ(base_line_number + 3, log_message3.line); + EXPECT_EQ(logging::LOGGING_ERROR, log_message3.severity); + + ++iterator; + const CrossDeviceLogBuffer::LogMessage& log_message4 = *iterator; + EXPECT_EQ(kLog3, log_message4.text); + EXPECT_EQ(__FILE__, log_message4.file); + EXPECT_EQ(base_line_number + 4, log_message4.line); + EXPECT_EQ(logging::LOGGING_VERBOSE, log_message4.severity); +} + +TEST_F(NearbyShareInternalsLoggingTest, LogWhenBufferIsFull) { + EXPECT_EQ(0u, CrossDeviceLogBuffer::GetInstance()->logs()->size()); + + for (size_t i = 0; i < CrossDeviceLogBuffer::GetInstance()->MaxBufferSize(); + ++i) { + CD_LOG(INFO, Feature::NS) << "log " << i; + } + + EXPECT_EQ(CrossDeviceLogBuffer::GetInstance()->MaxBufferSize(), + CrossDeviceLogBuffer::GetInstance()->logs()->size()); + CD_LOG(INFO, Feature::NS) << kLog1; + EXPECT_EQ(CrossDeviceLogBuffer::GetInstance()->MaxBufferSize(), + CrossDeviceLogBuffer::GetInstance()->logs()->size()); + + auto iterator = CrossDeviceLogBuffer::GetInstance()->logs()->begin(); + for (size_t i = 0; + i < CrossDeviceLogBuffer::GetInstance()->MaxBufferSize() - 1; + ++iterator, ++i) { + std::string expected_text = "log " + base::NumberToString(i + 1); + EXPECT_EQ(expected_text, (*iterator).text); + } +} + +TEST_F(NearbyShareInternalsLoggingTest, StandardLogsCreated) { + CD_LOG(INFO, Feature::NS) << kLog1; + CD_LOG(WARNING, Feature::NS) << kLog2; + CD_LOG(ERROR, Feature::NS) << kLog3; + CD_LOG(VERBOSE, Feature::NS) << kLog4; + + ASSERT_EQ(3u, GetStandardLogs().size()); + EXPECT_NE(std::string::npos, GetStandardLogs()[0].find(kLog1)); + EXPECT_NE(std::string::npos, GetStandardLogs()[1].find(kLog2)); + EXPECT_NE(std::string::npos, GetStandardLogs()[2].find(kLog3)); +}
diff --git a/components/embedder_support/android/metrics/java/src/org/chromium/components/metrics/AndroidMetricsServiceClient.java b/components/embedder_support/android/metrics/java/src/org/chromium/components/metrics/AndroidMetricsServiceClient.java index a6a76705..513702bb 100644 --- a/components/embedder_support/android/metrics/java/src/org/chromium/components/metrics/AndroidMetricsServiceClient.java +++ b/components/embedder_support/android/metrics/java/src/org/chromium/components/metrics/AndroidMetricsServiceClient.java
@@ -7,6 +7,7 @@ import android.content.Context; import android.content.pm.ApplicationInfo; +import org.chromium.base.BuildInfo; import org.chromium.base.ContextUtils; import org.chromium.base.ThreadUtils; import org.chromium.base.annotations.CalledByNative; @@ -29,14 +30,10 @@ } // Only record if it's a system app or it was installed from Play Store. Context ctx = ContextUtils.getApplicationContext(); - String packageName = ctx.getPackageName(); - if (packageName != null) { - if ((ctx.getApplicationInfo().flags & ApplicationInfo.FLAG_SYSTEM) != 0) { - return InstallerPackageType.SYSTEM_APP; - } else if (PLAY_STORE_PACKAGE_NAME.equals( - ctx.getPackageManager().getInstallerPackageName(packageName))) { - return InstallerPackageType.GOOGLE_PLAY_STORE; - } + if ((ctx.getApplicationInfo().flags & ApplicationInfo.FLAG_SYSTEM) != 0) { + return InstallerPackageType.SYSTEM_APP; + } else if (PLAY_STORE_PACKAGE_NAME.equals(BuildInfo.getInstance().installerPackageName)) { + return InstallerPackageType.GOOGLE_PLAY_STORE; } return InstallerPackageType.OTHER; } @@ -45,8 +42,7 @@ private static String getAppPackageName() { // Return this unconditionally; let native code enforce whether or not it's OK to include // this in the logs. - Context ctx = ContextUtils.getApplicationContext(); - return ctx.getPackageName(); + return BuildInfo.getInstance().hostPackageName; } public static void setInstallerPackageTypeForTesting(@InstallerPackageType int type) {
diff --git a/components/exo/wayland/zaura_shell.cc b/components/exo/wayland/zaura_shell.cc index ce3dc10b..b548a5e 100644 --- a/components/exo/wayland/zaura_shell.cc +++ b/components/exo/wayland/zaura_shell.cc
@@ -1358,7 +1358,7 @@ } // The aura shell resource associated with observer. - const raw_ptr<wl_resource, ExperimentalAsh> aura_shell_resource_; + const raw_ptr<wl_resource, DanglingUntriaged> aura_shell_resource_; const raw_ptr<Seat, ExperimentalAsh> seat_; bool last_has_focused_client_ = false;
diff --git a/components/exo/wayland/zaura_shell.h b/components/exo/wayland/zaura_shell.h index 589f632..4fd1d01 100644 --- a/components/exo/wayland/zaura_shell.h +++ b/components/exo/wayland/zaura_shell.h
@@ -200,7 +200,7 @@ void SetScaleFactor(float scale_factor); private: - raw_ptr<ShellSurfaceBase, ExperimentalAsh> shell_surface_; + raw_ptr<ShellSurfaceBase, DanglingUntriaged> shell_surface_; }; class AuraOutput : public WaylandDisplayObserver {
diff --git a/components/invalidation/OWNERS b/components/invalidation/OWNERS index b71a5d7..760f489 100644 --- a/components/invalidation/OWNERS +++ b/components/invalidation/OWNERS
@@ -1,4 +1,3 @@ -treib@chromium.org asumaneev@google.com rbock@google.com
diff --git a/components/optimization_guide/core/model_enums.h b/components/optimization_guide/core/model_enums.h index 5ff7c8f8..71b4b06 100644 --- a/components/optimization_guide/core/model_enums.h +++ b/components/optimization_guide/core/model_enums.h
@@ -76,9 +76,11 @@ kModelInKillSwitchList = 8, // Old model was removed due to new model update. kNewModelUpdate = 9, + // Model dir was inconsistent with local_state and removed at startup. + kInconsistentModelDir = 10, // Add new values above this line. - kMaxValue = kNewModelUpdate, + kMaxValue = kInconsistentModelDir, }; } // namespace optimization_guide
diff --git a/components/optimization_guide/core/model_store_metadata_entry.cc b/components/optimization_guide/core/model_store_metadata_entry.cc index 6425b9d0..b4cc056 100644 --- a/components/optimization_guide/core/model_store_metadata_entry.cc +++ b/components/optimization_guide/core/model_store_metadata_entry.cc
@@ -86,6 +86,36 @@ return ModelStoreMetadataEntry(metadata_entry); } +// static +std::set<base::FilePath> ModelStoreMetadataEntry::GetValidModelDirs( + PrefService* local_state) { + std::set<base::FilePath> valid_model_dirs; + for (const auto optimization_target_entry : + local_state->GetDict(prefs::localstate::kModelStoreMetadata)) { + if (!optimization_target_entry.second.is_dict()) { + continue; + } + auto optimization_target = + ParseOptimizationTarget(optimization_target_entry.first); + if (!optimization_target) { + continue; + } + for (auto model_cache_key_hash : + optimization_target_entry.second.GetDict()) { + if (!model_cache_key_hash.second.is_dict()) { + continue; + } + auto metadata = + ModelStoreMetadataEntry(&model_cache_key_hash.second.GetDict()); + auto model_base_dir = metadata.GetModelBaseDir(); + if (model_base_dir) { + valid_model_dirs.insert(*model_base_dir); + } + } + } + return valid_model_dirs; +} + ModelStoreMetadataEntry::ModelStoreMetadataEntry( const base::Value::Dict* metadata_entry) : metadata_entry_(metadata_entry) {}
diff --git a/components/optimization_guide/core/model_store_metadata_entry.h b/components/optimization_guide/core/model_store_metadata_entry.h index 621dd09..3dc8841 100644 --- a/components/optimization_guide/core/model_store_metadata_entry.h +++ b/components/optimization_guide/core/model_store_metadata_entry.h
@@ -33,6 +33,10 @@ proto::OptimizationTarget optimization_target, const proto::ModelCacheKey& model_cache_key); + // Returns the valid model dirs in the model store base dir, that were in sync + // with the `local_state`. + static std::set<base::FilePath> GetValidModelDirs(PrefService* local_state); + ModelStoreMetadataEntry& operator=(const ModelStoreMetadataEntry&) = delete; ~ModelStoreMetadataEntry();
diff --git a/components/optimization_guide/core/model_store_metadata_entry_unittest.cc b/components/optimization_guide/core/model_store_metadata_entry_unittest.cc index 70108607..87220cb 100644 --- a/components/optimization_guide/core/model_store_metadata_entry_unittest.cc +++ b/components/optimization_guide/core/model_store_metadata_entry_unittest.cc
@@ -10,6 +10,7 @@ #include "components/optimization_guide/core/optimization_guide_features.h" #include "components/optimization_guide/core/optimization_guide_prefs.h" #include "components/sync_preferences/testing_pref_service_syncable.h" +#include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" namespace optimization_guide { @@ -85,6 +86,17 @@ .AppendASCII("model_cache_key_bar")); updater.SetExpiryTime(expired_time); } + EXPECT_THAT( + ModelStoreMetadataEntry::GetValidModelDirs(local_state()), + testing::UnorderedElementsAre(base::FilePath::FromASCII("opt_target_foo") + .AppendASCII("model_cache_key_foo"), + base::FilePath::FromASCII("opt_target_foo") + .AppendASCII("model_cache_key_bar"), + base::FilePath::FromASCII("opt_target_bar") + .AppendASCII("model_cache_key_foo"), + base::FilePath::FromASCII("opt_target_bar") + .AppendASCII("model_cache_key_bar"))); + ModelStoreMetadataEntryUpdater::PurgeAllInactiveMetadata(local_state()); // All entries should be purged. @@ -96,6 +108,8 @@ local_state(), kTestOptimizationTargetFoo, model_cache_key_bar)); EXPECT_FALSE(ModelStoreMetadataEntry::GetModelMetadataEntryIfExists( local_state(), kTestOptimizationTargetBar, model_cache_key_bar)); + EXPECT_TRUE( + ModelStoreMetadataEntry::GetValidModelDirs(local_state()).empty()); } TEST_F(ModelStoreMetadataEntryTest, PurgeExpiredMetadata) { @@ -137,6 +151,17 @@ .AppendASCII("model_cache_key_bar")); updater.SetExpiryTime(expired_time); } + EXPECT_THAT( + ModelStoreMetadataEntry::GetValidModelDirs(local_state()), + testing::UnorderedElementsAre(base::FilePath::FromASCII("opt_target_foo") + .AppendASCII("model_cache_key_foo"), + base::FilePath::FromASCII("opt_target_foo") + .AppendASCII("model_cache_key_bar"), + base::FilePath::FromASCII("opt_target_bar") + .AppendASCII("model_cache_key_foo"), + base::FilePath::FromASCII("opt_target_bar") + .AppendASCII("model_cache_key_bar"))); + ModelStoreMetadataEntryUpdater::PurgeAllInactiveMetadata(local_state()); // Only expired entries will be purged. @@ -148,6 +173,12 @@ local_state(), kTestOptimizationTargetFoo, model_cache_key_bar)); EXPECT_FALSE(ModelStoreMetadataEntry::GetModelMetadataEntryIfExists( local_state(), kTestOptimizationTargetBar, model_cache_key_bar)); + EXPECT_THAT( + ModelStoreMetadataEntry::GetValidModelDirs(local_state()), + testing::UnorderedElementsAre(base::FilePath::FromASCII("opt_target_foo") + .AppendASCII("model_cache_key_foo"), + base::FilePath::FromASCII("opt_target_bar") + .AppendASCII("model_cache_key_foo"))); } TEST_F(ModelStoreMetadataEntryTest, PurgeMetadataInKillSwitch) {
diff --git a/components/optimization_guide/core/prediction_manager_unittest.cc b/components/optimization_guide/core/prediction_manager_unittest.cc index 463217ca..75e62c7 100644 --- a/components/optimization_guide/core/prediction_manager_unittest.cc +++ b/components/optimization_guide/core/prediction_manager_unittest.cc
@@ -660,6 +660,7 @@ prediction_model_store_ = PredictionModelStore::CreatePredictionModelStoreForTesting( local_state_prefs_.get(), temp_dir()); + RunUntilIdle(); } }
diff --git a/components/optimization_guide/core/prediction_model_store.cc b/components/optimization_guide/core/prediction_model_store.cc index edf2f09..d2252ea 100644 --- a/components/optimization_guide/core/prediction_model_store.cc +++ b/components/optimization_guide/core/prediction_model_store.cc
@@ -72,6 +72,56 @@ return static_cast<proto::OptimizationTarget>(optimization_target); } +void RemoveInvalidModelDirs(const base::FilePath& base_store_dir, + std::set<base::FilePath> valid_model_dirs) { + std::vector<base::FilePath> invalid_model_dirs; + base::FileEnumerator enumerator(base_store_dir, /*recursive=*/false, + base::FileEnumerator::DIRECTORIES); + for (base::FilePath optimization_target_dir = enumerator.Next(); + !optimization_target_dir.empty(); + optimization_target_dir = enumerator.Next()) { + proto::OptimizationTarget optimization_target = + ParseOptimizationTargetFromString( + optimization_target_dir.BaseName().AsUTF8Unsafe()); + if (optimization_target == proto::OPTIMIZATION_TARGET_UNKNOWN) { + // Remove the unknown dirs within the model store dir. This can + // potentially happen when the opt target is deprecated, and marked as + // reserved. + invalid_model_dirs.push_back(optimization_target_dir); + RecordPredictionModelStoreModelRemovalVersionHistogram( + proto::OPTIMIZATION_TARGET_UNKNOWN, + PredictionModelStoreModelRemovalReason::kInconsistentModelDir); + continue; + } + base::FileEnumerator model_cache_keys_enumerator( + optimization_target_dir, false, base::FileEnumerator::DIRECTORIES); + for (base::FilePath model_cache_key_dir = + model_cache_keys_enumerator.Next(); + !model_cache_key_dir.empty(); + model_cache_key_dir = model_cache_keys_enumerator.Next()) { + base::FileEnumerator models_enumerator(model_cache_key_dir, + /*recursive=*/false, + base::FileEnumerator::DIRECTORIES); + for (base::FilePath model_dir = models_enumerator.Next(); + !model_dir.empty(); model_dir = models_enumerator.Next()) { + DCHECK(model_dir.IsAbsolute()); + if (valid_model_dirs.find(ConvertToRelativePath( + base_store_dir, model_dir)) == valid_model_dirs.end()) { + invalid_model_dirs.push_back(model_dir); + RecordPredictionModelStoreModelRemovalVersionHistogram( + optimization_target, + PredictionModelStoreModelRemovalReason::kInconsistentModelDir); + } + } + } + } + // The invalid dirs can be removed immediately, since this is called at init. + for (const auto& invalid_model_dir : invalid_model_dirs) { + DCHECK(invalid_model_dir.IsAbsolute()); + base::DeletePathRecursively(invalid_model_dir); + } +} + void RecordModelStorageMetrics(const base::FilePath& base_store_dir) { base::FileEnumerator enumerator(base_store_dir, false, base::FileEnumerator::DIRECTORIES); @@ -139,6 +189,10 @@ CleanUpOldModelFiles(); background_task_runner_->PostTask( + FROM_HERE, + base::BindOnce(&RemoveInvalidModelDirs, base_store_dir_, + ModelStoreMetadataEntry::GetValidModelDirs(local_state_))); + background_task_runner_->PostTask( FROM_HERE, base::BindOnce(&RecordModelStorageMetrics, base_store_dir_)); }
diff --git a/components/optimization_guide/core/prediction_model_store_unittest.cc b/components/optimization_guide/core/prediction_model_store_unittest.cc index 7937a78..4800339b 100644 --- a/components/optimization_guide/core/prediction_model_store_unittest.cc +++ b/components/optimization_guide/core/prediction_model_store_unittest.cc
@@ -67,6 +67,7 @@ prediction_model_store_ = PredictionModelStore::CreatePredictionModelStoreForTesting( local_state_prefs_.get(), temp_models_dir_.GetPath()); + RunUntilIdle(); } void OnPredictionModelLoaded( @@ -522,4 +523,101 @@ 1); } +TEST_F(PredictionModelStoreTest, InconsistentModelDirsRemoved) { + base::HistogramTester histogram_tester; + auto model_cache_key = CreateModelCacheKey(kTestLocaleFoo); + + EXPECT_FALSE(prediction_model_store_->HasModel(kTestOptimizationTargetFoo, + model_cache_key)); + auto model_detail = + CreateTestModelFiles(kTestOptimizationTargetFoo, model_cache_key, {}); + prediction_model_store_->UpdateModel( + kTestOptimizationTargetFoo, model_cache_key, model_detail.model_info, + model_detail.base_model_dir, base::DoNothing()); + RunUntilIdle(); + EXPECT_TRUE(prediction_model_store_->HasModel(kTestOptimizationTargetFoo, + model_cache_key)); + + // Create some inconsistent model dirs that exist in the store, but not in the + // local state. + auto model_detail_inconsistent_foo = + CreateTestModelFiles(kTestOptimizationTargetFoo, model_cache_key, {}); + auto model_detail_inconsistent_bar = + CreateTestModelFiles(kTestOptimizationTargetBar, model_cache_key, {}); + EXPECT_TRUE(base::DirectoryExists(model_detail.base_model_dir)); + EXPECT_TRUE( + base::DirectoryExists(model_detail_inconsistent_foo.base_model_dir)); + EXPECT_TRUE( + base::DirectoryExists(model_detail_inconsistent_bar.base_model_dir)); + + // Recreate the store and it will remove the inconsistent model dirs. + prediction_model_store_ = + PredictionModelStore::CreatePredictionModelStoreForTesting( + local_state_prefs_.get(), temp_models_dir_.GetPath()); + RunUntilIdle(); + EXPECT_TRUE(prediction_model_store_->HasModel(kTestOptimizationTargetFoo, + model_cache_key)); + histogram_tester.ExpectUniqueSample( + "OptimizationGuide.PredictionModelStore.ModelRemovalReason", + PredictionModelStoreModelRemovalReason::kInconsistentModelDir, 2); + histogram_tester.ExpectUniqueSample( + "OptimizationGuide.PredictionModelStore.ModelRemovalReason." + + GetStringNameForOptimizationTarget(kTestOptimizationTargetFoo), + PredictionModelStoreModelRemovalReason::kInconsistentModelDir, 1); + histogram_tester.ExpectUniqueSample( + "OptimizationGuide.PredictionModelStore.ModelRemovalReason." + + GetStringNameForOptimizationTarget(kTestOptimizationTargetBar), + PredictionModelStoreModelRemovalReason::kInconsistentModelDir, 1); + EXPECT_TRUE(base::DirectoryExists(model_detail.base_model_dir)); + EXPECT_FALSE( + base::DirectoryExists(model_detail_inconsistent_foo.base_model_dir)); + EXPECT_FALSE( + base::DirectoryExists(model_detail_inconsistent_bar.base_model_dir)); +} + +TEST_F(PredictionModelStoreTest, InconsistentOptTargetDirsRemoved) { + base::HistogramTester histogram_tester; + auto model_cache_key = CreateModelCacheKey(kTestLocaleFoo); + + EXPECT_FALSE(prediction_model_store_->HasModel(kTestOptimizationTargetFoo, + model_cache_key)); + auto model_detail = + CreateTestModelFiles(kTestOptimizationTargetFoo, model_cache_key, {}); + prediction_model_store_->UpdateModel( + kTestOptimizationTargetFoo, model_cache_key, model_detail.model_info, + model_detail.base_model_dir, base::DoNothing()); + RunUntilIdle(); + EXPECT_TRUE(prediction_model_store_->HasModel(kTestOptimizationTargetFoo, + model_cache_key)); + EXPECT_TRUE(base::DirectoryExists(model_detail.base_model_dir)); + + // Create some invalid models and dirs within the model store dir. + auto model_detail_unknown = CreateTestModelFiles( + proto::OPTIMIZATION_TARGET_UNKNOWN, model_cache_key, {}); + EXPECT_TRUE(base::DirectoryExists(model_detail_unknown.base_model_dir)); + auto invalid_dir = temp_models_dir_.GetPath().AppendASCII("baz"); + base::CreateDirectory(invalid_dir); + base::WriteFile(invalid_dir.Append(GetBaseFileNameForModels()), ""); + EXPECT_TRUE(base::DirectoryExists(invalid_dir)); + + // Recreate the store and it will remove the inconsistent model dirs. + prediction_model_store_ = + PredictionModelStore::CreatePredictionModelStoreForTesting( + local_state_prefs_.get(), temp_models_dir_.GetPath()); + RunUntilIdle(); + EXPECT_TRUE(prediction_model_store_->HasModel(kTestOptimizationTargetFoo, + model_cache_key)); + histogram_tester.ExpectUniqueSample( + "OptimizationGuide.PredictionModelStore.ModelRemovalReason", + PredictionModelStoreModelRemovalReason::kInconsistentModelDir, 2); + histogram_tester.ExpectUniqueSample( + "OptimizationGuide.PredictionModelStore.ModelRemovalReason." + + GetStringNameForOptimizationTarget( + proto::OPTIMIZATION_TARGET_UNKNOWN), + PredictionModelStoreModelRemovalReason::kInconsistentModelDir, 2); + EXPECT_TRUE(base::DirectoryExists(model_detail.base_model_dir)); + EXPECT_FALSE(base::DirectoryExists(model_detail_unknown.base_model_dir)); + EXPECT_FALSE(base::DirectoryExists(invalid_dir)); +} + } // namespace optimization_guide
diff --git a/components/password_manager/core/browser/password_credential_filler_impl.cc b/components/password_manager/core/browser/password_credential_filler_impl.cc index 44e0fb8..8215cacc 100644 --- a/components/password_manager/core/browser/password_credential_filler_impl.cc +++ b/components/password_manager/core/browser/password_credential_filler_impl.cc
@@ -77,14 +77,13 @@ }; for (size_t i = username_index + 1; i < password_index; ++i) { - if (ShouldIgnoreField(form_data.fields[i])) { - continue; + if (!ShouldIgnoreField(form_data.fields[i])) { + return SubmissionReadinessState::kFieldBetweenUsernameAndPassword; } - return SubmissionReadinessState::kFieldBetweenUsernameAndPassword; } for (size_t i = password_index + 1; i < number_of_elements; ++i) { - if (form_data.fields[i].IsFocusable()) { + if (!ShouldIgnoreField(form_data.fields[i])) { return SubmissionReadinessState::kFieldAfterPasswordField; } }
diff --git a/components/password_manager/core/browser/password_credential_filler_impl_unittest.cc b/components/password_manager/core/browser/password_credential_filler_impl_unittest.cc index 21b0358e..1546a27 100644 --- a/components/password_manager/core/browser/password_credential_filler_impl_unittest.cc +++ b/components/password_manager/core/browser/password_credential_filler_impl_unittest.cc
@@ -41,14 +41,27 @@ MOCK_METHOD(const GURL&, GetLastCommittedURL, (), (const override)); }; -const FormData PrepareFormData(const std::vector<bool>& focusability_vector) { +enum class FormFieldFocusabilityType { + kFocusableInput, + kFocusableCheckbox, + kNonFocusableInput, +}; + +const FormData PrepareFormData( + const std::vector<FormFieldFocusabilityType>& focusability_vector) { FormData form; - base::ranges::transform(focusability_vector, std::back_inserter(form.fields), - [](bool is_focusable) { - autofill::FormFieldData field; - field.is_focusable = is_focusable; - return field; - }); + base::ranges::transform( + focusability_vector, std::back_inserter(form.fields), + [](FormFieldFocusabilityType type) { + autofill::FormFieldData field; + field.is_focusable = + (type == FormFieldFocusabilityType::kFocusableInput || + type == FormFieldFocusabilityType::kFocusableCheckbox); + field.form_control_type = + (type == FormFieldFocusabilityType::kFocusableCheckbox) ? "checkbox" + : "input"; + return field; + }); return form; } @@ -61,49 +74,77 @@ /*password_field_index=*/0, SubmissionReadinessState::kNoInformation), SubmissionReadinessState::kError}, - {SubmissionReadinessParams(PrepareFormData({false, false}), - /*username_field_index=*/2, - /*password_field_index=*/2, - SubmissionReadinessState::kNoInformation), + {SubmissionReadinessParams( + PrepareFormData({FormFieldFocusabilityType::kNonFocusableInput, + FormFieldFocusabilityType::kNonFocusableInput}), + /*username_field_index=*/2, + /*password_field_index=*/2, + SubmissionReadinessState::kNoInformation), SubmissionReadinessState::kError}, // There's no password field in this case, so expected // SubmissionReadiness is `kNoPasswordField`. - {SubmissionReadinessParams(PrepareFormData({true, true}), - /*username_field_index=*/0, - /*password_field_index=*/2, - SubmissionReadinessState::kNoInformation), + {SubmissionReadinessParams( + PrepareFormData({FormFieldFocusabilityType::kFocusableInput, + FormFieldFocusabilityType::kFocusableInput}), + /*username_field_index=*/0, + /*password_field_index=*/2, + SubmissionReadinessState::kNoInformation), SubmissionReadinessState::kNoPasswordField}, // There's no username field in this case, so expected // SubmissionReadiness is `kNoUsernameField`. - {SubmissionReadinessParams(PrepareFormData({true, true}), - /*username_field_index=*/2, - /*password_field_index=*/0, - SubmissionReadinessState::kNoInformation), + {SubmissionReadinessParams( + PrepareFormData({FormFieldFocusabilityType::kFocusableInput, + FormFieldFocusabilityType::kFocusableInput}), + /*username_field_index=*/2, + /*password_field_index=*/0, + SubmissionReadinessState::kNoInformation), SubmissionReadinessState::kNoUsernameField}, // There's a focusable field between username and password fields - {SubmissionReadinessParams(PrepareFormData({true, true, true}), - /*username_field_index=*/0, - /*password_field_index=*/2, - SubmissionReadinessState::kNoInformation), + {SubmissionReadinessParams( + PrepareFormData({FormFieldFocusabilityType::kFocusableInput, + FormFieldFocusabilityType::kFocusableInput, + FormFieldFocusabilityType::kFocusableInput}), + /*username_field_index=*/0, + /*password_field_index=*/2, + SubmissionReadinessState::kNoInformation), SubmissionReadinessState::kFieldBetweenUsernameAndPassword}, // There's an ignorable field between username and password fields. It's // doesn't matter if it's empty. - {SubmissionReadinessParams(PrepareFormData({true, false, true}), - /*username_field_index=*/0, - /*password_field_index=*/2, - SubmissionReadinessState::kNoInformation), + {SubmissionReadinessParams( + PrepareFormData({FormFieldFocusabilityType::kFocusableInput, + FormFieldFocusabilityType::kNonFocusableInput, + FormFieldFocusabilityType::kFocusableInput}), + /*username_field_index=*/0, + /*password_field_index=*/2, + SubmissionReadinessState::kNoInformation), SubmissionReadinessState::kTwoFields}, // There's a focusable field after password field. - {SubmissionReadinessParams(PrepareFormData({true, true, true}), - /*username_field_index=*/0, - /*password_field_index=*/1, - SubmissionReadinessState::kNoInformation), + {SubmissionReadinessParams( + PrepareFormData({FormFieldFocusabilityType::kFocusableInput, + FormFieldFocusabilityType::kFocusableInput, + FormFieldFocusabilityType::kFocusableInput}), + /*username_field_index=*/0, + /*password_field_index=*/1, + SubmissionReadinessState::kNoInformation), SubmissionReadinessState::kFieldAfterPasswordField}, // There are unfocusable fields other than username and password fields. - {SubmissionReadinessParams(PrepareFormData({true, false, true, false}), - /*username_field_index=*/0, - /*password_field_index=*/2, - SubmissionReadinessState::kNoInformation), + {SubmissionReadinessParams( + PrepareFormData({FormFieldFocusabilityType::kFocusableInput, + FormFieldFocusabilityType::kNonFocusableInput, + FormFieldFocusabilityType::kFocusableInput, + FormFieldFocusabilityType::kNonFocusableInput}), + /*username_field_index=*/0, + /*password_field_index=*/2, + SubmissionReadinessState::kNoInformation), + SubmissionReadinessState::kTwoFields}, + // There is a checkbox field after the password field. + {SubmissionReadinessParams( + PrepareFormData({FormFieldFocusabilityType::kFocusableInput, + FormFieldFocusabilityType::kFocusableInput, + FormFieldFocusabilityType::kFocusableCheckbox}), + /*username_field_index=*/0, + /*password_field_index=*/1, + SubmissionReadinessState::kNoInformation), SubmissionReadinessState::kTwoFields}, };
diff --git a/components/pdf/renderer/pdf_accessibility_tree.cc b/components/pdf/renderer/pdf_accessibility_tree.cc index 54876d2..417090f 100644 --- a/components/pdf/renderer/pdf_accessibility_tree.cc +++ b/components/pdf/renderer/pdf_accessibility_tree.cc
@@ -85,6 +85,7 @@ CHECK(features::IsPdfOcrEnabled()); render_frame.GetBrowserInterfaceBroker()->GetInterface( screen_ai_annotator_.BindNewPipeAndPassReceiver()); + ComputeAndSetPagesPerBatch(page_count); } PdfOcrService::~PdfOcrService() { @@ -96,6 +97,14 @@ remaining_page_count_ = page_count; } +void PdfOcrService::ComputeAndSetPagesPerBatch(uint32_t page_count) { + constexpr uint32_t kMinPagesPerBatch = 1u; + constexpr uint32_t kMaxPagesPerBatch = 20u; + + pages_per_batch_ = std::clamp<uint32_t>(page_count * 0.1, kMinPagesPerBatch, + kMaxPagesPerBatch); +} + void PdfOcrService::OcrPage(base::queue<PdfOcrRequest> page_requests) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); CHECK(!page_requests.empty()); @@ -1664,6 +1673,7 @@ #if BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) if (ocr_service_) { ocr_service_->ResetPageCount(page_count_); + ocr_service_->ComputeAndSetPagesPerBatch(page_count_); } #endif // BUILDFLAG(ENABLE_SCREEN_AI_SERVICE)
diff --git a/components/pdf/renderer/pdf_accessibility_tree.h b/components/pdf/renderer/pdf_accessibility_tree.h index aa36140e..12322ad 100644 --- a/components/pdf/renderer/pdf_accessibility_tree.h +++ b/components/pdf/renderer/pdf_accessibility_tree.h
@@ -118,6 +118,7 @@ // reset the page count in this class, i.e. the `remaining_page_count_` // field, to its correct value. void ResetPageCount(uint32_t page_count); + void ComputeAndSetPagesPerBatch(uint32_t page_count); void OcrPage(base::queue<PdfOcrRequest> page_requests); bool AreAllPagesOcred() const; bool AreAllPagesInBatchOcred() const; @@ -125,9 +126,7 @@ mojo::PendingRemote<screen_ai::mojom::ScreenAIAnnotator> screen_ai_annotator); void ResetRemainingPageCountForTesting(); - void SetPagesPerBatchForTesting(uint32_t pages_per_batch) { - pages_per_batch_ = pages_per_batch; - } + uint32_t pages_per_batch_for_testing() { return pages_per_batch_; } private: uint32_t pages_per_batch_ = 20u;
diff --git a/components/pdf/renderer/pdf_accessibility_tree_browsertest.cc b/components/pdf/renderer/pdf_accessibility_tree_browsertest.cc index 31d71423..4cc7dbcb 100644 --- a/components/pdf/renderer/pdf_accessibility_tree_browsertest.cc +++ b/components/pdf/renderer/pdf_accessibility_tree_browsertest.cc
@@ -310,14 +310,12 @@ PdfAccessibilityTree::OnOcrDataReceived(ocr_requests, tree_updates); } - void CreateFakeOCRService(uint32_t pages_per_batch, - bool create_empty_result) { + void CreateFakeOCRService(bool create_empty_result) { CreateOcrService(); fake_annotator_ = std::make_unique<FakeScreenAIAnnotator>(create_empty_result); ocr_service_for_testing()->SetScreenAIAnnotatorForTesting( fake_annotator_->BindNewPipeAndPassRemote()); - ocr_service_for_testing()->SetPagesPerBatchForTesting(pages_per_batch); } private: @@ -367,6 +365,7 @@ pdf_accessibility_tree_ = std::make_unique<TestPdfAccessibilityTree>( render_frame, &action_handler_, &image_fetcher_); + WaitForThreadTasks(); } protected: @@ -2213,9 +2212,10 @@ #if BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) class PdfOcrServiceTest : public PdfAccessibilityTreeTest, - public testing::WithParamInterface< - std::tuple</* is_ocr_service_started_before_pdf_loads */ bool, - /* page_count */ uint32_t>> { + public testing::WithParamInterface<std::tuple< + /* is_ocr_service_started_before_pdf_loads */ bool, + /* (page_count, expected_batch_size) */ std::pair<uint32_t, + uint32_t>>> { public: PdfOcrServiceTest() : feature_list_(::features::kPdfOcr) {} PdfOcrServiceTest(const PdfOcrServiceTest&) = delete; @@ -2226,7 +2226,6 @@ void CreateInaccessiblePdfAndOcrService( uint32_t page_count, bool is_ocr_service_started_before_pdf_loads, - uint32_t pages_per_batch, bool create_empty_results) { ASSERT_TRUE(pdf_accessibility_tree_); doc_info_.page_count = page_count; @@ -2242,8 +2241,7 @@ page_objects_.images.push_back(image); if (is_ocr_service_started_before_pdf_loads) { - pdf_accessibility_tree_->CreateFakeOCRService(pages_per_batch, - create_empty_results); + pdf_accessibility_tree_->CreateFakeOCRService(create_empty_results); ASSERT_NE(nullptr, pdf_accessibility_tree_->ocr_service_for_testing()); } @@ -2288,12 +2286,19 @@ ASSERT_EQ(0u, image2_node->GetChildCount()); if (!is_ocr_service_started_before_pdf_loads) { - pdf_accessibility_tree_->CreateFakeOCRService(pages_per_batch, - create_empty_results); + pdf_accessibility_tree_->CreateFakeOCRService(create_empty_results); ASSERT_NE(nullptr, pdf_accessibility_tree_->ocr_service_for_testing()); } } + bool GetIsOcrServiceStartedBeforePdfLoads() { + return std::get<0>(GetParam()); + } + + uint32_t GetPageCount() { return std::get<1>(GetParam()).first; } + + uint32_t GetExpectedBatchSize() { return std::get<1>(GetParam()).second; } + private: base::test::ScopedFeatureList feature_list_; }; @@ -2301,14 +2306,19 @@ TEST_P(PdfOcrServiceTest, PageBatching) { CreatePdfAccessibilityTree(); - constexpr uint32_t kPagesPerBatch = 20u; - bool is_ocr_service_started_before_pdf_loads; - uint32_t page_count; - std::tie(is_ocr_service_started_before_pdf_loads, page_count) = GetParam(); + const bool is_ocr_service_started_before_pdf_loads = + GetIsOcrServiceStartedBeforePdfLoads(); + const uint32_t page_count = GetPageCount(); ASSERT_NO_FATAL_FAILURE(CreateInaccessiblePdfAndOcrService( - page_count, is_ocr_service_started_before_pdf_loads, kPagesPerBatch, + page_count, is_ocr_service_started_before_pdf_loads, /*create_empty_results=*/false)); - const uint32_t kBatchCount = CalculateBatchCount(page_count, kPagesPerBatch); + + const uint32_t pages_per_batch = + pdf_accessibility_tree_->ocr_service_for_testing() + ->pages_per_batch_for_testing(); + EXPECT_EQ(GetExpectedBatchSize(), pages_per_batch); + + const uint32_t batch_count = CalculateBatchCount(page_count, pages_per_batch); ui::AXNode* root_node = pdf_accessibility_tree_->GetRoot(); // The first node of the root node's children is a status node. There @@ -2336,11 +2346,11 @@ WaitForThreadTasks(); WaitForThreadTasks(); - if (page_count >= kPagesPerBatch && i >= kPagesPerBatch && + if (page_count >= pages_per_batch && i >= pages_per_batch && i != page_count - 1u) { // A postamble page informing the user that the OCR process is in // progress should be present after processing the first batch of - // OCR requests (i.e. when `i >= kPagesPerBatch`). + // OCR requests (i.e. when `i >= pages_per_batch`). const ui::AXTreeUpdate* postamble_update = pdf_accessibility_tree_->postamble_page_tree_update_for_testing(); ASSERT_NE(nullptr, postamble_update); @@ -2368,10 +2378,10 @@ } const auto& tree_updates = pdf_accessibility_tree_->GetTreeUpdates(); - ASSERT_EQ(kBatchCount, tree_updates.size()); + ASSERT_EQ(batch_count, tree_updates.size()); for (uint32_t i = 0; i < tree_updates.size(); ++i) { const std::vector<ui::AXTreeUpdate>& page_tree_updates = tree_updates[i]; - if (page_count % kPagesPerBatch != 0u && i == 0) { + if (page_count % pages_per_batch != 0u && i == 0) { // The first batch should have the remaining pages that cannot be // processed by the rest of the batches because they are full. By design, // this is always set to 5u in the instantiation of these parameterized @@ -2391,11 +2401,11 @@ } else { // All other batches should be full, i.e., their page count should equal // the number of pages allowed in each batch. - ASSERT_EQ(kPagesPerBatch * 2u, page_tree_updates.size()) + ASSERT_EQ(pages_per_batch * 2u, page_tree_updates.size()) << "There should be 20 pages in the remaining batches, with two " "images per page."; - for (uint32_t j = 0; j < kPagesPerBatch * 2u; ++j) { + for (uint32_t j = 0; j < pages_per_batch * 2u; ++j) { EXPECT_EQ(page_tree_updates[j].nodes.size(), 1u); EXPECT_EQ(page_tree_updates[j].root_id, page_tree_updates[j].nodes[0].id); @@ -2409,14 +2419,16 @@ TEST_P(PdfOcrServiceTest, UMAMetrics) { CreatePdfAccessibilityTree(); - constexpr uint32_t kPagesPerBatch = 20u; base::HistogramTester histograms; - bool is_ocr_service_started_before_pdf_loads; - uint32_t page_count; - std::tie(is_ocr_service_started_before_pdf_loads, page_count) = GetParam(); + const bool is_ocr_service_started_before_pdf_loads = + GetIsOcrServiceStartedBeforePdfLoads(); + const uint32_t page_count = GetPageCount(); ASSERT_NO_FATAL_FAILURE(CreateInaccessiblePdfAndOcrService( - page_count, is_ocr_service_started_before_pdf_loads, kPagesPerBatch, + page_count, is_ocr_service_started_before_pdf_loads, /*create_empty_results=*/false)); + const uint32_t pages_per_batch = + pdf_accessibility_tree_->ocr_service_for_testing() + ->pages_per_batch_for_testing(); for (uint32_t i = 0; i < page_count; ++i) { if (!is_ocr_service_started_before_pdf_loads) { @@ -2447,8 +2459,8 @@ } const auto& tree_updates = pdf_accessibility_tree_->GetTreeUpdates(); - const uint32_t kBatchCount = CalculateBatchCount(page_count, kPagesPerBatch); - ASSERT_EQ(kBatchCount, tree_updates.size()); + const uint32_t batch_count = CalculateBatchCount(page_count, pages_per_batch); + ASSERT_EQ(batch_count, tree_updates.size()); histograms.ExpectBucketCount( "Accessibility.PdfOcr.ActiveWhenInaccessiblePdfOpened", @@ -2490,12 +2502,11 @@ TEST_P(PdfOcrServiceTest, EmptyOCRResults) { CreatePdfAccessibilityTree(); - constexpr uint32_t kPagesPerBatch = 20u; - bool is_ocr_service_started_before_pdf_loads; - uint32_t page_count; - std::tie(is_ocr_service_started_before_pdf_loads, page_count) = GetParam(); + const bool is_ocr_service_started_before_pdf_loads = + GetIsOcrServiceStartedBeforePdfLoads(); + const uint32_t page_count = GetPageCount(); ASSERT_NO_FATAL_FAILURE(CreateInaccessiblePdfAndOcrService( - page_count, is_ocr_service_started_before_pdf_loads, kPagesPerBatch, + page_count, is_ocr_service_started_before_pdf_loads, /*create_empty_results=*/true)); for (uint32_t i = 0; i < page_count; ++i) { @@ -2556,7 +2567,10 @@ PdfOcrServiceTest, testing::Combine( /* is_ocr_service_started_before_pdf_loads */ testing::Bool(), - /* page_count */ testing::Values(5u, 105u, 280u))); + /* (page_count, expected_batch_size) */ testing::Values( + std::make_pair(5u, 1u), + std::make_pair(105u, 10u), + std::make_pair(280u, 20u)))); // TODO(crbug.com/1443341): Add test for end result on a non-synthetic // multi-page PDF.
diff --git a/components/permissions/contexts/bluetooth_chooser_context.cc b/components/permissions/contexts/bluetooth_chooser_context.cc index 20ae0776..182a6f05 100644 --- a/components/permissions/contexts/bluetooth_chooser_context.cc +++ b/components/permissions/contexts/bluetooth_chooser_context.cc
@@ -8,6 +8,7 @@ #include <utility> #include <vector> +#include "base/strings/string_number_conversions.h" #include "base/strings/utf_string_conversions.h" #include "base/values.h" #include "components/content_settings/core/common/content_settings_types.h" @@ -83,19 +84,13 @@ if (!options || options->optional_manufacturer_data.empty()) return; - base::flat_set<uint16_t> manufacturer_data_set( - options->optional_manufacturer_data); - - auto& manufacturer_data_list = - *permission_object.EnsureList(kManufacturerDataKey); - for (const auto& manufacturer_data_permission : manufacturer_data_list) { - manufacturer_data_set.insert( - static_cast<uint16_t>(manufacturer_data_permission.GetInt())); + CHECK(permission_object.FindDict(kManufacturerDataKey)); + auto& manufacturer_data_dict = + *permission_object.FindDict(kManufacturerDataKey); + for (uint16_t manufacturer_code : options->optional_manufacturer_data) { + manufacturer_data_dict.Set(base::NumberToString(manufacturer_code), + /*value=*/true); } - - manufacturer_data_list.clear(); - for (const uint16_t manufacturer_code : manufacturer_data_set) - manufacturer_data_list.Append(manufacturer_code); } } // namespace @@ -122,7 +117,7 @@ device_value.Set(kServicesKey, base::Value::Dict()); AddUnionOfServicesTo(options, device_value); - device_value.Set(kManufacturerDataKey, base::Value::List()); + device_value.Set(kManufacturerDataKey, base::Value::Dict()); AddManufacturerDataTo(options, device_value); return device_value; @@ -290,15 +285,9 @@ if (!device.has_value()) return false; - const auto* manufacturer_data_list = device->FindList(kManufacturerDataKey); - if (!manufacturer_data_list) - return false; - - for (const auto& manufacturer_data : *manufacturer_data_list) { - if (manufacturer_code == manufacturer_data.GetInt()) - return true; - } - return false; + const auto& manufacturer_data_list = *device->FindDict(kManufacturerDataKey); + return manufacturer_data_list.contains( + base::NumberToString(manufacturer_code)); } // static @@ -330,7 +319,7 @@ dict.FindString(kWebBluetoothDeviceIdKey) && WebBluetoothDeviceId::IsValid( *dict.FindString(kWebBluetoothDeviceIdKey)) && - dict.FindDict(kServicesKey); + dict.FindDict(kServicesKey) && dict.FindDict(kManufacturerDataKey); } absl::optional<base::Value::Dict> BluetoothChooserContext::FindDeviceObject(
diff --git a/components/policy/android/java/src/org/chromium/components/policy/PolicyCacheProvider.java b/components/policy/android/java/src/org/chromium/components/policy/PolicyCacheProvider.java index b6983b128..04ed8e9 100644 --- a/components/policy/android/java/src/org/chromium/components/policy/PolicyCacheProvider.java +++ b/components/policy/android/java/src/org/chromium/components/policy/PolicyCacheProvider.java
@@ -44,6 +44,16 @@ assert false : "Invalid policy type from cache"; } mSettings = settings; - notifySettingsAvailable(settings); + if (!mSettings.isEmpty()) { + // There's a trade off between Java code correctness and native code correctness here. + // The native code assumes that policies are ready immediately and does not wait. So + // this class attempts to get cached polices to native as fast as possible to improve + // correctness. However this decreases Java code correctness, as now the PolicyService + // claims to be initialized before real app restrictions are applied. When the settings + // are empty, there's no point in pushing these to native. And it's possible we're in a + // first run scenario where there are no cached values and sending an early init signal + // breaks certain policies. + notifySettingsAvailable(settings); + } } }
diff --git a/components/policy/android/junit/src/org/chromium/components/policy/CombinedPolicyProviderTest.java b/components/policy/android/junit/src/org/chromium/components/policy/CombinedPolicyProviderTest.java index ce6d697..a66f163 100644 --- a/components/policy/android/junit/src/org/chromium/components/policy/CombinedPolicyProviderTest.java +++ b/components/policy/android/junit/src/org/chromium/components/policy/CombinedPolicyProviderTest.java
@@ -43,6 +43,8 @@ private PolicyConverter mPolicyConverter; @Mock private CombinedPolicyProvider.Natives mCombinedPolicyConverterJniMock; + @Mock + private PolicyMap mPolicyMap; @Before public void setup() { @@ -98,8 +100,9 @@ @Test public void testOnSettingsAvailable_oneProvider() { CombinedPolicyProvider.linkNative(NATIVE_POINTER, mPolicyConverter); - verify(mCombinedPolicyConverterJniMock) + verify(mCombinedPolicyConverterJniMock, never()) .flushPolicies(NATIVE_POINTER, CombinedPolicyProvider.get()); + PolicyProvider provider = new DummyPolicyProvider(); CombinedPolicyProvider.get().registerProvider(provider); Bundle b = new Bundle(); @@ -113,20 +116,21 @@ verify(mPolicyConverter).setPolicy("StringPolicy", "A string"); verify(mPolicyConverter) .setPolicy("StringArrayPolicy", new String[] {"String1", "String2"}); - verify(mCombinedPolicyConverterJniMock, times(2)) + verify(mCombinedPolicyConverterJniMock, times(1)) .flushPolicies(NATIVE_POINTER, CombinedPolicyProvider.get()); } @Test public void testOnSettingsAvailable_secondProvider() { CombinedPolicyProvider.linkNative(NATIVE_POINTER, mPolicyConverter); - verify(mCombinedPolicyConverterJniMock) + verify(mCombinedPolicyConverterJniMock, never()) .flushPolicies(NATIVE_POINTER, CombinedPolicyProvider.get()); + PolicyProvider provider = new DummyPolicyProvider(); CombinedPolicyProvider.get().registerProvider(provider); Bundle b = new Bundle(); CombinedPolicyProvider.get().onSettingsAvailable(0, b); - verify(mCombinedPolicyConverterJniMock, times(2)) + verify(mCombinedPolicyConverterJniMock, times(1)) .flushPolicies(NATIVE_POINTER, CombinedPolicyProvider.get()); // Second policy provider registered but no settings. @@ -139,7 +143,7 @@ // Second call should have been ignored, so nothing should have been set verify(mPolicyConverter, never()).setPolicy(anyString(), anyBoolean()); // and flush should have been called precisely once. - verify(mCombinedPolicyConverterJniMock, times(2)) + verify(mCombinedPolicyConverterJniMock, times(1)) .flushPolicies(NATIVE_POINTER, CombinedPolicyProvider.get()); // Empty but valid bundle from second policy provider should set the policy and push it @@ -147,15 +151,20 @@ b = new Bundle(); CombinedPolicyProvider.get().onSettingsAvailable(1, b); verify(mPolicyConverter).setPolicy("BoolPolicy", true); - verify(mCombinedPolicyConverterJniMock, times(3)) + verify(mCombinedPolicyConverterJniMock, times(2)) .flushPolicies(NATIVE_POINTER, CombinedPolicyProvider.get()); } @Test public void testCachePolicy() { + PolicyCacheUpdater.cachePolicies(mPolicyMap); + PolicyCache.get().setReadableForTesting(true); + CombinedPolicyProvider.linkNative(NATIVE_POINTER, mPolicyConverter); Assert.assertEquals(0, CombinedPolicyProvider.get().getPolicyProvidersForTesting().size()); Assert.assertTrue(CombinedPolicyProvider.get().isPolicyCacheEnabled()); + verify(mCombinedPolicyConverterJniMock) + .flushPolicies(NATIVE_POINTER, CombinedPolicyProvider.get()); CombinedPolicyProvider.get().registerProvider(new DummyPolicyProvider()); Assert.assertEquals(1, CombinedPolicyProvider.get().getPolicyProvidersForTesting().size()); @@ -164,13 +173,20 @@ CombinedPolicyProvider.get().registerProvider(new DummyPolicyProvider()); Assert.assertEquals(2, CombinedPolicyProvider.get().getPolicyProvidersForTesting().size()); Assert.assertFalse(CombinedPolicyProvider.get().isPolicyCacheEnabled()); + + Bundle b = new Bundle(); + CombinedPolicyProvider.get().onSettingsAvailable(0, b); + CombinedPolicyProvider.get().onSettingsAvailable(1, b); + verify(mCombinedPolicyConverterJniMock, times(2)) + .flushPolicies(NATIVE_POINTER, CombinedPolicyProvider.get()); } @Test public void testRefreshPolicies() { CombinedPolicyProvider.linkNative(NATIVE_POINTER, mPolicyConverter); - verify(mCombinedPolicyConverterJniMock) + verify(mCombinedPolicyConverterJniMock, never()) .flushPolicies(NATIVE_POINTER, CombinedPolicyProvider.get()); + PolicyProvider provider = new DummyPolicyProvider(); PolicyProvider provider2 = new DummyPolicyProvider(); CombinedPolicyProvider.get().registerProvider(provider); @@ -179,7 +195,7 @@ b.putBoolean("BoolPolicy", true); CombinedPolicyProvider.get().onSettingsAvailable(0, b); CombinedPolicyProvider.get().onSettingsAvailable(1, b); - verify(mCombinedPolicyConverterJniMock, times(2)) + verify(mCombinedPolicyConverterJniMock, times(1)) .flushPolicies(NATIVE_POINTER, CombinedPolicyProvider.get()); CombinedPolicyProvider.get().refreshPolicies(); @@ -187,13 +203,13 @@ // nothing until both providers have settings. CombinedPolicyProvider.get().onSettingsAvailable(0, b); // Still only one call. - verify(mCombinedPolicyConverterJniMock, times(2)) + verify(mCombinedPolicyConverterJniMock, times(1)) .flushPolicies(NATIVE_POINTER, CombinedPolicyProvider.get()); b = new Bundle(); b.putBoolean("BoolPolicy", false); CombinedPolicyProvider.get().onSettingsAvailable(1, b); // That should have caused the second flush. - verify(mCombinedPolicyConverterJniMock, times(3)) + verify(mCombinedPolicyConverterJniMock, times(2)) .flushPolicies(NATIVE_POINTER, CombinedPolicyProvider.get()); // And the policy should have been set to the new value. verify(mPolicyConverter).setPolicy("BoolPolicy", false);
diff --git a/components/policy/android/junit/src/org/chromium/components/policy/PolicyCacheProviderTest.java b/components/policy/android/junit/src/org/chromium/components/policy/PolicyCacheProviderTest.java index 2922e45c..be10f26 100644 --- a/components/policy/android/junit/src/org/chromium/components/policy/PolicyCacheProviderTest.java +++ b/components/policy/android/junit/src/org/chromium/components/policy/PolicyCacheProviderTest.java
@@ -7,6 +7,7 @@ import static org.mockito.ArgumentMatchers.argThat; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.verifyNoInteractions; import android.content.Context; @@ -67,4 +68,12 @@ && DICT_POLICY.equals(bundle.getString(POLICY_NAME_4)); })); } + + @Test + public void testEmpty() { + PolicyCacheProvider provider = new PolicyCacheProvider(); + provider.setManagerAndSource(mCombinedPolicyProvider, SOURCE); + provider.refresh(); + verifyNoInteractions(mCombinedPolicyProvider); + } }
diff --git a/components/policy/core/common/android/android_combined_policy_provider_unittest.cc b/components/policy/core/common/android/android_combined_policy_provider_unittest.cc index f589168..7d75aeb 100644 --- a/components/policy/core/common/android/android_combined_policy_provider_unittest.cc +++ b/components/policy/core/common/android/android_combined_policy_provider_unittest.cc
@@ -43,7 +43,7 @@ AndroidCombinedPolicyProvider::SetShouldWaitForPolicy(true); SchemaRegistry registry; AndroidCombinedPolicyProvider manager(®istry); - EXPECT_TRUE(manager.IsInitializationComplete(POLICY_DOMAIN_CHROME)); + EXPECT_FALSE(manager.IsInitializationComplete(POLICY_DOMAIN_CHROME)); manager.FlushPolicies(nullptr, nullptr); EXPECT_TRUE(manager.IsInitializationComplete(POLICY_DOMAIN_CHROME)); // If the manager is deleted (by going out of scope) without being shutdown
diff --git a/components/power_bookmarks/core/BUILD.gn b/components/power_bookmarks/core/BUILD.gn index 040c2496..1728432e 100644 --- a/components/power_bookmarks/core/BUILD.gn +++ b/components/power_bookmarks/core/BUILD.gn
@@ -10,11 +10,14 @@ static_library("core") { sources = [ + "bookmark_client_base.cc", + "bookmark_client_base.h", "power_bookmark_data_provider.h", "power_bookmark_service.cc", "power_bookmark_service.h", "power_bookmark_utils.cc", "power_bookmark_utils.h", + "suggested_save_location_provider.h", ] public_deps = [ @@ -73,6 +76,7 @@ testonly = true sources = [ + "bookmark_client_base_unittest.cc", "power_bookmark_service_unittest.cc", "power_bookmark_utils_unittest.cc", ]
diff --git a/components/power_bookmarks/core/bookmark_client_base.cc b/components/power_bookmarks/core/bookmark_client_base.cc new file mode 100644 index 0000000..7c348c0 --- /dev/null +++ b/components/power_bookmarks/core/bookmark_client_base.cc
@@ -0,0 +1,191 @@ +// 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 "components/power_bookmarks/core/bookmark_client_base.h" + +#include <string> +#include <vector> + +#include "base/uuid.h" +#include "components/bookmarks/browser/base_bookmark_model_observer.h" +#include "components/bookmarks/browser/bookmark_model.h" +#include "components/bookmarks/browser/bookmark_utils.h" + +namespace power_bookmarks { + +namespace { +const char kWasSuggestedFolderKey[] = "was_folder_suggested"; + +const char kTrue[] = "true"; +const char kFalse[] = "false"; +} // namespace + +BookmarkClientBase::BookmarkClientBase() = default; +BookmarkClientBase::~BookmarkClientBase() = default; + +void BookmarkClientBase::Init(bookmarks::BookmarkModel* model) { + bookmark_model_ = model; + node_move_observer_ = std::make_unique<NodeMoveObserver>(this); + model_observation_ = std::make_unique< + base::ScopedObservation<bookmarks::BookmarkModel, NodeMoveObserver>>( + node_move_observer_.get()); + model_observation_->Observe(model); +} + +void BookmarkClientBase::AddSuggestedSaveLocationProvider( + SuggestedSaveLocationProvider* suggestion_provider) { + CHECK(suggestion_provider); + save_location_providers_.push_back(suggestion_provider); +} + +void BookmarkClientBase::RemoveSuggestedSaveLocationProvider( + SuggestedSaveLocationProvider* suggestion_provider) { + auto it = base::ranges::find(save_location_providers_, suggestion_provider); + if (it != save_location_providers_.end()) { + save_location_providers_.erase(it); + } + + // Don't hold a removed provider since it may be deleted. + if (last_used_provider_ == suggestion_provider) { + last_used_provider_ = nullptr; + } +} + +const bookmarks::BookmarkNode* BookmarkClientBase::GetSuggestedSaveLocation( + const GURL& url) { + if (!bookmark_model_) { + return nullptr; + } + + for (SuggestedSaveLocationProvider* provider : save_location_providers_) { + const bookmarks::BookmarkNode* suggestion = provider->GetSuggestion(url); + + if (suggestion) { + CHECK(suggestion->is_folder()); + + auto it = temporarily_disallowed_suggestions_.find(suggestion->uuid()); + if (it != temporarily_disallowed_suggestions_.end()) { + // Allow the suggestion if it was previously rejected and a certain + // amount of time has passed. + if (it->second < base::Time::Now()) { + temporarily_disallowed_suggestions_.erase(suggestion->uuid()); + } else { + continue; + } + } + + last_suggested_folder_uuid_ = suggestion->uuid(); + last_used_provider_ = provider; + return suggestion; + } + } + + // If there was no suggestion, reset so we're not tracking for a "normal" + // bookmark. + last_suggested_folder_uuid_ = base::Uuid(); + last_used_provider_ = nullptr; + + // If there's no suggested folder, ensure we're not accidentally suggesting + // one via the most recently modified. If the most recently modified folder + // was recommended, find one that isn't. + std::vector<const bookmarks::BookmarkNode*> recently_modified_list = + bookmarks::GetMostRecentlyModifiedUserFolders( + bookmark_model_, save_location_providers_.size() + 1); + CHECK(!recently_modified_list.empty()); + + std::string was_saved_to_suggested; + int recently_modified_index = 0; + bool found_value = + recently_modified_list[recently_modified_index]->GetMetaInfo( + kWasSuggestedFolderKey, &was_saved_to_suggested); + bool most_recent_is_suggested = false; + while (found_value && was_saved_to_suggested == kTrue) { + most_recent_is_suggested = true; + recently_modified_index++; + found_value = recently_modified_list[recently_modified_index]->GetMetaInfo( + kWasSuggestedFolderKey, &was_saved_to_suggested); + } + + if (most_recent_is_suggested) { + return recently_modified_list[recently_modified_index]; + } + + return nullptr; +} + +BookmarkClientBase::NodeMoveObserver::NodeMoveObserver( + BookmarkClientBase* client) + : client_(client) {} + +BookmarkClientBase::NodeMoveObserver::~NodeMoveObserver() = default; + +void BookmarkClientBase::NodeMoveObserver::BookmarkModelChanged() { + // noop +} + +void BookmarkClientBase::NodeMoveObserver::BookmarkNodeAdded( + bookmarks::BookmarkModel* model, + const bookmarks::BookmarkNode* parent, + size_t index, + bool newly_added) { + // Check to see if the saved bookmark actually used the suggested folder. + if (parent->uuid() == client_->last_suggested_folder_uuid_) { + // Consider the suggestion "accepted" until we see the bookmark moved to a + // different location. + model->SetNodeMetaInfo(parent, kWasSuggestedFolderKey, kTrue); + + // The suggestion was used, reset the state. + client_->last_suggested_folder_uuid_ = base::Uuid(); + } else { + // If it didn't, if the folder was suggested in the past but wasn't for + // this save, it's an explicit save to the folder. This folder can now be + // allowed in "recently used". + std::string was_suggested; + bool has_value = + parent->GetMetaInfo(kWasSuggestedFolderKey, &was_suggested); + if (has_value && was_suggested == kTrue) { + model->SetNodeMetaInfo(parent, kWasSuggestedFolderKey, kFalse); + } + } +} + +void BookmarkClientBase::NodeMoveObserver::BookmarkNodeMoved( + bookmarks::BookmarkModel* model, + const bookmarks::BookmarkNode* old_parent, + size_t old_index, + const bookmarks::BookmarkNode* new_parent, + size_t new_index) { + const bookmarks::BookmarkNode* node = new_parent->children()[new_index].get(); + + // If the user changes the folder off of the suggested folder and it was the + // last bookmark to be added, consider it rejected. + std::vector<const bookmarks::BookmarkNode*> most_recent_nodes; + GetMostRecentlyAddedEntries(model, 1, &most_recent_nodes); + bool moved_most_recent_node = !most_recent_nodes.empty() && + node->uuid() == most_recent_nodes[0]->uuid(); + std::string was_saved_to_suggested; + old_parent->GetMetaInfo(kWasSuggestedFolderKey, &was_saved_to_suggested); + if (moved_most_recent_node && was_saved_to_suggested == kTrue) { + // Prevent the rejected folder's UUID from being suggested for some period + // of time. + base::TimeDelta backoff_time = base::Seconds(0); + if (client_->last_used_provider_) { + backoff_time = client_->last_used_provider_->GetBackoffTime(); + } + client_->temporarily_disallowed_suggestions_[old_parent->uuid()] = + base::Time::Now() + backoff_time; + } + + // If the new parent of the bookmark has metadata indicating that it has been + // suggested and the bookmark did _not_ start there, we consider this an + // explicit save. From this point on, the folder is allowed to be listed as + // the default folder. + bool has_value = + new_parent->GetMetaInfo(kWasSuggestedFolderKey, &was_saved_to_suggested); + if (has_value && was_saved_to_suggested == kTrue) { + model->SetNodeMetaInfo(new_parent, kWasSuggestedFolderKey, kFalse); + } +} + +} // namespace power_bookmarks
diff --git a/components/power_bookmarks/core/bookmark_client_base.h b/components/power_bookmarks/core/bookmark_client_base.h new file mode 100644 index 0000000..ffdc34b --- /dev/null +++ b/components/power_bookmarks/core/bookmark_client_base.h
@@ -0,0 +1,93 @@ +// 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 COMPONENTS_POWER_BOOKMARKS_CORE_BOOKMARK_CLIENT_BASE_H_ +#define COMPONENTS_POWER_BOOKMARKS_CORE_BOOKMARK_CLIENT_BASE_H_ + +#include <map> +#include <memory> + +#include "base/scoped_observation.h" +#include "components/bookmarks/browser/base_bookmark_model_observer.h" +#include "components/bookmarks/browser/bookmark_client.h" +#include "components/bookmarks/browser/bookmark_node.h" +#include "components/power_bookmarks/core/suggested_save_location_provider.h" + +namespace base { +class Uuid; +} // namespace base + +namespace bookmarks { +class BookmarkModel; +class BookmarkNode; +} // namespace bookmarks + +namespace power_bookmarks { + +class BookmarkClientBase : public bookmarks::BookmarkClient { + public: + BookmarkClientBase(); + BookmarkClientBase(const BookmarkClientBase&) = delete; + BookmarkClientBase& operator=(const BookmarkClientBase&) = delete; + ~BookmarkClientBase() override; + + void Init(bookmarks::BookmarkModel* model) override; + + const bookmarks::BookmarkNode* GetSuggestedSaveLocation( + const GURL& url) override; + + // Allow features to suggest a location to save to. Features should retain + // ownership of their respective providers. + void AddSuggestedSaveLocationProvider( + SuggestedSaveLocationProvider* suggestion_provider); + void RemoveSuggestedSaveLocationProvider( + SuggestedSaveLocationProvider* suggestion_provider); + + private: + class NodeMoveObserver : public bookmarks::BaseBookmarkModelObserver { + public: + explicit NodeMoveObserver(BookmarkClientBase* client); + ~NodeMoveObserver() override; + + void BookmarkModelChanged() override; + void BookmarkNodeAdded(bookmarks::BookmarkModel* model, + const bookmarks::BookmarkNode* parent, + size_t index, + bool newly_added) override; + void BookmarkNodeMoved(bookmarks::BookmarkModel* model, + const bookmarks::BookmarkNode* old_parent, + size_t old_index, + const bookmarks::BookmarkNode* new_parent, + size_t new_index) override; + + private: + // A handle to the owning object. This pointer will always outlive this + // object. + raw_ptr<BookmarkClientBase> client_; + }; + + std::unique_ptr<NodeMoveObserver> node_move_observer_; + std::unique_ptr< + base::ScopedObservation<bookmarks::BookmarkModel, NodeMoveObserver>> + model_observation_{}; + raw_ptr<bookmarks::BookmarkModel> bookmark_model_{nullptr}; + + // A list of providers of a save location for a given URL. + std::vector<SuggestedSaveLocationProvider*> save_location_providers_; + + // The UUID of the last folder that was suggested. + base::Uuid last_suggested_folder_uuid_; + + // The last provider that was used to pass a suggestion to a feature. + raw_ptr<SuggestedSaveLocationProvider> last_used_provider_; + + // A map of suggestions that were rejected by the user to the time they will + // next be allowed to suggested. This is intentionally in-memory only, + // restarting the browser will allow all suggestions again. + std::map<base::Uuid, base::Time> temporarily_disallowed_suggestions_; +}; + +} // namespace power_bookmarks + +#endif // COMPONENTS_POWER_BOOKMARKS_CORE_BOOKMARK_CLIENT_BASE_H_
diff --git a/components/power_bookmarks/core/bookmark_client_base_unittest.cc b/components/power_bookmarks/core/bookmark_client_base_unittest.cc new file mode 100644 index 0000000..fb1f0a0 --- /dev/null +++ b/components/power_bookmarks/core/bookmark_client_base_unittest.cc
@@ -0,0 +1,241 @@ +// 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 <memory> +#include <set> + +#include "base/containers/contains.h" +#include "base/task/sequenced_task_runner.h" +#include "base/task/thread_pool.h" +#include "base/test/bind.h" +#include "base/test/scoped_feature_list.h" +#include "base/test/task_environment.h" +#include "base/uuid.h" +#include "components/bookmarks/browser/bookmark_model.h" +#include "components/bookmarks/browser/bookmark_utils.h" +#include "components/bookmarks/test/test_bookmark_client.h" +#include "components/power_bookmarks/core/bookmark_client_base.h" +#include "components/power_bookmarks/core/suggested_save_location_provider.h" +#include "testing/gmock/include/gmock/gmock.h" +#include "testing/gtest/include/gtest/gtest.h" + +namespace power_bookmarks { + +namespace { + +class TestBookmarkClientImpl : public BookmarkClientBase { + public: + TestBookmarkClientImpl() = default; + TestBookmarkClientImpl(const TestBookmarkClientImpl&) = delete; + TestBookmarkClientImpl& operator=(const TestBookmarkClientImpl&) = delete; + ~TestBookmarkClientImpl() override = default; + + bool IsPermanentNodeVisibleWhenEmpty( + bookmarks::BookmarkNode::Type type) override { + return true; + } + + bookmarks::LoadManagedNodeCallback GetLoadManagedNodeCallback() override { + return bookmarks::LoadManagedNodeCallback(); + } + + bookmarks::metrics::StorageStateForUma GetStorageStateForUma() override { + return bookmarks::metrics::StorageStateForUma::kLocalOnly; + } + + bool CanSetPermanentNodeTitle( + const bookmarks::BookmarkNode* permanent_node) override { + return false; + } + + bool CanSyncNode(const bookmarks::BookmarkNode* node) override { + return false; + } + + bool CanBeEditedByUser(const bookmarks::BookmarkNode* node) override { + return true; + } + + std::string EncodeBookmarkSyncMetadata() override { return ""; } + + void DecodeBookmarkSyncMetadata( + const std::string& metadata_str, + const base::RepeatingClosure& schedule_save_closure) override {} + + void OnBookmarkNodeRemovedUndoable( + bookmarks::BookmarkModel* model, + const bookmarks::BookmarkNode* parent, + size_t index, + std::unique_ptr<bookmarks::BookmarkNode> node) override {} +}; + +class MockSuggestionProvider : public SuggestedSaveLocationProvider { + public: + MockSuggestionProvider() = default; + MockSuggestionProvider(const MockSuggestionProvider&) = delete; + MockSuggestionProvider& operator=(const MockSuggestionProvider&) = delete; + ~MockSuggestionProvider() override = default; + + MOCK_METHOD(const bookmarks::BookmarkNode*, + GetSuggestion, + (const GURL& url), + (override)); + MOCK_METHOD(const base::TimeDelta, GetBackoffTime, (), (override)); +}; + +} // namespace + +// Tests for the bookmark client base. +class BookmarkClientBaseTest : public testing::Test { + protected: + void SetUp() override { + std::unique_ptr<TestBookmarkClientImpl> client = + std::make_unique<TestBookmarkClientImpl>(); + client_ = client.get(); + + model_ = + bookmarks::TestBookmarkClient::CreateModelWithClient(std::move(client)); + } + + void TearDown() override { client_ = nullptr; } + + bookmarks::BookmarkModel* model() { return model_.get(); } + BookmarkClientBase* client() { return client_; } + + protected: + base::test::TaskEnvironment task_environment_{ + base::test::TaskEnvironment::TimeSource::MOCK_TIME}; + + private: + std::unique_ptr<bookmarks::BookmarkModel> model_; + raw_ptr<TestBookmarkClientImpl> client_; +}; + +TEST_F(BookmarkClientBaseTest, SuggestedFolder) { + const GURL url_for_suggestion("http://example.com"); + const bookmarks::BookmarkNode* suggested_folder = + model()->AddFolder(model()->other_node(), 0, u"suggested folder"); + + MockSuggestionProvider provider; + ON_CALL(provider, GetSuggestion) + .WillByDefault([suggested_folder, url_for_suggestion](const GURL& url) { + // Provide a suggested save location for a very specific URL. + return url == url_for_suggestion ? suggested_folder : nullptr; + }); + ON_CALL(provider, GetBackoffTime) + .WillByDefault(testing::Return(base::Hours(2))); + + client()->AddSuggestedSaveLocationProvider(&provider); + + bookmarks::AddIfNotBookmarked(model(), url_for_suggestion, u"bookmark"); + + // The bookmark should have been added to the suggested location. + const bookmarks::BookmarkNode* node = + model()->GetMostRecentlyAddedUserNodeForURL(url_for_suggestion); + ASSERT_EQ(node->parent(), suggested_folder); + + // Save another bookmark to ensure the suggested location is not used for the + // next save. + const GURL normal_bookmark_url = GURL("http://example.com/normal"); + bookmarks::AddIfNotBookmarked(model(), normal_bookmark_url, u"bookmark 2"); + node = model()->GetMostRecentlyAddedUserNodeForURL(normal_bookmark_url); + ASSERT_NE(node->parent(), suggested_folder); + + client()->RemoveSuggestedSaveLocationProvider(&provider); +} + +TEST_F(BookmarkClientBaseTest, SuggestedFolder_Rejected) { + const GURL url_for_suggestion("http://example.com"); + const GURL url_for_suggestion2("http://example.com/other"); + std::set<const GURL> url_set = {url_for_suggestion, url_for_suggestion2}; + const bookmarks::BookmarkNode* suggested_folder = + model()->AddFolder(model()->other_node(), 0, u"suggested folder"); + + MockSuggestionProvider provider; + ON_CALL(provider, GetSuggestion) + .WillByDefault([suggested_folder, url_set](const GURL& url) { + // Suggest for multiple URLs. + return base::Contains(url_set, url) ? suggested_folder : nullptr; + }); + ON_CALL(provider, GetBackoffTime) + .WillByDefault(testing::Return(base::Hours(2))); + + client()->AddSuggestedSaveLocationProvider(&provider); + + bookmarks::AddIfNotBookmarked(model(), url_for_suggestion, u"bookmark"); + + // The bookmark should have been added to the suggested location. + const bookmarks::BookmarkNode* node = + model()->GetMostRecentlyAddedUserNodeForURL(url_for_suggestion); + ASSERT_EQ(node->parent(), suggested_folder); + + // Move the new bookmark. This indicates the user did not like the suggested + // location and changed its location in the hierarchy. + model()->Move(node, model()->other_node(), + model()->other_node()->children().size()); + + // Save another bookmark to ensure the suggested location is not used for the + // next save. + bookmarks::AddIfNotBookmarked(model(), url_for_suggestion2, u"bookmark 2"); + node = model()->GetMostRecentlyAddedUserNodeForURL(url_for_suggestion2); + ASSERT_NE(node->parent(), suggested_folder); + + task_environment_.FastForwardBy(base::Hours(3)); + + // Remove and re-bookmark the second URL. The suggested folder should be + // allowed again. + model()->Remove(node, bookmarks::metrics::BookmarkEditSource::kUser); + + bookmarks::AddIfNotBookmarked(model(), url_for_suggestion2, u"bookmark 2"); + node = model()->GetMostRecentlyAddedUserNodeForURL(url_for_suggestion2); + ASSERT_EQ(node->parent(), suggested_folder); + + client()->RemoveSuggestedSaveLocationProvider(&provider); +} + +// The suggested folder should be allowed for "normal" saves if it was +// explicitly saved to in the past. +TEST_F(BookmarkClientBaseTest, SuggestedFolder_ExplicitSave) { + const GURL url_for_suggestion("http://example.com"); + const bookmarks::BookmarkNode* suggested_folder = + model()->AddFolder(model()->other_node(), 0, u"suggested folder"); + + MockSuggestionProvider provider; + ON_CALL(provider, GetSuggestion) + .WillByDefault([suggested_folder, url_for_suggestion](const GURL& url) { + // Provide a suggested save location for a very specific URL. + return url == url_for_suggestion ? suggested_folder : nullptr; + }); + ON_CALL(provider, GetBackoffTime) + .WillByDefault(testing::Return(base::Hours(2))); + + client()->AddSuggestedSaveLocationProvider(&provider); + + bookmarks::AddIfNotBookmarked(model(), url_for_suggestion, u"bookmark 0"); + + // The bookmark should have been added to the suggested location. + const bookmarks::BookmarkNode* node = + model()->GetMostRecentlyAddedUserNodeForURL(url_for_suggestion); + ASSERT_EQ(node->parent(), suggested_folder); + + // Save another bookmark to the suggested folder explicitly, even though the + // system wouldn't normally suggest it. + const GURL normal_bookmark_url1 = GURL("http://example.com/normal_1"); + bookmarks::AddIfNotBookmarked(model(), normal_bookmark_url1, u"bookmark 1", + suggested_folder); + node = model()->GetMostRecentlyAddedUserNodeForURL(normal_bookmark_url1); + ASSERT_EQ(node->parent(), suggested_folder); + + // Save another bookmark. Even though the folder is suggested by a feature, + // the user previously saved to it explicitly. In this case we're allowed to + // suggest it again. + const GURL normal_bookmark_url2 = GURL("http://example.com/normal_2"); + bookmarks::AddIfNotBookmarked(model(), normal_bookmark_url2, u"bookmark 2"); + node = model()->GetMostRecentlyAddedUserNodeForURL(normal_bookmark_url2); + ASSERT_EQ(node->parent(), suggested_folder); + + client()->RemoveSuggestedSaveLocationProvider(&provider); +} + +} // namespace power_bookmarks
diff --git a/components/power_bookmarks/core/suggested_save_location_provider.h b/components/power_bookmarks/core/suggested_save_location_provider.h new file mode 100644 index 0000000..de1ba69 --- /dev/null +++ b/components/power_bookmarks/core/suggested_save_location_provider.h
@@ -0,0 +1,29 @@ +// 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 COMPONENTS_POWER_BOOKMARKS_CORE_SUGGESTED_SAVE_LOCATION_PROVIDER_H_ +#define COMPONENTS_POWER_BOOKMARKS_CORE_SUGGESTED_SAVE_LOCATION_PROVIDER_H_ + +#include "base/time/time.h" +#include "url/gurl.h" + +namespace power_bookmarks { + +class SuggestedSaveLocationProvider { + public: + virtual ~SuggestedSaveLocationProvider() = default; + + // Gets a save suggestion based on the provided URL. The provided bookmark + // node must either be a folder or nullptr (in the case of no suggestion). + virtual const bookmarks::BookmarkNode* GetSuggestion(const GURL& url) = 0; + + // Gets the amount of time that a suggestion should back off for if it was + // rejected by the user (usually this means observing a move event for the + // saved node immediately following creation). + virtual const base::TimeDelta GetBackoffTime() = 0; +}; + +} // namespace power_bookmarks + +#endif // COMPONENTS_POWER_BOOKMARKS_CORE_SUGGESTED_SAVE_LOCATION_PROVIDER_H_
diff --git a/components/search_engines/search_engine_choice_utils.cc b/components/search_engines/search_engine_choice_utils.cc index a239870..5db296ab 100644 --- a/components/search_engines/search_engine_choice_utils.cc +++ b/components/search_engines/search_engine_choice_utils.cc
@@ -4,11 +4,13 @@ #include "components/search_engines/search_engine_choice_utils.h" +#include "base/feature_list.h" #include "base/values.h" #include "components/policy/core/common/policy_service.h" #include "components/policy/policy_constants.h" #include "components/prefs/pref_service.h" #include "components/search_engines/search_engines_pref_names.h" +#include "components/signin/public/base/signin_switches.h" namespace search_engines { namespace { @@ -43,6 +45,10 @@ bool ShouldShowChoiceScreen(const policy::PolicyService& policy_service, const ProfileProperties& profile_properties) { + if (!base::FeatureList::IsEnabled(switches::kSearchEngineChoice)) { + return false; + } + // The timestamp indicates that the user has already made a search engine // choice in the choice screen. PrefService* prefs = profile_properties.pref_service;
diff --git a/components/search_engines/search_engine_choice_utils_unittest.cc b/components/search_engines/search_engine_choice_utils_unittest.cc index 23d3caf..66914a6e 100644 --- a/components/search_engines/search_engine_choice_utils_unittest.cc +++ b/components/search_engines/search_engine_choice_utils_unittest.cc
@@ -33,6 +33,7 @@ policy::MockPolicyService& policy_service() { return policy_service_; } policy::PolicyMap& policy_map() { return policy_map_; } TestingPrefServiceSimple* pref_service() { return &pref_service_; } + base::test::ScopedFeatureList* feature_list() { return &feature_list_; } private: void InitMockPolicyService() { @@ -138,3 +139,12 @@ /*profile_properties=*/{.is_regular_profile = true, .pref_service = pref_service()})); } + +// Ensure that the choice screen doesn't get displayed if the flag is disabled. +TEST_F(SearchEngineChoiceUtilsTest, DoNotShowChoiceScreenIfFlagIsDisabled) { + feature_list()->Reset(); + feature_list()->InitAndDisableFeature(switches::kSearchEngineChoice); + EXPECT_FALSE(search_engines::ShouldShowChoiceScreen( + policy_service(), /*profile_properties=*/{ + .is_regular_profile = true, .pref_service = pref_service()})); +}
diff --git a/components/variations/cros_evaluate_seed/early_boot_seed_store.cc b/components/variations/cros_evaluate_seed/early_boot_seed_store.cc index fcd8e75..5b42d424 100644 --- a/components/variations/cros_evaluate_seed/early_boot_seed_store.cc +++ b/components/variations/cros_evaluate_seed/early_boot_seed_store.cc
@@ -31,8 +31,8 @@ return false; } - client_state->reference_date = - base::Time::FromJavaTime(safe_seed_details_->date()); + client_state->reference_date = base::Time::FromDeltaSinceWindowsEpoch( + base::Milliseconds(safe_seed_details_->date())); client_state->locale = safe_seed_details_->locale(); client_state->permanent_consistency_country = safe_seed_details_->permanent_consistency_country(); @@ -42,4 +42,12 @@ return true; } +base::Time EarlyBootSeedStore::GetSafeSeedFetchTime() const { + // We require that evaluate_seed's command line specified a safe seed in order + // to use the safe seed. + CHECK(safe_seed_details_.has_value()); + return base::Time::FromDeltaSinceWindowsEpoch( + base::Milliseconds(safe_seed_details_->fetch_time())); +} + } // namespace variations::cros_early_boot::evaluate_seed
diff --git a/components/variations/cros_evaluate_seed/early_boot_seed_store.h b/components/variations/cros_evaluate_seed/early_boot_seed_store.h index 8e2c39a..d47c6c2 100644 --- a/components/variations/cros_evaluate_seed/early_boot_seed_store.h +++ b/components/variations/cros_evaluate_seed/early_boot_seed_store.h
@@ -42,6 +42,10 @@ bool LoadSafeSeed(VariationsSeed* seed, ClientFilterableState* client_state) override; + // Returns the time at which the safe seed was persisted to the platform-side + // store. + base::Time GetSafeSeedFetchTime() const override; + private: const absl::optional<featured::SeedDetails> safe_seed_details_; };
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 7465490e..0f69cd41 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
@@ -49,6 +49,7 @@ featured::SeedDetails safe_seed_details; safe_seed_details.set_date(123456789); + safe_seed_details.set_fetch_time(987654321); safe_seed_details.set_locale("xx-YY"); safe_seed_details.set_permanent_consistency_country("us"); safe_seed_details.set_session_consistency_country("ca"); @@ -75,13 +76,18 @@ EXPECT_TRUE(store.LoadSafeSeed(&actual_seed, &actual_client_state)); EXPECT_THAT(actual_seed, EqualsProto(safe_seed)); - EXPECT_EQ(base::Time::FromJavaTime(safe_seed_details.date()), + EXPECT_EQ(base::Time::FromDeltaSinceWindowsEpoch( + base::Milliseconds(safe_seed_details.date())), actual_client_state.reference_date); EXPECT_EQ(safe_seed_details.locale(), actual_client_state.locale); EXPECT_EQ(safe_seed_details.permanent_consistency_country(), actual_client_state.permanent_consistency_country); EXPECT_EQ(safe_seed_details.session_consistency_country(), actual_client_state.session_consistency_country); + + EXPECT_EQ(base::Time::FromDeltaSinceWindowsEpoch( + base::Milliseconds(safe_seed_details.fetch_time())), + store.GetSafeSeedFetchTime()); } TEST(EarlyBootSeedStoreDeathTest, LoadSafeSeed_Unspecified) {
diff --git a/components/variations/variations_seed_store.h b/components/variations/variations_seed_store.h index 7d2d194..abbec6e 100644 --- a/components/variations/variations_seed_store.h +++ b/components/variations/variations_seed_store.h
@@ -123,7 +123,9 @@ base::Time GetLastFetchTime() const; // Returns the time at which the safe seed was persisted to the local state. - base::Time GetSafeSeedFetchTime() const; + // + // Virtual for early-boot CrOS experiments to use a different safe seed. + virtual base::Time GetSafeSeedFetchTime() const; // Records |fetch_time| as the last time at which a seed was fetched // successfully. Also updates the safe seed's fetch time if the latest and
diff --git a/components/viz/service/display_embedder/output_presenter.cc b/components/viz/service/display_embedder/output_presenter.cc index 4f6ba094..2ed1445 100644 --- a/components/viz/service/display_embedder/output_presenter.cc +++ b/components/viz/service/display_embedder/output_presenter.cc
@@ -160,8 +160,4 @@ return nullptr; } -bool OutputPresenter::SupportsGpuVSync() const { - return false; -} - } // namespace viz
diff --git a/components/viz/service/display_embedder/output_presenter.h b/components/viz/service/display_embedder/output_presenter.h index 9836e23..73166ba 100644 --- a/components/viz/service/display_embedder/output_presenter.h +++ b/components/viz/service/display_embedder/output_presenter.h
@@ -131,8 +131,6 @@ ScopedOverlayAccess* access, std::unique_ptr<gfx::GpuFence> acquire_fence) = 0; - virtual bool SupportsGpuVSync() const; - virtual void SetGpuVSyncEnabled(bool enabled) {} virtual void SetVSyncDisplayID(int64_t display_id) {} #if BUILDFLAG(IS_APPLE)
diff --git a/components/viz/service/display_embedder/output_presenter_gl.cc b/components/viz/service/display_embedder/output_presenter_gl.cc index 9c9d959f..3af3117 100644 --- a/components/viz/service/display_embedder/output_presenter_gl.cc +++ b/components/viz/service/display_embedder/output_presenter_gl.cc
@@ -347,14 +347,6 @@ #endif } -bool OutputPresenterGL::SupportsGpuVSync() const { - return presenter_->SupportsGpuVSync(); -} - -void OutputPresenterGL::SetGpuVSyncEnabled(bool enabled) { - presenter_->SetGpuVSyncEnabled(enabled); -} - void OutputPresenterGL::SetVSyncDisplayID(int64_t display_id) { presenter_->SetVSyncDisplayID(display_id); }
diff --git a/components/viz/service/display_embedder/output_presenter_gl.h b/components/viz/service/display_embedder/output_presenter_gl.h index 1e9144a1..e5f854ad 100644 --- a/components/viz/service/display_embedder/output_presenter_gl.h +++ b/components/viz/service/display_embedder/output_presenter_gl.h
@@ -58,8 +58,6 @@ const OutputPresenter::OverlayPlaneCandidate& overlay_plane_candidate, ScopedOverlayAccess* access, std::unique_ptr<gfx::GpuFence> acquire_fence) final; - bool SupportsGpuVSync() const final; - void SetGpuVSyncEnabled(bool enabled) final; void SetVSyncDisplayID(int64_t display_id) final; #if BUILDFLAG(IS_APPLE) void SetCALayerErrorCode(gfx::CALayerResult ca_layer_error_code) final;
diff --git a/components/viz/service/display_embedder/skia_output_device_buffer_queue.cc b/components/viz/service/display_embedder/skia_output_device_buffer_queue.cc index 06031c3..31fb397 100644 --- a/components/viz/service/display_embedder/skia_output_device_buffer_queue.cc +++ b/components/viz/service/display_embedder/skia_output_device_buffer_queue.cc
@@ -178,7 +178,6 @@ capabilities_.preserve_buffer_content = true; capabilities_.only_invalidates_damage_rect = false; capabilities_.number_of_buffers = 3; - capabilities_.supports_gpu_vsync = presenter_->SupportsGpuVSync(); capabilities_.renderer_allocates_images = ::features::ShouldRendererAllocateImages(); @@ -718,10 +717,6 @@ return lhs < rhs.mailbox(); } -void SkiaOutputDeviceBufferQueue::SetGpuVSyncEnabled(bool enabled) { - presenter_->SetGpuVSyncEnabled(enabled); -} - void SkiaOutputDeviceBufferQueue::SetVSyncDisplayID(int64_t display_id) { presenter_->SetVSyncDisplayID(display_id); }
diff --git a/components/viz/service/display_embedder/skia_output_device_buffer_queue.h b/components/viz/service/display_embedder/skia_output_device_buffer_queue.h index 1bc2dee..747ffd19 100644 --- a/components/viz/service/display_embedder/skia_output_device_buffer_queue.h +++ b/components/viz/service/display_embedder/skia_output_device_buffer_queue.h
@@ -64,7 +64,6 @@ void ScheduleOverlays(SkiaOutputSurface::OverlayList overlays) override; // SkiaOutputDevice override - void SetGpuVSyncEnabled(bool enabled) override; void SetVSyncDisplayID(int64_t display_id) override; private:
diff --git a/components/viz/service/display_embedder/skia_output_device_offscreen.cc b/components/viz/service/display_embedder/skia_output_device_offscreen.cc index 5a5c25a..dd87992 100644 --- a/components/viz/service/display_embedder/skia_output_device_offscreen.cc +++ b/components/viz/service/display_embedder/skia_output_device_offscreen.cc
@@ -6,6 +6,7 @@ #include <utility> +#include "components/viz/common/resources/shared_image_format_utils.h" #include "gpu/command_buffer/service/shared_image/shared_image_format_service_utils.h" #include "gpu/command_buffer/service/skia_utils.h" #include "third_party/skia/include/core/SkSurface.h" @@ -17,14 +18,6 @@ namespace viz { -namespace { - -// Some Vulkan drivers do not support kRGB_888x_SkColorType. Always use -// kRGBA_8888_SkColorType instead and initialize surface to opaque as necessary. -constexpr SkColorType kSurfaceColorType = kRGBA_8888_SkColorType; - -} // namespace - SkiaOutputDeviceOffscreen::SkiaOutputDeviceOffscreen( scoped_refptr<gpu::SharedContextState> context_state, gfx::SurfaceOrigin origin, @@ -41,16 +34,19 @@ capabilities_.output_surface_origin = origin; capabilities_.supports_post_sub_buffer = true; + // Some Vulkan drivers do not support kRGB_888x_SkColorType. Always use + // kRGBA/BGRA_8888_SkColorType instead and initialize surface to opaque as + // necessary. // TODO(https://crbug.com/1108406): use the right color types base on GPU // capabilities. capabilities_.sk_color_types[static_cast<int>(gfx::BufferFormat::RGBA_8888)] = - kSurfaceColorType; + kRGBA_8888_SkColorType; capabilities_.sk_color_types[static_cast<int>(gfx::BufferFormat::RGBX_8888)] = - kSurfaceColorType; + kRGBA_8888_SkColorType; capabilities_.sk_color_types[static_cast<int>(gfx::BufferFormat::BGRA_8888)] = - kSurfaceColorType; + kBGRA_8888_SkColorType; capabilities_.sk_color_types[static_cast<int>(gfx::BufferFormat::BGRX_8888)] = - kSurfaceColorType; + kBGRA_8888_SkColorType; } SkiaOutputDeviceOffscreen::~SkiaOutputDeviceOffscreen() { @@ -63,8 +59,6 @@ float device_scale_factor, gfx::OverlayTransform transform) { DCHECK_EQ(transform, gfx::OVERLAY_TRANSFORM_NONE); - CHECK_EQ(image_info.colorType(), SkColorType::kRGBA_8888_SkColorType); - DiscardBackbuffer(); size_ = gfx::SkISizeToSize(image_info.dimensions()); sk_color_type_ = image_info.colorType(); @@ -119,7 +113,7 @@ #endif } else { auto info = SkImageInfo::Make(size_.width(), size_.height(), - kSurfaceColorType, kUnpremul_SkAlphaType); + sk_color_type_, kUnpremul_SkAlphaType); size_t estimated_size = info.computeMinByteSize(); backbuffer_estimated_size_ = estimated_size; } @@ -129,13 +123,14 @@ is_emulated_rgbx_ = true; } skgpu::graphite::TextureInfo texture_info = gpu::GetGraphiteTextureInfo( - context_state_->gr_context_type(), SinglePlaneFormat::kRGBA_8888); + context_state_->gr_context_type(), + SkColorTypeToSinglePlaneSharedImageFormat(sk_color_type_)); graphite_texture_ = context_state_->gpu_main_graphite_recorder()->createBackendTexture( gfx::SizeToSkISize(size_), texture_info); CHECK(graphite_texture_.isValid()); - auto info = SkImageInfo::Make(size_.width(), size_.height(), - kSurfaceColorType, kUnpremul_SkAlphaType); + auto info = SkImageInfo::Make(size_.width(), size_.height(), sk_color_type_, + kUnpremul_SkAlphaType); size_t estimated_size = info.computeMinByteSize(); backbuffer_estimated_size_ = estimated_size; } @@ -170,7 +165,7 @@ capabilities_.output_surface_origin == gfx::SurfaceOrigin::kTopLeft ? kTopLeft_GrSurfaceOrigin : kBottomLeft_GrSurfaceOrigin, - sample_count_, kSurfaceColorType, sk_color_space_, &surface_props); + sample_count_, sk_color_type_, sk_color_space_, &surface_props); } else { CHECK(graphite_context_); sk_surface_ = SkSurfaces::WrapBackendTexture(
diff --git a/components/viz/service/display_embedder/skia_output_device_x11.cc b/components/viz/service/display_embedder/skia_output_device_x11.cc index 66f3479..75cebf8 100644 --- a/components/viz/service/display_embedder/skia_output_device_x11.cc +++ b/components/viz/service/display_embedder/skia_output_device_x11.cc
@@ -9,7 +9,9 @@ #include "base/logging.h" #include "base/memory/ref_counted_memory.h" +#include "third_party/libyuv/include/libyuv/planar_functions.h" #include "third_party/skia/include/core/SkImageInfo.h" +#include "third_party/skia/include/gpu/graphite/Context.h" #include "ui/base/x/x11_util.h" #include "ui/gfx/geometry/rect.h" #include "ui/gfx/x/xproto.h" @@ -24,6 +26,19 @@ return gc; } +struct ReadPixelsContext { + std::unique_ptr<const SkImage::AsyncReadResult> async_result; + bool finished = false; +}; + +void OnReadPixelsDone( + void* raw_ctx, + std::unique_ptr<const SkImage::AsyncReadResult> async_result) { + ReadPixelsContext* context = reinterpret_cast<ReadPixelsContext*>(raw_ctx); + context->async_result = std::move(async_result); + context->finished = true; +} + } // namespace // static @@ -93,15 +108,34 @@ gfx::Rect(0, 0, sk_surface_->width(), sk_surface_->height())); StartSwapBuffers(std::move(feedback)); if (!rect.IsEmpty()) { - auto ii = + auto dst_info = SkImageInfo::MakeN32(rect.width(), rect.height(), kOpaque_SkAlphaType); - DCHECK_GE(pixels_->size(), ii.computeMinByteSize()); - SkPixmap sk_pixmap(ii, pixels_->data(), ii.minRowBytes()); - bool result = sk_surface_->readPixels(sk_pixmap, rect.x(), rect.y()); - LOG_IF(FATAL, !result) << "Failed to read pixels from offscreen SkSurface."; + DCHECK_GE(pixels_->size(), dst_info.computeMinByteSize()); + SkPixmap dst_pixmap(dst_info, pixels_->data(), dst_info.minRowBytes()); + + if (gr_context_) { + bool result = sk_surface_->readPixels(dst_pixmap, rect.x(), rect.y()); + LOG_IF(FATAL, !result) + << "Failed to read pixels from offscreen SkSurface."; + } else { + CHECK(graphite_context_); + ReadPixelsContext context; + graphite_context_->asyncRescaleAndReadPixels( + sk_surface_.get(), dst_info, gfx::RectToSkIRect(rect), + SkImage::RescaleGamma::kSrc, SkImage::RescaleMode::kRepeatedLinear, + &OnReadPixelsDone, &context); + graphite_context_->submit(skgpu::graphite::SyncToCpu::kYes); + LOG_IF(FATAL, !context.async_result) + << "Failed to read pixels from offscreen SkSurface."; + libyuv::CopyPlane( + static_cast<const uint8_t*>(context.async_result->data(0)), + context.async_result->rowBytes(0), + static_cast<uint8_t*>(dst_pixmap.writable_addr()), + dst_pixmap.rowBytes(), dst_info.minRowBytes(), dst_info.height()); + } // TODO(penghuang): Switch to XShmPutImage. - ui::DrawPixmap(x11::Connection::Get(), visual_, window_, gc_, sk_pixmap, + ui::DrawPixmap(x11::Connection::Get(), visual_, window_, gc_, dst_pixmap, 0 /* src_x */, 0 /* src_y */, rect.x() /* dst_x */, rect.y() /* dst_y */, rect.width(), rect.height());
diff --git a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm index afb765c..ecd1720 100644 --- a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm +++ b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
@@ -1048,9 +1048,19 @@ return NO; } - // If the event is reserved by the system, then do not pass it to web content. - if (EventIsReservedBySystem(theEvent)) + // If the event is reserved by the system, do not pass it to web content. + // If the user changes the system hotkey mapping after Chrome has been + // launched, it is possible that a formerly reserved system hotkey is no + // longer reserved. The hotkey would have skipped the renderer, but would + // also have not been handled by the system. If this is the case, immediately + // return. + // TODO(erikchen): SystemHotkeyHelperMac should use the File System Events + // api to monitor changes to system hotkeys. This logic will have to be + // updated. + // http://crbug.com/383558. + if (EventIsReservedBySystem(theEvent)) { return NO; + } // Command key combinations are sent via performKeyEquivalent rather than // keyDown:. We just forward this on and if WebCore doesn't want to handle
diff --git a/content/browser/accessibility/render_accessibility_host.cc b/content/browser/accessibility/render_accessibility_host.cc index ce563bd..304b2cf 100644 --- a/content/browser/accessibility/render_accessibility_host.cc +++ b/content/browser/accessibility/render_accessibility_host.cc
@@ -24,7 +24,7 @@ void RenderAccessibilityHost::HandleAXEvents( blink::mojom::AXUpdatesAndEventsPtr updates_and_events, - int32_t reset_token, + uint32_t reset_token, HandleAXEventsCallback callback) { // Post the HandleAXEvents task onto the UI thread, and then when that // finishes, post back the response callback onto this runner (to satisfy @@ -38,11 +38,12 @@ } void RenderAccessibilityHost::HandleAXLocationChanges( - std::vector<blink::mojom::LocationChangesPtr> changes) { + std::vector<blink::mojom::LocationChangesPtr> changes, + uint32_t reset_token) { content::GetUIThreadTaskRunner({})->PostTask( - FROM_HERE, - base::BindOnce(&RenderFrameHostImpl::HandleAXLocationChanges, - render_frame_host_impl_, tree_id_, std::move(changes))); + FROM_HERE, base::BindOnce(&RenderFrameHostImpl::HandleAXLocationChanges, + render_frame_host_impl_, tree_id_, + std::move(changes), reset_token)); } } // namespace content
diff --git a/content/browser/accessibility/render_accessibility_host.h b/content/browser/accessibility/render_accessibility_host.h index 61fc2d3e..133d901 100644 --- a/content/browser/accessibility/render_accessibility_host.h +++ b/content/browser/accessibility/render_accessibility_host.h
@@ -52,11 +52,12 @@ ~RenderAccessibilityHost() override; void HandleAXEvents(blink::mojom::AXUpdatesAndEventsPtr updates_and_events, - int32_t reset_token, + uint32_t reset_token, HandleAXEventsCallback callback) override; void HandleAXLocationChanges( - std::vector<blink::mojom::LocationChangesPtr> changes) override; + std::vector<blink::mojom::LocationChangesPtr> changes, + uint32_t reset_token) override; private: base::WeakPtr<RenderFrameHostImpl> render_frame_host_impl_;
diff --git a/content/browser/android/content_feature_map.cc b/content/browser/android/content_feature_map.cc index 643f8a4..7f74051 100644 --- a/content/browser/android/content_feature_map.cc +++ b/content/browser/android/content_feature_map.cc
@@ -28,7 +28,6 @@ &features::kBackgroundMediaRendererHasModerateBinding, &features::kFedCm, &features::kMouseAndTrackpadDropdownMenu, - &features::kOnDemandAccessibilityEvents, &kOptimizeImmHideCalls, &features::kProcessSharingWithStrictSiteInstances, &features::kReduceGpuPriorityOnBackground,
diff --git a/content/browser/android/selection/magnifier_surface_control.cc b/content/browser/android/selection/magnifier_surface_control.cc index 266ab20..152b839 100644 --- a/content/browser/android/selection/magnifier_surface_control.cc +++ b/content/browser/android/selection/magnifier_surface_control.cc
@@ -4,11 +4,13 @@ #include "content/browser/android/selection/magnifier_surface_control.h" +#include <algorithm> #include <utility> #include "base/memory/raw_ptr.h" #include "cc/layers/deadline_policy.h" #include "cc/slim/frame_sink.h" +#include "cc/slim/solid_color_layer.h" #include "cc/slim/surface_layer.h" #include "components/viz/common/frame_timing_details_map.h" #include "components/viz/common/surfaces/surface_range.h" @@ -40,6 +42,14 @@ namespace content { +namespace { +// These values are passed to `gfx::LinearGradient::AddStep`. They are alpha +// values ranging from 0 to 255. These are the max and min alpha applied to +// opaque black that represent the darkest and lightest part of the shadow. +constexpr uint8_t kDarkestAlpha = 64; +constexpr uint8_t kLightestAlpha = 0; +} // namespace + static jlong JNI_MagnifierSurfaceControl_Create( JNIEnv* env, const base::android::JavaParamRef<jobject>& j_web_contents, @@ -48,7 +58,10 @@ jint width, jint height, jfloat corner_radius, - float zoom) { + float zoom, + int top_shadow_height, + int bottom_shadow_height, + int bottom_shadow_width_reduction) { WebContentsImpl* web_contents = static_cast<WebContentsImpl*>( WebContents::FromJavaWebContents(j_web_contents)); @@ -61,9 +74,10 @@ tracker->AddSurfaceForNativeWidget(gpu::GpuSurfaceTracker::SurfaceRecord( std::move(scoped_java_surface_control))); - return reinterpret_cast<jlong>( - new MagnifierSurfaceControl(web_contents, surface_handle, device_scale, - width, height, corner_radius, zoom)); + return reinterpret_cast<jlong>(new MagnifierSurfaceControl( + web_contents, surface_handle, device_scale, width, height, corner_radius, + zoom, top_shadow_height, bottom_shadow_height, + bottom_shadow_width_reduction)); } static void JNI_MagnifierSurfaceControl_Destroy( @@ -79,12 +93,15 @@ int width, int height, float corner_radius, - float zoom) + float zoom, + int top_shadow_height, + int bottom_shadow_height, + int bottom_shadow_width_reduction) : HostDisplayClient(gfx::kNullAcceleratedWidget), web_contents_(web_contents), surface_handle_(surface_handle), frame_sink_id_(AllocateFrameSinkId()), - size_(width, height), + surface_size_(width, height + top_shadow_height + bottom_shadow_height), root_layer_(cc::slim::Layer::Create()), zoom_layer_(cc::slim::Layer::Create()), surface_layer_(cc::slim::SurfaceLayer::Create()) { @@ -101,21 +118,73 @@ } layer_tree_->set_background_color(SkColors::kTransparent); layer_tree_->SetViewportRectAndScale( - gfx::Rect(size_), device_scale, + gfx::Rect(surface_size_), device_scale, local_surface_id_allocator_.GetCurrentLocalSurfaceId()); CreateDisplayAndFrameSink(); surface_layer_->SetIsDrawable(true); - root_layer_->SetBounds(size_); - root_layer_->SetRoundedCorner(gfx::RoundedCornersF(corner_radius)); + root_layer_->SetBounds(surface_size_); - zoom_layer_->SetBounds(size_); + // Shadows are solid black layers with linear gradient applied. They have the + // same rounded corner as magnifier. And they are shifted slightly by + // `top_shadow_height` and `bottom_shadow_height` so that they are visible. + { + auto top_shadow = cc::slim::SolidColorLayer::Create(); + // Layer height is calculated so that top and bottom shadows never overlap. + // Otherwise use the corner radius since shadow not below rounded corner is + // not visible. + int layer_height = std::min(static_cast<int>(corner_radius + 0.5), + height / 2 + top_shadow_height); + top_shadow->SetIsDrawable(true); + top_shadow->SetBackgroundColor(SkColors::kBlack); + top_shadow->SetBounds(gfx::Size(surface_size_.width(), layer_height)); + gfx::LinearGradient gradient; + gradient.set_angle(90); + gradient.AddStep(0.0f, kDarkestAlpha); + gradient.AddStep(1.0f, kLightestAlpha); + top_shadow->SetGradientMask(gradient); + top_shadow->SetRoundedCorner( + gfx::RoundedCornersF(corner_radius, corner_radius, 0, 0)); + root_layer_->AddChild(std::move(top_shadow)); + } + + { + auto bottom_shadow = cc::slim::SolidColorLayer::Create(); + // See comment on layer height for top shadow. + int layer_height = std::min(static_cast<int>(corner_radius + 0.5), + height / 2 + bottom_shadow_height); + bottom_shadow->SetIsDrawable(true); + bottom_shadow->SetBackgroundColor(SkColors::kBlack); + // Inset layer horizontally by `bottom_shadow_width_reduction`. + bottom_shadow->SetBounds( + gfx::Size(surface_size_.width() - bottom_shadow_width_reduction * 2, + layer_height)); + // Place bottom shadow layer at the bottom of surface. + bottom_shadow->SetPosition(gfx::PointF( + bottom_shadow_width_reduction, surface_size_.height() - layer_height)); + gfx::LinearGradient gradient; + gradient.set_angle(270); + gradient.AddStep(0.0f, kDarkestAlpha); + gradient.AddStep(1.0f, kLightestAlpha); + bottom_shadow->SetGradientMask(gradient); + bottom_shadow->SetRoundedCorner( + gfx::RoundedCornersF(0, 0, corner_radius, corner_radius)); + root_layer_->AddChild(std::move(bottom_shadow)); + } + + auto rounded_corner_layer = cc::slim::Layer::Create(); + rounded_corner_layer->SetPosition(gfx::PointF(0, top_shadow_height)); + rounded_corner_layer->SetBounds(gfx::Size(width, height)); + rounded_corner_layer->SetRoundedCorner(gfx::RoundedCornersF(corner_radius)); + root_layer_->AddChild(rounded_corner_layer); + + zoom_layer_->SetBounds(gfx::Size(width, height)); zoom_layer_->SetTransformOrigin( - gfx::Point3F(size_.width() / 2.0f, size_.height() / 2.0f, 0.0f)); + gfx::Point3F(width / 2.0f, height / 2.0f, 0.0f)); zoom_layer_->SetTransform(gfx::Transform::MakeScale(zoom)); layer_tree_->SetRoot(root_layer_); - root_layer_->AddChild(zoom_layer_); + rounded_corner_layer->AddChild(zoom_layer_); zoom_layer_->AddChild(surface_layer_); GetHostFrameSinkManager()->RegisterFrameSinkId( @@ -202,7 +271,7 @@ renderer_settings.allow_antialiasing = false; renderer_settings.highp_threshold_min = 2048; renderer_settings.requires_alpha_channel = true; - renderer_settings.initial_screen_size = size_; + renderer_settings.initial_screen_size = surface_size_; renderer_settings.color_space = display_color_spaces.GetOutputColorSpace( gfx::ContentColorUsage::kHDR, renderer_settings.requires_alpha_channel); @@ -216,7 +285,7 @@ std::move(root_params)); display_private_->SetDisplayVisible(true); - display_private_->Resize(size_); + display_private_->Resize(surface_size_); display_private_->SetDisplayColorSpaces(display_color_spaces); display_private_->SetSupportedRefreshRates( window_android->GetSupportedRefreshRates());
diff --git a/content/browser/android/selection/magnifier_surface_control.h b/content/browser/android/selection/magnifier_surface_control.h index df0d6f5..fcdd893 100644 --- a/content/browser/android/selection/magnifier_surface_control.h +++ b/content/browser/android/selection/magnifier_surface_control.h
@@ -39,7 +39,10 @@ int width, int height, float corner_radius, - float zoom); + float zoom, + int top_shadow_height, + int bottom_shadow_height, + int bottom_shadow_width_reduction); ~MagnifierSurfaceControl() override; void SetReadbackOrigin(JNIEnv* env, jfloat x, jfloat y); @@ -72,7 +75,7 @@ const gpu::SurfaceHandle surface_handle_; const viz::FrameSinkId frame_sink_id_; - const gfx::Size size_; + const gfx::Size surface_size_; // Includes shadow. const scoped_refptr<cc::slim::Layer> root_layer_; const scoped_refptr<cc::slim::Layer> zoom_layer_; const scoped_refptr<cc::slim::SurfaceLayer> surface_layer_;
diff --git a/content/browser/back_forward_cache_internal_browsertest.cc b/content/browser/back_forward_cache_internal_browsertest.cc index ebdd389..f2e5852 100644 --- a/content/browser/back_forward_cache_internal_browsertest.cc +++ b/content/browser/back_forward_cache_internal_browsertest.cc
@@ -3630,8 +3630,7 @@ // in the same task of |HandleAXEventsForTests()| and and result in a test // fail. rfh_a->HandleAXEventsForTests(rfh_a->GetAXTreeID(), - std::move(updates_and_events), - /*reset_token=*/0); + std::move(updates_and_events)); // Reset the callback before restoring the page so that we will not fail when // events are generated.
diff --git a/content/browser/child_process_launcher_helper_android.cc b/content/browser/child_process_launcher_helper_android.cc index 55b592b3..a6f1f08 100644 --- a/content/browser/child_process_launcher_helper_android.cc +++ b/content/browser/child_process_launcher_helper_android.cc
@@ -7,7 +7,9 @@ #include "base/android/apk_assets.h" #include "base/android/application_status_listener.h" +#include "base/android/build_info.h" #include "base/android/jni_array.h" +#include "base/base_switches.h" #include "base/functional/bind.h" #include "base/i18n/icu_util.h" #include "base/logging.h" @@ -92,6 +94,22 @@ DCHECK(process_type == switches::kGpuProcess || !command_line()->HasSwitch(sandbox::policy::switches::kNoSandbox)); + // The child processes can't correctly retrieve host package information so we + // rather feed this information through the command line. + auto* build_info = base::android::BuildInfo::GetInstance(); + command_line()->AppendSwitchASCII(switches::kHostPackageName, + build_info->host_package_name()); + command_line()->AppendSwitchASCII(switches::kPackageName, + build_info->package_name()); + command_line()->AppendSwitchASCII(switches::kHostPackageLabel, + build_info->host_package_label()); + command_line()->AppendSwitchASCII(switches::kHostVersionCode, + build_info->host_version_code()); + command_line()->AppendSwitchASCII(switches::kPackageVersionName, + build_info->package_version_name()); + command_line()->AppendSwitchASCII(switches::kPackageVersionCode, + build_info->package_version_code()); + return true; }
diff --git a/content/browser/cocoa/system_hotkey_map.h b/content/browser/cocoa/system_hotkey_map.h index 62ab79fef..e93dc1f 100644 --- a/content/browser/cocoa/system_hotkey_map.h +++ b/content/browser/cocoa/system_hotkey_map.h
@@ -44,15 +44,19 @@ FRIEND_TEST_ALL_PREFIXES(SystemHotkeyMapTest, Parse); FRIEND_TEST_ALL_PREFIXES(SystemHotkeyMapTest, ParseCustomEntries); FRIEND_TEST_ALL_PREFIXES(SystemHotkeyMapTest, ParseMouse); + FRIEND_TEST_ALL_PREFIXES(SystemHotkeyMapTest, + ReverseWindowCyclingHotkeyExists); + FRIEND_TEST_ALL_PREFIXES(SystemHotkeyMapTest, + IgnoreUndocumentedShortcutEntries); // Whether the hotkey has been reserved by the user. bool IsHotkeyReserved(unsigned short key_code, NSUInteger modifiers) const; - // Create at least one record of a hotkey that is reserved by the user. + // Creates at least one record of a hotkey that is reserved by the user. // Certain system hotkeys automatically reserve multiple key combinations. void ReserveHotkey(unsigned short key_code, NSUInteger modifiers, - NSString* system_effect); + NSString* system_hotkey_identifier); // Create a record of a hotkey that is reserved by the user. void ReserveHotkey(unsigned short key_code, NSUInteger modifiers);
diff --git a/content/browser/cocoa/system_hotkey_map.mm b/content/browser/cocoa/system_hotkey_map.mm index 66860bb..24fa4ecc 100644 --- a/content/browser/cocoa/system_hotkey_map.mm +++ b/content/browser/cocoa/system_hotkey_map.mm
@@ -8,37 +8,6 @@ #include "base/apple/foundation_util.h" -#pragma mark - NSDictionary Helper Functions - -namespace { - -// All 4 following functions return nil if the object doesn't exist, or isn't of -// the right class. -id ObjectForKey(NSDictionary* dict, NSString* key, Class aClass) { - id object = [dict objectForKey:key]; - if (![object isKindOfClass:aClass]) - return nil; - return object; -} - -NSDictionary* DictionaryForKey(NSDictionary* dict, NSString* key) { - return ObjectForKey(dict, key, [NSDictionary class]); -} - -NSArray* ArrayForKey(NSDictionary* dict, NSString* key) { - return ObjectForKey(dict, key, [NSArray class]); -} - -NSNumber* NumberForKey(NSDictionary* dict, NSString* key) { - return ObjectForKey(dict, key, [NSNumber class]); -} - -NSString* StringForKey(NSDictionary* dict, NSString* key) { - return ObjectForKey(dict, key, [NSString class]); -} - -} // namespace - #pragma mark - SystemHotkey namespace content { @@ -57,19 +26,21 @@ bool SystemHotkeyMap::ParseDictionary(NSDictionary* dictionary) { system_hotkeys_.clear(); - if (!dictionary) + if (!dictionary) { return false; + } NSDictionary* user_hotkey_dictionaries = - DictionaryForKey(dictionary, @"AppleSymbolicHotKeys"); - if (!user_hotkey_dictionaries) + base::apple::ObjCCast<NSDictionary>(dictionary[@"AppleSymbolicHotKeys"]); + if (!user_hotkey_dictionaries) { return false; + } - // Start with a dictionary of default OS X hotkeys that are not necessarily + // Start with a dictionary of default macOS hotkeys that are not necessarily // listed in com.apple.symbolichotkeys.plist, but should still be handled as // reserved. // If the user has overridden or disabled any of these hotkeys, - // -NSMutableDictionary addEntriesFromDictionary:] will ensure that the new + // [NSMutableDictionary addEntriesFromDictionary:] will ensure that the new // values are used. // See https://crbug.com/145062#c8 NSMutableDictionary* hotkey_dictionaries = [@{ @@ -87,41 +58,86 @@ } mutableCopy]; [hotkey_dictionaries addEntriesFromDictionary:user_hotkey_dictionaries]; - for (NSString* hotkey_system_effect in [hotkey_dictionaries allKeys]) { - if (![hotkey_system_effect isKindOfClass:[NSString class]]) - continue; + // The meanings of the keys in `user_hotkey_dictionaries` are listed here: + // https://web.archive.org/web/20141112224103/http://hintsforums.macworld.com/showthread.php?t=114785 + // Of particular interest are the following: + // + // # Spaces Left - Control, Left + // 79 = { enabled = 1; ... }; + // + // # Spaces Right - Control, Right + // 81 = { enabled = 1; ... }; + // + // Apparently, when you change the shortcuts for Spaces Left/Right, macOS + // also inserts entries at slots 80 and 82 which differ from the previous + // entries by the addition of the Shift key. This is similar to entries 60 + // and 61 as documented in the web page above where Command, Option, Space + // cycles to the previous input source and Command, Option, Space, Shift + // cycles to the next. This approach doesn't make sense for moving between + // Spaces using the arrow keys. Maybe there's legacy machinery in the AppKit + // that automatically creates the shifted versions and macOS knows to ignore + // them (not expecting any non-system applications to read this file). + // + // Treating these shortcuts as valid results in unexpected behavior. For + // example, in the case of "Spaces Left" being mapped to Option Left Arrow, + // Chrome would silently ignore Shift-Option Left Arrow, the shortcut which + // appends the current text selection by one word to the left. To avoid + // this, we'll ignore these two undocumented shortcuts. + // See https://crbug.com/874219 . + const NSString* kSpacesLeftShiftedHotkeyId = @"80"; + const NSString* kSpacesRightShiftedHotkeyId = @"82"; + [hotkey_dictionaries removeObjectForKey:kSpacesLeftShiftedHotkeyId]; + [hotkey_dictionaries removeObjectForKey:kSpacesRightShiftedHotkeyId]; - NSDictionary* hotkey_dictionary = hotkey_dictionaries[hotkey_system_effect]; - if (![hotkey_dictionary isKindOfClass:[NSDictionary class]]) + for (NSString* system_hotkey_identifier in [hotkey_dictionaries allKeys]) { + if (![system_hotkey_identifier isKindOfClass:[NSString class]]) { continue; + } - NSNumber* enabled = NumberForKey(hotkey_dictionary, @"enabled"); - if (!enabled || enabled.boolValue == NO) + NSDictionary* hotkey_dictionary = base::apple::ObjCCast<NSDictionary>( + hotkey_dictionaries[system_hotkey_identifier]); + if (!hotkey_dictionary) { continue; + } - NSDictionary* value = DictionaryForKey(hotkey_dictionary, @"value"); - if (!value) + NSNumber* enabled = + base::apple::ObjCCast<NSNumber>(hotkey_dictionary[@"enabled"]); + if (!enabled.boolValue) { continue; + } - NSString* type = StringForKey(value, @"type"); - if (!type || ![type isEqualToString:@"standard"]) + NSDictionary* value = + base::apple::ObjCCast<NSDictionary>(hotkey_dictionary[@"value"]); + if (!value) { continue; + } - NSArray* parameters = ArrayForKey(value, @"parameters"); - if (!parameters || [parameters count] != 3) + NSString* type = base::apple::ObjCCast<NSString>(value[@"type"]); + if (![type isEqualToString:@"standard"]) { continue; + } - NSNumber* key_code = [parameters objectAtIndex:1]; - if (![key_code isKindOfClass:[NSNumber class]]) + NSArray* parameters = base::apple::ObjCCast<NSArray>(value[@"parameters"]); + if (parameters.count != 3) { continue; + } - NSNumber* modifiers = [parameters objectAtIndex:2]; - if (![modifiers isKindOfClass:[NSNumber class]]) + const int kKeyCodeIndex = 1; + NSNumber* key_code = + base::apple::ObjCCast<NSNumber>(parameters[kKeyCodeIndex]); + if (!key_code) { continue; + } - ReserveHotkey(key_code.unsignedShortValue, - modifiers.unsignedIntegerValue, - hotkey_system_effect); + const int kModifierIndex = 2; + NSNumber* modifiers = + base::apple::ObjCCast<NSNumber>(parameters[kModifierIndex]); + if (!modifiers) { + continue; + } + + ReserveHotkey(key_code.unsignedShortValue, modifiers.unsignedIntegerValue, + system_hotkey_identifier); } return true; @@ -136,21 +152,27 @@ modifiers &= NSEventModifierFlagDeviceIndependentFlagsMask; std::vector<SystemHotkey>::const_iterator it; for (it = system_hotkeys_.begin(); it != system_hotkeys_.end(); ++it) { - if (it->key_code == key_code && it->modifiers == modifiers) + if (it->key_code == key_code && it->modifiers == modifiers) { return true; + } } return false; } void SystemHotkeyMap::ReserveHotkey(unsigned short key_code, NSUInteger modifiers, - NSString* system_effect) { + NSString* system_hotkey_identifier) { ReserveHotkey(key_code, modifiers); - // If a hotkey exists for toggling through the windows of an application, then - // adding shift to that hotkey toggles through the windows backwards. - if ([system_effect isEqualToString:@"27"]) - ReserveHotkey(key_code, modifiers | NSEventModifierFlagShift); + // If a hotkey exists for cycling through the windows of an application, then + // adding shift to that hotkey cycles through the windows backwards. + NSString* kCycleThroughWindowsHotkeyId = @"27"; + const NSUInteger kCycleBackwardsModifier = + modifiers | NSEventModifierFlagShift; + if ([system_hotkey_identifier isEqualToString:kCycleThroughWindowsHotkeyId] && + modifiers != kCycleBackwardsModifier) { + ReserveHotkey(key_code, kCycleBackwardsModifier); + } } void SystemHotkeyMap::ReserveHotkey(unsigned short key_code, @@ -160,8 +182,9 @@ NSUInteger required_modifiers = NSEventModifierFlagControl | NSEventModifierFlagCommand | NSEventModifierFlagOption; - if ((modifiers & required_modifiers) == 0) + if ((modifiers & required_modifiers) == 0) { return; + } SystemHotkey hotkey; hotkey.key_code = key_code;
diff --git a/content/browser/cocoa/system_hotkey_map_unittest.mm b/content/browser/cocoa/system_hotkey_map_unittest.mm index b0faf5e..cf788ec 100644 --- a/content/browser/cocoa/system_hotkey_map_unittest.mm +++ b/content/browser/cocoa/system_hotkey_map_unittest.mm
@@ -21,8 +21,9 @@ NSDictionary* DictionaryFromTestFile(const char* file) { base::FilePath test_data_dir; bool result = base::PathService::Get(DIR_TEST_DATA, &test_data_dir); - if (!result) + if (!result) { return nil; + } base::FilePath test_path = test_data_dir.AppendASCII(file); return [NSDictionary @@ -32,21 +33,20 @@ void AddEntryToDictionary(BOOL enabled, unsigned short key_code, - NSUInteger modifiers) { - NSDictionary* outer_dictionary = @{ - @"value" : @{ - @"parameters" : @[ - // The first parameter is unused. - @65535, @(key_code), @(modifiers) - ], - @"type" : @"standard" - }, - @"enabled" : @(enabled) - }; - - NSString* key = [NSString stringWithFormat:@"%d", count_]; - [system_hotkey_inner_dictionary_ setObject:outer_dictionary forKey:key]; - ++count_; + NSUInteger modifiers, + int index = 0) { + const NSInteger kUnused = 65535; + NSArray* parameters = @[ @(kUnused), @(key_code), @(modifiers) ]; + NSDictionary* values = @{@"parameters" : parameters, @"type" : @"standard"}; + NSDictionary* outer_dictionary = + @{@"value" : values, + @"enabled" : @(enabled)}; + if (!index) { + index = count_; + } + [system_hotkey_inner_dictionary_ setObject:outer_dictionary + forKey:@(index).stringValue]; + count_++; } void SetUp() override { @@ -83,8 +83,8 @@ ASSERT_TRUE(dictionary); SystemHotkeyMap map; - bool result = map.ParseDictionary(dictionary); - EXPECT_TRUE(result); + bool parse_successful = map.ParseDictionary(dictionary); + EXPECT_TRUE(parse_successful); // Command + ` is a common key binding. It should exist. unsigned short key_code = kVK_ANSI_Grave; @@ -110,8 +110,8 @@ NSDictionary* dictionary = nil; SystemHotkeyMap map; - bool result = map.ParseDictionary(dictionary); - EXPECT_FALSE(result); + bool parse_successful = map.ParseDictionary(dictionary); + EXPECT_FALSE(parse_successful); } TEST_F(SystemHotkeyMapTest, ParseMouse) { @@ -122,8 +122,8 @@ ASSERT_TRUE(dictionary); SystemHotkeyMap map; - bool result = map.ParseDictionary(dictionary); - EXPECT_TRUE(result); + bool parse_successful = map.ParseDictionary(dictionary); + EXPECT_TRUE(parse_successful); // Command + ` is a common key binding. It is missing, but since OS X uses the // default value the hotkey should still be reserved. @@ -162,8 +162,8 @@ SystemHotkeyMap map; - bool result = map.ParseDictionary(system_hotkey_dictionary_); - EXPECT_TRUE(result); + bool parse_successful = map.ParseDictionary(system_hotkey_dictionary_); + EXPECT_TRUE(parse_successful); // Entries without control, command, or alternate key mask should not be // reserved. @@ -184,4 +184,48 @@ key_code, NSEventModifierFlagFunction | NSEventModifierFlagControl)); } +// Tests that we add a shifted (i.e. reverse) variant of the window cycling +// hotkey. +TEST_F(SystemHotkeyMapTest, ReverseWindowCyclingHotkeyExists) { + const int kCycleThroughWindowsHotkey = 27; + AddEntryToDictionary(YES, kVK_ANSI_Grave, NSEventModifierFlagCommand, + kCycleThroughWindowsHotkey); + + SystemHotkeyMap map; + + bool parse_successful = map.ParseDictionary(system_hotkey_dictionary_); + EXPECT_TRUE(parse_successful); + + EXPECT_TRUE(map.IsHotkeyReserved(kVK_ANSI_Grave, NSEventModifierFlagCommand)); + EXPECT_TRUE(map.IsHotkeyReserved( + kVK_ANSI_Grave, NSEventModifierFlagCommand | NSEventModifierFlagShift)); +} + +// Tests that we skip over certain undocumented shortcut entries that appear in +// AppleSymbolicHotKeys. See https://crbug.com/874219 . +TEST_F(SystemHotkeyMapTest, IgnoreUndocumentedShortcutEntries) { + const int kSpacesLeftHotkey = 79; + const int kSpacesLeftShiftedHotkey = 80; + const int kSpacesRightHotkey = 81; + const int kSpacesRightShiftedHotkey = 82; + AddEntryToDictionary(YES, kVK_ANSI_A, NSEventModifierFlagControl, + kSpacesLeftHotkey); + AddEntryToDictionary(YES, kVK_ANSI_B, NSEventModifierFlagControl, + kSpacesLeftShiftedHotkey); + AddEntryToDictionary(YES, kVK_ANSI_C, NSEventModifierFlagControl, + kSpacesRightHotkey); + AddEntryToDictionary(YES, kVK_ANSI_D, NSEventModifierFlagControl, + kSpacesRightShiftedHotkey); + + SystemHotkeyMap map; + + bool parse_successful = map.ParseDictionary(system_hotkey_dictionary_); + EXPECT_TRUE(parse_successful); + + EXPECT_TRUE(map.IsHotkeyReserved(kVK_ANSI_A, NSEventModifierFlagControl)); + EXPECT_FALSE(map.IsHotkeyReserved(kVK_ANSI_B, NSEventModifierFlagControl)); + EXPECT_TRUE(map.IsHotkeyReserved(kVK_ANSI_C, NSEventModifierFlagControl)); + EXPECT_FALSE(map.IsHotkeyReserved(kVK_ANSI_D, NSEventModifierFlagControl)); +} + } // namespace content
diff --git a/content/browser/gpu/compositor_util.cc b/content/browser/gpu/compositor_util.cc index b97bbbc..211d111 100644 --- a/content/browser/gpu/compositor_util.cc +++ b/content/browser/gpu/compositor_util.cc
@@ -223,7 +223,8 @@ {"skia_graphite", SafeGetFeatureStatus(gpu_feature_info, gpu::GPU_FEATURE_TYPE_SKIA_GRAPHITE), - !base::FeatureList::IsEnabled(features::kSkiaGraphite), + !base::FeatureList::IsEnabled(features::kSkiaGraphite) && + !command_line.HasSwitch(switches::kSkiaGraphiteBackend), DisableInfo::NotProblem(), false}, }; DCHECK(index < std::size(kGpuFeatureData));
diff --git a/content/browser/interest_group/ad_auction_page_data.cc b/content/browser/interest_group/ad_auction_page_data.cc index 1060aef8..fcecf2498 100644 --- a/content/browser/interest_group/ad_auction_page_data.cc +++ b/content/browser/interest_group/ad_auction_page_data.cc
@@ -49,6 +49,50 @@ return it->second; } +void AdAuctionPageData::AddAuctionAdditionalBidsWitnessForOrigin( + const url::Origin& origin, + const std::map<std::string, std::vector<std::string>>& + nonce_additional_bids_map) { + CHECK(!nonce_additional_bids_map.empty()); + + std::map<std::string, std::vector<std::string>>& + existing_nonce_additional_bids_map = + origin_nonce_additional_bids_map_[origin]; + + for (const auto& [nonce, additional_bids] : nonce_additional_bids_map) { + CHECK(!additional_bids.empty()); + + std::vector<std::string>& existing_additional_bids = + existing_nonce_additional_bids_map[nonce]; + + existing_additional_bids.insert(existing_additional_bids.end(), + additional_bids.begin(), + additional_bids.end()); + } +} + +std::vector<std::string> +AdAuctionPageData::TakeAuctionAdditionalBidsForOriginAndNonce( + const url::Origin& origin, + const std::string& nonce) { + auto origin_map_it = origin_nonce_additional_bids_map_.find(origin); + if (origin_map_it == origin_nonce_additional_bids_map_.end()) { + return {}; + } + + std::map<std::string, std::vector<std::string>>& nonce_additional_bids_map = + origin_map_it->second; + + auto nonce_map_it = nonce_additional_bids_map.find(nonce); + if (nonce_map_it == nonce_additional_bids_map.end()) { + return {}; + } + + auto extracted_nonce_and_additional_bids = + nonce_additional_bids_map.extract(nonce_map_it); + return std::move(extracted_nonce_and_additional_bids.mapped()); +} + void AdAuctionPageData::RegisterAdAuctionRequestContext( const base::Uuid& id, AdAuctionRequestContext context) {
diff --git a/content/browser/interest_group/ad_auction_page_data.h b/content/browser/interest_group/ad_auction_page_data.h index f4d464f6..6004e419 100644 --- a/content/browser/interest_group/ad_auction_page_data.h +++ b/content/browser/interest_group/ad_auction_page_data.h
@@ -50,6 +50,15 @@ const std::set<std::string>& GetAuctionSignalsForOrigin( const url::Origin& origin) const; + void AddAuctionAdditionalBidsWitnessForOrigin( + const url::Origin& origin, + const std::map<std::string, std::vector<std::string>>& + nonce_additional_bids_map); + + std::vector<std::string> TakeAuctionAdditionalBidsForOriginAndNonce( + const url::Origin& origin, + const std::string& nonce); + void RegisterAdAuctionRequestContext(const base::Uuid& id, AdAuctionRequestContext context); AdAuctionRequestContext* GetContextForAdAuctionRequest(const base::Uuid& id); @@ -62,6 +71,8 @@ std::map<url::Origin, std::set<std::string>> origin_auction_result_map_; std::map<url::Origin, std::set<std::string>> origin_auction_signals_map_; + std::map<url::Origin, std::map<std::string, std::vector<std::string>>> + origin_nonce_additional_bids_map_; std::map<base::Uuid, AdAuctionRequestContext> context_map_; };
diff --git a/content/browser/interest_group/ad_auction_url_loader_interceptor.cc b/content/browser/interest_group/ad_auction_url_loader_interceptor.cc index 3e9acb9..92acbcd 100644 --- a/content/browser/interest_group/ad_auction_url_loader_interceptor.cc +++ b/content/browser/interest_group/ad_auction_url_loader_interceptor.cc
@@ -23,6 +23,9 @@ constexpr char kAdAuctionSignalsResponseHeaderKey[] = "Ad-Auction-Signals"; +constexpr char kAdAuctionAdditionalBidResponseHeaderKey[] = + "Ad-Auction-Additional-Bid"; + } // namespace AdAuctionURLLoaderInterceptor::AdAuctionURLLoaderInterceptor( @@ -116,6 +119,7 @@ has_redirect_ = true; head->headers.get()->RemoveHeader(kAdAuctionSignalsResponseHeaderKey); + head->headers.get()->RemoveHeader(kAdAuctionAdditionalBidResponseHeaderKey); } void AdAuctionURLLoaderInterceptor::OnReceiveResponse( @@ -130,6 +134,31 @@ headers->RemoveHeader(kAdAuctionSignalsResponseHeaderKey); } + std::map<std::string, std::vector<std::string>> nonce_additional_bids_map; + size_t iter = 0; + std::string header_line; + while (headers->EnumerateHeader( + &iter, kAdAuctionAdditionalBidResponseHeaderKey, &header_line)) { + // Skip if `header_line` doesn't match the format + // <36 characters auction nonce>:<base64-encoded signed additional bid> + std::vector<std::string> nonce_and_additional_bid = base::SplitString( + header_line, ":", base::KEEP_WHITESPACE, base::SPLIT_WANT_ALL); + if (nonce_and_additional_bid.size() != 2) { + continue; + } + + const std::string& nonce = nonce_and_additional_bid[0]; + const std::string& additional_bid = nonce_and_additional_bid[1]; + + if (nonce.size() != 36) { + continue; + } + + nonce_additional_bids_map[nonce].push_back(additional_bid); + } + + headers->RemoveHeader(kAdAuctionAdditionalBidResponseHeaderKey); + if (has_redirect_ || !ad_auction_headers_eligible_) { return; } @@ -167,6 +196,11 @@ ad_auction_page_data->AddAuctionSignalsWitnessForOrigin(request_origin_, ad_auction_signals); } + + if (!nonce_additional_bids_map.empty()) { + ad_auction_page_data->AddAuctionAdditionalBidsWitnessForOrigin( + request_origin_, nonce_additional_bids_map); + } } } // namespace content
diff --git a/content/browser/interest_group/ad_auction_url_loader_interceptor.h b/content/browser/interest_group/ad_auction_url_loader_interceptor.h index 0476903..8454c87 100644 --- a/content/browser/interest_group/ad_auction_url_loader_interceptor.h +++ b/content/browser/interest_group/ad_auction_url_loader_interceptor.h
@@ -19,7 +19,8 @@ // 2. If any redirect is encountered, skip handling the response; otherwise, // for the response (i.e. OnReceiveResponse()), if the previous request was // eligible for ad auction headers, and if the response header contains the -// auction result or signals, associate them with the top-level page. +// auction result, signals, or additional bids, associate them with the +// top-level page. class CONTENT_EXPORT AdAuctionURLLoaderInterceptor : public SubresourceProxyingURLLoader::Interceptor { public:
diff --git a/content/browser/interest_group/ad_auction_url_loader_interceptor_unittest.cc b/content/browser/interest_group/ad_auction_url_loader_interceptor_unittest.cc index 32a05d56..acd9499e 100644 --- a/content/browser/interest_group/ad_auction_url_loader_interceptor_unittest.cc +++ b/content/browser/interest_group/ad_auction_url_loader_interceptor_unittest.cc
@@ -82,6 +82,10 @@ received_ad_auction_result_header_ = true; } + if (head->headers.get()->HasHeader("Ad-Auction-Additional-Bid")) { + received_ad_auction_additional_bid_header_ = true; + } + received_response_ = true; } @@ -94,6 +98,10 @@ if (head->headers.get()->HasHeader("Ad-Auction-Result")) { received_ad_auction_result_header_ = true; } + + if (head->headers.get()->HasHeader("Ad-Auction-Additional-Bid")) { + received_ad_auction_additional_bid_header_ = true; + } } void OnReceiveEarlyHints(network::mojom::EarlyHintsPtr early_hints) override { @@ -114,10 +122,15 @@ return received_ad_auction_result_header_; } + bool received_ad_auction_additional_bid_header() const { + return received_ad_auction_additional_bid_header_; + } + private: bool received_response_ = false; bool received_ad_auction_result_header_ = false; bool received_ad_auction_signals_header_ = false; + bool received_ad_auction_additional_bid_header_ = false; mojo::Receiver<network::mojom::URLLoaderClient> receiver_{this}; }; @@ -187,6 +200,19 @@ return head; } + network::mojom::URLResponseHeadPtr CreateResponseHeadWithAdditionalBids( + const std::vector<std::string>& ad_auction_additional_bid_header_values) { + auto head = network::mojom::URLResponseHead::New(); + head->headers = base::MakeRefCounted<net::HttpResponseHeaders>(""); + + for (const std::string& header_value : + ad_auction_additional_bid_header_values) { + head->headers->AddHeader("Ad-Auction-Additional-Bid", header_value); + } + + return head; + } + network::ResourceRequest CreateResourceRequest(const GURL& url, bool ad_auction_headers = true, bool browsing_topics = false) { @@ -239,6 +265,18 @@ return ad_auction_page_data->GetAuctionSignalsForOrigin(origin); } + std::vector<std::string> TakeAuctionAdditionalBidsForOriginAndNonce( + const url::Origin& origin, + const std::string& nonce) { + Page& page = web_contents()->GetPrimaryPage(); + + AdAuctionPageData* ad_auction_page_data = + PageUserData<AdAuctionPageData>::GetOrCreateForPage(page); + + return ad_auction_page_data->TakeAuctionAdditionalBidsForOriginAndNonce( + origin, nonce); + } + protected: base::test::ScopedFeatureList scoped_feature_list_; @@ -304,8 +342,7 @@ bind_context->OnDidCommitNavigation( web_contents()->GetPrimaryMainFrame()->GetWeakDocumentPtr()); - // The request to `foo1.com` will cause the ad auction header value "?1" to be - // added. + // The request to `foo1.com` will add ad auction header value "?1". remote_url_loader_factory->CreateLoaderAndStart( remote_loader.BindNewPipeAndPassReceiver(), /*request_id=*/0, /*options=*/0, @@ -402,8 +439,7 @@ bind_context->OnDidCommitNavigation( web_contents()->GetPrimaryMainFrame()->GetWeakDocumentPtr()); - // The request to `foo1.com` will cause an empty ad auction header value to be - // added. + // The request to "foo1.com" will add the ad auction header value "?1". remote_url_loader_factory->CreateLoaderAndStart( remote_loader.BindNewPipeAndPassReceiver(), /*request_id=*/0, /*options=*/0, @@ -460,8 +496,7 @@ CreateFactory(proxied_url_loader_factory, remote_url_loader_factory); bind_context->OnDidCommitNavigation(final_subframe->GetWeakDocumentPtr()); - // The request to `foo1.com` will cause the ad auction header value "?1" to be - // added. + // The request to "foo1.com" will add the ad auction header value "?1". remote_url_loader_factory->CreateLoaderAndStart( remote_loader.BindNewPipeAndPassReceiver(), /*request_id=*/0, /*options=*/0, @@ -511,8 +546,7 @@ bind_context->OnDidCommitNavigation( web_contents()->GetPrimaryMainFrame()->GetWeakDocumentPtr()); - // The request to `foo1.com` will cause an empty ad auction header value to be - // added. + // The request to "foo1.com" will add the ad auction header value "?1". remote_url_loader_factory->CreateLoaderAndStart( remote_loader.BindNewPipeAndPassReceiver(), /*request_id=*/0, /*options=*/0, @@ -821,8 +855,7 @@ bind_context->OnDidCommitNavigation( web_contents()->GetPrimaryMainFrame()->GetWeakDocumentPtr()); - // The request to `foo1.com` will cause the ad auction header value "?1" to be - // added. + // The request to "foo1.com" will add the ad auction header value "?1". remote_url_loader_factory->CreateLoaderAndStart( remote_loader.BindNewPipeAndPassReceiver(), /*request_id=*/0, /*options=*/0, @@ -903,8 +936,7 @@ bind_context->OnDidCommitNavigation( web_contents()->GetPrimaryMainFrame()->GetWeakDocumentPtr()); - // The request to `foo1.com` will cause an empty ad auction header value to be - // added. + // The request to "foo1.com" will add the ad auction header value "?1". remote_url_loader_factory->CreateLoaderAndStart( remote_loader.BindNewPipeAndPassReceiver(), /*request_id=*/0, /*options=*/0, @@ -1013,8 +1045,7 @@ bind_context->OnDidCommitNavigation( web_contents()->GetPrimaryMainFrame()->GetWeakDocumentPtr()); - // The request to `foo1.com` will cause an empty ad auction header value to be - // added. + // The request to "foo1.com" will add the ad auction header value "?1". remote_url_loader_factory->CreateLoaderAndStart( remote_loader.BindNewPipeAndPassReceiver(), /*request_id=*/0, /*options=*/0, @@ -1063,8 +1094,7 @@ bind_context->OnDidCommitNavigation( web_contents()->GetPrimaryMainFrame()->GetWeakDocumentPtr()); - // The request to `foo1.com` will cause the ad auction header value "?1" to be - // added. + // The request to "foo1.com" will add the ad auction header value "?1". remote_url_loader_factory->CreateLoaderAndStart( remote_loader.BindNewPipeAndPassReceiver(), /*request_id=*/0, /*options=*/0, @@ -1138,4 +1168,318 @@ EXPECT_THAT(signals, ::testing::IsEmpty()); } +TEST_F(AdAuctionURLLoaderInterceptorTest, AdditionalBid) { + NavigatePage(GURL("https://google.com")); + + mojo::Remote<network::mojom::URLLoaderFactory> remote_url_loader_factory; + network::TestURLLoaderFactory proxied_url_loader_factory; + mojo::Remote<network::mojom::URLLoader> remote_loader; + TestURLLoaderClient test_client; + + base::WeakPtr<SubresourceProxyingURLLoaderService::BindContext> bind_context = + CreateFactory(proxied_url_loader_factory, remote_url_loader_factory); + bind_context->OnDidCommitNavigation( + web_contents()->GetPrimaryMainFrame()->GetWeakDocumentPtr()); + + // The request to "foo1.com" will add the ad auction header value "?1". + remote_url_loader_factory->CreateLoaderAndStart( + remote_loader.BindNewPipeAndPassReceiver(), + /*request_id=*/0, /*options=*/0, + CreateResourceRequest(GURL("https://foo1.com")), + test_client.BindURLLoaderClientAndGetRemote(), + net::MutableNetworkTrafficAnnotationTag(TRAFFIC_ANNOTATION_FOR_TESTS)); + remote_url_loader_factory.FlushForTesting(); + + EXPECT_EQ(1, proxied_url_loader_factory.NumPending()); + network::TestURLLoaderFactory::PendingRequest* pending_request = + &proxied_url_loader_factory.pending_requests()->back(); + + std::string ad_auction_request_header_value; + bool has_ad_auction_request_header = + pending_request->request.headers.GetHeader( + "Sec-Ad-Auction-Fetch", &ad_auction_request_header_value); + EXPECT_TRUE(has_ad_auction_request_header); + EXPECT_EQ(ad_auction_request_header_value, "?1"); + + pending_request->client->OnReceiveResponse( + CreateResponseHeadWithAdditionalBids( + {"00000000-0000-0000-0000-000000000000:e30="}), + /*body=*/{}, absl::nullopt); + base::RunLoop().RunUntilIdle(); + + // The `Ad-Auction-Additional-Bid` header was intercepted and stored in the + // browser. It was not exposed to the original loader client. + EXPECT_TRUE(test_client.received_response()); + EXPECT_FALSE(test_client.received_ad_auction_additional_bid_header()); + + url::Origin request_origin = url::Origin::Create(GURL("https://foo1.com")); + EXPECT_THAT(TakeAuctionAdditionalBidsForOriginAndNonce( + request_origin, "00000000-0000-0000-0000-000000000000"), + ::testing::ElementsAre("e30=")); +} + +TEST_F(AdAuctionURLLoaderInterceptorTest, + AdditionalBid_MultipleNoncesAndMultipleBidsPerNonce) { + NavigatePage(GURL("https://google.com")); + + mojo::Remote<network::mojom::URLLoaderFactory> remote_url_loader_factory; + network::TestURLLoaderFactory proxied_url_loader_factory; + mojo::Remote<network::mojom::URLLoader> remote_loader; + TestURLLoaderClient test_client; + + base::WeakPtr<SubresourceProxyingURLLoaderService::BindContext> bind_context = + CreateFactory(proxied_url_loader_factory, remote_url_loader_factory); + bind_context->OnDidCommitNavigation( + web_contents()->GetPrimaryMainFrame()->GetWeakDocumentPtr()); + + // The request to "foo1.com" will add the ad auction header value "?1". + remote_url_loader_factory->CreateLoaderAndStart( + remote_loader.BindNewPipeAndPassReceiver(), + /*request_id=*/0, /*options=*/0, + CreateResourceRequest(GURL("https://foo1.com")), + test_client.BindURLLoaderClientAndGetRemote(), + net::MutableNetworkTrafficAnnotationTag(TRAFFIC_ANNOTATION_FOR_TESTS)); + remote_url_loader_factory.FlushForTesting(); + + EXPECT_EQ(1, proxied_url_loader_factory.NumPending()); + network::TestURLLoaderFactory::PendingRequest* pending_request = + &proxied_url_loader_factory.pending_requests()->back(); + + std::string ad_auction_request_header_value; + bool has_ad_auction_request_header = + pending_request->request.headers.GetHeader( + "Sec-Ad-Auction-Fetch", &ad_auction_request_header_value); + EXPECT_TRUE(has_ad_auction_request_header); + EXPECT_EQ(ad_auction_request_header_value, "?1"); + + pending_request->client->OnReceiveResponse( + CreateResponseHeadWithAdditionalBids( + {"00000000-0000-0000-0000-000000000000:e30=", + "00000000-0000-0000-0000-000000000001:e30=", + "00000000-0000-0000-0000-000000000001:e2E6IDF9"}), + /*body=*/{}, absl::nullopt); + base::RunLoop().RunUntilIdle(); + + // The `Ad-Auction-Additional-Bid` header was intercepted and stored in the + // browser. It was not exposed to the original loader client. + EXPECT_TRUE(test_client.received_response()); + EXPECT_FALSE(test_client.received_ad_auction_additional_bid_header()); + + url::Origin request_origin = url::Origin::Create(GURL("https://foo1.com")); + EXPECT_THAT(TakeAuctionAdditionalBidsForOriginAndNonce( + request_origin, "00000000-0000-0000-0000-000000000000"), + ::testing::ElementsAre("e30=")); + EXPECT_THAT(TakeAuctionAdditionalBidsForOriginAndNonce( + request_origin, "00000000-0000-0000-0000-000000000001"), + ::testing::ElementsAre("e30=", "e2E6IDF9")); + + // Future calls to `TakeAuctionAdditionalBidsForOriginAndNonce` on the same + // origin and nonce should return nothing. Ideally this should be tested + // separately as a unitest for `AdAuctionPageData`. + EXPECT_THAT(TakeAuctionAdditionalBidsForOriginAndNonce( + request_origin, "00000000-0000-0000-0000-000000000000"), + ::testing::IsEmpty()); + EXPECT_THAT(TakeAuctionAdditionalBidsForOriginAndNonce( + request_origin, "00000000-0000-0000-0000-000000000001"), + ::testing::IsEmpty()); +} + +// Tests that the Ad-Auction-Additional-Bid header will be removed from the +// final response even when the request isn't eligible for ad auction. +TEST_F( + AdAuctionURLLoaderInterceptorTest, + AdAuctionDisallowedBySettings_AdditionalBidResponseHeaderNotHandledAndRemoved) { + browser_client_.set_interest_group_allowed_by_settings(false); + + NavigatePage(GURL("https://google.com")); + + mojo::Remote<network::mojom::URLLoaderFactory> remote_url_loader_factory; + network::TestURLLoaderFactory proxied_url_loader_factory; + mojo::Remote<network::mojom::URLLoader> remote_loader; + TestURLLoaderClient test_client; + + base::WeakPtr<SubresourceProxyingURLLoaderService::BindContext> bind_context = + CreateFactory(proxied_url_loader_factory, remote_url_loader_factory); + bind_context->OnDidCommitNavigation( + web_contents()->GetPrimaryMainFrame()->GetWeakDocumentPtr()); + + // The request to `foo1.com` won't be eligible for ad auction. + remote_url_loader_factory->CreateLoaderAndStart( + remote_loader.BindNewPipeAndPassReceiver(), + /*request_id=*/0, /*options=*/0, + CreateResourceRequest(GURL("https://foo1.com")), + test_client.BindURLLoaderClientAndGetRemote(), + net::MutableNetworkTrafficAnnotationTag(TRAFFIC_ANNOTATION_FOR_TESTS)); + remote_url_loader_factory.FlushForTesting(); + + EXPECT_EQ(1, proxied_url_loader_factory.NumPending()); + network::TestURLLoaderFactory::PendingRequest* pending_request = + &proxied_url_loader_factory.pending_requests()->back(); + + std::string ad_auction_request_header_value; + bool has_ad_auction_request_header = + pending_request->request.headers.GetHeader( + "Sec-Ad-Auction-Fetch", &ad_auction_request_header_value); + EXPECT_FALSE(has_ad_auction_request_header); + + pending_request->client->OnReceiveResponse( + CreateResponseHeadWithAdditionalBids( + {"00000000-0000-0000-0000-000000000000:e30="}), + /*body=*/{}, absl::nullopt); + base::RunLoop().RunUntilIdle(); + + // The `Ad-Auction-Additional-Bid` header was intercepted. It's not stored + // in the browser since the request wasn't eligible for ad auction. It was not + // exposed to the original loader client. + EXPECT_TRUE(test_client.received_response()); + EXPECT_FALSE(test_client.received_ad_auction_additional_bid_header()); + + url::Origin request_origin = url::Origin::Create(GURL("https://foo1.com")); + EXPECT_THAT(TakeAuctionAdditionalBidsForOriginAndNonce( + request_origin, "00000000-0000-0000-0000-000000000000"), + ::testing::IsEmpty()); +} + +TEST_F(AdAuctionURLLoaderInterceptorTest, AdditionalBid_InvalidHeaderSkipped) { + NavigatePage(GURL("https://google.com")); + + mojo::Remote<network::mojom::URLLoaderFactory> remote_url_loader_factory; + network::TestURLLoaderFactory proxied_url_loader_factory; + mojo::Remote<network::mojom::URLLoader> remote_loader; + TestURLLoaderClient test_client; + + base::WeakPtr<SubresourceProxyingURLLoaderService::BindContext> bind_context = + CreateFactory(proxied_url_loader_factory, remote_url_loader_factory); + bind_context->OnDidCommitNavigation( + web_contents()->GetPrimaryMainFrame()->GetWeakDocumentPtr()); + + // The request to "foo1.com" will add the ad auction header value "?1". + remote_url_loader_factory->CreateLoaderAndStart( + remote_loader.BindNewPipeAndPassReceiver(), + /*request_id=*/0, /*options=*/0, + CreateResourceRequest(GURL("https://foo1.com")), + test_client.BindURLLoaderClientAndGetRemote(), + net::MutableNetworkTrafficAnnotationTag(TRAFFIC_ANNOTATION_FOR_TESTS)); + remote_url_loader_factory.FlushForTesting(); + + EXPECT_EQ(1, proxied_url_loader_factory.NumPending()); + network::TestURLLoaderFactory::PendingRequest* pending_request = + &proxied_url_loader_factory.pending_requests()->back(); + + std::string ad_auction_request_header_value; + bool has_ad_auction_request_header = + pending_request->request.headers.GetHeader( + "Sec-Ad-Auction-Fetch", &ad_auction_request_header_value); + EXPECT_TRUE(has_ad_auction_request_header); + EXPECT_EQ(ad_auction_request_header_value, "?1"); + + // Entries with invalid nonce (i.e. doesn't have 36 characters) will be + // skipped. + pending_request->client->OnReceiveResponse( + CreateResponseHeadWithAdditionalBids( + {"00000000-0000-0000-0000-00000000000:e30=", + "00000000-0000-0000-0000-0000000000001:e30=", + "00000000-0000-0000-0000-000000000001:e2E6IDF9"}), + /*body=*/{}, absl::nullopt); + base::RunLoop().RunUntilIdle(); + + // The `Ad-Auction-Additional-Bid` header was intercepted and stored in the + // browser. It was not exposed to the original loader client. + EXPECT_TRUE(test_client.received_response()); + EXPECT_FALSE(test_client.received_ad_auction_additional_bid_header()); + + url::Origin request_origin = url::Origin::Create(GURL("https://foo1.com")); + EXPECT_THAT(TakeAuctionAdditionalBidsForOriginAndNonce( + request_origin, "00000000-0000-0000-0000-00000000000"), + ::testing::IsEmpty()); + EXPECT_THAT(TakeAuctionAdditionalBidsForOriginAndNonce( + request_origin, "00000000-0000-0000-0000-0000000000001"), + ::testing::IsEmpty()); + EXPECT_THAT(TakeAuctionAdditionalBidsForOriginAndNonce( + request_origin, "00000000-0000-0000-0000-000000000001"), + ::testing::ElementsAre("e2E6IDF9")); +} + +TEST_F(AdAuctionURLLoaderInterceptorTest, + HasRedirect_AdditionalBidResponseHeaderIgnoredAndRemoved) { + NavigatePage(GURL("https://google.com")); + + mojo::Remote<network::mojom::URLLoaderFactory> remote_url_loader_factory; + network::TestURLLoaderFactory proxied_url_loader_factory( + /*observe_loader_requests=*/true); + mojo::Remote<network::mojom::URLLoader> remote_loader; + TestURLLoaderClient test_client; + + base::WeakPtr<SubresourceProxyingURLLoaderService::BindContext> bind_context = + CreateFactory(proxied_url_loader_factory, remote_url_loader_factory); + bind_context->OnDidCommitNavigation( + web_contents()->GetPrimaryMainFrame()->GetWeakDocumentPtr()); + + // The request to "foo1.com" will add the ad auction header value "?1". + remote_url_loader_factory->CreateLoaderAndStart( + remote_loader.BindNewPipeAndPassReceiver(), + /*request_id=*/0, /*options=*/0, + CreateResourceRequest(GURL("https://foo1.com")), + test_client.BindURLLoaderClientAndGetRemote(), + net::MutableNetworkTrafficAnnotationTag(TRAFFIC_ANNOTATION_FOR_TESTS)); + remote_url_loader_factory.FlushForTesting(); + + EXPECT_EQ(1, proxied_url_loader_factory.NumPending()); + network::TestURLLoaderFactory::PendingRequest* pending_request = + &proxied_url_loader_factory.pending_requests()->back(); + + std::string ad_auction_request_header_value; + bool has_ad_auction_request_header = + pending_request->request.headers.GetHeader( + "Sec-Ad-Auction-Fetch", &ad_auction_request_header_value); + EXPECT_TRUE(has_ad_auction_request_header); + EXPECT_EQ(ad_auction_request_header_value, "?1"); + + // Redirect to `foo2.com`. The ad auction additional bid response for the + // initial request to `foo1.com` will be ignored, and the redirect request to + // `foo2.com` won't be eligible for the ad auction headers. + net::RedirectInfo redirect_info; + redirect_info.new_url = GURL("https://foo2.com"); + + pending_request->client->OnReceiveRedirect( + redirect_info, CreateResponseHeadWithAdditionalBids( + {"00000000-0000-0000-0000-000000000000:e30="})); + base::RunLoop().RunUntilIdle(); + + remote_loader->FollowRedirect(/*removed_headers=*/{}, + /*modified_headers=*/{}, + /*modified_cors_exempt_headers=*/{}, + /*new_url=*/absl::nullopt); + base::RunLoop().RunUntilIdle(); + + const std::vector<FollowRedirectParams>& follow_redirect_params = + pending_request->test_url_loader->follow_redirect_params(); + EXPECT_EQ(follow_redirect_params.size(), 1u); + EXPECT_EQ(follow_redirect_params[0].removed_headers.size(), 1u); + EXPECT_EQ(follow_redirect_params[0].removed_headers[0], + "Sec-Ad-Auction-Fetch"); + + std::string redirect_ad_auction_request_header_value; + bool redirect_has_ad_auction_request_header = + follow_redirect_params[0].modified_headers.GetHeader( + "Sec-Ad-Auction-Fetch", &redirect_ad_auction_request_header_value); + EXPECT_FALSE(redirect_has_ad_auction_request_header); + + pending_request->client->OnReceiveResponse( + CreateResponseHeadWithAdditionalBids( + {"00000000-0000-0000-0000-000000000000:e30="}), + /*body=*/{}, absl::nullopt); + base::RunLoop().RunUntilIdle(); + + // The `Ad-Auction-Additional-Bid` header was ignored and not exposed to the + // original loader client. + EXPECT_TRUE(test_client.received_response()); + EXPECT_FALSE(test_client.received_ad_auction_additional_bid_header()); + + url::Origin request_origin = url::Origin::Create(GURL("https://foo1.com")); + EXPECT_THAT(TakeAuctionAdditionalBidsForOriginAndNonce( + request_origin, "00000000-0000-0000-0000-000000000000"), + ::testing::IsEmpty()); +} + } // namespace content
diff --git a/content/browser/interest_group/interest_group_auction.cc b/content/browser/interest_group/interest_group_auction.cc index ccdd164..fabf29b4 100644 --- a/content/browser/interest_group/interest_group_auction.cc +++ b/content/browser/interest_group/interest_group_auction.cc
@@ -98,11 +98,7 @@ namespace { -#if !defined(NDEBUG) -constexpr base::TimeDelta kMaxPerBuyerTimeout = base::Seconds(60); -#else constexpr base::TimeDelta kMaxPerBuyerTimeout = base::Milliseconds(500); -#endif // For group freshness metrics. constexpr base::TimeDelta kGroupFreshnessMin = base::Minutes(1);
diff --git a/content/browser/interest_group/interest_group_browsertest.cc b/content/browser/interest_group/interest_group_browsertest.cc index c1e6d113..3ffac3f 100644 --- a/content/browser/interest_group/interest_group_browsertest.cc +++ b/content/browser/interest_group/interest_group_browsertest.cc
@@ -1276,6 +1276,18 @@ return ad_auction_page_data->GetAuctionSignalsForOrigin(origin); } + std::vector<std::string> TakeAuctionAdditionalBidsForOriginAndNonce( + const url::Origin& origin, + const std::string& nonce) { + Page& page = web_contents()->GetPrimaryPage(); + + AdAuctionPageData* ad_auction_page_data = + PageUserData<AdAuctionPageData>::GetOrCreateForPage(page); + + return ad_auction_page_data->TakeAuctionAdditionalBidsForOriginAndNonce( + origin, nonce); + } + void ClearReceivedRequests() { base::AutoLock auto_lock(requests_lock_); received_https_test_server_requests_.clear(); @@ -14172,7 +14184,9 @@ redirect_replacement.emplace_back(std::make_pair( "{{AD_AUCTION_HEADERS}}", base::StrCat({"Ad-Auction-Result: ", kLegitimateAdAuctionResponse, - "\nAd-Auction-Signals: ", "{}"}))); + "\nAd-Auction-Signals: ", "{}", + "\nAd-Auction-Additional-Bid: ", + "00000000-0000-0000-0000-000000000000:e30="}))); redirect_replacement.emplace_back(std::make_pair("{{REDIRECT_HEADER}}", "")); GURL redirect_url = https_server_->GetURL( @@ -14187,7 +14201,9 @@ replacement.emplace_back(std::make_pair( "{{AD_AUCTION_HEADERS}}", base::StrCat({"Ad-Auction-Result: ", kLegitimateAdAuctionResponse, - "\nAd-Auction-Signals: ", "{}"}))); + "\nAd-Auction-Signals: ", "{}", + "\nAd-Auction-Additional-Bid: ", + "00000000-0000-0000-0000-000000000000:e30="}))); replacement.emplace_back(std::make_pair("{{REDIRECT_HEADER}}", "Location: " + redirect_url.spec())); @@ -14217,13 +14233,184 @@ EXPECT_FALSE(ad_auction_header_value); } + url::Origin request_origin = url::Origin::Create(fetch_url); + EXPECT_FALSE(WitnessedAuctionResultForOrigin( - url::Origin::Create(fetch_url), - base64Decode(kLegitimateAdAuctionResponse))); + request_origin, base64Decode(kLegitimateAdAuctionResponse))); const std::set<std::string>& signals = - GetAuctionSignalsForOrigin(url::Origin::Create(fetch_url)); + GetAuctionSignalsForOrigin(request_origin); EXPECT_THAT(signals, ::testing::IsEmpty()); + + EXPECT_THAT(TakeAuctionAdditionalBidsForOriginAndNonce( + request_origin, "00000000-0000-0000-0000-000000000000"), + ::testing::IsEmpty()); +} + +IN_PROC_BROWSER_TEST_F( + InterestGroupBrowserTest, + FetchSameOrigin_AdAuctionHeadersEligible_HasAdAuctionAdditionalBidResponseHeader) { + GURL main_frame_url = + https_server_->GetURL("a.test", "/interest_group/empty.html"); + ASSERT_TRUE(NavigateToURL(shell(), main_frame_url)); + + base::StringPairs replacement; + replacement.emplace_back(std::make_pair("{{STATUS}}", "200 OK")); + replacement.emplace_back(std::make_pair( + "{{AD_AUCTION_HEADERS}}", + base::StrCat({"Ad-Auction-Additional-Bid: ", + "00000000-0000-0000-0000-000000000000:e30="}))); + replacement.emplace_back(std::make_pair("{{REDIRECT_HEADER}}", "")); + + GURL fetch_url = https_server_->GetURL( + "a.test", net::test_server::GetFilePathWithReplacements( + "/interest_group/" + "page_with_custom_ad_auction_result_header.html", + replacement)); + + // Verify that the JavaScript doesn't see the response header + // `Ad-Auction-Additional-Bid`. + EXPECT_TRUE(ExecJs(web_contents()->GetPrimaryMainFrame(), + content::JsReplace(R"( + fetch($1, {adAuctionHeaders: true}).then((response) => { + if (response.headers.get('Ad-Auction-Additional-Bid')) { + throw 'Unexpectedly received `Ad-Auction-Additional-Bid` header'; + } + }); + )", + fetch_url))); + + absl::optional<std::string> ad_auction_header_value = + GetAdAuctionHeaderForRequestPath( + "/interest_group/page_with_custom_ad_auction_result_header.html"); + + EXPECT_TRUE(ad_auction_header_value); + EXPECT_EQ(*ad_auction_header_value, "?1"); + + url::Origin request_origin = url::Origin::Create(fetch_url); + EXPECT_THAT(TakeAuctionAdditionalBidsForOriginAndNonce( + request_origin, "00000000-0000-0000-0000-000000000000"), + ::testing::ElementsAre("e30=")); +} + +IN_PROC_BROWSER_TEST_F( + InterestGroupBrowserTest, + FetchCrossOrigin_AdAuctionHeadersEligible_HasAdAuctionAdditionalBidResponseHeader) { + GURL main_frame_url = + https_server_->GetURL("a.test", "/interest_group/empty.html"); + ASSERT_TRUE(NavigateToURL(shell(), main_frame_url)); + + base::StringPairs replacement; + replacement.emplace_back(std::make_pair("{{STATUS}}", "200 OK")); + replacement.emplace_back(std::make_pair( + "{{AD_AUCTION_HEADERS}}", + base::StrCat({"Ad-Auction-Additional-Bid: ", + "00000000-0000-0000-0000-000000000000:e30="}))); + replacement.emplace_back(std::make_pair("{{REDIRECT_HEADER}}", "")); + + GURL fetch_url = https_server_->GetURL( + "b.test", net::test_server::GetFilePathWithReplacements( + "/interest_group/" + "page_with_custom_ad_auction_result_header.html", + replacement)); + + // Verify that the JavaScript doesn't see the response header + // `Ad-Auction-Additional-Bid`. + EXPECT_TRUE(ExecJs(web_contents()->GetPrimaryMainFrame(), + content::JsReplace(R"( + fetch($1, {adAuctionHeaders: true}).then((response) => { + if (response.headers.get('Ad-Auction-Additional-Bid')) { + throw 'Unexpectedly received `Ad-Auction-Additional-Bid` header'; + } + }); + )", + fetch_url))); + + absl::optional<std::string> ad_auction_header_value = + GetAdAuctionHeaderForRequestPath( + "/interest_group/page_with_custom_ad_auction_result_header.html"); + + EXPECT_TRUE(ad_auction_header_value); + EXPECT_EQ(*ad_auction_header_value, "?1"); + + url::Origin request_origin = url::Origin::Create(fetch_url); + EXPECT_THAT(TakeAuctionAdditionalBidsForOriginAndNonce( + request_origin, "00000000-0000-0000-0000-000000000000"), + ::testing::ElementsAre("e30=")); +} + +IN_PROC_BROWSER_TEST_F( + InterestGroupBrowserTest, + FetchCrossOrigin_AdAuctionHeadersEligible_HasNoAdAuctionAdditionalBidResponseHeader) { + GURL main_frame_url = + https_server_->GetURL("a.test", "/interest_group/empty.html"); + ASSERT_TRUE(NavigateToURL(shell(), main_frame_url)); + + base::StringPairs replacement; + replacement.emplace_back(std::make_pair("{{STATUS}}", "200 OK")); + replacement.emplace_back(std::make_pair("{{AD_AUCTION_HEADERS}}", "")); + replacement.emplace_back(std::make_pair("{{REDIRECT_HEADER}}", "")); + + GURL fetch_url = https_server_->GetURL( + "b.test", net::test_server::GetFilePathWithReplacements( + "/interest_group/" + "page_with_custom_ad_auction_result_header.html", + replacement)); + + EXPECT_TRUE(ExecJs( + web_contents()->GetPrimaryMainFrame(), + content::JsReplace("fetch($1, {adAuctionHeaders: true})", fetch_url))); + + absl::optional<std::string> ad_auction_header_value = + GetAdAuctionHeaderForRequestPath( + "/interest_group/page_with_custom_ad_auction_result_header.html"); + + EXPECT_TRUE(ad_auction_header_value); + EXPECT_EQ(*ad_auction_header_value, "?1"); + + url::Origin request_origin = url::Origin::Create(fetch_url); + EXPECT_THAT(TakeAuctionAdditionalBidsForOriginAndNonce( + request_origin, "00000000-0000-0000-0000-000000000000"), + ::testing::IsEmpty()); +} + +IN_PROC_BROWSER_TEST_F( + InterestGroupBrowserTest, + FetchCrossOrigin_AdAuctionHeadersNotEligible_HasAdAuctionAdditionalBidResponseHeader) { + GURL main_frame_url = + https_server_->GetURL("a.test", "/interest_group/empty.html"); + ASSERT_TRUE(NavigateToURL(shell(), main_frame_url)); + + base::StringPairs replacement; + replacement.emplace_back(std::make_pair("{{STATUS}}", "200 OK")); + replacement.emplace_back(std::make_pair( + "{{AD_AUCTION_HEADERS}}", + base::StrCat({"Ad-Auction-Additional-Bid: ", + "00000000-0000-0000-0000-000000000000:e30="}))); + replacement.emplace_back(std::make_pair("{{REDIRECT_HEADER}}", "")); + + // "d.test" is not allowlisted for the API. Thus the request isn't eligible + // for ad auction headers. + GURL fetch_url = https_server_->GetURL( + "d.test", net::test_server::GetFilePathWithReplacements( + "/interest_group/" + "page_with_custom_ad_auction_result_header.html", + replacement)); + + EXPECT_TRUE(ExecJs( + web_contents()->GetPrimaryMainFrame(), + content::JsReplace("fetch($1, {adAuctionHeaders: true})", fetch_url))); + + absl::optional<std::string> ad_auction_header_value = + GetAdAuctionHeaderForRequestPath( + "/interest_group/page_with_custom_ad_auction_result_header.html"); + + EXPECT_FALSE(ad_auction_header_value); + + url::Origin request_origin = url::Origin::Create(fetch_url); + EXPECT_THAT(TakeAuctionAdditionalBidsForOriginAndNonce( + request_origin, "00000000-0000-0000-0000-000000000000"), + ::testing::IsEmpty()); } // Runs an ad auction similar to the one in @@ -15568,20 +15755,23 @@ } // TODO(crbug.com/1474303): Re-enable this test -IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest, AuctionNonceIsValid) { +IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest, DISABLED_AuctionNonceIsValid) { GURL test_url = https_server_->GetURL("a.test", "/page_with_iframe.html"); ASSERT_TRUE(NavigateToURL(shell(), test_url)); url::Origin test_origin = url::Origin::Create(test_url); GURL ad_url = https_server_->GetURL("c.test", "/echo?render_cars"); - EXPECT_EQ(kSuccess, JoinInterestGroupAndVerify( - blink::TestInterestGroupBuilder( - /*owner=*/test_origin, - /*name=*/"cars") - .SetBiddingUrl(https_server_->GetURL( - "a.test", "/interest_group/bidding_logic.js")) - .SetAds({{{ad_url, /*metadata=*/absl::nullopt}}}) - .Build())); + EXPECT_EQ(kSuccess, + JoinInterestGroupAndVerify( + blink::TestInterestGroupBuilder( + /*owner=*/test_origin, + /*name=*/"cars") + .SetBiddingUrl(https_server_->GetURL( + "a.test", "/interest_group/bidding_logic_use_wasm.js")) + .SetBiddingWasmHelperUrl(https_server_->GetURL( + "a.test", "/interest_group/multiply.wasm")) + .SetAds({{{ad_url, R"({"ad":"metadata","here":[1,2]})"}}}) + .Build())); std::string auction_nonce = CreateAuctionNonceAndWait(); @@ -15605,14 +15795,17 @@ url::Origin test_origin = url::Origin::Create(test_url); GURL ad_url = https_server_->GetURL("c.test", "/echo?render_cars"); - EXPECT_EQ(kSuccess, JoinInterestGroupAndVerify( - blink::TestInterestGroupBuilder( - /*owner=*/test_origin, - /*name=*/"cars") - .SetBiddingUrl(https_server_->GetURL( - "a.test", "/interest_group/bidding_logic.js")) - .SetAds({{{ad_url, /*metadata=*/absl::nullopt}}}) - .Build())); + EXPECT_EQ( + kSuccess, + JoinInterestGroupAndVerify( + /*owner=*/test_origin, + /*name=*/"cars", + /*priority=*/0.0, + /*execution_mode=*/ + blink::InterestGroup::ExecutionMode::kCompatibilityMode, + /*bidding_url=*/ + https_server_->GetURL("a.test", "/interest_group/bidding_logic.js"), + /*ads=*/{{{ad_url, /*metadata=*/absl::nullopt}}})); std::string auction_nonce = CreateAuctionNonceAndWait();
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc index bdb00e0..0ce6ef4 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -408,7 +408,7 @@ #endif // BUILDFLAG(IS_ANDROID) // The next value to use for the accessibility reset token. -int g_next_accessibility_reset_token = 1; +uint32_t g_accessibility_reset_token = 0; // Whether to allow injecting javascript into any kind of frame, for Android // WebView, WebLayer, Fuchsia web.ContextProvider and CastOS content shell. @@ -2902,15 +2902,16 @@ if (!render_accessibility_) return; - accessibility_reset_token_ = g_next_accessibility_reset_token++; - render_accessibility_->Reset(accessibility_reset_token_); + accessibility_reset_token_ = ++g_accessibility_reset_token; + render_accessibility_->Reset(*accessibility_reset_token_); } void RenderFrameHostImpl::AccessibilityFatalError() { CHECK(!BrowserAccessibilityManager::IsFailFastMode()); browser_accessibility_manager_.reset(); - if (accessibility_reset_token_ || !render_accessibility_) + if (!render_accessibility_) { return; + } static auto* ax_rfhi_url_crash_key = base::debug::AllocateCrashKeyString( "ax_rfhi_url", base::debug::CrashKeySize::Size256); @@ -7118,8 +7119,9 @@ void RenderFrameHostImpl::SendAccessibilityEventsToManager( const AXEventNotificationDetails& details) { - if (!browser_accessibility_manager_) + if (!browser_accessibility_manager_) { return; + } DCHECK(delegate_->GetAccessibilityMode().has_mode(ui::AXMode::kNativeAPIs)); if (!browser_accessibility_manager_->OnAccessibilityEvents(details)) { @@ -9170,7 +9172,7 @@ void RenderFrameHostImpl::HandleAXEvents( const ui::AXTreeID& tree_id, blink::mojom::AXUpdatesAndEventsPtr updates_and_events, - int32_t reset_token) { + uint32_t reset_token) { TRACE_EVENT0("accessibility", "RenderFrameHostImpl::HandleAXEvents"); SCOPED_UMA_HISTOGRAM_TIMER("Accessibility.Performance.HandleAXEvents"); @@ -9187,10 +9189,12 @@ // Don't process this IPC if either we're waiting on a reset and this IPC // doesn't have the matching token ID, or if we're not waiting on a reset but // this message includes a reset token. - if (accessibility_reset_token_ != reset_token) { + // The token prevents obsolete data from being processed. + CHECK(accessibility_reset_token_); + if (*accessibility_reset_token_ != reset_token) { + DVLOG(1) << "Ignoring obsolete accessibility data."; return; } - accessibility_reset_token_ = 0; ui::AXMode accessibility_mode = delegate_->GetAccessibilityMode(); @@ -9259,17 +9263,24 @@ void RenderFrameHostImpl::HandleAXLocationChanges( const ui::AXTreeID& tree_id, - std::vector<blink::mojom::LocationChangesPtr> changes) { + std::vector<blink::mojom::LocationChangesPtr> changes, + uint32_t reset_token) { if (tree_id != GetAXTreeID()) { // The message has arrived after the frame has navigated which means its // changes are no longer relevant and can be discarded. return; } - if (accessibility_reset_token_ || - IsInactiveAndDisallowActivation( - DisallowActivationReasonId::kAXLocationChange)) + CHECK(accessibility_reset_token_); + if (*accessibility_reset_token_ != reset_token) { + DVLOG(1) << "Ignoring obsolete accessibility data."; return; + } + + if (IsInactiveAndDisallowActivation( + DisallowActivationReasonId::kAXLocationChange)) { + return; + } BrowserAccessibilityManager* manager = GetOrCreateBrowserAccessibilityManager(); @@ -10819,7 +10830,8 @@ GetRemoteAssociatedInterfaces()->GetInterface(&render_accessibility_); DCHECK(render_accessibility_); } - render_accessibility_->SetMode(ax_mode); + accessibility_reset_token_ = ++g_accessibility_reset_token; + render_accessibility_->SetMode(ax_mode, *accessibility_reset_token_); } else { // Resetting the Remote signals the renderer to shutdown accessibility // in the renderer.
diff --git a/content/browser/renderer_host/render_frame_host_impl.h b/content/browser/renderer_host/render_frame_host_impl.h index ec29081..b4c64724 100644 --- a/content/browser/renderer_host/render_frame_host_impl.h +++ b/content/browser/renderer_host/render_frame_host_impl.h
@@ -2864,9 +2864,9 @@ // Call |HandleAXEvents()| for tests. void HandleAXEventsForTests( const ui::AXTreeID& tree_id, - blink::mojom::AXUpdatesAndEventsPtr updates_and_events, - int32_t reset_token) { - HandleAXEvents(tree_id, std::move(updates_and_events), reset_token); + blink::mojom::AXUpdatesAndEventsPtr updates_and_events) { + HandleAXEvents(tree_id, std::move(updates_and_events), + *accessibility_reset_token_); } // BucketContext: @@ -3349,10 +3349,11 @@ friend class RenderAccessibilityHost; void HandleAXEvents(const ui::AXTreeID& tree_id, blink::mojom::AXUpdatesAndEventsPtr updates_and_events, - int32_t reset_token); + uint32_t reset_token); void HandleAXLocationChanges( const ui::AXTreeID& tree_id, - std::vector<blink::mojom::LocationChangesPtr> changes); + std::vector<blink::mojom::LocationChangesPtr> changes, + uint32_t reset_token); // mojom::DomAutomationControllerHost: void DomOperationResponse(const std::string& json_string) override; @@ -4428,10 +4429,11 @@ // The object managing the accessibility tree for this frame. std::unique_ptr<BrowserAccessibilityManager> browser_accessibility_manager_; - // This is nonzero if we sent an accessibility reset to the renderer and - // we're waiting for an IPC containing this reset token (sequentially - // assigned) and a complete replacement accessibility tree. - int accessibility_reset_token_ = 0; + // This is the value of the reset token expected for accessibility messages. + // Any message with a different reset token will be dropped. + // absl::nullopt means that accessibility has never been turned on for + // this renderer (delegate_->GetAccessibilityMode().is_mode_off()). + absl::optional<uint32_t> accessibility_reset_token_; // A count of the number of times we received an unexpected fatal // accessibility error and needed to reset accessibility, so we don't keep
diff --git a/content/public/android/BUILD.gn b/content/public/android/BUILD.gn index 084ffb3..9c3bfb3 100644 --- a/content/public/android/BUILD.gn +++ b/content/public/android/BUILD.gn
@@ -403,9 +403,29 @@ "java/src/org/chromium/content_public/browser/selection/SelectionDropdownMenuDelegate.java", ] + public_deps = [ ":identity_credentials_java" ] + proguard_configs = [ "proguard.flags" ] } +# TODO(crbug.com/1475970) simplify these build targets once GMSCore publishes identity-credentials. +android_library("identity_credentials_java") { + sources = [ + "java/src/org/chromium/content/browser/webid/IdentityCredentialsDelegate.java", + "java/src/org/chromium/content/browser/webid/IdentityCredentialsDelegateImpl.java", + ] + deps = [ "//base:base_java" ] + jar_excluded_patterns = [ "*/IdentityCredentialsDelegateImpl.class" ] +} + +android_library("identity_credentials_public_impl_java") { + sources = [ "java/src/org/chromium/content/browser/webid/IdentityCredentialsDelegateImpl.java" ] + deps = [ + ":identity_credentials_java", + "//base:base_java", + ] +} + java_strings_grd("content_strings_grd") { grd_file = "java/strings/android_content_strings.grd" outputs = [ "values/android_content_strings.xml" ] +
diff --git a/content/public/android/java/src/org/chromium/content/browser/accessibility/AccessibilityEventDispatcher.java b/content/public/android/java/src/org/chromium/content/browser/accessibility/AccessibilityEventDispatcher.java index 23bbd8d..42b9fab 100644 --- a/content/public/android/java/src/org/chromium/content/browser/accessibility/AccessibilityEventDispatcher.java +++ b/content/public/android/java/src/org/chromium/content/browser/accessibility/AccessibilityEventDispatcher.java
@@ -40,9 +40,6 @@ // can maintain a connection through JNI to the native code. private Client mClient; - // Simple boolean to plumb through the ContentFeatureList enabled/disabled flag. - private boolean mOnDemandEnabled; - /** * Callback interface to link {@link WebContentsAccessibilityImpl} with an instance of the * {@link AccessibilityEventDispatcher} so we can separate out queueing/throttling logic into a @@ -80,13 +77,11 @@ * Create an AccessibilityEventDispatcher and define the delays for event types. */ public AccessibilityEventDispatcher(Client mClient, Map<Integer, Integer> eventThrottleDelays, - Set<Integer> viewIndependentEventsToThrottle, Set<Integer> relevantEventTypes, - boolean onDemandEnabled) { + Set<Integer> viewIndependentEventsToThrottle, Set<Integer> relevantEventTypes) { this.mClient = mClient; this.mEventThrottleDelays = eventThrottleDelays; this.mViewIndependentEventsToThrottle = viewIndependentEventsToThrottle; this.mRelevantEventTypes = relevantEventTypes; - this.mOnDemandEnabled = onDemandEnabled; } /** @@ -98,8 +93,8 @@ * @param eventType The AccessibilityEvent type. */ public void enqueueEvent(int virtualViewId, int eventType) { - // Check whether OnDemand feature is enabled and if this is a relevant event type. - if (mOnDemandEnabled && !mRelevantEventTypes.contains(eventType)) { + // Check if this is a relevant event type. + if (!mRelevantEventTypes.contains(eventType)) { return; } @@ -170,14 +165,6 @@ } /** - * Helper method to set the OnDemand feature enabled boolean. - * @param onDemandEnabled boolean is feature enabled - */ - public void setOnDemandEnabled(boolean onDemandEnabled) { - mOnDemandEnabled = onDemandEnabled; - } - - /** * Calculates a unique identifier for a given |virtualViewId| and |eventType| pairing. This is * used to replace the need for a Pair<> or wrapper object to hold two simple ints. We shift the * |virtualViewId| 32 bits left, and bitwise OR with |eventType|, creating a 64-bit unique long.
diff --git a/content/public/android/java/src/org/chromium/content/browser/accessibility/AccessibilityHistogramRecorder.java b/content/public/android/java/src/org/chromium/content/browser/accessibility/AccessibilityHistogramRecorder.java index d30e3bf1..475db471 100644 --- a/content/public/android/java/src/org/chromium/content/browser/accessibility/AccessibilityHistogramRecorder.java +++ b/content/public/android/java/src/org/chromium/content/browser/accessibility/AccessibilityHistogramRecorder.java
@@ -240,12 +240,8 @@ * Record UMA histograms for performance-related accessibility metrics. */ public void recordAccessibilityPerformanceHistograms() { - // If the OnDemand feature is enabled, log UMA metrics and reset counters. - if (ContentFeatureMap.isEnabled(ContentFeatureList.ON_DEMAND_ACCESSIBILITY_EVENTS)) { - recordEventsHistograms(); - } - - // Always track the histograms for cache usage statistics. + // Always track the histograms for events and cache usage statistics. + recordEventsHistograms(); recordCacheHistograms(); }
diff --git a/content/public/android/java/src/org/chromium/content/browser/accessibility/WebContentsAccessibilityImpl.java b/content/public/android/java/src/org/chromium/content/browser/accessibility/WebContentsAccessibilityImpl.java index d113c81..de6c1b78 100644 --- a/content/public/android/java/src/org/chromium/content/browser/accessibility/WebContentsAccessibilityImpl.java +++ b/content/public/android/java/src/org/chromium/content/browser/accessibility/WebContentsAccessibilityImpl.java
@@ -394,7 +394,7 @@ return true; } - }, eventThrottleDelays, viewIndependentEvents, new HashSet<Integer>(), false); + }, eventThrottleDelays, viewIndependentEvents, new HashSet<Integer>()); if (mDelegate.getNativeAXTree() != 0) { initializeNativeWithAXTreeUpdate(mDelegate.getNativeAXTree()); @@ -451,16 +451,12 @@ // Register a broadcast receiver for locale change. if (mView.isAttachedToWindow()) registerLocaleChangeReceiver(); - // Define a set of relevant AccessibilityEvents if the OnDemand feature is enabled. - if (ContentFeatureMap.isEnabled(ContentFeatureList.ON_DEMAND_ACCESSIBILITY_EVENTS)) { - Runnable serviceMaskRunnable = () -> { - int serviceEventMask = AccessibilityState.getAccessibilityServiceEventTypeMask(); - mEventDispatcher.updateRelevantEventTypes( - convertMaskToEventTypes(serviceEventMask)); - mEventDispatcher.setOnDemandEnabled(true); - }; - mView.post(serviceMaskRunnable); - } + // Define a set of relevant AccessibilityEvents. + Runnable serviceMaskRunnable = () -> { + int serviceEventMask = AccessibilityState.getAccessibilityServiceEventTypeMask(); + mEventDispatcher.updateRelevantEventTypes(convertMaskToEventTypes(serviceEventMask)); + }; + mView.post(serviceMaskRunnable); // Send state values set by embedders to native-side objects. refreshNativeState(); @@ -719,11 +715,8 @@ mIsImageDescriptionsCandidate && AccessibilityState.isScreenReaderEnabled()); // Update the list of events we dispatch to enabled services. - if (ContentFeatureMap.isEnabled(ContentFeatureList.ON_DEMAND_ACCESSIBILITY_EVENTS)) { - int serviceEventMask = AccessibilityState.getAccessibilityServiceEventTypeMask(); - mEventDispatcher.updateRelevantEventTypes( - convertMaskToEventTypes(serviceEventMask)); - } + int serviceEventMask = AccessibilityState.getAccessibilityServiceEventTypeMask(); + mEventDispatcher.updateRelevantEventTypes(convertMaskToEventTypes(serviceEventMask)); // If the auto-disable feature is enabled, then we will disable renderer accessibility // and tear down objects when no accessibility services are running. If we have
diff --git a/content/public/android/java/src/org/chromium/content/browser/selection/MagnifierSurfaceControl.java b/content/public/android/java/src/org/chromium/content/browser/selection/MagnifierSurfaceControl.java index badcc8a..62cb41fd 100644 --- a/content/public/android/java/src/org/chromium/content/browser/selection/MagnifierSurfaceControl.java +++ b/content/public/android/java/src/org/chromium/content/browser/selection/MagnifierSurfaceControl.java
@@ -25,6 +25,15 @@ @RequiresApi(Build.VERSION_CODES.TIRAMISU) @JNINamespace("content") public class MagnifierSurfaceControl implements MagnifierWrapper { + // Shadows are implemented as linear gradients with the same rounded corner as the main + // content. Values are in device independent pixels, and converted to pixels at run time. + // Shadow height is amount that shadow extends above and below the magnifier; they increase + // the size of surface control. + private static final int TOP_SHADOW_HEIGHT_DP = 3; + private static final int BOTTOM_SHADOW_HEIGHT_DP = 6; + // The bottom shadow is shrunk horizontally by this amount each side. + private static final int BOTTOM_SHADOW_WIDTH_REDUCTION_DP = 3; + private long mNativeMagnifierSurfaceControl; private final WebContentsImpl mWebContents; @@ -57,6 +66,8 @@ float readback_y = y; y = y + mVerticalOffsetPx; + y = y - scaleByDeviceFactor(TOP_SHADOW_HEIGHT_DP); + // Clamp to localVisibleRect. x = Math.max(x, localVisibleRect.left); y = Math.max(y, localVisibleRect.top); @@ -114,8 +125,11 @@ } float density = getView().getResources().getDisplayMetrics().density; - mNativeMagnifierSurfaceControl = MagnifierSurfaceControlJni.get().create( - mWebContents, surfaceControl, density, mWidthPx, mHeightPx, cornerRadius, zoom); + mNativeMagnifierSurfaceControl = MagnifierSurfaceControlJni.get().create(mWebContents, + surfaceControl, density, mWidthPx, mHeightPx, cornerRadius, zoom, + scaleByDeviceFactor(TOP_SHADOW_HEIGHT_DP), + scaleByDeviceFactor(BOTTOM_SHADOW_HEIGHT_DP), + scaleByDeviceFactor(BOTTOM_SHADOW_WIDTH_REDUCTION_DP)); mSurfaceControl = surfaceControl; mTransaction = attachTransaction; } @@ -143,10 +157,15 @@ return mView; } + private int scaleByDeviceFactor(int value) { + return (int) (value * mWebContents.getRenderCoordinates().getDeviceScaleFactor()); + } + @NativeMethods interface Natives { long create(WebContentsImpl webContents, SurfaceControl surfaceControl, float deviceScale, - int width, int height, float cornerRadius, float zoom); + int width, int height, float cornerRadius, float zoom, int topShadowHeight, + int bottomShadowHeight, int bottomShadowWidthReduction); void destroy(long magnifierSurfaceControl); void setReadbackOrigin(long nativeMagnifierSurfaceControl, float x, float y); }
diff --git a/content/public/android/java/src/org/chromium/content/browser/webid/IdentityCredentialsDelegate.java b/content/public/android/java/src/org/chromium/content/browser/webid/IdentityCredentialsDelegate.java new file mode 100644 index 0000000..3c83883e --- /dev/null +++ b/content/public/android/java/src/org/chromium/content/browser/webid/IdentityCredentialsDelegate.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.content.browser.webid; + +import org.chromium.base.Promise; + +/** + * Delegate interface for calling into GMSCore's private identity credentials. + * + * TODO(crbug.com/1475970) delete this once GMSCore publishes this API. + */ +public interface IdentityCredentialsDelegate { + // TODO(goto): replace with the actual input/output parameters + public Promise<String> get(String origin, String request); +}
diff --git a/content/public/android/java/src/org/chromium/content/browser/webid/IdentityCredentialsDelegateImpl.java b/content/public/android/java/src/org/chromium/content/browser/webid/IdentityCredentialsDelegateImpl.java new file mode 100644 index 0000000..1c6c960 --- /dev/null +++ b/content/public/android/java/src/org/chromium/content/browser/webid/IdentityCredentialsDelegateImpl.java
@@ -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. + +package org.chromium.content.browser.webid; + +import org.chromium.base.Promise; + +/** + * Public no-op implementation of IdentityCredentialsDelegate. + * + * TODO(crbug.com/1475970) upstream the private version of this. + */ +public class IdentityCredentialsDelegateImpl implements IdentityCredentialsDelegate { + @Override + public Promise<String> get(String origin, String request) { + return null; + } +}
diff --git a/content/public/android/java/src/org/chromium/content_public/browser/ContentFeatureList.java b/content/public/android/java/src/org/chromium/content_public/browser/ContentFeatureList.java index 86416a0..2d1c27a 100644 --- a/content/public/android/java/src/org/chromium/content_public/browser/ContentFeatureList.java +++ b/content/public/android/java/src/org/chromium/content_public/browser/ContentFeatureList.java
@@ -29,8 +29,6 @@ public static final String MOUSE_AND_TRACKPAD_DROPDOWN_MENU = "MouseAndTrackpadDropdownMenu"; - public static final String ON_DEMAND_ACCESSIBILITY_EVENTS = "OnDemandAccessibilityEvents"; - public static final String OPTIMIZE_IMM_HIDE_CALLS = "OptimizeImmHideCalls"; public static final String PROCESS_SHARING_WITH_STRICT_SITE_INSTANCES =
diff --git a/content/public/android/javatests/src/org/chromium/content/browser/accessibility/AccessibilityEventDispatcherTest.java b/content/public/android/javatests/src/org/chromium/content/browser/accessibility/AccessibilityEventDispatcherTest.java index 6a7deb6..8378ca8 100644 --- a/content/public/android/javatests/src/org/chromium/content/browser/accessibility/AccessibilityEventDispatcherTest.java +++ b/content/public/android/javatests/src/org/chromium/content/browser/accessibility/AccessibilityEventDispatcherTest.java
@@ -13,6 +13,7 @@ import org.chromium.base.test.BaseJUnit4ClassRunner; +import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; import java.util.Map; @@ -59,7 +60,7 @@ mEventDispatched = true; return true; } - }, mEventDelays, mViewIndependentEvents, new HashSet<Integer>(), false); + }, mEventDelays, mViewIndependentEvents, new HashSet<Integer>(Arrays.asList(1, 2, 3))); mRunnablePosted = false; mRunnableRemoved = false; @@ -164,7 +165,6 @@ Set<Integer> relevantEvents = new HashSet<Integer>(); relevantEvents.add(3); mDispatcher.updateRelevantEventTypes(relevantEvents); - mDispatcher.setOnDemandEnabled(true); // Send a relevant event type and ensure it is dispatched. mDispatcher.enqueueEvent(1, 3);
diff --git a/content/public/android/javatests/src/org/chromium/content/browser/accessibility/WebContentsAccessibilityTest.java b/content/public/android/javatests/src/org/chromium/content/browser/accessibility/WebContentsAccessibilityTest.java index b271bae2..773a782 100644 --- a/content/public/android/javatests/src/org/chromium/content/browser/accessibility/WebContentsAccessibilityTest.java +++ b/content/public/android/javatests/src/org/chromium/content/browser/accessibility/WebContentsAccessibilityTest.java
@@ -167,9 +167,8 @@ "Expected focus to be on a different node than it is."; // ContentFeatureList maps used for various tests. - private static final Map<String, Boolean> ON_DEMAND_ON_AXMODES_ON_PERF_TEST_OFF = - Map.of(ContentFeatureList.ON_DEMAND_ACCESSIBILITY_EVENTS, true, - ContentFeatureList.ACCESSIBILITY_PERFORMANCE_FILTERING, true, + private static final Map<String, Boolean> AXMODES_ON_PERF_TEST_OFF = + Map.of(ContentFeatureList.ACCESSIBILITY_PERFORMANCE_FILTERING, true, ContentFeatureList.ACCESSIBILITY_PERFORMANCE_TESTING, false); private static final Map<String, Boolean> AUTO_DISABLE_V2_ON = Map.of(ContentFeatureList.AUTO_DISABLE_ACCESSIBILITY_V2, true); @@ -416,18 +415,18 @@ } /** - * Test that UMA histograms are recorded for the OnDemand AT feature and AX Mode Complete. + * Test that UMA histograms are recorded for AX Mode Complete. */ @Test @SmallTest - public void testUMAHistograms_OnDemand_AXModeComplete() throws Throwable { + public void testUMAHistograms_AXModeComplete() throws Throwable { // Build a simple web page with a few nodes to traverse. setupTestWithHTML("<p>This is a test 1</p>\n" + "<p>This is a test 2</p>\n" + "<p>This is a test 3</p>"); // Set the relevant features and accessibility state. - FeatureList.setTestFeatures(ON_DEMAND_ON_AXMODES_ON_PERF_TEST_OFF); + FeatureList.setTestFeatures(AXMODES_ON_PERF_TEST_OFF); TestThreadUtils.runOnUiThreadBlocking(() -> { AccessibilityState.setIsScreenReaderEnabledForTesting(true); AccessibilityState.setIsOnlyPasswordManagersEnabledForTesting(false); @@ -451,18 +450,18 @@ } /** - * Test that UMA histograms are recorded for the OnDemand AT feature and AX Mode Form Controls. + * Test that UMA histograms are recorded for AX Mode Form Controls. */ @Test @SmallTest - public void testUMAHistograms_OnDemand_AXModeFormControls() throws Throwable { + public void testUMAHistograms_AXModeFormControls() throws Throwable { // Build a simple web page with a few nodes to traverse. setupTestWithHTMLForFormControlsMode("<p>This is a test 1</p>\n" + "<p>This is a test 2</p>\n" + "<p>This is a test 3</p>"); // Set the relevant features and accessibility state. - FeatureList.setTestFeatures(ON_DEMAND_ON_AXMODES_ON_PERF_TEST_OFF); + FeatureList.setTestFeatures(AXMODES_ON_PERF_TEST_OFF); TestThreadUtils.runOnUiThreadBlocking(() -> { AccessibilityState.setIsScreenReaderEnabledForTesting(false); AccessibilityState.setIsOnlyPasswordManagersEnabledForTesting(true); @@ -487,18 +486,18 @@ } /** - * Test that UMA histograms are recorded for the OnDemand AT feature and AX Mode Basic. + * Test that UMA histograms are recorded for AX Mode Basic. */ @Test @SmallTest - public void testUMAHistograms_OnDemand_AXModeBasic() throws Throwable { + public void testUMAHistograms_AXModeBasic() throws Throwable { // Build a simple web page with a few nodes to traverse. setupTestWithHTMLForBasicMode("<p>This is a test 1</p>\n" + "<p>This is a test 2</p>\n" + "<p>This is a test 3</p>"); // Set the relevant features and screen reader state. - FeatureList.setTestFeatures(ON_DEMAND_ON_AXMODES_ON_PERF_TEST_OFF); + FeatureList.setTestFeatures(AXMODES_ON_PERF_TEST_OFF); TestThreadUtils.runOnUiThreadBlocking(() -> { AccessibilityState.setIsScreenReaderEnabledForTesting(false); AccessibilityState.setIsOnlyPasswordManagersEnabledForTesting(false); @@ -523,19 +522,18 @@ } /** - * Test that UMA histograms are recorded for the OnDemand AT feature and AX Mode Complete - * when 100% of events are dropped. + * Test that UMA histograms are recorded for AX Mode Complete when 100% of events are dropped. */ @Test @SmallTest - public void testUMAHistograms_OnDemand_AXModeComplete_100Percent() throws Throwable { + public void testUMAHistograms_AXModeComplete_100Percent() throws Throwable { // Build a simple web page with a few nodes to traverse. setupTestWithHTML("<p>This is a test 1</p>\n" + "<p>This is a test 2</p>\n" + "<p>This is a test 3</p>"); // Set the relevant features and screen reader state, set event type masks to empty. - FeatureList.setTestFeatures(ON_DEMAND_ON_AXMODES_ON_PERF_TEST_OFF); + FeatureList.setTestFeatures(AXMODES_ON_PERF_TEST_OFF); TestThreadUtils.runOnUiThreadBlocking(() -> { AccessibilityState.setEventTypeMaskForTesting(EVENT_TYPE_MASK_NONE); AccessibilityState.setIsScreenReaderEnabledForTesting(true); @@ -561,19 +559,19 @@ } /** - * Test that UMA histograms are recorded for the OnDemand AT feature and AX Mode Form Controls - * when 100% of events are dropped. + * Test that UMA histograms are recorded for AX Mode Form Controls when 100% of events are + * dropped. */ @Test @SmallTest - public void testUMAHistograms_OnDemand_AXModeFormControls_100Percent() throws Throwable { + public void testUMAHistograms_AXModeFormControls_100Percent() throws Throwable { // Build a simple web page with a few nodes to traverse. setupTestWithHTMLForFormControlsMode("<p>This is a test 1</p>\n" + "<p>This is a test 2</p>\n" + "<p>This is a test 3</p>"); // Set the relevant features and screen reader state, set event type masks to empty. - FeatureList.setTestFeatures(ON_DEMAND_ON_AXMODES_ON_PERF_TEST_OFF); + FeatureList.setTestFeatures(AXMODES_ON_PERF_TEST_OFF); TestThreadUtils.runOnUiThreadBlocking(() -> { AccessibilityState.setEventTypeMaskForTesting(EVENT_TYPE_MASK_NONE); AccessibilityState.setIsScreenReaderEnabledForTesting(false); @@ -599,19 +597,18 @@ } /** - * Test that UMA histograms are recorded for the OnDemand AT feature and AX Mode Basic - * when 100% of events are dropped. + * Test that UMA histograms are recorded for AX Mode Basic when 100% of events are dropped. */ @Test @SmallTest - public void testUMAHistograms_OnDemand_AXModeBasic_100Percent() throws Throwable { + public void testUMAHistograms_AXModeBasic_100Percent() throws Throwable { // Build a simple web page with a few nodes to traverse. setupTestWithHTMLForBasicMode("<p>This is a test 1</p>\n" + "<p>This is a test 2</p>\n" + "<p>This is a test 3</p>"); // Set the relevant features and screen reader state, set event type masks to empty. - FeatureList.setTestFeatures(ON_DEMAND_ON_AXMODES_ON_PERF_TEST_OFF); + FeatureList.setTestFeatures(AXMODES_ON_PERF_TEST_OFF); TestThreadUtils.runOnUiThreadBlocking(() -> { AccessibilityState.setEventTypeMaskForTesting(EVENT_TYPE_MASK_NONE); AccessibilityState.setIsScreenReaderEnabledForTesting(false);
diff --git a/content/public/common/content_features.cc b/content/public/common/content_features.cc index 87194bb..a161ae7 100644 --- a/content/public/common/content_features.cc +++ b/content/public/common/content_features.cc
@@ -1579,12 +1579,6 @@ "MouseAndTrackpadDropdownMenu", base::FEATURE_DISABLED_BY_DEFAULT); -// Allows the use of an experimental feature to drop any AccessibilityEvents -// that are not relevant to currently enabled accessibility services. -BASE_FEATURE(kOnDemandAccessibilityEvents, - "OnDemandAccessibilityEvents", - base::FEATURE_ENABLED_BY_DEFAULT); - // Request Desktop Site secondary settings for Android; including display // setting and peripheral setting. BASE_FEATURE(kRequestDesktopSiteAdditions,
diff --git a/content/public/common/content_features.h b/content/public/common/content_features.h index 0f8b441..9f71df9 100644 --- a/content/public/common/content_features.h +++ b/content/public/common/content_features.h
@@ -352,7 +352,6 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kBackgroundMediaRendererHasModerateBinding); CONTENT_EXPORT BASE_DECLARE_FEATURE(kReduceGpuPriorityOnBackground); CONTENT_EXPORT BASE_DECLARE_FEATURE(kMouseAndTrackpadDropdownMenu); -CONTENT_EXPORT BASE_DECLARE_FEATURE(kOnDemandAccessibilityEvents); CONTENT_EXPORT BASE_DECLARE_FEATURE(kRequestDesktopSiteAdditions); CONTENT_EXPORT BASE_DECLARE_FEATURE(kRequestDesktopSiteWindowSetting); CONTENT_EXPORT BASE_DECLARE_FEATURE(kRequestDesktopSiteZoom);
diff --git a/content/public/test/file_system_chooser_test_helpers.cc b/content/public/test/file_system_chooser_test_helpers.cc index 9fdd3db8..3dcba4ecb 100644 --- a/content/public/test/file_system_chooser_test_helpers.cc +++ b/content/public/test/file_system_chooser_test_helpers.cc
@@ -53,7 +53,7 @@ bool IsRunning(gfx::NativeWindow owning_window) const override { return false; } - void ListenerDestroyed() override {} + void ListenerDestroyed() override { listener_ = nullptr; } bool HasMultipleFileTypeChoicesImpl() override { return false; } private: @@ -112,7 +112,7 @@ bool IsRunning(gfx::NativeWindow owning_window) const override { return false; } - void ListenerDestroyed() override {} + void ListenerDestroyed() override { listener_ = nullptr; } bool HasMultipleFileTypeChoicesImpl() override { return false; } private:
diff --git a/content/renderer/accessibility/render_accessibility_impl.cc b/content/renderer/accessibility/render_accessibility_impl.cc index a09af345..c53ebc6f 100644 --- a/content/renderer/accessibility/render_accessibility_impl.cc +++ b/content/renderer/accessibility/render_accessibility_impl.cc
@@ -124,10 +124,9 @@ render_accessibility_manager_(render_accessibility_manager), render_frame_(render_frame), plugin_tree_source_(nullptr), - reset_token_(0), ukm_timer_(std::make_unique<base::ElapsedTimer>()), last_ukm_source_id_(ukm::kInvalidSourceId), - serialize_post_lifecycle_(serialize_post_lifecycle) { + serialize_post_lifecycle_(true) { mojo::Remote<ukm::mojom::UkmRecorderFactory> factory; content::RenderThread::Get()->BindHostReceiver( factory.BindNewPipeAndPassReceiver()); @@ -215,6 +214,7 @@ } void RenderAccessibilityImpl::AccessibilityModeChanged(const ui::AXMode& mode) { + CHECK(reset_token_); ui::AXMode old_mode = accessibility_mode_; DCHECK(!mode.is_mode_off()) << "Should not be reached when turning a11y off; rather, the " @@ -222,6 +222,7 @@ if (old_mode == mode) { DCHECK(ax_context_); + NOTREACHED() << "Do not call AccessibilityModeChanged unless it changes."; return; } @@ -267,6 +268,11 @@ FireLoadCompleteIfLoaded(); } +void RenderAccessibilityImpl::set_reset_token(uint32_t reset_token) { + CHECK(reset_token); + reset_token_ = reset_token; +} + void RenderAccessibilityImpl::FireLoadCompleteIfLoaded() { if (GetMainDocument().IsLoaded() && GetMainDocument().GetFrame()->GetEmbeddingToken()) { @@ -489,9 +495,10 @@ } } -void RenderAccessibilityImpl::Reset(int32_t reset_token) { +void RenderAccessibilityImpl::Reset(uint32_t reset_token) { DCHECK(ax_context_); DCHECK(!accessibility_mode_.is_mode_off()); + CHECK(reset_token); reset_token_ = reset_token; ax_context_->ResetSerializer(); FireLoadCompleteIfLoaded(); @@ -1352,21 +1359,20 @@ AddImageAnnotationDebuggingAttributes(updates_and_events->updates); } + CHECK(reset_token_); if (serialize_post_lifecycle_) { render_accessibility_manager_->HandleAccessibilityEvents( - std::move(updates_and_events), reset_token_, + std::move(updates_and_events), *reset_token_, base::BindOnce(&RenderAccessibilityImpl::OnSerializationReceived, weak_factory_for_pending_events_.GetWeakPtr())); } else { legacy_event_schedule_status_ = LegacyEventScheduleStatus::kWaitingForAck; render_accessibility_manager_->HandleAccessibilityEvents( - std::move(updates_and_events), reset_token_, + std::move(updates_and_events), *reset_token_, base::BindOnce( &RenderAccessibilityImpl::LegacyOnAccessibilityEventsHandled, weak_factory_for_pending_events_.GetWeakPtr())); } - reset_token_ = 0; - if (need_to_send_location_changes) { SendLocationChanges(); } @@ -1408,7 +1414,8 @@ void RenderAccessibilityImpl::SendLocationChanges() { TRACE_EVENT0("accessibility", "RenderAccessibilityImpl::SendLocationChanges"); DCHECK(ax_context_); - ax_context_->SerializeLocationChanges(); + CHECK(reset_token_); + ax_context_->SerializeLocationChanges(*reset_token_); } void RenderAccessibilityImpl::LegacyOnAccessibilityEventsHandled() {
diff --git a/content/renderer/accessibility/render_accessibility_impl.h b/content/renderer/accessibility/render_accessibility_impl.h index caa1465..a817f88 100644 --- a/content/renderer/accessibility/render_accessibility_impl.h +++ b/content/renderer/accessibility/render_accessibility_impl.h
@@ -114,7 +114,11 @@ int request_id, blink::mojom::RenderAccessibility::HitTestCallback callback); void PerformAction(const ui::AXActionData& data); - void Reset(int32_t reset_token); + void Reset(uint32_t reset_token); + + // Called when accessibility mode changes so that any obsolete accessibility + // bundles for the old mode can be ignored. + void set_reset_token(uint32_t reset_token); // Called when an accessibility notification occurs in Blink. void HandleAXEvent(const ui::AXEvent& event); @@ -284,9 +288,9 @@ std::unique_ptr<PluginAXTreeSerializer> plugin_serializer_; PluginAXTreeSource* plugin_tree_source_; - // Nonzero if the browser requested we reset the accessibility state. - // We need to return this token in the next IPC. - int reset_token_; + // Token to return this token in the next IPC, so that RenderFrameHostImpl + // can discard stale data, when the token does not match the expected token. + absl::optional<uint32_t> reset_token_; // Whether or not we've injected a stylesheet in this document // (only when debugging flags are enabled, never under normal circumstances).
diff --git a/content/renderer/accessibility/render_accessibility_impl_browsertest.cc b/content/renderer/accessibility/render_accessibility_impl_browsertest.cc index 2f3da030..d4fb9296 100644 --- a/content/renderer/accessibility/render_accessibility_impl_browsertest.cc +++ b/content/renderer/accessibility/render_accessibility_impl_browsertest.cc
@@ -170,7 +170,7 @@ } void HandleAXEvents(blink::mojom::AXUpdatesAndEventsPtr updates_and_events, - int32_t reset_token, + uint32_t reset_token, HandleAXEventsCallback callback) override { handled_updates_.insert(handled_updates_.end(), updates_and_events->updates.begin(), @@ -179,7 +179,8 @@ } void HandleAXLocationChanges( - std::vector<blink::mojom::LocationChangesPtr> changes) override { + std::vector<blink::mojom::LocationChangesPtr> changes, + uint32_t reset_token) override { for (auto& change : changes) location_changes_.emplace_back(std::move(change)); } @@ -314,7 +315,7 @@ } void SetMode(ui::AXMode mode) { - frame()->GetRenderAccessibilityManager()->SetMode(mode); + frame()->GetRenderAccessibilityManager()->SetMode(mode, 1); } ui::AXTreeUpdate GetLastAccUpdate() {
diff --git a/content/renderer/accessibility/render_accessibility_manager.cc b/content/renderer/accessibility/render_accessibility_manager.cc index 64f477d5..2e52adc 100644 --- a/content/renderer/accessibility/render_accessibility_manager.cc +++ b/content/renderer/accessibility/render_accessibility_manager.cc
@@ -32,7 +32,7 @@ receiver_.set_disconnect_handler(base::BindOnce( [](RenderAccessibilityManager* impl) { impl->receiver_.reset(); - impl->SetMode(ui::AXMode::kNone); + impl->SetMode(ui::AXMode::kNone, 0); }, base::Unretained(this))); } @@ -48,11 +48,16 @@ return render_accessibility_->GetAccessibilityMode(); } -void RenderAccessibilityManager::SetMode(const ui::AXMode& new_mode) { +void RenderAccessibilityManager::SetMode(const ui::AXMode& new_mode, + uint32_t reset_token) { ui::AXMode old_mode = GetAccessibilityMode(); - if (old_mode == new_mode) + if (old_mode == new_mode) { + if (render_accessibility_) { + render_accessibility_->set_reset_token(reset_token); + } return; + } if (new_mode.has_mode(ui::AXMode::kWebContents) && !old_mode.has_mode(ui::AXMode::kWebContents)) { @@ -65,6 +70,11 @@ render_accessibility_.reset(); } + if (render_accessibility_) { + CHECK(reset_token); + render_accessibility_->set_reset_token(reset_token); + } + // Notify the RenderFrame when the accessibility mode is changes to ensure it // notifies the relevant observers (subclasses of RenderFrameObserver). This // includes the RenderAccessibilityImpl instance owned by |this|, which will @@ -93,15 +103,16 @@ render_accessibility_->PerformAction(data); } -void RenderAccessibilityManager::Reset(int32_t reset_token) { +void RenderAccessibilityManager::Reset(uint32_t reset_token) { DCHECK(render_accessibility_); render_accessibility_->Reset(reset_token); } void RenderAccessibilityManager::HandleAccessibilityEvents( blink::mojom::AXUpdatesAndEventsPtr updates_and_events, - int32_t reset_token, + uint32_t reset_token, blink::mojom::RenderAccessibilityHost::HandleAXEventsCallback callback) { + CHECK(reset_token); GetOrCreateRemoteRenderAccessibilityHost()->HandleAXEvents( std::move(updates_and_events), reset_token, std::move(callback)); }
diff --git a/content/renderer/accessibility/render_accessibility_manager.h b/content/renderer/accessibility/render_accessibility_manager.h index 465d4b51..1c98816 100644 --- a/content/renderer/accessibility/render_accessibility_manager.h +++ b/content/renderer/accessibility/render_accessibility_manager.h
@@ -64,7 +64,7 @@ ui::AXMode GetAccessibilityMode() const; // mojom::RenderAccessibility implementation. - void SetMode(const ui::AXMode& ax_mode) override; + void SetMode(const ui::AXMode& ax_mode, uint32_t reset_token) override; void FatalError() override; void HitTest( const gfx::Point& point, @@ -72,12 +72,12 @@ int request_id, blink::mojom::RenderAccessibility::HitTestCallback callback) override; void PerformAction(const ui::AXActionData& data) override; - void Reset(int32_t reset_token) override; + void Reset(uint32_t reset_token) override; // Communication with the browser process. void HandleAccessibilityEvents( blink::mojom::AXUpdatesAndEventsPtr updates_and_events, - int32_t reset_token, + uint32_t reset_token, blink::mojom::RenderAccessibilityHost::HandleAXEventsCallback callback); void CloseConnection();
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc index eb4fccb..8ebc5a84 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc
@@ -6120,7 +6120,7 @@ } void RenderFrameImpl::SetAccessibilityModeForTest(ui::AXMode new_mode) { - render_accessibility_manager_->SetMode(new_mode); + render_accessibility_manager_->SetMode(new_mode, 1); } const RenderFrameMediaPlaybackOptions&
diff --git a/content/renderer/render_view_browsertest.cc b/content/renderer/render_view_browsertest.cc index cc09e4c..b6e20cd 100644 --- a/content/renderer/render_view_browsertest.cc +++ b/content/renderer/render_view_browsertest.cc
@@ -2618,15 +2618,15 @@ ASSERT_TRUE(GetRenderAccessibilityManager()); ASSERT_FALSE(GetRenderAccessibilityManager()->GetRenderAccessibilityImpl()); - GetRenderAccessibilityManager()->SetMode(ui::kAXModeWebContentsOnly); + GetRenderAccessibilityManager()->SetMode(ui::kAXModeWebContentsOnly, 1); ASSERT_TRUE(GetAccessibilityMode() == ui::kAXModeWebContentsOnly); ASSERT_TRUE(GetRenderAccessibilityManager()->GetRenderAccessibilityImpl()); - GetRenderAccessibilityManager()->SetMode(ui::AXMode::kNone); + GetRenderAccessibilityManager()->SetMode(ui::AXMode::kNone, 0); ASSERT_TRUE(GetAccessibilityMode().is_mode_off()); ASSERT_FALSE(GetRenderAccessibilityManager()->GetRenderAccessibilityImpl()); - GetRenderAccessibilityManager()->SetMode(ui::kAXModeComplete); + GetRenderAccessibilityManager()->SetMode(ui::kAXModeComplete, 1); ASSERT_TRUE(GetAccessibilityMode() == ui::kAXModeComplete); ASSERT_TRUE(GetRenderAccessibilityManager()->GetRenderAccessibilityImpl()); } @@ -2638,7 +2638,7 @@ GetRenderAccessibilityManager()->BindReceiver( remote.BindNewEndpointAndPassReceiver()); - GetRenderAccessibilityManager()->SetMode(ui::kAXModeWebContentsOnly); + GetRenderAccessibilityManager()->SetMode(ui::kAXModeWebContentsOnly, 1); ASSERT_TRUE(GetAccessibilityMode() == ui::kAXModeWebContentsOnly); ASSERT_TRUE(GetRenderAccessibilityManager()->GetRenderAccessibilityImpl());
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 04f13e0..f0dabd6 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
@@ -349,10 +349,8 @@ crbug.com/angleproject/4417 [ win angle-d3d11 ] conformance2/rendering/framebuffer-render-to-layer-angle-issue.html [ Failure ] crbug.com/angleproject/7109 [ win angle-d3d11 ] conformance2/renderbuffers/invalidate-framebuffer.html [ Failure ] - crbug.com/angleproject/1465 [ win angle-d3d11 ] conformance2/glsl3/tricky-loop-conditions.html [ Failure ] - ## Win / NVIDIA ## crbug.com/1073613 [ angle-d3d11 win nvidia-0x2184 ] conformance2/textures/misc/tex-3d-mipmap-levels-intel-bug.html [ Failure ] @@ -381,6 +379,10 @@ # D3D11 / AMD RX 5500 XT / Passthrough command decoder crbug.com/1159539 [ win amd-0x7340 angle-d3d11 passthrough ] deqp/functional/gles3/fborender/recreate_color_* [ RetryOnFailure ] +## Win / Intel ## + +crbug.com/1477274 [ win intel-0x9bc5 angle-d3d11 ] deqp/functional/gles3/texturefiltering/cube_formats_03.html [ RetryOnFailure ] + ###################### # Mac Metal failures # ######################
diff --git a/content/web_test/browser/web_test_control_host.cc b/content/web_test/browser/web_test_control_host.cc index 9545edb6..60bc5866 100644 --- a/content/web_test/browser/web_test_control_host.cc +++ b/content/web_test/browser/web_test_control_host.cc
@@ -1544,7 +1544,7 @@ bool IsRunning(gfx::NativeWindow owning_window) const override { return false; } - void ListenerDestroyed() override {} + void ListenerDestroyed() override { listener_ = nullptr; } bool HasMultipleFileTypeChoicesImpl() override { return false; } private:
diff --git a/device/fido/features.cc b/device/fido/features.cc index 265a40dc..65ee0ee 100644 --- a/device/fido/features.cc +++ b/device/fido/features.cc
@@ -202,4 +202,9 @@ "WebAuthenticationSortRecognizedCredentials", base::FEATURE_ENABLED_BY_DEFAULT); +// Enabled in M118. Remove in or after M121. +BASE_FEATURE(kWebAuthnRequireUIForComplexDiscoveries, + "WebAuthenticationRequestUIForComplexDiscoveries", + base::FEATURE_ENABLED_BY_DEFAULT); + } // namespace device
diff --git a/device/fido/features.h b/device/fido/features.h index aa8c45442..6748b50 100644 --- a/device/fido/features.h +++ b/device/fido/features.h
@@ -159,6 +159,11 @@ COMPONENT_EXPORT(DEVICE_FIDO) BASE_DECLARE_FEATURE(kWebAuthnSortRecognizedCredentials); +// Don't configure discoveries like caBLE, iCloud Keychain, and the enclave, +// if the WebAuthn UI is disabled. +COMPONENT_EXPORT(DEVICE_FIDO) +BASE_DECLARE_FEATURE(kWebAuthnRequireUIForComplexDiscoveries); + } // namespace device #endif // DEVICE_FIDO_FEATURES_H_
diff --git a/device/fido/fido_discovery_factory.cc b/device/fido/fido_discovery_factory.cc index 283868d1..ef31d42c 100644 --- a/device/fido/fido_discovery_factory.cc +++ b/device/fido/fido_discovery_factory.cc
@@ -228,7 +228,7 @@ *mac_touch_id_config_)); } if (base::FeatureList::IsEnabled(kWebAuthnICloudKeychain) && - fido::icloud_keychain::IsSupported()) { + fido::icloud_keychain::IsSupported() && nswindow_ != 0) { ret.emplace_back(fido::icloud_keychain::NewDiscovery(nswindow_)); } return ret;
diff --git a/device/fido/mac/icloud_keychain.mm b/device/fido/mac/icloud_keychain.mm index 5217e26..40322c368 100644 --- a/device/fido/mac/icloud_keychain.mm +++ b/device/fido/mac/icloud_keychain.mm
@@ -10,6 +10,7 @@ #include "base/functional/bind.h" #include "base/functional/callback.h" #include "base/memory/scoped_refptr.h" +#include "base/metrics/histogram_functions.h" #include "base/notreached.h" #include "base/ranges/algorithm.h" #include "base/strings/string_number_conversions.h" @@ -57,6 +58,22 @@ return options; } +// This enum is used in a histogram. Never change assigned values and only add +// new entries at the end. +enum class PasskeyPermissionMetric { + kRequestedDuringCreate = 0, + kApprovedDuringCreate = 1, + kDeniedDuringCreate = 2, + + kRequestedDuringGet = 3, + kApprovedDuringGet = 4, + kDeniedDuringGet = 5, + + kMaxValue = 5, +}; + +constexpr char kMetricName[] = "WebAuthentication.MacOS.PasskeyPermission"; + class API_AVAILABLE(macos(13.3)) Authenticator : public FidoAuthenticator { public: explicit Authenticator(NSWindow* window) : window_(window) {} @@ -83,9 +100,12 @@ switch (sys_interface->GetAuthState()) { case SystemInterface::kAuthNotAuthorized: FIDO_LOG(DEBUG) << "iCKC: requesting permission"; - sys_interface->AuthorizeAndContinue(base::BindOnce( - &SystemInterface::MakeCredential, sys_interface, window_, - std::move(request), std::move(continuation))); + base::UmaHistogramEnumeration( + kMetricName, PasskeyPermissionMetric::kRequestedDuringCreate); + sys_interface->AuthorizeAndContinue( + base::BindOnce(&Authenticator::MakeCredentialAfterPermissionRequest, + weak_factory_.GetWeakPtr(), std::move(request), + std::move(continuation))); break; case SystemInterface::kAuthDenied: // The operation continues even if the user denied access. See above. @@ -98,6 +118,23 @@ } } + void MakeCredentialAfterPermissionRequest( + CtapMakeCredentialRequest request, + base::OnceCallback<void(ASAuthorization* authorization, NSError* error)> + continuation) { + scoped_refptr<SystemInterface> sys_interface = GetSystemInterface(); + if (sys_interface->GetAuthState() != SystemInterface::kAuthAuthorized) { + base::UmaHistogramEnumeration( + kMetricName, PasskeyPermissionMetric::kDeniedDuringCreate); + } else { + base::UmaHistogramEnumeration( + kMetricName, PasskeyPermissionMetric::kApprovedDuringCreate); + } + + sys_interface->MakeCredential(window_, std::move(request), + std::move(continuation)); + } + void GetAssertion(CtapGetAssertionRequest request, CtapGetAssertionOptions options, GetAssertionCallback callback) override { @@ -109,6 +146,8 @@ switch (sys_interface->GetAuthState()) { case SystemInterface::kAuthNotAuthorized: FIDO_LOG(DEBUG) << "iCKC: requesting permission"; + base::UmaHistogramEnumeration( + kMetricName, PasskeyPermissionMetric::kRequestedDuringGet); sys_interface->AuthorizeAndContinue( base::BindOnce(&Authenticator::GetAssertionAfterPermissionRequest, weak_factory_.GetWeakPtr(), std::move(request), @@ -144,10 +183,15 @@ scoped_refptr<SystemInterface> sys_interface = GetSystemInterface(); if (sys_interface->GetAuthState() != SystemInterface::kAuthAuthorized) { + base::UmaHistogramEnumeration("WebAuthentication.MacOS.PasskeyPermission", + PasskeyPermissionMetric::kDeniedDuringGet); GetAssertionCall(std::move(request), std::move(callback)); return; } + base::UmaHistogramEnumeration("WebAuthentication.MacOS.PasskeyPermission", + PasskeyPermissionMetric::kApprovedDuringGet); + scoped_refptr<base::SequencedTaskRunner> origin_task_runner = base::SequencedTaskRunner::GetCurrentDefault(); const std::string rp_id = request.rp_id;
diff --git a/device/fido/mac/icloud_keychain_unittest.mm b/device/fido/mac/icloud_keychain_unittest.mm index f014d77..43f1a277 100644 --- a/device/fido/mac/icloud_keychain_unittest.mm +++ b/device/fido/mac/icloud_keychain_unittest.mm
@@ -6,6 +6,9 @@ #include "base/logging.h" #include "base/memory/raw_ptr.h" +#include "base/metrics/histogram_base.h" +#include "base/metrics/histogram_samples.h" +#include "base/metrics/statistics_recorder.h" #include "base/ranges/algorithm.h" #include "base/test/task_environment.h" #include "device/fido/discoverable_credential_metadata.h" @@ -21,6 +24,8 @@ namespace { +constexpr char kMetricName[] = "WebAuthentication.MacOS.PasskeyPermission"; + static const uint8_t kAttestationObjectBytes[] = { 0xa3, 0x63, 0x66, 0x6d, 0x74, 0x66, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x67, 0x61, 0x74, 0x74, 0x53, 0x74, 0x6d, 0x74, 0xa3, 0x63, 0x61, 0x6c, @@ -332,6 +337,42 @@ FidoTransportProtocol::kInternal)); EXPECT_EQ(response.transport_used, FidoTransportProtocol::kInternal); } + + { + std::unique_ptr<base::StatisticsRecorder> stats_recorder = + base::StatisticsRecorder::CreateTemporaryForTesting(); + + fake_->set_auth_state(FakeSystemInterface::kAuthNotAuthorized); + fake_->set_next_auth_state(FakeSystemInterface::kAuthDenied); + fake_->SetMakeCredentialResult(kAttestationObjectBytes, kCredentialID); + make_credential(); + + base::HistogramBase* histogram = + base::StatisticsRecorder::FindHistogram(kMetricName); + std::unique_ptr<base::HistogramSamples> samples( + histogram->SnapshotSamples()); + EXPECT_EQ(samples->GetCount(0), 1); + EXPECT_EQ(samples->GetCount(1), 0); + EXPECT_EQ(samples->GetCount(2), 1); + } + + { + std::unique_ptr<base::StatisticsRecorder> stats_recorder = + base::StatisticsRecorder::CreateTemporaryForTesting(); + + fake_->set_auth_state(FakeSystemInterface::kAuthNotAuthorized); + fake_->set_next_auth_state(FakeSystemInterface::kAuthAuthorized); + fake_->SetMakeCredentialResult(kAttestationObjectBytes, kCredentialID); + make_credential(); + + base::HistogramBase* histogram = + base::StatisticsRecorder::FindHistogram(kMetricName); + std::unique_ptr<base::HistogramSamples> samples( + histogram->SnapshotSamples()); + EXPECT_EQ(samples->GetCount(0), 1); + EXPECT_EQ(samples->GetCount(1), 1); + EXPECT_EQ(samples->GetCount(2), 0); + } } } @@ -424,6 +465,44 @@ EXPECT_EQ(std::get<0>(result), CtapDeviceResponseCode::kSuccess); } + { + std::unique_ptr<base::StatisticsRecorder> stats_recorder = + base::StatisticsRecorder::CreateTemporaryForTesting(); + + fake_->set_auth_state(FakeSystemInterface::kAuthNotAuthorized); + fake_->set_next_auth_state(FakeSystemInterface::kAuthDenied); + fake_->SetGetAssertionResult(kAuthenticatorData, kSignature, kUserID, + kCredentialID); + get_assertion(); + + base::HistogramBase* histogram = + base::StatisticsRecorder::FindHistogram(kMetricName); + std::unique_ptr<base::HistogramSamples> samples( + histogram->SnapshotSamples()); + EXPECT_EQ(samples->GetCount(3), 1); + EXPECT_EQ(samples->GetCount(4), 0); + EXPECT_EQ(samples->GetCount(5), 1); + } + + { + std::unique_ptr<base::StatisticsRecorder> stats_recorder = + base::StatisticsRecorder::CreateTemporaryForTesting(); + + fake_->set_auth_state(FakeSystemInterface::kAuthNotAuthorized); + fake_->set_next_auth_state(FakeSystemInterface::kAuthAuthorized); + fake_->SetGetAssertionResult(kAuthenticatorData, kSignature, kUserID, + kCredentialID); + get_assertion(); + + base::HistogramBase* histogram = + base::StatisticsRecorder::FindHistogram(kMetricName); + std::unique_ptr<base::HistogramSamples> samples( + histogram->SnapshotSamples()); + EXPECT_EQ(samples->GetCount(3), 1); + EXPECT_EQ(samples->GetCount(4), 1); + EXPECT_EQ(samples->GetCount(5), 0); + } + // `Authenticator` does special processing if a permission is requested // during a get() request. If permission is granted, it will check whether // the request makes sense.
diff --git a/docs/testing/web_test_expectations.md b/docs/testing/web_test_expectations.md index cffd5a7..bca7b48 100644 --- a/docs/testing/web_test_expectations.md +++ b/docs/testing/web_test_expectations.md
@@ -131,9 +131,6 @@ considered. * You can also explicitly pass a list of test names, and then just those tests will be rebaselined. -* If some of the try jobs failed to run, and you wish to continue rebaselining - assuming that there are no platform-specific results for those platforms, - you can add the flag `--fill-missing`. * By default, it finds the try jobs by looking at the latest patchset. If you have finished try jobs that are associated with an earlier patchset and you want to use them instead of scheduling new try jobs, you can add the flag
diff --git a/gpu/command_buffer/service/dawn_context_provider.cc b/gpu/command_buffer/service/dawn_context_provider.cc index e061a69b..d67f1db0 100644 --- a/gpu/command_buffer/service/dawn_context_provider.cc +++ b/gpu/command_buffer/service/dawn_context_provider.cc
@@ -8,6 +8,7 @@ #include <vector> #include "base/check_op.h" +#include "base/command_line.h" #include "base/logging.h" #include "base/memory/ptr_util.h" #include "base/notreached.h" @@ -19,6 +20,7 @@ #include "gpu/command_buffer/service/dawn_platform.h" #include "gpu/config/gpu_finch_features.h" #include "gpu/config/gpu_preferences.h" +#include "gpu/config/gpu_switches.h" #include "third_party/skia/include/gpu/graphite/Context.h" #include "third_party/skia/include/gpu/graphite/dawn/DawnBackendContext.h" #include "third_party/skia/include/gpu/graphite/dawn/DawnUtils.h" @@ -43,10 +45,9 @@ void LogDeviceLost(WGPUDeviceLostReason reason, char const* message, void* userdata) { - if (reason == WGPUDeviceLostReason::WGPUDeviceLostReason_Destroyed) { - return; + if (reason != WGPUDeviceLostReason_Destroyed) { + LOG(FATAL) << message; } - LOG(FATAL) << message; } class Platform : public webgpu::DawnPlatform { @@ -102,8 +103,8 @@ webgpu::DawnCachingInterfaceFactory* caching_interface_factory, CacheBlobCallback callback) { return DawnContextProvider::CreateWithBackend( - GetDefaultBackendType(), /*force_fallback_adapter=*/false, - gpu_preferences, caching_interface_factory, std::move(callback)); + GetDefaultBackendType(), DefaultForceFallbackAdapter(), gpu_preferences, + caching_interface_factory, std::move(callback)); } std::unique_ptr<DawnContextProvider> DawnContextProvider::CreateWithBackend( @@ -127,6 +128,19 @@ } // static wgpu::BackendType DawnContextProvider::GetDefaultBackendType() { + const auto switch_value = + base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( + switches::kSkiaGraphiteBackend); + if (switch_value == switches::kSkiaGraphiteBackendDawnD3D11) { + return wgpu::BackendType::D3D11; + } else if (switch_value == switches::kSkiaGraphiteBackendDawnD3D12) { + return wgpu::BackendType::D3D12; + } else if (switch_value == switches::kSkiaGraphiteBackendDawnMetal) { + return wgpu::BackendType::Metal; + } else if (switch_value == switches::kSkiaGraphiteBackendDawnSwiftshader || + switch_value == switches::kSkiaGraphiteBackendDawnVulkan) { + return wgpu::BackendType::Vulkan; + } #if BUILDFLAG(IS_WIN) return base::FeatureList::IsEnabled(features::kSkiaGraphiteDawnUseD3D12) ? wgpu::BackendType::D3D12 @@ -141,6 +155,13 @@ #endif } +// static +bool DawnContextProvider::DefaultForceFallbackAdapter() { + return base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( + switches::kSkiaGraphiteBackend) == + switches::kSkiaGraphiteBackendDawnSwiftshader; +} + DawnContextProvider::DawnContextProvider( webgpu::DawnCachingInterfaceFactory* caching_interface_factory) : caching_interface_factory_(caching_interface_factory) {}
diff --git a/gpu/command_buffer/service/dawn_context_provider.h b/gpu/command_buffer/service/dawn_context_provider.h index 8a97d3ca..5c3931f8 100644 --- a/gpu/command_buffer/service/dawn_context_provider.h +++ b/gpu/command_buffer/service/dawn_context_provider.h
@@ -47,6 +47,7 @@ CacheBlobCallback callback = {}); static wgpu::BackendType GetDefaultBackendType(); + static bool DefaultForceFallbackAdapter(); DawnContextProvider(const DawnContextProvider&) = delete; DawnContextProvider& operator=(const DawnContextProvider&) = delete;
diff --git a/gpu/command_buffer/service/service_utils.cc b/gpu/command_buffer/service/service_utils.cc index 8eb5edb..f512b92c 100644 --- a/gpu/command_buffer/service/service_utils.cc +++ b/gpu/command_buffer/service/service_utils.cc
@@ -221,7 +221,8 @@ [[maybe_unused]] auto value = command_line->GetSwitchValueASCII(switches::kSkiaGraphiteBackend); #if BUILDFLAG(SKIA_USE_DAWN) - if (value.empty() || value == switches::kSkiaGraphiteBackendDawn) { + if (value.empty() || + base::StartsWith(value, switches::kSkiaGraphiteBackendDawn)) { return GrContextType::kGraphiteDawn; } #endif // BUILDFLAG(SKIA_USE_DAWN)
diff --git a/gpu/command_buffer/service/shared_image/iosurface_image_backing_factory_unittest.cc b/gpu/command_buffer/service/shared_image/iosurface_image_backing_factory_unittest.cc index 62b782b..3a693e88 100644 --- a/gpu/command_buffer/service/shared_image/iosurface_image_backing_factory_unittest.cc +++ b/gpu/command_buffer/service/shared_image/iosurface_image_backing_factory_unittest.cc
@@ -659,6 +659,10 @@ wgpu::BackendType GetDawnBackendType() const override { return std::get<1>(GetParam()).dawn_backend_type; } + + bool DawnForceFallbackAdapter() const override { + return GetDawnBackendType() == wgpu::BackendType::Vulkan; + } #endif protected:
diff --git a/gpu/command_buffer/service/shared_image/shared_image_test_base.cc b/gpu/command_buffer/service/shared_image/shared_image_test_base.cc index b80c2bf9..84cc26f 100644 --- a/gpu/command_buffer/service/shared_image/shared_image_test_base.cc +++ b/gpu/command_buffer/service/shared_image/shared_image_test_base.cc
@@ -151,8 +151,8 @@ if (context_type == GrContextType::kGraphiteDawn) { #if BUILDFLAG(SKIA_USE_DAWN) - dawn_context_provider_ = - DawnContextProvider::CreateWithBackend(GetDawnBackendType()); + dawn_context_provider_ = DawnContextProvider::CreateWithBackend( + GetDawnBackendType(), DawnForceFallbackAdapter()); ASSERT_TRUE(dawn_context_provider_); #else FAIL() << "Graphite-Dawn not available"; @@ -330,6 +330,10 @@ wgpu::BackendType SharedImageTestBase::GetDawnBackendType() const { return DawnContextProvider::GetDefaultBackendType(); } + +bool SharedImageTestBase::DawnForceFallbackAdapter() const { + return DawnContextProvider::DefaultForceFallbackAdapter(); +} #endif } // namespace gpu
diff --git a/gpu/command_buffer/service/shared_image/shared_image_test_base.h b/gpu/command_buffer/service/shared_image/shared_image_test_base.h index d92fcc66..e3219053 100644 --- a/gpu/command_buffer/service/shared_image/shared_image_test_base.h +++ b/gpu/command_buffer/service/shared_image/shared_image_test_base.h
@@ -84,6 +84,7 @@ // Subclass can customize this method to configure a specific Dawn backend // when InitializeContext() virtual wgpu::BackendType GetDawnBackendType() const; + virtual bool DawnForceFallbackAdapter() const; std::unique_ptr<DawnContextProvider> dawn_context_provider_; #endif
diff --git a/gpu/config/gpu_switches.cc b/gpu/config/gpu_switches.cc index 2ec6ab786..0a07ea8f7 100644 --- a/gpu/config/gpu_switches.cc +++ b/gpu/config/gpu_switches.cc
@@ -137,6 +137,11 @@ // (only allowed on non-official developer builds). const char kSkiaGraphiteBackend[] = "skia-graphite-backend"; const char kSkiaGraphiteBackendDawn[] = "dawn"; +const char kSkiaGraphiteBackendDawnD3D11[] = "dawn-d3d11"; +const char kSkiaGraphiteBackendDawnD3D12[] = "dawn-d3d12"; +const char kSkiaGraphiteBackendDawnMetal[] = "dawn-metal"; +const char kSkiaGraphiteBackendDawnSwiftshader[] = "dawn-swiftshader"; +const char kSkiaGraphiteBackendDawnVulkan[] = "dawn-vulkan"; const char kSkiaGraphiteBackendMetal[] = "metal"; } // namespace switches
diff --git a/gpu/config/gpu_switches.h b/gpu/config/gpu_switches.h index 72e6c21..be4fa7cf 100644 --- a/gpu/config/gpu_switches.h +++ b/gpu/config/gpu_switches.h
@@ -44,6 +44,11 @@ GPU_EXPORT extern const char kForceSeparateEGLDisplayForWebGLTesting[]; GPU_EXPORT extern const char kSkiaGraphiteBackend[]; GPU_EXPORT extern const char kSkiaGraphiteBackendDawn[]; +GPU_EXPORT extern const char kSkiaGraphiteBackendDawnD3D11[]; +GPU_EXPORT extern const char kSkiaGraphiteBackendDawnD3D12[]; +GPU_EXPORT extern const char kSkiaGraphiteBackendDawnMetal[]; +GPU_EXPORT extern const char kSkiaGraphiteBackendDawnSwiftshader[]; +GPU_EXPORT extern const char kSkiaGraphiteBackendDawnVulkan[]; GPU_EXPORT extern const char kSkiaGraphiteBackendMetal[]; } // namespace switches
diff --git a/gpu/config/gpu_util.cc b/gpu/config/gpu_util.cc index 82528e1b..87e0039 100644 --- a/gpu/config/gpu_util.cc +++ b/gpu/config/gpu_util.cc
@@ -296,11 +296,7 @@ GpuFeatureStatus GetSkiaGraphiteFeatureStatus( const std::set<int>& blocklisted_features, - const GpuPreferences& gpu_preferences, - bool use_swift_shader) { - if (use_swift_shader) { - return kGpuFeatureStatusDisabled; - } + const GpuPreferences& gpu_preferences) { if (blocklisted_features.count(GPU_FEATURE_TYPE_SKIA_GRAPHITE)) { return kGpuFeatureStatusDisabled; } @@ -629,8 +625,7 @@ gpu_feature_info.status_values[GPU_FEATURE_TYPE_VULKAN] = GetVulkanFeatureStatus(blocklisted_features, gpu_preferences); gpu_feature_info.status_values[GPU_FEATURE_TYPE_SKIA_GRAPHITE] = - GetSkiaGraphiteFeatureStatus(blocklisted_features, gpu_preferences, - use_swift_shader); + GetSkiaGraphiteFeatureStatus(blocklisted_features, gpu_preferences); #if DCHECK_IS_ON() for (int ii = 0; ii < NUMBER_OF_GPU_FEATURE_TYPES; ++ii) { DCHECK_NE(kGpuFeatureStatusUndefined, gpu_feature_info.status_values[ii]);
diff --git a/gpu/ipc/service/BUILD.gn b/gpu/ipc/service/BUILD.gn index 550cf60..090bbd6 100644 --- a/gpu/ipc/service/BUILD.gn +++ b/gpu/ipc/service/BUILD.gn
@@ -119,11 +119,7 @@ "built_in_shader_cache_loader.h", "built_in_shader_cache_writer.cc", "built_in_shader_cache_writer.h", - "gpu_vsync_mac.h", - "gpu_vsync_mac.mm", "image_transport_surface_mac.mm", - "timer_based_vsync_mac.h", - "timer_based_vsync_mac.mm", ] deps += [ "//ui/accelerated_widget_mac",
diff --git a/gpu/ipc/service/gpu_vsync_mac.h b/gpu/ipc/service/gpu_vsync_mac.h deleted file mode 100644 index c0c1b0e..0000000 --- a/gpu/ipc/service/gpu_vsync_mac.h +++ /dev/null
@@ -1,60 +0,0 @@ -// Copyright 2023 The Chromium Authors -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef GPU_IPC_SERVICE_GPU_VSYNC_MAC_H_ -#define GPU_IPC_SERVICE_GPU_VSYNC_MAC_H_ - -#include "base/memory/scoped_refptr.h" -#include "base/task/single_thread_task_runner.h" -#include "base/time/time.h" -#include "components/viz/common/gpu/gpu_vsync_callback.h" -#include "gpu/ipc/service/timer_based_vsync_mac.h" -#include "ui/display/mac/display_link_mac.h" -#include "ui/display/types/display_constants.h" - -namespace gpu { - -// Each ImageTransportSurfaceOverlayMacEGL creates a GpuVSyncMac, -class GpuVSyncMac { - public: - explicit GpuVSyncMac(viz::GpuVSyncCallback vsync_callback); - ~GpuVSyncMac(); - - void SetVSyncDisplayID(int64_t display_id); - void SetGpuVSyncEnabled(bool enabled); - - private: - // Register a DisplayLinkMac callback. If it fails, the timer will be used - // instead. - void OnDisplayLinkCallback(ui::VSyncParamsMac params); - - void AddGpuVSyncCallback(); - void RemoveGpuVSyncCallback(); - - // This is the Viz callback for BeginFrame. - const viz::GpuVSyncCallback vsync_callback_; - - // The timer works as GpuVsync when CVDisplayLink fails. - raw_ptr<TimerBasedVsyncMac> timer_based_vsync_mac_; - - // CGDirectDisplayID of the current monitor used for Creating CVDisplayLink. - int64_t display_id_ = display::kInvalidDisplayId; - - // The default frame rate is 60 Hz (16 ms). - base::TimeDelta nominal_refresh_period_ = base::Hertz(60); - - // Start GpuVsync. Vis enables it when BeginFrame is needed. - bool gpu_vsync_enabled_ = false; - - scoped_refptr<ui::DisplayLinkMac> display_link_mac_; - - // CVDisplayLink callback. |vsync_callback_mac_| calls the viz callback runner - // that will runs on the viz thread. - std::unique_ptr<ui::VSyncCallbackMac> vsync_callback_mac_; - - base::WeakPtrFactory<GpuVSyncMac> weak_ptr_factory_{this}; -}; -} // namespace gpu - -#endif // GPU_IPC_SERVICE_GPU_VSYNC_MAC_H_
diff --git a/gpu/ipc/service/gpu_vsync_mac.mm b/gpu/ipc/service/gpu_vsync_mac.mm deleted file mode 100644 index 4dc95985..0000000 --- a/gpu/ipc/service/gpu_vsync_mac.mm +++ /dev/null
@@ -1,147 +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 "gpu/ipc/service/gpu_vsync_mac.h" - -#include "base/feature_list.h" -#include "base/functional/bind.h" -#include "base/logging.h" - -namespace gpu { -namespace { -BASE_FEATURE(kForceGpuVSyncTimerForDebugging, - "ForceGpuVSyncTimerForDebugging", - base::FEATURE_DISABLED_BY_DEFAULT); -} // namespace - -GpuVSyncMac::GpuVSyncMac(viz::GpuVSyncCallback vsync_callback) - : vsync_callback_(vsync_callback) {} - -GpuVSyncMac::~GpuVSyncMac() { - if (display_link_mac_) { - vsync_callback_mac_ = nullptr; - display_link_mac_ = nullptr; - } else { - timer_based_vsync_mac_->RemoveVSyncTimerCallback(vsync_callback_); - } -} - -void GpuVSyncMac::SetVSyncDisplayID(int64_t display_id) { - if (display_id == display::kInvalidDisplayId) { - timer_based_vsync_mac_ = TimerBasedVsyncMac::GetInstance(); - DLOG(ERROR) << "GpuVSyncMac: DisplayLink Display ID is not available. " - "Switch to timer for GpuVSync."; - } - - if (display_id_ == display_id) { - return; - } - - // Remove callback from Timer if Timer is used. - if (!display_link_mac_ && gpu_vsync_enabled_) { - timer_based_vsync_mac_->RemoveVSyncTimerCallback(vsync_callback_); - } - - // Remove and unregister the old VSyncCallbackMac. - vsync_callback_mac_ = nullptr; - - // Remove the old DisplayLinkMac. - display_link_mac_ = nullptr; - display_id_ = display_id; - - // Get DisplayLinkMac with the new CGDirectDisplayID. - display_link_mac_ = ui::DisplayLinkMac::GetForDisplay( - base::checked_cast<CGDirectDisplayID>(display_id)); - - // For debugging only. - static const bool force_timer = - base::FeatureList::IsEnabled(kForceGpuVSyncTimerForDebugging); - if (force_timer) { - display_link_mac_ = nullptr; - } - - if (display_link_mac_) { - nominal_refresh_period_ = - base::Seconds(1) / display_link_mac_->GetRefreshRate(); - } else { - LOG(ERROR) << "Fail to create DisplayLinkMac for DisplayID: " << display_id - << ". Use timer for GpuVSync"; - timer_based_vsync_mac_ = TimerBasedVsyncMac::GetInstance(); - } - - if (gpu_vsync_enabled_) { - AddGpuVSyncCallback(); - } -} - -void GpuVSyncMac::SetGpuVSyncEnabled(bool enabled) { - if (gpu_vsync_enabled_ == enabled) { - return; - } - gpu_vsync_enabled_ = enabled; - - if (enabled) { - AddGpuVSyncCallback(); - } else { - RemoveGpuVSyncCallback(); - } -} - -void GpuVSyncMac::AddGpuVSyncCallback() { - if (display_link_mac_) { - DCHECK(!vsync_callback_mac_); - // Request the callback to be called on the high-priority system - // VCDisplayLink thread. - vsync_callback_mac_ = display_link_mac_->RegisterCallback( - base::BindRepeating(&GpuVSyncMac::OnDisplayLinkCallback, - weak_ptr_factory_.GetWeakPtr()), - /*do_callback_on_register_thread=*/false); - if (vsync_callback_mac_) { - // RegisterCallback succeeded. - return; - } else { - // Failed. Destroy DisplayLinkMac and switch to timer. - display_link_mac_ = nullptr; - LOG(ERROR) << "Fail to start CVDisplayLink callback for DisplayID: " - << display_id_ << ". Switch to timer for GpuVSync"; - - timer_based_vsync_mac_ = TimerBasedVsyncMac::GetInstance(); - } - } - - // Use timer. - timer_based_vsync_mac_->AddVSyncTimerCallback(vsync_callback_); -} - -void GpuVSyncMac::RemoveGpuVSyncCallback() { - if (display_link_mac_) { - DCHECK(vsync_callback_mac_); - // Remove and unregister VSyncCallbackMac. - vsync_callback_mac_ = nullptr; - return; - } - // The timer is in use. - timer_based_vsync_mac_->RemoveVSyncTimerCallback(vsync_callback_); -} - -// Called on a high priority CVDisplayLink thread. -void GpuVSyncMac::OnDisplayLinkCallback(ui::VSyncParamsMac params) { - base::TimeTicks timebase; - base::TimeDelta interval; - - if (params.callback_times_valid) { - DCHECK(params.callback_timebase != base::TimeTicks()); - DCHECK(!params.callback_interval.is_zero()); - timebase = params.callback_timebase; - interval = params.callback_interval; - } else { - // Invalid parameters should be rare. Use default refresh rate. - timebase = base::TimeTicks::Now(); - interval = params.display_times_valid ? params.display_interval - : nominal_refresh_period_; - } - vsync_callback_.Run(timebase, interval); -} - -} // namespace gpu
diff --git a/gpu/ipc/service/image_transport_surface_overlay_mac.h b/gpu/ipc/service/image_transport_surface_overlay_mac.h index 879113fd..655dca3 100644 --- a/gpu/ipc/service/image_transport_surface_overlay_mac.h +++ b/gpu/ipc/service/image_transport_surface_overlay_mac.h
@@ -8,7 +8,6 @@ #include <vector> #include "base/memory/weak_ptr.h" -#include "components/viz/common/gpu/gpu_vsync_callback.h" #include "gpu/ipc/service/command_buffer_stub.h" #include "gpu/ipc/service/image_transport_surface.h" #include "ui/gfx/ca_layer_result.h" @@ -17,12 +16,9 @@ #include "ui/gl/gl_surface.h" #include "ui/gl/presenter.h" -// Put gpu_vsync_mac.h (which includes ui/display/mac/display_link_mac.h) -// after ui/gl/gl_xxx.h. There is a conflict between macOS sdk gltypes.h and -// third_party/mesa_headers/GL/glext.h +// Put ui/display/mac/display_link_mac.h after ui/gl/gl_xxx.h. There is a +// conflict between macOS sdk gltypes.h and third_party/mesa_headers/GL/glext.h. #if BUILDFLAG(IS_MAC) -#include "gpu/ipc/service/gpu_vsync_mac.h" - #include "ui/display/mac/display_link_mac.h" #include "ui/display/types/display_constants.h" #endif
diff --git a/gpu/ipc/service/timer_based_vsync_mac.h b/gpu/ipc/service/timer_based_vsync_mac.h deleted file mode 100644 index 0359d263..0000000 --- a/gpu/ipc/service/timer_based_vsync_mac.h +++ /dev/null
@@ -1,74 +0,0 @@ -// Copyright 2023 The Chromium Authors -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef GPU_IPC_SERVICE_TIMER_BASED_VSYNC_MAC_H_ -#define GPU_IPC_SERVICE_TIMER_BASED_VSYNC_MAC_H_ - -#include <vector> - -#include "base/memory/scoped_refptr.h" -#include "base/power_monitor/power_observer.h" -#include "base/task/single_thread_task_runner.h" -#include "base/time/time.h" -#include "base/timer/timer.h" -#include "components/viz/common/gpu/gpu_vsync_callback.h" - -namespace base { -template <typename T> -struct DefaultSingletonTraits; -} // namespace base - -namespace gpu { -// Created on the GPU main thread. There is only one instance in the GPU -// process. -class TimerBasedVsyncMac : public base::PowerSuspendObserver { - public: - static TimerBasedVsyncMac* GetInstance(); - - TimerBasedVsyncMac(const TimerBasedVsyncMac&) = delete; - TimerBasedVsyncMac& operator=(const TimerBasedVsyncMac&) = delete; - - // Implementation of base::PowerSuspendObserver - void OnSuspend() override; - void OnResume() override; - - // The first and the last function after GpuVSyncThread starts running. - void Init(); - void CleanUp(); - - void AddVSyncTimerCallback(viz::GpuVSyncCallback callback); - void RemoveVSyncTimerCallback(viz::GpuVSyncCallback callback); - - private: - friend struct base::DefaultSingletonTraits<TimerBasedVsyncMac>; - - TimerBasedVsyncMac(); - ~TimerBasedVsyncMac() override; - - // The timer tick for vsync callback. - void OnTimerTick(); - - // True when it is in a power suspension mode. - bool is_suspended_ = false; - - // For delay based timer when VCDisplayLink fails.. - base::RepeatingClosure tick_closure_; - - base::DeadlineTimer timer_; - - // All GpuVSyncMac call - std::vector<viz::GpuVSyncCallback> timer_callbacks_; - - // The default frame rate is 60 Hz (16 ms). - const base::TimeDelta nominal_refresh_period_ = base::Hertz(60); - - base::TimeTicks last_target_; - - scoped_refptr<base::SingleThreadTaskRunner> task_runner_; - SEQUENCE_CHECKER(vsync_thread_sequence_checker_); -}; - -} // namespace gpu - -#endif // GPU_IPC_SERVICE_TIMER_BASED_VSYNC_MAC_H_
diff --git a/gpu/ipc/service/timer_based_vsync_mac.mm b/gpu/ipc/service/timer_based_vsync_mac.mm deleted file mode 100644 index d0f343ba..0000000 --- a/gpu/ipc/service/timer_based_vsync_mac.mm +++ /dev/null
@@ -1,103 +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 "gpu/ipc/service/timer_based_vsync_mac.h" - -#include "base/functional/bind.h" -#include "base/logging.h" -#include "base/memory/singleton.h" -#include "base/power_monitor/power_monitor.h" -#include "base/task/single_thread_task_runner.h" -#include "base/threading/platform_thread.h" - -namespace gpu { - -// static -TimerBasedVsyncMac* TimerBasedVsyncMac::GetInstance() { - return base::Singleton<TimerBasedVsyncMac>::get(); -} - -TimerBasedVsyncMac::TimerBasedVsyncMac() { - // Use delay based timer for GpuVSync when it fails to create DisplayLinkMac. - tick_closure_ = base::BindRepeating(&TimerBasedVsyncMac::OnTimerTick, - base::Unretained(this)); - - timer_.SetTaskRunner(base::SingleThreadTaskRunner::GetCurrentDefault()); - - DCHECK(base::PowerMonitor::IsInitialized()); - is_suspended_ = - base::PowerMonitor::AddPowerSuspendObserverAndReturnSuspendedState(this); -} - -TimerBasedVsyncMac::~TimerBasedVsyncMac() { - if (timer_.IsRunning()) { - timer_.Stop(); - } - timer_callbacks_.clear(); - - base::PowerMonitor::RemovePowerSuspendObserver(this); -} - -void TimerBasedVsyncMac::AddVSyncTimerCallback(viz::GpuVSyncCallback callback) { - timer_callbacks_.push_back(callback); - - if (!is_suspended_ && !timer_.IsRunning()) { - last_target_ = base::TimeTicks::Now() + nominal_refresh_period_; - timer_.Start(FROM_HERE, last_target_, tick_closure_, - base::subtle::DelayPolicy::kPrecise); - } -} - -void TimerBasedVsyncMac::RemoveVSyncTimerCallback( - viz::GpuVSyncCallback callback) { - auto timer_it = base::ranges::find(timer_callbacks_, callback); - if (timer_it != timer_callbacks_.end()) { - timer_callbacks_.erase(timer_it); - } - - if (timer_callbacks_.empty() && timer_.IsRunning()) { - timer_.Stop(); - } -} - -// Timer will not stop automatically in power suspension. -void TimerBasedVsyncMac::OnSuspend() { - if (is_suspended_) { - return; - } - is_suspended_ = true; - - if (timer_.IsRunning()) { - DCHECK(!timer_callbacks_.empty()); - timer_.Stop(); - } -} - -void TimerBasedVsyncMac::OnResume() { - if (!is_suspended_) { - return; - } - is_suspended_ = false; - - if (!timer_callbacks_.empty()) { - last_target_ = base::TimeTicks::Now() + nominal_refresh_period_; - timer_.Start(FROM_HERE, last_target_, tick_closure_, - base::subtle::DelayPolicy::kPrecise); - } -} - -void TimerBasedVsyncMac::OnTimerTick() { - base::TimeTicks now = base::TimeTicks::Now(); - for (auto& callback : timer_callbacks_) { - callback.Run(now, nominal_refresh_period_); - } - - base::TimeTicks next_target = now + nominal_refresh_period_; - - timer_.Start(FROM_HERE, next_target, tick_closure_, - base::subtle::DelayPolicy::kPrecise); - last_target_ = next_target; -} - -} // namespace gpu
diff --git a/headless/app/headless_shell.cc b/headless/app/headless_shell.cc index 35708aab..c13ca80 100644 --- a/headless/app/headless_shell.cc +++ b/headless/app/headless_shell.cc
@@ -171,7 +171,7 @@ static_cast<int>(result)); return; } - browser_->Shutdown(); + Shutdown(); } #endif @@ -182,7 +182,7 @@ } void HeadlessShell::Shutdown() { - browser_->Shutdown(); + browser_.ExtractAsDangling()->Shutdown(); } void HeadlessChildMain(content::ContentMainParams params) {
diff --git a/headless/test/dom_tree_extraction_expected_nodes.txt b/headless/test/dom_tree_extraction_expected_nodes.txt index 22008d96..e97198e 100644 --- a/headless/test/dom_tree_extraction_expected_nodes.txt +++ b/headless/test/dom_tree_extraction_expected_nodes.txt
@@ -182,7 +182,7 @@ "nodeName": "#text", "nodeType": 3, "nodeValue": "Some text.", - "styleIndex": 2 + "styleIndex": 3 } { "backendNodeId": "?", @@ -214,7 +214,7 @@ "nodeName": "IFRAME", "nodeType": 1, "nodeValue": "", - "styleIndex": 3 + "styleIndex": 4 } { "backendNodeId": "?", @@ -250,7 +250,7 @@ "nodeName": "HTML", "nodeType": 1, "nodeValue": "", - "styleIndex": 4 + "styleIndex": 5 } { "backendNodeId": "?", @@ -271,7 +271,7 @@ "nodeName": "BODY", "nodeType": 1, "nodeValue": "", - "styleIndex": 5 + "styleIndex": 6 } { "backendNodeId": "?", @@ -299,7 +299,7 @@ "nodeName": "H1", "nodeType": 1, "nodeValue": "", - "styleIndex": 6 + "styleIndex": 7 } { "backendNodeId": "?", @@ -324,7 +324,7 @@ "nodeName": "#text", "nodeType": 3, "nodeValue": "Hello from the iframe!", - "styleIndex": 6 + "styleIndex": 8 } { "backendNodeId": "?", @@ -440,7 +440,7 @@ "nodeName": "A", "nodeType": 1, "nodeValue": "", - "styleIndex": 7 + "styleIndex": 9 } { "backendNodeId": "?", @@ -465,7 +465,7 @@ "nodeName": "#text", "nodeType": 3, "nodeValue": "Google!", - "styleIndex": 7 + "styleIndex": 9 } { "backendNodeId": "?", @@ -495,7 +495,7 @@ "nodeName": "P", "nodeType": 1, "nodeValue": "", - "styleIndex": 8 + "styleIndex": 10 } { "backendNodeId": "?", @@ -520,7 +520,7 @@ "nodeName": "#text", "nodeType": 3, "nodeValue": "A paragraph!", - "styleIndex": 8 + "styleIndex": 10 } { "backendNodeId": "?", @@ -551,7 +551,7 @@ "nodeName": "BR", "nodeType": 1, "nodeValue": "", - "styleIndex": 3 + "styleIndex": 4 } { "backendNodeId": "?", @@ -576,7 +576,7 @@ "nodeName": "DIV", "nodeType": 1, "nodeValue": "", - "styleIndex": 9 + "styleIndex": 11 } { "backendNodeId": "?", @@ -601,7 +601,7 @@ "nodeName": "#text", "nodeType": 3, "nodeValue": "Some ", - "styleIndex": 9 + "styleIndex": 11 } { "backendNodeId": "?", @@ -616,7 +616,7 @@ "nodeName": "EM", "nodeType": 1, "nodeValue": "", - "styleIndex": 10 + "styleIndex": 12 } { "backendNodeId": "?", @@ -641,7 +641,7 @@ "nodeName": "#text", "nodeType": 3, "nodeValue": "green", - "styleIndex": 10 + "styleIndex": 12 } { "backendNodeId": "?", @@ -666,7 +666,7 @@ "nodeName": "#text", "nodeType": 3, "nodeValue": " text...", - "styleIndex": 9 + "styleIndex": 11 } { "backendNodeId": "?",
diff --git a/headless/test/dom_tree_extraction_expected_styles.txt b/headless/test/dom_tree_extraction_expected_styles.txt index d78ea8c..3926ff62 100644 --- a/headless/test/dom_tree_extraction_expected_styles.txt +++ b/headless/test/dom_tree_extraction_expected_styles.txt
@@ -23,6 +23,16 @@ "display": "block", "font-family": "ahem", "font-style": "normal", + "margin-bottom": "21.4375px", + "margin-left": "0px", + "margin-right": "0px", + "margin-top": "21.4375px" +} +{ + "color": "rgb(255, 0, 0)", + "display": "block", + "font-family": "ahem", + "font-style": "normal", "margin-bottom": "21.44px", "margin-left": "0px", "margin-right": "0px", @@ -63,6 +73,16 @@ "display": "block", "font-family": "SlightHintedTimesNewRoman, \"Times New Roman\"", "font-style": "normal", + "margin-bottom": "21.4375px", + "margin-left": "0px", + "margin-right": "0px", + "margin-top": "21.4375px" +} +{ + "color": "rgb(0, 0, 0)", + "display": "block", + "font-family": "SlightHintedTimesNewRoman, \"Times New Roman\"", + "font-style": "normal", "margin-bottom": "21.44px", "margin-left": "0px", "margin-right": "0px",
diff --git a/ios/chrome/app/application_delegate/user_activity_handler.mm b/ios/chrome/app/application_delegate/user_activity_handler.mm index 1d812cab..c4577db8 100644 --- a/ios/chrome/app/application_delegate/user_activity_handler.mm +++ b/ios/chrome/app/application_delegate/user_activity_handler.mm
@@ -65,6 +65,7 @@ NSString* const kSiriOpenBookmarks = @"OpenBookmarksIntent"; NSString* const kSiriOpenRecentTabs = @"OpenRecentTabsIntent"; NSString* const kSiriOpenTabGrid = @"OpenTabGridIntent"; +NSString* const kSiriVoiceSearch = @"SearchWithVoiceIntent"; // Constants for compatible mode for user activities. NSString* const kRegularMode = @"RegularMode"; @@ -319,6 +320,10 @@ [connectionInformation setStartupParameters: [self startupParametersForOpeningNewTabWithAction:OPEN_TAB_GRID]]; + } else if ([userActivity.activityType isEqualToString:kSiriVoiceSearch]) { + [connectionInformation + setStartupParameters:[self startupParametersForOpeningNewTabWithAction: + START_VOICE_SEARCH]]; } else { // Do nothing for unknown activity type. return NO;
diff --git a/ios/chrome/app/application_delegate/user_activity_handler_unittest.mm b/ios/chrome/app/application_delegate/user_activity_handler_unittest.mm index bc5b28b..605693c 100644 --- a/ios/chrome/app/application_delegate/user_activity_handler_unittest.mm +++ b/ios/chrome/app/application_delegate/user_activity_handler_unittest.mm
@@ -43,6 +43,7 @@ #import "ios/chrome/common/intents/OpenReadingListIntent.h" #import "ios/chrome/common/intents/OpenRecentTabsIntent.h" #import "ios/chrome/common/intents/OpenTabGridIntent.h" +#import "ios/chrome/common/intents/SearchWithVoiceIntent.h" #import "ios/testing/scoped_block_swizzler.h" #import "ios/web/public/test/fakes/fake_web_state.h" #import "net/base/mac/url_conversions.h" @@ -990,3 +991,33 @@ EXPECT_EQ(OPEN_TAB_GRID, [connectionInformationMock startupParameters].postOpeningAction); } + +// Tests that Chrome respond to search with voice intent. +TEST_F(UserActivityHandlerTest, ContinueUserActivityIntentSearchWithVoice) { + NSUserActivity* userActivity = + [[NSUserActivity alloc] initWithActivityType:@"SearchWithVoiceIntent"]; + + SearchWithVoiceIntent* intent = [[SearchWithVoiceIntent alloc] init]; + + INInteraction* interaction = [[INInteraction alloc] initWithIntent:intent + response:nil]; + + id mock_user_activity = CreateMockNSUserActivity(userActivity, interaction); + + FakeStartupInformation* fakeStartupInformation = + [[FakeStartupInformation alloc] init]; + FakeConnectionInformation* connectionInformationMock = + [[FakeConnectionInformation alloc] init]; + MockTabOpener* tabOpener = [[MockTabOpener alloc] init]; + + [UserActivityHandler continueUserActivity:mock_user_activity + applicationIsActive:YES + tabOpener:tabOpener + connectionInformation:connectionInformationMock + startupInformation:fakeStartupInformation + browserState:nullptr + initStage:InitStageFinal]; + + EXPECT_EQ(START_VOICE_SEARCH, + [connectionInformationMock startupParameters].postOpeningAction); +}
diff --git a/ios/chrome/app/first_run_app_state_agent.mm b/ios/chrome/app/first_run_app_state_agent.mm index dc116df..6ac907a4 100644 --- a/ios/chrome/app/first_run_app_state_agent.mm +++ b/ios/chrome/app/first_run_app_state_agent.mm
@@ -161,7 +161,8 @@ _firstRunUIBlocker = std::make_unique<ScopedUIBlocker>(self.presentingSceneState); - FirstRunScreenProvider* provider = [[FirstRunScreenProvider alloc] init]; + FirstRunScreenProvider* provider = [[FirstRunScreenProvider alloc] + initForBrowserState:self.mainBrowser->GetBrowserState()]; self.firstRunCoordinator = [[FirstRunCoordinator alloc] initWithBaseViewController:self.presentingInterface.viewController
diff --git a/ios/chrome/app/resources/chrome_localize_strings_config.plist b/ios/chrome/app/resources/chrome_localize_strings_config.plist index 26d146f..d77a1d9 100644 --- a/ios/chrome/app/resources/chrome_localize_strings_config.plist +++ b/ios/chrome/app/resources/chrome_localize_strings_config.plist
@@ -67,6 +67,24 @@ <array> <dict> <key>output</key> + <string>6IUaAa</string> + <key>input</key> + <string>IDS_IOS_INTENTS_SEARCH_WITH_VOICE_TITLE</string> + </dict> + <dict> + <key>output</key> + <string>oq3zlW</string> + <key>input</key> + <string>IDS_IOS_INTENTS_SEARCH_WITH_VOICE_TITLE</string> + </dict> + <dict> + <key>output</key> + <string>7Qq5ww</string> + <key>input</key> + <string>IDS_IOS_INTENTS_SEARCH_WITH_VOICE_TITLE</string> + </dict> + <dict> + <key>output</key> <string>hB4zxD</string> <key>input</key> <string>IDS_IOS_INTENTS_OPEN_TAB_GRID_TITLE</string>
diff --git a/ios/chrome/app/strings/ios_chromium_strings.grd b/ios/chrome/app/strings/ios_chromium_strings.grd index ba86e2e2..b08f2f1 100644 --- a/ios/chrome/app/strings/ios_chromium_strings.grd +++ b/ios/chrome/app/strings/ios_chromium_strings.grd
@@ -743,6 +743,9 @@ <message name="IDS_IOS_INTENTS_OPEN_TAB_GRID_DESCRIPTION" desc="Shortcut description to open tab grid in chrome [iOS only]."> Opens the Chromium Tab Grid. </message> + <message name="IDS_IOS_INTENTS_SEARCH_WITH_VOICE_TITLE" desc="Siri Shortcut for search with voice title [iOS only]"> + Search With Voice in Chromium + </message> </messages> </release> </grit>
diff --git a/ios/chrome/app/strings/ios_chromium_strings_grd/IDS_IOS_INTENTS_SEARCH_WITH_VOICE_TITLE.png.sha1 b/ios/chrome/app/strings/ios_chromium_strings_grd/IDS_IOS_INTENTS_SEARCH_WITH_VOICE_TITLE.png.sha1 new file mode 100644 index 0000000..c25d236 --- /dev/null +++ b/ios/chrome/app/strings/ios_chromium_strings_grd/IDS_IOS_INTENTS_SEARCH_WITH_VOICE_TITLE.png.sha1
@@ -0,0 +1 @@ +e5778575aee1d5eedc58a43ec6639f33730cf01e \ No newline at end of file
diff --git a/ios/chrome/app/strings/ios_google_chrome_strings.grd b/ios/chrome/app/strings/ios_google_chrome_strings.grd index c3b9a10..d7b99cf 100644 --- a/ios/chrome/app/strings/ios_google_chrome_strings.grd +++ b/ios/chrome/app/strings/ios_google_chrome_strings.grd
@@ -201,9 +201,6 @@ Chrome has features that help you manage your internet data and how quickly you're able to load webpages. <ph name="BEGIN_LINK">BEGIN_LINK</ph>Learn more<ph name="END_LINK">END_LINK</ph> </message> - <message name="IDS_IOS_BOTTOM_TOOLBAR_IPH_PROMOTION_VOICE_OVER" desc="Text to be read by VoiceOver when the Bottom Toolbar Tip is presented to the user, explaining that the bottom toolbar can be used to reach some controls. Read by Text-to-Speech. [iOS only]"> - Chrome tip. Some buttons are now at the bottom of your screen, like Back, Forward, and Search. - </message> <message name="IDS_IOS_CLEAR_BROWSING_DATA_FOOTER_SIGN_OUT_EVERY_WEBSITE" desc="Footer message in the settings to clear browsing data that allows user to sign out of Chrome to sign out their Google account from all websites. [iOS only]"> To sign out of your Google Account on all websites, <ph name="BEGIN_LINK">BEGIN_LINK</ph>sign out of Chrome<ph name="END_LINK">END_LINK</ph>. </message> @@ -400,9 +397,6 @@ <message name="IDS_IOS_LOGIN_ERROR_AUTHENTICATING_HOSTED" desc="Couldn't sign in because hosted account is used."> Your account does not work on Google Chrome. Please contact your domain administrator or use a regular Google Account to sign in. </message> - <message name="IDS_IOS_LONG_PRESS_TOOLBAR_IPH_PROMOTION_VOICE_OVER" desc="Text to be read by VoiceOver when the LongPress Toolbar Tip is presented to the user. Read by Text-to-Speech."> - Chrome tip. For more tab options, touch & hold the Show Tabs button in the toolbar, which is at the bottom or top of your screen. - </message> <message name="IDS_IOS_MANAGE_SYNC_DATA_FROM_CHROME_SYNC_TITLE" desc="Title for the cell to open 'Data from Chrome sync' web page where the user can control all their data data from sync."> Data from Chrome sync </message> @@ -749,6 +743,9 @@ <message name="IDS_IOS_INTENTS_OPEN_TAB_GRID_DESCRIPTION" desc="Shortcut description to open tab grid in chrome [iOS only]."> Opens the Chrome Tab Grid. </message> + <message name="IDS_IOS_INTENTS_SEARCH_WITH_VOICE_TITLE" desc="Siri Shortcut for search with voice title [iOS only]"> + Search With Voice in Chrome + </message> </messages> </release> </grit>
diff --git a/ios/chrome/app/strings/ios_google_chrome_strings_grd/IDS_IOS_INTENTS_SEARCH_WITH_VOICE_TITLE.png.sha1 b/ios/chrome/app/strings/ios_google_chrome_strings_grd/IDS_IOS_INTENTS_SEARCH_WITH_VOICE_TITLE.png.sha1 new file mode 100644 index 0000000..c25d236 --- /dev/null +++ b/ios/chrome/app/strings/ios_google_chrome_strings_grd/IDS_IOS_INTENTS_SEARCH_WITH_VOICE_TITLE.png.sha1
@@ -0,0 +1 @@ +e5778575aee1d5eedc58a43ec6639f33730cf01e \ No newline at end of file
diff --git a/ios/chrome/app/strings/ios_strings.grd b/ios/chrome/app/strings/ios_strings.grd index 3b9d0b3..a25a718 100644 --- a/ios/chrome/app/strings/ios_strings.grd +++ b/ios/chrome/app/strings/ios_strings.grd
@@ -1256,6 +1256,24 @@ <message name="IDS_IOS_GOOGLE_SYNC_SETTINGS_TITLE" desc="Title for the view in the Settings for enabling/disabling Sync. [Length: 26em] [iOS only]"> Sync </message> + <message name="IDS_IOS_GOOGLE_ACCOUNT_SETTINGS_BATCH_UPLOAD_BUTTON_ITEM" desc="Title shown on the batch upload button item. [iOS only]"> + Save in Account… + </message> + <message name="IDS_IOS_GOOGLE_ACCOUNT_SETTINGS_BATCH_UPLOAD_PASSWORDS_ITEM" desc="Detailed text shown above the batch upload button item. To explain the details of the local data to the user. [iOS only]"> + {count, plural, + =1 {{count} password is saved only to this device. To use it on your other devices, save it in your Google Account, {email}.} + other {{count} passwords are saved only to this device. To use them on your other devices, save them in your Google Account, {email}.}} + </message> + <message name="IDS_IOS_GOOGLE_ACCOUNT_SETTINGS_BATCH_UPLOAD_ITEMS_ITEM" desc="Detailed text shown above the batch upload button item. To explain the details of the local data to the user. [iOS only]"> + {count, plural, + =1 {{count} item is saved only to this device. To use it on your other devices, save it in your Google Account, {email}.} + other {{count} items are saved only to this device. To use them on your other devices, save them in your Google Account, {email}.}} + </message> + <message name="IDS_IOS_GOOGLE_ACCOUNT_SETTINGS_BATCH_UPLOAD_PASSWORDS_AND_ITEMS_ITEM" desc="Detailed text shown above the batch upload button item. To explain the details of the local data to the user. [iOS only]"> + {count, plural, + =1 {{count} password and other items are saved only to this device. To use them on your other devices, save them in your Google Account, {email}.} + other {{count} passwords and other items are saved only to this device. To use them on your other devices, save them in your Google Account, {email}.}} + </message> <message name="IDS_IOS_GOOGLE_ACCOUNT_SETTINGS_TITLE" desc="Title for the view in the Settings for account features management UI. [iOS only]"> Account </message>
diff --git a/ios/chrome/app/strings/ios_strings_grd/IDS_IOS_GOOGLE_ACCOUNT_SETTINGS_BATCH_UPLOAD_BUTTON_ITEM.png.sha1 b/ios/chrome/app/strings/ios_strings_grd/IDS_IOS_GOOGLE_ACCOUNT_SETTINGS_BATCH_UPLOAD_BUTTON_ITEM.png.sha1 new file mode 100644 index 0000000..a8dc98c --- /dev/null +++ b/ios/chrome/app/strings/ios_strings_grd/IDS_IOS_GOOGLE_ACCOUNT_SETTINGS_BATCH_UPLOAD_BUTTON_ITEM.png.sha1
@@ -0,0 +1 @@ +b4027a97b66c61b0de94a983ade987d8d8114ce4 \ No newline at end of file
diff --git a/ios/chrome/app/strings/ios_strings_grd/IDS_IOS_GOOGLE_ACCOUNT_SETTINGS_BATCH_UPLOAD_ITEMS_ITEM.png.sha1 b/ios/chrome/app/strings/ios_strings_grd/IDS_IOS_GOOGLE_ACCOUNT_SETTINGS_BATCH_UPLOAD_ITEMS_ITEM.png.sha1 new file mode 100644 index 0000000..ed8e46f --- /dev/null +++ b/ios/chrome/app/strings/ios_strings_grd/IDS_IOS_GOOGLE_ACCOUNT_SETTINGS_BATCH_UPLOAD_ITEMS_ITEM.png.sha1
@@ -0,0 +1 @@ +bb23561874edd078c6bda603ace7d0399d6ef29c \ No newline at end of file
diff --git a/ios/chrome/app/strings/ios_strings_grd/IDS_IOS_GOOGLE_ACCOUNT_SETTINGS_BATCH_UPLOAD_PASSWORDS_AND_ITEMS_ITEM.png.sha1 b/ios/chrome/app/strings/ios_strings_grd/IDS_IOS_GOOGLE_ACCOUNT_SETTINGS_BATCH_UPLOAD_PASSWORDS_AND_ITEMS_ITEM.png.sha1 new file mode 100644 index 0000000..a8dc98c --- /dev/null +++ b/ios/chrome/app/strings/ios_strings_grd/IDS_IOS_GOOGLE_ACCOUNT_SETTINGS_BATCH_UPLOAD_PASSWORDS_AND_ITEMS_ITEM.png.sha1
@@ -0,0 +1 @@ +b4027a97b66c61b0de94a983ade987d8d8114ce4 \ No newline at end of file
diff --git a/ios/chrome/app/strings/ios_strings_grd/IDS_IOS_GOOGLE_ACCOUNT_SETTINGS_BATCH_UPLOAD_PASSWORDS_ITEM.png.sha1 b/ios/chrome/app/strings/ios_strings_grd/IDS_IOS_GOOGLE_ACCOUNT_SETTINGS_BATCH_UPLOAD_PASSWORDS_ITEM.png.sha1 new file mode 100644 index 0000000..e3184881e --- /dev/null +++ b/ios/chrome/app/strings/ios_strings_grd/IDS_IOS_GOOGLE_ACCOUNT_SETTINGS_BATCH_UPLOAD_PASSWORDS_ITEM.png.sha1
@@ -0,0 +1 @@ +5d925adf5831faae018458c142b89eaabf5688db \ No newline at end of file
diff --git a/ios/chrome/browser/bookmarks/model/BUILD.gn b/ios/chrome/browser/bookmarks/model/BUILD.gn index 874e1573..afcd344 100644 --- a/ios/chrome/browser/bookmarks/model/BUILD.gn +++ b/ios/chrome/browser/bookmarks/model/BUILD.gn
@@ -30,6 +30,7 @@ "//components/history/core/browser", "//components/keyed_service/core", "//components/keyed_service/ios", + "//components/power_bookmarks/core", "//components/prefs", "//components/sync_bookmarks", "//components/undo",
diff --git a/ios/chrome/browser/bookmarks/model/bookmark_client_impl.h b/ios/chrome/browser/bookmarks/model/bookmark_client_impl.h index 49216d1..a4c56d2 100644 --- a/ios/chrome/browser/bookmarks/model/bookmark_client_impl.h +++ b/ios/chrome/browser/bookmarks/model/bookmark_client_impl.h
@@ -11,8 +11,8 @@ #include "base/memory/raw_ptr.h" #include "base/task/deferred_sequenced_task_runner.h" -#include "components/bookmarks/browser/bookmark_client.h" #include "components/bookmarks/common/storage_type.h" +#include "components/power_bookmarks/core/bookmark_client_base.h" class BookmarkUndoService; class ChromeBrowserState; @@ -27,7 +27,7 @@ class BookmarkSyncService; } // namespace sync_bookmarks -class BookmarkClientImpl : public bookmarks::BookmarkClient { +class BookmarkClientImpl : public power_bookmarks::BookmarkClientBase { public: BookmarkClientImpl( ChromeBrowserState* browser_state,
diff --git a/ios/chrome/browser/shared/ui/symbols/BUILD.gn b/ios/chrome/browser/shared/ui/symbols/BUILD.gn index 4a0ee71..7b2c78f 100644 --- a/ios/chrome/browser/shared/ui/symbols/BUILD.gn +++ b/ios/chrome/browser/shared/ui/symbols/BUILD.gn
@@ -66,6 +66,7 @@ "//ios/chrome/browser/shared/ui/symbols/resources:cloud_slash", "//ios/chrome/browser/shared/ui/symbols/resources:custom_platter_filled_bottom_and_arrow_down_iphone", "//ios/chrome/browser/shared/ui/symbols/resources:custom_platter_filled_top_and_arrow_up_iphone", + "//ios/chrome/browser/shared/ui/symbols/resources:dangerous_omnibox", "//ios/chrome/browser/shared/ui/symbols/resources:dino", "//ios/chrome/browser/shared/ui/symbols/resources:folder_badge_arrow_forward", "//ios/chrome/browser/shared/ui/symbols/resources:incognito",
diff --git a/ios/chrome/browser/shared/ui/symbols/resources/BUILD.gn b/ios/chrome/browser/shared/ui/symbols/resources/BUILD.gn index b080b7f..182b9563 100644 --- a/ios/chrome/browser/shared/ui/symbols/resources/BUILD.gn +++ b/ios/chrome/browser/shared/ui/symbols/resources/BUILD.gn
@@ -40,6 +40,13 @@ ] } +symbolset("dangerous_omnibox") { + sources = [ + "dangerous_omnibox.symbolset/Contents.json", + "dangerous_omnibox.symbolset/dangerous.omnibox.cr.svg", + ] +} + symbolset("dino") { sources = [ "dino.symbolset/Contents.json",
diff --git a/ios/chrome/browser/shared/ui/symbols/resources/dangerous_omnibox.symbolset/Contents.json b/ios/chrome/browser/shared/ui/symbols/resources/dangerous_omnibox.symbolset/Contents.json new file mode 100644 index 0000000..9325f92 --- /dev/null +++ b/ios/chrome/browser/shared/ui/symbols/resources/dangerous_omnibox.symbolset/Contents.json
@@ -0,0 +1,12 @@ +{ + "info": { + "author": "xcode", + "version": 1 + }, + "symbols": [ + { + "filename": "dangerous.omnibox.cr.svg", + "idiom": "universal" + } + ] +} \ No newline at end of file
diff --git a/ios/chrome/browser/shared/ui/symbols/resources/dangerous_omnibox.symbolset/dangerous.omnibox.cr.svg b/ios/chrome/browser/shared/ui/symbols/resources/dangerous_omnibox.symbolset/dangerous.omnibox.cr.svg new file mode 100644 index 0000000..1ac24837 --- /dev/null +++ b/ios/chrome/browser/shared/ui/symbols/resources/dangerous_omnibox.symbolset/dangerous.omnibox.cr.svg
@@ -0,0 +1,12 @@ +<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="3300" height="2000"><g id="Notes"><style> + text { + font-family: monospace; + text-anchor: middle; + } + text.emphasis { + font-weight:bold; + } + text.lanchor { + text-anchor: start; + } + </style><rect height="2200" id="artboard" fill="white" width="3300" x="0" y="0"/><line id="" style="fill:none;stroke:black;stroke-width:0.5;" x1="263" x2="3036" y1="292" y2="292"/><text class="lanchor emphasis" transform="matrix(1 0 0 1 263 322)">Weight/Scale Variations</text><text transform="matrix(1 0 0 1 559.711 322)">Ultralight</text><text transform="matrix(1 0 0 1 856.422 322)">Thin</text><text transform="matrix(1 0 0 1 1153.13 322)">Light</text><text transform="matrix(1 0 0 1 1449.84 322)">Regular</text><text transform="matrix(1 0 0 1 1746.56 322)">Medium</text><text transform="matrix(1 0 0 1 2043.27 322)">Semibold</text><text transform="matrix(1 0 0 1 2339.98 322)">Bold</text><text transform="matrix(1 0 0 1 2636.69 322)">Heavy</text><text transform="matrix(1 0 0 1 2933.4 322)">Black</text><text id="template-version" style="text-anchor: end;" transform="matrix(1 0 0 1 3036 1933)">Template v.1.0</text><text class="lanchor" transform="matrix(1 0 0 1 263 726)">Small</text><text class="lanchor" transform="matrix(1 0 0 1 263 1156)">Medium</text><text class="lanchor" transform="matrix(1 0 0 1 263 1586)">Large</text></g><g id="Guides"><g id="H-reference" style="fill:#27AAE1;stroke:none;" transform="matrix(1 0 0 1 339 696)"><path d="M 54.9316 0 L 57.666 0 L 30.5664 -70.459 L 28.0762 -70.459 L 0.976562 0 L 3.66211 0 L 12.9395 -24.4629 L 45.7031 -24.4629 Z M 29.1992 -67.0898 L 29.4434 -67.0898 L 44.8242 -26.709 L 13.8184 -26.709 Z"/></g><line id="Baseline-S" style="fill:none;stroke:#27AAE1;opacity:1;stroke-width:0.577;" x1="263" x2="3036" y1="696" y2="696"/><line id="Capline-S" style="fill:none;stroke:#27AAE1;opacity:1;stroke-width:0.577;" x1="263" x2="3036" y1="625.541" y2="625.541"/><g id="H-reference" style="fill:#27AAE1;stroke:none;" transform="matrix(1 0 0 1 339 1126)"><path d="M 54.9316 0 L 57.666 0 L 30.5664 -70.459 L 28.0762 -70.459 L 0.976562 0 L 3.66211 0 L 12.9395 -24.4629 L 45.7031 -24.4629 Z M 29.1992 -67.0898 L 29.4434 -67.0898 L 44.8242 -26.709 L 13.8184 -26.709 Z"/></g><line id="Baseline-M" style="fill:none;stroke:#27AAE1;opacity:1;stroke-width:0.577;" x1="263" x2="3036" y1="1126" y2="1126"/><line id="Capline-M" style="fill:none;stroke:#27AAE1;opacity:1;stroke-width:0.577;" x1="263" x2="3036" y1="1055.54" y2="1055.54"/><g id="H-reference" style="fill:#27AAE1;stroke:none;" transform="matrix(1 0 0 1 339 1556)"><path d="M 54.9316 0 L 57.666 0 L 30.5664 -70.459 L 28.0762 -70.459 L 0.976562 0 L 3.66211 0 L 12.9395 -24.4629 L 45.7031 -24.4629 Z M 29.1992 -67.0898 L 29.4434 -67.0898 L 44.8242 -26.709 L 13.8184 -26.709 Z"/></g><line id="Baseline-L" style="fill:none;stroke:#27AAE1;opacity:1;stroke-width:0.577;" x1="263" x2="3036" y1="1556" y2="1556"/><line id="Capline-L" style="fill:none;stroke:#27AAE1;opacity:1;stroke-width:0.577;" x1="263" x2="3036" y1="1485.54" y2="1485.54"/><rect height="119.336" id="left-margin" style="fill:darkred;stroke:none;opacity:0.4;" width="12.4512" x="1394.06" y="1030.79"/><rect height="119.336" id="right-margin" style="fill:darkgreen;stroke:none;opacity:0.4;" width="12.4512" x="1502.5112" y="1030.79"/><rect x="1406.5112" y="1045" width="96" height="96" fill="none" stroke="blue" stroke-dasharray="5"/><rect x="1394.06" y="1030.79" width="120.9024" height="119.336" fill="none" stroke="blue"/></g><g id="Symbols"><g id="Bold-L" transform="matrix(1 0 0 1 2266 1556)"><path d="M51.6 26.851 15.319 -9.43 V-61.191 L51.6 -97.472 H103.361 L139.643 -61.191 V-9.43 L103.361 26.851 H51.6 Z M58.211 -7.979 77.4 -27.167 96.589 -7.979 104.812 -16.041 85.463 -35.23 104.812 -54.419 96.589 -62.642 77.4 -43.292 58.211 -62.642 50.149 -54.419 69.338 -35.23 50.149 -16.041 58.211 -7.979 Z"/></g><g id="Semibold-L" transform="matrix(1 0 0 1 1970.27 1556)"><path d="M52.301 25.099 17.071 -10.131 V-60.42 L52.301 -95.65 H102.59 L137.82 -60.42 V-10.131 L102.59 25.099 H52.301 Z M57.931 -8.259 77.4 -27.728 96.869 -8.259 104.462 -15.761 84.902 -35.23 104.462 -54.699 96.869 -62.292 77.4 -42.732 57.931 -62.292 50.429 -54.699 69.898 -35.23 50.429 -15.761 57.931 -8.259 Z"/></g><g id="Medium-L" transform="matrix(1 0 0 1 1674.31 1556)"><path d="M52.827 23.784 18.386 -10.657 V-59.842 L52.827 -94.283 H102.012 L136.453 -59.842 V-10.657 L102.012 23.784 H52.827 Z M57.721 -8.469 77.4 -28.149 97.079 -8.469 104.199 -15.551 84.481 -35.23 104.199 -54.909 97.079 -62.029 77.4 -42.311 57.721 -62.029 50.639 -54.909 70.319 -35.23 50.639 -15.551 57.721 -8.469 Z"/></g><g id="Regular-L" transform="matrix(1 0 0 1 1378.56 1556)"><path d="M53.212 22.82 19.35 -11.042 V-59.417 L53.212 -93.28 H101.588 L135.45 -59.417 V-11.042 L101.588 22.82 H53.212 Z M57.566 -8.624 77.4 -28.457 97.234 -8.624 104.006 -15.396 84.172 -35.23 104.006 -55.064 97.234 -61.836 77.4 -42.002 57.566 -61.836 50.794 -55.064 70.627 -35.23 50.794 -15.396 57.566 -8.624 Z"/></g><g id="Light-L" transform="matrix(1 0 0 1 1082.77 1556)"><path d="M54.577 19.595 22.575 -12.407 V-58.053 L54.577 -90.055 H100.223 L132.225 -58.053 V-12.407 L100.223 19.595 H54.577 Z M57.938 -10.67 77.4 -30.07 96.862 -10.67 102.021 -15.768 82.56 -35.23 102.021 -54.692 96.862 -59.851 77.4 -40.39 57.938 -59.851 52.84 -54.692 72.24 -35.23 52.84 -15.768 57.938 -10.67 Z"/></g><g id="Thin-L" transform="matrix(1 0 0 1 787.282 1556)"><path d="M55.941 16.37 25.8 -13.771 V-56.689 L55.941 -86.83 H98.859 L129 -56.689 V-13.771 L98.859 16.37 H55.941 Z M58.31 -12.717 77.4 -31.682 96.49 -12.717 100.037 -16.14 80.948 -35.23 100.037 -54.32 96.49 -57.867 77.4 -38.777 58.31 -57.867 54.887 -54.32 73.853 -35.23 54.887 -16.14 58.31 -12.717 Z"/></g><g id="Ultralight-L" transform="matrix(1 0 0 1 491.205 1556)"><path d="M56.76 14.435 27.735 -14.59 V-55.87 L56.76 -84.895 H98.04 L127.065 -55.87 V-14.59 L98.04 14.435 H56.76 Z M58.534 -13.945 77.4 -32.65 96.266 -13.945 98.846 -16.364 79.98 -35.23 98.846 -54.096 96.266 -56.676 77.4 -37.81 58.534 -56.676 56.115 -54.096 74.82 -35.23 56.115 -16.364 58.534 -13.945 Z"/></g><g id="Bold-M" transform="matrix(1 0 0 1 2281.8 1126)"><path d="M39.5 14.02 10.75 -14.73 V-55.73 L39.5 -84.48 H80.5 L109.25 -55.73 V-14.73 L80.5 14.02 H39.5 Z M46.375 -13.23 60 -26.855 73.625 -13.23 82 -21.605 68.375 -35.23 82 -48.855 73.625 -57.23 60 -43.605 46.375 -57.23 38 -48.855 51.625 -35.23 38 -21.605 46.375 -13.23 Z"/></g><g id="Semibold-M" transform="matrix(1 0 0 1 1985.97 1126)"><path d="M40.261 12.172 12.598 -15.491 V-54.969 L40.261 -82.632 H79.739 L107.402 -54.969 V-15.491 L79.739 12.172 H40.261 Z M46.103 -13.556 60 -27.453 73.897 -13.556 81.674 -21.333 67.777 -35.23 81.674 -49.127 73.897 -56.904 60 -43.007 46.103 -56.904 38.326 -49.127 52.223 -35.23 38.326 -21.333 46.103 -13.556 Z"/></g><g id="Medium-M" transform="matrix(1 0 0 1 1689.91 1126)"><path d="M40.831 10.786 13.984 -16.061 V-54.398 L40.831 -81.246 H79.168 L106.016 -54.398 V-16.061 L79.168 10.786 H40.831 Z M45.9 -13.801 60 -27.901 74.1 -13.801 81.429 -21.129 67.329 -35.23 81.429 -49.33 74.1 -56.659 60 -42.559 45.9 -56.659 38.571 -49.33 52.671 -35.23 38.571 -21.129 45.9 -13.801 Z"/></g><g id="Regular-M" transform="matrix(1 0 0 1 1394.06 1126)"><path d="M41.25 9.77 15 -16.48 V-53.98 L41.25 -80.23 H78.75 L105 -53.98 V-16.48 L78.75 9.77 H41.25 Z M45.75 -13.98 60 -28.23 74.25 -13.98 81.25 -20.98 67 -35.23 81.25 -49.48 74.25 -56.48 60 -42.23 45.75 -56.48 38.75 -49.48 53 -35.23 38.75 -20.98 45.75 -13.98 Z"/></g><g id="Light-M" transform="matrix(1 0 0 1 1098.18 1126)"><path d="M42.308 7.27 17.5 -17.538 V-52.922 L42.308 -77.73 H77.692 L102.5 -52.922 V-17.538 L77.692 7.27 H42.308 Z M45.75 -15.711 60 -29.961 74.25 -15.711 79.519 -20.98 65.269 -35.23 79.519 -49.48 74.25 -54.749 60 -40.499 45.75 -54.749 40.481 -49.48 54.731 -35.23 40.481 -20.98 45.75 -15.711 Z"/></g><g id="Thin-M" transform="matrix(1 0 0 1 802.565 1126)"><path d="M43.365 4.77 20 -18.595 V-51.865 L43.365 -75.23 H76.635 L100 -51.865 V-18.595 L76.635 4.77 H43.365 Z M45.75 -17.441 60 -31.691 74.25 -17.441 77.788 -20.98 63.538 -35.23 77.788 -49.48 74.25 -53.018 60 -38.768 45.75 -53.018 42.212 -49.48 56.462 -35.23 42.212 -20.98 45.75 -17.441 Z"/></g><g id="Ultralight-M" transform="matrix(1 0 0 1 506.415 1126)"><path d="M44 3.27 21.5 -19.23 V-51.23 L44 -73.73 H76 L98.5 -51.23 V-19.23 L76 3.27 H44 Z M45.75 -18.48 60 -32.73 74.25 -18.48 76.75 -20.98 62.5 -35.23 76.75 -49.48 74.25 -51.98 60 -37.73 45.75 -51.98 43.25 -49.48 57.5 -35.23 43.25 -20.98 45.75 -18.48 Z"/></g><g id="Bold-S" transform="matrix(1 0 0 1 2294.23 696)"><path d="M32.25 1.261 10.849 -20.239 V-50.32 L32.25 -71.721 H62.43 L83.831 -50.32 V-20.14 L62.331 1.261 H32.25 Z M37.28 -19.154 47.34 -29.115 57.4 -19.154 63.416 -25.17 53.455 -35.23 63.416 -45.29 57.4 -51.306 47.34 -41.345 37.28 -51.306 31.264 -45.29 41.225 -35.23 31.264 -25.17 37.28 -19.154 Z"/></g><g id="Semibold-S" transform="matrix(1 0 0 1 1998.1 696)"><path d="M32.851 -0.197 12.307 -20.839 V-49.719 L32.851 -70.263 H61.829 L82.373 -49.719 V-20.741 L61.731 -0.197 H32.851 Z M37.066 -19.411 47.34 -29.587 57.614 -19.411 63.159 -24.956 52.983 -35.23 63.159 -45.504 57.614 -51.049 47.34 -40.873 37.066 -51.049 31.521 -45.504 41.697 -35.23 31.521 -24.956 37.066 -19.411 Z"/></g><g id="Medium-S" transform="matrix(1 0 0 1 1701.85 696)"><path d="M33.301 -1.29 13.4 -21.29 V-49.269 L33.301 -69.17 H61.379 L81.28 -49.269 V-21.191 L61.28 -1.29 H33.301 Z M36.905 -19.604 47.34 -29.941 57.775 -19.604 62.966 -24.795 52.629 -35.23 62.966 -45.665 57.775 -50.856 47.34 -40.519 36.905 -50.856 31.714 -45.665 42.051 -35.23 31.714 -24.795 36.905 -19.604 Z"/></g><g id="Regular-S" transform="matrix(1 0 0 1 1405.73 696)"><path d="M33.631 -2.092 14.202 -21.62 V-48.939 L33.631 -68.368 H61.049 L80.478 -48.939 V-21.521 L60.95 -2.092 H33.631 Z M36.787 -19.746 47.34 -30.2 57.893 -19.746 62.824 -24.677 52.37 -35.23 62.824 -45.783 57.893 -50.714 47.34 -40.26 36.787 -50.714 31.856 -45.783 42.31 -35.23 31.856 -24.677 36.787 -19.746 Z"/></g><g id="Light-S" transform="matrix(1 0 0 1 1109.75 696)"><path d="M34.466 -4.065 16.175 -22.454 V-48.104 L34.466 -66.395 H60.214 L78.505 -48.104 V-22.356 L60.116 -4.065 H34.466 Z M36.787 -21.112 47.34 -31.566 57.893 -21.112 61.458 -24.677 51.004 -35.23 61.458 -45.783 57.893 -49.348 47.34 -38.894 36.787 -49.348 33.222 -45.783 43.676 -35.23 33.222 -24.677 36.787 -21.112 Z"/></g><g id="Thin-S" transform="matrix(1 0 0 1 814.015 696)"><path d="M35.3 -6.037 18.147 -23.289 V-47.27 L35.3 -64.423 H59.38 L76.533 -47.27 V-23.19 L59.281 -6.037 H35.3 Z M36.787 -22.477 47.34 -32.931 57.893 -22.477 60.093 -24.677 49.639 -35.23 60.093 -45.783 57.893 -47.983 47.34 -37.529 36.787 -47.983 34.587 -45.783 45.041 -35.23 34.587 -24.677 36.787 -22.477 Z"/></g><g id="Ultralight-S" transform="matrix(1 0 0 1 517.792 696)"><path d="M35.801 -7.22 19.331 -23.789 V-46.769 L35.801 -63.239 H58.879 L75.35 -46.769 V-23.691 L58.781 -7.22 H35.801 Z M36.787 -23.296 47.34 -33.751 57.893 -23.296 59.274 -24.677 48.819 -35.23 59.274 -45.783 57.893 -47.164 47.34 -36.709 36.787 -47.164 35.406 -45.783 45.861 -35.23 35.406 -24.677 36.787 -23.296 Z"/></g></g></svg> \ No newline at end of file
diff --git a/ios/chrome/browser/shared/ui/symbols/symbol_names.h b/ios/chrome/browser/shared/ui/symbols/symbol_names.h index 9a734f1..21dc06d 100644 --- a/ios/chrome/browser/shared/ui/symbols/symbol_names.h +++ b/ios/chrome/browser/shared/ui/symbols/symbol_names.h
@@ -55,6 +55,7 @@ extern NSString* const kMoveFolderSymbol; extern NSString* const kTopOmniboxOptionSymbol; extern NSString* const kBottomOmniboxOptionSymbol; +extern NSString* const kDangerousOmniboxSymbol; // Custom symbol names which can be configured with a color palette. iOS 15+ // only.
diff --git a/ios/chrome/browser/shared/ui/symbols/symbol_names.mm b/ios/chrome/browser/shared/ui/symbols/symbol_names.mm index c2e5ba78..50ee326 100644 --- a/ios/chrome/browser/shared/ui/symbols/symbol_names.mm +++ b/ios/chrome/browser/shared/ui/symbols/symbol_names.mm
@@ -48,6 +48,7 @@ NSString* const kMoveFolderSymbol = @"folder_badge_arrow_forward"; NSString* const kTopOmniboxOptionSymbol = @"top_omnibox_option"; NSString* const kBottomOmniboxOptionSymbol = @"bottom_omnibox_option"; +NSString* const kDangerousOmniboxSymbol = @"dangerous_omnibox"; // Custom symbol names which can be configured with a color palette. NSString* const kIncognitoCircleFillSymbol = @"incognito_circle_fill";
diff --git a/ios/chrome/browser/ui/authentication/signin/signin_coordinator_egtest.mm b/ios/chrome/browser/ui/authentication/signin/signin_coordinator_egtest.mm index 488e4e9..eb7bee1 100644 --- a/ios/chrome/browser/ui/authentication/signin/signin_coordinator_egtest.mm +++ b/ios/chrome/browser/ui/authentication/signin/signin_coordinator_egtest.mm
@@ -77,6 +77,22 @@ OpenSigninMethodFromTabSwitcher, }; +// TODO(crbug.com/1277545): Flaky on iOS simulator. +#if TARGET_IPHONE_SIMULATOR +#define MAYBE_testSwipeDownInAdvancedSettings \ + DISABLED_testSwipeDownInAdvancedSettings +#else +#define MAYBE_testSwipeDownInAdvancedSettings testSwipeDownInAdvancedSettings +#endif +// TODO(crbug.com/1277545): Flaky on iOS simulator. +#if TARGET_IPHONE_SIMULATOR +#define MAYBE_testSyncOnWhenPassphraseIntroducedAfterSignIn \ + DISABLED_testSyncOnWhenPassphraseIntroducedAfterSignIn +#else +#define MAYBE_testSyncOnWhenPassphraseIntroducedAfterSignIn \ + testSyncOnWhenPassphraseIntroducedAfterSignIn +#endif + namespace { // Label used to find the 'Learn more' link. @@ -198,7 +214,39 @@ if ([self isRunningTest:@selector(testOpenSignInAndSyncFromNTP)] || [self isRunningTest:@selector - (testOpenManageSyncSettingsFromNTPWhenSyncDisabledByPolicy)]) { + (testOpenManageSyncSettingsFromNTPWhenSyncDisabledByPolicy)] || + [self + isRunningTest:@selector(testSignOutWithClearDataForSupervisedUser)] || + [self isRunningTest:@selector + (testSignInSwitchAccountsAndKeepDataSeparate)] || + [self isRunningTest:@selector(testSignInSwitchAccountsAndImportData)] || + [self isRunningTest:@selector(testSignInDisconnectFromChromeManaged)] || + [self isRunningTest:@selector(testSignInCancelIdentityPicker)] || + [self isRunningTest:@selector(testSignInCancelAuthenticationFlow)] || + [self isRunningTest:@selector(testSignInCancelFromBookmarks)] || + [self isRunningTest:@selector + (testDismissAdvancedSigninSettingsFromAdvancedSigninSettings)] || + [self isRunningTest:@selector + (testDismissSigninFromRecentTabsFromAdvancedSigninSettings)] || + [self isRunningTest:@selector(testDismissSigninFromTabSwitcher)] || + [self isRunningTest:@selector + (testDismissSigninFromTabSwitcherFromAdvancedSigninSettings)] || + [self isRunningTest:@selector + (testDismissSigninFromTabSwitcherFromIdentityPicker)] || + [self isRunningTest:@selector(testSigninDisabledByPolicy)] || + [self isRunningTest:@selector(testSignInCancelAddAccount)] || + [self isRunningTest:@selector(testSignInFromSettingsMenu)] || + [self isRunningTest:@selector(testSignInFromSyncOffLink)] || + [self isRunningTest:@selector(testSigninPromoWhenSyncOff)] || + [self isRunningTest:@selector(testSigninPromoClosedWhenSyncOff)] || + [self isRunningTest:@selector + (testSignInWithOneAccountStartSyncWithAnotherAccount)] || + [self isRunningTest:@selector(testSyncTypesDisabledPolicy)] || + [self + isRunningTest:@selector(testSwipeDownSignInViewWithoutAnIdentity)] || + [self isRunningTest:@selector(MAYBE_testSwipeDownInAdvancedSettings)] || + [self isRunningTest:@selector + (MAYBE_testSyncOnWhenPassphraseIntroducedAfterSignIn)]) { config.features_disabled.push_back( syncer::kReplaceSyncPromosWithSignInPromos); } @@ -333,6 +381,9 @@ // Tests that signing out a supervised user account with the clear local data // option is honored. +// kReplaceSyncPromosWithSignInPromos is disabled. +// TODO(crbug.com/1477295): Evaluate if the test is relevant with +// kReplaceSyncPromosWithSignInPromos enabled. - (void)testSignOutWithClearDataForSupervisedUser { // Sign in with a fake supervised identity. FakeSystemIdentity* fakeSupervisedIdentity = @@ -358,17 +409,21 @@ // Tests signing in with one account, switching sync account to a second and // choosing to keep the browsing data separate during the switch. +// kReplaceSyncPromosWithSignInPromos is disabled. - (void)testSignInSwitchAccountsAndKeepDataSeparate { ChooseImportOrKeepDataSepareteDialog(SettingsImportDataKeepSeparateButton()); } // Tests signing in with one account, switching sync account to a second and // choosing to import the browsing data during the switch. +// kReplaceSyncPromosWithSignInPromos is disabled. - (void)testSignInSwitchAccountsAndImportData { ChooseImportOrKeepDataSepareteDialog(SettingsImportDataImportButton()); } // Tests that signing out from the Settings works correctly. +// TODO(crbug.com/1477295): Evaluate if the test is relevant with +// kReplaceSyncPromosWithSignInPromos enabled. - (void)testSignInDisconnectFromChrome { FakeSystemIdentity* fakeIdentity = [FakeSystemIdentity fakeIdentity1]; [SigninEarlGreyUI signinWithFakeIdentity:fakeIdentity]; @@ -380,6 +435,7 @@ // Tests that signing out of a managed account from the Settings works // correctly. +// kReplaceSyncPromosWithSignInPromos is disabled. - (void)testSignInDisconnectFromChromeManaged { // Sign-in with a managed account. FakeSystemIdentity* fakeIdentity = [FakeSystemIdentity fakeManagedIdentity]; @@ -394,6 +450,9 @@ // Opens the sign in screen and then cancel it by opening a new tab. Ensures // that the sign in screen is correctly dismissed. crbug.com/462200 +// kReplaceSyncPromosWithSignInPromos is disabled. +// TODO(crbug.com/1477295): Evaluate if the test is relevant with +// kReplaceSyncPromosWithSignInPromos enabled. - (void)testSignInCancelIdentityPicker { // Add an identity to avoid arriving on the Add Account screen when opening // sign-in. @@ -441,6 +500,9 @@ // Starts an authentication flow and cancel it by opening a new tab. Ensures // that the authentication flow is correctly canceled and dismissed. // crbug.com/462202 +// kReplaceSyncPromosWithSignInPromos is disabled. +// TODO(crbug.com/1477295): Evaluate if the test is relevant with +// kReplaceSyncPromosWithSignInPromos enabled. - (void)testSignInCancelAuthenticationFlow { // Set up the fake identities. FakeSystemIdentity* fakeIdentity1 = [FakeSystemIdentity fakeIdentity1]; @@ -509,6 +571,10 @@ // Opens the sign in screen from the bookmarks and then cancel it by tapping on // done. Ensures that the sign in screen is correctly dismissed. // Regression test for crbug.com/596029. +// kEnableBookmarksAccountStorage is disabled. +// kReplaceSyncPromosWithSignInPromos is disabled. +// TODO(crbug.com/1477295): Evaluate if the test is relevant with +// kReplaceSyncPromosWithSignInPromos enabled. - (void)testSignInCancelFromBookmarks { FakeSystemIdentity* fakeIdentity = [FakeSystemIdentity fakeIdentity1]; [SigninEarlGrey addFakeIdentity:fakeIdentity]; @@ -572,6 +638,7 @@ // Tests to dismiss sign-in by opening an URL from another app. // Sign-in opened from: setting menu. // Interrupted at: advanced sign-in. +// kReplaceSyncPromosWithSignInPromos is disabled. - (void)testDismissAdvancedSigninSettingsFromAdvancedSigninSettings { [self assertOpenURLWhenSigninFromView:OpenSigninMethodFromSettings tapSettingsLink:YES]; @@ -580,6 +647,7 @@ // Tests to dismiss sign-in by opening an URL from another app. // Sign-in opened from: bookmark view. // Interrupted at: user consent. +// kEnableBookmarksAccountStorage is disabled. - (void)testDismissSigninFromBookmarks { [self assertOpenURLWhenSigninFromView:OpenSigninMethodFromBookmarks tapSettingsLink:NO]; @@ -588,6 +656,7 @@ // Tests to dismiss sign-in by opening an URL from another app. // Sign-in opened from: bookmark view. // Interrupted at: advanced sign-in. +// kEnableBookmarksAccountStorage is disabled. - (void)testDismissAdvancedSigninBookmarksFromAdvancedSigninSettings { [self assertOpenURLWhenSigninFromView:OpenSigninMethodFromBookmarks tapSettingsLink:YES]; @@ -604,6 +673,7 @@ // Tests to dismiss sign-in by opening an URL from another app. // Sign-in opened from: recent tabs. // Interrupted at: advanced sign-in. +// kReplaceSyncPromosWithSignInPromos is disabled. - (void)testDismissSigninFromRecentTabsFromAdvancedSigninSettings { [self assertOpenURLWhenSigninFromView:OpenSigninMethodFromRecentTabs tapSettingsLink:YES]; @@ -612,6 +682,9 @@ // Tests to dismiss sign-in by opening an URL from another app. // Sign-in opened from: tab switcher. // Interrupted at: user consent. +// kReplaceSyncPromosWithSignInPromos is disabled. +// TODO(crbug.com/1477295): Evaluate if the test is relevant with +// kReplaceSyncPromosWithSignInPromos enabled. - (void)testDismissSigninFromTabSwitcher { [self assertOpenURLWhenSigninFromView:OpenSigninMethodFromTabSwitcher tapSettingsLink:NO]; @@ -620,6 +693,7 @@ // Tests to dismiss sign-in by opening an URL from another app. // Sign-in opened from: tab switcher. // Interrupted at: advanced sign-in. +// kReplaceSyncPromosWithSignInPromos is disabled. - (void)testDismissSigninFromTabSwitcherFromAdvancedSigninSettings { [self assertOpenURLWhenSigninFromView:OpenSigninMethodFromTabSwitcher tapSettingsLink:YES]; @@ -628,6 +702,9 @@ // Tests to dismiss sign-in by opening an URL from another app. // Sign-in opened from: tab switcher. // Interrupted at: identity picker. +// kReplaceSyncPromosWithSignInPromos is disabled. +// TODO(crbug.com/1477295): Evaluate if the test is relevant with +// kReplaceSyncPromosWithSignInPromos enabled. - (void)testDismissSigninFromTabSwitcherFromIdentityPicker { FakeSystemIdentity* fakeIdentity = [FakeSystemIdentity fakeIdentity1]; [SigninEarlGrey addFakeIdentity:fakeIdentity]; @@ -660,14 +737,7 @@ // Verifies that the user is signed in when selecting "Yes I'm In", after the // advanced settings were swiped to dismiss. -// TODO(crbug.com/1277545): Flaky on iOS simulator. -#if TARGET_IPHONE_SIMULATOR -#define MAYBE_testSwipeDownInAdvancedSettings \ - DISABLED_testSwipeDownInAdvancedSettings -#else -#define MAYBE_testSwipeDownInAdvancedSettings \ - testSwipeDownInAdvancedSettings -#endif +// kReplaceSyncPromosWithSignInPromos is disabled. - (void)MAYBE_testSwipeDownInAdvancedSettings { FakeSystemIdentity* fakeIdentity = [FakeSystemIdentity fakeIdentity1]; [SigninEarlGrey addFakeIdentity:fakeIdentity]; @@ -799,6 +869,9 @@ // Opens the add account screen and then cancels it by opening a new tab. // Ensures that the add account screen is correctly dismissed. crbug.com/462200 +// kReplaceSyncPromosWithSignInPromos is disabled. +// TODO(crbug.com/1477295): Evaluate if the test is relevant with +// kReplaceSyncPromosWithSignInPromos enabled. - (void)testSignInCancelAddAccount { // Add an identity to avoid arriving on the Add Account screen when opening // sign-in. @@ -875,6 +948,9 @@ // Tests that the sign-in coordinator isn't started when sign-in is disabled by // policy. +// kReplaceSyncPromosWithSignInPromos is disabled. +// TODO(crbug.com/1477295): Evaluate if the test is relevant with +// kReplaceSyncPromosWithSignInPromos enabled. - (void)testSigninDisabledByPolicy { // Disable browser sign-in only after the "Sign in to Chrome" button is // visible. @@ -1047,6 +1123,9 @@ // Tests that opening the sign-in screen from the Settings and signing in works // correctly when there is already an identity on the device. +// kReplaceSyncPromosWithSignInPromos is disabled. +// TODO(crbug.com/1477295): Evaluate if the test is relevant with +// kReplaceSyncPromosWithSignInPromos enabled. - (void)testSignInFromSettingsMenu { // Set up a fake identity. FakeSystemIdentity* fakeIdentity = [FakeSystemIdentity fakeIdentity1]; @@ -1074,6 +1153,9 @@ // Tests that opening the sign-in screen from the Sync Off tab and signin in // will turn Sync On. +// kReplaceSyncPromosWithSignInPromos is disabled. +// TODO(crbug.com/1477295): Evaluate if the test is relevant with +// kReplaceSyncPromosWithSignInPromos enabled. - (void)testSignInFromSyncOffLink { FakeSystemIdentity* fakeIdentity = [FakeSystemIdentity fakeIdentity1]; [SigninEarlGrey addFakeIdentity:fakeIdentity]; @@ -1198,6 +1280,10 @@ // Tests that the sign-in promo for Sync is displayed when the user is signed in // with Sync off. +// kEnableBookmarksAccountStorage is disabled. +// kReplaceSyncPromosWithSignInPromos is disabled. +// TODO(crbug.com/1477295): Evaluate if the test is relevant with +// kReplaceSyncPromosWithSignInPromos enabled. - (void)testSigninPromoWhenSyncOff { // Add identity to the device. FakeSystemIdentity* fakeIdentity = [FakeSystemIdentity fakeIdentity1]; @@ -1215,6 +1301,10 @@ // Tests that no sign-in promo for Sync is displayed when the user is signed in // with Sync off and has closed the sign-in promo for Sync. +// kEnableBookmarksAccountStorage is disabled. +// kReplaceSyncPromosWithSignInPromos is disabled. +// TODO(crbug.com/1477295): Evaluate if the test is relevant with +// kReplaceSyncPromosWithSignInPromos enabled. - (void)testSigninPromoClosedWhenSyncOff { // Add identity to the device. FakeSystemIdentity* fakeIdentity = [FakeSystemIdentity fakeIdentity1]; @@ -1240,14 +1330,9 @@ // Tests that Sync is on when introducing passphrase from settings, after // logging in. -// TODO(crbug.com/1277545): Flaky on iOS simulator. -#if TARGET_IPHONE_SIMULATOR -#define MAYBE_testSyncOnWhenPassphraseIntroducedAfterSignIn \ - DISABLED_testSyncOnWhenPassphraseIntroducedAfterSignIn -#else -#define MAYBE_testSyncOnWhenPassphraseIntroducedAfterSignIn \ - testSyncOnWhenPassphraseIntroducedAfterSignIn -#endif +// kReplaceSyncPromosWithSignInPromos is disabled. +// TODO(crbug.com/1477295): Evaluate if the test is relevant with +// kReplaceSyncPromosWithSignInPromos enabled. - (void)MAYBE_testSyncOnWhenPassphraseIntroducedAfterSignIn { [ChromeEarlGrey addBookmarkWithSyncPassphrase:kPassphrase]; FakeSystemIdentity* fakeIdentity = [FakeSystemIdentity fakeIdentity1]; @@ -1295,6 +1380,9 @@ } // Tests to sign-in with one user, and then turn on syncn with a second account. +// kReplaceSyncPromosWithSignInPromos is disabled. +// TODO(crbug.com/1477295): Evaluate if the test is relevant with +// kReplaceSyncPromosWithSignInPromos enabled. - (void)testSignInWithOneAccountStartSyncWithAnotherAccount { FakeSystemIdentity* fakeIdentity1 = [FakeSystemIdentity fakeIdentity1]; [SigninEarlGrey addFakeIdentity:fakeIdentity1]; @@ -1322,6 +1410,9 @@ // Tests that when the syncTypesListDisabled policy is enabled, a policy warning // is displayed with a link to the policy management page. +// kReplaceSyncPromosWithSignInPromos is disabled. +// TODO(crbug.com/1477295): Evaluate if the test is relevant with +// kReplaceSyncPromosWithSignInPromos enabled. - (void)testSyncTypesDisabledPolicy { // Set policy. base::Value::List list; @@ -1399,6 +1490,9 @@ // Tests to dismiss the sign-in view by swipe down without an identity. // See http://crbug.com/1434238. +// kReplaceSyncPromosWithSignInPromos is disabled. +// TODO(crbug.com/1477295): Evaluate if the test is relevant with +// kReplaceSyncPromosWithSignInPromos enabled. - (void)testSwipeDownSignInViewWithoutAnIdentity { [self openSigninFromView:OpenSigninMethodFromSettings tapSettingsLink:NO]; [[EarlGrey selectElementWithMatcher:grey_accessibilityID(
diff --git a/ios/chrome/browser/ui/autofill/bottom_sheet/payments_suggestion_bottom_sheet_view_controller.mm b/ios/chrome/browser/ui/autofill/bottom_sheet/payments_suggestion_bottom_sheet_view_controller.mm index f7dcea726..acc9588c 100644 --- a/ios/chrome/browser/ui/autofill/bottom_sheet/payments_suggestion_bottom_sheet_view_controller.mm +++ b/ios/chrome/browser/ui/autofill/bottom_sheet/payments_suggestion_bottom_sheet_view_controller.mm
@@ -195,20 +195,33 @@ contextMenuConfigurationForRowAtIndexPath:(NSIndexPath*)indexPath point:(CGPoint)point { __weak __typeof(self) weakSelf = self; - UIContextMenuActionProvider actionProvider = - ^(NSArray<UIMenuElement*>* suggestedActions) { - NSMutableArray<UIMenuElement*>* menuElements = - [[NSMutableArray alloc] initWithArray:suggestedActions]; + UIContextMenuActionProvider actionProvider = ^( + NSArray<UIMenuElement*>* suggestedActions) { + NSMutableArray<UIMenu*>* menuElements = + [[NSMutableArray alloc] initWithArray:suggestedActions]; - PaymentsSuggestionBottomSheetViewController* strongSelf = weakSelf; - if (strongSelf) { - [menuElements addObject:[strongSelf openPaymentMethodsAction]]; - [menuElements - addObject:[strongSelf openPaymentDetailsForIndexPath:indexPath]]; - } - - return [UIMenu menuWithTitle:@"" children:menuElements]; - }; + PaymentsSuggestionBottomSheetViewController* strongSelf = weakSelf; + if (strongSelf) { + [menuElements + addObject:[UIMenu menuWithTitle:@"" + image:nil + identifier:nil + options:UIMenuOptionsDisplayInline + children:@[ + [strongSelf openPaymentMethodsAction] + ]]]; + [menuElements + addObject:[UIMenu menuWithTitle:@"" + image:nil + identifier:nil + options:UIMenuOptionsDisplayInline + children:@[ + [strongSelf + openPaymentDetailsForIndexPath:indexPath] + ]]]; + } + return [UIMenu menuWithTitle:@"" children:menuElements]; + }; return [UIContextMenuConfiguration configurationWithIdentifier:nil @@ -419,12 +432,12 @@ weakSelf.disableBottomSheetOnExit = NO; [weakSelf.handler displayPaymentMethods]; }; - UIImage* listIcon = - CustomSymbolWithPointSize(kReadingListSymbol, kSymbolActionPointSize); + UIImage* creditCardIcon = + DefaultSymbolWithPointSize(kCreditCardSymbol, kSymbolActionPointSize); return [UIAction actionWithTitle:l10n_util::GetNSString( IDS_IOS_PAYMENT_BOTTOM_SHEET_MANAGE_PAYMENT_METHODS) - image:listIcon + image:creditCardIcon identifier:nil handler:paymentMethodsButtonTapHandler]; }
diff --git a/ios/chrome/browser/ui/browser_view/browser_coordinator_unittest.mm b/ios/chrome/browser/ui/browser_view/browser_coordinator_unittest.mm index fad1baf..62c5971 100644 --- a/ios/chrome/browser/ui/browser_view/browser_coordinator_unittest.mm +++ b/ios/chrome/browser/ui/browser_view/browser_coordinator_unittest.mm
@@ -312,27 +312,35 @@ // Tests that BrowserCoordinator properly implements // the NewTabPageTabHelperDelegate protocol. TEST_F(BrowserCoordinatorTest, NewTabPageTabHelperDelegate) { - BrowserCoordinator* browser_coordinator = GetBrowserCoordinator(); - [browser_coordinator start]; + // This test is wrapped in an @autoreleasepool because some arguments passed + // to methods on some of the mock objects need to be freed before + // TestChromeBrowserState is destroyed. Without the @autoreleasepool the + // NSInvocation objects which keep these arguments alive aren't destroyed + // until the parent PlatformTest class itself is destroyed. + @autoreleasepool { + BrowserCoordinator* browser_coordinator = GetBrowserCoordinator(); + [browser_coordinator start]; - id mockNTPCoordinator = OCMPartialMock(browser_coordinator.NTPCoordinator); + id mockNTPCoordinator = OCMPartialMock(browser_coordinator.NTPCoordinator); - // Insert the web_state into the Browser. - InsertWebState(); + // Insert the web_state into the Browser. + InsertWebState(); - // Open an NTP to start the coordinator. - OpenURL(GURL("chrome://newtab/")); - EXPECT_OCMOCK_VERIFY(mockNTPCoordinator); + // Open an NTP to start the coordinator. + OpenURL(GURL("chrome://newtab/")); + EXPECT_OCMOCK_VERIFY(mockNTPCoordinator); - // Open a non-NTP page and expect a call to the NTP coordinator. - [[mockNTPCoordinator expect] didNavigateAwayFromNTP]; - OpenURL(GURL("chrome://version/")); - EXPECT_OCMOCK_VERIFY(mockNTPCoordinator); + // Open a non-NTP page and expect a call to the NTP coordinator. + [[mockNTPCoordinator expect] didNavigateAwayFromNTP]; + OpenURL(GURL("chrome://version/")); + EXPECT_OCMOCK_VERIFY(mockNTPCoordinator); - // Open another NTP and expect a navigation call. - [[mockNTPCoordinator expect] didNavigateToNTPInWebState:GetActiveWebState()]; - OpenURL(GURL("chrome://newtab/")); - EXPECT_OCMOCK_VERIFY(mockNTPCoordinator); + // Open another NTP and expect a navigation call. + [[mockNTPCoordinator expect] + didNavigateToNTPInWebState:GetActiveWebState()]; + OpenURL(GURL("chrome://newtab/")); + EXPECT_OCMOCK_VERIFY(mockNTPCoordinator); - [browser_coordinator stop]; + [browser_coordinator stop]; + } }
diff --git a/ios/chrome/browser/ui/content_suggestions/content_suggestions_commands.h b/ios/chrome/browser/ui/content_suggestions/content_suggestions_commands.h index a05f675..a92414bb 100644 --- a/ios/chrome/browser/ui/content_suggestions/content_suggestions_commands.h +++ b/ios/chrome/browser/ui/content_suggestions/content_suggestions_commands.h
@@ -14,9 +14,14 @@ // Opens the Most Visited associated with this `item` at the `mostVisitedItem`. - (void)openMostVisitedItem:(NSObject*)item atIndex:(NSInteger)mostVisitedIndex; + // Handles the actions tapping the "Return to Recent Tab" item that returns the // user to the last opened tab. - (void)openMostRecentTab; + +// Opens the displayed tab resumption item. +- (void)openTabResumptionItem; + @end #endif // IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_COMMANDS_H_
diff --git a/ios/chrome/browser/ui/content_suggestions/content_suggestions_feature.mm b/ios/chrome/browser/ui/content_suggestions/content_suggestions_feature.mm index ced98b7..719bd4a 100644 --- a/ios/chrome/browser/ui/content_suggestions/content_suggestions_feature.mm +++ b/ios/chrome/browser/ui/content_suggestions/content_suggestions_feature.mm
@@ -55,8 +55,7 @@ } bool IsTabResumptionEnabled() { - CHECK(IsMagicStackEnabled()); - return base::FeatureList::IsEnabled(kTabResumption); + return IsMagicStackEnabled() && base::FeatureList::IsEnabled(kTabResumption); } bool IsTabResumptionEnabledForMostRecentTabOnly() {
diff --git a/ios/chrome/browser/ui/content_suggestions/content_suggestions_mediator.mm b/ios/chrome/browser/ui/content_suggestions/content_suggestions_mediator.mm index df9a511..110802d 100644 --- a/ios/chrome/browser/ui/content_suggestions/content_suggestions_mediator.mm +++ b/ios/chrome/browser/ui/content_suggestions/content_suggestions_mediator.mm
@@ -114,6 +114,9 @@ using CSCollectionViewItem = CollectionViewItem<SuggestedContent>; using RequestSource = SearchTermsData::RequestSource; +// The Safety Check (Magic Stack) module runs (at minimum) once every 24 hours. +constexpr base::TimeDelta kSafetyCheckRunThreshold = base::Hours(24); + // Maximum number of most visited tiles fetched. const NSInteger kMaxNumMostVisitedTiles = 4; @@ -308,7 +311,7 @@ authenticationService:authenticationService]; } - if (IsMagicStackEnabled() && IsTabResumptionEnabled()) { + if (IsTabResumptionEnabled()) { if (!IsTabResumptionEnabledForMostRecentTabOnly()) { sync_sessions::SessionSyncService* sessionSyncService = SessionSyncServiceFactory::GetForBrowserState( @@ -400,6 +403,11 @@ - (void)configureMostRecentTabItemWithWebState:(web::WebState*)webState timeLabel:(NSString*)timeLabel { + // The most recent tab tile is part of the tab resume feature. + if (IsTabResumptionEnabled()) { + return; + } + self.returnToRecentTabSectionInfo = ReturnToRecentTabSectionInformation(); if (!self.returnToRecentTabItem) { self.returnToRecentTabItem = @@ -553,6 +561,26 @@ web_state_list->ActivateWebStateAt(index); } +- (void)openTabResumptionItem { + switch (_tabResumptionItem.itemType) { + case TabResumptionItemType::kLastSyncedTab: + // TODO(crbug.com/1464185): Add metrics. + break; + case TabResumptionItemType::kMostRecentTab: { + [self.NTPMetricsDelegate recentTabTileOpened]; + [self.contentSuggestionsMetricsRecorder recordMostRecentTabOpened]; + break; + } + } + // TODO(crbug.com/1464185): Hide the tile. + + web::NavigationManager::WebLoadParams webLoadParams = + web::NavigationManager::WebLoadParams(_tabResumptionItem.tabURL); + UrlLoadParams params = UrlLoadParams::SwitchToTab(webLoadParams); + params.web_params.transition_type = ui::PAGE_TRANSITION_AUTO_BOOKMARK; + UrlLoadingBrowserAgent::FromBrowser(self.browser)->Load(params); +} + #pragma mark - ContentSuggestionsGestureCommands - (void)openNewTabWithMostVisitedItem:(ContentSuggestionsMostVisitedItem*)item @@ -598,7 +626,11 @@ #pragma mark - StartSurfaceRecentTabObserving - (void)mostRecentTabWasRemoved:(web::WebState*)web_state { - [self hideRecentTabTile]; + if (IsTabResumptionEnabled()) { + // TODO(crbug.com/1464185): Implement this. + } else { + [self hideRecentTabTile]; + } } - (void)mostRecentTabFaviconUpdatedWithImage:(UIImage*)image { @@ -747,16 +779,26 @@ state.compromisedPasswordsCount = counts.compromised_count; // Last run time. - state.lastRunTime = safetyCheckManager->GetLastSafetyCheckRunTime(); + base::Time lastRunTimeViaModule = + safetyCheckManager->GetLastSafetyCheckRunTime(); - // Last run time (from the Safety Check via Settings). base::Time lastRunTimeViaSettings = base::Time::FromDoubleT([[NSUserDefaults standardUserDefaults] doubleForKey:kTimestampOfLastIssueFoundKey]); - if (lastRunTimeViaSettings > state.lastRunTime) { - state.lastRunTime = lastRunTimeViaSettings; - } + // Use the most recent Last Run Time—regardless of where the Safety Check was + // run—to minimize user confusion. + base::Time lastRunTime = lastRunTimeViaModule > lastRunTimeViaSettings + ? lastRunTimeViaModule + : lastRunTimeViaSettings; + + base::TimeDelta lastRunAge = base::Time::Now() - lastRunTime; + + // Only display the Last Run Time in the module if the run happened within the + // last 24hr. + state.lastRunTime = lastRunAge <= kSafetyCheckRunThreshold + ? absl::optional<base::Time>(lastRunTime) + : absl::nullopt; state.runningState = CanRunSafetyCheck(state.lastRunTime) ? RunningSafetyCheckState::kRunning
diff --git a/ios/chrome/browser/ui/content_suggestions/content_suggestions_view_controller.mm b/ios/chrome/browser/ui/content_suggestions/content_suggestions_view_controller.mm index d96ff50..99ea269 100644 --- a/ios/chrome/browser/ui/content_suggestions/content_suggestions_view_controller.mm +++ b/ios/chrome/browser/ui/content_suggestions/content_suggestions_view_controller.mm
@@ -46,6 +46,7 @@ #import "ios/chrome/browser/ui/content_suggestions/set_up_list/set_up_list_view.h" #import "ios/chrome/browser/ui/content_suggestions/set_up_list/utils.h" #import "ios/chrome/browser/ui/content_suggestions/tab_resumption/tab_resumption_view.h" +#import "ios/chrome/browser/ui/content_suggestions/tab_resumption/tab_resumption_view_delegate.h" #import "ios/chrome/browser/ui/ntp/new_tab_page_header_constants.h" #import "ios/chrome/browser/ui/start_surface/start_surface_features.h" #import "ios/chrome/browser/ui/toolbar/public/toolbar_utils.h" @@ -90,6 +91,7 @@ ContentSuggestionsSelectionActions, MagicStackModuleContainerDelegate, SetUpListItemViewTapDelegate, + TabResumptionViewDelegate, URLDropDelegate, UIScrollViewDelegate, UIScrollViewAccessibilityDelegate> @@ -726,6 +728,7 @@ [self logTopModuleImpressionForType:ContentSuggestionsModuleType:: kTabResumption]; _tabResumptionView = [[TabResumptionView alloc] initWithItem:item]; + _tabResumptionView.delegate = self; [_tabResumptionModuleContainer removeFromSuperview]; _tabResumptionModuleContainer = [[MagicStackModuleContainer alloc] initWithContentView:_tabResumptionView @@ -746,6 +749,12 @@ [self.audience didSelectSetUpListItem:view.type]; } +#pragma mark - TabResumptionViewDelegate methods + +- (void)tabResumptionViewTapped { + [self.suggestionCommandHandler openTabResumptionItem]; +} + #pragma mark - ContentSuggestionsSelectionActions - (void)contentSuggestionsElementTapped:(UIGestureRecognizer*)sender { @@ -881,10 +890,7 @@ - (NSString*)subtitleStringForModule:(ContentSuggestionsModuleType)type { if (type == ContentSuggestionsModuleType::kSafetyCheck || type == ContentSuggestionsModuleType::kSafetyCheckMultiRow) { - absl::optional<base::Time> lastRunTime = - absl::optional<base::Time>(_safetyCheckState.lastRunTime); - - return FormatElapsedTimeSinceLastSafetyCheck(lastRunTime); + return FormatElapsedTimeSinceLastSafetyCheck(_safetyCheckState.lastRunTime); } return @"";
diff --git a/ios/chrome/browser/ui/content_suggestions/safety_check/safety_check_state.h b/ios/chrome/browser/ui/content_suggestions/safety_check/safety_check_state.h index 5cec1fc3..a6082b9a 100644 --- a/ios/chrome/browser/ui/content_suggestions/safety_check/safety_check_state.h +++ b/ios/chrome/browser/ui/content_suggestions/safety_check/safety_check_state.h
@@ -6,6 +6,7 @@ #define IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_SAFETY_CHECK_SAFETY_CHECK_STATE_H_ #import "base/time/time.h" +#import "third_party/abseil-cpp/absl/types/optional.h" #import <UIKit/UIKit.h> @@ -47,7 +48,7 @@ @property(nonatomic, assign) NSInteger compromisedPasswordsCount; // The last run time of the Safety Check. -@property(nonatomic, assign) base::Time lastRunTime; +@property(nonatomic, assign) absl::optional<base::Time> lastRunTime; @end
diff --git a/ios/chrome/browser/ui/content_suggestions/safety_check/utils.h b/ios/chrome/browser/ui/content_suggestions/safety_check/utils.h index 522c0c5..f44c1cd 100644 --- a/ios/chrome/browser/ui/content_suggestions/safety_check/utils.h +++ b/ios/chrome/browser/ui/content_suggestions/safety_check/utils.h
@@ -34,7 +34,7 @@ int CheckIssuesCount(SafetyCheckState* state); // Returns true if the Safety Check can be run given `last_run_time`. -bool CanRunSafetyCheck(base::Time last_run_time); +bool CanRunSafetyCheck(absl::optional<base::Time> last_run_time); NSString* FormatElapsedTimeSinceLastSafetyCheck( absl::optional<base::Time> last_run_time);
diff --git a/ios/chrome/browser/ui/content_suggestions/safety_check/utils.mm b/ios/chrome/browser/ui/content_suggestions/safety_check/utils.mm index cc34b7049..48cfe80 100644 --- a/ios/chrome/browser/ui/content_suggestions/safety_check/utils.mm +++ b/ios/chrome/browser/ui/content_suggestions/safety_check/utils.mm
@@ -155,8 +155,13 @@ return invalid_check_count; } -bool CanRunSafetyCheck(base::Time last_run_time) { - base::TimeDelta last_run_age = base::Time::Now() - last_run_time; +bool CanRunSafetyCheck(absl::optional<base::Time> last_run_time) { + // The Safety Check should be run if it's never been run before. + if (!last_run_time.has_value()) { + return true; + } + + base::TimeDelta last_run_age = base::Time::Now() - last_run_time.value(); if (last_run_age > kSafetyCheckRunThreshold) { return true;
diff --git a/ios/chrome/browser/ui/content_suggestions/tab_resumption/BUILD.gn b/ios/chrome/browser/ui/content_suggestions/tab_resumption/BUILD.gn index e46ed22..aa4100a 100644 --- a/ios/chrome/browser/ui/content_suggestions/tab_resumption/BUILD.gn +++ b/ios/chrome/browser/ui/content_suggestions/tab_resumption/BUILD.gn
@@ -8,8 +8,10 @@ "tab_resumption_item.mm", "tab_resumption_view.h", "tab_resumption_view.mm", + "tab_resumption_view_delegate.h", ] deps = [ + ":constants", "//base", "//components/sessions:session_id", "//components/url_formatter", @@ -48,6 +50,14 @@ ] } +source_set("constants") { + sources = [ + "tab_resumption_constants.h", + "tab_resumption_constants.mm", + ] + deps = [ "//base" ] +} + source_set("unit_tests") { testonly = true sources = [ "tab_resumption_helper_unittest.mm" ] @@ -79,6 +89,7 @@ testonly = true sources = [ "tab_resumption_egtest.mm" ] deps = [ + ":constants", "//base/test:test_support", "//ios/chrome/app/strings", "//ios/chrome/browser/signin:fake_system_identity",
diff --git a/ios/chrome/browser/ui/content_suggestions/tab_resumption/tab_resumption_constants.h b/ios/chrome/browser/ui/content_suggestions/tab_resumption/tab_resumption_constants.h new file mode 100644 index 0000000..30b5f3f9 --- /dev/null +++ b/ios/chrome/browser/ui/content_suggestions/tab_resumption/tab_resumption_constants.h
@@ -0,0 +1,13 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_TAB_RESUMPTION_TAB_RESUMPTION_CONSTANTS_H_ +#define IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_TAB_RESUMPTION_TAB_RESUMPTION_CONSTANTS_H_ + +#import <UIKit/UIKit.h> + +// Accessibility identifier for the TabResumptionView. +extern NSString* const kTabResumptionViewIdentifier; + +#endif // IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_TAB_RESUMPTION_TAB_RESUMPTION_CONSTANTS_H_
diff --git a/ios/chrome/browser/ui/content_suggestions/tab_resumption/tab_resumption_constants.mm b/ios/chrome/browser/ui/content_suggestions/tab_resumption/tab_resumption_constants.mm new file mode 100644 index 0000000..04e46d6 --- /dev/null +++ b/ios/chrome/browser/ui/content_suggestions/tab_resumption/tab_resumption_constants.mm
@@ -0,0 +1,7 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import "ios/chrome/browser/ui/content_suggestions/tab_resumption/tab_resumption_constants.h" + +NSString* const kTabResumptionViewIdentifier = @"TabResumptionViewIdentifier";
diff --git a/ios/chrome/browser/ui/content_suggestions/tab_resumption/tab_resumption_egtest.mm b/ios/chrome/browser/ui/content_suggestions/tab_resumption/tab_resumption_egtest.mm index 7db3652e..6320875 100644 --- a/ios/chrome/browser/ui/content_suggestions/tab_resumption/tab_resumption_egtest.mm +++ b/ios/chrome/browser/ui/content_suggestions/tab_resumption/tab_resumption_egtest.mm
@@ -7,11 +7,13 @@ #import "ios/chrome/browser/ui/authentication/signin_earl_grey.h" #import "ios/chrome/browser/ui/authentication/signin_earl_grey_ui_test_util.h" #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_feature.h" +#import "ios/chrome/browser/ui/content_suggestions/tab_resumption/tab_resumption_constants.h" #import "ios/chrome/browser/ui/start_surface/start_surface_features.h" #import "ios/chrome/browser/ui/tabs/tests/distant_tabs_app_interface.h" #import "ios/chrome/browser/ui/tabs/tests/fake_distant_tab.h" #import "ios/chrome/grit/ios_strings.h" #import "ios/chrome/test/earl_grey/chrome_earl_grey.h" +#import "ios/chrome/test/earl_grey/chrome_matchers.h" #import "ios/chrome/test/earl_grey/chrome_test_case.h" #import "ios/testing/earl_grey/app_launch_manager.h" #import "ios/testing/earl_grey/earl_grey_test.h" @@ -122,6 +124,16 @@ // Check that the tile is displayed when there is a distant tab. WaitUntilTabResumptionTileVisibleOrTimeout(true); + + // Tap on the tab resumption item. + [[EarlGrey selectElementWithMatcher:grey_accessibilityID( + kTabResumptionViewIdentifier)] + performAction:grey_tap()]; + + // Verify that the location bar shows the distant tab URL in a short form. + [[EarlGrey selectElementWithMatcher:chrome_test_util::DefocusedLocationView()] + assertWithMatcher:chrome_test_util::LocationViewContainingText( + self.testServer->base_url().host())]; } // Tests that the tab resumption tile is correctly displayed for a local tab. @@ -137,6 +149,18 @@ // Check that the tile is displayed when there is a local tab. WaitUntilTabResumptionTileVisibleOrTimeout(true); + + // Tap on the tab resumption item. + [[EarlGrey selectElementWithMatcher:grey_accessibilityID( + kTabResumptionViewIdentifier)] + performAction:grey_tap()]; + + // Verify that the location bar shows the local tab URL in a short form. + [[EarlGrey selectElementWithMatcher:chrome_test_util::DefocusedLocationView()] + assertWithMatcher:chrome_test_util::LocationViewContainingText( + destinationUrl.host())]; + [ChromeEarlGrey + waitForWebStateContainingText:"Anyone know any good pony jokes?"]; } @end
diff --git a/ios/chrome/browser/ui/content_suggestions/tab_resumption/tab_resumption_view.h b/ios/chrome/browser/ui/content_suggestions/tab_resumption/tab_resumption_view.h index b4ba25f..da123060 100644 --- a/ios/chrome/browser/ui/content_suggestions/tab_resumption/tab_resumption_view.h +++ b/ios/chrome/browser/ui/content_suggestions/tab_resumption/tab_resumption_view.h
@@ -8,6 +8,7 @@ #import <UIKit/UIKit.h> @class TabResumptionItem; +@protocol TabResumptionViewDelegate; // A view that displays a tab resumption item in the Magic Stack. @interface TabResumptionView : UIView @@ -15,6 +16,9 @@ // Initialize a TabResumptionView with the given `item`. - (instancetype)initWithItem:(TabResumptionItem*)item; +// The delegate that receives TabResumptionView's events. +@property(nonatomic, weak) id<TabResumptionViewDelegate> delegate; + @end #endif // IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_TAB_RESUMPTION_TAB_RESUMPTION_VIEW_H_
diff --git a/ios/chrome/browser/ui/content_suggestions/tab_resumption/tab_resumption_view.mm b/ios/chrome/browser/ui/content_suggestions/tab_resumption/tab_resumption_view.mm index 02a1238..a8d1d3d 100644 --- a/ios/chrome/browser/ui/content_suggestions/tab_resumption/tab_resumption_view.mm +++ b/ios/chrome/browser/ui/content_suggestions/tab_resumption/tab_resumption_view.mm
@@ -10,7 +10,9 @@ #import "base/time/time.h" #import "components/url_formatter/elide_url.h" #import "ios/chrome/browser/shared/ui/symbols/symbols.h" +#import "ios/chrome/browser/ui/content_suggestions/tab_resumption/tab_resumption_constants.h" #import "ios/chrome/browser/ui/content_suggestions/tab_resumption/tab_resumption_item.h" +#import "ios/chrome/browser/ui/content_suggestions/tab_resumption/tab_resumption_view_delegate.h" #import "ios/chrome/common/ui/colors/semantic_color_names.h" #import "ios/chrome/common/ui/util/constraints_ui_util.h" #import "ios/chrome/grit/ios_strings.h" @@ -56,6 +58,7 @@ if (!_containerStackView) { [self createSubviews]; + [self addTapGestureRecognizer]; } } @@ -63,6 +66,11 @@ // Creates all the subviews. - (void)createSubviews { + self.accessibilityIdentifier = kTabResumptionViewIdentifier; + self.isAccessibilityElement = YES; + self.accessibilityTraits = UIAccessibilityTraitButton; + // TODO(crbug.com/1464185): Add the accessibilityLabel. + _containerStackView = [self configuredContainerStackView]; UIView* faviconContainerView = [self configuredFaviconImageContainer]; @@ -84,6 +92,14 @@ AddSameConstraints(_containerStackView, self); } +// Adds a tap gesture recognizer to the view. +- (void)addTapGestureRecognizer { + UITapGestureRecognizer* tapRecognizer = [[UITapGestureRecognizer alloc] + initWithTarget:self + action:@selector(tabResumptionItemTapped:)]; + [self addGestureRecognizer:tapRecognizer]; +} + // Configures and returns the UIStackView that contains the faviconContainerView // and the labelsStackView. - (UIStackView*)configuredContainerStackView { @@ -226,4 +242,9 @@ ui::TimeFormat::LENGTH_SHORT, lastUsedDelta)); } +// Called when the view has been tapped. +- (void)tabResumptionItemTapped:(UIGestureRecognizer*)sender { + [self.delegate tabResumptionViewTapped]; +} + @end
diff --git a/ios/chrome/browser/ui/content_suggestions/tab_resumption/tab_resumption_view_delegate.h b/ios/chrome/browser/ui/content_suggestions/tab_resumption/tab_resumption_view_delegate.h new file mode 100644 index 0000000..7e77d09 --- /dev/null +++ b/ios/chrome/browser/ui/content_suggestions/tab_resumption/tab_resumption_view_delegate.h
@@ -0,0 +1,16 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_TAB_RESUMPTION_TAB_RESUMPTION_VIEW_DELEGATE_H_ +#define IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_TAB_RESUMPTION_TAB_RESUMPTION_VIEW_DELEGATE_H_ + +// Delegate for the TabResumptionView. +@protocol TabResumptionViewDelegate + +// Called when the tab resumption view has been tapped. +- (void)tabResumptionViewTapped; + +@end + +#endif // IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_TAB_RESUMPTION_TAB_RESUMPTION_VIEW_DELEGATE_H_
diff --git a/ios/chrome/browser/ui/first_run/BUILD.gn b/ios/chrome/browser/ui/first_run/BUILD.gn index 4e8f378d..99fb52c 100644 --- a/ios/chrome/browser/ui/first_run/BUILD.gn +++ b/ios/chrome/browser/ui/first_run/BUILD.gn
@@ -108,7 +108,10 @@ deps = [ ":field_trial", "//base", + "//components/search_engines", "//components/sync/base:features", + "//ios/chrome/browser/policy", + "//ios/chrome/browser/shared/model/browser_state", "//ios/chrome/browser/ui/screen:screen_provider", "//ios/chrome/browser/ui/screen:screen_provider_protected", "//ios/chrome/browser/ui/screen:screen_type",
diff --git a/ios/chrome/browser/ui/first_run/first_run_screen_provider.h b/ios/chrome/browser/ui/first_run/first_run_screen_provider.h index a4520d35..46999de 100644 --- a/ios/chrome/browser/ui/first_run/first_run_screen_provider.h +++ b/ios/chrome/browser/ui/first_run/first_run_screen_provider.h
@@ -9,10 +9,15 @@ #import "ios/chrome/browser/ui/screen/screen_provider.h" +class ChromeBrowserState; + // The class that provides a list of first run screens. @interface FirstRunScreenProvider : ScreenProvider -- (instancetype)init NS_DESIGNATED_INITIALIZER; +- (instancetype)initForBrowserState:(ChromeBrowserState*)browserState + NS_DESIGNATED_INITIALIZER; + +- (instancetype)init NS_UNAVAILABLE; @end
diff --git a/ios/chrome/browser/ui/first_run/first_run_screen_provider.mm b/ios/chrome/browser/ui/first_run/first_run_screen_provider.mm index 52b91dc..5d9fe26 100644 --- a/ios/chrome/browser/ui/first_run/first_run_screen_provider.mm +++ b/ios/chrome/browser/ui/first_run/first_run_screen_provider.mm
@@ -6,14 +6,17 @@ #import "base/feature_list.h" #import "base/notreached.h" +#import "components/search_engines/search_engine_choice_utils.h" #import "components/sync/base/features.h" +#import "ios/chrome/browser/policy/browser_state_policy_connector.h" +#import "ios/chrome/browser/shared/model/browser_state/chrome_browser_state.h" #import "ios/chrome/browser/ui/screen/screen_provider+protected.h" #import "ios/chrome/browser/ui/screen/screen_type.h" #import "ios/public/provider/chrome/browser/signin/choice_api.h" @implementation FirstRunScreenProvider -- (instancetype)init { +- (instancetype)initForBrowserState:(ChromeBrowserState*)browserState { NSMutableArray* screens = [NSMutableArray array]; [screens addObject:@(kSignIn)]; if (base::FeatureList::IsEnabled( @@ -22,12 +25,17 @@ } else { [screens addObject:@(kTangibleSync)]; } - [screens addObject:@(kDefaultBrowserPromo)]; - if (ios::provider::IsChoiceEnabled()) { + BrowserStatePolicyConnector* policyConnector = + browserState->GetPolicyConnector(); + if (search_engines::ShouldShowChoiceScreen( + *policyConnector->GetPolicyService(), + /*profile_properties=*/{.is_regular_profile = true, + .pref_service = browserState->GetPrefs()})) { [screens addObject:@(kChoice)]; } + [screens addObject:@(kDefaultBrowserPromo)]; [screens addObject:@(kStepsCompleted)]; return [super initWithScreens:screens]; }
diff --git a/ios/chrome/browser/ui/omnibox/BUILD.gn b/ios/chrome/browser/ui/omnibox/BUILD.gn index 533d0dd..3cd39f9 100644 --- a/ios/chrome/browser/ui/omnibox/BUILD.gn +++ b/ios/chrome/browser/ui/omnibox/BUILD.gn
@@ -57,6 +57,7 @@ ":omnibox_suggestion_icon_util", "//base", "//components/omnibox/browser", + "//components/safe_browsing/core/common:common", "//components/security_state/core", "//ios/chrome/browser/shared/public/features", "//ios/chrome/browser/shared/ui/symbols",
diff --git a/ios/chrome/browser/ui/omnibox/omnibox_icon_type.h b/ios/chrome/browser/ui/omnibox/omnibox_icon_type.h index ef3b929..a4837b67 100644 --- a/ios/chrome/browser/ui/omnibox/omnibox_icon_type.h +++ b/ios/chrome/browser/ui/omnibox/omnibox_icon_type.h
@@ -17,6 +17,8 @@ SECURE, // Show a "not secure" warning. NOT_SECURE_WARNING, + // Show a "dangerous" warning. + DANGEROUS, LOCATION_BAR_SECURITY_ICON_TYPE_COUNT, };
diff --git a/ios/chrome/browser/ui/omnibox/omnibox_icon_type.mm b/ios/chrome/browser/ui/omnibox/omnibox_icon_type.mm index 9b54179..2d3b3e8 100644 --- a/ios/chrome/browser/ui/omnibox/omnibox_icon_type.mm +++ b/ios/chrome/browser/ui/omnibox/omnibox_icon_type.mm
@@ -18,6 +18,8 @@ return kSecureLocationBarSymbol; case NOT_SECURE_WARNING: return kWarningFillSymbol; + case DANGEROUS: + return kDangerousOmniboxSymbol; case LOCATION_BAR_SECURITY_ICON_TYPE_COUNT: NOTREACHED(); return kInfoCircleSymbol;
diff --git a/ios/chrome/browser/ui/omnibox/omnibox_util.mm b/ios/chrome/browser/ui/omnibox/omnibox_util.mm index 3b2b6ab..1dd470dd 100644 --- a/ios/chrome/browser/ui/omnibox/omnibox_util.mm +++ b/ios/chrome/browser/ui/omnibox/omnibox_util.mm
@@ -6,6 +6,7 @@ #import "base/notreached.h" #import "base/strings/utf_string_conversions.h" +#import "components/safe_browsing/core/common/features.h" #import "ios/chrome/browser/shared/public/features/features.h" #import "ios/chrome/browser/shared/ui/symbols/symbols.h" #import "ios/chrome/browser/ui/omnibox/omnibox_ui_features.h" @@ -85,7 +86,13 @@ if (!name) { return nil; } - return DefaultSymbolTemplateWithPointSize(name, kSymbolLocationBarPointSize); + + if (iconType == DANGEROUS) { + return CustomSymbolTemplateWithPointSize(name, kSymbolLocationBarPointSize); + } else { + return DefaultSymbolTemplateWithPointSize(name, + kSymbolLocationBarPointSize); + } } // Converts the `security_level` to an appropriate security icon type. @@ -95,6 +102,11 @@ case security_state::NONE: return INFO; case security_state::DANGEROUS: + if (base::FeatureList::IsEnabled( + safe_browsing::kRedInterstitialFacelift)) { + return DANGEROUS; + } + return NOT_SECURE_WARNING; case security_state::WARNING: return NOT_SECURE_WARNING; case security_state::SECURE:
diff --git a/ios/chrome/browser/ui/passwords/bottom_sheet/password_suggestion_bottom_sheet_view_controller.mm b/ios/chrome/browser/ui/passwords/bottom_sheet/password_suggestion_bottom_sheet_view_controller.mm index 1413fcd..b9e5caad 100644 --- a/ios/chrome/browser/ui/passwords/bottom_sheet/password_suggestion_bottom_sheet_view_controller.mm +++ b/ios/chrome/browser/ui/passwords/bottom_sheet/password_suggestion_bottom_sheet_view_controller.mm
@@ -170,20 +170,35 @@ contextMenuConfigurationForRowAtIndexPath:(NSIndexPath*)indexPath point:(CGPoint)point { __weak __typeof(self) weakSelf = self; - UIContextMenuActionProvider actionProvider = - ^(NSArray<UIMenuElement*>* suggestedActions) { - NSMutableArray<UIMenuElement*>* menuElements = - [[NSMutableArray alloc] initWithArray:suggestedActions]; + UIContextMenuActionProvider actionProvider = ^( + NSArray<UIMenuElement*>* suggestedActions) { + NSMutableArray<UIMenu*>* menuElements = + [[NSMutableArray alloc] initWithArray:suggestedActions]; - PasswordSuggestionBottomSheetViewController* strongSelf = weakSelf; - if (strongSelf) { - [menuElements addObject:[strongSelf openPasswordManagerAction]]; - [menuElements - addObject:[strongSelf openPasswordDetailsForIndexPath:indexPath]]; - } + PasswordSuggestionBottomSheetViewController* strongSelf = weakSelf; + if (strongSelf) { + [menuElements + addObject:[UIMenu menuWithTitle:@"" + image:nil + identifier:nil + options:UIMenuOptionsDisplayInline + children:@[ + [strongSelf openPasswordManagerAction] + ]]]; + [menuElements + addObject:[UIMenu + menuWithTitle:@"" + image:nil + identifier:nil + options:UIMenuOptionsDisplayInline + children:@[ + [strongSelf + openPasswordDetailsForIndexPath:indexPath] + ]]]; + } - return [UIMenu menuWithTitle:@"" children:menuElements]; - }; + return [UIMenu menuWithTitle:@"" children:menuElements]; + }; return [UIContextMenuConfiguration configurationWithIdentifier:nil
diff --git a/ios/chrome/browser/ui/settings/autofill/autofill_profile_table_view_controller.mm b/ios/chrome/browser/ui/settings/autofill/autofill_profile_table_view_controller.mm index 75b1659..04dad3a 100644 --- a/ios/chrome/browser/ui/settings/autofill/autofill_profile_table_view_controller.mm +++ b/ios/chrome/browser/ui/settings/autofill/autofill_profile_table_view_controller.mm
@@ -540,8 +540,7 @@ authenticationService->GetPrimaryIdentity(signin::ConsentLevel::kSignin); if (identity) { self.userEmail = identity.userEmail; - self.syncEnabled = _personalDataManager->IsSyncEnabledFor( - syncer::UserSelectableType::kAutofill); + self.syncEnabled = _personalDataManager->IsSyncFeatureEnabledForAutofill(); } }
diff --git a/ios/chrome/browser/ui/settings/google_services/manage_sync_settings_constants.h b/ios/chrome/browser/ui/settings/google_services/manage_sync_settings_constants.h index 78a57fa..33afffe 100644 --- a/ios/chrome/browser/ui/settings/google_services/manage_sync_settings_constants.h +++ b/ios/chrome/browser/ui/settings/google_services/manage_sync_settings_constants.h
@@ -30,6 +30,9 @@ // Accessibility identifier for Encryption item. extern NSString* const kEncryptionAccessibilityIdentifier; +// Accessibility identifier for batch upload item. +extern NSString* const kBatchUploadAccessibilityIdentifier; + // Sections used in Sync Settings page. typedef NS_ENUM(NSInteger, SyncSettingsSectionIdentifier) { // Section for all the sync settings. @@ -42,6 +45,8 @@ SyncErrorsSectionIdentifier, // Section to show the signed-in account. AccountSectionIdentifier, + // Section to show the batch upload option. + BatchUploadSectionIdentifier, }; // Item types used per Sync Setting section. @@ -98,6 +103,11 @@ // AccountSectionIdentifier section. // Item for the signed in identity. IdentityAccountItemType, + // BatchUploadSectionIdentifier section. + // Item for the batch upload button. + BatchUploadButtonItemType, + // Indicates the items to be uploaded to the account. + BatchUploadRecommendationItemType, }; // States for Sync Settings page to be in.
diff --git a/ios/chrome/browser/ui/settings/google_services/manage_sync_settings_constants.mm b/ios/chrome/browser/ui/settings/google_services/manage_sync_settings_constants.mm index 9dc761f..6c82fa4 100644 --- a/ios/chrome/browser/ui/settings/google_services/manage_sync_settings_constants.mm +++ b/ios/chrome/browser/ui/settings/google_services/manage_sync_settings_constants.mm
@@ -24,3 +24,6 @@ NSString* const kEncryptionAccessibilityIdentifier = @"EncryptionAccessibilityIdentifier"; + +NSString* const kBatchUploadAccessibilityIdentifier = + @"BatchUploadAccessibilityIdentifier";
diff --git a/ios/chrome/browser/ui/settings/google_services/manage_sync_settings_mediator.mm b/ios/chrome/browser/ui/settings/google_services/manage_sync_settings_mediator.mm index 1ceea47..fc9ab59 100644 --- a/ios/chrome/browser/ui/settings/google_services/manage_sync_settings_mediator.mm +++ b/ios/chrome/browser/ui/settings/google_services/manage_sync_settings_mediator.mm
@@ -8,7 +8,9 @@ #import "base/auto_reset.h" #import "base/check_op.h" #import "base/containers/fixed_flat_map.h" +#import "base/i18n/message_formatter.h" #import "base/notreached.h" +#import "base/strings/sys_string_conversions.h" #import "components/signin/public/base/consent_level.h" #import "components/signin/public/base/signin_metrics.h" #import "components/signin/public/identity_manager/account_info.h" @@ -92,6 +94,7 @@ // Enterprise icon. NSString* const kGoogleServicesEnterpriseImage = @"google_services_enterprise"; constexpr CGFloat kErrorSymbolPointSize = 22.; +constexpr CGFloat kBatchUploadSymbolPointSize = 22.; } // namespace @@ -106,6 +109,8 @@ @property(nonatomic, strong) TableViewImageItem* encryptionItem; // Sync error item. @property(nonatomic, strong) TableViewItem* syncErrorItem; +// Batch upload item. +@property(nonatomic, strong) SettingsImageDetailTextItem* batchUploadItem; // Sign out and turn off sync item. @property(nonatomic, strong) TableViewItem* signOutAndTurnOffSyncItem; // Returns YES if the sync data items should be enabled. @@ -136,6 +141,10 @@ _accountAccountManagerServiceObserver; // Signed-in identity. Note: may be nil while signing out. id<SystemIdentity> _signedInIdentity; + // Number of local items to upload excluding passwords. + NSInteger _localItemsToUpload; + // Number of local passwords to upload. + NSInteger _localPasswordsToUpload; } - (instancetype) @@ -161,6 +170,9 @@ _signedInIdentity = _authenticationService->GetPrimaryIdentity( signin::ConsentLevel::kSignin); _initialAccountState = initialAccountState; + // TODO(crbug.com/1451508):Remove initial values. + _localItemsToUpload = 0; + _localPasswordsToUpload = 0; } return self; } @@ -655,6 +667,158 @@ } } +#pragma mark - Loads batch upload section + +- (TableViewTextItem*)batchUploadButtonItem { + TableViewTextItem* item = + [[TableViewTextItem alloc] initWithType:BatchUploadButtonItemType]; + item.text = l10n_util::GetNSString( + IDS_IOS_GOOGLE_ACCOUNT_SETTINGS_BATCH_UPLOAD_BUTTON_ITEM); + item.textColor = [UIColor colorNamed:kBlueColor]; + item.accessibilityIdentifier = kBatchUploadAccessibilityIdentifier; + return item; +} + +- (NSString*)itemsToUploadRecommendationString { + // _localPasswordsToUpload and _localItemsToUpload should be updated by + // hasLocalDataToUpload before calling this method, which also checks for + // the case of having no items to upload, thus this case is not reached here. + if (!_localPasswordsToUpload && !_localItemsToUpload) { + NOTREACHED(); + } + + std::u16string userEmail = + base::SysNSStringToUTF16(_signedInIdentity.userEmail); + + std::u16string itemsToUploadString; + if (_localPasswordsToUpload == 0) { + // No passwords, but there are other items to upload. + itemsToUploadString = base::i18n::MessageFormatter::FormatWithNamedArgs( + l10n_util::GetStringUTF16( + IDS_IOS_GOOGLE_ACCOUNT_SETTINGS_BATCH_UPLOAD_ITEMS_ITEM), + "count", static_cast<int>(_localItemsToUpload), "email", userEmail); + } else if (_localItemsToUpload > 0) { + // Multiple passwords and items to upload. + itemsToUploadString = base::i18n::MessageFormatter::FormatWithNamedArgs( + l10n_util::GetStringUTF16( + IDS_IOS_GOOGLE_ACCOUNT_SETTINGS_BATCH_UPLOAD_PASSWORDS_AND_ITEMS_ITEM), + "count", static_cast<int>(_localPasswordsToUpload), "email", userEmail); + } else { + // No items, but there are passwords to upload. + itemsToUploadString = base::i18n::MessageFormatter::FormatWithNamedArgs( + l10n_util::GetStringUTF16( + IDS_IOS_GOOGLE_ACCOUNT_SETTINGS_BATCH_UPLOAD_PASSWORDS_ITEM), + "count", static_cast<int>(_localPasswordsToUpload), "email", userEmail); + } + return base::SysUTF16ToNSString(itemsToUploadString); +} + +- (SettingsImageDetailTextItem*)batchUploadRecommendationItem { + SettingsImageDetailTextItem* item = [[SettingsImageDetailTextItem alloc] + initWithType:BatchUploadRecommendationItemType]; + item.detailText = [self itemsToUploadRecommendationString]; + item.image = CustomSymbolWithPointSize(kCloudAndArrowUpSymbol, + kBatchUploadSymbolPointSize); + item.imageViewTintColor = [UIColor colorNamed:kBlueColor]; + return item; +} + +- (BOOL)hasLocalDataToUpload { + if (self.syncAccountState != SyncSettingsAccountState::kSignedIn || + !base::FeatureList::IsEnabled(syncer::kSyncEnableBatchUploadLocalData)) { + return NO; + } + + // Batch upload option is not shown if sync is disabled by policy, or if the + // account is in a persistent error state that requires a user action. + if (self.syncErrorItem || self.isSyncDisabledByAdministrator) { + return NO; + } + + // TODO(crbug.com/1451508): Use API counts to update the hard-coded ivars + // _localPasswordsToUpload and _localItemsToUpload. Make sure to ignore all + // types that are disabled by policy. + if (!_localPasswordsToUpload && !_localItemsToUpload) { + return NO; + } + + return YES; +} + +// Deletes the batch upload section. If `notifyConsumer` is YES, the consumer is +// notified about model changes. +- (void)removeBatchUploadSection:(BOOL)notifyConsumer { + TableViewModel* model = self.consumer.tableViewModel; + if (![model hasSectionForSectionIdentifier:BatchUploadSectionIdentifier]) { + return; + } + NSInteger sectionIndex = + [model sectionForSectionIdentifier:BatchUploadSectionIdentifier]; + [model removeSectionWithIdentifier:BatchUploadSectionIdentifier]; + self.batchUploadItem = nil; + + // Remove the batch upload section from the table view model. + if (notifyConsumer) { + NSIndexSet* indexSet = [NSIndexSet indexSetWithIndex:sectionIndex]; + [self.consumer deleteSections:indexSet]; + } +} + +// Updates the batch upload section. If `notifyConsumer` is YES, the consumer is +// notified about model changes. +- (void)updateBatchUploadSection:(BOOL)notifyConsumer { + if (self.syncAccountState != SyncSettingsAccountState::kSignedIn) { + return; + } + + if (![self hasLocalDataToUpload]) { + // The section should be removed if there is no more reason to offer the + // batch upload. + [self removeBatchUploadSection:notifyConsumer]; + return; + } + + TableViewModel* model = self.consumer.tableViewModel; + DCHECK(![model hasSectionForSectionIdentifier:SyncErrorsSectionIdentifier]); + + NSInteger previousSection = + [model sectionForSectionIdentifier:AccountSectionIdentifier]; + DCHECK_NE(NSNotFound, previousSection); + NSInteger batchUploadSectionIndex = previousSection + 1; + + BOOL batchUploadSectionAlreadyExists = self.batchUploadItem; + if (!batchUploadSectionAlreadyExists) { + // Creates the batch upload section. + [model insertSectionWithIdentifier:BatchUploadSectionIdentifier + atIndex:batchUploadSectionIndex]; + self.batchUploadItem = [self batchUploadRecommendationItem]; + [model addItem:self.batchUploadItem + toSectionWithIdentifier:BatchUploadSectionIdentifier]; + [model addItem:[self batchUploadButtonItem] + toSectionWithIdentifier:BatchUploadSectionIdentifier]; + } else if (notifyConsumer) { + // The section already exists, update it. + self.batchUploadItem.detailText = [self itemsToUploadRecommendationString]; + [self.consumer reloadItem:self.batchUploadItem]; + } + + if (notifyConsumer) { + NSIndexSet* indexSet = + [NSIndexSet indexSetWithIndex:batchUploadSectionIndex]; + if (batchUploadSectionAlreadyExists) { + // The section should be updated if it already exists. + [self.consumer reloadSections:indexSet]; + } else { + [self.consumer insertSections:indexSet]; + } + } +} + +- (void)loadBatchUploadSection { + self.batchUploadItem = nil; + [self updateBatchUploadSection:NO]; +} + #pragma mark - Private // Creates a SyncSwitchItem or TableViewInfoButtonItem instance if the item is @@ -822,6 +986,7 @@ } [self loadIdentityAccountSection]; [self loadSyncErrorsSection]; + [self loadBatchUploadSection]; [self loadSyncDataTypeSection]; [self loadSignOutAndTurnOffSyncSection]; [self loadAdvancedSettingsSection]; @@ -836,6 +1001,7 @@ return; } [self updateSyncErrorsSection:YES]; + [self updateBatchUploadSection:YES]; [self updateSyncEverythingItemNotifyConsumer:YES]; [self updateSyncItemsNotifyConsumer:YES]; [self updateEncryptionItem:YES]; @@ -866,6 +1032,7 @@ [self updateIdentityAccountSection]; [self updateSyncItemsNotifyConsumer:YES]; [self updateSyncErrorsSection:YES]; + [self updateBatchUploadSection:YES]; [self updateEncryptionItem:YES]; } } @@ -953,12 +1120,16 @@ case TypesListHeaderOrFooterType: case IdentityAccountItemType: case AccountErrorMessageItemType: + case BatchUploadButtonItemType: + case BatchUploadRecommendationItemType: NOTREACHED(); break; } } [self updateSyncEverythingItemNotifyConsumer:YES]; [self updateSyncItemsNotifyConsumer:YES]; + // Switching toggles might affect the batch upload recommendation. + [self updateBatchUploadSection:YES]; } - (void)didSelectItem:(TableViewItem*)item cellRect:(CGRect)cellRect { @@ -1012,6 +1183,10 @@ case ManageAccountsItemType: [self.commandHandler showAccountsPage]; break; + case BatchUploadButtonItemType: + // TODO(crbug.com/1468246): Should show the batch upload UI. For now, the + // button is clickable but with no-op. + break; case SyncEverythingItemType: case AutofillDataTypeItemType: case BookmarksDataTypeItemType: @@ -1026,6 +1201,7 @@ case TypesListHeaderOrFooterType: case IdentityAccountItemType: case AccountErrorMessageItemType: + case BatchUploadRecommendationItemType: // Nothing to do. break; }
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 b4208dcd..9513fc20 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
@@ -9,6 +9,7 @@ #import "ios/chrome/browser/shared/ui/table_view/cells/table_view_info_button_cell.h" #import "ios/chrome/browser/shared/ui/table_view/cells/table_view_switch_cell.h" #import "ios/chrome/browser/shared/ui/table_view/table_view_utils.h" +#import "ios/chrome/browser/ui/settings/cells/settings_image_detail_text_cell.h" #import "ios/chrome/browser/ui/settings/cells/sync_switch_item.h" #import "ios/chrome/browser/ui/settings/elements/enterprise_info_popover_view_controller.h" #import "ios/chrome/browser/ui/settings/google_services/manage_sync_settings_constants.h" @@ -93,6 +94,8 @@ [managedCell.trailingButton addTarget:self action:@selector(didTapManagedUIInfoButton:) forControlEvents:UIControlEventTouchUpInside]; + } else if ([cell isKindOfClass:[SettingsImageDetailTextCell class]]) { + cell.selectionStyle = UITableViewCellSelectionStyleNone; } return cell; } @@ -141,6 +144,7 @@ // No need to reload since the model has not been loaded yet. return; } + // To avoid animation glitches related to crbug.com/1469539. [UIView performWithoutAnimation:^{ [self.tableView beginUpdates]; [self.tableView deleteSections:sections @@ -155,8 +159,13 @@ return; } NSIndexPath* indexPath = [self.tableViewModel indexPathForItem:item]; - [self.tableView reloadRowsAtIndexPaths:@[ indexPath ] - withRowAnimation:UITableViewRowAnimationNone]; + // To avoid animation glitches related to crbug.com/1469539. + [UIView performWithoutAnimation:^{ + [self.tableView beginUpdates]; + [self.tableView reloadRowsAtIndexPaths:@[ indexPath ] + withRowAnimation:UITableViewRowAnimationNone]; + [self.tableView endUpdates]; + }]; } - (void)reloadSections:(NSIndexSet*)sections {
diff --git a/ios/chrome/browser/ui/settings/password/password_manager_egtest.mm b/ios/chrome/browser/ui/settings/password/password_manager_egtest.mm index 32f4be13..dde42933 100644 --- a/ios/chrome/browser/ui/settings/password/password_manager_egtest.mm +++ b/ios/chrome/browser/ui/settings/password/password_manager_egtest.mm
@@ -528,7 +528,8 @@ if ([self isRunningTest:@selector (testAccountStorageSwitchDisabledByPolicy_SyncToSigninDisabled)] || [self isRunningTest:@selector - (testAccountStorageSwitchShownIfSignedIn_SyncToSigninDisabled)]) { + (testAccountStorageSwitchShownIfSignedIn_SyncToSigninDisabled)] || + [self isRunningTest:@selector(testAccountStorageSwitchHiddenIfSyncing)]) { config.features_disabled.push_back( syncer::kReplaceSyncPromosWithSignInPromos); }
diff --git a/ios/chrome/common/intents/BUILD.gn b/ios/chrome/common/intents/BUILD.gn index 7566368..75b37775 100644 --- a/ios/chrome/common/intents/BUILD.gn +++ b/ios/chrome/common/intents/BUILD.gn
@@ -14,5 +14,6 @@ "OpenBookmarksIntent", "OpenRecentTabsIntent", "OpenTabGridIntent", + "SearchWithVoiceIntent", ] }
diff --git a/ios/chrome/common/intents/Intents.intentdefinition b/ios/chrome/common/intents/Intents.intentdefinition index 4fdbb7f..e4fda86 100644 --- a/ios/chrome/common/intents/Intents.intentdefinition +++ b/ios/chrome/common/intents/Intents.intentdefinition
@@ -563,6 +563,70 @@ <key>INIntentVerb</key> <string>Open</string> </dict> + <dict> + <key>INIntentCategory</key> + <string>information</string> + <key>INIntentConfigurable</key> + <true/> + <key>INIntentDescriptionID</key> + <string>ylmClv</string> + <key>INIntentEligibleForWidgets</key> + <true/> + <key>INIntentManagedParameterCombinations</key> + <dict> + <key></key> + <dict> + <key>INIntentParameterCombinationSupportsBackgroundExecution</key> + <true/> + <key>INIntentParameterCombinationTitle</key> + <string>Search with voice in Chrome</string> + <key>INIntentParameterCombinationTitleID</key> + <string>oq3zlW</string> + <key>INIntentParameterCombinationUpdatesLinked</key> + <true/> + </dict> + </dict> + <key>INIntentName</key> + <string>SearchWithVoice</string> + <key>INIntentParameterCombinations</key> + <dict> + <key></key> + <dict> + <key>INIntentParameterCombinationIsPrimary</key> + <true/> + <key>INIntentParameterCombinationSupportsBackgroundExecution</key> + <true/> + <key>INIntentParameterCombinationTitle</key> + <string>Search with voice in Chrome</string> + <key>INIntentParameterCombinationTitleID</key> + <string>6IUaAa</string> + </dict> + </dict> + <key>INIntentResponse</key> + <dict> + <key>INIntentResponseCodes</key> + <array> + <dict> + <key>INIntentResponseCodeName</key> + <string>success</string> + <key>INIntentResponseCodeSuccess</key> + <true/> + </dict> + <dict> + <key>INIntentResponseCodeName</key> + <string>failure</string> + </dict> + </array> + </dict> + <key>INIntentTitle</key> + <string>Search with voice in Chrome</string> + <key>INIntentTitleID</key> + <string>7Qq5ww</string> + <key>INIntentType</key> + <string>Custom</string> + <key>INIntentVerb</key> + <string>Open</string> + </dict> </array> <key>INTypes</key> <array/>
diff --git a/ios/chrome/intents_extension/chrome_intents_handler.mm b/ios/chrome/intents_extension/chrome_intents_handler.mm index d6d91a9a..453cd7b 100644 --- a/ios/chrome/intents_extension/chrome_intents_handler.mm +++ b/ios/chrome/intents_extension/chrome_intents_handler.mm
@@ -13,6 +13,7 @@ #import "ios/chrome/common/intents/OpenRecentTabsIntent.h" #import "ios/chrome/common/intents/OpenTabGridIntent.h" #import "ios/chrome/common/intents/SearchInChromeIntent.h" +#import "ios/chrome/common/intents/SearchWithVoiceIntent.h" @interface ChromeIntentsHandler () <OpenInChromeIncognitoIntentHandling, OpenInChromeIntentHandling, @@ -20,7 +21,8 @@ OpenReadingListIntentHandling, OpenBookmarksIntentHandling, OpenRecentTabsIntentHandling, - OpenTabGridIntentHandling> + OpenTabGridIntentHandling, + SearchWithVoiceIntentHandling> @end @implementation ChromeIntentsHandler @@ -174,4 +176,20 @@ completion(response); } +#pragma mark - SearchWithVoiceIntentHandling + +- (void)handleSearchWithVoice:(SearchWithVoiceIntent*)intent + completion: + (void (^)(SearchWithVoiceIntentResponse*))completion { + NSUserActivity* activity = [[NSUserActivity alloc] + initWithActivityType:NSStringFromClass([SearchWithVoiceIntent class])]; + + SearchWithVoiceIntentResponse* response = + [[SearchWithVoiceIntentResponse alloc] + initWithCode:SearchWithVoiceIntentResponseCodeContinueInApp + userActivity:activity]; + + completion(response); +} + @end
diff --git a/media/gpu/mac/video_toolbox_decode_metadata.h b/media/gpu/mac/video_toolbox_decode_metadata.h index 549a936..d5211b1 100644 --- a/media/gpu/mac/video_toolbox_decode_metadata.h +++ b/media/gpu/mac/video_toolbox_decode_metadata.h
@@ -5,6 +5,7 @@ #ifndef MEDIA_GPU_MAC_VIDEO_TOOLBOX_DECODE_METADATA_H_ #define MEDIA_GPU_MAC_VIDEO_TOOLBOX_DECODE_METADATA_H_ +#include "base/apple/scoped_cftyperef.h" #include "base/memory/scoped_refptr.h" #include "base/time/time.h" #include "media/base/timestamp_constants.h" @@ -17,6 +18,11 @@ namespace media { +struct MEDIA_GPU_EXPORT VideoToolboxSessionMetadata { + bool allow_software_decoding = false; + bool is_hbd = false; +}; + struct MEDIA_GPU_EXPORT VideoToolboxDecodeMetadata { VideoToolboxDecodeMetadata(); ~VideoToolboxDecodeMetadata(); @@ -28,6 +34,8 @@ VideoAspectRatio aspect_ratio; gfx::ColorSpace color_space; absl::optional<gfx::HDRMetadata> hdr_metadata; + + VideoToolboxSessionMetadata session; }; } // namespace media
diff --git a/media/gpu/mac/video_toolbox_decompression_interface.cc b/media/gpu/mac/video_toolbox_decompression_interface.cc index 6e7897a..d0032054 100644 --- a/media/gpu/mac/video_toolbox_decompression_interface.cc +++ b/media/gpu/mac/video_toolbox_decompression_interface.cc
@@ -131,7 +131,7 @@ // Create a new session if necessary. if (!decompression_session_->IsValid()) { - if (!CreateSession(format)) { + if (!CreateSession(format, metadata->session)) { return false; } } @@ -151,11 +151,13 @@ } bool VideoToolboxDecompressionInterface::CreateSession( - CMFormatDescriptionRef format) { + CMFormatDescriptionRef format, + const VideoToolboxSessionMetadata& session_metadata) { DVLOG(2) << __func__; DCHECK(task_runner_->RunsTasksInCurrentSequence()); DCHECK(!decompression_session_->IsValid()); + // Build video decoder specification. base::apple::ScopedCFTypeRef<CFMutableDictionaryRef> decoder_config( CFDictionaryCreateMutable(kCFAllocatorDefault, 1, // capacity @@ -171,23 +173,61 @@ decoder_config, kVTVideoDecoderSpecification_EnableHardwareAcceleratedVideoDecoder, kCFBooleanTrue); - - // We don't have software HEVC decoders to fall back to. - // TODO(crbug.com/1331597): Plumb hardware requirement from the accelerator. - FourCharCode codec_type = CMFormatDescriptionGetMediaSubType(format); - bool require_hardware = (codec_type != kCMVideoCodecType_HEVC) && - (codec_type != kCMVideoCodecType_HEVCWithAlpha); - CFDictionarySetValue( decoder_config, kVTVideoDecoderSpecification_RequireHardwareAcceleratedVideoDecoder, - require_hardware ? kCFBooleanTrue : kCFBooleanFalse); + session_metadata.allow_software_decoding ? kCFBooleanFalse + : kCFBooleanTrue); #endif - if (!decompression_session_->Create(format, decoder_config)) { + // Build destination image buffer attributes. + // + // It is possible to create a decompression session with no destination image + // buffer attributes, but then we must be able to handle any kind of pixel + // format that VideoToolbox can produce, and there is no definitive list. + // + // Some formats that have been seen include: + // - 12-bit YUV: 'tv20', 'tv22', 'tv44' + // - 10-bit YUV: 'p420', 'p422', 'p444' + // - 8-bit YUV: '420v', '422v', '444v' + // + // Other plausible formats include RGB, monochrome, and versions of the above + // with alpha (eg. 'v0a8') and/or full-range (eg. '420f'). + // + // Rather than explicitly handling every possible format in + // VideoToolboxFrameConverter, it may be possible to introspect the IOSurfaces + // at run time and map them to viz formats. + // + // For now we just ask VideoToolbox to convert everything to NV12/P010. + // + // TODO(crbug.com/1331597): Do not create an image config for known-supported + // formats, and add full-range versions as supported formats. + base::apple::ScopedCFTypeRef<CFMutableDictionaryRef> image_config( + CFDictionaryCreateMutable(kCFAllocatorDefault, + 1, // capacity + &kCFTypeDictionaryKeyCallBacks, + &kCFTypeDictionaryValueCallBacks)); + if (!image_config) { + MEDIA_LOG(ERROR, media_log_.get()) << "CFDictionaryCreateMutable() failed"; return false; } + FourCharCode pixel_format = + session_metadata.is_hbd ? kCVPixelFormatType_420YpCbCr10BiPlanarVideoRange + : kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange; + + base::apple::ScopedCFTypeRef<CFNumberRef> cf_pixel_format( + CFNumberCreate(kCFAllocatorDefault, kCFNumberIntType, &pixel_format)); + + CFDictionarySetValue(image_config, kCVPixelBufferPixelFormatTypeKey, + cf_pixel_format); + + // Create the session. + if (!decompression_session_->Create(format, decoder_config, image_config)) { + return false; + } + + // Update state. active_format_.reset(format, base::scoped_policy::RETAIN); return true; }
diff --git a/media/gpu/mac/video_toolbox_decompression_interface.h b/media/gpu/mac/video_toolbox_decompression_interface.h index 918c309a..bd7c535 100644 --- a/media/gpu/mac/video_toolbox_decompression_interface.h +++ b/media/gpu/mac/video_toolbox_decompression_interface.h
@@ -25,6 +25,7 @@ class MediaLog; struct VideoToolboxDecodeMetadata; +struct VideoToolboxSessionMetadata; class VideoToolboxDecompressionSession; // Wraps VideoToolboxDecompressionSession to handle reconfiguration. Callbacks @@ -76,7 +77,9 @@ [[nodiscard]] bool Process(); // Create a new VideoToolbox decompression session for |format|. - [[nodiscard]] bool CreateSession(CMFormatDescriptionRef format); + [[nodiscard]] bool CreateSession( + CMFormatDescriptionRef format, + const VideoToolboxSessionMetadata& session_metadata); // Shut down the active session, synchronously. void DestroySession();
diff --git a/media/gpu/mac/video_toolbox_decompression_interface_unittest.cc b/media/gpu/mac/video_toolbox_decompression_interface_unittest.cc index 92f2fd6..b00eea3 100644 --- a/media/gpu/mac/video_toolbox_decompression_interface_unittest.cc +++ b/media/gpu/mac/video_toolbox_decompression_interface_unittest.cc
@@ -64,14 +64,15 @@ class FakeDecompressionSession : public VideoToolboxDecompressionSession { public: - FakeDecompressionSession( + explicit FakeDecompressionSession( VideoToolboxDecompressionSessionImpl::OutputCB output_cb) : output_cb_(std::move(output_cb)) {} ~FakeDecompressionSession() override = default; bool Create(CMFormatDescriptionRef format, - CFMutableDictionaryRef decoder_config) override { + CFDictionaryRef decoder_config, + CFDictionaryRef image_config) override { CHECK(!IsValid()); ++creations; if (can_create) {
diff --git a/media/gpu/mac/video_toolbox_decompression_session.cc b/media/gpu/mac/video_toolbox_decompression_session.cc index 8fd31c1..48c56228 100644 --- a/media/gpu/mac/video_toolbox_decompression_session.cc +++ b/media/gpu/mac/video_toolbox_decompression_session.cc
@@ -47,7 +47,8 @@ bool VideoToolboxDecompressionSessionImpl::Create( CMFormatDescriptionRef format, - CFMutableDictionaryRef decoder_config) { + CFDictionaryRef decoder_config, + CFDictionaryRef image_config) { DVLOG(2) << __func__; DCHECK(task_runner_->RunsTasksInCurrentSequence()); DCHECK(!IsValid()); @@ -59,7 +60,7 @@ kCFAllocatorDefault, format, // video_format_description decoder_config, // video_decoder_specification - nullptr, // destination_image_buffer_attributes + image_config, // destination_image_buffer_attributes &callback, // output_callback session_.InitializeInto()); if (status != noErr) {
diff --git a/media/gpu/mac/video_toolbox_decompression_session.h b/media/gpu/mac/video_toolbox_decompression_session.h index b1938e9..5ac04f9ff 100644 --- a/media/gpu/mac/video_toolbox_decompression_session.h +++ b/media/gpu/mac/video_toolbox_decompression_session.h
@@ -31,7 +31,8 @@ virtual ~VideoToolboxDecompressionSession() = default; virtual bool Create(CMFormatDescriptionRef format, - CFMutableDictionaryRef decoder_config) = 0; + CFDictionaryRef decoder_config, + CFDictionaryRef image_config) = 0; virtual void Invalidate() = 0; virtual bool IsValid() = 0; virtual bool CanAcceptFormat(CMFormatDescriptionRef format) = 0; @@ -58,7 +59,8 @@ // VideoToolboxDecompressionSession implementation. bool Create(CMFormatDescriptionRef format, - CFMutableDictionaryRef decoder_config) override; + CFDictionaryRef decoder_config, + CFDictionaryRef image_config) override; void Invalidate() override; bool IsValid() override; bool CanAcceptFormat(CMFormatDescriptionRef format) override;
diff --git a/media/gpu/mac/video_toolbox_frame_converter.cc b/media/gpu/mac/video_toolbox_frame_converter.cc index 2a3db72..f20eeaf5 100644 --- a/media/gpu/mac/video_toolbox_frame_converter.cc +++ b/media/gpu/mac/video_toolbox_frame_converter.cc
@@ -41,11 +41,24 @@ switch (pixel_format) { case kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange: return viz::MultiPlaneFormat::kNV12; + case kCVPixelFormatType_420YpCbCr10BiPlanarVideoRange: + return viz::MultiPlaneFormat::kP010; default: return absl::nullopt; } } +VideoPixelFormat PixelFormatToVideoPixelFormat(OSType pixel_format) { + switch (pixel_format) { + case kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange: + return PIXEL_FORMAT_NV12; + case kCVPixelFormatType_420YpCbCr10BiPlanarVideoRange: + return PIXEL_FORMAT_P016LE; + default: + return PIXEL_FORMAT_UNKNOWN; + } +} + bool IsWebGPUCompatible(OSType pixel_format) { return pixel_format == kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange; } @@ -164,6 +177,9 @@ return; } + VideoPixelFormat video_pixel_format = + PixelFormatToVideoPixelFormat(pixel_format); + gpu::Mailbox mailbox = gpu::Mailbox::GenerateForSharedImage(); bool result = sis_->CreateSharedImage( mailbox, std::move(handle), *format, coded_size, metadata->color_space, @@ -191,7 +207,7 @@ // which would allow the renderer to map the IOSurface, but this is more // expensive whenever the renderer is not doing readback. scoped_refptr<VideoFrame> frame = VideoFrame::WrapNativeTextures( - PIXEL_FORMAT_NV12, mailbox_holders, std::move(release_cb), coded_size, + video_pixel_format, mailbox_holders, std::move(release_cb), coded_size, visible_rect, natural_size, metadata->timestamp); if (!frame) {
diff --git a/media/gpu/mac/video_toolbox_h264_accelerator.cc b/media/gpu/mac/video_toolbox_h264_accelerator.cc index 7750b39a..60fa3f8 100644 --- a/media/gpu/mac/video_toolbox_h264_accelerator.cc +++ b/media/gpu/mac/video_toolbox_h264_accelerator.cc
@@ -199,7 +199,9 @@ return Status::kFail; } - decode_cb_.Run(std::move(sample), std::move(pic)); + VideoToolboxSessionMetadata session_metadata = { + /*allow_software_decoding=*/false, /*is_hbd=*/false}; + decode_cb_.Run(std::move(sample), session_metadata, std::move(pic)); return Status::kOk; }
diff --git a/media/gpu/mac/video_toolbox_h264_accelerator.h b/media/gpu/mac/video_toolbox_h264_accelerator.h index 2c6ae32..d61ca4e 100644 --- a/media/gpu/mac/video_toolbox_h264_accelerator.h +++ b/media/gpu/mac/video_toolbox_h264_accelerator.h
@@ -17,6 +17,7 @@ #include "base/functional/callback.h" #include "base/sequence_checker.h" #include "media/gpu/h264_decoder.h" +#include "media/gpu/mac/video_toolbox_decode_metadata.h" #include "media/gpu/media_gpu_export.h" namespace media { @@ -28,6 +29,7 @@ public: using DecodeCB = base::RepeatingCallback<void( base::apple::ScopedCFTypeRef<CMSampleBufferRef>, + VideoToolboxSessionMetadata, scoped_refptr<CodecPicture>)>; using OutputCB = base::RepeatingCallback<void(scoped_refptr<CodecPicture>)>;
diff --git a/media/gpu/mac/video_toolbox_h264_accelerator_unittest.cc b/media/gpu/mac/video_toolbox_h264_accelerator_unittest.cc index a922bcb..32deb5b6 100644 --- a/media/gpu/mac/video_toolbox_h264_accelerator_unittest.cc +++ b/media/gpu/mac/video_toolbox_h264_accelerator_unittest.cc
@@ -44,8 +44,9 @@ ~VideoToolboxH264AcceleratorTest() override = default; protected: - MOCK_METHOD2(OnDecode, + MOCK_METHOD3(OnDecode, void(base::apple::ScopedCFTypeRef<CMSampleBufferRef>, + VideoToolboxSessionMetadata, scoped_refptr<CodecPicture>)); MOCK_METHOD1(OnOutput, void(scoped_refptr<CodecPicture>)); @@ -79,7 +80,7 @@ // Save the resulting sample. base::apple::ScopedCFTypeRef<CMSampleBufferRef> sample; - EXPECT_CALL(*this, OnDecode(_, _)).WillOnce(SaveArg<0>(&sample)); + EXPECT_CALL(*this, OnDecode(_, _, _)).WillOnce(SaveArg<0>(&sample)); accelerator_->SubmitDecode(pic); // Verify sample. @@ -116,7 +117,7 @@ // Save the resulting sample. base::apple::ScopedCFTypeRef<CMSampleBufferRef> sample0; - EXPECT_CALL(*this, OnDecode(_, _)).WillOnce(SaveArg<0>(&sample0)); + EXPECT_CALL(*this, OnDecode(_, _, _)).WillOnce(SaveArg<0>(&sample0)); accelerator_->SubmitDecode(pic0); // Second frame. @@ -129,7 +130,7 @@ // Save the resulting sample. base::apple::ScopedCFTypeRef<CMSampleBufferRef> sample1; - EXPECT_CALL(*this, OnDecode(_, _)).WillOnce(SaveArg<0>(&sample1)); + EXPECT_CALL(*this, OnDecode(_, _, _)).WillOnce(SaveArg<0>(&sample1)); accelerator_->SubmitDecode(pic1); // The two samples should have the same configuration. @@ -157,7 +158,7 @@ // Save the resulting sample. base::apple::ScopedCFTypeRef<CMSampleBufferRef> sample0; - EXPECT_CALL(*this, OnDecode(_, _)).WillOnce(SaveArg<0>(&sample0)); + EXPECT_CALL(*this, OnDecode(_, _, _)).WillOnce(SaveArg<0>(&sample0)); accelerator_->SubmitDecode(pic0); // Reset. @@ -173,7 +174,7 @@ // Save the resulting sample. base::apple::ScopedCFTypeRef<CMSampleBufferRef> sample1; - EXPECT_CALL(*this, OnDecode(_, _)).WillOnce(SaveArg<0>(&sample1)); + EXPECT_CALL(*this, OnDecode(_, _, _)).WillOnce(SaveArg<0>(&sample1)); accelerator_->SubmitDecode(pic1); // The two samples should have different configurations. @@ -201,7 +202,7 @@ // Save the resulting sample. base::apple::ScopedCFTypeRef<CMSampleBufferRef> sample0; - EXPECT_CALL(*this, OnDecode(_, _)).WillOnce(SaveArg<0>(&sample0)); + EXPECT_CALL(*this, OnDecode(_, _, _)).WillOnce(SaveArg<0>(&sample0)); accelerator_->SubmitDecode(pic0); // Second frame. @@ -214,7 +215,7 @@ // Save the resulting sample. base::apple::ScopedCFTypeRef<CMSampleBufferRef> sample1; - EXPECT_CALL(*this, OnDecode(_, _)).WillOnce(SaveArg<0>(&sample1)); + EXPECT_CALL(*this, OnDecode(_, _, _)).WillOnce(SaveArg<0>(&sample1)); accelerator_->SubmitDecode(pic1); // The two samples should have different configurations.
diff --git a/media/gpu/mac/video_toolbox_h265_accelerator.cc b/media/gpu/mac/video_toolbox_h265_accelerator.cc index a77437be..c44f250 100644 --- a/media/gpu/mac/video_toolbox_h265_accelerator.cc +++ b/media/gpu/mac/video_toolbox_h265_accelerator.cc
@@ -126,6 +126,11 @@ active_vps_data_ = vps_data; active_sps_data_ = sps_data; active_pps_data_ = pps_data; + + session_metadata_ = VideoToolboxSessionMetadata{ + /*allow_software_decoding=*/true, + /*is_hbd=*/sps->bit_depth_y > 8, + }; } return Status::kOk; @@ -233,7 +238,7 @@ return Status::kFail; } - decode_cb_.Run(std::move(sample), std::move(pic)); + decode_cb_.Run(std::move(sample), session_metadata_, std::move(pic)); return Status::kOk; }
diff --git a/media/gpu/mac/video_toolbox_h265_accelerator.h b/media/gpu/mac/video_toolbox_h265_accelerator.h index 8ccc9682..7336775 100644 --- a/media/gpu/mac/video_toolbox_h265_accelerator.h +++ b/media/gpu/mac/video_toolbox_h265_accelerator.h
@@ -17,6 +17,7 @@ #include "base/functional/callback.h" #include "base/sequence_checker.h" #include "media/gpu/h265_decoder.h" +#include "media/gpu/mac/video_toolbox_decode_metadata.h" #include "media/gpu/media_gpu_export.h" namespace media { @@ -28,6 +29,7 @@ public: using DecodeCB = base::RepeatingCallback<void( base::apple::ScopedCFTypeRef<CMSampleBufferRef>, + VideoToolboxSessionMetadata, scoped_refptr<CodecPicture>)>; using OutputCB = base::RepeatingCallback<void(scoped_refptr<CodecPicture>)>; @@ -89,6 +91,7 @@ std::vector<uint8_t> active_pps_data_; base::apple::ScopedCFTypeRef<CMFormatDescriptionRef> active_format_; + VideoToolboxSessionMetadata session_metadata_; // Accumulated slice data for the current frame. std::vector<base::span<const uint8_t>> slice_nalu_data_;
diff --git a/media/gpu/mac/video_toolbox_h265_accelerator_unittest.cc b/media/gpu/mac/video_toolbox_h265_accelerator_unittest.cc index 06419de..6a9f8ac 100644 --- a/media/gpu/mac/video_toolbox_h265_accelerator_unittest.cc +++ b/media/gpu/mac/video_toolbox_h265_accelerator_unittest.cc
@@ -53,8 +53,9 @@ ~VideoToolboxH265AcceleratorTest() override = default; protected: - MOCK_METHOD2(OnDecode, + MOCK_METHOD3(OnDecode, void(base::apple::ScopedCFTypeRef<CMSampleBufferRef>, + VideoToolboxSessionMetadata, scoped_refptr<CodecPicture>)); MOCK_METHOD1(OnOutput, void(scoped_refptr<CodecPicture>)); @@ -91,7 +92,7 @@ // Save the resulting sample. base::apple::ScopedCFTypeRef<CMSampleBufferRef> sample; - EXPECT_CALL(*this, OnDecode(_, _)).WillOnce(SaveArg<0>(&sample)); + EXPECT_CALL(*this, OnDecode(_, _, _)).WillOnce(SaveArg<0>(&sample)); accelerator_->SubmitDecode(pic); // Verify sample. @@ -131,7 +132,7 @@ // Save the resulting sample. base::apple::ScopedCFTypeRef<CMSampleBufferRef> sample0; - EXPECT_CALL(*this, OnDecode(_, _)).WillOnce(SaveArg<0>(&sample0)); + EXPECT_CALL(*this, OnDecode(_, _, _)).WillOnce(SaveArg<0>(&sample0)); accelerator_->SubmitDecode(pic0); // Second frame. @@ -147,7 +148,7 @@ // Save the resulting sample. base::apple::ScopedCFTypeRef<CMSampleBufferRef> sample1; - EXPECT_CALL(*this, OnDecode(_, _)).WillOnce(SaveArg<0>(&sample1)); + EXPECT_CALL(*this, OnDecode(_, _, _)).WillOnce(SaveArg<0>(&sample1)); accelerator_->SubmitDecode(pic1); // The two samples should have the same configuration. @@ -178,7 +179,7 @@ // Save the resulting sample. base::apple::ScopedCFTypeRef<CMSampleBufferRef> sample0; - EXPECT_CALL(*this, OnDecode(_, _)).WillOnce(SaveArg<0>(&sample0)); + EXPECT_CALL(*this, OnDecode(_, _, _)).WillOnce(SaveArg<0>(&sample0)); accelerator_->SubmitDecode(pic0); // Reset. @@ -197,7 +198,7 @@ // Save the resulting sample. base::apple::ScopedCFTypeRef<CMSampleBufferRef> sample1; - EXPECT_CALL(*this, OnDecode(_, _)).WillOnce(SaveArg<0>(&sample1)); + EXPECT_CALL(*this, OnDecode(_, _, _)).WillOnce(SaveArg<0>(&sample1)); accelerator_->SubmitDecode(pic1); // The two samples should have different configurations. @@ -228,7 +229,7 @@ // Save the resulting sample. base::apple::ScopedCFTypeRef<CMSampleBufferRef> sample0; - EXPECT_CALL(*this, OnDecode(_, _)).WillOnce(SaveArg<0>(&sample0)); + EXPECT_CALL(*this, OnDecode(_, _, _)).WillOnce(SaveArg<0>(&sample0)); accelerator_->SubmitDecode(pic0); // Second frame. @@ -244,7 +245,7 @@ // Save the resulting sample. base::apple::ScopedCFTypeRef<CMSampleBufferRef> sample1; - EXPECT_CALL(*this, OnDecode(_, _)).WillOnce(SaveArg<0>(&sample1)); + EXPECT_CALL(*this, OnDecode(_, _, _)).WillOnce(SaveArg<0>(&sample1)); accelerator_->SubmitDecode(pic1); // The two samples should have different configurations.
diff --git a/media/gpu/mac/video_toolbox_video_decoder.cc b/media/gpu/mac/video_toolbox_video_decoder.cc index 94bdab6..962ab76 100644 --- a/media/gpu/mac/video_toolbox_video_decoder.cc +++ b/media/gpu/mac/video_toolbox_video_decoder.cc
@@ -325,6 +325,7 @@ void VideoToolboxVideoDecoder::OnAcceleratorDecode( base::apple::ScopedCFTypeRef<CMSampleBufferRef> sample, + VideoToolboxSessionMetadata session_metadata, scoped_refptr<CodecPicture> picture) { DVLOG(4) << __func__; DCHECK(active_decode_); @@ -340,9 +341,15 @@ } metadata->hdr_metadata = accelerator_->GetHDRMetadata(); if (!metadata->hdr_metadata) { + // TODO(crbug.com/1331597): This HDR metadata arrives too late to affect the + // VideoToolbox format extensions. Either the HDR metadata should be passed + // to the accelerator constructors, or the accelerated video decoders need + // to pass it through (like they already do for color space). metadata->hdr_metadata = config_.hdr_metadata(); } + metadata->session = session_metadata; + video_toolbox_.Decode(std::move(sample), std::move(metadata)); }
diff --git a/media/gpu/mac/video_toolbox_video_decoder.h b/media/gpu/mac/video_toolbox_video_decoder.h index 25ea580..f84800c 100644 --- a/media/gpu/mac/video_toolbox_video_decoder.h +++ b/media/gpu/mac/video_toolbox_video_decoder.h
@@ -85,6 +85,7 @@ // |accelerator_| callbacks. void OnAcceleratorDecode( base::apple::ScopedCFTypeRef<CMSampleBufferRef> sample, + VideoToolboxSessionMetadata session_metadata, scoped_refptr<CodecPicture> picture); void OnAcceleratorOutput(scoped_refptr<CodecPicture> picture);
diff --git a/media/gpu/mac/video_toolbox_vp9_accelerator.cc b/media/gpu/mac/video_toolbox_vp9_accelerator.cc index 9565a84..ae84777 100644 --- a/media/gpu/mac/video_toolbox_vp9_accelerator.cc +++ b/media/gpu/mac/video_toolbox_vp9_accelerator.cc
@@ -99,7 +99,7 @@ if (format_changed && frame_data_) { // TODO(crbug.com/1331597): Consider dropping existing frame data. Doing so - // probably requires handing output callbacks ourselves, so that we don't + // probably requires handling output callbacks ourselves, so that we don't // have to figure out which ones are duplicates. // TODO(crbug.com/1331597): Add Reset() to VP9Accelerator for resetting // superframe state after Flush(). @@ -197,6 +197,11 @@ active_hdr_metadata_ = hdr_metadata; active_coded_size_ = coded_size; + session_metadata_ = VideoToolboxSessionMetadata{ + /*allow_software_decoding=*/false, + /*is_hbd=*/pic->frame_hdr->bit_depth > 8, + }; + *format_changed = true; } else { *format_changed = false; @@ -278,7 +283,7 @@ } // Submit for decoding. - decode_cb_.Run(std::move(sample), std::move(output_pic)); + decode_cb_.Run(std::move(sample), session_metadata_, std::move(output_pic)); return true; }
diff --git a/media/gpu/mac/video_toolbox_vp9_accelerator.h b/media/gpu/mac/video_toolbox_vp9_accelerator.h index f29ec31..0113b5c 100644 --- a/media/gpu/mac/video_toolbox_vp9_accelerator.h +++ b/media/gpu/mac/video_toolbox_vp9_accelerator.h
@@ -18,6 +18,7 @@ #include "base/sequence_checker.h" #include "media/base/video_codecs.h" #include "media/base/video_color_space.h" +#include "media/gpu/mac/video_toolbox_decode_metadata.h" #include "media/gpu/media_gpu_export.h" #include "media/gpu/vp9_decoder.h" #include "third_party/abseil-cpp/absl/types/optional.h" @@ -37,6 +38,7 @@ public: using DecodeCB = base::RepeatingCallback<void( base::apple::ScopedCFTypeRef<CMSampleBufferRef>, + VideoToolboxSessionMetadata, scoped_refptr<CodecPicture>)>; using OutputCB = base::RepeatingCallback<void(scoped_refptr<CodecPicture>)>; @@ -80,6 +82,7 @@ gfx::Size active_coded_size_; base::apple::ScopedCFTypeRef<CMFormatDescriptionRef> active_format_; + VideoToolboxSessionMetadata session_metadata_; // The superframe currently being built. base::apple::ScopedCFTypeRef<CMBlockBufferRef> frame_data_;
diff --git a/media/gpu/mac/video_toolbox_vp9_accelerator_unittest.cc b/media/gpu/mac/video_toolbox_vp9_accelerator_unittest.cc index ea202094..aa699a4 100644 --- a/media/gpu/mac/video_toolbox_vp9_accelerator_unittest.cc +++ b/media/gpu/mac/video_toolbox_vp9_accelerator_unittest.cc
@@ -23,8 +23,9 @@ ~VideoToolboxVP9AcceleratorTest() override = default; protected: - MOCK_METHOD2(OnDecode, + MOCK_METHOD3(OnDecode, void(base::apple::ScopedCFTypeRef<CMSampleBufferRef>, + VideoToolboxSessionMetadata, scoped_refptr<CodecPicture>)); MOCK_METHOD1(OnOutput, void(scoped_refptr<CodecPicture>)); @@ -55,7 +56,7 @@ // Save the resulting sample. base::apple::ScopedCFTypeRef<CMSampleBufferRef> sample; - EXPECT_CALL(*this, OnDecode(_, _)).WillOnce(SaveArg<0>(&sample)); + EXPECT_CALL(*this, OnDecode(_, _, _)).WillOnce(SaveArg<0>(&sample)); EXPECT_CALL(*this, OnOutput(_)); accelerator_->SubmitDecode(pic, segm_params, lf_params, reference_frames, std::move(done_cb)); @@ -91,7 +92,7 @@ // Save the resulting sample. base::apple::ScopedCFTypeRef<CMSampleBufferRef> sample; - EXPECT_CALL(*this, OnDecode(_, _)).WillOnce(SaveArg<0>(&sample)); + EXPECT_CALL(*this, OnDecode(_, _, _)).WillOnce(SaveArg<0>(&sample)); EXPECT_CALL(*this, OnOutput(_)); accelerator_->SubmitDecode(pic1, segm_params, lf_params, reference_frames, std::move(done_cb));
diff --git a/sandbox/policy/linux/bpf_tts_policy_linux.cc b/sandbox/policy/linux/bpf_tts_policy_linux.cc index 0d8b666..675a27c8 100644 --- a/sandbox/policy/linux/bpf_tts_policy_linux.cc +++ b/sandbox/policy/linux/bpf_tts_policy_linux.cc
@@ -26,6 +26,7 @@ ResultExpr TtsProcessPolicy::EvaluateSyscall(int sysno) const { switch (sysno) { + case __NR_getcpu: case __NR_sysinfo: return Allow(); default:
diff --git a/testing/buildbot/chromium.cft.json b/testing/buildbot/chromium.cft.json index 5b3ea7b..a25b5d2e 100644 --- a/testing/buildbot/chromium.cft.json +++ b/testing/buildbot/chromium.cft.json
@@ -221,6 +221,29 @@ }, { "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.linux.cr23_browser_tests.filter", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "isolate_profile_data": true, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_browser_tests", + "swarming": { + "dimensions": { + "cpu": "arm64", + "os": "Ubuntu-20.04" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 20 + }, + "test": "browser_tests", + "test_id_prefix": "ninja://chrome/test:browser_tests/" + }, + { + "args": [ "--gtest_filter=-*UsingRealWebcam*" ], "isolate_profile_data": true, @@ -706,6 +729,29 @@ "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" }, { + "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.linux.cr23_interactive_ui_tests.filter", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "isolate_profile_data": true, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_interactive_ui_tests", + "swarming": { + "dimensions": { + "cpu": "arm64", + "os": "Ubuntu-20.04" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 10 + }, + "test": "interactive_ui_tests", + "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" + }, + { "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -1204,6 +1250,27 @@ "test_id_prefix": "ninja://ui/views:views_unittests/" }, { + "args": [ + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "isolate_profile_data": true, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_views_unittests", + "swarming": { + "dimensions": { + "cpu": "arm64", + "os": "Ubuntu-20.04" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "views_unittests", + "test_id_prefix": "ninja://ui/views:views_unittests/" + }, + { "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -2088,6 +2155,28 @@ }, { "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.linux.cr23_browser_tests.filter", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "isolate_profile_data": true, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_browser_tests", + "swarming": { + "dimensions": { + "os": "Ubuntu-22.04" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 20 + }, + "test": "browser_tests", + "test_id_prefix": "ninja://chrome/test:browser_tests/" + }, + { + "args": [ "--gtest_filter=-*UsingRealWebcam*" ], "isolate_profile_data": true, @@ -2544,6 +2633,28 @@ "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" }, { + "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.linux.cr23_interactive_ui_tests.filter", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "isolate_profile_data": true, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_interactive_ui_tests", + "swarming": { + "dimensions": { + "os": "Ubuntu-22.04" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 10 + }, + "test": "interactive_ui_tests", + "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" + }, + { "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -3037,6 +3148,26 @@ "test_id_prefix": "ninja://ui/views:views_unittests/" }, { + "args": [ + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "isolate_profile_data": true, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_views_unittests", + "swarming": { + "dimensions": { + "os": "Ubuntu-22.04" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "views_unittests", + "test_id_prefix": "ninja://ui/views:views_unittests/" + }, + { "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -3859,6 +3990,29 @@ }, { "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.mac.cr23_browser_tests.filter", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "isolate_profile_data": true, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_browser_tests", + "swarming": { + "dimensions": { + "cpu": "x86-64", + "os": "Mac-13" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 20 + }, + "test": "browser_tests", + "test_id_prefix": "ninja://chrome/test:browser_tests/" + }, + { + "args": [ "--gtest_filter=-*UsingRealWebcam*" ], "isolate_profile_data": true, @@ -4332,6 +4486,29 @@ "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" }, { + "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.mac.cr23_interactive_ui_tests.filter", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "isolate_profile_data": true, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_interactive_ui_tests", + "swarming": { + "dimensions": { + "cpu": "x86-64", + "os": "Mac-13" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 10 + }, + "test": "interactive_ui_tests", + "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" + }, + { "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -4815,6 +4992,27 @@ "test_id_prefix": "ninja://ui/views:views_unittests/" }, { + "args": [ + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "isolate_profile_data": true, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_views_unittests", + "swarming": { + "dimensions": { + "cpu": "x86-64", + "os": "Mac-13" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "views_unittests", + "test_id_prefix": "ninja://ui/views:views_unittests/" + }, + { "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -5402,6 +5600,29 @@ }, { "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.win.cr23_browser_tests.filter", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "isolate_profile_data": true, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_browser_tests", + "swarming": { + "dimensions": { + "cpu": "x86-64", + "os": "Windows-10-19045" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 20 + }, + "test": "browser_tests", + "test_id_prefix": "ninja://chrome/test:browser_tests/" + }, + { + "args": [ "--browser-ui-tests-verify-pixels", "--enable-pixel-output-in-tests", "--test-launcher-filter-file=../../testing/buildbot/filters/pixel_tests.filter;../../testing/buildbot/filters/cr23.win.cr23_browser_tests.filter", @@ -6015,6 +6236,29 @@ }, { "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.win.cr23_interactive_ui_tests.filter", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "isolate_profile_data": true, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_interactive_ui_tests", + "swarming": { + "dimensions": { + "cpu": "x86-64", + "os": "Windows-10-19045" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 10 + }, + "test": "interactive_ui_tests", + "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" + }, + { + "args": [ "--browser-ui-tests-verify-pixels", "--enable-pixel-output-in-tests", "--test-launcher-filter-file=../../testing/buildbot/filters/pixel_tests.filter;../../testing/buildbot/filters/cr23.win.cr23_interactive_ui_tests.filter", @@ -6667,6 +6911,27 @@ "test_id_prefix": "ninja://ui/views:views_unittests/" }, { + "args": [ + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "isolate_profile_data": true, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_views_unittests", + "swarming": { + "dimensions": { + "cpu": "x86-64", + "os": "Windows-10-19045" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "views_unittests", + "test_id_prefix": "ninja://ui/views:views_unittests/" + }, + { "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py"
diff --git a/testing/buildbot/chromium.chromiumos.json b/testing/buildbot/chromium.chromiumos.json index 251354d9..0442a83 100644 --- a/testing/buildbot/chromium.chromiumos.json +++ b/testing/buildbot/chromium.chromiumos.json
@@ -3046,7 +3046,6 @@ "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "retry_only_failed_tests": true, "swarming": { "dimensions": { "kvm": "1", @@ -4377,7 +4376,6 @@ "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "retry_only_failed_tests": true, "swarming": { "dimensions": { "os": "Ubuntu-22.04"
diff --git a/testing/buildbot/chromium.coverage.json b/testing/buildbot/chromium.coverage.json index 4088907..759f5327 100644 --- a/testing/buildbot/chromium.coverage.json +++ b/testing/buildbot/chromium.coverage.json
@@ -22728,6 +22728,28 @@ }, { "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.linux.cr23_browser_tests.filter", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "isolate_profile_data": true, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_browser_tests", + "swarming": { + "dimensions": { + "os": "Ubuntu-22.04" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 20 + }, + "test": "browser_tests", + "test_id_prefix": "ninja://chrome/test:browser_tests/" + }, + { + "args": [ "--gtest_filter=-*UsingRealWebcam*" ], "isolate_profile_data": true, @@ -23184,6 +23206,28 @@ "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" }, { + "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.linux.cr23_interactive_ui_tests.filter", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "isolate_profile_data": true, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_interactive_ui_tests", + "swarming": { + "dimensions": { + "os": "Ubuntu-22.04" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 10 + }, + "test": "interactive_ui_tests", + "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" + }, + { "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -23677,6 +23721,26 @@ "test_id_prefix": "ninja://ui/views:views_unittests/" }, { + "args": [ + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "isolate_profile_data": true, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_views_unittests", + "swarming": { + "dimensions": { + "os": "Ubuntu-22.04" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "views_unittests", + "test_id_prefix": "ninja://ui/views:views_unittests/" + }, + { "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -26066,6 +26130,29 @@ }, { "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.mac.cr23_browser_tests.filter", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "isolate_profile_data": true, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_browser_tests", + "swarming": { + "dimensions": { + "cpu": "x86-64", + "os": "Mac-13" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 20 + }, + "test": "browser_tests", + "test_id_prefix": "ninja://chrome/test:browser_tests/" + }, + { + "args": [ "--gtest_filter=-*UsingRealWebcam*" ], "isolate_profile_data": true, @@ -26542,6 +26629,29 @@ "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" }, { + "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.mac.cr23_interactive_ui_tests.filter", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "isolate_profile_data": true, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_interactive_ui_tests", + "swarming": { + "dimensions": { + "cpu": "x86-64", + "os": "Mac-13" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 10 + }, + "test": "interactive_ui_tests", + "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" + }, + { "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -27057,6 +27167,27 @@ "test_id_prefix": "ninja://ui/views:views_unittests/" }, { + "args": [ + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "isolate_profile_data": true, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_views_unittests", + "swarming": { + "dimensions": { + "cpu": "x86-64", + "os": "Mac-13" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "views_unittests", + "test_id_prefix": "ninja://ui/views:views_unittests/" + }, + { "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -27326,6 +27457,28 @@ }, { "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.win.cr23_browser_tests.filter", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "isolate_profile_data": true, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_browser_tests", + "swarming": { + "dimensions": { + "os": "Windows-10-19045" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 20 + }, + "test": "browser_tests", + "test_id_prefix": "ninja://chrome/test:browser_tests/" + }, + { + "args": [ "--gtest_filter=-*UsingRealWebcam*" ], "isolate_profile_data": true, @@ -27868,6 +28021,28 @@ "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" }, { + "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.win.cr23_interactive_ui_tests.filter", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "isolate_profile_data": true, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_interactive_ui_tests", + "swarming": { + "dimensions": { + "os": "Windows-10-19045" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 10 + }, + "test": "interactive_ui_tests", + "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" + }, + { "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -28406,6 +28581,26 @@ "test_id_prefix": "ninja://ui/views:views_unittests/" }, { + "args": [ + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "isolate_profile_data": true, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_views_unittests", + "swarming": { + "dimensions": { + "os": "Windows-10-19045" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "views_unittests", + "test_id_prefix": "ninja://ui/views:views_unittests/" + }, + { "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py"
diff --git a/testing/buildbot/chromium.fyi.json b/testing/buildbot/chromium.fyi.json index f679b75..c4107a1ed0 100644 --- a/testing/buildbot/chromium.fyi.json +++ b/testing/buildbot/chromium.fyi.json
@@ -320,6 +320,28 @@ }, { "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.mac.cr23_browser_tests.filter", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_browser_tests", + "swarming": { + "dimensions": { + "cpu": "arm64", + "os": "Mac-13" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 20 + }, + "test": "browser_tests", + "test_id_prefix": "ninja://chrome/test:browser_tests/" + }, + { + "args": [ "--gtest_filter=-*UsingRealWebcam*" ], "merge": { @@ -746,6 +768,28 @@ "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" }, { + "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.mac.cr23_interactive_ui_tests.filter", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_interactive_ui_tests", + "swarming": { + "dimensions": { + "cpu": "arm64", + "os": "Mac-13" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 10 + }, + "test": "interactive_ui_tests", + "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" + }, + { "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, @@ -1182,6 +1226,26 @@ "test_id_prefix": "ninja://ui/views:views_unittests/" }, { + "args": [ + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_views_unittests", + "swarming": { + "dimensions": { + "cpu": "arm64", + "os": "Mac-13" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "views_unittests", + "test_id_prefix": "ninja://ui/views:views_unittests/" + }, + { "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, @@ -1853,6 +1917,17 @@ }, { "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.win.cr23_browser_tests.filter", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "name": "cr23_browser_tests", + "test": "browser_tests", + "test_id_prefix": "ninja://chrome/test:browser_tests/" + }, + { + "args": [ "--gtest_filter=-*UsingRealWebcam*" ], "test": "capture_unittests", @@ -2008,6 +2083,17 @@ "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" }, { + "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.win.cr23_interactive_ui_tests.filter", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "name": "cr23_interactive_ui_tests", + "test": "interactive_ui_tests", + "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" + }, + { "test": "ipc_tests", "test_id_prefix": "ninja://ipc:ipc_tests/" }, @@ -2162,6 +2248,16 @@ "test_id_prefix": "ninja://ui/views:views_unittests/" }, { + "args": [ + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "name": "cr23_views_unittests", + "test": "views_unittests", + "test_id_prefix": "ninja://ui/views:views_unittests/" + }, + { "test": "viz_unittests", "test_id_prefix": "ninja://components/viz:viz_unittests/" }, @@ -42002,7 +42098,98 @@ } ] }, - "linux-cr23-rel": {}, + "linux-cr23-rel": { + "gtest_tests": [ + { + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "swarming": { + "dimensions": { + "cpu": "x86-64", + "os": "Ubuntu-22.04" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 20 + }, + "test": "browser_tests", + "test_id_prefix": "ninja://chrome/test:browser_tests/" + }, + { + "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.linux.cr23_browser_tests.filter", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_browser_tests", + "swarming": { + "dimensions": { + "cpu": "x86-64", + "os": "Ubuntu-22.04" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 20 + }, + "test": "browser_tests", + "test_id_prefix": "ninja://chrome/test:browser_tests/" + }, + { + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "swarming": { + "dimensions": { + "cpu": "x86-64", + "os": "Ubuntu-22.04" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 10 + }, + "test": "interactive_ui_tests", + "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" + }, + { + "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.linux.cr23_interactive_ui_tests.filter", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_interactive_ui_tests", + "swarming": { + "dimensions": { + "cpu": "x86-64", + "os": "Ubuntu-22.04" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 10 + }, + "test": "interactive_ui_tests", + "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" + }, + { + "args": [ + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_views_unittests", + "swarming": { + "dimensions": { + "cpu": "x86-64", + "os": "Ubuntu-22.04" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "views_unittests", + "test_id_prefix": "ninja://ui/views:views_unittests/" + } + ] + }, "linux-fieldtrial-rel": { "gtest_tests": [ { @@ -45680,6 +45867,30 @@ }, { "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.linux.cr23_browser_tests.filter", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "isolate_profile_data": true, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_browser_tests", + "swarming": { + "dimensions": { + "os": "Ubuntu-22.04", + "pool": "chromium.tests.no-external-ip" + }, + "expiration": 43200, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 20 + }, + "test": "browser_tests", + "test_id_prefix": "ninja://chrome/test:browser_tests/" + }, + { + "args": [ "--gtest_filter=-*UsingRealWebcam*" ], "isolate_profile_data": true, @@ -46197,6 +46408,30 @@ "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" }, { + "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.linux.cr23_interactive_ui_tests.filter", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "isolate_profile_data": true, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_interactive_ui_tests", + "swarming": { + "dimensions": { + "os": "Ubuntu-22.04", + "pool": "chromium.tests.no-external-ip" + }, + "expiration": 43200, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 10 + }, + "test": "interactive_ui_tests", + "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" + }, + { "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -46760,6 +46995,28 @@ "test_id_prefix": "ninja://ui/views:views_unittests/" }, { + "args": [ + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "isolate_profile_data": true, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_views_unittests", + "swarming": { + "dimensions": { + "os": "Ubuntu-22.04", + "pool": "chromium.tests.no-external-ip" + }, + "expiration": 43200, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "views_unittests", + "test_id_prefix": "ninja://ui/views:views_unittests/" + }, + { "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -47684,7 +47941,98 @@ } ] }, - "mac-cr23-rel": {}, + "mac-cr23-rel": { + "gtest_tests": [ + { + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "swarming": { + "dimensions": { + "cpu": "x86-64", + "os": "Mac-12" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 20 + }, + "test": "browser_tests", + "test_id_prefix": "ninja://chrome/test:browser_tests/" + }, + { + "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.mac.cr23_browser_tests.filter", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_browser_tests", + "swarming": { + "dimensions": { + "cpu": "x86-64", + "os": "Mac-12" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 20 + }, + "test": "browser_tests", + "test_id_prefix": "ninja://chrome/test:browser_tests/" + }, + { + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "swarming": { + "dimensions": { + "cpu": "x86-64", + "os": "Mac-12" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 10 + }, + "test": "interactive_ui_tests", + "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" + }, + { + "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.mac.cr23_interactive_ui_tests.filter", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_interactive_ui_tests", + "swarming": { + "dimensions": { + "cpu": "x86-64", + "os": "Mac-12" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 10 + }, + "test": "interactive_ui_tests", + "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" + }, + { + "args": [ + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_views_unittests", + "swarming": { + "dimensions": { + "cpu": "x86-64", + "os": "Mac-12" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "views_unittests", + "test_id_prefix": "ninja://ui/views:views_unittests/" + } + ] + }, "mac-fieldtrial-tester": { "gtest_tests": [ { @@ -47972,6 +48320,29 @@ }, { "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.mac.cr23_browser_tests.filter", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_browser_tests", + "swarming": { + "dimensions": { + "cpu": "x86-64", + "os": "Mac-13" + }, + "expiration": 21600, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 20 + }, + "test": "browser_tests", + "test_id_prefix": "ninja://chrome/test:browser_tests/" + }, + { + "args": [ "--gtest_filter=-*UsingRealWebcam*" ], "merge": { @@ -48444,6 +48815,29 @@ "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" }, { + "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.mac.cr23_interactive_ui_tests.filter", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_interactive_ui_tests", + "swarming": { + "dimensions": { + "cpu": "x86-64", + "os": "Mac-13" + }, + "expiration": 21600, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 10 + }, + "test": "interactive_ui_tests", + "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" + }, + { "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, @@ -48926,6 +49320,27 @@ "test_id_prefix": "ninja://ui/views:views_unittests/" }, { + "args": [ + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_views_unittests", + "swarming": { + "dimensions": { + "cpu": "x86-64", + "os": "Mac-13" + }, + "expiration": 21600, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "views_unittests", + "test_id_prefix": "ninja://ui/views:views_unittests/" + }, + { "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, @@ -49587,7 +50002,98 @@ } ] }, - "win-cr23-rel": {}, + "win-cr23-rel": { + "gtest_tests": [ + { + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "swarming": { + "dimensions": { + "cpu": "x86-64", + "os": "Windows-10" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 20 + }, + "test": "browser_tests", + "test_id_prefix": "ninja://chrome/test:browser_tests/" + }, + { + "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.win.cr23_browser_tests.filter", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_browser_tests", + "swarming": { + "dimensions": { + "cpu": "x86-64", + "os": "Windows-10" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 20 + }, + "test": "browser_tests", + "test_id_prefix": "ninja://chrome/test:browser_tests/" + }, + { + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "swarming": { + "dimensions": { + "cpu": "x86-64", + "os": "Windows-10" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 10 + }, + "test": "interactive_ui_tests", + "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" + }, + { + "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.win.cr23_interactive_ui_tests.filter", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_interactive_ui_tests", + "swarming": { + "dimensions": { + "cpu": "x86-64", + "os": "Windows-10" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 10 + }, + "test": "interactive_ui_tests", + "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" + }, + { + "args": [ + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_views_unittests", + "swarming": { + "dimensions": { + "cpu": "x86-64", + "os": "Windows-10" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "views_unittests", + "test_id_prefix": "ninja://ui/views:views_unittests/" + } + ] + }, "win-fieldtrial-rel": { "gtest_tests": [ { @@ -50102,6 +50608,31 @@ }, { "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.win.cr23_browser_tests.filter", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "isolate_profile_data": true, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_browser_tests", + "swarming": { + "dimensions": { + "cpu": "x86-64", + "os": "Windows-10-19045", + "pool": "chromium.tests.no-external-ip" + }, + "expiration": 43200, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 20 + }, + "test": "browser_tests", + "test_id_prefix": "ninja://chrome/test:browser_tests/" + }, + { + "args": [ "--browser-ui-tests-verify-pixels", "--enable-pixel-output-in-tests", "--test-launcher-filter-file=../../testing/buildbot/filters/pixel_tests.filter;../../testing/buildbot/filters/cr23.win.cr23_browser_tests.filter", @@ -50821,6 +51352,31 @@ }, { "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.win.cr23_interactive_ui_tests.filter", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "isolate_profile_data": true, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_interactive_ui_tests", + "swarming": { + "dimensions": { + "cpu": "x86-64", + "os": "Windows-10-19045", + "pool": "chromium.tests.no-external-ip" + }, + "expiration": 43200, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 10 + }, + "test": "interactive_ui_tests", + "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" + }, + { + "args": [ "--browser-ui-tests-verify-pixels", "--enable-pixel-output-in-tests", "--test-launcher-filter-file=../../testing/buildbot/filters/pixel_tests.filter;../../testing/buildbot/filters/cr23.win.cr23_interactive_ui_tests.filter", @@ -51555,6 +52111,29 @@ "test_id_prefix": "ninja://ui/views:views_unittests/" }, { + "args": [ + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "isolate_profile_data": true, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_views_unittests", + "swarming": { + "dimensions": { + "cpu": "x86-64", + "os": "Windows-10-19045", + "pool": "chromium.tests.no-external-ip" + }, + "expiration": 43200, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "views_unittests", + "test_id_prefix": "ninja://ui/views:views_unittests/" + }, + { "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py"
diff --git a/testing/buildbot/chromium.gpu.fyi.json b/testing/buildbot/chromium.gpu.fyi.json index 6b51c6c2..481bfff 100644 --- a/testing/buildbot/chromium.gpu.fyi.json +++ b/testing/buildbot/chromium.gpu.fyi.json
@@ -19790,6 +19790,31 @@ }, { "args": [ + "--gtest_filter=WebNN*", + "--use-gpu-in-tests" + ], + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "services_webnn_unittests", + "swarming": { + "containment_type": "AUTO", + "dimensions": { + "display_attached": "1", + "gpu": "1002:7340", + "os": "Windows-10", + "pool": "chromium.tests.gpu.experimental" + }, + "expiration": 21600, + "hard_timeout": 1800, + "io_timeout": 1800, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "services_unittests", + "test_id_prefix": "ninja://services:services_unittests/" + }, + { + "args": [ "--ignore-runtime-requirements=*" ], "merge": {
diff --git a/testing/buildbot/chromium.linux.json b/testing/buildbot/chromium.linux.json index 273ba00..2f7480b 100644 --- a/testing/buildbot/chromium.linux.json +++ b/testing/buildbot/chromium.linux.json
@@ -1737,6 +1737,7 @@ "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" ], "ci_only": true, + "experiment_percentage": 10, "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -2212,6 +2213,7 @@ "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" ], "ci_only": true, + "experiment_percentage": 10, "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -2725,6 +2727,7 @@ "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" ], "ci_only": true, + "experiment_percentage": 10, "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -3643,7 +3646,6 @@ "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "retry_only_failed_tests": true, "swarming": { "dimensions": { "os": "Ubuntu-22.04" @@ -3656,6 +3658,31 @@ }, { "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.linux.cr23_browser_tests.filter", + "--no-xvfb", + "--use-weston", + "--ozone-platform=wayland", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "isolate_profile_data": true, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_browser_tests", + "swarming": { + "dimensions": { + "os": "Ubuntu-22.04" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 20 + }, + "test": "browser_tests", + "test_id_prefix": "ninja://chrome/test:browser_tests/" + }, + { + "args": [ "--gtest_filter=-*UsingRealWebcam*", "--no-xvfb", "--use-weston", @@ -4250,6 +4277,31 @@ }, { "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.linux.cr23_interactive_ui_tests.filter", + "--no-xvfb", + "--use-weston", + "--ozone-platform=wayland", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "isolate_profile_data": true, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_interactive_ui_tests", + "swarming": { + "dimensions": { + "os": "Ubuntu-22.04" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 10 + }, + "test": "interactive_ui_tests", + "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" + }, + { + "args": [ "--no-xvfb", "--use-weston", "--ozone-platform=wayland" @@ -4903,6 +4955,29 @@ "args": [ "--no-xvfb", "--use-weston", + "--ozone-platform=wayland", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "isolate_profile_data": true, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_views_unittests", + "swarming": { + "dimensions": { + "os": "Ubuntu-22.04" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "views_unittests", + "test_id_prefix": "ninja://ui/views:views_unittests/" + }, + { + "args": [ + "--no-xvfb", + "--use-weston", "--ozone-platform=wayland" ], "isolate_profile_data": true, @@ -5205,6 +5280,27 @@ }, { "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.linux.cr23_browser_tests.filter", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_browser_tests", + "swarming": { + "dimensions": { + "os": "Ubuntu-22.04" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 20 + }, + "test": "browser_tests", + "test_id_prefix": "ninja://chrome/test:browser_tests/" + }, + { + "args": [ "--gtest_filter=-*UsingRealWebcam*" ], "merge": { @@ -5626,6 +5722,27 @@ "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" }, { + "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.linux.cr23_interactive_ui_tests.filter", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_interactive_ui_tests", + "swarming": { + "dimensions": { + "os": "Ubuntu-22.04" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 10 + }, + "test": "interactive_ui_tests", + "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" + }, + { "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, @@ -6085,6 +6202,25 @@ "test_id_prefix": "ninja://ui/views:views_unittests/" }, { + "args": [ + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_views_unittests", + "swarming": { + "dimensions": { + "os": "Ubuntu-22.04" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "views_unittests", + "test_id_prefix": "ninja://ui/views:views_unittests/" + }, + { "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" },
diff --git a/testing/buildbot/chromium.mac.json b/testing/buildbot/chromium.mac.json index 6a414b4..fd7851a 100644 --- a/testing/buildbot/chromium.mac.json +++ b/testing/buildbot/chromium.mac.json
@@ -218,6 +218,28 @@ }, { "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.mac.cr23_browser_tests.filter", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_browser_tests", + "swarming": { + "dimensions": { + "cpu": "x86-64", + "os": "Mac-10.15" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 20 + }, + "test": "browser_tests", + "test_id_prefix": "ninja://chrome/test:browser_tests/" + }, + { + "args": [ "--gtest_filter=-*UsingRealWebcam*" ], "merge": { @@ -657,6 +679,28 @@ "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" }, { + "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.mac.cr23_interactive_ui_tests.filter", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_interactive_ui_tests", + "swarming": { + "dimensions": { + "cpu": "x86-64", + "os": "Mac-10.15" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 10 + }, + "test": "interactive_ui_tests", + "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" + }, + { "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, @@ -1107,6 +1151,26 @@ "test_id_prefix": "ninja://ui/views:views_unittests/" }, { + "args": [ + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_views_unittests", + "swarming": { + "dimensions": { + "cpu": "x86-64", + "os": "Mac-10.15" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "views_unittests", + "test_id_prefix": "ninja://ui/views:views_unittests/" + }, + { "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, @@ -1654,6 +1718,29 @@ }, { "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.mac.cr23_browser_tests.filter", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "isolate_profile_data": true, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_browser_tests", + "swarming": { + "dimensions": { + "cpu": "x86-64", + "os": "Mac-11|Mac-10.16" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 20 + }, + "test": "browser_tests", + "test_id_prefix": "ninja://chrome/test:browser_tests/" + }, + { + "args": [ "--gtest_filter=-*UsingRealWebcam*" ], "isolate_profile_data": true, @@ -2124,6 +2211,29 @@ "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" }, { + "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.mac.cr23_interactive_ui_tests.filter", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "isolate_profile_data": true, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_interactive_ui_tests", + "swarming": { + "dimensions": { + "cpu": "x86-64", + "os": "Mac-11|Mac-10.16" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 10 + }, + "test": "interactive_ui_tests", + "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" + }, + { "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -2606,6 +2716,27 @@ "test_id_prefix": "ninja://ui/views:views_unittests/" }, { + "args": [ + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "isolate_profile_data": true, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_views_unittests", + "swarming": { + "dimensions": { + "cpu": "x86-64", + "os": "Mac-11|Mac-10.16" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "views_unittests", + "test_id_prefix": "ninja://ui/views:views_unittests/" + }, + { "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -3196,6 +3327,29 @@ }, { "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.mac.cr23_browser_tests.filter", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "isolate_profile_data": true, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_browser_tests", + "swarming": { + "dimensions": { + "cpu": "x86-64", + "os": "Mac-12" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 20 + }, + "test": "browser_tests", + "test_id_prefix": "ninja://chrome/test:browser_tests/" + }, + { + "args": [ "--gtest_filter=-*UsingRealWebcam*" ], "isolate_profile_data": true, @@ -3666,6 +3820,29 @@ "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" }, { + "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.mac.cr23_interactive_ui_tests.filter", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "isolate_profile_data": true, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_interactive_ui_tests", + "swarming": { + "dimensions": { + "cpu": "x86-64", + "os": "Mac-12" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 10 + }, + "test": "interactive_ui_tests", + "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" + }, + { "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -4149,6 +4326,27 @@ "test_id_prefix": "ninja://ui/views:views_unittests/" }, { + "args": [ + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "isolate_profile_data": true, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_views_unittests", + "swarming": { + "dimensions": { + "cpu": "x86-64", + "os": "Mac-12" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "views_unittests", + "test_id_prefix": "ninja://ui/views:views_unittests/" + }, + { "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -4743,6 +4941,7 @@ "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" ], "ci_only": true, + "experiment_percentage": 10, "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -5221,6 +5420,7 @@ "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" ], "ci_only": true, + "experiment_percentage": 10, "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -5711,6 +5911,7 @@ "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" ], "ci_only": true, + "experiment_percentage": 10, "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -6326,6 +6527,28 @@ }, { "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.mac.cr23_browser_tests.filter", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_browser_tests", + "swarming": { + "dimensions": { + "cpu": "x86-64", + "os": "Mac-13" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 20 + }, + "test": "browser_tests", + "test_id_prefix": "ninja://chrome/test:browser_tests/" + }, + { + "args": [ "--gtest_filter=-*UsingRealWebcam*" ], "merge": { @@ -6766,6 +6989,28 @@ "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" }, { + "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.mac.cr23_interactive_ui_tests.filter", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_interactive_ui_tests", + "swarming": { + "dimensions": { + "cpu": "x86-64", + "os": "Mac-13" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 10 + }, + "test": "interactive_ui_tests", + "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" + }, + { "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, @@ -7245,6 +7490,26 @@ "test_id_prefix": "ninja://ui/views:views_unittests/" }, { + "args": [ + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_views_unittests", + "swarming": { + "dimensions": { + "cpu": "x86-64", + "os": "Mac-13" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "views_unittests", + "test_id_prefix": "ninja://ui/views:views_unittests/" + }, + { "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, @@ -23021,6 +23286,28 @@ }, { "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.mac.cr23_browser_tests.filter", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_browser_tests", + "swarming": { + "dimensions": { + "cpu": "arm64", + "os": "Mac-11" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 20 + }, + "test": "browser_tests", + "test_id_prefix": "ninja://chrome/test:browser_tests/" + }, + { + "args": [ "--gtest_filter=-*UsingRealWebcam*" ], "merge": { @@ -23446,6 +23733,28 @@ "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" }, { + "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.mac.cr23_interactive_ui_tests.filter", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_interactive_ui_tests", + "swarming": { + "dimensions": { + "cpu": "arm64", + "os": "Mac-11" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 10 + }, + "test": "interactive_ui_tests", + "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" + }, + { "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, @@ -23882,6 +24191,26 @@ "test_id_prefix": "ninja://ui/views:views_unittests/" }, { + "args": [ + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_views_unittests", + "swarming": { + "dimensions": { + "cpu": "arm64", + "os": "Mac-11" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "views_unittests", + "test_id_prefix": "ninja://ui/views:views_unittests/" + }, + { "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, @@ -24393,6 +24722,28 @@ }, { "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.mac.cr23_browser_tests.filter", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_browser_tests", + "swarming": { + "dimensions": { + "cpu": "arm64", + "os": "Mac-12" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 20 + }, + "test": "browser_tests", + "test_id_prefix": "ninja://chrome/test:browser_tests/" + }, + { + "args": [ "--gtest_filter=-*UsingRealWebcam*" ], "ci_only": true, @@ -24847,6 +25198,28 @@ "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" }, { + "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.mac.cr23_interactive_ui_tests.filter", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_interactive_ui_tests", + "swarming": { + "dimensions": { + "cpu": "arm64", + "os": "Mac-12" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 10 + }, + "test": "interactive_ui_tests", + "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" + }, + { "ci_only": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -25313,6 +25686,26 @@ "test_id_prefix": "ninja://ui/views:views_unittests/" }, { + "args": [ + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_views_unittests", + "swarming": { + "dimensions": { + "cpu": "arm64", + "os": "Mac-12" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "views_unittests", + "test_id_prefix": "ninja://ui/views:views_unittests/" + }, + { "ci_only": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -25841,6 +26234,28 @@ }, { "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.mac.cr23_browser_tests.filter", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_browser_tests", + "swarming": { + "dimensions": { + "cpu": "arm64", + "os": "Mac-13" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 20 + }, + "test": "browser_tests", + "test_id_prefix": "ninja://chrome/test:browser_tests/" + }, + { + "args": [ "--gtest_filter=-*UsingRealWebcam*" ], "ci_only": true, @@ -26295,6 +26710,28 @@ "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" }, { + "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.mac.cr23_interactive_ui_tests.filter", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_interactive_ui_tests", + "swarming": { + "dimensions": { + "cpu": "arm64", + "os": "Mac-13" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 10 + }, + "test": "interactive_ui_tests", + "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" + }, + { "ci_only": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -26761,6 +27198,26 @@ "test_id_prefix": "ninja://ui/views:views_unittests/" }, { + "args": [ + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_views_unittests", + "swarming": { + "dimensions": { + "cpu": "arm64", + "os": "Mac-13" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "views_unittests", + "test_id_prefix": "ninja://ui/views:views_unittests/" + }, + { "ci_only": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py"
diff --git a/testing/buildbot/chromium.memory.fyi.json b/testing/buildbot/chromium.memory.fyi.json index 07b9f3a..d6d8d72e 100644 --- a/testing/buildbot/chromium.memory.fyi.json +++ b/testing/buildbot/chromium.memory.fyi.json
@@ -234,6 +234,28 @@ }, { "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.linux.cr23_browser_tests.filter", + "--test-launcher-print-test-stdio=always", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_browser_tests", + "swarming": { + "dimensions": { + "os": "Ubuntu-22.04" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 20 + }, + "test": "browser_tests", + "test_id_prefix": "ninja://chrome/test:browser_tests/" + }, + { + "args": [ "--gtest_filter=-*UsingRealWebcam*", "--test-launcher-print-test-stdio=always" ], @@ -775,6 +797,28 @@ }, { "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.linux.cr23_interactive_ui_tests.filter", + "--test-launcher-print-test-stdio=always", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_interactive_ui_tests", + "swarming": { + "dimensions": { + "os": "Ubuntu-22.04" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 10 + }, + "test": "interactive_ui_tests", + "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" + }, + { + "args": [ "--test-launcher-print-test-stdio=always" ], "merge": { @@ -1340,6 +1384,26 @@ }, { "args": [ + "--test-launcher-print-test-stdio=always", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_views_unittests", + "swarming": { + "dimensions": { + "os": "Ubuntu-22.04" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "views_unittests", + "test_id_prefix": "ninja://ui/views:views_unittests/" + }, + { + "args": [ "--test-launcher-print-test-stdio=always" ], "merge": { @@ -1682,6 +1746,29 @@ }, { "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.linux.cr23_browser_tests.filter", + "--test-launcher-print-test-stdio=always", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_browser_tests", + "swarming": { + "dimensions": { + "cpu": "x86-64", + "os": "Ubuntu-20.04" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 20 + }, + "test": "browser_tests", + "test_id_prefix": "ninja://chrome/test:browser_tests/" + }, + { + "args": [ "--gtest_filter=-*UsingRealWebcam*", "--test-launcher-print-test-stdio=always" ], @@ -2230,6 +2317,29 @@ }, { "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.linux.cr23_interactive_ui_tests.filter", + "--test-launcher-print-test-stdio=always", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_interactive_ui_tests", + "swarming": { + "dimensions": { + "cpu": "x86-64", + "os": "Ubuntu-20.04" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 10 + }, + "test": "interactive_ui_tests", + "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" + }, + { + "args": [ "--test-launcher-print-test-stdio=always" ], "merge": { @@ -2811,6 +2921,27 @@ }, { "args": [ + "--test-launcher-print-test-stdio=always", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_views_unittests", + "swarming": { + "dimensions": { + "cpu": "x86-64", + "os": "Ubuntu-20.04" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "views_unittests", + "test_id_prefix": "ninja://ui/views:views_unittests/" + }, + { + "args": [ "--test-launcher-print-test-stdio=always" ], "merge": { @@ -3129,6 +3260,28 @@ }, { "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.linux.cr23_browser_tests.filter", + "--test-launcher-print-test-stdio=always", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_browser_tests", + "swarming": { + "dimensions": { + "os": "Ubuntu-22.04" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 20 + }, + "test": "browser_tests", + "test_id_prefix": "ninja://chrome/test:browser_tests/" + }, + { + "args": [ "--gtest_filter=-*UsingRealWebcam*", "--test-launcher-print-test-stdio=always" ], @@ -3698,6 +3851,28 @@ }, { "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.linux.cr23_interactive_ui_tests.filter", + "--test-launcher-print-test-stdio=always", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_interactive_ui_tests", + "swarming": { + "dimensions": { + "os": "Ubuntu-22.04" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 10 + }, + "test": "interactive_ui_tests", + "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" + }, + { + "args": [ "--test-launcher-print-test-stdio=always" ], "merge": { @@ -4231,6 +4406,26 @@ }, { "args": [ + "--test-launcher-print-test-stdio=always", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_views_unittests", + "swarming": { + "dimensions": { + "os": "Ubuntu-22.04" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "views_unittests", + "test_id_prefix": "ninja://ui/views:views_unittests/" + }, + { + "args": [ "--test-launcher-print-test-stdio=always" ], "merge": { @@ -4531,6 +4726,28 @@ }, { "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.linux.cr23_browser_tests.filter", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "isolate_profile_data": true, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_browser_tests", + "swarming": { + "dimensions": { + "os": "Ubuntu-22.04" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 20 + }, + "test": "browser_tests", + "test_id_prefix": "ninja://chrome/test:browser_tests/" + }, + { + "args": [ "--gtest_filter=-*UsingRealWebcam*" ], "isolate_profile_data": true, @@ -4984,6 +5201,28 @@ "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" }, { + "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.linux.cr23_interactive_ui_tests.filter", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "isolate_profile_data": true, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_interactive_ui_tests", + "swarming": { + "dimensions": { + "os": "Ubuntu-22.04" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 10 + }, + "test": "interactive_ui_tests", + "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" + }, + { "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -5477,6 +5716,26 @@ "test_id_prefix": "ninja://ui/views:views_unittests/" }, { + "args": [ + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "isolate_profile_data": true, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_views_unittests", + "swarming": { + "dimensions": { + "os": "Ubuntu-22.04" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "views_unittests", + "test_id_prefix": "ninja://ui/views:views_unittests/" + }, + { "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py"
diff --git a/testing/buildbot/chromium.memory.json b/testing/buildbot/chromium.memory.json index 3051668c2..55a42c4 100644 --- a/testing/buildbot/chromium.memory.json +++ b/testing/buildbot/chromium.memory.json
@@ -234,6 +234,28 @@ }, { "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.linux.cr23_browser_tests.filter", + "--test-launcher-print-test-stdio=always", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_browser_tests", + "swarming": { + "dimensions": { + "os": "Ubuntu-22.04" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 20 + }, + "test": "browser_tests", + "test_id_prefix": "ninja://chrome/test:browser_tests/" + }, + { + "args": [ "--gtest_filter=-*UsingRealWebcam*", "--test-launcher-print-test-stdio=always" ], @@ -775,6 +797,28 @@ }, { "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.linux.cr23_interactive_ui_tests.filter", + "--test-launcher-print-test-stdio=always", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_interactive_ui_tests", + "swarming": { + "dimensions": { + "os": "Ubuntu-22.04" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 10 + }, + "test": "interactive_ui_tests", + "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" + }, + { + "args": [ "--test-launcher-print-test-stdio=always" ], "merge": { @@ -1340,6 +1384,26 @@ }, { "args": [ + "--test-launcher-print-test-stdio=always", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_views_unittests", + "swarming": { + "dimensions": { + "os": "Ubuntu-22.04" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "views_unittests", + "test_id_prefix": "ninja://ui/views:views_unittests/" + }, + { + "args": [ "--test-launcher-print-test-stdio=always" ], "merge": { @@ -1697,6 +1761,27 @@ }, { "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.linux.cr23_browser_tests.filter", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_browser_tests", + "swarming": { + "dimensions": { + "os": "Ubuntu-22.04" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 20 + }, + "test": "browser_tests", + "test_id_prefix": "ninja://chrome/test:browser_tests/" + }, + { + "args": [ "--gtest_filter=-*UsingRealWebcam*" ], "merge": { @@ -2140,6 +2225,27 @@ "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" }, { + "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.linux.cr23_interactive_ui_tests.filter", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_interactive_ui_tests", + "swarming": { + "dimensions": { + "os": "Ubuntu-22.04" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 10 + }, + "test": "interactive_ui_tests", + "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" + }, + { "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, @@ -2598,6 +2704,25 @@ "test_id_prefix": "ninja://ui/views:views_unittests/" }, { + "args": [ + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_views_unittests", + "swarming": { + "dimensions": { + "os": "Ubuntu-22.04" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "views_unittests", + "test_id_prefix": "ninja://ui/views:views_unittests/" + }, + { "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, @@ -6054,6 +6179,29 @@ }, { "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.linux.cr23_browser_tests.filter", + "--test-launcher-print-test-stdio=always", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_browser_tests", + "swarming": { + "dimensions": { + "cpu": "x86-64", + "os": "Ubuntu-20.04" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 20 + }, + "test": "browser_tests", + "test_id_prefix": "ninja://chrome/test:browser_tests/" + }, + { + "args": [ "--gtest_filter=-*UsingRealWebcam*", "--test-launcher-print-test-stdio=always" ], @@ -6602,6 +6750,29 @@ }, { "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.linux.cr23_interactive_ui_tests.filter", + "--test-launcher-print-test-stdio=always", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_interactive_ui_tests", + "swarming": { + "dimensions": { + "cpu": "x86-64", + "os": "Ubuntu-20.04" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 10 + }, + "test": "interactive_ui_tests", + "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" + }, + { + "args": [ "--test-launcher-print-test-stdio=always" ], "merge": { @@ -7183,6 +7354,27 @@ }, { "args": [ + "--test-launcher-print-test-stdio=always", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_views_unittests", + "swarming": { + "dimensions": { + "cpu": "x86-64", + "os": "Ubuntu-20.04" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "views_unittests", + "test_id_prefix": "ninja://ui/views:views_unittests/" + }, + { + "args": [ "--test-launcher-print-test-stdio=always" ], "merge": { @@ -7501,6 +7693,28 @@ }, { "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.linux.cr23_browser_tests.filter", + "--test-launcher-print-test-stdio=always", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_browser_tests", + "swarming": { + "dimensions": { + "os": "Ubuntu-22.04" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 20 + }, + "test": "browser_tests", + "test_id_prefix": "ninja://chrome/test:browser_tests/" + }, + { + "args": [ "--gtest_filter=-*UsingRealWebcam*", "--test-launcher-print-test-stdio=always" ], @@ -8070,6 +8284,28 @@ }, { "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.linux.cr23_interactive_ui_tests.filter", + "--test-launcher-print-test-stdio=always", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_interactive_ui_tests", + "swarming": { + "dimensions": { + "os": "Ubuntu-22.04" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 10 + }, + "test": "interactive_ui_tests", + "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" + }, + { + "args": [ "--test-launcher-print-test-stdio=always" ], "merge": { @@ -8603,6 +8839,26 @@ }, { "args": [ + "--test-launcher-print-test-stdio=always", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_views_unittests", + "swarming": { + "dimensions": { + "os": "Ubuntu-22.04" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "views_unittests", + "test_id_prefix": "ninja://ui/views:views_unittests/" + }, + { + "args": [ "--test-launcher-print-test-stdio=always" ], "merge": { @@ -8930,6 +9186,29 @@ }, { "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.mac.cr23_browser_tests.filter", + "--test-launcher-print-test-stdio=always", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_browser_tests", + "swarming": { + "dimensions": { + "cpu": "x86-64", + "os": "Mac-12" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 20 + }, + "test": "browser_tests", + "test_id_prefix": "ninja://chrome/test:browser_tests/" + }, + { + "args": [ "--gtest_filter=-*UsingRealWebcam*", "--test-launcher-print-test-stdio=always" ], @@ -9463,6 +9742,29 @@ }, { "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.mac.cr23_interactive_ui_tests.filter", + "--test-launcher-print-test-stdio=always", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_interactive_ui_tests", + "swarming": { + "dimensions": { + "cpu": "x86-64", + "os": "Mac-12" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 10 + }, + "test": "interactive_ui_tests", + "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" + }, + { + "args": [ "--test-launcher-print-test-stdio=always" ], "merge": { @@ -10009,6 +10311,27 @@ }, { "args": [ + "--test-launcher-print-test-stdio=always", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_views_unittests", + "swarming": { + "dimensions": { + "cpu": "x86-64", + "os": "Mac-12" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "views_unittests", + "test_id_prefix": "ninja://ui/views:views_unittests/" + }, + { + "args": [ "--test-launcher-print-test-stdio=always" ], "merge": { @@ -17100,6 +17423,27 @@ }, { "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.linux.cr23_browser_tests.filter", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_browser_tests", + "swarming": { + "dimensions": { + "os": "Ubuntu-22.04" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 20 + }, + "test": "browser_tests", + "test_id_prefix": "ninja://chrome/test:browser_tests/" + }, + { + "args": [ "--gtest_filter=-*UsingRealWebcam*" ], "merge": { @@ -17521,6 +17865,27 @@ "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" }, { + "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.linux.cr23_interactive_ui_tests.filter", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_interactive_ui_tests", + "swarming": { + "dimensions": { + "os": "Ubuntu-22.04" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 10 + }, + "test": "interactive_ui_tests", + "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" + }, + { "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, @@ -17982,6 +18347,25 @@ "test_id_prefix": "ninja://ui/views:views_unittests/" }, { + "args": [ + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_views_unittests", + "swarming": { + "dimensions": { + "os": "Ubuntu-22.04" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "views_unittests", + "test_id_prefix": "ninja://ui/views:views_unittests/" + }, + { "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, @@ -18254,6 +18638,27 @@ }, { "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.win.cr23_browser_tests.filter", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_browser_tests", + "swarming": { + "dimensions": { + "os": "Windows-10-19045" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 20 + }, + "test": "browser_tests", + "test_id_prefix": "ninja://chrome/test:browser_tests/" + }, + { + "args": [ "--gtest_filter=-*UsingRealWebcam*" ], "merge": { @@ -18762,6 +19167,27 @@ "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" }, { + "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.win.cr23_interactive_ui_tests.filter", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_interactive_ui_tests", + "swarming": { + "dimensions": { + "os": "Windows-10-19045" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 10 + }, + "test": "interactive_ui_tests", + "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" + }, + { "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, @@ -19265,6 +19691,25 @@ "test_id_prefix": "ninja://ui/views:views_unittests/" }, { + "args": [ + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_views_unittests", + "swarming": { + "dimensions": { + "os": "Windows-10-19045" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "views_unittests", + "test_id_prefix": "ninja://ui/views:views_unittests/" + }, + { "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" },
diff --git a/testing/buildbot/chromium.win.json b/testing/buildbot/chromium.win.json index 0fe62df..b266332 100644 --- a/testing/buildbot/chromium.win.json +++ b/testing/buildbot/chromium.win.json
@@ -309,7 +309,6 @@ "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "retry_only_failed_tests": true, "swarming": { "dimensions": { "cpu": "x86-64", @@ -1030,6 +1029,7 @@ "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" ], "ci_only": true, + "experiment_percentage": 10, "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -1741,10 +1741,10 @@ }, { "args": [ - "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.win.cr23_views_unittests.filter", "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" ], "ci_only": true, + "experiment_percentage": 10, "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -2400,6 +2400,28 @@ }, { "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.win.cr23_browser_tests.filter", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_browser_tests", + "swarming": { + "dimensions": { + "cpu": "x86-64", + "os": "Windows-10-19045" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 20 + }, + "test": "browser_tests", + "test_id_prefix": "ninja://chrome/test:browser_tests/" + }, + { + "args": [ "--gtest_filter=-*UsingRealWebcam*" ], "merge": { @@ -2944,6 +2966,28 @@ "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" }, { + "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.win.cr23_interactive_ui_tests.filter", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_interactive_ui_tests", + "swarming": { + "dimensions": { + "cpu": "x86-64", + "os": "Windows-10-19045" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 10 + }, + "test": "interactive_ui_tests", + "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" + }, + { "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, @@ -3482,6 +3526,26 @@ "test_id_prefix": "ninja://ui/views:views_unittests/" }, { + "args": [ + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_views_unittests", + "swarming": { + "dimensions": { + "cpu": "x86-64", + "os": "Windows-10-19045" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "views_unittests", + "test_id_prefix": "ninja://ui/views:views_unittests/" + }, + { "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, @@ -3994,6 +4058,29 @@ }, { "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.win.cr23_browser_tests.filter", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "isolate_profile_data": true, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_browser_tests", + "swarming": { + "dimensions": { + "cpu": "x86-64", + "os": "Windows-11-22000" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 20 + }, + "test": "browser_tests", + "test_id_prefix": "ninja://chrome/test:browser_tests/" + }, + { + "args": [ "--browser-ui-tests-verify-pixels", "--enable-pixel-output-in-tests", "--test-launcher-filter-file=../../testing/buildbot/filters/pixel_tests.filter;../../testing/buildbot/filters/cr23.win.cr23_browser_tests.filter", @@ -4604,6 +4691,29 @@ }, { "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.win.cr23_interactive_ui_tests.filter", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "isolate_profile_data": true, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_interactive_ui_tests", + "swarming": { + "dimensions": { + "cpu": "x86-64", + "os": "Windows-11-22000" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 10 + }, + "test": "interactive_ui_tests", + "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" + }, + { + "args": [ "--browser-ui-tests-verify-pixels", "--enable-pixel-output-in-tests", "--test-launcher-filter-file=../../testing/buildbot/filters/pixel_tests.filter;../../testing/buildbot/filters/cr23.win.cr23_interactive_ui_tests.filter", @@ -5256,6 +5366,27 @@ "test_id_prefix": "ninja://ui/views:views_unittests/" }, { + "args": [ + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "isolate_profile_data": true, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_views_unittests", + "swarming": { + "dimensions": { + "cpu": "x86-64", + "os": "Windows-11-22000" + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "views_unittests", + "test_id_prefix": "ninja://ui/views:views_unittests/" + }, + { "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py"
diff --git a/testing/buildbot/filters/cr23.mac.cr23_browser_tests.filter b/testing/buildbot/filters/cr23.mac.cr23_browser_tests.filter index 5967be8..3187a21 100644 --- a/testing/buildbot/filters/cr23.mac.cr23_browser_tests.filter +++ b/testing/buildbot/filters/cr23.mac.cr23_browser_tests.filter
@@ -3,10 +3,6 @@ -CompanionPageBrowserTest.ReloadWillRefreshCompanion -IntentChipButtonBrowserTest.ShowsAppIconInChip -InteractiveBrowserTestBrowsertest.InstrumentTabsAsTestSteps --LiveCaptionControllerTest.DispatchTranscription_MultipleProfiles --LiveCaptionControllerTest.LiveCaptionEnabledChanged_MultipleProfiles --LiveCaptionControllerTest.OnAudioStreamEnd_MultipleProfiles --LiveCaptionControllerTest.OnError_MultipleProfiles -LoadImageBrowserTest.LoadImage -LoadImageBrowserTest.LoadImageWithMap -PrivacySandboxDialogSmallWindowTest.All
diff --git a/testing/buildbot/internal.chrome.fyi.json b/testing/buildbot/internal.chrome.fyi.json index b0d3742..d130591 100644 --- a/testing/buildbot/internal.chrome.fyi.json +++ b/testing/buildbot/internal.chrome.fyi.json
@@ -565,6 +565,32 @@ }, { "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.win.cr23_browser_tests.filter", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "isolate_profile_data": true, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_browser_tests", + "swarming": { + "dimensions": { + "cpu": null, + "os": "Windows-11", + "pool": "chrome.tests.arm64" + }, + "expiration": 64800, + "hard_timeout": 43200, + "service_account": "chrome-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 20 + }, + "test": "browser_tests", + "test_id_prefix": "ninja://chrome/test:browser_tests/" + }, + { + "args": [ "--browser-ui-tests-verify-pixels", "--enable-pixel-output-in-tests", "--test-launcher-filter-file=../../testing/buildbot/filters/pixel_tests.filter;../../testing/buildbot/filters/cr23.win.cr23_browser_tests.filter", @@ -1324,6 +1350,32 @@ }, { "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/cr23.win.cr23_interactive_ui_tests.filter", + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "isolate_profile_data": true, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_interactive_ui_tests", + "swarming": { + "dimensions": { + "cpu": null, + "os": "Windows-11", + "pool": "chrome.tests.arm64" + }, + "expiration": 64800, + "hard_timeout": 43200, + "service_account": "chrome-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 10 + }, + "test": "interactive_ui_tests", + "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" + }, + { + "args": [ "--browser-ui-tests-verify-pixels", "--enable-pixel-output-in-tests", "--test-launcher-filter-file=../../testing/buildbot/filters/pixel_tests.filter;../../testing/buildbot/filters/cr23.win.cr23_interactive_ui_tests.filter", @@ -2066,6 +2118,30 @@ "test_id_prefix": "ninja://ui/views:views_unittests/" }, { + "args": [ + "--enable-features=ChromeRefresh2023,ChromeRefreshSecondary2023,ChromeWebuiRefresh2023,Cr2023ActionChips,Cr2023ActionChipsIcons,kOmniboxCR23SteadyStateIcons,OmniboxExpandedLayout,OmniboxExpandedStateColors,OmniboxExpandedStateHeight,OmniboxExpandedStateShape,OmniboxExpandedStateSuggestIcons,OmniboxSteadyStateBackgroundColor,OmniboxSteadyStateHeight,OmniboxSteadyStateTextColor,OmniboxSuggestionHoverFillShape" + ], + "ci_only": true, + "experiment_percentage": 10, + "isolate_profile_data": true, + "merge": { + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "name": "cr23_views_unittests", + "swarming": { + "dimensions": { + "cpu": null, + "os": "Windows-11", + "pool": "chrome.tests.arm64" + }, + "expiration": 64800, + "hard_timeout": 43200, + "service_account": "chrome-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "views_unittests", + "test_id_prefix": "ninja://ui/views:views_unittests/" + }, + { "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py"
diff --git a/testing/buildbot/test_suite_exceptions.pyl b/testing/buildbot/test_suite_exceptions.pyl index 5535f5f5..2d8ac36a 100644 --- a/testing/buildbot/test_suite_exceptions.pyl +++ b/testing/buildbot/test_suite_exceptions.pyl
@@ -1090,7 +1090,6 @@ 'args': [ '--test-launcher-filter-file=../../testing/buildbot/filters/ozone-linux.wayland_browser_tests.filter', ], - 'retry_only_failed_tests': True, 'swarming': { 'shards': 20, }, @@ -1175,7 +1174,6 @@ 'args': [ '--disable-features=WebRTC-H264WithOpenH264FFmpeg', ], - 'retry_only_failed_tests': True, 'swarming': { # This is for slow test execution that often becomes a critical path of # swarming jobs. crbug.com/868114 @@ -1214,7 +1212,6 @@ }, }, 'linux-chromeos-rel': { - 'retry_only_failed_tests': True, 'swarming': { 'shards': 60, 'dimensions': { @@ -1254,7 +1251,6 @@ ], }, 'linux-lacros-tester-rel': { - 'retry_only_failed_tests': True, 'swarming': { 'shards': 20, }, @@ -4083,11 +4079,6 @@ }, } }, - 'services_webnn_unittests': { - 'remove_from': [ - 'Win10 FYI x64 Release (AMD RX 5500 XT)', # crbug.com/1445060 - ], - }, 'snapshot_unittests': { 'modifications': { 'fuchsia-fyi-arm64-dbg': {
diff --git a/testing/buildbot/test_suites.pyl b/testing/buildbot/test_suites.pyl index ca7cd36..b6e8356 100644 --- a/testing/buildbot/test_suites.pyl +++ b/testing/buildbot/test_suites.pyl
@@ -1684,9 +1684,50 @@ }, }, - # TODO(crbug.com/1444855): Delete the cr23_{linux,mac,win}_gtest suites - # after the ChromeRefresh2023 is fully rolled out. - 'cr23_linux_gtests': { + # The `cr23` variants of tests run the normal test suites with + # `--enable-features=ChromeRefesh2023` and other refresh-related flags. + # The `fyi` versions of these test suites just include the normal + # versions of browser_tests and interactive_ui_tests to make it easier + # to garden the FYI bots and tell if a failure is likely to be + # cr23-specific or not. + + 'cr23_fyi_linux_gtests': { + 'browser_tests': { + 'swarming': { + 'shards': 20, + }, + }, + 'interactive_ui_tests': { + 'swarming': { + 'shards': 10, + }, + }, + }, + 'cr23_fyi_mac_gtests': { + 'browser_tests': { + 'swarming': { + 'shards': 20, + }, + }, + 'interactive_ui_tests': { + 'swarming': { + 'shards': 10, + }, + }, + }, + 'cr23_fyi_win_gtests': { + 'browser_tests': { + 'swarming': { + 'shards': 20, + }, + }, + 'interactive_ui_tests': { + 'swarming': { + 'shards': 10, + }, + }, + }, + 'cr23_main_linux_gtests': { 'cr23_browser_tests': { 'args': [ ('--test-launcher-filter-file=' @@ -1697,6 +1738,7 @@ 'shards': 20, }, 'ci_only': True, + 'experiment_percentage': 10, 'test': 'browser_tests', 'mixins': [ 'chrome-refresh-2023' ], }, @@ -1710,16 +1752,18 @@ 'shards': 10, }, 'ci_only': True, + 'experiment_percentage': 10, 'test': 'interactive_ui_tests', 'mixins': [ 'chrome-refresh-2023' ], }, 'cr23_views_unittests': { 'ci_only': True, + 'experiment_percentage': 10, 'test': 'views_unittests', 'mixins': [ 'chrome-refresh-2023' ], }, }, - 'cr23_mac_gtests': { + 'cr23_main_mac_gtests': { 'cr23_browser_tests': { 'args': [ ('--test-launcher-filter-file=' @@ -1730,6 +1774,7 @@ 'shards': 20, }, 'ci_only': True, + 'experiment_percentage': 10, 'test': 'browser_tests', 'mixins': [ 'chrome-refresh-2023' ], }, @@ -1743,15 +1788,54 @@ 'shards': 10, }, 'ci_only': True, + 'experiment_percentage': 10, 'test': 'interactive_ui_tests', 'mixins': [ 'chrome-refresh-2023' ], }, 'cr23_views_unittests': { 'ci_only': True, + 'experiment_percentage': 10, 'test': 'views_unittests', 'mixins': [ 'chrome-refresh-2023' ], }, }, + 'cr23_main_win_gtests': { + 'cr23_browser_tests': { + 'args': [ + ('--test-launcher-filter-file=' + '../../testing/buildbot/filters/cr23.win.cr23_browser_tests.filter' + ), + ], + 'swarming': { + 'shards': 20, + }, + 'ci_only': True, + 'experiment_percentage': 10, + 'test': 'browser_tests', + 'mixins': [ 'chrome-refresh-2023' ], + }, + 'cr23_interactive_ui_tests': { + 'args': [ + ('--test-launcher-filter-file=' + '../../testing/buildbot/filters/cr23.win.cr23_interactive_ui_tests.filter' + ), + ], + 'swarming': { + 'shards': 10, + }, + 'ci_only': True, + 'experiment_percentage': 10, + 'test': 'interactive_ui_tests', + 'mixins': [ 'chrome-refresh-2023' ], + }, + 'cr23_views_unittests': { + 'ci_only': True, + 'experiment_percentage': 10, + 'test': 'views_unittests', + 'mixins': [ 'chrome-refresh-2023' ], + }, + }, + 'cr23_pixel_browser_tests_gtests': { 'cr23_pixel_browser_tests': { 'args': [ @@ -1788,45 +1872,6 @@ ], }, }, - 'cr23_win_gtests': { - 'cr23_browser_tests': { - 'args': [ - ('--test-launcher-filter-file=' - '../../testing/buildbot/filters/cr23.win.cr23_browser_tests.filter' - ), - ], - 'swarming': { - 'shards': 20, - }, - 'ci_only': True, - 'experiment_percentage': 10, - 'test': 'browser_tests', - 'mixins': [ 'chrome-refresh-2023' ], - }, - 'cr23_interactive_ui_tests': { - 'args': [ - ('--test-launcher-filter-file=' - '../../testing/buildbot/filters/cr23.win.cr23_interactive_ui_tests.filter' - ), - ], - 'swarming': { - 'shards': 10, - }, - 'ci_only': True, - 'test': 'interactive_ui_tests', - 'mixins': [ 'chrome-refresh-2023' ], - }, - 'cr23_views_unittests': { - 'args': [ - ('--test-launcher-filter-file=' - '../../testing/buildbot/filters/cr23.win.cr23_views_unittests.filter' - ), - ], - 'ci_only': True, - 'test': 'views_unittests', - 'mixins': [ 'chrome-refresh-2023' ], - }, - }, 'cronet_gtests': { 'cronet_sample_test_apk': {}, @@ -6137,6 +6182,7 @@ 'chromium_gtests_for_linux_and_mac_only', 'chromium_gtests_for_linux_only', 'chromium_gtests_for_win_and_linux_only', + 'cr23_main_linux_gtests', 'linux_flavor_specific_chromium_gtests', 'linux_specific_xr_gtests', 'gl_gtests_passthrough', @@ -6156,6 +6202,7 @@ 'chromium_gtests_for_linux_and_mac_only', 'chromium_gtests_for_linux_only', 'chromium_gtests_for_win_and_linux_only', + 'cr23_main_linux_gtests', 'linux_flavor_specific_chromium_gtests', 'linux_specific_xr_gtests', 'gl_gtests_passthrough', @@ -6191,8 +6238,7 @@ ], # When changing something here, change chromium_linux_and_gl_gtests, - # chromium_linux_and_gl_and_vulkan_gtests, and - # chromium_linux_rel_gtests_once in the same way. + # and chromium_linux_and_gl_and_vulkan_gtests in the same way. 'chromium_linux_gtests': [ 'aura_gtests', 'chromium_gtests', @@ -6201,29 +6247,7 @@ 'chromium_gtests_for_linux_and_mac_only', 'chromium_gtests_for_linux_only', 'chromium_gtests_for_win_and_linux_only', - 'linux_flavor_specific_chromium_gtests', - 'linux_specific_xr_gtests', - 'non_android_and_cast_and_chromeos_chromium_gtests', - 'non_android_chromium_gtests', - 'vr_platform_specific_chromium_gtests', - ], - - # TODO(crbug.com/1444855): This set should match chromium_linux_gtests, - # except that it also runs tests that we can afford to run only once on - # Linux machines (for now, this is just the cr23_linux_gtests). - # - # Delete this test suite after the ChromeRefresh2023 is fully rolled out - # (assuming no other test suites are being run only once) and make sure - # any bots go back to using chromium_linux_gtests. - 'chromium_linux_gtests_once': [ - 'aura_gtests', - 'chromium_gtests', - 'chromium_gtests_for_devices_with_graphical_output', - 'chromium_gtests_for_linux_and_chromeos_only', - 'chromium_gtests_for_linux_and_mac_only', - 'chromium_gtests_for_linux_only', - 'chromium_gtests_for_win_and_linux_only', - 'cr23_linux_gtests', + 'cr23_main_linux_gtests', 'linux_flavor_specific_chromium_gtests', 'linux_specific_xr_gtests', 'non_android_and_cast_and_chromeos_chromium_gtests', @@ -6275,6 +6299,7 @@ 'chromium_gtests', 'chromium_gtests_for_devices_with_graphical_output', 'chromium_gtests_for_linux_and_mac_only', + 'cr23_main_mac_gtests', 'mac_specific_chromium_gtests', 'nocompile_tests', 'non_android_and_cast_and_chromeos_chromium_gtests', @@ -6285,34 +6310,17 @@ 'chromium_gtests', 'chromium_gtests_for_devices_with_graphical_output', 'chromium_gtests_for_linux_and_mac_only', + 'cr23_main_mac_gtests', 'mac_specific_chromium_gtests', 'nocompile_tests', 'non_android_and_cast_and_chromeos_chromium_gtests', 'non_android_chromium_gtests_no_nacl', ], - # When changing something here, change - # chromium_mac_gtests_no_nocompile_once in the same way. 'chromium_mac_gtests_no_nacl_no_nocompile': [ 'chromium_gtests', 'chromium_gtests_for_devices_with_graphical_output', - 'mac_specific_chromium_gtests', - 'non_android_and_cast_and_chromeos_chromium_gtests', - 'non_android_chromium_gtests_no_nacl', - ], - - # TODO(crbug.com/1444855): This set should match - # chromium_mac_gtests_no_nacl_no_nocompile, except that it also runs - # tests that we can only afford to run once on Mac machines (for now, - # this is just the cr23_mac_gtests). - # - # Delete this test suite after the ChromeRefresh2023 is fully rolled out - # and make sure any bots go back to using - # chromium_mac_gtests_no_nacl_no_nocompile. - 'chromium_mac_gtests_no_nacl_no_nocompile_once': [ - 'chromium_gtests', - 'chromium_gtests_for_devices_with_graphical_output', - 'cr23_mac_gtests', + 'cr23_main_mac_gtests', 'mac_specific_chromium_gtests', 'non_android_and_cast_and_chromeos_chromium_gtests', 'non_android_chromium_gtests_no_nacl', @@ -6358,13 +6366,13 @@ # Pixel tests only enabled on Win 10. So this is # 'chromium_win_gtests' + 'pixel_browser_tests_gtests' + - # 'non_android_chromium_gtests_skia_gold'. When changing - # something here, also change chromium_win10_gtests_once in the same way. + # 'non_android_chromium_gtests_skia_gold'. 'chromium_win10_gtests': [ 'aura_gtests', 'chromium_gtests', 'chromium_gtests_for_devices_with_graphical_output', 'chromium_gtests_for_win_and_linux_only', + 'cr23_main_win_gtests', 'cr23_pixel_browser_tests_gtests', 'fieldtrial_browser_tests', 'non_android_and_cast_and_chromeos_chromium_gtests', @@ -6375,28 +6383,6 @@ 'win_specific_chromium_gtests', ], - # TODO(crbug.com/1444855): This set should match chromium_win10_gtests, - # except that it also runs tests that we can afford to run only once - # on Windows machines (for now this is just the cr23_win_gtests). - # - # Delete this test suite after the ChromeRefresh2023 is fully rolled out - # and make sure any bots go back to using chromium_win10_gtests. - 'chromium_win10_gtests_once': [ - 'aura_gtests', - 'chromium_gtests', - 'chromium_gtests_for_devices_with_graphical_output', - 'chromium_gtests_for_win_and_linux_only', - 'cr23_pixel_browser_tests_gtests', - 'cr23_win_gtests', - 'fieldtrial_browser_tests', - 'non_android_and_cast_and_chromeos_chromium_gtests', - 'non_android_chromium_gtests', - 'non_android_chromium_gtests_skia_gold', - 'pixel_browser_tests_gtests', - 'vr_platform_specific_chromium_gtests', - 'win_specific_chromium_gtests', - ], - 'chromium_win_dbg_isolated_scripts': [ 'chromedriver_py_tests_isolated_scripts', 'components_perftests_isolated_scripts', @@ -6410,6 +6396,7 @@ 'chromium_gtests', 'chromium_gtests_for_devices_with_graphical_output', 'chromium_gtests_for_win_and_linux_only', + 'cr23_main_win_gtests', 'non_android_and_cast_and_chromeos_chromium_gtests', 'non_android_chromium_gtests', 'vr_platform_specific_chromium_gtests', @@ -6446,6 +6433,21 @@ 'win_specific_isolated_scripts', ], + 'cr23_linux_gtests': [ + 'cr23_fyi_linux_gtests', + 'cr23_main_linux_gtests', + ], + + 'cr23_mac_gtests': [ + 'cr23_fyi_mac_gtests', + 'cr23_main_mac_gtests', + ], + + 'cr23_win_gtests': [ + 'cr23_fyi_win_gtests', + 'cr23_main_win_gtests', + ], + 'cronet_dbg_isolated_scripts': [ 'cronet_sizes', ],
diff --git a/testing/buildbot/waterfalls.pyl b/testing/buildbot/waterfalls.pyl index 84e14e2b..f5cca25 100644 --- a/testing/buildbot/waterfalls.pyl +++ b/testing/buildbot/waterfalls.pyl
@@ -3671,6 +3671,7 @@ 'x86-64', ], 'test_suites': { + 'gtest_tests': 'cr23_linux_gtests' }, 'os_type': 'linux', }, @@ -3831,6 +3832,7 @@ }, 'mac-cr23-rel': { 'test_suites': { + 'gtest_tests': 'cr23_mac_gtests', }, 'mixins': [ 'mac_x64', @@ -3945,6 +3947,7 @@ }, 'win-cr23-rel': { 'test_suites': { + 'gtest_tests': 'cr23_win_gtests', }, 'mixins': [ 'win10-any', @@ -4954,10 +4957,7 @@ 'linux-jammy', ], 'test_suites': { - # TODO(crbug.com/1444855): Switch this back to - # 'chromium_linux_gtests' after the ChromeRefresh2023 - # is fully rolled out. - 'gtest_tests': 'chromium_linux_gtests_once', + 'gtest_tests': 'chromium_linux_gtests', 'isolated_scripts': 'chromium_linux_rel_isolated_scripts_once', }, }, @@ -5077,10 +5077,7 @@ 'isolate_profile_data', ], 'test_suites': { - # TODO(crbug.com/1444855): Switch this back to - # 'chromium_mac_gtests_no_nacl_no_nocompile' after the - # ChromeRefresh2023 is fully rolled out. - 'gtest_tests': 'chromium_mac_gtests_no_nacl_no_nocompile_once', + 'gtest_tests': 'chromium_mac_gtests_no_nacl_no_nocompile', 'isolated_scripts': 'chromium_mac_rel_isolated_scripts_once', }, }, @@ -6315,10 +6312,7 @@ 'isolate_profile_data', ], 'test_suites': { - # TODO(crbug.com/1444855): Switch this back to - # 'chromium_win10_gtests' after the - # ChromeRefresh2023 is fully rolled out. - 'gtest_tests': 'chromium_win10_gtests_once', + 'gtest_tests': 'chromium_win10_gtests', 'isolated_scripts': 'chromium_win_rel_isolated_scripts_once', }, },
diff --git a/testing/variations/fieldtrial_testing_config.json b/testing/variations/fieldtrial_testing_config.json index 8e0ff93..1c97bcb2 100644 --- a/testing/variations/fieldtrial_testing_config.json +++ b/testing/variations/fieldtrial_testing_config.json
@@ -3879,6 +3879,34 @@ ] } ], + "CommercePriceInsights": [ + { + "platforms": [ + "chromeos", + "chromeos_lacros", + "linux", + "mac", + "windows" + ], + "experiments": [ + { + "name": "Enabled", + "params": { + "availability": "any", + "event_1": "name:price_insights_page_action_icon_label_in_trigger;comparator:any;window:0;storage:360", + "event_trigger": "name:price_insights_page_action_icon_label_in_trigger;comparator:any;window:0;storage:360", + "event_used": "name:price_insights_page_action_icon_label_used;comparator:any;window:0;storage:360", + "price-insights-show-feedback": "true", + "session_rate": "any" + }, + "enable_features": [ + "IPH_PriceInsightsPageActionIconLabelFeature", + "PriceInsights" + ] + } + ] + } + ], "CompositeBGColorAnimationExp4": [ { "platforms": [
diff --git a/third_party/angle b/third_party/angle index bc7fc39..8330fcd 160000 --- a/third_party/angle +++ b/third_party/angle
@@ -1 +1 @@ -Subproject commit bc7fc3997be824e3029da785ba5bc2e3df25e546 +Subproject commit 8330fcd33f07607b3900cde853be747f1c8f8e52
diff --git a/third_party/blink/perf_tests/css/CSSCountersCreate.html b/third_party/blink/perf_tests/css/CSSCountersCreate.html new file mode 100644 index 0000000..6aebe57 --- /dev/null +++ b/third_party/blink/perf_tests/css/CSSCountersCreate.html
@@ -0,0 +1,32 @@ +<!DOCTYPE html> +<script src="../resources/runner.js"></script> +<style> + div { + counter-increment: my-counter; + } + div::before { + content: counter(my-counter); + } +</style> +<body></body> +<script> + function createTree(root, num_elements, depth) { + if (!depth) { + return; + } + for (let i = 0; i < num_elements; ++i) { + const div = document.createElement('div'); + root.append(div); + createTree(div, num_elements, depth - 1); + } + } + + PerfTestRunner.measureTime({ + description: 'Measure the time of the css counters creation', + run: function() { + document.body.innerHTML = ''; + createTree(document.body, 5, 6); + }, + iterationCount: 5, + }); +</script>
diff --git a/third_party/blink/public/mojom/render_accessibility.mojom b/third_party/blink/public/mojom/render_accessibility.mojom index 9c09e46..6568ce7 100644 --- a/third_party/blink/public/mojom/render_accessibility.mojom +++ b/third_party/blink/public/mojom/render_accessibility.mojom
@@ -54,10 +54,9 @@ // as part of once the original call has been processed, in order to notify // the renderer that it can send additional updates. // - // |reset_token| parameter is set if this method was sent in response to a - // reset request from the browser. When the browser requests a reset, it - // ignores incoming remote calls until it sees one with the correct reset - // token. Any other time, it ignores further calls with a reset token. + // |reset_token| parameter matches the value provided by the browser in the + // most recent Reset() or SetMode(), so that the browser can filter out + // obsolete messages. // // The accessibility information sent to the browser is dependent on both // the number of nodes in the DOM (and their accessibility metadata) as well @@ -66,14 +65,18 @@ // TODO(crbug.com/1088484) tracks work to improve the payload size. [UnlimitedSize] HandleAXEvents(AXUpdatesAndEvents events_and_updates, - int32 reset_token) => (); + uint32 reset_token) => (); // Sent to update the browser of the location of accessibility objects. // Similar to HandleAXEvents, the message size is also unbounded (though in // practice these message sizes are quite a bit smaller than HandleAXEvents). // TODO(crbug.com/1088484) tracks work to improve the payload size. + // + // |reset_token| parameter matches the value provided by the browser in the + // most recent Reset() or SetMode(), so that the browser can filter out + // obsolete messages. [UnlimitedSize] - HandleAXLocationChanges(array<LocationChanges> changes); + HandleAXLocationChanges(array<LocationChanges> changes, uint32 reset_token); }; // Interface for accessibility messages sent from RenderFrameHostImpl in the @@ -89,7 +92,10 @@ // match the one set for such frame from the browser process. |ax_mode| should // contain at least the ui::AXMode::kWebContents value to enable accessibility // support for web contents. See ui/accessibility/ax_mode.h for valid values. - SetMode(ax.mojom.AXMode ax_mode); + // + // |reset_token| provides a value to return with future events, messages, etc. + // so that the browser can filter out obsolete data. + SetMode(ax.mojom.AXMode ax_mode, uint32 reset_token); // Kills the renderer. Sent when there is a fatal error in the accessibility // tree and the maximum number of resets has been hit. @@ -120,5 +126,8 @@ // accessibility IPCs until it receives one with the matching reset token. // Conversely, it ignores IPCs with a reset token if it was not expecting a // reset. - Reset(int32 reset_token); + // + // |reset_token| provides a value to return with future events, messages, etc. + // so that the browser can filter out obsolete data. + Reset(uint32 reset_token); };
diff --git a/third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom b/third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom index 6ed172d8..b31c86f 100644 --- a/third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom +++ b/third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom
@@ -3980,6 +3980,7 @@ kVirtualKeyboardShow = 4640, kVirtualKeyboardHide = 4641, kVirtualKeyboardOverlayPolicy = 4642, + kScrollSnapNestedSnapAreas = 4643, // Add new features immediately above this line. Don't change assigned // numbers of any item, and don't reuse removed slots.
diff --git a/third_party/blink/public/web/web_ax_context.h b/third_party/blink/public/web/web_ax_context.h index 2484d27..727c9631 100644 --- a/third_party/blink/public/web/web_ax_context.h +++ b/third_party/blink/public/web/web_ax_context.h
@@ -55,7 +55,7 @@ // Retrieves a vector of all WebAXObjects in this document whose // bounding boxes may have changed since the last query. Sends that vector // via mojo to the browser process. - void SerializeLocationChanges() const; + void SerializeLocationChanges(uint32_t reset_token) const; // Searches the accessibility tree for plugin's root object and returns it. // Returns an empty WebAXObject if no root object is present.
diff --git a/third_party/blink/renderer/core/accessibility/ax_object_cache.h b/third_party/blink/renderer/core/accessibility/ax_object_cache.h index 46b1b55..a7e7a882 100644 --- a/third_party/blink/renderer/core/accessibility/ax_object_cache.h +++ b/third_party/blink/renderer/core/accessibility/ax_object_cache.h
@@ -221,7 +221,7 @@ // Returns true if there are any pending updates that need processing. virtual bool IsDirty() = 0; - virtual void SerializeLocationChanges() = 0; + virtual void SerializeLocationChanges(uint32_t reset_token) = 0; virtual AXObject* GetPluginRoot() = 0;
diff --git a/third_party/blink/renderer/core/animation/scroll_snapshot_timeline.cc b/third_party/blink/renderer/core/animation/scroll_snapshot_timeline.cc index e8715d9..2cf2d32 100644 --- a/third_party/blink/renderer/core/animation/scroll_snapshot_timeline.cc +++ b/third_party/blink/renderer/core/animation/scroll_snapshot_timeline.cc
@@ -163,6 +163,11 @@ // Force recalculation of an auto-aligned start time, and invalidate // normalized timing. for (Animation* animation : GetAnimations()) { + // Avoid setting a deferred start time during the update snapshot phase. + // Instead wait for the validation phase post layout. + if (!animation->CurrentTimeInternal()) { + continue; + } animation->OnValidateSnapshot(layout_changed); } }
diff --git a/third_party/blink/renderer/core/css/css_properties.json5 b/third_party/blink/renderer/core/css/css_properties.json5 index 914bdc0..ff3df57b 100644 --- a/third_party/blink/renderer/core/css/css_properties.json5 +++ b/third_party/blink/renderer/core/css/css_properties.json5
@@ -3285,6 +3285,7 @@ keywords: ["auto"], typedom_types: ["Keyword", "Length", "Percentage"], valid_for_first_letter: true, + valid_for_position_fallback: true, logical_property_group: { name: "margin", resolver: "bottom", @@ -3304,6 +3305,7 @@ keywords: ["auto"], typedom_types: ["Keyword", "Length", "Percentage"], valid_for_first_letter: true, + valid_for_position_fallback: true, logical_property_group: { name: "margin", resolver: "left", @@ -3323,6 +3325,7 @@ keywords: ["auto"], typedom_types: ["Keyword", "Length", "Percentage"], valid_for_first_letter: true, + valid_for_position_fallback: true, logical_property_group: { name: "margin", resolver: "right", @@ -3342,6 +3345,7 @@ keywords: ["auto"], typedom_types: ["Keyword", "Length", "Percentage"], valid_for_first_letter: true, + valid_for_position_fallback: true, logical_property_group: { name: "margin", resolver: "top", @@ -6297,6 +6301,7 @@ typedom_types: ["Length", "Percentage"], keywords: ["auto"], valid_for_first_letter: true, + valid_for_position_fallback: true, }, { name: "margin-inline-end", @@ -6309,6 +6314,7 @@ typedom_types: ["Length", "Percentage"], keywords: ["auto"], valid_for_first_letter: true, + valid_for_position_fallback: true, }, { name: "margin-block-start", @@ -6321,6 +6327,7 @@ typedom_types: ["Length", "Percentage"], keywords: ["auto"], valid_for_first_letter: true, + valid_for_position_fallback: true, }, { name: "margin-block-end", @@ -6333,6 +6340,7 @@ typedom_types: ["Length", "Percentage"], keywords: ["auto"], valid_for_first_letter: true, + valid_for_position_fallback: true, }, { name: "padding-inline-start", @@ -7246,16 +7254,21 @@ longhands: ["margin-top", "margin-right", "margin-bottom", "margin-left"], property_methods: ["ParseShorthand", "CSSValueFromComputedStyleInternal"], layout_dependent: true, + valid_for_position_fallback: true, }, { name: "margin-block", longhands: ["margin-block-start", "margin-block-end"], property_methods: ["ParseShorthand", "CSSValueFromComputedStyleInternal"], + layout_dependent: true, + valid_for_position_fallback: true, }, { name: "margin-inline", longhands: ["margin-inline-start", "margin-inline-end"], property_methods: ["ParseShorthand", "CSSValueFromComputedStyleInternal"], + layout_dependent: true, + valid_for_position_fallback: true, }, { name: "marker",
diff --git a/third_party/blink/renderer/core/css/parser/css_parser_fast_paths.cc b/third_party/blink/renderer/core/css/parser/css_parser_fast_paths.cc index 12b645a..0aab4500 100644 --- a/third_party/blink/renderer/core/css/parser/css_parser_fast_paths.cc +++ b/third_party/blink/renderer/core/css/parser/css_parser_fast_paths.cc
@@ -1828,6 +1828,8 @@ value_id); return CSSIdentifierValue::Create(value_id); } + css_parsing_utils::WarnInvalidKeywordPropertyUsage(property_id, *context, + value_id); return nullptr; }
diff --git a/third_party/blink/renderer/core/css/properties/css_parsing_utils.cc b/third_party/blink/renderer/core/css/properties/css_parsing_utils.cc index 8c2028f..bd72c42b 100644 --- a/third_party/blink/renderer/core/css/properties/css_parsing_utils.cc +++ b/third_party/blink/renderer/core/css/properties/css_parsing_utils.cc
@@ -3397,19 +3397,64 @@ } } +void WarnInvalidKeywordPropertyUsage(CSSPropertyID property, + const CSSParserContext& context, + CSSValueID value_id) { + if (!context.IsUseCounterRecordingEnabled()) { + return; + } + switch (property) { + case CSSPropertyID::kAppearance: + case CSSPropertyID::kAliasWebkitAppearance: { + // TODO(crbug.com/924486, crbug.com/1426629): Remove warnings after + // shipping. + if ((!RuntimeEnabledFeatures::NonStandardAppearanceValuesEnabled() && + (value_id == CSSValueID::kInnerSpinButton || + value_id == CSSValueID::kMediaSlider || + value_id == CSSValueID::kMediaSliderthumb || + value_id == CSSValueID::kMediaVolumeSlider || + value_id == CSSValueID::kMediaVolumeSliderthumb || + value_id == CSSValueID::kPushButton || + value_id == CSSValueID::kSquareButton || + value_id == CSSValueID::kSliderHorizontal || + value_id == CSSValueID::kSliderthumbHorizontal || + value_id == CSSValueID::kSliderthumbVertical || + value_id == CSSValueID::kSearchfieldCancelButton)) || + (!RuntimeEnabledFeatures:: + NonStandardAppearanceValueSliderVerticalEnabled() && + value_id == CSSValueID::kSliderVertical)) { + if (const auto* document = context.GetDocument()) { + document->AddConsoleMessage( + MakeGarbageCollected<ConsoleMessage>( + mojom::blink::ConsoleMessageSource::kOther, + mojom::blink::ConsoleMessageLevel::kWarning, + String("The keyword '") + getValueName(value_id) + + "' specified to an 'appearance' property is " + "deprecated. Please consider updating."), + true); + } + } + break; + } + default: + break; + } +} + const CSSValue* ParseLonghand(CSSPropertyID unresolved_property, CSSPropertyID current_shorthand, const CSSParserContext& context, CSSParserTokenRange& range) { CSSPropertyID property_id = ResolveCSSPropertyID(unresolved_property); + CSSValueID value_id = range.Peek().Id(); DCHECK(!CSSProperty::Get(property_id).IsShorthand()); if (CSSParserFastPaths::IsHandledByKeywordFastPath(property_id)) { if (CSSParserFastPaths::IsValidKeywordPropertyAndValue( property_id, range.Peek().Id(), context.Mode())) { - CountKeywordOnlyPropertyUsage(property_id, context, range.Peek().Id()); + CountKeywordOnlyPropertyUsage(property_id, context, value_id); return ConsumeIdent(range); } - + WarnInvalidKeywordPropertyUsage(property_id, context, value_id); return nullptr; }
diff --git a/third_party/blink/renderer/core/css/properties/css_parsing_utils.h b/third_party/blink/renderer/core/css/properties/css_parsing_utils.h index df813393..ecdc8fe1 100644 --- a/third_party/blink/renderer/core/css/properties/css_parsing_utils.h +++ b/third_party/blink/renderer/core/css/properties/css_parsing_utils.h
@@ -235,6 +235,10 @@ const CSSParserContext&, CSSValueID); +void WarnInvalidKeywordPropertyUsage(CSSPropertyID, + const CSSParserContext&, + CSSValueID); + const CSSValue* ParseLonghand(CSSPropertyID unresolved_property, CSSPropertyID current_shorthand, const CSSParserContext&,
diff --git a/third_party/blink/renderer/core/css/properties/longhands/longhands_custom.cc b/third_party/blink/renderer/core/css/properties/longhands/longhands_custom.cc index 2d891f7c..89a302e 100644 --- a/third_party/blink/renderer/core/css/properties/longhands/longhands_custom.cc +++ b/third_party/blink/renderer/core/css/properties/longhands/longhands_custom.cc
@@ -5194,21 +5194,18 @@ bool MarginBottom::IsLayoutDependent(const ComputedStyle* style, LayoutObject* layout_object) const { - return layout_object && layout_object->IsBox() && - (!style || !style->MarginBottom().IsFixed()); + return layout_object && layout_object->IsBox(); } const CSSValue* MarginBottom::CSSValueFromComputedStyleInternal( const ComputedStyle& style, const LayoutObject* layout_object, bool allow_visited_style) const { - const Length& margin_bottom = style.MarginBottom(); - if (margin_bottom.IsFixed() || !layout_object || !layout_object->IsBox()) { - return ComputedStyleUtils::ZoomAdjustedPixelValueForLength(margin_bottom, - style); + if (const LayoutBox* box = DynamicTo<LayoutBox>(layout_object)) { + return ZoomAdjustedPixelValue(box->MarginBottom(), style); } - return ZoomAdjustedPixelValue(To<LayoutBox>(layout_object)->MarginBottom(), - style); + return ComputedStyleUtils::ZoomAdjustedPixelValueForLength( + style.MarginBottom(), style); } bool MarginInlineEnd::IsLayoutDependent(const ComputedStyle* style, @@ -5247,21 +5244,18 @@ bool MarginLeft::IsLayoutDependent(const ComputedStyle* style, LayoutObject* layout_object) const { - return layout_object && layout_object->IsBox() && - (!style || !style->MarginLeft().IsFixed()); + return layout_object && layout_object->IsBox(); } const CSSValue* MarginLeft::CSSValueFromComputedStyleInternal( const ComputedStyle& style, const LayoutObject* layout_object, bool allow_visited_style) const { - const Length& margin_left = style.MarginLeft(); - if (margin_left.IsFixed() || !layout_object || !layout_object->IsBox()) { - return ComputedStyleUtils::ZoomAdjustedPixelValueForLength(margin_left, - style); + if (const LayoutBox* box = DynamicTo<LayoutBox>(layout_object)) { + return ZoomAdjustedPixelValue(box->MarginLeft(), style); } - return ZoomAdjustedPixelValue(To<LayoutBox>(layout_object)->MarginLeft(), - style); + return ComputedStyleUtils::ZoomAdjustedPixelValueForLength(style.MarginLeft(), + style); } const CSSValue* MarginRight::ParseSingleValue( @@ -5274,21 +5268,18 @@ bool MarginRight::IsLayoutDependent(const ComputedStyle* style, LayoutObject* layout_object) const { - return layout_object && layout_object->IsBox() && - (!style || !style->MarginRight().IsFixed()); + return layout_object && layout_object->IsBox(); } const CSSValue* MarginRight::CSSValueFromComputedStyleInternal( const ComputedStyle& style, const LayoutObject* layout_object, bool allow_visited_style) const { - const Length& margin_right = style.MarginRight(); - if (margin_right.IsFixed() || !layout_object || !layout_object->IsBox()) { - return ComputedStyleUtils::ZoomAdjustedPixelValueForLength(margin_right, - style); + if (const LayoutBox* box = DynamicTo<LayoutBox>(layout_object)) { + return ZoomAdjustedPixelValue(box->MarginRight(), style); } - return ZoomAdjustedPixelValue(To<LayoutBox>(layout_object)->MarginRight(), - style); + return ComputedStyleUtils::ZoomAdjustedPixelValueForLength( + style.MarginRight(), style); } const CSSValue* MarginTop::ParseSingleValue( @@ -5301,21 +5292,18 @@ bool MarginTop::IsLayoutDependent(const ComputedStyle* style, LayoutObject* layout_object) const { - return layout_object && layout_object->IsBox() && - (!style || !style->MarginTop().IsFixed()); + return layout_object && layout_object->IsBox(); } const CSSValue* MarginTop::CSSValueFromComputedStyleInternal( const ComputedStyle& style, const LayoutObject* layout_object, bool allow_visited_style) const { - const Length& margin_top = style.MarginTop(); - if (margin_top.IsFixed() || !layout_object || !layout_object->IsBox()) { - return ComputedStyleUtils::ZoomAdjustedPixelValueForLength(margin_top, - style); + if (const LayoutBox* box = DynamicTo<LayoutBox>(layout_object)) { + return ZoomAdjustedPixelValue(box->MarginTop(), style); } - return ZoomAdjustedPixelValue(To<LayoutBox>(layout_object)->MarginTop(), - style); + return ComputedStyleUtils::ZoomAdjustedPixelValueForLength(style.MarginTop(), + style); } const CSSValue* MarkerEnd::ParseSingleValue( @@ -8895,14 +8883,15 @@ const CSSParserLocalContext& local_context) const { CSSValueID id = range.Peek().Id(); CSSPropertyID property = CSSPropertyID::kAppearance; + if (local_context.UseAliasParsing()) { + property = CSSPropertyID::kAliasWebkitAppearance; + } if (CSSParserFastPaths::IsValidKeywordPropertyAndValue(property, id, context.Mode())) { - if (local_context.UseAliasParsing()) { - property = CSSPropertyID::kAliasWebkitAppearance; - } css_parsing_utils::CountKeywordOnlyPropertyUsage(property, context, id); return css_parsing_utils::ConsumeIdent(range); } + css_parsing_utils::WarnInvalidKeywordPropertyUsage(property, context, id); return nullptr; }
diff --git a/third_party/blink/renderer/core/css/properties/shorthands/shorthands_custom.cc b/third_party/blink/renderer/core/css/properties/shorthands/shorthands_custom.cc index 3ec70dd2..9f842d4 100644 --- a/third_party/blink/renderer/core/css/properties/shorthands/shorthands_custom.cc +++ b/third_party/blink/renderer/core/css/properties/shorthands/shorthands_custom.cc
@@ -2512,6 +2512,11 @@ marginBlockShorthand(), important, context, range, properties); } +bool MarginBlock::IsLayoutDependent(const ComputedStyle* style, + LayoutObject* layout_object) const { + return layout_object && layout_object->IsBox(); +} + const CSSValue* MarginBlock::CSSValueFromComputedStyleInternal( const ComputedStyle& style, const LayoutObject* layout_object, @@ -2532,10 +2537,7 @@ bool Margin::IsLayoutDependent(const ComputedStyle* style, LayoutObject* layout_object) const { - return layout_object && layout_object->IsBox() && - (!style || !style->MarginBottom().IsFixed() || - !style->MarginTop().IsFixed() || !style->MarginLeft().IsFixed() || - !style->MarginRight().IsFixed()); + return layout_object && layout_object->IsBox(); } const CSSValue* Margin::CSSValueFromComputedStyleInternal( @@ -2556,6 +2558,11 @@ marginInlineShorthand(), important, context, range, properties); } +bool MarginInline::IsLayoutDependent(const ComputedStyle* style, + LayoutObject* layout_object) const { + return layout_object && layout_object->IsBox(); +} + const CSSValue* MarginInline::CSSValueFromComputedStyleInternal( const ComputedStyle& style, const LayoutObject* layout_object,
diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink/renderer/core/dom/document.cc index 3973509..74428f0 100644 --- a/third_party/blink/renderer/core/dom/document.cc +++ b/third_party/blink/renderer/core/dom/document.cc
@@ -2711,10 +2711,11 @@ } void Document::ClearFocusedElementIfNeeded() { - if (!clear_focused_element_timer_.IsActive() && focused_element_ && - !focused_element_->IsFocusable()) { - clear_focused_element_timer_.StartOneShot(base::TimeDelta(), FROM_HERE); + if (clear_focused_element_timer_.IsActive() || !focused_element_ || + focused_element_->IsFocusable()) { + return; } + clear_focused_element_timer_.StartOneShot(base::TimeDelta(), FROM_HERE); } void Document::ClearFocusedElementTimerFired(TimerBase*) {
diff --git a/third_party/blink/renderer/core/dom/element.cc b/third_party/blink/renderer/core/dom/element.cc index a97efde..a6a1bcdc 100644 --- a/third_party/blink/renderer/core/dom/element.cc +++ b/third_party/blink/renderer/core/dom/element.cc
@@ -5474,6 +5474,13 @@ !IsScrollableNode(this)) { return false; } + // This condition is to avoid clearing the focus in the middle of a + // keyboard focused scrolling event. If the scroller is currently focused, + // then let it continue to be focused even if focusable children are added. + if (GetDocument().FocusedElement() == this) { + return true; + } + for (Node* node = FlatTreeTraversal::FirstChild(*this); node; node = FlatTreeTraversal::Next(*node, this)) { if (Element* element = DynamicTo<Element>(node)) {
diff --git a/third_party/blink/renderer/core/inspector/inspector_css_agent.cc b/third_party/blink/renderer/core/inspector/inspector_css_agent.cc index 5680ae7..052d6d0 100644 --- a/third_party/blink/renderer/core/inspector/inspector_css_agent.cc +++ b/third_party/blink/renderer/core/inspector/inspector_css_agent.cc
@@ -1519,7 +1519,7 @@ "Node does not have an owner document"); } Element* element = DynamicTo<Element>(node); - if (!element) { + if (!element && !node->IsDocumentFragment()) { element = FlatTreeTraversal::ParentElement(*node); } if (!element) {
diff --git a/third_party/blink/renderer/core/layout/ng/ng_fragment_builder.cc b/third_party/blink/renderer/core/layout/ng/ng_fragment_builder.cc index 7f9f6c5..1bba76a 100644 --- a/third_party/blink/renderer/core/layout/ng/ng_fragment_builder.cc +++ b/third_party/blink/renderer/core/layout/ng/ng_fragment_builder.cc
@@ -5,6 +5,7 @@ #include "third_party/blink/renderer/core/layout/ng/ng_fragment_builder.h" #include "base/containers/contains.h" +#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-shared.h" #include "third_party/blink/renderer/core/layout/ng/ng_physical_box_fragment.h" #include "third_party/blink/renderer/core/layout/ng/ng_physical_fragment.h" #include "third_party/blink/renderer/core/style/computed_style_base_constants.h" @@ -138,6 +139,10 @@ snap_areas.insert(child_snap_area); } } + + if (child.IsSnapArea() && child.PropagatedSnapAreas()) { + child.GetDocument().CountUse(WebFeature::kScrollSnapNestedSnapAreas); + } } NGLogicalAnchorQuery& NGFragmentBuilder::EnsureAnchorQuery() {
diff --git a/third_party/blink/renderer/core/page/scrolling/snap_coordinator_test.cc b/third_party/blink/renderer/core/page/scrolling/snap_coordinator_test.cc index d095378..5672df0 100644 --- a/third_party/blink/renderer/core/page/scrolling/snap_coordinator_test.cc +++ b/third_party/blink/renderer/core/page/scrolling/snap_coordinator_test.cc
@@ -9,6 +9,7 @@ #include <memory> #include "cc/input/scroll_snap_data.h" +#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-shared.h" #include "third_party/blink/renderer/core/dom/document.h" #include "third_party/blink/renderer/core/dom/element.h" #include "third_party/blink/renderer/core/frame/local_frame_view.h" @@ -23,6 +24,7 @@ #include "third_party/blink/renderer/core/style/computed_style.h" #include "third_party/blink/renderer/core/testing/dummy_page_holder.h" #include "third_party/blink/renderer/core/testing/scoped_mock_overlay_scrollbars.h" +#include "third_party/blink/renderer/platform/testing/runtime_enabled_features_test_helpers.h" #include "third_party/blink/renderer/platform/wtf/functional.h" namespace blink { @@ -98,6 +100,15 @@ return 0U; } + bool IsUseCounted(mojom::WebFeature feature) { + return GetDocument().IsUseCounted(feature); + } + + void ClearUseCounter(mojom::WebFeature feature) { + GetDocument().ClearUseCounterForTesting(feature); + DCHECK(!IsUseCounted(feature)); + } + void SetUpSingleSnapArea() { SetHTML(R"HTML( <style> @@ -917,4 +928,73 @@ gfx::PointF(1000, 200)); } +TEST_F(SnapCoordinatorTest, UseCounterNestedSnap) { + ScopedLayoutNewSnapLogicForTest enabled_scope(true); + ClearUseCounter(WebFeature::kScrollSnapNestedSnapAreas); + // Create a few sibling areas, no nested snap areas should be reported. + SetHTML(R"HTML( + <style> + html { scroll-snap-type: y mandatory; } + .snap { scroll-snap-align: start; padding: 100px; } + </style> + <div class="snap">SNAP</div> + <div> + <div class="snap">SNAP</div> + <div class="snap">SNAP</div> + </div> + <div class="snap">SNAP</div> + )HTML"); + UpdateAllLifecyclePhasesForTest(); + EXPECT_FALSE(IsUseCounted(WebFeature::kScrollSnapNestedSnapAreas)); + + ClearUseCounter(WebFeature::kScrollSnapNestedSnapAreas); + // Create a nested snap area and ensure it's counted. + SetHTML(R"HTML( + <style> + html { scroll-snap-type: y mandatory; } + .snap { scroll-snap-align: start; padding: 100px; } + </style> + <div class="snap">SNAP + <div class="snap">SNAP</div> + </div> + )HTML"); + UpdateAllLifecyclePhasesForTest(); + EXPECT_TRUE(IsUseCounted(WebFeature::kScrollSnapNestedSnapAreas)); + + ClearUseCounter(WebFeature::kScrollSnapNestedSnapAreas); + // Create a nested snap area inside a sub-scroller and ensure it's counted. + SetHTML(R"HTML( + <style> + html { scroll-snap-type: y mandatory; } + .scroller { overflow: auto; height: 200px; } + .snap { scroll-snap-align: start; padding: 100px; } + </style> + <div class="scroller"> + <div class="snap">SNAP + <div class="snap">SNAP</div> + </div> + </div> + )HTML"); + UpdateAllLifecyclePhasesForTest(); + EXPECT_TRUE(IsUseCounted(WebFeature::kScrollSnapNestedSnapAreas)); + + ClearUseCounter(WebFeature::kScrollSnapNestedSnapAreas); + // Snap areas inside of an inner scroller should not be counted. + SetHTML(R"HTML( + <style> + html { scroll-snap-type: y mandatory; } + .scroller { overflow: auto; height: 200px; } + .snap { scroll-snap-align: start; padding: 100px; } + </style> + <div class="scroller"> + <div class="snap">SNAP</div> + <div class="scroller"> + <div class="snap">SNAP</div> + </div> + </div> + )HTML"); + UpdateAllLifecyclePhasesForTest(); + EXPECT_FALSE(IsUseCounted(WebFeature::kScrollSnapNestedSnapAreas)); +} + } // namespace blink
diff --git a/third_party/blink/renderer/modules/accessibility/ax_object_cache_impl.cc b/third_party/blink/renderer/modules/accessibility/ax_object_cache_impl.cc index de13645..5680099 100644 --- a/third_party/blink/renderer/modules/accessibility/ax_object_cache_impl.cc +++ b/third_party/blink/renderer/modules/accessibility/ax_object_cache_impl.cc
@@ -4484,7 +4484,7 @@ return active_aria_modal_dialog_; } -void AXObjectCacheImpl::SerializeLocationChanges() { +void AXObjectCacheImpl::SerializeLocationChanges(uint32_t reset_token) { if (changed_bounds_ids_.empty()) return; Vector<mojom::blink::LocationChangesPtr> changes; @@ -4511,7 +4511,7 @@ changed_bounds_ids_.clear(); if (!changes.empty()) { GetOrCreateRemoteRenderAccessibilityHost()->HandleAXLocationChanges( - std::move(changes)); + std::move(changes), reset_token); } }
diff --git a/third_party/blink/renderer/modules/accessibility/ax_object_cache_impl.h b/third_party/blink/renderer/modules/accessibility/ax_object_cache_impl.h index e01d343..fe52ff1 100644 --- a/third_party/blink/renderer/modules/accessibility/ax_object_cache_impl.h +++ b/third_party/blink/renderer/modules/accessibility/ax_object_cache_impl.h
@@ -492,7 +492,7 @@ // since the last query. Sends the resulting vector over mojo to the browser // process. Clears the vector so that the next time it's // called, it will only retrieve objects that have changed since now. - void SerializeLocationChanges() override; + void SerializeLocationChanges(uint32_t reset_token) override; // Searches the accessibility tree for plugin's root object and returns it. // Returns an empty WebAXObject if no root object is present.
diff --git a/third_party/blink/renderer/modules/exported/web_ax_context.cc b/third_party/blink/renderer/modules/exported/web_ax_context.cc index 91a1c39..005c577 100644 --- a/third_party/blink/renderer/modules/exported/web_ax_context.cc +++ b/third_party/blink/renderer/modules/exported/web_ax_context.cc
@@ -50,11 +50,11 @@ return private_->GetAXObjectCache().GenerateAXID(); } -void WebAXContext::SerializeLocationChanges() const { +void WebAXContext::SerializeLocationChanges(uint32_t reset_token) const { if (!HasActiveDocument()) { return; } - private_->GetAXObjectCache().SerializeLocationChanges(); + private_->GetAXObjectCache().SerializeLocationChanges(reset_token); } WebAXObject WebAXContext::GetPluginRoot() {
diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5 index 3a78301..885642f 100644 --- a/third_party/blink/renderer/platform/runtime_enabled_features.json5 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
@@ -1932,6 +1932,8 @@ { name: "GetAllScreensMedia", depends_on: ["GetDisplayMedia"], + origin_trial_feature_name: "GetAllScreensMedia", + origin_trial_os: ["chromeos"], public: true, status: "test", }, @@ -3221,7 +3223,7 @@ }, { name: "ScriptingMediaFeature", - status: "experimental", + status: "stable", }, { name: "ScrollableAreaNoSnapping",
diff --git a/third_party/blink/tools/blinkpy/tool/commands/rebaseline_cl.py b/third_party/blink/tools/blinkpy/tool/commands/rebaseline_cl.py index 929ecdd5..a9ab8ffe 100644 --- a/third_party/blink/tools/blinkpy/tool/commands/rebaseline_cl.py +++ b/third_party/blink/tools/blinkpy/tool/commands/rebaseline_cl.py
@@ -63,16 +63,15 @@ super(RebaselineCL, self).__init__(options=[ self.only_changed_tests_option, self.no_trigger_jobs_option, - optparse.make_option( - '--fill-missing', - dest='fill_missing', - action='store_true', - default=None, - help='If some platforms have no try job results, use results ' - 'from try job results of other platforms.'), + optparse.make_option('--fill-missing', + dest='fill_missing', + action='store_true', + default=None, + help=optparse.SUPPRESS_HELP), optparse.make_option('--no-fill-missing', dest='fill_missing', - action='store_false'), + action='store_false', + help=optparse.SUPPRESS_HELP), self.test_name_file_option, optparse.make_option( '--builders', @@ -125,6 +124,13 @@ self._tool = tool self._dry_run = options.dry_run self.git_cl = self.git_cl or GitCL(tool) + + # TODO(crbug.com/1383284): Cleanup this warning and the options above. + if options.fill_missing is not None: + _log.warning( + '`--{no-,}fill-missing` is deprecated and will be removed ' + 'soon due to limited utility (crbug.com/1383284).') + # '--dry-run' implies '--no-trigger-jobs'. options.trigger_jobs = options.trigger_jobs and not self._dry_run if args and options.test_name_file: @@ -169,23 +175,19 @@ for builder in sorted(builders_without_results): _log.warning(' %s', builder) + fill_missing = False builders_without_results.update(builders_with_infra_failures) - if options.fill_missing is None and builders_without_results: - should_continue = self._tool.user.confirm( - 'Would you like to continue?', - default=self._tool.user.DEFAULT_NO) - if not should_continue: - _log.info('Aborting.') - return 1 - options.fill_missing = self._tool.user.confirm( - 'Would you like to try to fill in missing results with ' - 'available results?\n' - 'Note: This is generally not suggested unless the results ' + if builders_without_results: + fill_missing = self._tool.user.confirm( + 'Would you like to continue?\n' + 'Note: This will try to fill in missing results ' + 'with available results.\n' + 'This is generally not suggested unless the results ' 'are platform agnostic.', default=self._tool.user.DEFAULT_NO) - if not options.fill_missing: - _log.info('Please rebaseline again for builders ' - 'with incomplete results later.') + if not fill_missing: + _log.info('Aborting. Please retry builders with no results.') + return 1 if options.test_name_file: test_baseline_set = self._make_test_baseline_set_from_file( @@ -197,7 +199,7 @@ test_baseline_set = self._make_test_baseline_set( jobs_to_results, options.only_changed_tests) - if options.fill_missing: + if fill_missing: self.fill_in_missing_results(test_baseline_set) with self._io_pool or contextlib.nullcontext(): return self.rebaseline(options, test_baseline_set)
diff --git a/third_party/blink/tools/blinkpy/tool/commands/rebaseline_cl_unittest.py b/third_party/blink/tools/blinkpy/tool/commands/rebaseline_cl_unittest.py index 04bcf74..8cb14427 100644 --- a/third_party/blink/tools/blinkpy/tool/commands/rebaseline_cl_unittest.py +++ b/third_party/blink/tools/blinkpy/tool/commands/rebaseline_cl_unittest.py
@@ -430,28 +430,12 @@ 'WARNING: Some builders have no results:\n', 'WARNING: MOCK Try Linux\n', 'WARNING: MOCK Try Mac\n', - 'INFO: Would you like to continue?\n', - 'INFO: Aborting.\n', - ]) - - def test_execute_with_canceled_job(self): - builds = { - Build('MOCK Try Win', 5000, 'Build-1'): - TryJobStatus('COMPLETED', 'FAILURE'), - Build('MOCK Try Mac', 4000, 'Build-2'): - TryJobStatus('COMPLETED', 'FAILURE'), - Build('MOCK Try Linux', 6000, 'Build-3'): - TryJobStatus('COMPLETED', 'CANCELED'), - } - self.command.git_cl = MockGitCL(self.tool, builds) - exit_code = self.command.execute(self.command_options(), [], self.tool) - self.assertEqual(exit_code, 1) - self.assertLog([ - 'INFO: All builds finished.\n', - 'WARNING: Some builders have no results:\n', - 'WARNING: MOCK Try Linux\n', - 'INFO: Would you like to continue?\n', - 'INFO: Aborting.\n', + 'INFO: Would you like to continue?\n' + 'Note: This will try to fill in missing results ' + 'with available results.\n' + 'This is generally not suggested unless the results are ' + 'platform agnostic.\n', + 'INFO: Aborting. Please retry builders with no results.\n', ]) def test_execute_with_passing_jobs(self): @@ -520,8 +504,12 @@ 'INFO: MOCK Try Win 5000 FAILURE try \n', 'WARNING: Some builders have no results:\n', 'WARNING: MOCK Try Linux\n', - 'INFO: Would you like to continue?\n', - 'INFO: Aborting.\n', + 'INFO: Would you like to continue?\n' + 'Note: This will try to fill in missing results ' + 'with available results.\n' + 'This is generally not suggested unless the results are ' + 'platform agnostic.\n', + 'INFO: Aborting. Please retry builders with no results.\n', ]) self.assertEqual(self.command.git_cl.calls, []) @@ -653,18 +641,27 @@ 'INFO: All builds finished.\n', 'WARNING: Some builders have no results:\n', 'WARNING: MOCK Try Win\n', - 'INFO: Would you like to continue?\n', - 'INFO: Aborting.\n', + 'INFO: Would you like to continue?\n' + 'Note: This will try to fill in missing results ' + 'with available results.\n' + 'This is generally not suggested unless the results are ' + 'platform agnostic.\n', + 'INFO: Aborting. Please retry builders with no results.\n', ]) def test_execute_interrupted_results_with_fill_missing(self): build = Build('MOCK Try Win', 5000, 'Build-1') self.builds[build] = TryJobStatus.from_bb_status('INFRA_FAILURE') - self.tool.user.set_canned_responses(['y', 'n']) - exit_code = self.command.execute(self.command_options(), - ['one/flaky-fail.html'], self.tool) + self.tool.user.set_canned_responses(['y']) + # TODO(crbug.com/1383284): After `--fill-missing` is fully deprecated, + # stop checking for the deprecation warning. + exit_code = self.command.execute( + self.command_options(fill_missing=True), ['one/flaky-fail.html'], + self.tool) self.assertEqual(exit_code, 0) self.assertLog([ + 'WARNING: `--{no-,}fill-missing` is deprecated and will be removed ' + 'soon due to limited utility (crbug.com/1383284).\n', 'WARNING: Some builds have infrastructure failures:\n', 'WARNING: "MOCK Try Win" build 5000\n', 'WARNING: Examples of infrastructure failures include:\n', @@ -676,13 +673,13 @@ 'WARNING: See https://chromium.googlesource.com/chromium/src/+/' 'HEAD/docs/testing/web_test_expectations.md#handle-bot-timeouts\n', 'INFO: All builds finished.\n', - 'INFO: Would you like to continue?\n', - 'INFO: Would you like to try to fill in missing results ' - 'with available results?\n' - 'Note: This is generally not suggested unless the results ' - 'are platform agnostic.\n', - 'INFO: Please rebaseline again for builders ' - 'with incomplete results later.\n', + 'INFO: Would you like to continue?\n' + 'Note: This will try to fill in missing results ' + 'with available results.\n' + 'This is generally not suggested unless the results are ' + 'platform agnostic.\n', + 'INFO: For one/flaky-fail.html:\n', + 'INFO: Using "MOCK Try Linux" build 6000 for test-win-win7.\n', 'INFO: Rebaselining one/flaky-fail.html\n', ]) @@ -835,21 +832,6 @@ } return b'diff', stats, None - def test_execute_missing_results_with_fill_missing_continues(self): - build = Build('MOCK Try Win', 5000, 'Build-1') - self.builds[build] = TryJobStatus.from_bb_status('CANCELED') - exit_code = self.command.execute( - self.command_options(fill_missing=True), ['one/flaky-fail.html'], - self.tool) - self.assertEqual(exit_code, 0) - self.assertLog([ - 'INFO: All builds finished.\n', - 'WARNING: Some builders have no results:\n', - 'WARNING: MOCK Try Win\n', 'INFO: For one/flaky-fail.html:\n', - 'INFO: Using "MOCK Try Linux" build 6000 for test-win-win7.\n', - 'INFO: Rebaselining one/flaky-fail.html\n' - ]) - def test_fill_in_missing_results(self): test_baseline_set = TestBaselineSet(self.tool.builders) test_baseline_set.add('one/flaky-fail.html',
diff --git a/third_party/blink/tools/blinkpy/w3c/wpt_results_processor.py b/third_party/blink/tools/blinkpy/w3c/wpt_results_processor.py index e1fca0e..74538d7 100644 --- a/third_party/blink/tools/blinkpy/w3c/wpt_results_processor.py +++ b/third_party/blink/tools/blinkpy/w3c/wpt_results_processor.py
@@ -430,7 +430,7 @@ handler = self._event_handlers.get(event.action) if handler: handler(event, **raw_event) - elif event.action != 'log': + elif event.action not in ['log', 'add_subsuite']: _log.warning( "%r event received, but not handled (event: %r, " 'extra: %r)', event.action, event, raw_event) @@ -885,6 +885,9 @@ compact_results = [] for result in results: compact_result = {'status': result['status']} + subsuite = result.get('subsuite', '') + if subsuite: + compact_result['subsuite'] = subsuite duration = result.get('duration') if duration: compact_result['duration'] = duration
diff --git a/third_party/blink/tools/blinkpy/wpt_tests/wpt_adapter.py b/third_party/blink/tools/blinkpy/wpt_tests/wpt_adapter.py index 570f2dc..c2c5ddc4 100644 --- a/third_party/blink/tools/blinkpy/wpt_tests/wpt_adapter.py +++ b/third_party/blink/tools/blinkpy/wpt_tests/wpt_adapter.py
@@ -49,6 +49,11 @@ self.show_logs = True self._start = datetime.now() + def generate_test_name_output(self, subsuite, test_name): + if not test_name.startswith('/wpt_internal/'): + test_name = '/external/wpt' + test_name + return f'virtual/{subsuite}{test_name}' if subsuite else test_name[1:] + def log(self, data): offset = datetime.now() - self._start minutes, seconds = divmod(max(0, offset.total_seconds()), 60) @@ -135,7 +140,9 @@ port_name: Optional[str] = None): options, tests = parse_arguments(args) cls._ensure_value(options, 'wpt_only', True) - cls._ensure_value(options, 'no_virtual_tests', True) + # only run virtual tests for content shell + cls._ensure_value(options, 'no_virtual_tests', + options.product != 'content_shell') port = host.port_factory.get(port_name, options) if options.product == 'chrome': port.set_option_default('driver_name', port.CHROME_NAME) @@ -538,8 +545,7 @@ 'flag_specific': self.port.flag_specific_config_name() or '', 'used_upstream': self.options.use_upstream_wpt, 'sanitizer_enabled': self.options.enable_sanitizer, - # TODO(crbug.com/1152503): Fully support virtual suites. - 'virtual_suite': '', + 'virtual_suite': '', # Needed for non virtual tests } if self.options.use_upstream_wpt: # `run_wpt_tests` does not run in the upstream checkout's git
diff --git a/third_party/blink/web_tests/TestExpectations b/third_party/blink/web_tests/TestExpectations index b59e5ca..dc401207 100644 --- a/third_party/blink/web_tests/TestExpectations +++ b/third_party/blink/web_tests/TestExpectations
@@ -2948,6 +2948,8 @@ crbug.com/626703 [ Win11 ] virtual/fenced-frame-mparch/external/wpt/fenced-frame/default-enabled-features-allow-self.https.html [ Timeout ] crbug.com/626703 [ Linux ] virtual/prefetch/external/wpt/speculation-rules/prefetch/out-of-document-rule-set.https.html?include=StatusCode199 [ Timeout ] crbug.com/626703 [ Mac12 ] virtual/prefetch/external/wpt/speculation-rules/prefetch/out-of-document-rule-set.https.html?include=StatusCode199 [ Timeout ] +# TODO(crbug.com/1476931): Deflake and re-enable. +crbug.com/1476931 [ Mac11 ] virtual/prefetch/external/wpt/speculation-rules/prefetch/out-of-document-rule-set.https.html?include=UseNonUTF8EncodingForSpeculationRulesSet [ Timeout ] crbug.com/626703 external/wpt/css/selectors/selectors-4/lang-002.html [ Failure ] crbug.com/626703 external/wpt/css/selectors/selectors-4/lang-003.html [ Failure ] crbug.com/626703 external/wpt/css/selectors/selectors-4/lang-004.html [ Failure ] @@ -6279,6 +6281,8 @@ crbug.com/1472353 external/wpt/credential-management/fedcm-context.https.html [ Pass Timeout ] +crbug.com/1475772 [ Win ] external/wpt/credential-management/fedcm-hosteddomain.https.html [ Pass Timeout ] + # We skip these tests in the base test suite in NeverFixTests, but we do want # to run them in the virtual test suite. crbug.com/1373766 virtual/fedcm-multi-idp/external/wpt/credential-management/fedcm-multi-idp/* [ Pass ]
diff --git a/third_party/blink/web_tests/css-parser/deprecated-css-appearance-values-warning/appearance-warning-cssom-usecounter-expected.txt b/third_party/blink/web_tests/css-parser/deprecated-css-appearance-values-warning/appearance-warning-cssom-usecounter-expected.txt index 2d4b938..ebd16fc 100644 --- a/third_party/blink/web_tests/css-parser/deprecated-css-appearance-values-warning/appearance-warning-cssom-usecounter-expected.txt +++ b/third_party/blink/web_tests/css-parser/deprecated-css-appearance-values-warning/appearance-warning-cssom-usecounter-expected.txt
@@ -1,3 +1,4 @@ +CONSOLE WARNING: The keyword 'inner-spin-button' specified to an 'appearance' property is deprecated. Please consider updating. This is a testharness.js-based test. FAIL appearance-warning-cssom-usecounter assert_true: expected true got false Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/css-parser/deprecated-css-appearance-values-warning/appearance-warning-usecounter-expected.txt b/third_party/blink/web_tests/css-parser/deprecated-css-appearance-values-warning/appearance-warning-usecounter-expected.txt index ca2c8482..aeae64d 100644 --- a/third_party/blink/web_tests/css-parser/deprecated-css-appearance-values-warning/appearance-warning-usecounter-expected.txt +++ b/third_party/blink/web_tests/css-parser/deprecated-css-appearance-values-warning/appearance-warning-usecounter-expected.txt
@@ -1,3 +1,4 @@ +CONSOLE WARNING: The keyword 'inner-spin-button' specified to an 'appearance' property is deprecated. Please consider updating. This is a testharness.js-based test. FAIL appearance-warning-usecounter assert_true: expected true got false Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/css-parser/deprecated-css-appearance-values-warning/appearance-with-nonstandard-keywords-expected.txt b/third_party/blink/web_tests/css-parser/deprecated-css-appearance-values-warning/appearance-with-nonstandard-keywords-expected.txt index 796ee6d0..a74b2ed 100644 --- a/third_party/blink/web_tests/css-parser/deprecated-css-appearance-values-warning/appearance-with-nonstandard-keywords-expected.txt +++ b/third_party/blink/web_tests/css-parser/deprecated-css-appearance-values-warning/appearance-with-nonstandard-keywords-expected.txt
@@ -1,4 +1,15 @@ +CONSOLE WARNING: The keyword 'push-button' specified to an 'appearance' property is deprecated. Please consider updating. +CONSOLE WARNING: The keyword 'square-button' specified to an 'appearance' property is deprecated. Please consider updating. +CONSOLE WARNING: The keyword 'inner-spin-button' specified to an 'appearance' property is deprecated. Please consider updating. +CONSOLE WARNING: The keyword 'media-slider' specified to an 'appearance' property is deprecated. Please consider updating. +CONSOLE WARNING: The keyword 'media-sliderthumb' specified to an 'appearance' property is deprecated. Please consider updating. +CONSOLE WARNING: The keyword 'media-volume-slider' specified to an 'appearance' property is deprecated. Please consider updating. +CONSOLE WARNING: The keyword 'media-volume-sliderthumb' specified to an 'appearance' property is deprecated. Please consider updating. +CONSOLE WARNING: The keyword 'slider-horizontal' specified to an 'appearance' property is deprecated. Please consider updating. CONSOLE WARNING: The keyword 'slider-vertical' specified to an 'appearance' property is not standardized. It will be removed in the future and replaced by vertical writing-mode (currently experimental). +CONSOLE WARNING: The keyword 'sliderthumb-horizontal' specified to an 'appearance' property is deprecated. Please consider updating. +CONSOLE WARNING: The keyword 'sliderthumb-vertical' specified to an 'appearance' property is deprecated. Please consider updating. +CONSOLE WARNING: The keyword 'searchfield-cancel-button' specified to an 'appearance' property is deprecated. Please consider updating. This is a testharness.js-based test. FAIL There should be console warnings about non-standard appearance keywords assert_true: This should FAIL so we generate a -expected.txt expected true got false Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/css-parser/deprecated-css-appearance-values-warning/webkit-appearance-warning-cssom-usecounter-expected.txt b/third_party/blink/web_tests/css-parser/deprecated-css-appearance-values-warning/webkit-appearance-warning-cssom-usecounter-expected.txt index 3364596..166db6f9 100644 --- a/third_party/blink/web_tests/css-parser/deprecated-css-appearance-values-warning/webkit-appearance-warning-cssom-usecounter-expected.txt +++ b/third_party/blink/web_tests/css-parser/deprecated-css-appearance-values-warning/webkit-appearance-warning-cssom-usecounter-expected.txt
@@ -1,3 +1,4 @@ +CONSOLE WARNING: The keyword 'inner-spin-button' specified to an 'appearance' property is deprecated. Please consider updating. This is a testharness.js-based test. FAIL webkit-appearance-warning-cssom-usecounter assert_true: expected true got false Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/css-parser/deprecated-css-appearance-values-warning/webkit-appearance-warning-usecounter-expected.txt b/third_party/blink/web_tests/css-parser/deprecated-css-appearance-values-warning/webkit-appearance-warning-usecounter-expected.txt index 57981751..506b885 100644 --- a/third_party/blink/web_tests/css-parser/deprecated-css-appearance-values-warning/webkit-appearance-warning-usecounter-expected.txt +++ b/third_party/blink/web_tests/css-parser/deprecated-css-appearance-values-warning/webkit-appearance-warning-usecounter-expected.txt
@@ -1,3 +1,4 @@ +CONSOLE WARNING: The keyword 'inner-spin-button' specified to an 'appearance' property is deprecated. Please consider updating. This is a testharness.js-based test. FAIL webkit-appearance-warning-usecounter assert_true: expected true got false Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/external/wpt/IndexedDB/idb-partitioned-basic.tentative.sub.html.ini b/third_party/blink/web_tests/external/wpt/IndexedDB/idb-partitioned-basic.tentative.sub.html.ini new file mode 100644 index 0000000..b5fddad --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/IndexedDB/idb-partitioned-basic.tentative.sub.html.ini
@@ -0,0 +1,6 @@ +[idb-partitioned-basic.tentative.sub.html] + [Simple test for partitioned IndexedDB] + expected: + if (product == "content_shell") and (virtual_suite == ""): PASS + if product == "chrome": PASS + [FAIL, PASS]
diff --git a/third_party/blink/web_tests/external/wpt/credential-management/fedcm-multi-idp/get-before-and-after-onload.https.html.ini b/third_party/blink/web_tests/external/wpt/credential-management/fedcm-multi-idp/get-before-and-after-onload.https.html.ini new file mode 100644 index 0000000..4ce5236 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/credential-management/fedcm-multi-idp/get-before-and-after-onload.https.html.ini
@@ -0,0 +1,10 @@ +[get-before-and-after-onload.https.html] + expected: + if (product == "content_shell") and (os == "mac") and (port == "mac13"): [OK, ERROR] + if (product == "content_shell") and (os == "mac") and (port == "mac12"): [OK, ERROR] + if (product == "content_shell") and (os == "mac") and (port == "mac11"): [OK, ERROR] + [When there's a `get` call before onload, a `get` call which occurs after onload but before the first `get` call resolves, should be rejected.] + expected: + if (product == "content_shell") and (os == "mac") and (port == "mac13"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac12"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac11"): [FAIL, PASS]
diff --git a/third_party/blink/web_tests/external/wpt/credential-management/fedcm-multi-idp/multiple-gets-after-abort.https.html.ini b/third_party/blink/web_tests/external/wpt/credential-management/fedcm-multi-idp/multiple-gets-after-abort.https.html.ini new file mode 100644 index 0000000..b469a77 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/credential-management/fedcm-multi-idp/multiple-gets-after-abort.https.html.ini
@@ -0,0 +1,4 @@ +[multiple-gets-after-abort.https.html] + expected: + 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]
diff --git a/third_party/blink/web_tests/external/wpt/css/css-anchor-position/at-fallback-position-allowed-declarations.html b/third_party/blink/web_tests/external/wpt/css/css-anchor-position/at-fallback-position-allowed-declarations.html index 873fa13..25f6a14 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-anchor-position/at-fallback-position-allowed-declarations.html +++ b/third_party/blink/web_tests/external/wpt/css/css-anchor-position/at-fallback-position-allowed-declarations.html
@@ -45,6 +45,19 @@ test_allowed_declaration('inset-inline'); test_allowed_declaration('inset'); +// Margin properties are allowed +test_allowed_declaration('margin-top'); +test_allowed_declaration('margin-bottom'); +test_allowed_declaration('margin-left'); +test_allowed_declaration('margin-right'); +test_allowed_declaration('margin-block-start'); +test_allowed_declaration('margin-block-end'); +test_allowed_declaration('margin-inline-start'); +test_allowed_declaration('margin-inline-end'); +test_allowed_declaration('margin-block'); +test_allowed_declaration('margin-inline'); +test_allowed_declaration('margin'); + // Sizing properties are allowed test_allowed_declaration('width'); test_allowed_declaration('height'); @@ -70,13 +83,6 @@ // Custom properties are disallowed test_disallowed_declaration('--custom'); -// Margin properties are disallowed -test_disallowed_declaration('margin-left'); -test_disallowed_declaration('margin-right'); -test_disallowed_declaration('margin-top'); -test_disallowed_declaration('margin-bottom'); -test_disallowed_declaration('margin'); - // Test some other disallowed properties test_disallowed_declaration('font-size'); test_disallowed_declaration('border-width');
diff --git a/third_party/blink/web_tests/external/wpt/css/css-anchor-position/position-fallback-004.html b/third_party/blink/web_tests/external/wpt/css/css-anchor-position/position-fallback-004.html new file mode 100644 index 0000000..e4dbd718 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-anchor-position/position-fallback-004.html
@@ -0,0 +1,74 @@ +<!DOCTYPE html> +<title>Tests margin properties in position fallback</title> +<link rel="help" href="https://drafts.csswg.org/css-anchor-position-1/#accepted-try-properties"> +<link rel="author" href="mailto:xiaochengh@chromium.org"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<script src="support/test-common.js"></script> + +<style> +body { + margin: 0; +} + +.cb { + width: 300px; + height: 150px; + position: relative; + background: lightgray; +} + +.anchor { + position: absolute; + width: 100px; + height: 100px; + top: 25px; + background: orange; + anchor-name: --a; +} + +.target { + position: absolute; + width: 100px; + height: 100px; + background: lime; + position-fallback: --fallbacks; +} + +@position-fallback --fallbacks { + @try { + top: anchor(--a top); + right: anchor(--a left); + margin-top: 10px; + margin-right: 10px; + } + + @try { + bottom: anchor(--a bottom); + left: anchor(--a right); + margin-bottom: 10px; + margin-left: 10px; + } +} +</style> + +<body onload="checkLayoutForAnchorPos('.target')"> + +<div class=cb> + <div class=anchor style="left: 110px"></div> + <!-- Chooses 1st @try block. --> + <div class=target data-offset-x=0 + data-expected-margin-left=0 data-expected-margin-right=10 + data-expected-margin-top=10 data-expected-margin-bottom=0></div> +</div> + +<div class=cb> + <div class=anchor style="right: 110px"></div> + <!-- Chooses 2nd @try block. --> + <div class=target data-offset-x=200 + data-expected-margin-left=10 data-expected-margin-right=0 + data-expected-margin-top=0 data-expected-margin-bottom=10></div> +</div> + +</body>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-backgrounds/animations/background-color-animation-half-opaque.html.ini b/third_party/blink/web_tests/external/wpt/css/css-backgrounds/animations/background-color-animation-half-opaque.html.ini new file mode 100644 index 0000000..53d3fc5 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-backgrounds/animations/background-color-animation-half-opaque.html.ini
@@ -0,0 +1,4 @@ +[background-color-animation-half-opaque.html] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "threaded"): [PASS, FAIL] + if (product == "content_shell") and (os == "linux") and (virtual_suite == ""): [PASS, FAIL]
diff --git a/third_party/blink/web_tests/external/wpt/css/css-contain/content-visibility/content-visibility-auto-first-observation-immediate.html.ini b/third_party/blink/web_tests/external/wpt/css/css-contain/content-visibility/content-visibility-auto-first-observation-immediate.html.ini index df26e69..c76af641 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-contain/content-visibility/content-visibility-auto-first-observation-immediate.html.ini +++ b/third_party/blink/web_tests/external/wpt/css/css-contain/content-visibility/content-visibility-auto-first-observation-immediate.html.ini
@@ -1,6 +1,9 @@ [content-visibility-auto-first-observation-immediate.html] expected: - if (product == "content_shell") and (os == "win") and (virtual_suite == "") and (port == "win11"): [CRASH, OK] - if (product == "content_shell") and (os == "mac") and (port == "mac12") and (virtual_suite == ""): [CRASH, OK] - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): CRASH - if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): CRASH + if (product == "content_shell") and (virtual_suite == "offsetparent-old-behavior") and (os == "mac") and (port == "mac13-arm64"): CRASH + if (product == "content_shell") and (virtual_suite == "offsetparent-old-behavior") and (os == "mac") and (port == "mac12-arm64"): CRASH + if (product == "content_shell") and (virtual_suite == "") and (os == "win") and (port == "win11"): OK + if (product == "content_shell") and (virtual_suite == "") and (os == "mac") and (port == "mac13-arm64"): CRASH + if (product == "content_shell") and (virtual_suite == "") and (os == "mac") and (port == "mac12-arm64"): CRASH + if product == "chrome": OK + [CRASH, OK]
diff --git a/third_party/blink/web_tests/external/wpt/css/css-paint-api/paint2d-filter.https.html.ini b/third_party/blink/web_tests/external/wpt/css/css-paint-api/paint2d-filter.https.html.ini new file mode 100644 index 0000000..0f13722 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-paint-api/paint2d-filter.https.html.ini
@@ -0,0 +1,3 @@ +[paint2d-filter.https.html] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "off-main-thread-css-paint"): [FAIL, PASS]
diff --git a/third_party/blink/web_tests/external/wpt/css/css-paint-api/roundrect.https.html.ini b/third_party/blink/web_tests/external/wpt/css/css-paint-api/roundrect.https.html.ini new file mode 100644 index 0000000..14601a50 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-paint-api/roundrect.https.html.ini
@@ -0,0 +1,3 @@ +[roundrect.https.html] + expected: + if (product == "content_shell") and (os == "win") and (virtual_suite == "off-main-thread-css-paint") and (port == "win11"): [FAIL, PASS]
diff --git a/third_party/blink/web_tests/external/wpt/css/css-toggle/toggle-aria-roles.tentative.html.ini b/third_party/blink/web_tests/external/wpt/css/css-toggle/toggle-aria-roles.tentative.html.ini index 9700de2..2a951cf 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-toggle/toggle-aria-roles.tentative.html.ini +++ b/third_party/blink/web_tests/external/wpt/css/css-toggle/toggle-aria-roles.tentative.html.ini
@@ -1,4 +1,6 @@ [toggle-aria-roles.tentative.html] + expected: + if (product == "content_shell") and (os == "linux"): [CRASH, OK] [aria role and key handling test: \n <div class="group" data-expected-role="radiogroup" data-expected-arrows-between-children="radio">\n <div class="root-group trigger" data-expected-role="radio" data-expected-trigger-keys="Space"></div>\n <div class="root-group trigger" data-expected-role="radio" data-expected-trigger-keys="Space"></div>\n </div>\n ] expected: if product == "chrome": FAIL
diff --git a/third_party/blink/web_tests/external/wpt/css/css-values/signs-abs-serialize.html.ini b/third_party/blink/web_tests/external/wpt/css/css-values/signs-abs-serialize.html.ini new file mode 100644 index 0000000..aa0c91c --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-values/signs-abs-serialize.html.ini
@@ -0,0 +1,64 @@ +[signs-abs-serialize.html] + ['scale(abs(1 + 2 + 3))' as a specified value should serialize as 'scale(calc(6))'.] + expected: + if (product == "content_shell") and (virtual_suite == "css-sign-related-functions-disabled") and (os == "mac") and (port == "mac13"): [FAIL, PASS] + + ['scale(abs(1))' as a specified value should serialize as 'scale(calc(1))'.] + expected: + if (product == "content_shell") and (virtual_suite == "css-sign-related-functions-disabled") and (os == "mac") and (port == "mac13"): [FAIL, PASS] + + ['scale(abs(infinity))' as a specified value should serialize as 'scale(calc(infinity))'.] + expected: + if (product == "content_shell") and (virtual_suite == "css-sign-related-functions-disabled") and (os == "mac") and (port == "mac13"): [FAIL, PASS] + + ['scale(calc(1 + abs(1)))' as a specified value should serialize as 'scale(calc(2))'.] + expected: + if (product == "content_shell") and (virtual_suite == "css-sign-related-functions-disabled") and (os == "mac") and (port == "mac13"): [FAIL, PASS] + + ['scale(calc(abs(-infinity)))' as a specified value should serialize as 'scale(calc(infinity))'.] + expected: + if (product == "content_shell") and (virtual_suite == "css-sign-related-functions-disabled") and (os == "mac") and (port == "mac13"): [FAIL, PASS] + + ['scale(calc(abs(1) + abs(2)))' as a specified value should serialize as 'scale(calc(3))'.] + expected: + if (product == "content_shell") and (virtual_suite == "css-sign-related-functions-disabled") and (os == "mac") and (port == "mac13"): [FAIL, PASS] + + ['scale(calc(abs(inFinity)))' as a specified value should serialize as 'scale(calc(infinity))'.] + expected: + if (product == "content_shell") and (virtual_suite == "css-sign-related-functions-disabled") and (os == "mac") and (port == "mac13"): [FAIL, PASS] + + ['scale(calc(abs(infinity)))' as a specified value should serialize as 'scale(calc(infinity))'.] + expected: + if (product == "content_shell") and (virtual_suite == "css-sign-related-functions-disabled") and (os == "mac") and (port == "mac13"): [FAIL, PASS] + + ['scale(calc(sign(-1 * NaN)))' as a specified value should serialize as 'scale(calc(NaN))'.] + expected: + if (product == "content_shell") and (virtual_suite == "css-sign-related-functions-disabled") and (os == "mac") and (port == "mac13"): [FAIL, PASS] + + ['scale(calc(sign(-1 * infinity)))' as a specified value should serialize as 'scale(calc(-1))'.] + expected: + if (product == "content_shell") and (virtual_suite == "css-sign-related-functions-disabled") and (os == "mac") and (port == "mac13"): [FAIL, PASS] + + ['scale(calc(sign(.1) + 1))' as a specified value should serialize as 'scale(calc(2))'.] + expected: + if (product == "content_shell") and (virtual_suite == "css-sign-related-functions-disabled") and (os == "mac") and (port == "mac13"): [FAIL, PASS] + + ['scale(calc(sign(.1) + sign(.2)))' as a specified value should serialize as 'scale(calc(2))'.] + expected: + if (product == "content_shell") and (virtual_suite == "css-sign-related-functions-disabled") and (os == "mac") and (port == "mac13"): [FAIL, PASS] + + ['scale(calc(sign(1 * NaN)))' as a specified value should serialize as 'scale(calc(NaN))'.] + expected: + if (product == "content_shell") and (virtual_suite == "css-sign-related-functions-disabled") and (os == "mac") and (port == "mac13"): [FAIL, PASS] + + ['scale(calc(sign(infinity)))' as a specified value should serialize as 'scale(calc(1))'.] + expected: + if (product == "content_shell") and (virtual_suite == "css-sign-related-functions-disabled") and (os == "mac") and (port == "mac13"): [FAIL, PASS] + + ['scale(sign(.1))' as a specified value should serialize as 'scale(calc(1))'.] + expected: + if (product == "content_shell") and (virtual_suite == "css-sign-related-functions-disabled") and (os == "mac") and (port == "mac13"): [FAIL, PASS] + + ['scale(sign(1 + 2 + 3))' as a specified value should serialize as 'scale(calc(1))'.] + expected: + if (product == "content_shell") and (virtual_suite == "css-sign-related-functions-disabled") and (os == "mac") and (port == "mac13"): [FAIL, PASS]
diff --git a/third_party/blink/web_tests/external/wpt/css/css-view-transitions/3d-transform-incoming.html.ini b/third_party/blink/web_tests/external/wpt/css/css-view-transitions/3d-transform-incoming.html.ini new file mode 100644 index 0000000..580c8ee --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-view-transitions/3d-transform-incoming.html.ini
@@ -0,0 +1,9 @@ +[3d-transform-incoming.html] + expected: + if (product == "content_shell") and (virtual_suite == "view-transition-mpa-serialization") and (os == "win") and (port == "win10.20h2"): PASS + if (product == "content_shell") and (virtual_suite == "view-transition") and (os == "win") and (port == "win10.20h2"): PASS + if (product == "content_shell") and (virtual_suite == "view-transition-mpa-serialization") and (os == "linux"): PASS + if (product == "content_shell") and (virtual_suite == "view-transition") and (os == "linux"): PASS + if (product == "content_shell") and (virtual_suite == "view-transition-wide-gamut"): PASS + if product == "chrome": PASS + [PASS, TIMEOUT]
diff --git a/third_party/blink/web_tests/external/wpt/css/css-view-transitions/capture-with-offscreen-child-translated.html.ini b/third_party/blink/web_tests/external/wpt/css/css-view-transitions/capture-with-offscreen-child-translated.html.ini new file mode 100644 index 0000000..0adaa45 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-view-transitions/capture-with-offscreen-child-translated.html.ini
@@ -0,0 +1,4 @@ +[capture-with-offscreen-child-translated.html] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "view-transition-wide-gamut"): [PASS, TIMEOUT] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "view-transition-mpa-serialization"): [PASS, TIMEOUT]
diff --git a/third_party/blink/web_tests/external/wpt/css/css-view-transitions/fractional-translation-from-position.html.ini b/third_party/blink/web_tests/external/wpt/css/css-view-transitions/fractional-translation-from-position.html.ini new file mode 100644 index 0000000..72ee1a7 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-view-transitions/fractional-translation-from-position.html.ini
@@ -0,0 +1,12 @@ +[fractional-translation-from-position.html] + expected: + if (product == "content_shell") and (os == "mac") and (port == "mac13") and (virtual_suite == "view-transition-wide-gamut"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac13") and (virtual_suite == "view-transition-mpa-serialization"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac13") and (virtual_suite == "view-transition"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac12") and (virtual_suite == "view-transition-wide-gamut"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac12") and (virtual_suite == "view-transition"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac11") and (virtual_suite == "view-transition-mpa-serialization"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac11") and (virtual_suite == "view-transition"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac10.15") and (virtual_suite == "view-transition"): [FAIL, PASS] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "view-transition") and (flag_specific == "highdpi"): FAIL + if (product == "content_shell") and (os == "linux") and (virtual_suite == "view-transition") and (flag_specific == ""): [FAIL, PASS, TIMEOUT]
diff --git a/third_party/blink/web_tests/external/wpt/css/css-view-transitions/fractional-translation-from-transform.html.ini b/third_party/blink/web_tests/external/wpt/css/css-view-transitions/fractional-translation-from-transform.html.ini new file mode 100644 index 0000000..e76c788 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-view-transitions/fractional-translation-from-transform.html.ini
@@ -0,0 +1,7 @@ +[fractional-translation-from-transform.html] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "view-transition-wide-gamut"): PASS + if (product == "content_shell") and (os == "linux") and (virtual_suite == "view-transition"): PASS + if (product == "content_shell") and (os == "win"): PASS + if product == "chrome": PASS + [FAIL, PASS]
diff --git a/third_party/blink/web_tests/external/wpt/css/css-view-transitions/iframe-new-has-scrollbar.html.ini b/third_party/blink/web_tests/external/wpt/css/css-view-transitions/iframe-new-has-scrollbar.html.ini new file mode 100644 index 0000000..bb832562 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-view-transitions/iframe-new-has-scrollbar.html.ini
@@ -0,0 +1,3 @@ +[iframe-new-has-scrollbar.html] + expected: + if (product == "content_shell") and (virtual_suite == "view-transition-wide-gamut") and (os == "mac") and (port == "mac12-arm64"): [FAIL, PASS]
diff --git a/third_party/blink/web_tests/external/wpt/css/css-view-transitions/massive-element-below-viewport-offscreen-new.html.ini b/third_party/blink/web_tests/external/wpt/css/css-view-transitions/massive-element-below-viewport-offscreen-new.html.ini index 44460c4..046d94a5 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-view-transitions/massive-element-below-viewport-offscreen-new.html.ini +++ b/third_party/blink/web_tests/external/wpt/css/css-view-transitions/massive-element-below-viewport-offscreen-new.html.ini
@@ -1,4 +1,5 @@ [massive-element-below-viewport-offscreen-new.html] expected: + if (product == "content_shell") and (virtual_suite == "view-transition") and (os == "mac") and (port == "mac12-arm64"): [FAIL, TIMEOUT] if product == "chrome": PASS TIMEOUT
diff --git a/third_party/blink/web_tests/external/wpt/css/css-view-transitions/massive-element-right-of-viewport-offscreen-new.html.ini b/third_party/blink/web_tests/external/wpt/css/css-view-transitions/massive-element-right-of-viewport-offscreen-new.html.ini index b34c5f02..f8a33b37 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-view-transitions/massive-element-right-of-viewport-offscreen-new.html.ini +++ b/third_party/blink/web_tests/external/wpt/css/css-view-transitions/massive-element-right-of-viewport-offscreen-new.html.ini
@@ -1,4 +1,7 @@ [massive-element-right-of-viewport-offscreen-new.html] expected: + if (product == "content_shell") and (virtual_suite == "view-transition-wide-gamut") and (os == "mac") and (port == "mac11"): [PASS, TIMEOUT] + if (product == "content_shell") and (virtual_suite == "view-transition-mpa-serialization") and (os == "mac") and (port == "mac12-arm64"): [FAIL, TIMEOUT] + if (product == "content_shell") and (virtual_suite == "view-transition") and (os == "mac") and (port == "mac12-arm64"): [PASS, TIMEOUT] if product == "chrome": PASS TIMEOUT
diff --git a/third_party/blink/web_tests/external/wpt/css/css-view-transitions/new-and-old-sizes-match.html.ini b/third_party/blink/web_tests/external/wpt/css/css-view-transitions/new-and-old-sizes-match.html.ini new file mode 100644 index 0000000..5c61a3f --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-view-transitions/new-and-old-sizes-match.html.ini
@@ -0,0 +1,3 @@ +[new-and-old-sizes-match.html] + expected: + if (product == "content_shell") and (os == "linux") and (flag_specific == "highdpi"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/css/css-view-transitions/new-content-captures-spans.html.ini b/third_party/blink/web_tests/external/wpt/css/css-view-transitions/new-content-captures-spans.html.ini new file mode 100644 index 0000000..b8fad9a3 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-view-transitions/new-content-captures-spans.html.ini
@@ -0,0 +1,3 @@ +[new-content-captures-spans.html] + expected: + if (product == "content_shell") and (os == "linux") and (flag_specific == "highdpi"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/css/css-view-transitions/no-crash-set-exception.html.ini b/third_party/blink/web_tests/external/wpt/css/css-view-transitions/no-crash-set-exception.html.ini new file mode 100644 index 0000000..a4028b3 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-view-transitions/no-crash-set-exception.html.ini
@@ -0,0 +1,9 @@ +[no-crash-set-exception.html] + expected: + if (product == "content_shell") and (virtual_suite == "view-transition-wide-gamut") and (os == "mac") and (port == "mac11"): OK + if (product == "content_shell") and (virtual_suite == "view-transition") and (os == "mac") and (port == "mac11"): OK + if (product == "content_shell") and (virtual_suite == "view-transition-wide-gamut") and (os == "linux"): OK + if (product == "content_shell") and (virtual_suite == "view-transition") and (os == "linux"): OK + if (product == "content_shell") and (virtual_suite == "view-transition-mpa-serialization"): OK + if product == "chrome": OK + [OK, TIMEOUT]
diff --git a/third_party/blink/web_tests/external/wpt/css/css-view-transitions/no-raf-while-render-blocked.html.ini b/third_party/blink/web_tests/external/wpt/css/css-view-transitions/no-raf-while-render-blocked.html.ini new file mode 100644 index 0000000..4ebaf3b --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-view-transitions/no-raf-while-render-blocked.html.ini
@@ -0,0 +1,8 @@ +[no-raf-while-render-blocked.html] + [rAF is blocked until prepare callback] + expected: + if (product == "content_shell") and (virtual_suite == "view-transition-wide-gamut") and (os == "win"): PASS + if (product == "content_shell") and (virtual_suite == "view-transition-wide-gamut") and (os == "mac"): PASS + if (product == "content_shell") and (virtual_suite == "view-transition-mpa-serialization") and (os == "linux"): PASS + if product == "chrome": PASS + [PASS, FAIL]
diff --git a/third_party/blink/web_tests/external/wpt/css/css-view-transitions/paused-animation-at-end.html.ini b/third_party/blink/web_tests/external/wpt/css/css-view-transitions/paused-animation-at-end.html.ini new file mode 100644 index 0000000..62fd4d32 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-view-transitions/paused-animation-at-end.html.ini
@@ -0,0 +1,5 @@ +[paused-animation-at-end.html] + expected: + if (product == "content_shell") and (virtual_suite == "view-transition-wide-gamut"): OK + if product == "chrome": OK + [OK, TIMEOUT]
diff --git a/third_party/blink/web_tests/external/wpt/css/css-view-transitions/root-element-display-none-crash.html.ini b/third_party/blink/web_tests/external/wpt/css/css-view-transitions/root-element-display-none-crash.html.ini new file mode 100644 index 0000000..6fd2e95 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-view-transitions/root-element-display-none-crash.html.ini
@@ -0,0 +1,4 @@ +[root-element-display-none-crash.html] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "view-transition-wide-gamut"): [PASS, TIMEOUT] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "view-transition"): [PASS, TIMEOUT]
diff --git a/third_party/blink/web_tests/external/wpt/css/css-writing-modes/forms/button-appearance-native-vertical.optional.html.ini b/third_party/blink/web_tests/external/wpt/css/css-writing-modes/forms/button-appearance-native-vertical.optional.html.ini new file mode 100644 index 0000000..891311b --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-writing-modes/forms/button-appearance-native-vertical.optional.html.ini
@@ -0,0 +1,3 @@ +[button-appearance-native-vertical.optional.html] + expected: + if (product == "content_shell") and (virtual_suite == "vertical-form-controls-disabled") and (os == "mac") and (port == "mac13"): [FAIL, PASS]
diff --git a/third_party/blink/web_tests/external/wpt/css/css-writing-modes/forms/color-input-appearance-native-vertical.optional.html.ini b/third_party/blink/web_tests/external/wpt/css/css-writing-modes/forms/color-input-appearance-native-vertical.optional.html.ini new file mode 100644 index 0000000..3320308 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-writing-modes/forms/color-input-appearance-native-vertical.optional.html.ini
@@ -0,0 +1,3 @@ +[color-input-appearance-native-vertical.optional.html] + expected: + if (product == "content_shell") and (virtual_suite == "vertical-form-controls-disabled") and (os == "mac") and (port == "mac10.15"): [FAIL, PASS]
diff --git a/third_party/blink/web_tests/external/wpt/css/css-writing-modes/forms/progress-appearance-native-vertical.optional.html.ini b/third_party/blink/web_tests/external/wpt/css/css-writing-modes/forms/progress-appearance-native-vertical.optional.html.ini new file mode 100644 index 0000000..019bc52 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-writing-modes/forms/progress-appearance-native-vertical.optional.html.ini
@@ -0,0 +1,3 @@ +[progress-appearance-native-vertical.optional.html] + expected: + if (product == "content_shell") and (virtual_suite == "vertical-form-controls-disabled") and (os == "mac") and (port == "mac13"): [FAIL, PASS]
diff --git a/third_party/blink/web_tests/external/wpt/css/css-writing-modes/forms/text-input-block-size.optional.html.ini b/third_party/blink/web_tests/external/wpt/css/css-writing-modes/forms/text-input-block-size.optional.html.ini new file mode 100644 index 0000000..53a5ad3 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-writing-modes/forms/text-input-block-size.optional.html.ini
@@ -0,0 +1,56 @@ +[text-input-block-size.optional.html] + [Test input[type=email\] block-size in writing-mode: vertical-lr] + expected: + if (product == "content_shell") and (virtual_suite == "vertical-form-controls-text-disabled") and (os == "mac") and (port == "mac11"): [FAIL, PASS] + + [Test input[type=email\] block-size in writing-mode: vertical-rl] + expected: + if (product == "content_shell") and (virtual_suite == "vertical-form-controls-text-disabled") and (os == "mac") and (port == "mac11"): [FAIL, PASS] + + [Test input[type=number\] block-size in writing-mode: vertical-lr] + expected: + if (product == "content_shell") and (virtual_suite == "vertical-form-controls-text-disabled") and (os == "mac") and (port == "mac11"): [FAIL, PASS] + + [Test input[type=number\] block-size in writing-mode: vertical-rl] + expected: + if (product == "content_shell") and (virtual_suite == "vertical-form-controls-text-disabled") and (os == "mac") and (port == "mac11"): [FAIL, PASS] + + [Test input[type=password\] block-size in writing-mode: vertical-lr] + expected: + if (product == "content_shell") and (virtual_suite == "vertical-form-controls-text-disabled") and (os == "mac") and (port == "mac11"): [FAIL, PASS] + + [Test input[type=password\] block-size in writing-mode: vertical-rl] + expected: + if (product == "content_shell") and (virtual_suite == "vertical-form-controls-text-disabled") and (os == "mac") and (port == "mac11"): [FAIL, PASS] + + [Test input[type=search\] block-size in writing-mode: vertical-lr] + expected: + if (product == "content_shell") and (virtual_suite == "vertical-form-controls-text-disabled") and (os == "mac") and (port == "mac11"): [FAIL, PASS] + + [Test input[type=search\] block-size in writing-mode: vertical-rl] + expected: + if (product == "content_shell") and (virtual_suite == "vertical-form-controls-text-disabled") and (os == "mac") and (port == "mac11"): [FAIL, PASS] + + [Test input[type=tel\] block-size in writing-mode: vertical-lr] + expected: + if (product == "content_shell") and (virtual_suite == "vertical-form-controls-text-disabled") and (os == "mac") and (port == "mac11"): [FAIL, PASS] + + [Test input[type=tel\] block-size in writing-mode: vertical-rl] + expected: + if (product == "content_shell") and (virtual_suite == "vertical-form-controls-text-disabled") and (os == "mac") and (port == "mac11"): [FAIL, PASS] + + [Test input[type=text\] block-size in writing-mode: vertical-lr] + expected: + if (product == "content_shell") and (virtual_suite == "vertical-form-controls-text-disabled") and (os == "mac") and (port == "mac11"): [FAIL, PASS] + + [Test input[type=text\] block-size in writing-mode: vertical-rl] + expected: + if (product == "content_shell") and (virtual_suite == "vertical-form-controls-text-disabled") and (os == "mac") and (port == "mac11"): [FAIL, PASS] + + [Test input[type=url\] block-size in writing-mode: vertical-lr] + expected: + if (product == "content_shell") and (virtual_suite == "vertical-form-controls-text-disabled") and (os == "mac") and (port == "mac11"): [FAIL, PASS] + + [Test input[type=url\] block-size in writing-mode: vertical-rl] + expected: + if (product == "content_shell") and (virtual_suite == "vertical-form-controls-text-disabled") and (os == "mac") and (port == "mac11"): [FAIL, PASS]
diff --git a/third_party/blink/web_tests/external/wpt/css/filter-effects/effect-reference-feimage-002.html.ini b/third_party/blink/web_tests/external/wpt/css/filter-effects/effect-reference-feimage-002.html.ini new file mode 100644 index 0000000..e6162b91 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/filter-effects/effect-reference-feimage-002.html.ini
@@ -0,0 +1,4 @@ +[effect-reference-feimage-002.html] + expected: + if (product == "content_shell") and (virtual_suite == "scalefactor200") and (os == "win") and (port == "win10.20h2"): [FAIL, PASS] + if (product == "content_shell") and (virtual_suite == "scalefactor200") and (os == "mac") and (port == "mac12"): [FAIL, PASS]
diff --git a/third_party/blink/web_tests/external/wpt/css/filter-effects/effect-reference-feimage-004.html.ini b/third_party/blink/web_tests/external/wpt/css/filter-effects/effect-reference-feimage-004.html.ini new file mode 100644 index 0000000..327beb93 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/filter-effects/effect-reference-feimage-004.html.ini
@@ -0,0 +1,3 @@ +[effect-reference-feimage-004.html] + expected: + if (product == "content_shell") and (virtual_suite == "scalefactor200") and (os == "mac") and (port == "mac11"): [FAIL, PASS]
diff --git a/third_party/blink/web_tests/external/wpt/css/filter-effects/effect-reference-merge-no-inputs.tentative.html.ini b/third_party/blink/web_tests/external/wpt/css/filter-effects/effect-reference-merge-no-inputs.tentative.html.ini index a720022a..83882b4 100644 --- a/third_party/blink/web_tests/external/wpt/css/filter-effects/effect-reference-merge-no-inputs.tentative.html.ini +++ b/third_party/blink/web_tests/external/wpt/css/filter-effects/effect-reference-merge-no-inputs.tentative.html.ini
@@ -1,3 +1,5 @@ [effect-reference-merge-no-inputs.tentative.html] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac10.15") and (virtual_suite == "scalefactor200"): [PASS, FAIL] + if (product == "content_shell") and (os == "mac") and (port == "mac10.15") and (virtual_suite == ""): [PASS, FAIL] + if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/css/filter-effects/tainting-fedisplacementmap-001.html.ini b/third_party/blink/web_tests/external/wpt/css/filter-effects/tainting-fedisplacementmap-001.html.ini new file mode 100644 index 0000000..04909de --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/filter-effects/tainting-fedisplacementmap-001.html.ini
@@ -0,0 +1,4 @@ +[tainting-fedisplacementmap-001.html] + expected: + if (product == "content_shell") and (os == "mac") and (port == "mac10.15") and (virtual_suite == "scalefactor200"): [PASS, FAIL] + if (product == "content_shell") and (os == "mac") and (port == "mac10.15") and (virtual_suite == ""): [PASS, FAIL]
diff --git a/third_party/blink/web_tests/external/wpt/custom-elements/form-associated/ElementInternals-setFormValue.html.ini b/third_party/blink/web_tests/external/wpt/custom-elements/form-associated/ElementInternals-setFormValue.html.ini new file mode 100644 index 0000000..fbf8be14 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/custom-elements/form-associated/ElementInternals-setFormValue.html.ini
@@ -0,0 +1,3 @@ +[ElementInternals-setFormValue.html] + expected: + if (product == "content_shell") and (os == "mac") and (port == "mac11"): [TIMEOUT, OK]
diff --git a/third_party/blink/web_tests/external/wpt/custom-elements/scoped-registry/constructor-call.tentative.html.ini b/third_party/blink/web_tests/external/wpt/custom-elements/scoped-registry/constructor-call.tentative.html.ini new file mode 100644 index 0000000..39ddf2b --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/custom-elements/scoped-registry/constructor-call.tentative.html.ini
@@ -0,0 +1,8 @@ +[constructor-call.tentative.html] + [Calling custom element constructor directly uses global registration only] + expected: + if (product == "content_shell") and (virtual_suite == "scoped-custom-element-registry-disabled") and (os == "mac") and (port == "mac13-arm64"): [FAIL, PASS] + + [Calling custom element constructor directly without global registration should fail] + expected: + if (product == "content_shell") and (virtual_suite == "scoped-custom-element-registry-disabled") and (os == "mac") and (port == "mac13-arm64"): [FAIL, PASS]
diff --git a/third_party/blink/web_tests/external/wpt/direct-sockets/disabled-by-permissions-policy.https.sub.html.ini b/third_party/blink/web_tests/external/wpt/direct-sockets/disabled-by-permissions-policy.https.sub.html.ini new file mode 100644 index 0000000..b86acfb --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/direct-sockets/disabled-by-permissions-policy.https.sub.html.ini
@@ -0,0 +1,8 @@ +[disabled-by-permissions-policy.https.sub.html] + [tcp disabled by permissions-policy] + expected: + if (product == "content_shell") and (os == "linux") and (flag_specific == "disable-site-isolation-trials"): [FAIL, PASS] + + [udp disabled by permissions-policy] + expected: + if (product == "content_shell") and (os == "linux") and (flag_specific == "disable-site-isolation-trials"): [FAIL, PASS]
diff --git a/third_party/blink/web_tests/external/wpt/dom/events/scrolling/scrollend-event-not-fired-on-no-scroll.html.ini b/third_party/blink/web_tests/external/wpt/dom/events/scrolling/scrollend-event-not-fired-on-no-scroll.html.ini index 4eb1821..bedc9e8 100644 --- a/third_party/blink/web_tests/external/wpt/dom/events/scrolling/scrollend-event-not-fired-on-no-scroll.html.ini +++ b/third_party/blink/web_tests/external/wpt/dom/events/scrolling/scrollend-event-not-fired-on-no-scroll.html.ini
@@ -1,3 +1,4 @@ [scrollend-event-not-fired-on-no-scroll.html] expected: + if (product == "content_shell") and (os == "mac") and (port == "mac10.15"): [ERROR, OK] if product == "chrome": ERROR
diff --git a/third_party/blink/web_tests/external/wpt/fenced-frame/anchor-focus.https.html.ini b/third_party/blink/web_tests/external/wpt/fenced-frame/anchor-focus.https.html.ini new file mode 100644 index 0000000..8373204 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/fenced-frame/anchor-focus.https.html.ini
@@ -0,0 +1,8 @@ +[anchor-focus.https.html] + [Anchor focusing is allowed on an element in a fenced frame with user activation.] + expected: + if (product == "content_shell") and (os == "mac") and (port == "mac12"): [FAIL, PASS] + + [Anchor focusing is blocked on an element in a fenced frame without user activation.] + expected: + if (product == "content_shell") and (os == "mac") and (port == "mac12"): [PASS, FAIL]
diff --git a/third_party/blink/web_tests/external/wpt/fenced-frame/disallowed-navigations-dangling-markup-urn.https.html.ini b/third_party/blink/web_tests/external/wpt/fenced-frame/disallowed-navigations-dangling-markup-urn.https.html.ini new file mode 100644 index 0000000..99ab794 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/fenced-frame/disallowed-navigations-dangling-markup-urn.https.html.ini
@@ -0,0 +1,30 @@ +[disallowed-navigations-dangling-markup-urn.https.html] + [fenced frame opaque URN => https: URL with dangling markup 'blo\tck<ed'] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [fenced frame opaque URN => https: URL with dangling markup 'blo\nck<ed'] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [fenced frame opaque URN => https: URL with dangling markup 'blo\rck<ed'] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [fenced frame opaque URN => https: URL with dangling markup 'blo<ck\ted'] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [fenced frame opaque URN => https: URL with dangling markup 'blo<ck\ned'] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [fenced frame opaque URN => https: URL with dangling markup 'blo<ck\red'] + expected: + if product == "chrome": PASS + [FAIL, PASS]
diff --git a/third_party/blink/web_tests/external/wpt/fenced-frame/fragment-navigation.https.html.ini b/third_party/blink/web_tests/external/wpt/fenced-frame/fragment-navigation.https.html.ini new file mode 100644 index 0000000..2a2ba00 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/fenced-frame/fragment-navigation.https.html.ini
@@ -0,0 +1,27 @@ +[fragment-navigation.https.html] + expected: + if product == "chrome": OK + [TIMEOUT, OK] + [opaque to opaque fragment navigation] + expected: + if (product == "content_shell") and (os == "linux"): PASS + if product == "chrome": PASS + [FAIL, PASS] + + [opaque to transparent fragment navigation] + expected: + if (product == "content_shell") and (os == "linux"): PASS + if product == "chrome": PASS + [FAIL, PASS] + + [transparent to opaque fragment navigation] + expected: + if (product == "content_shell") and (os == "linux"): PASS + if product == "chrome": PASS + [FAIL, PASS] + + [transparent to transparent fragment navigation] + expected: + if (product == "content_shell") and (os == "linux"): PASS + if product == "chrome": PASS + [FAIL, PASS]
diff --git a/third_party/blink/web_tests/external/wpt/fenced-frame/nested-opaque-ad-sizes.https.html.ini b/third_party/blink/web_tests/external/wpt/fenced-frame/nested-opaque-ad-sizes.https.html.ini new file mode 100644 index 0000000..f84de9b --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/fenced-frame/nested-opaque-ad-sizes.https.html.ini
@@ -0,0 +1,9 @@ +[nested-opaque-ad-sizes.https.html] + expected: + if product == "chrome": OK + [TIMEOUT, OK] + [nested fenced frames don't use the size list] + expected: + if (product == "content_shell") and (os == "win") and (port == "win10.20h2"): [PASS, FAIL] + if product == "chrome": PASS + [FAIL, PASS]
diff --git a/third_party/blink/web_tests/external/wpt/fenced-frame/script-focus.https.html.ini b/third_party/blink/web_tests/external/wpt/fenced-frame/script-focus.https.html.ini new file mode 100644 index 0000000..aa4e5d0 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/fenced-frame/script-focus.https.html.ini
@@ -0,0 +1,61 @@ +[script-focus.https.html] + expected: + if (product == "content_shell") and (os == "win"): OK + if (product == "content_shell") and (os == "linux"): OK + if product == "chrome": OK + [TIMEOUT, OK] + [A fenced frame can pull window.focus() after user activation] + expected: + if (product == "content_shell") and (os == "win"): PASS + if (product == "content_shell") and (os == "linux"): PASS + if product == "chrome": PASS + [FAIL, PASS] + + [A fenced frame cannot pull window.focus() without user activation] + expected: + if (product == "content_shell") and (os == "win"): PASS + if (product == "content_shell") and (os == "linux"): PASS + if product == "chrome": PASS + [FAIL, PASS] + + [A fenced frame nested in another fenced frame cannot pull focus] + expected: + if (product == "content_shell") and (os == "win"): PASS + if (product == "content_shell") and (os == "linux"): PASS + if product == "chrome": PASS + [FAIL, PASS] + + [An embedder can focus out of a fenced frame] + expected: + if (product == "content_shell") and (os == "win"): PASS + if (product == "content_shell") and (os == "linux"): PASS + if product == "chrome": PASS + [FAIL, PASS] + + [Another fenced frame cannot pull focus out of a focused fenced frame] + expected: + if (product == "content_shell") and (os == "win"): PASS + if (product == "content_shell") and (os == "linux"): PASS + if product == "chrome": PASS + [FAIL, PASS] + + [Fenced frames can't pull script focus until getting user activation] + expected: + if (product == "content_shell") and (os == "win"): PASS + if (product == "content_shell") and (os == "linux"): PASS + if product == "chrome": PASS + [FAIL, PASS] + + [Focused fenced frames can move programmatic focus within frame] + expected: + if (product == "content_shell") and (os == "win"): PASS + if (product == "content_shell") and (os == "linux"): PASS + if product == "chrome": PASS + [FAIL, PASS] + + [Script focus into a fenced frame consumes user activation] + expected: + if (product == "content_shell") and (os == "win"): PASS + if (product == "content_shell") and (os == "linux"): PASS + if product == "chrome": PASS + [FAIL, PASS]
diff --git a/third_party/blink/web_tests/external/wpt/fetch/api/abort/general.any.js.ini b/third_party/blink/web_tests/external/wpt/fetch/api/abort/general.any.js.ini index 1551659..816c5f42 100644 --- a/third_party/blink/web_tests/external/wpt/fetch/api/abort/general.any.js.ini +++ b/third_party/blink/web_tests/external/wpt/fetch/api/abort/general.any.js.ini
@@ -21,14 +21,26 @@ [general.any.sharedworker.html] + expected: + if (product == "content_shell") and (virtual_suite == "abort-signal-any-disabled"): [OK, CRASH] [Aborting rejects with abort reason] - expected: FAIL + expected: + if (product == "content_shell") and (virtual_suite == "produce-compile-hints"): [FAIL, PASS] + if (product == "content_shell") and (virtual_suite == "abort-signal-any-disabled"): [PASS, FAIL] + FAIL + + [Clone aborts with original controller] + expected: + if (product == "content_shell") and (virtual_suite == "abort-signal-any-disabled"): [FAIL, PASS] [Readable stream synchronously cancels with AbortError if aborted before reading] expected: FAIL [Signal on request object should also have abort reason] - expected: FAIL + expected: + if (product == "content_shell") and (virtual_suite == "produce-compile-hints"): [FAIL, PASS] + if (product == "content_shell") and (virtual_suite == "abort-signal-any-disabled"): [PASS, FAIL] + FAIL [general.any.worker.html]
diff --git a/third_party/blink/web_tests/external/wpt/fetch/http-cache/basic-auth-cache-test.html.ini b/third_party/blink/web_tests/external/wpt/fetch/http-cache/basic-auth-cache-test.html.ini new file mode 100644 index 0000000..288dafb --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/fetch/http-cache/basic-auth-cache-test.html.ini
@@ -0,0 +1,4 @@ +[basic-auth-cache-test.html] + expected: + if product == "chrome": PASS + [TIMEOUT, PASS]
diff --git a/third_party/blink/web_tests/external/wpt/fetch/http-cache/cache-mode.any.js.ini b/third_party/blink/web_tests/external/wpt/fetch/http-cache/cache-mode.any.js.ini new file mode 100644 index 0000000..fd89e2c --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/fetch/http-cache/cache-mode.any.js.ini
@@ -0,0 +1,26 @@ +[cache-mode.any.html] + [Fetch sends Cache-Control: no-cache and Pragma: no-cache when cache mode is no-store] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + +[cache-mode.any.serviceworker.html] + [Fetch sends Cache-Control: no-cache and Pragma: no-cache when cache mode is no-store] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + +[cache-mode.any.sharedworker.html] + [Fetch sends Cache-Control: no-cache and Pragma: no-cache when cache mode is no-store] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + +[cache-mode.any.worker.html] + [Fetch sends Cache-Control: no-cache and Pragma: no-cache when cache mode is no-store] + expected: + if product == "chrome": PASS + [FAIL, PASS]
diff --git a/third_party/blink/web_tests/external/wpt/fetch/http-cache/cc-request.any.js.ini b/third_party/blink/web_tests/external/wpt/fetch/http-cache/cc-request.any.js.ini new file mode 100644 index 0000000..5ed7bfe --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/fetch/http-cache/cc-request.any.js.ini
@@ -0,0 +1,166 @@ +[cc-request.any.html] + [HTTP cache does reuse stale response with Age header when request contains Cache-Control: max-stale that permits its use] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache does use aged stale response when request contains Cache-Control: max-stale that permits its use] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache doesn't reuse fresh response when request contains Cache-Control: min-fresh that wants it fresher] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache doesn't reuse fresh response when request contains Cache-Control: no-store] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache doesn't reuse fresh response with Age header when request contains Cache-Control: min-fresh that wants it fresher] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache doesn't use aged but fresh response when request contains Cache-Control: max-age=1] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache doesn't use fresh response with Age header when request contains Cache-Control: max-age that is greater than remaining freshness] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache generates 504 status code when nothing is in cache and request contains Cache-Control: only-if-cached] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + +[cc-request.any.serviceworker.html] + [HTTP cache does reuse stale response with Age header when request contains Cache-Control: max-stale that permits its use] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache does use aged stale response when request contains Cache-Control: max-stale that permits its use] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache doesn't reuse fresh response when request contains Cache-Control: min-fresh that wants it fresher] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache doesn't reuse fresh response when request contains Cache-Control: no-store] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache doesn't reuse fresh response with Age header when request contains Cache-Control: min-fresh that wants it fresher] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache doesn't use aged but fresh response when request contains Cache-Control: max-age=1] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache doesn't use fresh response with Age header when request contains Cache-Control: max-age that is greater than remaining freshness] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache generates 504 status code when nothing is in cache and request contains Cache-Control: only-if-cached] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + +[cc-request.any.sharedworker.html] + [HTTP cache does reuse stale response with Age header when request contains Cache-Control: max-stale that permits its use] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache does use aged stale response when request contains Cache-Control: max-stale that permits its use] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache doesn't reuse fresh response when request contains Cache-Control: min-fresh that wants it fresher] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache doesn't reuse fresh response when request contains Cache-Control: no-store] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache doesn't reuse fresh response with Age header when request contains Cache-Control: min-fresh that wants it fresher] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache doesn't use aged but fresh response when request contains Cache-Control: max-age=1] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache doesn't use fresh response with Age header when request contains Cache-Control: max-age that is greater than remaining freshness] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache generates 504 status code when nothing is in cache and request contains Cache-Control: only-if-cached] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + +[cc-request.any.worker.html] + [HTTP cache does reuse stale response with Age header when request contains Cache-Control: max-stale that permits its use] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache does use aged stale response when request contains Cache-Control: max-stale that permits its use] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache doesn't reuse fresh response when request contains Cache-Control: min-fresh that wants it fresher] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache doesn't reuse fresh response when request contains Cache-Control: no-store] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache doesn't reuse fresh response with Age header when request contains Cache-Control: min-fresh that wants it fresher] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache doesn't use aged but fresh response when request contains Cache-Control: max-age=1] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache doesn't use fresh response with Age header when request contains Cache-Control: max-age that is greater than remaining freshness] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache generates 504 status code when nothing is in cache and request contains Cache-Control: only-if-cached] + expected: + if product == "chrome": PASS + [FAIL, PASS]
diff --git a/third_party/blink/web_tests/external/wpt/fetch/http-cache/credentials.tentative.any.js.ini b/third_party/blink/web_tests/external/wpt/fetch/http-cache/credentials.tentative.any.js.ini new file mode 100644 index 0000000..2e19064 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/fetch/http-cache/credentials.tentative.any.js.ini
@@ -0,0 +1,66 @@ +[credentials.tentative.any.html] + [same-origin: 2xAnonymous, 2xCredentialled, 1xAnonymous] + expected: + if (product == "content_shell") and (virtual_suite == "split-cache-by-include-credentials"): PASS + if product == "chrome": PASS + [FAIL, PASS] + + [same-origin: 2xCredentialled, 2xAnonymous, 1xCredentialled] + expected: + if (product == "content_shell") and (virtual_suite == "split-cache-by-include-credentials"): PASS + if product == "chrome": PASS + [FAIL, PASS] + + +[credentials.tentative.any.serviceworker.html] + [same-origin: 2xAnonymous, 2xCredentialled, 1xAnonymous] + expected: + if (product == "content_shell") and (virtual_suite == "split-cache-by-include-credentials") and (os == "linux") and (flag_specific == "disable-site-isolation-trials"): [PASS, FAIL] + if (product == "content_shell") and (virtual_suite == "split-cache-by-include-credentials") and (os == "linux") and (flag_specific == ""): [PASS, FAIL] + if (product == "content_shell") and (virtual_suite == "split-cache-by-include-credentials") and (os == "win"): PASS + if (product == "content_shell") and (virtual_suite == "split-cache-by-include-credentials") and (os == "mac"): PASS + if product == "chrome": PASS + [FAIL, PASS] + + [same-origin: 2xCredentialled, 2xAnonymous, 1xCredentialled] + expected: + if (product == "content_shell") and (virtual_suite == "split-cache-by-include-credentials") and (os == "linux") and (flag_specific == "disable-site-isolation-trials"): [PASS, FAIL] + if (product == "content_shell") and (virtual_suite == "split-cache-by-include-credentials") and (os == "linux") and (flag_specific == ""): [PASS, FAIL] + if (product == "content_shell") and (virtual_suite == "split-cache-by-include-credentials") and (os == "win"): PASS + if (product == "content_shell") and (virtual_suite == "split-cache-by-include-credentials") and (os == "mac"): PASS + if product == "chrome": PASS + [FAIL, PASS] + + +[credentials.tentative.any.sharedworker.html] + [same-origin: 2xAnonymous, 2xCredentialled, 1xAnonymous] + expected: + if (product == "content_shell") and (virtual_suite == "split-cache-by-include-credentials"): PASS + if product == "chrome": PASS + [FAIL, PASS] + + [same-origin: 2xCredentialled, 2xAnonymous, 1xCredentialled] + expected: + if (product == "content_shell") and (virtual_suite == "split-cache-by-include-credentials"): PASS + if product == "chrome": PASS + [FAIL, PASS] + + +[credentials.tentative.any.worker.html] + [same-origin: 2xAnonymous, 2xCredentialled, 1xAnonymous] + expected: + if (product == "content_shell") and (virtual_suite == "split-cache-by-include-credentials") and (os == "linux") and (flag_specific == "disable-site-isolation-trials"): [PASS, FAIL] + if (product == "content_shell") and (virtual_suite == "split-cache-by-include-credentials") and (os == "linux") and (flag_specific == ""): [PASS, FAIL] + if (product == "content_shell") and (virtual_suite == "split-cache-by-include-credentials") and (os == "win"): PASS + if (product == "content_shell") and (virtual_suite == "split-cache-by-include-credentials") and (os == "mac"): PASS + if product == "chrome": PASS + [FAIL, PASS] + + [same-origin: 2xCredentialled, 2xAnonymous, 1xCredentialled] + expected: + if (product == "content_shell") and (virtual_suite == "split-cache-by-include-credentials") and (os == "linux") and (flag_specific == "disable-site-isolation-trials"): [PASS, FAIL] + if (product == "content_shell") and (virtual_suite == "split-cache-by-include-credentials") and (os == "linux") and (flag_specific == ""): [PASS, FAIL] + if (product == "content_shell") and (virtual_suite == "split-cache-by-include-credentials") and (os == "win"): PASS + if (product == "content_shell") and (virtual_suite == "split-cache-by-include-credentials") and (os == "mac"): PASS + if product == "chrome": PASS + [FAIL, PASS]
diff --git a/third_party/blink/web_tests/external/wpt/fetch/http-cache/heuristic.any.js.ini b/third_party/blink/web_tests/external/wpt/fetch/http-cache/heuristic.any.js.ini new file mode 100644 index 0000000..4bd668ca --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/fetch/http-cache/heuristic.any.js.ini
@@ -0,0 +1,126 @@ +[heuristic.any.html] + [HTTP cache reuses a 204 No Content response with Last-Modified based upon heuristic freshness] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache reuses a 404 Not Found response with Last-Modified based upon heuristic freshness] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache reuses a 405 Method Not Allowed response with Last-Modified based upon heuristic freshness] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache reuses a 414 URI Too Long response with Last-Modified based upon heuristic freshness] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache reuses a 501 Not Implemented response with Last-Modified based upon heuristic freshness] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache reuses an unknown response with Last-Modified based upon heuristic freshness when Cache-Control: public is present] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + +[heuristic.any.serviceworker.html] + [HTTP cache reuses a 204 No Content response with Last-Modified based upon heuristic freshness] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache reuses a 404 Not Found response with Last-Modified based upon heuristic freshness] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache reuses a 405 Method Not Allowed response with Last-Modified based upon heuristic freshness] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache reuses a 414 URI Too Long response with Last-Modified based upon heuristic freshness] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache reuses a 501 Not Implemented response with Last-Modified based upon heuristic freshness] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache reuses an unknown response with Last-Modified based upon heuristic freshness when Cache-Control: public is present] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + +[heuristic.any.sharedworker.html] + [HTTP cache reuses a 204 No Content response with Last-Modified based upon heuristic freshness] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache reuses a 404 Not Found response with Last-Modified based upon heuristic freshness] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache reuses a 405 Method Not Allowed response with Last-Modified based upon heuristic freshness] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache reuses a 414 URI Too Long response with Last-Modified based upon heuristic freshness] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache reuses a 501 Not Implemented response with Last-Modified based upon heuristic freshness] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache reuses an unknown response with Last-Modified based upon heuristic freshness when Cache-Control: public is present] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + +[heuristic.any.worker.html] + [HTTP cache reuses a 204 No Content response with Last-Modified based upon heuristic freshness] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache reuses a 404 Not Found response with Last-Modified based upon heuristic freshness] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache reuses a 405 Method Not Allowed response with Last-Modified based upon heuristic freshness] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache reuses a 414 URI Too Long response with Last-Modified based upon heuristic freshness] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache reuses a 501 Not Implemented response with Last-Modified based upon heuristic freshness] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache reuses an unknown response with Last-Modified based upon heuristic freshness when Cache-Control: public is present] + expected: + if product == "chrome": PASS + [FAIL, PASS]
diff --git a/third_party/blink/web_tests/external/wpt/fetch/http-cache/invalidate.any.js.ini b/third_party/blink/web_tests/external/wpt/fetch/http-cache/invalidate.any.js.ini new file mode 100644 index 0000000..92c7c21 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/fetch/http-cache/invalidate.any.js.ini
@@ -0,0 +1,186 @@ +[invalidate.any.html] + [HTTP cache invalidates Content-Location URL after a successful response from a DELETE] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache invalidates Content-Location URL after a successful response from a POST] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache invalidates Content-Location URL after a successful response from a PUT] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache invalidates Content-Location URL after a successful response from an unknown method] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache invalidates Location URL after a successful response from a DELETE] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache invalidates Location URL after a successful response from a POST] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache invalidates Location URL after a successful response from a PUT] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache invalidates Location URL after a successful response from an unknown method] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache invalidates after a successful response from an unknown method] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + +[invalidate.any.serviceworker.html] + [HTTP cache invalidates Content-Location URL after a successful response from a DELETE] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache invalidates Content-Location URL after a successful response from a POST] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache invalidates Content-Location URL after a successful response from a PUT] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache invalidates Content-Location URL after a successful response from an unknown method] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache invalidates Location URL after a successful response from a DELETE] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache invalidates Location URL after a successful response from a POST] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache invalidates Location URL after a successful response from a PUT] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache invalidates Location URL after a successful response from an unknown method] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache invalidates after a successful response from an unknown method] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + +[invalidate.any.sharedworker.html] + [HTTP cache invalidates Content-Location URL after a successful response from a DELETE] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache invalidates Content-Location URL after a successful response from a POST] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache invalidates Content-Location URL after a successful response from a PUT] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache invalidates Content-Location URL after a successful response from an unknown method] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache invalidates Location URL after a successful response from a DELETE] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache invalidates Location URL after a successful response from a POST] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache invalidates Location URL after a successful response from a PUT] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache invalidates Location URL after a successful response from an unknown method] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache invalidates after a successful response from an unknown method] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + +[invalidate.any.worker.html] + [HTTP cache invalidates Content-Location URL after a successful response from a DELETE] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache invalidates Content-Location URL after a successful response from a POST] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache invalidates Content-Location URL after a successful response from a PUT] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache invalidates Content-Location URL after a successful response from an unknown method] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache invalidates Location URL after a successful response from a DELETE] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache invalidates Location URL after a successful response from a POST] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache invalidates Location URL after a successful response from a PUT] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache invalidates Location URL after a successful response from an unknown method] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache invalidates after a successful response from an unknown method] + expected: + if product == "chrome": PASS + [FAIL, PASS]
diff --git a/third_party/blink/web_tests/external/wpt/fetch/http-cache/partial.any.js.ini b/third_party/blink/web_tests/external/wpt/fetch/http-cache/partial.any.js.ini new file mode 100644 index 0000000..7dee61c --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/fetch/http-cache/partial.any.js.ini
@@ -0,0 +1,126 @@ +[partial.any.html] + [HTTP cache stores complete response and serves smaller ranges from it with only-if-cached] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache stores partial content and completes it] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache stores partial content and reuses it] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache stores partial response and serves smaller ranges from it (absent last-byte-pos)] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache stores partial response and serves smaller ranges from it (byte-range-spec)] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache stores partial response and serves smaller ranges from it (suffix-byte-range-spec)] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + +[partial.any.serviceworker.html] + [HTTP cache stores complete response and serves smaller ranges from it with only-if-cached] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache stores partial content and completes it] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache stores partial content and reuses it] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache stores partial response and serves smaller ranges from it (absent last-byte-pos)] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache stores partial response and serves smaller ranges from it (byte-range-spec)] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache stores partial response and serves smaller ranges from it (suffix-byte-range-spec)] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + +[partial.any.sharedworker.html] + [HTTP cache stores complete response and serves smaller ranges from it with only-if-cached] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache stores partial content and completes it] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache stores partial content and reuses it] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache stores partial response and serves smaller ranges from it (absent last-byte-pos)] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache stores partial response and serves smaller ranges from it (byte-range-spec)] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache stores partial response and serves smaller ranges from it (suffix-byte-range-spec)] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + +[partial.any.worker.html] + [HTTP cache stores complete response and serves smaller ranges from it with only-if-cached] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache stores partial content and completes it] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache stores partial content and reuses it] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache stores partial response and serves smaller ranges from it (absent last-byte-pos)] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache stores partial response and serves smaller ranges from it (byte-range-spec)] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache stores partial response and serves smaller ranges from it (suffix-byte-range-spec)] + expected: + if product == "chrome": PASS + [FAIL, PASS]
diff --git a/third_party/blink/web_tests/external/wpt/fetch/http-cache/post-patch.any.js.ini b/third_party/blink/web_tests/external/wpt/fetch/http-cache/post-patch.any.js.ini new file mode 100644 index 0000000..fa75dc5 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/fetch/http-cache/post-patch.any.js.ini
@@ -0,0 +1,46 @@ +[post-patch.any.html] + [HTTP cache uses content after PATCH request with response containing Content-Location and cache-allowing header] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache uses content after POST request with response containing Content-Location and cache-allowing header] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + +[post-patch.any.serviceworker.html] + [HTTP cache uses content after PATCH request with response containing Content-Location and cache-allowing header] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache uses content after POST request with response containing Content-Location and cache-allowing header] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + +[post-patch.any.sharedworker.html] + [HTTP cache uses content after PATCH request with response containing Content-Location and cache-allowing header] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache uses content after POST request with response containing Content-Location and cache-allowing header] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + +[post-patch.any.worker.html] + [HTTP cache uses content after PATCH request with response containing Content-Location and cache-allowing header] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [HTTP cache uses content after POST request with response containing Content-Location and cache-allowing header] + expected: + if product == "chrome": PASS + [FAIL, PASS]
diff --git a/third_party/blink/web_tests/external/wpt/fetch/http-cache/split-cache.html.ini b/third_party/blink/web_tests/external/wpt/fetch/http-cache/split-cache.html.ini new file mode 100644 index 0000000..ccc3c6c5 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/fetch/http-cache/split-cache.html.ini
@@ -0,0 +1,8 @@ +[split-cache.html] + [HTTP cache is not shared between cross-site top-level frames] + expected: + if (product == "content_shell") and (virtual_suite == "not-split-http-cache") and (os == "mac") and (port == "mac13-arm64"): [FAIL, PASS] + + [HTTP cache is not shared between same-site frames with cross-site top-level frames] + expected: + if (product == "content_shell") and (virtual_suite == "not-split-http-cache") and (os == "mac") and (port == "mac13-arm64"): [FAIL, PASS]
diff --git a/third_party/blink/web_tests/external/wpt/fetch/http-cache/vary.any.js.ini b/third_party/blink/web_tests/external/wpt/fetch/http-cache/vary.any.js.ini new file mode 100644 index 0000000..7afc48c --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/fetch/http-cache/vary.any.js.ini
@@ -0,0 +1,26 @@ +[vary.any.html] + [HTTP cache doesn't invalidate existing Vary response] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + +[vary.any.serviceworker.html] + [HTTP cache doesn't invalidate existing Vary response] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + +[vary.any.sharedworker.html] + [HTTP cache doesn't invalidate existing Vary response] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + +[vary.any.worker.html] + [HTTP cache doesn't invalidate existing Vary response] + expected: + if product == "chrome": PASS + [FAIL, PASS]
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 a80e733..f73cdeb 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
@@ -1,6 +1,8 @@ [mixed-content-fetch.tentative.https.window.html] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac13"): [OK, TIMEOUT] + if (product == "content_shell") and (os == "mac") and (port == "mac11") and (virtual_suite == "pna-workers-disabled"): [TIMEOUT, OK] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "pna-workers-enabled") and (flag_specific == "disable-site-isolation-trials"): [OK, TIMEOUT] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "pna-workers-enabled") and (flag_specific == ""): [OK, TIMEOUT] [https-private to http-local: PUT success.] expected: FAIL
diff --git a/third_party/blink/web_tests/external/wpt/fetch/private-network-access/redirect.tentative.https.window.js.ini b/third_party/blink/web_tests/external/wpt/fetch/private-network-access/redirect.tentative.https.window.js.ini index 17c6b91..78a53af 100644 --- a/third_party/blink/web_tests/external/wpt/fetch/private-network-access/redirect.tentative.https.window.js.ini +++ b/third_party/blink/web_tests/external/wpt/fetch/private-network-access/redirect.tentative.https.window.js.ini
@@ -1,4 +1,7 @@ [redirect.tentative.https.window.html] + expected: + if (product == "content_shell") and (virtual_suite == "pna-workers-enabled") and (os == "linux") and (flag_specific == "disable-site-isolation-trials"): [OK, TIMEOUT] + if (product == "content_shell") and (virtual_suite == "pna-workers-enabled") and (os == "linux") and (flag_specific == ""): [OK, TIMEOUT] [private to local to private: success.] expected: if product == "chrome": FAIL
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 9f47f7c..0bf30c1 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
@@ -1,12 +1,14 @@ [service-worker-background-fetch.tentative.https.window.html] + expected: + if (product == "content_shell") and (virtual_suite == "keepalive-in-browser-migration") and (os == "mac") and (port == "mac11"): [OK, TIMEOUT] [local to local: success.] expected: - if product == "content_shell": [PASS, FAIL] - FAIL + if product == "chrome": FAIL [private to local: success.] expected: - if product == "content_shell": [FAIL, PASS] + if (product == "content_shell") and (virtual_suite == "keepalive-in-browser-migration") and (os == "mac") and (port == "mac11"): [PASS, FAIL] + if (product == "content_shell") and (virtual_suite == "") and (os == "mac") and (port == "mac11"): [PASS, FAIL] FAIL [private to private: success.] @@ -16,7 +18,6 @@ [public to local: success.] expected: if product == "chrome": FAIL - [PASS, FAIL] [public to private: success.] expected:
diff --git a/third_party/blink/web_tests/external/wpt/fetch/private-network-access/shared-worker-blob-fetch.tentative.https.window.js.ini b/third_party/blink/web_tests/external/wpt/fetch/private-network-access/shared-worker-blob-fetch.tentative.https.window.js.ini index c9dd3ed6..66a68a9 100644 --- a/third_party/blink/web_tests/external/wpt/fetch/private-network-access/shared-worker-blob-fetch.tentative.https.window.js.ini +++ b/third_party/blink/web_tests/external/wpt/fetch/private-network-access/shared-worker-blob-fetch.tentative.https.window.js.ini
@@ -1,19 +1,43 @@ [shared-worker-blob-fetch.tentative.https.window.html] + expected: + if (product == "content_shell") and (virtual_suite == "pna-permission") and (os == "linux") and (flag_specific == "disable-site-isolation-trials"): [OK, TIMEOUT] [private to local: failed preflight.] expected: FAIL [private to local: success.] expected: + 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 == "linux") and (flag_specific == ""): [FAIL, PASS] if product == "chrome": FAIL [public to local: failed preflight.] expected: FAIL + [public to local: success.] + expected: + 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 == "linux") and (flag_specific == ""): [FAIL, PASS] + [public to private: failed preflight.] expected: FAIL + [public to private: success.] + expected: + 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 == "linux") and (flag_specific == ""): [FAIL, PASS] + [treat-as-public to local: failed preflight.] expected: FAIL + [treat-as-public to local: success.] + expected: + 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 == "linux") and (flag_specific == ""): [FAIL, PASS] + [treat-as-public to private: failed preflight.] expected: FAIL + + [treat-as-public to private: success.] + expected: + 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 == "linux") and (flag_specific == ""): [FAIL, PASS]
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 7356faf..1c3d238 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
@@ -4,16 +4,38 @@ [private to local: success.] expected: + 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 == "linux") and (flag_specific == ""): [FAIL, PASS] if product == "chrome": FAIL [public to local: failed preflight.] expected: FAIL + [public to local: success.] + expected: + 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 == "linux") and (flag_specific == ""): [FAIL, PASS] + [public to private: failed preflight.] expected: FAIL + [public to private: success.] + expected: + 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 == "linux") and (flag_specific == ""): [FAIL, PASS] + [treat-as-public to local: failed preflight.] expected: FAIL + [treat-as-public to local: success.] + expected: + 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 == "linux") and (flag_specific == ""): [FAIL, PASS] + [treat-as-public to private: failed preflight.] expected: FAIL + + [treat-as-public to private: success.] + expected: + 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 == "linux") and (flag_specific == ""): [FAIL, PASS]
diff --git a/third_party/blink/web_tests/external/wpt/fetch/private-network-access/worker-fetch.tentative.window.js.ini b/third_party/blink/web_tests/external/wpt/fetch/private-network-access/worker-fetch.tentative.window.js.ini index 45b027e..abeceac 100644 --- a/third_party/blink/web_tests/external/wpt/fetch/private-network-access/worker-fetch.tentative.window.js.ini +++ b/third_party/blink/web_tests/external/wpt/fetch/private-network-access/worker-fetch.tentative.window.js.ini
@@ -1,12 +1,42 @@ [worker-fetch.tentative.window.html] [private https to local https: failure.] expected: + if (product == "content_shell") and (virtual_suite == "pna-workers-enabled") and (os == "linux") and (flag_specific == "disable-site-isolation-trials"): [PASS, FAIL] + if (product == "content_shell") and (virtual_suite == "produce-compile-hints"): [PASS, FAIL] + if (product == "content_shell") and (virtual_suite == "plz-dedicated-worker"): [PASS, FAIL] if product == "chrome": FAIL [private to local: failure.] expected: + if (product == "content_shell") and (virtual_suite == "pna-workers-enabled") and (os == "linux") and (flag_specific == "disable-site-isolation-trials"): [PASS, FAIL] + if (product == "content_shell") and (virtual_suite == "produce-compile-hints"): [PASS, FAIL] + if (product == "content_shell") and (virtual_suite == "plz-dedicated-worker"): [PASS, FAIL] if product == "chrome": FAIL + [public https to local https: failure.] + expected: + if (product == "content_shell") and (virtual_suite == "pna-workers-enabled") and (os == "linux") and (flag_specific == "disable-site-isolation-trials"): [PASS, FAIL] + if (product == "content_shell") and (virtual_suite == "produce-compile-hints"): [PASS, FAIL] + if (product == "content_shell") and (virtual_suite == "plz-dedicated-worker"): [PASS, FAIL] + + [public https to private https: failure.] + expected: + if (product == "content_shell") and (virtual_suite == "pna-workers-enabled") and (os == "linux") and (flag_specific == "disable-site-isolation-trials"): [PASS, FAIL] + if (product == "content_shell") and (virtual_suite == "produce-compile-hints"): [PASS, FAIL] + if (product == "content_shell") and (virtual_suite == "plz-dedicated-worker"): [PASS, FAIL] + + [public to local: failure.] + expected: + if (product == "content_shell") and (virtual_suite == "pna-workers-enabled") and (os == "linux") and (flag_specific == "disable-site-isolation-trials"): [PASS, FAIL] + if (product == "content_shell") and (virtual_suite == "produce-compile-hints"): [PASS, FAIL] + if (product == "content_shell") and (virtual_suite == "plz-dedicated-worker"): [PASS, FAIL] + + [public to private: failure.] + expected: + if (product == "content_shell") and (virtual_suite == "pna-workers-enabled") and (os == "linux") and (flag_specific == "disable-site-isolation-trials"): [PASS, FAIL] + if (product == "content_shell") and (virtual_suite == "produce-compile-hints"): [PASS, FAIL] + if (product == "content_shell") and (virtual_suite == "plz-dedicated-worker"): [PASS, FAIL] + [treat-as-public to local: failure.] expected: FAIL
diff --git a/third_party/blink/web_tests/external/wpt/forced-colors-mode/backplate/forced-colors-mode-backplate-10.html.ini b/third_party/blink/web_tests/external/wpt/forced-colors-mode/backplate/forced-colors-mode-backplate-10.html.ini new file mode 100644 index 0000000..9f009b1 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/forced-colors-mode/backplate/forced-colors-mode-backplate-10.html.ini
@@ -0,0 +1,3 @@ +[forced-colors-mode-backplate-10.html] + expected: + if (product == "content_shell") and (os == "linux") and (flag_specific == "highdpi"): [FAIL, PASS]
diff --git a/third_party/blink/web_tests/external/wpt/forced-colors-mode/forced-colors-mode-53.html.ini b/third_party/blink/web_tests/external/wpt/forced-colors-mode/forced-colors-mode-53.html.ini new file mode 100644 index 0000000..f9c9f455 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/forced-colors-mode/forced-colors-mode-53.html.ini
@@ -0,0 +1,6 @@ +[forced-colors-mode-53.html] + expected: + if (product == "content_shell") and (os == "win"): PASS + if (product == "content_shell") and (os == "linux"): PASS + if product == "chrome": PASS + [FAIL, PASS]
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 new file mode 100644 index 0000000..3848bcf --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/fs/FileSystemFileHandle-cross-primitive-locking.https.tentative.worker.js.ini
@@ -0,0 +1,248 @@ +[FileSystemFileHandle-cross-primitive-locking.https.tentative.worker.html] + [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] + + [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] + + [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] + + [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] + + [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] + + [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] + + [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] + + [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] + + [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] + + [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] + + [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] + + [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] + + [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] + + [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] + + [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] + + [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] + + [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] + + [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] + + [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] + + [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] + + [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] + + [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] + + [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] + + [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] + + [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] + + [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] + + [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] + + [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] + + [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] + + [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] + + [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] + + [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] + + [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] + + [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] + + [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] + + [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] + + [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] + + [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] + + [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] + + [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] + + [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] + + [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] + + [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] + + [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] + + [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] + + [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] + + [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] + + [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] + + [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] + + [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] + + [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] + + [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] + + [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] + + [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] + + [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] + + [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] + + [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] + + [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] + + [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] + + [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] + + [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] + + [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]
diff --git a/third_party/blink/web_tests/external/wpt/html/browsers/history/the-location-interface/allow_prototype_cycle_through_location.sub.html.ini b/third_party/blink/web_tests/external/wpt/html/browsers/history/the-location-interface/allow_prototype_cycle_through_location.sub.html.ini new file mode 100644 index 0000000..dcfaa1e8 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/browsers/history/the-location-interface/allow_prototype_cycle_through_location.sub.html.ini
@@ -0,0 +1,15 @@ +[allow_prototype_cycle_through_location.sub.html] + [cross-origin, but joined via document.domain, location cycle] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [same-origin, different-window location cycle] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [same-origin, same-window location cycle] + expected: + if product == "chrome": PASS + [FAIL, PASS]
diff --git a/third_party/blink/web_tests/external/wpt/html/browsers/origin/origin-keyed-agent-clusters/about-blank.https.sub.html.ini b/third_party/blink/web_tests/external/wpt/html/browsers/origin/origin-keyed-agent-clusters/about-blank.https.sub.html.ini new file mode 100644 index 0000000..087864e --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/browsers/origin/origin-keyed-agent-clusters/about-blank.https.sub.html.ini
@@ -0,0 +1,43 @@ +[about-blank.https.sub.html] + expected: + if product == "chrome": OK + [ERROR, OK] + [about:blank to child2: messageerror event must occur] + expected: + if product == "chrome": PASS + [NOTRUN, PASS] + + [about:blank to child2: setting document.domain must not give sync access] + expected: + if product == "chrome": PASS + [NOTRUN, PASS] + + [about:blank: originAgentCluster must equal true] + expected: + if product == "chrome": PASS + [NOTRUN, PASS] + + [child2 to about:blank: messageerror event must occur] + expected: + if product == "chrome": PASS + [NOTRUN, PASS] + + [child2 to about:blank: setting document.domain must not give sync access] + expected: + if product == "chrome": PASS + [NOTRUN, PASS] + + [child2: originAgentCluster must equal false] + expected: + if product == "chrome": PASS + [NOTRUN, PASS] + + [parent to about:blank: setting document.domain must give sync access] + expected: + if product == "chrome": PASS + [NOTRUN, PASS] + + [parent: originAgentCluster must equal true] + expected: + if product == "chrome": PASS + [NOTRUN, PASS]
diff --git a/third_party/blink/web_tests/external/wpt/html/browsers/windows/dangling-markup-window-name.tentative.html b/third_party/blink/web_tests/external/wpt/html/browsers/windows/dangling-markup-window-name.html similarity index 100% rename from third_party/blink/web_tests/external/wpt/html/browsers/windows/dangling-markup-window-name.tentative.html rename to third_party/blink/web_tests/external/wpt/html/browsers/windows/dangling-markup-window-name.html
diff --git a/third_party/blink/web_tests/external/wpt/html/browsers/windows/post-message/first-party-to-third-party-cross-partition-same-origin.sub.html.ini b/third_party/blink/web_tests/external/wpt/html/browsers/windows/post-message/first-party-to-third-party-cross-partition-same-origin.sub.html.ini new file mode 100644 index 0000000..9d00c78 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/browsers/windows/post-message/first-party-to-third-party-cross-partition-same-origin.sub.html.ini
@@ -0,0 +1,3 @@ +[first-party-to-third-party-cross-partition-same-origin.sub.html] + expected: + if (product == "content_shell") and (os == "win") and (virtual_suite == "post-message-third-party-to-first-party-different-bucket-same-origin-blocked") and (port == "win10.20h2"): [TIMEOUT, OK]
diff --git a/third_party/blink/web_tests/external/wpt/html/rendering/pixel-length-attributes-expected.txt b/third_party/blink/web_tests/external/wpt/html/rendering/pixel-length-attributes-expected.txt index 6b782e7..7594f785 100644 --- a/third_party/blink/web_tests/external/wpt/html/rendering/pixel-length-attributes-expected.txt +++ b/third_party/blink/web_tests/external/wpt/html/rendering/pixel-length-attributes-expected.txt
@@ -173,7 +173,7 @@ PASS <body marginwidth=" 00523 "> mapping to marginLeft PASS <body marginwidth="200."> mapping to marginLeft FAIL <body marginwidth="200.25"> mapping to marginLeft assert_equals: expected "200px" but got "200.25px" -FAIL <body marginwidth="200.7"> mapping to marginLeft assert_equals: expected "200px" but got "200.7px" +FAIL <body marginwidth="200.7"> mapping to marginLeft assert_equals: expected "200px" but got "200.688px" PASS <body marginwidth="0"> mapping to marginLeft FAIL <body marginwidth="-0"> mapping to marginLeft assert_equals: expected "0px" but got "8px" FAIL <body marginwidth="+0"> mapping to marginLeft assert_equals: expected "0px" but got "8px" @@ -194,7 +194,7 @@ PASS <body marginwidth=" 00523 "> mapping to marginRight PASS <body marginwidth="200."> mapping to marginRight FAIL <body marginwidth="200.25"> mapping to marginRight assert_equals: expected "200px" but got "200.25px" -FAIL <body marginwidth="200.7"> mapping to marginRight assert_equals: expected "200px" but got "200.7px" +FAIL <body marginwidth="200.7"> mapping to marginRight assert_equals: expected "200px" but got "200.688px" PASS <body marginwidth="0"> mapping to marginRight FAIL <body marginwidth="-0"> mapping to marginRight assert_equals: expected "0px" but got "8px" FAIL <body marginwidth="+0"> mapping to marginRight assert_equals: expected "0px" but got "8px" @@ -215,7 +215,7 @@ PASS <body leftmargin=" 00523 "> mapping to marginLeft PASS <body leftmargin="200."> mapping to marginLeft FAIL <body leftmargin="200.25"> mapping to marginLeft assert_equals: expected "200px" but got "200.25px" -FAIL <body leftmargin="200.7"> mapping to marginLeft assert_equals: expected "200px" but got "200.7px" +FAIL <body leftmargin="200.7"> mapping to marginLeft assert_equals: expected "200px" but got "200.688px" PASS <body leftmargin="0"> mapping to marginLeft FAIL <body leftmargin="-0"> mapping to marginLeft assert_equals: expected "0px" but got "8px" FAIL <body leftmargin="+0"> mapping to marginLeft assert_equals: expected "0px" but got "8px" @@ -257,7 +257,7 @@ PASS <body marginheight=" 00523 "> mapping to marginTop PASS <body marginheight="200."> mapping to marginTop FAIL <body marginheight="200.25"> mapping to marginTop assert_equals: expected "200px" but got "200.25px" -FAIL <body marginheight="200.7"> mapping to marginTop assert_equals: expected "200px" but got "200.7px" +FAIL <body marginheight="200.7"> mapping to marginTop assert_equals: expected "200px" but got "200.688px" PASS <body marginheight="0"> mapping to marginTop FAIL <body marginheight="-0"> mapping to marginTop assert_equals: expected "0px" but got "8px" FAIL <body marginheight="+0"> mapping to marginTop assert_equals: expected "0px" but got "8px" @@ -278,7 +278,7 @@ PASS <body marginheight=" 00523 "> mapping to marginBottom PASS <body marginheight="200."> mapping to marginBottom FAIL <body marginheight="200.25"> mapping to marginBottom assert_equals: expected "200px" but got "200.25px" -FAIL <body marginheight="200.7"> mapping to marginBottom assert_equals: expected "200px" but got "200.7px" +FAIL <body marginheight="200.7"> mapping to marginBottom assert_equals: expected "200px" but got "200.688px" PASS <body marginheight="0"> mapping to marginBottom FAIL <body marginheight="-0"> mapping to marginBottom assert_equals: expected "0px" but got "8px" FAIL <body marginheight="+0"> mapping to marginBottom assert_equals: expected "0px" but got "8px" @@ -299,7 +299,7 @@ PASS <body topmargin=" 00523 "> mapping to marginTop PASS <body topmargin="200."> mapping to marginTop FAIL <body topmargin="200.25"> mapping to marginTop assert_equals: expected "200px" but got "200.25px" -FAIL <body topmargin="200.7"> mapping to marginTop assert_equals: expected "200px" but got "200.7px" +FAIL <body topmargin="200.7"> mapping to marginTop assert_equals: expected "200px" but got "200.688px" PASS <body topmargin="0"> mapping to marginTop FAIL <body topmargin="-0"> mapping to marginTop assert_equals: expected "0px" but got "8px" FAIL <body topmargin="+0"> mapping to marginTop assert_equals: expected "0px" but got "8px"
diff --git a/third_party/blink/web_tests/external/wpt/html/semantics/embedded-content/the-iframe-element/sandbox-top-navigation-escalate-privileges.tentative.sub.window.js.ini b/third_party/blink/web_tests/external/wpt/html/semantics/embedded-content/the-iframe-element/sandbox-top-navigation-escalate-privileges.tentative.sub.window.js.ini index 409858d95..0deba0f 100644 --- a/third_party/blink/web_tests/external/wpt/html/semantics/embedded-content/the-iframe-element/sandbox-top-navigation-escalate-privileges.tentative.sub.window.js.ini +++ b/third_party/blink/web_tests/external/wpt/html/semantics/embedded-content/the-iframe-element/sandbox-top-navigation-escalate-privileges.tentative.sub.window.js.ini
@@ -1,2 +1,5 @@ [sandbox-top-navigation-escalate-privileges.tentative.sub.window.html] - expected: ERROR + expected: + if (product == "content_shell") and (os == "mac") and (port == "mac10.15") and (virtual_suite == "disable-intersection-optimization"): [OK, ERROR] + if (product == "content_shell") and (os == "mac") and (port == "mac10.15") and (virtual_suite == ""): [TIMEOUT, OK, ERROR] + ERROR
diff --git a/third_party/blink/web_tests/external/wpt/html/semantics/forms/form-submission-0/multipart-formdata.window.js.ini b/third_party/blink/web_tests/external/wpt/html/semantics/forms/form-submission-0/multipart-formdata.window.js.ini index 73bf04c..0958d2d 100644 --- a/third_party/blink/web_tests/external/wpt/html/semantics/forms/form-submission-0/multipart-formdata.window.js.ini +++ b/third_party/blink/web_tests/external/wpt/html/semantics/forms/form-submission-0/multipart-formdata.window.js.ini
@@ -1,3 +1,4 @@ [multipart-formdata.window.html] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac11"): [TIMEOUT, OK] + if (product == "content_shell") and (os == "mac") and (port == "mac11"): TIMEOUT + if (product == "content_shell") and (os == "mac") and (port == "mac10.15"): [TIMEOUT, OK]
diff --git a/third_party/blink/web_tests/external/wpt/html/semantics/forms/form-submission-0/text-plain.window.js.ini b/third_party/blink/web_tests/external/wpt/html/semantics/forms/form-submission-0/text-plain.window.js.ini index b9c853c..96be193 100644 --- a/third_party/blink/web_tests/external/wpt/html/semantics/forms/form-submission-0/text-plain.window.js.ini +++ b/third_party/blink/web_tests/external/wpt/html/semantics/forms/form-submission-0/text-plain.window.js.ini
@@ -1,4 +1,5 @@ [text-plain.window.html] expected: - if (product == "content_shell") and (os == "linux") and (flag_specific == ""): TIMEOUT + if (product == "content_shell") and (os == "mac") and (port == "mac12"): [TIMEOUT, OK] if (product == "content_shell") and (os == "mac") and (port == "mac11"): TIMEOUT + if (product == "content_shell") and (os == "linux") and (flag_specific == ""): TIMEOUT
diff --git a/third_party/blink/web_tests/external/wpt/html/semantics/forms/the-selectlist-element/selectlist-parts-structure.tentative.html.ini b/third_party/blink/web_tests/external/wpt/html/semantics/forms/the-selectlist-element/selectlist-parts-structure.tentative.html.ini index 2c003cf..fc0591b 100644 --- a/third_party/blink/web_tests/external/wpt/html/semantics/forms/the-selectlist-element/selectlist-parts-structure.tentative.html.ini +++ b/third_party/blink/web_tests/external/wpt/html/semantics/forms/the-selectlist-element/selectlist-parts-structure.tentative.html.ini
@@ -1,7 +1,8 @@ [selectlist-parts-structure.tentative.html] expected: + if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): TIMEOUT + if (product == "content_shell") and (os == "mac") and (port == "mac13"): TIMEOUT + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): TIMEOUT if (product == "content_shell") and (os == "mac") and (port == "mac12"): TIMEOUT if (product == "content_shell") and (os == "mac") and (port == "mac11"): TIMEOUT - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): TIMEOUT - if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): [TIMEOUT, OK] - if (product == "content_shell") and (os == "mac") and (port == "mac13"): TIMEOUT + if (product == "content_shell") and (os == "mac") and (port == "mac10.15"): [TIMEOUT, OK]
diff --git a/third_party/blink/web_tests/external/wpt/html/semantics/popovers/popover-css-properties.tentative.html.ini b/third_party/blink/web_tests/external/wpt/html/semantics/popovers/popover-css-properties.tentative.html.ini new file mode 100644 index 0000000..1c873b7 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/semantics/popovers/popover-css-properties.tentative.html.ini
@@ -0,0 +1,264 @@ +[popover-css-properties.tentative.html] + [CSS Animations: property <popover-hide-delay> from [1s\] to [2000ms\] at (-0.3) should be [0.7s\]] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [CSS Animations: property <popover-hide-delay> from [1s\] to [2000ms\] at (-1.5) should be [0s\]] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [CSS Animations: property <popover-hide-delay> from [1s\] to [2000ms\] at (0) should be [1s\]] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [CSS Animations: property <popover-hide-delay> from [1s\] to [2000ms\] at (0.5) should be [1.5s\]] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [CSS Animations: property <popover-hide-delay> from [1s\] to [2000ms\] at (1) should be [2s\]] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [CSS Animations: property <popover-hide-delay> from [1s\] to [2000ms\] at (1.5) should be [2.5s\]] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [CSS Animations: property <popover-show-delay> from [1s\] to [2000ms\] at (-0.3) should be [0.7s\]] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [CSS Animations: property <popover-show-delay> from [1s\] to [2000ms\] at (-1.5) should be [0s\]] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [CSS Animations: property <popover-show-delay> from [1s\] to [2000ms\] at (0) should be [1s\]] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [CSS Animations: property <popover-show-delay> from [1s\] to [2000ms\] at (0.5) should be [1.5s\]] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [CSS Animations: property <popover-show-delay> from [1s\] to [2000ms\] at (1) should be [2s\]] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [CSS Animations: property <popover-show-delay> from [1s\] to [2000ms\] at (1.5) should be [2.5s\]] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [CSS Transitions with transition: all: property <popover-hide-delay> from [1s\] to [2000ms\] at (-0.3) should be [0.7s\]] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [CSS Transitions with transition: all: property <popover-hide-delay> from [1s\] to [2000ms\] at (-1.5) should be [0s\]] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [CSS Transitions with transition: all: property <popover-hide-delay> from [1s\] to [2000ms\] at (0) should be [1s\]] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [CSS Transitions with transition: all: property <popover-hide-delay> from [1s\] to [2000ms\] at (0.5) should be [1.5s\]] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [CSS Transitions with transition: all: property <popover-hide-delay> from [1s\] to [2000ms\] at (1) should be [2s\]] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [CSS Transitions with transition: all: property <popover-hide-delay> from [1s\] to [2000ms\] at (1.5) should be [2.5s\]] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [CSS Transitions with transition: all: property <popover-show-delay> from [1s\] to [2000ms\] at (-0.3) should be [0.7s\]] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [CSS Transitions with transition: all: property <popover-show-delay> from [1s\] to [2000ms\] at (-1.5) should be [0s\]] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [CSS Transitions with transition: all: property <popover-show-delay> from [1s\] to [2000ms\] at (0) should be [1s\]] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [CSS Transitions with transition: all: property <popover-show-delay> from [1s\] to [2000ms\] at (0.5) should be [1.5s\]] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [CSS Transitions with transition: all: property <popover-show-delay> from [1s\] to [2000ms\] at (1) should be [2s\]] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [CSS Transitions with transition: all: property <popover-show-delay> from [1s\] to [2000ms\] at (1.5) should be [2.5s\]] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [CSS Transitions: property <popover-hide-delay> from [1s\] to [2000ms\] at (-0.3) should be [0.7s\]] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [CSS Transitions: property <popover-hide-delay> from [1s\] to [2000ms\] at (-1.5) should be [0s\]] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [CSS Transitions: property <popover-hide-delay> from [1s\] to [2000ms\] at (0) should be [1s\]] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [CSS Transitions: property <popover-hide-delay> from [1s\] to [2000ms\] at (0.5) should be [1.5s\]] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [CSS Transitions: property <popover-hide-delay> from [1s\] to [2000ms\] at (1) should be [2s\]] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [CSS Transitions: property <popover-hide-delay> from [1s\] to [2000ms\] at (1.5) should be [2.5s\]] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [CSS Transitions: property <popover-show-delay> from [1s\] to [2000ms\] at (-0.3) should be [0.7s\]] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [CSS Transitions: property <popover-show-delay> from [1s\] to [2000ms\] at (-1.5) should be [0s\]] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [CSS Transitions: property <popover-show-delay> from [1s\] to [2000ms\] at (0) should be [1s\]] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [CSS Transitions: property <popover-show-delay> from [1s\] to [2000ms\] at (0.5) should be [1.5s\]] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [CSS Transitions: property <popover-show-delay> from [1s\] to [2000ms\] at (1) should be [2s\]] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [CSS Transitions: property <popover-show-delay> from [1s\] to [2000ms\] at (1.5) should be [2.5s\]] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [Property popover-hide-delay value '0ms'] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [Property popover-hide-delay value '0s'] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [Property popover-hide-delay value '123ms'] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [Property popover-hide-delay value '32s'] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [Property popover-show-delay value '0ms'] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [Property popover-show-delay value '0s'] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [Property popover-show-delay value '123ms'] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [Property popover-show-delay value '32s'] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [Web Animations: property <popover-hide-delay> from [1s\] to [2000ms\] at (-0.3) should be [0.7s\]] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [Web Animations: property <popover-hide-delay> from [1s\] to [2000ms\] at (-1.5) should be [0s\]] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [Web Animations: property <popover-hide-delay> from [1s\] to [2000ms\] at (0) should be [1s\]] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [Web Animations: property <popover-hide-delay> from [1s\] to [2000ms\] at (0.5) should be [1.5s\]] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [Web Animations: property <popover-hide-delay> from [1s\] to [2000ms\] at (1) should be [2s\]] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [Web Animations: property <popover-hide-delay> from [1s\] to [2000ms\] at (1.5) should be [2.5s\]] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [Web Animations: property <popover-show-delay> from [1s\] to [2000ms\] at (-0.3) should be [0.7s\]] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [Web Animations: property <popover-show-delay> from [1s\] to [2000ms\] at (-1.5) should be [0s\]] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [Web Animations: property <popover-show-delay> from [1s\] to [2000ms\] at (0) should be [1s\]] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [Web Animations: property <popover-show-delay> from [1s\] to [2000ms\] at (0.5) should be [1.5s\]] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [Web Animations: property <popover-show-delay> from [1s\] to [2000ms\] at (1) should be [2s\]] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [Web Animations: property <popover-show-delay> from [1s\] to [2000ms\] at (1.5) should be [2.5s\]] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [e.style['popover-hide-delay'\] = "0ms" should set the property value] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [e.style['popover-hide-delay'\] = "0s" should set the property value] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [e.style['popover-hide-delay'\] = "123ms" should set the property value] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [e.style['popover-hide-delay'\] = "32s" should set the property value] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [e.style['popover-hide-delay'\] = "inherit" should set the property value] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [e.style['popover-show-delay'\] = "0ms" should set the property value] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [e.style['popover-show-delay'\] = "0s" should set the property value] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [e.style['popover-show-delay'\] = "123ms" should set the property value] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [e.style['popover-show-delay'\] = "32s" should set the property value] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS] + + [e.style['popover-show-delay'\] = "inherit" should set the property value] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "popover-hint-disabled") and (flag_specific == ""): [FAIL, PASS]
diff --git a/third_party/blink/web_tests/external/wpt/html/semantics/scripting-1/the-script-element/defer-script/async-script-2.html.ini b/third_party/blink/web_tests/external/wpt/html/semantics/scripting-1/the-script-element/defer-script/async-script-2.html.ini new file mode 100644 index 0000000..fd79a38 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/semantics/scripting-1/the-script-element/defer-script/async-script-2.html.ini
@@ -0,0 +1,4 @@ +[async-script-2.html] + [Async Script Execution Order] + expected: + if (product == "content_shell") and (virtual_suite == "force-defer-script") and (os == "mac") and (port == "mac13"): [FAIL, PASS]
diff --git a/third_party/blink/web_tests/external/wpt/html/semantics/scripting-1/the-script-element/module/import-meta/import-meta-object.any.js.ini b/third_party/blink/web_tests/external/wpt/html/semantics/scripting-1/the-script-element/module/import-meta/import-meta-object.any.js.ini new file mode 100644 index 0000000..268f051 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/semantics/scripting-1/the-script-element/module/import-meta/import-meta-object.any.js.ini
@@ -0,0 +1,3 @@ +[import-meta-object.any.serviceworker-module.html] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "threaded-preload-scanner") and (flag_specific == "disable-site-isolation-trials"): [OK, CRASH]
diff --git a/third_party/blink/web_tests/external/wpt/measure-memory/detached.https.window.js.ini b/third_party/blink/web_tests/external/wpt/measure-memory/detached.https.window.js.ini new file mode 100644 index 0000000..f561305 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/measure-memory/detached.https.window.js.ini
@@ -0,0 +1,4 @@ +[detached.https.window.html] + expected: + if product == "chrome": OK + [TIMEOUT, OK]
diff --git a/third_party/blink/web_tests/external/wpt/measure-memory/idlharness.window.js.ini b/third_party/blink/web_tests/external/wpt/measure-memory/idlharness.window.js.ini new file mode 100644 index 0000000..bc017649 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/measure-memory/idlharness.window.js.ini
@@ -0,0 +1,5 @@ +[idlharness.window.html] + [Performance interface: operation measureUserAgentSpecificMemory()] + expected: + if product == "chrome": PASS + [FAIL, PASS]
diff --git a/third_party/blink/web_tests/external/wpt/measure-memory/main-frame-and-worker.https.window.js.ini b/third_party/blink/web_tests/external/wpt/measure-memory/main-frame-and-worker.https.window.js.ini new file mode 100644 index 0000000..b926b737 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/measure-memory/main-frame-and-worker.https.window.js.ini
@@ -0,0 +1,5 @@ +[main-frame-and-worker.https.window.html] + [Well-formed result of performance.measureUserAgentSpecificMemory.] + expected: + if product == "chrome": PASS + [FAIL, PASS]
diff --git a/third_party/blink/web_tests/external/wpt/measure-memory/shared-worker.https.any.js.ini b/third_party/blink/web_tests/external/wpt/measure-memory/shared-worker.https.any.js.ini new file mode 100644 index 0000000..913482f --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/measure-memory/shared-worker.https.any.js.ini
@@ -0,0 +1,5 @@ +[shared-worker.https.any.sharedworker.html] + [Well-formed result of performance.measureUserAgentSpecificMemory.] + expected: + if product == "chrome": PASS + [FAIL, PASS]
diff --git a/third_party/blink/web_tests/external/wpt/measure-memory/window-open.mix.https.window.js.ini b/third_party/blink/web_tests/external/wpt/measure-memory/window-open.mix.https.window.js.ini new file mode 100644 index 0000000..588e765 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/measure-memory/window-open.mix.https.window.js.ini
@@ -0,0 +1,4 @@ +[window-open.mix.https.window.html] + expected: + if product == "chrome": OK + [TIMEOUT, OK]
diff --git a/third_party/blink/web_tests/external/wpt/media-source/mediasource-appendbuffer-quota-exceeded.html.ini b/third_party/blink/web_tests/external/wpt/media-source/mediasource-appendbuffer-quota-exceeded.html.ini new file mode 100644 index 0000000..11c415e --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/media-source/mediasource-appendbuffer-quota-exceeded.html.ini
@@ -0,0 +1,6 @@ +[mediasource-appendbuffer-quota-exceeded.html] + expected: + if (product == "content_shell") and (virtual_suite == "media-foundation-for-clear-dcomp"): [OK, TIMEOUT] + [Appending data repeatedly should fill up the buffer and throw a QuotaExceededError when buffer is full.] + expected: + if (product == "content_shell") and (virtual_suite == "media-foundation-for-clear-dcomp"): [FAIL, PASS]
diff --git a/third_party/blink/web_tests/external/wpt/media-source/mediasource-config-change-webm-av-framesize.html.ini b/third_party/blink/web_tests/external/wpt/media-source/mediasource-config-change-webm-av-framesize.html.ini new file mode 100644 index 0000000..de64bbd --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/media-source/mediasource-config-change-webm-av-framesize.html.ini
@@ -0,0 +1,4 @@ +[mediasource-config-change-webm-av-framesize.html] + [Tests webm frame size changes in multiplexed content.] + expected: + if (product == "content_shell") and (virtual_suite == "media-foundation-for-clear-dcomp"): [FAIL, PASS]
diff --git a/third_party/blink/web_tests/external/wpt/media-source/mediasource-config-change-webm-v-framesize.html.ini b/third_party/blink/web_tests/external/wpt/media-source/mediasource-config-change-webm-v-framesize.html.ini new file mode 100644 index 0000000..3edf5ed --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/media-source/mediasource-config-change-webm-v-framesize.html.ini
@@ -0,0 +1,4 @@ +[mediasource-config-change-webm-v-framesize.html] + [Tests webm video-only frame size changes.] + expected: + if (product == "content_shell") and (virtual_suite == "media-foundation-for-clear-dcomp"): [FAIL, PASS]
diff --git a/third_party/blink/web_tests/external/wpt/media-source/mediasource-play.html.ini b/third_party/blink/web_tests/external/wpt/media-source/mediasource-play.html.ini index f02a746..5b45bfe 100644 --- a/third_party/blink/web_tests/external/wpt/media-source/mediasource-play.html.ini +++ b/third_party/blink/web_tests/external/wpt/media-source/mediasource-play.html.ini
@@ -1,3 +1,6 @@ [mediasource-play.html] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac12"): [TIMEOUT, OK] + if (product == "content_shell") and (os == "mac") and (port == "mac12"): [OK, TIMEOUT] + [Test normal playback case with MediaSource API] + expected: + if (product == "content_shell") and (virtual_suite == "media-foundation-for-clear-dcomp"): [FAIL, PASS]
diff --git a/third_party/blink/web_tests/external/wpt/mediacapture-record/MediaRecorder-canvas-media-source.https.html.ini b/third_party/blink/web_tests/external/wpt/mediacapture-record/MediaRecorder-canvas-media-source.https.html.ini index 2bf7a83..b1b6333 100644 --- a/third_party/blink/web_tests/external/wpt/mediacapture-record/MediaRecorder-canvas-media-source.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/mediacapture-record/MediaRecorder-canvas-media-source.https.html.ini
@@ -1,5 +1,6 @@ [MediaRecorder-canvas-media-source.https.html] [MediaRecorder returns frames containing video content] expected: + if (product == "content_shell") and (os == "mac") and (port == "mac10.15") and (virtual_suite == ""): [FAIL, PASS] if (product == "content_shell") and (os == "win") and (port == "win11"): FAIL - if (product == "content_shell") and (os == "mac") and (port == "mac11"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac11"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/mediacapture-streams/MediaStream-default-feature-policy.https.html.ini b/third_party/blink/web_tests/external/wpt/mediacapture-streams/MediaStream-default-feature-policy.https.html.ini new file mode 100644 index 0000000..2c540af3 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/mediacapture-streams/MediaStream-default-feature-policy.https.html.ini
@@ -0,0 +1,10 @@ +[MediaStream-default-feature-policy.https.html] + [Feature policy "camera" can be enabled in cross-origin iframes using "allow" attribute.] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [Feature policy "microphone" can be enabled in cross-origin iframes using "allow" attribute.] + expected: + if product == "chrome": PASS + [FAIL, PASS]
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/after-transition-intercept-handler-modifies.html.ini b/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/after-transition-intercept-handler-modifies.html.ini index 4028af9..208866a 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/after-transition-intercept-handler-modifies.html.ini +++ b/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/after-transition-intercept-handler-modifies.html.ini
@@ -1,8 +1,9 @@ [after-transition-intercept-handler-modifies.html] [scroll: state should be saved before intercept handlers run] expected: - if (product == "content_shell") and (os == "win") and (port == "win10.20h2"): [FAIL, PASS] - if (product == "content_shell") and (os == "mac") and (port == "mac12"): FAIL + if (product == "content_shell") and (os == "win") and (port == "win10.20h2"): FAIL if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL - if (product == "content_shell") and (os == "mac") and (port == "mac12-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 + if (product == "content_shell") and (os == "linux") and (flag_specific == "disable-site-isolation-trials"): [FAIL, PASS]
diff --git a/third_party/blink/web_tests/external/wpt/pending-beacon/pending_beacon-sendondiscard.tentative.https.window.js.ini b/third_party/blink/web_tests/external/wpt/pending-beacon/pending_beacon-sendondiscard.tentative.https.window.js.ini new file mode 100644 index 0000000..5bd629c --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/pending-beacon/pending_beacon-sendondiscard.tentative.https.window.js.ini
@@ -0,0 +1,21 @@ +[pending_beacon-sendondiscard.tentative.https.window.html] + [A discarded document does not send an already sent beacon.] + 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 == "linux") and (flag_specific == "disable-site-isolation-trials"): [PASS, FAIL] + if (product == "content_shell") and (os == "linux") and (flag_specific == ""): [FAIL, PASS] + + [A discarded document sends all its beacons of which backgroundTimeouts are\n not default.] + 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"): [PASS, FAIL] + if (product == "content_shell") and (os == "mac") and (port == "mac10.15"): [FAIL, PASS] + if (product == "content_shell") and (os == "linux") and (flag_specific == "disable-site-isolation-trials"): [PASS, FAIL] + + [A discarded document sends all its beacons of which timeouts are not\n default.] + expected: + if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): [PASS, FAIL] + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): [PASS, FAIL] + if (product == "content_shell") and (os == "linux") and (flag_specific == "disable-site-isolation-trials"): [PASS, FAIL] + if (product == "content_shell") and (os == "linux") and (flag_specific == ""): [PASS, FAIL]
diff --git a/third_party/blink/web_tests/external/wpt/pointerevents/compat/pointerevent_mouse-pointer-preventdefault.html.ini b/third_party/blink/web_tests/external/wpt/pointerevents/compat/pointerevent_mouse-pointer-preventdefault.html.ini new file mode 100644 index 0000000..6e32837 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/pointerevents/compat/pointerevent_mouse-pointer-preventdefault.html.ini
@@ -0,0 +1,3 @@ +[pointerevent_mouse-pointer-preventdefault.html] + expected: + if (product == "content_shell") and (os == "mac") and (port == "mac10.15"): [TIMEOUT, OK]
diff --git a/third_party/blink/web_tests/external/wpt/pointerevents/pointerevent_movementxy.html.ini b/third_party/blink/web_tests/external/wpt/pointerevents/pointerevent_movementxy.html.ini index 5a9cae6..c07c30d 100644 --- a/third_party/blink/web_tests/external/wpt/pointerevents/pointerevent_movementxy.html.ini +++ b/third_party/blink/web_tests/external/wpt/pointerevents/pointerevent_movementxy.html.ini
@@ -3,3 +3,9 @@ expected: if (product == "content_shell") and (os == "mac") and (port == "mac11"): [FAIL, PASS] if (product == "content_shell") and (os == "mac") and (port == "mac12"): FAIL + + +[pointerevent_movementxy.html?pen] + [pen pointerevent attributes] + expected: + if (product == "content_shell") and (os == "mac") and (port == "mac11"): [FAIL, PASS]
diff --git a/third_party/blink/web_tests/external/wpt/portals/csp/frame-src.sub.html.ini b/third_party/blink/web_tests/external/wpt/portals/csp/frame-src.sub.html.ini new file mode 100644 index 0000000..ef4d80b --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/portals/csp/frame-src.sub.html.ini
@@ -0,0 +1,18 @@ +[frame-src.sub.html] + expected: + if product == "chrome": OK + [TIMEOUT, OK] + [Tests that a portal can be loaded when the origin matches the frame-src CSP header.] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [Tests that a portal can't be loaded when it violates frame-src] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [Tests that a portal will fail to load on an origin different than the one specified in the frame-src CSP, but that it can be loaded when the origin matches the frame-src CSP.] + expected: + if product == "chrome": PASS + [FAIL, PASS]
diff --git a/third_party/blink/web_tests/external/wpt/portals/idlharness.window.js.ini b/third_party/blink/web_tests/external/wpt/portals/idlharness.window.js.ini new file mode 100644 index 0000000..69fc9bb --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/portals/idlharness.window.js.ini
@@ -0,0 +1,265 @@ +[idlharness.window.html] + [HTMLBodyElement interface: attribute onportalactivate] + expected: + if product == "chrome": PASS + [PASS, FAIL] + + [HTMLFrameSetElement interface: attribute onportalactivate] + expected: + if product == "chrome": PASS + [PASS, FAIL] + + [HTMLPortalElement interface object length] + expected: + if product == "chrome": PASS + [PASS, FAIL] + + [HTMLPortalElement interface object name] + expected: + if product == "chrome": PASS + [PASS, FAIL] + + [HTMLPortalElement interface: attribute onmessage] + expected: + if product == "chrome": PASS + [PASS, FAIL] + + [HTMLPortalElement interface: attribute onmessageerror] + expected: + if product == "chrome": PASS + [PASS, FAIL] + + [HTMLPortalElement interface: attribute referrerPolicy] + expected: + if product == "chrome": PASS + [PASS, FAIL] + + [HTMLPortalElement interface: attribute src] + expected: + if product == "chrome": PASS + [PASS, FAIL] + + [HTMLPortalElement interface: calling activate(optional PortalActivateOptions) on document.createElement("portal") with too few arguments must throw TypeError] + expected: + if product == "chrome": PASS + [PASS, FAIL] + + [HTMLPortalElement interface: calling postMessage(any, optional StructuredSerializeOptions) on document.createElement("portal") with too few arguments must throw TypeError] + expected: + if product == "chrome": PASS + [PASS, FAIL] + + [HTMLPortalElement interface: document.createElement("portal") must inherit property "activate(optional PortalActivateOptions)" with the proper type] + expected: + if product == "chrome": PASS + [PASS, FAIL] + + [HTMLPortalElement interface: document.createElement("portal") must inherit property "onmessage" with the proper type] + expected: + if product == "chrome": PASS + [PASS, FAIL] + + [HTMLPortalElement interface: document.createElement("portal") must inherit property "onmessageerror" with the proper type] + expected: + if product == "chrome": PASS + [PASS, FAIL] + + [HTMLPortalElement interface: document.createElement("portal") must inherit property "postMessage(any, optional StructuredSerializeOptions)" with the proper type] + expected: + if product == "chrome": PASS + [PASS, FAIL] + + [HTMLPortalElement interface: document.createElement("portal") must inherit property "referrerPolicy" with the proper type] + expected: + if product == "chrome": PASS + [PASS, FAIL] + + [HTMLPortalElement interface: document.createElement("portal") must inherit property "src" with the proper type] + expected: + if product == "chrome": PASS + [PASS, FAIL] + + [HTMLPortalElement interface: existence and properties of interface object] + expected: + if product == "chrome": PASS + [PASS, FAIL] + + [HTMLPortalElement interface: existence and properties of interface prototype object] + expected: + if product == "chrome": PASS + [PASS, FAIL] + + [HTMLPortalElement interface: existence and properties of interface prototype object's "constructor" property] + expected: + if product == "chrome": PASS + [PASS, FAIL] + + [HTMLPortalElement interface: existence and properties of interface prototype object's @@unscopables property] + expected: + if product == "chrome": PASS + [PASS, FAIL] + + [HTMLPortalElement interface: operation activate(optional PortalActivateOptions)] + expected: + if product == "chrome": PASS + [PASS, FAIL] + + [HTMLPortalElement interface: operation postMessage(any, optional StructuredSerializeOptions)] + expected: + if product == "chrome": PASS + [PASS, FAIL] + + [HTMLPortalElement must be primary interface of document.createElement("portal")] + expected: + if product == "chrome": PASS + [PASS, FAIL] + + [PortalActivateEvent interface object length] + expected: + if product == "chrome": PASS + [PASS, FAIL] + + [PortalActivateEvent interface object name] + expected: + if product == "chrome": PASS + [PASS, FAIL] + + [PortalActivateEvent interface: attribute data] + expected: + if product == "chrome": PASS + [PASS, FAIL] + + [PortalActivateEvent interface: existence and properties of interface object] + expected: + if product == "chrome": PASS + [PASS, FAIL] + + [PortalActivateEvent interface: existence and properties of interface prototype object] + expected: + if product == "chrome": PASS + [PASS, FAIL] + + [PortalActivateEvent interface: existence and properties of interface prototype object's "constructor" property] + expected: + if product == "chrome": PASS + [PASS, FAIL] + + [PortalActivateEvent interface: existence and properties of interface prototype object's @@unscopables property] + expected: + if product == "chrome": PASS + [PASS, FAIL] + + [PortalActivateEvent interface: new PortalActivateEvent("portalactivate") must inherit property "adoptPredecessor()" with the proper type] + expected: + if product == "chrome": PASS + [PASS, FAIL] + + [PortalActivateEvent interface: new PortalActivateEvent("portalactivate") must inherit property "data" with the proper type] + expected: + if product == "chrome": PASS + [PASS, FAIL] + + [PortalActivateEvent interface: operation adoptPredecessor()] + expected: + if product == "chrome": PASS + [PASS, FAIL] + + [PortalActivateEvent must be primary interface of new PortalActivateEvent("portalactivate")] + expected: + if product == "chrome": PASS + [PASS, FAIL] + + [PortalHost interface object length] + expected: + if product == "chrome": PASS + [PASS, FAIL] + + [PortalHost interface object name] + expected: + if product == "chrome": PASS + [PASS, FAIL] + + [PortalHost interface: attribute onmessage] + expected: + if product == "chrome": PASS + [PASS, FAIL] + + [PortalHost interface: attribute onmessageerror] + expected: + if product == "chrome": PASS + [PASS, FAIL] + + [PortalHost interface: calling postMessage(any, optional StructuredSerializeOptions) on window.portalHost with too few arguments must throw TypeError] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [PortalHost interface: existence and properties of interface object] + expected: + if product == "chrome": PASS + [PASS, FAIL] + + [PortalHost interface: existence and properties of interface prototype object] + expected: + if product == "chrome": PASS + [PASS, FAIL] + + [PortalHost interface: existence and properties of interface prototype object's "constructor" property] + expected: + if product == "chrome": PASS + [PASS, FAIL] + + [PortalHost interface: existence and properties of interface prototype object's @@unscopables property] + expected: + if product == "chrome": PASS + [PASS, FAIL] + + [PortalHost interface: operation postMessage(any, optional StructuredSerializeOptions)] + expected: + if product == "chrome": PASS + [PASS, FAIL] + + [PortalHost interface: window.portalHost must inherit property "onmessage" with the proper type] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [PortalHost interface: window.portalHost must inherit property "onmessageerror" with the proper type] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [PortalHost interface: window.portalHost must inherit property "postMessage(any, optional StructuredSerializeOptions)" with the proper type] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [PortalHost must be primary interface of window.portalHost] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [Stringification of document.createElement("portal")] + expected: + if product == "chrome": PASS + [PASS, FAIL] + + [Stringification of new PortalActivateEvent("portalactivate")] + expected: + if product == "chrome": PASS + [PASS, FAIL] + + [Stringification of window.portalHost] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [Window interface: attribute onportalactivate] + expected: + if product == "chrome": PASS + [PASS, FAIL] + + [Window interface: attribute portalHost] + expected: + if product == "chrome": PASS + [PASS, FAIL]
diff --git a/third_party/blink/web_tests/external/wpt/requestidlecallback/deadline-max-rAF-dynamic.html.ini b/third_party/blink/web_tests/external/wpt/requestidlecallback/deadline-max-rAF-dynamic.html.ini new file mode 100644 index 0000000..a6a2cf78 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/requestidlecallback/deadline-max-rAF-dynamic.html.ini
@@ -0,0 +1,4 @@ +[deadline-max-rAF-dynamic.html] + [Check that the deadline is changed if there is a new requestAnimationFrame from within requestIdleCallback.] + expected: + if (product == "content_shell") and (os == "mac") and (port == "mac12"): [FAIL, PASS]
diff --git a/third_party/blink/web_tests/external/wpt/requestidlecallback/deadline-max-timeout-dynamic.html.ini b/third_party/blink/web_tests/external/wpt/requestidlecallback/deadline-max-timeout-dynamic.html.ini new file mode 100644 index 0000000..fa4203c3 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/requestidlecallback/deadline-max-timeout-dynamic.html.ini
@@ -0,0 +1,10 @@ +[deadline-max-timeout-dynamic.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 == "chrome": OK + [OK, TIMEOUT] + [Check that the deadline is changed if there is a new timeout from within requestIdleCallback.] + expected: + if product == "chrome": PASS + [FAIL, PASS]
diff --git a/third_party/blink/web_tests/external/wpt/scroll-animations/css/animation-events.html b/third_party/blink/web_tests/external/wpt/scroll-animations/css/animation-events.html new file mode 100644 index 0000000..be53af48 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/scroll-animations/css/animation-events.html
@@ -0,0 +1,87 @@ +<!DOCTYPE html> +<html id="top"> +<meta charset="utf-8"> +<title>View timeline animation events</title> +<link rel="help" href="https://drafts.csswg.org/scroll-animations-1/#events"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/web-animations/testcommon.js"></script> +<style type="text/css"> + @keyframes anim { + from { transform: translateX(0); } + to { transform: translateX(100px); } + } + #target { + background: green; + height: 100px; + width: 100px; + margin-bottom: 150vh; + animation-timeline: view(); + } + .animate { + animation: anim auto; + } +</style> +<body> + <div id="target"></div> +</body> +<script type="text/javascript"> + promise_test(async t => { + const target = document.getElementById('target'); + + // Create a timeline and advance to the next frame to ensure that the + // timeline has a value for currentTime. + await waitForNextFrame(); + const timeline = new ViewTimeline({ subject: target }); + await waitForNextFrame(); + + let animationstart_events = 0; + let animationend_events = 0; + document.addEventListener('animationstart', () => { + animationstart_events++; + }); + document.addEventListener('animationend', () => { + animationend_events++; + }); + + // Start the animation and swap out its timeline while still play-pending + // so that it already has a value for current time. + target.classList.add('animate'); + const anim = target.getAnimations(); + anim.timeline = timeline; + // Introduce a style change that will make the timeline state stale when + // "ticked" at the start of the next animation frame. + target.style = 'margin-top: 150vh'; + + assert_false(!!anim.startTime, + 'Start time deferred until timeline is updated'); + + // Verify that we are not evaluating a start time based on a stale timeline. + await waitForNextFrame(); + await waitForNextFrame(); + assert_equals(animationstart_events, 0, + 'Target initially off-screen and no animationstart event'); + assert_equals(animationend_events, 0, + 'Target initially off-screen and no animationend event'); + + const scroller = document.scrollingElement; + scroller.scrollTop = target.getBoundingClientRect().top; + await waitForNextFrame(); + await waitForNextFrame(); + + assert_equals(animationstart_events, 1, + 'scrollstart event received after scrolling into view.'); + assert_equals(animationend_events, 0, + "No scrollend event until after scrolling out of view"); + + scroller.scrollTop = target.getBoundingClientRect().bottom; + + await waitForNextFrame(); + await waitForNextFrame(); + + assert_equals(animationstart_events, 1, + 'No additional scrollstart event'); + assert_equals(animationend_events, 1, + 'scrollend event received after scrolling out of view'); + }, 'View timelime generates animationstart and animationend events'); +</script>
diff --git a/third_party/blink/web_tests/external/wpt/scroll-animations/css/pseudo-on-scroller.html.ini b/third_party/blink/web_tests/external/wpt/scroll-animations/css/pseudo-on-scroller.html.ini index ef9959c..07cbceb 100644 --- a/third_party/blink/web_tests/external/wpt/scroll-animations/css/pseudo-on-scroller.html.ini +++ b/third_party/blink/web_tests/external/wpt/scroll-animations/css/pseudo-on-scroller.html.ini
@@ -1,9 +1,10 @@ [pseudo-on-scroller.html] [scroll nearest on pseudo-element attaches to parent scroll container] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac11"): [FAIL, PASS] - if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): PASS + if (product == "content_shell") and (os == "mac") and (port == "mac13") and (virtual_suite == "threaded-prefer-compositing"): PASS + if (product == "content_shell") and (os == "mac") and (port == "mac13") and (virtual_suite == "threaded"): PASS + if (product == "content_shell") and (os == "mac") and (port == "mac13") and (virtual_suite == ""): [FAIL, PASS] if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): PASS - if (product == "content_shell") and (os == "mac") and (port == "mac13"): PASS + if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): PASS if product == "chrome": PASS FAIL
diff --git a/third_party/blink/web_tests/external/wpt/service-workers/service-worker/partitioned-claim.tentative.https.html.ini b/third_party/blink/web_tests/external/wpt/service-workers/service-worker/partitioned-claim.tentative.https.html.ini new file mode 100644 index 0000000..cb328a47 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/service-workers/service-worker/partitioned-claim.tentative.https.html.ini
@@ -0,0 +1,4 @@ +[partitioned-claim.tentative.https.html] + [ServiceWorker's clients.claim() is partitioned] + expected: + if (product == "content_shell") and (virtual_suite == "third-party-storage-partitioning") and (os == "mac") and (port == "mac12-arm64"): [FAIL, PASS]
diff --git a/third_party/blink/web_tests/external/wpt/service-workers/service-worker/partitioned-getRegistrations.tentative.https.html.ini b/third_party/blink/web_tests/external/wpt/service-workers/service-worker/partitioned-getRegistrations.tentative.https.html.ini new file mode 100644 index 0000000..4f279c5 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/service-workers/service-worker/partitioned-getRegistrations.tentative.https.html.ini
@@ -0,0 +1,4 @@ +[partitioned-getRegistrations.tentative.https.html] + [ServiceWorker's getRegistrations() is partitioned] + expected: + if (product == "content_shell") and (os == "win") and (virtual_suite == "third-party-storage-partitioning") and (port == "win11"): [FAIL, PASS]
diff --git a/third_party/blink/web_tests/external/wpt/speculation-rules/prefetch/different-initiators-2.https.html.ini b/third_party/blink/web_tests/external/wpt/speculation-rules/prefetch/different-initiators-2.https.html.ini new file mode 100644 index 0000000..3849f492 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/speculation-rules/prefetch/different-initiators-2.https.html.ini
@@ -0,0 +1,5 @@ +[different-initiators-2.https.html] + [Prefetches from different initiator Documents with same RenderFrameHost] + expected: + if product == "chrome": PASS + [FAIL, PASS]
diff --git a/third_party/blink/web_tests/external/wpt/speculation-rules/prefetch/initiators-a-element.sub.https.html.ini b/third_party/blink/web_tests/external/wpt/speculation-rules/prefetch/initiators-a-element.sub.https.html.ini new file mode 100644 index 0000000..029f900d --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/speculation-rules/prefetch/initiators-a-element.sub.https.html.ini
@@ -0,0 +1,12 @@ +[initiators-a-element.sub.https.html?cross-site] + [<a target="blank">] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + +[initiators-a-element.sub.https.html?same-site] + [<a target="blank">] + expected: + if product == "chrome": PASS + [FAIL, PASS]
diff --git a/third_party/blink/web_tests/external/wpt/speculation-rules/prefetch/initiators-window-open.sub.https.html.ini b/third_party/blink/web_tests/external/wpt/speculation-rules/prefetch/initiators-window-open.sub.https.html.ini new file mode 100644 index 0000000..2bfc4373 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/speculation-rules/prefetch/initiators-window-open.sub.https.html.ini
@@ -0,0 +1,22 @@ +[initiators-window-open.sub.https.html?cross-site] + [window.open()] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [window.open(noopener)] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + +[initiators-window-open.sub.https.html?same-site] + [window.open()] + expected: + if product == "chrome": PASS + [FAIL, PASS] + + [window.open(noopener)] + expected: + if product == "chrome": PASS + [FAIL, PASS]
diff --git a/third_party/blink/web_tests/external/wpt/speculation-rules/prefetch/no-vary-search/prefetch-single-with-hint.https.html.ini b/third_party/blink/web_tests/external/wpt/speculation-rules/prefetch/no-vary-search/prefetch-single-with-hint.https.html.ini new file mode 100644 index 0000000..040bf12 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/speculation-rules/prefetch/no-vary-search/prefetch-single-with-hint.https.html.ini
@@ -0,0 +1,37 @@ +[prefetch-single-with-hint.https.html?1-1] + [Use in-flight prefetch as query parameter b has the same value.] + expected: + if product == "chrome": PASS + [PASS, FAIL] + + +[prefetch-single-with-hint.https.html?10-10] + [Use in-flight prefetch as all query parameters except c can be ignored. Only the last except matters.] + expected: + if product == "chrome": PASS + [PASS, FAIL] + + +[prefetch-single-with-hint.https.html?12-12] + [Use in-flight prefetch as even though all query parameters except c and d can be ignored, c value matches and d value matches.] + expected: + if (product == "content_shell") and (os == "linux"): PASS + if product == "chrome": PASS + [PASS, FAIL] + + +[prefetch-single-with-hint.https.html?21-21] + [Use the in-flight prefetch. Invalid No-Vary-Search means default URL variance. The prefetched and the navigated URLs have to be the same.] + expected: + if (product == "content_shell") and (os == "linux") and (virtual_suite == "prefetch-no-vary-search") and (flag_specific == "disable-site-isolation-trials"): [PASS, FAIL] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "prefetch-no-vary-search") and (flag_specific == ""): [PASS, FAIL] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "prefetch") and (flag_specific == "disable-site-isolation-trials"): [PASS, FAIL] + if (product == "content_shell") and (os == "linux") and (virtual_suite == "prefetch") and (flag_specific == ""): [PASS, FAIL] + + +[prefetch-single-with-hint.https.html?7-7] + [Use in-flight prefetch as the URLs have the same values for all keys, only differing by order and using ?1 for specifying a true value.] + expected: + if (product == "content_shell") and (os == "linux"): PASS + if product == "chrome": PASS + [PASS, FAIL]
diff --git a/third_party/blink/web_tests/external/wpt/speculation-rules/prefetch/no-vary-search/prefetch-single.https.html.ini b/third_party/blink/web_tests/external/wpt/speculation-rules/prefetch/no-vary-search/prefetch-single.https.html.ini new file mode 100644 index 0000000..4df542f --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/speculation-rules/prefetch/no-vary-search/prefetch-single.https.html.ini
@@ -0,0 +1,22 @@ +[prefetch-single.https.html?21-21] + [Use prefetched response as the URLs have the values in different order for a. Allow extension via parameters.] + expected: + if (product == "content_shell") and (os == "linux"): PASS + if product == "chrome": PASS + [PASS, FAIL] + + +[prefetch-single.https.html?3-3] + [Use prefetched response as the URLs do not vary by a and b.] + expected: + if (product == "content_shell") and (os == "linux"): PASS + if product == "chrome": PASS + [PASS, FAIL] + + +[prefetch-single.https.html?9-9] + [Use prefetched response as the URLs have the same values for a.] + expected: + if (product == "content_shell") and (os == "linux"): PASS + if product == "chrome": PASS + [PASS, FAIL]
diff --git a/third_party/blink/web_tests/external/wpt/storage/partitioned-estimate-usage-details-caches.tentative.https.sub.html.ini b/third_party/blink/web_tests/external/wpt/storage/partitioned-estimate-usage-details-caches.tentative.https.sub.html.ini new file mode 100644 index 0000000..697d70a9 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/storage/partitioned-estimate-usage-details-caches.tentative.https.sub.html.ini
@@ -0,0 +1,4 @@ +[partitioned-estimate-usage-details-caches.tentative.https.sub.html] + [Partitioned estimate() usage details for caches test.] + expected: + if (product == "content_shell") and (virtual_suite == "third-party-storage-partitioning") and (os == "mac") and (port == "mac12-arm64"): [FAIL, PASS]
diff --git a/third_party/blink/web_tests/external/wpt/wasm/serialization/module/window-domain-success.sub.html.ini b/third_party/blink/web_tests/external/wpt/wasm/serialization/module/window-domain-success.sub.html.ini new file mode 100644 index 0000000..aca03653 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/wasm/serialization/module/window-domain-success.sub.html.ini
@@ -0,0 +1,2 @@ +[window-domain-success.sub.html] + expected: TIMEOUT
diff --git a/third_party/blink/web_tests/external/wpt/wasm/serialization/module/window-similar-but-cross-origin-success.sub.html.ini b/third_party/blink/web_tests/external/wpt/wasm/serialization/module/window-similar-but-cross-origin-success.sub.html.ini new file mode 100644 index 0000000..3035262f --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/wasm/serialization/module/window-similar-but-cross-origin-success.sub.html.ini
@@ -0,0 +1,2 @@ +[window-similar-but-cross-origin-success.sub.html] + expected: TIMEOUT
diff --git a/third_party/blink/web_tests/external/wpt/webcodecs/reconfiguring-encoder.https.any.js.ini b/third_party/blink/web_tests/external/wpt/webcodecs/reconfiguring-encoder.https.any.js.ini index 41b9cc2..4c0540c 100644 --- a/third_party/blink/web_tests/external/wpt/webcodecs/reconfiguring-encoder.https.any.js.ini +++ b/third_party/blink/web_tests/external/wpt/webcodecs/reconfiguring-encoder.https.any.js.ini
@@ -4,16 +4,18 @@ [reconfiguring-encoder.https.any.html?h264_annexb] expected: + if (product == "content_shell") and (os == "mac") and (port == "mac12") and (virtual_suite == "webcodecs-without-task-runner-with-custom-deleter"): ERROR + if (product == "content_shell") and (os == "mac") and (port == "mac12") and (virtual_suite == ""): [OK, ERROR] + if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): ERROR if (product == "content_shell") and (os == "mac") and (port == "mac13"): ERROR if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): ERROR - if (product == "content_shell") and (os == "mac") and (port == "mac12"): ERROR - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): ERROR [Reconfiguring encoder] expected: - if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL - if (product == "content_shell") and (os == "mac") and (port == "mac13"): FAIL - if (product == "content_shell") and (os == "mac") and (port == "mac12"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12") and (virtual_suite == "webcodecs-without-task-runner-with-custom-deleter"): FAIL + if (product == "content_shell") and (os == "mac") and (port == "mac12") and (virtual_suite == ""): [PRECONDITION_FAILED, FAIL] 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 PRECONDITION_FAILED
diff --git a/third_party/blink/web_tests/external/wpt/webrtc-encoded-transform/RTCPeerConnection-insertable-streams-simulcast.https.html.ini b/third_party/blink/web_tests/external/wpt/webrtc-encoded-transform/RTCPeerConnection-insertable-streams-simulcast.https.html.ini index 7975537..2c8a0a4d 100644 --- a/third_party/blink/web_tests/external/wpt/webrtc-encoded-transform/RTCPeerConnection-insertable-streams-simulcast.https.html.ini +++ b/third_party/blink/web_tests/external/wpt/webrtc-encoded-transform/RTCPeerConnection-insertable-streams-simulcast.https.html.ini
@@ -2,3 +2,4 @@ expected: if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): TIMEOUT if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): TIMEOUT + if (product == "content_shell") and (os == "mac") and (port == "mac12"): [TIMEOUT, OK]
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 fbc4aab..6029335 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,155 +1,33 @@ [xr_viewport_scale.https.html] expected: if (product == "content_shell") and (os == "mac") and (port == "mac12"): TIMEOUT + 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 == "chrome") and debug: TIMEOUT - if (product == "chrome") and not debug: [TIMEOUT, OK] + if (product == "chrome") and not debug: TIMEOUT [recommendedViewportScale 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 == "chrome") and not debug: [PRECONDITION_FAILED, TIMEOUT] - PRECONDITION_FAILED + expected: PRECONDITION_FAILED [recommendedViewportScale 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 == "chrome") and debug: TIMEOUT - if (product == "chrome") and not debug: [TIMEOUT, NOTRUN, PRECONDITION_FAILED] + if (product == "chrome") and not debug: TIMEOUT PRECONDITION_FAILED [recommendedViewportScale for inline session - webgl] - expected: - if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL - PRECONDITION_FAILED + expected: 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 - PRECONDITION_FAILED - - [requestViewportScale applied next frame 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 - - [requestViewportScale applied next frame for immersive-vr session - webgl2] - expected: - if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL + expected: PRECONDITION_FAILED [requestViewportScale applied next frame for inline session - webgl] - expected: - if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL - PRECONDITION_FAILED + expected: 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 - PRECONDITION_FAILED - - [requestViewportScale same frame 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 - - [requestViewportScale same frame 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 + expected: PRECONDITION_FAILED [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 - PRECONDITION_FAILED + expected: 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 - 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 - - [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 - - [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 - - [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 - - [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 - - [requestViewportScale valid viewport w/ null scale for immersive-vr session - webgl2] - expected: - if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL - - [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 - - [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 - - [requestViewportScale valid viewport w/ undefined 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 - - [requestViewportScale valid viewport w/ undefined scale for immersive-vr session - webgl2] - expected: - if (product == "content_shell") and (os == "mac") and (port == "mac12-arm64"): FAIL - if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): FAIL - - [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 - - [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 - - [requestViewportScale valid viewport w/ very small 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 - - [requestViewportScale valid viewport w/ very small scale 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 - - [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 - - [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 + expected: PRECONDITION_FAILED
diff --git a/third_party/blink/web_tests/fast/canvas/canvas-lost-gpu-context.html b/third_party/blink/web_tests/fast/canvas/canvas-lost-gpu-context.html index d3d26b0..4d308433 100644 --- a/third_party/blink/web_tests/fast/canvas/canvas-lost-gpu-context.html +++ b/third_party/blink/web_tests/fast/canvas/canvas-lost-gpu-context.html
@@ -7,18 +7,16 @@ </head> <body> <script> -var lostEventHasFired = false; -var contextLostTest; async_test(function(t) { if (window.internals) { const canvas = document.createElement('canvas'); const ctx = canvas.getContext('2d'); canvas.addEventListener('contextlost', () => { - contextLost(lostEventHasFired, ctx); + contextLost(ctx); }); canvas.addEventListener('contextrestored', () => { - contextRestored(lostEventHasFired, ctx); + contextRestored(ctx); }); document.body.appendChild(ctx.canvas);
diff --git a/third_party/blink/web_tests/fast/canvas/canvas-oncontextlost.html b/third_party/blink/web_tests/fast/canvas/canvas-oncontextlost.html index dd55f83..46fdd0a 100644 --- a/third_party/blink/web_tests/fast/canvas/canvas-oncontextlost.html +++ b/third_party/blink/web_tests/fast/canvas/canvas-oncontextlost.html
@@ -8,18 +8,15 @@ <body> <script> -let lostEventHasFired = false; - async_test(function(t) { - var contextLostTest; if (window.internals) { const canvas = document.createElement('canvas'); const ctx = canvas.getContext('2d'); canvas.oncontextlost = () => { - contextLost(lostEventHasFired, ctx); + contextLost(ctx); }; canvas.oncontextrestored = () => { - contextRestored(lostEventHasFired, ctx); + contextRestored(ctx); }; document.body.appendChild(ctx.canvas);
diff --git a/third_party/blink/web_tests/fast/canvas/offscreencanvas-lost-gpu-context.html b/third_party/blink/web_tests/fast/canvas/offscreencanvas-lost-gpu-context.html index e35726f..6c9259a 100644 --- a/third_party/blink/web_tests/fast/canvas/offscreencanvas-lost-gpu-context.html +++ b/third_party/blink/web_tests/fast/canvas/offscreencanvas-lost-gpu-context.html
@@ -7,18 +7,16 @@ </head> <body> <script> -var lostEventHasFired = false; -var contextLostTest; async_test(t => { if (window.internals) { try { const canvas = new OffscreenCanvas(500, 500); const ctx = canvas.getContext('2d'); canvas.addEventListener('contextlost', () => { - contextLost(lostEventHasFired, ctx); + contextLost(ctx); }); canvas.addEventListener('contextrestored', () => { - contextRestored(lostEventHasFired, ctx); + contextRestored(ctx); }); ctx.fillRect(0, 0, 1, 1);
diff --git a/third_party/blink/web_tests/fast/canvas/offscreencanvas-oncontextlost.html b/third_party/blink/web_tests/fast/canvas/offscreencanvas-oncontextlost.html index 938a9ff..d1ae9ff 100644 --- a/third_party/blink/web_tests/fast/canvas/offscreencanvas-oncontextlost.html +++ b/third_party/blink/web_tests/fast/canvas/offscreencanvas-oncontextlost.html
@@ -7,17 +7,15 @@ </head> <body> <script> -var lostEventHasFired = false; -var contextLostTest; async_test(t => { if (window.internals) { const canvas = new OffscreenCanvas(500, 500); const ctx = canvas.getContext('2d'); canvas.oncontextlost = () => { - contextLost(lostEventHasFired, ctx); + contextLost(ctx); }; canvas.oncontextrestored = () => { - contextRestored(lostEventHasFired, ctx); + contextRestored(ctx); }; ctx.fillRect(0, 0, 1, 1);
diff --git a/third_party/blink/web_tests/fast/canvas/resources/canvas-context-lost-events.js b/third_party/blink/web_tests/fast/canvas/resources/canvas-context-lost-events.js index b67788e..b5033df 100644 --- a/third_party/blink/web_tests/fast/canvas/resources/canvas-context-lost-events.js +++ b/third_party/blink/web_tests/fast/canvas/resources/canvas-context-lost-events.js
@@ -8,7 +8,7 @@ // Verify context loss experimentally as well as contextLost ctx.fillStyle = '#0f0'; ctx.fillRect(0, 0, 1, 1); - contextLostTest = ctx.getImageData(0, 0, 1, 1).data[1] == 0; + const contextLostTest = ctx.getImageData(0, 0, 1, 1).data[1] == 0; if (shouldBeLost) { assert_true(contextLostTest); assert_true(ctx.isContextLost()); @@ -18,13 +18,15 @@ } } -function contextLost(lostEventHasFired, ctx) { +var lostEventHasFired = false; + +function contextLost(ctx) { assert_false(lostEventHasFired, 'Graphics context lost event dispatched more than once.'); lostEventHasFired = true; verifyContextLost(true, ctx); } -function contextRestored(lostEventHasFired, ctx) { +function contextRestored(ctx) { assert_true(lostEventHasFired, 'Context restored event dispatched after context lost.'); verifyContextLost(false, ctx); }
diff --git a/third_party/blink/web_tests/fast/forms/range/slider-appearance-crash-expected.txt b/third_party/blink/web_tests/fast/forms/range/slider-appearance-crash-expected.txt index 67c7060b..953cb39 100644 --- a/third_party/blink/web_tests/fast/forms/range/slider-appearance-crash-expected.txt +++ b/third_party/blink/web_tests/fast/forms/range/slider-appearance-crash-expected.txt
@@ -1 +1,2 @@ +CONSOLE WARNING: The keyword 'slider-horizontal' specified to an 'appearance' property is deprecated. Please consider updating. Checks that slider appearance on regular node doesn't crash.
diff --git a/third_party/blink/web_tests/fast/forms/range/thumbslider-crash-expected.txt b/third_party/blink/web_tests/fast/forms/range/thumbslider-crash-expected.txt index 544f49a..bd03bd9 100644 --- a/third_party/blink/web_tests/fast/forms/range/thumbslider-crash-expected.txt +++ b/third_party/blink/web_tests/fast/forms/range/thumbslider-crash-expected.txt
@@ -1 +1,2 @@ +CONSOLE WARNING: The keyword 'sliderthumb-horizontal' specified to an 'appearance' property is deprecated. Please consider updating. PASS If this test does not crash. http://bugs.webkit.org/show_bug.cgi?id=12045
diff --git a/third_party/blink/web_tests/fast/forms/range/thumbslider-no-parent-slider-expected.txt b/third_party/blink/web_tests/fast/forms/range/thumbslider-no-parent-slider-expected.txt new file mode 100644 index 0000000..94fd37c --- /dev/null +++ b/third_party/blink/web_tests/fast/forms/range/thumbslider-no-parent-slider-expected.txt
@@ -0,0 +1,2 @@ +CONSOLE WARNING: The keyword 'sliderthumb-horizontal' specified to an 'appearance' property is deprecated. Please consider updating. +CONSOLE WARNING: The keyword 'sliderthumb-vertical' specified to an 'appearance' property is deprecated. Please consider updating.
diff --git a/third_party/blink/web_tests/fast/table/crash-split-table-section-no-cell-recalc-expected.txt b/third_party/blink/web_tests/fast/table/crash-split-table-section-no-cell-recalc-expected.txt index 28c998b2..39cf0e95 100644 --- a/third_party/blink/web_tests/fast/table/crash-split-table-section-no-cell-recalc-expected.txt +++ b/third_party/blink/web_tests/fast/table/crash-split-table-section-no-cell-recalc-expected.txt
@@ -1,2 +1,3 @@ +CONSOLE WARNING: The keyword 'sliderthumb-vertical' specified to an 'appearance' property is deprecated. Please consider updating. 94291: Crash in LayoutTableSection::setCellLogicalWidths This test has PASSED as it didn't CRASH or ASSERT.
diff --git a/third_party/blink/web_tests/inspector-protocol/css/css-shadow-root-no-computed-style-expected.txt b/third_party/blink/web_tests/inspector-protocol/css/css-shadow-root-no-computed-style-expected.txt new file mode 100644 index 0000000..fc86769e --- /dev/null +++ b/third_party/blink/web_tests/inspector-protocol/css/css-shadow-root-no-computed-style-expected.txt
@@ -0,0 +1,3 @@ +Tests that the shadow root itself has no computed style and there is no DCHECK failure +Node is not an element and does not have a parent element +
diff --git a/third_party/blink/web_tests/inspector-protocol/css/css-shadow-root-no-computed-style.js b/third_party/blink/web_tests/inspector-protocol/css/css-shadow-root-no-computed-style.js new file mode 100644 index 0000000..37472b1e --- /dev/null +++ b/third_party/blink/web_tests/inspector-protocol/css/css-shadow-root-no-computed-style.js
@@ -0,0 +1,25 @@ +(async function(testRunner) { + var {page, session, dp} = await testRunner.startHTML( + `<div id='shadow-host'></div>`, + 'Tests that the shadow root itself has no computed style and there is no DCHECK failure'); + + await session.evaluate(() => { + var host = document.querySelector('#shadow-host').attachShadow({mode: 'open'}); + host.appendChild(document.createElement("div")); + }); + + var CSSHelper = await testRunner.loadScript('../resources/css-helper.js'); + var cssHelper = new CSSHelper(testRunner, dp); + + await dp.DOM.enable(); + await dp.CSS.enable(); + var documentNodeId = await cssHelper.requestDocumentNodeId(); + var shadowHostId = await cssHelper.requestNodeId(documentNodeId, '#shadow-host'); + const shadowHostResp = await dp.DOM.describeNode({nodeId: shadowHostId, pierce: true, depth: -1}); + const shadowRootBackendId = shadowHostResp.result.node.shadowRoots[0].backendNodeId; + const shadowRootIdResp = await dp.DOM.pushNodesByBackendIdsToFrontend({backendNodeIds: [shadowRootBackendId]}); + const shadowRootId = shadowRootIdResp.result.nodeIds[0]; + var matchedStyles = await dp.CSS.getComputedStyleForNode({'nodeId': shadowRootId}); + testRunner.log(matchedStyles.error.message); + testRunner.completeTest(); +})
diff --git a/third_party/blink/web_tests/media/controls-slider-appearance-crash-expected.txt b/third_party/blink/web_tests/media/controls-slider-appearance-crash-expected.txt index d101c50..a89ea955 100644 --- a/third_party/blink/web_tests/media/controls-slider-appearance-crash-expected.txt +++ b/third_party/blink/web_tests/media/controls-slider-appearance-crash-expected.txt
@@ -1,3 +1,5 @@ +CONSOLE WARNING: The keyword 'media-sliderthumb' specified to an 'appearance' property is deprecated. Please consider updating. +CONSOLE WARNING: The keyword 'media-volume-sliderthumb' specified to an 'appearance' property is deprecated. Please consider updating. This test ensures that applying media control slider thumb appearance to pseudo-elements does not cause a crash. On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
diff --git a/third_party/blink/web_tests/virtual/text-antialias/whitespace/pre-block-normal-inline-crash-2-expected.txt b/third_party/blink/web_tests/virtual/text-antialias/whitespace/pre-block-normal-inline-crash-2-expected.txt index 97296481..e128909 100644 --- a/third_party/blink/web_tests/virtual/text-antialias/whitespace/pre-block-normal-inline-crash-2-expected.txt +++ b/third_party/blink/web_tests/virtual/text-antialias/whitespace/pre-block-normal-inline-crash-2-expected.txt
@@ -1 +1,2 @@ +CONSOLE WARNING: The keyword 'sliderthumb-vertical' specified to an 'appearance' property is deprecated. Please consider updating. This test passes if it does not CRASH.
diff --git a/third_party/blink/web_tests/wpt_internal/direct-sockets/enabled-on-self-origin-by-permissions-policy.https.sub.html.ini b/third_party/blink/web_tests/wpt_internal/direct-sockets/enabled-on-self-origin-by-permissions-policy.https.sub.html.ini new file mode 100644 index 0000000..517d2ab2 --- /dev/null +++ b/third_party/blink/web_tests/wpt_internal/direct-sockets/enabled-on-self-origin-by-permissions-policy.https.sub.html.ini
@@ -0,0 +1,8 @@ +[enabled-on-self-origin-by-permissions-policy.https.sub.html] + [direct sockets (TCP) do not get blocked on permissions policy direct-sockets=(self)] + expected: + if (product == "content_shell") and (os == "linux") and (flag_specific == "disable-site-isolation-trials"): [FAIL, PASS] + + [direct sockets (UDP) do not get blocked on permissions policy direct-sockets=(self)] + expected: + if (product == "content_shell") and (os == "linux") and (flag_specific == "disable-site-isolation-trials"): [FAIL, PASS]
diff --git a/third_party/blink/web_tests/wpt_internal/fenced_frame/unfenced-top.https.html.ini b/third_party/blink/web_tests/wpt_internal/fenced_frame/unfenced-top.https.html.ini index b5efb09..3a5f88ed 100644 --- a/third_party/blink/web_tests/wpt_internal/fenced_frame/unfenced-top.https.html.ini +++ b/third_party/blink/web_tests/wpt_internal/fenced_frame/unfenced-top.https.html.ini
@@ -1,32 +1,72 @@ [unfenced-top.https.html] + expected: + if (product == "content_shell") and (os == "win") and (port == "win11"): [OK, CRASH] [_unfencedTop :blob URL failure] expected: + if (product == "content_shell") and (os == "win") and (port == "win10.20h2"): PASS + if (product == "content_shell") and (os == "mac") and (port == "mac10.15"): PASS + if (product == "content_shell") and (os == "linux") and (flag_specific == "disable-site-isolation-trials"): PASS if product == "chrome": FAIL + [PASS, FAIL] [_unfencedTop :javascript URL failure] expected: + if (product == "content_shell") and (os == "win") and (port == "win10.20h2"): PASS + if (product == "content_shell") and (os == "mac") and (port == "mac10.15"): PASS + if (product == "content_shell") and (os == "linux") and (flag_specific == "disable-site-isolation-trials"): PASS if product == "chrome": FAIL + [PASS, FAIL] [_unfencedTop fragment navigation] expected: + if (product == "content_shell") and (os == "win") and (port == "win10.20h2"): PASS + if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac13"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac12"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac10.15"): PASS + if (product == "content_shell") and (os == "linux") and (flag_specific == "disable-site-isolation-trials"): PASS if product == "chrome": FAIL + [PASS, FAIL] [_unfencedTop in default fenced frame] expected: + if (product == "content_shell") and (os == "win") and (port == "win10.20h2"): PASS + if (product == "content_shell") and (os == "mac") and (port == "mac10.15"): PASS + if (product == "content_shell") and (os == "linux") and (flag_specific == "disable-site-isolation-trials"): PASS if product == "chrome": FAIL + [PASS, FAIL] [_unfencedTop in opaque-ads -> default fenced frame] expected: + if (product == "content_shell") and (os == "win") and (port == "win10.20h2"): PASS + if (product == "content_shell") and (os == "mac") and (port == "mac10.15"): PASS + if (product == "content_shell") and (os == "linux") and (flag_specific == "disable-site-isolation-trials"): PASS if product == "chrome": FAIL + [PASS, FAIL] [_unfencedTop opaque-ads nested iframe success case] expected: + if (product == "content_shell") and (os == "win") and (port == "win10.20h2"): PASS + if (product == "content_shell") and (os == "mac") and (port == "mac10.15"): PASS + if (product == "content_shell") and (os == "linux") and (flag_specific == "disable-site-isolation-trials"): PASS if product == "chrome": FAIL + [PASS, FAIL] [_unfencedTop opaque-ads non-refresh success case] expected: + if (product == "content_shell") and (os == "win") and (port == "win10.20h2"): PASS + if (product == "content_shell") and (os == "mac") and (port == "mac13-arm64"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac11"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac10.15"): PASS + if (product == "content_shell") and (os == "linux") and (flag_specific == "disable-site-isolation-trials"): PASS if product == "chrome": FAIL + [PASS, FAIL] [_unfencedTop opaque-ads refresh success case] expected: + if (product == "content_shell") and (os == "win") and (port == "win10.20h2"): PASS + if (product == "content_shell") and (os == "mac") and (port == "mac13"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac10.15"): PASS + if (product == "content_shell") and (os == "linux") and (flag_specific == "disable-site-isolation-trials"): PASS if product == "chrome": FAIL + [PASS, FAIL]
diff --git a/third_party/blink/web_tests/wpt_internal/html/interaction/focus/the-autofocus-attribute/object-fallback.html.ini b/third_party/blink/web_tests/wpt_internal/html/interaction/focus/the-autofocus-attribute/object-fallback.html.ini index 7c23b39..6aee3a8 100644 --- a/third_party/blink/web_tests/wpt_internal/html/interaction/focus/the-autofocus-attribute/object-fallback.html.ini +++ b/third_party/blink/web_tests/wpt_internal/html/interaction/focus/the-autofocus-attribute/object-fallback.html.ini
@@ -1,15 +1,27 @@ [object-fallback.html] + expected: + if (product == "content_shell") and (os == "win") and (port == "win10.20h2"): [TIMEOUT, OK] [An autofocus element in an OBJECT with a load-failed frame should be processed] - expected: FAIL + expected: + if (product == "content_shell") and (os == "win") and (port == "win10.20h2"): [PASS, FAIL] + FAIL [An autofocus element in an OBJECT with a load-failed image should be processed] - expected: FAIL + expected: + if (product == "content_shell") and (os == "win") and (port == "win10.20h2"): [PASS, FAIL] + FAIL [An autofocus element in an OBJECT with a loaded frame should not be processed] - expected: FAIL + expected: + if (product == "content_shell") and (os == "win") and (port == "win10.20h2"): [PASS, FAIL] + FAIL [An autofocus element in an OBJECT with a loaded image should not be processed] - expected: FAIL + expected: + if (product == "content_shell") and (os == "win") and (port == "win10.20h2"): [PASS, FAIL] + FAIL [An autofocus element in nested OBJECTs with load-failed images should be processed] - expected: FAIL + expected: + if (product == "content_shell") and (os == "win") and (port == "win10.20h2"): [PASS, FAIL] + FAIL
diff --git a/third_party/blink/web_tests/wpt_internal/in-order-script-scheduling/force-in-order/async-script.html.ini b/third_party/blink/web_tests/wpt_internal/in-order-script-scheduling/force-in-order/async-script.html.ini new file mode 100644 index 0000000..ec58b9c --- /dev/null +++ b/third_party/blink/web_tests/wpt_internal/in-order-script-scheduling/force-in-order/async-script.html.ini
@@ -0,0 +1,4 @@ +[async-script.html?default] + [InOrder Script Execution Order] + expected: + if (product == "content_shell") and (os == "win") and (virtual_suite == "force-in-order-script") and (port == "win10.20h2"): [FAIL, PASS]
diff --git a/third_party/blink/web_tests/wpt_internal/in-order-script-scheduling/force-in-order/no-parser-blocking.html.ini b/third_party/blink/web_tests/wpt_internal/in-order-script-scheduling/force-in-order/no-parser-blocking.html.ini new file mode 100644 index 0000000..91ee36c --- /dev/null +++ b/third_party/blink/web_tests/wpt_internal/in-order-script-scheduling/force-in-order/no-parser-blocking.html.ini
@@ -0,0 +1,4 @@ +[no-parser-blocking.html] + [InOrder Script Execution Order] + expected: + if (product == "content_shell") and (virtual_suite == "force-in-order-script") and (os == "mac") and (port == "mac13-arm64"): [FAIL, PASS]
diff --git a/third_party/blink/web_tests/wpt_internal/portals/portals-crbug-1041406.html.ini b/third_party/blink/web_tests/wpt_internal/portals/portals-crbug-1041406.html.ini new file mode 100644 index 0000000..341bffbec --- /dev/null +++ b/third_party/blink/web_tests/wpt_internal/portals/portals-crbug-1041406.html.ini
@@ -0,0 +1,4 @@ +[portals-crbug-1041406.html] + expected: + if product == "chrome": OK + [TIMEOUT, OK]
diff --git a/third_party/blink/web_tests/wpt_internal/storage/quota/partitioned-webkitPersistentStorage-quota-usage-details.tentative.sub.html.ini b/third_party/blink/web_tests/wpt_internal/storage/quota/partitioned-webkitPersistentStorage-quota-usage-details.tentative.sub.html.ini new file mode 100644 index 0000000..b0b91424 --- /dev/null +++ b/third_party/blink/web_tests/wpt_internal/storage/quota/partitioned-webkitPersistentStorage-quota-usage-details.tentative.sub.html.ini
@@ -0,0 +1,4 @@ +[partitioned-webkitPersistentStorage-quota-usage-details.tentative.sub.html] + [Partitioned webkitPersistentStorage quota and usage details test.] + expected: + if (product == "content_shell") and (os == "win") and (virtual_suite == "third-party-storage-partitioning") and (port == "win11"): [FAIL, PASS]
diff --git a/third_party/blink/web_tests/wpt_internal/view-transition-on-navigation/at-rule-opt-in-cross-document-same-origin.html.ini b/third_party/blink/web_tests/wpt_internal/view-transition-on-navigation/at-rule-opt-in-cross-document-same-origin.html.ini new file mode 100644 index 0000000..93a470e3 --- /dev/null +++ b/third_party/blink/web_tests/wpt_internal/view-transition-on-navigation/at-rule-opt-in-cross-document-same-origin.html.ini
@@ -0,0 +1,7 @@ +[at-rule-opt-in-cross-document-same-origin.html] + expected: + if (product == "content_shell") and (os == "mac") and (port == "mac13"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac12"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac11"): [FAIL, PASS] + if (product == "content_shell") and (os == "mac") and (port == "mac10.15"): [FAIL, PASS] + if (product == "content_shell") and (os == "linux") and (flag_specific == "highdpi"): FAIL
diff --git a/third_party/blink/web_tests/wpt_internal/view-transition-on-navigation/root-and-nested-element-transition.html.ini b/third_party/blink/web_tests/wpt_internal/view-transition-on-navigation/root-and-nested-element-transition.html.ini new file mode 100644 index 0000000..dcb9e389d --- /dev/null +++ b/third_party/blink/web_tests/wpt_internal/view-transition-on-navigation/root-and-nested-element-transition.html.ini
@@ -0,0 +1,3 @@ +[root-and-nested-element-transition.html] + expected: + if (product == "content_shell") and (os == "mac") and (port == "mac13"): [FAIL, PASS]
diff --git a/third_party/blink/web_tests/wpt_internal/view-transition/rtl-vertical-scrollbar.html.ini b/third_party/blink/web_tests/wpt_internal/view-transition/rtl-vertical-scrollbar.html.ini new file mode 100644 index 0000000..e3b7b23 --- /dev/null +++ b/third_party/blink/web_tests/wpt_internal/view-transition/rtl-vertical-scrollbar.html.ini
@@ -0,0 +1,4 @@ +[rtl-vertical-scrollbar.html] + expected: + if (product == "content_shell") and (os == "linux") and (flag_specific == "") and (virtual_suite == "view-transition-mpa-serialization"): [PASS, FAIL] + if (product == "content_shell") and (os == "linux") and (flag_specific == "") and (virtual_suite == "view-transition"): [PASS, FAIL]
diff --git a/third_party/blink/web_tests/wpt_internal/webstorage/storage-deprecation-trial-enabled-local.sub.https.html.ini b/third_party/blink/web_tests/wpt_internal/webstorage/storage-deprecation-trial-enabled-local.sub.https.html.ini new file mode 100644 index 0000000..2f99591 --- /dev/null +++ b/third_party/blink/web_tests/wpt_internal/webstorage/storage-deprecation-trial-enabled-local.sub.https.html.ini
@@ -0,0 +1,4 @@ +[storage-deprecation-trial-enabled-local.sub.https.html] + [Test for Local Storage with DisableThirdPartySessionStoragePartitioningAfterGeneralPartitioning enabled] + expected: + if (product == "content_shell") and (virtual_suite == "third-party-storage-partitioning") and (os == "mac") and (port == "mac12-arm64"): [FAIL, PASS]
diff --git a/third_party/catapult b/third_party/catapult index 69c1922..47ca282 160000 --- a/third_party/catapult +++ b/third_party/catapult
@@ -1 +1 @@ -Subproject commit 69c19224a71dddb0fd47899947ca4c50ed000da8 +Subproject commit 47ca2824260532b624f9b3c6afa4d538870ecc47
diff --git a/third_party/chromium-variations b/third_party/chromium-variations index a4b56f7..c77d658 160000 --- a/third_party/chromium-variations +++ b/third_party/chromium-variations
@@ -1 +1 @@ -Subproject commit a4b56f7af2b0959c36f9da4f8ab35dd7bb05cc71 +Subproject commit c77d65814a897738e9b99ff9b7baa8973abe1d57
diff --git a/third_party/depot_tools b/third_party/depot_tools index b9d7c85..abf4847 160000 --- a/third_party/depot_tools +++ b/third_party/depot_tools
@@ -1 +1 @@ -Subproject commit b9d7c8558207b5cbe5bc7fa41a0f46832cc35d6a +Subproject commit abf4847b0412cac3617c231af35f998eb9141748
diff --git a/third_party/devtools-frontend-internal b/third_party/devtools-frontend-internal index 698aeff..e36123c 160000 --- a/third_party/devtools-frontend-internal +++ b/third_party/devtools-frontend-internal
@@ -1 +1 @@ -Subproject commit 698aeffe4942c5018875c07800e939a3cac87c27 +Subproject commit e36123ccdb7d601e4708ef8bb2a490186de1e695
diff --git a/third_party/devtools-frontend/src b/third_party/devtools-frontend/src index f5943cd8..08177f7 160000 --- a/third_party/devtools-frontend/src +++ b/third_party/devtools-frontend/src
@@ -1 +1 @@ -Subproject commit f5943cd8a7ae161fbec5be57e76aa8fc37a69e76 +Subproject commit 08177f7681df01be5548ef82313096d7587b5801
diff --git a/third_party/wpt_tools/README.chromium b/third_party/wpt_tools/README.chromium index 12260bb..a9f5a58 100644 --- a/third_party/wpt_tools/README.chromium +++ b/third_party/wpt_tools/README.chromium
@@ -1,7 +1,7 @@ Name: web-platform-tests - Test Suites for Web Platform specifications Short Name: wpt URL: https://github.com/web-platform-tests/wpt/ -Version: 3ed9ea602edd2e492ee9a86cb1d5019ae69a0d0b +Version: 2f8e0bed982d287e335d4ad16e2df01230b03bb7 License: LICENSES FOR W3C TEST SUITES (https://www.w3.org/Consortium/Legal/2008/03-bsd-license.html) Security Critical: no Shipped: no
diff --git a/third_party/wpt_tools/wpt/tools/wptrunner/wptrunner/manifestupdate.py b/third_party/wpt_tools/wpt/tools/wptrunner/wptrunner/manifestupdate.py index 6a12cf1..ebab2493 100644 --- a/third_party/wpt_tools/wpt/tools/wptrunner/wptrunner/manifestupdate.py +++ b/third_party/wpt_tools/wpt/tools/wptrunner/wptrunner/manifestupdate.py
@@ -2,7 +2,7 @@ import os from urllib.parse import urljoin, urlsplit -from collections import namedtuple, defaultdict, deque +from collections import Counter, namedtuple, defaultdict, deque from math import ceil from typing import Any, Callable, ClassVar, Dict, List, Optional @@ -617,8 +617,6 @@ conditions = [] errors = [] - value_count = defaultdict(int) - def to_count_value(v): if v is None: return v @@ -659,10 +657,6 @@ if prev_default: conditions.append((None, prev_default)) if error is None: - count_value = to_count_value(value) - value_count[count_value] += len(node.run_info) - - if error is None: conditions.append((expr, value)) else: errors.append(error) @@ -678,6 +672,7 @@ queue.append((child, parents_and_self)) conditions = conditions[::-1] + value_count = Counter(to_count_value(value) for _, value in conditions) # If we haven't set a default condition, add one and remove all the conditions # with the same value @@ -686,9 +681,9 @@ # or the previous default cls_default = to_count_value(self.default_value) prev_default = to_count_value(prev_default) - commonest_value = max(value_count, key=lambda x:(value_count.get(x), - x == cls_default, - x == prev_default)) + commonest_value = max(value_count, key=lambda x: (value_count[x], + x == cls_default, + x == prev_default)) if isinstance(commonest_value, tuple): commonest_value = list(commonest_value) commonest_value = self.from_ini_value(commonest_value)
diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums.xml index 86c2cb6..fb08796 100644 --- a/tools/metrics/histograms/enums.xml +++ b/tools/metrics/histograms/enums.xml
@@ -44011,6 +44011,7 @@ <int value="4640" label="VirtualKeyboardShow"/> <int value="4641" label="VirtualKeyboardHide"/> <int value="4642" label="VirtualKeyboardOverlayPolicy"/> + <int value="4643" label="ScrollSnapNestedSnapAreas"/> </enum> <enum name="FeaturePolicyAllowlistType"> @@ -80016,6 +80017,9 @@ <int value="9" label="NewModelUpdate"> Old model was removed due to new model update. </int> + <int value="10" label="InconsistentModelDir"> + Model dir was inconsistent with local_state and removed at startup. + </int> </enum> <enum name="OptimizationGuideProcessHintsResult"> @@ -112543,6 +112547,15 @@ <int value="5" label="Android Accessory"/> </enum> +<enum name="WebAuthenticationMacOSPasskeysPermission"> + <int value="0" label="Requested permission during a create() call"/> + <int value="1" label="Permission approved during a create() call"/> + <int value="2" label="Permission denied during a create() call"/> + <int value="3" label="Requested permission during a get() call"/> + <int value="4" label="Permission approved during a get() call"/> + <int value="5" label="Permission denied during a get() call"/> +</enum> + <enum name="WebAuthenticationMacOSPlatformAuthenticatorAction"> <int value="0" label="Started create() for profile authenticator with iCloud Drive
diff --git a/tools/metrics/histograms/metadata/custom_tabs/histograms.xml b/tools/metrics/histograms/metadata/custom_tabs/histograms.xml index 967b9c5..823c8bc 100644 --- a/tools/metrics/histograms/metadata/custom_tabs/histograms.xml +++ b/tools/metrics/histograms/metadata/custom_tabs/histograms.xml
@@ -637,7 +637,7 @@ <owner>mthiesse@chromium.org</owner> <owner>chrome-connective-tissue@google.com</owner> <summary> - Time startup time for a Custom Tab from the earliest point in startup to the + Startup time for a Custom Tab from the earliest point in startup to the first navigation commit. Split by varying degrees of warmness, from cold to fully pre-loaded through mayLaunchUrl. @@ -658,6 +658,31 @@ </token> </histogram> +<histogram name="CustomTabs.Startup.TimeToLargestContentfulPaint.{suffix}" + units="ms" expires_after="2024-08-25"> + <owner>mthiesse@chromium.org</owner> + <owner>chrome-connective-tissue@google.com</owner> + <summary> + Startup time for a Custom Tab from the earliest point in startup to the + Largest Contentful Paint on the first navigation. Split by varying degrees + of warmness, from cold to fully pre-loaded through mayLaunchUrl. + + {suffix}. + </summary> + <token key="suffix"> + <variant name="Cold" summary="Measures from process creation to LCP"/> + <variant name="Speculated" + summary="Measures from intent received to LCP when the mayLaunchUrl + speculation is used"/> + <variant name="Warm" + summary="Measures from intent received to LCP when + CustomTabsConnection#warmUp is not used"/> + <variant name="WarmedUp" + summary="Measures from intent received to LCP when + CustomTabsConnection#warmUp is used"/> + </token> +</histogram> + <histogram name="CustomTabs.TabCounts.OnClosingAllTabs" units="count" expires_after="2023-10-08"> <owner>wenyufu@chromium.org</owner>
diff --git a/tools/metrics/histograms/metadata/new_tab_page/histograms.xml b/tools/metrics/histograms/metadata/new_tab_page/histograms.xml index a9d40cb9..3e52ffb 100644 --- a/tools/metrics/histograms/metadata/new_tab_page/histograms.xml +++ b/tools/metrics/histograms/metadata/new_tab_page/histograms.xml
@@ -1698,70 +1698,6 @@ </summary> </histogram> -<histogram name="NewTabPage.ShoppingTasks.ProductClick" units="index" - expires_after="2022-11-20"> - <obsolete> - Last logged in M101. Marked obsolete 2022-10. - </obsolete> - <owner>danpeng@google.com</owner> - <owner>tiborg@chromium.org</owner> - <owner>yyushkina@chromium.org</owner> - <owner>chrome-desktop-ntp@google.com</owner> - <summary> - Logged when a user clicked on a product in the shopping tasks module. The - value is equal to the index of the product. - </summary> -</histogram> - -<histogram name="NewTabPage.ShoppingTasks.ProductDownloadCount" - units="products" expires_after="2022-11-20"> - <obsolete> - Last logged in M101. Marked obsolete 2022-10. - </obsolete> - <owner>danpeng@google.com</owner> - <owner>tiborg@chromium.org</owner> - <owner>yyushkina@chromium.org</owner> - <owner>chrome-desktop-ntp@google.com</owner> - <summary> - The number of product search links in the primary shopping task (top-ranked, - shopping, search journey). The product search links are rendered with a - name, price, image and URL. This metric is logged after the shopping tasks - are successfuly retrieved. - </summary> -</histogram> - -<histogram name="NewTabPage.ShoppingTasks.RelatedSearchClick" units="index" - expires_after="2022-11-20"> - <obsolete> - Last logged in M101. Marked obsolete 2022-10. - </obsolete> - <owner>danpeng@google.com</owner> - <owner>tiborg@chromium.org</owner> - <owner>yyushkina@chromium.org</owner> - <owner>chrome-desktop-ntp@google.com</owner> - <summary> - Logged when a user clicked on a related search pill in the shopping tasks - module. The value is equal to the index of the pill. - </summary> -</histogram> - -<histogram name="NewTabPage.ShoppingTasks.RelatedSearchDownloadCount" - units="count" expires_after="2022-11-20"> - <obsolete> - Last logged in M101. Marked obsolete 2022-10. - </obsolete> - <owner>danpeng@google.com</owner> - <owner>tiborg@chromium.org</owner> - <owner>yyushkina@chromium.org</owner> - <owner>chrome-desktop-ntp@google.com</owner> - <summary> - The number of related search links in the primary shopping task (top-ranked, - shopping, search journey). The related search links are rendered with a name - and URL. This metric is logged after the shopping tasks are successfuly - retrieved. - </summary> -</histogram> - <histogram name="NewTabPage.Snippets.IncompleteSnippetsAfterFetch" enum="Boolean" expires_after="M85"> <owner>maybelle@chromium.org</owner>
diff --git a/tools/metrics/histograms/metadata/others/histograms.xml b/tools/metrics/histograms/metadata/others/histograms.xml index 851cbd0..161e5b7 100644 --- a/tools/metrics/histograms/metadata/others/histograms.xml +++ b/tools/metrics/histograms/metadata/others/histograms.xml
@@ -13248,7 +13248,7 @@ </histogram> <histogram name="UpgradeDetector.DaysBeforeUpgrade" units="days" - expires_after="2023-10-08"> + expires_after="2024-05-01"> <owner>emshack@chromium.org</owner> <owner>pbos@chromium.org</owner> <summary> @@ -13261,7 +13261,7 @@ </histogram> <histogram name="UpgradeDetector.HoursBeforeUpgrade" units="hours" - expires_after="2023-12-10"> + expires_after="2024-05-01"> <owner>emshack@chromium.org</owner> <owner>pbos@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/password/histograms.xml b/tools/metrics/histograms/metadata/password/histograms.xml index e2fac60..24e722d 100644 --- a/tools/metrics/histograms/metadata/password/histograms.xml +++ b/tools/metrics/histograms/metadata/password/histograms.xml
@@ -2057,17 +2057,6 @@ </summary> </histogram> -<histogram - name="PasswordManager.MigrationToOSCrypt.{Store}.KeychainRetrievalError" - enum="ErrSecOSStatus" expires_after="M119"> - <owner>vsemeniuk@google.com</owner> - <owner>vasilii@chromium.org</owner> - <summary> - Records keychain retrieval error code received during the migration of - PasswordStore to OSCrypt on iOS {Store}. Recorded when retrieval fails. - </summary> -</histogram> - <histogram name="PasswordManager.MigrationToOSCrypt.{Store}ErrorLatency" units="ms" expires_after="M119"> <owner>vsemeniuk@google.com</owner> @@ -2078,6 +2067,17 @@ </summary> </histogram> +<histogram + name="PasswordManager.MigrationToOSCrypt.{Store}KeychainRetrievalError" + enum="ErrSecOSStatus" expires_after="M119"> + <owner>vsemeniuk@google.com</owner> + <owner>vasilii@chromium.org</owner> + <summary> + Records keychain retrieval error code received during the migration of + PasswordStore to OSCrypt on iOS {Store}. Recorded when retrieval fails. + </summary> +</histogram> + <histogram name="PasswordManager.MigrationToOSCrypt.{Store}SuccessLatency" units="ms" expires_after="M119"> <owner>vsemeniuk@google.com</owner>
diff --git a/tools/metrics/histograms/metadata/webauthn/histograms.xml b/tools/metrics/histograms/metadata/webauthn/histograms.xml index c00177f..e3f74560 100644 --- a/tools/metrics/histograms/metadata/webauthn/histograms.xml +++ b/tools/metrics/histograms/metadata/webauthn/histograms.xml
@@ -217,6 +217,16 @@ </summary> </histogram> +<histogram name="WebAuthentication.MacOS.PasskeysPermission" + enum="WebAuthenticationMacOSPasskeysPermission" expires_after="2024-06-14"> + <owner>agl@chromium.org</owner> + <owner>martinkr@google.com</owner> + <summary> + Records whether Chromium is granted the macOS passkeys permission by users + when they're prompted for it. + </summary> +</histogram> + <histogram name="WebAuthentication.MacOS.PlatformAuthenticatorAction" enum="WebAuthenticationMacOSPlatformAuthenticatorAction" expires_after="2024-06-14">
diff --git a/ui/color/color_id.h b/ui/color/color_id.h index 72d98dde..8a74fba 100644 --- a/ui/color/color_id.h +++ b/ui/color/color_id.h
@@ -274,6 +274,13 @@ E_CPONLY(kColorCheckboxOutlineDisabled) \ E_CPONLY(kColorCheckboxForegroundChecked) \ E_CPONLY(kColorCheckboxForegroundUnchecked) \ + E_CPONLY(kColorChipBackgroundHover) \ + E_CPONLY(kColorChipBackgroundSelected) \ + E_CPONLY(kColorChipBorder) \ + E_CPONLY(kColorChipForeground) \ + E_CPONLY(kColorChipForegroundSelected) \ + E_CPONLY(kColorChipIcon) \ + E_CPONLY(kColorChipIconSelected) \ E_CPONLY(kColorComboboxBackground) \ E_CPONLY(kColorComboboxBackgroundDisabled) \ E_CPONLY(kColorComboboxContainerOutline) \
diff --git a/ui/color/material_ui_color_mixer.cc b/ui/color/material_ui_color_mixer.cc index da2baee..dc9470de 100644 --- a/ui/color/material_ui_color_mixer.cc +++ b/ui/color/material_ui_color_mixer.cc
@@ -61,6 +61,13 @@ mixer[kColorCheckboxContainerDisabled] = {kColorSysStateDisabledContainer}; mixer[kColorCheckboxOutline] = {kColorSysOutline}; mixer[kColorCheckboxOutlineDisabled] = {kColorSysStateDisabledContainer}; + mixer[kColorChipBackgroundHover] = {kColorSysStateHoverOnSubtle}; + mixer[kColorChipBackgroundSelected] = {kColorSysTonalContainer}; + mixer[kColorChipBorder] = {kColorSysTonalOutline}; + mixer[kColorChipForeground] = {kColorSysOnSurface}; + mixer[kColorChipForegroundSelected] = {kColorSysOnTonalContainer}; + mixer[kColorChipIcon] = {kColorSysPrimary}; + mixer[kColorChipIconSelected] = {kColorSysOnTonalContainer}; mixer[kColorComboboxBackground] = {kColorSysSurface}; mixer[kColorComboboxBackgroundDisabled] = {GetResultingPaintColor( {kColorSysStateDisabledContainer}, {kColorComboboxBackground})};
diff --git a/ui/gfx/linux/fontconfig_util.cc b/ui/gfx/linux/fontconfig_util.cc index 8e55aa4..62ee9e42 100644 --- a/ui/gfx/linux/fontconfig_util.cc +++ b/ui/gfx/linux/fontconfig_util.cc
@@ -14,7 +14,6 @@ #if BUILDFLAG(IS_CHROMEOS) #include "base/files/file_path.h" #include "base/files/file_util.h" -#include "ui/gfx/switches.h" #endif namespace gfx { @@ -49,8 +48,9 @@ fc_config_ = FcConfigGetCurrent(); FcConfigReference(fc_config_); #if BUILDFLAG(IS_CHROMEOS) - if (features::UseVariableGoogleSansFont() && - base::PathExists(base::FilePath(kGoogleSansVariablePath))) { + // TODO(b/268691415): Leave until M119 when all builds have the variable + // font. + if (base::PathExists(base::FilePath(kGoogleSansVariablePath))) { const FcChar8* kVariableFontPath = reinterpret_cast<const FcChar8*>(kGoogleSansVariablePath); // Adds the folder to the available fonts in the application. Returns
diff --git a/ui/gfx/switches.cc b/ui/gfx/switches.cc index 7639d05..9576188 100644 --- a/ui/gfx/switches.cc +++ b/ui/gfx/switches.cc
@@ -57,14 +57,4 @@ #endif ); -#if BUILDFLAG(IS_CHROMEOS) -BASE_FEATURE(kVariableGoogleSansFont, - "VariableGoogleSansFont", - base::FEATURE_ENABLED_BY_DEFAULT); - -GFX_SWITCHES_EXPORT bool UseVariableGoogleSansFont() { - return base::FeatureList::IsEnabled(kVariableGoogleSansFont); -} -#endif - } // namespace features
diff --git a/ui/gfx/switches.h b/ui/gfx/switches.h index ebeb73e7..37011f6 100644 --- a/ui/gfx/switches.h +++ b/ui/gfx/switches.h
@@ -30,11 +30,6 @@ GFX_SWITCHES_EXPORT BASE_DECLARE_FEATURE(kOddHeightMultiPlanarBuffers); GFX_SWITCHES_EXPORT BASE_DECLARE_FEATURE(kOddWidthMultiPlanarBuffers); -#if BUILDFLAG(IS_CHROMEOS) -GFX_SWITCHES_EXPORT BASE_DECLARE_FEATURE(kVariableGoogleSansFont); -GFX_SWITCHES_EXPORT bool UseVariableGoogleSansFont(); -#endif - } // namespace features #endif // UI_GFX_SWITCHES_H_
diff --git a/ui/shell_dialogs/fake_select_file_dialog.cc b/ui/shell_dialogs/fake_select_file_dialog.cc index cd5a8f4b..17f0a8c0 100644 --- a/ui/shell_dialogs/fake_select_file_dialog.cc +++ b/ui/shell_dialogs/fake_select_file_dialog.cc
@@ -93,4 +93,8 @@ listener_->MultiFilesSelected(files, params_); } +void FakeSelectFileDialog::ListenerDestroyed() { + listener_ = nullptr; +} + } // namespace ui
diff --git a/ui/shell_dialogs/fake_select_file_dialog.h b/ui/shell_dialogs/fake_select_file_dialog.h index 994f3300..92e2737 100644 --- a/ui/shell_dialogs/fake_select_file_dialog.h +++ b/ui/shell_dialogs/fake_select_file_dialog.h
@@ -79,7 +79,7 @@ const GURL* caller) override; bool HasMultipleFileTypeChoicesImpl() override; bool IsRunning(gfx::NativeWindow owning_window) const override; - void ListenerDestroyed() override {} + void ListenerDestroyed() override; // Returns the file title provided to the dialog. const std::u16string& title() const { return title_; }
diff --git a/ui/shell_dialogs/select_file_dialog.h b/ui/shell_dialogs/select_file_dialog.h index 7806652..f4c6367 100644 --- a/ui/shell_dialogs/select_file_dialog.h +++ b/ui/shell_dialogs/select_file_dialog.h
@@ -234,7 +234,7 @@ const GURL* caller) = 0; // The listener to be notified of selection completion. - raw_ptr<Listener, AcrossTasksDanglingUntriaged> listener_; + raw_ptr<Listener> listener_; private: // Tests if the file selection dialog can be displayed by
diff --git a/ui/views/widget/native_widget.h b/ui/views/widget/native_widget.h index 1bc4690f..23c19195 100644 --- a/ui/views/widget/native_widget.h +++ b/ui/views/widget/native_widget.h
@@ -11,6 +11,9 @@ class Widget; +// Used with Widget::GetNativeWindowProperty() to identify a widget. +VIEWS_EXPORT extern const char kWidgetIdentifierKey[]; + namespace internal { class NativeWidgetPrivate; }
diff --git a/ui/views/widget/native_widget_private.cc b/ui/views/widget/native_widget_private.cc index a7097e5..a3032d2 100644 --- a/ui/views/widget/native_widget_private.cc +++ b/ui/views/widget/native_widget_private.cc
@@ -8,7 +8,11 @@ #include "ui/display/display.h" #include "ui/display/screen.h" -namespace views::internal { +namespace views { + +const char kWidgetIdentifierKey[] = "kWidgetIdentifierKey"; + +namespace internal { // static gfx::Rect NativeWidgetPrivate::ConstrainBoundsToDisplayWorkArea( @@ -31,4 +35,6 @@ return true; } -} // namespace views::internal +} // namespace internal + +} // namespace views
diff --git a/ui/webui/resources/cr_elements/BUILD.gn b/ui/webui/resources/cr_elements/BUILD.gn index 17f7dbf..0437abb 100644 --- a/ui/webui/resources/cr_elements/BUILD.gn +++ b/ui/webui/resources/cr_elements/BUILD.gn
@@ -26,6 +26,7 @@ "cr_action_menu/cr_action_menu.ts", "cr_button/cr_button.ts", "cr_checkbox/cr_checkbox.ts", + "cr_chip/cr_chip.ts", "cr_dialog/cr_dialog.ts", "cr_drawer/cr_drawer.ts", "cr_expand_button/cr_expand_button.ts",
diff --git a/ui/webui/resources/cr_elements/cr_chip/cr_chip.html b/ui/webui/resources/cr_elements/cr_chip/cr_chip.html new file mode 100644 index 0000000..6c2a2fe4 --- /dev/null +++ b/ui/webui/resources/cr_elements/cr_chip/cr_chip.html
@@ -0,0 +1,129 @@ +<style> + button { + --iron-icon-fill-color: var(--cr-link-color); + --iron-icon-height: 16px; + --iron-icon-width: 16px; + align-items: center; + appearance: none; + background-color: transparent; + border: 1px solid var(--google-grey-300); + border-radius: 4px; + color: var(--cr-secondary-text-color); + cursor: pointer; + font-family: inherit; + display: flex; + flex-direction: row; + font-size: 13px; + gap: 4px; + height: 28px; + padding: 0 6px; + } + + @media (prefers-color-scheme: dark) { + button { + border-color: var(--google-grey-700); + } + } + + :host-context([chrome-refresh-2023]) button { + --iron-icon-fill-color: var(--color-chip-icon, + var(--cr-fallback-color-primary)); + border-color: var(--color-chip-border, + var(--cr-fallback-color-tonal-outline)); + border-radius: 8px; + color: var(--color-chip-foreground, var(--cr-fallback-color-on-surface)); + font-size: 12px; + font-weight: 500; + overflow: hidden; + padding: 0 8px; + position: relative; + } + + button:not(:is([disabled], [selected])):hover { + background-color: rgba(var(--google-blue-500-rgb), .04); + border-color: var(--google-blue-100); + } + + :host-context([chrome-refresh-2023]) button:not(:is([disabled], [selected])):hover { + background-color: transparent; + border-color: var(--color-chip-border, + var(--cr-fallback-color-tonal-outline)); + } + + @media (prefers-color-scheme: dark) { + button:not(:is([disabled], [selected])):hover { + background: linear-gradient(0deg, + rgba(var(--google-blue-300-rgb), .08), + rgba(var(--google-blue-300-rgb), .08)), + var(--google-grey-900); + border-color: rgba(var(--google-blue-300-rgb), .32); + } + } + + button:focus-visible { + outline: solid 2px var(--cr-focus-outline-color); + } + + :host-context([chrome-refresh-2023]) button:focus-visible { + outline-offset: 2px; + } + + button[disabled] { + cursor: default; + opacity: var(--cr-disabled-opacity); + } + + button[selected] { + background-color: var(--google-blue-50); + border-color: var(--google-blue-50); + color: var(--google-blue-600); + } + + @media (prefers-color-scheme: dark) { + button[selected] { + --iron-icon-fill-color: var(--google-grey-900); + background-color: var(--google-blue-300); + border-color: var(--google-blue-300); + color: var(--google-grey-900); + } + } + + :host-context([chrome-refresh-2023]) button[selected] { + --iron-icon-fill-color: var(--color-chip-icon-selected, + var(--cr-fallback-color-on-tonal-container)); + background-color: var(--color-chip-background-selected, + var(--cr-fallback-color-tonal-container)); + border: none; + color: var(--color-chip-foreground-selected, + var(--cr-fallback-color-on-tonal-container)); + padding: 0 8px; + } + + #hoverLayer { + display: none; + } + + :host-context([chrome-refresh-2023]) button:hover #hoverLayer { + background: var(--cr-hover-on-subtle-background-color); + display: block; + inset: 0; + pointer-events: none; + position: absolute; + } + + paper-ripple { + display: none; + } + + :host-context([chrome-refresh-2023]) paper-ripple { + --paper-ripple-opacity: 1; + color: var(--cr-active-neutral-on-subtle-background-color); + display: block; + } +</style> + +<button selected$="[[selected]]" disabled$="[[disabled]]" + aria-pressed="[[selected]]" role="[[chipRole]]"> + <div id="hoverLayer"></div> + <slot></slot> +</button>
diff --git a/ui/webui/resources/cr_elements/cr_chip/cr_chip.ts b/ui/webui/resources/cr_elements/cr_chip/cr_chip.ts new file mode 100644 index 0000000..f8415055 --- /dev/null +++ b/ui/webui/resources/cr_elements/cr_chip/cr_chip.ts
@@ -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. + +import '//resources/cr_elements/cr_shared_vars.css.js'; + +import {PaperRippleBehavior} from '//resources/polymer/v3_0/paper-behaviors/paper-ripple-behavior.js'; +import {mixinBehaviors, PolymerElement} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; + +import {getTemplate} from './cr_chip.html.js'; + +const CrChipElementBase = + mixinBehaviors([PaperRippleBehavior], PolymerElement) as { + new (): PolymerElement & PaperRippleBehavior, + }; + +export class CrChip extends CrChipElementBase { + static get is() { + return 'cr-chip'; + } + + static get template() { + return getTemplate(); + } + + static get properties() { + return { + disabled: Boolean, + chipRole: String, + selected: Boolean, + }; + } + + disabled: boolean; + chipRole: string; + selected: boolean; + + constructor() { + super(); + if (document.documentElement.hasAttribute('chrome-refresh-2023')) { + this.addEventListener('pointerdown', this.onPointerDown_.bind(this)); + } + } + + private onPointerDown_() { + this.ensureRipple(); + } + + // Overridden from PaperRippleBehavior + /* eslint-disable-next-line @typescript-eslint/naming-convention */ + override _createRipple() { + this._rippleContainer = this.shadowRoot!.querySelector('button'); + return super._createRipple(); + } +} + +declare global { + interface HTMLElementTagNameMap { + 'cr-chip': CrChip; + } +} + +customElements.define(CrChip.is, CrChip);
diff --git a/ui/webui/resources/cr_elements/cr_dialog/cr_dialog.html b/ui/webui/resources/cr_elements/cr_dialog/cr_dialog.html index dea0bf4..80947de 100644 --- a/ui/webui/resources/cr_elements/cr_dialog/cr_dialog.html +++ b/ui/webui/resources/cr_elements/cr_dialog/cr_dialog.html
@@ -87,7 +87,7 @@ padding-bottom: var(--cr-dialog-button-container-padding-bottom, 16px); padding-inline-end: var(--cr-dialog-button-container-padding-horizontal, 16px); padding-inline-start: var(--cr-dialog-button-container-padding-horizontal, 16px); - padding-top: 16px; + padding-top: var(--cr-dialog-button-container-padding-top, 16px); } :host ::slotted([slot=footer]) {
diff --git a/v8 b/v8 index 389dcb03..e3580992 160000 --- a/v8 +++ b/v8
@@ -1 +1 @@ -Subproject commit 389dcb03ad1e7ee7f050248439e9ef296f859d3b +Subproject commit e35809924c4af3f7b2d45833d9991b8469fa0e20