diff --git a/DEPS b/DEPS index 180d6ee..4d27353dc 100644 --- a/DEPS +++ b/DEPS
@@ -300,11 +300,11 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling Skia # and whatever else without interference from each other. - 'skia_revision': '24bebce2d9a1735f8454a65b0ab11df0966b2893', + 'skia_revision': 'b06e7c291aec5a3713f32a70635b8135e755a5d1', # 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': '895757ed9ca487de1d35d30ee5a2cb1046247a23', + 'v8_revision': 'f2bec7884ccae8af1bce5d38639c7c1dbc999646', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling ANGLE # and whatever else without interference from each other. @@ -431,7 +431,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling feed # and whatever else without interference from each other. - 'quiche_revision': '02c69dd28eef7ef2618782e8d54d53c14ae64382', + 'quiche_revision': '11e17fea103dab9d7eb8a021038ec619a88c7296', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling ios_webkit # and whatever else without interference from each other. @@ -803,7 +803,7 @@ 'src/clank': { 'url': Var('chrome_git') + '/clank/internal/apps.git' + '@' + - '98b46e88d8c57dc46cf70a10b621f94c444811f6', + 'a1a7858e57211d99a2d54d5aee96c7c240be84a4', 'condition': 'checkout_android and checkout_src_internal', }, @@ -832,7 +832,7 @@ }, 'src/ios/third_party/material_components_ios/src': { - 'url': Var('chromium_git') + '/external/github.com/material-components/material-components-ios.git' + '@' + '0c637e0da8688956a3754e25f42378eaf523a367', + 'url': Var('chromium_git') + '/external/github.com/material-components/material-components-ios.git' + '@' + 'b5489406a5e8c9c9daaff2e725fd89bfdeeb3c6a', 'condition': 'checkout_ios', }, @@ -1116,7 +1116,7 @@ Var('chromium_git') + '/external/github.com/chromium/content_analysis_sdk.git' + '@' + 'b8744f00646d175057f0be7443c7c72a311b5381', 'src/third_party/dav1d/libdav1d': - Var('chromium_git') + '/external/github.com/videolan/dav1d.git' + '@' + '676a864a11af2c0522e1f992e770589543894686', + Var('chromium_git') + '/external/github.com/videolan/dav1d.git' + '@' + 'f8ae94eca0f53502a2cddd29a263c1edea4822a0', 'src/third_party/dawn': Var('dawn_git') + '/dawn.git' + '@' + Var('dawn_revision'), @@ -1206,7 +1206,7 @@ Var('chromium_git') + '/external/colorama.git' + '@' + '3de9f013df4b470069d03d250224062e8cf15c49', 'src/third_party/cpuinfo/src': - Var('chromium_git') + '/external/github.com/pytorch/cpuinfo.git' + '@' + 'b16eacd5291c99dfcf88c9a0b575d577ea456753', + Var('chromium_git') + '/external/github.com/pytorch/cpuinfo.git' + '@' + 'f44a9dabb2192ffb203ddd0c71f6373c7d82faed', 'src/third_party/crc32c/src': Var('chromium_git') + '/external/github.com/google/crc32c.git' + '@' + 'fa5ade41ee480003d9c5af6f43567ba22e4e17e6', @@ -1227,7 +1227,7 @@ }, 'src/third_party/depot_tools': - Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + '541638fd2318e0c03df51cd70b8ac6e9f7273fbb', + Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + '6316ac234e70d983ae758e283ed6ac8d4d0cb36b', 'src/third_party/devtools-frontend/src': Var('chromium_git') + '/devtools/devtools-frontend' + '@' + Var('devtools_frontend_revision'), @@ -1491,7 +1491,7 @@ Var('chromium_git') + '/external/libaddressinput.git' + '@' + 'e8712e415627f22d0b00ebee8db99547077f39bd', 'src/third_party/libaom/source/libaom': - Var('aomedia_git') + '/aom.git' + '@' + 'f15d8bacc72479979182f7484e0b80cf988ffd67', + Var('aomedia_git') + '/aom.git' + '@' + '5f516275fb8761562bd877f2a8f185cd76c2a274', 'src/third_party/libavif/src': Var('chromium_git') + '/external/github.com/AOMediaCodec/libavif.git' + '@' + Var('libavif_revision'), @@ -1689,7 +1689,7 @@ Var('chromium_git') + '/external/github.com/cisco/openh264' + '@' + '09a4f3ec842a8932341b195c5b01e141c8a16eb7', 'src/third_party/openscreen/src': - Var('chromium_git') + '/openscreen' + '@' + '3c35814555c25564487cba6d7ea9cc44191e107d', + Var('chromium_git') + '/openscreen' + '@' + 'd052a5556a78aa4463852e29919d616b47237842', 'src/third_party/openxr/src': { 'url': Var('chromium_git') + '/external/github.com/KhronosGroup/OpenXR-SDK' + '@' + '58a00cf85c39ad5ec4dc43a769624e420c06179a', @@ -1821,7 +1821,7 @@ 'packages': [ { 'package': 'chromium/tools/swift-toolchain/mac-amd64', - 'version': 'version:2@5.7-release', + 'version': 'version:2@5.8-release', }, ], 'condition': 'host_os == mac', @@ -1832,7 +1832,7 @@ Var('chromium_git') + '/external/github.com/GoogleChromeLabs/text-fragments-polyfill.git' + '@' + 'c036420683f672d685e27415de0a5f5e85bdc23f', 'src/third_party/tflite/src': - Var('chromium_git') + '/external/github.com/tensorflow/tensorflow.git' + '@' + 'cdd9eec54ee64375548eafeb11623c71b2733d97', + Var('chromium_git') + '/external/github.com/tensorflow/tensorflow.git' + '@' + '2bc9b91925cc357c0c1a1843259cf47a33dda3d5', 'src/third_party/turbine': { 'packages': [ @@ -1882,7 +1882,7 @@ Var('chromium_git') + '/external/khronosgroup/webgl.git' + '@' + 'd1b65aa5a88f6efd900604dfcda840154e9f16e2', 'src/third_party/webgpu-cts/src': - Var('chromium_git') + '/external/github.com/gpuweb/cts.git' + '@' + '6ac65a373b810a95f5a9afce513bca6f8eaeb104', + Var('chromium_git') + '/external/github.com/gpuweb/cts.git' + '@' + '7b9d28f6115a6d9b7b889686eda78fd228306bcc', 'src/third_party/webrtc': Var('webrtc_git') + '/src.git' + '@' + 'a79bc6ee47446865a229e69d835ddcd0b9d39c8e',
diff --git a/PRESUBMIT.py b/PRESUBMIT.py index 9b8ad56..fa981d0 100644 --- a/PRESUBMIT.py +++ b/PRESUBMIT.py
@@ -762,8 +762,8 @@ # Fuchsia provides C++ libraries that use std::shared_ptr<>. '^base/fuchsia/.*\.(cc|h)', '.*fuchsia.*test\.(cc|h)', - # Needed for clang plugin tests - '^tools/clang/plugins/tests/', + # Clang plugins have different build config. + '^tools/clang/plugins/', _THIRD_PARTY_EXCEPT_BLINK], # Not an error in third_party folders. ), BanRule( @@ -1023,7 +1023,12 @@ 'absl::optional instead.', ), True, - [_THIRD_PARTY_EXCEPT_BLINK], # Not an error in third_party folders. + [ + # Clang plugins have different build config. + '^tools/clang/plugins/', + # Not an error in third_party folders. + _THIRD_PARTY_EXCEPT_BLINK, + ], ), BanRule( r'/#include <chrono>',
diff --git a/ash/BUILD.gn b/ash/BUILD.gn index 6828828f..38a221a7 100644 --- a/ash/BUILD.gn +++ b/ash/BUILD.gn
@@ -243,8 +243,6 @@ "ambient/ui/ambient_shield_view.h", "ambient/ui/ambient_slideshow_peripheral_ui.cc", "ambient/ui/ambient_slideshow_peripheral_ui.h", - "ambient/ui/ambient_video_utils.cc", - "ambient/ui/ambient_video_utils.h", "ambient/ui/ambient_video_view.cc", "ambient/ui/ambient_video_view.h", "ambient/ui/ambient_view_delegate.h",
diff --git a/ash/ambient/ambient_controller_unittest.cc b/ash/ambient/ambient_controller_unittest.cc index 27aa28d..705c3db 100644 --- a/ash/ambient/ambient_controller_unittest.cc +++ b/ash/ambient/ambient_controller_unittest.cc
@@ -1972,15 +1972,11 @@ personalization_app::GetTimeOfDaySrcDir() .Append(personalization_app::kAmbientVideoHtml) .value()); - std::string video_path_requested; - ASSERT_TRUE(net::GetValueForKeyInQuery(web_view->current_url(), "video_src", - &video_path_requested)); - GURL video_src_url(video_path_requested); - EXPECT_TRUE(video_src_url.SchemeIsFile()); - EXPECT_EQ(video_src_url.path(), - personalization_app::GetTimeOfDayVideosDir() - .Append(personalization_app::kTimeOfDayNewMexicoVideo) - .value()); + std::string video_file_requested; + ASSERT_TRUE(net::GetValueForKeyInQuery(web_view->current_url(), "video_file", + &video_file_requested)); + EXPECT_EQ(video_file_requested, + personalization_app::kTimeOfDayNewMexicoVideo); UnlockScreen(); SetAmbientTheme(AmbientTheme::kSlideshow); @@ -2010,14 +2006,9 @@ personalization_app::GetTimeOfDaySrcDir() .Append(personalization_app::kAmbientVideoHtml) .value()); - ASSERT_TRUE(net::GetValueForKeyInQuery(web_view->current_url(), "video_src", - &video_path_requested)); - video_src_url = GURL(video_path_requested); - EXPECT_TRUE(video_src_url.SchemeIsFile()); - EXPECT_EQ(video_src_url.path(), - personalization_app::GetTimeOfDayVideosDir() - .Append(personalization_app::kTimeOfDayCloudsVideo) - .value()); + ASSERT_TRUE(net::GetValueForKeyInQuery(web_view->current_url(), "video_file", + &video_file_requested)); + EXPECT_EQ(video_file_requested, personalization_app::kTimeOfDayCloudsVideo); } class AmbientControllerDurationTest : public AmbientAshTestBase {
diff --git a/ash/ambient/ambient_video_ui_launcher.cc b/ash/ambient/ambient_video_ui_launcher.cc index 241045b..2edf3a8 100644 --- a/ash/ambient/ambient_video_ui_launcher.cc +++ b/ash/ambient/ambient_video_ui_launcher.cc
@@ -6,20 +6,14 @@ #include "ash/ambient/ambient_controller.h" #include "ash/ambient/ambient_ui_settings.h" -#include "ash/ambient/ui/ambient_video_utils.h" #include "ash/ambient/ui/ambient_video_view.h" #include "ash/public/cpp/personalization_app/time_of_day_paths.h" #include "ash/shell.h" #include "base/check.h" #include "base/files/file_path.h" -#include "base/files/file_util.h" -#include "base/functional/bind.h" #include "base/functional/callback.h" -#include "base/location.h" #include "base/logging.h" #include "base/strings/string_piece.h" -#include "base/task/task_traits.h" -#include "base/task/thread_pool.h" #include "components/prefs/pref_service.h" namespace ash { @@ -30,20 +24,12 @@ personalization_app::kAmbientVideoHtml); } -void VerifyVideoExistsOnDisc(AmbientVideo video) { - bool all_resources_exists = base::PathExists(GetAmbientVideoPath(video)) && - base::PathExists(GetVideoHtmlPath()); - // Currently, all resources are shipped with the OTA and reside on rootfs, so - // this should never be true unless there is a major bug. - // - // TODO(b/271182121): Add UMA metrics for this error case, and start using the - // Initialize with bool callback, not being used right now as it causes some - // tests to fail. This should only make a difference if/when the ambient - // video resources start getting downloaded at run-time. - - if (!all_resources_exists) { - LOG(ERROR) << "Ambient video resources do not exist on disc. video=" - << GetAmbientVideoPath(video) << " src=" << GetVideoHtmlPath(); +base::StringPiece GetVideoFile(AmbientVideo video) { + switch (video) { + case AmbientVideo::kNewMexico: + return personalization_app::kTimeOfDayNewMexicoVideo; + case AmbientVideo::kClouds: + return personalization_app::kTimeOfDayCloudsVideo; } } @@ -67,11 +53,6 @@ << "AmbientVideoUiLauncher should not be active for " << ToString(ui_settings.theme()); current_video_ = *ui_settings.video(); - base::ThreadPool::PostTask( - FROM_HERE, - {base::MayBlock(), base::TaskPriority::BEST_EFFORT, - base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN}, - base::BindOnce(&VerifyVideoExistsOnDisc, current_video_)); weather_refresher_ = Shell::Get() ->ambient_controller() ->ambient_weather_controller() @@ -81,7 +62,7 @@ std::unique_ptr<views::View> AmbientVideoUiLauncher::CreateView() { CHECK(is_active_); - return std::make_unique<AmbientVideoView>(GetAmbientVideoPath(current_video_), + return std::make_unique<AmbientVideoView>(GetVideoFile(current_video_), GetVideoHtmlPath(), view_delegate_); }
diff --git a/ash/ambient/ui/ambient_video_utils.cc b/ash/ambient/ui/ambient_video_utils.cc deleted file mode 100644 index a26b237..0000000 --- a/ash/ambient/ui/ambient_video_utils.cc +++ /dev/null
@@ -1,49 +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 "ash/ambient/ui/ambient_video_utils.h" - -#include "ash/public/cpp/personalization_app/time_of_day_paths.h" -#include "base/check.h" -#include "base/command_line.h" -#include "base/files/file_path.h" -#include "base/logging.h" -#include "base/notreached.h" -#include "base/strings/string_piece.h" - -namespace ash { -namespace { - -// For development/debugging purposes only. Developers may want to quickly test -// with their own version of the video in a different directory. -constexpr base::StringPiece kAmbientVideoDirSwitch = "ambient-video-dir"; - -base::FilePath GetVideoDir() { - base::FilePath ambient_video_dir = - base::CommandLine::ForCurrentProcess()->GetSwitchValuePath( - kAmbientVideoDirSwitch); - return ambient_video_dir.empty() - ? personalization_app::GetTimeOfDayVideosDir() - : ambient_video_dir; -} - -} // namespace - -base::FilePath GetAmbientVideoPath(AmbientVideo video) { - base::StringPiece video_file_name; - switch (video) { - case AmbientVideo::kNewMexico: - video_file_name = personalization_app::kTimeOfDayNewMexicoVideo; - break; - case AmbientVideo::kClouds: - video_file_name = personalization_app::kTimeOfDayCloudsVideo; - break; - } - // TODO(b/271182121): Check that the ambient video actually exists on disc and - // record UMA metric if it does not. In the current design, these videos are - // stored on rootfs, so this should never happen. - return GetVideoDir().Append(video_file_name); -} - -} // namespace ash
diff --git a/ash/ambient/ui/ambient_video_utils.h b/ash/ambient/ui/ambient_video_utils.h deleted file mode 100644 index c9ad184..0000000 --- a/ash/ambient/ui/ambient_video_utils.h +++ /dev/null
@@ -1,21 +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 ASH_AMBIENT_UI_AMBIENT_VIDEO_UTILS_H_ -#define ASH_AMBIENT_UI_AMBIENT_VIDEO_UTILS_H_ - -#include "ash/constants/ambient_video.h" - -namespace base { -class FilePath; -} // namespace base - -namespace ash { - -// Returns the full path to the specified |video|. -base::FilePath GetAmbientVideoPath(AmbientVideo video); - -} // namespace ash - -#endif // ASH_AMBIENT_UI_AMBIENT_VIDEO_UTILS_H_
diff --git a/ash/ambient/ui/ambient_video_view.cc b/ash/ambient/ui/ambient_video_view.cc index b1277251..bfd6e3b 100644 --- a/ash/ambient/ui/ambient_video_view.cc +++ b/ash/ambient/ui/ambient_video_view.cc
@@ -25,7 +25,7 @@ namespace { -constexpr base::StringPiece kAmbientVideoSrcQueryParam = "video_src"; +constexpr base::StringPiece kAmbientVideoFileQueryParam = "video_file"; // Apply the same jitter interval to the peripheral elements as the slideshow // theme does (which applies jitter each time the photo switches). @@ -38,12 +38,12 @@ } // namespace -AmbientVideoView::AmbientVideoView(const base::FilePath& video_path, +AmbientVideoView::AmbientVideoView(base::StringPiece video_file, const base::FilePath& html_path, AmbientViewDelegate* view_delegate) : peripheral_ui_( std::make_unique<AmbientSlideshowPeripheralUi>(view_delegate)) { - DCHECK(!video_path.empty()); + DCHECK(!video_file.empty()); DCHECK(!html_path.empty()); DCHECK(AshWebViewFactory::Get()); SetUseDefaultFillLayout(true); @@ -56,8 +56,7 @@ ash_web_view->SetID(kAmbientVideoWebView); ash_web_view->SetUseDefaultFillLayout(true); GURL ambient_video_url = net::AppendQueryParameter( - BuildFileUrl(html_path), kAmbientVideoSrcQueryParam, - BuildFileUrl(video_path).spec()); + BuildFileUrl(html_path), kAmbientVideoFileQueryParam, video_file); ash_web_view->Navigate(ambient_video_url); AddChildView(peripheral_ui_.get());
diff --git a/ash/ambient/ui/ambient_video_view.h b/ash/ambient/ui/ambient_video_view.h index 1204d64..355d22a 100644 --- a/ash/ambient/ui/ambient_video_view.h +++ b/ash/ambient/ui/ambient_video_view.h
@@ -25,18 +25,19 @@ // page with a <video> element in it. class ASH_EXPORT AmbientVideoView : public views::View { public: - // |video_path|: Path of the video to play. + // |video_file|: Name of video file to play. // |html_path|: Path of the HTML source file with the <video> element in it. // This is loaded by constructing a "file://" URL pointing to - // this HTML file. The |video_path| is passed to the HTML via + // this HTML file. The |video_file| is passed to the HTML via // a query parameter in the URL like so: - // file://<html_path>?video_src=file://<video_path> + // file://<html_path>?video_src=<video_file> // // Important Note: - // The parent directories for |video_path| and |html_path| must be present - // in the allowlist in chrome/browser/net/chrome_network_delegate.cc, or the - // webpage will fail to load. - AmbientVideoView(const base::FilePath& video_path, + // The parent directory for |html_path| and the directory of the video itself + // (currently hard-coded in the HTML file) must be present in the allowlist in + // chrome/browser/net/chrome_network_delegate.cc, or the webpage will fail to + // load. + AmbientVideoView(base::StringPiece video_file, const base::FilePath& html_path, AmbientViewDelegate* view_delegate); AmbientVideoView(const AmbientVideoView&) = delete;
diff --git a/ash/ambient/ui/ambient_video_view_unittest.cc b/ash/ambient/ui/ambient_video_view_unittest.cc index 7726e2f..7596ba0 100644 --- a/ash/ambient/ui/ambient_video_view_unittest.cc +++ b/ash/ambient/ui/ambient_video_view_unittest.cc
@@ -25,8 +25,7 @@ using AmbientVideoViewTest = AmbientAshTestBase; TEST_F(AmbientVideoViewTest, NavigatesToCorrectURL) { - AmbientVideoView view(base::FilePath("/path/to/video"), - base::FilePath("/path/to/html"), + AmbientVideoView view("video.webm", base::FilePath("/path/to/html"), ambient_controller()->ambient_view_delegate()); const TestAshWebView* web_view = static_cast<const TestAshWebView*>( view.GetViewByID(kAmbientVideoWebView)); @@ -34,12 +33,10 @@ EXPECT_FALSE(web_view->init_params_for_testing().enable_wake_locks); EXPECT_TRUE(web_view->current_url().SchemeIsFile()); EXPECT_THAT(web_view->current_url().path(), Eq("/path/to/html")); - std::string video_path_requested; - ASSERT_TRUE(net::GetValueForKeyInQuery(web_view->current_url(), "video_src", - &video_path_requested)); - GURL video_src_url(video_path_requested); - EXPECT_TRUE(video_src_url.SchemeIsFile()); - EXPECT_THAT(video_src_url.path(), Eq("/path/to/video")); + std::string video_file_requested; + ASSERT_TRUE(net::GetValueForKeyInQuery(web_view->current_url(), "video_file", + &video_file_requested)); + EXPECT_THAT(video_file_requested, Eq("video.webm")); } } // namespace
diff --git a/ash/keyboard/keyboard_controller_impl_unittest.cc b/ash/keyboard/keyboard_controller_impl_unittest.cc index 19fcd6d5..4142057 100644 --- a/ash/keyboard/keyboard_controller_impl_unittest.cc +++ b/ash/keyboard/keyboard_controller_impl_unittest.cc
@@ -185,15 +185,16 @@ } void SetKeyboardConfigToPref(const base::Value& value) { - base::Value features(base::Value::Type::DICT); - features.SetKey("auto_complete_enabled", value.Clone()); - features.SetKey("auto_correct_enabled", value.Clone()); - features.SetKey("handwriting_enabled", value.Clone()); - features.SetKey("spell_check_enabled", value.Clone()); - features.SetKey("voice_input_enabled", value.Clone()); + auto features = base::Value::Dict() + .Set("auto_complete_enabled", value.Clone()) + .Set("auto_correct_enabled", value.Clone()) + .Set("handwriting_enabled", value.Clone()) + .Set("spell_check_enabled", value.Clone()) + .Set("voice_input_enabled", value.Clone()); PrefService* prefs = Shell::Get()->session_controller()->GetLastActiveUserPrefService(); - prefs->Set(prefs::kAccessibilityVirtualKeyboardFeatures, features); + prefs->SetDict(prefs::kAccessibilityVirtualKeyboardFeatures, + std::move(features)); } void VerifyKeyboardConfig(const KeyboardConfig& config, bool expected_value) {
diff --git a/ash/public/cpp/personalization_app/time_of_day_paths.cc b/ash/public/cpp/personalization_app/time_of_day_paths.cc index 5aff9f7..dad9b074 100644 --- a/ash/public/cpp/personalization_app/time_of_day_paths.cc +++ b/ash/public/cpp/personalization_app/time_of_day_paths.cc
@@ -12,25 +12,10 @@ constexpr base::FilePath::CharType kAssetsRootDir[] = FILE_PATH_LITERAL("/usr/share/chromeos-assets/personalization/time_of_day"); -constexpr base::FilePath::CharType kVideosSubDir[] = FILE_PATH_LITERAL("video"); -constexpr base::FilePath::CharType kWallpapersSubDir[] = - FILE_PATH_LITERAL("wallpaper"); constexpr base::FilePath::CharType kSrcSubDir[] = FILE_PATH_LITERAL("src"); } // namespace -const base::FilePath& GetTimeOfDayWallpapersDir() { - static const base::NoDestructor<base::FilePath> kPath( - base::FilePath(kAssetsRootDir).Append(kWallpapersSubDir)); - return *kPath; -} - -const base::FilePath& GetTimeOfDayVideosDir() { - static const base::NoDestructor<base::FilePath> kPath( - base::FilePath(kAssetsRootDir).Append(kVideosSubDir)); - return *kPath; -} - const base::FilePath& GetTimeOfDaySrcDir() { static const base::NoDestructor<base::FilePath> kPath( base::FilePath(kAssetsRootDir).Append(kSrcSubDir));
diff --git a/ash/public/cpp/personalization_app/time_of_day_paths.h b/ash/public/cpp/personalization_app/time_of_day_paths.h index 4e63675..9831be36 100644 --- a/ash/public/cpp/personalization_app/time_of_day_paths.h +++ b/ash/public/cpp/personalization_app/time_of_day_paths.h
@@ -12,8 +12,6 @@ // Returns paths to assets required for the TimeOfDay wallpaper/screensaver // feature. -ASH_PUBLIC_EXPORT const base::FilePath& GetTimeOfDayWallpapersDir(); -ASH_PUBLIC_EXPORT const base::FilePath& GetTimeOfDayVideosDir(); ASH_PUBLIC_EXPORT const base::FilePath& GetTimeOfDaySrcDir(); // TimeOfDay video file names.
diff --git a/ash/system/input_device_settings/input_device_settings_metrics_manager.cc b/ash/system/input_device_settings/input_device_settings_metrics_manager.cc index 84ec65a..f0d6a190 100644 --- a/ash/system/input_device_settings/input_device_settings_metrics_manager.cc +++ b/ash/system/input_device_settings/input_device_settings_metrics_manager.cc
@@ -252,6 +252,15 @@ static_cast<PointerSensitivity>(mouse.settings->sensitivity); base::UmaHistogramEnumeration( "ChromeOS.Settings.Device.Mouse.Sensitivity.Changed", sensitivity); + const int speed_difference = + mouse.settings->sensitivity - old_settings.sensitivity; + const std::string delta_sensitivity_metric = + speed_difference > 0 + ? "ChromeOS.Settings.Device.Mouse.Sensitivity.Increase" + : "ChromeOS.Settings.Device.Mouse.Sensitivity.Decrease"; + base::UmaHistogramEnumeration( + delta_sensitivity_metric, + static_cast<PointerSensitivity>(abs(speed_difference))); } if (mouse.settings->swap_right != old_settings.swap_right) { base::UmaHistogramBoolean( @@ -303,6 +312,15 @@ base::UmaHistogramEnumeration( "ChromeOS.Settings.Device.PointingStick.Sensitivity.Changed", sensitivity); + const int speed_difference = + pointing_stick.settings->sensitivity - old_settings.sensitivity; + const std::string delta_sensitivity_metric = + speed_difference > 0 + ? "ChromeOS.Settings.Device.PointingStick.Sensitivity.Increase" + : "ChromeOS.Settings.Device.PointingStick.Sensitivity.Decrease"; + base::UmaHistogramEnumeration( + delta_sensitivity_metric, + static_cast<PointerSensitivity>(abs(speed_difference))); } if (pointing_stick.settings->swap_right != old_settings.swap_right) { base::UmaHistogramBoolean( @@ -376,6 +394,13 @@ static_cast<PointerSensitivity>(touchpad.settings->sensitivity); base::UmaHistogramEnumeration( touchpad_metrics_prefix + "Sensitivity.Changed", sensitivity); + const int speed_difference = + touchpad.settings->sensitivity - old_settings.sensitivity; + const std::string delta_metric_suffix = + speed_difference > 0 ? "Sensitivity.Increase" : "Sensitivity.Decrease"; + base::UmaHistogramEnumeration( + base::StrCat({touchpad_metrics_prefix, delta_metric_suffix}), + static_cast<PointerSensitivity>(abs(speed_difference))); } if (touchpad.settings->tap_dragging_enabled != old_settings.tap_dragging_enabled) { @@ -400,6 +425,14 @@ base::UmaHistogramEnumeration( touchpad_metrics_prefix + "HapticSensitivity.Changed", haptic_sensitivity); + const int speed_difference = touchpad.settings->haptic_sensitivity - + old_settings.haptic_sensitivity; + const std::string delta_metric_suffix = + speed_difference > 0 ? "HapticSensitivity.Increase" + : "HapticSensitivity.Decrease"; + base::UmaHistogramEnumeration( + base::StrCat({touchpad_metrics_prefix, delta_metric_suffix}), + static_cast<PointerSensitivity>(abs(speed_difference))); } } }
diff --git a/ash/system/input_device_settings/input_device_settings_metrics_manager_unittest.cc b/ash/system/input_device_settings/input_device_settings_metrics_manager_unittest.cc index 929c8193..c651e24 100644 --- a/ash/system/input_device_settings/input_device_settings_metrics_manager_unittest.cc +++ b/ash/system/input_device_settings/input_device_settings_metrics_manager_unittest.cc
@@ -18,6 +18,7 @@ constexpr char kExternalMouseId[] = "test:mouse"; constexpr char kPointingStickId[] = "test:pointingstick"; constexpr char kExternalTouchpadId[] = "test:touchpad-external"; +constexpr int kSampleMinSensitivity = 1; constexpr int kSampleSensitivity = 3; constexpr int kSampleMaxSensitivity = 5; @@ -209,7 +210,7 @@ // Call record changed settings metrics. const auto old_setting = mouse.settings->Clone(); - mouse.settings->sensitivity = kSampleMaxSensitivity; + mouse.settings->sensitivity = kSampleMinSensitivity; mouse.settings->reverse_scrolling = !mouse.settings->reverse_scrolling; manager_.get()->RecordMouseChangedMetrics(mouse, *old_setting); histogram_tester.ExpectTotalCount( @@ -221,6 +222,13 @@ histogram_tester.ExpectTotalCount( "ChromeOS.Settings.Device.Mouse.ReverseScrolling.Changed", /*expected_count=*/1u); + histogram_tester.ExpectTotalCount( + "ChromeOS.Settings.Device.Mouse.Sensitivity.Increase", + /*expected_count=*/0); + histogram_tester.ExpectUniqueSample( + "ChromeOS.Settings.Device.Mouse.Sensitivity.Decrease", + /*sample=*/2u, + /*expected_bucket_count=*/1u); } TEST_F(InputDeviceSettingsMetricsManagerTest, RecordPointingStickSettings) { @@ -266,6 +274,13 @@ histogram_tester.ExpectTotalCount( "ChromeOS.Settings.Device.PointingStick.SwapPrimaryButtons.Changed", /*expected_count=*/1u); + histogram_tester.ExpectUniqueSample( + "ChromeOS.Settings.Device.PointingStick.Sensitivity.Increase", + /*sample=*/2u, + /*expected_bucket_count=*/1u); + histogram_tester.ExpectTotalCount( + "ChromeOS.Settings.Device.PointingStick.Sensitivity.Decrease", + /*expected_count=*/0); } TEST_F(InputDeviceSettingsMetricsManagerTest, RecordTouchpadSettings) { @@ -314,7 +329,7 @@ !touchpad_external.settings->tap_dragging_enabled; touchpad_external.settings->tap_to_click_enabled = !touchpad_external.settings->tap_to_click_enabled; - touchpad_external.settings->haptic_sensitivity = kSampleMaxSensitivity; + touchpad_external.settings->haptic_sensitivity = kSampleMinSensitivity; manager_.get()->RecordTouchpadChangedMetrics(touchpad_external, *old_setting); histogram_tester.ExpectTotalCount( @@ -329,6 +344,13 @@ histogram_tester.ExpectTotalCount( "ChromeOS.Settings.Device.Touchpad.External.Sensitivity.Changed", /*expected_count=*/1u); + histogram_tester.ExpectUniqueSample( + "ChromeOS.Settings.Device.Touchpad.External.Sensitivity.Increase", + /*sample=*/2u, + /*expected_bucket_count=*/1u); + histogram_tester.ExpectTotalCount( + "ChromeOS.Settings.Device.Touchpad.External.Sensitivity.Decrease", + /*expected_count=*/0); histogram_tester.ExpectTotalCount( "ChromeOS.Settings.Device.Touchpad.External.TapDragging.Changed", /*expected_count=*/1u); @@ -337,7 +359,14 @@ /*expected_count=*/1u); histogram_tester.ExpectUniqueSample( "ChromeOS.Settings.Device.Touchpad.External.HapticSensitivity.Changed", - /*sample=*/5u, /*expected_bucket_count=*/1u); + /*sample=*/1u, /*expected_bucket_count=*/1u); + histogram_tester.ExpectTotalCount( + "ChromeOS.Settings.Device.Touchpad.External.HapticSensitivity.Increase", + /*expected_count=*/0); + histogram_tester.ExpectUniqueSample( + "ChromeOS.Settings.Device.Touchpad.External.HapticSensitivity.Decrease", + /*sample=*/2u, + /*expected_bucket_count=*/1u); } TEST_F(InputDeviceSettingsMetricsManagerTest, RecordModifierRemappingMetrics) {
diff --git a/ash/webui/camera_app_ui/resources/.eslintrc.js b/ash/webui/camera_app_ui/resources/.eslintrc.js index 57230e1..c59139d 100644 --- a/ash/webui/camera_app_ui/resources/.eslintrc.js +++ b/ash/webui/camera_app_ui/resources/.eslintrc.js
@@ -474,7 +474,22 @@ noSingleLineBlocks: true, }, ], - 'jsdoc/no-bad-blocks': 'error', + 'jsdoc/no-bad-blocks': [ + 'error', + { + // The first four are default values, and the last one is added since + // the lint name is too long and the eslint-disable-next-line is + // frequently line wrapped, which cause jsdoc/no-bad-blocks to think + // that it should be a docstring. + ignore: [ + 'ts-check', + 'ts-expect-error', + 'ts-ignore', + 'ts-nocheck', + 'typescript-eslint/consistent-type-assertions', + ], + }, + ], 'jsdoc/no-defaults': 'error', 'jsdoc/no-multi-asterisks': [ 'error', @@ -614,13 +629,21 @@ }, ], + // Using "as" type assertion should be rare and as a last resort if it's + // really too complicated to put the constraint in type system, and it's + // not easy to do a runtime assertion (assertInstanceof) either. + // + // If it's the case, please have a eslint-disable-next-line to disable the + // lint together with some comment explaining why the assertion is safe. + // + // See also: + // go/tsstyle#type-and-non-nullability-assertions // go/tsstyle#type-assertions-syntax // go/tsstyle#type-assertions-and-object-literals '@typescript-eslint/consistent-type-assertions': [ 'error', { - assertionStyle: 'as', - objectLiteralTypeAssertions: 'never', + assertionStyle: 'never', }, ],
diff --git a/ash/webui/camera_app_ui/resources/css/button.css b/ash/webui/camera_app_ui/resources/css/button.css index c8892c55..05eb899 100644 --- a/ash/webui/camera_app_ui/resources/css/button.css +++ b/ash/webui/camera_app_ui/resources/css/button.css
@@ -4,7 +4,7 @@ .text-button { box-sizing: border-box; - font: 500 13px/20px Roboto; + font: var(--cros-button-2-font); height: 32px; padding: 0 16px; }
diff --git a/ash/webui/camera_app_ui/resources/css/colors_default.css b/ash/webui/camera_app_ui/resources/css/colors_default.css index f2b9390..a9a6a12 100644 --- a/ash/webui/camera_app_ui/resources/css/colors_default.css +++ b/ash/webui/camera_app_ui/resources/css/colors_default.css
@@ -27,6 +27,14 @@ --grey-900: rgb(var(--grey-900-rgb)); --yellow-300: rgb(253, 214, 99); + --cros-annotation-1-font: 400 12px/18px var(--default-font-family); + --cros-body-0-font: 400 16px/24px var(--default-font-family); + --cros-body-1-font: 400 14px/20px var(--default-font-family); + --cros-body-2-font: 400 13px/20px var(--default-font-family); + --cros-button-1-font: 500 14px/20px var(--default-font-family); + --cros-button-2-font: 500 13px/20px var(--default-font-family); + --cros-title-1-font: 500 16px/24px var(--default-font-family); + /* Note that in M2 blue-0 is lightest and blue-1000 is darkest, but in M3 * blue0 is darkest and blue100 is lightest. */ --cros-ref-blue40: var(--blue-600);
diff --git a/ash/webui/camera_app_ui/resources/css/custom_toast.css b/ash/webui/camera_app_ui/resources/css/custom_toast.css index 4fffd63..09b3548 100644 --- a/ash/webui/camera_app_ui/resources/css/custom_toast.css +++ b/ash/webui/camera_app_ui/resources/css/custom_toast.css
@@ -123,7 +123,7 @@ .custom-toast-text { color: var(--cros-sys-on_primary); - font: normal 400 13px/20px Roboto; + font: var(--cros-body-2-font); } #new-feature-toast svg-wrapper {
diff --git a/ash/webui/camera_app_ui/resources/css/flash.css b/ash/webui/camera_app_ui/resources/css/flash.css index 169246ac..a3999db 100644 --- a/ash/webui/camera_app_ui/resources/css/flash.css +++ b/ash/webui/camera_app_ui/resources/css/flash.css
@@ -21,7 +21,7 @@ #processing-indicator .msg { color: var(--cros-sys-on_surface); - font: 14px/20px Roboto; + font: var(--cros-body-1-font); margin-top: 16px; }
diff --git a/ash/webui/camera_app_ui/resources/css/main.css b/ash/webui/camera_app_ui/resources/css/main.css index 9b0d97c..f390c40 100644 --- a/ash/webui/camera_app_ui/resources/css/main.css +++ b/ash/webui/camera_app_ui/resources/css/main.css
@@ -311,9 +311,7 @@ border-radius: 16px/50%; color: var(--cros-sys-on_surface); display: inline-block; - font-size: 14px; - font-weight: 500; - line-height: 16px; + font: var(--cros-button-1-font); padding: 8px 12px; position: relative; z-index: 0; @@ -854,6 +852,8 @@ } #preview-focus-aim { + color: var(--cros-sys-ripple_primary); + --secondary-color: var(--cros-sys-focus_ring); position: absolute; transform: translate(-50%, -50%); } @@ -886,7 +886,7 @@ } #expert-controls { - font-size: 14px; + font: var(--cros-body-1-font); left: 60px; position: absolute; text-align: left; /* csschecker-disable-line left-right */ @@ -1056,11 +1056,10 @@ border-radius: var(--border-radius-rounded-with-short-side); box-sizing: border-box; display: flex; - font-size: 13px; + font: var(--cros-button-2-font); font-variant-numeric: tabular-nums; height: 32px; justify-content: flex-start; - line-height: 20px; padding: 6px 12px; pointer-events: none; } @@ -1112,11 +1111,10 @@ background: var(--cros-sys-on_surface); border-radius: 2px; color: var(--cros-sys-inverse_on_surface); - font-size: 12px; + font: var(--cros-annotation-1-font); left: 0; - line-height: 22px; opacity: 0; - padding: 0 8px; + padding: 2px 8px; pointer-events: none; position: absolute; top: 0; @@ -1134,8 +1132,7 @@ border-radius: 16px; box-shadow: 0 0 4px rgba(0, 0, 0, 0.1), 0 4px 4px rgba(0, 0, 0, 0.2); color: var(--cros-sys-on_surface); - font-size: 16px; - line-height: 32px; + font: var(--cros-body-0-font); opacity: 0; padding: 8px 16px; pointer-events: none; @@ -1181,11 +1178,14 @@ color: var(--cros-sys-on_surface); display: flex; flex-shrink: 0; - font-size: 13px; justify-content: flex-start; text-align: initial; } +.menu-item { + font: var(--cros-body-2-font); +} + button.menu-item:hover, label.menu-item:hover { background: var(--cros-sys-hover_on_subtle); @@ -1198,7 +1198,7 @@ .menu-header { color: var(--cros-sys-on_surface); cursor: default; - font-size: 20px; + font: var(--cros-title-1-font); height: 72px; padding-inline-start: 16px; user-select: none; @@ -1282,8 +1282,7 @@ } #view-warning #error-msg { - font-size: 18px; - line-height: 32px; + font: var(--cros-body-0-font); text-align: center; white-space: pre-wrap; } @@ -1343,18 +1342,16 @@ border-radius: 8px; display: flex; flex-direction: column; - padding: 8px; + padding: 8px 0; position: absolute; width: 225px; } #option-title { color: var(--cros-sys-secondary); - font-family: var(--default-font-family); - font-size: 13px; - font-weight: 400; - height: 28px; - padding: 8px 8px 0 8px; + font: var(--cros-button-2-font); + height: 20px; + padding: 8px 20px; } #options-container { @@ -1383,7 +1380,7 @@ .label-item { color: var(--cros-sys-secondary); - font: 500 13px/20px var(--default-font-family); + font: var(--cros-button-2-font); margin: 9px 0 3px 0; padding-inline-start: 26px; } @@ -1398,7 +1395,7 @@ display: flex; flex-direction: column; flex-shrink: 0; - font: 400 13px var(--default-font-family); + font: var(--cros-body-2-font); height: 64px; justify-content: center; padding-inline-end: 60px; @@ -1464,7 +1461,7 @@ #nudge .warning-msg { color: var(--cros-sys-on_surface); - font: 400 14px/20px Roboto; + font: var(--cros-body-2-font); } .low-storage-dialog-popup { @@ -1479,12 +1476,12 @@ .low-storage-dialog-popup .dialog-title { color: var(--cros-sys-on_surface); - font: 500 16px/24px var(--default-font-family); + font: var(--cros-title-1-font); } .low-storage-dialog-popup .dialog-description { color: var(--cros-sys-secondary); - font: 400 14px/20px var(--default-font-family); + font: var(--cros-body-2-font); } .low-storage-dialog-buttons {
diff --git a/ash/webui/camera_app_ui/resources/css/menu.css b/ash/webui/camera_app_ui/resources/css/menu.css index 030a629..b951d5a1 100644 --- a/ash/webui/camera_app_ui/resources/css/menu.css +++ b/ash/webui/camera_app_ui/resources/css/menu.css
@@ -9,7 +9,7 @@ box-sizing: border-box; color: var(--cros-sys-on_surface); display: none; - font-size: 14px; + font: var(--cros-body-1-font); margin: 0; max-width: calc(100vw - 16px); padding-block: 8px;
diff --git a/ash/webui/camera_app_ui/resources/css/mode/mode.css b/ash/webui/camera_app_ui/resources/css/mode/mode.css index 0864452..7a515cb 100644 --- a/ash/webui/camera_app_ui/resources/css/mode/mode.css +++ b/ash/webui/camera_app_ui/resources/css/mode/mode.css
@@ -32,7 +32,7 @@ .mode-subgroup > .item > div.label { border-radius: var(--border-radius-rounded-with-short-side); - font: 500 14px/20px var(--default-font-family); + font: var(--cros-button-1-font); line-height: 20px; padding: 6px 16px; z-index: 0;
diff --git a/ash/webui/camera_app_ui/resources/css/mode/scan.css b/ash/webui/camera_app_ui/resources/css/mode/scan.css index b236363..8954510 100644 --- a/ash/webui/camera_app_ui/resources/css/mode/scan.css +++ b/ash/webui/camera_app_ui/resources/css/mode/scan.css
@@ -101,7 +101,7 @@ box-shadow: 0 0 4px rgba(0, 0, 0, 0.1), 0 4px 4px rgba(0, 0, 0, 0.2); box-sizing: border-box; display: flex; - font: 400 13px Roboto; + font: var(--cros-body-2-font); height: var(--chip-height); justify-content: center; padding: 8px 16px; @@ -157,7 +157,7 @@ box-sizing: border-box; display: flex; flex-direction: column; - font: 400 15px Roboto; + font: var(--cros-body-2-font); padding: var(--text-padding-vertical) 16px; } @@ -201,7 +201,7 @@ .snackbar { align-items: center; background: var(--cros-sys-inverse_surface); - border-radius: 4px; + border-radius: 12px; /* * TODO(pihsun): Move the snackbar to the position as the design after jelly * is default on. @@ -211,8 +211,7 @@ box-sizing: border-box; color: var(--cros-sys-inverse_on_surface); display: flex; - font-family: Roboto; - font-size: 13px; + font: var(--cros-body-2-font); height: 48px; left: 4px; opacity: 0; @@ -316,7 +315,7 @@ border-radius: var(--border-radius-rounded-with-short-side); color: var(--cros-sys-on_surface); display: inline-block; - font: normal 400 14px/20px Roboto; + font: var(--cros-body-2-font); left: 50%; padding: 8px 16px; position: absolute; @@ -339,7 +338,7 @@ align-items: center; color: var(--cros-sys-on_surface); display: flex; - font-size: 12px; + font: var(--cros-body-2-font); justify-content: center; visibility: hidden; } @@ -391,7 +390,7 @@ color: var(--cros-sys-on_surface); content: counter(page-count); counter-increment: page-count; - font-size: 13px; + font: var(--cros-body-2-font); position: absolute; }
diff --git a/ash/webui/camera_app_ui/resources/css/ptz_panel.css b/ash/webui/camera_app_ui/resources/css/ptz_panel.css index 616961f..72f7be70 100644 --- a/ash/webui/camera_app_ui/resources/css/ptz_panel.css +++ b/ash/webui/camera_app_ui/resources/css/ptz_panel.css
@@ -48,9 +48,7 @@ #ptz-reset-all>.text { color: var(--cros-sys-on_surface); - font-family: var(--default-font-family); - font-size: 13px; - font-weight: 500; + font: var(--cros-button-2-font); } #ptz-panel-container {
diff --git a/ash/webui/camera_app_ui/resources/css/review.css b/ash/webui/camera_app_ui/resources/css/review.css index 8ed877bb..b09379f 100644 --- a/ash/webui/camera_app_ui/resources/css/review.css +++ b/ash/webui/camera_app_ui/resources/css/review.css
@@ -56,16 +56,24 @@ } .review-views .review-intent-button-group>button { - height: 72px; - margin-bottom: 2px; - margin-top: 2px; - width: 72px; + height: 60px; + margin-bottom: 20px; + margin-top: 20px; + width: 60px; } .review-views .review-intent-button-group button[i18n-label=confirm_review_button] { - background-image: url(/images/camera_intent_result_confirm.svg); + background: var(--cros-sys-primary); + + :is(svg-wrapper) { + color: var(--cros-sys-on_primary); + } } .review-views .review-intent-button-group button[i18n-label=cancel_review_button] { - background-image: url(/images/camera_intent_result_cancel.svg); + background: var(--cros-sys-inverse_surface); + + :is(svg-wrapper) { + color: var(--cros-sys-secondary_container); + } }
diff --git a/ash/webui/camera_app_ui/resources/eslint_plugin/index.js b/ash/webui/camera_app_ui/resources/eslint_plugin/index.js index 1a51f1f..6f33a319 100644 --- a/ash/webui/camera_app_ui/resources/eslint_plugin/index.js +++ b/ash/webui/camera_app_ui/resources/eslint_plugin/index.js
@@ -24,7 +24,8 @@ if (type !== 'Block') { continue; } - if (!value.match(/ \w+= /)) { + if (!value.match(/ \w+= /) && + !value.match(/^\s*eslint-disable-next-line/)) { context.report({ node: comment, message: 'Inline block comment for parameters' +
diff --git a/ash/webui/camera_app_ui/resources/images/camera_focus_aim.svg b/ash/webui/camera_app_ui/resources/images/camera_focus_aim.svg index a57e9e9..ac53012 100644 --- a/ash/webui/camera_app_ui/resources/images/camera_focus_aim.svg +++ b/ash/webui/camera_app_ui/resources/images/camera_focus_aim.svg
@@ -7,7 +7,7 @@ <g id="outer_circle_focus_outlines" opacity="0" > <g id="group_1_transform" transform="translate(42.5,42.5)" > <g id="group_1" > - <path id="path_1" d="M 0.0,40.0 c 22.091003418,0.0 40.0,-17.908996582 40.0,-40.0 c 0.0,-22.091003418 -17.908996582,-40.0 -40.0,-40.0 c -22.091003418,0.0 -40.0,17.908996582 -40.0,40.0 c 0.0,22.091003418 17.908996582,40.0 40.0,40.0 Z" stroke="#FFFFFF" stroke-width="1" fill="none" /> + <path id="path_1" d="M 0.0,40.0 c 22.091003418,0.0 40.0,-17.908996582 40.0,-40.0 c 0.0,-22.091003418 -17.908996582,-40.0 -40.0,-40.0 c -22.091003418,0.0 -40.0,17.908996582 -40.0,40.0 c 0.0,22.091003418 17.908996582,40.0 40.0,40.0 Z" stroke="var(--secondary-color)" stroke-width="2" fill="none" /> </g> </g> </g> @@ -24,7 +24,7 @@ <g id="inner_circle_focus_outlines" opacity="0" > <g id="group_1_transform_0" transform="translate(37.5,37.5)" > <g id="group_2" > - <path id="path_2" d="M -32.5,-0.5 c 0.0,17.6730041504 14.3269958496,32.0 32.0,32.0 c 17.6730041504,0.0 32.0,-14.3269958496 32.0,-32.0 c 0.0,-17.6730041504 -14.3269958496,-32.0 -32.0,-32.0 c -17.6730041504,0.0 -32.0,14.3269958496 -32.0,32.0 Z" fill="#FFFFFF" /> + <path id="path_2" d="M -32.5,-0.5 c 0.0,17.6730041504 14.3269958496,32.0 32.0,32.0 c 17.6730041504,0.0 32.0,-14.3269958496 32.0,-32.0 c 0.0,-17.6730041504 -14.3269958496,-32.0 -32.0,-32.0 c -17.6730041504,0.0 -32.0,14.3269958496 -32.0,32.0 Z"/> </g> </g> </g>
diff --git a/ash/webui/camera_app_ui/resources/images/camera_intent_result_cancel.svg b/ash/webui/camera_app_ui/resources/images/camera_intent_result_cancel.svg index 367f1617..00219a8 100644 --- a/ash/webui/camera_app_ui/resources/images/camera_intent_result_cancel.svg +++ b/ash/webui/camera_app_ui/resources/images/camera_intent_result_cancel.svg
@@ -1,16 +1,3 @@ -<?xml version="1.0" encoding="UTF-8"?> -<svg width="72px" height="72px" viewBox="0 0 72 72" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> - <!-- Generator: Sketch 57.1 (83088) - https://sketch.com --> - <title>btn_stop_timer_1x</title> - <desc>Created with Sketch.</desc> - <defs> - <polygon id="path-1" points="44 29.6114286 42.3885714 28 36 34.3885714 29.6114286 28 28 29.6114286 34.3885714 36 28 42.3885714 29.6114286 44 36 37.6114286 42.3885714 44 44 42.3885714 37.6114286 36"></polygon> - </defs> - <g id="btn_stop_timer_1x" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> - <circle id="Oval-3" fill="#BDC1C6" opacity="0.9" cx="36" cy="36" r="30"></circle> - <mask id="mask-2" fill="white"> - <use xlink:href="#path-1"></use> - </mask> - <use id="ic_close_24px" fill="#FFFFFF" fill-rule="nonzero" xlink:href="#path-1"></use> - </g> -</svg> \ No newline at end of file +<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path fill-rule="evenodd" clip-rule="evenodd" d="M16 1.88L14.12 0L8 6.12L1.88 0L0 1.88L6.12 8L0 14.12L1.88 16L8 9.88L14.12 16L16 14.12L9.88 8L16 1.88Z"/> +</svg>
diff --git a/ash/webui/camera_app_ui/resources/images/camera_intent_result_confirm.svg b/ash/webui/camera_app_ui/resources/images/camera_intent_result_confirm.svg index ae2c4f9..00b3611 100644 --- a/ash/webui/camera_app_ui/resources/images/camera_intent_result_confirm.svg +++ b/ash/webui/camera_app_ui/resources/images/camera_intent_result_confirm.svg
@@ -1,21 +1,3 @@ -<?xml version="1.0" encoding="UTF-8"?> -<svg width="72px" height="72px" viewBox="0 0 72 72" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> - <!-- Generator: Sketch 57.1 (83088) - https://sketch.com --> - <title>btn_confirm_1x</title> - <desc>Created with Sketch.</desc> - <defs> - <polygon id="path-1" points="14.3166667 25.9666667 7.36666667 19.0166667 5 21.3666667 14.3166667 30.6833333 34.3166667 10.6833333 31.9666667 8.33333333"></polygon> - </defs> - <g id="btn_confirm_1x" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> - <g id="camera-button" transform="translate(6.127660, 6.127660)" fill="#1A73E8" opacity="0.9"> - <circle id="Oval-3" cx="30.0154866" cy="30.0154866" r="30.0154866"></circle> - <circle id="Oval-3" cx="30.0154866" cy="30.0154866" r="30.0154866"></circle> - </g> - <g id="ic_check_24px" transform="translate(16.000000, 16.000000)"> - <mask id="mask-2" fill="white"> - <use xlink:href="#path-1"></use> - </mask> - <use fill="#FFFFFF" fill-rule="nonzero" xlink:href="#path-1"></use> - </g> - </g> -</svg> \ No newline at end of file +<svg width="21" height="16" viewBox="0 0 21 16" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M6.68182 12.6567L1.67045 7.64179L0 9.31343L6.68182 16L21 1.67164L19.3295 0L6.68182 12.6567Z"/> +</svg>
diff --git a/ash/webui/camera_app_ui/resources/js/device/mode/video.ts b/ash/webui/camera_app_ui/resources/js/device/mode/video.ts index 7f58e6f..7b78379 100644 --- a/ash/webui/camera_app_ui/resources/js/device/mode/video.ts +++ b/ash/webui/camera_app_ui/resources/js/device/mode/video.ts
@@ -553,8 +553,12 @@ /** * Gets video track of recording stream. */ - private getVideoTrack(): MediaStreamTrack { - return this.getRecordingStream().getVideoTracks()[0]; + private getVideoTrack(): MediaStreamVideoTrack { + // The type annotation on MediaStream.getVideoTracks() in @types/webrtc is + // not specific enough. + // eslint-disable-next-line @typescript-eslint/consistent-type-assertions + return this.getRecordingStream().getVideoTracks()[0] as + MediaStreamVideoTrack; } async start(): Promise<[Promise<void>]> { @@ -817,7 +821,7 @@ TIME_LAPSE_INITIAL_SPEED); // Creates a frame reader from track processor. - const track = this.getVideoTrack() as MediaStreamVideoTrack; + const track = this.getVideoTrack(); const trackProcessor = new MediaStreamTrackProcessor({track}); const reader = trackProcessor.readable.getReader();
diff --git a/ash/webui/camera_app_ui/resources/js/device/preview.ts b/ash/webui/camera_app_ui/resources/js/device/preview.ts index 9593020..22c7aa9e 100644 --- a/ash/webui/camera_app_ui/resources/js/device/preview.ts +++ b/ash/webui/camera_app_ui/resources/js/device/preview.ts
@@ -697,8 +697,8 @@ if (marker !== this.focusMarker) { return; // Focus was cancelled. } - const aim = dom.get('#preview-focus-aim', HTMLObjectElement); - const clone = assertInstanceof(aim.cloneNode(true), HTMLObjectElement); + const aim = dom.get('#preview-focus-aim', HTMLElement); + const clone = assertInstanceof(aim.cloneNode(true), HTMLElement); clone.style.left = `${event.offsetX + this.video.offsetLeft}px`; clone.style.top = `${event.offsetY + this.video.offsetTop}px`; clone.hidden = false; @@ -712,7 +712,7 @@ */ private cancelFocus() { this.focusMarker = null; - const aim = dom.get('#preview-focus-aim', HTMLObjectElement); + const aim = dom.get('#preview-focus-aim', HTMLElement); aim.hidden = true; } }
diff --git a/ash/webui/camera_app_ui/resources/js/dom.ts b/ash/webui/camera_app_ui/resources/js/dom.ts index 4dbf2ad..c6497b6 100644 --- a/ash/webui/camera_app_ui/resources/js/dom.ts +++ b/ash/webui/camera_app_ui/resources/js/dom.ts
@@ -37,6 +37,7 @@ // check, then the `NodeListOf<Element>` (which is the original type of // `elements`) is actually a `NodeListOf<T>`, so we need to manually cast it // here. + // eslint-disable-next-line @typescript-eslint/consistent-type-assertions return elements as NodeListOf<T>; }
diff --git a/ash/webui/camera_app_ui/resources/js/metrics.ts b/ash/webui/camera_app_ui/resources/js/metrics.ts index bdfa8db..2b1d179 100644 --- a/ash/webui/camera_app_ui/resources/js/metrics.ts +++ b/ash/webui/camera_app_ui/resources/js/metrics.ts
@@ -50,6 +50,7 @@ // The TypeScript definition for UniversalAnalytics.FieldsObject // manually listed out dimension1 ~ dimension200, and TypeScript don't // recognize accessing it using []. Force the type here. + // eslint-disable-next-line @typescript-eslint/consistent-type-assertions (e as Record<string, unknown>)[`dimension${key}`] = value; } }
diff --git a/ash/webui/camera_app_ui/resources/js/models/ffmpeg/video_processor.ts b/ash/webui/camera_app_ui/resources/js/models/ffmpeg/video_processor.ts index 6971d296..bb6a359 100644 --- a/ash/webui/camera_app_ui/resources/js/models/ffmpeg/video_processor.ts +++ b/ash/webui/camera_app_ui/resources/js/models/ffmpeg/video_processor.ts
@@ -335,7 +335,9 @@ noFSInit: true, // It would be setup in preRun(). preRun: () => { // The FS property are injected by emscripten at runtime. - // eslint-disable-next-line @typescript-eslint/naming-convention + /* eslint-disable-next-line + @typescript-eslint/naming-convention, + @typescript-eslint/consistent-type-assertions */ const fs = (config as unknown as {FS: FS}).FS; assert(fs !== null); // 80 is just a random major number that won't collide with other
diff --git a/ash/webui/camera_app_ui/resources/js/models/file_system.ts b/ash/webui/camera_app_ui/resources/js/models/file_system.ts index 62d0e44..ec92870 100644 --- a/ash/webui/camera_app_ui/resources/js/models/file_system.ts +++ b/ash/webui/camera_app_ui/resources/js/models/file_system.ts
@@ -3,6 +3,7 @@ // found in the LICENSE file. import {assert} from '../assert.js'; +import {isFileSystemDirectoryHandle} from '../util.js'; import {WaitableEvent} from '../waitable_event.js'; import { @@ -98,13 +99,13 @@ assert(launchQueue !== undefined); launchQueue.setConsumer(async (launchParams) => { assert(launchParams.files.length > 0); - const dir: FileSystemHandle = launchParams.files[0]; - assert(dir.kind === 'directory'); + const dir = launchParams.files[0]; + assert(isFileSystemDirectoryHandle(dir)); await idb.set(idb.KEY_CAMERA_DIRECTORY_HANDLE, dir); window.sessionStorage.setItem('IsConsumedHandle', 'true'); - handle.signal(dir as FileSystemDirectoryHandle); + handle.signal(dir); }); } const dir = await handle.wait();
diff --git a/ash/webui/camera_app_ui/resources/js/models/file_system_access_entry.ts b/ash/webui/camera_app_ui/resources/js/models/file_system_access_entry.ts index f5f837a6..d9c87c0 100644 --- a/ash/webui/camera_app_ui/resources/js/models/file_system_access_entry.ts +++ b/ash/webui/camera_app_ui/resources/js/models/file_system_access_entry.ts
@@ -4,6 +4,7 @@ import {assert} from '../assert.js'; import {AsyncJobQueue} from '../async_job_queue.js'; +import {isFileSystemDirectoryHandle, isFileSystemFileHandle} from '../util.js'; import {AsyncWriter} from './async_writer.js'; @@ -173,8 +174,8 @@ async getFiles(): Promise<FileAccessEntry[]> { const results = []; for await (const handle of this.handle.values()) { - if (handle.kind === 'file') { - results.push(new FileAccessEntry(handle as FileSystemFileHandle, this)); + if (isFileSystemFileHandle(handle)) { + results.push(new FileAccessEntry(handle, this)); } } return results; @@ -183,9 +184,8 @@ async getDirectories(): Promise<DirectoryAccessEntry[]> { const results = []; for await (const handle of this.handle.values()) { - if (handle.kind === 'directory') { - results.push( - new DirectoryAccessEntryImpl(handle as FileSystemDirectoryHandle)); + if (isFileSystemDirectoryHandle(handle)) { + results.push(new DirectoryAccessEntryImpl(handle)); } } return results;
diff --git a/ash/webui/camera_app_ui/resources/js/models/local_storage.ts b/ash/webui/camera_app_ui/resources/js/models/local_storage.ts index faecda6..1e42250 100644 --- a/ash/webui/camera_app_ui/resources/js/models/local_storage.ts +++ b/ash/webui/camera_app_ui/resources/js/models/local_storage.ts
@@ -27,7 +27,11 @@ export function getObject<T>( key: LocalStorageKey, defaultValue: Record<string, T> = {}): Record<string, T> { + // We assume that all object written to local storage will be always by CCA, + // and the same key will corresponds to the same / compatible types, so the + // type assertion will always hold. // TODO(pihsun): actually verify the type at runtime here? + // eslint-disable-next-line @typescript-eslint/consistent-type-assertions return assertInstanceof(getHelper(key, defaultValue), Object) as Record<string, T>; }
diff --git a/ash/webui/camera_app_ui/resources/js/mojo/chrome_helper.ts b/ash/webui/camera_app_ui/resources/js/mojo/chrome_helper.ts index 4cf1133..e1404a1f 100644 --- a/ash/webui/camera_app_ui/resources/js/mojo/chrome_helper.ts +++ b/ash/webui/camera_app_ui/resources/js/mojo/chrome_helper.ts
@@ -41,6 +41,10 @@ * Forces casting type from Uint8Array to number[]. */ function castToNumberArray(data: Uint8Array): number[] { + // This cast is to workaround that the generated mojo binding only accepts + // number[], but actually can be passed Uint8Array (which also supports + // indexing via [] and length). + // eslint-disable-next-line @typescript-eslint/consistent-type-assertions return data as unknown as number[]; }
diff --git a/ash/webui/camera_app_ui/resources/js/mojo/device_operator.ts b/ash/webui/camera_app_ui/resources/js/mojo/device_operator.ts index 3aafd1d..05b2e34 100644 --- a/ash/webui/camera_app_ui/resources/js/mojo/device_operator.ts +++ b/ash/webui/camera_app_ui/resources/js/mojo/device_operator.ts
@@ -468,6 +468,9 @@ * support pan control. */ async getPanDefault(deviceId: string): Promise<number|undefined> { + // This is a custom USB HAL vendor tag, defined in hal/usb/vendor_tag.h on + // platform side. + // eslint-disable-next-line @typescript-eslint/consistent-type-assertions const tag = 0x8001000d as CameraMetadataTag; const data = await this.getStaticMetadata(deviceId, tag); return data[0]; @@ -478,6 +481,9 @@ * support tilt control. */ async getTiltDefault(deviceId: string): Promise<number|undefined> { + // This is a custom USB HAL vendor tag, defined in hal/usb/vendor_tag.h on + // platform side. + // eslint-disable-next-line @typescript-eslint/consistent-type-assertions const tag = 0x80010016 as CameraMetadataTag; const data = await this.getStaticMetadata(deviceId, tag); return data[0]; @@ -488,6 +494,9 @@ * support zoom control. */ async getZoomDefault(deviceId: string): Promise<number|undefined> { + // This is a custom USB HAL vendor tag, defined in hal/usb/vendor_tag.h on + // platform side. + // eslint-disable-next-line @typescript-eslint/consistent-type-assertions const tag = 0x80010019 as CameraMetadataTag; const data = await this.getStaticMetadata(deviceId, tag); return data[0]; @@ -538,7 +547,10 @@ * @throws Thrown when the device operation is not supported. */ async isPortraitModeSupported(deviceId: string): Promise<boolean> { + // This is a custom vendor tag, defined in common/vendor_tag_manager.h on + // platform side. // TODO(wtlee): Change to portrait mode tag. + // eslint-disable-next-line @typescript-eslint/consistent-type-assertions const portraitModeTag = 0x80000000 as CameraMetadataTag; const portraitMode = @@ -818,12 +830,11 @@ const deviceOperatorWrapper: ProxyHandler<DeviceOperator> = { get: function(target, property) { const val = Reflect.get(target, property); - if (val instanceof Function) { - return (...args: unknown[]) => operationQueue.push( - () => - Reflect.apply(val, target, args) as Promise<unknown>); + if (!(val instanceof Function)) { + return val; } - return val; + return (...args: unknown[]) => + operationQueue.push(() => Reflect.apply(val, target, args)); }, }; instance = new Proxy(rawInstance, deviceOperatorWrapper);
diff --git a/ash/webui/camera_app_ui/resources/js/mojo/util.ts b/ash/webui/camera_app_ui/resources/js/mojo/util.ts index ca69a23b..264856a 100644 --- a/ash/webui/camera_app_ui/resources/js/mojo/util.ts +++ b/ash/webui/camera_app_ui/resources/js/mojo/util.ts
@@ -29,12 +29,12 @@ * response or will never be resolved if the window unload is about to * happen. */ -async function wrapMojoResponse<T>(call: Promise<T>|undefined): Promise<T> { +async function wrapMojoResponse(call: unknown): Promise<unknown> { const result = await Promise.race([windowUnload.wait(), call]); if (windowUnload.isSignaled()) { return NEVER_SETTLED_PROMISE; } - return result as T; + return result; } const mojoResponseHandler: ProxyHandler<MojoEndpoint> = { @@ -48,8 +48,7 @@ // would be uncaught exception if we try to call the mojo function. return NEVER_SETTLED_PROMISE; } - return wrapMojoResponse( - Reflect.apply(val, target, args) as Promise<unknown>| undefined); + return wrapMojoResponse(Reflect.apply(val, target, args)); }; } return val; @@ -73,6 +72,9 @@ */ export function wrapEndpoint<T extends MojoEndpoint>(endpoint: T): T { closeWhenUnload(endpoint); + // The mojoResponseHandler is designed to be able to handle all mojo + // connection proxies. + // eslint-disable-next-line @typescript-eslint/consistent-type-assertions return new Proxy(endpoint, mojoResponseHandler as ProxyHandler<T>); }
diff --git a/ash/webui/camera_app_ui/resources/js/state.ts b/ash/webui/camera_app_ui/resources/js/state.ts index 2101c1eb..e9dc1f65 100644 --- a/ash/webui/camera_app_ui/resources/js/state.ts +++ b/ash/webui/camera_app_ui/resources/js/state.ts
@@ -83,7 +83,11 @@ * Asserts input string is valid state. */ export function assertState(s: string): StateUnion { + // This is to workaround current TypeScript limitation on Set.has. + // See https://github.com/microsoft/TypeScript/issues/26255 + // eslint-disable-next-line @typescript-eslint/consistent-type-assertions assert((stateValues as Set<string>).has(s), `No such state: ${s}`); + // eslint-disable-next-line @typescript-eslint/consistent-type-assertions return s as StateUnion; }
diff --git a/ash/webui/camera_app_ui/resources/js/test/cca_test.ts b/ash/webui/camera_app_ui/resources/js/test/cca_test.ts index c9449db..2800943 100644 --- a/ash/webui/camera_app_ui/resources/js/test/cca_test.ts +++ b/ash/webui/camera_app_ui/resources/js/test/cca_test.ts
@@ -26,10 +26,6 @@ UIComponent, } from './cca_type.js'; -/** - * Possible HTMLElement types that can have a boolean attribute "disabled". - */ -type HTMLElementWithDisabled = HTMLElement&{disabled: boolean}; interface Coordinate { x: number; y: number; @@ -392,16 +388,15 @@ } /** - * Returns disabled attribute of the component. In case the element with + * Returns disabled attribute of the component. In case the element without * "disabled" attribute, always returns false. */ static isDisabled(component: UIComponent, index?: number): boolean { const element = resolveElement(component, index); - const withDisabledElement = element as HTMLElementWithDisabled; - if (withDisabledElement.disabled === undefined) { - return false; + if ('disabled' in element && typeof element.disabled === 'boolean') { + return element.disabled; } - return withDisabledElement.disabled; + return false; } /**
diff --git a/ash/webui/camera_app_ui/resources/js/test_bridge.ts b/ash/webui/camera_app_ui/resources/js/test_bridge.ts index c37482f..8cde4b5f 100644 --- a/ash/webui/camera_app_ui/resources/js/test_bridge.ts +++ b/ash/webui/camera_app_ui/resources/js/test_bridge.ts
@@ -56,6 +56,10 @@ return null; } +// This is needed since we currently have the same tsconfig for files running +// in SharedWorker and in CCA. +// TODO(b/213408699): Remove this after the tsconfig are separated. +// eslint-disable-next-line @typescript-eslint/consistent-type-assertions const sharedWorkerScope = self as SharedWorkerGlobalScope; export interface TestBridge {
diff --git a/ash/webui/camera_app_ui/resources/js/untrusted_ga_helper.ts b/ash/webui/camera_app_ui/resources/js/untrusted_ga_helper.ts index 612f640d..2b64c03 100644 --- a/ash/webui/camera_app_ui/resources/js/untrusted_ga_helper.ts +++ b/ash/webui/camera_app_ui/resources/js/untrusted_ga_helper.ts
@@ -58,16 +58,25 @@ // The type of .ga on Window doesn't include undefined, but since this part // is setup code for ga, it's possible to have a undefined case here. Disable // eslint which would think the condition is always true. - /* eslint-disable @typescript-eslint/strict-boolean-expressions */ + // + // The type assertion is also needed since this part of invariant is + // maintained by ga itself, and all our usage only use the function call + // interface. + /* eslint-disable + @typescript-eslint/strict-boolean-expressions, + @typescript-eslint/consistent-type-assertions */ window.ga = window.ga || ((...args: unknown[]) => { (window.ga.q = window.ga.q || []).push(args); }) as UniversalAnalytics.ga; - /* eslint-enable @typescript-eslint/strict-boolean-expressions */ + /* eslint-enable + @typescript-eslint/strict-boolean-expressions, + @typescript-eslint/consistent-type-assertions */ window.ga.l = Date.now(); const a = document.createElement('script'); const m = document.getElementsByTagName('script')[0]; a.async = true; // TypeScript doesn't support setting .src to TrustedScriptURL yet. + // eslint-disable-next-line @typescript-eslint/consistent-type-assertions a.src = gaLibraryURL as unknown as string; assert(m.parentNode !== null); m.parentNode.insertBefore(a, m);
diff --git a/ash/webui/camera_app_ui/resources/js/untrusted_scripts.ts b/ash/webui/camera_app_ui/resources/js/untrusted_scripts.ts index 58b8f40..146590e 100644 --- a/ash/webui/camera_app_ui/resources/js/untrusted_scripts.ts +++ b/ash/webui/camera_app_ui/resources/js/untrusted_scripts.ts
@@ -52,6 +52,7 @@ await untrustedRemote.loadScript(scriptUrl); // loadScript adds the script exports to what's exported by the // untrustedRemote, so we manually cast it to the expected type. + // eslint-disable-next-line @typescript-eslint/consistent-type-assertions return untrustedRemote as unknown as Comlink.Remote<T>; }
diff --git a/ash/webui/camera_app_ui/resources/js/untrusted_video_processor_helper.ts b/ash/webui/camera_app_ui/resources/js/untrusted_video_processor_helper.ts index 41d818be..fe5b049 100644 --- a/ash/webui/camera_app_ui/resources/js/untrusted_video_processor_helper.ts +++ b/ash/webui/camera_app_ui/resources/js/untrusted_video_processor_helper.ts
@@ -23,10 +23,11 @@ * Connects the |port| to worker which exposes the video processor. */ async function connectToWorker(port: MessagePort): Promise<void> { - /** + /* * TODO(pihsun): TypeScript only supports string|URL instead of * TrustedScriptURL as parameter to Worker. */ + // eslint-disable-next-line @typescript-eslint/consistent-type-assertions const trustedURL = mp4VideoProcessorURL as unknown as URL; // TODO(pihsun): actually get correct type from the function definition.
diff --git a/ash/webui/camera_app_ui/resources/js/util.ts b/ash/webui/camera_app_ui/resources/js/util.ts index 65ebf56..39bd420b 100644 --- a/ash/webui/camera_app_ui/resources/js/util.ts +++ b/ash/webui/camera_app_ui/resources/js/util.ts
@@ -141,6 +141,9 @@ } function isSupportedKeyboardKey(key: string): key is KeyboardKey { + // This is to workaround current TypeScript limitation on Set.has. + // See https://github.com/microsoft/TypeScript/issues/26255 + // eslint-disable-next-line @typescript-eslint/consistent-type-assertions return KEYBOARD_KEY_SET.has(key as KeyboardKey); } @@ -357,6 +360,9 @@ !Object.values<string>(enumType).includes(value)) { return null; } + // The value is already checked that it's a member of the enum above, so it's + // safe to cast it to the enum. + // eslint-disable-next-line @typescript-eslint/consistent-type-assertions return value as T; } @@ -512,3 +518,27 @@ this.videoElement.cancelVideoFrameCallback(this.callbackId); } } + +/** + * Returns whether a FileSystemHandle is FileSystemFileHandle. + * + * This is needed since the type FileSystemHandle isn't a discriminated union + * now. + * See https://github.com/microsoft/TypeScript-DOM-lib-generator/issues/1494. + */ +export function isFileSystemFileHandle(handle: FileSystemHandle): + handle is FileSystemFileHandle { + return handle.kind === 'file'; +} + +/** + * Returns whether a FileSystemHandle is FileSystemDirectoryHandle. + * + * This is needed since the type FileSystemHandle isn't a discriminated union + * now. + * See https://github.com/microsoft/TypeScript-DOM-lib-generator/issues/1494. + */ +export function isFileSystemDirectoryHandle(handle: FileSystemHandle): + handle is FileSystemDirectoryHandle { + return handle.kind === 'directory'; +}
diff --git a/ash/webui/camera_app_ui/resources/js/views/camera_intent.ts b/ash/webui/camera_app_ui/resources/js/views/camera_intent.ts index a3739c97..95b989e 100644 --- a/ash/webui/camera_app_ui/resources/js/views/camera_intent.ts +++ b/ash/webui/camera_app_ui/resources/js/views/camera_intent.ts
@@ -77,6 +77,7 @@ new review.Option( { label: I18nString.CONFIRM_REVIEW_BUTTON, + icon: 'camera_intent_result_confirm.svg', templateId: 'review-intent-button-template', primary: true, }, @@ -84,6 +85,7 @@ new review.Option( { label: I18nString.CANCEL_REVIEW_BUTTON, + icon: 'camera_intent_result_cancel.svg', templateId: 'review-intent-button-template', }, {exitValue: false}),
diff --git a/ash/webui/camera_app_ui/resources/utils/cca.py b/ash/webui/camera_app_ui/resources/utils/cca.py index 9ee84b3..b547921 100755 --- a/ash/webui/camera_app_ui/resources/utils/cca.py +++ b/ash/webui/camera_app_ui/resources/utils/cca.py
@@ -632,11 +632,6 @@ # This image is only used as -webkit-mask, which needs to have # solid fill color but the fill color itself is not used. 'images/barcode_scan_box_border_mask.svg', - - # SVGs that are not migrated to dynamic color yet. - 'images/camera_focus_aim.svg', - 'images/camera_intent_result_cancel.svg', - 'images/camera_intent_result_confirm.svg', ]
diff --git a/ash/webui/camera_app_ui/resources/views/main.html b/ash/webui/camera_app_ui/resources/views/main.html index ae168f3..a8c61bb 100644 --- a/ash/webui/camera_app_ui/resources/views/main.html +++ b/ash/webui/camera_app_ui/resources/views/main.html
@@ -6,6 +6,7 @@ <head> <title>$i18n{name}</title> <meta charset="utf-8"> + <link rel="stylesheet" href="chrome://theme/typography.css"> <!-- main.css contains all :root styles require to be loaded first. --> <link rel="stylesheet" href="/css/main.css"> <link rel="stylesheet" href="/css/menu.css"> @@ -81,9 +82,8 @@ <div id="preview-grid-vertical"></div> </div> <div id="preview-focus"> - <object id="preview-focus-aim" type="image/svg+xml" - data="/images/camera_focus_aim.svg" - tabindex="-1" hidden></object> + <svg-wrapper id="preview-focus-aim" name="camera_focus_aim.svg" + hidden></svg-wrapper> </div> <div id="preview-document-corner-overlay"> <div class="no-document-toast" tabindex="0" aria-live="polite"
diff --git a/ash/webui/common/resources/i18n_behavior.js b/ash/webui/common/resources/i18n_behavior.js index 424a6fe..6db5b1b 100644 --- a/ash/webui/common/resources/i18n_behavior.js +++ b/ash/webui/common/resources/i18n_behavior.js
@@ -80,7 +80,7 @@ * Polymer bindings that are inner-h-t-m-l, for example. * @param {string} id The ID of the string to translate. * @param {SanitizeInnerHtmlOpts=} opts - * @return {string} + * @return {TrustedHTML} */ i18nAdvanced(id, opts) { opts = opts || {};
diff --git a/ash/webui/common/resources/network/network_nameservers.js b/ash/webui/common/resources/network/network_nameservers.js index fec5473d..0cb3d4d 100644 --- a/ash/webui/common/resources/network/network_nameservers.js +++ b/ash/webui/common/resources/network/network_nameservers.js
@@ -85,8 +85,10 @@ googleNameserversText_: { type: String, value() { - return this.i18nAdvanced( - 'networkNameserversGoogle', {substitutions: [], tags: ['a']}); + return this + .i18nAdvanced( + 'networkNameserversGoogle', {substitutions: [], tags: ['a']}) + .toString(); }, },
diff --git a/ash/webui/common/resources/parse_html_subset.js b/ash/webui/common/resources/parse_html_subset.js index a5bbe0d..bcfd5ed 100644 --- a/ash/webui/common/resources/parse_html_subset.js +++ b/ash/webui/common/resources/parse_html_subset.js
@@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +import {assert, assertNotReached} from './assert.js'; + /** * @typedef {{ * substitutions: (!Array<string>|undefined), @@ -19,12 +21,37 @@ * attributes. * @return {string} */ -export const sanitizeInnerHtml = function(rawString, opts) { +export const sanitizeInnerHtmlInternal = function(rawString, opts) { opts = opts || {}; - return parseHtmlSubset('<b>' + rawString + '</b>', opts.tags, opts.attrs) + return parseHtmlSubset(`<b>${rawString}</b>`, opts.tags, opts.attrs) .firstChild.innerHTML; }; +let sanitizedPolicy = null; + +/** + * Same as |sanitizeInnerHtmlInternal|, but it passes through sanitizedPolicy + * to create a TrustedHTML. + * TrustedTypePolicy: createHTML() takes an optional array but our usage for + * sanitizeInnerHtml uses a singular opt argument. We specify the first element. + * @param {string} rawString The unsanitized string + * @param {SanitizeInnerHtmlOpts=} opts Optional additional allowed tags and + * attributes. + * @return {TrustedHTML} + */ +export function sanitizeInnerHtml(rawString, opts) { + assert(window.trustedTypes); + if (sanitizedPolicy === null) { + // Initialize |sanitizedPolicy| lazily. + sanitizedPolicy = window.trustedTypes.createPolicy('sanitize-inner-html', { + createHTML: (string, ...opts) => + sanitizeInnerHtmlInternal(string, opts[0]), + createScript: (message) => assertNotReached(message), + createScriptURL: (message) => assertNotReached(message), + }); + } + return sanitizedPolicy.createHTML(rawString, opts); +} /** * Parses a very small subset of HTML. This ensures that insecure HTML /
diff --git a/ash/webui/help_app_ui/help_app_page_handler.cc b/ash/webui/help_app_ui/help_app_page_handler.cc index e66e4e8..bf6c58ad 100644 --- a/ash/webui/help_app_ui/help_app_page_handler.cc +++ b/ash/webui/help_app_ui/help_app_page_handler.cc
@@ -58,8 +58,10 @@ help_app_ui_->delegate()->GetDeviceInfo(std::move(callback)); } -void HelpAppPageHandler::OpenUrlInBrowser(const GURL& url) { - auto error_message = help_app_ui_->delegate()->OpenUrlInBrowser(url); +void HelpAppPageHandler::OpenUrlInBrowserAndTriggerInstallDialog( + const GURL& url) { + auto error_message = + help_app_ui_->delegate()->OpenUrlInBrowserAndTriggerInstallDialog(url); if (error_message.has_value()) { receiver_.ReportBadMessage(error_message.value()); }
diff --git a/ash/webui/help_app_ui/help_app_page_handler.h b/ash/webui/help_app_ui/help_app_page_handler.h index 1e170ec..bc8b261d 100644 --- a/ash/webui/help_app_ui/help_app_page_handler.h +++ b/ash/webui/help_app_ui/help_app_page_handler.h
@@ -37,7 +37,7 @@ void MaybeShowDiscoverNotification() override; void MaybeShowReleaseNotesNotification() override; void GetDeviceInfo(GetDeviceInfoCallback callback) override; - void OpenUrlInBrowser(const GURL& url) override; + void OpenUrlInBrowserAndTriggerInstallDialog(const GURL& url) override; private: mojo::Receiver<help_app::mojom::PageHandler> receiver_;
diff --git a/ash/webui/help_app_ui/help_app_ui.mojom b/ash/webui/help_app_ui/help_app_ui.mojom index 0907cae..9f3509a9 100644 --- a/ash/webui/help_app_ui/help_app_ui.mojom +++ b/ash/webui/help_app_ui/help_app_ui.mojom
@@ -56,7 +56,9 @@ GetDeviceInfo() => (DeviceInfo device_info); // Opens a valid https:// URL in a new browser tab without getting intercepted - // by URL capturing logic. Failure to provide a valid https:// URL will cause - // the Help app renderer process to crash. - OpenUrlInBrowser(url.mojom.Url url); + // by URL capturing logic. If the "HelpAppAutoTriggerInstallDialog" feature + // flag is enabled, this will automatically trigger the install dialog. + // Failure to provide a valid https:// URL will cause the Help app renderer + // process to crash. + OpenUrlInBrowserAndTriggerInstallDialog(url.mojom.Url url); };
diff --git a/ash/webui/help_app_ui/help_app_ui_delegate.h b/ash/webui/help_app_ui/help_app_ui_delegate.h index 9ade77a..3ce981d 100644 --- a/ash/webui/help_app_ui/help_app_ui_delegate.h +++ b/ash/webui/help_app_ui/help_app_ui_delegate.h
@@ -47,9 +47,12 @@ ash::help_app::mojom::PageHandler::GetDeviceInfoCallback callback) = 0; // Opens a valid https:// URL in a new browser tab without getting intercepted - // by URL capturing logic. Failure to provide a valid https:// URL will cause - // the Help app renderer process to crash. - virtual absl::optional<std::string> OpenUrlInBrowser(const GURL& url) = 0; + // by URL capturing logic. If the "HelpAppAutoTriggerInstallDialog" feature + // flag is enabled, this will automatically trigger the install dialog. + // Failure to provide a valid https:// URL will cause the Help app renderer + // process to crash. + virtual absl::optional<std::string> OpenUrlInBrowserAndTriggerInstallDialog( + const GURL& url) = 0; }; } // namespace ash
diff --git a/ash/webui/help_app_ui/resources/browser_proxy.js b/ash/webui/help_app_ui/resources/browser_proxy.js index 9e83dab..1c5d1c69b 100644 --- a/ash/webui/help_app_ui/resources/browser_proxy.js +++ b/ash/webui/help_app_ui/resources/browser_proxy.js
@@ -306,9 +306,10 @@ return (await help_app.handler.getDeviceInfo()).deviceInfo; }); -guestMessagePipe.registerHandler(Message.OPEN_URL_IN_BROWSER, (url) => { - help_app.handler.openUrlInBrowser(toUrl(url)); -}); +guestMessagePipe.registerHandler( + Message.OPEN_URL_IN_BROWSER_AND_TRIGGER_INSTALL_DIALOG, (url) => { + help_app.handler.openUrlInBrowserAndTriggerInstallDialog(toUrl(url)); + }); /** * Compare two positions by their start index. Use for sorting.
diff --git a/ash/webui/help_app_ui/resources/help_app.externs.js b/ash/webui/help_app_ui/resources/help_app.externs.js index e685575..923bc58 100644 --- a/ash/webui/help_app_ui/resources/help_app.externs.js +++ b/ash/webui/help_app_ui/resources/help_app.externs.js
@@ -273,12 +273,15 @@ /** * Opens a valid https:// URL in a new browser tab without getting intercepted - * by URL capturing logic. Failure to provide a valid https:// URL will cause - * the Help app renderer process to crash. + * by URL capturing logic. If the "HelpAppAutoTriggerInstallDialog" feature flag + * is enabled, this will automatically trigger the install dialog. + * Failure to provide a valid https:// URL will cause the Help app renderer + * process to crash. * @param {string} url * @return {!Promise<undefined>} */ -helpApp.ClientApiDelegate.prototype.openUrlInBrowser = function(url) {}; +helpApp.ClientApiDelegate.prototype.openUrlInBrowserAndTriggerInstallDialog = + function(url) {}; /** * Launch data that can be read by the app when it first loads.
diff --git a/ash/webui/help_app_ui/resources/message_types.js b/ash/webui/help_app_ui/resources/message_types.js index 0361c470..f78a242 100644 --- a/ash/webui/help_app_ui/resources/message_types.js +++ b/ash/webui/help_app_ui/resources/message_types.js
@@ -23,5 +23,6 @@ MAYBE_SHOW_RELEASE_NOTES_NOTIFICATION: 'maybe-show-release-notes-notification', GET_DEVICE_INFO: 'get-device-info', - OPEN_URL_IN_BROWSER: 'open-url-in-browser', + OPEN_URL_IN_BROWSER_AND_TRIGGER_INSTALL_DIALOG: + 'open-url-in-browser-and-trigger-install-dialog', };
diff --git a/ash/webui/help_app_ui/resources/receiver.js b/ash/webui/help_app_ui/resources/receiver.js index 13e8f0e..e6962d3 100644 --- a/ash/webui/help_app_ui/resources/receiver.js +++ b/ash/webui/help_app_ui/resources/receiver.js
@@ -79,8 +79,9 @@ * @override * @param {string} url */ - async openUrlInBrowser(url) { - await parentMessagePipe.sendMessage(Message.OPEN_URL_IN_BROWSER, url); + async openUrlInBrowserAndTriggerInstallDialog(url) { + await parentMessagePipe.sendMessage( + Message.OPEN_URL_IN_BROWSER_AND_TRIGGER_INSTALL_DIALOG, url); }, };
diff --git a/ash/webui/personalization_app/resources/js/personalization_main_element.html b/ash/webui/personalization_app/resources/js/personalization_main_element.html index 19629cc..5cd6d38 100644 --- a/ash/webui/personalization_app/resources/js/personalization_main_element.html +++ b/ash/webui/personalization_app/resources/js/personalization_main_element.html
@@ -38,7 +38,7 @@ :host-context(body.jelly-enabled) #container { grid-template-columns: 1fr 24px minmax(500px, 1020px) 24px 1fr; - grid-template-rows: 132px 1fr auto 24px; + grid-template-rows: 132px auto 1fr auto 24px; } :host-context(body.jelly-enabled) #middle {
diff --git a/ash/wm/tablet_mode/tablet_mode_window_manager_unittest.cc b/ash/wm/tablet_mode/tablet_mode_window_manager_unittest.cc index c9b592e..f2e0436 100644 --- a/ash/wm/tablet_mode/tablet_mode_window_manager_unittest.cc +++ b/ash/wm/tablet_mode/tablet_mode_window_manager_unittest.cc
@@ -1140,6 +1140,38 @@ EXPECT_FALSE(window_state->IsPinned()); } +TEST_F(TabletModeWindowManagerTest, KeepPinnedModeOn_Case5) { + std::unique_ptr<aura::Window> w1(CreateWindow( + aura::client::WINDOW_TYPE_NORMAL, gfx::Rect(20, 140, 100, 100))); + WindowState* window_state = WindowState::Get(w1.get()); + EXPECT_FALSE(window_state->IsPinned()); + + CreateTabletModeWindowManager(); + EXPECT_FALSE(window_state->IsPinned()); + + // Pin the window. + { + WMEvent event(WM_EVENT_PIN); + window_state->OnWMEvent(&event); + } + EXPECT_TRUE(window_state->IsPinned()); + + // Trigger ADDED_TO_WORKSPACE event. + { + WMEvent event(WM_EVENT_ADDED_TO_WORKSPACE); + window_state->OnWMEvent(&event); + } + EXPECT_TRUE(window_state->IsPinned()); + + // Then unpin. + window_state->Restore(); + EXPECT_FALSE(window_state->IsPinned()); + + // Exit tablet mode. + DestroyTabletModeWindowManager(); + EXPECT_FALSE(window_state->IsPinned()); +} + // Verifies that if a window is un-full-screened while in tablet mode, // other changes to that window's state (such as minimizing it) are // preserved upon exiting tablet mode.
diff --git a/ash/wm/tablet_mode/tablet_mode_window_state.cc b/ash/wm/tablet_mode/tablet_mode_window_state.cc index 3ab4d02..7796b3ad 100644 --- a/ash/wm/tablet_mode/tablet_mode_window_state.cc +++ b/ash/wm/tablet_mode/tablet_mode_window_state.cc
@@ -401,17 +401,13 @@ break; } case WM_EVENT_ADDED_TO_WORKSPACE: - if (current_state_type_ != WindowStateType::kMaximized && - current_state_type_ != WindowStateType::kFullscreen && - current_state_type_ != WindowStateType::kMinimized) { - // If an already snapped window gets added to the workspace it should - // not be maximized, rather retain its previous state. - const WindowStateType new_state = - chromeos::IsSnappedWindowStateType(current_state_type_) - ? window_state->GetStateType() - : window_state->GetMaximizedOrCenteredWindowType(); - UpdateWindow(window_state, new_state, /*animate=*/true); - } + // Update the window to maximized or centered if it cannot maximize. + // If an already snapped window or pinned window gets added to the + // workspace, the window should not be forced maximized, rather retain + // its previous state. + UpdateWindow(window_state, + AdjustStateForTabletMode(window_state, current_state_type_), + /*animate=*/true); break; case WM_EVENT_WORKAREA_BOUNDS_CHANGED: if (current_state_type_ != WindowStateType::kMinimized) @@ -536,6 +532,17 @@ : window_state->GetMaximizedOrCenteredWindowType(); } +WindowStateType TabletModeWindowState::AdjustStateForTabletMode( + WindowState* window_state, + WindowStateType current_state_type) { + if (chromeos::IsSnappedWindowStateType(current_state_type) || + chromeos::IsPinnedWindowStateType(current_state_type)) { + return window_state->GetStateType(); + } + + return window_state->GetMaximizedOrCenteredWindowType(); +} + void TabletModeWindowState::UpdateBounds( WindowState* window_state, chromeos::WindowStateType previous_state,
diff --git a/ash/wm/tablet_mode/tablet_mode_window_state.h b/ash/wm/tablet_mode/tablet_mode_window_state.h index 832f5fbe..bb01ee94 100644 --- a/ash/wm/tablet_mode/tablet_mode_window_state.h +++ b/ash/wm/tablet_mode/tablet_mode_window_state.h
@@ -86,6 +86,14 @@ WindowState* window_state, chromeos::WindowStateType target_state); + // If `target_state` is PRIMARY/SECONDARY_SNAPPED or TRUSTED_PINNED/PINNED, + // returns `target_state`. Otherwise depending on the capabilities of the + // window either returns `WindowStateType::kMaximized` or + // `WindowStateType::kNormal`. + chromeos::WindowStateType AdjustStateForTabletMode( + WindowState* window_state, + chromeos::WindowStateType target_state); + // Updates the bounds to the maximum possible bounds according to the current // window state. If `animate` is set we animate the change. void UpdateBounds(WindowState* window_state,
diff --git a/base/BUILD.gn b/base/BUILD.gn index f27ebd6..8354efe 100644 --- a/base/BUILD.gn +++ b/base/BUILD.gn
@@ -429,6 +429,7 @@ "memory/raw_ptr_asan_hooks.h", "memory/raw_ptr_asan_service.cc", "memory/raw_ptr_asan_service.h", + "memory/raw_ptr_cast.h", "memory/raw_ptr_exclusion.h", "memory/raw_ref.h", "memory/raw_scoped_refptr_mismatch_checker.h",
diff --git a/base/allocator/dispatcher/dispatcher_unittest.cc b/base/allocator/dispatcher/dispatcher_unittest.cc index cc9028e..2f24242 100644 --- a/base/allocator/dispatcher/dispatcher_unittest.cc +++ b/base/allocator/dispatcher/dispatcher_unittest.cc
@@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "base/allocator/partition_allocator/partition_root.h" #include "testing/gtest/include/gtest/gtest.h" #include "base/allocator/buildflags.h" @@ -108,14 +109,8 @@ } private: - ThreadSafePartitionRoot alloc_{{ - PartitionOptions::AlignedAlloc::kDisallowed, - PartitionOptions::ThreadCache::kDisabled, - PartitionOptions::Quarantine::kDisallowed, - PartitionOptions::Cookie::kAllowed, - PartitionOptions::BackupRefPtr::kDisabled, - PartitionOptions::BackupRefPtrZapping::kDisabled, - PartitionOptions::UseConfigurablePool::kNo, + ThreadSafePartitionRoot alloc_{PartitionOptions{ + .cookie = PartitionOptions::Cookie::kAllowed, }}; };
diff --git a/base/allocator/early_zone_registration_mac.cc b/base/allocator/early_zone_registration_mac.cc index a4eb1a2..5cf4e92 100644 --- a/base/allocator/early_zone_registration_mac.cc +++ b/base/allocator/early_zone_registration_mac.cc
@@ -40,8 +40,9 @@ vm_address_t* zones = nullptr; kern_return_t result = malloc_get_all_zones(mach_task_self(), nullptr, &zones, &zone_count); - if (result != KERN_SUCCESS) + if (result != KERN_SUCCESS) { abort_report_np("Cannot enumerate malloc() zones"); + } return reinterpret_cast<malloc_zone_t*>(zones[0]); } @@ -233,8 +234,9 @@ // |g_delegating_zone|...|g_default_zone|purgeable_zone| // Sanity check. - if (GetDefaultMallocZone() != &g_delegating_zone) + if (GetDefaultMallocZone() != &g_delegating_zone) { abort_report_np("Failed to install the delegating zone as default."); + } } void AllowDoublePartitionAllocZoneRegistration() { @@ -242,8 +244,9 @@ vm_address_t* zones = nullptr; kern_return_t result = malloc_get_all_zones(mach_task_self(), nullptr, &zones, &zone_count); - if (result != KERN_SUCCESS) + if (result != KERN_SUCCESS) { abort_report_np("Cannot enumerate malloc() zones"); + } // If PartitionAlloc is one of the zones, *change* its name so that // registration can happen multiple times. This works because zone
diff --git a/base/allocator/partition_allocator/BUILD.gn b/base/allocator/partition_allocator/BUILD.gn index fee85f9..217dfa6 100644 --- a/base/allocator/partition_allocator/BUILD.gn +++ b/base/allocator/partition_allocator/BUILD.gn
@@ -370,6 +370,7 @@ check_includes = use_partition_alloc public = [ "pointers/raw_ptr.h", + "pointers/raw_ptr_cast.h", "pointers/raw_ptr_exclusion.h", "pointers/raw_ref.h", ]
diff --git a/base/allocator/partition_allocator/compressed_pointer_unittest.cc b/base/allocator/partition_allocator/compressed_pointer_unittest.cc index 2cf5548..f7f1c5b 100644 --- a/base/allocator/partition_allocator/compressed_pointer_unittest.cc +++ b/base/allocator/partition_allocator/compressed_pointer_unittest.cc
@@ -6,6 +6,7 @@ #include "base/allocator/partition_allocator/partition_alloc.h" #include "base/allocator/partition_allocator/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/partition_root.h" #include "testing/gtest/include/gtest/gtest.h" namespace partition_alloc { @@ -84,15 +85,7 @@ using PointerType = UncompressedPointer<T>; #endif // BUILDFLAG(ENABLE_POINTER_COMPRESSION) - CompressedPointerTest() { - allocator_.init({PartitionOptions::AlignedAlloc::kDisallowed, - PartitionOptions::ThreadCache::kDisabled, - PartitionOptions::Quarantine::kDisallowed, - PartitionOptions::Cookie::kDisallowed, - PartitionOptions::BackupRefPtr::kDisabled, - PartitionOptions::BackupRefPtrZapping::kDisabled, - PartitionOptions::UseConfigurablePool::kNo}); - } + CompressedPointerTest() { allocator_.init(PartitionOptions{}); } protected: internal::PartitionAllocator<internal::ThreadSafe> allocator_;
diff --git a/base/allocator/partition_allocator/freeslot_bitmap.h b/base/allocator/partition_allocator/freeslot_bitmap.h index 56ab4494..f86ef59 100644 --- a/base/allocator/partition_allocator/freeslot_bitmap.h +++ b/base/allocator/partition_allocator/freeslot_bitmap.h
@@ -137,4 +137,4 @@ #endif // BUILDFLAG(USE_FREESLOT_BITMAP) -#endif // BASE_ALLOCATOR_PARTITION_ALLOCATOR_FREESLOT_BITMAP_H_ \ No newline at end of file +#endif // BASE_ALLOCATOR_PARTITION_ALLOCATOR_FREESLOT_BITMAP_H_
diff --git a/base/allocator/partition_allocator/freeslot_bitmap_unittest.cc b/base/allocator/partition_allocator/freeslot_bitmap_unittest.cc index 2edd94d..318c1f2 100644 --- a/base/allocator/partition_allocator/freeslot_bitmap_unittest.cc +++ b/base/allocator/partition_allocator/freeslot_bitmap_unittest.cc
@@ -13,6 +13,7 @@ #include "base/allocator/partition_allocator/partition_alloc_constants.h" #include "base/allocator/partition_allocator/partition_alloc_forward.h" #include "base/allocator/partition_allocator/partition_page.h" +#include "base/allocator/partition_allocator/partition_root.h" #include "testing/gtest/include/gtest/gtest.h" // This test is disabled when MEMORY_TOOL_REPLACES_ALLOCATOR is defined because @@ -33,14 +34,8 @@ // Allocates memory and creates a pseudo superpage in it. We need to // allocate |2 * kSuperPageSize| so that a whole superpage is contained in // the allocated region. - allocator_.init({ - PartitionOptions::AlignedAlloc::kDisallowed, - PartitionOptions::ThreadCache::kDisabled, - PartitionOptions::Quarantine::kDisallowed, - PartitionOptions::Cookie::kAllowed, - PartitionOptions::BackupRefPtr::kDisabled, - PartitionOptions::BackupRefPtrZapping::kDisabled, - PartitionOptions::UseConfigurablePool::kNo, + allocator_.init(PartitionOptions{ + .cookie = PartitionOptions::Cookie::kAllowed, }); allocated_ptr_ = reinterpret_cast<uintptr_t>( allocator_.root()->Alloc(2 * kSuperPageSize, ""));
diff --git a/base/allocator/partition_allocator/gwp_asan_support.cc b/base/allocator/partition_allocator/gwp_asan_support.cc index 6146947..9da606a 100644 --- a/base/allocator/partition_allocator/gwp_asan_support.cc +++ b/base/allocator/partition_allocator/gwp_asan_support.cc
@@ -25,13 +25,7 @@ PA_CHECK(slot_count > 0); constexpr PartitionOptions kConfig{ - PartitionOptions::AlignedAlloc::kDisallowed, - PartitionOptions::ThreadCache::kDisabled, - PartitionOptions::Quarantine::kDisallowed, - PartitionOptions::Cookie::kDisallowed, - PartitionOptions::BackupRefPtr::kEnabled, - PartitionOptions::BackupRefPtrZapping::kDisabled, - PartitionOptions::UseConfigurablePool::kNo, + .backup_ref_ptr = PartitionOptions::BackupRefPtr::kEnabled, }; static internal::base::NoDestructor<ThreadSafePartitionRoot> root(kConfig);
diff --git a/base/allocator/partition_allocator/hardening_unittest.cc b/base/allocator/partition_allocator/hardening_unittest.cc index b69721c..27d1343 100644 --- a/base/allocator/partition_allocator/hardening_unittest.cc +++ b/base/allocator/partition_allocator/hardening_unittest.cc
@@ -27,14 +27,8 @@ std::string important_data("very important"); char* to_corrupt = const_cast<char*>(important_data.c_str()); - PartitionRoot<ThreadSafe> root({ - PartitionOptions::AlignedAlloc::kAllowed, - PartitionOptions::ThreadCache::kDisabled, - PartitionOptions::Quarantine::kDisallowed, - PartitionOptions::Cookie::kDisallowed, - PartitionOptions::BackupRefPtr::kDisabled, - PartitionOptions::BackupRefPtrZapping::kDisabled, - PartitionOptions::UseConfigurablePool::kNo, + PartitionRoot<ThreadSafe> root(PartitionOptions{ + .aligned_alloc = PartitionOptions::AlignedAlloc::kAllowed, }); root.UncapEmptySlotSpanMemoryForTesting(); @@ -58,14 +52,8 @@ std::string important_data("very important"); char* to_corrupt = const_cast<char*>(important_data.c_str()); - PartitionRoot<ThreadSafe> root({ - PartitionOptions::AlignedAlloc::kAllowed, - PartitionOptions::ThreadCache::kDisabled, - PartitionOptions::Quarantine::kDisallowed, - PartitionOptions::Cookie::kDisallowed, - PartitionOptions::BackupRefPtr::kDisabled, - PartitionOptions::BackupRefPtrZapping::kDisabled, - PartitionOptions::UseConfigurablePool::kNo, + PartitionRoot<ThreadSafe> root(PartitionOptions{ + .aligned_alloc = PartitionOptions::AlignedAlloc::kAllowed, }); root.UncapEmptySlotSpanMemoryForTesting(); @@ -85,14 +73,8 @@ } TEST(HardeningTest, MetadataPointerCrashing) { - PartitionRoot<ThreadSafe> root({ - PartitionOptions::AlignedAlloc::kAllowed, - PartitionOptions::ThreadCache::kDisabled, - PartitionOptions::Quarantine::kDisallowed, - PartitionOptions::Cookie::kDisallowed, - PartitionOptions::BackupRefPtr::kDisabled, - PartitionOptions::BackupRefPtrZapping::kDisabled, - PartitionOptions::UseConfigurablePool::kNo, + PartitionRoot<ThreadSafe> root(PartitionOptions{ + .aligned_alloc = PartitionOptions::AlignedAlloc::kAllowed, }); root.UncapEmptySlotSpanMemoryForTesting(); @@ -118,14 +100,8 @@ #if !BUILDFLAG(IS_ANDROID) TEST(HardeningTest, SuccessfulCorruption) { - PartitionRoot<ThreadSafe> root({ - PartitionOptions::AlignedAlloc::kAllowed, - PartitionOptions::ThreadCache::kDisabled, - PartitionOptions::Quarantine::kDisallowed, - PartitionOptions::Cookie::kDisallowed, - PartitionOptions::BackupRefPtr::kDisabled, - PartitionOptions::BackupRefPtrZapping::kDisabled, - PartitionOptions::UseConfigurablePool::kNo, + PartitionRoot<ThreadSafe> root(PartitionOptions{ + .aligned_alloc = PartitionOptions::AlignedAlloc::kAllowed, }); root.UncapEmptySlotSpanMemoryForTesting();
diff --git a/base/allocator/partition_allocator/memory_reclaimer_unittest.cc b/base/allocator/partition_allocator/memory_reclaimer_unittest.cc index 8c04f16..ea956818 100644 --- a/base/allocator/partition_allocator/memory_reclaimer_unittest.cc +++ b/base/allocator/partition_allocator/memory_reclaimer_unittest.cc
@@ -46,13 +46,8 @@ allocator_ = std::make_unique<PartitionAllocatorForTesting>(PartitionOptions{ - PartitionOptions::AlignedAlloc::kDisallowed, - PartitionOptions::ThreadCache::kDisabled, - PartitionOptions::Quarantine::kAllowed, - PartitionOptions::Cookie::kAllowed, - PartitionOptions::BackupRefPtr::kDisabled, - PartitionOptions::BackupRefPtrZapping::kDisabled, - PartitionOptions::UseConfigurablePool::kNo, + .quarantine = PartitionOptions::Quarantine::kAllowed, + .cookie = PartitionOptions::Cookie::kAllowed, }); allocator_->root()->UncapEmptySlotSpanMemoryForTesting(); PartitionAllocGlobalInit(HandleOOM);
diff --git a/base/allocator/partition_allocator/partition_alloc_perftest.cc b/base/allocator/partition_allocator/partition_alloc_perftest.cc index c002aed..6cb49ec 100644 --- a/base/allocator/partition_allocator/partition_alloc_perftest.cc +++ b/base/allocator/partition_allocator/partition_alloc_perftest.cc
@@ -16,6 +16,7 @@ #include "base/allocator/partition_allocator/partition_alloc_base/time/time.h" #include "base/allocator/partition_allocator/partition_alloc_check.h" #include "base/allocator/partition_allocator/partition_alloc_for_testing.h" +#include "base/allocator/partition_allocator/partition_root.h" #include "base/allocator/partition_allocator/thread_cache.h" #include "base/debug/debugging_buildflags.h" #include "base/timer/lap_timer.h" @@ -100,14 +101,8 @@ void Free(void* data) override { ThreadSafePartitionRoot::FreeNoHooks(data); } private: - ThreadSafePartitionRoot alloc_{{ - PartitionOptions::AlignedAlloc::kDisallowed, - PartitionOptions::ThreadCache::kDisabled, - PartitionOptions::Quarantine::kDisallowed, - PartitionOptions::Cookie::kAllowed, - PartitionOptions::BackupRefPtr::kDisabled, - PartitionOptions::BackupRefPtrZapping::kDisabled, - PartitionOptions::UseConfigurablePool::kNo, + ThreadSafePartitionRoot alloc_{PartitionOptions{ + .cookie = PartitionOptions::Cookie::kAllowed, }}; }; @@ -132,17 +127,10 @@ private: static constexpr partition_alloc::PartitionOptions kOpts = { - PartitionOptions::AlignedAlloc::kDisallowed, #if !BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) - PartitionOptions::ThreadCache::kEnabled, -#else - PartitionOptions::ThreadCache::kDisabled, -#endif // BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) - PartitionOptions::Quarantine::kDisallowed, - PartitionOptions::Cookie::kAllowed, - PartitionOptions::BackupRefPtr::kDisabled, - PartitionOptions::BackupRefPtrZapping::kDisabled, - PartitionOptions::UseConfigurablePool::kNo, + .thread_cache = PartitionOptions::ThreadCache::kEnabled, +#endif + .cookie = PartitionOptions::Cookie::kAllowed, }; PartitionAllocatorForTesting<internal::ThreadSafe, internal::DisallowLeaks> allocator_{kOpts}; @@ -174,14 +162,8 @@ private: bool const register_hooks_; - ThreadSafePartitionRoot alloc_{{ - PartitionOptions::AlignedAlloc::kDisallowed, - PartitionOptions::ThreadCache::kDisabled, - PartitionOptions::Quarantine::kDisallowed, - PartitionOptions::Cookie::kAllowed, - PartitionOptions::BackupRefPtr::kDisabled, - PartitionOptions::BackupRefPtrZapping::kDisabled, - PartitionOptions::UseConfigurablePool::kNo, + ThreadSafePartitionRoot alloc_{PartitionOptions{ + .cookie = PartitionOptions::Cookie::kAllowed, }}; ::base::allocator::dispatcher::Dispatcher& dispatcher_ = ::base::allocator::dispatcher::Dispatcher::GetInstance();
diff --git a/base/allocator/partition_allocator/partition_alloc_unittest.cc b/base/allocator/partition_allocator/partition_alloc_unittest.cc index 985c1eb..c7b0305 100644 --- a/base/allocator/partition_allocator/partition_alloc_unittest.cc +++ b/base/allocator/partition_allocator/partition_alloc_unittest.cc
@@ -322,51 +322,33 @@ // other pools still work. As part of the initializition, we tag some memory // with the new pkey, effectively making it read-only. So there's some // potential for breakage that this should catch. - pkey_allocator.init({ - partition_alloc::PartitionOptions::AlignedAlloc::kAllowed, - partition_alloc::PartitionOptions::ThreadCache::kDisabled, - partition_alloc::PartitionOptions::Quarantine::kDisallowed, - partition_alloc::PartitionOptions::Cookie::kAllowed, - partition_alloc::PartitionOptions::BackupRefPtr::kDisabled, - partition_alloc::PartitionOptions::BackupRefPtrZapping::kDisabled, - partition_alloc::PartitionOptions::UseConfigurablePool::kNo, - partition_alloc::ThreadIsolationOption(pkey_), + pkey_allocator.init(PartitionOptions{ + .aligned_alloc = PartitionOptions::AlignedAlloc::kAllowed, + .cookie = PartitionOptions::Cookie::kAllowed, + .thread_isolation = ThreadIsolationOption(pkey_), }); if (UseThreadIsolatedPool() && pkey_ != kInvalidPkey) { - allocator.init({ - partition_alloc::PartitionOptions::AlignedAlloc::kAllowed, - partition_alloc::PartitionOptions::ThreadCache::kDisabled, - partition_alloc::PartitionOptions::Quarantine::kDisallowed, - partition_alloc::PartitionOptions::Cookie::kAllowed, - partition_alloc::PartitionOptions::BackupRefPtr::kDisabled, - partition_alloc::PartitionOptions::BackupRefPtrZapping::kDisabled, - partition_alloc::PartitionOptions::UseConfigurablePool::kNo, - partition_alloc::ThreadIsolationOption(pkey_), + allocator.init(PartitionOptions{ + .aligned_alloc = PartitionOptions::AlignedAlloc::kAllowed, + .cookie = PartitionOptions::Cookie::kAllowed, + .thread_isolation = ThreadIsolationOption(pkey_), }); return; } #endif // BUILDFLAG(ENABLE_PKEYS) - allocator.init({ + allocator.init(PartitionOptions { #if !BUILDFLAG(ENABLE_BACKUP_REF_PTR_SUPPORT) || \ BUILDFLAG(PUT_REF_COUNT_IN_PREVIOUS_SLOT) // AlignedAllocWithFlags() can't be called when BRP is in the "before // allocation" mode, because this mode adds extras before the allocation. // Extras after the allocation are ok. - PartitionOptions::AlignedAlloc::kAllowed, -#else - PartitionOptions::AlignedAlloc::kDisallowed, + .aligned_alloc = PartitionOptions::AlignedAlloc::kAllowed, #endif - PartitionOptions::ThreadCache::kDisabled, - PartitionOptions::Quarantine::kDisallowed, - PartitionOptions::Cookie::kAllowed, + .cookie = PartitionOptions::Cookie::kAllowed, #if BUILDFLAG(ENABLE_BACKUP_REF_PTR_SUPPORT) - PartitionOptions::BackupRefPtr::kEnabled, - PartitionOptions::BackupRefPtrZapping::kEnabled, -#else - PartitionOptions::BackupRefPtr::kDisabled, - PartitionOptions::BackupRefPtrZapping::kDisabled, + .backup_ref_ptr = PartitionOptions::BackupRefPtr::kEnabled, + .backup_ref_ptr_zapping = PartitionOptions::BackupRefPtrZapping::kEnabled, #endif - PartitionOptions::UseConfigurablePool::kNo, }); } @@ -380,14 +362,8 @@ PartitionAllocGlobalInit(HandleOOM); InitializeAllocator(); - aligned_allocator.init({ - PartitionOptions::AlignedAlloc::kAllowed, - PartitionOptions::ThreadCache::kDisabled, - PartitionOptions::Quarantine::kDisallowed, - PartitionOptions::Cookie::kDisallowed, - PartitionOptions::BackupRefPtr::kDisabled, - PartitionOptions::BackupRefPtrZapping::kDisabled, - PartitionOptions::UseConfigurablePool::kNo, + aligned_allocator.init(PartitionOptions{ + .aligned_alloc = PartitionOptions::AlignedAlloc::kAllowed, }); test_bucket_index_ = SizeToIndex(RealAllocSize()); allocator.root()->UncapEmptySlotSpanMemoryForTesting(); @@ -4747,14 +4723,8 @@ // Create new root and call PurgeMemory to simulate ConfigurePartitions(). allocator.root()->PurgeMemory(PurgeFlags::kDecommitEmptySlotSpans | PurgeFlags::kDiscardUnusedSystemPages); - auto* new_root = new PartitionRoot<ThreadSafe>({ - PartitionOptions::AlignedAlloc::kDisallowed, - PartitionOptions::ThreadCache::kDisabled, - PartitionOptions::Quarantine::kDisallowed, - PartitionOptions::Cookie::kAllowed, - PartitionOptions::BackupRefPtr::kDisabled, - PartitionOptions::BackupRefPtrZapping::kDisabled, - PartitionOptions::UseConfigurablePool::kNo, + auto* new_root = new PartitionRoot<ThreadSafe>(PartitionOptions{ + .cookie = PartitionOptions::Cookie::kAllowed, }); SetDistributionForPartitionRoot(new_root, GetBucketDistribution()); @@ -4953,14 +4923,10 @@ EXPECT_TRUE(IsConfigurablePoolAvailable()); - auto* root = new PartitionRoot<ThreadSafe>({ - PartitionOptions::AlignedAlloc::kDisallowed, - PartitionOptions::ThreadCache::kDisabled, - PartitionOptions::Quarantine::kDisallowed, - PartitionOptions::Cookie::kAllowed, - PartitionOptions::BackupRefPtr::kDisabled, - PartitionOptions::BackupRefPtrZapping::kDisabled, - PartitionOptions::UseConfigurablePool::kIfAvailable, + auto* root = new PartitionRoot<ThreadSafe>(PartitionOptions{ + .cookie = PartitionOptions::Cookie::kAllowed, + .use_configurable_pool = + PartitionOptions::UseConfigurablePool::kIfAvailable, }); root->UncapEmptySlotSpanMemoryForTesting(); SetDistributionForPartitionRoot(root, GetBucketDistribution()); @@ -4991,14 +4957,8 @@ // Use another root, since the ones from the test harness disable the empty // slot span size cap. PartitionRoot<ThreadSafe> root; - root.Init({ - PartitionOptions::AlignedAlloc::kDisallowed, - PartitionOptions::ThreadCache::kDisabled, - PartitionOptions::Quarantine::kDisallowed, - PartitionOptions::Cookie::kAllowed, - PartitionOptions::BackupRefPtr::kDisabled, - PartitionOptions::BackupRefPtrZapping::kDisabled, - PartitionOptions::UseConfigurablePool::kNo, + root.Init(PartitionOptions{ + .cookie = PartitionOptions::Cookie::kAllowed, }); SetDistributionForPartitionRoot(&root, GetBucketDistribution()); @@ -5051,14 +5011,10 @@ } TEST_P(PartitionAllocTest, IncreaseEmptySlotSpanRingSize) { - PartitionRoot<ThreadSafe> root({ - PartitionOptions::AlignedAlloc::kDisallowed, - PartitionOptions::ThreadCache::kDisabled, - PartitionOptions::Quarantine::kDisallowed, - PartitionOptions::Cookie::kAllowed, - PartitionOptions::BackupRefPtr::kDisabled, - PartitionOptions::BackupRefPtrZapping::kDisabled, - PartitionOptions::UseConfigurablePool::kIfAvailable, + PartitionRoot<ThreadSafe> root(PartitionOptions{ + .cookie = PartitionOptions::Cookie::kAllowed, + .use_configurable_pool = + PartitionOptions::UseConfigurablePool::kIfAvailable, }); root.UncapEmptySlotSpanMemoryForTesting(); SetDistributionForPartitionRoot(&root, GetBucketDistribution());
diff --git a/base/allocator/partition_allocator/partition_root.h b/base/allocator/partition_allocator/partition_root.h index 2038355..1bf637c 100644 --- a/base/allocator/partition_allocator/partition_root.h +++ b/base/allocator/partition_allocator/partition_root.h
@@ -185,41 +185,13 @@ kIfAvailable, }; - // Constructor to suppress aggregate initialization. - constexpr PartitionOptions( - AlignedAlloc aligned_alloc, - ThreadCache thread_cache, - Quarantine quarantine, - Cookie cookie, - BackupRefPtr backup_ref_ptr, - BackupRefPtrZapping backup_ref_ptr_zapping, - UseConfigurablePool use_configurable_pool -#if BUILDFLAG(ENABLE_THREAD_ISOLATION) - , - ThreadIsolationOption thread_isolation = ThreadIsolationOption() -#endif - ) - : aligned_alloc(aligned_alloc), - thread_cache(thread_cache), - quarantine(quarantine), - cookie(cookie), - backup_ref_ptr(backup_ref_ptr), - backup_ref_ptr_zapping(backup_ref_ptr_zapping), - use_configurable_pool(use_configurable_pool) -#if BUILDFLAG(ENABLE_THREAD_ISOLATION) - , - thread_isolation(thread_isolation) -#endif - { - } - - AlignedAlloc aligned_alloc; - ThreadCache thread_cache; - Quarantine quarantine; - Cookie cookie; - BackupRefPtr backup_ref_ptr; - BackupRefPtrZapping backup_ref_ptr_zapping; - UseConfigurablePool use_configurable_pool; + AlignedAlloc aligned_alloc = AlignedAlloc::kDisallowed; + ThreadCache thread_cache = ThreadCache::kDisabled; + Quarantine quarantine = Quarantine::kDisallowed; + Cookie cookie = Cookie::kDisallowed; + BackupRefPtr backup_ref_ptr = BackupRefPtr::kDisabled; + BackupRefPtrZapping backup_ref_ptr_zapping = BackupRefPtrZapping::kDisabled; + UseConfigurablePool use_configurable_pool = UseConfigurablePool::kNo; #if BUILDFLAG(ENABLE_THREAD_ISOLATION) ThreadIsolationOption thread_isolation; #endif
diff --git a/base/allocator/partition_allocator/pointers/raw_ptr_cast.h b/base/allocator/partition_allocator/pointers/raw_ptr_cast.h new file mode 100644 index 0000000..ad6235d --- /dev/null +++ b/base/allocator/partition_allocator/pointers/raw_ptr_cast.h
@@ -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. + +#ifndef BASE_ALLOCATOR_PARTITION_ALLOCATOR_POINTERS_RAW_PTR_CAST_H_ +#define BASE_ALLOCATOR_PARTITION_ALLOCATOR_POINTERS_RAW_PTR_CAST_H_ + +#include <memory> + +#include <type_traits> +#if defined(__has_builtin) +#define PA_RAWPTR_CAST_USE_BUILTIN_BIT_CAST __has_builtin(__builtin_bit_cast) +#else +#define PA_RAWPTR_CAST_USE_BUILTIN_BIT_CAST 0 +#endif + +#if !PA_RAWPTR_CAST_USE_BUILTIN_BIT_CAST +#include <cstring> +#endif + +// This header is explicitly allowlisted from a clang plugin rule at +// "tools/clang/plugins/FindBadRawPtrPatterns.cpp". You can bypass these checks +// by performing casts explicitly with functions here. +namespace base { + +// Wrapper for |static_cast<T>(src)|. +template <typename Dest, typename Source> +inline constexpr Dest unsafe_raw_ptr_static_cast(Source source) noexcept { + return static_cast<Dest>(source); +} + +// Wrapper for |reinterpret_cast<T>(src)|. +template <typename Dest, typename Source> +inline constexpr Dest unsafe_raw_ptr_reinterpret_cast(Source source) noexcept { + return reinterpret_cast<Dest>(source); +} + +// Wrapper for |std::bit_cast<T>(src)|. +// Though we have similar implementations at |absl::bit_cast| and +// |base::bit_cast|, it is important to perform casting in this file to +// correctly exclude from the check. +template <typename Dest, typename Source> +#if PA_RAWPTR_CAST_USE_BUILTIN_BIT_CAST +inline constexpr std::enable_if_t<sizeof(Dest) == sizeof(Source) && + std::is_trivially_copyable_v<Dest> && + std::is_trivially_copyable_v<Source>, + Dest> +#else +inline std::enable_if_t<sizeof(Dest) == sizeof(Source) && + std::is_trivially_copyable_v<Dest> && + std::is_trivially_copyable_v<Source> && + std::is_default_constructible_v<Dest>, + Dest> +#endif // PA_RAWPTR_CAST_USE_BUILTIN_BIT_CAST +unsafe_raw_ptr_bit_cast(const Source& source) noexcept { + // TODO(mikt): Replace this with |std::bit_cast<T>| when C++20 arrives. +#if PA_RAWPTR_CAST_USE_BUILTIN_BIT_CAST + return __builtin_bit_cast(Dest, source); +#else + Dest dest; + memcpy(std::addressof(dest), std::addressof(source), sizeof(dest)); + return dest; +#endif // PA_RAWPTR_CAST_USE_BUILTIN_BIT_CAST +} + +} // namespace base + +#endif // BASE_ALLOCATOR_PARTITION_ALLOCATOR_POINTERS_RAW_PTR_CAST_H_
diff --git a/base/allocator/partition_allocator/pointers/raw_ptr_unittest.cc b/base/allocator/partition_allocator/pointers/raw_ptr_unittest.cc index 6bf9689..754d2ee 100644 --- a/base/allocator/partition_allocator/pointers/raw_ptr_unittest.cc +++ b/base/allocator/partition_allocator/pointers/raw_ptr_unittest.cc
@@ -1501,8 +1501,7 @@ } // namespace -namespace base { -namespace internal { +namespace base::internal { #if BUILDFLAG(ENABLE_BACKUP_REF_PTR_SUPPORT) && \ !defined(MEMORY_TOOL_REPLACES_ALLOCATOR) @@ -1512,13 +1511,10 @@ } static constexpr partition_alloc::PartitionOptions kOpts = { - partition_alloc::PartitionOptions::AlignedAlloc::kDisallowed, - partition_alloc::PartitionOptions::ThreadCache::kDisabled, - partition_alloc::PartitionOptions::Quarantine::kDisallowed, - partition_alloc::PartitionOptions::Cookie::kAllowed, - partition_alloc::PartitionOptions::BackupRefPtr::kEnabled, - partition_alloc::PartitionOptions::BackupRefPtrZapping::kEnabled, - partition_alloc::PartitionOptions::UseConfigurablePool::kNo, + .cookie = partition_alloc::PartitionOptions::Cookie::kAllowed, + .backup_ref_ptr = partition_alloc::PartitionOptions::BackupRefPtr::kEnabled, + .backup_ref_ptr_zapping = + partition_alloc::PartitionOptions::BackupRefPtrZapping::kEnabled, }; class BackupRefPtrTest : public testing::Test { @@ -2393,5 +2389,4 @@ EXPECT_EQ(instrumentation->dangling_ptr_released(), 1u); } -} // namespace internal -} // namespace base +} // namespace base::internal
diff --git a/base/allocator/partition_allocator/shim/allocator_shim_default_dispatch_to_partition_alloc.cc b/base/allocator/partition_allocator/shim/allocator_shim_default_dispatch_to_partition_alloc.cc index 300c161..50e47e6 100644 --- a/base/allocator/partition_allocator/shim/allocator_shim_default_dispatch_to_partition_alloc.cc +++ b/base/allocator/partition_allocator/shim/allocator_shim_default_dispatch_to_partition_alloc.cc
@@ -157,15 +157,17 @@ // and only one is supported at a time. partition_alloc::PartitionOptions::ThreadCache::kDisabled; #endif // BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) - auto* new_root = new (buffer) partition_alloc::ThreadSafePartitionRoot({ - partition_alloc::PartitionOptions::AlignedAlloc::kAllowed, - thread_cache, - partition_alloc::PartitionOptions::Quarantine::kAllowed, - partition_alloc::PartitionOptions::Cookie::kAllowed, - partition_alloc::PartitionOptions::BackupRefPtr::kDisabled, - partition_alloc::PartitionOptions::BackupRefPtrZapping::kDisabled, - partition_alloc::PartitionOptions::UseConfigurablePool::kNo, - }); + auto* new_root = new (buffer) partition_alloc::ThreadSafePartitionRoot( + partition_alloc::PartitionOptions{ + .aligned_alloc = + partition_alloc::PartitionOptions::AlignedAlloc::kAllowed, + .thread_cache = thread_cache, + .quarantine = + partition_alloc::PartitionOptions::Quarantine::kAllowed, + .cookie = partition_alloc::PartitionOptions::Cookie::kAllowed, + .backup_ref_ptr = + partition_alloc::PartitionOptions::BackupRefPtr::kDisabled, + }); return new_root; } @@ -595,21 +597,26 @@ // shouldn't bite us here. Mentioning just in case we move this code earlier. static partition_alloc::internal::base::NoDestructor< partition_alloc::ThreadSafePartitionRoot> - new_main_partition(partition_alloc::PartitionOptions( - !use_dedicated_aligned_partition - ? partition_alloc::PartitionOptions::AlignedAlloc::kAllowed - : partition_alloc::PartitionOptions::AlignedAlloc::kDisallowed, - partition_alloc::PartitionOptions::ThreadCache::kDisabled, - partition_alloc::PartitionOptions::Quarantine::kAllowed, - partition_alloc::PartitionOptions::Cookie::kAllowed, - enable_brp - ? partition_alloc::PartitionOptions::BackupRefPtr::kEnabled - : partition_alloc::PartitionOptions::BackupRefPtr::kDisabled, - enable_brp_zapping - ? partition_alloc::PartitionOptions::BackupRefPtrZapping::kEnabled - : partition_alloc::PartitionOptions::BackupRefPtrZapping:: - kDisabled, - partition_alloc::PartitionOptions::UseConfigurablePool::kNo)); + new_main_partition(partition_alloc::PartitionOptions{ + .aligned_alloc = + !use_dedicated_aligned_partition + ? partition_alloc::PartitionOptions::AlignedAlloc::kAllowed + : partition_alloc::PartitionOptions::AlignedAlloc:: + kDisallowed, + .thread_cache = + partition_alloc::PartitionOptions::ThreadCache::kDisabled, + .quarantine = partition_alloc::PartitionOptions::Quarantine::kAllowed, + .cookie = partition_alloc::PartitionOptions::Cookie::kAllowed, + .backup_ref_ptr = + enable_brp + ? partition_alloc::PartitionOptions::BackupRefPtr::kEnabled + : partition_alloc::PartitionOptions::BackupRefPtr::kDisabled, + .backup_ref_ptr_zapping = enable_brp_zapping + ? partition_alloc::PartitionOptions:: + BackupRefPtrZapping::kEnabled + : partition_alloc::PartitionOptions:: + BackupRefPtrZapping::kDisabled, + }); partition_alloc::ThreadSafePartitionRoot* new_root = new_main_partition.get(); partition_alloc::ThreadSafePartitionRoot* new_aligned_root; @@ -619,13 +626,15 @@ static partition_alloc::internal::base::NoDestructor< partition_alloc::ThreadSafePartitionRoot> new_aligned_partition(partition_alloc::PartitionOptions{ - partition_alloc::PartitionOptions::AlignedAlloc::kAllowed, - partition_alloc::PartitionOptions::ThreadCache::kDisabled, - partition_alloc::PartitionOptions::Quarantine::kAllowed, - partition_alloc::PartitionOptions::Cookie::kAllowed, - partition_alloc::PartitionOptions::BackupRefPtr::kDisabled, - partition_alloc::PartitionOptions::BackupRefPtrZapping::kDisabled, - partition_alloc::PartitionOptions::UseConfigurablePool::kNo, + .aligned_alloc = + partition_alloc::PartitionOptions::AlignedAlloc::kAllowed, + .thread_cache = + partition_alloc::PartitionOptions::ThreadCache::kDisabled, + .quarantine = + partition_alloc::PartitionOptions::Quarantine::kAllowed, + .cookie = partition_alloc::PartitionOptions::Cookie::kAllowed, + .backup_ref_ptr = + partition_alloc::PartitionOptions::BackupRefPtr::kDisabled, }); new_aligned_root = new_aligned_partition.get(); } else {
diff --git a/base/allocator/partition_allocator/starscan/metadata_allocator.cc b/base/allocator/partition_allocator/starscan/metadata_allocator.cc index 53424bd..731efe8f 100644 --- a/base/allocator/partition_allocator/starscan/metadata_allocator.cc +++ b/base/allocator/partition_allocator/starscan/metadata_allocator.cc
@@ -13,13 +13,7 @@ namespace { constexpr PartitionOptions kConfig{ - PartitionOptions::AlignedAlloc::kDisallowed, - PartitionOptions::ThreadCache::kDisabled, - PartitionOptions::Quarantine::kDisallowed, - PartitionOptions::Cookie::kAllowed, - PartitionOptions::BackupRefPtr::kDisabled, - PartitionOptions::BackupRefPtrZapping::kDisabled, - PartitionOptions::UseConfigurablePool::kNo, + .cookie = PartitionOptions::Cookie::kAllowed, }; } // namespace
diff --git a/base/allocator/partition_allocator/starscan/pcscan_unittest.cc b/base/allocator/partition_allocator/starscan/pcscan_unittest.cc index 09b0ef3..c7f6480e 100644 --- a/base/allocator/partition_allocator/starscan/pcscan_unittest.cc +++ b/base/allocator/partition_allocator/starscan/pcscan_unittest.cc
@@ -56,14 +56,9 @@ PCScan::ReinitForTesting( {PCScan::InitConfig::WantedWriteProtectionMode::kDisabled, PCScan::InitConfig::SafepointMode::kEnabled}); - allocator_.init({ - PartitionOptions::AlignedAlloc::kAllowed, - PartitionOptions::ThreadCache::kDisabled, - PartitionOptions::Quarantine::kAllowed, - PartitionOptions::Cookie::kDisallowed, - PartitionOptions::BackupRefPtr::kDisabled, - PartitionOptions::BackupRefPtrZapping::kDisabled, - PartitionOptions::UseConfigurablePool::kNo, + allocator_.init(PartitionOptions{ + .aligned_alloc = PartitionOptions::AlignedAlloc::kAllowed, + .quarantine = PartitionOptions::Quarantine::kAllowed, }); allocator_.root()->UncapEmptySlotSpanMemoryForTesting(); allocator_.root()->SwitchToDenserBucketDistribution(); @@ -465,24 +460,14 @@ using SourceList = List<64>; using ValueList = SourceList; - ThreadSafePartitionRoot source_root({ - PartitionOptions::AlignedAlloc::kDisallowed, - PartitionOptions::ThreadCache::kDisabled, - PartitionOptions::Quarantine::kAllowed, - PartitionOptions::Cookie::kAllowed, - PartitionOptions::BackupRefPtr::kDisabled, - PartitionOptions::BackupRefPtrZapping::kDisabled, - PartitionOptions::UseConfigurablePool::kNo, + ThreadSafePartitionRoot source_root(PartitionOptions{ + .quarantine = PartitionOptions::Quarantine::kAllowed, + .cookie = PartitionOptions::Cookie::kAllowed, }); source_root.UncapEmptySlotSpanMemoryForTesting(); - ThreadSafePartitionRoot value_root({ - PartitionOptions::AlignedAlloc::kDisallowed, - PartitionOptions::ThreadCache::kDisabled, - PartitionOptions::Quarantine::kAllowed, - PartitionOptions::Cookie::kAllowed, - PartitionOptions::BackupRefPtr::kDisabled, - PartitionOptions::BackupRefPtrZapping::kDisabled, - PartitionOptions::UseConfigurablePool::kNo, + ThreadSafePartitionRoot value_root(PartitionOptions{ + .quarantine = PartitionOptions::Quarantine::kAllowed, + .cookie = PartitionOptions::Cookie::kAllowed, }); value_root.UncapEmptySlotSpanMemoryForTesting(); @@ -502,24 +487,14 @@ using SourceList = List<64>; using ValueList = SourceList; - ThreadSafePartitionRoot source_root({ - PartitionOptions::AlignedAlloc::kDisallowed, - PartitionOptions::ThreadCache::kDisabled, - PartitionOptions::Quarantine::kAllowed, - PartitionOptions::Cookie::kAllowed, - PartitionOptions::BackupRefPtr::kDisabled, - PartitionOptions::BackupRefPtrZapping::kDisabled, - PartitionOptions::UseConfigurablePool::kNo, + ThreadSafePartitionRoot source_root(PartitionOptions{ + .quarantine = PartitionOptions::Quarantine::kAllowed, + .cookie = PartitionOptions::Cookie::kAllowed, }); source_root.UncapEmptySlotSpanMemoryForTesting(); - ThreadSafePartitionRoot value_root({ - PartitionOptions::AlignedAlloc::kDisallowed, - PartitionOptions::ThreadCache::kDisabled, - PartitionOptions::Quarantine::kAllowed, - PartitionOptions::Cookie::kAllowed, - PartitionOptions::BackupRefPtr::kDisabled, - PartitionOptions::BackupRefPtrZapping::kDisabled, - PartitionOptions::UseConfigurablePool::kNo, + ThreadSafePartitionRoot value_root(PartitionOptions{ + .quarantine = PartitionOptions::Quarantine::kAllowed, + .cookie = PartitionOptions::Cookie::kAllowed, }); value_root.UncapEmptySlotSpanMemoryForTesting(); @@ -539,24 +514,14 @@ using SourceList = List<64>; using ValueList = SourceList; - ThreadSafePartitionRoot source_root({ - PartitionOptions::AlignedAlloc::kDisallowed, - PartitionOptions::ThreadCache::kDisabled, - PartitionOptions::Quarantine::kAllowed, - PartitionOptions::Cookie::kAllowed, - PartitionOptions::BackupRefPtr::kDisabled, - PartitionOptions::BackupRefPtrZapping::kDisabled, - PartitionOptions::UseConfigurablePool::kNo, + ThreadSafePartitionRoot source_root(PartitionOptions{ + .quarantine = PartitionOptions::Quarantine::kAllowed, + .cookie = PartitionOptions::Cookie::kAllowed, }); source_root.UncapEmptySlotSpanMemoryForTesting(); - ThreadSafePartitionRoot value_root({ - PartitionOptions::AlignedAlloc::kDisallowed, - PartitionOptions::ThreadCache::kDisabled, - PartitionOptions::Quarantine::kAllowed, - PartitionOptions::Cookie::kAllowed, - PartitionOptions::BackupRefPtr::kDisabled, - PartitionOptions::BackupRefPtrZapping::kDisabled, - PartitionOptions::UseConfigurablePool::kNo, + ThreadSafePartitionRoot value_root(PartitionOptions{ + .quarantine = PartitionOptions::Quarantine::kAllowed, + .cookie = PartitionOptions::Cookie::kAllowed, }); value_root.UncapEmptySlotSpanMemoryForTesting();
diff --git a/base/allocator/partition_allocator/thread_cache_unittest.cc b/base/allocator/partition_allocator/thread_cache_unittest.cc index 071ef38..adbf6a6 100644 --- a/base/allocator/partition_allocator/thread_cache_unittest.cc +++ b/base/allocator/partition_allocator/thread_cache_unittest.cc
@@ -16,6 +16,7 @@ #include "base/allocator/partition_allocator/partition_alloc_config.h" #include "base/allocator/partition_allocator/partition_alloc_for_testing.h" #include "base/allocator/partition_allocator/partition_lock.h" +#include "base/allocator/partition_allocator/partition_root.h" #include "base/allocator/partition_allocator/tagging.h" #include "build/build_config.h" #include "testing/gtest/include/gtest/gtest.h" @@ -61,18 +62,12 @@ std::unique_ptr<PartitionAllocatorForTesting> CreateAllocator() { std::unique_ptr<PartitionAllocatorForTesting> allocator = std::make_unique<PartitionAllocatorForTesting>(); - allocator->init({ - PartitionOptions::AlignedAlloc::kAllowed, + allocator->init(PartitionOptions { + .aligned_alloc = PartitionOptions::AlignedAlloc::kAllowed, #if !BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) - PartitionOptions::ThreadCache::kEnabled, -#else - PartitionOptions::ThreadCache::kDisabled, + .thread_cache = PartitionOptions::ThreadCache::kEnabled, #endif // BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) - PartitionOptions::Quarantine::kAllowed, - PartitionOptions::Cookie::kDisallowed, - PartitionOptions::BackupRefPtr::kDisabled, - PartitionOptions::BackupRefPtrZapping::kDisabled, - PartitionOptions::UseConfigurablePool::kNo, + .quarantine = PartitionOptions::Quarantine::kAllowed, }); allocator->root()->UncapEmptySlotSpanMemoryForTesting(); @@ -277,14 +272,9 @@ TEST_P(PartitionAllocThreadCacheTest, NoCrossPartitionCache) { PartitionAllocatorForTesting allocator; - allocator.init({ - PartitionOptions::AlignedAlloc::kAllowed, - PartitionOptions::ThreadCache::kDisabled, - PartitionOptions::Quarantine::kAllowed, - PartitionOptions::Cookie::kDisallowed, - PartitionOptions::BackupRefPtr::kDisabled, - PartitionOptions::BackupRefPtrZapping::kDisabled, - PartitionOptions::UseConfigurablePool::kNo, + allocator.init(PartitionOptions{ + .aligned_alloc = PartitionOptions::AlignedAlloc::kAllowed, + .quarantine = PartitionOptions::Quarantine::kAllowed, }); size_t bucket_index = FillThreadCacheAndReturnIndex(kSmallSize);
diff --git a/base/allocator/partition_allocator/thread_isolation/pkey_unittest.cc b/base/allocator/partition_allocator/thread_isolation/pkey_unittest.cc index d08ed9b..3e695bf5 100644 --- a/base/allocator/partition_allocator/thread_isolation/pkey_unittest.cc +++ b/base/allocator/partition_allocator/thread_isolation/pkey_unittest.cc
@@ -4,6 +4,7 @@ #include "base/allocator/partition_allocator/address_pool_manager.h" #include "base/allocator/partition_allocator/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/partition_root.h" #include "base/allocator/partition_allocator/thread_isolation/thread_isolation.h" #if BUILDFLAG(ENABLE_PKEYS) @@ -111,15 +112,10 @@ } isolatedGlobals.pkey = pkey; - isolatedGlobals.allocator->init({ - partition_alloc::PartitionOptions::AlignedAlloc::kAllowed, - partition_alloc::PartitionOptions::ThreadCache::kDisabled, - partition_alloc::PartitionOptions::Quarantine::kDisallowed, - partition_alloc::PartitionOptions::Cookie::kAllowed, - partition_alloc::PartitionOptions::BackupRefPtr::kDisabled, - partition_alloc::PartitionOptions::BackupRefPtrZapping::kDisabled, - partition_alloc::PartitionOptions::UseConfigurablePool::kNo, - partition_alloc::ThreadIsolationOption(isolatedGlobals.pkey), + isolatedGlobals.allocator->init(PartitionOptions{ + .aligned_alloc = PartitionOptions::AlignedAlloc::kAllowed, + .cookie = PartitionOptions::Cookie::kAllowed, + .thread_isolation = ThreadIsolationOption(isolatedGlobals.pkey), }); isolatedGlobals.allocatorRoot = isolatedGlobals.allocator->root();
diff --git a/base/allocator/unittest_utils.cc b/base/allocator/unittest_utils.cc index 56dc3c8..6e728b29 100644 --- a/base/allocator/unittest_utils.cc +++ b/base/allocator/unittest_utils.cc
@@ -9,11 +9,10 @@ #include <stddef.h> inline int snprintf(char* buffer, size_t count, const char* format, ...) { - int result; - va_list args; - va_start(args, format); - result = _vsnprintf(buffer, count, format, args); - va_end(args); - return result; + int result; + va_list args; + va_start(args, format); + result = _vsnprintf(buffer, count, format, args); + va_end(args); + return result; } -
diff --git a/base/functional/bind_unittest.cc b/base/functional/bind_unittest.cc index 0c53055..d16d9e4 100644 --- a/base/functional/bind_unittest.cc +++ b/base/functional/bind_unittest.cc
@@ -14,6 +14,7 @@ #include "base/allocator/partition_allocator/dangling_raw_ptr_checks.h" #include "base/allocator/partition_allocator/partition_alloc_buildflags.h" #include "base/allocator/partition_allocator/partition_alloc_for_testing.h" // nogncheck +#include "base/allocator/partition_allocator/partition_root.h" #include "base/functional/callback.h" #include "base/functional/disallow_unretained.h" #include "base/memory/ptr_util.h" @@ -1859,13 +1860,11 @@ // testing purpose. static constexpr partition_alloc::PartitionOptions kOnlyEnableBackupRefPtrOptions = { - partition_alloc::PartitionOptions::AlignedAlloc::kDisallowed, - partition_alloc::PartitionOptions::ThreadCache::kDisabled, - partition_alloc::PartitionOptions::Quarantine::kDisallowed, - partition_alloc::PartitionOptions::Cookie::kAllowed, - partition_alloc::PartitionOptions::BackupRefPtr::kEnabled, - partition_alloc::PartitionOptions::BackupRefPtrZapping::kEnabled, - partition_alloc::PartitionOptions::UseConfigurablePool::kNo, + .cookie = partition_alloc::PartitionOptions::Cookie::kAllowed, + .backup_ref_ptr = + partition_alloc::PartitionOptions::BackupRefPtr::kEnabled, + .backup_ref_ptr_zapping = + partition_alloc::PartitionOptions::BackupRefPtrZapping::kEnabled, }; class BindUnretainedDanglingInternalFixture : public BindTest {
diff --git a/base/json/json_reader.cc b/base/json/json_reader.cc index 6f8fcd5..591a4f9e 100644 --- a/base/json/json_reader.cc +++ b/base/json/json_reader.cc
@@ -52,31 +52,30 @@ ContextPointer& DictSetList(ContextPointer& ctx, rust::Str key, size_t reserve) { - auto& value = reinterpret_cast<base::Value&>(ctx); + auto& dict = reinterpret_cast<base::Value&>(ctx).GetDict(); base::Value::List list; list.reserve(reserve); - value.SetKey(base::RustStrToStringPiece(key), base::Value(std::move(list))); + dict.Set(base::RustStrToStringPiece(key), std::move(list)); return reinterpret_cast<ContextPointer&>( - *value.GetDict().Find(base::RustStrToStringPiece(key))); + *dict.Find(base::RustStrToStringPiece(key))); } ContextPointer& DictSetDict(ContextPointer& ctx, rust::Str key) { - auto& value = reinterpret_cast<base::Value&>(ctx); - value.SetKey(base::RustStrToStringPiece(key), - base::Value(base::Value::Dict())); + auto& dict = reinterpret_cast<base::Value&>(ctx).GetDict(); + dict.Set(base::RustStrToStringPiece(key), base::Value(base::Value::Dict())); return reinterpret_cast<ContextPointer&>( - *value.GetDict().Find(base::RustStrToStringPiece(key))); + *dict.Find(base::RustStrToStringPiece(key))); } void DictSetNone(ContextPointer& ctx, rust::Str key) { - auto& value = reinterpret_cast<base::Value&>(ctx); - value.SetKey(base::RustStrToStringPiece(key), base::Value()); + auto& dict = reinterpret_cast<base::Value&>(ctx).GetDict(); + dict.Set(base::RustStrToStringPiece(key), base::Value()); } template <class T, class As = T> void DictSetValue(ContextPointer& ctx, rust::Str key, T v) { - auto& value = reinterpret_cast<base::Value&>(ctx); - value.SetKey(base::RustStrToStringPiece(key), base::Value(As{v})); + auto& dict = reinterpret_cast<base::Value&>(ctx).GetDict(); + dict.Set(base::RustStrToStringPiece(key), base::Value(As{v})); } JSONReader::Result DecodeJSONInRust(const base::StringPiece& json,
diff --git a/base/memory/nonscannable_memory.cc b/base/memory/nonscannable_memory.cc index 13960b7..6d6b6c6 100644 --- a/base/memory/nonscannable_memory.cc +++ b/base/memory/nonscannable_memory.cc
@@ -7,6 +7,7 @@ #include <stdlib.h> #include "base/allocator/partition_allocator/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/partition_root.h" #include "base/feature_list.h" #include "base/no_destructor.h" @@ -62,16 +63,14 @@ #if BUILDFLAG(USE_STARSCAN) allocator_.reset(partition_alloc::internal::MakePCScanMetadata< partition_alloc::PartitionAllocator>()); - allocator_->init({ - partition_alloc::PartitionOptions::AlignedAlloc::kDisallowed, - partition_alloc::PartitionOptions::ThreadCache::kDisabled, - Quarantinable - ? partition_alloc::PartitionOptions::Quarantine::kAllowed - : partition_alloc::PartitionOptions::Quarantine::kDisallowed, - partition_alloc::PartitionOptions::Cookie::kAllowed, - partition_alloc::PartitionOptions::BackupRefPtr::kDisabled, - partition_alloc::PartitionOptions::BackupRefPtrZapping::kDisabled, - partition_alloc::PartitionOptions::UseConfigurablePool::kNo, + allocator_->init(partition_alloc::PartitionOptions{ + .quarantine = + Quarantinable + ? partition_alloc::PartitionOptions::Quarantine::kAllowed + : partition_alloc::PartitionOptions::Quarantine::kDisallowed, + .cookie = partition_alloc::PartitionOptions::Cookie::kAllowed, + .backup_ref_ptr = + partition_alloc::PartitionOptions::BackupRefPtr::kDisabled, }); if (Quarantinable) { partition_alloc::internal::PCScan::RegisterNonScannableRoot(
diff --git a/base/memory/raw_ptr_cast.h b/base/memory/raw_ptr_cast.h new file mode 100644 index 0000000..06bc61a --- /dev/null +++ b/base/memory/raw_ptr_cast.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 BASE_MEMORY_RAW_PTR_CAST_H_ +#define BASE_MEMORY_RAW_PTR_CAST_H_ + +// Although `raw_ptr` is part of the standalone PA distribution, it is +// easier to use the shorter path in `//base/memory`. We retain this +// facade header for ease of typing. +#include "base/allocator/partition_allocator/pointers/raw_ptr_cast.h" // IWYU pragma: export + +#endif // BASE_MEMORY_RAW_PTR_CAST_H_
diff --git a/base/test/BUILD.gn b/base/test/BUILD.gn index 4c17a8fc..a0df347 100644 --- a/base/test/BUILD.gn +++ b/base/test/BUILD.gn
@@ -550,4 +550,10 @@ public_deps = [ ":test_trace_processor" ] } } +} else if (!is_component_build && is_mac) { + # Provide a dummy target in order for clients to not have to special-case + # the dependency. + group("test_trace_processor_bundle_data") { + testonly = true + } }
diff --git a/base/values.cc b/base/values.cc index 6ea1223..5485c723 100644 --- a/base/values.cc +++ b/base/values.cc
@@ -1160,14 +1160,6 @@ return GetDict().Remove(key); } -Value* Value::FindPath(StringPiece path) { - return GetDict().FindByDottedPath(path); -} - -const Value* Value::FindPath(StringPiece path) const { - return GetDict().FindByDottedPath(path); -} - bool operator==(const Value& lhs, const Value& rhs) { return lhs.data_ == rhs.data_; }
diff --git a/base/values.h b/base/values.h index 84c85b1..47ace84 100644 --- a/base/values.h +++ b/base/values.h
@@ -774,17 +774,6 @@ // Deprecated: Prefer `Value::Dict::Remove()`. bool RemoveKey(StringPiece key); - // Searches a hierarchy of dictionary values for a given value. If a path - // of dictionaries exist, returns the item at that path. If any of the path - // components do not exist or if any but the last path components are not - // dictionaries, returns nullptr. The type of the leaf Value is not checked. - // - // This version takes a StringPiece for the path, using dots as separators. - // - // DEPRECATED: Prefer `Value::Dict::FindByDottedPath()`. - Value* FindPath(StringPiece path); - const Value* FindPath(StringPiece path) const; - // Note: Do not add more types. See the file-level comment above for why. // Comparison operators so that Values can easily be used with standard
diff --git a/build/fuchsia/linux_internal.sdk.sha1 b/build/fuchsia/linux_internal.sdk.sha1 index e4319691..9043936 100644 --- a/build/fuchsia/linux_internal.sdk.sha1 +++ b/build/fuchsia/linux_internal.sdk.sha1
@@ -1 +1 @@ -12.20230515.3.1 +12.20230515.4.1
diff --git a/build/toolchain/apple/toolchain.gni b/build/toolchain/apple/toolchain.gni index 34e951b..151011f9 100644 --- a/build/toolchain/apple/toolchain.gni +++ b/build/toolchain/apple/toolchain.gni
@@ -50,7 +50,7 @@ # the compiler is rolled to ensure that all outputs are regenerated. It must # be kept in sync with the `version` of `third_party/swift-toolchain` in # //DEPS. - swiftc_version = "swift-5.7-release" + swiftc_version = "swift-5.8-release" # Use the hermetic swift toolchain. swift_toolchain_path = "//third_party/swift-toolchain/"
diff --git a/build/toolchain/ios/swiftc.py b/build/toolchain/ios/swiftc.py index 085f262..87071aa 100644 --- a/build/toolchain/ios/swiftc.py +++ b/build/toolchain/ios/swiftc.py
@@ -27,8 +27,8 @@ header_contents = [] with open(header_path, 'r') as header_file: for line in header_file: - if line == '#if __has_feature(modules)\n': - header_contents.append('#if 1 // #if __has_feature(modules)\n') + if line == '#if __has_feature(objc_modules)\n': + header_contents.append('#if 1 // #if __has_feature(objc_modules)\n') nesting_level = 1 for line in header_file: if line == '#endif\n':
diff --git a/chrome/VERSION b/chrome/VERSION index e19b72d..43fc2d7 100644 --- a/chrome/VERSION +++ b/chrome/VERSION
@@ -1,4 +1,4 @@ MAJOR=115 MINOR=0 -BUILD=5774 +BUILD=5776 PATCH=0
diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn index 21bafe27..2cf59b0 100644 --- a/chrome/android/BUILD.gn +++ b/chrome/android/BUILD.gn
@@ -2777,6 +2777,7 @@ ] data = [ "javatests/src/org/chromium/chrome/test/smoke/test.html" ] deps = [ + "//base:base_java", "//base:base_java_test_support", "//chrome/test/android:chrome_java_test_pagecontroller", "//content/public/test/android:content_java_test_support",
diff --git a/chrome/android/java/res/menu/custom_tabs_menu.xml b/chrome/android/java/res/menu/custom_tabs_menu.xml index c346555..5cbabcc 100644 --- a/chrome/android/java/res/menu/custom_tabs_menu.xml +++ b/chrome/android/java/res/menu/custom_tabs_menu.xml
@@ -40,6 +40,10 @@ android:title="@null" /> </menu> </item> + <item android:id="@+id/page_insights_id" + android:title="@string/menu_page_insights" + android:visible="false" + android:orderInCategory="2" /> <item android:id="@+id/find_in_page_id" android:title="@string/menu_find_in_page" android:orderInCategory="2" />
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/BaseCustomTabActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/BaseCustomTabActivity.java index 27a9119d..088a489 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/BaseCustomTabActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/BaseCustomTabActivity.java
@@ -267,6 +267,13 @@ return (getIntent().getFlags() & separateTaskFlags) != 0; } + /** + * Return true when PageInsights Hub is enabled on Custom Tabs. False by default. + */ + protected boolean isPageInsightsHubEnabled() { + return false; + } + @Override public void performPreInflationStartup() { // Parse the data from the Intent before calling super to allow the Intent to customize @@ -409,7 +416,7 @@ mIntentDataProvider.shouldShowShareMenuItem(), mIntentDataProvider.shouldShowStarButton(), mIntentDataProvider.shouldShowDownloadButton(), mIntentDataProvider.isIncognito(), - isMenuIconAtStart); + isMenuIconAtStart, this::isPageInsightsHubEnabled); } @Override
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java index 3cb08f6..32ce62f 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
@@ -158,6 +158,12 @@ } @Override + protected boolean isPageInsightsHubEnabled() { + // TODO(b/282739536): Add more conditions. + return ChromeFeatureList.isEnabled(ChromeFeatureList.CCT_PAGE_INSIGHTS_HUB); + } + + @Override public void finishNativeInitialization() { if (!mIntentDataProvider.isInfoPage()) { FirstRunSignInProcessor.openSyncSettingsIfScheduled(this); @@ -250,6 +256,9 @@ mRootUiCoordinator.getEphemeralTabCoordinatorSupplier()) .show(tab, ChromePageInfoHighlight.noHighlight()); return true; + } else if (id == R.id.page_insights_id) { + // TODO(b/282739536): Open PageInsights Hub. + return true; } return super.onMenuOrKeyboardAction(id, fromMenu); }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabAppMenuPropertiesDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabAppMenuPropertiesDelegate.java index 887c2fcd..b873f50 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabAppMenuPropertiesDelegate.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabAppMenuPropertiesDelegate.java
@@ -43,6 +43,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.function.BooleanSupplier; /** * App menu properties delegate for {@link CustomTabActivity}. @@ -58,6 +59,7 @@ private final boolean mIsOpenedByChrome; private final boolean mIsIncognito; private final boolean mIsStartIconMenu; + private final BooleanSupplier mIsPageInsightsHubEnabled; private final List<String> mMenuEntries; private final Map<String, Integer> mTitleToItemIdMap = new HashMap<String, Integer>(); @@ -73,7 +75,7 @@ ObservableSupplier<BookmarkModel> bookmarkModelSupplier, Verifier verifier, @CustomTabsUiType final int uiType, List<String> menuEntries, boolean isOpenedByChrome, boolean showShare, boolean showStar, boolean showDownload, boolean isIncognito, - boolean isStartIconMenu) { + boolean isStartIconMenu, BooleanSupplier isPageInsightsHubEnabled) { super(context, activityTabProvider, multiWindowModeStateDispatcher, tabModelSelector, toolbarManager, decorView, null, null, bookmarkModelSupplier, null); mVerifier = verifier; @@ -85,6 +87,7 @@ mShowDownload = showDownload; mIsIncognito = isIncognito; mIsStartIconMenu = isStartIconMenu; + mIsPageInsightsHubEnabled = isPageInsightsHubEnabled; } @Override @@ -209,6 +212,10 @@ openInChromeItem.setVisible(false); } + if (mIsPageInsightsHubEnabled.getAsBoolean()) { + menu.findItem(R.id.page_insights_id).setVisible(true); + } + // Add custom menu items. for (int i = 0; i < mMenuEntries.size(); i++) { MenuItem item = menu.add(0, i, 1, mMenuEntries.get(i));
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/features/partialcustomtab/PartialCustomTabBaseStrategy.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/features/partialcustomtab/PartialCustomTabBaseStrategy.java index 22c94a52..b2a0b21b 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/features/partialcustomtab/PartialCustomTabBaseStrategy.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/features/partialcustomtab/PartialCustomTabBaseStrategy.java
@@ -27,6 +27,7 @@ import androidx.annotation.IntDef; import androidx.annotation.Nullable; import androidx.annotation.Px; +import androidx.annotation.StringRes; import androidx.annotation.VisibleForTesting; import org.chromium.base.Callback; @@ -167,9 +168,29 @@ // Elevate the main web contents area as high as the handle bar to have the shadow // effect look right. int ev = mActivity.getResources().getDimensionPixelSize(R.dimen.custom_tabs_elevation); - getCoordinatorLayout().setElevation(ev); + View coordinatorLayout = getCoordinatorLayout(); + coordinatorLayout.setElevation(ev); mPositionUpdater.run(); + + // Set the window title so the type announcement is made, only when CCT is first launched. + if (!coordinatorLayout.isAttachedToWindow()) setWindowTitleForTouchExploration(); + } + + private void setWindowTitleForTouchExploration() { + View coordinatorLayout = getCoordinatorLayout(); + var attachStateListener = new View.OnAttachStateChangeListener() { + @Override + public void onViewAttachedToWindow(View v) { + Window window = mActivity.getWindow(); + window.setTitle(mActivity.getResources().getString(getTypeStringId())); + coordinatorLayout.removeOnAttachStateChangeListener(this); + } + + @Override + public void onViewDetachedFromWindow(View v) {} + }; + coordinatorLayout.addOnAttachStateChangeListener(attachStateListener); } @Override @@ -314,6 +335,9 @@ @PartialCustomTabType public abstract int getStrategyType(); + @StringRes + public abstract int getTypeStringId(); + @ActivityLayoutState protected abstract int getActivityLayoutState();
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/features/partialcustomtab/PartialCustomTabBottomSheetStrategy.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/features/partialcustomtab/PartialCustomTabBottomSheetStrategy.java index 45c4c850..7c1bc4e 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/features/partialcustomtab/PartialCustomTabBottomSheetStrategy.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/features/partialcustomtab/PartialCustomTabBottomSheetStrategy.java
@@ -15,7 +15,6 @@ import android.animation.AnimatorListenerAdapter; import android.animation.ValueAnimator; import android.app.Activity; -import android.content.Context; import android.content.res.Configuration; import android.graphics.drawable.GradientDrawable; import android.os.Build; @@ -25,14 +24,13 @@ import android.view.ViewGroup; import android.view.Window; import android.view.WindowManager; -import android.view.accessibility.AccessibilityEvent; -import android.view.accessibility.AccessibilityManager; import android.view.animation.AccelerateInterpolator; import android.widget.ImageView; import android.widget.LinearLayout; import androidx.annotation.IntDef; import androidx.annotation.Px; +import androidx.annotation.StringRes; import androidx.annotation.VisibleForTesting; import androidx.core.view.WindowCompat; import androidx.core.view.WindowInsetsCompat; @@ -52,6 +50,7 @@ import org.chromium.chrome.browser.lifecycle.ConfigurationChangedObserver; import org.chromium.chrome.browser.multiwindow.MultiWindowUtils; import org.chromium.chrome.browser.tab.Tab; +import org.chromium.chrome.browser.util.ChromeAccessibilityUtil; import org.chromium.ui.util.ColorUtils; import java.lang.annotation.Retention; @@ -162,6 +161,12 @@ } @Override + @StringRes + public int getTypeStringId() { + return R.string.accessibility_partial_custom_tab_bottom_sheet; + } + + @Override public void onShowSoftInput(Runnable softKeyboardRunnable) { // Expands to full height to avoid the tab being hidden by the soft keyboard. // Necessary only if we're at the initial height status. @@ -642,14 +647,11 @@ mVersionCompat.setImeStateCallback(this::onImeStateChanged); } - var am = (AccessibilityManager) mActivity.getSystemService(Context.ACCESSIBILITY_SERVICE); - if (am != null && am.isTouchExplorationEnabled()) { + if (ChromeAccessibilityUtil.get().isTouchExplorationEnabled()) { int textId = mStatus == HeightStatus.TOP ? R.string.accessibility_custom_tab_expanded : R.string.accessibility_custom_tab_collapsed; - var event = AccessibilityEvent.obtain(); - event.setEventType(AccessibilityEvent.TYPE_ANNOUNCEMENT); - event.getText().add(mActivity.getResources().getString(textId)); - am.sendAccessibilityEvent(event); + getCoordinatorLayout().announceForAccessibility( + mActivity.getResources().getString(textId)); } }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/features/partialcustomtab/PartialCustomTabFullSizeStrategy.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/features/partialcustomtab/PartialCustomTabFullSizeStrategy.java index b99b9cf..8679771 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/features/partialcustomtab/PartialCustomTabFullSizeStrategy.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/features/partialcustomtab/PartialCustomTabFullSizeStrategy.java
@@ -17,7 +17,9 @@ import android.view.WindowManager; import androidx.annotation.Px; +import androidx.annotation.StringRes; +import org.chromium.chrome.R; import org.chromium.chrome.browser.browserservices.intents.BrowserServicesIntentDataProvider.ActivityLayoutState; import org.chromium.chrome.browser.customtabs.features.toolbar.CustomTabToolbar; import org.chromium.chrome.browser.fullscreen.FullscreenManager; @@ -46,6 +48,12 @@ } @Override + @StringRes + public int getTypeStringId() { + return R.string.accessibility_partial_custom_tab_full_sheet; + } + + @Override public void onToolbarInitialized( View coordinatorView, CustomTabToolbar toolbar, @Px int toolbarCornerRadius) { super.onToolbarInitialized(coordinatorView, toolbar, toolbarCornerRadius);
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/features/partialcustomtab/PartialCustomTabSideSheetStrategy.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/features/partialcustomtab/PartialCustomTabSideSheetStrategy.java index 6cfc4fd2..e6e6023 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/features/partialcustomtab/PartialCustomTabSideSheetStrategy.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/features/partialcustomtab/PartialCustomTabSideSheetStrategy.java
@@ -17,7 +17,6 @@ import android.animation.ValueAnimator; import android.animation.ValueAnimator.AnimatorUpdateListener; import android.app.Activity; -import android.content.Context; import android.graphics.drawable.GradientDrawable; import android.os.Build; import android.os.Handler; @@ -27,9 +26,9 @@ import android.view.Window; import android.view.WindowManager; import android.view.accessibility.AccessibilityEvent; -import android.view.accessibility.AccessibilityManager; import androidx.annotation.Px; +import androidx.annotation.StringRes; import androidx.annotation.VisibleForTesting; import org.chromium.base.MathUtils; @@ -40,6 +39,7 @@ import org.chromium.chrome.browser.customtabs.CustomTabIntentDataProvider; import org.chromium.chrome.browser.customtabs.features.toolbar.CustomTabToolbar; import org.chromium.chrome.browser.fullscreen.FullscreenManager; +import org.chromium.chrome.browser.util.ChromeAccessibilityUtil; import org.chromium.ui.base.LocalizationUtils; /** @@ -103,6 +103,12 @@ } @Override + @StringRes + public int getTypeStringId() { + return R.string.accessibility_partial_custom_tab_side_sheet; + } + + @Override public void onShowSoftInput(Runnable softKeyboardRunnable) { softKeyboardRunnable.run(); } @@ -219,8 +225,7 @@ } private void maybeResetTalkbackFocus() { - var am = (AccessibilityManager) mActivity.getSystemService(Context.ACCESSIBILITY_SERVICE); - if (am != null && am.isTouchExplorationEnabled()) { + if (ChromeAccessibilityUtil.get().isTouchExplorationEnabled()) { // After resizing the view, notify the window state change to let the talkback // focus navigation work as before. mToolbarView.sendAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED);
diff --git a/chrome/android/javatests/src/org/chromium/chrome/test/smoke/ChromeTabSwitcherTest.java b/chrome/android/javatests/src/org/chromium/chrome/test/smoke/ChromeTabSwitcherTest.java index 6f1b7b7..c84fd98 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/test/smoke/ChromeTabSwitcherTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/test/smoke/ChromeTabSwitcherTest.java
@@ -21,6 +21,7 @@ import org.junit.rules.TestRule; import org.junit.runner.RunWith; +import org.chromium.base.Log; import org.chromium.base.test.BaseJUnit4ClassRunner; import org.chromium.chrome.R; import org.chromium.chrome.test.pagecontroller.rules.ChromeUiApplicationTestRule; @@ -37,6 +38,7 @@ @LargeTest @RunWith(BaseJUnit4ClassRunner.class) public class ChromeTabSwitcherTest { + private static final String TAG = "SmokeTest"; private static final String ACTIVITY_NAME = "com.google.android.apps.chrome.IntentDispatcher"; private static final String TEST_PAGE = "/chrome/android/javatests/src/org/chromium/chrome/test/smoke/test.html"; @@ -81,16 +83,27 @@ // Looks for the any view/layout with the chrome package name. IUi2Locator locatorChrome = Ui2Locators.withPackageName(mPackageName); // Wait until chrome shows up + Log.i(TAG, "Attempting to navigate through FRE"); mFirstRunNavigator.waitUntilAnyVisible(locatorChrome); // Go through the FRE until you see ChromeTabbedActivity urlbar. + Log.i(TAG, "Waiting for omnibox to show URL"); mFirstRunNavigator.navigateThroughFRE(); - // FRE should be over and we should be shown the url we requested. + Log.i(TAG, "Waiting for omnibox to show URL"); assert url.startsWith("http://"); + String urlWithoutScheme = url.substring(7); + IUi2Locator dataUrlText = Ui2Locators.withText(urlWithoutScheme); + UiAutomatorUtils.getInstance().getLocatorHelper().verifyOnScreen(dataUrlText); + Log.i(TAG, "Waiting 5 seconds to ensure background logic does not crash"); + Thread.sleep(5000); + + Log.i(TAG, "Activating tab switcher."); UiAutomatorUtils.getInstance().click(mTabSwitcherButton); UiAutomatorUtils.getInstance().getLocatorHelper().verifyOnScreen(mTabSwitcherToolbar); UiAutomatorUtils.getInstance().getLocatorHelper().verifyOnScreen(mTabList); + + Log.i(TAG, "Test complete."); } }
diff --git a/chrome/android/javatests/src/org/chromium/chrome/test/smoke/utilities/FirstRunNavigator.java b/chrome/android/javatests/src/org/chromium/chrome/test/smoke/utilities/FirstRunNavigator.java index 7f8230c6..499ada1 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/test/smoke/utilities/FirstRunNavigator.java +++ b/chrome/android/javatests/src/org/chromium/chrome/test/smoke/utilities/FirstRunNavigator.java
@@ -6,6 +6,7 @@ import org.hamcrest.Matchers; +import org.chromium.base.Log; import org.chromium.base.test.util.Criteria; import org.chromium.base.test.util.CriteriaHelper; import org.chromium.chrome.R; @@ -20,6 +21,7 @@ * FirstRunNavigator is used to Navigate through FRE page. */ public class FirstRunNavigator { + public static final String TAG = "FirstRunNavigator"; public static final long TIMEOUT_MS = 20000L; public static final long UI_CHECK_INTERVAL = 1000L; @@ -68,6 +70,7 @@ // Different FRE versions show up randomly and in different order, // figure out which one we are on and proceed. if (uiLocatorHelper.isOnScreen(urlBar)) { + Log.i(TAG, "FRE is done (Found URL bar)."); // FRE is over. break; } else if (uiLocatorHelper.isOnScreen(playServicesUpdateText)) { @@ -75,22 +78,30 @@ // Otherwise its just a toast/notification that should not // interfere with the test. if (uiLocatorHelper.isOnScreen(updatePlayServicesPanel)) { + Log.i(TAG, "Dismissing Play Services dialog"); UiAutomatorUtils.getInstance().clickOutsideOf(updatePlayServicesPanel); + } else { + Log.i(TAG, "Ignoring Play Services toast"); } } else if (uiLocatorHelper.isOnScreen(noAddAccountButton)) { // Do not add an account. + Log.i(TAG, "Clicking through add account dialog"); UiAutomatorUtils.getInstance().click(noAddAccountButton); } else if (uiLocatorHelper.isOnScreen(signinSkipButton)) { // Do not sign in with an account. + Log.i(TAG, "Clicking through sign in dialog via \"skip\""); UiAutomatorUtils.getInstance().click(signinSkipButton); } else if (uiLocatorHelper.isOnScreen(signinContinueButton)) { // Sometimes there is only the continue button (eg: when signin is // disabled.) + Log.i(TAG, "Clicking through sign in dialog via \"continue\""); UiAutomatorUtils.getInstance().click(signinContinueButton); } else if (uiLocatorHelper.isOnScreen(signinProgressSpinner)) { // Do nothing and wait. + Log.i(TAG, "Waiting for progress spinner"); } else if (uiLocatorHelper.isOnScreen(defaultSearchEngineNextButton)) { // Just press next on choosing the default SE. + Log.i(TAG, "Clicking through search engine selection"); UiAutomatorUtils.getInstance().click(defaultSearchEngineNextButton); } else { throw new RuntimeException("Unexpected FRE or Start page detected.");
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/customtabs/features/partialcustomtab/PartialCustomTabBottomSheetStrategyTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/customtabs/features/partialcustomtab/PartialCustomTabBottomSheetStrategyTest.java index 27f845f2..2ea19237 100644 --- a/chrome/android/junit/src/org/chromium/chrome/browser/customtabs/features/partialcustomtab/PartialCustomTabBottomSheetStrategyTest.java +++ b/chrome/android/junit/src/org/chromium/chrome/browser/customtabs/features/partialcustomtab/PartialCustomTabBottomSheetStrategyTest.java
@@ -327,6 +327,26 @@ } @Test + public void setTitleWhenLaunched() { + final String title = "BottomSheet"; + var coordinator = mPCCTTestRule.mCoordinatorLayout; + doReturn(false).when(coordinator).isAttachedToWindow(); + doReturn(title).when(mPCCTTestRule.mResources).getString(anyInt()); + PartialCustomTabBottomSheetStrategy strategy = createPcctAtHeight(500); + var listener = mPCCTTestRule.mAttachStateChangeListener; + verify(coordinator).addOnAttachStateChangeListener(listener.capture()); + listener.getValue().onViewAttachedToWindow(null); + verify(mPCCTTestRule.mWindow).setTitle(eq(title)); + verify(coordinator).removeOnAttachStateChangeListener(listener.getValue()); + clearInvocations(coordinator); + + // Once attached, the title is not set again. + doReturn(true).when(coordinator).isAttachedToWindow(); + strategy.onPostInflationStartup(); + verify(coordinator, never()).addOnAttachStateChangeListener(any()); + } + + @Test public void moveFromTop() { // Drag to the top PartialCustomTabBottomSheetStrategy strategy = createPcctAtHeight(500);
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/customtabs/features/partialcustomtab/PartialCustomTabTestRule.java b/chrome/android/junit/src/org/chromium/chrome/browser/customtabs/features/partialcustomtab/PartialCustomTabTestRule.java index aeb2fed..6e657dbe 100644 --- a/chrome/android/junit/src/org/chromium/chrome/browser/customtabs/features/partialcustomtab/PartialCustomTabTestRule.java +++ b/chrome/android/junit/src/org/chromium/chrome/browser/customtabs/features/partialcustomtab/PartialCustomTabTestRule.java
@@ -42,6 +42,8 @@ import org.junit.rules.TestRule; import org.junit.runner.Description; import org.junit.runners.model.Statement; +import org.mockito.ArgumentCaptor; +import org.mockito.Captor; import org.mockito.Mock; import org.mockito.MockitoAnnotations; import org.robolectric.annotation.Implementation; @@ -154,6 +156,8 @@ DisplayMetrics mMetrics; @Mock ViewGroup mCompositorViewHolder; + @Captor + ArgumentCaptor<View.OnAttachStateChangeListener> mAttachStateChangeListener; Context mContext; List<WindowManager.LayoutParams> mAttributeResults;
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd index 5afea40..40cb790 100644 --- a/chrome/app/generated_resources.grd +++ b/chrome/app/generated_resources.grd
@@ -4580,9 +4580,6 @@ <message name="IDS_EXTENSION_PERMISSIONS_PROMPT_TITLE" desc="Titlebar of the extension or app permissions prompt. Asks the user if they want to grant the permissions to the particular extension or app."> "<ph name="EXTENSION_NAME">$1<ex>Gmail Checker</ex></ph>" has requested additional permissions. </message> - <message name="IDS_EXTENSION_POST_INSTALL_PERMISSIONS_PROMPT_TITLE" desc="Titlebar of the extension or app permissions prompt. Shows the user the permissions a particular extension or app has."> - Current Permissions for "<ph name="EXTENSION_NAME">$1<ex>Gmail Checker</ex></ph>" - </message> <message name="IDS_EXTENSION_REMOTE_INSTALL_PROMPT_TITLE" desc="Titlebar of the extension or app installation prompt. Asks the user if they want to enable a particular extension or app that was installed remotely."> Enable "<ph name="EXTENSION_NAME">$1<ex>Gmail Checker</ex></ph>"? </message> @@ -4685,9 +4682,6 @@ <message name="IDS_EXTENSION_PROMPT_CAN_ACCESS" desc="Second line in the content area of the extension or app permissions view dialog. Note that the exact wording is important. This should mean that the extension _can now_ access the listed privileges, because it has already been installed. This message appeared because the user must approve new permissions of the extension or app."> It can: </message> - <message name="IDS_EXTENSION_NO_SPECIAL_PERMISSIONS" desc="Shown when the app/extension requires no special permission"> - Has no special permissions. - </message> <message name="IDS_EXTENSION_PROMPT_GRANT_PERMISSIONS_CHECKBOX" desc="Label next to the checkbox in the extension or app installation prompt, which indicates if a user wants to grant access to all requested sites."> Grant access to all requested sites. </message> @@ -4715,17 +4709,6 @@ <message name="IDS_EXTENSION_PROMPT_STORE_LINK" desc="Anchor text for link to Chrome Web Store in app or extension installation dialog"> Open in Web Store </message> - <message name="IDS_EXTENSION_PROMPT_RETAINED_FILES" desc="A line of explanatory text that precedes the list of files the app has permanent access to, showing the number of files. This is shown when an app has persistent access to files. [ICU Syntax]"> - {NUM_FILES, plural, - =1 {It has permanent access to one file.} - other {It has permanent access to # files.}} - </message> - - <message name="IDS_EXTENSION_PROMPT_RETAINED_DEVICES" desc="A line of explanatory text that precedes the list of devices the app has permanent access to, showing the number of devices. This is shown when an app has persistent access to devices. [ICU Syntax]"> - {NUM_DEVICES, plural, - =1 {Communicate with a USB device} - other {Communicate with # USB devices}} - </message> <if expr="enable_extensions"> <message name="IDS_EXTENSION_PROMPT_WARNING_FULL_ACCESS" desc="Permission string for full access to the computer and all websites."> @@ -5560,15 +5543,6 @@ <message name="IDS_EXTENSION_PROMPT_PERMISSIONS_ABORT_BUTTON" desc="Text for the deny button on the extension permissions prompt"> Deny </message> - <message name="IDS_EXTENSION_PROMPT_PERMISSIONS_CLEAR_RETAINED_FILES_BUTTON" desc="Text for the Revoke File Access button on the extension permissions prompt"> - Revoke file access - </message> - <message name="IDS_EXTENSION_PROMPT_PERMISSIONS_CLEAR_RETAINED_DEVICES_BUTTON" desc="Text for the Revoke Device Access button on the extension permissions prompt"> - Revoke device access - </message> - <message name="IDS_EXTENSION_PROMPT_PERMISSIONS_CLEAR_RETAINED_FILES_AND_DEVICES_BUTTON" desc="Text for the Revoke File and Device Access button on the extension permissions prompt"> - Revoke file and device access - </message> <message name="IDS_EXTENSION_PROMPT_REMOTE_INSTALL_BUTTON_EXTENSION" desc="Text for the install button on the extension install prompt for a remotely installed extension"> Enable extension </message>
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc index 8d383708..93dd153 100644 --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc
@@ -6825,6 +6825,10 @@ #endif #if BUILDFLAG(IS_ANDROID) + {"cct-page-insights-hub", flag_descriptions::kCCTPageInsightsHubName, + flag_descriptions::kCCTPageInsightsHubDescription, kOsAndroid, + FEATURE_VALUE_TYPE(chrome::android::kCCTPageInsightsHub)}, + {"cct-resizable-90-maximum-height", flag_descriptions::kCCTResizable90MaximumHeightName, flag_descriptions::kCCTResizable90MaximumHeightDescription, kOsAndroid,
diff --git a/chrome/browser/ash/BUILD.gn b/chrome/browser/ash/BUILD.gn index 9866686..0a6b24dc 100644 --- a/chrome/browser/ash/BUILD.gn +++ b/chrome/browser/ash/BUILD.gn
@@ -58,6 +58,8 @@ "accessibility/service/accessibility_service_client.h", "accessibility/service/automation_client_impl.cc", "accessibility/service/automation_client_impl.h", + "accessibility/service/tts_client_impl.cc", + "accessibility/service/tts_client_impl.h", "account_manager/account_apps_availability.cc", "account_manager/account_apps_availability.h", "account_manager/account_apps_availability_factory.cc", @@ -4989,6 +4991,7 @@ "arc/vmm/arc_system_state_observation_unittest.cc", "arc/vmm/arc_vmm_manager_unittest.cc", "arc/vmm/arc_vmm_swap_scheduler_unittest.cc", + "arc/vmm/arcvm_working_set_trim_executor_unittest.cc", "arc/wallpaper/arc_wallpaper_service_unittest.cc", "assistant/assistant_util_unittest.cc", "attestation/attestation_ca_client_unittest.cc",
diff --git a/chrome/browser/ash/accessibility/service/DEPS b/chrome/browser/ash/accessibility/service/DEPS index f1346ac..7111aa2 100644 --- a/chrome/browser/ash/accessibility/service/DEPS +++ b/chrome/browser/ash/accessibility/service/DEPS
@@ -1,3 +1,9 @@ include_rules = [ "+services/accessibility/public/mojom", ] + +specific_include_rules = { + "tts_client_impl.cc": [ + "+content/public/browser/tts_controller.h", + ], +}
diff --git a/chrome/browser/ash/accessibility/service/accessibility_service_client.cc b/chrome/browser/ash/accessibility/service/accessibility_service_client.cc index b61c06f..ed2f508 100644 --- a/chrome/browser/ash/accessibility/service/accessibility_service_client.cc +++ b/chrome/browser/ash/accessibility/service/accessibility_service_client.cc
@@ -3,11 +3,14 @@ // found in the LICENSE file. #include "chrome/browser/ash/accessibility/service/accessibility_service_client.h" + #include <memory> + #include "base/functional/callback_helpers.h" #include "chrome/browser/accessibility/service/accessibility_service_router.h" #include "chrome/browser/accessibility/service/accessibility_service_router_factory.h" #include "chrome/browser/ash/accessibility/service/automation_client_impl.h" +#include "chrome/browser/ash/accessibility/service/tts_client_impl.h" #include "chrome/browser/ui/aura/accessibility/automation_manager_aura.h" #include "content/public/browser/browser_context.h" #include "content/public/browser/browser_thread.h" @@ -27,6 +30,11 @@ automation_client_->Bind(std::move(automation), std::move(automation_client)); } +void AccessibilityServiceClient::BindTts( + mojo::PendingReceiver<ax::mojom::Tts> tts_receiver) { + tts_client_->Bind(std::move(tts_receiver)); +} + void AccessibilityServiceClient::SetProfile(content::BrowserContext* profile) { // If the profile has changed we will need to disconnect from the previous // service, get the service keyed to this profile, and if any features were @@ -75,6 +83,7 @@ void AccessibilityServiceClient::Reset() { at_controller_.reset(); automation_client_.reset(); + tts_client_.reset(); } void AccessibilityServiceClient::EnableAssistiveTechnology( @@ -109,6 +118,7 @@ return; automation_client_ = std::make_unique<AutomationClientImpl>(); + tts_client_ = std::make_unique<TtsClientImpl>(profile_); ax::AccessibilityServiceRouter* router = ax::AccessibilityServiceRouterFactory::GetForBrowserContext(
diff --git a/chrome/browser/ash/accessibility/service/accessibility_service_client.h b/chrome/browser/ash/accessibility/service/accessibility_service_client.h index a727e5c..7ff709e02 100644 --- a/chrome/browser/ash/accessibility/service/accessibility_service_client.h +++ b/chrome/browser/ash/accessibility/service/accessibility_service_client.h
@@ -19,6 +19,7 @@ namespace ash { class AutomationClientImpl; +class TtsClientImpl; // The AccessibilityServiceClient in the Browser process interacts with the // AccessibilityService process over mojom. It is responsible for communicating @@ -38,6 +39,7 @@ void BindAutomation(mojo::PendingRemote<ax::mojom::Automation> automation, mojo::PendingReceiver<ax::mojom::AutomationClient> automation_client) override; + void BindTts(mojo::PendingReceiver<ax::mojom::Tts> tts_receiver) override; void SetProfile(content::BrowserContext* profile); @@ -62,6 +64,7 @@ void LaunchAccessibilityServiceAndBind(); std::unique_ptr<AutomationClientImpl> automation_client_; + std::unique_ptr<TtsClientImpl> tts_client_; // Track the currently enabled features in case we disconnect from the service // and need to reconnect, for example when the profile changes.
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 9f3efeae..d390f0f 100644 --- a/chrome/browser/ash/accessibility/service/accessibility_service_client_browsertest.cc +++ b/chrome/browser/ash/accessibility/service/accessibility_service_client_browsertest.cc
@@ -4,16 +4,20 @@ #include "base/command_line.h" #include "base/memory/raw_ptr.h" +#include "base/test/bind.h" #include "chrome/browser/accessibility/service/accessibility_service_router_factory.h" #include "chrome/browser/ash/accessibility/service/accessibility_service_client.h" #include "chrome/browser/ash/accessibility/service/automation_client_impl.h" #include "chrome/browser/ash/accessibility/service/fake_accessibility_service.h" +#include "chrome/browser/ash/accessibility/speech_monitor.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/browser.h" +#include "chrome/common/extensions/extension_constants.h" #include "chrome/test/base/in_process_browser_test.h" #include "components/keyed_service/core/keyed_service.h" #include "content/public/test/browser_test.h" -#include "services/accessibility/public/mojom/accessibility_service.mojom-shared.h" +#include "services/accessibility/public/mojom/accessibility_service.mojom.h" +#include "services/accessibility/public/mojom/tts.mojom-shared.h" #include "testing/gtest/include/gtest/gtest.h" #include "ui/accessibility/accessibility_features.h" @@ -216,4 +220,37 @@ // Disabling multiple times has no bad effect. // fake_service_->AutomationClientEnable(false); } + +IN_PROC_BROWSER_TEST_F(AccessibilityServiceClientTest, TtsGetVoices) { + AccessibilityServiceClient client; + test::SpeechMonitor sm; + client.SetProfile(browser()->profile()); + // Enable some assistive technology. The service will not be started until + // some AT needs it. + client.SetSelectToSpeakEnabled(true); + EXPECT_TRUE(ServiceHasATEnabled(AssistiveTechnologyType::kSelectToSpeak)); + + fake_service_->BindAnotherTts(); + + base::RunLoop waiter; + fake_service_->RequestTtsVoices(base::BindLambdaForTesting( + [&waiter](std::vector<ax::mojom::TtsVoicePtr> voices) { + waiter.Quit(); + ASSERT_GT(voices.size(), 0u); + auto& voice = voices[0]; + EXPECT_EQ(voice->voice_name, "SpeechMonitor"); + EXPECT_EQ(voice->engine_id, + extension_misc::kGoogleSpeechSynthesisExtensionId); + ASSERT_TRUE(voice->event_types); + ASSERT_EQ(voice->event_types.value().size(), 1u); + EXPECT_EQ(voice->event_types.value()[0], ax::mojom::TtsEventType::kEnd); + })); + waiter.Run(); + + // The service may bind multiple TTS without crashing. + for (int i = 0; i < 2; i++) { + fake_service_->BindAnotherTts(); + } +} + } // namespace ash
diff --git a/chrome/browser/ash/accessibility/service/fake_accessibility_service.cc b/chrome/browser/ash/accessibility/service/fake_accessibility_service.cc index 858e2e2..5df4f363 100644 --- a/chrome/browser/ash/accessibility/service/fake_accessibility_service.cc +++ b/chrome/browser/ash/accessibility/service/fake_accessibility_service.cc
@@ -6,8 +6,10 @@ #include <tuple> +#include "base/functional/callback.h" #include "base/run_loop.h" #include "services/accessibility/public/mojom/accessibility_service.mojom.h" +#include "services/accessibility/public/mojom/tts.mojom.h" namespace ash { @@ -34,6 +36,12 @@ std::move(automation_remote), std::move(automation_client_receiver)); } +void FakeAccessibilityService::BindAnotherTts() { + mojo::PendingReceiver<ax::mojom::Tts> tts_receiver; + tts_remotes_.Add(tts_receiver.InitWithNewPipeAndPassRemote()); + accessibility_service_client_remote_->BindTts(std::move(tts_receiver)); +} + void FakeAccessibilityService::BindAssistiveTechnologyController( mojo::PendingReceiver<ax::mojom::AssistiveTechnologyController> at_controller_receiver, @@ -106,4 +114,11 @@ runner.Run(); } +void FakeAccessibilityService::RequestTtsVoices( + ax::mojom::Tts::GetVoicesCallback callback) { + for (auto& tts_client : tts_remotes_) { + tts_client->GetVoices(std::move(callback)); + } +} + } // namespace ash
diff --git a/chrome/browser/ash/accessibility/service/fake_accessibility_service.h b/chrome/browser/ash/accessibility/service/fake_accessibility_service.h index 27b5e31..6b57558 100644 --- a/chrome/browser/ash/accessibility/service/fake_accessibility_service.h +++ b/chrome/browser/ash/accessibility/service/fake_accessibility_service.h
@@ -5,12 +5,14 @@ #ifndef CHROME_BROWSER_ASH_ACCESSIBILITY_SERVICE_FAKE_ACCESSIBILITY_SERVICE_H_ #define CHROME_BROWSER_ASH_ACCESSIBILITY_SERVICE_FAKE_ACCESSIBILITY_SERVICE_H_ +#include "base/functional/callback.h" #include "base/unguessable_token.h" #include "chrome/browser/accessibility/service/accessibility_service_router.h" #include "components/keyed_service/core/keyed_service.h" #include "mojo/public/cpp/bindings/receiver_set.h" #include "mojo/public/cpp/bindings/remote_set.h" #include "services/accessibility/public/mojom/accessibility_service.mojom.h" +#include "services/accessibility/public/mojom/tts.mojom.h" #include "ui/accessibility/ax_action_data.h" #include "ui/accessibility/ax_event.h" #include "ui/accessibility/ax_tree_update.h" @@ -73,16 +75,20 @@ return enabled_ATs_; } - // Allows tests to bind Automation multiple times, mimicking multiple + // Allows tests to bind APIs multiple times, mimicking multiple // V8 instances in the service. void BindAnotherAutomation(); + void BindAnotherTts(); // Calls ax::mojom::AutomationClient::Enable or ::Disable. void AutomationClientEnable(bool enabled); - // Whats for Automation events to come in. + // Waits for Automation events to come in. void WaitForAutomationEvents(); + // Sends a request from the service for the TTS voices list. + void RequestTtsVoices(ax::mojom::Tts::GetVoicesCallback callback); + // Getters for automation events. std::vector<ui::AXTreeID> tree_destroyed_events() const { return tree_destroyed_events_; @@ -110,6 +116,8 @@ mojo::ReceiverSet<ax::mojom::Automation> automation_receivers_; mojo::RemoteSet<ax::mojom::AutomationClient> automation_client_remotes_; + mojo::RemoteSet<ax::mojom::Tts> tts_remotes_; + mojo::ReceiverSet<ax::mojom::AssistiveTechnologyController> at_controller_receivers_; mojo::Remote<ax::mojom::AccessibilityServiceClient>
diff --git a/chrome/browser/ash/accessibility/service/tts_client_impl.cc b/chrome/browser/ash/accessibility/service/tts_client_impl.cc new file mode 100644 index 0000000..beb9538 --- /dev/null +++ b/chrome/browser/ash/accessibility/service/tts_client_impl.cc
@@ -0,0 +1,76 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/ash/accessibility/service/tts_client_impl.h" + +#include "content/public/browser/browser_context.h" +#include "content/public/browser/tts_controller.h" +#include "services/accessibility/public/mojom/tts.mojom.h" + +namespace ash { + +namespace { + +ax::mojom::TtsEventType ToMojo(content::TtsEventType event_type) { + switch (event_type) { + case content::TTS_EVENT_START: + return ax::mojom::TtsEventType::kStart; + case content::TTS_EVENT_END: + return ax::mojom::TtsEventType::kEnd; + case content::TTS_EVENT_WORD: + return ax::mojom::TtsEventType::kWord; + case content::TTS_EVENT_SENTENCE: + return ax::mojom::TtsEventType::kSentence; + case content::TTS_EVENT_MARKER: + return ax::mojom::TtsEventType::kMarker; + case content::TTS_EVENT_INTERRUPTED: + return ax::mojom::TtsEventType::kInterrupted; + case content::TTS_EVENT_CANCELLED: + return ax::mojom::TtsEventType::kCancelled; + case content::TTS_EVENT_ERROR: + return ax::mojom::TtsEventType::kError; + case content::TTS_EVENT_PAUSE: + return ax::mojom::TtsEventType::kPause; + case content::TTS_EVENT_RESUME: + return ax::mojom::TtsEventType::kResume; + } +} + +} // namespace + +TtsClientImpl::TtsClientImpl(content::BrowserContext* profile) + : profile_(profile) { + CHECK(profile_); +} + +TtsClientImpl::~TtsClientImpl() = default; + +void TtsClientImpl::Bind(mojo::PendingReceiver<Tts> tts_receiver) { + tts_receivers_.Add(this, std::move(tts_receiver)); +} + +void TtsClientImpl::GetVoices(GetVoicesCallback callback) { + std::vector<content::VoiceData> voices; + // TODO(b:277221897): Pass a fake GURL matching the extension URL so that + // Select to Speak can get the enhanced network voices. + content::TtsController::GetInstance()->GetVoices(profile_, GURL(""), &voices); + std::vector<ax::mojom::TtsVoicePtr> results; + for (auto& voice : voices) { + auto result = ax::mojom::TtsVoice::New(); + result->voice_name = voice.name; + result->lang = voice.lang; + result->remote = voice.remote; + result->engine_id = voice.engine_id; + if (!voice.events.empty()) { + result->event_types = std::vector<ax::mojom::TtsEventType>(); + for (auto type : voice.events) { + result->event_types->emplace_back(ToMojo(type)); + } + } + results.emplace_back(std::move(result)); + } + std::move(callback).Run(std::move(results)); +} + +} // namespace ash
diff --git a/chrome/browser/ash/accessibility/service/tts_client_impl.h b/chrome/browser/ash/accessibility/service/tts_client_impl.h new file mode 100644 index 0000000..7794672 --- /dev/null +++ b/chrome/browser/ash/accessibility/service/tts_client_impl.h
@@ -0,0 +1,39 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_BROWSER_ASH_ACCESSIBILITY_SERVICE_TTS_CLIENT_IMPL_H_ +#define CHROME_BROWSER_ASH_ACCESSIBILITY_SERVICE_TTS_CLIENT_IMPL_H_ + +#include "chrome/browser/profiles/profile.h" +#include "mojo/public/cpp/bindings/pending_receiver.h" +#include "mojo/public/cpp/bindings/receiver_set.h" +#include "services/accessibility/public/mojom/tts.mojom.h" + +namespace ash { + +// The TtsClientImpl receives text-to-speech requests from the Accessibility +// Service and sends back information about the text-to-speech state. +class TtsClientImpl : public ax::mojom::Tts { + public: + // Constructs a new TtsClientImpl for the given `profile`. This TtsClientImpl + // will be reset when the profile changes so it can assume that the profile + // is valid for its entire lifetime. + explicit TtsClientImpl(content::BrowserContext* profile); + TtsClientImpl(const TtsClientImpl&) = delete; + TtsClientImpl& operator=(const TtsClientImpl&) = delete; + ~TtsClientImpl() override; + + void Bind(mojo::PendingReceiver<Tts> tts_receiver); + + // ax::mojom::Tts: + void GetVoices(GetVoicesCallback callback) override; + + private: + mojo::ReceiverSet<ax::mojom::Tts> tts_receivers_; + raw_ptr<content::BrowserContext, ExperimentalAsh> profile_ = nullptr; +}; + +} // namespace ash + +#endif // CHROME_BROWSER_ASH_ACCESSIBILITY_SERVICE_TTS_CLIENT_IMPL_H_
diff --git a/chrome/browser/ash/app_restore/arc_ghost_window_shell_surface.cc b/chrome/browser/ash/app_restore/arc_ghost_window_shell_surface.cc index 4885c294..e49c81e 100644 --- a/chrome/browser/ash/app_restore/arc_ghost_window_shell_surface.cc +++ b/chrome/browser/ash/app_restore/arc_ghost_window_shell_surface.cc
@@ -53,8 +53,7 @@ /*can_minimize=*/true, container, /*default_scale_cancellation=*/true, - /*supports_floated_state=*/arc::GetArcAndroidSdkVersionAsInt() != - arc::kArcVersionP) { + /*supports_floated_state=*/false) { controller_surface_ = std::move(surface); buffer_ = std::make_unique<exo::Buffer>( aura::Env::GetInstance() @@ -140,13 +139,12 @@ shell_surface->SetTitle(restore_data->title.value()); // Set frame buttons. - constexpr uint32_t kAllButtonMask = + constexpr uint32_t kVisibleButtonMask = 1 << views::CAPTION_BUTTON_ICON_MINIMIZE | 1 << views::CAPTION_BUTTON_ICON_MAXIMIZE_RESTORE | 1 << views::CAPTION_BUTTON_ICON_CLOSE | - 1 << views::CAPTION_BUTTON_ICON_BACK | - 1 << views::CAPTION_BUTTON_ICON_FLOAT; - shell_surface->SetFrameButtons(kAllButtonMask, kAllButtonMask); + 1 << views::CAPTION_BUTTON_ICON_BACK; + shell_surface->SetFrameButtons(kVisibleButtonMask, kVisibleButtonMask); shell_surface->OnSetFrameColors(theme_color, theme_color); shell_surface->controller_surface()->Commit();
diff --git a/chrome/browser/ash/arc/input_overlay/actions/action.cc b/chrome/browser/ash/arc/input_overlay/actions/action.cc index b3920bb6..1fd23d2 100644 --- a/chrome/browser/ash/arc/input_overlay/actions/action.cc +++ b/chrome/browser/ash/arc/input_overlay/actions/action.cc
@@ -8,6 +8,8 @@ #include "chrome/browser/ash/arc/input_overlay/actions/position.h" #include "chrome/browser/ash/arc/input_overlay/display_overlay_controller.h" #include "chrome/browser/ash/arc/input_overlay/touch_id_manager.h" +#include "chrome/browser/ash/arc/input_overlay/touch_injector.h" +#include "chrome/browser/ash/arc/input_overlay/ui/action_view.h" #include "ui/aura/window.h" #include "ui/events/base_event_utils.h" #include "ui/events/keycodes/dom/dom_code.h"
diff --git a/chrome/browser/ash/arc/input_overlay/actions/action.h b/chrome/browser/ash/arc/input_overlay/actions/action.h index 2c5d9c1..f2592d5e 100644 --- a/chrome/browser/ash/arc/input_overlay/actions/action.h +++ b/chrome/browser/ash/arc/input_overlay/actions/action.h
@@ -18,9 +18,7 @@ #include "chrome/browser/ash/arc/input_overlay/actions/position.h" #include "chrome/browser/ash/arc/input_overlay/constants.h" #include "chrome/browser/ash/arc/input_overlay/db/proto/app_data.pb.h" -#include "chrome/browser/ash/arc/input_overlay/touch_injector.h" #include "chrome/browser/ash/arc/input_overlay/ui/action_label.h" -#include "chrome/browser/ash/arc/input_overlay/ui/action_view.h" #include "ui/aura/window_tree_host.h" #include "ui/gfx/geometry/point_f.h" #include "ui/gfx/geometry/rect_f.h"
diff --git a/chrome/browser/ash/arc/input_overlay/actions/action_move.cc b/chrome/browser/ash/arc/input_overlay/actions/action_move.cc index fe9be790..0c72fac 100644 --- a/chrome/browser/ash/arc/input_overlay/actions/action_move.cc +++ b/chrome/browser/ash/arc/input_overlay/actions/action_move.cc
@@ -12,6 +12,7 @@ #include "base/strings/utf_string_conversions.h" #include "chrome/browser/ash/arc/input_overlay/actions/action.h" #include "chrome/browser/ash/arc/input_overlay/touch_id_manager.h" +#include "chrome/browser/ash/arc/input_overlay/touch_injector.h" #include "chrome/browser/ash/arc/input_overlay/ui/action_label.h" #include "chrome/browser/ash/arc/input_overlay/util.h" #include "third_party/abseil-cpp/absl/types/optional.h"
diff --git a/chrome/browser/ash/arc/input_overlay/actions/action_move.h b/chrome/browser/ash/arc/input_overlay/actions/action_move.h index cbd9a04..f9b4f34 100644 --- a/chrome/browser/ash/arc/input_overlay/actions/action_move.h +++ b/chrome/browser/ash/arc/input_overlay/actions/action_move.h
@@ -14,6 +14,8 @@ // UI specs. constexpr int kActionMoveMinRadius = 99; +class TouchInjector; + // ActionMoveKey transforms key/mouse events to touch events with touch // move involved. class ActionMove : public Action {
diff --git a/chrome/browser/ash/arc/input_overlay/actions/action_tap.cc b/chrome/browser/ash/arc/input_overlay/actions/action_tap.cc index 91efd1e..7f58ea5 100644 --- a/chrome/browser/ash/arc/input_overlay/actions/action_tap.cc +++ b/chrome/browser/ash/arc/input_overlay/actions/action_tap.cc
@@ -9,6 +9,7 @@ #include "chrome/browser/ash/arc/input_overlay/actions/input_element.h" #include "chrome/browser/ash/arc/input_overlay/constants.h" #include "chrome/browser/ash/arc/input_overlay/touch_id_manager.h" +#include "chrome/browser/ash/arc/input_overlay/touch_injector.h" #include "chrome/browser/ash/arc/input_overlay/ui/action_label.h" #include "chrome/browser/ash/arc/input_overlay/util.h" #include "ui/aura/window.h"
diff --git a/chrome/browser/ash/arc/input_overlay/actions/action_tap.h b/chrome/browser/ash/arc/input_overlay/actions/action_tap.h index fd9d0aa..c7b886a 100644 --- a/chrome/browser/ash/arc/input_overlay/actions/action_tap.h +++ b/chrome/browser/ash/arc/input_overlay/actions/action_tap.h
@@ -10,6 +10,9 @@ #include "chrome/browser/ash/arc/input_overlay/ui/action_view.h" namespace arc::input_overlay { + +class TouchInjector; + // ActionTap transform key/mouse events to touch events. class ActionTap : public Action { public:
diff --git a/chrome/browser/ash/arc/input_overlay/arc_input_overlay_manager.h b/chrome/browser/ash/arc/input_overlay/arc_input_overlay_manager.h index be66f75..93df206 100644 --- a/chrome/browser/ash/arc/input_overlay/arc_input_overlay_manager.h +++ b/chrome/browser/ash/arc/input_overlay/arc_input_overlay_manager.h
@@ -6,6 +6,7 @@ #define CHROME_BROWSER_ASH_ARC_INPUT_OVERLAY_ARC_INPUT_OVERLAY_MANAGER_H_ #include "ash/components/arc/ime/arc_ime_bridge.h" +#include "ash/constants/ash_features.h" #include "ash/public/cpp/tablet_mode_observer.h" #include "ash/wm/tablet_mode/tablet_mode_controller.h" #include "base/memory/raw_ptr.h"
diff --git a/chrome/browser/ash/arc/input_overlay/arc_input_overlay_manager_unittest.cc b/chrome/browser/ash/arc/input_overlay/arc_input_overlay_manager_unittest.cc index f0242eb..02a03614 100644 --- a/chrome/browser/ash/arc/input_overlay/arc_input_overlay_manager_unittest.cc +++ b/chrome/browser/ash/arc/input_overlay/arc_input_overlay_manager_unittest.cc
@@ -10,6 +10,7 @@ #include "ash/wm/tablet_mode/tablet_mode_controller_test_api.h" #include "ash/wm/window_util.h" #include "chrome/browser/ash/app_list/arc/arc_app_test.h" +#include "chrome/browser/ash/arc/input_overlay/actions/action.h" #include "chrome/browser/ash/arc/input_overlay/test/arc_test_window.h" #include "chrome/browser/ash/arc/input_overlay/test/event_capturer.h" #include "chrome/browser/ash/arc/input_overlay/test/test_utils.h"
diff --git a/chrome/browser/ash/arc/input_overlay/display_overlay_controller_unittest.cc b/chrome/browser/ash/arc/input_overlay/display_overlay_controller_unittest.cc index 516e42b..a6429b69 100644 --- a/chrome/browser/ash/arc/input_overlay/display_overlay_controller_unittest.cc +++ b/chrome/browser/ash/arc/input_overlay/display_overlay_controller_unittest.cc
@@ -12,6 +12,7 @@ #include "chrome/browser/ash/arc/input_overlay/touch_injector.h" #include "components/exo/test/exo_test_base.h" #include "testing/gtest/include/gtest/gtest.h" +#include "ui/base/resource/resource_bundle.h" #include "ui/events/base_event_utils.h" #include "ui/events/event.h" #include "ui/lottie/resource.h"
diff --git a/chrome/browser/ash/arc/input_overlay/touch_injector.cc b/chrome/browser/ash/arc/input_overlay/touch_injector.cc index 82847ef..bec7d8fa 100644 --- a/chrome/browser/ash/arc/input_overlay/touch_injector.cc +++ b/chrome/browser/ash/arc/input_overlay/touch_injector.cc
@@ -14,6 +14,7 @@ #include "base/functional/bind.h" #include "base/task/single_thread_task_runner.h" #include "base/task/thread_pool.h" +#include "chrome/browser/ash/arc/input_overlay/actions/action.h" #include "chrome/browser/ash/arc/input_overlay/actions/action_move.h" #include "chrome/browser/ash/arc/input_overlay/actions/action_tap.h" #include "chrome/browser/ash/arc/input_overlay/arc_input_overlay_ukm.h" @@ -27,7 +28,6 @@ #include "ui/events/base_event_utils.h" #include "ui/events/event_constants.h" #include "ui/events/event_source.h" -#include "ui/gfx/geometry/vector2d_f.h" #include "ui/views/controls/label.h" #include "ui/views/widget/widget.h" #include "ui/views/window/non_client_view.h"
diff --git a/chrome/browser/ash/arc/input_overlay/touch_injector.h b/chrome/browser/ash/arc/input_overlay/touch_injector.h index 42e3892..d45feff2 100644 --- a/chrome/browser/ash/arc/input_overlay/touch_injector.h +++ b/chrome/browser/ash/arc/input_overlay/touch_injector.h
@@ -8,11 +8,11 @@ #include <memory> #include <vector> +#include "ash/constants/ash_features.h" #include "base/functional/callback.h" #include "base/memory/raw_ptr.h" #include "base/scoped_observation.h" -#include "chrome/browser/ash/arc/input_overlay/actions/action.h" -#include "chrome/browser/ash/arc/input_overlay/constants.h" +#include "base/values.h" #include "chrome/browser/ash/arc/input_overlay/display_overlay_controller.h" #include "ui/events/event_rewriter.h" #include "ui/gfx/geometry/rect_f.h"
diff --git a/chrome/browser/ash/arc/input_overlay/ui/action_view.cc b/chrome/browser/ash/arc/input_overlay/ui/action_view.cc index e6683af..79f0c02 100644 --- a/chrome/browser/ash/arc/input_overlay/ui/action_view.cc +++ b/chrome/browser/ash/arc/input_overlay/ui/action_view.cc
@@ -11,6 +11,8 @@ #include "base/strings/string_piece.h" #include "chrome/app/vector_icons/vector_icons.h" #include "chrome/browser/ash/arc/input_overlay/arc_input_overlay_uma.h" +#include "chrome/browser/ash/arc/input_overlay/display_overlay_controller.h" +#include "chrome/browser/ash/arc/input_overlay/touch_injector.h" #include "chrome/browser/ash/arc/input_overlay/util.h" #include "chrome/grit/generated_resources.h" #include "third_party/skia/include/core/SkColor.h"
diff --git a/chrome/browser/ash/arc/input_overlay/ui/action_view.h b/chrome/browser/ash/arc/input_overlay/ui/action_view.h index 6c2ec271..66d1f32 100644 --- a/chrome/browser/ash/arc/input_overlay/ui/action_view.h +++ b/chrome/browser/ash/arc/input_overlay/ui/action_view.h
@@ -8,7 +8,6 @@ #include "base/memory/raw_ptr.h" #include "chrome/browser/ash/arc/input_overlay/actions/action.h" #include "chrome/browser/ash/arc/input_overlay/constants.h" -#include "chrome/browser/ash/arc/input_overlay/display_overlay_controller.h" #include "chrome/browser/ash/arc/input_overlay/ui/action_edit_button.h" #include "chrome/browser/ash/arc/input_overlay/ui/action_label.h" #include "chrome/browser/ash/arc/input_overlay/ui/reposition_controller.h" @@ -21,6 +20,7 @@ class Action; class ActionEditButton; +class DisplayOverlayController; // Represents the default label index. Default -1 means all the index. constexpr int kDefaultLabelIndex = -1;
diff --git a/chrome/browser/ash/arc/input_overlay/ui/editing_list.cc b/chrome/browser/ash/arc/input_overlay/ui/editing_list.cc index 6326fde0..7aab699 100644 --- a/chrome/browser/ash/arc/input_overlay/ui/editing_list.cc +++ b/chrome/browser/ash/arc/input_overlay/ui/editing_list.cc
@@ -16,6 +16,7 @@ #include "chrome/app/vector_icons/vector_icons.h" #include "chrome/browser/ash/arc/input_overlay/actions/action.h" #include "chrome/browser/ash/arc/input_overlay/display_overlay_controller.h" +#include "chrome/browser/ash/arc/input_overlay/touch_injector.h" #include "chrome/browser/ash/arc/input_overlay/ui/action_view_list_item.h" #include "chrome/grit/component_extension_resources.h" #include "ui/chromeos/styles/cros_tokens_color_mappings.h"
diff --git a/chrome/browser/ash/arc/input_overlay/ui/input_mapping_view.cc b/chrome/browser/ash/arc/input_overlay/ui/input_mapping_view.cc index c5b5cb2..19741e6 100644 --- a/chrome/browser/ash/arc/input_overlay/ui/input_mapping_view.cc +++ b/chrome/browser/ash/arc/input_overlay/ui/input_mapping_view.cc
@@ -6,6 +6,7 @@ #include "chrome/browser/ash/arc/input_overlay/actions/action.h" #include "chrome/browser/ash/arc/input_overlay/display_overlay_controller.h" +#include "chrome/browser/ash/arc/input_overlay/touch_injector.h" #include "chrome/browser/ash/arc/input_overlay/ui/action_view.h" #include "chrome/browser/ash/arc/input_overlay/util.h" #include "chrome/grit/generated_resources.h"
diff --git a/chrome/browser/ash/arc/vmm/arc_vmm_manager.cc b/chrome/browser/ash/arc/vmm/arc_vmm_manager.cc index fcae721..24b6155 100644 --- a/chrome/browser/ash/arc/vmm/arc_vmm_manager.cc +++ b/chrome/browser/ash/arc/vmm/arc_vmm_manager.cc
@@ -97,6 +97,10 @@ ArcVmmManager::~ArcVmmManager() = default; void ArcVmmManager::SetSwapState(SwapState state) { + if (!IsArcVmEnabled() || !arc_connected_) { + LOG(ERROR) << "Failed to SetSwapState, ARCVM not enabled or connected."; + return; + } vm_tools::concierge::SwapOperation op; switch (state) { case SwapState::ENABLE: @@ -139,6 +143,13 @@ } } +void ArcVmmManager::OnConnectionReady() { + arc_connected_ = true; +} +void ArcVmmManager::OnConnectionClosed() { + arc_connected_ = false; +} + void ArcVmmManager::SendSwapRequest( vm_tools::concierge::SwapOperation operation, base::OnceClosure success_callback) {
diff --git a/chrome/browser/ash/arc/vmm/arc_vmm_manager.h b/chrome/browser/ash/arc/vmm/arc_vmm_manager.h index da887cc2..425d69a 100644 --- a/chrome/browser/ash/arc/vmm/arc_vmm_manager.h +++ b/chrome/browser/ash/arc/vmm/arc_vmm_manager.h
@@ -7,6 +7,8 @@ #include <string> +#include "ash/components/arc/mojom/app.mojom.h" +#include "ash/components/arc/session/connection_observer.h" #include "base/functional/callback_forward.h" #include "base/memory/raw_ptr.h" #include "chrome/browser/ash/arc/vmm/arc_system_state_observation.h" @@ -27,7 +29,8 @@ }; // ARCVM vmm features manager. -class ArcVmmManager : public KeyedService { +class ArcVmmManager : public KeyedService, + public arc::ConnectionObserver<arc::mojom::AppInstance> { public: // Returns singleton instance for the given BrowserContext, or nullptr if // the browser |context| is not allowed to use ARC. @@ -53,6 +56,10 @@ static void EnsureFactoryBuilt(); + // arc::ConnectionObserver: + void OnConnectionReady() override; + void OnConnectionClosed() override; + private: friend class ArcVmmManagerTest; // Accelerator target for experimental usage. Ctrl + Alt + Shift + O / P for @@ -93,6 +100,8 @@ // flag and parameters. std::unique_ptr<ArcVmmSwapScheduler> scheduler_; + bool arc_connected_ = false; + std::string user_id_hash_; base::RepeatingCallback<
diff --git a/chrome/browser/ash/arc/vmm/arc_vmm_manager_unittest.cc b/chrome/browser/ash/arc/vmm/arc_vmm_manager_unittest.cc index 19516bc..28fcad1 100644 --- a/chrome/browser/ash/arc/vmm/arc_vmm_manager_unittest.cc +++ b/chrome/browser/ash/arc/vmm/arc_vmm_manager_unittest.cc
@@ -96,6 +96,14 @@ std::make_unique<TestConciergeClient>(ash::FakeCiceroneClient::Get()); } + void EnableAndConnectArcVm() { + auto* command_line = base::CommandLine::ForCurrentProcess(); + command_line->InitFromArgv({"", "--enable-arcvm"}); + if (manager_) { + manager_->OnConnectionReady(); + } + } + void InitVmmManager() { manager_ = ArcVmmManager::GetForBrowserContextForTesting(testing_profile_); manager_->set_user_id_hash("test_user_hash_id"); @@ -136,6 +144,7 @@ TEST_F(ArcVmmManagerTest, EnableSwapWhenTrimSuccess) { InitVmmManager(); + EnableAndConnectArcVm(); SetTrimCall(true); InitAggressiveBallonResponse(); @@ -151,6 +160,7 @@ TEST_F(ArcVmmManagerTest, NotEnableSwapWhenTrimFail) { InitVmmManager(); + EnableAndConnectArcVm(); SetTrimCall(false); InitAggressiveBallonResponse(); @@ -166,6 +176,7 @@ TEST_F(ArcVmmManagerTest, ForceSwapSuccess) { InitVmmManager(); + EnableAndConnectArcVm(); SetTrimCall(true); InitAggressiveBallonResponse(); @@ -178,6 +189,20 @@ EXPECT_EQ(0, client()->disable_count()); } +TEST_F(ArcVmmManagerTest, NotSendSwapRequestIfArcNotReady) { + InitVmmManager(); + SetTrimCall(true); + InitAggressiveBallonResponse(); + + manager()->SetSwapState(SwapState::FORCE_ENABLE); + base::RunLoop().RunUntilIdle(); + // Not send "FORCE_ENABLE". + EXPECT_EQ(0, client()->force_enable_count()); + EXPECT_EQ(0, client()->enable_count()); + EXPECT_EQ(0, client()->swap_out_count()); + EXPECT_EQ(0, client()->disable_count()); +} + // This test verify the weak ptr safety in scheduler. TEST_F(ArcVmmManagerTest, WeakPtrRef) { class TestClass {
diff --git a/chrome/browser/ash/arc/vmm/arcvm_working_set_trim_executor.cc b/chrome/browser/ash/arc/vmm/arcvm_working_set_trim_executor.cc index 32a1399..10ace7fd 100644 --- a/chrome/browser/ash/arc/vmm/arcvm_working_set_trim_executor.cc +++ b/chrome/browser/ash/arc/vmm/arcvm_working_set_trim_executor.cc
@@ -17,6 +17,8 @@ constexpr char BROWSER_CONTEXT_ERROR_MSG[] = "BrowserContext unavailable"; } +bool ArcVmWorkingSetTrimExecutor::is_trimming_ = false; + void ArcVmWorkingSetTrimExecutor::Trim(content::BrowserContext* context, ResultCallback callback, ArcVmReclaimType reclaim_type, @@ -25,6 +27,17 @@ DCHECK_NE(ArcVmReclaimType::kReclaimNone, reclaim_type); const char* error = nullptr; + if (ArcVmWorkingSetTrimExecutor::is_trimming_) { + std::move(callback).Run(false, + "ArcVm is trimming, skip this trim request."); + return; + } + ArcVmWorkingSetTrimExecutor::is_trimming_ = true; + // Reset `is_trimming` after called the result callback. + callback = std::move(callback).Then( + base::BindOnce([](bool& is_trimming_state) { is_trimming_state = false; }, + std::ref(ArcVmWorkingSetTrimExecutor::is_trimming_))); + // Before trimming, drop ARCVM's page caches. if (!context) { error = BROWSER_CONTEXT_ERROR_MSG;
diff --git a/chrome/browser/ash/arc/vmm/arcvm_working_set_trim_executor.h b/chrome/browser/ash/arc/vmm/arcvm_working_set_trim_executor.h index 9867f574..dfc3792 100644 --- a/chrome/browser/ash/arc/vmm/arcvm_working_set_trim_executor.h +++ b/chrome/browser/ash/arc/vmm/arcvm_working_set_trim_executor.h
@@ -52,6 +52,11 @@ static void LogErrorAndInvokeCallback(const char* error, ResultCallback callback); + + // Global-like indicator var, set true when starting trim, and set false in + // the result callback of trim. + // Use this var in order to prevent double trim from different caller. + static bool is_trimming_; }; } // namespace arc
diff --git a/chrome/browser/ash/arc/vmm/arcvm_working_set_trim_executor_unittest.cc b/chrome/browser/ash/arc/vmm/arcvm_working_set_trim_executor_unittest.cc new file mode 100644 index 0000000..584968a6 --- /dev/null +++ b/chrome/browser/ash/arc/vmm/arcvm_working_set_trim_executor_unittest.cc
@@ -0,0 +1,109 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/ash/arc/vmm/arcvm_working_set_trim_executor.h" + +#include "ash/components/arc/memory/arc_memory_bridge.h" +#include "ash/components/arc/mojom/memory.mojom.h" +#include "ash/components/arc/session/arc_bridge_service.h" +#include "ash/components/arc/session/arc_service_manager.h" +#include "ash/components/arc/test/connection_holder_util.h" +#include "base/test/bind.h" +#include "base/test/task_environment.h" +#include "base/timer/timer.h" +#include "chrome/test/base/testing_profile.h" +#include "content/public/test/browser_task_environment.h" +#include "testing/gtest/include/gtest/gtest.h" + +namespace arc { + +namespace { + +const base::TimeDelta DELAYED_TIME_DELTA = base::Seconds(10); + +class DelayedMemoryInstance : public mojom::MemoryInstance { + public: + DelayedMemoryInstance() = default; + DelayedMemoryInstance(const DelayedMemoryInstance&) = delete; + DelayedMemoryInstance& operator=(const DelayedMemoryInstance&) = delete; + ~DelayedMemoryInstance() override = default; + + // mojom::MemoryInstance: + void DropCaches(DropCachesCallback callback) override { + if (timer_.IsRunning()) { + return; + } + timer_.Start(FROM_HERE, DELAYED_TIME_DELTA, + base::BindOnce(std::move(callback), true)); + } + + // mojom::MemoryInstance: + void Reclaim(mojom::ReclaimRequestPtr request, + ReclaimCallback callback) override {} + + private: + base::OneShotTimer timer_; +}; + +} // namespace + +class ArcVmWorkingSetTrimExecutorTest : public testing::Test { + public: + ArcVmWorkingSetTrimExecutorTest() = default; + + ArcVmWorkingSetTrimExecutorTest(const ArcVmWorkingSetTrimExecutorTest&) = + delete; + ArcVmWorkingSetTrimExecutorTest& operator=( + const ArcVmWorkingSetTrimExecutorTest&) = delete; + + ~ArcVmWorkingSetTrimExecutorTest() override = default; + + void SetUp() override { + arc_service_manager_ = std::make_unique<ArcServiceManager>(); + testing_profile_ = std::make_unique<TestingProfile>(); + arc::ArcMemoryBridge::GetForBrowserContextForTesting( + testing_profile_.get()); + arc::ArcServiceManager::Get()->arc_bridge_service()->memory()->SetInstance( + &memory_instance_); + arc::WaitForInstanceReady( + arc::ArcServiceManager::Get()->arc_bridge_service()->memory()); + } + + void TearDown() override { testing_profile_.reset(); } + + TestingProfile* testing_profile() { return testing_profile_.get(); } + + protected: + content::BrowserTaskEnvironment task_environment_{ + base::test::TaskEnvironment::TimeSource::MOCK_TIME}; + + private: + DelayedMemoryInstance memory_instance_; + std::unique_ptr<TestingProfile> testing_profile_; + std::unique_ptr<ArcServiceManager> arc_service_manager_; +}; + +TEST_F(ArcVmWorkingSetTrimExecutorTest, NoTrimAgainIfLastTrimStillWorking) { + content::GetUIThreadTaskRunner({})->PostTask( + FROM_HERE, + base::BindOnce(&ArcVmWorkingSetTrimExecutor::Trim, testing_profile(), + base::BindOnce([](bool result, const std::string& msg) { + // Not failed by double trim. + EXPECT_EQ(msg.find("skip"), std::string::npos); + }), + ArcVmReclaimType::kReclaimAll, 0)); + task_environment_.RunUntilIdle(); + // Double Trim. + content::GetUIThreadTaskRunner({})->PostTask( + FROM_HERE, + base::BindOnce(&ArcVmWorkingSetTrimExecutor::Trim, testing_profile(), + base::BindOnce([](bool result, const std::string& msg) { + // Expect failed by double trim. + EXPECT_NE(msg.find("skip"), std::string::npos); + }), + ArcVmReclaimType::kReclaimAll, 0)); + + task_environment_.FastForwardBy(DELAYED_TIME_DELTA); +} +} // namespace arc
diff --git a/chrome/browser/ash/input_method/assistive_suggester.cc b/chrome/browser/ash/input_method/assistive_suggester.cc index 780845e..47499ea 100644 --- a/chrome/browser/ash/input_method/assistive_suggester.cc +++ b/chrome/browser/ash/input_method/assistive_suggester.cc
@@ -30,8 +30,10 @@ #include "ui/base/ime/ash/ime_bridge.h" #include "ui/base/ime/ash/input_method_ukm.h" #include "ui/base/ime/ash/text_input_target.h" +#include "ui/base/ime/text_input_client.h" #include "ui/events/event_constants.h" #include "ui/events/keycodes/keyboard_codes_posix.h" +#include "ui/gfx/geometry/rect.h" #include "url/gurl.h" namespace ash::input_method { @@ -162,6 +164,24 @@ (event.flags() & kModifierKeysMask) == ui::EF_CONTROL_DOWN; } +// Returns the location to which the clipboard history menu should anchor. When +// possible, this anchor is where a clipboard history item would be pasted if +// the user made a selection; otherwise, this function returns a point at (0,0). +gfx::Rect GetClipboardHistoryMenuAnchor() { + TextInputTarget* input_context = IMEBridge::Get()->GetInputContextHandler(); + if (!input_context) { + return gfx::Rect(); + } + + ui::TextInputClient* input_client = + input_context->GetInputMethod()->GetTextInputClient(); + if (!input_client) { + return gfx::Rect(); + } + + return input_client->GetCaretBounds(); +} + void RecordMultiWordTextInputState( PrefService* pref_service, const std::string& engine_id, @@ -464,10 +484,9 @@ } if (IsLongpressEnabledControlV(current_longpress_keydown_.value())) { - const auto anchor_rect = - IMEBridge::Get()->GetInputContextHandler()->GetTextFieldBounds(); if (Shell::Get()->clipboard_history_controller()->ShowMenu( - anchor_rect, ui::MenuSourceType::MENU_SOURCE_KEYBOARD, + GetClipboardHistoryMenuAnchor(), + ui::MenuSourceType::MENU_SOURCE_KEYBOARD, crosapi::mojom::ClipboardHistoryControllerShowSource:: kControlVLongpress, base::BindOnce(&AssistiveSuggester::OnClipboardHistoryMenuClosing,
diff --git a/chrome/browser/ash/input_method/assistive_suggester_unittest.cc b/chrome/browser/ash/input_method/assistive_suggester_unittest.cc index dbcb883a..6eaf1fa8 100644 --- a/chrome/browser/ash/input_method/assistive_suggester_unittest.cc +++ b/chrome/browser/ash/input_method/assistive_suggester_unittest.cc
@@ -10,6 +10,7 @@ #include "ash/shell.h" #include "ash/test/ash_test_base.h" #include "base/functional/bind.h" +#include "base/memory/raw_ptr.h" #include "base/strings/utf_string_conversions.h" #include "base/test/metrics/histogram_tester.h" #include "base/test/repeating_test_future.h" @@ -38,6 +39,7 @@ #include "ui/events/event_constants.h" #include "ui/events/keycodes/dom/dom_code.h" #include "ui/events/keycodes/keyboard_codes_posix.h" +#include "ui/views/controls/textfield/textfield.h" namespace ash::input_method { namespace { @@ -1404,10 +1406,19 @@ SetClipboardText("B"); SetClipboardText("A"); - // Create a test window for the clipboard history controller to recognize as - // a paste target. - gfx::Rect test_window_rect(100, 100, 100, 100); - std::unique_ptr<aura::Window> window(CreateTestWindow(test_window_rect)); + // Create a textfield for the clipboard history controller to recognize as a + // paste target. + textfield_widget_ = CreateFramelessTestWidget(); + textfield_widget_->SetBounds(gfx::Rect(100, 100, 100, 100)); + textfield_ = textfield_widget_->SetContentsView( + std::make_unique<views::Textfield>()); + + // Set the textfield as the text input client so that its caret position can + // be queried. + IMEBridge::Get() + ->GetInputContextHandler() + ->GetInputMethod() + ->SetFocusedTextInputClient(textfield_); } void SetClipboardText(const std::string& text) { @@ -1430,6 +1441,8 @@ FakeSuggestionHandler suggestion_handler_; AssistiveSuggester assistive_suggester_; base::test::RepeatingTestFuture<bool> operation_confirmed_future_; + std::unique_ptr<views::Widget> textfield_widget_; + raw_ptr<views::Textfield> textfield_; base::HistogramTester histogram_tester_; }; @@ -1441,7 +1454,13 @@ assistive_suggester_.OnSurroundingTextChanged(u"A", gfx::Range(1)); task_environment()->FastForwardBy(base::Seconds(1)); - EXPECT_TRUE(Shell::Get()->clipboard_history_controller()->IsMenuShowing()); + auto* const controller = Shell::Get()->clipboard_history_controller(); + EXPECT_TRUE(controller->IsMenuShowing()); + // Precise anchoring logic may change as time goes on, so this test only + // assumes that the clipboard history menu should be left-aligned with the + // input field's caret. + EXPECT_EQ(controller->GetMenuBoundsInScreenForTest().x(), + textfield_->GetCaretBounds().x()); histogram_tester_.ExpectUniqueSample( "Ash.ClipboardHistory.ContextMenu.ShowMenu", crosapi::mojom::ClipboardHistoryControllerShowSource::kControlVLongpress,
diff --git a/chrome/browser/ash/login/app_mode/test/auto_launched_kiosk_browsertest.cc b/chrome/browser/ash/login/app_mode/test/auto_launched_kiosk_browsertest.cc index 6178574..cef01921 100644 --- a/chrome/browser/ash/login/app_mode/test/auto_launched_kiosk_browsertest.cc +++ b/chrome/browser/ash/login/app_mode/test/auto_launched_kiosk_browsertest.cc
@@ -18,6 +18,7 @@ #include "chrome/browser/ash/app_mode/kiosk_app_manager.h" #include "chrome/browser/ash/login/app_mode/kiosk_launch_controller.h" #include "chrome/browser/ash/login/app_mode/test/kiosk_apps_mixin.h" +#include "chrome/browser/ash/login/app_mode/test/kiosk_base_test.h" #include "chrome/browser/ash/login/test/device_state_mixin.h" #include "chrome/browser/ash/login/test/local_state_mixin.h" #include "chrome/browser/ash/login/test/login_manager_mixin.h" @@ -51,12 +52,6 @@ namespace em = ::enterprise_management; -// This is a simple test that only sends an extension message when app launch is -// requested. Webstore data json is in -// chrome/test/data/chromeos/app_mode/webstore/inlineinstall/ -// detail/gbcgichpbeeimejckkpgnaighpndpped -constexpr char kTestNonKioskEnabledApp[] = "gbcgichpbeeimejckkpgnaighpndpped"; - // Primary kiosk app that runs tests for chrome.management API. // The tests are run on the kiosk app launch event. // It has a secondary test kiosk app, which is loaded alongside the app. The @@ -347,7 +342,7 @@ ExtensionTestMessageListener listener("launchRequested"); - // App launch should be canceled, and user session stopped. + // App launch should be canceled, and kiosk session stopped. base::RunLoop run_loop; auto subscription = browser_shutdown::AddAppTerminatingCallback(run_loop.QuitClosure());
diff --git a/chrome/browser/ash/login/app_mode/test/chome_app_kiosk_lacros_browsertest.cc b/chrome/browser/ash/login/app_mode/test/chome_app_kiosk_lacros_browsertest.cc index 16622ed..9e890fc 100644 --- a/chrome/browser/ash/login/app_mode/test/chome_app_kiosk_lacros_browsertest.cc +++ b/chrome/browser/ash/login/app_mode/test/chome_app_kiosk_lacros_browsertest.cc
@@ -2,10 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "base/test/test_future.h" #include "chrome/browser/ash/login/app_mode/test/kiosk_ash_browser_test_starter.h" #include "chrome/browser/ash/login/app_mode/test/kiosk_base_test.h" #include "chrome/browser/ash/login/app_mode/test/kiosk_test_helpers.h" #include "chrome/browser/ash/login/app_mode/test/new_aura_window_watcher.h" +#include "chrome/browser/lifetime/termination_notification.h" #include "content/public/test/browser_test.h" namespace ash { @@ -17,6 +19,8 @@ // should use Kiosk Base Test App. const char kKioskBaseTestAppId[] = "epancfbahpnkphlhpeefecinmgclhjlj"; +const char kLaunchErrorHistogramName[] = "Kiosk.Launch.Error"; + } // namespace // Tests Ash-side of the chrome app kiosk when Lacros is enabled. @@ -42,6 +46,7 @@ protected: KioskAshBrowserTestStarter kiosk_ash_starter_; + base::HistogramTester histogram; }; IN_PROC_BROWSER_TEST_F(ChromeAppKioskLacrosTest, RegularOnlineKiosk) { @@ -59,4 +64,40 @@ EXPECT_TRUE(crosapi::BrowserManager::Get()->IsRunning()); } +IN_PROC_BROWSER_TEST_F(ChromeAppKioskLacrosTest, PRE_NonKioskAppLaunchError) { + if (!kiosk_ash_starter_.HasLacrosArgument()) { + return; + } + histogram.ExpectTotalCount(kLaunchErrorHistogramName, 0); + + SetTestApp(kTestNonKioskEnabledApp); + StartAppLaunchFromLoginScreen( + NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_ONLINE); + + // App launch should be canceled, and kiosk session stopped. + base::test::TestFuture<void> waiter; + auto _ = browser_shutdown::AddAppTerminatingCallback(waiter.GetCallback()); + EXPECT_TRUE(waiter.Wait()); + + // Checks the launch error is saved. + EXPECT_EQ(KioskAppLaunchError::Error::kNotKioskEnabled, + KioskAppLaunchError::Get()); +} + +// Kiosk launch error is recorded on the next kiosk session run. +IN_PROC_BROWSER_TEST_F(ChromeAppKioskLacrosTest, NonKioskAppLaunchError) { + if (!kiosk_ash_starter_.HasLacrosArgument()) { + return; + } + NewAuraWindowWatcher watcher; + StartAppLaunchFromLoginScreen( + NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_ONLINE); + + watcher.WaitForWindow(); + KioskSessionInitializedWaiter().Wait(); + + histogram.ExpectUniqueSample(kLaunchErrorHistogramName, + KioskAppLaunchError::Error::kNotKioskEnabled, 1); +} + } // namespace ash
diff --git a/chrome/browser/ash/login/app_mode/test/kiosk_base_test.h b/chrome/browser/ash/login/app_mode/test/kiosk_base_test.h index 0841a8b6..12ea78d3 100644 --- a/chrome/browser/ash/login/app_mode/test/kiosk_base_test.h +++ b/chrome/browser/ash/login/app_mode/test/kiosk_base_test.h
@@ -38,6 +38,12 @@ extern const char kTestEnterpriseAccountId[]; +// This is a simple test chrome app that does not have `kiosk_enabled` flag in +// manifest. Webstore data json is in +// chrome/test/data/chromeos/app_mode/webstore/inlineinstall/ +// detail/gbcgichpbeeimejckkpgnaighpndpped +constexpr char kTestNonKioskEnabledApp[] = "gbcgichpbeeimejckkpgnaighpndpped"; + extern const test::UIPath kConfigNetwork; extern const char kSizeChangedMessage[];
diff --git a/chrome/browser/ash/login/app_mode/test/kiosk_remote_command_browsertest.cc b/chrome/browser/ash/login/app_mode/test/kiosk_remote_command_browsertest.cc index f8ceabb..72caf30 100644 --- a/chrome/browser/ash/login/app_mode/test/kiosk_remote_command_browsertest.cc +++ b/chrome/browser/ash/login/app_mode/test/kiosk_remote_command_browsertest.cc
@@ -4,7 +4,7 @@ #include <memory> -#include "base/memory/raw_ptr.h" +#include "base/json/json_writer.h" #include "base/scoped_observation.h" #include "base/test/gtest_tags.h" #include "base/test/repeating_test_future.h" @@ -12,16 +12,12 @@ #include "chrome/browser/ash/login/app_mode/test/kiosk_base_test.h" #include "chrome/browser/ash/login/test/device_state_mixin.h" #include "chrome/browser/ash/login/test/login_manager_mixin.h" -#include "chrome/browser/ash/policy/core/browser_policy_connector_ash.h" -#include "chrome/browser/ash/policy/remote_commands/device_command_screenshot_job.h" -#include "chrome/browser/ash/policy/remote_commands/device_command_set_volume_job.h" #include "chrome/browser/ash/policy/remote_commands/device_commands_factory_ash.h" -#include "chrome/browser/browser_process.h" -#include "chrome/browser/browser_process_platform_part_ash.h" +#include "chrome/browser/ash/policy/test_support/embedded_policy_test_server_mixin.h" +#include "chrome/browser/ash/policy/test_support/remote_commands_service_mixin.h" #include "chromeos/ash/components/audio/cras_audio_handler.h" #include "chromeos/ash/components/network/portal_detector/network_portal_detector.h" #include "chromeos/dbus/power/power_manager_client.h" -#include "components/policy/core/common/cloud/cloud_policy_manager.h" #include "components/policy/core/common/remote_commands/remote_commands_service.h" #include "components/policy/core/common/remote_commands/test_support/remote_command_builders.h" #include "components/policy/core/common/remote_commands/test_support/testing_remote_commands_server.h" @@ -37,7 +33,6 @@ using policy::CloudPolicyClient; using policy::TestingRemoteCommandsServer; -const char kDMToken[] = "dmtoken"; const char kDeviceId[] = "kiosk-device"; // workflow: COM_KIOSK_CUJ8_TASK1_WF1 @@ -52,43 +47,6 @@ constexpr char kKioskRemoteScreenshotCommandTag[] = "screenplay-110c74bf-7c94-4e88-8904-95b6bbc7d649"; -// Test `CloudPolicyClient` that interacts with `TestingRemoteCommandsServer`. -class TestRemoteCommandsClient : public CloudPolicyClient { - public: - explicit TestRemoteCommandsClient(TestingRemoteCommandsServer* server) - : CloudPolicyClient(nullptr /* service */, - nullptr /* url_loader_factory */, - CloudPolicyClient::DeviceDMTokenCallback()), - server_(server) { - dm_token_ = kDMToken; - } - TestRemoteCommandsClient(const TestRemoteCommandsClient&) = delete; - TestRemoteCommandsClient& operator=(const TestRemoteCommandsClient&) = delete; - - ~TestRemoteCommandsClient() override = default; - - private: - void FetchRemoteCommands( - std::unique_ptr<policy::RemoteCommandJob::UniqueIDType> last_command_id, - const std::vector<em::RemoteCommandResult>& command_results, - em::PolicyFetchRequest::SignatureType signature_type, - RemoteCommandCallback callback) override { - std::vector<em::SignedData> commands = - server_->FetchCommands(std::move(last_command_id), command_results); - - // Asynchronously send the response from the DMServer back to client. - base::SingleThreadTaskRunner::GetCurrentDefault()->PostTask( - FROM_HERE, base::BindOnce(std::move(callback), - policy::DM_STATUS_SUCCESS, commands)); - } - - void FetchPolicy() override { - // Empty to avoid a crashing cloud policy fetch attempt in ash - } - - raw_ptr<TestingRemoteCommandsServer> server_; -}; - class TestRebootObserver : public chromeos::PowerManagerClient::Observer { public: TestRebootObserver() = default; @@ -136,115 +94,43 @@ } // namespace -// Kiosk tests with a fake device owner setup and a fake remote command client. +// Kiosk tests with a fake device owner setup and a remote commands server +// configured. class KioskRemoteCommandTest : public KioskBaseTest { public: KioskRemoteCommandTest() { - // Skip initial policy setup is needed to do a custom StartConnection below - device_state_.set_skip_initial_policy_setup(true); - - settings_helper_.Set(kDeviceOwner, - base::Value(test_owner_account_id_.GetUserEmail())); + settings_helper_.SetString(kDeviceOwner, + test_owner_account_id_.GetUserEmail()); login_manager_.AppendRegularUsers(1); } void SetUpOnMainThread() override { KioskBaseTest::SetUpOnMainThread(); - remote_command_server_ = std::make_unique<TestingRemoteCommandsServer>(); - - // Create RemoteCommandsService - policy::BrowserPolicyConnectorAsh* const connector = - g_browser_process->platform_part()->browser_policy_connector_ash(); - - policy_manager_ = connector->GetDeviceCloudPolicyManager(); - policy_manager_->StartConnection(std::make_unique<TestRemoteCommandsClient>( - remote_command_server_.get()), - connector->GetInstallAttributes()); - SetPublicKeyAndDeviceId(); - // On real hardware volume change events are reported asynchronous, so // ensure the test behaves similar so they are realistic (and catch the // timing issues this can cause). ash::FakeCrasAudioClient::Get()->send_volume_change_events_asynchronous(); } - protected: - void SetPublicKeyAndDeviceId() { - policy_manager_->core() - ->store() - ->set_policy_signature_public_key_for_testing( - policy::PolicyBuilder::GetPublicTestKeyAsString()); - - auto policy_data = std::make_unique<em::PolicyData>(); - policy_data->set_device_id(kDeviceId); - policy_manager_->core()->store()->set_policy_data_for_testing( - std::move(policy_data)); + policy::RemoteCommandBuilder BuildRemoteCommand() { + return policy::RemoteCommandBuilder().SetTargetDeviceId(kDeviceId); } - em::SignedData CreateSetVolumeRemoteCommand(int volume_level) { - std::string command_payload; - { - base::Value::Dict root_dict; - root_dict.Set(policy::DeviceCommandSetVolumeJob::kVolumeFieldName, - volume_level); - base::JSONWriter::Write(root_dict, &command_payload); - } - em::SignedData signed_command = - policy::SignedDataBuilder() - .SetCommandId(remote_command_server_->GetNextCommandId()) - .SetTargetDeviceId(kDeviceId) - .SetCommandType(em::RemoteCommand_Type_DEVICE_SET_VOLUME) - .SetCommandPayload(command_payload) - .Build(); - - return signed_command; + em::RemoteCommandResult IssueCommandAndGetResponse( + em::RemoteCommand command) { + return remote_commands_service_mixin_.SendRemoteCommand(command); } - em::SignedData CreateRebootRemoteCommand() { - em::SignedData signed_command = - policy::SignedDataBuilder() - .SetCommandId(remote_command_server_->GetNextCommandId()) - .SetTargetDeviceId(kDeviceId) - .SetCommandType(em::RemoteCommand_Type_DEVICE_REBOOT) - .Build(); - return signed_command; + void LaunchKioskApp() { + StartAppLaunchFromLoginScreen( + NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_ONLINE); + WaitForAppLaunchWithOptions(/*check_launch_data=*/true, + /*terminate_app=*/false, + /*keep_app_open=*/true); } - em::SignedData CreateScreenshotRemoteCommand() { - constexpr char kMockUploadUrl[] = "http://example.com/upload"; - std::string command_payload; - { - base::Value::Dict root_dict; - root_dict.Set(policy::DeviceCommandScreenshotJob::kUploadUrlFieldName, - kMockUploadUrl); - base::JSONWriter::Write(root_dict, &command_payload); - } - em::SignedData signed_command = - policy::SignedDataBuilder() - .SetCommandId(remote_command_server_->GetNextCommandId()) - .SetTargetDeviceId(kDeviceId) - .SetCommandType(em::RemoteCommand_Type_DEVICE_SCREENSHOT) - .SetCommandPayload(command_payload) - .Build(); - return signed_command; - } - - em::RemoteCommandResult IssueCommandAndGetResponse(em::SignedData command) { - using ServerResponseFuture = - base::test::TestFuture<const em::RemoteCommandResult&>; - ServerResponseFuture response_future; - remote_command_server_->IssueCommand(command, - response_future.GetCallback()); - - policy::RemoteCommandsService* const remote_commands_service = - policy_manager_->core()->remote_commands_service(); - remote_commands_service->FetchRemoteCommands(); - - // Waits for (async) remote commands to finish - return response_future.Get(); - } - + private: LoginManagerMixin login_manager_{ &mixin_host_, {{LoginManagerMixin::TestUserInfo{test_owner_account_id_}}}}; @@ -252,8 +138,9 @@ DeviceStateMixin device_state_{ &mixin_host_, DeviceStateMixin::State::OOBE_COMPLETED_CLOUD_ENROLLED}; - std::unique_ptr<TestingRemoteCommandsServer> remote_command_server_; - raw_ptr<policy::DeviceCloudPolicyManagerAsh, ExperimentalAsh> policy_manager_; + ash::EmbeddedPolicyTestServerMixin policy_test_server_mixin_{&mixin_host_}; + policy::RemoteCommandsServiceMixin remote_commands_service_mixin_{ + mixin_host_, policy_test_server_mixin_}; }; IN_PROC_BROWSER_TEST_F(KioskRemoteCommandTest, SetVolumeWithRemoteCommand) { @@ -269,18 +156,17 @@ audio_observer.WaitForVolumeChange(); ASSERT_EQ(kInitVolumePercent, audio_handler->GetOutputVolumePercent()); - // Launch kiosk app - StartAppLaunchFromLoginScreen( - NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_ONLINE); - WaitForAppLaunchWithOptions(/*check_launch_data=*/true, - /*terminate_app=*/false, - /*keep_app_open=*/true); + LaunchKioskApp(); // Create a remote command, enqueue from the server, fetch from the client - em::SignedData volume_command = - CreateSetVolumeRemoteCommand(kExpectedVolumePercent); - - auto response = IssueCommandAndGetResponse(volume_command); + auto response = IssueCommandAndGetResponse( + BuildRemoteCommand() + .SetType(em::RemoteCommand_Type_DEVICE_SET_VOLUME) + .SetPayload( + base::WriteJson(base::Value::Dict() // + .Set("volume", kExpectedVolumePercent)) + .value()) + .Build()); // Check that remote command passed and the new volume level was set EXPECT_EQ(em::RemoteCommandResult_ResultType_RESULT_SUCCESS, @@ -292,12 +178,7 @@ IN_PROC_BROWSER_TEST_F(KioskRemoteCommandTest, RebootWithRemoteCommand) { base::AddFeatureIdTagToTestResult(kKioskRemoteRebootCommandTag); - // Launch kiosk app - StartAppLaunchFromLoginScreen( - NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_ONLINE); - WaitForAppLaunchWithOptions(/*check_launch_data=*/true, - /*terminate_app=*/false, - /*keep_app_open=*/true); + LaunchKioskApp(); // Get PowerManagerClient and start observing a restart request chromeos::PowerManagerClient* power_manager_client = @@ -308,8 +189,10 @@ power_manager_client->AddObserver(&observer); // Create a remote command, enqueue from the server, fetch from the client - em::SignedData reboot_command = CreateRebootRemoteCommand(); - auto response = IssueCommandAndGetResponse(reboot_command); + auto response = IssueCommandAndGetResponse( + BuildRemoteCommand() + .SetType(em::RemoteCommand_Type_DEVICE_REBOOT) + .Build()); // Check that remote cmd passed and reboot was requested (via observer event) EXPECT_EQ(em::RemoteCommandResult_ResultType_RESULT_SUCCESS, @@ -321,24 +204,21 @@ IN_PROC_BROWSER_TEST_F(KioskRemoteCommandTest, ScreenshotWithRemoteCommand) { base::AddFeatureIdTagToTestResult(kKioskRemoteScreenshotCommandTag); - // Launch kiosk app - StartAppLaunchFromLoginScreen( - NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_ONLINE); - WaitForAppLaunchWithOptions(/*check_launch_data=*/true, - /*terminate_app=*/false, - /*keep_app_open=*/true); - - // Create a remote command, enqueue from the server, fetch from the client - em::SignedData screenshot_command = CreateScreenshotRemoteCommand(); + LaunchKioskApp(); // skips real image upload // TODO(b/269432279): Try real upload with local url and EmbeddedTestServer policy::DeviceCommandsFactoryAsh::set_commands_for_testing(true); - auto response = IssueCommandAndGetResponse(screenshot_command); + auto response = IssueCommandAndGetResponse( + BuildRemoteCommand() + .SetType(em::RemoteCommand_Type_DEVICE_SCREENSHOT) + .SetPayload(R"( {"fileUploadUrl": "http://example.com/upload"} )") + .Build()); // Check that remote cmd passed EXPECT_EQ(em::RemoteCommandResult_ResultType_RESULT_SUCCESS, response.result()); } + } // namespace ash
diff --git a/chrome/browser/ash/login/easy_unlock/easy_unlock_service.cc b/chrome/browser/ash/login/easy_unlock/easy_unlock_service.cc index ce7f466..91d3145 100644 --- a/chrome/browser/ash/login/easy_unlock/easy_unlock_service.cc +++ b/chrome/browser/ash/login/easy_unlock/easy_unlock_service.cc
@@ -460,18 +460,12 @@ RecordEasyUnlockScreenUnlockEvent(event); if (will_authenticate_using_easy_unlock()) { - // TODO(crbug.com/1171972): Deprecate the AuthMethodChoice metric. - SmartLockMetricsRecorder::RecordSmartLockUnlockAuthMethodChoice( - SmartLockMetricsRecorder::SmartLockAuthMethodChoice::kSmartLock); RecordAuthResult(/*failure_reason=*/absl::nullopt); RecordEasyUnlockScreenUnlockDuration(base::TimeTicks::Now() - lock_screen_last_shown_timestamp_); } else { SmartLockMetricsRecorder::RecordAuthMethodChoiceUnlockPasswordState( GetSmartUnlockPasswordAuthEvent()); - // TODO(crbug.com/1171972): Deprecate the AuthMethodChoice metric. - SmartLockMetricsRecorder::RecordSmartLockUnlockAuthMethodChoice( - SmartLockMetricsRecorder::SmartLockAuthMethodChoice::kOther); OnUserEnteredPassword(); } }
diff --git a/chrome/browser/ash/login/screens/cryptohome_recovery_screen.cc b/chrome/browser/ash/login/screens/cryptohome_recovery_screen.cc index 3e796f0..72a04e1 100644 --- a/chrome/browser/ash/login/screens/cryptohome_recovery_screen.cc +++ b/chrome/browser/ash/login/screens/cryptohome_recovery_screen.cc
@@ -103,8 +103,7 @@ // accounts. auto* user = user_manager::UserManager::Get()->FindUser(user_context->GetAccountId()); - CHECK(user); - if (user->IsChild()) { + if (user && user->IsChild()) { context()->user_context = std::move(user_context); exit_callback_.Run(Result::kNotApplicable); return;
diff --git a/chrome/browser/ash/login/screens/drive_pinning_screen.cc b/chrome/browser/ash/login/screens/drive_pinning_screen.cc index 6202fcb..c6b9f53f 100644 --- a/chrome/browser/ash/login/screens/drive_pinning_screen.cc +++ b/chrome/browser/ash/login/screens/drive_pinning_screen.cc
@@ -5,6 +5,7 @@ #include <iomanip> #include "ash/constants/ash_features.h" +#include "base/check_is_test.h" #include "chrome/browser/ash/drive/drive_integration_service.h" #include "chrome/browser/ash/login/login_pref_names.h" #include "chrome/browser/ash/login/screens/drive_pinning_screen.h" @@ -72,7 +73,7 @@ } } - return drive_pinning_available_; + return !drive_pinning_available_; } bool DrivePinningScreen::MaybeSkip(WizardContext& context) { @@ -93,6 +94,12 @@ } } +void DrivePinningScreen::OnProgressForTest( + const drivefs::pinning::Progress& progress) { + CHECK_IS_TEST(); + OnProgress(progress); +} + void DrivePinningScreen::OnProgress(const Progress& progress) { if (progress.stage == drivefs::pinning::Stage::kSuccess) { drive_pinning_available_ = true;
diff --git a/chrome/browser/ash/login/screens/drive_pinning_screen.h b/chrome/browser/ash/login/screens/drive_pinning_screen.h index f22e8dc..d2c742a0 100644 --- a/chrome/browser/ash/login/screens/drive_pinning_screen.h +++ b/chrome/browser/ash/login/screens/drive_pinning_screen.h
@@ -36,8 +36,18 @@ ~DrivePinningScreen() override; + void set_exit_callback_for_testing(const ScreenExitCallback& callback) { + exit_callback_ = callback; + } + + const ScreenExitCallback& get_exit_callback_for_testing() { + return exit_callback_; + } + void CalculateRequiredSpace(); + void OnProgressForTest(const drivefs::pinning::Progress& progress); + private: // BaseScreen: bool ShouldBeSkipped(const WizardContext& context) const override;
diff --git a/chrome/browser/ash/login/screens/drive_pinning_screen_browsertest.cc b/chrome/browser/ash/login/screens/drive_pinning_screen_browsertest.cc new file mode 100644 index 0000000..a1e3a626 --- /dev/null +++ b/chrome/browser/ash/login/screens/drive_pinning_screen_browsertest.cc
@@ -0,0 +1,178 @@ +// 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/constants/ash_features.h" +#include "ash/constants/ash_pref_names.h" +#include "ash/public/cpp/login_screen_test_api.h" +#include "base/test/test_future.h" +#include "chrome/browser/ash/drive/drive_integration_service.h" +#include "chrome/browser/ash/login/login_pref_names.h" +#include "chrome/browser/ash/login/test/device_state_mixin.h" +#include "chrome/browser/ash/login/test/login_manager_mixin.h" +#include "chrome/browser/ash/login/test/oobe_base_test.h" +#include "chrome/browser/ash/login/test/oobe_screen_exit_waiter.h" +#include "chrome/browser/ash/login/test/oobe_screen_waiter.h" +#include "chrome/browser/ash/login/wizard_controller.h" +#include "chrome/browser/profiles/profile_manager.h" +#include "chrome/browser/ui/webui/ash/login/drive_pinning_screen_handler.h" +#include "chrome/grit/generated_resources.h" +#include "chrome/test/base/fake_gaia_mixin.h" +#include "chromeos/constants/chromeos_features.h" +#include "content/public/test/browser_test.h" +#include "ui/base/l10n/l10n_util.h" +#include "ui/base/text/bytes_formatting.h" + +namespace ash { + +namespace { + +using drivefs::pinning::Progress; +using ::testing::ElementsAre; + +constexpr char kDrivePinningId[] = "drive-pinning"; + +const test::UIPath kDrivePinningDialoguePath = {kDrivePinningId, + "drivePinningDialogue"}; +const test::UIPath kSpaceInformationPath = {kDrivePinningId, + "spaceInformation"}; +const test::UIPath kAcceptButtonPath = {kDrivePinningId, "acceptButton"}; +const test::UIPath kDeclineButtonPath = {kDrivePinningId, "declineButton"}; + +} // namespace + +class DrivePinningScreenTest + : public OobeBaseTest, + public ::testing::WithParamInterface<drivefs::pinning::Stage> { + public: + DrivePinningScreenTest() { + feature_list_.InitWithFeatures( + {ash::features::kOobeChoobe, ash::features::kOobeDrivePinning, + ash::features::kDriveFsBulkPinning, + ash::features::kFeatureManagementDriveFsBulkPinning}, + {}); + } + + void SetUpOnMainThread() override { + OobeBaseTest::SetUpOnMainThread(); + + DrivePinningScreen* drive_pining_screen = + WizardController::default_controller()->GetScreen<DrivePinningScreen>(); + + original_callback_ = drive_pining_screen->get_exit_callback_for_testing(); + drive_pining_screen->set_exit_callback_for_testing(base::BindRepeating( + &DrivePinningScreenTest::HandleScreenExit, base::Unretained(this))); + } + + void SetPinManagerProgress(Progress progress) { + WizardController::default_controller() + ->GetScreen<DrivePinningScreen>() + ->OnProgressForTest(progress); + } + + void ShowDrivePinningScreen() { + login_manager_mixin_.LoginAsNewRegularUser(); + OobeScreenExitWaiter(GetFirstSigninScreen()).Wait(); + WizardController::default_controller()->AdvanceToScreen( + DrivePinningScreenView::kScreenId); + } + + void WaitForScreenExit() { + if (result_.has_value()) { + return; + } + base::test::TestFuture<void> waiter; + quit_closure_ = waiter.GetCallback(); + EXPECT_TRUE(waiter.Wait()); + } + + DrivePinningScreen::ScreenExitCallback original_callback_; + absl::optional<DrivePinningScreen::Result> result_; + + protected: + base::test::ScopedFeatureList feature_list_; + LoginManagerMixin login_manager_mixin_{&mixin_host_}; + + private: + void HandleScreenExit(DrivePinningScreen::Result result) { + result_ = result; + original_callback_.Run(result); + if (quit_closure_) { + std::move(quit_closure_).Run(); + } + } + + base::OnceClosure quit_closure_; +}; + +IN_PROC_BROWSER_TEST_F(DrivePinningScreenTest, Accept) { + Progress current_progress = Progress(); + current_progress.stage = drivefs::pinning::Stage::kSuccess; + // Expect the free space to be 100 GB (107,374,182,400 bytes), the required + // space to be 512 MB. + current_progress.free_space = 100LL * 1024LL * 1024LL * 1024LL; + current_progress.required_space = 512 * 1024 * 1024; + + SetPinManagerProgress(current_progress); + ShowDrivePinningScreen(); + + test::OobeJS().ExpectVisiblePath(kDrivePinningDialoguePath); + test::OobeJS().ExpectElementText( + l10n_util::GetStringFUTF8( + IDS_OOBE_DRIVE_PINNING_ADDITIONAL_SUBTITLE, + ui::FormatBytes(current_progress.required_space), + ui::FormatBytes(current_progress.free_space)), + kSpaceInformationPath); + test::OobeJS().TapOnPath(kAcceptButtonPath); + + WaitForScreenExit(); + + EXPECT_TRUE(ProfileManager::GetPrimaryUserProfile()->GetPrefs()->GetBoolean( + prefs::kOobeDrivePinningEnabledDeferred)); + EXPECT_EQ(result_.value(), DrivePinningScreen::Result::ACCEPT); +} + +IN_PROC_BROWSER_TEST_F(DrivePinningScreenTest, Decline) { + Progress current_progress = Progress(); + current_progress.stage = drivefs::pinning::Stage::kSuccess; + // Expect the free space to be 100 GB (107,374,182,400 bytes), the required + // space to be 512 MB. + current_progress.free_space = 100LL * 1024LL * 1024LL * 1024LL; + current_progress.required_space = 512 * 1024 * 1024; + + SetPinManagerProgress(current_progress); + ShowDrivePinningScreen(); + + test::OobeJS().ExpectVisiblePath(kDrivePinningDialoguePath); + test::OobeJS().TapOnPath(kDeclineButtonPath); + + WaitForScreenExit(); + + EXPECT_FALSE(ProfileManager::GetPrimaryUserProfile()->GetPrefs()->GetBoolean( + prefs::kOobeDrivePinningEnabledDeferred)); + EXPECT_EQ(result_.value(), DrivePinningScreen::Result::DECLINE); +} + +IN_PROC_BROWSER_TEST_P(DrivePinningScreenTest, ScreenSkippedOnError) { + Progress current_progress = Progress(); + current_progress.stage = GetParam(); + + SetPinManagerProgress(current_progress); + ShowDrivePinningScreen(); + + WaitForScreenExit(); + + EXPECT_FALSE(ProfileManager::GetPrimaryUserProfile()->GetPrefs()->GetBoolean( + prefs::kOobeDrivePinningEnabledDeferred)); + EXPECT_EQ(result_.value(), DrivePinningScreen::Result::NOT_APPLICABLE); +} + +INSTANTIATE_TEST_SUITE_P( + All, + DrivePinningScreenTest, + ::testing::Values(drivefs::pinning::Stage::kCannotGetFreeSpace, + drivefs::pinning::Stage::kCannotListFiles, + drivefs::pinning::Stage::kNotEnoughSpace, + drivefs::pinning::Stage::kCannotEnableDocsOffline)); + +} // namespace ash
diff --git a/chrome/browser/ash/login/ui/kiosk_app_menu_controller.cc b/chrome/browser/ash/login/ui/kiosk_app_menu_controller.cc index 345fafc..131d1fb6 100644 --- a/chrome/browser/ash/login/ui/kiosk_app_menu_controller.cc +++ b/chrome/browser/ash/login/ui/kiosk_app_menu_controller.cc
@@ -74,8 +74,9 @@ KioskAppMenu::Get()->SetKioskApps(output); KioskAppLaunchError::Error error = KioskAppLaunchError::Get(); - if (error == KioskAppLaunchError::Error::kNone) + if (error == KioskAppLaunchError::Error::kNone) { return; + } // Clear any old pending Kiosk launch errors KioskAppLaunchError::RecordMetricAndClear(); @@ -94,8 +95,9 @@ void KioskAppMenuController::LaunchApp(const KioskAppMenuEntry& app) { auto* host = LoginDisplayHost::default_host(); - if (!app.account_id.is_valid()) + if (!app.account_id.is_valid()) { return; + } policy::DeviceLocalAccount::Type type; if (!policy::IsDeviceLocalAccountUser(app.account_id.GetUserEmail(), &type)) {
diff --git a/chrome/browser/ash/login/wizard_controller.cc b/chrome/browser/ash/login/wizard_controller.cc index 58ffa16..dcf3f15 100644 --- a/chrome/browser/ash/login/wizard_controller.cc +++ b/chrome/browser/ash/login/wizard_controller.cc
@@ -2457,6 +2457,8 @@ ShowTouchpadScrollScreen(); } else if (screen_id == GaiaInfoScreenView::kScreenId) { ShowGaiaInfoScreen(); + } else if (screen_id == DrivePinningScreenView::kScreenId) { + ShowDrivePinningScreen(); } else if (screen_id == TpmErrorView::kScreenId || screen_id == GaiaPasswordChangedView::kScreenId || screen_id == FamilyLinkNoticeView::kScreenId ||
diff --git a/chrome/browser/ash/web_applications/help_app/DEPS b/chrome/browser/ash/web_applications/help_app/DEPS new file mode 100644 index 0000000..bfae1b41 --- /dev/null +++ b/chrome/browser/ash/web_applications/help_app/DEPS
@@ -0,0 +1,5 @@ +specific_include_rules = { + "help_app_integration_browsertest.cc": [ + "+chrome/browser/ui/views/web_apps/pwa_confirmation_bubble_view.h", + ], +}
diff --git a/chrome/browser/ash/web_applications/help_app/help_app_integration_browsertest.cc b/chrome/browser/ash/web_applications/help_app/help_app_integration_browsertest.cc index 8f973fc1..0120e6bf 100644 --- a/chrome/browser/ash/web_applications/help_app/help_app_integration_browsertest.cc +++ b/chrome/browser/ash/web_applications/help_app/help_app_integration_browsertest.cc
@@ -41,7 +41,9 @@ #include "chrome/browser/ui/browser_finder.h" #include "chrome/browser/ui/browser_window.h" #include "chrome/browser/ui/chrome_pages.h" +#include "chrome/browser/ui/views/web_apps/pwa_confirmation_bubble_view.h" #include "chrome/browser/web_applications/web_app_provider.h" +#include "chrome/browser/web_applications/web_app_utils.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/pref_names.h" #include "chrome/common/url_constants.h" @@ -70,6 +72,7 @@ #include "ui/gfx/color_palette.h" #include "ui/gfx/geometry/rect.h" #include "ui/gfx/geometry/size.h" +#include "ui/views/widget/any_widget_observer.h" #include "url/url_constants.h" namespace ash { @@ -85,12 +88,8 @@ {features::kHelpAppDiscoverTabNotificationAllChannels, features::kReleaseNotesNotificationAllChannels, features::kHelpAppLauncherSearch}, - // TODO(b/279856318): Test auto trigger install dialog functionality. - {features::kHelpAppAutoTriggerInstallDialog}); - - https_server()->ServeFilesFromSourceDirectory( - base::FilePath(FILE_PATH_LITERAL("content/test/data"))); - https_server()->SetSSLConfig(net::EmbeddedTestServer::CERT_TEST_NAMES); + {}); + https_server()->AddDefaultHandlers(GetChromeTestDataDir()); } // Setting up our own HTTPS `EmbeddedTestServer` because the superclass's @@ -108,6 +107,18 @@ return chrome::FindLastActive()->tab_strip_model()->GetActiveWebContents(); } +class HelpAppIntegrationTestWithAutoTriggerDisabled + : public HelpAppIntegrationTest { + public: + HelpAppIntegrationTestWithAutoTriggerDisabled() { + scoped_feature_list_.InitAndDisableFeature( + features::kHelpAppAutoTriggerInstallDialog); + } + + private: + base::test::ScopedFeatureList scoped_feature_list_; +}; + } // namespace // Test that the Help App installs and launches correctly. Runs some spot @@ -534,8 +545,9 @@ EXPECT_EQ(expected_url, GetActiveWebContents()->GetVisibleURL()); } -// Test that the Help App's `openUrlInBrowser` can open valid URLs. -IN_PROC_BROWSER_TEST_P(HelpAppIntegrationTest, +// Test that the Help App's `openUrlInBrowserAndTriggerInstallDialog` can open +// valid URLs if the `kHelpAppAutoTriggerInstallDialog` feature is disabled. +IN_PROC_BROWSER_TEST_P(HelpAppIntegrationTestWithAutoTriggerDisabled, HelpAppV2CanOpenValidHttpsUrlsInBrowser) { ASSERT_TRUE(https_server()->Start()); const GURL test_url = https_server()->GetURL("/title1.html"); @@ -556,11 +568,12 @@ content::TestNavigationObserver navigation_observer(test_url); navigation_observer.StartWatchingNewWebContents(); - // Script that tells the Help App to call the openUrlInBrowser Mojo function. + // Script that tells the Help App to call the + // openUrlInBrowserAndTriggerInstallDialog Mojo function. constexpr char kScript[] = R"( (async () => { const delegate = window.customLaunchData.delegate; - await delegate.openUrlInBrowser($1); + await delegate.openUrlInBrowserAndTriggerInstallDialog($1); })(); )"; // Trigger the script, then wait for the URL to open in a new tab. Use @@ -583,7 +596,71 @@ EXPECT_EQ(test_url, GetActiveWebContents()->GetVisibleURL()); } -// Test that the Help App's `openUrlInBrowser` crashes for invalid URLs. +// Test that the Help App's `openUrlInBrowserAndTriggerInstallDialog` navigates +// and triggers the install dialog by default. +IN_PROC_BROWSER_TEST_P(HelpAppIntegrationTest, + HelpAppV2CanTriggerInstallDialogForValidHttpsUrls) { + if (web_app::IsWebAppsCrosapiEnabled()) { + // TODO(b/282099820): Test the interaction with the Lacros browser. + return; + } + ASSERT_TRUE(https_server()->Start()); + const GURL test_url = + https_server()->GetURL("/banners/manifest_test_page.html"); + + ASSERT_TRUE(test_url.SchemeIs(url::kHttpsScheme)); + + // There should be only be one regular browser with one tab. + EXPECT_EQ(1u, chrome::GetTotalBrowserCount()); + EXPECT_EQ(1, browser()->tab_strip_model()->GetTabCount()); + + WaitForTestSystemAppInstall(); + content::WebContents* web_contents = LaunchApp(SystemWebAppType::HELP); + + // There should be two browser windows, one regular and one for the newly + // opened help app. + EXPECT_EQ(2u, chrome::GetTotalBrowserCount()); + + content::TestNavigationObserver navigation_observer(test_url); + navigation_observer.StartWatchingNewWebContents(); + + // Script that tells the Help App to call the + // OpenUrlInBrowserAndTriggerInstallDialog Mojo function. + constexpr char kScript[] = R"( + (async () => { + const delegate = window.customLaunchData.delegate; + await delegate.openUrlInBrowserAndTriggerInstallDialog($1); + })(); + )"; + // Trigger the script, then wait for the URL to open in a new tab. Use + // ExecJs instead of EvalJsInAppFrame because the script needs to run in the + // same world as the page's code. + EXPECT_TRUE( + content::ExecJs(SandboxedWebUiAppTestBase::GetAppFrame(web_contents), + content::JsReplace(kScript, test_url))); + navigation_observer.Wait(); + + // There should still be two browser windows. + EXPECT_EQ(2u, chrome::GetTotalBrowserCount()); + // The regular browser should only have 2 tabs. + EXPECT_EQ(2, browser()->tab_strip_model()->GetTabCount()); + // After opening the URL, the regular browser should be the most recently + // active browser. + EXPECT_EQ(browser(), chrome::FindLastActive()); + // The active tab should be the `test_url` we opened. + EXPECT_EQ(test_url, GetActiveWebContents()->GetVisibleURL()); + + // Wait for the PWA install dialog to show up. Internally, this is called the + // PWAConfirmationBubbleView (Not to be confused with the omnibox icon). + views::NamedWidgetShownWaiter waiter(views::test::AnyWidgetTestPasskey(), + "PWAConfirmationBubbleView"); + waiter.WaitIfNeededAndGet(); + + EXPECT_TRUE(PWAConfirmationBubbleView::IsShowing()); +} + +// Test that the Help App's `openUrlInBrowserAndTriggerInstallDialog` crashes +// for invalid URLs. IN_PROC_BROWSER_TEST_P(HelpAppIntegrationTest, HelpAppV2CrashesForInvalidUrlsInBrowser) { // There should be only be one regular browser with one tab. @@ -595,11 +672,12 @@ WaitForTestSystemAppInstall(); - // Script that tells the Help App to call the openUrlInBrowser Mojo function. + // Script that tells the Help App to call the + // `OpenUrlInBrowserAndTriggerInstallDialog` Mojo function. constexpr char kScript[] = R"( (async () => { const delegate = window.customLaunchData.delegate; - await delegate.openUrlInBrowser($1); + await delegate.openUrlInBrowserAndTriggerInstallDialog($1); })(); )"; std::string invalid_urls[] = {"", @@ -916,6 +994,9 @@ INSTANTIATE_SYSTEM_WEB_APP_MANAGER_TEST_SUITE_REGULAR_PROFILE_P( HelpAppIntegrationTest); +INSTANTIATE_SYSTEM_WEB_APP_MANAGER_TEST_SUITE_REGULAR_PROFILE_P( + HelpAppIntegrationTestWithAutoTriggerDisabled); + INSTANTIATE_SYSTEM_WEB_APP_MANAGER_TEST_SUITE_ALL_PROFILE_TYPES_P( HelpAppAllProfilesIntegrationTest);
diff --git a/chrome/browser/ash/web_applications/help_app/help_app_ui_delegate.cc b/chrome/browser/ash/web_applications/help_app/help_app_ui_delegate.cc index 1dc0432..e73f01a 100644 --- a/chrome/browser/ash/web_applications/help_app/help_app_ui_delegate.cc +++ b/chrome/browser/ash/web_applications/help_app/help_app_ui_delegate.cc
@@ -94,15 +94,18 @@ base::BindOnce(&DeviceInfoCallback, std::move(callback))); } -absl::optional<std::string> ChromeHelpAppUIDelegate::OpenUrlInBrowser( +absl::optional<std::string> +ChromeHelpAppUIDelegate::OpenUrlInBrowserAndTriggerInstallDialog( const GURL& url) { if (!url.is_valid()) { return base::StrCat( - {"ChromeHelpAppUIDelegate::OpenUrlInBrowser received invalid URL \"", + {"ChromeHelpAppUIDelegate::OpenUrlInBrowserAndTriggerInstallDialog " + "received invalid URL \"", url.spec(), "\""}); } else if (!url.SchemeIs(url::kHttpsScheme)) { return base::StrCat( - {"ChromeHelpAppUIDelegate::OpenUrlInBrowser received non-HTTPS URL: \"", + {"ChromeHelpAppUIDelegate::OpenUrlInBrowserAndTriggerInstallDialog " + "received non-HTTPS URL: \"", url.spec(), "\""}); }
diff --git a/chrome/browser/ash/web_applications/help_app/help_app_ui_delegate.h b/chrome/browser/ash/web_applications/help_app/help_app_ui_delegate.h index d784465..3603683 100644 --- a/chrome/browser/ash/web_applications/help_app/help_app_ui_delegate.h +++ b/chrome/browser/ash/web_applications/help_app/help_app_ui_delegate.h
@@ -41,7 +41,8 @@ void MaybeShowReleaseNotesNotification() override; void GetDeviceInfo(ash::help_app::mojom::PageHandler::GetDeviceInfoCallback callback) override; - absl::optional<std::string> OpenUrlInBrowser(const GURL& url) override; + absl::optional<std::string> OpenUrlInBrowserAndTriggerInstallDialog( + const GURL& url) override; private: raw_ptr<content::WebUI, ExperimentalAsh> web_ui_; // Owns |this|.
diff --git a/chrome/browser/extensions/BUILD.gn b/chrome/browser/extensions/BUILD.gn index ac05139..2a03511 100644 --- a/chrome/browser/extensions/BUILD.gn +++ b/chrome/browser/extensions/BUILD.gn
@@ -135,8 +135,6 @@ "api/developer_private/extension_info_generator.h", "api/developer_private/inspectable_views_finder.cc", "api/developer_private/inspectable_views_finder.h", - "api/developer_private/show_permissions_dialog_helper.cc", - "api/developer_private/show_permissions_dialog_helper.h", "api/downloads/downloads_api.cc", "api/downloads/downloads_api.h", "api/downloads_internal/downloads_internal_api.cc",
diff --git a/chrome/browser/extensions/api/developer_private/developer_private_api.cc b/chrome/browser/extensions/api/developer_private/developer_private_api.cc index 3f84767..f39ba8f8 100644 --- a/chrome/browser/extensions/api/developer_private/developer_private_api.cc +++ b/chrome/browser/extensions/api/developer_private/developer_private_api.cc
@@ -30,7 +30,6 @@ #include "chrome/browser/devtools/devtools_window.h" #include "chrome/browser/extensions/api/developer_private/entry_picker.h" #include "chrome/browser/extensions/api/developer_private/extension_info_generator.h" -#include "chrome/browser/extensions/api/developer_private/show_permissions_dialog_helper.h" #include "chrome/browser/extensions/chrome_zipfile_installer.h" #include "chrome/browser/extensions/crx_installer.h" #include "chrome/browser/extensions/devtools_util.h" @@ -1260,37 +1259,6 @@ Release(); // Balanced in Run(). } -DeveloperPrivateShowPermissionsDialogFunction:: -DeveloperPrivateShowPermissionsDialogFunction() {} - -DeveloperPrivateShowPermissionsDialogFunction:: -~DeveloperPrivateShowPermissionsDialogFunction() {} - -ExtensionFunction::ResponseAction -DeveloperPrivateShowPermissionsDialogFunction::Run() { - absl::optional<developer::ShowPermissionsDialog::Params> params = - developer::ShowPermissionsDialog::Params::Create(args()); - EXTENSION_FUNCTION_VALIDATE(params); - - const Extension* target_extension = GetExtensionById(params->extension_id); - if (!target_extension) - return RespondNow(Error(kNoSuchExtensionError)); - - content::WebContents* web_contents = GetSenderWebContents(); - if (!web_contents) - return RespondNow(Error(kCouldNotFindWebContentsError)); - - ShowPermissionsDialogHelper::Show( - browser_context(), web_contents, target_extension, - base::BindOnce(&DeveloperPrivateShowPermissionsDialogFunction::Finish, - this)); - return RespondLater(); -} - -void DeveloperPrivateShowPermissionsDialogFunction::Finish() { - Respond(NoArguments()); -} - DeveloperPrivateLoadUnpackedFunction::DeveloperPrivateLoadUnpackedFunction() {} ExtensionFunction::ResponseAction DeveloperPrivateLoadUnpackedFunction::Run() {
diff --git a/chrome/browser/extensions/api/developer_private/developer_private_api.h b/chrome/browser/extensions/api/developer_private/developer_private_api.h index 91bcc66..b41a242 100644 --- a/chrome/browser/extensions/api/developer_private/developer_private_api.h +++ b/chrome/browser/extensions/api/developer_private/developer_private_api.h
@@ -489,26 +489,6 @@ error_reporter_observation_{this}; }; -class DeveloperPrivateShowPermissionsDialogFunction - : public DeveloperPrivateAPIFunction { - public: - DECLARE_EXTENSION_FUNCTION("developerPrivate.showPermissionsDialog", - DEVELOPERPRIVATE_PERMISSIONS) - DeveloperPrivateShowPermissionsDialogFunction(); - - DeveloperPrivateShowPermissionsDialogFunction( - const DeveloperPrivateShowPermissionsDialogFunction&) = delete; - DeveloperPrivateShowPermissionsDialogFunction& operator=( - const DeveloperPrivateShowPermissionsDialogFunction&) = delete; - - protected: - // DeveloperPrivateAPIFunction: - ~DeveloperPrivateShowPermissionsDialogFunction() override; - ResponseAction Run() override; - - void Finish(); -}; - class DeveloperPrivateChooseEntryFunction : public ExtensionFunction, public EntryPickerClient { protected:
diff --git a/chrome/browser/extensions/api/developer_private/show_permissions_dialog_helper.cc b/chrome/browser/extensions/api/developer_private/show_permissions_dialog_helper.cc deleted file mode 100644 index 15ae7cc3..0000000 --- a/chrome/browser/extensions/api/developer_private/show_permissions_dialog_helper.cc +++ /dev/null
@@ -1,113 +0,0 @@ -// 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. - -#include "chrome/browser/extensions/api/developer_private/show_permissions_dialog_helper.h" - -#include <memory> -#include <utility> - -#include "apps/saved_files_service.h" -#include "chrome/browser/apps/platform_apps/app_load_service.h" -#include "chrome/browser/extensions/extension_install_prompt.h" -#include "chrome/browser/profiles/profile.h" -#include "chrome/browser/ui/apps/app_info_dialog.h" -#include "content/public/browser/web_contents.h" -#include "extensions/browser/api/device_permissions_manager.h" -#include "extensions/browser/api/file_system/saved_file_entry.h" -#include "extensions/browser/extension_registry.h" -#include "extensions/common/extension.h" -#include "extensions/common/permissions/permissions_data.h" - -namespace extensions { - -ShowPermissionsDialogHelper::ShowPermissionsDialogHelper( - Profile* profile, - base::OnceClosure on_complete) - : profile_(profile), on_complete_(std::move(on_complete)) {} - -ShowPermissionsDialogHelper::~ShowPermissionsDialogHelper() = default; - -// static -void ShowPermissionsDialogHelper::Show(content::BrowserContext* browser_context, - content::WebContents* web_contents, - const Extension* extension, - base::OnceClosure on_complete) { - Profile* profile = Profile::FromBrowserContext(browser_context); - - // Show the new-style extensions dialog when it is available. It is currently - // unavailable by default on Mac. - if (CanPlatformShowAppInfoDialog()) { - ShowAppInfoInNativeDialog(web_contents, profile, extension, - std::move(on_complete)); - return; // All done. - } - - // ShowPermissionsDialogHelper manages its own lifetime. - ShowPermissionsDialogHelper* helper = - new ShowPermissionsDialogHelper(profile, std::move(on_complete)); - helper->ShowPermissionsDialog(web_contents, extension); -} - -void ShowPermissionsDialogHelper::ShowPermissionsDialog( - content::WebContents* web_contents, - const Extension* extension) { - extension_id_ = extension->id(); - prompt_ = std::make_unique<ExtensionInstallPrompt>(web_contents); - std::vector<base::FilePath> retained_file_paths; - if (extension->permissions_data()->HasAPIPermission( - mojom::APIPermissionID::kFileSystem)) { - std::vector<SavedFileEntry> retained_file_entries = - apps::SavedFilesService::Get(profile_)->GetAllFileEntries( - extension_id_); - for (const SavedFileEntry& entry : retained_file_entries) - retained_file_paths.push_back(entry.path); - } - std::vector<std::u16string> retained_device_messages; - if (extension->permissions_data()->HasAPIPermission( - mojom::APIPermissionID::kUsb)) { - retained_device_messages = - DevicePermissionsManager::Get(profile_) - ->GetPermissionMessageStrings(extension_id_); - } - - // TODO(crbug.com/567839): We reuse the install dialog because it displays the - // permissions wanted. However, we should be using a separate dialog since - // this dialog is shown after the extension was already installed. - std::unique_ptr<ExtensionInstallPrompt::Prompt> prompt( - new ExtensionInstallPrompt::Prompt( - ExtensionInstallPrompt::POST_INSTALL_PERMISSIONS_PROMPT)); - prompt->set_retained_files(retained_file_paths); - prompt->set_retained_device_messages(retained_device_messages); - // Unretained() is safe because this class manages its own lifetime and - // deletes itself in OnInstallPromptDone(). - prompt_->ShowDialog( - base::BindOnce(&ShowPermissionsDialogHelper::OnInstallPromptDone, - base::Unretained(this)), - extension, nullptr, std::move(prompt), - ExtensionInstallPrompt::GetDefaultShowDialogCallback()); -} - -void ShowPermissionsDialogHelper::OnInstallPromptDone( - ExtensionInstallPrompt::DoneCallbackPayload payload) { - // This dialog doesn't support the "withhold permissions" checkbox. - DCHECK_NE(payload.result, - ExtensionInstallPrompt::Result::ACCEPTED_WITH_WITHHELD_PERMISSIONS); - - if (payload.result == ExtensionInstallPrompt::Result::ACCEPTED) { - // This is true when the user clicks "Revoke File Access." - const Extension* extension = - ExtensionRegistry::Get(profile_) - ->GetExtensionById(extension_id_, ExtensionRegistry::EVERYTHING); - - if (extension) - apps::SavedFilesService::Get(profile_)->ClearQueue(extension); - apps::AppLoadService::Get(profile_) - ->RestartApplicationIfRunning(extension_id_); - } - - std::move(on_complete_).Run(); - delete this; -} - -} // namespace extensions
diff --git a/chrome/browser/extensions/api/developer_private/show_permissions_dialog_helper.h b/chrome/browser/extensions/api/developer_private/show_permissions_dialog_helper.h deleted file mode 100644 index accea58..0000000 --- a/chrome/browser/extensions/api/developer_private/show_permissions_dialog_helper.h +++ /dev/null
@@ -1,59 +0,0 @@ -// 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. - -#ifndef CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_SHOW_PERMISSIONS_DIALOG_HELPER_H_ -#define CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_SHOW_PERMISSIONS_DIALOG_HELPER_H_ - -#include <memory> - -#include "base/functional/bind.h" -#include "base/memory/raw_ptr.h" -#include "chrome/browser/extensions/extension_install_prompt.h" - -class Profile; - -namespace content { -class BrowserContext; -class WebContents; -} - -namespace extensions { -class Extension; - -// Helper class to handle showing a permissions dialog for an extension. Will -// show either the newer AppInfo-style permissions dialog, or the traditional, -// install-prompt style dialog. -class ShowPermissionsDialogHelper { - public: - ShowPermissionsDialogHelper(const ShowPermissionsDialogHelper&) = delete; - ShowPermissionsDialogHelper& operator=(const ShowPermissionsDialogHelper&) = - delete; - - static void Show(content::BrowserContext* browser_context, - content::WebContents* web_contents, - const Extension* extension, - base::OnceClosure on_complete); - - private: - ShowPermissionsDialogHelper(Profile* profile, base::OnceClosure on_complete); - ~ShowPermissionsDialogHelper(); // Manages its own lifetime. - - // Shows the old-style (not AppInfo) permissions dialog. - void ShowPermissionsDialog(content::WebContents* web_contents, - const Extension* extension); - - void OnInstallPromptDone(ExtensionInstallPrompt::DoneCallbackPayload payload); - - std::unique_ptr<ExtensionInstallPrompt> prompt_; - - raw_ptr<Profile> profile_; - - base::OnceClosure on_complete_; - - std::string extension_id_; -}; - -} // namespace extensions - -#endif // CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_SHOW_PERMISSIONS_DIALOG_HELPER_H_
diff --git a/chrome/browser/extensions/extension_install_prompt.cc b/chrome/browser/extensions/extension_install_prompt.cc index 4c0cb26..58a265a 100644 --- a/chrome/browser/extensions/extension_install_prompt.cc +++ b/chrome/browser/extensions/extension_install_prompt.cc
@@ -138,9 +138,6 @@ else id = IDS_EXTENSION_EXTERNAL_INSTALL_PROMPT_TITLE_EXTENSION; break; - case POST_INSTALL_PERMISSIONS_PROMPT: - id = IDS_EXTENSION_POST_INSTALL_PERMISSIONS_PROMPT_TITLE; - break; case REMOTE_INSTALL_PROMPT: id = IDS_EXTENSION_REMOTE_INSTALL_PROMPT_TITLE; break; @@ -168,14 +165,6 @@ } int ExtensionInstallPrompt::Prompt::GetDialogButtons() const { - // The "OK" button in the post install permissions dialog allows revoking - // file/device access, and is only shown if such permissions exist; see - // ShouldDisplayRevokeButton(). - if (type_ == POST_INSTALL_PERMISSIONS_PROMPT && - !ShouldDisplayRevokeButton()) { - return ui::DIALOG_BUTTON_CANCEL; - } - // Extension pending request dialog doesn't have confirm button because there // is no user action required. if (type_ == EXTENSION_PENDING_REQUEST_PROMPT) @@ -217,18 +206,6 @@ else id = IDS_EXTENSION_EXTERNAL_INSTALL_PROMPT_ACCEPT_BUTTON_EXTENSION; break; - case POST_INSTALL_PERMISSIONS_PROMPT: - if (GetRetainedFileCount() && GetRetainedDeviceCount()) { - id = - IDS_EXTENSION_PROMPT_PERMISSIONS_CLEAR_RETAINED_FILES_AND_DEVICES_BUTTON; - } else if (GetRetainedFileCount()) { - id = IDS_EXTENSION_PROMPT_PERMISSIONS_CLEAR_RETAINED_FILES_BUTTON; - } else if (GetRetainedDeviceCount()) { - id = IDS_EXTENSION_PROMPT_PERMISSIONS_CLEAR_RETAINED_DEVICES_BUTTON; - } - // If there are neither retained files nor devices, leave id -1 so there - // will be no "accept" button. - break; case REMOTE_INSTALL_PROMPT: if (extension_->is_app()) id = IDS_EXTENSION_PROMPT_REMOTE_INSTALL_BUTTON_APP; @@ -275,7 +252,6 @@ case EXTERNAL_INSTALL_PROMPT: id = IDS_EXTENSION_EXTERNAL_INSTALL_PROMPT_ABORT_BUTTON; break; - case POST_INSTALL_PERMISSIONS_PROMPT: case EXTENSION_PENDING_REQUEST_PROMPT: id = IDS_CLOSE; break; @@ -304,7 +280,6 @@ case PERMISSIONS_PROMPT: id = IDS_EXTENSION_PROMPT_WANTS_ACCESS_TO; break; - case POST_INSTALL_PERMISSIONS_PROMPT: case REPAIR_PROMPT: id = IDS_EXTENSION_PROMPT_CAN_ACCESS; break; @@ -315,21 +290,6 @@ return l10n_util::GetStringUTF16(id); } -std::u16string ExtensionInstallPrompt::Prompt::GetRetainedFilesHeading() const { - return l10n_util::GetPluralStringFUTF16( - IDS_EXTENSION_PROMPT_RETAINED_FILES, GetRetainedFileCount()); -} - -std::u16string ExtensionInstallPrompt::Prompt::GetRetainedDevicesHeading() - const { - return l10n_util::GetPluralStringFUTF16( - IDS_EXTENSION_PROMPT_RETAINED_DEVICES, GetRetainedDeviceCount()); -} - -bool ExtensionInstallPrompt::Prompt::ShouldShowPermissions() const { - return GetPermissionCount() > 0 || type_ == POST_INSTALL_PERMISSIONS_PROMPT; -} - void ExtensionInstallPrompt::Prompt::AppendRatingStars( StarAppender appender, void* data) const { CHECK(appender); @@ -391,26 +351,6 @@ return prompt_permissions_.details[index]; } -size_t ExtensionInstallPrompt::Prompt::GetRetainedFileCount() const { - return retained_files_.size(); -} - -std::u16string ExtensionInstallPrompt::Prompt::GetRetainedFile( - size_t index) const { - CHECK_LT(index, retained_files_.size()); - return retained_files_[index].AsUTF16Unsafe(); -} - -size_t ExtensionInstallPrompt::Prompt::GetRetainedDeviceCount() const { - return retained_device_messages_.size(); -} - -std::u16string ExtensionInstallPrompt::Prompt::GetRetainedDeviceMessageString( - size_t index) const { - CHECK_LT(index, retained_device_messages_.size()); - return retained_device_messages_[index]; -} - void ExtensionInstallPrompt::Prompt::AddObserver(Observer* observer) { observers_.AddObserver(observer); } @@ -437,10 +377,6 @@ } } -bool ExtensionInstallPrompt::Prompt::ShouldDisplayRevokeButton() const { - return !retained_files_.empty() || !retained_device_messages_.empty(); -} - bool ExtensionInstallPrompt::Prompt::ShouldWithheldPermissionsOnDialogAccept() const { return base::FeatureList::IsEnabled(
diff --git a/chrome/browser/extensions/extension_install_prompt.h b/chrome/browser/extensions/extension_install_prompt.h index 69f220c..3b8c9b2b 100644 --- a/chrome/browser/extensions/extension_install_prompt.h +++ b/chrome/browser/extensions/extension_install_prompt.h
@@ -60,7 +60,7 @@ RE_ENABLE_PROMPT = 3, PERMISSIONS_PROMPT = 4, EXTERNAL_INSTALL_PROMPT = 5, - POST_INSTALL_PERMISSIONS_PROMPT = 6, + // POST_INSTALL_PERMISSIONS_PROMPT_DEPRECATED = 6, // LAUNCH_PROMPT_DEPRECATED = 7, REMOTE_INSTALL_PROMPT = 8, REPAIR_PROMPT = 9, @@ -121,8 +121,6 @@ std::u16string GetAcceptButtonLabel() const; std::u16string GetAbortButtonLabel() const; std::u16string GetPermissionsHeading() const; - std::u16string GetRetainedFilesHeading() const; - std::u16string GetRetainedDevicesHeading() const; #if BUILDFLAG(ENABLE_SUPERVISED_USERS) void set_requires_parent_permission(bool requires_parent_permission) { @@ -134,8 +132,6 @@ } #endif // BUILDFLAG(ENABLE_SUPERVISED_USERS) - bool ShouldShowPermissions() const; - // Returns whether the dialog should withheld permissions if the dialog is // accepted. bool ShouldWithheldPermissionsOnDialogAccept() const; @@ -154,25 +150,12 @@ size_t GetPermissionCount() const; std::u16string GetPermission(size_t index) const; std::u16string GetPermissionsDetails(size_t index) const; - size_t GetRetainedFileCount() const; - std::u16string GetRetainedFile(size_t index) const; - size_t GetRetainedDeviceCount() const; - std::u16string GetRetainedDeviceMessageString(size_t index) const; const extensions::Extension* extension() const { return extension_; } void set_extension(const extensions::Extension* extension) { extension_ = extension; } - // May be populated for POST_INSTALL_PERMISSIONS_PROMPT. - void set_retained_files(const std::vector<base::FilePath>& retained_files) { - retained_files_ = retained_files; - } - void set_retained_device_messages( - const std::vector<std::u16string>& retained_device_messages) { - retained_device_messages_ = retained_device_messages; - } - const std::string& delegated_username() const { return delegated_username_; } @@ -201,8 +184,6 @@ void OnDialogCanceled(); private: - bool ShouldDisplayRevokeButton() const; - const PromptType type_; // Permissions that are being requested (may not be all of an extension's
diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json index 4b523677..4b3e8a6 100644 --- a/chrome/browser/flag-metadata.json +++ b/chrome/browser/flag-metadata.json
@@ -949,6 +949,11 @@ "expiry_milestone": 120 }, { + "name": "cct-page-insights-hub", + "owners": [ "jinsukkim", "kgrosu@google.com", "twellington" ], + "expiry_milestone": 130 + }, + { "name": "cct-real-time-engagement-signals", "owners": ["sinansahin@google.com", "jinsukkim"], "expiry_milestone": 120 @@ -4320,7 +4325,7 @@ { "name": "help-app-launcher-search", "owners": [ "//ash/webui/help_app_ui/OWNERS", "//chrome/browser/ash/app_list/search/OWNERS" ], - "expiry_milestone": 115 + "expiry_milestone": 119 }, { "name": "heuristic-memory-saver-mode",
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc index 667cd742..37d1714 100644 --- a/chrome/browser/flag_descriptions.cc +++ b/chrome/browser/flag_descriptions.cc
@@ -3657,6 +3657,10 @@ "Enabling it would allow third party apps to open incognito mode for " "Chrome Custom Tabs, on Android."; +const char kCCTPageInsightsHubName[] = "PageInsights Hub"; +const char kCCTPageInsightsHubDescription[] = + "Show PageInsights Hub on Chrome Custom Tabs."; + const char kCCTResizable90MaximumHeightName[] = "Bottom sheet Custom Tabs maximum height"; const char kCCTResizable90MaximumHeightDescription[] =
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h index 9c03fe28..56faa326 100644 --- a/chrome/browser/flag_descriptions.h +++ b/chrome/browser/flag_descriptions.h
@@ -2109,6 +2109,9 @@ extern const char kCCTIncognitoAvailableToThirdPartyName[]; extern const char kCCTIncognitoAvailableToThirdPartyDescription[]; +extern const char kCCTPageInsightsHubName[]; +extern const char kCCTPageInsightsHubDescription[]; + extern const char kCCTResizable90MaximumHeightName[]; extern const char kCCTResizable90MaximumHeightDescription[]; extern const char kCCTResizableForThirdPartiesName[];
diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browser/flags/android/chrome_feature_list.cc index 69245457..71a1d7e 100644 --- a/chrome/browser/flags/android/chrome_feature_list.cc +++ b/chrome/browser/flags/android/chrome_feature_list.cc
@@ -185,6 +185,7 @@ &kCCTIncognitoAvailableToThirdParty, &kCCTIntentFeatureOverrides, &kCCTNewDownloadTab, + &kCCTPageInsightsHub, &kCCTPostMessageAPI, &kCCTPrefetchDelayShowOnStart, &kCCTRealTimeEngagementSignals, @@ -547,6 +548,10 @@ "CCTIntentFeatureOverrides", base::FEATURE_ENABLED_BY_DEFAULT); +BASE_FEATURE(kCCTPageInsightsHub, + "CCTPageInsightsHub", + base::FEATURE_DISABLED_BY_DEFAULT); + BASE_FEATURE(kCCTPostMessageAPI, "CCTPostMessageAPI", base::FEATURE_ENABLED_BY_DEFAULT);
diff --git a/chrome/browser/flags/android/chrome_feature_list.h b/chrome/browser/flags/android/chrome_feature_list.h index b784f821..3506d4a 100644 --- a/chrome/browser/flags/android/chrome_feature_list.h +++ b/chrome/browser/flags/android/chrome_feature_list.h
@@ -48,6 +48,7 @@ BASE_DECLARE_FEATURE(kCCTIncognitoAvailableToThirdParty); BASE_DECLARE_FEATURE(kCCTIntentFeatureOverrides); BASE_DECLARE_FEATURE(kCCTNewDownloadTab); +BASE_DECLARE_FEATURE(kCCTPageInsightsHub); BASE_DECLARE_FEATURE(kCCTPostMessageAPI); BASE_DECLARE_FEATURE(kCCTPrefetchDelayShowOnStart); BASE_DECLARE_FEATURE(kCCTRealTimeEngagementSignals);
diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java index af6baf8c..023e8846 100644 --- a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java +++ b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java
@@ -167,6 +167,7 @@ "CCTIncognitoAvailableToThirdParty"; public static final String CCT_INTENT_FEATURE_OVERRIDES = "CCTIntentFeatureOverrides"; public static final String CCT_NEW_DOWNLOAD_TAB = "CCTNewDownloadTab"; + public static final String CCT_PAGE_INSIGHTS_HUB = "CCTPageInsightsHub"; public static final String CCT_POST_MESSAGE_API = "CCTPostMessageAPI"; public static final String CCT_PREFETCH_DELAY_SHOW_ON_START = "CCTPrefetchDelayShowOnStart"; public static final String CCT_REAL_TIME_ENGAGEMENT_SIGNALS = "CCTRealTimeEngagementSignals";
diff --git a/chrome/browser/media/cdm_document_service_impl_test.cc b/chrome/browser/media/cdm_document_service_impl_test.cc index f3a7d59..1cfee94 100644 --- a/chrome/browser/media/cdm_document_service_impl_test.cc +++ b/chrome/browser/media/cdm_document_service_impl_test.cc
@@ -111,9 +111,9 @@ // Create (or overwrite) an entry with only an origin id to simulate some // kind of corruption or simply an update to the preference format. - base::Value entry(base::Value::Type::DICT); - entry.SetKey(kOriginId, base::UnguessableTokenToValue( - base::UnguessableToken::Create())); + auto entry = base::Value::Dict().Set( + kOriginId, + base::UnguessableTokenToValue(base::UnguessableToken::Create())); ScopedDictPrefUpdate update(user_prefs, prefs::kMediaCdmOriginData); base::Value::Dict& dict = update.Get();
diff --git a/chrome/browser/media/router/providers/cast/mirroring_activity.cc b/chrome/browser/media/router/providers/cast/mirroring_activity.cc index 8127011..383657d 100644 --- a/chrome/browser/media/router/providers/cast/mirroring_activity.cc +++ b/chrome/browser/media/router/providers/cast/mirroring_activity.cc
@@ -383,7 +383,7 @@ // now sending frames. Ensure the state is now PLAYING. media_status_->play_state = mojom::MediaStatus::PlayState::PLAYING; OnMirroringResumed(); - NotifyMediaStatusObserver(); + NotifyMediaStatusObservers(); content::GetUIThreadTaskRunner({})->PostTask( FROM_HERE, @@ -396,7 +396,7 @@ // playing. media_status_->play_state = mojom::MediaStatus::PlayState::PLAYING; OnMirroringResumed(); - NotifyMediaStatusObserver(); + NotifyMediaStatusObservers(); } void MirroringActivity::OnMessage(mirroring::mojom::CastMessagePtr message) { @@ -489,10 +489,8 @@ mojo::PendingReceiver<mojom::MediaController> media_controller, mojo::PendingRemote<mojom::MediaStatusObserver> observer) { DCHECK_CALLED_ON_VALID_SEQUENCE(io_sequence_checker_); - media_controller_receiver_.reset(); - media_controller_receiver_.Bind(std::move(media_controller)); - media_status_observer_.reset(); - media_status_observer_.Bind(std::move(observer)); + media_controller_receivers_.Add(this, std::move(media_controller)); + media_status_observers_.Add(std::move(observer)); } std::string MirroringActivity::GetRouteDescription( @@ -759,12 +757,13 @@ } else if (play_state == mojom::MediaStatus::PlayState::PAUSED) { OnMirroringPaused(); } - NotifyMediaStatusObserver(); + NotifyMediaStatusObservers(); } -void MirroringActivity::NotifyMediaStatusObserver() { - if (media_status_observer_) { - media_status_observer_->OnMediaStatusUpdated(media_status_.Clone()); +void MirroringActivity::NotifyMediaStatusObservers() { + for (const mojo::Remote<mojom::MediaStatusObserver>& observer : + media_status_observers_) { + observer->OnMediaStatusUpdated(media_status_.Clone()); } }
diff --git a/chrome/browser/media/router/providers/cast/mirroring_activity.h b/chrome/browser/media/router/providers/cast/mirroring_activity.h index 5ac4033..02097d7 100644 --- a/chrome/browser/media/router/providers/cast/mirroring_activity.h +++ b/chrome/browser/media/router/providers/cast/mirroring_activity.h
@@ -29,7 +29,9 @@ #include "mojo/public/cpp/bindings/pending_receiver.h" #include "mojo/public/cpp/bindings/pending_remote.h" #include "mojo/public/cpp/bindings/receiver.h" +#include "mojo/public/cpp/bindings/receiver_set.h" #include "mojo/public/cpp/bindings/remote.h" +#include "mojo/public/cpp/bindings/remote_set.h" #include "third_party/abseil-cpp/absl/types/optional.h" #include "third_party/openscreen/src/cast/common/channel/proto/cast_channel.pb.h" @@ -129,6 +131,8 @@ FRIEND_TEST_ALL_PREFIXES(MirroringActivityTest, Play); FRIEND_TEST_ALL_PREFIXES(MirroringActivityTest, OnRemotingStateChanged); FRIEND_TEST_ALL_PREFIXES(MirroringActivityTest, GetTargetPlayoutDelay); + FRIEND_TEST_ALL_PREFIXES(MirroringActivityTest, + MultipleMediaControllersNotified); void HandleParseJsonResult(const std::string& route_id, data_decoder::DataDecoder::ValueOrError result); @@ -142,7 +146,7 @@ void SetPlayState(mojom::MediaStatus::PlayState play_state); - void NotifyMediaStatusObserver(); + void NotifyMediaStatusObservers(); // Invoked when mirroring is paused / resumed, for metrics. void OnMirroringPaused(); @@ -199,13 +203,11 @@ // receiver. mojo::Receiver<mirroring::mojom::CastMessageChannel> channel_receiver_{this}; - // To handle freeze and unfreeze requests from the mirroring media controller - // host to the mirroring service host. - mojo::Receiver<mojom::MediaController> media_controller_receiver_{this}; + // To handle freeze and unfreeze requests from media controllers. + mojo::ReceiverSet<mojom::MediaController> media_controller_receivers_; - // Sends media status updates with mirroring information needed for freezing - // the session. - mojo::Remote<mojom::MediaStatusObserver> media_status_observer_; + // Sends media status updates with mirroring information to observers. + mojo::RemoteSet<mojom::MediaStatusObserver> media_status_observers_; // Info for mirroring state transitions like pause / resume. mojom::MediaStatusPtr media_status_;
diff --git a/chrome/browser/media/router/providers/cast/mirroring_activity_unittest.cc b/chrome/browser/media/router/providers/cast/mirroring_activity_unittest.cc index 7b60b90..3a797dd 100644 --- a/chrome/browser/media/router/providers/cast/mirroring_activity_unittest.cc +++ b/chrome/browser/media/router/providers/cast/mirroring_activity_unittest.cc
@@ -728,4 +728,48 @@ switch_playout_delay); } +TEST_F(MirroringActivityTest, MultipleMediaControllersNotified) { + MakeActivity(); + + // Set up the first media controller and observer. + mojo::PendingRemote<mojom::MediaStatusObserver> observer_pending_remote_1; + NiceMock<MockMediaStatusObserver> media_status_observer_1 = + NiceMock<MockMediaStatusObserver>( + observer_pending_remote_1.InitWithNewPipeAndPassReceiver()); + mojo::Remote<mojom::MediaController> media_controller_1; + activity_->CreateMediaController( + media_controller_1.BindNewPipeAndPassReceiver(), + std::move(observer_pending_remote_1)); + + // Set up the second media controller and observer. + mojo::PendingRemote<mojom::MediaStatusObserver> observer_pending_remote_2; + NiceMock<MockMediaStatusObserver> media_status_observer_2 = + NiceMock<MockMediaStatusObserver>( + observer_pending_remote_2.InitWithNewPipeAndPassReceiver()); + mojo::Remote<mojom::MediaController> media_controller_2; + activity_->CreateMediaController( + media_controller_2.BindNewPipeAndPassReceiver(), + std::move(observer_pending_remote_2)); + + // Pause the route, and expect both observers to be notified. + mojom::MediaStatusPtr expected_status = mojom::MediaStatus::New(); + expected_status->play_state = mojom::MediaStatus::PlayState::PAUSED; + auto cb = [&](base::OnceClosure callback) { std::move(callback).Run(); }; + EXPECT_CALL(*mirroring_service_, Pause(_)).WillOnce(testing::Invoke(cb)); + EXPECT_CALL(media_status_observer_1, OnMediaStatusUpdated(_)) + .WillOnce([&](mojom::MediaStatusPtr status) { + EXPECT_EQ(expected_status->play_state, status->play_state); + }); + EXPECT_CALL(media_status_observer_2, OnMediaStatusUpdated(_)) + .WillOnce([&](mojom::MediaStatusPtr status) { + EXPECT_EQ(expected_status->play_state, status->play_state); + }); + activity_->Pause(); + + // Ensure the mojom receivers have processed all calls, since we are expecting + // them to have been called. + media_status_observer_1.FlushForTesting(); + media_status_observer_2.FlushForTesting(); +} + } // namespace media_router
diff --git a/chrome/browser/media/router/test/media_router_mojo_test.h b/chrome/browser/media/router/test/media_router_mojo_test.h index 90b6a17a..2c982d2 100644 --- a/chrome/browser/media/router/test/media_router_mojo_test.h +++ b/chrome/browser/media/router/test/media_router_mojo_test.h
@@ -151,6 +151,10 @@ MOCK_METHOD1(OnMediaStatusUpdated, void(mojom::MediaStatusPtr status)); + // Use this instead of RunUntilIdle to explicitly show what we are waiting + // for in a test. + void FlushForTesting() { receiver_.FlushForTesting(); } + private: mojo::Receiver<mojom::MediaStatusObserver> receiver_; };
diff --git a/chrome/browser/page_load_metrics/observers/javascript_frameworks_ukm_observer.cc b/chrome/browser/page_load_metrics/observers/javascript_frameworks_ukm_observer.cc index d4b0f8e..d40dd78 100644 --- a/chrome/browser/page_load_metrics/observers/javascript_frameworks_ukm_observer.cc +++ b/chrome/browser/page_load_metrics/observers/javascript_frameworks_ukm_observer.cc
@@ -64,45 +64,45 @@ void JavascriptFrameworksUkmObserver::RecordJavascriptFrameworkPageLoad() { ukm::builders::JavascriptFrameworkPageLoad builder( GetDelegate().GetPageUkmSourceId()); + + using blink::LoadingBehaviorFlag; + + auto is_detected = [&](LoadingBehaviorFlag flag) -> bool { + return (frameworks_detected_ & flag) != 0; + }; builder .SetGatsbyPageLoad( - (frameworks_detected_ & - blink::LoadingBehaviorFlag::kLoadingBehaviorGatsbyFrameworkUsed) != - 0) + is_detected(LoadingBehaviorFlag::kLoadingBehaviorGatsbyFrameworkUsed)) .SetNextJSPageLoad( - (frameworks_detected_ & - blink::LoadingBehaviorFlag::kLoadingBehaviorNextJSFrameworkUsed) != - 0) + is_detected(LoadingBehaviorFlag::kLoadingBehaviorNextJSFrameworkUsed)) .SetNuxtJSPageLoad( - (frameworks_detected_ & - blink::LoadingBehaviorFlag::kLoadingBehaviorNuxtJSFrameworkUsed) != - 0) + is_detected(LoadingBehaviorFlag::kLoadingBehaviorNuxtJSFrameworkUsed)) .SetSapperPageLoad( - (frameworks_detected_ & - blink::LoadingBehaviorFlag::kLoadingBehaviorSapperFrameworkUsed) != - 0) - .SetVuePressPageLoad( - (frameworks_detected_ & - blink::LoadingBehaviorFlag::kLoadingBehaviorVuePressFrameworkUsed) != - 0) - .SetAngularPageLoad( - (frameworks_detected_ & - blink::LoadingBehaviorFlag::kLoadingBehaviorAngularFrameworkUsed) != - 0) + is_detected(LoadingBehaviorFlag::kLoadingBehaviorSapperFrameworkUsed)) + .SetVuePressPageLoad(is_detected( + LoadingBehaviorFlag::kLoadingBehaviorVuePressFrameworkUsed)) + .SetAngularPageLoad(is_detected( + LoadingBehaviorFlag::kLoadingBehaviorAngularFrameworkUsed)) .SetPreactPageLoad( - (frameworks_detected_ & - blink::LoadingBehaviorFlag::kLoadingBehaviorPreactFrameworkUsed) != - 0) + is_detected(LoadingBehaviorFlag::kLoadingBehaviorPreactFrameworkUsed)) .SetReactPageLoad( - (frameworks_detected_ & - blink::LoadingBehaviorFlag::kLoadingBehaviorReactFrameworkUsed) != 0) + is_detected(LoadingBehaviorFlag::kLoadingBehaviorReactFrameworkUsed)) .SetSveltePageLoad( - (frameworks_detected_ & - blink::LoadingBehaviorFlag::kLoadingBehaviorSvelteFrameworkUsed) != - 0) + is_detected(LoadingBehaviorFlag::kLoadingBehaviorSvelteFrameworkUsed)) .SetVuePageLoad( - (frameworks_detected_ & - blink::LoadingBehaviorFlag::kLoadingBehaviorVueFrameworkUsed) != 0); + is_detected(LoadingBehaviorFlag::kLoadingBehaviorVueFrameworkUsed)) + .SetDrupalPageLoad( + is_detected(LoadingBehaviorFlag::kLoadingBehaviorDrupalCMSUsed)) + .SetJoomlaPageLoad( + is_detected(LoadingBehaviorFlag::kLoadingBehaviorJoomlaCMSUsed)) + .SetShopifyPageLoad( + is_detected(LoadingBehaviorFlag::kLoadingBehaviorShopifyCMSUsed)) + .SetSquarespacePageLoad( + is_detected(LoadingBehaviorFlag::kLoadingBehaviorSquarespaceCMSUsed)) + .SetWixPageLoad( + is_detected(LoadingBehaviorFlag::kLoadingBehaviorWixCMSUsed)) + .SetWordPressPageLoad( + is_detected(LoadingBehaviorFlag::kLoadingBehaviorWordPressCMSUsed)); builder.Record(ukm::UkmRecorder::Get()); }
diff --git a/chrome/browser/page_load_metrics/observers/javascript_frameworks_ukm_observer_browsertest.cc b/chrome/browser/page_load_metrics/observers/javascript_frameworks_ukm_observer_browsertest.cc index c8b1661..8e8b4aeb 100644 --- a/chrome/browser/page_load_metrics/observers/javascript_frameworks_ukm_observer_browsertest.cc +++ b/chrome/browser/page_load_metrics/observers/javascript_frameworks_ukm_observer_browsertest.cc
@@ -39,10 +39,19 @@ constexpr char kReactPageLoad[] = "ReactPageLoad"; constexpr char kSveltePageLoad[] = "SveltePageLoad"; constexpr char kVuePageLoad[] = "VuePageLoad"; +constexpr char kDrupalPageLoad[] = "DrupalPageLoad"; +constexpr char kJoomlaPageLoad[] = "JoomlaPageLoad"; +constexpr char kShopifyPageLoad[] = "ShopifyPageLoad"; +constexpr char kSquarespacePageLoad[] = "SquarespacePageLoad"; +constexpr char kWixPageLoad[] = "WixPageLoad"; +constexpr char kWordPressPageLoad[] = "WordPressPageLoad"; const std::vector<const char*> all_frameworks = { - kGatsbyJsPageLoad, kNextJsPageLoad, kNuxtJsPageLoad, kSapperPageLoad, - kVuePressPageLoad, kAngularPageLoad, kPreactPageLoad, kReactPageLoad, - kSveltePageLoad, kVuePageLoad, + kGatsbyJsPageLoad, kNextJsPageLoad, kNuxtJsPageLoad, + kSapperPageLoad, kVuePressPageLoad, kAngularPageLoad, + kPreactPageLoad, kReactPageLoad, kSveltePageLoad, + kVuePageLoad, kDrupalPageLoad, kJoomlaPageLoad, + kShopifyPageLoad, kSquarespacePageLoad, kWixPageLoad, + kWordPressPageLoad, }; } // namespace @@ -313,6 +322,42 @@ } IN_PROC_BROWSER_TEST_F(JavascriptFrameworksUkmObserverBrowserTest, + DrupalCMSDetected) { + RunSingleFrameworkDetectionTest("/page_load_metrics/drupal_page.html", + kDrupalPageLoad); +} + +IN_PROC_BROWSER_TEST_F(JavascriptFrameworksUkmObserverBrowserTest, + JoomlaCMSDetected) { + RunSingleFrameworkDetectionTest("/page_load_metrics/joomla_page.html", + kJoomlaPageLoad); +} + +IN_PROC_BROWSER_TEST_F(JavascriptFrameworksUkmObserverBrowserTest, + ShopifyCMSDetected) { + RunSingleFrameworkDetectionTest("/page_load_metrics/shopify_page.html", + kShopifyPageLoad); +} + +IN_PROC_BROWSER_TEST_F(JavascriptFrameworksUkmObserverBrowserTest, + SquarespaceCMSDetected) { + RunSingleFrameworkDetectionTest("/page_load_metrics/squarespace_page.html", + kSquarespacePageLoad); +} + +IN_PROC_BROWSER_TEST_F(JavascriptFrameworksUkmObserverBrowserTest, + WixCMSDetected) { + RunSingleFrameworkDetectionTest("/page_load_metrics/wix_page.html", + kWixPageLoad); +} + +IN_PROC_BROWSER_TEST_F(JavascriptFrameworksUkmObserverBrowserTest, + WordPressCMSDetected) { + RunSingleFrameworkDetectionTest("/page_load_metrics/wordpress_page.html", + kWordPressPageLoad); +} + +IN_PROC_BROWSER_TEST_F(JavascriptFrameworksUkmObserverBrowserTest, NoFrameworksDetectedInFencedFrame) { RunSingleFrameworkDetectionTestForFencedFrames( "/page_load_metrics/gatsby_page.html");
diff --git a/chrome/browser/password_manager/android/password_accessory_controller_impl.cc b/chrome/browser/password_manager/android/password_accessory_controller_impl.cc index 4b2cc0b..2b129b2e 100644 --- a/chrome/browser/password_manager/android/password_accessory_controller_impl.cc +++ b/chrome/browser/password_manager/android/password_accessory_controller_impl.cc
@@ -401,7 +401,7 @@ } if (WebAuthnCredManDelegate* delegate = WebAuthnCredManDelegate::GetRequestDelegate(&GetWebContents())) { - manual_filling_controller_->OnAccessoryActionAvailabilityChanged( + GetManualFillingController()->OnAccessoryActionAvailabilityChanged( ShouldShowAction(delegate->HasResults()), autofill::AccessoryAction::CREDMAN_CONDITIONAL_UI_REENTRY); }
diff --git a/chrome/browser/policy/messaging_layer/upload/upload_client_unittest.cc b/chrome/browser/policy/messaging_layer/upload/upload_client_unittest.cc index 192d25b..75be668 100644 --- a/chrome/browser/policy/messaging_layer/upload/upload_client_unittest.cc +++ b/chrome/browser/policy/messaging_layer/upload/upload_client_unittest.cc
@@ -120,8 +120,8 @@ static constexpr int64_t kExpectedCallTimes = 10; static constexpr int64_t kGenerationId = 1234; - base::Value data{base::Value::Type::DICT}; - data.SetKey("TEST_KEY", base::Value("TEST_VALUE")); + base::Value::Dict data; + data.Set("TEST_KEY", "TEST_VALUE"); std::string json_data; ASSERT_TRUE(base::JSONWriter::Write(data, &json_data));
diff --git a/chrome/browser/printing/print_preview_dialog_controller.cc b/chrome/browser/printing/print_preview_dialog_controller.cc index 8971847..a2f8a47 100644 --- a/chrome/browser/printing/print_preview_dialog_controller.cc +++ b/chrome/browser/printing/print_preview_dialog_controller.cc
@@ -17,6 +17,7 @@ #include "build/chromeos_buildflags.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/printing/print_view_manager.h" +#include "chrome/browser/printing/print_view_manager_base.h" #include "chrome/browser/task_manager/web_contents_tags.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_finder.h" @@ -205,7 +206,7 @@ void PrintPreviewDialogController::PrintPreview(WebContents* initiator) { #if BUILDFLAG(IS_WIN) && BUILDFLAG(GOOGLE_CHROME_BRANDING) - ModuleDatabase::DisableThirdPartyBlocking(); + PrintViewManagerBase::DisableThirdPartyBlocking(); #endif if (initiator->IsCrashed()) {
diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc index 1d4caba..7c5e57e4 100644 --- a/chrome/browser/printing/print_view_manager_base.cc +++ b/chrome/browser/printing/print_view_manager_base.cc
@@ -184,6 +184,21 @@ DisconnectFromCurrentPrintJob(); } +#if BUILDFLAG(IS_WIN) && BUILDFLAG(GOOGLE_CHROME_BRANDING) +// TODO(crbug.com/892294): Remove `DisableThirdPartyBlocking()` once OOP +// printing is always enabled for Windows. +// static +void PrintViewManagerBase::DisableThirdPartyBlocking() { +#if BUILDFLAG(ENABLE_OOP_PRINTING) && BUILDFLAG(ENABLE_OOP_BASIC_PRINT_DIALOG) + if (!printing::features::kEnableOopPrintDriversJobPrint.Get()) { + ModuleDatabase::DisableThirdPartyBlocking(); + } +#else + ModuleDatabase::DisableThirdPartyBlocking(); +#endif +} +#endif // BUILDFLAG(IS_WIN) && BUILDFLAG(GOOGLE_CHROME_BRANDING) + bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) { // Remember the ID for `rfh`, to enable checking that the `RenderFrameHost` // is still valid after a possible inner message loop runs in @@ -1192,7 +1207,7 @@ &PrintViewManagerBase::ScriptedPrintReply, weak_ptr_factory_.GetWeakPtr(), std::move(callback), render_process_host->GetID()); #if BUILDFLAG(IS_WIN) && BUILDFLAG(GOOGLE_CHROME_BRANDING) - ModuleDatabase::DisableThirdPartyBlocking(); + DisableThirdPartyBlocking(); #endif std::unique_ptr<PrinterQuery> printer_query =
diff --git a/chrome/browser/printing/print_view_manager_base.h b/chrome/browser/printing/print_view_manager_base.h index af96828..0b07b29d 100644 --- a/chrome/browser/printing/print_view_manager_base.h +++ b/chrome/browser/printing/print_view_manager_base.h
@@ -15,6 +15,7 @@ #include "base/memory/weak_ptr.h" #include "base/observer_list.h" #include "base/observer_list_types.h" +#include "build/branding_buildflags.h" #include "build/build_config.h" #include "chrome/browser/printing/print_job.h" #include "chrome/browser/ui/webui/print_preview/printer_handler.h" @@ -71,6 +72,11 @@ ~PrintViewManagerBase() override; +#if BUILDFLAG(IS_WIN) && BUILDFLAG(GOOGLE_CHROME_BRANDING) + // Disables the blocking of third-party modules in the browser process. + static void DisableThirdPartyBlocking(); +#endif + // Prints the current document immediately. Since the rendering is // asynchronous, the actual printing will not be completed on the return of // this function. Returns false if printing is impossible at the moment.
diff --git a/chrome/browser/privacy_guide/android/BUILD.gn b/chrome/browser/privacy_guide/android/BUILD.gn index 1e0dada3..a16a229 100644 --- a/chrome/browser/privacy_guide/android/BUILD.gn +++ b/chrome/browser/privacy_guide/android/BUILD.gn
@@ -149,7 +149,6 @@ "java/res/layout/privacy_guide_explanation_item.xml", "java/res/layout/privacy_guide_history_sync_step.xml", "java/res/layout/privacy_guide_msbb_step.xml", - "java/res/layout/privacy_guide_sb_bottom_sheet_toolbar.xml", "java/res/layout/privacy_guide_sb_enhanced_explanation.xml", "java/res/layout/privacy_guide_sb_standard_explanation.xml", "java/res/layout/privacy_guide_sb_step.xml",
diff --git a/chrome/browser/privacy_guide/android/java/res/layout/privacy_guide_sb_bottom_sheet_toolbar.xml b/chrome/browser/privacy_guide/android/java/res/layout/privacy_guide_sb_bottom_sheet_toolbar.xml deleted file mode 100644 index da8eddb8..0000000 --- a/chrome/browser/privacy_guide/android/java/res/layout/privacy_guide_sb_bottom_sheet_toolbar.xml +++ /dev/null
@@ -1,18 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -Copyright 2023 The Chromium Authors -Use of this source code is governed by a BSD-style license that can be -found in the LICENSE file. ---> -<org.chromium.ui.widget.OptimizedFrameLayout - xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="match_parent" - android:layout_height="wrap_content"> - <ImageView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="center" - android:paddingVertical="8dp" - android:importantForAccessibility="no" - android:src="@drawable/drag_handlebar" /> -</org.chromium.ui.widget.OptimizedFrameLayout> \ No newline at end of file
diff --git a/chrome/browser/privacy_guide/android/java/res/layout/privacy_guide_sb_enhanced_explanation.xml b/chrome/browser/privacy_guide/android/java/res/layout/privacy_guide_sb_enhanced_explanation.xml index a2e47c3..e5c8983 100644 --- a/chrome/browser/privacy_guide/android/java/res/layout/privacy_guide_sb_enhanced_explanation.xml +++ b/chrome/browser/privacy_guide/android/java/res/layout/privacy_guide_sb_enhanced_explanation.xml
@@ -7,8 +7,7 @@ <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" - android:layout_height="wrap_content" - android:paddingTop="@dimen/sb_bottom_sheet_toolbar_height"> + android:layout_height="wrap_content"> <LinearLayout android:id="@+id/sb_enhanced_sheet"
diff --git a/chrome/browser/privacy_guide/android/java/res/layout/privacy_guide_sb_standard_explanation.xml b/chrome/browser/privacy_guide/android/java/res/layout/privacy_guide_sb_standard_explanation.xml index 204622a..d86c6bf 100644 --- a/chrome/browser/privacy_guide/android/java/res/layout/privacy_guide_sb_standard_explanation.xml +++ b/chrome/browser/privacy_guide/android/java/res/layout/privacy_guide_sb_standard_explanation.xml
@@ -7,8 +7,7 @@ <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" - android:layout_height="wrap_content" - android:paddingTop="@dimen/sb_bottom_sheet_toolbar_height"> + android:layout_height="wrap_content"> <LinearLayout android:id="@+id/sb_standard_sheet"
diff --git a/chrome/browser/privacy_guide/android/java/res/values/dimens.xml b/chrome/browser/privacy_guide/android/java/res/values/dimens.xml index ca16bedc..41352630 100644 --- a/chrome/browser/privacy_guide/android/java/res/values/dimens.xml +++ b/chrome/browser/privacy_guide/android/java/res/values/dimens.xml
@@ -13,7 +13,6 @@ <dimen name="done_step_explanation_marginBottom">8dp</dimen> <dimen name="done_step_link_button_size">48dp</dimen> <dimen name="done_step_link_button_padding">12dp</dimen> - <dimen name="sb_bottom_sheet_toolbar_height">20dp</dimen> <dimen name="last_explanation_item_extra_marginBottom">8dp</dimen> <dimen name="bottom_bar_marginVertical">8dp</dimen> </resources>
diff --git a/chrome/browser/privacy_guide/android/java/src/org/chromium/chrome/browser/privacy_guide/PrivacyGuideBottomSheetView.java b/chrome/browser/privacy_guide/android/java/src/org/chromium/chrome/browser/privacy_guide/PrivacyGuideBottomSheetView.java index f2a8762d..2b4d1b2 100644 --- a/chrome/browser/privacy_guide/android/java/src/org/chromium/chrome/browser/privacy_guide/PrivacyGuideBottomSheetView.java +++ b/chrome/browser/privacy_guide/android/java/src/org/chromium/chrome/browser/privacy_guide/PrivacyGuideBottomSheetView.java
@@ -13,11 +13,9 @@ /** Bottom sheet view for displaying privacy guide control explanations */ public class PrivacyGuideBottomSheetView implements BottomSheetContent { private final View mContentView; - private final View mToolbarView; - PrivacyGuideBottomSheetView(View contentView, View toolbarView) { + PrivacyGuideBottomSheetView(View contentView) { mContentView = contentView; - mToolbarView = toolbarView; } @Override @@ -28,7 +26,7 @@ @Nullable @Override public View getToolbarView() { - return mToolbarView; + return null; } @Override
diff --git a/chrome/browser/privacy_guide/android/java/src/org/chromium/chrome/browser/privacy_guide/SafeBrowsingFragment.java b/chrome/browser/privacy_guide/android/java/src/org/chromium/chrome/browser/privacy_guide/SafeBrowsingFragment.java index a36d854..c17b394a 100644 --- a/chrome/browser/privacy_guide/android/java/src/org/chromium/chrome/browser/privacy_guide/SafeBrowsingFragment.java +++ b/chrome/browser/privacy_guide/android/java/src/org/chromium/chrome/browser/privacy_guide/SafeBrowsingFragment.java
@@ -69,12 +69,10 @@ LayoutInflater inflater = LayoutInflater.from(getView().getContext()); if (clickedButtonId == mEnhancedProtection.getId()) { displayBottomSheet( - inflater.inflate(R.layout.privacy_guide_sb_enhanced_explanation, null), - inflater.inflate(R.layout.privacy_guide_sb_bottom_sheet_toolbar, null)); + inflater.inflate(R.layout.privacy_guide_sb_enhanced_explanation, null)); } else if (clickedButtonId == mStandardProtection.getId()) { displayBottomSheet( - inflater.inflate(R.layout.privacy_guide_sb_standard_explanation, null), - inflater.inflate(R.layout.privacy_guide_sb_bottom_sheet_toolbar, null)); + inflater.inflate(R.layout.privacy_guide_sb_standard_explanation, null)); } else { assert false : "Unknown Aux clickedButtonId " + clickedButtonId; } @@ -95,9 +93,8 @@ } } - private void displayBottomSheet(View sheetContent, View sheetToolbar) { - PrivacyGuideBottomSheetView bottomSheet = - new PrivacyGuideBottomSheetView(sheetContent, sheetToolbar); + private void displayBottomSheet(View sheetContent) { + PrivacyGuideBottomSheetView bottomSheet = new PrivacyGuideBottomSheetView(sheetContent); mBottomSheetController.requestShowContent(bottomSheet, /* animate= */ true); }
diff --git a/chrome/browser/profiles/profile_attributes_entry.cc b/chrome/browser/profiles/profile_attributes_entry.cc index dc04c31..a37187d 100644 --- a/chrome/browser/profiles/profile_attributes_entry.cc +++ b/chrome/browser/profiles/profile_attributes_entry.cc
@@ -569,14 +569,13 @@ void ProfileAttributesEntry::SetGaiaIds( const base::flat_set<std::string>& gaia_ids) { - base::Value accounts(base::Value::Type::DICT); + base::Value::Dict accounts; for (const auto& gaia_id : gaia_ids) { - base::Value dict(base::Value::Type::DICT); // The dictionary is empty for now, but can hold account-specific info in // the future. - accounts.SetKey(gaia_id, std::move(dict)); + accounts.Set(gaia_id, base::Value::Dict()); } - SetValue(kAllAccountsKey, std::move(accounts)); + SetValue(kAllAccountsKey, base::Value(std::move(accounts))); } void ProfileAttributesEntry::SetLocalProfileName(const std::u16string& name,
diff --git a/chrome/browser/resources/chromeos/emoji_picker/emoji_group.html b/chrome/browser/resources/chromeos/emoji_picker/emoji_group.html index 4243833..d6d32f9d 100644 --- a/chrome/browser/resources/chromeos/emoji_picker/emoji_group.html +++ b/chrome/browser/resources/chromeos/emoji_picker/emoji_group.html
@@ -248,7 +248,8 @@ <emoji-image index="[[getIndex(item)]]" item="[[item]]" show-tooltip="[[showTooltip]]" - emoji-click="[[onEmojiClick]]"> + emoji-click="[[onEmojiClick]]" + clearable="[[clearable]]"> </emoji-image> </template> </div> @@ -257,7 +258,8 @@ <emoji-image index="[[getIndex(item)]]" item="[[item]]" show-tooltip="[[showTooltip]]" - emoji-click="[[onEmojiClick]]"> + emoji-click="[[onEmojiClick]]" + clearable="[[clearable]]"> </emoji-image> </template> </div>
diff --git a/chrome/browser/resources/chromeos/emoji_picker/emoji_image.html b/chrome/browser/resources/chromeos/emoji_picker/emoji_image.html index 847330e..e1365b4a 100644 --- a/chrome/browser/resources/chromeos/emoji_picker/emoji_image.html +++ b/chrome/browser/resources/chromeos/emoji_picker/emoji_image.html
@@ -1,4 +1,8 @@ <style> +.emoji-image-container { + position: relative; +} + .emoji-image { background-color: var(--cros-button-stroke-color-secondary-disabled); border: none; @@ -39,15 +43,53 @@ opacity: 1; } } + +.emoji-image-clear { + background-color: var(--cros-bg-color); + border: 2px solid transparent; + border-radius: 4px; + box-shadow: var(--cr-elevation-1); + color: var(--cros-text-color-secondary); + cursor: pointer; + font-family: 'Roboto', sans-serif; + font-size: 12px; + height: var(--emoji-size); + outline: none; + padding: 7px 11px 7px 11px; + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + white-space: nowrap; + width: fit-content; + z-index: 200; +} + +.emoji-image-clear:focus, +.emoji-image-clear:active { + border: 2px solid var(--cros-toggle-color); +} + </style> -<img data-index$="[[index]]" - class$="[[getImageClassName(loading)]]" - is="cr-auto-img" - auto-src="[[getUrl()]]" - alt$="[[item.base.name]]" - load="lazy" - on-mouseenter="handleMouseEnter" - on-focus="handleFocus" - on-click="handleClick" - on-load="handleLoad"> \ No newline at end of file +<div class="emoji-image-container" + on-contextmenu="handleContextMenu" + on-mouseleave="handleMouseLeave" + style$="[[getStyles(item)]]"> + <img data-index$="[[index]]" + class$="[[getImageClassName(loading)]]" + is="cr-auto-img" + auto-src="[[getUrl(item)]]" + alt$="[[item.base.name]]" + load="lazy" + on-mouseenter="handleMouseEnter" + on-focus="handleFocus" + on-click="handleClick" + on-load="handleLoad"> + + <template is="dom-if" if="[[showClearButton]]"> + <button class="emoji-image-clear" on-click="handleClear"> + Remove from recently used GIFs + </button> + </template> +</div> \ No newline at end of file
diff --git a/chrome/browser/resources/chromeos/emoji_picker/emoji_image.ts b/chrome/browser/resources/chromeos/emoji_picker/emoji_image.ts index 5c26f94..a2e6996 100644 --- a/chrome/browser/resources/chromeos/emoji_picker/emoji_image.ts +++ b/chrome/browser/resources/chromeos/emoji_picker/emoji_image.ts
@@ -6,7 +6,8 @@ import {VISUAL_CONTENT_WIDTH} from './constants.js'; import {getTemplate} from './emoji_image.html.js'; -import {EmojiVariants} from './types.js'; +import { createCustomEvent, EMOJI_CLEAR_RECENTS_CLICK } from './events.js'; +import {CategoryEnum, EmojiVariants} from './types.js'; export class EmojiImageComponent extends PolymerElement { static get is() { @@ -23,6 +24,9 @@ item: Object, showTooltip: Object, emojiClick: Object, + + clearable: {type: Boolean, value: false}, + showClearButton: {type: Boolean, value: false}, }; } @@ -33,6 +37,9 @@ showTooltip: (e: MouseEvent|FocusEvent) => void; emojiClick: (e: MouseEvent) => void; + clearable: boolean; + showClearButton: boolean; + private handleMouseEnter(event: MouseEvent): void { this.showTooltip(event); } @@ -49,6 +56,32 @@ this.loading = false; } + private handleContextMenu(evt: Event): void { + if (this.clearable) { + evt.preventDefault(); + evt.stopPropagation(); + this.showClearButton = true; + } + } + + private handleMouseLeave(): void { + if (this.showClearButton) { + this.showClearButton = false; + } + } + + private handleClear(evt: Event): void { + evt.preventDefault(); + evt.stopPropagation(); + this.showClearButton = false; + this.dispatchEvent(createCustomEvent( + EMOJI_CLEAR_RECENTS_CLICK, { + category: CategoryEnum.GIF, + item: this.item, + }, + )); + } + private getImageClassName(loading: boolean) { return loading ? 'emoji-image loading' : 'emoji-image'; } @@ -56,12 +89,12 @@ /** * Returns visual content preview url. */ - private getUrl() { - return this.item.base.visualContent?.url.preview.url; + private getUrl(item: EmojiVariants) { + return item.base.visualContent?.url.preview.url; } - private setHeight() { - const {visualContent} = this.item.base; + private getStyles(item: EmojiVariants) { + const {visualContent} = item.base; if (visualContent === undefined) { return; @@ -69,14 +102,8 @@ const {height, width} = visualContent.previewSize; const visualContentHeight = height / width * VISUAL_CONTENT_WIDTH; - this.updateStyles({ - '--visual-content-height': `${visualContentHeight}px`, - }); - } - override ready() { - super.ready(); - this.setHeight(); + return `--visual-content-height: ${visualContentHeight}px`; } }
diff --git a/chrome/browser/resources/chromeos/emoji_picker/emoji_picker.ts b/chrome/browser/resources/chromeos/emoji_picker/emoji_picker.ts index 468682a..10866b1 100644 --- a/chrome/browser/resources/chromeos/emoji_picker/emoji_picker.ts +++ b/chrome/browser/resources/chromeos/emoji_picker/emoji_picker.ts
@@ -600,7 +600,8 @@ private clearRecentEmoji(event: events.EmojiClearRecentClickEvent) { const category = event.detail.category; - this.clearHistoryData(category); + const item = event.detail.item; + this.clearHistoryData(category, item); afterNextRender(this, () => { this.updateActiveGroup(); this.updateHistoryTabDisabledProperty(); @@ -1099,14 +1100,19 @@ } /** - * Clears history items for a category. + * Clears history item(s) for a category. */ - private clearHistoryData(category: CategoryEnum) { + private clearHistoryData(category: CategoryEnum, item?: EmojiVariants) { if (this.incognito) { return; } - this.categoriesHistory[category]?.clearRecents(); + if (item === undefined) { + this.categoriesHistory[category]?.clearRecents(); + } else { + this.categoriesHistory[category]?.clearItem(category, item); + } + this.categoryHistoryUpdated(category, true, false); }
diff --git a/chrome/browser/resources/chromeos/emoji_picker/store.ts b/chrome/browser/resources/chromeos/emoji_picker/store.ts index a8e9b5e..08e6022 100644 --- a/chrome/browser/resources/chromeos/emoji_picker/store.ts +++ b/chrome/browser/resources/chromeos/emoji_picker/store.ts
@@ -75,6 +75,20 @@ save(this.storeName, this.data); } + clearItem(category: CategoryEnum, item: EmojiVariants) { + if (category === CategoryEnum.GIF) { + this.data.history = this.data.history.filter( + x => + (x.base.visualContent && + x.base.visualContent.id !== item.base.visualContent?.id)); + } else { + this.data.history = this.data.history.filter( + x => + (x.base.string && x.base.string !== item.base.string)); + } + save(this.storeName, this.data); + } + /** * Moves the given item to the front of the MRU list, inserting it if * it did not previously exist.
diff --git a/chrome/browser/resources/chromeos/login/screens/common/drive_pinning.html b/chrome/browser/resources/chromeos/login/screens/common/drive_pinning.html index fb23f25..0d70dcc 100644 --- a/chrome/browser/resources/chromeos/login/screens/common/drive_pinning.html +++ b/chrome/browser/resources/chromeos/login/screens/common/drive_pinning.html
@@ -15,7 +15,7 @@ <p> [[i18nDynamic(locale, 'DevicePinningScreenDescription')]] </p> - <p> + <p id="spaceInformation"> [[getSpaceDescription_(locale, requiredSpace_, freeSpace_)]] </p> </div>
diff --git a/chrome/browser/resources/chromeos/login/screens/login/update_required_card.js b/chrome/browser/resources/chromeos/login/screens/login/update_required_card.js index bba7580..6e4b33e 100644 --- a/chrome/browser/resources/chromeos/login/screens/login/update_required_card.js +++ b/chrome/browser/resources/chromeos/login/screens/login/update_required_card.js
@@ -165,7 +165,7 @@ * @param {string} eolMessage Not sanitized end of life message from policy */ setEolMessage(eolMessage) { - this.eolAdminMessage_ = sanitizeInnerHtml(eolMessage); + this.eolAdminMessage_ = sanitizeInnerHtml(eolMessage).toString(); } /** @param {boolean} connected */
diff --git a/chrome/browser/resources/settings/autofill_page/credit_card_edit_dialog.html b/chrome/browser/resources/settings/autofill_page/credit_card_edit_dialog.html index 6c6b510..5132bad 100644 --- a/chrome/browser/resources/settings/autofill_page/credit_card_edit_dialog.html +++ b/chrome/browser/resources/settings/autofill_page/credit_card_edit_dialog.html
@@ -6,11 +6,6 @@ width: var(--cr-default-input-max-width); } - /* Override the padding-top (the space is set by save-to-this-device). */ - div[slot='button-container'] { - padding-top: 0; - } - .md-select + .md-select { margin-inline-start: 8px; } @@ -23,7 +18,7 @@ /* Overall space between input fields, including space between nicknameInput and saved-to-this-device text, between saved-to-this-device text and button. */ - margin-bottom: 26px; + margin-bottom: 10px; margin-top: 0; }
diff --git a/chrome/browser/resources/settings/chromeos/device_page/fake_input_device_settings_provider.ts b/chrome/browser/resources/settings/chromeos/device_page/fake_input_device_settings_provider.ts index ef17655..5ff7021 100644 --- a/chrome/browser/resources/settings/chromeos/device_page/fake_input_device_settings_provider.ts +++ b/chrome/browser/resources/settings/chromeos/device_page/fake_input_device_settings_provider.ts
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import {assert, assertNotReached} from 'chrome://resources/js/assert_ts.js'; +import {assert} from 'chrome://resources/js/assert_ts.js'; import {InputDeviceSettingsProviderInterface, Keyboard, KeyboardObserverInterface, KeyboardSettings, Mouse, MouseObserverInterface, MouseSettings, PointingStick, PointingStickObserverInterface, PointingStickSettings, Touchpad, TouchpadObserverInterface, TouchpadSettings} from './input_device_settings_types.js'; @@ -93,12 +93,6 @@ this.notifyKeboardListUpdated(); } - async getConnectedKeyboards(): Promise<{keyboards: Keyboard[]}> { - // TODO(wangdanny): Remove this function once https://crrev.com/c/4337720 - // is submitted. - assertNotReached(); - } - getConnectedKeyboardSettings(): Promise<Keyboard[]> { return this.methods.resolveMethod('fakeKeyboards'); }
diff --git a/chrome/browser/signin/dice_web_signin_interceptor_unittest.cc b/chrome/browser/signin/dice_web_signin_interceptor_unittest.cc index 384a34d2..0df58b7 100644 --- a/chrome/browser/signin/dice_web_signin_interceptor_unittest.cc +++ b/chrome/browser/signin/dice_web_signin_interceptor_unittest.cc
@@ -15,6 +15,7 @@ #include "build/buildflag.h" #include "build/chromeos_buildflags.h" #include "chrome/browser/browser_process.h" +#include "chrome/browser/enterprise/browser_management/management_service_factory.h" #include "chrome/browser/profiles/profile_attributes_entry.h" #include "chrome/browser/profiles/profile_attributes_storage.h" #include "chrome/browser/signin/chrome_signin_client_factory.h" @@ -28,6 +29,7 @@ #include "chrome/test/base/testing_browser_process.h" #include "chrome/test/base/testing_profile.h" #include "chrome/test/base/testing_profile_manager.h" +#include "components/policy/core/common/management/scoped_management_service_override_for_testing.h" #include "components/prefs/pref_service.h" #include "components/signin/public/base/signin_pref_names.h" #include "components/signin/public/identity_manager/account_info.h" @@ -250,6 +252,11 @@ return factories; } + // Force local machine to be unmanaged, so that variations in try bots and + // developer machines don't affect the tests. See https://crbug.com/1445255. + policy::ScopedManagementServiceOverrideForTesting platform_browser_mgmt_ = { + policy::ManagementServiceFactory::GetForPlatform(), + policy::EnterpriseManagementAuthority::NONE}; network::TestURLLoaderFactory test_url_loader_factory_; std::unique_ptr<IdentityTestEnvironmentProfileAdaptor> identity_test_env_profile_adaptor_;
diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd index 6687530..0008940 100644 --- a/chrome/browser/ui/android/strings/android_chrome_strings.grd +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
@@ -3638,6 +3638,9 @@ <message name="IDS_MENU_FIND_IN_PAGE" desc="Menu item allowing users to find text within the current page. [CHAR_LIMIT=27]"> Find in page </message> + <message name="IDS_MENU_PAGE_INSIGHTS" desc="Menu item showing Page Insights hub. [CHAR_LIMIT=27]"> + View page insights + </message> <message name="IDS_MENU_FOLLOW" desc="Menu item allowing users to follow the current website. [CHAR_LIMIT=27]"> Follow </message> @@ -5715,6 +5718,17 @@ Undo </message> + <!-- Partial Custom Tab accessibility --> + <message name="IDS_ACCESSIBILITY_PARTIAL_CUSTOM_TAB_BOTTOM_SHEET" desc="Content description for partial custom tab of bottom sheet type"> + Bottom sheet + </message> + <message name="IDS_ACCESSIBILITY_PARTIAL_CUSTOM_TAB_SIDE_SHEET" desc="Content description for partial custom tab of side sheet type"> + Side sheet + </message> + <message name="IDS_ACCESSIBILITY_PARTIAL_CUSTOM_TAB_FULL_SHEET" desc="Content description for partial custom tab of full size type"> + Full-size sheet + </message> + <!-- Quick Delete strings --> <message name="IDS_QUICK_DELETE_DIALOG_TITLE" desc="Title of the dialog when asking users to confirm deleting the last 15 minutes of browsing data."> Delete last 15 minutes?
diff --git a/chrome/browser/ui/android/strings/android_chrome_strings_grd/IDS_ACCESSIBILITY_PARTIAL_CUSTOM_TAB_BOTTOM_SHEET.png.sha1 b/chrome/browser/ui/android/strings/android_chrome_strings_grd/IDS_ACCESSIBILITY_PARTIAL_CUSTOM_TAB_BOTTOM_SHEET.png.sha1 new file mode 100644 index 0000000..183dc48e --- /dev/null +++ b/chrome/browser/ui/android/strings/android_chrome_strings_grd/IDS_ACCESSIBILITY_PARTIAL_CUSTOM_TAB_BOTTOM_SHEET.png.sha1
@@ -0,0 +1 @@ +0a50300a7747bade0cdf5a8444d04315ec3f909b \ No newline at end of file
diff --git a/chrome/browser/ui/android/strings/android_chrome_strings_grd/IDS_ACCESSIBILITY_PARTIAL_CUSTOM_TAB_FULL_SHEET.png.sha1 b/chrome/browser/ui/android/strings/android_chrome_strings_grd/IDS_ACCESSIBILITY_PARTIAL_CUSTOM_TAB_FULL_SHEET.png.sha1 new file mode 100644 index 0000000..56bc393 --- /dev/null +++ b/chrome/browser/ui/android/strings/android_chrome_strings_grd/IDS_ACCESSIBILITY_PARTIAL_CUSTOM_TAB_FULL_SHEET.png.sha1
@@ -0,0 +1 @@ +e2c70183e6b6653b314ec7885a0804e5d36cd7df \ No newline at end of file
diff --git a/chrome/browser/ui/android/strings/android_chrome_strings_grd/IDS_ACCESSIBILITY_PARTIAL_CUSTOM_TAB_SIDE_SHEET.png.sha1 b/chrome/browser/ui/android/strings/android_chrome_strings_grd/IDS_ACCESSIBILITY_PARTIAL_CUSTOM_TAB_SIDE_SHEET.png.sha1 new file mode 100644 index 0000000..c49c4f7 --- /dev/null +++ b/chrome/browser/ui/android/strings/android_chrome_strings_grd/IDS_ACCESSIBILITY_PARTIAL_CUSTOM_TAB_SIDE_SHEET.png.sha1
@@ -0,0 +1 @@ +5053d9ffe4d5f4074409726872c9af4ef531dd08 \ No newline at end of file
diff --git a/chrome/browser/ui/android/strings/android_chrome_strings_grd/IDS_MENU_PAGE_INSIGHTS.png.sha1 b/chrome/browser/ui/android/strings/android_chrome_strings_grd/IDS_MENU_PAGE_INSIGHTS.png.sha1 new file mode 100644 index 0000000..5b4ecf2 --- /dev/null +++ b/chrome/browser/ui/android/strings/android_chrome_strings_grd/IDS_MENU_PAGE_INSIGHTS.png.sha1
@@ -0,0 +1 @@ +4975542f9a11c411598096219329a12eebe7b324 \ No newline at end of file
diff --git a/chrome/browser/ui/views/desktop_capture/share_this_tab_dialog_views.cc b/chrome/browser/ui/views/desktop_capture/share_this_tab_dialog_views.cc index a23e5fad..e9ac2ff 100644 --- a/chrome/browser/ui/views/desktop_capture/share_this_tab_dialog_views.cc +++ b/chrome/browser/ui/views/desktop_capture/share_this_tab_dialog_views.cc
@@ -33,6 +33,7 @@ #include "ui/views/background.h" #include "ui/views/border.h" #include "ui/views/layout/box_layout.h" +#include "ui/views/style/typography.h" #include "ui/views/widget/widget.h" #if defined(USE_AURA) @@ -41,6 +42,7 @@ namespace { +constexpr int kTitleTopMargin = 16; constexpr gfx::Insets kAudioToggleInsets = gfx::Insets::VH(8, 16); constexpr int kAudioToggleChildSpacing = 8; @@ -77,16 +79,27 @@ this)); const ChromeLayoutProvider* const provider = ChromeLayoutProvider::Get(); + gfx::Insets dialog_insets = provider->GetDialogInsetsForContentType( + views::DialogContentType::kText, views::DialogContentType::kControl); + dialog_insets.set_top(kTitleTopMargin); SetLayoutManager(std::make_unique<views::BoxLayout>( - views::BoxLayout::Orientation::kVertical, - provider->GetDialogInsetsForContentType( - views::DialogContentType::kText, views::DialogContentType::kControl), + views::BoxLayout::Orientation::kVertical, dialog_insets, provider->GetDistanceMetric(DISTANCE_RELATED_CONTROL_VERTICAL_SMALL))); - description_label_ = AddChildView(std::make_unique<views::Label>()); - description_label_->SetMultiLine(true); - description_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT); - description_label_->SetText( + views::Label* title_label = AddChildView(std::make_unique<views::Label>()); + title_label->SetFontList(views::style::GetFont( + views::style::CONTEXT_DIALOG_TITLE, views::style::STYLE_PRIMARY)); + title_label->SetAllowCharacterBreak(true); + title_label->SetMultiLine(true); + title_label->SetHorizontalAlignment(gfx::ALIGN_LEFT); + title_label->SetText( + l10n_util::GetStringFUTF16(IDS_SHARE_THIS_TAB_DIALOG_TITLE, app_name_)); + + views::Label* description_label = + AddChildView(std::make_unique<views::Label>()); + description_label->SetMultiLine(true); + description_label->SetHorizontalAlignment(gfx::ALIGN_LEFT); + description_label->SetText( l10n_util::GetStringUTF16(IDS_SHARE_THIS_TAB_DIALOG_TEXT)); SetupSourceView(); @@ -145,9 +158,8 @@ return gfx::Size(kDialogViewWidth, GetHeightForWidth(kDialogViewWidth)); } -std::u16string ShareThisTabDialogView::GetWindowTitle() const { - DCHECK_CURRENTLY_ON(content::BrowserThread::UI); - return l10n_util::GetStringFUTF16(IDS_SHARE_THIS_TAB_DIALOG_TITLE, app_name_); +bool ShareThisTabDialogView::ShouldShowWindowTitle() const { + return false; } bool ShareThisTabDialogView::Accept() {
diff --git a/chrome/browser/ui/views/desktop_capture/share_this_tab_dialog_views.h b/chrome/browser/ui/views/desktop_capture/share_this_tab_dialog_views.h index 766db3d4..dcaea98 100644 --- a/chrome/browser/ui/views/desktop_capture/share_this_tab_dialog_views.h +++ b/chrome/browser/ui/views/desktop_capture/share_this_tab_dialog_views.h
@@ -34,7 +34,7 @@ // views::DialogDelegateView: gfx::Size CalculatePreferredSize() const override; - std::u16string GetWindowTitle() const override; + bool ShouldShowWindowTitle() const override; bool Accept() override; bool Cancel() override; bool ShouldShowCloseButton() const override; @@ -50,8 +50,6 @@ raw_ptr<ShareThisTabDialogViews> parent_; - raw_ptr<views::Label> description_label_ = nullptr; - // Child view displaying a preview, icon and title for the tab being shared, // or a throbber while the dialog is not yet activated. raw_ptr<ShareThisTabSourceView> source_view_ = nullptr;
diff --git a/chrome/browser/ui/views/extensions/extension_install_dialog_view.cc b/chrome/browser/ui/views/extensions/extension_install_dialog_view.cc index 06b6a6ee9..16be606 100644 --- a/chrome/browser/ui/views/extensions/extension_install_dialog_view.cc +++ b/chrome/browser/ui/views/extensions/extension_install_dialog_view.cc
@@ -643,33 +643,8 @@ provider->GetDistanceMetric(views::DISTANCE_RELATED_CONTROL_VERTICAL))); std::vector<ExtensionInfoSection> sections; - if (prompt_->ShouldShowPermissions()) { - bool has_permissions = prompt_->GetPermissionCount() > 0; - if (has_permissions) { - AddPermissions(prompt_.get(), sections, content_width); - } else { - sections.push_back( - {l10n_util::GetStringUTF16(IDS_EXTENSION_NO_SPECIAL_PERMISSIONS), - nullptr}); - } - } - - if (prompt_->GetRetainedFileCount()) { - std::vector<std::u16string> details; - for (size_t i = 0; i < prompt_->GetRetainedFileCount(); ++i) { - details.push_back(prompt_->GetRetainedFile(i)); - } - sections.push_back({prompt_->GetRetainedFilesHeading(), - std::make_unique<ExpandableContainerView>(details)}); - } - - if (prompt_->GetRetainedDeviceCount()) { - std::vector<std::u16string> details; - for (size_t i = 0; i < prompt_->GetRetainedDeviceCount(); ++i) { - details.push_back(prompt_->GetRetainedDeviceMessageString(i)); - } - sections.push_back({prompt_->GetRetainedDevicesHeading(), - std::make_unique<ExpandableContainerView>(details)}); + if (prompt_->GetPermissionCount() > 0) { + AddPermissions(prompt_.get(), sections, content_width); } if (sections.empty() &&
diff --git a/chrome/browser/ui/views/extensions/extension_install_dialog_view_browsertest.cc b/chrome/browser/ui/views/extensions/extension_install_dialog_view_browsertest.cc index a05ce68b..51e1aa0 100644 --- a/chrome/browser/ui/views/extensions/extension_install_dialog_view_browsertest.cc +++ b/chrome/browser/ui/views/extensions/extension_install_dialog_view_browsertest.cc
@@ -397,8 +397,6 @@ prompt->AddPermissionSet(*permission_set_); else prompt->AddPermissionMessages(permission_messages_); - prompt->set_retained_files(retained_files_); - prompt->set_retained_device_messages(retained_devices_); if (from_webstore_) prompt->SetWebstoreData("69,420", true, 2.5, 37); @@ -426,14 +424,6 @@ PermissionMessage(base::ASCIIToUTF16(permission), PermissionIDSet())); } - void AddRetainedFile(const base::FilePath& path) { - retained_files_.push_back(path); - } - - void AddRetainedDevice(const std::string& device) { - retained_devices_.push_back(base::ASCIIToUTF16(device)); - } - void AddPermissionWithDetails( std::string main_permission, std::vector<std::u16string> detailed_permissions) { @@ -448,8 +438,6 @@ bool from_webstore_ = false; std::unique_ptr<PermissionSet> permission_set_; PermissionMessages permission_messages_; - std::vector<base::FilePath> retained_files_; - std::vector<std::u16string> retained_devices_; base::test::ScopedFeatureList feature_list_; }; @@ -516,28 +504,6 @@ ShowAndVerifyUi(); } -// TODO(crbug.com/1164575): Flaky on all platforms. -IN_PROC_BROWSER_TEST_F(ExtensionInstallDialogViewInteractiveBrowserTest, - DISABLED_InvokeUi_WithRetainedFiles) { - AddRetainedFile(base::FilePath(FILE_PATH_LITERAL("/dev/null"))); - AddRetainedFile(base::FilePath(FILE_PATH_LITERAL("/dev/zero"))); - AddRetainedFile(base::FilePath(FILE_PATH_LITERAL("/dev/random"))); - AddRetainedFile(base::FilePath(FILE_PATH_LITERAL( - "/some/very/very/very/very/very/long/path/longer/than/the/" - "line/length/file_with_long_name_too.txt"))); - ShowAndVerifyUi(); -} - -IN_PROC_BROWSER_TEST_F(ExtensionInstallDialogViewInteractiveBrowserTest, - InvokeUi_WithRetainedDevices) { - AddRetainedDevice("USB Device"); - AddRetainedDevice("USB Device With Longer Name"); - AddRetainedDevice( - "Another USB Device With A Very Very Very Very Very Very " - "Long Name So That It Hopefully Wraps to A New Line"); - ShowAndVerifyUi(); -} - // TODO(https://crbug.com/1126741): Flaky on Win10. #if BUILDFLAG(IS_WIN) #define MAYBE_InvokeUi_WithWithholdingOption \ @@ -565,8 +531,6 @@ AddPermissionWithDetails( "This permission has details", {u"Detailed permission 1", u"Detailed permission 2"}); - AddRetainedDevice("USB Device"); - AddRetainedFile(base::FilePath(FILE_PATH_LITERAL("/dev/null"))); ShowAndVerifyUi(); }
diff --git a/chrome/browser/ui/views/extensions/extensions_menu_item_view.cc b/chrome/browser/ui/views/extensions/extensions_menu_item_view.cc index 74ea329c..ba611138 100644 --- a/chrome/browser/ui/views/extensions/extensions_menu_item_view.cc +++ b/chrome/browser/ui/views/extensions/extensions_menu_item_view.cc
@@ -172,6 +172,7 @@ ExtensionMenuItemView::ExtensionMenuItemView( Browser* browser, + bool is_enterprise, std::unique_ptr<ToolbarActionViewController> controller, base::RepeatingCallback<void(bool)> site_access_toggle_callback, views::Button::PressedCallback site_permissions_button_callback) @@ -246,7 +247,12 @@ views::Builder<HoverButton>( std::make_unique<HoverButton>( site_permissions_button_callback, - /*icon_view=*/nullptr, std::u16string(), std::u16string(), + is_enterprise ? std::make_unique<views::ImageView>( + ui::ImageModel::FromVectorIcon( + vector_icons::kBusinessIcon, + ui::kColorIcon, icon_size)) + : nullptr, + std::u16string(), std::u16string(), std::move(site_permissions_button_icon))) .CopyAddressTo(&site_permissions_button_) // Margin to align the main and secondary row text. Icon
diff --git a/chrome/browser/ui/views/extensions/extensions_menu_item_view.h b/chrome/browser/ui/views/extensions/extensions_menu_item_view.h index 042d6d10..453a5db 100644 --- a/chrome/browser/ui/views/extensions/extensions_menu_item_view.h +++ b/chrome/browser/ui/views/extensions/extensions_menu_item_view.h
@@ -70,6 +70,7 @@ // Constructor for the kExtensionsMenuAccessControl feature. ExtensionMenuItemView( Browser* browser, + bool is_enterprise, std::unique_ptr<ToolbarActionViewController> controller, base::RepeatingCallback<void(bool)> site_access_toggle_callback, views::Button::PressedCallback site_permissions_button_callback);
diff --git a/chrome/browser/ui/views/extensions/extensions_menu_main_page_view.cc b/chrome/browser/ui/views/extensions/extensions_menu_main_page_view.cc index b89dde6..24f319c4 100644 --- a/chrome/browser/ui/views/extensions/extensions_menu_main_page_view.cc +++ b/chrome/browser/ui/views/extensions/extensions_menu_main_page_view.cc
@@ -248,6 +248,7 @@ void ExtensionsMenuMainPageView::CreateAndInsertMenuItem( std::unique_ptr<ExtensionActionViewController> action_controller, extensions::ExtensionId extension_id, + bool is_enterprise, ExtensionMenuItemView::SiteAccessToggleState site_access_toggle_state, ExtensionMenuItemView::SitePermissionsButtonState site_permissions_button_state, @@ -257,7 +258,7 @@ // base::Unretained() below is safe because `menu_handler_` lifetime is // tied to this view lifetime by the extensions menu coordinator. auto item = std::make_unique<ExtensionMenuItemView>( - browser_, std::move(action_controller), + browser_, is_enterprise, std::move(action_controller), base::BindRepeating(&ExtensionsMenuHandler::OnExtensionToggleSelected, base::Unretained(menu_handler_), extension_id), base::BindRepeating(&ExtensionsMenuHandler::OpenSitePermissionsPage,
diff --git a/chrome/browser/ui/views/extensions/extensions_menu_main_page_view.h b/chrome/browser/ui/views/extensions/extensions_menu_main_page_view.h index 472ded5..87afce7 100644 --- a/chrome/browser/ui/views/extensions/extensions_menu_main_page_view.h +++ b/chrome/browser/ui/views/extensions/extensions_menu_main_page_view.h
@@ -44,6 +44,7 @@ void CreateAndInsertMenuItem( std::unique_ptr<ExtensionActionViewController> action_controller, extensions::ExtensionId extension_id, + bool is_enterprise, ExtensionMenuItemView::SiteAccessToggleState site_access_toggle_state, ExtensionMenuItemView::SitePermissionsButtonState site_permissions_button_state,
diff --git a/chrome/browser/ui/views/extensions/extensions_menu_view_controller.cc b/chrome/browser/ui/views/extensions/extensions_menu_view_controller.cc index 123d803..6ea9642 100644 --- a/chrome/browser/ui/views/extensions/extensions_menu_view_controller.cc +++ b/chrome/browser/ui/views/extensions/extensions_menu_view_controller.cc
@@ -466,28 +466,8 @@ // Insert a menu item for the extension when main page is opened. auto* main_page = GetMainPage(current_page_); DCHECK(main_page); - int index = FindIndex(*toolbar_model_, action_id); - std::unique_ptr<ExtensionActionViewController> action_controller = - ExtensionActionViewController::Create(action_id, browser_, - extensions_container_); - auto* web_contents = GetActiveWebContents(); - ExtensionMenuItemView::SiteAccessToggleState site_access_toggle_state = - GetSiteAccessToggleState(*action_controller->extension(), - *browser_->profile(), *toolbar_model_, - *web_contents); - ExtensionMenuItemView::SitePermissionsButtonState - site_permissions_button_state = GetSitePermissionsButtonState( - *action_controller->extension(), *browser_->profile(), - *toolbar_model_, *web_contents); - ExtensionMenuItemView::SitePermissionsButtonAccess - site_permissions_button_access = GetSitePermissionsButtonAccess( - *action_controller->extension(), *browser_->profile(), - *toolbar_model_, *web_contents); - - main_page->CreateAndInsertMenuItem( - std::move(action_controller), action_id, site_access_toggle_state, - site_permissions_button_state, site_permissions_button_access, index); + InsertMenuItemMainPage(main_page, action_id, index); // TODO(crbug.com/1390952): Update requests access section once // such section is implemented (if the extension added requests @@ -634,34 +614,45 @@ void ExtensionsMenuViewController::PopulateMainPage( ExtensionsMenuMainPageView* main_page) { + // TODO(crbug.com/1390952): We should update the subheader here since it + // despends in `toolbar_model_`. std::vector<std::string> sorted_ids = SortExtensionsByName(*toolbar_model_); for (size_t i = 0; i < sorted_ids.size(); ++i) { - // TODO(emiliapaz): Under MVC architecture, view should not own the view - // controller. However, the current extensions structure depends on this - // thus a major restructure is needed. - std::unique_ptr<ExtensionActionViewController> action_controller = - ExtensionActionViewController::Create(sorted_ids[i], browser_, - extensions_container_); - auto* web_contents = GetActiveWebContents(); - ExtensionMenuItemView::SiteAccessToggleState site_access_toggle_state = - GetSiteAccessToggleState(*action_controller->extension(), - *browser_->profile(), *toolbar_model_, - *web_contents); - ExtensionMenuItemView::SitePermissionsButtonState - site_permissions_button_state = GetSitePermissionsButtonState( - *action_controller->extension(), *browser_->profile(), - *toolbar_model_, *web_contents); - ExtensionMenuItemView::SitePermissionsButtonAccess - site_permissions_button_access = GetSitePermissionsButtonAccess( - *action_controller->extension(), *browser_->profile(), - *toolbar_model_, *web_contents); - - main_page->CreateAndInsertMenuItem( - std::move(action_controller), sorted_ids[i], site_access_toggle_state, - site_permissions_button_state, site_permissions_button_access, i); + InsertMenuItemMainPage(main_page, sorted_ids[i], i); } } +void ExtensionsMenuViewController::InsertMenuItemMainPage( + ExtensionsMenuMainPageView* main_page, + const extensions::ExtensionId& extension_id, + int index) { + // TODO(emiliapaz): Under MVC architecture, view should not own the view + // controller. However, the current extensions structure depends on this + // thus a major restructure is needed. + std::unique_ptr<ExtensionActionViewController> action_controller = + ExtensionActionViewController::Create(extension_id, browser_, + extensions_container_); + const extensions::Extension* extension = action_controller->extension(); + Profile* profile = browser_->profile(); + content::WebContents* web_contents = GetActiveWebContents(); + + bool is_enterprise = HasEnterpriseForcedAccess(*extension, *profile); + ExtensionMenuItemView::SiteAccessToggleState site_access_toggle_state = + GetSiteAccessToggleState(*extension, *profile, *toolbar_model_, + *web_contents); + ExtensionMenuItemView::SitePermissionsButtonState + site_permissions_button_state = GetSitePermissionsButtonState( + *extension, *profile, *toolbar_model_, *web_contents); + ExtensionMenuItemView::SitePermissionsButtonAccess + site_permissions_button_access = GetSitePermissionsButtonAccess( + *extension, *profile, *toolbar_model_, *web_contents); + + main_page->CreateAndInsertMenuItem(std::move(action_controller), extension_id, + is_enterprise, site_access_toggle_state, + site_permissions_button_state, + site_permissions_button_access, index); +} + content::WebContents* ExtensionsMenuViewController::GetActiveWebContents() const { return browser_->tab_strip_model()->GetActiveWebContents();
diff --git a/chrome/browser/ui/views/extensions/extensions_menu_view_controller.h b/chrome/browser/ui/views/extensions/extensions_menu_view_controller.h index 4ef911f4..b2053d3 100644 --- a/chrome/browser/ui/views/extensions/extensions_menu_view_controller.h +++ b/chrome/browser/ui/views/extensions/extensions_menu_view_controller.h
@@ -108,6 +108,11 @@ // Populates menu items in `main_page`. void PopulateMainPage(ExtensionsMenuMainPageView* main_page); + // Inserts a menu item for `extension_id` in `main_page` at `index`. + void InsertMenuItemMainPage(ExtensionsMenuMainPageView* main_page, + const extensions::ExtensionId& extension_id, + int index); + // Returns the currently active web contents. content::WebContents* GetActiveWebContents() const;
diff --git a/chrome/browser/ui/views/frame/browser_non_client_frame_view_mac.h b/chrome/browser/ui/views/frame/browser_non_client_frame_view_mac.h index a9077d73..4244f2d 100644 --- a/chrome/browser/ui/views/frame/browser_non_client_frame_view_mac.h +++ b/chrome/browser/ui/views/frame/browser_non_client_frame_view_mac.h
@@ -9,6 +9,8 @@ #import <CoreGraphics/CGBase.h> +#include <memory> + #include "base/gtest_prod_util.h" #include "base/mac/scoped_nsobject.h" #include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h" @@ -16,6 +18,10 @@ #include "chrome/browser/web_applications/web_app_registrar.h" #include "components/prefs/pref_member.h" +namespace base { +class OneShotTimer; +} + namespace views { class Label; } @@ -116,6 +122,9 @@ // app. bool AlwaysShowToolbarInFullscreen() const; + // Emits the duration of the current fullscreen session, if any. + void EmitFullscreenSessionHistograms(); + // Used to keep track of the update of kShowFullscreenToolbar preference. BooleanPrefMember show_fullscreen_toolbar_; base::ScopedObservation<web_app::WebAppRegistrar, @@ -129,6 +138,14 @@ base::scoped_nsobject<FullscreenToolbarController> fullscreen_toolbar_controller_; + + // Mark the start of a fullscreen session. Applies to both immersive and + // standard fullscreen. + absl::optional<base::TimeTicks> fullscreen_session_start_; + + // Fires after 24 hours to emit the duration of the current fullscreen + // session, if any. + std::unique_ptr<base::OneShotTimer> fullscreen_session_timer_; }; #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_MAC_H_
diff --git a/chrome/browser/ui/views/frame/browser_non_client_frame_view_mac.mm b/chrome/browser/ui/views/frame/browser_non_client_frame_view_mac.mm index 4bf5673..3ea7469 100644 --- a/chrome/browser/ui/views/frame/browser_non_client_frame_view_mac.mm +++ b/chrome/browser/ui/views/frame/browser_non_client_frame_view_mac.mm
@@ -9,6 +9,8 @@ #include "base/functional/bind.h" #include "base/metrics/histogram_macros.h" #include "base/numerics/safe_conversions.h" +#include "base/time/time.h" +#include "base/timer/timer.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/themes/theme_properties.h" #include "chrome/browser/themes/theme_service.h" @@ -61,7 +63,8 @@ BrowserNonClientFrameViewMac::BrowserNonClientFrameViewMac( BrowserFrame* frame, BrowserView* browser_view) - : BrowserNonClientFrameView(frame, browser_view) { + : BrowserNonClientFrameView(frame, browser_view), + fullscreen_session_timer_(std::make_unique<base::OneShotTimer>()) { if (web_app::AppBrowserController::IsWebApp(browser_view->browser())) { auto* provider = web_app::WebAppProvider::GetForWebApps(browser_view->GetProfile()); @@ -91,14 +94,38 @@ } BrowserNonClientFrameViewMac::~BrowserNonClientFrameViewMac() { - if ([fullscreen_toolbar_controller_ isInFullscreen]) + if ([fullscreen_toolbar_controller_ isInFullscreen]) { [fullscreen_toolbar_controller_ exitFullscreenMode]; + } + EmitFullscreenSessionHistograms(); } /////////////////////////////////////////////////////////////////////////////// // BrowserNonClientFrameViewMac, BrowserNonClientFrameView implementation: void BrowserNonClientFrameViewMac::OnFullscreenStateChanged() { + // Record the start of a browser fullscreen session. Content fullscreen is + // ignored. + FullscreenController* controller = + browser_view()->GetExclusiveAccessManager()->fullscreen_controller(); + if (browser_view()->IsFullscreen() && + !controller->IsWindowFullscreenForTabOrPending() && + !controller->IsExtensionFullscreenOrPending()) { + fullscreen_session_start_ = base::TimeTicks::Now(); + + // Add a backstop to emit the metric 24 hours from now. Any session lasting + // more than 24 hours would be counted in the overflow bucket, so emit at 24 + // hours to get the count emitted faster. + fullscreen_session_timer_->Start( + FROM_HERE, base::Days(1), + base::BindOnce( + &BrowserNonClientFrameViewMac::EmitFullscreenSessionHistograms, + base::Unretained(this))); + } else { + fullscreen_session_timer_->Stop(); + EmitFullscreenSessionHistograms(); + } + if (browser_view()->UsesImmersiveFullscreenMode()) { browser_view()->immersive_mode_controller()->SetEnabled( browser_view()->IsFullscreen()); @@ -554,3 +581,16 @@ return *show_fullscreen_toolbar_; } } + +void BrowserNonClientFrameViewMac::EmitFullscreenSessionHistograms() { + if (!fullscreen_session_start_.has_value()) { + return; + } + base::TimeDelta delta = + base::TimeTicks::Now() - fullscreen_session_start_.value(); + fullscreen_session_start_.reset(); + + // Max duration of 1 day. + UMA_HISTOGRAM_CUSTOM_TIMES("Session.BrowserFullscreen.DurationUpTo24H", delta, + base::Milliseconds(1), base::Days(1), 100); +}
diff --git a/chrome/browser/ui/views/intent_picker_bubble_view.cc b/chrome/browser/ui/views/intent_picker_bubble_view.cc index 42ea849a..72fba6c 100644 --- a/chrome/browser/ui/views/intent_picker_bubble_view.cc +++ b/chrome/browser/ui/views/intent_picker_bubble_view.cc
@@ -395,10 +395,7 @@ DCHECK(!contents()->children().empty()); const int row_height = contents()->children().front()->GetPreferredSize().height(); - // TODO(djacobo): Replace this limit to correctly reflect the UI mocks, - // which now instead of limiting the results to 3.5 will allow whatever fits - // in 256pt. Using |kMaxAppResults| as a measure of how many apps we want to - // show. + // Use |kMaxAppResults| as a measure of how many apps we want to show. ClipHeightTo(row_height, (apps::kMaxAppResults + 0.5) * row_height); }
diff --git a/chrome/browser/ui/views/site_data/page_specific_site_data_dialog.cc b/chrome/browser/ui/views/site_data/page_specific_site_data_dialog.cc index c018fa9..2d23ea4 100644 --- a/chrome/browser/ui/views/site_data/page_specific_site_data_dialog.cc +++ b/chrome/browser/ui/views/site_data/page_specific_site_data_dialog.cc
@@ -20,6 +20,7 @@ #include "chrome/browser/ui/views/site_data/site_data_row_view.h" #include "chrome/grit/generated_resources.h" #include "components/browsing_data/content/browsing_data_model.h" +#include "components/browsing_data/core/browsing_data_utils.h" #include "components/constrained_window/constrained_window_views.h" #include "components/content_settings/browser/page_specific_content_settings.h" #include "components/content_settings/core/browser/cookie_settings.h" @@ -300,6 +301,9 @@ RecordPageSpecificSiteDataDialogAction( PageSpecificSiteDataDialogAction::kSiteDeleted); + + browsing_data::RecordDeleteBrowsingDataAction( + browsing_data::DeleteBrowsingDataAction::kCookiesInUseDialog); } void SetContentException(const url::Origin& origin, ContentSetting setting) {
diff --git a/chrome/browser/ui/views/site_data/page_specific_site_data_dialog_browsertest.cc b/chrome/browser/ui/views/site_data/page_specific_site_data_dialog_browsertest.cc index 7f6082a..3d2674ca 100644 --- a/chrome/browser/ui/views/site_data/page_specific_site_data_dialog_browsertest.cc +++ b/chrome/browser/ui/views/site_data/page_specific_site_data_dialog_browsertest.cc
@@ -15,6 +15,7 @@ #include "chrome/grit/generated_resources.h" #include "chrome/test/base/in_process_browser_test.h" #include "chrome/test/base/ui_test_utils.h" +#include "components/browsing_data/core/browsing_data_utils.h" #include "components/content_settings/core/browser/cookie_settings.h" #include "components/content_settings/core/common/pref_names.h" #include "components/infobars/content/content_infobar_manager.h" @@ -38,6 +39,8 @@ namespace { const char kCookiesDialogHistogramName[] = "Privacy.CookiesInUseDialog.Action"; +const char kDeleteBrowsingDataActionName[] = + "Privacy.DeleteBrowsingData.Action"; void ClickButton(views::Button* button) { views::test::ButtonTestApi test_api(button); @@ -301,6 +304,10 @@ histograms.ExpectBucketCount( kCookiesDialogHistogramName, static_cast<int>(PageSpecificSiteDataDialogAction::kSiteDeleted), 1); + histograms.ExpectBucketCount( + kDeleteBrowsingDataActionName, + browsing_data::DeleteBrowsingDataAction::kCookiesInUseDialog, 1); + EXPECT_EQ(1, user_actions.GetActionCount(remove_action)); }
diff --git a/chrome/browser/ui/webui/ash/manage_mirrorsync/manage_mirrorsync_ui.cc b/chrome/browser/ui/webui/ash/manage_mirrorsync/manage_mirrorsync_ui.cc index 7fe369ff8..5b97a43 100644 --- a/chrome/browser/ui/webui/ash/manage_mirrorsync/manage_mirrorsync_ui.cc +++ b/chrome/browser/ui/webui/ash/manage_mirrorsync/manage_mirrorsync_ui.cc
@@ -28,7 +28,6 @@ base::make_span(kManageMirrorsyncResources, kManageMirrorsyncResourcesSize), IDR_MANAGE_MIRRORSYNC_INDEX_HTML); - source->DisableTrustedTypesCSP(); } ManageMirrorSyncUI::~ManageMirrorSyncUI() = default;
diff --git a/chrome/browser/ui/webui/ash/multidevice_setup/multidevice_setup_dialog.cc b/chrome/browser/ui/webui/ash/multidevice_setup/multidevice_setup_dialog.cc index 41015f9..ba0ad3c 100644 --- a/chrome/browser/ui/webui/ash/multidevice_setup/multidevice_setup_dialog.cc +++ b/chrome/browser/ui/webui/ash/multidevice_setup/multidevice_setup_dialog.cc
@@ -115,8 +115,6 @@ content::WebUIDataSource* source = content::WebUIDataSource::CreateAndAdd( Profile::FromWebUI(web_ui), chrome::kChromeUIMultiDeviceSetupHost); - source->DisableTrustedTypesCSP(); - AddLocalizedStrings(source); source->UseStringsJs(); @@ -125,7 +123,6 @@ base::make_span(kMultideviceSetupResources, kMultideviceSetupResourcesSize), IDR_MULTIDEVICE_SETUP_MULTIDEVICE_SETUP_DIALOG_HTML); - source->DisableTrustedTypesCSP(); web_ui->AddMessageHandler(std::make_unique<MultideviceSetupHandler>()); web_ui->AddMessageHandler(std::make_unique<MetricsHandler>());
diff --git a/chrome/browser/ui/webui/chrome_url_data_manager_browsertest.cc b/chrome/browser/ui/webui/chrome_url_data_manager_browsertest.cc index f3f0ebc..440073f 100644 --- a/chrome/browser/ui/webui/chrome_url_data_manager_browsertest.cc +++ b/chrome/browser/ui/webui/chrome_url_data_manager_browsertest.cc
@@ -37,6 +37,7 @@ #include "ui/accessibility/accessibility_features.h" #if BUILDFLAG(IS_CHROMEOS_ASH) +#include "ash/constants/ash_features.h" #include "chromeos/constants/chromeos_features.h" #else #include "chrome/browser/signin/signin_features.h" @@ -176,6 +177,7 @@ enabled_features.push_back(welcome::kForceEnabled); #endif #if BUILDFLAG(IS_CHROMEOS_ASH) + enabled_features.push_back(ash::features::kDriveFsMirroring); enabled_features.push_back(chromeos::features::kUploadOfficeToCloud); #else enabled_features.push_back(kForYouFre); @@ -377,7 +379,9 @@ "chrome://family-link-user-internals", "chrome://help-app", "chrome://linux-proxy-config", + "chrome://manage-mirrorsync", "chrome://multidevice-internals", + "chrome://multidevice-setup", "chrome://nearby-internals", "chrome://network", "chrome://office-fallback/",
diff --git a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc index 197c3af1..4a1dc1e 100644 --- a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc +++ b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
@@ -186,19 +186,9 @@ #include "ash/constants/ash_features.h" #include "ash/constants/ash_switches.h" #include "ash/webui/camera_app_ui/url_constants.h" -#include "ash/webui/color_internals/color_internals_ui.h" -#include "ash/webui/color_internals/url_constants.h" #include "ash/webui/file_manager/url_constants.h" -#include "ash/webui/files_internals/files_internals_ui.h" #include "ash/webui/files_internals/url_constants.h" -#include "ash/webui/firmware_update_ui/firmware_update_app_ui.h" -#include "ash/webui/firmware_update_ui/url_constants.h" #include "ash/webui/multidevice_debug/url_constants.h" -#include "ash/webui/os_feedback_ui/backend/os_feedback_delegate.h" -#include "ash/webui/os_feedback_ui/os_feedback_ui.h" -#include "ash/webui/os_feedback_ui/url_constants.h" -#include "ash/webui/system_extensions_internals_ui/system_extensions_internals_ui.h" -#include "ash/webui/system_extensions_internals_ui/url_constants.h" #include "base/system/sys_info.h" #include "build/config/chromebox_for_meetings/buildflags.h" #include "chrome/browser/app_mode/app_mode_utils.h" @@ -208,53 +198,12 @@ #include "chrome/browser/ash/login/easy_unlock/easy_unlock_service_factory.h" #include "chrome/browser/ash/login/login_pref_names.h" #include "chrome/browser/ash/net/network_health/network_health_manager.h" -#include "chrome/browser/ash/os_feedback/chrome_os_feedback_delegate.h" #include "chrome/browser/ash/profiles/profile_helper.h" #include "chrome/browser/ash/system_web_apps/system_web_app_manager.h" #include "chrome/browser/ash/web_applications/files_internals_ui_delegate.h" #include "chrome/browser/feedback/feedback_dialog_utils.h" #include "chrome/browser/nearby_sharing/nearby_sharing_service_factory.h" -#include "chrome/browser/ui/webui/ash/account_manager/account_manager_error_ui.h" -#include "chrome/browser/ui/webui/ash/account_manager/account_migration_welcome_ui.h" -#include "chrome/browser/ui/webui/ash/add_supervision/add_supervision_ui.h" -#include "chrome/browser/ui/webui/ash/arc_graphics_tracing/arc_graphics_tracing_ui.h" -#include "chrome/browser/ui/webui/ash/arc_power_control/arc_power_control_ui.h" -#include "chrome/browser/ui/webui/ash/assistant_optin/assistant_optin_ui.h" -#include "chrome/browser/ui/webui/ash/audio/audio_ui.h" -#include "chrome/browser/ui/webui/ash/bluetooth_pairing_dialog.h" #include "chrome/browser/ui/webui/ash/cellular_setup/mobile_setup_ui.h" -#include "chrome/browser/ui/webui/ash/certificate_manager_dialog_ui.h" -#include "chrome/browser/ui/webui/ash/cloud_upload/cloud_upload_ui.h" -#include "chrome/browser/ui/webui/ash/crostini_installer/crostini_installer_ui.h" -#include "chrome/browser/ui/webui/ash/crostini_upgrader/crostini_upgrader_ui.h" -#include "chrome/browser/ui/webui/ash/cryptohome_ui.h" -#include "chrome/browser/ui/webui/ash/drive_internals_ui.h" -#include "chrome/browser/ui/webui/ash/emoji/emoji_ui.h" -#include "chrome/browser/ui/webui/ash/enterprise_reporting/enterprise_reporting_ui.h" -#include "chrome/browser/ui/webui/ash/human_presence_internals_ui.h" -#include "chrome/browser/ui/webui/ash/in_session_password_change/password_change_ui.h" -#include "chrome/browser/ui/webui/ash/internet_config_dialog.h" -#include "chrome/browser/ui/webui/ash/internet_detail_dialog.h" -#include "chrome/browser/ui/webui/ash/launcher_internals/launcher_internals_ui.h" -#include "chrome/browser/ui/webui/ash/lock_screen_reauth/lock_screen_network_ui.h" -#include "chrome/browser/ui/webui/ash/lock_screen_reauth/lock_screen_start_reauth_ui.h" -#include "chrome/browser/ui/webui/ash/manage_mirrorsync/manage_mirrorsync_ui.h" -#include "chrome/browser/ui/webui/ash/multidevice_internals/multidevice_internals_ui.h" -#include "chrome/browser/ui/webui/ash/multidevice_setup/multidevice_setup_dialog.h" -#include "chrome/browser/ui/webui/ash/network_ui.h" -#include "chrome/browser/ui/webui/ash/notification_tester/notification_tester_ui.h" -#include "chrome/browser/ui/webui/ash/parent_access/parent_access_ui.h" -#include "chrome/browser/ui/webui/ash/power_ui.h" -#include "chrome/browser/ui/webui/ash/set_time_ui.h" -#include "chrome/browser/ui/webui/ash/slow_trace_ui.h" -#include "chrome/browser/ui/webui/ash/slow_ui.h" -#include "chrome/browser/ui/webui/ash/smb_shares/smb_credentials_dialog.h" -#include "chrome/browser/ui/webui/ash/smb_shares/smb_share_dialog.h" -#include "chrome/browser/ui/webui/ash/sys_internals/sys_internals_ui.h" -#include "chrome/browser/ui/webui/ash/vm/vm_ui.h" -#include "chrome/browser/ui/webui/nearby_internals/nearby_internals_ui.h" -#include "chrome/browser/ui/webui/nearby_share/nearby_share_dialog_ui.h" -#include "chrome/browser/ui/webui/settings/ash/os_settings_ui.h" #include "chromeos/ash/services/multidevice_setup/public/mojom/multidevice_setup.mojom.h" #include "chromeos/services/network_health/public/mojom/network_diagnostics.mojom.h" // nogncheck #include "chromeos/services/network_health/public/mojom/network_health.mojom.h" // nogncheck @@ -271,10 +220,6 @@ #include "chrome/browser/ui/webui/bluetooth_internals/bluetooth_internals_ui.h" // nogncheck #endif // !BUILDFLAG(IS_CHROMEOS_LACROS) -#if BUILDFLAG(IS_CHROMEOS_ASH) && !defined(OFFICIAL_BUILD) -#include "chrome/browser/ui/webui/ash/emulator/device_emulator_ui.h" -#endif - #if BUILDFLAG(IS_CHROMEOS) #include "chrome/browser/ui/webui/chromeos/chrome_url_disabled/chrome_url_disabled_ui.h" #endif
diff --git a/chrome/browser/ui/webui/management/management_ui_browsertest.cc b/chrome/browser/ui/webui/management/management_ui_browsertest.cc index 1406b765..58f7c08 100644 --- a/chrome/browser/ui/webui/management/management_ui_browsertest.cc +++ b/chrome/browser/ui/webui/management/management_ui_browsertest.cc
@@ -6,6 +6,7 @@ #include "base/strings/escape.h" #include "base/strings/utf_string_conversions.h" #include "build/chromeos_buildflags.h" +#include "chrome/browser/enterprise/browser_management/management_service_factory.h" #include "chrome/browser/policy/chrome_browser_policy_connector.h" #include "chrome/browser/policy/profile_policy_connector.h" #include "chrome/browser/profiles/profile.h" @@ -16,6 +17,7 @@ #include "chrome/test/base/ui_test_utils.h" #include "components/enterprise/browser/controller/fake_browser_dm_token_storage.h" #include "components/policy/core/browser/browser_policy_connector.h" +#include "components/policy/core/common/management/scoped_management_service_override_for_testing.h" #include "components/policy/core/common/mock_configuration_policy_provider.h" #include "components/strings/grit/components_strings.h" #include "content/public/browser/browser_context.h" @@ -56,13 +58,18 @@ } private: + // Force local machine to be unmanaged, so that variations in try bots and + // developer machines don't affect the tests. See https://crbug.com/1445255. + policy::ScopedManagementServiceOverrideForTesting platform_browser_mgmt_ = { + policy::ManagementServiceFactory::GetForPlatform(), + policy::EnterpriseManagementAuthority::NONE}; testing::NiceMock<policy::MockConfigurationPolicyProvider> provider_; policy::FakeBrowserDMTokenStorage fake_dm_token_storage_; }; #if !BUILDFLAG(IS_CHROMEOS_ASH) // TODO(crbug.com/1443363): flaky. -IN_PROC_BROWSER_TEST_F(ManagementUITest, DISABLED_ManagementStateChange) { +IN_PROC_BROWSER_TEST_F(ManagementUITest, ManagementStateChange) { profile_policy_connector()->OverrideIsManagedForTesting(false); ASSERT_TRUE( ui_test_utils::NavigateToURL(browser(), GURL("chrome://management")));
diff --git a/chrome/browser/web_applications/test/fake_web_app_provider.cc b/chrome/browser/web_applications/test/fake_web_app_provider.cc index a8fe540..e83fa2b 100644 --- a/chrome/browser/web_applications/test/fake_web_app_provider.cc +++ b/chrome/browser/web_applications/test/fake_web_app_provider.cc
@@ -67,11 +67,6 @@ auto* test_provider = static_cast<FakeWebAppProvider*>( WebAppProvider::GetForLocalAppsUnchecked(profile)); CHECK(test_provider); - CHECK(!test_provider->started_); - - // Disconnect so that clients are forced to call Start() before accessing any - // subsystems. - test_provider->connected_ = false; return test_provider; } @@ -83,80 +78,80 @@ void FakeWebAppProvider::SetRunSubsystemStartupTasks( bool run_subsystem_startup_tasks) { - CheckNotStarted(); + CheckNotStartedAndDisconnect(); run_subsystem_startup_tasks_ = run_subsystem_startup_tasks; } void FakeWebAppProvider::SetSynchronizePreinstalledAppsOnStartup( bool synchronize_on_startup) { - CheckNotStarted(); + CheckNotStartedAndDisconnect(); synchronize_preinstalled_app_on_startup_ = synchronize_on_startup; } void FakeWebAppProvider::SetRegistrar( std::unique_ptr<WebAppRegistrar> registrar) { - CheckNotStarted(); + CheckNotStartedAndDisconnect(); registrar_ = std::move(registrar); } void FakeWebAppProvider::SetDatabaseFactory( std::unique_ptr<AbstractWebAppDatabaseFactory> database_factory) { - CheckNotStarted(); + CheckNotStartedAndDisconnect(); database_factory_ = std::move(database_factory); } void FakeWebAppProvider::SetSyncBridge( std::unique_ptr<WebAppSyncBridge> sync_bridge) { - CheckNotStarted(); + CheckNotStartedAndDisconnect(); sync_bridge_ = std::move(sync_bridge); } void FakeWebAppProvider::SetIconManager( std::unique_ptr<WebAppIconManager> icon_manager) { - CheckNotStarted(); + CheckNotStartedAndDisconnect(); icon_manager_ = std::move(icon_manager); } void FakeWebAppProvider::SetTranslationManager( std::unique_ptr<WebAppTranslationManager> translation_manager) { - CheckNotStarted(); + CheckNotStartedAndDisconnect(); translation_manager_ = std::move(translation_manager); } void FakeWebAppProvider::SetOsIntegrationManager( std::unique_ptr<OsIntegrationManager> os_integration_manager) { - CheckNotStarted(); + CheckNotStartedAndDisconnect(); os_integration_manager_ = std::move(os_integration_manager); } void FakeWebAppProvider::SetInstallManager( std::unique_ptr<WebAppInstallManager> install_manager) { - CheckNotStarted(); + CheckNotStartedAndDisconnect(); install_manager_ = std::move(install_manager); } void FakeWebAppProvider::SetInstallFinalizer( std::unique_ptr<WebAppInstallFinalizer> install_finalizer) { - CheckNotStarted(); + CheckNotStartedAndDisconnect(); install_finalizer_ = std::move(install_finalizer); } void FakeWebAppProvider::SetExternallyManagedAppManager( std::unique_ptr<ExternallyManagedAppManager> externally_managed_app_manager) { - CheckNotStarted(); + CheckNotStartedAndDisconnect(); externally_managed_app_manager_ = std::move(externally_managed_app_manager); } void FakeWebAppProvider::SetWebAppUiManager( std::unique_ptr<WebAppUiManager> ui_manager) { - CheckNotStarted(); + CheckNotStartedAndDisconnect(); ui_manager_ = std::move(ui_manager); } void FakeWebAppProvider::SetWebAppPolicyManager( std::unique_ptr<WebAppPolicyManager> web_app_policy_manager) { - CheckNotStarted(); + CheckNotStartedAndDisconnect(); web_app_policy_manager_ = std::move(web_app_policy_manager); } @@ -164,14 +159,14 @@ void FakeWebAppProvider::SetWebAppRunOnOsLoginManager( std::unique_ptr<WebAppRunOnOsLoginManager> web_app_run_on_os_login_manager) { - CheckNotStarted(); + CheckNotStartedAndDisconnect(); web_app_run_on_os_login_manager_ = std::move(web_app_run_on_os_login_manager); } #endif void FakeWebAppProvider::SetCommandManager( std::unique_ptr<WebAppCommandManager> command_manager) { - CheckNotStarted(); + CheckNotStartedAndDisconnect(); if (command_manager_) command_manager_->Shutdown(); command_manager_ = std::move(command_manager); @@ -179,14 +174,14 @@ void FakeWebAppProvider::SetPreinstalledWebAppManager( std::unique_ptr<PreinstalledWebAppManager> preinstalled_web_app_manager) { - CheckNotStarted(); + CheckNotStartedAndDisconnect(); preinstalled_web_app_manager_ = std::move(preinstalled_web_app_manager); } void FakeWebAppProvider::SetOriginAssociationManager( std::unique_ptr<WebAppOriginAssociationManager> origin_association_manager) { - CheckNotStarted(); + CheckNotStartedAndDisconnect(); origin_association_manager_ = std::move(origin_association_manager); } @@ -234,7 +229,7 @@ } void FakeWebAppProvider::StartWithSubsystems() { - CheckNotStarted(); + CheckNotStartedAndDisconnect(); SetRunSubsystemStartupTasks(true); Start(); } @@ -313,9 +308,10 @@ is_registry_ready_ = false; } -void FakeWebAppProvider::CheckNotStarted() const { +void FakeWebAppProvider::CheckNotStartedAndDisconnect() { CHECK(!started_) << "Attempted to set a WebAppProvider subsystem after " "Start() was called."; + connected_ = false; } void FakeWebAppProvider::StartImpl() {
diff --git a/chrome/browser/web_applications/test/fake_web_app_provider.h b/chrome/browser/web_applications/test/fake_web_app_provider.h index 680336d7..fe1ad29 100644 --- a/chrome/browser/web_applications/test/fake_web_app_provider.h +++ b/chrome/browser/web_applications/test/fake_web_app_provider.h
@@ -138,7 +138,10 @@ syncer::MockModelTypeChangeProcessor& processor() { return mock_processor_; } private: - void CheckNotStarted() const; + // CHECK that `Start()` has not been called on this provider, and also + // disconnect so that clients are forced to call `Start()` before accessing + // any subsystems. + void CheckNotStartedAndDisconnect(); // WebAppProvider: void StartImpl() override;
diff --git a/chrome/build/mac.pgo.txt b/chrome/build/mac.pgo.txt index d976b81..c473194 100644 --- a/chrome/build/mac.pgo.txt +++ b/chrome/build/mac.pgo.txt
@@ -1 +1 @@ -chrome-mac-main-1684151984-2f944564daec115a0e1e5bf000412272c2bbdf40.profdata +chrome-mac-main-1684195193-b4c187bf8e9121bbeb110d40859be58184de6774.profdata
diff --git a/chrome/build/win32.pgo.txt b/chrome/build/win32.pgo.txt index 6b4fc33..22079e8 100644 --- a/chrome/build/win32.pgo.txt +++ b/chrome/build/win32.pgo.txt
@@ -1 +1 @@ -chrome-win32-main-1684173541-15e465c60ff9b71b734ca652291f9758416bfdd4.profdata +chrome-win32-main-1684184393-526da9f3811b104011ec67450d3b02ef142772c3.profdata
diff --git a/chrome/build/win64.pgo.txt b/chrome/build/win64.pgo.txt index 25785a7..5d0b5328 100644 --- a/chrome/build/win64.pgo.txt +++ b/chrome/build/win64.pgo.txt
@@ -1 +1 @@ -chrome-win64-main-1684173541-c14f2fa2bd371f396f14cedb7545a63dc6432396.profdata +chrome-win64-main-1684184393-13c8972f1e5c50e286e979c9beaadb5b256b00fb.profdata
diff --git a/chrome/common/extensions/api/developer_private.idl b/chrome/common/extensions/api/developer_private.idl index cd169a4..169c2008 100644 --- a/chrome/common/extensions/api/developer_private.idl +++ b/chrome/common/extensions/api/developer_private.idl
@@ -665,12 +665,6 @@ ProfileConfigurationUpdate update, optional VoidCallback callback); - // Opens a permissions dialog. - // |extensionId| : The id of the extension to show permissions for. - [supportsPromises] static void showPermissionsDialog( - DOMString extensionId, - optional VoidCallback callback); - // Reloads a given extension. // |extensionId| : The id of the extension to reload. // |options| : Additional configuration parameters.
diff --git a/chrome/renderer/accessibility/read_anything_app_model.cc b/chrome/renderer/accessibility/read_anything_app_model.cc index ce7487f..93287ef 100644 --- a/chrome/renderer/accessibility/read_anything_app_model.cc +++ b/chrome/renderer/accessibility/read_anything_app_model.cc
@@ -436,7 +436,9 @@ case read_anything::mojom::LineSpacing::kTightDeprecated: return 1.0; case read_anything::mojom::LineSpacing::kStandard: - return 1.15; + // This value needs to be at least 1.35 to avoid cutting off descenders + // with the highlight with larger fonts such as Poppins. + return 1.35; case read_anything::mojom::LineSpacing::kLoose: return 1.5; case read_anything::mojom::LineSpacing::kVeryLoose:
diff --git a/chrome/renderer/autofill/autofill_renderer_browsertest.cc b/chrome/renderer/autofill/autofill_renderer_browsertest.cc index 63b45cd..e31afc7 100644 --- a/chrome/renderer/autofill/autofill_renderer_browsertest.cc +++ b/chrome/renderer/autofill/autofill_renderer_browsertest.cc
@@ -50,8 +50,8 @@ class FakeContentAutofillDriver : public mojom::AutofillDriver { public: - FakeContentAutofillDriver() : called_field_change_(false) {} - ~FakeContentAutofillDriver() override {} + FakeContentAutofillDriver() = default; + ~FakeContentAutofillDriver() override = default; void BindReceiver( mojo::PendingAssociatedReceiver<mojom::AutofillDriver> receiver) { @@ -64,6 +64,11 @@ void reset_forms() { return forms_.reset(); } + void WaitForFormsSeen() { + forms_seen_run_loop_->Run(); + forms_seen_run_loop_ = std::make_unique<base::RunLoop>(); + } + private: // mojom::AutofillDriver: void SetFormToBeProbablySubmitted( @@ -76,6 +81,7 @@ // call. if (!forms_) forms_ = std::make_unique<std::vector<FormData>>(updated_forms); + forms_seen_run_loop_->Quit(); } void FormSubmitted(const FormData& form, @@ -126,8 +132,11 @@ void SelectFieldOptionsDidChange(const autofill::FormData& form) override {} + std::unique_ptr<base::RunLoop> forms_seen_run_loop_ = + std::make_unique<base::RunLoop>(); + // Records whether TextFieldDidChange() get called. - bool called_field_change_; + bool called_field_change_ = false; // Records data received via FormSeen() call. std::unique_ptr<std::vector<FormData>> forms_; @@ -181,9 +190,8 @@ " <option>Texas</option>" " </select>" "</form>"); + fake_driver_.WaitForFormsSeen(); - base::RunLoop run_loop; - run_loop.RunUntilIdle(); // Verify that "FormsSeen" sends the expected number of fields. ASSERT_TRUE(fake_driver_.forms()); std::vector<FormData> forms = *(fake_driver_.forms()); @@ -248,7 +256,7 @@ "newForm.appendChild(newEmail);" "document.body.appendChild(newForm);"); - WaitForAutofillDidAddOrRemoveFormRelatedElements(); + fake_driver_.WaitForFormsSeen(); ASSERT_TRUE(fake_driver_.forms()); forms = *(fake_driver_.forms()); ASSERT_EQ(1UL, forms.size()); @@ -295,6 +303,7 @@ base::FilePath(FILE_PATH_LITERAL("autofill_noform_dynamic.html"))); ASSERT_TRUE(base::ReadFileToString(test_path, &html_data)); LoadHTML(html_data.c_str()); + fake_driver_.WaitForFormsSeen(); base::RunLoop run_loop; run_loop.RunUntilIdle(); @@ -308,7 +317,7 @@ ExecuteJavaScriptForTests("AddFields()"); - WaitForAutofillDidAddOrRemoveFormRelatedElements(); + fake_driver_.WaitForFormsSeen(); ASSERT_TRUE(fake_driver_.forms()); forms = *(fake_driver_.forms()); ASSERT_EQ(1UL, forms.size()); @@ -335,6 +344,7 @@ LoadHTML("<form method='post'>" " <input type='text' id='full_name'/>" "</form>"); + fake_driver_.WaitForFormsSeen(); blink::WebInputElement full_name = GetMainFrame() ->GetDocument()
diff --git a/chrome/renderer/autofill/password_generation_agent_browsertest.cc b/chrome/renderer/autofill/password_generation_agent_browsertest.cc index 2f4b877..5a6088f 100644 --- a/chrome/renderer/autofill/password_generation_agent_browsertest.cc +++ b/chrome/renderer/autofill/password_generation_agent_browsertest.cc
@@ -32,6 +32,7 @@ #include "components/autofill/core/common/unique_ids.h" #include "components/password_manager/core/common/password_manager_features.h" #include "content/public/renderer/render_frame.h" +#include "mojo/public/cpp/bindings/associated_receiver_set.h" #include "services/service_manager/public/cpp/interface_provider.h" #include "testing/gtest/include/gtest/gtest.h" #include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h" @@ -66,6 +67,83 @@ return it != form.fields.end() ? &*it : nullptr; } +class FakeContentAutofillDriver : public mojom::AutofillDriver { + public: + FakeContentAutofillDriver() = default; + ~FakeContentAutofillDriver() override = default; + + void BindReceiver( + mojo::PendingAssociatedReceiver<mojom::AutofillDriver> receiver) { + receivers_.Add(this, std::move(receiver)); + } + + void WaitForFormsSeen() { + forms_seen_run_loop_->Run(); + forms_seen_run_loop_ = std::make_unique<base::RunLoop>(); + } + + private: + // mojom::AutofillDriver: + void SetFormToBeProbablySubmitted( + const absl::optional<FormData>& form) override {} + + void FormsSeen(const std::vector<FormData>& updated_forms, + const std::vector<FormRendererId>& removed_forms) override { + forms_seen_run_loop_->Quit(); + } + + void FormSubmitted(const FormData& form, + bool known_success, + mojom::SubmissionSource source) override {} + + void TextFieldDidChange(const FormData& form, + const FormFieldData& field, + const gfx::RectF& bounding_box, + base::TimeTicks timestamp) override {} + + void TextFieldDidScroll(const FormData& form, + const FormFieldData& field, + const gfx::RectF& bounding_box) override {} + + void SelectControlDidChange(const FormData& form, + const FormFieldData& field, + const gfx::RectF& bounding_box) override {} + + void JavaScriptChangedAutofilledValue( + const FormData& form, + const FormFieldData& field, + const std::u16string& old_value) override {} + + void AskForValuesToFill( + const FormData& form, + const FormFieldData& field, + const gfx::RectF& bounding_box, + AutoselectFirstSuggestion autoselect_first_suggestion, + FormElementWasClicked form_element_was_clicked) override {} + + void HidePopup() override {} + + void FocusNoLongerOnForm(bool had_interacted_form) override {} + + void FocusOnFormField(const FormData& form, + const FormFieldData& field, + const gfx::RectF& bounding_box) override {} + + void DidFillAutofillFormData(const FormData& form, + base::TimeTicks timestamp) override {} + + void DidPreviewAutofillFormData() override {} + + void DidEndTextFieldEditing() override {} + + void SelectFieldOptionsDidChange(const autofill::FormData& form) override {} + + std::unique_ptr<base::RunLoop> forms_seen_run_loop_ = + std::make_unique<base::RunLoop>(); + + mojo::AssociatedReceiverSet<mojom::AutofillDriver> receivers_; +}; + } // namespace constexpr char kSigninFormHTML[] = @@ -197,6 +275,7 @@ base::StringPiece attribute, base::StringPiece expected_value); + void BindAutofillDriver(mojo::ScopedInterfaceEndpointHandle handle); void BindPasswordManagerDriver(mojo::ScopedInterfaceEndpointHandle handle); void BindPasswordManagerClient(mojo::ScopedInterfaceEndpointHandle handle); @@ -205,6 +284,7 @@ void(const absl::optional< autofill::password_generation::PasswordGenerationUIData>&)); + FakeContentAutofillDriver fake_autofill_driver_; FakeMojoPasswordManagerDriver fake_driver_; testing::StrictMock<FakePasswordGenerationDriver> fake_pw_client_; }; @@ -215,6 +295,10 @@ blink::AssociatedInterfaceProvider* remote_associated_interfaces = GetMainRenderFrame()->GetRemoteAssociatedInterfaces(); remote_associated_interfaces->OverrideBinderForTesting( + mojom::AutofillDriver::Name_, + base::BindRepeating(&PasswordGenerationAgentTest::BindAutofillDriver, + base::Unretained(this))); + remote_associated_interfaces->OverrideBinderForTesting( mojom::PasswordGenerationDriver::Name_, base::BindRepeating( &PasswordGenerationAgentTest::BindPasswordManagerClient, @@ -360,6 +444,13 @@ EXPECT_EQ(expected_value, actual_value.Ascii()); } +void PasswordGenerationAgentTest::BindAutofillDriver( + mojo::ScopedInterfaceEndpointHandle handle) { + fake_autofill_driver_.BindReceiver( + mojo::PendingAssociatedReceiver<mojom::AutofillDriver>( + std::move(handle))); +} + void PasswordGenerationAgentTest::BindPasswordManagerDriver( mojo::ScopedInterfaceEndpointHandle handle) { fake_driver_.BindReceiver( @@ -802,6 +893,7 @@ TEST_F(PasswordGenerationAgentTest, DynamicFormTest) { LoadHTMLWithUserGesture(kSigninFormHTML); + fake_autofill_driver_.WaitForFormsSeen(); ExecuteJavaScriptForTests( "var form = document.createElement('form');" @@ -821,7 +913,7 @@ "form.appendChild(first_password);" "form.appendChild(second_password);" "document.body.appendChild(form);"); - WaitForAutofillDidAddOrRemoveFormRelatedElements(); + fake_autofill_driver_.WaitForFormsSeen(); // This needs to come after the DOM has been modified. SetFoundFormEligibleForGeneration(
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn index 1e64fd7..48e109f0 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn
@@ -3975,6 +3975,7 @@ "../browser/ash/login/screens/assistant_optin_flow_screen_browsertest.cc", "../browser/ash/login/screens/consolidated_consent_screen_browsertest.cc", "../browser/ash/login/screens/cryptohome_recovery_setup_screen_browsertest.cc", + "../browser/ash/login/screens/drive_pinning_screen_browsertest.cc", "../browser/ash/login/screens/edu_coexistence_login_browsertest.cc", "../browser/ash/login/screens/family_link_notice_browsertest.cc", "../browser/ash/login/screens/fingerprint_setup_browsertest.cc",
diff --git a/chrome/test/base/chrome_render_view_test.cc b/chrome/test/base/chrome_render_view_test.cc index 88763a5b..407a767 100644 --- a/chrome/test/base/chrome_render_view_test.cc +++ b/chrome/test/base/chrome_render_view_test.cc
@@ -52,43 +52,6 @@ using testing::NiceMock; using testing::Return; -namespace { - -// An autofill agent that treats all typing as user gesture. -class MockAutofillAgent : public AutofillAgent { - public: - MockAutofillAgent(RenderFrame* render_frame, - PasswordAutofillAgent* password_autofill_agent, - PasswordGenerationAgent* password_generation_agent, - blink::AssociatedInterfaceRegistry* registry) - : AutofillAgent(render_frame, - password_autofill_agent, - password_generation_agent, - registry) {} - - MockAutofillAgent(const MockAutofillAgent&) = delete; - MockAutofillAgent& operator=(const MockAutofillAgent&) = delete; - ~MockAutofillAgent() override = default; - - void WaitForAutofillDidAddOrRemoveFormRelatedElements() { - DCHECK(run_loop_ == nullptr); - run_loop_ = std::make_unique<base::RunLoop>(); - run_loop_->Run(); - run_loop_.reset(); - } - - private: - void DidAddOrRemoveFormRelatedElementsDynamically() override { - AutofillAgent::DidAddOrRemoveFormRelatedElementsDynamically(); - if (run_loop_) - run_loop_->Quit(); - } - - std::unique_ptr<base::RunLoop> run_loop_; -}; - -} // namespace - ChromeRenderViewTest::ChromeRenderViewTest() = default; ChromeRenderViewTest::~ChromeRenderViewTest() = default; @@ -107,14 +70,14 @@ // RenderFrame doesn't expose its Agent objects, because it has no need to // store them directly (they're stored as RenderFrameObserver*). So just - // create another set. + // create another set. They destroy themselves in OnDestruct(). password_autofill_agent_ = new autofill::TestPasswordAutofillAgent( GetMainRenderFrame(), &associated_interfaces_); password_generation_ = new autofill::PasswordGenerationAgent( GetMainRenderFrame(), password_autofill_agent_, &associated_interfaces_); - autofill_agent_ = new NiceMock<MockAutofillAgent>( - GetMainRenderFrame(), password_autofill_agent_, password_generation_, - &associated_interfaces_); + autofill_agent_ = + new AutofillAgent(GetMainRenderFrame(), password_autofill_agent_, + password_generation_, &associated_interfaces_); } void ChromeRenderViewTest::TearDown() { @@ -161,8 +124,3 @@ client->InitSpellCheck(); #endif } - -void ChromeRenderViewTest::WaitForAutofillDidAddOrRemoveFormRelatedElements() { - static_cast<MockAutofillAgent*>(autofill_agent_) - ->WaitForAutofillDidAddOrRemoveFormRelatedElements(); -}
diff --git a/chrome/test/base/chrome_render_view_test.h b/chrome/test/base/chrome_render_view_test.h index f8f7127..5224e0c 100644 --- a/chrome/test/base/chrome_render_view_test.h +++ b/chrome/test/base/chrome_render_view_test.h
@@ -45,8 +45,6 @@ // Use when overriding CreateContentRendererClient. void InitChromeContentRendererClient(ChromeContentRendererClient* client); - void WaitForAutofillDidAddOrRemoveFormRelatedElements(); - raw_ptr<autofill::TestPasswordAutofillAgent, DanglingUntriaged> password_autofill_agent_ = nullptr; raw_ptr<autofill::PasswordGenerationAgent, DanglingUntriaged>
diff --git a/chrome/test/data/chromeos/app_mode/webstore/downloads/gbcgichpbeeimejckkpgnaighpndpped.pem b/chrome/test/data/chromeos/app_mode/non_kiosk_enabled_app/gbcgichpbeeimejckkpgnaighpndpped.pem similarity index 100% rename from chrome/test/data/chromeos/app_mode/webstore/downloads/gbcgichpbeeimejckkpgnaighpndpped.pem rename to chrome/test/data/chromeos/app_mode/non_kiosk_enabled_app/gbcgichpbeeimejckkpgnaighpndpped.pem
diff --git a/chrome/test/data/chromeos/app_mode/non_kiosk_enabled_app/key.pem b/chrome/test/data/chromeos/app_mode/non_kiosk_enabled_app/key.pem deleted file mode 100644 index 0be8a59..0000000 --- a/chrome/test/data/chromeos/app_mode/non_kiosk_enabled_app/key.pem +++ /dev/null
@@ -1,28 +0,0 @@ ------BEGIN PRIVATE KEY----- -MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDeO4S4dA0HzFQ1 -Ku+FiVtiFdTCEy5V5O10KC71Ct65ROcVW7BZqMFns0sRBtd/1S7OA+EghRQ81tkv -xrASI84MVrvmptIFwAi/qmh31p11iC0yaxwoKdrrkROVEoJ/9XUnRwf1QzbNusL3 -k0YIrKW7wBK8Vc2ze6VK1pav5UI1o15rdcwFIl7Y3cNm0H5fE2A+Ak6ZKXyhFeGJ -uAkc68GPAIGpJfOCcRbMq2uYJube8pksEV2NhrVXwdzS/l0mCgo4yuNpIHycuPsk -qIW+IzWarboJKofSpisYhv+/OFXTYqekkB+dZpYhAIcpzf0CZpHtJ9Z39sB8nT1t -dTm5NxCNAgMBAAECggEAb7mUe/c8JdN/8krnqEbp/mHjWL6z6NLy3hblpKQWXSZa -1s4F1s2UjkIBV0oNRWMz6Lbik6rUBdIt1msZUcVWbbWdOdRcei+VNmbBpp3rA4+2 -yUY4HakNOqjxI1zu5s3MXDbFtXRZNQzTwAv2hZ3mpIFn6e9pPvbGnt1LXJrxsmzD -j6YKxK3fGouROryre3+j9r1vjQ5dgrl+4lB1EevN9C5XP5/UPcAnRXWtprFVPf32 -OVpAdTrhIf96E0GaTk+7ZQ3GX69LwydyetQHEIZpspC36AMGaRSq9WT3JSKN9R2d -MHUrABB3I1i2+3abOr1kZLfVoZla7sHwB1EDW/WnMQKBgQD59AQP4SDjbIiK4Q0O -fJCXtcBqn+bVDBqcq97Ki+O1VZQL37VKoTcR12ZqctTpv0iho+t27K63aG4zI2cf -WRpOZb90LEUYGsyN1/NDNaZDHW+md8M7Fhp3RIy0odNYZDbG2pEIxkABfQX8Bx5s -1v2rm4mBJyYWK3o/2wQWMRyWuwKBgQDjm9NeAu62QMUjlpf4kfXP2TVBKTtctBl/ -JEeEuZ06sBz2uDLANUMONQlusoV04Jw6a3VLXDnPpqiiDNy49+c8XLd+bJTwr+Vb -+IagU3yGovQ2ftOPpjzqiukyFGY9fcA7jjZyFGGLUXbfo38+uz1lOu3I42yGE99n -C5yo+n+VVwKBgQCTpgIUQz9DOGR77S7iRNDA3TsZgPVBGlJKA/iqGvJatn+qd+5G -dG7sWhoEfWqp3TWRThwUdwFKFCUsjhgnW2H/t3jdrhzufT4h99OZ+wIImUXPxuUL -bSYbF+Ip/YGzsBbvZkLQNROwDWNQmf/t+R2Flm4mXbLQ28PuHnkOhtpFawKBgEuo -q70valxo8V8gGwpEsppR0JMFercZIvSRgbiL3sj4a9hTaINd8RlS5fzHGPe+BhCh -Uc8oLAtrkdi0P9a4iUQWaeR7gZL0VWCaH15CAj3bAyTuSbMRhmRMorHD+Cxulaz2 -XADV54rhHIvAlHas1P7GdO53Msbq6jMduAivpCNnAoGBAO85BojRlYcN/dC3kTYS -EdbnIYgz8S13CnV60cutpeJyg7Dbh+Q1LGinyARaQEu1T0yKx5IY0NmWLNUxTN6/ -KB78KRK9878+tjqJV8mS9TQXVpzITi/Bx4LKVQMYNv59iNZn18cKMkDDLaaPI3az -XTSiQghXNR0kNWy1Vg7zzMHe ------END PRIVATE KEY-----
diff --git a/chrome/test/data/chromeos/app_mode/non_kiosk_enabled_app/src/app_main.html b/chrome/test/data/chromeos/app_mode/non_kiosk_enabled_app/src/app_main.html new file mode 100644 index 0000000..3e7e14a --- /dev/null +++ b/chrome/test/data/chromeos/app_mode/non_kiosk_enabled_app/src/app_main.html
@@ -0,0 +1,11 @@ +<html> +<!-- +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. +--> +<body> +<h1>Test Non Kiosk App!!!</h1> +<p>This app does not have `kiosk_enabled` and should not run in Kiosk.</p> +</body> +<hmtl> \ No newline at end of file
diff --git a/chrome/test/data/chromeos/app_mode/non_kiosk_enabled_app/src/icon-128.png b/chrome/test/data/chromeos/app_mode/non_kiosk_enabled_app/src/icon-128.png new file mode 100644 index 0000000..5c226f3 --- /dev/null +++ b/chrome/test/data/chromeos/app_mode/non_kiosk_enabled_app/src/icon-128.png Binary files differ
diff --git a/chrome/test/data/chromeos/app_mode/non_kiosk_enabled_app/src/icon-16.png b/chrome/test/data/chromeos/app_mode/non_kiosk_enabled_app/src/icon-16.png new file mode 100644 index 0000000..c7510d38 --- /dev/null +++ b/chrome/test/data/chromeos/app_mode/non_kiosk_enabled_app/src/icon-16.png Binary files differ
diff --git a/chrome/test/data/chromeos/app_mode/non_kiosk_enabled_app/src/main.js b/chrome/test/data/chromeos/app_mode/non_kiosk_enabled_app/src/main.js index 613fca80..ece042d 100644 --- a/chrome/test/data/chromeos/app_mode/non_kiosk_enabled_app/src/main.js +++ b/chrome/test/data/chromeos/app_mode/non_kiosk_enabled_app/src/main.js
@@ -2,6 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -chrome.app.runtime.onLaunched.addListener(function(launchData) { - chrome.test.sendMessage('launchRequested'); +// This is an example of chrome app where `kiosk_enabled` is not set in +// manifest. Chrome app without `kiosk_enabled` should not be launched in the +// kiosk session. +chrome.app.runtime.onLaunched.addListener(function (launchData) { + chrome.app.window.create('app_main.html'); });
diff --git a/chrome/test/data/chromeos/app_mode/non_kiosk_enabled_app/src/manifest.json b/chrome/test/data/chromeos/app_mode/non_kiosk_enabled_app/src/manifest.json index 1234c755..b445564 100644 --- a/chrome/test/data/chromeos/app_mode/non_kiosk_enabled_app/src/manifest.json +++ b/chrome/test/data/chromeos/app_mode/non_kiosk_enabled_app/src/manifest.json
@@ -1,14 +1,14 @@ { - "manifest_version": 2, + "manifest_version": 3, "name": "Test Non Kiosk App", "version": "1.0.0", + "icons": { + "128": "icon-128.png", + "16": "icon-16.png" + }, "app": { "background": { "scripts": ["main.js"] } - }, - "permissions": [ - "power", - "webview" - ] + } }
diff --git a/chrome/test/data/chromeos/app_mode/webstore/downloads/gbcgichpbeeimejckkpgnaighpndpped.crx b/chrome/test/data/chromeos/app_mode/webstore/downloads/gbcgichpbeeimejckkpgnaighpndpped.crx index b2a4bdbc..d2b021d 100644 --- a/chrome/test/data/chromeos/app_mode/webstore/downloads/gbcgichpbeeimejckkpgnaighpndpped.crx +++ b/chrome/test/data/chromeos/app_mode/webstore/downloads/gbcgichpbeeimejckkpgnaighpndpped.crx Binary files differ
diff --git a/chrome/test/data/chromeos/app_mode/webstore/downloads/gbcgichpbeeimejckkpgnaighpndpped.crx.mock-http-headers b/chrome/test/data/chromeos/app_mode/webstore/downloads/gbcgichpbeeimejckkpgnaighpndpped.crx.mock-http-headers deleted file mode 100644 index 707bb1f..0000000 --- a/chrome/test/data/chromeos/app_mode/webstore/downloads/gbcgichpbeeimejckkpgnaighpndpped.crx.mock-http-headers +++ /dev/null
@@ -1,2 +0,0 @@ -HTTP/1.1 200 OK -Content-Type: application/x-chrome-extension
diff --git a/chrome/test/data/chromeos/app_mode/webstore/inlineinstall/detail/gbcgichpbeeimejckkpgnaighpndpped b/chrome/test/data/chromeos/app_mode/webstore/inlineinstall/detail/gbcgichpbeeimejckkpgnaighpndpped index caa5b2c..2f6ad8a 100644 --- a/chrome/test/data/chromeos/app_mode/webstore/inlineinstall/detail/gbcgichpbeeimejckkpgnaighpndpped +++ b/chrome/test/data/chromeos/app_mode/webstore/inlineinstall/detail/gbcgichpbeeimejckkpgnaighpndpped
@@ -4,8 +4,8 @@ "average_rating": 1.0, "rating_count": 999, "verified_site": "chrome.google.com", - "localized_name": "Name of App 1", - "localized_description": "Description of App 1", - "icon_url": "webstore/inlineinstall/detail/app_1_green16x16.png", - "manifest":"{ \"manifest_version\": 2, \"name\": \"Test Non Kiosk App\", \"version\": \"1.0.0\", \"app\": { \"background\": { \"scripts\": [\"main.js\"] } }, \"permissions\": [ \"power\", \"webview\" ] }" + "localized_name": "Test Non Kiosk App", + "localized_description": "Description of Test Non Kiosk App", + "icon_url": "non_kiosk_enabled_app/src/icon-16.png", + "manifest":"{ \"manifest_version\": 3, \"name\": \"Test Non Kiosk App\", \"version\": \"1.0.0\", \"app\": { \"background\": { \"scripts\": [\"main.js\"] } } }" }
diff --git a/chrome/test/data/page_load_metrics/drupal_page.html b/chrome/test/data/page_load_metrics/drupal_page.html new file mode 100644 index 0000000..d21e1bb --- /dev/null +++ b/chrome/test/data/page_load_metrics/drupal_page.html
@@ -0,0 +1,6 @@ +<!DOCTYPE html> +<head> + <meta name="generator" content="Drupal 7 CMS"> +</head> +<body> +</body>
diff --git a/chrome/test/data/page_load_metrics/joomla_page.html b/chrome/test/data/page_load_metrics/joomla_page.html new file mode 100644 index 0000000..544c64b --- /dev/null +++ b/chrome/test/data/page_load_metrics/joomla_page.html
@@ -0,0 +1,6 @@ +<!DOCTYPE html> +<head> + <meta name="generator" content="Joomla!"> +</head> +<body> +</body>
diff --git a/chrome/test/data/page_load_metrics/shopify_page.html b/chrome/test/data/page_load_metrics/shopify_page.html new file mode 100644 index 0000000..1d2ece88 --- /dev/null +++ b/chrome/test/data/page_load_metrics/shopify_page.html
@@ -0,0 +1,6 @@ +<!DOCTYPE html> +<head> + <script> + window.Shopify = {}; + </script> +</head>
diff --git a/chrome/test/data/page_load_metrics/squarespace_page.html b/chrome/test/data/page_load_metrics/squarespace_page.html new file mode 100644 index 0000000..57930611 --- /dev/null +++ b/chrome/test/data/page_load_metrics/squarespace_page.html
@@ -0,0 +1,6 @@ +<!DOCTYPE html> +<head> + <script> + window.Squarespace = {}; + </script> +</head>
diff --git a/chrome/test/data/page_load_metrics/wix_page.html b/chrome/test/data/page_load_metrics/wix_page.html new file mode 100644 index 0000000..4aae6c3d --- /dev/null +++ b/chrome/test/data/page_load_metrics/wix_page.html
@@ -0,0 +1,6 @@ +<!DOCTYPE html> +<head> + <meta name="generator" content="Wix Website Builder"> +</head> +<body> +</body>
diff --git a/chrome/test/data/page_load_metrics/wordpress_page.html b/chrome/test/data/page_load_metrics/wordpress_page.html new file mode 100644 index 0000000..25faba35 --- /dev/null +++ b/chrome/test/data/page_load_metrics/wordpress_page.html
@@ -0,0 +1,6 @@ +<!DOCTYPE html> +<head> + <meta name="generator" content="WordPress 6.2"> +</head> +<body> +</body>
diff --git a/chrome/test/data/webui/chai_assert.ts b/chrome/test/data/webui/chai_assert.ts index 4113306..f543af23 100644 --- a/chrome/test/data/webui/chai_assert.ts +++ b/chrome/test/data/webui/chai_assert.ts
@@ -138,4 +138,12 @@ export function assertStringContains(expected: string, contains: string) { chai.expect(expected).to.have.string(contains); -} \ No newline at end of file +} + +/** + * @param value The value to check if strictly equals null (value === null). + * @param message Optional error message. + */ +export function assertNull(value: any, message?: string) { + chai.assert.isNull(value, message); +}
diff --git a/chrome/test/data/webui/chromeos/ash_common/i18n_behavior_test.js b/chrome/test/data/webui/chromeos/ash_common/i18n_behavior_test.js index b0af9d7..b419f4a 100644 --- a/chrome/test/data/webui/chromeos/ash_common/i18n_behavior_test.js +++ b/chrome/test/data/webui/chromeos/ash_common/i18n_behavior_test.js
@@ -42,7 +42,8 @@ test('i18n advanced', function() { assertEquals( - allowedByDefault, I18nBehavior.i18nAdvanced('allowedByDefault')); + allowedByDefault, + I18nBehavior.i18nAdvanced('allowedByDefault').toString()); I18nBehavior.i18nAdvanced('customAttr', {attrs: ['is']}); I18nBehavior.i18nAdvanced('optionalTag', {tags: ['img']}); });
diff --git a/chrome/test/data/webui/chromeos/manage_mirrorsync/BUILD.gn b/chrome/test/data/webui/chromeos/manage_mirrorsync/BUILD.gn index d09076f..bd1ee7dc 100644 --- a/chrome/test/data/webui/chromeos/manage_mirrorsync/BUILD.gn +++ b/chrome/test/data/webui/chromeos/manage_mirrorsync/BUILD.gn
@@ -21,6 +21,7 @@ deps = [ "../..:build_ts", "//chrome/browser/resources/chromeos/manage_mirrorsync:build_ts", + "//ui/webui/resources/js:build_ts", ] }
diff --git a/chrome/test/data/webui/chromeos/manage_mirrorsync/manage_mirrorsync_app_test.ts b/chrome/test/data/webui/chromeos/manage_mirrorsync/manage_mirrorsync_app_test.ts index 23baeae5..4f1a110f 100644 --- a/chrome/test/data/webui/chromeos/manage_mirrorsync/manage_mirrorsync_app_test.ts +++ b/chrome/test/data/webui/chromeos/manage_mirrorsync/manage_mirrorsync_app_test.ts
@@ -8,6 +8,7 @@ import {BrowserProxy} from 'chrome://manage-mirrorsync/browser_proxy.js'; import {FolderSelector} from 'chrome://manage-mirrorsync/components/folder_selector.js'; import {PageHandlerRemote} from 'chrome://manage-mirrorsync/manage_mirrorsync.mojom-webui.js'; +import {assert} from 'chrome://resources/js/assert_ts.js'; import {assertArrayEquals, assertNotEquals, assertTrue} from 'chrome://webui-test/chai_assert.js'; import {TestBrowserProxy} from 'chrome://webui-test/test_browser_proxy.js'; import {TestMock} from 'chrome://webui-test/test_mock.js'; @@ -81,7 +82,8 @@ * <manage-mirrorsync> components. */ setup(() => { - appHolder.innerHTML = ''; + assert(window.trustedTypes); + appHolder.innerHTML = window.trustedTypes.emptyHTML; testProxy = new ManageMirrorSyncTestBrowserProxy(); BrowserProxy.setInstance(testProxy); manageMirrorSyncApp = document.createElement('manage-mirrorsync'); @@ -93,7 +95,7 @@ * the <manage-mirrorsync> component. */ teardown(() => { - appHolder.innerHTML = ''; + appHolder.innerHTML = window.trustedTypes!.emptyHTML; }); /**
diff --git a/chrome/test/data/webui/cr_components/chromeos/bluetooth/bluetooth_pairing_device_selection_page_test.js b/chrome/test/data/webui/cr_components/chromeos/bluetooth/bluetooth_pairing_device_selection_page_test.js index 7cb8d1c..af9482b 100644 --- a/chrome/test/data/webui/cr_components/chromeos/bluetooth/bluetooth_pairing_device_selection_page_test.js +++ b/chrome/test/data/webui/cr_components/chromeos/bluetooth/bluetooth_pairing_device_selection_page_test.js
@@ -73,8 +73,9 @@ deviceSelectionPage.shadowRoot.querySelector('localized-link'); assertTrue(!!getLearnMoreLink()); assertEquals( - getLearnMoreLink().localizedString, - deviceSelectionPage.i18nAdvanced('bluetoothPairingLearnMoreLabel')); + getLearnMoreLink().localizedString.toString(), + deviceSelectionPage.i18nAdvanced('bluetoothPairingLearnMoreLabel') + .toString()); const getLearnMoreDescription = () => deviceSelectionPage.shadowRoot.querySelector('#learn-more-description');
diff --git a/chrome/test/data/webui/settings/chromeos/os_settings_menu/os_settings_menu_test.ts b/chrome/test/data/webui/settings/chromeos/os_settings_menu/os_settings_menu_test.ts index 10f22c2f..2d3f11f 100644 --- a/chrome/test/data/webui/settings/chromeos/os_settings_menu/os_settings_menu_test.ts +++ b/chrome/test/data/webui/settings/chromeos/os_settings_menu/os_settings_menu_test.ts
@@ -7,7 +7,7 @@ import {createPageAvailabilityForTesting, OsSettingsMenuElement, OsSettingsRoutes, Route, Router, routes} from 'chrome://os-settings/chromeos/os_settings.js'; import {IronIconElement} from 'chrome://resources/polymer/v3_0/iron-icon/iron-icon.js'; import {flush} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; -import {assertEquals, assertFalse, assertNotEquals, assertTrue} from 'chrome://webui-test/chai_assert.js'; +import {assertEquals, assertFalse, assertNotEquals, assertNull, assertTrue} from 'chrome://webui-test/chai_assert.js'; /** @fileoverview Runs tests for the OS settings menu. */ @@ -158,12 +158,10 @@ suite('<os-settings-menu> page availability', () => { let settingsMenu: OsSettingsMenuElement; - const pageAvailability = createPageAvailabilityForTesting(); - const pageNames = Object.keys(pageAvailability); setup(() => { settingsMenu = document.createElement('os-settings-menu'); - settingsMenu.pageAvailability = pageAvailability; + settingsMenu.pageAvailability = createPageAvailabilityForTesting(); document.body.appendChild(settingsMenu); flush(); }); @@ -172,32 +170,53 @@ settingsMenu.remove(); }); - for (const pageName of pageNames) { - [true, false].forEach((available) => { - suite( - `When ${pageName} page is ${available ? 'available' : 'unavailable'}`, - () => { - setup(() => { - settingsMenu.pageAvailability = { - ...settingsMenu.pageAvailability, - [pageName]: available, - }; - flush(); - }); + function queryMenuItemByPageName(pageName: string): HTMLElement|null { + return settingsMenu.shadowRoot!.querySelector<HTMLElement>( + `a.item[data-page-name='${pageName}']`); + } - test( - `respective menu item should ${ - available ? 'exist' : 'not exist'}`, - () => { - const menuItem = settingsMenu.shadowRoot!.querySelector( - `a.item[data-page-name='${pageName}']`); - if (available) { - assertTrue(!!menuItem, 'Menu item should exist.'); - } else { - assertEquals(null, menuItem, 'Menu item should not exist.'); - } - }); - }); + const pages = [ + // Basic pages + 'internet', + 'bluetooth', + 'multidevice', + 'kerberos', + 'osPeople', + 'device', + 'personalization', + 'osSearch', + 'osPrivacy', + 'apps', + 'osAccessibility', + // Advanced section pages + 'dateTime', + 'osLanguages', + 'files', + 'osPrinting', + 'crostini', + 'osReset', + ]; + for (const pageName of pages) { + test(`${pageName} menu item is controlled by pageAvailability`, () => { + // Make page available + settingsMenu.pageAvailability = { + ...settingsMenu.pageAvailability, + [pageName]: true, + }; + flush(); + + let menuItem = queryMenuItemByPageName(pageName); + assertTrue(!!menuItem, `Menu item for ${pageName} should be stamped.`); + + // Make page unavailable + settingsMenu.pageAvailability = { + ...settingsMenu.pageAvailability, + [pageName]: false, + }; + flush(); + + menuItem = queryMenuItemByPageName(pageName); + assertNull(menuItem, `Menu item for ${pageName} should not be stamped.`); }); } });
diff --git a/chrome/updater/app/server/win/server.cc b/chrome/updater/app/server/win/server.cc index f6a6bb8..497190d 100644 --- a/chrome/updater/app/server/win/server.cc +++ b/chrome/updater/app/server/win/server.cc
@@ -190,19 +190,21 @@ })); } - // Delete the GoogleUpdate tasks. + // Delete the GoogleUpdate tasks. This is a best-effort operation. scoped_refptr<TaskScheduler> task_scheduler( TaskScheduler::CreateInstance(scope, /*use_task_subfolders=*/false)); - task_scheduler->ForEachTaskWithPrefix( - IsSystemInstall(scope) ? kLegacyTaskNamePrefixSystem - : kLegacyTaskNamePrefixUser, - base::BindRepeating( - [](scoped_refptr<TaskScheduler> task_scheduler, - const std::wstring& task_name) { - VLOG(2) << __func__ << ": Deleting legacy task: " << task_name; - task_scheduler->DeleteTask(task_name.c_str()); - }, - task_scheduler)); + if (task_scheduler) { + task_scheduler->ForEachTaskWithPrefix( + IsSystemInstall(scope) ? kLegacyTaskNamePrefixSystem + : kLegacyTaskNamePrefixUser, + base::BindRepeating( + [](scoped_refptr<TaskScheduler> task_scheduler, + const std::wstring& task_name) { + VLOG(2) << __func__ << ": Deleting legacy task: " << task_name; + task_scheduler->DeleteTask(task_name.c_str()); + }, + task_scheduler)); + } // Keep only `GoogleUpdate.exe` and nothing else under `\Google\Update`. const absl::optional<base::FilePath> google_update_exe =
diff --git a/chrome/updater/win/setup/setup_util.cc b/chrome/updater/win/setup/setup_util.cc index 469372fe..423031eb 100644 --- a/chrome/updater/win/setup/setup_util.cc +++ b/chrome/updater/win/setup/setup_util.cc
@@ -154,20 +154,23 @@ std::wstring GetTaskName(UpdaterScope scope) { scoped_refptr<TaskScheduler> task_scheduler = TaskScheduler::CreateInstance(scope); - CHECK(task_scheduler); - return task_scheduler->FindFirstTaskName(GetTaskNamePrefix(scope)); + return task_scheduler + ? task_scheduler->FindFirstTaskName(GetTaskNamePrefix(scope)) + : std::wstring(); } void UnregisterWakeTask(UpdaterScope scope) { - auto task_scheduler = TaskScheduler::CreateInstance(scope); - CHECK(task_scheduler); - + scoped_refptr<TaskScheduler> task_scheduler = + TaskScheduler::CreateInstance(scope); + if (!task_scheduler) { + LOG(ERROR) << "Can't create a TaskScheduler instance."; + return; + } const std::wstring task_name = GetTaskName(scope); if (task_name.empty()) { LOG(ERROR) << "Empty task name during uninstall."; return; } - task_scheduler->DeleteTask(task_name.c_str()); VLOG(1) << "UnregisterWakeTask succeeded: " << task_name; } @@ -501,7 +504,10 @@ bool RegisterWakeTaskWorkItem::DoImpl() { scoped_refptr<TaskScheduler> task_scheduler = TaskScheduler::CreateInstance(scope_); - CHECK(task_scheduler); + if (!task_scheduler) { + LOG(ERROR) << "Can't create a TaskScheduler instance."; + return false; + } // Task already exists. if (!GetTaskName(scope_).empty()) { @@ -533,9 +539,11 @@ if (task_name_.empty()) { return; } - - auto task_scheduler = TaskScheduler::CreateInstance(scope_); - CHECK(task_scheduler); + scoped_refptr<TaskScheduler> task_scheduler = + TaskScheduler::CreateInstance(scope_); + if (!task_scheduler) { + return; + } task_scheduler->DeleteTask(task_name_.c_str()); }
diff --git a/chrome/updater/win/task_scheduler.cc b/chrome/updater/win/task_scheduler.cc index 468566f..b79ada9e 100644 --- a/chrome/updater/win/task_scheduler.cc +++ b/chrome/updater/win/task_scheduler.cc
@@ -83,7 +83,6 @@ bool GetCurrentUser(base::win::ScopedBstr* user_name) { CHECK(user_name); ULONG user_name_size = 256; - // Paranoia... ;-) CHECK_EQ(sizeof(OLECHAR), sizeof(WCHAR)); if (!::GetUserNameExW( NameSamCompatible, @@ -118,13 +117,27 @@ // A task scheduler class uses the V2 API of the task scheduler. class TaskSchedulerV2 final : public TaskScheduler { + private: + // Forces creation of instances through the factory function because the + // constructor of `TaskSchedulerV2` is not accessible. + struct ConstructorTag {}; + public: - TaskSchedulerV2(UpdaterScope scope, bool use_task_subfolders) + static scoped_refptr<TaskScheduler> CreateInstance(UpdaterScope scope, + bool use_task_subfolders) { + auto instance = base::MakeRefCounted<TaskSchedulerV2>( + ConstructorTag(), scope, use_task_subfolders); + return instance->task_service_ ? instance : nullptr; + } + + TaskSchedulerV2(ConstructorTag /*tag*/, + UpdaterScope scope, + bool use_task_subfolders) : scope_(scope), use_task_subfolders_(use_task_subfolders) { task_service_ = GetTaskService(); - CHECK(task_service_); + VLOG_IF(2, !task_service_) << "Can't get the task service."; task_folder_ = GetUpdaterTaskFolder(); - CHECK(task_folder_); + VLOG_IF(2, !task_folder_) << "Can't get the task scheduler folder."; } TaskSchedulerV2(const TaskSchedulerV2&) = delete; TaskSchedulerV2& operator=(const TaskSchedulerV2&) = delete; @@ -693,19 +706,20 @@ Microsoft::WRL::ComPtr<IRegisteredTask> registered_task; base::win::ScopedVariant user(user_name.Get()); - CHECK(task_folder_); - hr = task_folder_->RegisterTaskDefinition( - base::win::ScopedBstr(task_name).Get(), task.Get(), - TASK_CREATE_OR_UPDATE, - *user.AsInput(), // Not really input, but API expect non-const. - base::win::ScopedVariant::kEmptyVariant, - is_system ? TASK_LOGON_SERVICE_ACCOUNT : TASK_LOGON_INTERACTIVE_TOKEN, - base::win::ScopedVariant::kEmptyVariant, ®istered_task); - if (FAILED(hr)) { - LOG(ERROR) << "RegisterTaskDefinition failed: " << std::hex << hr << ": " - << logging::SystemErrorCodeToString(hr) - << ": Task XML: " << task_xml.Get(); - return false; + if (task_folder_) { + hr = task_folder_->RegisterTaskDefinition( + base::win::ScopedBstr(task_name).Get(), task.Get(), + TASK_CREATE_OR_UPDATE, + *user.AsInput(), // Not really input, but API expect non-const. + base::win::ScopedVariant::kEmptyVariant, + is_system ? TASK_LOGON_SERVICE_ACCOUNT : TASK_LOGON_INTERACTIVE_TOKEN, + base::win::ScopedVariant::kEmptyVariant, ®istered_task); + if (FAILED(hr)) { + LOG(ERROR) << "RegisterTaskDefinition failed: " << std::hex << hr + << ": " << logging::SystemErrorCodeToString(hr) + << ": Task XML: " << task_xml.Get(); + return false; + } } CHECK(IsTaskRegistered(task_name)); @@ -883,6 +897,9 @@ // Return the task with |task_name| and false if not found. |task| can be null // when only interested in task's existence. bool GetTask(const wchar_t* task_name, IRegisteredTask** task) { + if (!task_folder_) { + return false; + } for (TaskIterator it(task_folder_.Get()); !it.done(); it.Next()) { if (::_wcsicmp(it.name().c_str(), task_name) == 0) { if (task) { @@ -1343,7 +1360,7 @@ scoped_refptr<TaskScheduler> TaskScheduler::CreateInstance( UpdaterScope scope, bool use_task_subfolders) { - return base::MakeRefCounted<TaskSchedulerV2>(scope, use_task_subfolders); + return TaskSchedulerV2::CreateInstance(scope, use_task_subfolders); } TaskScheduler::TaskScheduler() = default;
diff --git a/chromecast/base/device_capabilities_impl_unittest.cc b/chromecast/base/device_capabilities_impl_unittest.cc index 5a3b095..c01d2f7 100644 --- a/chromecast/base/device_capabilities_impl_unittest.cc +++ b/chromecast/base/device_capabilities_impl_unittest.cc
@@ -183,10 +183,7 @@ bool JsonStringEquals(const std::string& json, const std::string& key, const base::Value& value) { - base::Value dict_value(base::Value::Type::DICT); - dict_value.SetKey(key, value.Clone()); - std::string dict_json; - return base::JSONWriter::Write(dict_value, &dict_json) && dict_json == json; + return base::WriteJson(base::Value::Dict().Set(key, value.Clone())) == json; } // The function runs through the set of basic operations of DeviceCapabilities.
diff --git a/chromeos/ash/components/login/auth/BUILD.gn b/chromeos/ash/components/login/auth/BUILD.gn index e9205f06..1bf0bf6 100644 --- a/chromeos/ash/components/login/auth/BUILD.gn +++ b/chromeos/ash/components/login/auth/BUILD.gn
@@ -30,10 +30,12 @@ "//chromeos/ash/components/metrics", "//chromeos/dbus/constants", "//components/account_id", + "//components/crash/core/common:crash_key", "//components/device_event_log", "//components/metrics", "//components/password_manager/core/browser:password_hash_data", "//components/prefs", + "//components/session_manager/core:core", "//components/user_manager", "//components/version_info:channel", "//crypto", @@ -141,6 +143,7 @@ "//chromeos/ash/components/login/auth", "//chromeos/ash/components/osauth/impl", "//components/account_id", + "//components/crash/core/common:crash_key", "//components/password_manager/core/browser:password_hash_data", "//components/prefs", "//components/prefs:test_support",
diff --git a/chromeos/ash/components/login/auth/DEPS b/chromeos/ash/components/login/auth/DEPS index ad8b209..8a92d52 100644 --- a/chromeos/ash/components/login/auth/DEPS +++ b/chromeos/ash/components/login/auth/DEPS
@@ -10,9 +10,11 @@ "+chromeos/ash/components/metrics", "+chromeos/dbus", "+components/account_id", + "+components/crash/core/common", "+components/device_event_log", "+components/password_manager", "+components/prefs", + "+components/session_manager/core", "+components/user_manager", "+crypto", "+google_apis",
diff --git a/chromeos/ash/components/login/auth/auth_events_recorder.cc b/chromeos/ash/components/login/auth/auth_events_recorder.cc index db2cca9..b367d7d2 100644 --- a/chromeos/ash/components/login/auth/auth_events_recorder.cc +++ b/chromeos/ash/components/login/auth/auth_events_recorder.cc
@@ -6,6 +6,7 @@ #include <vector> +#include "base/check_is_test.h" #include "base/containers/contains.h" #include "base/memory/ptr_util.h" #include "base/metrics/histogram_functions.h" @@ -17,10 +18,14 @@ #include "chromeos/ash/components/cryptohome/auth_factor.h" #include "chromeos/ash/components/login/auth/public/auth_failure.h" #include "chromeos/ash/components/login/auth/public/user_context.h" +#include "components/crash/core/common/crash_key.h" namespace ash { namespace { +constexpr int kMaxSessionStateCrashKeyLength = 32; +constexpr char kSessionStateCrashKey[] = "session-state"; + using AuthenticationSurface = AuthEventsRecorder::AuthenticationSurface; using AuthenticationOutcome = AuthEventsRecorder::AuthenticationOutcome; using CryptohomeRecoveryResult = AuthEventsRecorder::CryptohomeRecoveryResult; @@ -181,6 +186,29 @@ {kRecoveryDurationHistogramPrefix, GetRecoveryOutcomeSuffix(result)}); } +// Values of the `kSessionStateCrashKey`. The length should not exceed +// `kMaxSessionStateCrashKeyLength`. +std::string GetSessionStateCrashKeyValue(session_manager::SessionState state) { + switch (state) { + case session_manager::SessionState::ACTIVE: + return "active"; + case session_manager::SessionState::LOGGED_IN_NOT_ACTIVE: + return "logged_in_not_active"; + case session_manager::SessionState::LOCKED: + return "locked"; + case session_manager::SessionState::LOGIN_PRIMARY: + return "login_primary"; + case session_manager::SessionState::LOGIN_SECONDARY: + return "login_secondary"; + case session_manager::SessionState::OOBE: + return "oobe"; + case session_manager::SessionState::RMA: + return "rma"; + case session_manager::SessionState::UNKNOWN: + return "unknown"; + } +} + } // namespace // static @@ -189,6 +217,15 @@ AuthEventsRecorder::AuthEventsRecorder() { DCHECK(!instance_); instance_ = this; + // Note: SessionManager may be nullptr in tests. + if (!session_manager::SessionManager::Get()) { + LOG(WARNING) << "Failed to observe SessionManager"; + CHECK_IS_TEST(); + return; + } + session_observation_.Observe(session_manager::SessionManager::Get()); + // Set the initial value. + OnSessionStateChanged(); } AuthEventsRecorder::~AuthEventsRecorder() { @@ -287,6 +324,14 @@ base::UmaHistogramEnumeration(kRecoveryResultHistogramName, result); } +void AuthEventsRecorder::OnSessionStateChanged() { + session_manager::SessionState session_state = + session_manager::SessionManager::Get()->session_state(); + static crash_reporter::CrashKeyString<kMaxSessionStateCrashKeyLength> key( + kSessionStateCrashKey); + key.Set(GetSessionStateCrashKeyValue(session_state)); +} + void AuthEventsRecorder::MaybeUpdateUserLoginType(bool is_new_user, bool is_login_offline, bool is_ephemeral) {
diff --git a/chromeos/ash/components/login/auth/auth_events_recorder.h b/chromeos/ash/components/login/auth/auth_events_recorder.h index c63dc26d..b783abb 100644 --- a/chromeos/ash/components/login/auth/auth_events_recorder.h +++ b/chromeos/ash/components/login/auth/auth_events_recorder.h
@@ -7,10 +7,13 @@ #include <vector> +#include "base/scoped_observation.h" #include "base/time/time.h" #include "chromeos/ash/components/cryptohome/auth_factor.h" #include "chromeos/ash/components/login/auth/public/auth_failure.h" #include "chromeos/ash/components/login/auth/public/user_context.h" +#include "components/session_manager/core/session_manager.h" +#include "components/session_manager/core/session_manager_observer.h" namespace ash { @@ -18,7 +21,8 @@ // User actions and behaviors are recorded by AuthEventsRecorder in multiple // stages of the login flow. It will set the appropriate crash keys, and send // UMA metrics. -class COMPONENT_EXPORT(CHROMEOS_ASH_COMPONENTS_LOGIN_AUTH) AuthEventsRecorder { +class COMPONENT_EXPORT(CHROMEOS_ASH_COMPONENTS_LOGIN_AUTH) AuthEventsRecorder + : public session_manager::SessionManagerObserver { public: // Enum used for UMA. Do NOT reorder or remove entry. Don't forget to // update LoginFlowUserLoginType enum in enums.xml when adding new entries. @@ -68,7 +72,7 @@ AuthEventsRecorder& operator=(const AuthEventsRecorder&) = delete; AuthEventsRecorder(AuthEventsRecorder&&) = delete; AuthEventsRecorder& operator=(AuthEventsRecorder&&) = delete; - ~AuthEventsRecorder(); + ~AuthEventsRecorder() override; static AuthEventsRecorder* Get(); @@ -127,6 +131,9 @@ return knowledge_factor_auth_failure_count_; } + // session_manager::SessionManagerObserver: + void OnSessionStateChanged() override; + private: friend class ChromeBrowserMainPartsAsh; @@ -149,9 +156,12 @@ void Reset(); - int knowledge_factor_auth_failure_count_ = 0; + base::ScopedObservation<session_manager::SessionManager, + session_manager::SessionManagerObserver> + session_observation_{this}; - // All values should be reset to nullopt in `Reset()`; + // All values should be reset in `Reset()`; + int knowledge_factor_auth_failure_count_ = 0; absl::optional<int> user_count_; absl::optional<bool> show_users_on_signin_; absl::optional<UserLoginType> user_login_type_;
diff --git a/chromeos/ash/components/login/auth/auth_events_recorder_unittest.cc b/chromeos/ash/components/login/auth/auth_events_recorder_unittest.cc index d2e64a8..9d1c4f9 100644 --- a/chromeos/ash/components/login/auth/auth_events_recorder_unittest.cc +++ b/chromeos/ash/components/login/auth/auth_events_recorder_unittest.cc
@@ -9,19 +9,31 @@ #include "base/test/metrics/histogram_tester.h" #include "base/time/time.h" #include "chromeos/ash/components/cryptohome/auth_factor.h" +#include "components/crash/core/common/crash_key.h" #include "testing/gtest/include/gtest/gtest.h" namespace ash { +namespace { + +std::string GetSessionStateCrashKeyValue() { + return crash_reporter::GetCrashKeyValue("session-state"); +} + +} // namespace + class AuthEventsRecorderTest : public ::testing::Test { public: AuthEventsRecorderTest() { + crash_reporter::InitializeCrashKeysForTesting(); + session_manager_ = std::make_unique<session_manager::SessionManager>(); recorder_ = AuthEventsRecorder::CreateForTesting(); } ~AuthEventsRecorderTest() override { recorder_.reset(); } protected: + std::unique_ptr<session_manager::SessionManager> session_manager_; std::unique_ptr<ash::AuthEventsRecorder> recorder_; }; @@ -247,4 +259,19 @@ "Login.CryptohomeRecoveryDuration.Failure", two_seconds, 1); } +TEST_F(AuthEventsRecorderTest, SessionStateCrashKey) { + session_manager_->SetSessionState( + session_manager::SessionState::LOGIN_PRIMARY); + EXPECT_EQ(GetSessionStateCrashKeyValue(), "login_primary"); + + session_manager_->SetSessionState(session_manager::SessionState::LOCKED); + EXPECT_EQ(GetSessionStateCrashKeyValue(), "locked"); + + session_manager_->SetSessionState(session_manager::SessionState::ACTIVE); + EXPECT_EQ(GetSessionStateCrashKeyValue(), "active"); + + session_manager_->SetSessionState(session_manager::SessionState::UNKNOWN); + EXPECT_EQ(GetSessionStateCrashKeyValue(), "unknown"); +} + } // namespace ash
diff --git a/chromeos/ash/components/proximity_auth/smart_lock_metrics_recorder.cc b/chromeos/ash/components/proximity_auth/smart_lock_metrics_recorder.cc index 8a546e9..c58b9e2 100644 --- a/chromeos/ash/components/proximity_auth/smart_lock_metrics_recorder.cc +++ b/chromeos/ash/components/proximity_auth/smart_lock_metrics_recorder.cc
@@ -11,20 +11,6 @@ SmartLockMetricsRecorder::~SmartLockMetricsRecorder() {} // static -void SmartLockMetricsRecorder::RecordSmartLockUnlockAuthMethodChoice( - SmartLockAuthMethodChoice auth_method_choice) { - UMA_HISTOGRAM_ENUMERATION("SmartLock.AuthMethodChoice.Unlock", - auth_method_choice); -} - -// static -void SmartLockMetricsRecorder::RecordSmartLockSignInAuthMethodChoice( - SmartLockAuthMethodChoice auth_method_choice) { - UMA_HISTOGRAM_ENUMERATION("SmartLock.AuthMethodChoice.SignIn", - auth_method_choice); -} - -// static void SmartLockMetricsRecorder::RecordAuthResultUnlockSuccess(bool success) { RecordAuthResultSuccess(success); UMA_HISTOGRAM_BOOLEAN("SmartLock.AuthResult.Unlock", success); @@ -46,13 +32,6 @@ } // static -void SmartLockMetricsRecorder::RecordAuthMethodChoiceSignInPasswordState( - SmartLockAuthEventPasswordState password_state) { - UMA_HISTOGRAM_ENUMERATION("SmartLock.AuthMethodChoice.SignIn.PasswordState", - password_state); -} - -// static void SmartLockMetricsRecorder::RecordAuthResultSuccess(bool success) { UMA_HISTOGRAM_BOOLEAN("SmartLock.AuthResult", success); }
diff --git a/chromeos/ash/components/proximity_auth/smart_lock_metrics_recorder.h b/chromeos/ash/components/proximity_auth/smart_lock_metrics_recorder.h index 72c87a9..d34b87b 100644 --- a/chromeos/ash/components/proximity_auth/smart_lock_metrics_recorder.h +++ b/chromeos/ash/components/proximity_auth/smart_lock_metrics_recorder.h
@@ -14,47 +14,23 @@ // //tools/metrics/histograms/enums.xml, and should always reflect it (do not // change one without changing the other). Entries should be never modified // or deleted. Only additions possible. - enum class SmartLockGetRemoteStatusResultFailureReason { - kTimedOutBluetoothDisabled = 0, - kTimedOutCouldNotEstablishAuthenticatedChannel = 1, - kTimedOutDidNotReceiveRemoteStatusUpdate = 2, - kUserEnteredPasswordWhileBluetoothDisabled = 3, - kUserEnteredPasswordWhileConnecting = 4, - kAuthenticatedChannelDropped = 5, - kMaxValue = kAuthenticatedChannelDropped - }; - - // This enum is tied directly to a UMA enum defined in - // //tools/metrics/histograms/enums.xml, and should always reflect it (do not - // change one without changing the other). Entries should be never modified - // or deleted. Only additions possible. enum class SmartLockAuthResultFailureReason { kUnlockNotAllowed = 0, - kDeprecatedAlreadyAttemptingAuth = 1, + // kDeprecatedAlreadyAttemptingAuth = 1, (obsolete) kEmptyUserAccount = 2, kInvalidAccoundId = 3, kAuthAttemptCannotStart = 4, kNoPendingOrActiveHost = 5, kAuthenticatedChannelDropped = 6, kFailedToSendUnlockRequest = 7, - kFailedToDecryptSignInChallenge = 8, + // kFailedToDecryptSignInChallenge = 8, (obsolete) kFailedtoNotifyHostDeviceThatSmartLockWasUsed = 9, kAuthAttemptTimedOut = 10, kUnlockEventSentButNotAttemptingAuth = 11, kUnlockRequestSentButNotAttemptingAuth = 12, - kLoginDisplayHostDoesNotExist = 13, - kUserControllerSignInFailure = 14, - kMaxValue = kUserControllerSignInFailure - }; - - // This enum is tied directly to a UMA enum defined in - // //tools/metrics/histograms/enums.xml, and should always reflect it (do not - // change one without changing the other). Entries should be never modified - // or deleted. Only additions possible. - enum class SmartLockAuthMethodChoice { - kSmartLock = 0, - kOther = 1, - kMaxValue = kOther + // kLoginDisplayHostDoesNotExist = 13, (obsolete) + // kUserControllerSignInFailure = 14, (obsolete) + kMaxValue = kUnlockRequestSentButNotAttemptingAuth }; // This enum is tied directly to a UMA enum defined in @@ -63,9 +39,9 @@ // or deleted. Only additions possible. enum class SmartLockAuthEventPasswordState { kUnknownState = 0, - kNoPairing = 1, - kPairingChanged = 2, - kUserHardlock = 3, + // kNoPairing = 1, (obsolete) + // kPairingChanged = 2, (obsolete) + // kUserHardlock = 3, (obsolete) kServiceNotActive = 4, kNoBluetooth = 5, kBluetoothConnecting = 6, @@ -74,31 +50,23 @@ kPhoneLocked = 9, kRssiTooLow = 10, kAuthenticatedPhone = 11, - kLoginFailed = 12, - kPairingAdded = 13, - kNoScreenlockStateHandler = 14, + // kLoginFailed = 12, (obsolete) + // kPairingAdded = 13, (obsolete) + // kNoScreenlockStateHandler = 14, (obsolete) kPhoneLockedAndRssiTooLow = 15, // kForcedReauth = 16, (obsolete) - kLoginWithSmartLockDisabled = 17, + // kLoginWithSmartLockDisabled = 17, (obsolete) kPhoneNotLockable = 18, kPrimaryUserAbsent = 19, kMaxValue = kPrimaryUserAbsent }; - // TODO(crbug.com/1171972): Deprecate the AuthMethodChoice metric. - static void RecordSmartLockUnlockAuthMethodChoice( - SmartLockAuthMethodChoice auth_method_choice); - static void RecordSmartLockSignInAuthMethodChoice( - SmartLockAuthMethodChoice auth_method_choice); - static void RecordAuthResultUnlockSuccess(bool success = true); static void RecordAuthResultUnlockFailure( SmartLockAuthResultFailureReason failure_reason); static void RecordAuthMethodChoiceUnlockPasswordState( SmartLockAuthEventPasswordState password_state); - static void RecordAuthMethodChoiceSignInPasswordState( - SmartLockAuthEventPasswordState password_state); private: static void RecordAuthResultSuccess(bool success);
diff --git a/chromeos/ash/components/proximity_auth/unlock_manager_impl.cc b/chromeos/ash/components/proximity_auth/unlock_manager_impl.cc index ffa79e4..6d946932 100644 --- a/chromeos/ash/components/proximity_auth/unlock_manager_impl.cc +++ b/chromeos/ash/components/proximity_auth/unlock_manager_impl.cc
@@ -379,9 +379,6 @@ if (decrypted_bytes.empty()) { PA_LOG(WARNING) << "Failed to decrypt sign-in challenge."; - FinalizeAuthAttempt( - SmartLockMetricsRecorder::SmartLockAuthResultFailureReason:: - kFailedToDecryptSignInChallenge); } else { sign_in_secret_ = std::make_unique<std::string>(decrypted_bytes); if (GetMessenger())
diff --git a/components/autofill/content/renderer/autofill_agent.cc b/components/autofill/content/renderer/autofill_agent.cc index 5968a140..763f4c3 100644 --- a/components/autofill/content/renderer/autofill_agent.cc +++ b/components/autofill/content/renderer/autofill_agent.cc
@@ -339,7 +339,7 @@ } void AutofillAgent::DidDispatchDOMContentLoadedEvent() { - ProcessForms(); + ProcessFormsUnthrottled(/*callback=*/{}); } void AutofillAgent::DidChangeScrollOffset() { @@ -1053,40 +1053,37 @@ } void AutofillAgent::TriggerReparse() { - if (!reparse_timer_.IsRunning()) { - reparse_timer_.Start(FROM_HERE, base::Milliseconds(100), - base::BindOnce(&AutofillAgent::ProcessForms, - weak_ptr_factory_.GetWeakPtr())); - } + ProcessForms(process_forms_reparse_timer_, /*callback=*/{}); } void AutofillAgent::TriggerReparseWithResponse( base::OnceCallback<void(bool)> callback) { - if (reparse_with_response_timer_.IsRunning()) { - std::move(callback).Run(/*success=*/false); - return; - } - reparse_with_response_timer_.Start( - FROM_HERE, base::Milliseconds(100), - base::BindOnce( - [](base::WeakPtr<AutofillAgent> self, - base::OnceCallback<void(bool)> callback) { - if (!self) { - return; - } - self->ProcessForms(); - std::move(callback).Run(/*success=*/true); - }, - weak_ptr_factory_.GetWeakPtr(), std::move(callback))); + ProcessForms(process_forms_reparse_with_response_timer_, std::move(callback)); } std::vector<blink::WebAutofillClient::FormIssue> AutofillAgent::ProccessFormsAndReturnIssues() { - ProcessForms(); + // TODO(crbug.com/1399414,crbug.com/1444566): Throttle this call if possible. + ProcessFormsUnthrottled(/*callback=*/{}); return {}; } -void AutofillAgent::ProcessForms() { +void AutofillAgent::ProcessForms(base::OneShotTimer& timer, + base::OnceCallback<void(bool)> callback) { + static constexpr base::TimeDelta kThrottle = base::Milliseconds(100); + if (timer.IsRunning()) { + if (!callback.is_null()) { + std::move(callback).Run(/*success=*/false); + } + return; + } + timer.Start(FROM_HERE, kThrottle, + base::BindOnce(&AutofillAgent::ProcessFormsUnthrottled, + base::Unretained(this), std::move(callback))); +} + +void AutofillAgent::ProcessFormsUnthrottled( + base::OnceCallback<void(bool)> callback) { if (!form_cache_) { return; } @@ -1098,6 +1095,9 @@ std::move(cache.removed_forms).extract()); } } + if (!callback.is_null()) { + std::move(callback).Run(/*success=*/true); + } } void AutofillAgent::HidePopup() { @@ -1119,8 +1119,15 @@ void AutofillAgent::DidAddOrRemoveFormRelatedElementsDynamically() { // If the control flow is here than the document was at least loaded. The // whole page doesn't have to be loaded. - ProcessForms(); - password_autofill_agent_->OnDynamicFormsSeen(); + ProcessForms( + process_forms_after_dynamic_change_timer_, + base::BindOnce( + [](PasswordAutofillAgent* password_autofill_agent, bool success) { + if (success) { + password_autofill_agent->OnDynamicFormsSeen(); + } + }, + base::Unretained(password_autofill_agent_))); } void AutofillAgent::DidCompleteFocusChangeInFrame() {
diff --git a/components/autofill/content/renderer/autofill_agent.h b/components/autofill/content/renderer/autofill_agent.h index f233f48e..97f6fb5 100644 --- a/components/autofill/content/renderer/autofill_agent.h +++ b/components/autofill/content/renderer/autofill_agent.h
@@ -12,6 +12,7 @@ #include "base/compiler_specific.h" #include "base/gtest_prod_util.h" #include "base/memory/weak_ptr.h" +#include "base/time/time.h" #include "base/timer/timer.h" #include "components/autofill/content/common/mojom/autofill_agent.mojom.h" #include "components/autofill/content/common/mojom/autofill_driver.mojom.h" @@ -326,8 +327,20 @@ void DoPreviewFieldWithValue(const std::u16string& value, blink::WebInputElement& node); - // Notifies browser of new fillable forms in |render_frame|. - void ProcessForms(); + // Notifies the AutofillDriver in the browser process of new and/or removed + // forms, modulo throttling. + // + // Throttling means that the actual work -- that is, extracting the forms and + // invoking AutofillDriver::FormsSeen() -- is delayed by (at least) 100 ms. + // All subsequent calls within the next (at least) 100 ms return early. + // + // Calls `callback(true)` asynchronously after the timer is completed. + // Otherwise, calls `callback(false)` immediately. + void ProcessForms(base::OneShotTimer& timer, + base::OnceCallback<void(bool)> callback); + + // Extracts new and/or removed forms and triggers AutofillDriver::FormsSeen(). + void ProcessFormsUnthrottled(base::OnceCallback<void(bool)> callback); // Hides any currently showing Autofill popup. void HidePopup(); @@ -440,8 +453,10 @@ // Timers for throttling handling of frequent events. base::OneShotTimer select_option_change_batch_timer_; base::OneShotTimer datalist_option_change_batch_timer_; - base::OneShotTimer reparse_timer_; - base::OneShotTimer reparse_with_response_timer_; + // TODO(crbug.com/1444566): Merge some or all of these timers? + base::OneShotTimer process_forms_after_dynamic_change_timer_; + base::OneShotTimer process_forms_reparse_timer_; + base::OneShotTimer process_forms_reparse_with_response_timer_; // Will be set when accessibility mode changes, depending on what the new mode // is.
diff --git a/components/autofill/content/renderer/autofill_agent_browsertest.cc b/components/autofill/content/renderer/autofill_agent_browsertest.cc index 0b6a63a2..9df2e46 100644 --- a/components/autofill/content/renderer/autofill_agent_browsertest.cc +++ b/components/autofill/content/renderer/autofill_agent_browsertest.cc
@@ -28,6 +28,7 @@ #include "testing/gtest/include/gtest/gtest.h" #include "third_party/abseil-cpp/absl/types/variant.h" #include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h" +#include "third_party/blink/public/common/features.h" using ::testing::_; using ::testing::AllOf; @@ -41,6 +42,9 @@ namespace { +// The throttling amount of ProcessForms(). +constexpr base::TimeDelta kFormsSeenThrottle = base::Milliseconds(100); + class MockAutofillDriver : public mojom::AutofillDriver { public: void BindPendingReceiver(mojo::ScopedInterfaceEndpointHandle handle) { @@ -184,6 +188,13 @@ RenderViewTest::TearDown(); } + // AutofillDriver::FormsSeen() is throttled indirectly because some callsites + // of AutofillAgent::ProcessForms() are throttled. This function blocks until + // FormsSeen() has happened. + void WaitForFormsSeen() { + task_environment_.FastForwardBy(kFormsSeenThrottle * 3 / 2); + } + AutofillAgentTestApi test_api() { return AutofillAgentTestApi(autofill_agent_.get()); } @@ -202,7 +213,10 @@ class AutofillAgentTestWithFeatures : public AutofillAgentTest { public: AutofillAgentTestWithFeatures() { - scoped_features_.InitAndEnableFeature(features::kAutofillAcrossIframes); + scoped_features_.InitWithFeatures( + {features::kAutofillAcrossIframes, + blink::features::kAutofillDetectRemovedFormControls}, + {}); } private: @@ -212,11 +226,13 @@ TEST_F(AutofillAgentTestWithFeatures, FormsSeen_Empty) { EXPECT_CALL(autofill_driver_, FormsSeen).Times(0); LoadHTML(R"(<body> </body>)"); + WaitForFormsSeen(); } TEST_F(AutofillAgentTestWithFeatures, FormsSeen_NoEmpty) { EXPECT_CALL(autofill_driver_, FormsSeen).Times(0); LoadHTML(R"(<body> <form></form> </body>)"); + WaitForFormsSeen(); } TEST_F(AutofillAgentTestWithFeatures, FormsSeen_NewFormUnowned) { @@ -225,6 +241,7 @@ HasNumChildFrames(0)), SizeIs(0))); LoadHTML(R"(<body> <input> </body>)"); + WaitForFormsSeen(); } TEST_F(AutofillAgentTestWithFeatures, FormsSeen_NewForm) { @@ -233,6 +250,7 @@ HasNumChildFrames(0)), SizeIs(0))); LoadHTML(R"(<body> <form><input></form> </body>)"); + WaitForFormsSeen(); } TEST_F(AutofillAgentTestWithFeatures, FormsSeen_NewIframe) { @@ -241,6 +259,7 @@ HasNumChildFrames(1)), SizeIs(0))); LoadHTML(R"(<body> <form><iframe></iframe></form> </body>)"); + WaitForFormsSeen(); } TEST_F(AutofillAgentTestWithFeatures, FormsSeen_UpdatedForm) { @@ -250,6 +269,7 @@ HasNumChildFrames(0)), SizeIs(0))); LoadHTML(R"(<body> <form><input></form> </body>)"); + WaitForFormsSeen(); } { EXPECT_CALL(autofill_driver_, @@ -258,37 +278,40 @@ SizeIs(0))); ExecuteJavaScriptForTests( R"(document.forms[0].appendChild(document.createElement('input'));)"); - content::RunAllTasksUntilIdle(); - // Called explicitly because the event is throttled. - test_api().DidAddOrRemoveFormRelatedElementsDynamically(); + WaitForFormsSeen(); } } -TEST_F(AutofillAgentTestWithFeatures, FormsSeen_RemovedForm) { +TEST_F(AutofillAgentTestWithFeatures, FormsSeen_RemovedInput) { { EXPECT_CALL(autofill_driver_, FormsSeen(SizeIs(1), SizeIs(0))); LoadHTML(R"(<body> <form><input></form> </body>)"); + WaitForFormsSeen(); } { EXPECT_CALL(autofill_driver_, FormsSeen(SizeIs(0), HasSingleElementWhich(IsFormId(1)))); - ExecuteJavaScriptForTests(R"(document.forms[0].remove();)"); - content::RunAllTasksUntilIdle(); - // Called explicitly because the event is throttled. - test_api().DidAddOrRemoveFormRelatedElementsDynamically(); + ExecuteJavaScriptForTests(R"(document.forms[0].elements[0].remove();)"); + WaitForFormsSeen(); } } TEST_F(AutofillAgentTestWithFeatures, TriggerReparseWithResponse) { + EXPECT_CALL(autofill_driver_, FormsSeen); + LoadHTML(R"(<body> <input> </body>)"); + WaitForFormsSeen(); base::MockOnceCallback<void(bool)> mock_callback; EXPECT_CALL(mock_callback, Run).Times(0); autofill_agent_->TriggerReparseWithResponse(mock_callback.Get()); - task_environment_.FastForwardBy(base::Milliseconds(50)); + task_environment_.FastForwardBy(kFormsSeenThrottle / 2); EXPECT_CALL(mock_callback, Run(true)); - task_environment_.FastForwardBy(base::Milliseconds(50)); + task_environment_.FastForwardBy(kFormsSeenThrottle / 2); } TEST_F(AutofillAgentTestWithFeatures, TriggerReparseWithResponse_CalledTwice) { + EXPECT_CALL(autofill_driver_, FormsSeen); + LoadHTML(R"(<body> <input> </body>)"); + WaitForFormsSeen(); base::MockOnceCallback<void(bool)> mock_callback; autofill_agent_->TriggerReparseWithResponse(mock_callback.Get()); EXPECT_CALL(mock_callback, Run(false));
diff --git a/components/exo/text_input.cc b/components/exo/text_input.cc index 24322f0..14b72e7ad 100644 --- a/components/exo/text_input.cc +++ b/components/exo/text_input.cc
@@ -244,24 +244,43 @@ } void TextInput::InsertChar(const ui::KeyEvent& event) { - // TODO(b/240618514): Short term workaround to accept temporary fix in IME - // for urgent production breakage. - // We should come up with the proper solution of what to be done. - if (event.key_code() == ui::VKEY_UNKNOWN) { - // On some specific cases, IME use InsertChar, even if there's no clear - // key mapping from key_code. Then, use InsertText(). - InsertText(std::u16string(1u, event.GetCharacter()), - InsertTextCursorBehavior::kMoveCursorAfterText); - return; + // TODO(crbug.com/1401822): remove the old behavior, once the fix is + // stabilized. + if (!base::FeatureList::IsEnabled(ash::features::kExoConsumedByImeByFlag)) { + // TODO(b/240618514): Short term workaround to accept temporary fix in IME + // for urgent production breakage. + // We should come up with the proper solution of what to be done. + if (event.key_code() == ui::VKEY_UNKNOWN) { + // On some specific cases, IME use InsertChar, even if there's no clear + // key mapping from key_code. Then, use InsertText(). + InsertText(std::u16string(1u, event.GetCharacter()), + InsertTextCursorBehavior::kMoveCursorAfterText); + return; + } + // TextInput is currently used only for Lacros, and this is the + // short term workaround not to duplicate KeyEvent there. + // This is what we do for ARC, which is being removed in the near + // future. + // TODO(fukino): Get rid of this, too, when the wl_keyboard::key + // and text_input::keysym events are handled properly in Lacros. + if (ConsumedByIme(surface_->window(), event)) { + delegate_->SendKey(event); + } + } else { + if (ConsumedByIme(surface_->window(), event)) { + // TODO(b/240618514): Short term workaround to accept temporary fix in IME + // for urgent production breakage. + // We should come up with the proper solution of what to be done. + if (event.code() == ui::DomCode::NONE) { + // On some specific cases, IME use InsertChar, even if there's no clear + // key mapping from key_code. Then, use InsertText(). + InsertText(std::u16string(1u, event.GetCharacter()), + InsertTextCursorBehavior::kMoveCursorAfterText); + } else { + delegate_->SendKey(event); + } + } } - // TextInput is currently used only for Lacros, and this is the - // short term workaround not to duplicate KeyEvent there. - // This is what we do for ARC, which is being removed in the near - // future. - // TODO(fukino): Get rid of this, too, when the wl_keyboard::key - // and text_input::keysym events are handled properly in Lacros. - if (ConsumedByIme(surface_->window(), event)) - delegate_->SendKey(event); } ui::TextInputType TextInput::GetTextInputType() const {
diff --git a/components/exo/text_input_unittest.cc b/components/exo/text_input_unittest.cc index 63a2401..03436b9 100644 --- a/components/exo/text_input_unittest.cc +++ b/components/exo/text_input_unittest.cc
@@ -614,13 +614,40 @@ ui::TextInputClient::FOCUS_REASON_OTHER); char16_t ch = 'x'; - ui::KeyEvent ev(ch, ui::VKEY_X, ui::DomCode::NONE, 0); + ui::KeyEvent ev(ch, ui::VKEY_X, ui::DomCode::US_X, 0); ui::SetKeyboardImeFlags(&ev, ui::kPropertyKeyboardImeHandledFlag); EXPECT_CALL(*delegate(), SendKey(testing::Ref(ev))).Times(1); text_input()->InsertChar(ev); } +TEST_P(TextInputTestWithConsumedByIme, InsertCharNumpadEqual) { + text_input()->Activate(seat(), surface(), + ui::TextInputClient::FOCUS_REASON_OTHER); + + // NUMPAD_EQUAL is set key_code to VKEY_UNKNOWN, but code t- NUMPAD_EQUAL. + ui::KeyEvent ev(ui::ET_KEY_PRESSED, ui::VKEY_UNKNOWN, + ui::DomCode::NUMPAD_EQUAL, /*flags=*/0, /*key=*/0, + base::TimeTicks()); + ev.set_character(u'='); + + if (GetParam()) { + // If ConsumedByIme fix is enabled, InsertChar should ignore it (because + // it is not consumed by IME), and exo::Keyboard is expected to handle the + // case. + EXPECT_CALL(*delegate(), SendKey(_)).Times(0); + EXPECT_CALL(*delegate(), Commit(_)).Times(0); + } else { + // If ConsumedByIme fix is disabled, the event is (wrongly) interpreted + // as consumed by IME, so exo::Keyboard does not send key events. + // Instead, InsertChar here is expected to send the event via Commit(). + EXPECT_CALL(*delegate(), SendKey(_)).Times(0); + EXPECT_CALL(*delegate(), Commit(base::StringPiece16(u"="))).Times(1); + } + text_input()->InsertChar(ev); + testing::Mock::VerifyAndClearExpectations(delegate()); +} + TEST_F(TextInputTest, SurroundingText) { TestingInputMethodObserver observer(GetInputMethod());
diff --git a/components/feature_engagement/public/feature_configurations.cc b/components/feature_engagement/public/feature_configurations.cc index ae141f3..48905a71 100644 --- a/components/feature_engagement/public/feature_configurations.cc +++ b/components/feature_engagement/public/feature_configurations.cc
@@ -299,6 +299,20 @@ return config; } + if (kIPHBackNavigationMenuFeature.name == feature->name) { + absl::optional<FeatureConfig> config = FeatureConfig(); + config->valid = true; + config->availability = Comparator(ANY, 0); + config->session_rate = Comparator(EQUAL, 0); + config->trigger = EventConfig("back_navigation_menu_iph_is_triggered", + Comparator(LESS_THAN_OR_EQUAL, 4), 360, 360); + config->used = EventConfig("back_navigation_menu_is_opened", + Comparator(EQUAL, 0), 7, 360); + config->snooze_params.snooze_interval = 7; + config->snooze_params.max_limit = 4; + return config; + } + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS)
diff --git a/components/gwp_asan/client/sampling_partitionalloc_shims_unittest.cc b/components/gwp_asan/client/sampling_partitionalloc_shims_unittest.cc index 4b6b5ee..233868be 100644 --- a/components/gwp_asan/client/sampling_partitionalloc_shims_unittest.cc +++ b/components/gwp_asan/client/sampling_partitionalloc_shims_unittest.cc
@@ -53,13 +53,7 @@ constexpr int kFailure = 1; constexpr partition_alloc::PartitionOptions kAllocatorOptions = { - partition_alloc::PartitionOptions::AlignedAlloc::kDisallowed, - partition_alloc::PartitionOptions::ThreadCache::kDisabled, - partition_alloc::PartitionOptions::Quarantine::kDisallowed, - partition_alloc::PartitionOptions::Cookie::kAllowed, - partition_alloc::PartitionOptions::BackupRefPtr::kDisabled, - partition_alloc::PartitionOptions::BackupRefPtrZapping::kDisabled, - partition_alloc::PartitionOptions::UseConfigurablePool::kNo, + .cookie = partition_alloc::PartitionOptions::Cookie::kAllowed, }; static void HandleOOM(size_t unused_size) {
diff --git a/components/heap_profiling/multi_process/test_driver.cc b/components/heap_profiling/multi_process/test_driver.cc index 42c4c786f..966832d 100644 --- a/components/heap_profiling/multi_process/test_driver.cc +++ b/components/heap_profiling/multi_process/test_driver.cc
@@ -407,14 +407,8 @@ : wait_for_ui_thread_(base::WaitableEvent::ResetPolicy::AUTOMATIC, base::WaitableEvent::InitialState::NOT_SIGNALED) { partition_alloc::PartitionAllocGlobalInit(HandleOOM); - partition_allocator_.init({ - partition_alloc::PartitionOptions::AlignedAlloc::kDisallowed, - partition_alloc::PartitionOptions::ThreadCache::kDisabled, - partition_alloc::PartitionOptions::Quarantine::kDisallowed, - partition_alloc::PartitionOptions::Cookie::kAllowed, - partition_alloc::PartitionOptions::BackupRefPtr::kDisabled, - partition_alloc::PartitionOptions::BackupRefPtrZapping::kDisabled, - partition_alloc::PartitionOptions::UseConfigurablePool::kNo, + partition_allocator_.init(partition_alloc::PartitionOptions{ + .cookie = partition_alloc::PartitionOptions::Cookie::kAllowed, }); } TestDriver::~TestDriver() {
diff --git a/components/omnibox/browser/autocomplete_controller.cc b/components/omnibox/browser/autocomplete_controller.cc index 4e23115..4995f37 100644 --- a/components/omnibox/browser/autocomplete_controller.cc +++ b/components/omnibox/browser/autocomplete_controller.cc
@@ -1040,11 +1040,14 @@ } } +#if BUILDFLAG(BUILD_WITH_TFLITE_LIB) RunUrlScoringModel(base::BindOnce( &AutocompleteController::SortCullAndAnnotateResult, weak_ptr_factory_.GetWeakPtr(), last_default_match, last_default_associated_keyword, force_notify_default_match_changed, default_match_to_preserve)); +#endif // BUILDFLAG(BUILD_WITH_TFLITE_LIB) + return; } @@ -1540,6 +1543,7 @@ return true; } +#if BUILDFLAG(BUILD_WITH_TFLITE_LIB) void AutocompleteController::RunUrlScoringModel( base::OnceClosure completion_callback) { TRACE_EVENT0("omnibox", "AutocompleteController::RunUrlScoringModel"); @@ -1574,6 +1578,7 @@ } } } +#endif // BUILDFLAG(BUILD_WITH_TFLITE_LIB) void AutocompleteController::CancelUrlScoringModel() { // Try to cancel any pending requests to the scoring model and invalidate the @@ -1582,6 +1587,7 @@ weak_ptr_factory_.InvalidateWeakPtrs(); } +#if BUILDFLAG(BUILD_WITH_TFLITE_LIB) void AutocompleteController::OnUrlScoringModelDone( const base::ElapsedTimer elapsed_timer, base::OnceClosure completion_callback, @@ -1649,3 +1655,4 @@ } std::move(completion_callback).Run(); } +#endif // BUILDFLAG(BUILD_WITH_TFLITE_LIB)
diff --git a/components/omnibox/browser/autocomplete_controller.h b/components/omnibox/browser/autocomplete_controller.h index 780a5c1..00a3b166 100644 --- a/components/omnibox/browser/autocomplete_controller.h +++ b/components/omnibox/browser/autocomplete_controller.h
@@ -363,17 +363,20 @@ // only runs on Lacros and the @tabs scope. bool ShouldRunProvider(AutocompleteProvider* provider) const; +#if BUILDFLAG(BUILD_WITH_TFLITE_LIB) // Runs the async scoring model for all the eligible matches in // `results_.matches_` and bypasses the ineligible matches. Passes // `completion_callback` to `OnUrlScoringModelDone()` callback which is called // once the model is done for all the eligible matches, whether successfully // or not, and all the ineligible matches are bypassed. void RunUrlScoringModel(base::OnceClosure completion_callback); +#endif // BUILDFLAG(BUILD_WITH_TFLITE_LIB) // Tries to cancel any pending requests to the scoring model and prevents // `OnUrlScoringModelDone()` and its completion callback from being called. void CancelUrlScoringModel(); +#if BUILDFLAG(BUILD_WITH_TFLITE_LIB) // Called when the async scoring model is done running for all the eligible // matches in `results_.matches_` and all the ineligible matches are bypassed. // Redistributes the existing relevance scores to the matches based on the @@ -385,6 +388,7 @@ base::OnceClosure completion_callback, std::vector<std::tuple<absl::optional<float>, size_t, GURL>> outputs_and_match_info); +#endif // BUILDFLAG(BUILD_WITH_TFLITE_LIB) base::ObserverList<Observer> observers_;
diff --git a/components/omnibox/browser/omnibox_controller.cc b/components/omnibox/browser/omnibox_controller.cc index 503845ba..5c38ebe7 100644 --- a/components/omnibox/browser/omnibox_controller.cc +++ b/components/omnibox/browser/omnibox_controller.cc
@@ -21,15 +21,13 @@ OmniboxEditModelDelegate* edit_model_delegate, std::unique_ptr<OmniboxClient> client) : client_(std::move(client)), + edit_model_(std::make_unique<OmniboxEditModel>( + /*omnibox_controller=*/this, + view, + edit_model_delegate)), autocomplete_controller_(std::make_unique<AutocompleteController>( client_->CreateAutocompleteProviderClient(), AutocompleteClassifier::DefaultOmniboxProviders())) { - edit_model_ = std::make_unique<OmniboxEditModel>(view, edit_model_delegate, - client_.get()); - // TODO(crbug.com/1404748): Pass a reference to `OmniboxController` to the - // constructor of `OmniboxEditModel` so this is no longer needed. - edit_model_->set_omnibox_controller(this); - // Directly observe omnibox's `AutocompleteController` instance - i.e., when // `view` is provided in the constructor. In the case of realbox - i.e., when // `view` is not provided in the constructor - `RealboxHandler` indirectly @@ -47,6 +45,12 @@ OmniboxController::~OmniboxController() = default; +void OmniboxController::set_edit_model( + std::unique_ptr<OmniboxEditModel> edit_model) { + CHECK_EQ(this, edit_model->omnibox_controller()); + edit_model_ = std::move(edit_model); +} + void OmniboxController::StartAutocomplete( const AutocompleteInput& input) const { TRACE_EVENT0("omnibox", "OmniboxController::StartAutocomplete"); @@ -104,14 +108,6 @@ weak_ptr_factory_.GetWeakPtr())); } -void OmniboxController::SetEditModel( - std::unique_ptr<OmniboxEditModel> edit_model) { - edit_model_ = std::move(edit_model); - // TODO(crbug.com/1404748): Pass a reference to `OmniboxController` to the - // constructor of `OmniboxEditModel` so this is no longer needed. - edit_model_->set_omnibox_controller(this); -} - void OmniboxController::InvalidateCurrentMatch() { current_match_ = AutocompleteMatch(); }
diff --git a/components/omnibox/browser/omnibox_controller.h b/components/omnibox/browser/omnibox_controller.h index 6242f5da..9b3bf32c 100644 --- a/components/omnibox/browser/omnibox_controller.h +++ b/components/omnibox/browser/omnibox_controller.h
@@ -37,14 +37,14 @@ void OnResultChanged(AutocompleteController* controller, bool default_match_changed) override; - OmniboxEditModel* edit_model() const { return edit_model_.get(); } + OmniboxClient* client() { return client_.get(); } - void SetEditModel(std::unique_ptr<OmniboxEditModel> edit_model); + OmniboxEditModel* edit_model() const { return edit_model_.get(); } + void set_edit_model(std::unique_ptr<OmniboxEditModel> edit_model); AutocompleteController* autocomplete_controller() { return autocomplete_controller_.get(); } - void set_autocomplete_controller( std::unique_ptr<AutocompleteController> autocomplete_controller) { autocomplete_controller_ = std::move(autocomplete_controller);
diff --git a/components/omnibox/browser/omnibox_edit_model.cc b/components/omnibox/browser/omnibox_edit_model.cc index 7b6c13d..938f41f 100644 --- a/components/omnibox/browser/omnibox_edit_model.cc +++ b/components/omnibox/browser/omnibox_edit_model.cc
@@ -257,12 +257,12 @@ // OmniboxEditModel ----------------------------------------------------------- OmniboxEditModel::OmniboxEditModel( + OmniboxController* omnibox_controller, OmniboxView* view, - OmniboxEditModelDelegate* edit_model_delegate, - OmniboxClient* client) - : view_(view), + OmniboxEditModelDelegate* edit_model_delegate) + : omnibox_controller_(omnibox_controller), + view_(view), edit_model_delegate_(edit_model_delegate), - client_(client), user_input_in_progress_(false), user_input_since_focus_(true), focus_resulted_in_navigation_(false), @@ -391,7 +391,7 @@ std::unique_ptr<AutocompleteProviderClient> new_provider_client; if (!use_existing_autocomplete_client_) { // Create a new client. - new_provider_client = client_->CreateAutocompleteProviderClient(); + new_provider_client = client()->CreateAutocompleteProviderClient(); provider_client = new_provider_client.get(); } else { // Use the existing client. @@ -484,8 +484,8 @@ const AutocompleteMatch& current_match = user_input_in_progress_ ? CurrentMatch(nullptr) : AutocompleteMatch(); - client_->OnTextChanged(current_match, user_input_in_progress_, user_text_, - result(), has_focus()); + client()->OnTextChanged(current_match, user_input_in_progress_, user_text_, + result(), has_focus()); edit_model_delegate_->OnChanged(); } @@ -493,9 +493,9 @@ std::u16string* title, gfx::Image* favicon) { *url = CurrentMatch(nullptr).destination_url; - if (*url == client_->GetURL()) { - *title = client_->GetTitle(); - *favicon = client_->GetFavicon(); + if (*url == client()->GetURL()) { + *title = client()->GetTitle(); + *favicon = client()->GetFavicon(); } } @@ -548,9 +548,9 @@ // the user is probably holding down control to cause the copy, which will // screw up our calculation of the desired_tld. AutocompleteMatch match_from_text; - client_->GetAutocompleteClassifier()->Classify(*text, is_keyword_selected(), - true, GetPageClassification(), - &match_from_text, nullptr); + client()->GetAutocompleteClassifier()->Classify(*text, is_keyword_selected(), + true, GetPageClassification(), + &match_from_text, nullptr); if (AutocompleteMatch::IsSearchType(match_from_text.type)) return; @@ -706,7 +706,7 @@ view_->SetWindowTextAndCaretPos(current_permanent_url, 0, false, true); view_->SetCaretPos(std::min(current_permanent_url.length(), start)); } - client_->OnRevert(); + client()->OnRevert(); } void OmniboxEditModel::StartAutocomplete(bool has_selected_text, @@ -739,12 +739,12 @@ } input_ = AutocompleteInput(input_text, cursor_position, GetPageClassification(), - client_->GetSchemeClassifier(), - client_->ShouldDefaultTypedNavigationsToHttps(), - client_->GetHttpsPortForTesting(), - client_->IsUsingFakeHttpsForHttpsUpgradeTesting()); - input_.set_current_url(client_->GetURL()); - input_.set_current_title(client_->GetTitle()); + client()->GetSchemeClassifier(), + client()->ShouldDefaultTypedNavigationsToHttps(), + client()->GetHttpsPortForTesting(), + client()->IsUsingFakeHttpsForHttpsUpgradeTesting()); + input_.set_current_url(client()->GetURL()); + input_.set_current_title(client()->GetTitle()); input_.set_prevent_inline_autocomplete( prevent_inline_autocomplete || just_deleted_text_ || (has_selected_text && inline_autocompletion_.empty() && @@ -771,7 +771,7 @@ const bool interaction_clobber_focus_type = base::FeatureList::IsEnabled( omnibox::kOmniboxOnClobberFocusTypeOnContent); - GURL current_url = client_->GetURL(); + GURL current_url = client()->GetURL(); std::u16string text = base::UTF8ToUTF16(current_url.spec()); if (is_ntp_page || interaction_clobber_focus_type) { @@ -779,7 +779,7 @@ } AutocompleteInput input(text, page_classification, - client_->GetSchemeClassifier()); + client()->GetSchemeClassifier()); input.set_current_url(current_url); input.set_focus_type(interaction_clobber_focus_type && !is_ntp_page ? metrics::OmniboxFocusType::INTERACTION_CLOBBER @@ -792,7 +792,7 @@ } bool OmniboxEditModel::CanPasteAndGo(const std::u16string& text) const { - if (!client_->IsPasteAndGoEnabled()) { + if (!client()->IsPasteAndGoEnabled()) { return false; } @@ -814,10 +814,10 @@ GURL upgraded_url; if (match.type == AutocompleteMatchType::URL_WHAT_YOU_TYPED && - client_->ShouldDefaultTypedNavigationsToHttps() && + client()->ShouldDefaultTypedNavigationsToHttps() && AutocompleteInput::ShouldUpgradeToHttps( - text, match.destination_url, client_->GetHttpsPortForTesting(), - client_->IsUsingFakeHttpsForHttpsUpgradeTesting(), &upgraded_url)) { + text, match.destination_url, client()->GetHttpsPortForTesting(), + client()->IsUsingFakeHttpsForHttpsUpgradeTesting(), &upgraded_url)) { input_.set_added_default_scheme_to_typed_url(true); DCHECK(upgraded_url.is_valid()); match.destination_url = upgraded_url; @@ -831,14 +831,14 @@ void OmniboxEditModel::EnterKeywordModeForDefaultSearchProvider( OmniboxEventProto::KeywordModeEntryMethod entry_method) { - if (!client_->IsDefaultSearchProviderEnabled()) { + if (!client()->IsDefaultSearchProviderEnabled()) { return; } autocomplete_controller()->Stop(false); const TemplateURL* default_search_provider = - client_->GetTemplateURLService()->GetDefaultSearchProvider(); + client()->GetTemplateURLService()->GetDefaultSearchProvider(); DCHECK(default_search_provider); keyword_ = default_search_provider->keyword(); is_keyword_hint_ = false; @@ -1000,7 +1000,7 @@ base::RecordAction(base::UserMetricsAction("AcceptedKeywordHint")); const TemplateURL* turl = - client_->GetTemplateURLService()->GetTemplateURLForKeyword(keyword_); + client()->GetTemplateURLService()->GetTemplateURLForKeyword(keyword_); EmitEnteredKeywordModeHistogram(entry_method, turl); return true; @@ -1011,7 +1011,7 @@ has_temporary_text_ = false; if (user_input_in_progress_ || !in_revert_) - client_->OnInputStateChanged(); + client()->OnInputStateChanged(); } void OmniboxEditModel::ClearKeyword() { @@ -1145,7 +1145,7 @@ control_key_state_ = control_down ? DOWN_AND_CONSUMED : UP; if (user_input_in_progress_ || !in_revert_) - client_->OnInputStateChanged(); + client()->OnInputStateChanged(); } void OmniboxEditModel::StartZeroSuggestRequest( @@ -1157,7 +1157,7 @@ return; // Early exit if the page has not loaded yet, so we don't annoy users. - if (!client_->CurrentPageExists()) { + if (!client()->CurrentPageExists()) { return; } @@ -1170,13 +1170,13 @@ // Send the textfield contents exactly as-is, as otherwise the verbatim // match can be wrong. The full page URL is anyways in set_current_url(). // Don't attempt to use https as the default scheme for these requests. - input_ = AutocompleteInput(GetText(), GetPageClassification(), - client_->GetSchemeClassifier(), - /*should_use_https_as_default_scheme=*/false, - client_->GetHttpsPortForTesting(), - client_->IsUsingFakeHttpsForHttpsUpgradeTesting()); - input_.set_current_url(client_->GetURL()); - input_.set_current_title(client_->GetTitle()); + input_ = AutocompleteInput( + GetText(), GetPageClassification(), client()->GetSchemeClassifier(), + /*should_use_https_as_default_scheme=*/false, + client()->GetHttpsPortForTesting(), + client()->IsUsingFakeHttpsForHttpsUpgradeTesting()); + input_.set_current_url(client()->GetURL()); + input_.set_current_title(client()->GetTitle()); input_.set_focus_type(user_clobbered_permanent_text ? metrics::OmniboxFocusType::INTERACTION_CLOBBER : metrics::OmniboxFocusType::INTERACTION_FOCUS); @@ -1198,7 +1198,7 @@ void OmniboxEditModel::OnWillKillFocus() { if (user_input_in_progress_ || !in_revert_) - client_->OnInputStateChanged(); + client()->OnInputStateChanged(); } void OmniboxEditModel::OnKillFocus() { @@ -1231,8 +1231,8 @@ // We do not clear the pending entry from the omnibox when a load is first // stopped. If the user presses Escape while stopped, whether editing or not, // we clear it. - if (client_->CurrentPageExists() && !client_->IsLoading()) { - client_->DiscardNonCommittedNavigations(); + if (client()->CurrentPageExists() && !client()->IsLoading()) { + client()->DiscardNonCommittedNavigations(); if (view_) { view_->Update(); } @@ -1282,7 +1282,7 @@ // Blur the omnibox and focus the web contents. base::UmaHistogramEnumeration(kOmniboxEscapeHistogramName, OmniboxEscapeAction::kBlur); - client_->FocusWebContents(); + client()->FocusWebContents(); return true; } @@ -1353,8 +1353,8 @@ return; } - client_->OnNavigationLikely(line, result().match_at(line), - navigation_predictor); + client()->OnNavigationLikely(line, result().match_at(line), + navigation_predictor); } void OmniboxEditModel::OpenMatchForTesting( @@ -1530,7 +1530,7 @@ GURL url = GURL(*(state_changes.new_text)); if (url.is_valid()) { - client_->OnUserPastedInOmniboxResultingInValidURL(); + client()->OnUserPastedInOmniboxResultingInValidURL(); } } else if (state_changes.text_differs) paste_state_ = NONE; @@ -1604,7 +1604,7 @@ if (allow_exact_keyword_match_) { keyword_mode_entry_method_ = OmniboxEventProto::SPACE_IN_MIDDLE; const TemplateURL* turl = - client_->GetTemplateURLService()->GetTemplateURLForKeyword(keyword_); + client()->GetTemplateURLService()->GetTemplateURLForKeyword(keyword_); EmitEnteredKeywordModeHistogram(OmniboxEventProto::SPACE_IN_MIDDLE, turl); allow_exact_keyword_match_ = false; } @@ -1648,7 +1648,7 @@ // OnPopupDataChanged use their previous state to detect changes. std::u16string keyword; bool is_keyword_hint; - TemplateURLService* service = client_->GetTemplateURLService(); + TemplateURLService* service = client()->GetTemplateURLService(); match.GetKeywordUIState(service, &keyword, &is_keyword_hint); OnPopupResultChanged(); @@ -1738,7 +1738,7 @@ std::unique_ptr<AutocompleteProviderClient> new_provider_client; if (!use_existing_autocomplete_client_) { // Create a new client. - new_provider_client = client_->CreateAutocompleteProviderClient(); + new_provider_client = client()->CreateAutocompleteProviderClient(); provider_client = new_provider_client.get(); } else { // Use the existing client. @@ -1760,7 +1760,7 @@ : GetText()) : url_for_editing_; - client_->GetAutocompleteClassifier()->Classify( + client()->GetAutocompleteClassifier()->Classify( MaybePrependKeyword(text_for_match_generation), is_keyword_selected(), true, GetPageClassification(), match, alternate_nav_url); } @@ -1799,7 +1799,7 @@ } bool OmniboxEditModel::IsStarredMatch(const AutocompleteMatch& match) const { - auto* bookmark_model = client_->GetBookmarkModel(); + auto* bookmark_model = client()->GetBookmarkModel(); return bookmark_model && bookmark_model->IsBookmarked(match.destination_url); } @@ -1807,11 +1807,11 @@ #if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_IOS) gfx::Image OmniboxEditModel::GetMatchIcon(const AutocompleteMatch& match, SkColor vector_icon_color) { - gfx::Image extension_icon = client_->GetIconIfExtensionMatch(match); + gfx::Image extension_icon = client()->GetIconIfExtensionMatch(match); // Extension icons are the correct size for non-touch UI but need to be // adjusted to be the correct size for touch mode. if (!extension_icon.IsEmpty()) { - return client_->GetSizedIcon(extension_icon); + return client()->GetSizedIcon(extension_icon); } // The @tabs starter pack suggestion is a unique case. It uses a help center @@ -1821,7 +1821,7 @@ if (AutocompleteMatch::IsStarterPackType(match.type) && match.associated_keyword) { TemplateURL* turl = - client_->GetTemplateURLService()->GetTemplateURLForKeyword( + client()->GetTemplateURLService()->GetTemplateURLForKeyword( match.associated_keyword->keyword); is_starter_pack_tabs_suggestion = turl && turl->GetBuiltinEngineType() == KEYWORD_MODE_STARTER_PACK_TABS; @@ -1837,7 +1837,7 @@ // all run one after another. This seems to be harmless as the callback // just flips a flag to schedule a repaint. However, if it turns out to be // costly, we can optimize away the redundant extra callbacks. - gfx::Image favicon = client_->GetFaviconForPageUrl( + gfx::Image favicon = client()->GetFaviconForPageUrl( match.destination_url, base::BindOnce(&OmniboxEditModel::OnFaviconFetched, weak_factory_.GetWeakPtr(), match.destination_url)); @@ -1845,14 +1845,14 @@ // Extension icons are the correct size for non-touch UI but need to be // adjusted to be the correct size for touch mode. if (!favicon.IsEmpty()) { - return client_->GetSizedIcon(favicon); + return client()->GetSizedIcon(favicon); } } bool is_starred_match = IsStarredMatch(match); const auto& vector_icon_type = match.GetVectorIcon(is_starred_match); - return client_->GetSizedIcon(vector_icon_type, vector_icon_color); + return client()->GetSizedIcon(vector_icon_type, vector_icon_color); } #endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_IOS) @@ -1923,7 +1923,7 @@ std::u16string keyword; bool is_keyword_hint; - TemplateURLService* service = client_->GetTemplateURLService(); + TemplateURLService* service = client()->GetTemplateURLService(); match.GetKeywordUIState(service, &keyword, &is_keyword_hint); if (popup_selection_.state == OmniboxPopupSelection::FOCUSED_BUTTON_HEADER) { @@ -2087,7 +2087,7 @@ // associated_keyword of the match we're on. Populate the a11y string // with information from the keyword match, rather than the current match. TemplateURL* turl = match.associated_keyword->GetTemplateURL( - client_->GetTemplateURLService(), false); + client()->GetTemplateURLService(), false); std::u16string replacement_string = turl ? turl->short_name() : match.contents; return l10n_util::GetStringFUTF16(IDS_ACC_KEYWORD_MODE, @@ -2209,8 +2209,8 @@ // URL_WHAT_YOU_TYPED AutocompleteMatch. AutocompleteInput input( text_for_desired_tld_navigation, input_.cursor_position(), "com", - input_.current_page_classification(), client_->GetSchemeClassifier(), - client_->ShouldDefaultTypedNavigationsToHttps(), 0, false); + input_.current_page_classification(), client()->GetSchemeClassifier(), + client()->ShouldDefaultTypedNavigationsToHttps(), 0, false); input.set_prevent_inline_autocomplete(input_.prevent_inline_autocomplete()); input.set_prefer_keyword(input_.prefer_keyword()); input.set_keyword_mode_entry_method(input_.keyword_mode_entry_method()); @@ -2346,12 +2346,12 @@ // Create a dummy AutocompleteInput for use in calling VerbatimMatchForInput() // to create an alternate navigational match. AutocompleteInput alternate_input( - input_text, GetPageClassification(), client_->GetSchemeClassifier(), - client_->ShouldDefaultTypedNavigationsToHttps(), 0, false); + input_text, GetPageClassification(), client()->GetSchemeClassifier(), + client()->ShouldDefaultTypedNavigationsToHttps(), 0, false); // Somehow we can occasionally get here with no active tab. It's not // clear why this happens. - alternate_input.set_current_url(client_->GetURL()); - alternate_input.set_current_title(client_->GetTitle()); + alternate_input.set_current_url(client()->GetURL()); + alternate_input.set_current_title(client()->GetTitle()); base::TimeDelta elapsed_time_since_last_change_to_default_match( now - autocomplete_controller()->last_time_default_match_changed()); @@ -2411,11 +2411,11 @@ << "default match changed."; if ((disposition == WindowOpenDisposition::CURRENT_TAB) && - client_->CurrentPageExists()) { + client()->CurrentPageExists()) { // If we know the destination is being opened in the current tab, // we can easily get the tab ID. (If it's being opened in a new // tab, we don't know the tab ID yet.) - log.tab_id = client_->GetSessionID(); + log.tab_id = client()->GetSessionID(); } autocomplete_controller()->AddProviderAndTriggeringLogs(&log); @@ -2431,7 +2431,7 @@ ipv4_parts_count); } - client_->OnURLOpenedFromOmnibox(&log); + client()->OnURLOpenedFromOmnibox(&log); OmniboxEventGlobalTracker::GetInstance()->OnURLOpened(&log); LOCAL_HISTOGRAM_BOOLEAN("Omnibox.EventCount", true); @@ -2445,7 +2445,7 @@ IDNA2008DeviationCharacter deviation_char_in_hostname = IDNA2008DeviationCharacter::kNone; - TemplateURLService* service = client_->GetTemplateURLService(); + TemplateURLService* service = client()->GetTemplateURLService(); TemplateURL* template_url = match.GetTemplateURL(service, false); if (template_url) { if (ui::PageTransitionTypeIncludingQualifiersIs( @@ -2454,8 +2454,8 @@ // keyword mode. // Don't increment usage count for extension keywords. - if (client_->ProcessExtensionKeyword(input_text, template_url, match, - disposition)) { + if (client()->ProcessExtensionKeyword(input_text, template_url, match, + disposition)) { if (disposition != WindowOpenDisposition::NEW_BACKGROUND_TAB && view_) { view_->RevertAll(); } @@ -2465,7 +2465,7 @@ base::RecordAction(base::UserMetricsAction("AcceptedKeyword")); EmitAcceptedKeywordSuggestionHistogram(keyword_mode_entry_method_, template_url); - client_->GetTemplateURLService()->IncrementUsageCount(template_url); + client()->GetTemplateURLService()->IncrementUsageCount(template_url); } else { DCHECK(ui::PageTransitionTypeIncludingQualifiersIs( match.transition, ui::PAGE_TRANSITION_GENERATED) || @@ -2525,7 +2525,7 @@ // Track whether the destination URL sends us to a search results page // using the default search provider. - TemplateURLService* template_url_service = client_->GetTemplateURLService(); + TemplateURLService* template_url_service = client()->GetTemplateURLService(); if (template_url_service && template_url_service->IsSearchResultsPageFromDefaultSearchProvider( match.destination_url)) { @@ -2537,7 +2537,7 @@ bool is_off_the_record = use_existing_autocomplete_client_ ? is_incognito - : client_->CreateAutocompleteProviderClient()->IsOffTheRecord(); + : client()->CreateAutocompleteProviderClient()->IsOffTheRecord(); base::UmaHistogramBoolean("Omnibox.Search.OffTheRecord", is_off_the_record); } @@ -2558,9 +2558,9 @@ deviation_char_in_hostname); } - BookmarkModel* bookmark_model = client_->GetBookmarkModel(); + BookmarkModel* bookmark_model = client()->GetBookmarkModel(); if (bookmark_model && bookmark_model->IsBookmarked(match.destination_url)) { - client_->OnBookmarkLaunched(); + client()->OnBookmarkLaunched(); } } @@ -2630,7 +2630,7 @@ AutocompleteMatch* match, GURL* alternate_nav_url) const { DCHECK(match); - client_->GetAutocompleteClassifier()->Classify( + client()->GetAutocompleteClassifier()->Classify( text, false, false, GetPageClassification(), match, alternate_nav_url); } @@ -2658,7 +2658,7 @@ edit_model_delegate_->OnInputInProgress(in_progress); if (user_input_in_progress_ || !in_revert_) - client_->OnInputStateChanged(); + client()->OnInputStateChanged(); } void OmniboxEditModel::SetFocusState(OmniboxFocusState state, @@ -2675,7 +2675,7 @@ view_->ApplyCaretVisibility(); } - client_->OnFocusChanged(focus_state_, reason); + client()->OnFocusChanged(focus_state_, reason); } void OmniboxEditModel::OnFaviconFetched(const GURL& page_url,
diff --git a/components/omnibox/browser/omnibox_edit_model.h b/components/omnibox/browser/omnibox_edit_model.h index c6cea53..0545e7c9 100644 --- a/components/omnibox/browser/omnibox_edit_model.h +++ b/components/omnibox/browser/omnibox_edit_model.h
@@ -67,16 +67,14 @@ const AutocompleteInput autocomplete_input; }; - OmniboxEditModel(OmniboxView* view, - OmniboxEditModelDelegate* edit_model_delegate, - OmniboxClient* client); + OmniboxEditModel(OmniboxController* omnibox_controller, + OmniboxView* view, + OmniboxEditModelDelegate* edit_model_delegate); virtual ~OmniboxEditModel(); OmniboxEditModel(const OmniboxEditModel&) = delete; OmniboxEditModel& operator=(const OmniboxEditModel&) = delete; - void set_omnibox_controller(OmniboxController* omnibox_controller) { - omnibox_controller_ = omnibox_controller; - } + OmniboxController* omnibox_controller() const { return omnibox_controller_; } // TODO(jdonnelly): Remove this accessor when the AutocompleteController has // completely moved to OmniboxController. @@ -90,7 +88,7 @@ OmniboxEditModelDelegate* delegate() const { return edit_model_delegate_; } - OmniboxClient* client() const { return client_.get(); } + OmniboxClient* client() const { return omnibox_controller_->client(); } metrics::OmniboxEventProto::PageClassification GetPageClassification() const; @@ -641,9 +639,6 @@ // Implemented by `LocationBarView` which owns `OmniboxView`. raw_ptr<OmniboxEditModelDelegate> edit_model_delegate_; - // Owned by `omnibox_controller_` which owns this. - raw_ptr<OmniboxClient> client_; - OmniboxFocusState focus_state_ = OMNIBOX_FOCUS_NONE; // Used to keep track whether the input currently in progress originated by
diff --git a/components/omnibox/browser/omnibox_edit_model_unittest.cc b/components/omnibox/browser/omnibox_edit_model_unittest.cc index 78a5e9d14..ce86cdbb 100644 --- a/components/omnibox/browser/omnibox_edit_model_unittest.cc +++ b/components/omnibox/browser/omnibox_edit_model_unittest.cc
@@ -92,13 +92,11 @@ feature_list.InitAndEnableFeature(omnibox::kSiteSearchStarterPack); edit_model_delegate_ = std::make_unique<TestOmniboxEditModelDelegate>(); - auto omnibox_client = std::make_unique<TestOmniboxClient>(); - auto* omnibox_client_ptr = omnibox_client.get(); - view_ = std::make_unique<TestOmniboxView>(edit_model_delegate_.get(), - std::move(omnibox_client)); + view_ = std::make_unique<TestOmniboxView>( + edit_model_delegate_.get(), std::make_unique<TestOmniboxClient>()); - view_->SetEditModel(std::make_unique<TestOmniboxEditModel>( - view_.get(), edit_model_delegate_.get(), omnibox_client_ptr, nullptr)); + view_->controller()->set_edit_model(std::make_unique<TestOmniboxEditModel>( + view_->controller(), view_.get(), edit_model_delegate_.get(), nullptr)); } TestOmniboxView* view() { return view_.get(); } @@ -643,13 +641,11 @@ public: OmniboxEditModelPopupTest() { edit_model_delegate_ = std::make_unique<TestOmniboxEditModelDelegate>(); - auto omnibox_client = std::make_unique<TestOmniboxClient>(); - auto* omnibox_client_ptr = omnibox_client.get(); - view_ = std::make_unique<TestOmniboxView>(edit_model_delegate_.get(), - std::move(omnibox_client)); + view_ = std::make_unique<TestOmniboxView>( + edit_model_delegate_.get(), std::make_unique<TestOmniboxClient>()); - view_->SetEditModel(std::make_unique<TestOmniboxEditModel>( - view_.get(), edit_model_delegate_.get(), omnibox_client_ptr, + view_->controller()->set_edit_model(std::make_unique<TestOmniboxEditModel>( + view_->controller(), view_.get(), edit_model_delegate_.get(), &pref_service_)); omnibox::RegisterProfilePrefs(pref_service_.registry());
diff --git a/components/omnibox/browser/omnibox_view_unittest.cc b/components/omnibox/browser/omnibox_view_unittest.cc index 60eccb5..30591a9 100644 --- a/components/omnibox/browser/omnibox_view_unittest.cc +++ b/components/omnibox/browser/omnibox_view_unittest.cc
@@ -41,13 +41,11 @@ public: OmniboxViewTest() { edit_model_delegate_ = std::make_unique<TestOmniboxEditModelDelegate>(); - auto omnibox_client = std::make_unique<TestOmniboxClient>(); - auto* omnibox_client_ptr = omnibox_client.get(); - view_ = std::make_unique<TestOmniboxView>(edit_model_delegate_.get(), - std::move(omnibox_client)); + view_ = std::make_unique<TestOmniboxView>( + edit_model_delegate_.get(), std::make_unique<TestOmniboxClient>()); - view_->SetEditModel(std::make_unique<TestOmniboxEditModel>( - view_.get(), edit_model_delegate_.get(), omnibox_client_ptr, nullptr)); + view_->controller()->set_edit_model(std::make_unique<TestOmniboxEditModel>( + view_->controller(), view_.get(), edit_model_delegate_.get(), nullptr)); bookmark_model_ = bookmarks::TestBookmarkClient::CreateModel(); client()->SetBookmarkModel(bookmark_model_.get());
diff --git a/components/omnibox/browser/test_omnibox_edit_model.cc b/components/omnibox/browser/test_omnibox_edit_model.cc index 0f9dc0cc..6e0fe19 100644 --- a/components/omnibox/browser/test_omnibox_edit_model.cc +++ b/components/omnibox/browser/test_omnibox_edit_model.cc
@@ -8,11 +8,11 @@ #include "components/omnibox/browser/test_omnibox_edit_model.h" TestOmniboxEditModel::TestOmniboxEditModel( + OmniboxController* omnibox_controller, OmniboxView* view, OmniboxEditModelDelegate* edit_model_delegate, - OmniboxClient* client, PrefService* pref_service) - : OmniboxEditModel(view, edit_model_delegate, client), + : OmniboxEditModel(omnibox_controller, view, edit_model_delegate), popup_is_open_(false), pref_service_(pref_service) {}
diff --git a/components/omnibox/browser/test_omnibox_edit_model.h b/components/omnibox/browser/test_omnibox_edit_model.h index 475be0b..8608622a 100644 --- a/components/omnibox/browser/test_omnibox_edit_model.h +++ b/components/omnibox/browser/test_omnibox_edit_model.h
@@ -13,9 +13,9 @@ class TestOmniboxEditModel : public OmniboxEditModel { public: - TestOmniboxEditModel(OmniboxView* view, + TestOmniboxEditModel(OmniboxController* omnibox_controller, + OmniboxView* view, OmniboxEditModelDelegate* edit_model_delegate, - OmniboxClient* client, PrefService* pref_service); ~TestOmniboxEditModel() override; TestOmniboxEditModel(const TestOmniboxEditModel&) = delete;
diff --git a/components/omnibox/browser/test_omnibox_view.cc b/components/omnibox/browser/test_omnibox_view.cc index d94746b..a352dae 100644 --- a/components/omnibox/browser/test_omnibox_view.cc +++ b/components/omnibox/browser/test_omnibox_view.cc
@@ -26,11 +26,6 @@ return state; } -void TestOmniboxView::SetEditModel( - std::unique_ptr<OmniboxEditModel> edit_model) { - controller_->SetEditModel(std::move(edit_model)); -} - std::u16string TestOmniboxView::GetText() const { return text_; }
diff --git a/components/omnibox/browser/test_omnibox_view.h b/components/omnibox/browser/test_omnibox_view.h index 9acd0d0..93275a8 100644 --- a/components/omnibox/browser/test_omnibox_view.h +++ b/components/omnibox/browser/test_omnibox_view.h
@@ -14,7 +14,6 @@ struct AutocompleteMatch; class OmniboxEditModelDelegate; -class OmniboxEditModel; // Fake implementation of OmniboxView for use in tests. class TestOmniboxView : public OmniboxView { @@ -26,8 +25,6 @@ TestOmniboxView(const TestOmniboxView&) = delete; TestOmniboxView& operator=(const TestOmniboxView&) = delete; - void SetEditModel(std::unique_ptr<OmniboxEditModel> edit_model); - const std::u16string& inline_autocompletion() const { return inline_autocompletion_; }
diff --git a/components/policy/core/common/remote_commands/test_support/remote_command_builders.h b/components/policy/core/common/remote_commands/test_support/remote_command_builders.h index 91dfdd1..78ad22e 100644 --- a/components/policy/core/common/remote_commands/test_support/remote_command_builders.h +++ b/components/policy/core/common/remote_commands/test_support/remote_command_builders.h
@@ -14,7 +14,7 @@ // Builder class to construct `enterprise_management::RemoteCommand`. // // It also auto-assigns a unique command id to the `RemoteCommand` that is -// one higher than the last command id it prevously assigned. You can of course +// one higher than the last command id it previously assigned. You can of course // assign your own command id if more control is needed. class RemoteCommandBuilder { public:
diff --git a/components/policy/core/common/remote_commands/test_support/testing_remote_commands_server.h b/components/policy/core/common/remote_commands/test_support/testing_remote_commands_server.h index ff8684a..f4f81d0 100644 --- a/components/policy/core/common/remote_commands/test_support/testing_remote_commands_server.h +++ b/components/policy/core/common/remote_commands/test_support/testing_remote_commands_server.h
@@ -48,6 +48,10 @@ // FetchCommands() can be called from any thread. // Note that test author is responsible for ensuring that FetchCommands() is not // called from another thread after |this| has been destroyed. +// +// Note: Do not use this for browser tests to test your remote command +// functionality. Instead, use the `RemoteCommandServiceMixin` since that +// requires less mocks and stubs and thus results in a more realistic test. class TestingRemoteCommandsServer { public: TestingRemoteCommandsServer();
diff --git a/components/privacy_sandbox/privacy_sandbox_settings_impl.cc b/components/privacy_sandbox/privacy_sandbox_settings_impl.cc index 0547a94a..d3cdb00 100644 --- a/components/privacy_sandbox/privacy_sandbox_settings_impl.cc +++ b/components/privacy_sandbox/privacy_sandbox_settings_impl.cc
@@ -58,14 +58,12 @@ ContentSettingsPattern::FromString(entry)}; } -// Returns a base::Value for storage in prefs that represents |topic| blocked -// at the current time. -base::Value CreateBlockedTopicEntry(const CanonicalTopic& topic) { - base::Value entry(base::Value::Type::DICT); - entry.SetKey(kBlockedTopicsTopicKey, topic.ToValue()); - entry.SetKey(kBlockedTopicsBlockTimeKey, - base::TimeToValue(base::Time::Now())); - return entry; +// Returns a base::Value::Dict for storage in prefs that represents |topic| +// blocked at the current time. +base::Value::Dict CreateBlockedTopicEntry(const CanonicalTopic& topic) { + return base::Value::Dict() + .Set(kBlockedTopicsTopicKey, topic.ToValue()) + .Set(kBlockedTopicsBlockTimeKey, base::TimeToValue(base::Time::Now())); } } // namespace
diff --git a/components/segmentation_platform/components_unittests.filter b/components/segmentation_platform/components_unittests.filter index c8bd2a3b..870392d 100644 --- a/components/segmentation_platform/components_unittests.filter +++ b/components/segmentation_platform/components_unittests.filter
@@ -62,6 +62,7 @@ StatsTest.* SyncDeviceInfoObserverTest.* TabRankDispatcherTest.* +TabSessionSourceTest.* TabletProductivityUserModelTest.* TrainingDataCacheTest.* TrainingDataCollectorImplTest.*
diff --git a/components/segmentation_platform/embedder/BUILD.gn b/components/segmentation_platform/embedder/BUILD.gn index 0508e2b..b896391 100644 --- a/components/segmentation_platform/embedder/BUILD.gn +++ b/components/segmentation_platform/embedder/BUILD.gn
@@ -13,6 +13,8 @@ sources = [ "input_delegate/tab_rank_dispatcher.cc", "input_delegate/tab_rank_dispatcher.h", + "input_delegate/tab_session_source.cc", + "input_delegate/tab_session_source.h", "model_provider_factory_impl.cc", "model_provider_factory_impl.h", ] @@ -41,6 +43,7 @@ # tests in //components/segmentation_platform/components_unittests.filter sources = [ "input_delegate/tab_rank_dispatcher_unittest.cc", + "input_delegate/tab_session_source_unittest.cc", "model_provider_factory_impl_unittest.cc", ]
diff --git a/components/segmentation_platform/embedder/input_delegate/tab_session_source.cc b/components/segmentation_platform/embedder/input_delegate/tab_session_source.cc new file mode 100644 index 0000000..94e6a83 --- /dev/null +++ b/components/segmentation_platform/embedder/input_delegate/tab_session_source.cc
@@ -0,0 +1,152 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "components/segmentation_platform/embedder/input_delegate/tab_session_source.h" + +#include "base/strings/string_number_conversions_win.h" +#include "base/strings/string_piece.h" +#include "base/time/time.h" +#include "components/segmentation_platform/internal/execution/processing/feature_processor_state.h" +#include "components/segmentation_platform/public/types/processed_value.h" +#include "components/sessions/core/session_id.h" +#include "components/sessions/core/session_types.h" +#include "components/sync_sessions/open_tabs_ui_delegate.h" +#include "components/sync_sessions/synced_session.h" +#include "third_party/abseil-cpp/absl/types/optional.h" +#include "ui/base/page_transition_types.h" + +namespace segmentation_platform::processing { +namespace { + +absl::optional<ProcessedValue> GetMetadataArgument( + const FeatureProcessorState& feature_processor_state, + base::StringPiece arg_name) { + const auto& args = feature_processor_state.input_context()->metadata_args; + auto it = args.find(arg_name); + if (it == args.end()) { + return absl::nullopt; + } + return it->second; +} + +} // namespace + +TabSessionSource::TabSessionSource( + sync_sessions::SessionSyncService* session_sync_service) + : session_sync_service_(session_sync_service) {} + +TabSessionSource::~TabSessionSource() = default; + +void TabSessionSource::Process( + const proto::CustomInput& input, + const FeatureProcessorState& feature_processor_state, + ProcessedCallback callback) { + auto tab_id_val = GetMetadataArgument(feature_processor_state, "tab_id"); + auto session_tag_val = + GetMetadataArgument(feature_processor_state, "session_tag"); + if (!session_tag_val || !tab_id_val) { + std::move(callback).Run(/*error=*/true, {}); + return; + } + + CHECK_EQ(tab_id_val->type, ProcessedValue::Type::INT); + CHECK_EQ(session_tag_val->type, ProcessedValue::STRING); + SessionID::id_type tab_id = tab_id_val->int_val; + std::string session_tag = session_tag_val->str_val; + + // Fetch the tab. The tab might have been closed between the time was fetched + // and the model is run asynchronously. + sync_sessions::OpenTabsUIDelegate* open_tab_delegate = + session_sync_service_->GetOpenTabsUIDelegate(); + const sessions::SessionTab* session_tab = nullptr; + if (!open_tab_delegate || + !open_tab_delegate->GetForeignTab( + session_tag, SessionID::FromSerializedValue(tab_id), &session_tab)) { + std::move(callback).Run(/*error=*/true, Tensor()); + return; + } + + Tensor inputs(kNumInputs, ProcessedValue(0.0f)); + + AddTabInfo(session_tab, inputs); + AddTabRanks(session_tag, session_tab, inputs); + + std::move(callback).Run(false, std::move(inputs)); +} + +void TabSessionSource::AddTabInfo(const sessions::SessionTab* session_tab, + Tensor& inputs) { + base::TimeDelta time_since_modified = + base::Time::Now() - session_tab->timestamp; + + // The navigation index could be invalid if it is larger than the navigation + // list, so pick the index when available, else pick the last navigation + // available. + int navigation_index = + static_cast<size_t>(session_tab->current_navigation_index) >= + session_tab->navigations.size() + ? session_tab->navigations.size() - 1 + : session_tab->current_navigation_index; + base::TimeDelta time_since_last_nav; + base::TimeDelta time_since_first_nav; + ui::PageTransition last_transition = ui::PAGE_TRANSITION_TYPED; + + if (session_tab->navigations.size() > 0) { + const auto& current_navigation = session_tab->navigations[navigation_index]; + time_since_last_nav = base::Time::Now() - current_navigation.timestamp(); + time_since_first_nav = + base::Time::Now() - session_tab->navigations[0].timestamp(); + last_transition = current_navigation.transition_type(); + } + int password_used_count = 0; + for (const auto& navigation : session_tab->navigations) { + if (navigation.password_state() == sessions::SerializedNavigationEntry:: + PasswordState::HAS_PASSWORD_FIELD) { + password_used_count++; + } + } + + inputs[kInputTimeSinceModifiedSec] = + ProcessedValue::FromFloat(time_since_modified.InSeconds()); + inputs[kInputTimeSinceLastNavSec] = + ProcessedValue::FromFloat(time_since_last_nav.InSeconds()); + inputs[kInputTimeSinceFirstNavSec] = + ProcessedValue::FromFloat(time_since_first_nav.InSeconds()); + inputs[kInputLastTransitionType] = ProcessedValue::FromFloat(last_transition); + inputs[kInputPasswordFieldCount] = + ProcessedValue::FromFloat(password_used_count); +} + +void TabSessionSource::AddTabRanks(const std::string& session_tag, + const sessions::SessionTab* session_tab, + Tensor& inputs) { + sync_sessions::OpenTabsUIDelegate* open_tab_delegate = + session_sync_service_->GetOpenTabsUIDelegate(); + std::vector<const sessions::SessionWindow*> windows; + int tab_rank_in_session = 0; + if (open_tab_delegate->GetForeignSession(session_tag, &windows)) { + for (const auto* window : windows) { + for (const auto& tab : window->tabs) { + if (tab->timestamp > session_tab->timestamp) { + tab_rank_in_session++; + } + } + } + } + std::vector<const sync_sessions::SyncedSession*> sessions; + int session_rank_overall = 0; + if (open_tab_delegate->GetAllForeignSessions(&sessions)) { + for (const auto* session : sessions) { + if (session->GetModifiedTime() > session_tab->timestamp) { + session_rank_overall++; + } + } + } + + inputs[kInputTabRankInSession] = + ProcessedValue::FromFloat(tab_rank_in_session); + inputs[kInputSessionRank] = ProcessedValue::FromFloat(session_rank_overall); +} + +} // namespace segmentation_platform::processing
diff --git a/components/segmentation_platform/embedder/input_delegate/tab_session_source.h b/components/segmentation_platform/embedder/input_delegate/tab_session_source.h new file mode 100644 index 0000000..f6ba7dfb --- /dev/null +++ b/components/segmentation_platform/embedder/input_delegate/tab_session_source.h
@@ -0,0 +1,61 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef COMPONENTS_SEGMENTATION_PLATFORM_EMBEDDER_INPUT_DELEGATE_TAB_SESSION_SOURCE_H_ +#define COMPONENTS_SEGMENTATION_PLATFORM_EMBEDDER_INPUT_DELEGATE_TAB_SESSION_SOURCE_H_ + +#include "base/allocator/partition_allocator/pointers/raw_ptr.h" +#include "components/segmentation_platform/public/input_delegate.h" +#include "components/sync_sessions/open_tabs_ui_delegate.h" +#include "components/sync_sessions/session_sync_service.h" +#include "components/sync_sessions/synced_session.h" + +namespace segmentation_platform::processing { + +// Input delegate that provides data about a synced tab, handles +// CustomInput::FILL_TAB_METRICS. +class TabSessionSource : public InputDelegate { + public: + // Input index: Time since last time the tab was modified. + static constexpr int kInputTimeSinceModifiedSec = 0; + // Input index: Time since the last navigation started. + static constexpr int kInputTimeSinceLastNavSec = 1; + // Input index: Time since the first navigation on the tab started. + static constexpr int kInputTimeSinceFirstNavSec = 2; + // Input index: The type of last transition: `ui::PageTransition`. + static constexpr int kInputLastTransitionType = 3; + // Input index: The number navigations with a password field in the tab. + static constexpr int kInputPasswordFieldCount = 4; + // Input index: The tab's rank when sorted by modification time across all + // other tabs in the same session. + static constexpr int kInputTabRankInSession = 5; + // Input index: The tab's rank when sorted by modification time across all + // other sessions. + static constexpr int kInputSessionRank = 6; + static constexpr int kNumInputs = 7; + + explicit TabSessionSource( + sync_sessions::SessionSyncService* session_sync_service); + ~TabSessionSource() override; + + TabSessionSource(const TabSessionSource&) = delete; + TabSessionSource& operator=(const TabSessionSource&) = delete; + + // InputDelegate impl: + void Process(const proto::CustomInput& input, + const FeatureProcessorState& feature_processor_state, + ProcessedCallback callback) override; + + private: + void AddTabInfo(const sessions::SessionTab* session_tab, Tensor& inputs); + void AddTabRanks(const std::string& session_tag, + const sessions::SessionTab* session_tab, + Tensor& inputs); + + const raw_ptr<sync_sessions::SessionSyncService> session_sync_service_; +}; + +} // namespace segmentation_platform::processing + +#endif // COMPONENTS_SEGMENTATION_PLATFORM_EMBEDDER_INPUT_DELEGATE_TAB_SESSION_SOURCE_H_
diff --git a/components/segmentation_platform/embedder/input_delegate/tab_session_source_unittest.cc b/components/segmentation_platform/embedder/input_delegate/tab_session_source_unittest.cc new file mode 100644 index 0000000..31264d4 --- /dev/null +++ b/components/segmentation_platform/embedder/input_delegate/tab_session_source_unittest.cc
@@ -0,0 +1,279 @@ +// 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/segmentation_platform/embedder/input_delegate/tab_session_source.h" + +#include "base/functional/callback_forward.h" +#include "base/run_loop.h" +#include "base/test/task_environment.h" +#include "base/time/time.h" +#include "components/segmentation_platform/internal/execution/processing/feature_processor_state.h" +#include "components/segmentation_platform/internal/metadata/metadata_writer.h" +#include "components/segmentation_platform/public/input_context.h" +#include "components/sessions/core/serialized_navigation_entry.h" +#include "components/sessions/core/session_id.h" +#include "components/sync_sessions/synced_session.h" +#include "testing/gmock/include/gmock/gmock.h" +#include "testing/gtest/include/gtest/gtest.h" +#include "ui/base/page_transition_types.h" + +namespace segmentation_platform::processing { +namespace { + +using ::testing::_; +using ::testing::Return; + +constexpr char kLocalTabName[] = "local"; +constexpr char kRemoteTabName1[] = "remote_1"; +constexpr char kRemoteTabName2[] = "remote_2"; +const base::TimeDelta kTime1 = base::Minutes(15); +const base::TimeDelta kTime2 = base::Minutes(10); +const base::TimeDelta kTime3 = base::Minutes(5); + +std::unique_ptr<sync_sessions::SyncedSession> CreateNewSession( + const std::string& tab_guid, + const base::Time& session_time) { + auto session = std::make_unique<sync_sessions::SyncedSession>(); + session->SetModifiedTime(session_time); + auto window = std::make_unique<sync_sessions::SyncedSessionWindow>(); + auto tab = std::make_unique<sessions::SessionTab>(); + tab->timestamp = session_time; + tab->guid = tab_guid; + window->wrapped_window.tabs.push_back(std::move(tab)); + session->windows[SessionID::NewUnique()] = std::move(window); + return session; +} + +class MockSessionSyncService : public sync_sessions::SessionSyncService { + public: + MockSessionSyncService() = default; + ~MockSessionSyncService() override = default; + + MOCK_METHOD(syncer::GlobalIdMapper*, + GetGlobalIdMapper, + (), + (const, override)); + MOCK_METHOD(sync_sessions::OpenTabsUIDelegate*, + GetOpenTabsUIDelegate, + (), + (override)); + MOCK_METHOD(base::CallbackListSubscription, + SubscribeToForeignSessionsChanged, + (const base::RepeatingClosure& cb), + (override)); + MOCK_METHOD(base::WeakPtr<syncer::ModelTypeControllerDelegate>, + GetControllerDelegate, + ()); + MOCK_METHOD(void, + ProxyTabsStateChanged, + (syncer::DataTypeController::State state)); +}; + +class MockOpenTabsUIDelegate : public sync_sessions::OpenTabsUIDelegate { + public: + MockOpenTabsUIDelegate() { + local_session_ = + CreateNewSession(kLocalTabName, base::Time::Now() - kTime2); + foreign_sessions_owned_.push_back( + CreateNewSession(kRemoteTabName1, base::Time::Now() - kTime1)); + foreign_sessions_.push_back(foreign_sessions_owned_.back().get()); + foreign_sessions_owned_.push_back( + CreateNewSession(kRemoteTabName2, base::Time::Now() - kTime3)); + foreign_sessions_.push_back(foreign_sessions_owned_.back().get()); + } + + bool GetAllForeignSessions( + std::vector<const sync_sessions::SyncedSession*>* sessions) override { + *sessions = foreign_sessions_; + base::ranges::sort(*sessions, std::greater(), + [](const sync_sessions::SyncedSession* session) { + return session->GetModifiedTime(); + }); + + return !sessions->empty(); + } + + bool GetLocalSession( + const sync_sessions::SyncedSession** local_session) override { + *local_session = local_session_.get(); + return *local_session != nullptr; + } + + MOCK_METHOD3(GetForeignTab, + bool(const std::string& tag, + const SessionID tab_id, + const sessions::SessionTab** tab)); + + MOCK_METHOD1(DeleteForeignSession, void(const std::string& tag)); + + MOCK_METHOD2(GetForeignSession, + bool(const std::string& tag, + std::vector<const sessions::SessionWindow*>* windows)); + + MOCK_METHOD2(GetForeignSessionTabs, + bool(const std::string& tag, + std::vector<const sessions::SessionTab*>* tabs)); + + private: + std::vector<std::unique_ptr<sync_sessions::SyncedSession>> + foreign_sessions_owned_; + std::vector<const sync_sessions::SyncedSession*> foreign_sessions_; + std::unique_ptr<sync_sessions::SyncedSession> local_session_; +}; + +} // namespace + +class TabSessionSourceTest : public testing::Test { + public: + TabSessionSourceTest() = default; + ~TabSessionSourceTest() override = default; + + void SetUp() override { + Test::SetUp(); + tab_source_ = std::make_unique<TabSessionSource>(&session_sync_service_); + EXPECT_CALL(session_sync_service_, GetOpenTabsUIDelegate()) + .WillRepeatedly(Return(&open_tabs_delegate_)); + } + + void TearDown() override { + Test::TearDown(); + tab_source_.reset(); + } + + Tensor GetResult(const std::string& session_tag, const SessionID& tab_id) { + scoped_refptr<InputContext> input_context = + base::MakeRefCounted<InputContext>(); + input_context->metadata_args.emplace( + "session_tag", processing::ProcessedValue(session_tag)); + input_context->metadata_args.emplace( + "tab_id", processing::ProcessedValue(tab_id.id())); + proto::SegmentationModelMetadata metadata; + MetadataWriter writer(&metadata); + proto::CustomInput* input = + writer.AddCustomInput(MetadataWriter::CustomInput{ + .tensor_length = 7, + .fill_policy = proto::CustomInput::FILL_TAB_METRICS, + .name = "tab"}); + FeatureProcessorState state; + state.set_input_context_for_testing(input_context); + + base::RunLoop wait; + Tensor result; + tab_source_->Process(*input, state, + base::BindOnce( + [](Tensor* result, base::OnceClosure quit_closure, + bool success, Tensor features) { + result->swap(features); + std::move(quit_closure).Run(); + }, + &result, wait.QuitClosure())); + wait.Run(); + return result; + } + + protected: + base::test::TaskEnvironment task_env_; + MockSessionSyncService session_sync_service_; + MockOpenTabsUIDelegate open_tabs_delegate_; + std::unique_ptr<TabSessionSource> tab_source_; +}; + +TEST_F(TabSessionSourceTest, ProcessLocal) { + const sync_sessions::SyncedSession* local_session = nullptr; + ASSERT_TRUE(session_sync_service_.GetOpenTabsUIDelegate()->GetLocalSession( + &local_session)); + auto& picked_tab = + local_session->windows.begin()->second->wrapped_window.tabs[0]; + const base::TimeDelta kNavTime1 = base::Seconds(40); + const base::TimeDelta kNavTime2 = base::Seconds(25); + picked_tab->navigations.emplace_back(); + picked_tab->navigations.back().set_timestamp(base::Time::Now() - kNavTime1); + picked_tab->navigations.emplace_back(); + picked_tab->navigations.back().set_timestamp(base::Time::Now() - kNavTime2); + picked_tab->navigations.back().set_transition_type( + ui::PAGE_TRANSITION_AUTO_SUBFRAME); + picked_tab->current_navigation_index = 1; + SessionID id = picked_tab->tab_id; + + EXPECT_CALL(open_tabs_delegate_, GetForeignTab(_, _, _)) + .WillOnce([&picked_tab](const std::string& tag, SessionID tab_id, + const sessions::SessionTab** tab) { + *tab = picked_tab.get(); + return true; + }); + EXPECT_CALL(open_tabs_delegate_, GetForeignSession(_, _)) + .WillOnce([&local_session]( + const std::string& tag, + std::vector<const sessions::SessionWindow*>* windows) { + for (const auto& [window_id, window] : local_session->windows) { + windows->push_back(&window->wrapped_window); + } + return true; + }); + + Tensor result = GetResult(local_session->GetSessionTag(), id); + EXPECT_NEAR(result[TabSessionSource::kInputTimeSinceModifiedSec].float_val, + kTime2.InSecondsF(), 0.001); + EXPECT_NEAR(result[TabSessionSource::kInputTimeSinceLastNavSec].float_val, + kNavTime2.InSecondsF(), 0.001); + EXPECT_NEAR(result[TabSessionSource::kInputTimeSinceFirstNavSec].float_val, + kNavTime1.InSecondsF(), 0.001); + EXPECT_NEAR(result[TabSessionSource::kInputLastTransitionType].float_val, + static_cast<int>(ui::PAGE_TRANSITION_AUTO_SUBFRAME), 0.001); + EXPECT_NEAR(result[TabSessionSource::kInputPasswordFieldCount].float_val, 0, + 0.001); + EXPECT_NEAR(result[TabSessionSource::kInputTabRankInSession].float_val, 0, + 0.001); + EXPECT_NEAR(result[TabSessionSource::kInputSessionRank].float_val, 1, 0.001); +} + +TEST_F(TabSessionSourceTest, ProcessForeign) { + std::vector<const sync_sessions::SyncedSession*> foreign_sessions; + ASSERT_TRUE( + session_sync_service_.GetOpenTabsUIDelegate()->GetAllForeignSessions( + &foreign_sessions)); + const auto* picked_session = foreign_sessions[0]; + auto& picked_tab = + picked_session->windows.begin()->second->wrapped_window.tabs[0]; + const base::TimeDelta kNavTime1 = base::Seconds(40); + picked_tab->navigations.emplace_back(); + picked_tab->navigations.back().set_timestamp(base::Time::Now() - kNavTime1); + picked_tab->current_navigation_index = 1; + picked_tab->navigations.back().set_password_state( + sessions::SerializedNavigationEntry::HAS_PASSWORD_FIELD); + SessionID id = picked_tab->tab_id; + + EXPECT_CALL(open_tabs_delegate_, GetForeignTab(_, _, _)) + .WillOnce([&picked_tab](const std::string& tag, SessionID tab_id, + const sessions::SessionTab** tab) { + *tab = picked_tab.get(); + return true; + }); + EXPECT_CALL(open_tabs_delegate_, GetForeignSession(_, _)) + .WillOnce([&picked_session]( + const std::string& tag, + std::vector<const sessions::SessionWindow*>* windows) { + for (const auto& [window_id, window] : picked_session->windows) { + windows->push_back(&window->wrapped_window); + } + return true; + }); + + Tensor result = GetResult(picked_session->GetSessionTag(), id); + EXPECT_NEAR(result[TabSessionSource::kInputTimeSinceModifiedSec].float_val, + kTime3.InSecondsF(), 0.001); + EXPECT_NEAR(result[TabSessionSource::kInputTimeSinceLastNavSec].float_val, + kNavTime1.InSecondsF(), 0.001); + EXPECT_NEAR(result[TabSessionSource::kInputTimeSinceFirstNavSec].float_val, + kNavTime1.InSecondsF(), 0.001); + EXPECT_NEAR(result[TabSessionSource::kInputLastTransitionType].float_val, + static_cast<int>(ui::PAGE_TRANSITION_TYPED), 0.001); + EXPECT_NEAR(result[TabSessionSource::kInputPasswordFieldCount].float_val, 1, + 0.001); + EXPECT_NEAR(result[TabSessionSource::kInputTabRankInSession].float_val, 0, + 0.001); + EXPECT_NEAR(result[TabSessionSource::kInputSessionRank].float_val, 0, 0.001); +} + +} // namespace segmentation_platform::processing
diff --git a/components/segmentation_platform/public/proto/model_metadata.proto b/components/segmentation_platform/public/proto/model_metadata.proto index a780a48a..f7ceb38 100644 --- a/components/segmentation_platform/public/proto/model_metadata.proto +++ b/components/segmentation_platform/public/proto/model_metadata.proto
@@ -151,6 +151,12 @@ // Output type: float // Output length: 1 FILL_DEVICE_PPI = 8; + + // Fills metrics about a given tab. A `tab_id` and `session_tag` is expected + // from input_context. + // Output type: float + // Output length: `TabSessionSource::kNumInputs` + FILL_TAB_METRICS = 9; } // The fill type of the custom input.
diff --git a/components/viz/common/resources/resource_format_utils.cc b/components/viz/common/resources/resource_format_utils.cc index c571195..bdf9c42 100644 --- a/components/viz/common/resources/resource_format_utils.cc +++ b/components/viz/common/resources/resource_format_utils.cc
@@ -449,36 +449,6 @@ NOTREACHED_NORETURN(); } -bool IsBitmapFormatSupported(ResourceFormat format) { - switch (format) { - case RGBA_8888: - return true; - case RGBA_4444: - case BGRA_8888: - case ALPHA_8: - case LUMINANCE_8: - case RGB_565: - case ETC1: - case RED_8: - case LUMINANCE_F16: - case RGBA_F16: - case R16_EXT: - case RG16_EXT: - case BGR_565: - case RG_88: - case RGBX_8888: - case BGRX_8888: - case RGBA_1010102: - case BGRA_1010102: - case YVU_420: - case YUV_420_BIPLANAR: - case YUVA_420_TRIPLANAR: - case P010: - return false; - } - NOTREACHED_NORETURN(); -} - SharedImageFormat GetSharedImageFormat(gfx::BufferFormat format) { switch (format) { case gfx::BufferFormat::BGRA_8888:
diff --git a/components/viz/common/resources/resource_format_utils.h b/components/viz/common/resources/resource_format_utils.h index 0ce5867..94cf534 100644 --- a/components/viz/common/resources/resource_format_utils.h +++ b/components/viz/common/resources/resource_format_utils.h
@@ -74,10 +74,6 @@ VIZ_RESOURCE_FORMAT_EXPORT bool IsGpuMemoryBufferFormatSupported( ResourceFormat format); -// Returns whether the format can be used as a software bitmap for export to the -// display compositor. -VIZ_RESOURCE_FORMAT_EXPORT bool IsBitmapFormatSupported(ResourceFormat format); - VIZ_RESOURCE_FORMAT_EXPORT SharedImageFormat GetSharedImageFormat(gfx::BufferFormat format);
diff --git a/components/viz/host/gpu_host_impl.cc b/components/viz/host/gpu_host_impl.cc index eed630e..173d9f1 100644 --- a/components/viz/host/gpu_host_impl.cc +++ b/components/viz/host/gpu_host_impl.cc
@@ -329,7 +329,7 @@ } #if BUILDFLAG(USE_VIZ_DEBUGGER) -void GpuHostImpl::FilterVisualDebugStream(base::Value json) { +void GpuHostImpl::FilterVisualDebugStream(base::Value::Dict json) { viz_main_->FilterDebugStream(std::move(json)); }
diff --git a/components/viz/host/gpu_host_impl.h b/components/viz/host/gpu_host_impl.h index 7feab22..3a000f9 100644 --- a/components/viz/host/gpu_host_impl.h +++ b/components/viz/host/gpu_host_impl.h
@@ -194,7 +194,7 @@ #if BUILDFLAG(USE_VIZ_DEBUGGER) // Command as a Json string that the visual debugging instance interprets as // stream filtering. - void FilterVisualDebugStream(base::Value filter_data); + void FilterVisualDebugStream(base::Value::Dict filter_data); // Establishes the connection between the visual debugging instance and the // output stream.
diff --git a/components/viz/service/debugger/viz_debugger.cc b/components/viz/service/debugger/viz_debugger.cc index ec0f57d..c1583ef1 100644 --- a/components/viz/service/debugger/viz_debugger.cc +++ b/components/viz/service/debugger/viz_debugger.cc
@@ -434,25 +434,24 @@ read_write_lock_.WriteUnLock(); } -void VizDebugger::FilterDebugStream(base::Value json) { +void VizDebugger::FilterDebugStream(base::Value::Dict json) { read_write_lock_.WriteLock(); DCHECK(gpu_thread_task_runner_->RunsTasksInCurrentSequence()); - const base::Value* value = &(json); - const base::Value* filterlist = value->FindPath("filters"); + const base::Value::List* filters = json.FindList("filters"); - if (!filterlist || !filterlist->is_list()) { + if (!filters) { LOG(ERROR) << "Missing filter list in json: " << json; return; } new_filters_.clear(); - for (const auto& filter : filterlist->GetList()) { - const base::Value* file = filter.FindPath("selector.file"); - const base::Value* func = filter.FindPath("selector.func"); - const base::Value* anno = filter.FindPath("selector.anno"); - const base::Value* active = filter.FindPath("active"); - const base::Value* enabled = filter.FindPath("enabled"); + for (const auto& entry : *filters) { + const auto& filter = entry.GetDict(); + const base::Value* file = filter.FindByDottedPath("selector.file"); + const base::Value* func = filter.FindByDottedPath("selector.func"); + const base::Value* anno = filter.FindByDottedPath("selector.anno"); + const base::Value* active = filter.Find("active"); if (!active) { LOG(ERROR) << "Missing filter props in json: " << json; @@ -469,9 +468,9 @@ return (filter_str ? filter_str->GetString() : std::string()); }; - new_filters_.emplace_back( - check_str(file), check_str(func), check_str(anno), active->GetBool(), - (enabled && enabled->is_bool()) ? enabled->GetBool() : true); + absl::optional<bool> enabled = filter.FindBool("enabled"); + new_filters_.emplace_back(check_str(file), check_str(func), check_str(anno), + active->GetBool(), enabled.value_or(true)); } apply_new_filters_next_frame_ = true;
diff --git a/components/viz/service/debugger/viz_debugger.h b/components/viz/service/debugger/viz_debugger.h index a99a6c8..b081367 100644 --- a/components/viz/service/debugger/viz_debugger.h +++ b/components/viz/service/debugger/viz_debugger.h
@@ -41,7 +41,7 @@ public: // These functions are called on a gpu thread that is not the // 'VizCompositorThread' and therefore have mulithreaded considerations. - void FilterDebugStream(base::Value json); + void FilterDebugStream(base::Value::Dict json); void StartDebugStream( mojo::PendingRemote<mojom::VizDebugOutput> pending_debug_output); void StopDebugStream();
diff --git a/components/viz/service/debugger/viz_debugger_unittests/viz_debugger_unittest_base.cc b/components/viz/service/debugger/viz_debugger_unittests/viz_debugger_unittest_base.cc index 6e4fb4eb..59f120e 100644 --- a/components/viz/service/debugger/viz_debugger_unittests/viz_debugger_unittest_base.cc +++ b/components/viz/service/debugger/viz_debugger_unittests/viz_debugger_unittest_base.cc
@@ -84,7 +84,7 @@ filters_list.Append(std::move(full_filter)); } filters_json.Set("filters", std::move(filters_list)); - GetInternal()->FilterDebugStream(base::Value(std::move(filters_json))); + GetInternal()->FilterDebugStream(std::move(filters_json)); GetInternal()->GetRWLock()->WriteLock(); GetInternal()->UpdateFilters(); GetInternal()->GetRWLock()->WriteUnLock();
diff --git a/components/viz/service/main/viz_main_impl.cc b/components/viz/service/main/viz_main_impl.cc index 736d396a..3314f6d 100644 --- a/components/viz/service/main/viz_main_impl.cc +++ b/components/viz/service/main/viz_main_impl.cc
@@ -276,7 +276,7 @@ } #if BUILDFLAG(USE_VIZ_DEBUGGER) -void VizMainImpl::FilterDebugStream(base::Value filter_data) { +void VizMainImpl::FilterDebugStream(base::Value::Dict filter_data) { VizDebugger::GetInstance()->FilterDebugStream(std::move(filter_data)); }
diff --git a/components/viz/service/main/viz_main_impl.h b/components/viz/service/main/viz_main_impl.h index 8afa70b..5b46b54e 100644 --- a/components/viz/service/main/viz_main_impl.h +++ b/components/viz/service/main/viz_main_impl.h
@@ -132,7 +132,7 @@ #endif void CreateFrameSinkManager(mojom::FrameSinkManagerParamsPtr params) override; #if BUILDFLAG(USE_VIZ_DEBUGGER) - void FilterDebugStream(base::Value filter_data) override; + void FilterDebugStream(base::Value::Dict filter_data) override; void StartDebugStream( mojo::PendingRemote<mojom::VizDebugOutput> debug_output) override; void StopDebugStream() override;
diff --git a/components/webauthn/android/java/src/org/chromium/components/webauthn/Fido2CredentialRequest.java b/components/webauthn/android/java/src/org/chromium/components/webauthn/Fido2CredentialRequest.java index a56fe6c..a2328be2 100644 --- a/components/webauthn/android/java/src/org/chromium/components/webauthn/Fido2CredentialRequest.java +++ b/components/webauthn/android/java/src/org/chromium/components/webauthn/Fido2CredentialRequest.java
@@ -13,6 +13,7 @@ import android.os.Bundle; import android.os.OutcomeReceiver; import android.os.Parcel; +import android.util.Base64; import android.util.Pair; import androidx.annotation.Nullable; @@ -68,6 +69,8 @@ public class Fido2CredentialRequest implements Callback<Pair<Integer, Intent>> { private static final String TAG = "Fido2Request"; private static final String CRED_MAN_PREFIX = "androidx.credentials."; + private static final String GPM_COMPONENT_NAME = "com.google.android.gms/com.google.android.gms" + + ".auth.api.credentials.credman.service.PasswordAndPasskeyService"; static final String NON_EMPTY_ALLOWLIST_ERROR_MSG = "Authentication request must have non-empty allowList"; static final String NON_VALID_ALLOWED_CREDENTIALS_ERROR_MSG = @@ -789,6 +792,16 @@ requestBundle.putBoolean( CRED_MAN_PREFIX + "BUNDLE_KEY_PREFER_IMMEDIATELY_AVAILABLE_CREDENTIALS", false); + final Bundle displayInfoBundle = new Bundle(); + displayInfoBundle.putCharSequence(CRED_MAN_PREFIX + "BUNDLE_KEY_USER_ID", + Base64.encodeToString( + options.user.id, Base64.URL_SAFE | Base64.NO_PADDING | Base64.NO_WRAP)); + displayInfoBundle.putString( + CRED_MAN_PREFIX + "BUNDLE_KEY_DEFAULT_PROVIDER", GPM_COMPONENT_NAME); + + requestBundle.putBundle( + CRED_MAN_PREFIX + "BUNDLE_KEY_REQUEST_DISPLAY_INFO", displayInfoBundle); + // The Android 14 APIs have to be called via reflection until Chromium // builds with the Android 14 SDK by default. OutcomeReceiver receiver = new OutcomeReceiver<Object, Throwable>() {
diff --git a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.h b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.h index 09b562f..c172f33 100644 --- a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.h +++ b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.h
@@ -126,6 +126,11 @@ // Indicates if we are currently handling a key down event. BOOL _handlingKeyDown; + // Indicates if a reconversion (which means a piece of committed text becomes + // part of the composition again) is triggered in Japanese IME when Live + // Conversion is on. + BOOL _isReconversionTriggered; + // Indicates if there is any marked text. BOOL _hasMarkedText;
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 311d9c2..b95ab55 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
@@ -1018,6 +1018,20 @@ // down event. _handlingKeyDown = YES; + // This is to handle an edge case for the "Live Conversion" feature in default + // Japanese IME. When the feature is on, pressing the left key at the + // composition boundary will reconvert previously committed text. The text + // input system will call setMarkedText multiple times to end the current + // composition and start a new one. In this case we'll need to call + // ImeSetComposition in setMarkedText instead of here in keyEvent:, otherwise, + // only the last setMarkedText will be processed. + ui::DomCode domCode = ui::KeycodeConverter::NativeKeycodeToDomCode(keyCode); + _isReconversionTriggered = + base::FeatureList::IsEnabled(features::kMacImeLiveConversionFix) && + _hasMarkedText && domCode == ui::DomCode::ARROW_LEFT && + _markedTextSelectedRange.location == 0 && _markedRange.location != 0 && + _markedRange.location != NSNotFound; + // These variables might be set when handling the keyboard event. // Clear them here so that we can know whether they have changed afterwards. _textToBeInserted.clear(); @@ -1139,10 +1153,12 @@ // composition node in WebKit. // When marked text is available, |markedTextSelectedRange_| will be the // range being selected inside the marked text. - _host->ImeSetComposition(_markedText, _ime_text_spans, - _setMarkedTextReplacementRange, - _markedTextSelectedRange.location, - NSMaxRange(_markedTextSelectedRange)); + if (!_isReconversionTriggered) { + _host->ImeSetComposition(_markedText, _ime_text_spans, + _setMarkedTextReplacementRange, + _markedTextSelectedRange.location, + NSMaxRange(_markedTextSelectedRange)); + } } else if (oldHasMarkedText && !_hasMarkedText && !textInserted) { if (_unmarkTextCalled) { _host->ImeFinishComposingText(); @@ -1151,6 +1167,8 @@ } } + _isReconversionTriggered = NO; + // Clear information from |interpretKeyEvents:| _setMarkedTextReplacementRange = gfx::Range::InvalidRange(); @@ -1999,22 +2017,51 @@ BOOL isAttributedString = [string isKindOfClass:[NSAttributedString class]]; NSString* im_text = isAttributedString ? [string string] : string; int length = [im_text length]; + const BOOL fixLiveConversion = + base::FeatureList::IsEnabled(features::kMacImeLiveConversionFix); // |markedRange_| will get set on a callback from ImeSetComposition(). _markedTextSelectedRange = newSelRange; _markedText = base::SysNSStringToUTF16(im_text); - _hasMarkedText = (length > 0); - // Update markedRange assuming blink sets composition text as is. - // We need this because the IME checks markedRange before IPC to blink. - // If markedRange is not updated, IME won't update the popup window position. + // Update markedRange/textSelectionRange assuming blink sets composition text + // as is. We need this because the IME checks markedRange/textSelectionRange + // before IPC to blink. If markedRange/textSelectionRange is not updated, IME + // will behave incorrectly, e.g., wrong popup window position or duplicate + // characters. if (length > 0) { - if (replacementRange.location != NSNotFound) { - _markedRange.location = replacementRange.location; + _hasMarkedText = YES; + if (!fixLiveConversion) { + length = [string length]; } - _markedRange.length = [string length]; + if (replacementRange.location != NSNotFound) { + // If the replacement range is valid, the range should be replaced with + // the new text. + _markedRange = NSMakeRange(replacementRange.location, length); + } else if (fixLiveConversion && _markedRange.location == NSNotFound) { + // If no replacement range and no marked range, the current selection + // should be replaced. + _markedRange = NSMakeRange(_textSelectionRange.start(), length); + } else { + // If no replacement range and the marked range is valid, the current + // marked text should be replaced. + _markedRange.length = length; + } + + if (fixLiveConversion) { + _textSelectionRange = + gfx::Range(_markedRange.location + newSelRange.location, + _markedRange.location + NSMaxRange(newSelRange)); + } } else { + // An empty text means the composition is about to be cancelled, + // collapse the selection to the begining of the current marked range. + if (fixLiveConversion && _hasMarkedText) { + _textSelectionRange = + gfx::Range(_markedRange.location, _markedRange.location); + } _markedRange = NSMakeRange(NSNotFound, 0); + _hasMarkedText = NO; } _ime_text_spans.clear(); @@ -2028,14 +2075,14 @@ SK_ColorTRANSPARENT); } - // If we are handling a key down event, then SetComposition() will be - // called in keyEvent: method. + // If we are handling a key down event and the reconversion is not triggered, + // SetComposition() will be called in keyEvent: method. // Input methods of Mac use setMarkedText calls with an empty text to cancel // an ongoing composition. So, we should check whether or not the given text // is empty to update the input method state. (Our input method backend // automatically cancels an ongoing composition when we send an empty text. // So, it is OK to send an empty text to the renderer.) - if (_handlingKeyDown) { + if (_handlingKeyDown && !_isReconversionTriggered) { _setMarkedTextReplacementRange = gfx::Range(replacementRange); } else { _host->ImeSetComposition(_markedText, _ime_text_spans,
diff --git a/content/browser/devtools/devtools_instrumentation.cc b/content/browser/devtools/devtools_instrumentation.cc index 442fc2c..7ccd866c 100644 --- a/content/browser/devtools/devtools_instrumentation.cc +++ b/content/browser/devtools/devtools_instrumentation.cc
@@ -466,7 +466,8 @@ int initiator_frame_tree_node_id, const base::UnguessableToken& initiator_devtools_navigation_token, const GURL& prerender_url, - PreloadingTriggeringOutcome status) { + PreloadingTriggeringOutcome status, + absl::optional<PrerenderFinalStatus> prerender_status) { auto* ftn = FrameTreeNode::GloballyFindByID(initiator_frame_tree_node_id); // ftn will be null if this is browser-initiated, which has no initiator. if (ftn) { @@ -474,7 +475,7 @@ ftn->current_frame_host()->devtools_frame_token().ToString(); DispatchToAgents(ftn, &protocol::PreloadHandler::DidUpdatePrerenderStatus, initiator_devtools_navigation_token, initiating_frame_id, - prerender_url, status); + prerender_url, status, prerender_status); } }
diff --git a/content/browser/devtools/devtools_instrumentation.h b/content/browser/devtools/devtools_instrumentation.h index fc3266f..57947de2 100644 --- a/content/browser/devtools/devtools_instrumentation.h +++ b/content/browser/devtools/devtools_instrumentation.h
@@ -214,7 +214,8 @@ int initiator_frame_tree_node_id, const base::UnguessableToken& initiator_devtools_navigation_token, const GURL& prerender_url, - PreloadingTriggeringOutcome status); + PreloadingTriggeringOutcome status, + absl::optional<PrerenderFinalStatus> prerender_status); void OnSignedExchangeReceived( FrameTreeNode* frame_tree_node,
diff --git a/content/browser/devtools/protocol/devtools_protocol_browsertest.cc b/content/browser/devtools/protocol/devtools_protocol_browsertest.cc index e880b2e..9f7348d 100644 --- a/content/browser/devtools/protocol/devtools_protocol_browsertest.cc +++ b/content/browser/devtools/protocol/devtools_protocol_browsertest.cc
@@ -3962,8 +3962,7 @@ NavigatePrimaryPage(kPrerenderingUrl); base::Value::Dict result = WaitForNotification("Preload.prerenderAttemptCompleted", true); - EXPECT_THAT(*result.FindString("finalStatus"), - Eq("OtherPrerenderedPageActivated")); + EXPECT_THAT(*result.FindString("finalStatus"), Eq("TriggerDestroyed")); // TODO(crbug/1332386): Verifies that multiple activations can be received // properly when crbug/1350676 is ready. kPrerenderingUrl2 should be canceled
diff --git a/content/browser/devtools/protocol/preload_handler.cc b/content/browser/devtools/protocol/preload_handler.cc index b3c2020..2914400 100644 --- a/content/browser/devtools/protocol/preload_handler.cc +++ b/content/browser/devtools/protocol/preload_handler.cc
@@ -162,12 +162,6 @@ return Preload::PrerenderFinalStatusEnum::MemoryPressureOnTrigger; case PrerenderFinalStatus::kMemoryPressureAfterTriggered: return Preload::PrerenderFinalStatusEnum::MemoryPressureAfterTriggered; - case PrerenderFinalStatus::kSpeculationRuleRemoved: - return Preload::PrerenderFinalStatusEnum::SpeculationRuleRemoved; - case PrerenderFinalStatus::kTriggerPageNavigated: - return Preload::PrerenderFinalStatusEnum::TriggerPageNavigated; - case PrerenderFinalStatus::kOtherPrerenderedPageActivated: - return Preload::PrerenderFinalStatusEnum::OtherPrerenderedPageActivated; } } @@ -389,7 +383,8 @@ const base::UnguessableToken& initiator_devtools_navigation_token, const std::string& initiating_frame_id, const GURL& prerender_url, - PreloadingTriggeringOutcome status) { + PreloadingTriggeringOutcome status, + absl::optional<PrerenderFinalStatus> prerender_status) { if (!enabled_) { return; } @@ -400,10 +395,15 @@ .SetAction(Preload::SpeculationActionEnum::Prerender) .SetUrl(prerender_url.spec()) .Build(); + Maybe<Preload::PrerenderFinalStatus> protocol_prerender_status = + prerender_status.has_value() + ? PrerenderFinalStatusToProtocol(prerender_status.value()) + : Maybe<Preload::PrerenderFinalStatus>(); if (PreloadingTriggeringOutcomeSupportedByPrerender(status)) { frontend_->PrerenderStatusUpdated( std::move(preloading_attempt_key), initiating_frame_id, - prerender_url.spec(), PreloadingTriggeringOutcomeToProtocol(status)); + prerender_url.spec(), PreloadingTriggeringOutcomeToProtocol(status), + std::move(protocol_prerender_status)); } }
diff --git a/content/browser/devtools/protocol/preload_handler.h b/content/browser/devtools/protocol/preload_handler.h index fe8d51c..d9156eae 100644 --- a/content/browser/devtools/protocol/preload_handler.h +++ b/content/browser/devtools/protocol/preload_handler.h
@@ -54,7 +54,8 @@ const base::UnguessableToken& initiator_devtools_navigation_token, const std::string& initiating_frame_id, const GURL& prerender_url, - PreloadingTriggeringOutcome status); + PreloadingTriggeringOutcome status, + absl::optional<PrerenderFinalStatus> prerender_status); private: Response Enable() override;
diff --git a/content/browser/devtools/protocol/visual_debugger_handler.cc b/content/browser/devtools/protocol/visual_debugger_handler.cc index e0a96cb..dd56e5e 100644 --- a/content/browser/devtools/protocol/visual_debugger_handler.cc +++ b/content/browser/devtools/protocol/visual_debugger_handler.cc
@@ -35,16 +35,14 @@ DispatchResponse VisualDebuggerHandler::FilterStream( std::unique_ptr<base::Value::Dict> in_filter) { - base::Value dict(std::move(*in_filter)); - GpuProcessHost::CallOnIO( FROM_HERE, GPU_PROCESS_KIND_SANDBOXED, /*force_create=*/false, base::BindOnce( - [](base::Value json, GpuProcessHost* host) { + [](base::Value::Dict json, GpuProcessHost* host) { host->gpu_host()->FilterVisualDebugStream(std::move(json)); }, - std::move(dict))); + std::move(*in_filter))); return DispatchResponse::Success(); }
diff --git a/content/browser/indexed_db/transaction_impl.cc b/content/browser/indexed_db/transaction_impl.cc index db0b9ff..4525c247 100644 --- a/content/browser/indexed_db/transaction_impl.cc +++ b/content/browser/indexed_db/transaction_impl.cc
@@ -118,11 +118,6 @@ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); CHECK(dispatcher_host_); - std::vector<IndexedDBExternalObject> external_objects; - if (!input_value->external_objects.empty()) { - CreateExternalObjects(input_value, &external_objects); - } - if (!transaction_) { IndexedDBDatabaseError error(blink::mojom::IDBException::kUnknownError, "Unknown transaction."); @@ -151,7 +146,14 @@ return; } - uint64_t commit_size = input_value->bits.size() + key.size_estimate(); + std::vector<IndexedDBExternalObject> external_objects; + uint64_t total_blob_size = 0; + if (!input_value->external_objects.empty()) { + total_blob_size = CreateExternalObjects(input_value, &external_objects); + } + + transaction_->set_size(input_value->bits.size() + key.size_estimate() + + total_blob_size); std::unique_ptr<IndexedDBDatabase::PutOperationParams> params( std::make_unique<IndexedDBDatabase::PutOperationParams>()); IndexedDBValue& output_value = params->value; @@ -179,13 +181,9 @@ transaction_->ScheduleTask(BindWeakOperation( &IndexedDBDatabase::PutOperation, connection->database()->AsWeakPtr(), std::move(params))); - - // Size can't be big enough to overflow because it represents the - // actual bytes passed through IPC. - transaction_->set_size(transaction_->size() + commit_size); } -void TransactionImpl::CreateExternalObjects( +uint64_t TransactionImpl::CreateExternalObjects( blink::mojom::IDBValuePtr& value, std::vector<IndexedDBExternalObject>* external_objects) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); @@ -220,6 +218,7 @@ break; } } + return total_blob_size.ValueOrDie(); } void TransactionImpl::Commit(int64_t num_errors_handled) {
diff --git a/content/browser/indexed_db/transaction_impl.h b/content/browser/indexed_db/transaction_impl.h index 03e3afc4..3f1ee2b 100644 --- a/content/browser/indexed_db/transaction_impl.h +++ b/content/browser/indexed_db/transaction_impl.h
@@ -58,7 +58,7 @@ private: // Turns an IDBValue into a set of IndexedDBExternalObjects in // |external_objects|. - void CreateExternalObjects( + uint64_t CreateExternalObjects( blink::mojom::IDBValuePtr& value, std::vector<IndexedDBExternalObject>* external_objects);
diff --git a/content/browser/preloading/prerender/prerender_browsertest.cc b/content/browser/preloading/prerender/prerender_browsertest.cc index 821efa2..8ab4892 100644 --- a/content/browser/preloading/prerender/prerender_browsertest.cc +++ b/content/browser/preloading/prerender/prerender_browsertest.cc
@@ -1395,8 +1395,7 @@ host_observer.WaitForDestroyed(); EXPECT_EQ(GetHostForUrl(kPrerenderingUrl), RenderFrameHost::kNoFrameTreeNodeId); - ExpectFinalStatusForSpeculationRule( - PrerenderFinalStatus::kSpeculationRuleRemoved); + ExpectFinalStatusForSpeculationRule(PrerenderFinalStatus::kTriggerDestroyed); } IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, @@ -5018,7 +5017,7 @@ PrerenderFinalStatus::kActivated, 1); histogram_tester().ExpectBucketCount( "Prerender.Experimental.PrerenderHostFinalStatus.SpeculationRule", - PrerenderFinalStatus::kOtherPrerenderedPageActivated, 2); + PrerenderFinalStatus::kTriggerDestroyed, 2); } // Tests that a cancelled request in the pending queue is skipped and the next @@ -5073,7 +5072,7 @@ // The first prerender is destroyed by SpeculationHostImpl. histogram_tester().ExpectBucketCount( "Prerender.Experimental.PrerenderHostFinalStatus.SpeculationRule", - PrerenderFinalStatus::kOtherPrerenderedPageActivated, 1); + PrerenderFinalStatus::kTriggerDestroyed, 1); // The second prerender is destroyed directly. histogram_tester().ExpectBucketCount( @@ -5169,7 +5168,7 @@ // The first prerender was destroyed by SpeculationHostImpl. histogram_tester().ExpectBucketCount( "Prerender.Experimental.PrerenderHostFinalStatus.SpeculationRule", - PrerenderFinalStatus::kTriggerPageNavigated, 1); + PrerenderFinalStatus::kTriggerDestroyed, 1); // The second prerender is destroyed since activation navigation is requested // while it's still pending. histogram_tester().ExpectBucketCount( @@ -5450,7 +5449,7 @@ // The first prerender should be cancelled by the trigger. histogram_tester().ExpectBucketCount( "Prerender.Experimental.PrerenderHostFinalStatus.SpeculationRule", - PrerenderFinalStatus::kSpeculationRuleRemoved, 1); + PrerenderFinalStatus::kTriggerDestroyed, 1); // The second prerender should be successfully activated. histogram_tester().ExpectBucketCount( "Prerender.Experimental.PrerenderHostFinalStatus.SpeculationRule", @@ -7554,17 +7553,7 @@ // initial page was in the back/forward cache. prerender_observer.WaitForDestroyed(); EXPECT_FALSE(HasHostForUrl(kPrerenderingUrl)); - - switch (GetParam()) { - case BackForwardCacheType::kDisabled: - ExpectFinalStatusForSpeculationRule( - PrerenderFinalStatus::kTriggerDestroyed); - break; - case BackForwardCacheType::kEnabled: - ExpectFinalStatusForSpeculationRule( - PrerenderFinalStatus::kTriggerPageNavigated); - break; - } + ExpectFinalStatusForSpeculationRule(PrerenderFinalStatus::kTriggerDestroyed); } // Tests that a trigger page destroys a prerendered page when it navigates back @@ -7611,17 +7600,7 @@ // next page was in the back/forward cache. prerender_observer.WaitForDestroyed(); EXPECT_FALSE(HasHostForUrl(kPrerenderingUrl)); - - switch (GetParam()) { - case BackForwardCacheType::kDisabled: - ExpectFinalStatusForSpeculationRule( - PrerenderFinalStatus::kTriggerDestroyed); - break; - case BackForwardCacheType::kEnabled: - ExpectFinalStatusForSpeculationRule( - PrerenderFinalStatus::kTriggerPageNavigated); - break; - } + ExpectFinalStatusForSpeculationRule(PrerenderFinalStatus::kTriggerDestroyed); } // Tests that PrerenderHostRegistry can hold up to two prerendering for the @@ -8036,7 +8015,7 @@ PrerenderFinalStatus::kMemoryLimitExceeded, 0); // Activate one of the prerendered pages. This should cancel the other - // prerendered pages. + // prerendered as kTriggerDestroyed. NavigatePrimaryPage(urls[0]); ASSERT_EQ(web_contents()->GetLastCommittedURL(), urls[0]); histogram_tester().ExpectBucketCount( @@ -8044,7 +8023,7 @@ PrerenderFinalStatus::kActivated, 1); histogram_tester().ExpectBucketCount( "Prerender.Experimental.PrerenderHostFinalStatus.SpeculationRule", - PrerenderFinalStatus::kOtherPrerenderedPageActivated, 2); + PrerenderFinalStatus::kTriggerDestroyed, 2); } // Tests that cross-site urls cannot be prerendered.
diff --git a/content/browser/preloading/prerender/prerender_final_status.h b/content/browser/preloading/prerender/prerender_final_status.h index 9c255c64..3960a4c 100644 --- a/content/browser/preloading/prerender/prerender_final_status.h +++ b/content/browser/preloading/prerender/prerender_final_status.h
@@ -114,14 +114,7 @@ kMemoryPressureOnTrigger = 67, kMemoryPressureAfterTriggered = 68, - // A trigger page removed a prerendering URL from - // <script type="speculationrules">. - kSpeculationRuleRemoved = 69, - - kTriggerPageNavigated = 70, - kOtherPrerenderedPageActivated = 71, - - kMaxValue = kOtherPrerenderedPageActivated, + kMaxValue = kMemoryPressureAfterTriggered, }; // Helper method to convert PrerenderFinalStatus to PreloadingFailureReason.
diff --git a/content/browser/preloading/prerender/prerender_host.cc b/content/browser/preloading/prerender/prerender_host.cc index 729097a..16c0336 100644 --- a/content/browser/preloading/prerender/prerender_host.cc +++ b/content/browser/preloading/prerender/prerender_host.cc
@@ -956,10 +956,12 @@ void PrerenderHost::SetTriggeringOutcome(PreloadingTriggeringOutcome outcome) { if (initiator_devtools_navigation_token().has_value()) { + // Report the current preloading outcome. Regarding prerender_status, it's + // not finalized yet and will be reported on failure. devtools_instrumentation::DidUpdatePrerenderStatus( initiator_frame_tree_node_id(), initiator_devtools_navigation_token().value(), prerendering_url(), - outcome); + outcome, /*prerender_status=*/absl::nullopt); } if (!attempt_) @@ -981,9 +983,6 @@ case PrerenderFinalStatus::kActivatedBeforeStarted: case PrerenderFinalStatus::kTabClosedByUserGesture: case PrerenderFinalStatus::kTabClosedWithoutUserGesture: - case PrerenderFinalStatus::kSpeculationRuleRemoved: - case PrerenderFinalStatus::kTriggerPageNavigated: - case PrerenderFinalStatus::kOtherPrerenderedPageActivated: return; case PrerenderFinalStatus::kDestroyed: case PrerenderFinalStatus::kLowEndDevice: @@ -1049,7 +1048,7 @@ devtools_instrumentation::DidUpdatePrerenderStatus( initiator_frame_tree_node_id(), initiator_devtools_navigation_token().value(), prerendering_url(), - PreloadingTriggeringOutcome::kFailure); + PreloadingTriggeringOutcome::kFailure, status); } if (attempt_) {
diff --git a/content/browser/preloading/prerender/prerender_host_registry.cc b/content/browser/preloading/prerender/prerender_host_registry.cc index 39817194..b16b6420 100644 --- a/content/browser/preloading/prerender/prerender_host_registry.cc +++ b/content/browser/preloading/prerender/prerender_host_registry.cc
@@ -1270,9 +1270,9 @@ } else { CHECK(prerender_new_tab_handle_by_frame_tree_node_id_.empty()); } - CancelHosts(cancelled_prerenders, - PrerenderCancellationReason( - PrerenderFinalStatus::kOtherPrerenderedPageActivated)); + CancelHosts( + cancelled_prerenders, + PrerenderCancellationReason(PrerenderFinalStatus::kTriggerDestroyed)); pending_prerenders_.clear(); return host->frame_tree_node_id();
diff --git a/content/browser/preloading/prerenderer_impl.cc b/content/browser/preloading/prerenderer_impl.cc index 1c08e95..1caefef 100644 --- a/content/browser/preloading/prerenderer_impl.cc +++ b/content/browser/preloading/prerenderer_impl.cc
@@ -6,6 +6,7 @@ #include "content/browser/preloading/preloading.h" #include "content/browser/preloading/prerender/prerender_attributes.h" +#include "content/browser/preloading/prerender/prerender_final_status.h" #include "content/browser/preloading/prerender/prerender_host_registry.h" #include "content/browser/preloading/prerender/prerender_metrics.h" #include "content/browser/preloading/prerender/prerender_navigation_utils.h" @@ -47,7 +48,7 @@ PrerendererImpl::~PrerendererImpl() { DCHECK_CURRENTLY_ON(BrowserThread::UI); - CancelStartedPrerenders(PrerenderFinalStatus::kTriggerDestroyed); + CancelStartedPrerenders(); } void PrerendererImpl::PrimaryPageChanged(Page& page) { @@ -60,7 +61,7 @@ // before the next primary page swaps in so that the next page can trigger a // new prerender without hitting the max number of running prerenders. DCHECK_CURRENTLY_ON(BrowserThread::UI); - CancelStartedPrerenders(PrerenderFinalStatus::kTriggerPageNavigated); + CancelStartedPrerenders(); } // TODO(isaboori) Part of the logic in |ProcessCandidatesForPrerender| method is @@ -147,9 +148,9 @@ started_it = equal_prerender_end; } - registry_->CancelHosts(removed_prerender_rules, - PrerenderCancellationReason( - PrerenderFinalStatus::kSpeculationRuleRemoved)); + registry_->CancelHosts( + removed_prerender_rules, + PrerenderCancellationReason(PrerenderFinalStatus::kTriggerDestroyed)); { base::flat_set<int> removed_prerender_rules_set( removed_prerender_rules.begin(), removed_prerender_rules.end()); @@ -281,15 +282,15 @@ return begin != end; } -void PrerendererImpl::CancelStartedPrerenders( - PrerenderFinalStatus final_status) { +void PrerendererImpl::CancelStartedPrerenders() { if (registry_) { std::vector<int> started_prerender_ids; for (auto& prerender_info : started_prerenders_) { started_prerender_ids.push_back(prerender_info.prerender_host_id); } - registry_->CancelHosts(started_prerender_ids, - PrerenderCancellationReason(final_status)); + registry_->CancelHosts( + started_prerender_ids, + PrerenderCancellationReason(PrerenderFinalStatus::kTriggerDestroyed)); } started_prerenders_.clear();
diff --git a/content/browser/preloading/prerenderer_impl.h b/content/browser/preloading/prerenderer_impl.h index f5566ec..aafa90a 100644 --- a/content/browser/preloading/prerenderer_impl.h +++ b/content/browser/preloading/prerenderer_impl.h
@@ -5,14 +5,13 @@ #ifndef CONTENT_BROWSER_PRELOADING_PRERENDERER_IMPL_H_ #define CONTENT_BROWSER_PRELOADING_PRERENDERER_IMPL_H_ -#include "content/browser/preloading/prerender/prerender_final_status.h" #include "content/browser/preloading/prerenderer.h" #include "content/public/browser/web_contents_observer.h" namespace content { -class Page; class PrerenderHostRegistry; +class Page; // Handles speculation-rules based prerenders. class CONTENT_EXPORT PrerendererImpl : public Prerenderer, WebContentsObserver { @@ -33,7 +32,7 @@ bool ShouldWaitForPrerenderResult(const GURL& url) override; private: - void CancelStartedPrerenders(PrerenderFinalStatus final_status); + void CancelStartedPrerenders(); // This is kept sorted by URL. struct PrerenderInfo;
diff --git a/content/browser/preloading/speculation_rules/OWNERS b/content/browser/preloading/speculation_rules/OWNERS index 375341e..c1a978e65 100644 --- a/content/browser/preloading/speculation_rules/OWNERS +++ b/content/browser/preloading/speculation_rules/OWNERS
@@ -1,3 +1 @@ -jbroman@chromium.org -lingqi@chromium.org -ryansturm@chromium.org \ No newline at end of file +file://third_party/blink/renderer/core/speculation_rules/OWNERS
diff --git a/content/browser/renderer_host/media/peer_connection_tracker_host.cc b/content/browser/renderer_host/media/peer_connection_tracker_host.cc index 8803f3f..d30c90b 100644 --- a/content/browser/renderer_host/media/peer_connection_tracker_host.cc +++ b/content/browser/renderer_host/media/peer_connection_tracker_host.cc
@@ -281,6 +281,11 @@ tracker_->GetLegacyStats(); } +void PeerConnectionTrackerHost::GetCurrentState() { + DCHECK_CURRENTLY_ON(BrowserThread::UI); + tracker_->GetCurrentState(); +} + void PeerConnectionTrackerHost::BindReceiver( mojo::PendingReceiver<blink::mojom::PeerConnectionTrackerHost> pending_receiver) {
diff --git a/content/browser/renderer_host/media/peer_connection_tracker_host.h b/content/browser/renderer_host/media/peer_connection_tracker_host.h index 6e3dfaf..b9df6ed 100644 --- a/content/browser/renderer_host/media/peer_connection_tracker_host.h +++ b/content/browser/renderer_host/media/peer_connection_tracker_host.h
@@ -67,6 +67,7 @@ void StopEventLog(int lid); void GetStandardStats(); void GetLegacyStats(); + void GetCurrentState(); void BindReceiver( mojo::PendingReceiver<blink::mojom::PeerConnectionTrackerHost>
diff --git a/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm b/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm index e1a38db..b9e5693 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm
@@ -1791,6 +1791,97 @@ EXPECT_EQ("SetComposition", GetMessageNames(events)); } +// This test makes sure that selectedRange and markedRange are updated correctly +// in various scenarios. +TEST_F(InputMethodMacTest, MarkedRangeSelectedRange) { + // If the replacement range is valid, the range should be replaced with the + // new text. + { + NSString* text = @"sample text"; + NSRange selectedRange = NSMakeRange(2, 4); + NSRange replacementRange = NSMakeRange(1, 1); + + SetTextInputType(tab_view(), ui::TEXT_INPUT_TYPE_TEXT); + EXPECT_EQ(tab_widget(), text_input_manager()->GetActiveWidget()); + [tab_GetInProcessNSView() setMarkedText:text + selectedRange:selectedRange + replacementRange:replacementRange]; + + NSRange actualSelectedRange = [tab_GetInProcessNSView() selectedRange]; + NSRange actualMarkedRange = [tab_GetInProcessNSView() markedRange]; + + EXPECT_EQ((signed)actualMarkedRange.location, 1); + EXPECT_EQ((signed)actualMarkedRange.length, 11); + EXPECT_EQ((signed)actualSelectedRange.location, 3); + EXPECT_EQ((signed)actualSelectedRange.length, 4); + } + + // If the text is empty, the marked range should be reset and the selection + // should be collapsed to the begining of the old marked range. + { + NSString* text = @""; + NSRange selectedRange = NSMakeRange(0, 0); + NSRange replacementRange = NSMakeRange(NSNotFound, 0); + + EXPECT_EQ(tab_widget(), text_input_manager()->GetActiveWidget()); + [tab_GetInProcessNSView() setMarkedText:text + selectedRange:selectedRange + replacementRange:replacementRange]; + + NSRange actualSelectedRange = [tab_GetInProcessNSView() selectedRange]; + NSRange actualMarkedRange = [tab_GetInProcessNSView() markedRange]; + + EXPECT_EQ((signed)actualMarkedRange.location, (signed)NSNotFound); + EXPECT_EQ((signed)actualMarkedRange.length, 0); + EXPECT_EQ((signed)actualSelectedRange.location, 1); + EXPECT_EQ((signed)actualSelectedRange.length, 0); + } + + // If no marked range and no replacement range, the current selection should + // be replaced. + { + NSString* text = @"sample2"; + NSRange selectedRange = NSMakeRange(3, 2); + NSRange replacementRange = NSMakeRange(NSNotFound, 0); + + SetTextInputType(tab_view(), ui::TEXT_INPUT_TYPE_TEXT); + EXPECT_EQ(tab_widget(), text_input_manager()->GetActiveWidget()); + [tab_GetInProcessNSView() setMarkedText:text + selectedRange:selectedRange + replacementRange:replacementRange]; + + NSRange actualSelectedRange = [tab_GetInProcessNSView() selectedRange]; + NSRange actualMarkedRange = [tab_GetInProcessNSView() markedRange]; + + EXPECT_EQ((signed)actualMarkedRange.location, 1); + EXPECT_EQ((signed)actualMarkedRange.length, 7); + EXPECT_EQ((signed)actualSelectedRange.location, 4); + EXPECT_EQ((signed)actualSelectedRange.length, 2); + } + + // If the marked range is valid and there is no replacement range, the current + // marked range should be replaced. + { + NSString* text = @"new"; + NSRange selectedRange = NSMakeRange(2, 1); + NSRange replacementRange = NSMakeRange(NSNotFound, 0); + + SetTextInputType(tab_view(), ui::TEXT_INPUT_TYPE_TEXT); + EXPECT_EQ(tab_widget(), text_input_manager()->GetActiveWidget()); + [tab_GetInProcessNSView() setMarkedText:text + selectedRange:selectedRange + replacementRange:replacementRange]; + + NSRange actualSelectedRange = [tab_GetInProcessNSView() selectedRange]; + NSRange actualMarkedRange = [tab_GetInProcessNSView() markedRange]; + + EXPECT_EQ((signed)actualMarkedRange.location, 1); + EXPECT_EQ((signed)actualMarkedRange.length, 3); + EXPECT_EQ((signed)actualSelectedRange.location, 3); + EXPECT_EQ((signed)actualSelectedRange.length, 1); + } +} + // This test verifies that calling insertText on the cocoa view will lead to a // commit text IPC sent to the active widget. TEST_F(InputMethodMacTest, InsertText) {
diff --git a/content/browser/webid/federated_auth_request_impl.cc b/content/browser/webid/federated_auth_request_impl.cc index bcfe121..e6274b7 100644 --- a/content/browser/webid/federated_auth_request_impl.cc +++ b/content/browser/webid/federated_auth_request_impl.cc
@@ -988,7 +988,9 @@ return true; } -bool ShouldRequestPermission(const std::vector<std::string>& scope) { +// static +bool FederatedAuthRequestImpl::ShouldMediateAuthz( + const std::vector<std::string>& scope) { if (!IsFedCmAuthzEnabled()) { return true; } @@ -998,8 +1000,12 @@ // ["sub", "name", "email" and "picture"]. return true; } - return HasScope(scope, "sub") && HasScope(scope, "name") && - HasScope(scope, "email") && HasScope(scope, "picture"); + + if (scope.size() == 2) { + return HasScope(scope, "profile") && HasScope(scope, "email"); + } + + return false; } void FederatedAuthRequestImpl::OnFetchDataForIdpSucceeded( @@ -1010,7 +1016,7 @@ const GURL& idp_config_url = idp_info->provider->config_url; - bool request_permission = ShouldRequestPermission(idp_info->provider->scope); + bool request_permission = ShouldMediateAuthz(idp_info->provider->scope); const std::string idp_for_display = FormatUrlWithDomain(idp_config_url, /*for_display=*/true); @@ -1378,7 +1384,7 @@ bool need_client_metadata = false; - if (ShouldRequestPermission(idp_info->provider->scope)) { + if (ShouldMediateAuthz(idp_info->provider->scope)) { for (const IdentityRequestAccount& account : accounts) { // ComputeLoginStateAndReorderAccounts() should have populated // IdentityRequestAccount::login_state.
diff --git a/content/browser/webid/federated_auth_request_impl.h b/content/browser/webid/federated_auth_request_impl.h index 6730723..5bb8cc07 100644 --- a/content/browser/webid/federated_auth_request_impl.h +++ b/content/browser/webid/federated_auth_request_impl.h
@@ -145,6 +145,10 @@ const IdentityRequestAccount& account); void DismissAccountsDialogForDevtools(bool should_embargo); + // Check if the scope of the request allows the browser to mediate + // or delegate (to the IdP) the authorization. + static bool ShouldMediateAuthz(const std::vector<std::string>& scope); + private: friend class FederatedAuthRequestImplTest;
diff --git a/content/browser/webid/federated_auth_request_impl_unittest.cc b/content/browser/webid/federated_auth_request_impl_unittest.cc index b376f9bb..07da35af 100644 --- a/content/browser/webid/federated_auth_request_impl_unittest.cc +++ b/content/browser/webid/federated_auth_request_impl_unittest.cc
@@ -4050,4 +4050,42 @@ EXPECT_TRUE(test_identity_registry_->notified_); } +TEST_F(FederatedAuthRequestImplTest, ShouldNotMediateAuthz) { + base::test::ScopedFeatureList list; + list.InitAndEnableFeature(features::kFedCmAuthz); + // A completely unknown oauth scope is being requested. + EXPECT_FALSE( + FederatedAuthRequestImpl::ShouldMediateAuthz({"calendar.readonly"})); + // Just the email scope is being requested. + EXPECT_FALSE(FederatedAuthRequestImpl::ShouldMediateAuthz({"email"})); + // Just the email scope and the name scope are being requested. + EXPECT_FALSE( + FederatedAuthRequestImpl::ShouldMediateAuthz({"email", "address"})); + // Just the email, picture and name scopes are being requested. + EXPECT_FALSE(FederatedAuthRequestImpl::ShouldMediateAuthz( + {"email", "address", "phone"})); + // When the basic profile scope is passed in addition to others. + EXPECT_FALSE(FederatedAuthRequestImpl::ShouldMediateAuthz( + {"profile", "email", "calendar.readonly"})); +} + +TEST_F(FederatedAuthRequestImplTest, ShouldMediateAuthz) { + base::test::ScopedFeatureList list; + list.InitAndEnableFeature(features::kFedCmAuthz); + // When scope isn't passed, we default to the basic profile authorization + // permission. + EXPECT_TRUE(FederatedAuthRequestImpl::ShouldMediateAuthz({})); + // When the basic profile authorization scope is passed explicitly. + EXPECT_TRUE( + FederatedAuthRequestImpl::ShouldMediateAuthz({"profile", "email"})); +} + +TEST_F(FederatedAuthRequestImplTest, + ShouldNotMediateAuthzWithoutFeatureEnabled) { + // Assert that we always mediate the authorization when the kFedCmAuthz + // is not enabled. + EXPECT_TRUE( + FederatedAuthRequestImpl::ShouldMediateAuthz({"profile", "email"})); +} + } // namespace content
diff --git a/content/browser/webrtc/resources/peer_connection_update_table.js b/content/browser/webrtc/resources/peer_connection_update_table.js index 269c5be..3befd6ae 100644 --- a/content/browser/webrtc/resources/peer_connection_update_table.js +++ b/content/browser/webrtc/resources/peer_connection_update_table.js
@@ -107,9 +107,10 @@ update.type === 'createAnswerOnSuccess') { this.setLastOfferAnswer_(tableElement, update); } else if (update.type === 'setLocalDescription') { + const lastOfferAnswer = this.getLastOfferAnswer_(tableElement); if (update.value.startsWith('type: rollback')) { this.setLastOfferAnswer_(tableElement, {value: undefined}) - } else if (update.value !== this.getLastOfferAnswer_(tableElement)) { + } else if (lastOfferAnswer && update.value !== lastOfferAnswer) { type += ' (munged)'; } } else if (update.type === 'setConfiguration') {
diff --git a/content/browser/webrtc/webrtc_internals_message_handler.cc b/content/browser/webrtc/webrtc_internals_message_handler.cc index 76f0b65..561bd0e2 100644 --- a/content/browser/webrtc/webrtc_internals_message_handler.cc +++ b/content/browser/webrtc/webrtc_internals_message_handler.cc
@@ -145,6 +145,9 @@ params.Set("eventLogRecordingsToggleable", webrtc_internals_->CanToggleEventLogRecordings()); + for (auto* host : PeerConnectionTrackerHost::GetAllHosts()) { + host->GetCurrentState(); + } ResolveJavascriptCallback(base::Value(callback_id), params); }
diff --git a/content/browser/webrtc/webrtc_internals_message_handler.h b/content/browser/webrtc/webrtc_internals_message_handler.h index 23dc136a..b76be8d 100644 --- a/content/browser/webrtc/webrtc_internals_message_handler.h +++ b/content/browser/webrtc/webrtc_internals_message_handler.h
@@ -47,6 +47,7 @@ // Javascript message handler. void OnGetStandardStats(const base::Value::List& list); void OnGetLegacyStats(const base::Value::List& list); + void OnGetCurrentState(const base::Value::List& list); void OnSetAudioDebugRecordingsEnabled(bool enable, const base::Value::List& list); void OnSetEventLogRecordingsEnabled(bool enable,
diff --git a/content/public/common/content_features.cc b/content/public/common/content_features.cc index 6793c41..4d3f4877 100644 --- a/content/public/common/content_features.cc +++ b/content/public/common/content_features.cc
@@ -644,6 +644,11 @@ "LowerV8MemoryLimitForNonMainRenderers", base::FEATURE_DISABLED_BY_DEFAULT); +// Enables a fix for a macOS IME Live Conversion issue. crbug.com/1328530. +BASE_FEATURE(kMacImeLiveConversionFix, + "MacImeLiveConversionFix", + base::FEATURE_ENABLED_BY_DEFAULT); + // Uses ThreadType::kCompositing for the main thread BASE_FEATURE(kMainThreadCompositingPriority, "MainThreadCompositingPriority",
diff --git a/content/public/common/content_features.h b/content/public/common/content_features.h index 2ec4d733f..b9a38ed 100644 --- a/content/public/common/content_features.h +++ b/content/public/common/content_features.h
@@ -135,6 +135,7 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kLogJsConsoleMessages); CONTENT_EXPORT BASE_DECLARE_FEATURE(kLowerPAMemoryLimitForNonMainRenderers); CONTENT_EXPORT BASE_DECLARE_FEATURE(kLowerV8MemoryLimitForNonMainRenderers); +CONTENT_EXPORT BASE_DECLARE_FEATURE(kMacImeLiveConversionFix); CONTENT_EXPORT BASE_DECLARE_FEATURE(kMainThreadCompositingPriority); CONTENT_EXPORT BASE_DECLARE_FEATURE(kMBIMode); enum class MBIMode {
diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc index 93de85d8..ecfa054 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc
@@ -669,19 +669,11 @@ } Collect3DContextInformation(gl_info, gpu_channel_host->gpu_info()); - // This is an offscreen context. Generally it won't use the default - // frame buffer, in that case don't request any alpha, depth, stencil, - // antialiasing. But we do need those attributes for the "own - // offscreen surface" optimization which supports directly drawing - // to a custom surface backed frame buffer. gpu::ContextCreationAttribs attributes; - attributes.alpha_size = web_attributes.support_alpha ? 8 : -1; - attributes.depth_size = web_attributes.support_depth ? 24 : 0; - attributes.stencil_size = web_attributes.support_stencil ? 8 : 0; - attributes.samples = web_attributes.support_antialias ? 4 : 0; - attributes.own_offscreen_surface = - web_attributes.support_alpha || web_attributes.support_depth || - web_attributes.support_stencil || web_attributes.support_antialias; + attributes.alpha_size = -1; + attributes.depth_size = 0; + attributes.stencil_size = 0; + attributes.samples = 0; attributes.sample_buffers = 0; attributes.bind_generates_resource = false; attributes.enable_raster_interface = web_attributes.enable_raster_interface;
diff --git a/content/test/data/compute_pressure/valid_token.html b/content/test/data/compute_pressure/valid_token.html index c4780e9f..1dc794e 100644 --- a/content/test/data/compute_pressure/valid_token.html +++ b/content/test/data/compute_pressure/valid_token.html
@@ -2,6 +2,6 @@ <meta charset="utf-8"> <!-- The OT token below expires in 2033. Regenerate this token with the command: - generate_token.py https://example.test ComputePressure --expire-timestamp=2000000000 --> -<meta http-equiv="origin-trial" content="A/jtk5npXPKyDrNo9oTFvtpkxme5321eVz7rRB35qNSG+U00gtajlCmSfhxTxUDuAb0umALAsiXoKIfMHl3mnQMAAABaeyJvcmlnaW4iOiAiaHR0cHM6Ly9leGFtcGxlLnRlc3Q6NDQzIiwgImZlYXR1cmUiOiAiQ29tcHV0ZVByZXNzdXJlIiwgImV4cGlyeSI6IDIwMDAwMDAwMDB9"> + generate_token.py https://example.test ComputePressure_v2 --expire-timestamp=2000000000 --> +<meta http-equiv="origin-trial" content="A3upupCMC7sep/dLpzFLnblDQ1aEIyD/Pgw125FHLkzhUCT/ot9/hqC/TDmLn7mLnaEZCnUum0RrDGyEidiJ6ggAAABdeyJvcmlnaW4iOiAiaHR0cHM6Ly9leGFtcGxlLnRlc3Q6NDQzIiwgImZlYXR1cmUiOiAiQ29tcHV0ZVByZXNzdXJlX3YyIiwgImV4cGlyeSI6IDIwMDAwMDAwMDB9"> <title>Compute Pressure API Origin Trial Test</title>
diff --git a/content/test/gpu/gpu_tests/test_expectations/pixel_expectations.txt b/content/test/gpu/gpu_tests/test_expectations/pixel_expectations.txt index 1947aac..2373331 100644 --- a/content/test/gpu/gpu_tests/test_expectations/pixel_expectations.txt +++ b/content/test/gpu/gpu_tests/test_expectations/pixel_expectations.txt
@@ -303,6 +303,7 @@ # WebGL drawingBufferStorage does not work on Google Pixel devices, Samsung # devices or kevin yet. +crbug.com/1230619 [ android android-nexus-5x passthrough ] Pixel_WebGLFloat [ Failure ] crbug.com/1230619 [ android android-pixel-2 ] Pixel_WebGLFloat [ Failure ] crbug.com/1230619 [ android android-pixel-4 angle-disabled no-passthrough ] Pixel_WebGLFloat [ Failure ] crbug.com/1230619 [ android android-pixel-6 angle-disabled no-passthrough ] Pixel_WebGLFloat [ Failure ]
diff --git a/device/bluetooth/floss/bluetooth_adapter_floss.cc b/device/bluetooth/floss/bluetooth_adapter_floss.cc index 3ddb4ee..695b074e 100644 --- a/device/bluetooth/floss/bluetooth_adapter_floss.cc +++ b/device/bluetooth/floss/bluetooth_adapter_floss.cc
@@ -911,6 +911,94 @@ } } +void BluetoothAdapterFloss::AdapterPinDisplay( + const FlossDeviceId& remote_device, + std::string pincode) { + BluetoothDeviceFloss* device = + static_cast<BluetoothDeviceFloss*>(GetDevice(remote_device.address)); + + if (!device) { + LOG(WARNING) << "PIN display for an unknown device"; + return; + } + + if (pincode.length() != 6) { + LOG(WARNING) << "PIN display for length=" << pincode.length() + << " is not supported"; + return; + } + + BluetoothPairingFloss* pairing = device->pairing(); + + // Initiate pairing data for the incoming bonding. + if (!pairing) { + device::BluetoothDevice::PairingDelegate* pairing_delegate = + DefaultPairingDelegate(); + if (pairing_delegate) { + pairing = device->BeginPairing(pairing_delegate); + } + } + + if (!pairing->active()) { + LOG(WARNING) << "PIN display for an inactive pairing"; + return; + } + + device::BluetoothDevice::PairingDelegate* pairing_delegate = + pairing->pairing_delegate(); + + if (!pairing_delegate) { + LOG(WARNING) << "PIN display for an unknown delegate"; + return; + } + + pairing_delegate->DisplayPinCode(device, pincode); +} + +void BluetoothAdapterFloss::AdapterPinRequest( + const FlossDeviceId& remote_device, + uint32_t cod, + bool min_16_digit) { + BluetoothDeviceFloss* device = + static_cast<BluetoothDeviceFloss*>(GetDevice(remote_device.address)); + + if (!device) { + LOG(WARNING) << "PIN request for an unknown device"; + return; + } + + if (min_16_digit) { + LOG(WARNING) << "16-digit pin is not supported"; + return; + } + + BluetoothPairingFloss* pairing = device->pairing(); + + // Initiate pairing data for the incoming bonding. + if (!pairing) { + device::BluetoothDevice::PairingDelegate* pairing_delegate = + DefaultPairingDelegate(); + if (pairing_delegate) { + pairing = device->BeginPairing(pairing_delegate); + } + } + + if (!pairing->active()) { + LOG(WARNING) << "PIN request for an inactive pairing"; + return; + } + + device::BluetoothDevice::PairingDelegate* pairing_delegate = + pairing->pairing_delegate(); + + if (!pairing_delegate) { + LOG(WARNING) << "PIN request for an unknown delegate"; + return; + } + + pairing_delegate->RequestPinCode(device); +} + void BluetoothAdapterFloss::DeviceBondStateChanged( const FlossDeviceId& remote_device, uint32_t status,
diff --git a/device/bluetooth/floss/bluetooth_adapter_floss.h b/device/bluetooth/floss/bluetooth_adapter_floss.h index b1f8e2f..d13d410a8 100644 --- a/device/bluetooth/floss/bluetooth_adapter_floss.h +++ b/device/bluetooth/floss/bluetooth_adapter_floss.h
@@ -277,6 +277,11 @@ uint32_t cod, FlossAdapterClient::BluetoothSspVariant variant, uint32_t passkey) override; + void AdapterPinDisplay(const FlossDeviceId& remote_device, + std::string pincode) override; + void AdapterPinRequest(const FlossDeviceId& remote_device, + uint32_t cod, + bool min_16_digit) override; void DeviceBondStateChanged( const FlossDeviceId& remote_device, uint32_t status,
diff --git a/device/bluetooth/floss/bluetooth_floss_unittest.cc b/device/bluetooth/floss/bluetooth_floss_unittest.cc index 5d77099..3d8debb 100644 --- a/device/bluetooth/floss/bluetooth_floss_unittest.cc +++ b/device/bluetooth/floss/bluetooth_floss_unittest.cc
@@ -440,6 +440,75 @@ ASSERT_TRUE(paired_device); } +TEST_F(BluetoothFlossTest, PairDisplayPinCodeSucceeded) { + InitializeAndEnableAdapter(); + DiscoverDevices(); + + BluetoothDevice* device = + adapter_->GetDevice(FakeFlossAdapterClient::kPinCodeDisplayAddress); + ASSERT_TRUE(device != nullptr); + ASSERT_FALSE(device->IsPaired()); + + StrictMock<MockPairingDelegate> pairing_delegate; + EXPECT_CALL(pairing_delegate, + DisplayPinCode(_, FakeFlossAdapterClient::kPinCode)) + .WillOnce([this](BluetoothDevice* device, std::string pincode) { + // Pretend that the remote device has completed pin code entry. + GetFakeAdapterClient()->NotifyObservers(base::BindLambdaForTesting( + [device](FlossAdapterClient::Observer* observer) { + observer->DeviceBondStateChanged( + FlossDeviceId({.address = device->GetAddress(), .name = ""}), + /*status=*/0, FlossAdapterClient::BondState::kBonded); + })); + }); + base::RunLoop run_loop; + device->Connect( + &pairing_delegate, + base::BindLambdaForTesting( + [&run_loop](absl::optional<BluetoothDevice::ConnectErrorCode> error) { + EXPECT_FALSE(error.has_value()); + run_loop.Quit(); + })); + static_cast<BluetoothDeviceFloss*>(device)->SetIsConnected(true); + run_loop.Run(); + + EXPECT_TRUE(device->IsPaired()); +} + +TEST_F(BluetoothFlossTest, PairRequestPinCodeSucceeded) { + InitializeAndEnableAdapter(); + DiscoverDevices(); + + BluetoothDevice* device = + adapter_->GetDevice(FakeFlossAdapterClient::kPinCodeRequestAddress); + ASSERT_TRUE(device != nullptr); + ASSERT_FALSE(device->IsPaired()); + + StrictMock<MockPairingDelegate> pairing_delegate; + EXPECT_CALL(pairing_delegate, RequestPinCode(_)) + .WillOnce([this](BluetoothDevice* device) { + // Pretend that the remote device has completed pin code entry. + GetFakeAdapterClient()->NotifyObservers(base::BindLambdaForTesting( + [device](FlossAdapterClient::Observer* observer) { + observer->DeviceBondStateChanged( + FlossDeviceId({.address = device->GetAddress(), .name = ""}), + /*status=*/0, FlossAdapterClient::BondState::kBonded); + })); + }); + base::RunLoop run_loop; + device->Connect( + &pairing_delegate, + base::BindLambdaForTesting( + [&run_loop](absl::optional<BluetoothDevice::ConnectErrorCode> error) { + EXPECT_FALSE(error.has_value()); + run_loop.Quit(); + })); + static_cast<BluetoothDeviceFloss*>(device)->SetIsConnected(true); + run_loop.Run(); + + EXPECT_TRUE(device->IsPaired()); +} + TEST_F(BluetoothFlossTest, Disconnect) { InitializeAndEnableAdapter(); DiscoverDevices();
diff --git a/device/bluetooth/floss/fake_floss_adapter_client.cc b/device/bluetooth/floss/fake_floss_adapter_client.cc index 9f0662d..6bc1ec92 100644 --- a/device/bluetooth/floss/fake_floss_adapter_client.cc +++ b/device/bluetooth/floss/fake_floss_adapter_client.cc
@@ -30,8 +30,13 @@ const char FakeFlossAdapterClient::kPhoneAddress[] = "bb:bb:bb:bb:bb:bb"; const char FakeFlossAdapterClient::kOldDeviceAddress[] = "cc:cc:cc:cc:cc:cc"; const char FakeFlossAdapterClient::kClassicAddress[] = "dd:dd:dd:dd:dd:dd"; +const char FakeFlossAdapterClient::kPinCodeDisplayAddress[] = + "ee:ee:ee:ee:ee:ee"; +const char FakeFlossAdapterClient::kPinCodeRequestAddress[] = + "ff:ff:ff:ff:ff:ff"; const char FakeFlossAdapterClient::kClassicName[] = "Classic Device"; const uint32_t FakeFlossAdapterClient::kPasskey = 123456; +const char FakeFlossAdapterClient::kPinCode[] = "012345"; const uint32_t FakeFlossAdapterClient::kHeadsetClassOfDevice = 2360344; const uint32_t FakeFlossAdapterClient::kKeyboardClassofDevice = 1344; @@ -62,6 +67,9 @@ observer.AdapterFoundDevice(FlossDeviceId({kKeyboardAddress, ""})); observer.AdapterFoundDevice(FlossDeviceId({kPhoneAddress, ""})); observer.AdapterFoundDevice(FlossDeviceId({kOldDeviceAddress, ""})); + observer.AdapterFoundDevice(FlossDeviceId({kPinCodeDisplayAddress, ""})); + observer.AdapterFoundDevice( + FlossDeviceId({kPinCodeRequestAddress, ""})); // Simulate a device which sends its name later observer.AdapterFoundDevice(FlossDeviceId({kClassicAddress, ""})); observer.AdapterFoundDevice(FlossDeviceId({kClassicAddress, kClassicName})); @@ -115,6 +123,18 @@ } PostDelayedTask(base::BindOnce(std::move(callback), true)); + } else if (device.address == kPinCodeDisplayAddress) { + for (auto& observer : observers_) { + observer.AdapterPinDisplay(device, std::string(kPinCode)); + } + + PostDelayedTask(base::BindOnce(std::move(callback), true)); + } else if (device.address == kPinCodeRequestAddress) { + for (auto& observer : observers_) { + observer.AdapterPinRequest(device, 0, false); + } + + PostDelayedTask(base::BindOnce(std::move(callback), true)); } else { PostDelayedTask(base::BindOnce( std::move(callback),
diff --git a/device/bluetooth/floss/fake_floss_adapter_client.h b/device/bluetooth/floss/fake_floss_adapter_client.h index f6bd9cfe..090e47b3 100644 --- a/device/bluetooth/floss/fake_floss_adapter_client.h +++ b/device/bluetooth/floss/fake_floss_adapter_client.h
@@ -28,8 +28,11 @@ static const char kPhoneAddress[]; static const char kOldDeviceAddress[]; static const char kClassicAddress[]; + static const char kPinCodeDisplayAddress[]; + static const char kPinCodeRequestAddress[]; static const char kClassicName[]; static const uint32_t kPasskey; + static const char kPinCode[]; static const uint32_t kHeadsetClassOfDevice; static const uint32_t kKeyboardClassofDevice;
diff --git a/device/bluetooth/floss/floss_adapter_client.cc b/device/bluetooth/floss/floss_adapter_client.cc index 77edd851..e089dc9 100644 --- a/device/bluetooth/floss/floss_adapter_client.cc +++ b/device/bluetooth/floss/floss_adapter_client.cc
@@ -244,6 +244,18 @@ base::BindOnce(&HandleExported, adapter::kOnSspRequest)); callbacks->ExportMethod( + adapter::kCallbackInterface, adapter::kOnPinDisplay, + base::BindRepeating(&FlossAdapterClient::OnPinDisplay, + weak_ptr_factory_.GetWeakPtr()), + base::BindOnce(&HandleExported, adapter::kOnPinDisplay)); + + callbacks->ExportMethod( + adapter::kCallbackInterface, adapter::kOnPinRequest, + base::BindRepeating(&FlossAdapterClient::OnPinRequest, + weak_ptr_factory_.GetWeakPtr()), + base::BindOnce(&HandleExported, adapter::kOnPinRequest)); + + callbacks->ExportMethod( adapter::kCallbackInterface, adapter::kOnBondStateChanged, base::BindRepeating(&FlossAdapterClient::OnBondStateChanged, weak_ptr_factory_.GetWeakPtr()), @@ -438,6 +450,49 @@ std::move(response_sender).Run(dbus::Response::FromMethodCall(method_call)); } +void FlossAdapterClient::OnPinDisplay( + dbus::MethodCall* method_call, + dbus::ExportedObject::ResponseSender response_sender) { + dbus::MessageReader reader(method_call); + FlossDeviceId device; + std::string pincode; + + if (!ReadAllDBusParams(&reader, &device, &pincode)) { + std::move(response_sender) + .Run(dbus::ErrorResponse::FromMethodCall( + method_call, kErrorInvalidParameters, std::string())); + return; + } + + for (auto& observer : observers_) { + observer.AdapterPinDisplay(device, pincode); + } + + std::move(response_sender).Run(dbus::Response::FromMethodCall(method_call)); +} + +void FlossAdapterClient::OnPinRequest( + dbus::MethodCall* method_call, + dbus::ExportedObject::ResponseSender response_sender) { + dbus::MessageReader reader(method_call); + FlossDeviceId device; + uint32_t cod; + bool min_16_digit; + + if (!ReadAllDBusParams(&reader, &device, &cod, &min_16_digit)) { + std::move(response_sender) + .Run(dbus::ErrorResponse::FromMethodCall( + method_call, kErrorInvalidParameters, std::string())); + return; + } + + for (auto& observer : observers_) { + observer.AdapterPinRequest(device, cod, min_16_digit); + } + + std::move(response_sender).Run(dbus::Response::FromMethodCall(method_call)); +} + void FlossAdapterClient::OnGetBondedDevices( DBusResult<std::vector<FlossDeviceId>> ret) { if (!ret.has_value()) {
diff --git a/device/bluetooth/floss/floss_adapter_client.h b/device/bluetooth/floss/floss_adapter_client.h index 0afd336..dd6e5a5 100644 --- a/device/bluetooth/floss/floss_adapter_client.h +++ b/device/bluetooth/floss/floss_adapter_client.h
@@ -122,6 +122,15 @@ BluetoothSspVariant variant, uint32_t passkey) {} + // Notification sent for legacy pairing to display auto-gen pin code. + virtual void AdapterPinDisplay(const FlossDeviceId& remote_device, + std::string pincode) {} + + // Notification sent for legacy pairing to ask user input pin code. + virtual void AdapterPinRequest(const FlossDeviceId& remote_device, + uint32_t cod, + bool min_16_digit) {} + // Notification sent when a bonding state changes for a remote device. // TODO(b:202334519): Change status type to enum once Floss has the enum. virtual void DeviceBondStateChanged(const FlossDeviceId& remote_device, @@ -326,6 +335,14 @@ void OnSspRequest(dbus::MethodCall* method_call, dbus::ExportedObject::ResponseSender response_sender); + // Handle callback |OnPinDisplay| on exported object path. + void OnPinDisplay(dbus::MethodCall* method_call, + dbus::ExportedObject::ResponseSender response_sender); + + // Handle callback |OnPinRequest| on exported object path. + void OnPinRequest(dbus::MethodCall* method_call, + dbus::ExportedObject::ResponseSender response_sender); + // Handle callback |OnBondStateChanged| on exported object path. void OnBondStateChanged(dbus::MethodCall* method_call, dbus::ExportedObject::ResponseSender response_sender);
diff --git a/device/bluetooth/floss/floss_adapter_client_unittest.cc b/device/bluetooth/floss/floss_adapter_client_unittest.cc index f9d7f8c..ec9f12f 100644 --- a/device/bluetooth/floss/floss_adapter_client_unittest.cc +++ b/device/bluetooth/floss/floss_adapter_client_unittest.cc
@@ -98,6 +98,22 @@ passkey_ = passkey; } + void AdapterPinDisplay(const FlossDeviceId& remote_device, + std::string pincode) override { + pin_display_count_++; + + pin_display_device_ = remote_device; + pincode_ = pincode; + } + + void AdapterPinRequest(const FlossDeviceId& remote_device, + uint32_t cod, + bool min_16_digit) override { + pin_request_count_++; + + pin_request_device_ = remote_device; + } + std::string address_; bool discoverable_; bool discovering_state_ = false; @@ -109,6 +125,9 @@ FlossAdapterClient::BluetoothSspVariant variant_ = FlossAdapterClient::BluetoothSspVariant::kPasskeyConfirmation; uint32_t passkey_ = 0; + FlossDeviceId pin_display_device_; + FlossDeviceId pin_request_device_; + std::string pincode_; int address_changed_count_ = 0; int discoverable_changed_count_ = 0; @@ -116,6 +135,8 @@ int found_device_count_ = 0; int cleared_device_count_ = 0; int ssp_request_count_ = 0; + int pin_display_count_ = 0; + int pin_request_count_ = 0; private: raw_ptr<FlossAdapterClient> client_ = nullptr; @@ -143,7 +164,7 @@ // Exported callback methods that we don't need to invoke. This will need // to be updated once new callbacks are added. // TODO(b/233124093): Reduce this count by 2 when SDP tests are added. - EXPECT_CALL(*exported_callbacks_.get(), ExportMethod).Times(10); + EXPECT_CALL(*exported_callbacks_.get(), ExportMethod).Times(12); // Save the method handlers of exported callbacks that we need to invoke in // test.
diff --git a/device/bluetooth/floss/floss_dbus_client.cc b/device/bluetooth/floss/floss_dbus_client.cc index 0e70d64..0afb5e0 100644 --- a/device/bluetooth/floss/floss_dbus_client.cc +++ b/device/bluetooth/floss/floss_dbus_client.cc
@@ -92,6 +92,8 @@ const char kOnDeviceCleared[] = "OnDeviceCleared"; const char kOnDiscoveringChanged[] = "OnDiscoveringChanged"; const char kOnSspRequest[] = "OnSspRequest"; +const char kOnPinDisplay[] = "OnPinDisplay"; +const char kOnPinRequest[] = "OnPinRequest"; const char kOnBondStateChanged[] = "OnBondStateChanged"; const char kOnSdpSearchComplete[] = "OnSdpSearchComplete";
diff --git a/device/bluetooth/floss/floss_dbus_client.h b/device/bluetooth/floss/floss_dbus_client.h index f4f53ea..cf8a50c 100644 --- a/device/bluetooth/floss/floss_dbus_client.h +++ b/device/bluetooth/floss/floss_dbus_client.h
@@ -94,6 +94,8 @@ extern DEVICE_BLUETOOTH_EXPORT const char kOnDeviceCleared[]; extern DEVICE_BLUETOOTH_EXPORT const char kOnDiscoveringChanged[]; extern DEVICE_BLUETOOTH_EXPORT const char kOnSspRequest[]; +extern DEVICE_BLUETOOTH_EXPORT const char kOnPinDisplay[]; +extern DEVICE_BLUETOOTH_EXPORT const char kOnPinRequest[]; extern DEVICE_BLUETOOTH_EXPORT const char kOnBondStateChanged[]; extern DEVICE_BLUETOOTH_EXPORT const char kOnSdpSearchComplete[];
diff --git a/extensions/renderer/script_injection.cc b/extensions/renderer/script_injection.cc index e9371fb..34777e89 100644 --- a/extensions/renderer/script_injection.cc +++ b/extensions/renderer/script_injection.cc
@@ -91,7 +91,7 @@ CHECK(injection_host_.get()); TRACE_EVENT_BEGIN( "extensions", "ScriptInjection", perfetto::Track::FromPointer(this), - ChromeTrackEvent::kRenderProcessHost, *content::RenderThread::Get(), + ChromeTrackEvent::kRenderProcessHost, content::RenderThread::Get(), ChromeTrackEvent::kChromeExtensionId, ExtensionIdForTracing(host_id().id)); } @@ -102,7 +102,7 @@ TRACE_EVENT_END("extensions", perfetto::Track::FromPointer(this), ChromeTrackEvent::kRenderProcessHost, - *content::RenderThread::Get(), + content::RenderThread::Get(), ChromeTrackEvent::kChromeExtensionId, ExtensionIdForTracing(host_id().id)); }
diff --git a/gin/array_buffer.cc b/gin/array_buffer.cc index c062333..cfa5c93 100644 --- a/gin/array_buffer.cc +++ b/gin/array_buffer.cc
@@ -9,6 +9,7 @@ #include "base/allocator/partition_allocator/page_allocator.h" #include "base/allocator/partition_allocator/partition_alloc.h" +#include "base/allocator/partition_allocator/partition_root.h" #include "base/bits.h" #include "base/check_op.h" #include "base/no_destructor.h" @@ -78,14 +79,13 @@ partition_allocator{}; // These configuration options are copied from blink's ArrayBufferPartition. - partition_allocator->init({ - partition_alloc::PartitionOptions::AlignedAlloc::kDisallowed, - partition_alloc::PartitionOptions::ThreadCache::kDisabled, - partition_alloc::PartitionOptions::Quarantine::kAllowed, - partition_alloc::PartitionOptions::Cookie::kAllowed, - partition_alloc::PartitionOptions::BackupRefPtr::kDisabled, - partition_alloc::PartitionOptions::BackupRefPtrZapping::kDisabled, - partition_alloc::PartitionOptions::UseConfigurablePool::kIfAvailable, + partition_allocator->init(partition_alloc::PartitionOptions{ + .quarantine = partition_alloc::PartitionOptions::Quarantine::kAllowed, + .cookie = partition_alloc::PartitionOptions::Cookie::kAllowed, + .backup_ref_ptr = + partition_alloc::PartitionOptions::BackupRefPtr::kDisabled, + .use_configurable_pool = + partition_alloc::PartitionOptions::UseConfigurablePool::kIfAvailable, }); partition_ = partition_allocator->root();
diff --git a/gpu/command_buffer/common/context_creation_attribs.h b/gpu/command_buffer/common/context_creation_attribs.h index 930bd9f..a884461 100644 --- a/gpu/command_buffer/common/context_creation_attribs.h +++ b/gpu/command_buffer/common/context_creation_attribs.h
@@ -60,7 +60,6 @@ bool fail_if_major_perf_caveat = false; bool lose_context_when_out_of_memory = false; bool should_use_native_gmb_for_backbuffer = false; - bool own_offscreen_surface = false; bool single_buffer = false; bool enable_gles2_interface = true; bool enable_grcontext = false;
diff --git a/gpu/ipc/common/context_creation_attribs_mojom_traits.cc b/gpu/ipc/common/context_creation_attribs_mojom_traits.cc index 60515559..14ff1c0 100644 --- a/gpu/ipc/common/context_creation_attribs_mojom_traits.cc +++ b/gpu/ipc/common/context_creation_attribs_mojom_traits.cc
@@ -33,7 +33,6 @@ out->lose_context_when_out_of_memory = data.lose_context_when_out_of_memory(); out->should_use_native_gmb_for_backbuffer = data.should_use_native_gmb_for_backbuffer(); - out->own_offscreen_surface = data.own_offscreen_surface(); out->single_buffer = data.single_buffer(); out->enable_gles2_interface = data.enable_gles2_interface(); out->enable_grcontext = data.enable_grcontext();
diff --git a/gpu/ipc/common/context_creation_attribs_mojom_traits.h b/gpu/ipc/common/context_creation_attribs_mojom_traits.h index 69e1159f..57f6cde 100644 --- a/gpu/ipc/common/context_creation_attribs_mojom_traits.h +++ b/gpu/ipc/common/context_creation_attribs_mojom_traits.h
@@ -163,11 +163,6 @@ return attribs.should_use_native_gmb_for_backbuffer; } - static bool own_offscreen_surface( - const gpu::ContextCreationAttribs& attribs) { - return attribs.own_offscreen_surface; - } - static bool single_buffer(const gpu::ContextCreationAttribs& attribs) { return attribs.single_buffer; }
diff --git a/gpu/ipc/common/gpu_channel.mojom b/gpu/ipc/common/gpu_channel.mojom index d5a75f4..94e350e 100644 --- a/gpu/ipc/common/gpu_channel.mojom +++ b/gpu/ipc/common/gpu_channel.mojom
@@ -68,7 +68,6 @@ bool fail_if_major_perf_caveat = false; bool lose_context_when_out_of_memory = false; bool should_use_native_gmb_for_backbuffer = false; - bool own_offscreen_surface = false; bool single_buffer = false; bool enable_gles2_interface = true; bool enable_grcontext = false;
diff --git a/gpu/ipc/common/gpu_command_buffer_traits_multi.h b/gpu/ipc/common/gpu_command_buffer_traits_multi.h index fac4418..a645a923 100644 --- a/gpu/ipc/common/gpu_command_buffer_traits_multi.h +++ b/gpu/ipc/common/gpu_command_buffer_traits_multi.h
@@ -170,7 +170,6 @@ IPC_STRUCT_TRAITS_MEMBER(lose_context_when_out_of_memory) IPC_STRUCT_TRAITS_MEMBER(context_type) IPC_STRUCT_TRAITS_MEMBER(should_use_native_gmb_for_backbuffer) - IPC_STRUCT_TRAITS_MEMBER(own_offscreen_surface) IPC_STRUCT_TRAITS_MEMBER(single_buffer) IPC_STRUCT_TRAITS_MEMBER(color_space) IPC_STRUCT_TRAITS_MEMBER(enable_gles2_interface)
diff --git a/gpu/ipc/service/gles2_command_buffer_stub.cc b/gpu/ipc/service/gles2_command_buffer_stub.cc index e3e8860..f152b34 100644 --- a/gpu/ipc/service/gles2_command_buffer_stub.cc +++ b/gpu/ipc/service/gles2_command_buffer_stub.cc
@@ -215,28 +215,6 @@ } if (offscreen) { - // Do we want to create an offscreen rendering context suitable - // for directly drawing to a separately supplied surface? In that - // case, we must ensure that the surface used for context creation - // is compatible with the requested attributes. This is explicitly - // opt-in since some context such as for NaCl request custom - // attributes but don't expect to get their own surface, and not - // all surface factories support custom formats. - if (init_params.attribs.own_offscreen_surface) { - if (init_params.attribs.depth_size > 0) { - surface_format.SetDepthBits(init_params.attribs.depth_size); - } - if (init_params.attribs.samples > 0) { - surface_format.SetSamples(init_params.attribs.samples); - } - if (init_params.attribs.stencil_size > 0) { - surface_format.SetStencilBits(init_params.attribs.stencil_size); - } - // Currently, we can't separately control alpha channel for surfaces, - // it's generally enabled by default except for RGB565 and (on desktop) - // smaller-than-32bit formats. If there's a future use case that - // requires this, it should use init_params.attribs.alpha_size here. - } if (!surface_format.IsCompatible(default_surface->GetFormat())) { DVLOG(1) << __FUNCTION__ << ": Hit the OwnOffscreenSurface path"; use_virtualized_gl_context_ = false;
diff --git a/headless/BUILD.gn b/headless/BUILD.gn index c32bc0717..4eccdb3 100644 --- a/headless/BUILD.gn +++ b/headless/BUILD.gn
@@ -368,12 +368,17 @@ "public/util/user_agent.h", ] + if (is_apple) { + configs += [ "//build/config/compiler:enable_arc" ] + } + if (is_mac) { sources += [ "lib/browser/headless_browser_impl_mac.mm", "lib/browser/headless_browser_main_parts_mac.mm", "lib/browser/headless_shell_application_mac.h", "lib/browser/headless_shell_application_mac.mm", + "lib/headless_content_main_delegate_mac.mm", ] } @@ -513,10 +518,6 @@ deps += [ "//ui/ozone" ] } - if (is_mac) { - sources += [ "lib/headless_content_main_delegate_mac.mm" ] - } - if (headless_use_prefs) { deps += [ "//components/origin_trials:browser",
diff --git a/headless/lib/browser/headless_browser_impl_mac.mm b/headless/lib/browser/headless_browser_impl_mac.mm index 1df47b0..5a5abc65 100644 --- a/headless/lib/browser/headless_browser_impl_mac.mm +++ b/headless/lib/browser/headless_browser_impl_mac.mm
@@ -15,6 +15,10 @@ #import "ui/base/cocoa/base_view.h" #import "ui/gfx/mac/coordinate_conversion.h" +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + // Overrides events and actions for NSPopUpButtonCell. @interface FakeNSPopUpButtonCell : NSObject @end @@ -33,7 +37,7 @@ namespace { -// Swizzles all event and acctions for NSPopUpButtonCell to avoid showing in +// Swizzles all event and actions for NSPopUpButtonCell to avoid showing in // headless mode. class HeadlessPopUpMethods { public: @@ -74,8 +78,8 @@ void HeadlessBrowserImpl::PlatformStart() { // Disallow headless to be throttled as a background process. - [[NSProcessInfo processInfo] beginActivityWithOptions:kActivityOptions - reason:kActivityReason]; + [NSProcessInfo.processInfo beginActivityWithOptions:kActivityOptions + reason:kActivityReason]; } void HeadlessBrowserImpl::PlatformInitializeWebContents( @@ -94,8 +98,7 @@ content::WebContents* content_web_contents = web_contents->web_contents(); NSView* web_view = content_web_contents->GetNativeView().GetNativeNSView(); - NSRect frame = gfx::ScreenRectToNSRect(bounds); - [web_view setFrame:frame]; + web_view.frame = gfx::ScreenRectToNSRect(bounds); // Render widget host view is not ready at this point, so post a task to set // bounds at later time.
diff --git a/headless/lib/browser/headless_browser_main_parts_mac.mm b/headless/lib/browser/headless_browser_main_parts_mac.mm index f50588e..02ad066 100644 --- a/headless/lib/browser/headless_browser_main_parts_mac.mm +++ b/headless/lib/browser/headless_browser_main_parts_mac.mm
@@ -9,11 +9,15 @@ #include "headless/lib/browser/headless_shell_application_mac.h" #include "services/device/public/cpp/geolocation/system_geolocation_source_mac.h" +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + namespace headless { void HeadlessBrowserMainParts::PreCreateMainMessageLoop() { // Force hide dock and menu bar. - [NSApp setActivationPolicy:NSApplicationActivationPolicyAccessory]; + NSApp.activationPolicy = NSApplicationActivationPolicyAccessory; if (!geolocation_manager_) geolocation_manager_ = device::SystemGeolocationSourceMac::CreateGeolocationManagerOnMac();
diff --git a/headless/lib/browser/headless_shell_application_mac.mm b/headless/lib/browser/headless_shell_application_mac.mm index 10dfbe4..72e4bd2 100644 --- a/headless/lib/browser/headless_shell_application_mac.mm +++ b/headless/lib/browser/headless_shell_application_mac.mm
@@ -9,7 +9,11 @@ #include "content/public/browser/native_event_processor_mac.h" #include "content/public/browser/native_event_processor_observer_mac.h" -@interface HeadlessShellCrApplication ()<NativeEventProcessor> { +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +@interface HeadlessShellCrApplication () <NativeEventProcessor> { base::ObserverList<content::NativeEventProcessorObserver>::Unchecked _observers; }
diff --git a/headless/lib/headless_content_main_delegate_mac.mm b/headless/lib/headless_content_main_delegate_mac.mm index 9182a18..5190458 100644 --- a/headless/lib/headless_content_main_delegate_mac.mm +++ b/headless/lib/headless_content_main_delegate_mac.mm
@@ -6,6 +6,10 @@ #include "headless/lib/browser/headless_shell_application_mac.h" +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + namespace headless { void HeadlessContentMainDelegate::PlatformPreBrowserMain() {
diff --git a/infra/config/generated/builders/ci/android-backuprefptr-arm-fyi-rel/properties.json b/infra/config/generated/builders/ci/android-backuprefptr-arm-fyi-rel/properties.json deleted file mode 100644 index 2a14bb6..0000000 --- a/infra/config/generated/builders/ci/android-backuprefptr-arm-fyi-rel/properties.json +++ /dev/null
@@ -1,61 +0,0 @@ -{ - "$build/chromium_tests_builder_config": { - "builder_config": { - "builder_db": { - "entries": [ - { - "builder_id": { - "bucket": "ci", - "builder": "android-backuprefptr-arm-fyi-rel", - "project": "chromium" - }, - "builder_spec": { - "build_gs_bucket": "chromium-fyi-archive", - "builder_group": "chromium.fyi", - "execution_mode": "COMPILE_AND_TEST", - "legacy_android_config": { - "config": "main_builder" - }, - "legacy_chromium_config": { - "apply_configs": [ - "mb" - ], - "build_config": "Release", - "config": "android", - "target_bits": 32, - "target_platform": "android" - }, - "legacy_gclient_config": { - "apply_configs": [ - "android" - ], - "config": "chromium" - } - } - } - ] - }, - "builder_ids": [ - { - "bucket": "ci", - "builder": "android-backuprefptr-arm-fyi-rel", - "project": "chromium" - } - ] - } - }, - "$build/reclient": { - "instance": "rbe-chromium-trusted", - "jobs": 250, - "metrics_project": "chromium-reclient-metrics" - }, - "$recipe_engine/resultdb/test_presentation": { - "column_keys": [], - "grouping_keys": [ - "status", - "v.test_suite" - ] - }, - "builder_group": "chromium.fyi", - "recipe": "chromium" -} \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/android-backuprefptr-arm64-fyi-rel/properties.json b/infra/config/generated/builders/ci/android-backuprefptr-arm64-fyi-rel/properties.json deleted file mode 100644 index 5d631273..0000000 --- a/infra/config/generated/builders/ci/android-backuprefptr-arm64-fyi-rel/properties.json +++ /dev/null
@@ -1,61 +0,0 @@ -{ - "$build/chromium_tests_builder_config": { - "builder_config": { - "builder_db": { - "entries": [ - { - "builder_id": { - "bucket": "ci", - "builder": "android-backuprefptr-arm64-fyi-rel", - "project": "chromium" - }, - "builder_spec": { - "build_gs_bucket": "chromium-fyi-archive", - "builder_group": "chromium.fyi", - "execution_mode": "COMPILE_AND_TEST", - "legacy_android_config": { - "config": "main_builder" - }, - "legacy_chromium_config": { - "apply_configs": [ - "mb" - ], - "build_config": "Release", - "config": "android", - "target_bits": 64, - "target_platform": "android" - }, - "legacy_gclient_config": { - "apply_configs": [ - "android" - ], - "config": "chromium" - } - } - } - ] - }, - "builder_ids": [ - { - "bucket": "ci", - "builder": "android-backuprefptr-arm64-fyi-rel", - "project": "chromium" - } - ] - } - }, - "$build/reclient": { - "instance": "rbe-chromium-trusted", - "jobs": 250, - "metrics_project": "chromium-reclient-metrics" - }, - "$recipe_engine/resultdb/test_presentation": { - "column_keys": [], - "grouping_keys": [ - "status", - "v.test_suite" - ] - }, - "builder_group": "chromium.fyi", - "recipe": "chromium" -} \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/linux-backuprefptr-x64-fyi-rel/properties.json b/infra/config/generated/builders/ci/linux-backuprefptr-x64-fyi-rel/properties.json deleted file mode 100644 index c00d2d5..0000000 --- a/infra/config/generated/builders/ci/linux-backuprefptr-x64-fyi-rel/properties.json +++ /dev/null
@@ -1,55 +0,0 @@ -{ - "$build/chromium_tests_builder_config": { - "builder_config": { - "builder_db": { - "entries": [ - { - "builder_id": { - "bucket": "ci", - "builder": "linux-backuprefptr-x64-fyi-rel", - "project": "chromium" - }, - "builder_spec": { - "build_gs_bucket": "chromium-fyi-archive", - "builder_group": "chromium.fyi", - "execution_mode": "COMPILE_AND_TEST", - "legacy_chromium_config": { - "apply_configs": [ - "mb" - ], - "build_config": "Release", - "config": "chromium", - "target_bits": 64, - "target_platform": "linux" - }, - "legacy_gclient_config": { - "config": "chromium" - } - } - } - ] - }, - "builder_ids": [ - { - "bucket": "ci", - "builder": "linux-backuprefptr-x64-fyi-rel", - "project": "chromium" - } - ] - } - }, - "$build/reclient": { - "instance": "rbe-chromium-trusted", - "jobs": 250, - "metrics_project": "chromium-reclient-metrics" - }, - "$recipe_engine/resultdb/test_presentation": { - "column_keys": [], - "grouping_keys": [ - "status", - "v.test_suite" - ] - }, - "builder_group": "chromium.fyi", - "recipe": "chromium" -} \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/mac-backuprefptr-x64-fyi-rel/properties.json b/infra/config/generated/builders/ci/mac-backuprefptr-x64-fyi-rel/properties.json deleted file mode 100644 index b7125054..0000000 --- a/infra/config/generated/builders/ci/mac-backuprefptr-x64-fyi-rel/properties.json +++ /dev/null
@@ -1,56 +0,0 @@ -{ - "$build/chromium_tests_builder_config": { - "builder_config": { - "builder_db": { - "entries": [ - { - "builder_id": { - "bucket": "ci", - "builder": "mac-backuprefptr-x64-fyi-rel", - "project": "chromium" - }, - "builder_spec": { - "build_gs_bucket": "chromium-fyi-archive", - "builder_group": "chromium.fyi", - "execution_mode": "COMPILE_AND_TEST", - "legacy_chromium_config": { - "apply_configs": [ - "mb" - ], - "build_config": "Release", - "config": "chromium", - "target_bits": 64, - "target_platform": "mac" - }, - "legacy_gclient_config": { - "config": "chromium" - } - } - } - ] - }, - "builder_ids": [ - { - "bucket": "ci", - "builder": "mac-backuprefptr-x64-fyi-rel", - "project": "chromium" - } - ] - } - }, - "$build/reclient": { - "instance": "rbe-chromium-trusted", - "jobs": 250, - "metrics_project": "chromium-reclient-metrics", - "scandeps_server": true - }, - "$recipe_engine/resultdb/test_presentation": { - "column_keys": [], - "grouping_keys": [ - "status", - "v.test_suite" - ] - }, - "builder_group": "chromium.fyi", - "recipe": "chromium" -} \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/win-backuprefptr-x64-fyi-rel/properties.json b/infra/config/generated/builders/ci/win-backuprefptr-x64-fyi-rel/properties.json deleted file mode 100644 index 79a681c..0000000 --- a/infra/config/generated/builders/ci/win-backuprefptr-x64-fyi-rel/properties.json +++ /dev/null
@@ -1,55 +0,0 @@ -{ - "$build/chromium_tests_builder_config": { - "builder_config": { - "builder_db": { - "entries": [ - { - "builder_id": { - "bucket": "ci", - "builder": "win-backuprefptr-x64-fyi-rel", - "project": "chromium" - }, - "builder_spec": { - "build_gs_bucket": "chromium-fyi-archive", - "builder_group": "chromium.fyi", - "execution_mode": "COMPILE_AND_TEST", - "legacy_chromium_config": { - "apply_configs": [ - "mb" - ], - "build_config": "Release", - "config": "chromium", - "target_bits": 64, - "target_platform": "win" - }, - "legacy_gclient_config": { - "config": "chromium" - } - } - } - ] - }, - "builder_ids": [ - { - "bucket": "ci", - "builder": "win-backuprefptr-x64-fyi-rel", - "project": "chromium" - } - ] - } - }, - "$build/reclient": { - "instance": "rbe-chromium-trusted", - "jobs": 80, - "metrics_project": "chromium-reclient-metrics" - }, - "$recipe_engine/resultdb/test_presentation": { - "column_keys": [], - "grouping_keys": [ - "status", - "v.test_suite" - ] - }, - "builder_group": "chromium.fyi", - "recipe": "chromium" -} \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/win-backuprefptr-x86-fyi-rel/properties.json b/infra/config/generated/builders/ci/win-backuprefptr-x86-fyi-rel/properties.json deleted file mode 100644 index 8db78fa..0000000 --- a/infra/config/generated/builders/ci/win-backuprefptr-x86-fyi-rel/properties.json +++ /dev/null
@@ -1,55 +0,0 @@ -{ - "$build/chromium_tests_builder_config": { - "builder_config": { - "builder_db": { - "entries": [ - { - "builder_id": { - "bucket": "ci", - "builder": "win-backuprefptr-x86-fyi-rel", - "project": "chromium" - }, - "builder_spec": { - "build_gs_bucket": "chromium-fyi-archive", - "builder_group": "chromium.fyi", - "execution_mode": "COMPILE_AND_TEST", - "legacy_chromium_config": { - "apply_configs": [ - "mb" - ], - "build_config": "Release", - "config": "chromium", - "target_bits": 32, - "target_platform": "win" - }, - "legacy_gclient_config": { - "config": "chromium" - } - } - } - ] - }, - "builder_ids": [ - { - "bucket": "ci", - "builder": "win-backuprefptr-x86-fyi-rel", - "project": "chromium" - } - ] - } - }, - "$build/reclient": { - "instance": "rbe-chromium-trusted", - "jobs": 80, - "metrics_project": "chromium-reclient-metrics" - }, - "$recipe_engine/resultdb/test_presentation": { - "column_keys": [], - "grouping_keys": [ - "status", - "v.test_suite" - ] - }, - "builder_group": "chromium.fyi", - "recipe": "chromium" -} \ No newline at end of file
diff --git a/infra/config/generated/builders/webrtc.fyi/WebRTC Chromium FYI Mac Builder/properties.json b/infra/config/generated/builders/webrtc.fyi/WebRTC Chromium FYI Mac Builder/properties.json index 0cc621fd..c21fe49 100644 --- a/infra/config/generated/builders/webrtc.fyi/WebRTC Chromium FYI Mac Builder/properties.json +++ b/infra/config/generated/builders/webrtc.fyi/WebRTC Chromium FYI Mac Builder/properties.json
@@ -94,5 +94,5 @@ }, "builder_group": "chromium.webrtc.fyi", "recipe": "chromium", - "xcode_build_version": "14c18" + "xcode_build_version": "14e222b" } \ No newline at end of file
diff --git a/infra/config/generated/builders/webrtc.fyi/WebRTC Chromium FYI Mac Tester/properties.json b/infra/config/generated/builders/webrtc.fyi/WebRTC Chromium FYI Mac Tester/properties.json index a3b36eb..e3a245ab 100644 --- a/infra/config/generated/builders/webrtc.fyi/WebRTC Chromium FYI Mac Tester/properties.json +++ b/infra/config/generated/builders/webrtc.fyi/WebRTC Chromium FYI Mac Tester/properties.json
@@ -87,5 +87,5 @@ }, "builder_group": "chromium.webrtc.fyi", "recipe": "chromium", - "xcode_build_version": "14c18" + "xcode_build_version": "14e222b" } \ No newline at end of file
diff --git a/infra/config/generated/luci/cr-buildbucket.cfg b/infra/config/generated/luci/cr-buildbucket.cfg index 8ab92cb1..6a078d68 100644 --- a/infra/config/generated/luci/cr-buildbucket.cfg +++ b/infra/config/generated/luci/cr-buildbucket.cfg
@@ -25127,176 +25127,6 @@ } } builders { - name: "android-backuprefptr-arm-fyi-rel" - swarming_host: "chromium-swarm.appspot.com" - dimensions: "builderless:1" - dimensions: "cores:8" - dimensions: "cpu:x86-64" - dimensions: "free_space:standard" - dimensions: "os:Ubuntu-18.04" - dimensions: "pool:luci.chromium.ci" - dimensions: "ssd:0" - exe { - cipd_package: "infra/chromium/bootstrapper/${platform}" - cipd_version: "latest" - cmd: "bootstrapper" - } - properties: - '{' - ' "$bootstrap/exe": {' - ' "exe": {' - ' "cipd_package": "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build",' - ' "cipd_version": "refs/heads/main",' - ' "cmd": [' - ' "luciexe"' - ' ]' - ' }' - ' },' - ' "$bootstrap/properties": {' - ' "properties_file": "infra/config/generated/builders/ci/android-backuprefptr-arm-fyi-rel/properties.json",' - ' "top_level_project": {' - ' "ref": "refs/heads/main",' - ' "repo": {' - ' "host": "chromium.googlesource.com",' - ' "project": "chromium/src"' - ' }' - ' }' - ' },' - ' "builder_group": "chromium.fyi",' - ' "led_builder_is_bootstrapped": true,' - ' "recipe": "chromium"' - '}' - priority: 35 - execution_timeout_secs: 36000 - build_numbers: YES - service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" - experiments { - key: "chromium_swarming.expose_merge_script_failures" - value: 100 - } - experiments { - key: "luci.recipes.use_python3" - value: 100 - } - resultdb { - enable: true - bq_exports { - project: "chrome-luci-data" - dataset: "chromium" - table: "ci_test_results" - test_results {} - } - bq_exports { - project: "chrome-luci-data" - dataset: "chromium" - table: "gpu_ci_test_results" - test_results { - predicate { - test_id_regexp: "ninja://chrome/test:telemetry_gpu_integration_test[^/]*/.+" - } - } - } - bq_exports { - project: "chrome-luci-data" - dataset: "chromium" - table: "blink_web_tests_ci_test_results" - test_results { - predicate { - test_id_regexp: "(ninja://[^/]*blink_web_tests/.+)|(ninja://[^/]*blink_wpt_tests/.+)" - } - } - } - history_options { - use_invocation_timestamp: true - } - } - } - builders { - name: "android-backuprefptr-arm64-fyi-rel" - swarming_host: "chromium-swarm.appspot.com" - dimensions: "builderless:1" - dimensions: "cores:8" - dimensions: "cpu:x86-64" - dimensions: "free_space:standard" - dimensions: "os:Ubuntu-18.04" - dimensions: "pool:luci.chromium.ci" - dimensions: "ssd:0" - exe { - cipd_package: "infra/chromium/bootstrapper/${platform}" - cipd_version: "latest" - cmd: "bootstrapper" - } - properties: - '{' - ' "$bootstrap/exe": {' - ' "exe": {' - ' "cipd_package": "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build",' - ' "cipd_version": "refs/heads/main",' - ' "cmd": [' - ' "luciexe"' - ' ]' - ' }' - ' },' - ' "$bootstrap/properties": {' - ' "properties_file": "infra/config/generated/builders/ci/android-backuprefptr-arm64-fyi-rel/properties.json",' - ' "top_level_project": {' - ' "ref": "refs/heads/main",' - ' "repo": {' - ' "host": "chromium.googlesource.com",' - ' "project": "chromium/src"' - ' }' - ' }' - ' },' - ' "builder_group": "chromium.fyi",' - ' "led_builder_is_bootstrapped": true,' - ' "recipe": "chromium"' - '}' - priority: 35 - execution_timeout_secs: 36000 - build_numbers: YES - service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" - experiments { - key: "chromium_swarming.expose_merge_script_failures" - value: 100 - } - experiments { - key: "luci.recipes.use_python3" - value: 100 - } - resultdb { - enable: true - bq_exports { - project: "chrome-luci-data" - dataset: "chromium" - table: "ci_test_results" - test_results {} - } - bq_exports { - project: "chrome-luci-data" - dataset: "chromium" - table: "gpu_ci_test_results" - test_results { - predicate { - test_id_regexp: "ninja://chrome/test:telemetry_gpu_integration_test[^/]*/.+" - } - } - } - bq_exports { - project: "chrome-luci-data" - dataset: "chromium" - table: "blink_web_tests_ci_test_results" - test_results { - predicate { - test_id_regexp: "(ninja://[^/]*blink_web_tests/.+)|(ninja://[^/]*blink_wpt_tests/.+)" - } - } - } - history_options { - use_invocation_timestamp: true - } - } - } - builders { name: "android-bfcache-rel" swarming_host: "chromium-swarm.appspot.com" dimensions: "builderless:1" @@ -36307,91 +36137,6 @@ } } builders { - name: "linux-backuprefptr-x64-fyi-rel" - swarming_host: "chromium-swarm.appspot.com" - dimensions: "builderless:1" - dimensions: "cores:8" - dimensions: "cpu:x86-64" - dimensions: "free_space:standard" - dimensions: "os:Ubuntu-18.04" - dimensions: "pool:luci.chromium.ci" - dimensions: "ssd:0" - exe { - cipd_package: "infra/chromium/bootstrapper/${platform}" - cipd_version: "latest" - cmd: "bootstrapper" - } - properties: - '{' - ' "$bootstrap/exe": {' - ' "exe": {' - ' "cipd_package": "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build",' - ' "cipd_version": "refs/heads/main",' - ' "cmd": [' - ' "luciexe"' - ' ]' - ' }' - ' },' - ' "$bootstrap/properties": {' - ' "properties_file": "infra/config/generated/builders/ci/linux-backuprefptr-x64-fyi-rel/properties.json",' - ' "top_level_project": {' - ' "ref": "refs/heads/main",' - ' "repo": {' - ' "host": "chromium.googlesource.com",' - ' "project": "chromium/src"' - ' }' - ' }' - ' },' - ' "builder_group": "chromium.fyi",' - ' "led_builder_is_bootstrapped": true,' - ' "recipe": "chromium"' - '}' - priority: 35 - execution_timeout_secs: 36000 - build_numbers: YES - service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" - experiments { - key: "chromium_swarming.expose_merge_script_failures" - value: 100 - } - experiments { - key: "luci.recipes.use_python3" - value: 100 - } - resultdb { - enable: true - bq_exports { - project: "chrome-luci-data" - dataset: "chromium" - table: "ci_test_results" - test_results {} - } - bq_exports { - project: "chrome-luci-data" - dataset: "chromium" - table: "gpu_ci_test_results" - test_results { - predicate { - test_id_regexp: "ninja://chrome/test:telemetry_gpu_integration_test[^/]*/.+" - } - } - } - bq_exports { - project: "chrome-luci-data" - dataset: "chromium" - table: "blink_web_tests_ci_test_results" - test_results { - predicate { - test_id_regexp: "(ninja://[^/]*blink_web_tests/.+)|(ninja://[^/]*blink_wpt_tests/.+)" - } - } - } - history_options { - use_invocation_timestamp: true - } - } - } - builders { name: "linux-bfcache-rel" swarming_host: "chromium-swarm.appspot.com" dimensions: "builderless:1" @@ -42252,89 +41997,6 @@ } } builders { - name: "mac-backuprefptr-x64-fyi-rel" - swarming_host: "chromium-swarm.appspot.com" - dimensions: "builderless:1" - dimensions: "cpu:x86-64" - dimensions: "free_space:standard" - dimensions: "os:Mac" - dimensions: "pool:luci.chromium.ci" - exe { - cipd_package: "infra/chromium/bootstrapper/${platform}" - cipd_version: "latest" - cmd: "bootstrapper" - } - properties: - '{' - ' "$bootstrap/exe": {' - ' "exe": {' - ' "cipd_package": "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build",' - ' "cipd_version": "refs/heads/main",' - ' "cmd": [' - ' "luciexe"' - ' ]' - ' }' - ' },' - ' "$bootstrap/properties": {' - ' "properties_file": "infra/config/generated/builders/ci/mac-backuprefptr-x64-fyi-rel/properties.json",' - ' "top_level_project": {' - ' "ref": "refs/heads/main",' - ' "repo": {' - ' "host": "chromium.googlesource.com",' - ' "project": "chromium/src"' - ' }' - ' }' - ' },' - ' "builder_group": "chromium.fyi",' - ' "led_builder_is_bootstrapped": true,' - ' "recipe": "chromium"' - '}' - priority: 35 - execution_timeout_secs: 36000 - build_numbers: YES - service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" - experiments { - key: "chromium_swarming.expose_merge_script_failures" - value: 100 - } - experiments { - key: "luci.recipes.use_python3" - value: 100 - } - resultdb { - enable: true - bq_exports { - project: "chrome-luci-data" - dataset: "chromium" - table: "ci_test_results" - test_results {} - } - bq_exports { - project: "chrome-luci-data" - dataset: "chromium" - table: "gpu_ci_test_results" - test_results { - predicate { - test_id_regexp: "ninja://chrome/test:telemetry_gpu_integration_test[^/]*/.+" - } - } - } - bq_exports { - project: "chrome-luci-data" - dataset: "chromium" - table: "blink_web_tests_ci_test_results" - test_results { - predicate { - test_id_regexp: "(ninja://[^/]*blink_web_tests/.+)|(ninja://[^/]*blink_wpt_tests/.+)" - } - } - } - history_options { - use_invocation_timestamp: true - } - } - } - builders { name: "mac-code-coverage" swarming_host: "chromium-swarm.appspot.com" dimensions: "builderless:1" @@ -46405,176 +46067,6 @@ } } builders { - name: "win-backuprefptr-x64-fyi-rel" - swarming_host: "chromium-swarm.appspot.com" - dimensions: "builderless:1" - dimensions: "cores:8" - dimensions: "cpu:x86-64" - dimensions: "free_space:standard" - dimensions: "os:Windows" - dimensions: "pool:luci.chromium.ci" - dimensions: "ssd:0" - exe { - cipd_package: "infra/chromium/bootstrapper/${platform}" - cipd_version: "latest" - cmd: "bootstrapper" - } - properties: - '{' - ' "$bootstrap/exe": {' - ' "exe": {' - ' "cipd_package": "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build",' - ' "cipd_version": "refs/heads/main",' - ' "cmd": [' - ' "luciexe"' - ' ]' - ' }' - ' },' - ' "$bootstrap/properties": {' - ' "properties_file": "infra/config/generated/builders/ci/win-backuprefptr-x64-fyi-rel/properties.json",' - ' "top_level_project": {' - ' "ref": "refs/heads/main",' - ' "repo": {' - ' "host": "chromium.googlesource.com",' - ' "project": "chromium/src"' - ' }' - ' }' - ' },' - ' "builder_group": "chromium.fyi",' - ' "led_builder_is_bootstrapped": true,' - ' "recipe": "chromium"' - '}' - priority: 35 - execution_timeout_secs: 36000 - build_numbers: YES - service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" - experiments { - key: "chromium_swarming.expose_merge_script_failures" - value: 100 - } - experiments { - key: "luci.recipes.use_python3" - value: 100 - } - resultdb { - enable: true - bq_exports { - project: "chrome-luci-data" - dataset: "chromium" - table: "ci_test_results" - test_results {} - } - bq_exports { - project: "chrome-luci-data" - dataset: "chromium" - table: "gpu_ci_test_results" - test_results { - predicate { - test_id_regexp: "ninja://chrome/test:telemetry_gpu_integration_test[^/]*/.+" - } - } - } - bq_exports { - project: "chrome-luci-data" - dataset: "chromium" - table: "blink_web_tests_ci_test_results" - test_results { - predicate { - test_id_regexp: "(ninja://[^/]*blink_web_tests/.+)|(ninja://[^/]*blink_wpt_tests/.+)" - } - } - } - history_options { - use_invocation_timestamp: true - } - } - } - builders { - name: "win-backuprefptr-x86-fyi-rel" - swarming_host: "chromium-swarm.appspot.com" - dimensions: "builderless:1" - dimensions: "cores:8" - dimensions: "cpu:x86-64" - dimensions: "free_space:standard" - dimensions: "os:Windows" - dimensions: "pool:luci.chromium.ci" - dimensions: "ssd:0" - exe { - cipd_package: "infra/chromium/bootstrapper/${platform}" - cipd_version: "latest" - cmd: "bootstrapper" - } - properties: - '{' - ' "$bootstrap/exe": {' - ' "exe": {' - ' "cipd_package": "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build",' - ' "cipd_version": "refs/heads/main",' - ' "cmd": [' - ' "luciexe"' - ' ]' - ' }' - ' },' - ' "$bootstrap/properties": {' - ' "properties_file": "infra/config/generated/builders/ci/win-backuprefptr-x86-fyi-rel/properties.json",' - ' "top_level_project": {' - ' "ref": "refs/heads/main",' - ' "repo": {' - ' "host": "chromium.googlesource.com",' - ' "project": "chromium/src"' - ' }' - ' }' - ' },' - ' "builder_group": "chromium.fyi",' - ' "led_builder_is_bootstrapped": true,' - ' "recipe": "chromium"' - '}' - priority: 35 - execution_timeout_secs: 36000 - build_numbers: YES - service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" - experiments { - key: "chromium_swarming.expose_merge_script_failures" - value: 100 - } - experiments { - key: "luci.recipes.use_python3" - value: 100 - } - resultdb { - enable: true - bq_exports { - project: "chrome-luci-data" - dataset: "chromium" - table: "ci_test_results" - test_results {} - } - bq_exports { - project: "chrome-luci-data" - dataset: "chromium" - table: "gpu_ci_test_results" - test_results { - predicate { - test_id_regexp: "ninja://chrome/test:telemetry_gpu_integration_test[^/]*/.+" - } - } - } - bq_exports { - project: "chrome-luci-data" - dataset: "chromium" - table: "blink_web_tests_ci_test_results" - test_results { - predicate { - test_id_regexp: "(ninja://[^/]*blink_web_tests/.+)|(ninja://[^/]*blink_wpt_tests/.+)" - } - } - } - history_options { - use_invocation_timestamp: true - } - } - } - builders { name: "win-build-perf-developer" swarming_host: "chromium-swarm.appspot.com" dimensions: "builder:win-build-perf-developer" @@ -89914,8 +89406,8 @@ '}' execution_timeout_secs: 7200 caches { - name: "xcode_ios_14c18" - path: "xcode_ios_14c18.app" + name: "xcode_ios_14e222b" + path: "xcode_ios_14e222b.app" } build_numbers: YES service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" @@ -90012,8 +89504,8 @@ '}' execution_timeout_secs: 7200 caches { - name: "xcode_ios_14c18" - path: "xcode_ios_14c18.app" + name: "xcode_ios_14e222b" + path: "xcode_ios_14e222b.app" } build_numbers: YES service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com"
diff --git a/infra/config/generated/luci/luci-milo.cfg b/infra/config/generated/luci/luci-milo.cfg index 3b1d0e0c..24455e17 100644 --- a/infra/config/generated/luci/luci-milo.cfg +++ b/infra/config/generated/luci/luci-milo.cfg
@@ -9361,36 +9361,6 @@ category: "win32|arm64" } builders { - name: "buildbucket/luci.chromium.ci/android-backuprefptr-arm-fyi-rel" - category: "backuprefptr|android" - short_name: "32rel" - } - builders { - name: "buildbucket/luci.chromium.ci/android-backuprefptr-arm64-fyi-rel" - category: "backuprefptr|android" - short_name: "64rel" - } - builders { - name: "buildbucket/luci.chromium.ci/linux-backuprefptr-x64-fyi-rel" - category: "backuprefptr|linux" - short_name: "64rel" - } - builders { - name: "buildbucket/luci.chromium.ci/mac-backuprefptr-x64-fyi-rel" - category: "backuprefptr|mac" - short_name: "64rel" - } - builders { - name: "buildbucket/luci.chromium.ci/win-backuprefptr-x86-fyi-rel" - category: "backuprefptr|win" - short_name: "32rel" - } - builders { - name: "buildbucket/luci.chromium.ci/win-backuprefptr-x64-fyi-rel" - category: "backuprefptr|win" - short_name: "64rel" - } - builders { name: "buildbucket/luci.chromium.ci/build-perf-android" category: "buildperf" short_name: "and"
diff --git a/infra/config/generated/luci/luci-notify.cfg b/infra/config/generated/luci/luci-notify.cfg index 0334623..9a0ba277 100644 --- a/infra/config/generated/luci/luci-notify.cfg +++ b/infra/config/generated/luci/luci-notify.cfg
@@ -2111,32 +2111,6 @@ } notifiers { notifications { - on_change: true - email { - recipients: "chrome-memory-safety+bots@google.com" - } - } - builders { - bucket: "ci" - name: "android-backuprefptr-arm-fyi-rel" - repository: "https://chromium.googlesource.com/chromium/src" - } -} -notifiers { - notifications { - on_change: true - email { - recipients: "chrome-memory-safety+bots@google.com" - } - } - builders { - bucket: "ci" - name: "android-backuprefptr-arm64-fyi-rel" - repository: "https://chromium.googlesource.com/chromium/src" - } -} -notifiers { - notifications { on_new_status: FAILURE email { recipients: "chrome-buld-team+alert@google.com" @@ -3232,19 +3206,6 @@ } notifiers { notifications { - on_change: true - email { - recipients: "chrome-memory-safety+bots@google.com" - } - } - builders { - bucket: "ci" - name: "linux-backuprefptr-x64-fyi-rel" - repository: "https://chromium.googlesource.com/chromium/src" - } -} -notifiers { - notifications { on_occurrence: FAILURE failed_step_regexp: "\\b(bot_update|compile|gclient runhooks|runhooks|update|\\w*nocompile_test)\\b" email { @@ -3638,19 +3599,6 @@ } notifiers { notifications { - on_change: true - email { - recipients: "chrome-memory-safety+bots@google.com" - } - } - builders { - bucket: "ci" - name: "mac-backuprefptr-x64-fyi-rel" - repository: "https://chromium.googlesource.com/chromium/src" - } -} -notifiers { - notifications { on_new_status: FAILURE on_new_status: INFRA_FAILURE email { @@ -3744,32 +3692,6 @@ } notifiers { notifications { - on_change: true - email { - recipients: "chrome-memory-safety+bots@google.com" - } - } - builders { - bucket: "ci" - name: "win-backuprefptr-x64-fyi-rel" - repository: "https://chromium.googlesource.com/chromium/src" - } -} -notifiers { - notifications { - on_change: true - email { - recipients: "chrome-memory-safety+bots@google.com" - } - } - builders { - bucket: "ci" - name: "win-backuprefptr-x86-fyi-rel" - repository: "https://chromium.googlesource.com/chromium/src" - } -} -notifiers { - notifications { on_new_status: FAILURE email { recipients: "chrome-buld-team+alert@google.com"
diff --git a/infra/config/generated/luci/luci-scheduler.cfg b/infra/config/generated/luci/luci-scheduler.cfg index ee3dd3a..83727c2 100644 --- a/infra/config/generated/luci/luci-scheduler.cfg +++ b/infra/config/generated/luci/luci-scheduler.cfg
@@ -3334,24 +3334,6 @@ } } job { - id: "android-backuprefptr-arm-fyi-rel" - realm: "ci" - buildbucket { - server: "cr-buildbucket.appspot.com" - bucket: "ci" - builder: "android-backuprefptr-arm-fyi-rel" - } -} -job { - id: "android-backuprefptr-arm64-fyi-rel" - realm: "ci" - buildbucket { - server: "cr-buildbucket.appspot.com" - bucket: "ci" - builder: "android-backuprefptr-arm64-fyi-rel" - } -} -job { id: "android-bfcache-rel" realm: "ci" buildbucket { @@ -4596,15 +4578,6 @@ } } job { - id: "linux-backuprefptr-x64-fyi-rel" - realm: "ci" - buildbucket { - server: "cr-buildbucket.appspot.com" - bucket: "ci" - builder: "linux-backuprefptr-x64-fyi-rel" - } -} -job { id: "linux-bfcache-rel" realm: "ci" buildbucket { @@ -5271,15 +5244,6 @@ } } job { - id: "mac-backuprefptr-x64-fyi-rel" - realm: "ci" - buildbucket { - server: "cr-buildbucket.appspot.com" - bucket: "ci" - builder: "mac-backuprefptr-x64-fyi-rel" - } -} -job { id: "mac-code-coverage" realm: "ci" schedule: "triggered" @@ -5729,24 +5693,6 @@ } } job { - id: "win-backuprefptr-x64-fyi-rel" - realm: "ci" - buildbucket { - server: "cr-buildbucket.appspot.com" - bucket: "ci" - builder: "win-backuprefptr-x64-fyi-rel" - } -} -job { - id: "win-backuprefptr-x86-fyi-rel" - realm: "ci" - buildbucket { - server: "cr-buildbucket.appspot.com" - bucket: "ci" - builder: "win-backuprefptr-x86-fyi-rel" - } -} -job { id: "win-build-perf-developer" realm: "ci" buildbucket { @@ -6310,8 +6256,6 @@ triggers: "android-arm64-archive-rel" triggers: "android-arm64-proguard-rel" triggers: "android-asan" - triggers: "android-backuprefptr-arm-fyi-rel" - triggers: "android-backuprefptr-arm64-fyi-rel" triggers: "android-bfcache-rel" triggers: "android-binary-size-generator" triggers: "android-build-perf-developer" @@ -6399,7 +6343,6 @@ triggers: "linux-annotator-rel" triggers: "linux-archive-dbg" triggers: "linux-archive-rel" - triggers: "linux-backuprefptr-x64-fyi-rel" triggers: "linux-bfcache-rel" triggers: "linux-blink-animation-use-time-delta" triggers: "linux-blink-heap-verification" @@ -6453,7 +6396,6 @@ triggers: "mac-arm64-archive-rel" triggers: "mac-arm64-on-arm64-rel" triggers: "mac-arm64-rel" - triggers: "mac-backuprefptr-x64-fyi-rel" triggers: "mac-cr23-rel" triggers: "mac-intel-on-arm64-rel" triggers: "mac-lsan-fyi-rel" @@ -6474,8 +6416,6 @@ triggers: "win-archive-dbg" triggers: "win-archive-rel" triggers: "win-asan" - triggers: "win-backuprefptr-x64-fyi-rel" - triggers: "win-backuprefptr-x86-fyi-rel" triggers: "win-build-perf-developer" triggers: "win-cr23-rel" triggers: "win-fieldtrial-rel"
diff --git a/infra/config/lib/builders.star b/infra/config/lib/builders.star index c2e50b85..17f0794b 100644 --- a/infra/config/lib/builders.star +++ b/infra/config/lib/builders.star
@@ -674,7 +674,7 @@ "use sheriff_rotations instead") if "$build/goma" in properties: fail('Setting "$build/goma" property is not supported: ' + - "use goma_backend, goma_dbug, goma_enable_ats and goma_jobs instead") + "use goma_backend, goma_enable_ats and goma_jobs instead") if "$build/code_coverage" in properties: fail('Setting "$build/code_coverage" property is not supported: ' + "use coverage_gs_bucket, use_clang_coverage, use_java_coverage, " +
diff --git a/infra/config/subprojects/chromium/ci/chromium.fyi.star b/infra/config/subprojects/chromium/ci/chromium.fyi.star index 047a63f..2b0f4e2 100644 --- a/infra/config/subprojects/chromium/ci/chromium.fyi.star +++ b/infra/config/subprojects/chromium/ci/chromium.fyi.star
@@ -46,7 +46,6 @@ "win10", "win11", "win32", - "backuprefptr", "buildperf", # TODO(crbug.com/1441164): remove after CR2023 launch. "cr23", @@ -144,58 +143,6 @@ ) ci.builder( - name = "android-backuprefptr-arm-fyi-rel", - builder_spec = builder_config.builder_spec( - gclient_config = builder_config.gclient_config( - config = "chromium", - apply_configs = ["android"], - ), - chromium_config = builder_config.chromium_config( - config = "android", - apply_configs = ["mb"], - build_config = builder_config.build_config.RELEASE, - target_bits = 32, - target_platform = builder_config.target_platform.ANDROID, - ), - android_config = builder_config.android_config(config = "main_builder"), - build_gs_bucket = "chromium-fyi-archive", - ), - builderless = True, - os = os.LINUX_DEFAULT, - console_view_entry = consoles.console_view_entry( - category = "backuprefptr|android", - short_name = "32rel", - ), - notifies = ["chrome-memory-safety"], -) - -ci.builder( - name = "android-backuprefptr-arm64-fyi-rel", - builder_spec = builder_config.builder_spec( - gclient_config = builder_config.gclient_config( - config = "chromium", - apply_configs = ["android"], - ), - chromium_config = builder_config.chromium_config( - config = "android", - apply_configs = ["mb"], - build_config = builder_config.build_config.RELEASE, - target_bits = 64, - target_platform = builder_config.target_platform.ANDROID, - ), - android_config = builder_config.android_config(config = "main_builder"), - build_gs_bucket = "chromium-fyi-archive", - ), - builderless = True, - os = os.LINUX_DEFAULT, - console_view_entry = consoles.console_view_entry( - category = "backuprefptr|android", - short_name = "64rel", - ), - notifies = ["chrome-memory-safety"], -) - -ci.builder( name = "lacros-amd64-generic-rel-fyi", builder_spec = builder_config.builder_spec( gclient_config = builder_config.gclient_config( @@ -674,28 +621,6 @@ ) ci.builder( - name = "linux-backuprefptr-x64-fyi-rel", - builder_spec = builder_config.builder_spec( - gclient_config = builder_config.gclient_config(config = "chromium"), - chromium_config = builder_config.chromium_config( - config = "chromium", - apply_configs = ["mb"], - build_config = builder_config.build_config.RELEASE, - target_bits = 64, - target_platform = builder_config.target_platform.LINUX, - ), - build_gs_bucket = "chromium-fyi-archive", - ), - builderless = True, - os = os.LINUX_DEFAULT, - console_view_entry = consoles.console_view_entry( - category = "backuprefptr|linux", - short_name = "64rel", - ), - notifies = ["chrome-memory-safety"], -) - -ci.builder( name = "android-perfetto-rel", schedule = "triggered", triggered_by = [], @@ -969,79 +894,6 @@ ) ci.builder( - name = "mac-backuprefptr-x64-fyi-rel", - builder_spec = builder_config.builder_spec( - gclient_config = builder_config.gclient_config( - config = "chromium", - ), - chromium_config = builder_config.chromium_config( - config = "chromium", - apply_configs = [ - "mb", - ], - build_config = builder_config.build_config.RELEASE, - target_bits = 64, - target_platform = builder_config.target_platform.MAC, - ), - build_gs_bucket = "chromium-fyi-archive", - ), - builderless = True, - cores = None, - os = os.MAC_ANY, - console_view_entry = consoles.console_view_entry( - category = "backuprefptr|mac", - short_name = "64rel", - ), - notifies = ["chrome-memory-safety"], -) - -ci.builder( - name = "win-backuprefptr-x86-fyi-rel", - builder_spec = builder_config.builder_spec( - gclient_config = builder_config.gclient_config(config = "chromium"), - chromium_config = builder_config.chromium_config( - config = "chromium", - apply_configs = ["mb"], - build_config = builder_config.build_config.RELEASE, - target_bits = 32, - target_platform = builder_config.target_platform.WIN, - ), - build_gs_bucket = "chromium-fyi-archive", - ), - builderless = True, - os = os.WINDOWS_ANY, - console_view_entry = consoles.console_view_entry( - category = "backuprefptr|win", - short_name = "32rel", - ), - notifies = ["chrome-memory-safety"], - reclient_jobs = reclient.jobs.LOW_JOBS_FOR_CI, -) - -ci.builder( - name = "win-backuprefptr-x64-fyi-rel", - builder_spec = builder_config.builder_spec( - gclient_config = builder_config.gclient_config(config = "chromium"), - chromium_config = builder_config.chromium_config( - config = "chromium", - apply_configs = ["mb"], - build_config = builder_config.build_config.RELEASE, - target_bits = 64, - target_platform = builder_config.target_platform.WIN, - ), - build_gs_bucket = "chromium-fyi-archive", - ), - builderless = True, - os = os.WINDOWS_ANY, - console_view_entry = consoles.console_view_entry( - category = "backuprefptr|win", - short_name = "64rel", - ), - notifies = ["chrome-memory-safety"], - reclient_jobs = reclient.jobs.LOW_JOBS_FOR_CI, -) - -ci.builder( name = "win-perfetto-rel", schedule = "triggered", triggered_by = [],
diff --git a/infra/config/subprojects/webrtc/webrtc.fyi.star b/infra/config/subprojects/webrtc/webrtc.fyi.star index da35b640..c7dac1e 100644 --- a/infra/config/subprojects/webrtc/webrtc.fyi.star +++ b/infra/config/subprojects/webrtc/webrtc.fyi.star
@@ -250,7 +250,7 @@ build_gs_bucket = "chromium-webrtc", ), os = os.MAC_ANY, - xcode = xcode.x14main, + xcode = xcode.x14betabots, ) builder( @@ -290,7 +290,7 @@ build_gs_bucket = "chromium-webrtc", ), os = os.MAC_ANY, - xcode = xcode.x14main, + xcode = xcode.x14betabots, ) builder(
diff --git a/ios/chrome/browser/application_context/application_context_impl.mm b/ios/chrome/browser/application_context/application_context_impl.mm index 8376c15..973a5f4 100644 --- a/ios/chrome/browser/application_context/application_context_impl.mm +++ b/ios/chrome/browser/application_context/application_context_impl.mm
@@ -566,6 +566,9 @@ std::max(std::min<int>(net::kDefaultMaxSocketsPerProxyServer, 99), net::ClientSocketPoolManager::max_sockets_per_group( net::HttpNetworkSession::NORMAL_SOCKET_POOL))); + + // Cleanup obsolete preferences. + MigrateObsoleteLocalStatePrefs(local_state_.get()); } void ApplicationContextImpl::CreateGCMDriver() {
diff --git a/ios/chrome/browser/browser_state/chrome_browser_state_impl.mm b/ios/chrome/browser/browser_state/chrome_browser_state_impl.mm index bf3d8a5..75c4c1c 100644 --- a/ios/chrome/browser/browser_state/chrome_browser_state_impl.mm +++ b/ios/chrome/browser/browser_state/chrome_browser_state_impl.mm
@@ -134,8 +134,6 @@ user_prefs::UserPrefs::Set(this, prefs_.get()); // Migrate obsolete prefs. - PrefService* local_state = GetApplicationContext()->GetLocalState(); - MigrateObsoleteLocalStatePrefs(local_state); MigrateObsoleteBrowserStatePrefs(prefs_.get()); BrowserStateDependencyManager::GetInstance()->CreateBrowserStateServices(
diff --git a/ios/chrome/browser/shared/model/web_state_list/web_state_list.h b/ios/chrome/browser/shared/model/web_state_list/web_state_list.h index 809e7c5..2eaf8ee 100644 --- a/ios/chrome/browser/shared/model/web_state_list/web_state_list.h +++ b/ios/chrome/browser/shared/model/web_state_list/web_state_list.h
@@ -257,6 +257,11 @@ void CloseWebStateAtImpl(int index, int close_flags); // Closes and destroys all WebStates after `start_index`. The `close_flags` + // is a bitwise combination of ClosingFlags values. WebStateList is locked + // inside the method. + void CloseAllWebStatesAfterIndex(int start_index, int close_flags); + + // Closes and destroys all WebStates after `start_index`. The `close_flags` // is a bitwise combination of ClosingFlags values. // // Assumes that the WebStateList is locked.
diff --git a/ios/chrome/browser/shared/model/web_state_list/web_state_list.mm b/ios/chrome/browser/shared/model/web_state_list/web_state_list.mm index 40e6395..04b57078 100644 --- a/ios/chrome/browser/shared/model/web_state_list/web_state_list.mm +++ b/ios/chrome/browser/shared/model/web_state_list/web_state_list.mm
@@ -296,25 +296,11 @@ } void WebStateList::CloseAllWebStates(int close_flags) { - DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); - auto lock = LockForMutation(); - PerformBatchOperation(base::BindOnce( - [](int start_index, int close_flags, WebStateList* web_state_list) { - web_state_list->CloseAllWebStatesAfterIndexImpl(start_index, - close_flags); - }, - 0, close_flags)); + CloseAllWebStatesAfterIndex(0, close_flags); } void WebStateList::CloseAllNonPinnedWebStates(int close_flags) { - DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); - auto lock = LockForMutation(); - PerformBatchOperation(base::BindOnce( - [](int start_index, int close_flags, WebStateList* web_state_list) { - web_state_list->CloseAllWebStatesAfterIndexImpl(start_index, - close_flags); - }, - GetIndexOfFirstNonPinnedWebState(), close_flags)); + CloseAllWebStatesAfterIndex(GetIndexOfFirstNonPinnedWebState(), close_flags); } void WebStateList::ActivateWebStateAt(int index) { @@ -500,6 +486,18 @@ // Dropping detached_web_state will destroy it. } +void WebStateList::CloseAllWebStatesAfterIndex(int start_index, + int close_flags) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + auto lock = LockForMutation(); + PerformBatchOperation(base::BindOnce( + [](int start_index, int close_flags, WebStateList* web_state_list) { + web_state_list->CloseAllWebStatesAfterIndexImpl(start_index, + close_flags); + }, + start_index, close_flags)); +} + void WebStateList::CloseAllWebStatesAfterIndexImpl(int start_index, int close_flags) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
diff --git a/ios/chrome/browser/signin/authentication_service.mm b/ios/chrome/browser/signin/authentication_service.mm index fdf3135..88931f42 100644 --- a/ios/chrome/browser/signin/authentication_service.mm +++ b/ios/chrome/browser/signin/authentication_service.mm
@@ -234,7 +234,7 @@ void AuthenticationService::OnApplicationWillEnterForeground() { if (HasPrimaryIdentity(signin::ConsentLevel::kSignin)) { - bool can_sync_start = sync_setup_service_->CanSyncFeatureStart(); + bool can_sync_start = sync_setup_service_->IsSyncFeatureEnabled(); LoginMethodAndSyncState loginMethodAndSyncState = can_sync_start ? SHARED_AUTHENTICATION_SYNC_ON : SHARED_AUTHENTICATION_SYNC_OFF;
diff --git a/ios/chrome/browser/sync/sync_setup_service.cc b/ios/chrome/browser/sync/sync_setup_service.cc index 0a4c9eeb..c24e5dd 100644 --- a/ios/chrome/browser/sync/sync_setup_service.cc +++ b/ios/chrome/browser/sync/sync_setup_service.cc
@@ -43,7 +43,7 @@ } bool SyncSetupService::UserActionIsRequiredToHaveTabSyncWork() { - if (!CanSyncFeatureStart() || + if (!IsSyncFeatureEnabled() || !IsDataTypePreferred(syncer::UserSelectableType::kTabs)) { return true; } @@ -88,8 +88,8 @@ sync_all, sync_service_->GetUserSettings()->GetSelectedTypes()); } -bool SyncSetupService::CanSyncFeatureStart() const { - return sync_service_->CanSyncFeatureStart(); +bool SyncSetupService::IsSyncFeatureEnabled() const { + return sync_service_->IsSyncFeatureEnabled(); } bool SyncSetupService::IsEncryptEverythingEnabled() const {
diff --git a/ios/chrome/browser/sync/sync_setup_service.h b/ios/chrome/browser/sync/sync_setup_service.h index 35e6509e..701e080 100644 --- a/ios/chrome/browser/sync/sync_setup_service.h +++ b/ios/chrome/browser/sync/sync_setup_service.h
@@ -29,8 +29,10 @@ ~SyncSetupService() override; - // Returns whether Sync-the-transport can start the Sync feature. - virtual bool CanSyncFeatureStart() const; + // Returns whether all conditions are satisfied for Sync-the-feature to start. + // This means that there is a Sync-consented account, no disable reasons, and + // first-time Sync setup has been completed by the user. + virtual bool IsSyncFeatureEnabled() const; // Returns whether the given datatype has been enabled for sync and its // initialization is complete (SyncEngineHost::OnEngineInitialized has been @@ -40,7 +42,7 @@ // TODO(crbug.com/1429249): Rename to get rid of the `preferred` terminology. virtual bool IsDataTypePreferred(syncer::UserSelectableType datatype) const; // Enables or disables the given datatype. To be noted: this can be called at - // any time, but will only be meaningful if `CanSyncFeatureStart` is true and + // any time, but will only be meaningful if `IsSyncFeatureEnabled` is true and // `IsSyncEverythingEnabled` is false. Changes won't take effect in the sync // backend before the next call to `CommitChanges`. void SetDataTypeEnabled(syncer::UserSelectableType datatype, bool enabled);
diff --git a/ios/chrome/browser/sync/sync_setup_service_mock.h b/ios/chrome/browser/sync/sync_setup_service_mock.h index 86bcf8c..49fa38df 100644 --- a/ios/chrome/browser/sync/sync_setup_service_mock.h +++ b/ios/chrome/browser/sync/sync_setup_service_mock.h
@@ -23,7 +23,7 @@ SyncSetupServiceMock(syncer::SyncService* sync_service); ~SyncSetupServiceMock() override; MOCK_METHOD(bool, IsEncryptEverythingEnabled, (), (const override)); - MOCK_METHOD(bool, CanSyncFeatureStart, (), (const override)); + MOCK_METHOD(bool, IsSyncFeatureEnabled, (), (const override)); MOCK_METHOD(bool, IsSyncEverythingEnabled, (), (const override)); MOCK_METHOD(bool, IsDataTypePreferred,
diff --git a/ios/chrome/browser/ui/bookmarks/bookmark_utils_ios.mm b/ios/chrome/browser/ui/bookmarks/bookmark_utils_ios.mm index e4a34f1..3990ee5 100644 --- a/ios/chrome/browser/ui/bookmarks/bookmark_utils_ios.mm +++ b/ios/chrome/browser/ui/bookmarks/bookmark_utils_ios.mm
@@ -201,7 +201,7 @@ bookmarks::kEnableBookmarksAccountStorage)) { return false; } - if (!sync_setup_service->CanSyncFeatureStart()) { + if (!sync_setup_service->IsSyncFeatureEnabled()) { // In transport-only mode, any node stored in the profile model needs the // icon. Note that this includes sync-disabled cases like enterprise // policies.
diff --git a/ios/chrome/browser/ui/bookmarks/bookmark_utils_ios_unittest.mm b/ios/chrome/browser/ui/bookmarks/bookmark_utils_ios_unittest.mm index 8679e4c..1e24fb4 100644 --- a/ios/chrome/browser/ui/bookmarks/bookmark_utils_ios_unittest.mm +++ b/ios/chrome/browser/ui/bookmarks/bookmark_utils_ios_unittest.mm
@@ -369,7 +369,7 @@ // If sync-the-feature is on, including bookmarks, the icon should not be // displayed. - ON_CALL(sync_setup_service, CanSyncFeatureStart) + ON_CALL(sync_setup_service, IsSyncFeatureEnabled) .WillByDefault(testing::Return(true)); ON_CALL(sync_setup_service, IsDataTypePreferred) .WillByDefault(testing::Return(true)); @@ -386,7 +386,7 @@ // If sync-the-feature is off, same thing: the icon should be displayed, but // only if the feature is enabled (IsAccountStorageEnabled()). - ON_CALL(sync_setup_service, CanSyncFeatureStart) + ON_CALL(sync_setup_service, IsSyncFeatureEnabled) .WillByDefault(testing::Return(true)); EXPECT_EQ(IsAccountStorageEnabled(), bookmark_utils_ios::ShouldDisplayCloudSlashIconForProfileModel(
diff --git a/ios/chrome/browser/ui/bookmarks/cells/bookmark_parent_folder_item.mm b/ios/chrome/browser/ui/bookmarks/cells/bookmark_parent_folder_item.mm index 37105af..8d7d230 100644 --- a/ios/chrome/browser/ui/bookmarks/cells/bookmark_parent_folder_item.mm +++ b/ios/chrome/browser/ui/bookmarks/cells/bookmark_parent_folder_item.mm
@@ -102,6 +102,9 @@ self.cloudSlashedView = [[UIImageView alloc] initWithImage:cloudSlashedImage]; self.cloudSlashedView.tintColor = CloudSlashTintColor(); self.cloudSlashedView.hidden = YES; + [self.cloudSlashedView + setContentHuggingPriority:UILayoutPriorityRequired + forAxis:UILayoutConstraintAxisHorizontal]; // Container StackView. self.stackView = [[UIStackView alloc] initWithArrangedSubviews:@[
diff --git a/ios/chrome/browser/ui/bookmarks/cells/table_view_bookmarks_folder_item.mm b/ios/chrome/browser/ui/bookmarks/cells/table_view_bookmarks_folder_item.mm index 4a7ee08a..3f17340 100644 --- a/ios/chrome/browser/ui/bookmarks/cells/table_view_bookmarks_folder_item.mm +++ b/ios/chrome/browser/ui/bookmarks/cells/table_view_bookmarks_folder_item.mm
@@ -134,6 +134,9 @@ [[UIImageView alloc] initWithImage:cloudSlashedImage]; self.cloudSlashedView.tintColor = CloudSlashTintColor(); self.cloudSlashedView.hidden = YES; + [self.cloudSlashedView + setContentHuggingPriority:UILayoutPriorityRequired + forAxis:UILayoutConstraintAxisHorizontal]; // Container StackView. UIStackView* horizontalStack =
diff --git a/ios/chrome/browser/ui/browser_view/browser_coordinator.mm b/ios/chrome/browser/ui/browser_view/browser_coordinator.mm index 1963e58..f3d5ede 100644 --- a/ios/chrome/browser/ui/browser_view/browser_coordinator.mm +++ b/ios/chrome/browser/ui/browser_view/browser_coordinator.mm
@@ -901,6 +901,8 @@ [[SafeAreaProvider alloc] initWithBrowser:self.browser]; _viewControllerDependencies.pagePlaceholderBrowserAgent = PagePlaceholderBrowserAgent::FromBrowser(self.browser); + _viewControllerDependencies.webStateUpdateBrowserAgent = + WebStateUpdateBrowserAgent::FromBrowser(self.browser); } - (void)updateViewControllerDependencies { @@ -965,6 +967,7 @@ _viewControllerDependencies.voiceSearchController = nil; _viewControllerDependencies.safeAreaProvider = nil; _viewControllerDependencies.pagePlaceholderBrowserAgent = nil; + _viewControllerDependencies.webStateUpdateBrowserAgent = nil; [_bookmarksCoordinator shutdown]; _bookmarksCoordinator = nil;
diff --git a/ios/chrome/browser/ui/browser_view/browser_view_controller.h b/ios/chrome/browser/ui/browser_view/browser_view_controller.h index b12cf0d..34d7458 100644 --- a/ios/chrome/browser/ui/browser_view/browser_view_controller.h +++ b/ios/chrome/browser/ui/browser_view/browser_view_controller.h
@@ -55,6 +55,7 @@ class UrlLoadingNotifierBrowserAgent; @protocol VoiceSearchController; class WebNavigationBrowserAgent; +class WebStateUpdateBrowserAgent; typedef struct { BubblePresenter* bubblePresenter; @@ -85,6 +86,7 @@ WebNavigationBrowserAgent* webNavigationBrowserAgent; base::WeakPtr<WebStateList> webStateList; SafeAreaProvider* safeAreaProvider; + WebStateUpdateBrowserAgent* webStateUpdateBrowserAgent; } BrowserViewControllerDependencies; // The top-level view controller for the browser UI. Manages other controllers
diff --git a/ios/chrome/browser/ui/browser_view/browser_view_controller.mm b/ios/chrome/browser/ui/browser_view/browser_view_controller.mm index 8c7716d..6d219d4c 100644 --- a/ios/chrome/browser/ui/browser_view/browser_view_controller.mm +++ b/ios/chrome/browser/ui/browser_view/browser_view_controller.mm
@@ -88,6 +88,7 @@ #import "ios/chrome/browser/web/page_placeholder_tab_helper.h" #import "ios/chrome/browser/web/web_navigation_browser_agent.h" #import "ios/chrome/browser/web/web_navigation_util.h" +#import "ios/chrome/browser/web/web_state_update_browser_agent.h" #import "ios/chrome/browser/web_state_list/web_usage_enabler/web_usage_enabler_browser_agent.h" #import "ios/chrome/browser/webui/show_mail_composer_context.h" #import "ios/chrome/common/ui/colors/semantic_color_names.h" @@ -269,6 +270,9 @@ // Used for common web navigation tasks. WebNavigationBrowserAgent* _webNavigationBrowserAgent; + // Used for updates in web state. + WebStateUpdateBrowserAgent* _webStateUpdateBrowserAgent; + // For thumb strip, when YES, fullscreen disabler is reset only when web view // dragging stops, to avoid closing thumb strip and going fullscreen in // one single drag gesture. When NO, full screen disabler is reset when @@ -458,6 +462,7 @@ _voiceSearchController = dependencies.voiceSearchController; self.safeAreaProvider = dependencies.safeAreaProvider; _pagePlaceholderBrowserAgent = dependencies.pagePlaceholderBrowserAgent; + _webStateUpdateBrowserAgent = dependencies.webStateUpdateBrowserAgent; dependencies.lensCoordinator.delegate = self; @@ -526,10 +531,6 @@ #pragma mark - Private Properties -- (BOOL)canShowTabStrip { - return IsRegularXRegularSizeClass(self); -} - - (void)setVisible:(BOOL)visible { if (_visible == visible) return; @@ -603,7 +604,7 @@ if (![self isViewLoaded]) return results; - if (![self canShowTabStrip]) { + if (!IsRegularXRegularSizeClass(self)) { if (self.primaryToolbarCoordinator.viewController.view) { [results addObject:[HeaderDefinition definitionWithView:self.primaryToolbarCoordinator @@ -650,7 +651,7 @@ - (CGFloat)headerOffset { CGFloat headerOffset = self.rootSafeAreaInsets.top; - return [self canShowTabStrip] ? headerOffset : 0.0; + return IsRegularXRegularSizeClass(self) ? headerOffset : 0.0; } - (CGFloat)headerHeight { @@ -692,10 +693,6 @@ return webStateList ? webStateList : nullptr; } -- (int)webStateListSize { - return self.webStateList ? _webStateList->count() : 0; -} - #pragma mark - Public methods - (void)setPrimary:(BOOL)primary { @@ -866,7 +863,8 @@ - (void)animateOpenBackgroundTabFromOriginPoint:(CGPoint)originPoint completion:(void (^)())completion { - if ([self canShowTabStrip] || CGPointEqualToPoint(originPoint, CGPointZero)) { + if (IsRegularXRegularSizeClass(self) || + CGPointEqualToPoint(originPoint, CGPointZero)) { completion(); } else { self.inNewTabAnimation = YES; @@ -1170,12 +1168,13 @@ if (self.tabStripView) { [self showTabStripView:self.tabStripView]; [self.tabStripView layoutSubviews]; + const bool canShowTabStrip = IsRegularXRegularSizeClass(self); if (base::FeatureList::IsEnabled(kModernTabStrip)) { - [self.tabStripCoordinator hideTabStrip:![self canShowTabStrip]]; + [self.tabStripCoordinator hideTabStrip:!canShowTabStrip]; } else { - [self.legacyTabStripCoordinator hideTabStrip:![self canShowTabStrip]]; + [self.legacyTabStripCoordinator hideTabStrip:!canShowTabStrip]; } - _fakeStatusBarView.hidden = ![self canShowTabStrip]; + _fakeStatusBarView.hidden = !canShowTabStrip; [self addConstraintsToPrimaryToolbar]; // If tabstrip is coming back due to a window resize or screen rotation, // reset the full screen controller to adjust the tabstrip position. @@ -1370,7 +1369,7 @@ } - (UIStatusBarStyle)preferredStatusBarStyle { - if ([self canShowTabStrip] && !_isOffTheRecord && + if (IsRegularXRegularSizeClass(self) && !_isOffTheRecord && !base::FeatureList::IsEnabled(kModernTabStrip)) { return self.tabStripView.frame.origin.y < kTabStripAppearanceOffset ? UIStatusBarStyleDefault @@ -1518,7 +1517,7 @@ // screen. // - if the window is regular, it is underneath the tab strip. if (ui::GetDeviceFormFactor() == ui::DEVICE_FORM_FACTOR_PHONE || - ![self canShowTabStrip]) { + !IsRegularXRegularSizeClass(self)) { topAnchor = self.view.topAnchor; } else { topAnchor = self.tabStripView.bottomAnchor; @@ -1854,7 +1853,7 @@ // toolbar_view manages it's alpha changes would also need to be updated. // TODO(crbug.com/778822): This can be cleaned up when the new fullscreen // is enabled. - if (isPrimaryToolbar && ![self canShowTabStrip]) { + if (isPrimaryToolbar && !IsRegularXRegularSizeClass(self)) { self.primaryToolbarOffsetConstraint.constant = yOrigin; } CGRect frame = [header.view frame]; @@ -2045,24 +2044,14 @@ if (ios::provider::IsFullscreenSmoothScrollingSupported()) { self.viewTranslatedForSmoothScrolling = YES; CGFloat toolbarHeight = [self expandedTopToolbarHeight]; - if (self.currentWebState) { + if (self.viewForCurrentWebState) { CGRect webStateViewFrame = UIEdgeInsetsInsetRect(self.viewForCurrentWebState.frame, UIEdgeInsetsMake(toolbarHeight, 0, 0, 0)); self.viewForCurrentWebState.frame = webStateViewFrame; } - - // Translate all web states' offset so web states from other tabs are also - // updated. - for (int index = 0; index < self.webStateListSize; ++index) { - web::WebState* webState = self.webStateList->GetWebStateAt(index); - CRWWebViewScrollViewProxy* scrollProxy = - webState->GetWebViewProxy().scrollViewProxy; - CGPoint scrollOffset = scrollProxy.contentOffset; - scrollOffset.y += toolbarHeight; - scrollProxy.contentOffset = scrollOffset; - } - + _webStateUpdateBrowserAgent->UpdateWebStateScrollViewOffset( + toolbarHeight); // This alerts the fullscreen controller to use the correct new content // insets. self.fullscreenController->FreezeToolbarHeight(true); @@ -2145,28 +2134,20 @@ [self installFakeStatusBar]; [self setupStatusBarLayout]; - // See the comments in `-willAnimateViewReveal:` for the explanation of why - // this is necessary. + // See the comments in `-willAnimateViewRevealFromState:toState:` for the + // explanation of why this is necessary. if (ios::provider::IsFullscreenSmoothScrollingSupported()) { self.viewTranslatedForSmoothScrolling = NO; self.fullscreenController->FreezeToolbarHeight(false); CGFloat toolbarHeight = [self expandedTopToolbarHeight]; - if (self.currentWebState) { + if (self.viewForCurrentWebState) { CGRect webStateViewFrame = UIEdgeInsetsInsetRect(self.viewForCurrentWebState.frame, UIEdgeInsetsMake(-toolbarHeight, 0, 0, 0)); self.viewForCurrentWebState.frame = webStateViewFrame; } - - for (int index = 0; index < self.webStateListSize; ++index) { - web::WebState* webState = self.webStateList->GetWebStateAt(index); - CRWWebViewScrollViewProxy* scrollProxy = - webState->GetWebViewProxy().scrollViewProxy; - - CGPoint scrollOffset = scrollProxy.contentOffset; - scrollOffset.y -= toolbarHeight; - scrollProxy.contentOffset = scrollOffset; - } + _webStateUpdateBrowserAgent->UpdateWebStateScrollViewOffset( + -toolbarHeight); } } else if (currentViewRevealState == ViewRevealState::Peeked) { // Close the omnibox after opening the thumb strip @@ -2225,7 +2206,7 @@ // If the NTP is active, then it's used as the base view for snapshotting. // When the tab strip is visible, or for the incognito NTP, the NTP is laid // out between the toolbars, so it should not be inset while snapshotting. - if ([self canShowTabStrip] || _isOffTheRecord) { + if (IsRegularXRegularSizeClass(self) || _isOffTheRecord) { return UIEdgeInsetsZero; } @@ -2333,7 +2314,8 @@ - (BOOL)shouldAllowOverscrollActionsForOverscrollActionsController: (OverscrollActionsController*)controller { // When screeen size is not regular, overscroll actions should be enabled. - return !self.toolbarAccessoryPresenter.presenting && !self.canShowTabStrip; + return !self.toolbarAccessoryPresenter.presenting && + !IsRegularXRegularSizeClass(self); } - (UIView*)headerViewForOverscrollActionsController: @@ -2450,7 +2432,8 @@ // area. - (CGFloat)expandedTopToolbarHeight { return [self primaryToolbarHeightWithInset] + - ([self canShowTabStrip] ? self.tabStripView.frame.size.height : 0.0) + + (IsRegularXRegularSizeClass(self) ? self.tabStripView.frame.size.height + : 0.0) + self.headerOffset; } @@ -2641,7 +2624,7 @@ - (void)initiateNewTabForegroundAnimationForWebState:(web::WebState*)webState { // Initiates the new tab foreground animation, which is phone-specific. - if ([self canShowTabStrip]) { + if (IsRegularXRegularSizeClass(self)) { if (self.foregroundTabWasAddedCompletionBlock) { // This callback is called before webState is activated. Dispatch the // callback asynchronously to be sure the activation is complete. @@ -2687,7 +2670,7 @@ } - (void)switchtoTabWithNewWebStateIndex:(NSInteger)newWebStateIndex { - if ([self canShowTabStrip]) { + if (IsRegularXRegularSizeClass(self)) { return; } @@ -2785,7 +2768,7 @@ UIView* toolbarSnapshot; if (tabURL == kChromeUINewTabURL && !_isOffTheRecord && - ![self canShowTabStrip]) { + !IsRegularXRegularSizeClass(self)) { // Add a snapshot of the primary toolbar to the background as the // animation runs. UIViewController* toolbarViewController = @@ -2937,7 +2920,7 @@ #pragma mark - SideSwipeControllerDelegate - (void)sideSwipeViewDismissAnimationDidEnd:(UIView*)sideSwipeView { - DCHECK(![self canShowTabStrip]); + DCHECK(!IsRegularXRegularSizeClass(self)); // TODO(crbug.com/1329087): Signal to the toolbar coordinator to perform this // update. Longer-term, make SideSwipeControllerDelegate observable instead of // delegating.
diff --git a/ios/chrome/browser/ui/browser_view/browser_view_controller_unittest.mm b/ios/chrome/browser/ui/browser_view/browser_view_controller_unittest.mm index 387e88d..a9b190274 100644 --- a/ios/chrome/browser/ui/browser_view/browser_view_controller_unittest.mm +++ b/ios/chrome/browser/ui/browser_view/browser_view_controller_unittest.mm
@@ -288,6 +288,8 @@ dependencies.safeAreaProvider = safe_area_provider_; dependencies.pagePlaceholderBrowserAgent = page_placeholder_browser_agent_; dependencies.applicationCommandsHandler = mockApplicationCommandHandler_; + dependencies.webStateUpdateBrowserAgent = + WebStateUpdateBrowserAgent::FromBrowser(browser_.get()); bvc_ = [[BrowserViewController alloc] initWithBrowserContainerViewController:container_
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 63f062c..7b4f205 100644 --- a/ios/chrome/browser/ui/content_suggestions/content_suggestions_mediator.mm +++ b/ios/chrome/browser/ui/content_suggestions/content_suggestions_mediator.mm
@@ -199,6 +199,7 @@ - (void)disconnect { _mostVisitedBridge.reset(); _mostVisitedSites.reset(); + _readingListModelBridge.reset(); } - (void)refreshMostVisitedTiles {
diff --git a/ios/chrome/browser/ui/history/history_table_view_controller.mm b/ios/chrome/browser/ui/history/history_table_view_controller.mm index ac52879..d405fe0 100644 --- a/ios/chrome/browser/ui/history/history_table_view_controller.mm +++ b/ios/chrome/browser/ui/history/history_table_view_controller.mm
@@ -256,7 +256,7 @@ SyncSetupService* syncSetupService = SyncSetupServiceFactory::GetForBrowserState( self.browser->GetBrowserState()); - if (syncSetupService->CanSyncFeatureStart() && + if (syncSetupService->IsSyncFeatureEnabled() && syncSetupService->IsDataTypeActive(syncer::HISTORY_DELETE_DIRECTIVES) && queryResultsInfo.sync_timed_out) { [self showHistoryMatchingQuery:_currentQuery];
diff --git a/ios/chrome/browser/ui/ntp/new_tab_page_mediator.mm b/ios/chrome/browser/ui/ntp/new_tab_page_mediator.mm index e8b6f2f..07907bd1 100644 --- a/ios/chrome/browser/ui/ntp/new_tab_page_mediator.mm +++ b/ios/chrome/browser/ui/ntp/new_tab_page_mediator.mm
@@ -159,6 +159,7 @@ } - (void)shutdown { + [self.suggestionsMediator disconnect]; _searchEngineObserver.reset(); if (_webState && _webStateObserver) { _webState->RemoveObserver(_webStateObserver.get());
diff --git a/ios/chrome/browser/ui/omnibox/zero_suggest_prefetch_helper_unittest.mm b/ios/chrome/browser/ui/omnibox/zero_suggest_prefetch_helper_unittest.mm index 1acd094..bfe533f 100644 --- a/ios/chrome/browser/ui/omnibox/zero_suggest_prefetch_helper_unittest.mm +++ b/ios/chrome/browser/ui/omnibox/zero_suggest_prefetch_helper_unittest.mm
@@ -38,10 +38,10 @@ class MockOmniboxEditModel : public OmniboxEditModel { public: - MockOmniboxEditModel(OmniboxView* view, - OmniboxEditModelDelegate* edit_model_delegate, - OmniboxClient* client) - : OmniboxEditModel(view, edit_model_delegate, client) {} + MockOmniboxEditModel(OmniboxController* omnibox_controller, + OmniboxView* view, + OmniboxEditModelDelegate* edit_model_delegate) + : OmniboxEditModel(omnibox_controller, view, edit_model_delegate) {} ~MockOmniboxEditModel() override = default; MockOmniboxEditModel(const MockOmniboxEditModel&) = delete; @@ -64,12 +64,10 @@ web_state_list_ = std::make_unique<WebStateList>(&web_state_list_delegate_); edit_model_delegate_ = std::make_unique<TestOmniboxEditModelDelegate>(); - auto omnibox_client = std::make_unique<TestOmniboxClient>(); - auto* omnibox_client_ptr = omnibox_client.get(); - view_ = std::make_unique<TestOmniboxView>(edit_model_delegate_.get(), - std::move(omnibox_client)); + view_ = std::make_unique<TestOmniboxView>( + edit_model_delegate_.get(), std::make_unique<TestOmniboxClient>()); model_ = std::make_unique<MockOmniboxEditModel>( - view_.get(), edit_model_delegate_.get(), omnibox_client_ptr); + view_->controller(), view_.get(), edit_model_delegate_.get()); } void CreateHelper() {
diff --git a/ios/chrome/browser/ui/recent_tabs/recent_tabs_coordinator_unittest.mm b/ios/chrome/browser/ui/recent_tabs/recent_tabs_coordinator_unittest.mm index 7ed4177e..3615a7d 100644 --- a/ios/chrome/browser/ui/recent_tabs/recent_tabs_coordinator_unittest.mm +++ b/ios/chrome/browser/ui/recent_tabs/recent_tabs_coordinator_unittest.mm
@@ -176,7 +176,7 @@ SyncSetupServiceMock* syncSetupService = static_cast<SyncSetupServiceMock*>( SyncSetupServiceFactory::GetForBrowserState( chrome_browser_state_.get())); - ON_CALL(*syncSetupService, CanSyncFeatureStart()) + ON_CALL(*syncSetupService, IsSyncFeatureEnabled()) .WillByDefault(Return(syncEnabled)); ON_CALL(*syncSetupService, IsDataTypePreferred(syncer::UserSelectableType::kTabs))
diff --git a/ios/chrome/browser/ui/settings/password/passwords_mediator.mm b/ios/chrome/browser/ui/settings/password/passwords_mediator.mm index e322175..07b8b3b8 100644 --- a/ios/chrome/browser/ui/settings/password/passwords_mediator.mm +++ b/ios/chrome/browser/ui/settings/password/passwords_mediator.mm
@@ -377,7 +377,7 @@ // Compute whether user is capable to run password check in Google Account. - (BOOL)canUseAccountPasswordCheckup { - return _syncSetupService->CanSyncFeatureStart() && + return _syncSetupService->IsSyncFeatureEnabled() && !_syncSetupService->IsEncryptEverythingEnabled(); }
diff --git a/ios/chrome/browser/ui/settings/safety_check/safety_check_mediator.mm b/ios/chrome/browser/ui/settings/safety_check/safety_check_mediator.mm index 011ac0da..b145531 100644 --- a/ios/chrome/browser/ui/settings/safety_check/safety_check_mediator.mm +++ b/ios/chrome/browser/ui/settings/safety_check/safety_check_mediator.mm
@@ -703,7 +703,7 @@ // Computes whether user is capable to run password check in Google Account. - (BOOL)canUseAccountPasswordCheckup { - return self.syncService->CanSyncFeatureStart() && + return self.syncService->IsSyncFeatureEnabled() && !self.syncService->IsEncryptEverythingEnabled(); }
diff --git a/ios/chrome/browser/ui/tab_switcher/tab_grid/BUILD.gn b/ios/chrome/browser/ui/tab_switcher/tab_grid/BUILD.gn index 66fc25bb..2e9793d3 100644 --- a/ios/chrome/browser/ui/tab_switcher/tab_grid/BUILD.gn +++ b/ios/chrome/browser/ui/tab_switcher/tab_grid/BUILD.gn
@@ -33,6 +33,7 @@ "//ios/chrome/browser/bring_android_tabs:features", "//ios/chrome/browser/commerce:commerce", "//ios/chrome/browser/drag_and_drop", + "//ios/chrome/browser/find_in_page", "//ios/chrome/browser/flags:system_flags", "//ios/chrome/browser/main", "//ios/chrome/browser/policy:policy_util", @@ -98,6 +99,7 @@ "//ios/chrome/browser/web_state_list:agents", "//ios/chrome/browser/web_state_list/web_usage_enabler", "//ios/chrome/browser/window_activities", + "//ios/public/provider/chrome/browser/find_in_page:find_in_page_api", "//ios/web", "//ui/base", "//ui/gfx",
diff --git a/ios/chrome/browser/ui/tab_switcher/tab_grid/tab_grid_coordinator.mm b/ios/chrome/browser/ui/tab_switcher/tab_grid/tab_grid_coordinator.mm index 81fa001..d1b7d1e 100644 --- a/ios/chrome/browser/ui/tab_switcher/tab_grid/tab_grid_coordinator.mm +++ b/ios/chrome/browser/ui/tab_switcher/tab_grid/tab_grid_coordinator.mm
@@ -18,6 +18,7 @@ #import "ios/chrome/browser/bring_android_tabs/bring_android_tabs_to_ios_service.h" #import "ios/chrome/browser/bring_android_tabs/bring_android_tabs_to_ios_service_factory.h" #import "ios/chrome/browser/bring_android_tabs/features.h" +#import "ios/chrome/browser/find_in_page/find_tab_helper.h" #import "ios/chrome/browser/main/browser_util.h" #import "ios/chrome/browser/policy/policy_util.h" #import "ios/chrome/browser/prefs/pref_names.h" @@ -90,12 +91,39 @@ #import "ios/chrome/browser/url_loading/url_loading_browser_agent.h" #import "ios/chrome/browser/url_loading/url_loading_params.h" #import "ios/chrome/grit/ios_strings.h" +#import "ios/public/provider/chrome/browser/find_in_page/find_in_page_api.h" #import "ui/base/l10n/l10n_util.h" #if !defined(__has_feature) || !__has_feature(objc_arc) #error "This file requires ARC support." #endif +namespace { + +// If Find in Page uses the system Find panel and if the Find UI is marked as +// active in the current web state of `browser`, this returns true. Otherwise, +// returns false. +bool FindNavigatorShouldBePresentedInBrowser(Browser* browser) { + if (!ios::provider::IsNativeFindInPageWithSystemFindPanel()) { + return false; + } + + web::WebState* currentWebState = + browser->GetWebStateList()->GetActiveWebState(); + if (!currentWebState) { + return false; + } + + FindTabHelper* helper = FindTabHelper::FromWebState(currentWebState); + if (!helper) { + return false; + } + + return helper->IsFindUIActive(); +} + +} // namespace + @interface TabGridCoordinator () <BringAndroidTabsCommands, RecentTabsPresentationDelegate, HistoryPresentationDelegate, @@ -563,8 +591,11 @@ // complete, reset the tab grid mode. self.baseViewController.tabGridMode = TabGridModeNormal; } + Browser* browser = self.bvcContainer.incognito ? self.incognitoBrowser + : self.regularBrowser; if (!GetFirstResponderInWindowScene( - self.baseViewController.view.window.windowScene)) { + self.baseViewController.view.window.windowScene) && + !FindNavigatorShouldBePresentedInBrowser(browser)) { // It is possible to already have a first responder (for example the // omnibox). In that case, we don't want to mark BVC as first responder. [self.bvcContainer.currentBVC becomeFirstResponder];
diff --git a/ios/chrome/browser/web/web_state_update_browser_agent.h b/ios/chrome/browser/web/web_state_update_browser_agent.h index b2529e13..056b398 100644 --- a/ios/chrome/browser/web/web_state_update_browser_agent.h +++ b/ios/chrome/browser/web/web_state_update_browser_agent.h
@@ -27,6 +27,10 @@ WebStateUpdateBrowserAgent& operator=(const WebStateUpdateBrowserAgent&) = delete; + // Translates all web states' offset so web states from other tabs are also + // updated. + void UpdateWebStateScrollViewOffset(CGFloat toolbar_height); + private: friend class BrowserUserData<WebStateUpdateBrowserAgent>; BROWSER_USER_DATA_KEY_DECL();
diff --git a/ios/chrome/browser/web/web_state_update_browser_agent.mm b/ios/chrome/browser/web/web_state_update_browser_agent.mm index 2785c7c..04845870 100644 --- a/ios/chrome/browser/web/web_state_update_browser_agent.mm +++ b/ios/chrome/browser/web/web_state_update_browser_agent.mm
@@ -26,6 +26,23 @@ WebStateUpdateBrowserAgent::~WebStateUpdateBrowserAgent() {} +#pragma mark - Public + +void WebStateUpdateBrowserAgent::UpdateWebStateScrollViewOffset( + CGFloat toolbar_height) { + if (!web_state_list_) { + return; + } + for (int index = 0; index < web_state_list_->count(); ++index) { + web::WebState* web_state = web_state_list_->GetWebStateAt(index); + CRWWebViewScrollViewProxy* scroll_proxy = + web_state->GetWebViewProxy().scrollViewProxy; + CGPoint scroll_offset = scroll_proxy.contentOffset; + scroll_offset.y += toolbar_height; + scroll_proxy.contentOffset = scroll_offset; + } +} + #pragma mark - WebStateListObserver void WebStateUpdateBrowserAgent::WebStateActivatedAt(
diff --git a/ios/google_internal/frameworks/ChromeInternal.framework.dSYM.ios.zip.sha1 b/ios/google_internal/frameworks/ChromeInternal.framework.dSYM.ios.zip.sha1 index 6f6d9a1..1d10d241 100644 --- a/ios/google_internal/frameworks/ChromeInternal.framework.dSYM.ios.zip.sha1 +++ b/ios/google_internal/frameworks/ChromeInternal.framework.dSYM.ios.zip.sha1
@@ -1 +1 @@ -9101131c0dbf88905e86e995e702df38a3413ed9 \ No newline at end of file +e054ce906ccdbb27ff343e505addade9a8e1b312 \ No newline at end of file
diff --git a/ios/google_internal/frameworks/ChromeSSOInternal.framework.dSYM.ios.zip.sha1 b/ios/google_internal/frameworks/ChromeSSOInternal.framework.dSYM.ios.zip.sha1 index e284239..29b15795 100644 --- a/ios/google_internal/frameworks/ChromeSSOInternal.framework.dSYM.ios.zip.sha1 +++ b/ios/google_internal/frameworks/ChromeSSOInternal.framework.dSYM.ios.zip.sha1
@@ -1 +1 @@ -01594fa1416cd846053439c1ce0ed30eef9b67e7 \ No newline at end of file +3c2be63f9041214313e92d59be3a26428039b677 \ No newline at end of file
diff --git a/ios/google_internal/frameworks/chrome_internal_dynamic_framework.ios.zip.sha1 b/ios/google_internal/frameworks/chrome_internal_dynamic_framework.ios.zip.sha1 index 5555cef4..fd0c1f97 100644 --- a/ios/google_internal/frameworks/chrome_internal_dynamic_framework.ios.zip.sha1 +++ b/ios/google_internal/frameworks/chrome_internal_dynamic_framework.ios.zip.sha1
@@ -1 +1 @@ -d5e82889616e6ef5eb3b8fcfcfb4211fcbb5b6ac \ No newline at end of file +69e813baef6780e509913b22ceb4712e5abb4cde \ No newline at end of file
diff --git a/ios/google_internal/frameworks/chrome_internal_dynamic_framework.iossimulator.zip.sha1 b/ios/google_internal/frameworks/chrome_internal_dynamic_framework.iossimulator.zip.sha1 index c424bfe3..82f8835d 100644 --- a/ios/google_internal/frameworks/chrome_internal_dynamic_framework.iossimulator.zip.sha1 +++ b/ios/google_internal/frameworks/chrome_internal_dynamic_framework.iossimulator.zip.sha1
@@ -1 +1 @@ -5f2550158c8283be5b7e408ccf173ff34c74d454 \ No newline at end of file +087a76856b9a37572d4df3591fa01266597427e0 \ No newline at end of file
diff --git a/ios/google_internal/frameworks/chrome_sso_internal_dynamic_framework.ios.zip.sha1 b/ios/google_internal/frameworks/chrome_sso_internal_dynamic_framework.ios.zip.sha1 index a754c97..2edf473 100644 --- a/ios/google_internal/frameworks/chrome_sso_internal_dynamic_framework.ios.zip.sha1 +++ b/ios/google_internal/frameworks/chrome_sso_internal_dynamic_framework.ios.zip.sha1
@@ -1 +1 @@ -f2c98d74b7527c59a3795df00624bb4e1df926ca \ No newline at end of file +932a360cb92aabe2bd96160ee6dbdc25aebc2a6a \ No newline at end of file
diff --git a/ios/google_internal/frameworks/chrome_sso_internal_dynamic_framework.iossimulator.zip.sha1 b/ios/google_internal/frameworks/chrome_sso_internal_dynamic_framework.iossimulator.zip.sha1 index e94fe4b3..b5f99219 100644 --- a/ios/google_internal/frameworks/chrome_sso_internal_dynamic_framework.iossimulator.zip.sha1 +++ b/ios/google_internal/frameworks/chrome_sso_internal_dynamic_framework.iossimulator.zip.sha1
@@ -1 +1 @@ -506bae995111f5dd1e6232a5ced042d31d3a509c \ No newline at end of file +f839758ae90c98c6f855f8a591f33d0b72debb5f \ No newline at end of file
diff --git a/ios/google_internal/frameworks/chrome_test_internal_dynamic_framework.ios.zip.sha1 b/ios/google_internal/frameworks/chrome_test_internal_dynamic_framework.ios.zip.sha1 index 9ce78c5..8d6ddc4 100644 --- a/ios/google_internal/frameworks/chrome_test_internal_dynamic_framework.ios.zip.sha1 +++ b/ios/google_internal/frameworks/chrome_test_internal_dynamic_framework.ios.zip.sha1
@@ -1 +1 @@ -9915c32976a86cdcc4c40e42976821fd714b0ba3 \ No newline at end of file +a6384df1edfd64e844cab286056909d3e6604d12 \ No newline at end of file
diff --git a/ios/google_internal/frameworks/chrome_test_internal_dynamic_framework.iossimulator.zip.sha1 b/ios/google_internal/frameworks/chrome_test_internal_dynamic_framework.iossimulator.zip.sha1 index ac12bb3..e207c82 100644 --- a/ios/google_internal/frameworks/chrome_test_internal_dynamic_framework.iossimulator.zip.sha1 +++ b/ios/google_internal/frameworks/chrome_test_internal_dynamic_framework.iossimulator.zip.sha1
@@ -1 +1 @@ -6b000433683f815a98e222160dfc4f76b7ee4934 \ No newline at end of file +21586e90852ba1561636507321907f8fbd69584e \ No newline at end of file
diff --git a/ios/google_internal/frameworks/remoting_internal_dynamic_framework.ios.zip.sha1 b/ios/google_internal/frameworks/remoting_internal_dynamic_framework.ios.zip.sha1 index a79aff3..7f6f05e 100644 --- a/ios/google_internal/frameworks/remoting_internal_dynamic_framework.ios.zip.sha1 +++ b/ios/google_internal/frameworks/remoting_internal_dynamic_framework.ios.zip.sha1
@@ -1 +1 @@ -0f16cbf43564b986e8e21583d7b44c0dfc754ed0 \ No newline at end of file +193e171a778826824dbf83a7a96243b150571941 \ No newline at end of file
diff --git a/ios/google_internal/frameworks/remoting_internal_dynamic_framework.iossimulator.zip.sha1 b/ios/google_internal/frameworks/remoting_internal_dynamic_framework.iossimulator.zip.sha1 index 435178c..fc3e615 100644 --- a/ios/google_internal/frameworks/remoting_internal_dynamic_framework.iossimulator.zip.sha1 +++ b/ios/google_internal/frameworks/remoting_internal_dynamic_framework.iossimulator.zip.sha1
@@ -1 +1 @@ -b30746424da0e37d1a2d70a40b16b332a95d1e98 \ No newline at end of file +0f363d4582ed19b68c6d0f151c111bcaeae99a93 \ No newline at end of file
diff --git a/ios/google_internal/frameworks/web_view_shell_internal_dynamic_framework.ios.zip.sha1 b/ios/google_internal/frameworks/web_view_shell_internal_dynamic_framework.ios.zip.sha1 index b7c301a..5c35ff4 100644 --- a/ios/google_internal/frameworks/web_view_shell_internal_dynamic_framework.ios.zip.sha1 +++ b/ios/google_internal/frameworks/web_view_shell_internal_dynamic_framework.ios.zip.sha1
@@ -1 +1 @@ -3ff0ca8c2a336b52739c1189457494efab4d9766 \ No newline at end of file +9cfaadde2334353c00e8ccb04ec11dc84df10ecf \ No newline at end of file
diff --git a/ios/google_internal/frameworks/web_view_shell_internal_dynamic_framework.iossimulator.zip.sha1 b/ios/google_internal/frameworks/web_view_shell_internal_dynamic_framework.iossimulator.zip.sha1 index 487f9c79..7a3dcd8e 100644 --- a/ios/google_internal/frameworks/web_view_shell_internal_dynamic_framework.iossimulator.zip.sha1 +++ b/ios/google_internal/frameworks/web_view_shell_internal_dynamic_framework.iossimulator.zip.sha1
@@ -1 +1 @@ -a17f2497f05627c8a0f5d474bf774e3608151026 \ No newline at end of file +738be9dc456033747dd78b26eca5f50230090216 \ No newline at end of file
diff --git a/ios/web/content/init/ios_content_browser_client.cc b/ios/web/content/init/ios_content_browser_client.cc index 925b9e4..6a5df45 100644 --- a/ios/web/content/init/ios_content_browser_client.cc +++ b/ios/web/content/init/ios_content_browser_client.cc
@@ -50,7 +50,7 @@ } std::string IOSContentBrowserClient::GetProduct() { - return version_info::GetProductNameAndVersionForUserAgent(); + return std::string(version_info::GetProductNameAndVersionForUserAgent()); } std::string IOSContentBrowserClient::GetUserAgent() { @@ -73,11 +73,12 @@ blink::UserAgentMetadata IOSContentBrowserClient::GetUserAgentMetadata() { blink::UserAgentMetadata metadata; - metadata.brand_version_list.emplace_back(version_info::GetProductName(), - "113"); + metadata.brand_version_list.emplace_back( + std::string(version_info::GetProductName()), "113"); metadata.brand_full_version_list.emplace_back( - version_info::GetProductName(), version_info::GetVersionNumber()); - metadata.full_version = version_info::GetVersionNumber(); + std::string(version_info::GetProductName()), + std::string(version_info::GetVersionNumber())); + metadata.full_version = std::string(version_info::GetVersionNumber()); metadata.platform = "Unknown"; metadata.architecture = content::GetCpuArchitecture(); metadata.model = content::BuildModelInfo();
diff --git a/ios/web/js_messaging/BUILD.gn b/ios/web/js_messaging/BUILD.gn index ff019cbd..114792fe 100644 --- a/ios/web/js_messaging/BUILD.gn +++ b/ios/web/js_messaging/BUILD.gn
@@ -138,7 +138,10 @@ source_set("scoped_wk_script_message_handler") { configs += [ "//build/config/compiler:enable_arc" ] - deps = [ "//base" ] + deps = [ + ":web_view_js_utils", + "//base", + ] sources = [ "scoped_wk_script_message_handler.h",
diff --git a/ios/web/js_messaging/scoped_wk_script_message_handler.h b/ios/web/js_messaging/scoped_wk_script_message_handler.h index 929724f09..2781332 100644 --- a/ios/web/js_messaging/scoped_wk_script_message_handler.h +++ b/ios/web/js_messaging/scoped_wk_script_message_handler.h
@@ -9,11 +9,41 @@ #include "base/functional/callback.h" -@class CRWScriptMessageHandler; +namespace base { +class Value; +} // namespace base +@class CRWScriptMessageHandler; +@class CRWScriptMessageHandlerWithReply; + +// Callback to receive messages from JavaScript running in a webpage. using ScriptMessageCallback = base::RepeatingCallback<void(WKScriptMessage* message)>; +// A block to be called with the result of processing the message from +// JavaScript. +// 1. Passing a non-nil NSString value to the `error_message` signals an error. +// No matter what value you pass to the `reply`. the Promise will be rejected +// with a JavaScript error object whose message property is set to that +// `error_message` string. +// 2. If the `error_message` is nil, the `reply` will be converted to its +// JavaScript equivalent and the Promise will be fulfilled with the resulting +// value. +// a. If `reply` is nullptr, then the JavaScript resulting value is +// `undefined`. +// b. If `reply` is none type base::Value, then the JavaScript resulting +// value is `null`. +using ScriptMessageReplyHandler = void (^)(const base::Value* reply, + NSString* error_message); +// Callback to receive messages from JavaScript running in a webpage and +// replying to them asynchronously. The `reply_handler` can be called at most +// once. If the `reply_handler` is deallocated before it is called, the Promise +// will be rejected with a JavaScript Error object with an appropriate message +// indicating the handler was never called. +using ScriptMessageWithReplyCallback = + base::RepeatingCallback<void(WKScriptMessage* message, + ScriptMessageReplyHandler reply_handler)>; + // Instances of this class register and unregister itself as a // WKUserContentController script message handler upon construction and // deconstruction respectively. @@ -36,6 +66,19 @@ WKContentWorld* content_world, ScriptMessageCallback callback); + // Registers `script_handler_name` with `user_content_controller` within + // `content_world`. `callback` will be called whenever JavaScript + // sends a post message to `script_handler_name` within `content_world`, and + // it allows native to reply to JavaScript via `reply_handler` which is passed + // to `callback`. + // + // Ex: let result = await + // window.webkit.messageHandlers['script_handler_name'].postMessage("42"); + ScopedWKScriptMessageHandler(WKUserContentController* user_content_controller, + NSString* script_handler_name, + WKContentWorld* content_world, + ScriptMessageWithReplyCallback callback); + ~ScopedWKScriptMessageHandler(); private: @@ -47,7 +90,12 @@ __weak WKUserContentController* user_content_controller_; NSString* script_handler_name_; + // Called with messages sent from JavaScript if the constructor accepting a + // `ScriptMessageCallback` was used, null otherwise. CRWScriptMessageHandler* script_message_handler_; + // Called with messages sent from JavaScript if the constructor accepting a + // `ScriptMessageWithReplyCallback` was used, null otherwise. + CRWScriptMessageHandlerWithReply* script_message_handler_with_reply_; ScopedWKScriptMessageHandler(const ScopedWKScriptMessageHandler&) = delete; ScopedWKScriptMessageHandler& operator=(const ScopedWKScriptMessageHandler&) =
diff --git a/ios/web/js_messaging/scoped_wk_script_message_handler.mm b/ios/web/js_messaging/scoped_wk_script_message_handler.mm index 7b0e144..dd061d1e 100644 --- a/ios/web/js_messaging/scoped_wk_script_message_handler.mm +++ b/ios/web/js_messaging/scoped_wk_script_message_handler.mm
@@ -4,6 +4,8 @@ #import "ios/web/js_messaging/scoped_wk_script_message_handler.h" +#import "ios/web/js_messaging/web_view_js_utils.h" + #if !defined(__has_feature) || !__has_feature(objc_arc) #error "This file requires ARC support." #endif @@ -35,6 +37,42 @@ @end +@interface CRWScriptMessageHandlerWithReply + : NSObject <WKScriptMessageHandlerWithReply> + +- (instancetype)init NS_UNAVAILABLE; + +- (instancetype)initWithCallback:(ScriptMessageWithReplyCallback)callback + NS_DESIGNATED_INITIALIZER; + +@property(nonatomic) ScriptMessageWithReplyCallback callback; + +@end + +@implementation CRWScriptMessageHandlerWithReply + +- (instancetype)initWithCallback:(ScriptMessageWithReplyCallback)callback { + if (self = [super init]) { + _callback = callback; + } + return self; +} + +- (void)userContentController:(WKUserContentController*)userContentController + didReceiveScriptMessage:(WKScriptMessage*)message + replyHandler:(void (^)(id, NSString*))replyHandler { + ScriptMessageReplyHandler replyValueHandler = + ^(const base::Value* reply, NSString* error_message) { + // Per the API documentation, specify the result as nil if an error + // occurred. + id wkResult = error_message ? nil : web::NSObjectFromValueResult(reply); + replyHandler(wkResult, error_message); + }; + _callback.Run(message, replyValueHandler); +} + +@end + ScopedWKScriptMessageHandler::ScopedWKScriptMessageHandler( WKUserContentController* user_content_controller, NSString* script_handler_name, @@ -69,6 +107,25 @@ } } +ScopedWKScriptMessageHandler::ScopedWKScriptMessageHandler( + WKUserContentController* user_content_controller, + NSString* script_handler_name, + WKContentWorld* content_world, + ScriptMessageWithReplyCallback callback) + : content_world_(content_world), + user_content_controller_(user_content_controller), + script_handler_name_(script_handler_name), + script_message_handler_with_reply_( + [[CRWScriptMessageHandlerWithReply alloc] + initWithCallback:callback]) { + DCHECK(content_world); + DCHECK(callback); + [user_content_controller + addScriptMessageHandlerWithReply:script_message_handler_with_reply_ + contentWorld:content_world_ + name:script_handler_name_]; +} + ScopedWKScriptMessageHandler::~ScopedWKScriptMessageHandler() { if (content_world_) { [user_content_controller_
diff --git a/ios/web/js_messaging/scoped_wk_script_message_handler_unittest.mm b/ios/web/js_messaging/scoped_wk_script_message_handler_unittest.mm index e75b5fe..fd81d17 100644 --- a/ios/web/js_messaging/scoped_wk_script_message_handler_unittest.mm +++ b/ios/web/js_messaging/scoped_wk_script_message_handler_unittest.mm
@@ -36,6 +36,35 @@ @"} catch (err) {" @" false;" @"}"; + +// The test asynchronous message handler name. +static NSString* kScriptHandlerWithReplyName = @"FakeHandlerWithReplyName"; + +// Fake result that native reply to JavaScript. +const int kScriptHandlerReplyResult = 42; + +// A part of message of the error which will be hit when a messageHandler is +// used before registration. Full error message should be `undefined is not an +// object (evaluating +// 'window.webkit.messageHandlers['FakeHandlerWithReplyName'].postMessage')`. +static NSString* kScriptUndefinedObjectErrorMessage = + @"undefined is not an object"; + +// Error message JavaScript will catch when `replyHandler` is deallocated before +// it is called. +static NSString* kScriptMessageNoReplyErrorMessage = + @"WKWebView API client did not respond to this postMessage"; + +// Script which sends a post message to the native message handlers which can +// reply to JavaScript asynchronously. Evaluation will result in value of +// `kScriptHandlerReplyResult` on success, or the error message of the +// JavaScript Error caught. +static NSString* kPostMessageWithReplyHandlerScriptFormat = + @"try {" + @" return await window.webkit.messageHandlers['%@'].postMessage(%d);" + @"} catch (err) {" + @" return err.message;" + @"}"; } namespace web { @@ -57,6 +86,12 @@ return [NSString stringWithFormat:kPostMessageScriptFormat, kScriptHandlerName]; } + + NSString* GetPostMessageWithReplyHandlerScript() { + return [NSString stringWithFormat:kPostMessageWithReplyHandlerScriptFormat, + kScriptHandlerWithReplyName, + kScriptHandlerReplyResult]; + } }; // Tests that the ScopedWKScriptMessageHandler block is called for the main @@ -199,4 +234,278 @@ EXPECT_FALSE(handler_called); } +// Tests that the ScopedWKScriptMessageHandler block with reply handler is +// called and reply with correct result for an isolated content world. +TEST_F(ScopedWKScriptMessageHandlerTest, + ScriptMessageWithReplyHandlerReceivedIsolatedWorld) { + __block WKScriptMessage* message = nil; + + std::unique_ptr<ScopedWKScriptMessageHandler> scoped_handler_with_reply = + std::make_unique<ScopedWKScriptMessageHandler>( + GetUserContentController(), kScriptHandlerWithReplyName, + WKContentWorld.defaultClientWorld, + base::BindRepeating(^(WKScriptMessage* callback_message, + ScriptMessageReplyHandler reply_handler) { + message = callback_message; + auto reply = + std::make_unique<base::Value>(kScriptHandlerReplyResult); + reply_handler(reply.get(), /*error_message=*/nil); + })); + + ASSERT_TRUE(LoadHtml("<p>")); + + WKWebView* web_view = + [web::test::GetWebController(web_state()) ensureWebViewCreated]; + id result = web::test::ExecuteAsyncJavaScript( + web_view, WKContentWorld.defaultClientWorld, + GetPostMessageWithReplyHandlerScript()); + ASSERT_TRUE([result isKindOfClass:[NSNumber class]]); + EXPECT_EQ([result intValue], kScriptHandlerReplyResult); + + ASSERT_TRUE(message); + EXPECT_NSEQ(message.name, kScriptHandlerWithReplyName); + + ASSERT_TRUE([message.body isKindOfClass:[NSNumber class]]); + EXPECT_EQ([message.body intValue], kScriptHandlerReplyResult); +} + +// Tests that the ScopedWKScriptMessageHandler block with reply handler is +// called and reply with correct result for the page content world. +TEST_F(ScopedWKScriptMessageHandlerTest, + ScriptMessageWithReplyHandlerReceivedPageWorld) { + __block WKScriptMessage* message = nil; + + std::unique_ptr<ScopedWKScriptMessageHandler> scoped_handler_with_reply = + std::make_unique<ScopedWKScriptMessageHandler>( + GetUserContentController(), kScriptHandlerWithReplyName, + WKContentWorld.pageWorld, + base::BindRepeating(^(WKScriptMessage* callback_message, + ScriptMessageReplyHandler reply_handler) { + message = callback_message; + auto reply = + std::make_unique<base::Value>(kScriptHandlerReplyResult); + reply_handler(reply.get(), /*error_message=*/nil); + })); + + ASSERT_TRUE(LoadHtml("<p>")); + + WKWebView* web_view = + [web::test::GetWebController(web_state()) ensureWebViewCreated]; + id result = + web::test::ExecuteAsyncJavaScript(web_view, WKContentWorld.pageWorld, + GetPostMessageWithReplyHandlerScript()); + ASSERT_TRUE([result isKindOfClass:[NSNumber class]]); + EXPECT_EQ([result intValue], kScriptHandlerReplyResult); + + ASSERT_TRUE(message); + EXPECT_NSEQ(message.name, kScriptHandlerWithReplyName); + + ASSERT_TRUE([message.body isKindOfClass:[NSNumber class]]); + EXPECT_EQ([message.body intValue], kScriptHandlerReplyResult); +} + +// Tests that the ScopedWKScriptMessageHandler block with reply handler is +// called and reply with `undefined` result for the page content world. +TEST_F(ScopedWKScriptMessageHandlerTest, + ScriptMessageWithReplyHandlerReceivedAndReplyUndefinedResult) { + std::unique_ptr<ScopedWKScriptMessageHandler> scoped_handler_with_reply = + std::make_unique<ScopedWKScriptMessageHandler>( + GetUserContentController(), kScriptHandlerWithReplyName, + WKContentWorld.defaultClientWorld, + base::BindRepeating(^(WKScriptMessage* callback_message, + ScriptMessageReplyHandler reply_handler) { + reply_handler(/*reply=*/nullptr, /*error_message=*/nil); + })); + + ASSERT_TRUE(LoadHtml("<p>")); + + WKWebView* web_view = + [web::test::GetWebController(web_state()) ensureWebViewCreated]; + id result = web::test::ExecuteAsyncJavaScript( + web_view, WKContentWorld.defaultClientWorld, + GetPostMessageWithReplyHandlerScript()); + ASSERT_FALSE(result); +} + +// Tests that the ScopedWKScriptMessageHandler block with reply handler is +// called and reply with `none` result for the page content world. +TEST_F(ScopedWKScriptMessageHandlerTest, + ScriptMessageWithReplyHandlerReceivedAndReplyNoneResult) { + std::unique_ptr<ScopedWKScriptMessageHandler> scoped_handler_with_reply = + std::make_unique<ScopedWKScriptMessageHandler>( + GetUserContentController(), kScriptHandlerWithReplyName, + WKContentWorld.defaultClientWorld, + base::BindRepeating(^(WKScriptMessage* callback_message, + ScriptMessageReplyHandler reply_handler) { + auto reply = std::make_unique<base::Value>(); + reply_handler(reply.get(), /*error_message=*/nil); + })); + + ASSERT_TRUE(LoadHtml("<p>")); + + WKWebView* web_view = + [web::test::GetWebController(web_state()) ensureWebViewCreated]; + id result = web::test::ExecuteAsyncJavaScript( + web_view, WKContentWorld.defaultClientWorld, + GetPostMessageWithReplyHandlerScript()); + ASSERT_TRUE([result isKindOfClass:[NSNull class]]); +} + +// Tests that the ScopedWKScriptMessageHandler block with reply handler is +// called and reply with error message when native can't reply a specific result +// for an isolated content world. +TEST_F(ScopedWKScriptMessageHandlerTest, + ScriptMessageWithReplyHandlerReceivedAndReplyWithErrorMessage) { + std::unique_ptr<ScopedWKScriptMessageHandler> scoped_handler_with_reply = + std::make_unique<ScopedWKScriptMessageHandler>( + GetUserContentController(), kScriptHandlerWithReplyName, + WKContentWorld.defaultClientWorld, + base::BindRepeating(^(WKScriptMessage* callback_message, + ScriptMessageReplyHandler reply_handler) { + reply_handler(/*reply=*/nullptr, @"FakeReplyErrorMessage"); + })); + + ASSERT_TRUE(LoadHtml("<p>")); + + WKWebView* web_view = + [web::test::GetWebController(web_state()) ensureWebViewCreated]; + id result = web::test::ExecuteAsyncJavaScript( + web_view, WKContentWorld.defaultClientWorld, + GetPostMessageWithReplyHandlerScript()); + ASSERT_TRUE([result isKindOfClass:[NSString class]]); + EXPECT_NSEQ(result, @"FakeReplyErrorMessage"); +} + +// Tests that the ScopedWKScriptMessageHandler block with reply handler is +// called but no reply to received message for an isolated content world. +TEST_F(ScopedWKScriptMessageHandlerTest, + ScriptMessageWithReplyHandlerReceivedAndNoReply) { + __block bool handler_called = false; + + std::unique_ptr<ScopedWKScriptMessageHandler> scoped_handler_with_reply = + std::make_unique<ScopedWKScriptMessageHandler>( + GetUserContentController(), kScriptHandlerWithReplyName, + WKContentWorld.defaultClientWorld, + base::BindRepeating(^(WKScriptMessage* callback_message, + ScriptMessageReplyHandler reply_handler) { + handler_called = true; + })); + + ASSERT_TRUE(LoadHtml("<p>")); + + WKWebView* web_view = + [web::test::GetWebController(web_state()) ensureWebViewCreated]; + id result = web::test::ExecuteAsyncJavaScript( + web_view, WKContentWorld.defaultClientWorld, + GetPostMessageWithReplyHandlerScript()); + ASSERT_TRUE([result isKindOfClass:[NSString class]]); + EXPECT_NSEQ(result, kScriptMessageNoReplyErrorMessage); + + EXPECT_TRUE(handler_called); +} + +// Tests that the ScopedWKScriptMessageHandler block with reply handler +// is not called after deconstruction. +TEST_F(ScopedWKScriptMessageHandlerTest, + ScriptMessageWithReplyHandlerNotReceivedAfterDeconstruction) { + __block int handler_called_count = 0; + + std::unique_ptr<ScopedWKScriptMessageHandler> scoped_handler_with_reply = + std::make_unique<ScopedWKScriptMessageHandler>( + GetUserContentController(), kScriptHandlerWithReplyName, + WKContentWorld.defaultClientWorld, + base::BindRepeating(^(WKScriptMessage* callback_message, + ScriptMessageReplyHandler reply_handler) { + handler_called_count++; + auto reply = + std::make_unique<base::Value>(kScriptHandlerReplyResult); + reply_handler(reply.get(), /*error_message=*/nil); + })); + + ASSERT_TRUE(LoadHtml("<p>")); + + WKWebView* web_view = + [web::test::GetWebController(web_state()) ensureWebViewCreated]; + id result = web::test::ExecuteAsyncJavaScript( + web_view, WKContentWorld.defaultClientWorld, + GetPostMessageWithReplyHandlerScript()); + ASSERT_TRUE([result isKindOfClass:[NSNumber class]]); + EXPECT_EQ([result intValue], kScriptHandlerReplyResult); + + scoped_handler_with_reply.reset(); + // JavaScript exception should be thrown if script message handler was + // removed. + result = web::test::ExecuteAsyncJavaScript( + web_view, WKContentWorld.defaultClientWorld, + GetPostMessageWithReplyHandlerScript()); + // `result` should be `err.message` of catched `err` now. + ASSERT_TRUE([result isKindOfClass:[NSString class]]); + // `undefined is not an object` error should be hit as message handler + // `FakeHandlerWithReplyName` was removed. + EXPECT_TRUE([result containsString:kScriptUndefinedObjectErrorMessage]); + + EXPECT_EQ(1, handler_called_count); +} + +// Tests that a script message handler with reply registered in the page content +// world does not receive messages from an isolated world. +TEST_F(ScopedWKScriptMessageHandlerTest, + ScriptMessageWithReplyHandlerCrossWorldPageContent) { + __block bool handler_called = false; + + std::unique_ptr<ScopedWKScriptMessageHandler> scoped_handler_with_reply = + std::make_unique<ScopedWKScriptMessageHandler>( + GetUserContentController(), kScriptHandlerWithReplyName, + WKContentWorld.pageWorld, + base::BindRepeating(^(WKScriptMessage* callback_message, + ScriptMessageReplyHandler reply_handler) { + reply_handler(/*reply=*/nullptr, /*error_message=*/nil); + handler_called = true; + })); + + ASSERT_TRUE(LoadHtml("<p>")); + + WKWebView* web_view = + [web::test::GetWebController(web_state()) ensureWebViewCreated]; + id result = web::test::ExecuteAsyncJavaScript( + web_view, WKContentWorld.defaultClientWorld, + GetPostMessageWithReplyHandlerScript()); + // `result` should be `err.message` of catched `err` now. + ASSERT_TRUE([result isKindOfClass:[NSString class]]); + // `undefined is not an object` error should be hit as message handler + // `FakeHandlerWithReplyName` is not aded to corresponding content world. + EXPECT_TRUE([result containsString:kScriptUndefinedObjectErrorMessage]); + EXPECT_FALSE(handler_called); +} + +// Tests that a script message handler with reply registered on an isolated +// world does not receive messages from the page content world. +TEST_F(ScopedWKScriptMessageHandlerTest, + ScriptMessageWithReplyHandlerCrossWorldIsolated) { + __block bool handler_called = false; + + std::unique_ptr<ScopedWKScriptMessageHandler> scoped_handler_with_reply = + std::make_unique<ScopedWKScriptMessageHandler>( + GetUserContentController(), kScriptHandlerWithReplyName, + WKContentWorld.defaultClientWorld, + base::BindRepeating(^(WKScriptMessage* callback_message, + ScriptMessageReplyHandler reply_handler) { + reply_handler(/*reply=*/nullptr, /*error_message=*/nil); + handler_called = true; + })); + + ASSERT_TRUE(LoadHtml("<p>")); + + WKWebView* web_view = + [web::test::GetWebController(web_state()) ensureWebViewCreated]; + id result = + web::test::ExecuteAsyncJavaScript(web_view, WKContentWorld.pageWorld, + GetPostMessageWithReplyHandlerScript()); + // `result` should be `err.message` of catched `err` now. + ASSERT_TRUE([result isKindOfClass:[NSString class]]); + // `undefined is not an object` error should be hit as message handler + // `FakeHandlerWithReplyName` is not aded to corresponding content world. + EXPECT_TRUE([result containsString:kScriptUndefinedObjectErrorMessage]); + EXPECT_FALSE(handler_called); +} } // namespace web
diff --git a/ios/web/test/js_test_util_internal.h b/ios/web/test/js_test_util_internal.h index 35f3527..08bcbb50 100644 --- a/ios/web/test/js_test_util_internal.h +++ b/ios/web/test/js_test_util_internal.h
@@ -19,6 +19,12 @@ WKContentWorld* content_world, NSString* script); +// Executes `script` in `content_world` as an asynchronous JavaScript function, +// waits for execution to complete, and returns the result. +id ExecuteAsyncJavaScript(WKWebView* web_view, + WKContentWorld* content_world, + NSString* script); + } // namespace test } // namespace web
diff --git a/ios/web/test/js_test_util_internal.mm b/ios/web/test/js_test_util_internal.mm index 4047531..23c077b8 100644 --- a/ios/web/test/js_test_util_internal.mm +++ b/ios/web/test/js_test_util_internal.mm
@@ -47,5 +47,33 @@ return result; } +id ExecuteAsyncJavaScript(WKWebView* web_view, + WKContentWorld* content_world, + NSString* script) { + __block id result; + __block bool completed = false; + __block NSError* block_error = nil; + SCOPED_TRACE(base::SysNSStringToUTF8(script)); + [web_view callAsyncJavaScript:script + arguments:nil + inFrame:nil + inContentWorld:content_world + completionHandler:^(id script_result, NSError* script_error) { + result = [script_result copy]; + block_error = [script_error copy]; + completed = true; + }]; + BOOL success = WaitUntilConditionOrTimeout(kWaitForJSCompletionTimeout, ^{ + return completed; + }); + // Log stack trace to provide some context. + EXPECT_TRUE(success) + << base::SysNSStringToUTF8(block_error.description) + << "\nWKWebView failed to complete async javascript execution.\n" + << base::SysNSStringToUTF8( + [[NSThread callStackSymbols] componentsJoinedByString:@"\n"]); + return result; +} + } // namespace test } // namespace web
diff --git a/media/test/data/README.md b/media/test/data/README.md index 950df3b6..85d1222 100644 --- a/media/test/data/README.md +++ b/media/test/data/README.md
@@ -196,6 +196,24 @@ Please be noted sample_scaling_list.cfg is the file with the same name from VTM sample configure. +#### bbb_rpl_in_ph_nut.vvc +VVC stream generated with VTM that is used to verify parsing of complex picture +header structure in a separate PH NALU. +Created with VTM and ffmpeg: +``` +ffmpeg -i bbb-320x240-2video-2audio.mp4 bbb.y4m +ffmpeg -i bbb.y4m -vf scale=1920x1080 bbb_1920x1080.yuv +EncoderApp -f 5 --EnablePicPartitioning=1 --CTUSize=128 \ + --TileColumnWidthArray=5,5,5 --TileRowHeightArray=3,3 --RasterScanSlices=0 \ + --RectSliceFixedWidth=0 --RectSliceFixedHeight=0 \ + --RectSlicePositions=0,19,30,34,45,64,75,79,90,109,120,124,5,24,35,39,50,69,\ +80,84,95,114,125,129,10,29,40,44,55,74,85,89,100,119,130,134 \ + --SliceLevelRpl=0 --SliceLevelDblk=0 --SliceLevelSao=0 --SliceLevelAlf=0 \ + --SliceLevelDeltaQp=0 --ALF=1 --JointCbCr=1 --SAO=1 --WeightedPredP=1 \ + --WeightedPredB=1 --WeightedPredMethod=4 --CCALF=1 \ + --VirtualBoundariesPresentInSPSFlag=0 --SliceLevelWeightedPrediction=0 +``` + ### AV1 Unless noted otherwise, the codec string is `av01.0.04M.08` for 8-bit files,
diff --git a/media/test/data/bbb_rpl_in_ph_nut.vvc b/media/test/data/bbb_rpl_in_ph_nut.vvc new file mode 100644 index 0000000..212eb7d --- /dev/null +++ b/media/test/data/bbb_rpl_in_ph_nut.vvc Binary files differ
diff --git a/media/test/media_bundle_data.filelist b/media/test/media_bundle_data.filelist index 0bde58b6..9b7333503 100644 --- a/media/test/media_bundle_data.filelist +++ b/media/test/media_bundle_data.filelist
@@ -41,6 +41,7 @@ data/bbb_9tiles.vvc data/bbb_9tiles_18slices.vvc data/bbb_chroma_qp_offset_lists.vvc +data/bbb_rpl_in_ph_nut.vvc data/bbb_scaling_lists.vvc data/bear-1280x720-a_frag-cenc-key_rotation.mp4 data/bear-1280x720-a_frag-cenc.mp4
diff --git a/media/unit_tests_bundle_data.filelist b/media/unit_tests_bundle_data.filelist index 53c09ac..5440134 100644 --- a/media/unit_tests_bundle_data.filelist +++ b/media/unit_tests_bundle_data.filelist
@@ -38,6 +38,7 @@ //media/test/data/bbb_9tiles.vvc //media/test/data/bbb_9tiles_18slices.vvc //media/test/data/bbb_chroma_qp_offset_lists.vvc +//media/test/data/bbb_rpl_in_ph_nut.vvc //media/test/data/bbb_scaling_lists.vvc //media/test/data/bear-1280x720-a_frag-cenc-key_rotation.mp4 //media/test/data/bear-1280x720-a_frag-cenc.mp4
diff --git a/media/video/h266_parser.cc b/media/video/h266_parser.cc index 2b0525d..6d48809 100644 --- a/media/video/h266_parser.cc +++ b/media/video/h266_parser.cc
@@ -108,6 +108,14 @@ memset(reinterpret_cast<void*>(this), 0, sizeof(*this)); } +H266PredWeightTable::H266PredWeightTable() { + memset(reinterpret_cast<void*>(this), 0, sizeof(*this)); +} + +H266PictureHeader::H266PictureHeader() { + memset(reinterpret_cast<void*>(this), 0, sizeof(*this)); +} + H266Parser::H266Parser() = default; H266Parser::~H266Parser() = default; @@ -2350,9 +2358,12 @@ } READ_BOOL_OR_RETURN(&pps->pps_rpl1_idx_present_flag); READ_BOOL_OR_RETURN(&pps->pps_weighted_pred_flag); + if (!sps->sps_weighted_pred_flag) { + TRUE_OR_RETURN(!pps->pps_weighted_pred_flag); + } READ_BOOL_OR_RETURN(&pps->pps_weighted_bipred_flag); - if (pps->pps_weighted_pred_flag) { - TRUE_OR_RETURN(pps->pps_weighted_bipred_flag == 0); + if (!sps->sps_weighted_bipred_flag) { + TRUE_OR_RETURN(!pps->pps_weighted_bipred_flag); } READ_BOOL_OR_RETURN(&pps->pps_ref_wraparound_enabled_flag); if (sps->sps_ref_pic_resampling_enabled_flag == 0 || @@ -2887,6 +2898,752 @@ return kOk; } +// 7.3.9 & 7.4.10 +H266Parser::Result H266Parser::ParseRefPicLists( + const H266SPS& sps, + const H266PPS& pps, + H266RefPicLists* ref_pic_lists) { + DCHECK(ref_pic_lists); + + for (int i = 0; i < 2; i++) { + if (sps.sps_num_ref_pic_lists[i] > 0 && + (i == 0 || (i == 1 && pps.pps_rpl1_idx_present_flag))) { + READ_BOOL_OR_RETURN(&ref_pic_lists->rpl_sps_flag[i]); + } else { + if (sps.sps_num_ref_pic_lists[i] == 0) { + ref_pic_lists->rpl_sps_flag[i] = 0; + } else if (sps.sps_num_ref_pic_lists[i] > 0) { + if (pps.pps_rpl1_idx_present_flag == 0 && i == 1) { + ref_pic_lists->rpl_sps_flag[i] = ref_pic_lists->rpl_sps_flag[0]; + } + } + } + + if (ref_pic_lists->rpl_sps_flag[i]) { + if (sps.sps_num_ref_pic_lists[i] > 1 && + (i == 0 || (i == 1 && pps.pps_rpl1_idx_present_flag))) { + READ_BITS_OR_RETURN(base::bits::Log2Ceiling(static_cast<uint32_t>( + sps.sps_num_ref_pic_lists[i])), + &ref_pic_lists->rpl_idx[i]); + IN_RANGE_OR_RETURN(ref_pic_lists->rpl_idx[i], 0, + sps.sps_num_ref_pic_lists[i] - 1); + } else { + if (sps.sps_num_ref_pic_lists[i] == 1) { + ref_pic_lists->rpl_idx[i] = 0; + } + if (i == 1 && pps.pps_rpl1_idx_present_flag == 0 && + sps.sps_num_ref_pic_lists[1] > 1) { + ref_pic_lists->rpl_idx[i] = ref_pic_lists->rpl_idx[0]; + } + } + } else { + ParseRefPicListStruct(i, sps.sps_num_ref_pic_lists[i], sps, + &ref_pic_lists->rpl_ref_lists[i]); + } + + for (int j = 0; j < ref_pic_lists->rpl_ref_lists[i].num_ltrp_entries; j++) { + if (ref_pic_lists->rpl_ref_lists[i].ltrp_in_header_flag) { + READ_BITS_OR_RETURN(sps.sps_log2_max_pic_order_cnt_lsb_minus4 + 4, + &ref_pic_lists->poc_lsb_lt[i][j]); + // Currently we do not use PocLsbLt[i][j], so equation 147 is not + // handled. + } + READ_BOOL_OR_RETURN( + &ref_pic_lists->delta_poc_msb_cycle_present_flag[i][j]); + if (ref_pic_lists->delta_poc_msb_cycle_present_flag[i][j]) { + READ_UE_OR_RETURN(&ref_pic_lists->delta_poc_msb_cycle_lt[i][j]); + IN_RANGE_OR_RETURN( + ref_pic_lists->delta_poc_msb_cycle_lt[i][j], 0, + std::pow(2, 32 - sps.sps_log2_max_pic_order_cnt_lsb_minus4 - 4)); + } else { + ref_pic_lists->delta_poc_msb_cycle_lt[i][j] = 0; + } + } + + // Equation 146 + ref_pic_lists->rpls_idx[i] = ref_pic_lists->rpl_sps_flag[i] + ? ref_pic_lists->rpl_idx[i] + : sps.sps_num_ref_pic_lists[i]; + } + + return kOk; +} + +H266Parser::Result H266Parser::ParsePredWeightTable( + const H266SPS& sps, + const H266PPS& pps, + const H266RefPicLists& ref_pic_lists, + int num_ref_idx_active[2], + H266PredWeightTable* pred_weight_table) { + // 7.3.8 + READ_UE_OR_RETURN(&pred_weight_table->luma_log2_weight_denom); + IN_RANGE_OR_RETURN(pred_weight_table->luma_log2_weight_denom, 0, 7); + if (sps.sps_chroma_format_idc != 0) { + READ_SE_OR_RETURN(&pred_weight_table->delta_chroma_log2_weight_denom); + } else { + pred_weight_table->delta_chroma_log2_weight_denom = 0; + } + pred_weight_table->chroma_log2_weight_denom = + pred_weight_table->luma_log2_weight_denom + + pred_weight_table->delta_chroma_log2_weight_denom; + IN_RANGE_OR_RETURN(pred_weight_table->chroma_log2_weight_denom, 0, 7); + + if (pps.pps_wp_info_in_ph_flag) { + READ_UE_OR_RETURN(&pred_weight_table->num_l0_weights); + IN_RANGE_OR_RETURN( + pred_weight_table->num_l0_weights, 0, + std::min(15, ref_pic_lists.rpl_ref_lists[0].num_ref_entries)); + pred_weight_table->num_weights_l0 = pred_weight_table->num_l0_weights; + } else { + pred_weight_table->num_weights_l0 = num_ref_idx_active[0]; + } + for (int i = 0; i < pred_weight_table->num_weights_l0; i++) { + READ_BOOL_OR_RETURN(&pred_weight_table->luma_weight_l0_flag[i]); + } + if (sps.sps_chroma_format_idc != 0) { + for (int i = 0; i < pred_weight_table->num_weights_l0; i++) { + READ_BOOL_OR_RETURN(&pred_weight_table->chroma_weight_l0_flag[i]); + } + } + for (int i = 0; i < pred_weight_table->num_weights_l0; i++) { + if (pred_weight_table->luma_weight_l0_flag[i]) { + READ_SE_OR_RETURN(&pred_weight_table->delta_luma_weight_l0[i]); + IN_RANGE_OR_RETURN(pred_weight_table->delta_luma_weight_l0[i], -128, 127); + READ_SE_OR_RETURN(&pred_weight_table->luma_offset_l0[i]); + IN_RANGE_OR_RETURN(pred_weight_table->luma_offset_l0[i], -128, 127); + } else { + pred_weight_table->delta_luma_weight_l0[i] = 0; + pred_weight_table->luma_offset_l0[i] = 0; + } + if (pred_weight_table->chroma_weight_l0_flag[i]) { + for (int j = 0; j < 2; j++) { + READ_SE_OR_RETURN(&pred_weight_table->delta_chroma_weight_l0[i][j]); + IN_RANGE_OR_RETURN(pred_weight_table->delta_chroma_weight_l0[i][j], + -128, 127); + READ_SE_OR_RETURN(&pred_weight_table->delta_chroma_offset_l0[i][j]); + IN_RANGE_OR_RETURN(pred_weight_table->delta_chroma_offset_l0[i][j], + -4 * 128, 4 * 127); + } + } + } + + if (pps.pps_weighted_bipred_flag && pps.pps_wp_info_in_ph_flag && + ref_pic_lists.rpl_ref_lists[1].num_ref_entries > 0) { + READ_UE_OR_RETURN(&pred_weight_table->num_l1_weights); + IN_RANGE_OR_RETURN( + pred_weight_table->num_l1_weights, 0, + std::min(15, ref_pic_lists.rpl_ref_lists[1].num_ref_entries)); + } + // Equation 145 + if (!pps.pps_weighted_bipred_flag || + (pps.pps_wp_info_in_ph_flag && + ref_pic_lists.rpl_ref_lists[1].num_ref_entries == 0)) { + pred_weight_table->num_weights_l1 = 0; + } else if (pps.pps_wp_info_in_ph_flag) { + pred_weight_table->num_weights_l1 = pred_weight_table->num_l1_weights; + } else { + pred_weight_table->num_weights_l1 = num_ref_idx_active[1]; + } + + for (int i = 0; i < pred_weight_table->num_weights_l1; i++) { + READ_BOOL_OR_RETURN(&pred_weight_table->luma_weight_l0_flag[i]); + } + if (sps.sps_chroma_format_idc != 0) { + for (int i = 0; i < pred_weight_table->num_weights_l1; i++) { + READ_BOOL_OR_RETURN(&pred_weight_table->chroma_weight_l1_flag[i]); + } + } + for (int i = 0; i < pred_weight_table->num_weights_l1; i++) { + if (pred_weight_table->luma_weight_l1_flag[i]) { + READ_SE_OR_RETURN(&pred_weight_table->delta_luma_weight_l1[i]); + IN_RANGE_OR_RETURN(pred_weight_table->delta_luma_weight_l1[i], -128, 127); + READ_SE_OR_RETURN(&pred_weight_table->luma_offset_l1[i]); + IN_RANGE_OR_RETURN(pred_weight_table->luma_offset_l1[i], -128, 127); + } else { + pred_weight_table->delta_luma_weight_l1[i] = 0; + pred_weight_table->luma_offset_l1[i] = 0; + } + if (pred_weight_table->chroma_weight_l1_flag[i]) { + for (int j = 0; j < 2; j++) { + READ_SE_OR_RETURN(&pred_weight_table->delta_chroma_weight_l1[i][j]); + IN_RANGE_OR_RETURN(pred_weight_table->delta_chroma_weight_l1[i][j], + -128, 127); + READ_SE_OR_RETURN(&pred_weight_table->delta_chroma_offset_l1[i][j]); + IN_RANGE_OR_RETURN(pred_weight_table->delta_chroma_offset_l1[i][j], + -4 * 128, 4 * 127); + } + } + } + + return kOk; +} + +H266Parser::Result H266Parser::ParsePHNut(const H266NALU& nalu, + H266PictureHeader* ph) { + DCHECK(ph); + memset(reinterpret_cast<void*>(ph), 0, sizeof(H266PictureHeader)); + + if (nalu.nal_unit_type != H266NALU::kPH) { + DVLOG(1) << "Not a picture header NALU."; + return kIgnored; + } + + ph->nal_unit_type = nalu.nal_unit_type; + return ParsePictureHeaderStructure(nalu, ph); +} + +H266Parser::Result H266Parser::ParsePHInSlice(const H266NALU& nalu, + H266PictureHeader* ph) { + DCHECK(ph); + memset(reinterpret_cast<void*>(ph), 0, sizeof(H266PictureHeader)); + + if (!(nalu.nal_unit_type >= H266NALU::kTrail && + nalu.nal_unit_type <= H266NALU::kReservedIRAP11)) { + DVLOG(1) << "Embedded picture header structure must be in slice."; + return kInvalidStream; + } + + // The nalu type of slice that current picture header is embedded into. + ph->nal_unit_type = nalu.nal_unit_type; + return ParsePictureHeaderStructure(nalu, ph); +} + +// 7.3.2.8 Picture header structure +// May be in separate PH_NUT or included in slice header. They convey +// information for a particular picture including but not limited to: +// 1. Indication of IRAP/GDR, and if inter-intra slices are allowed. +// 2. LSB and MSB of POC, coding partitioning. +// 3. Picture level collocated info and tool switches. +// 4. RPLs, deblocking/QP info, etc. +// Be noted for each picture there needs to be exactly one PH associated +// with it. +H266Parser::Result H266Parser::ParsePictureHeaderStructure( + const H266NALU& nalu, + H266PictureHeader* ph) { + READ_BOOL_OR_RETURN(&ph->ph_gdr_or_irap_pic_flag); + READ_BOOL_OR_RETURN(&ph->ph_non_ref_pic_flag); + if (ph->ph_gdr_or_irap_pic_flag) { + READ_BOOL_OR_RETURN(&ph->ph_gdr_pic_flag); + } else { + ph->ph_gdr_pic_flag = 0; + } + READ_BOOL_OR_RETURN(&ph->ph_inter_slice_allowed_flag); + + if (ph->ph_inter_slice_allowed_flag) { + READ_BOOL_OR_RETURN(&ph->ph_intra_slice_allowed_flag); + } else { + ph->ph_intra_slice_allowed_flag = 1; + } + + READ_UE_OR_RETURN(&ph->ph_pic_parameter_set_id); + IN_RANGE_OR_RETURN(ph->ph_pic_parameter_set_id, 0, 63); + + const H266PPS* pps = GetPPS(ph->ph_pic_parameter_set_id); + if (!pps) { + DVLOG(1) << "Invalid PPS in picture header."; + return kInvalidStream; + } + + const H266SPS* sps = GetSPS(pps->pps_seq_parameter_set_id); + if (!sps) { + DVLOG(1) << "Failed to find SPS for current PPS."; + return kInvalidStream; + } + const H266VPS* vps = GetVPS(sps->sps_video_parameter_set_id); + if (!vps) { + DVLOG(1) << "VPS for current SPS is not found."; + return kInvalidStream; + } + + if (ph->ph_gdr_or_irap_pic_flag && !ph->ph_gdr_pic_flag) { + int general_layer_idx = vps->GetGeneralLayerIdx(nalu.nuh_layer_id); + if (general_layer_idx > 0 & general_layer_idx < kMaxLayers && + vps->vps_independent_layer_flag[general_layer_idx]) { + TRUE_OR_RETURN(!ph->ph_inter_slice_allowed_flag); + } + } + + // Late validation of ph_gdr_pic_flag as pps id is fetched after + // ph_gdr_pic_flag. + if (sps->sps_gdr_enabled_flag == 0) { + TRUE_OR_RETURN(ph->ph_gdr_pic_flag == 0); + } + + READ_BITS_OR_RETURN(sps->sps_log2_max_pic_order_cnt_lsb_minus4 + 4, + &ph->ph_pic_order_cnt_lsb); + IN_RANGE_OR_RETURN(ph->ph_pic_order_cnt_lsb, 0, + sps->max_pic_order_cnt_lsb - 1); + if (ph->ph_gdr_pic_flag) { + READ_UE_OR_RETURN(&ph->ph_recovery_poc_cnt); + IN_RANGE_OR_RETURN(ph->ph_recovery_poc_cnt, 0, + sps->max_pic_order_cnt_lsb - 1); + } + + if (sps->num_extra_ph_bits > 0) { + SKIP_BITS_OR_RETURN(sps->num_extra_ph_bits); + } + + if (sps->sps_poc_msb_cycle_flag) { + READ_BOOL_OR_RETURN(&ph->ph_poc_msb_cycle_present_flag); + if (ph->ph_poc_msb_cycle_present_flag) { + READ_BITS_OR_RETURN(sps->sps_poc_msb_cycle_len_minus1 + 1, + &ph->ph_poc_msb_cycle_val); + } + } + + // PH alf info. + if (sps->sps_alf_enabled_flag && pps->pps_alf_info_in_ph_flag) { + READ_BOOL_OR_RETURN(&ph->ph_alf_enabled_flag); + if (ph->ph_alf_enabled_flag) { + READ_BITS_OR_RETURN(3, &ph->ph_num_alf_aps_ids_luma); + for (int i = 0; i < ph->ph_num_alf_aps_ids_luma; i++) { + READ_BITS_OR_RETURN(3, &ph->ph_alf_aps_id_luma[i]); + } + if (sps->sps_chroma_format_idc != 0) { + READ_BOOL_OR_RETURN(&ph->ph_alf_cb_enabled_flag); + READ_BOOL_OR_RETURN(&ph->ph_alf_cr_enabled_flag); + } else { + ph->ph_alf_cb_enabled_flag = ph->ph_alf_cr_enabled_flag = 0; + } + if (ph->ph_alf_cb_enabled_flag || ph->ph_alf_cr_enabled_flag) { + READ_BITS_OR_RETURN(3, &ph->ph_alf_aps_id_chroma); + } + if (sps->sps_ccalf_enabled_flag) { + READ_BOOL_OR_RETURN(&ph->ph_alf_cc_cb_enabled_flag); + if (ph->ph_alf_cc_cb_enabled_flag) { + READ_BITS_OR_RETURN(3, &ph->ph_alf_cc_cb_aps_id); + } + READ_BOOL_OR_RETURN(&ph->ph_alf_cc_cr_enabled_flag); + if (ph->ph_alf_cc_cr_enabled_flag) { + READ_BITS_OR_RETURN(3, &ph->ph_alf_cc_cr_aps_id); + } + } else { + ph->ph_alf_cc_cb_enabled_flag = 0; + ph->ph_alf_cc_cr_enabled_flag = 0; + } + } + } else { + ph->ph_alf_enabled_flag = 0; + ph->ph_alf_cb_enabled_flag = ph->ph_alf_cr_enabled_flag = 0; + ph->ph_alf_cc_cb_enabled_flag = 0; + ph->ph_alf_cc_cr_enabled_flag = 0; + } + + if (sps->sps_lmcs_enabled_flag) { + READ_BOOL_OR_RETURN(&ph->ph_lmcs_enabled_flag); + if (ph->ph_lmcs_enabled_flag) { + READ_BITS_OR_RETURN(2, &ph->ph_lmcs_aps_id); + if (sps->sps_chroma_format_idc != 0) { + READ_BOOL_OR_RETURN(&ph->ph_chroma_residual_scale_flag); + } else { + ph->ph_chroma_residual_scale_flag = 0; + } + } + } else { + ph->ph_lmcs_enabled_flag = 0; + ph->ph_chroma_residual_scale_flag = 0; + } + + if (sps->sps_explicit_scaling_list_enabled_flag) { + READ_BOOL_OR_RETURN(&ph->ph_explicit_scaling_list_enabled_flag); + if (ph->ph_explicit_scaling_list_enabled_flag) { + READ_BITS_OR_RETURN(3, &ph->ph_scaling_list_aps_id); + } + } else { + ph->ph_explicit_scaling_list_enabled_flag = 0; + } + + if (sps->sps_virtual_boundaries_enabled_flag && + !sps->sps_virtual_boundaries_present_flag) { + READ_BOOL_OR_RETURN(&ph->ph_virtual_boundaries_present_flag); + // Equation 77. + ph->virtual_boundaries_present_flag = 0; + if (sps->sps_virtual_boundaries_enabled_flag) { + ph->virtual_boundaries_present_flag = + sps->sps_virtual_boundaries_present_flag || + ph->ph_virtual_boundaries_present_flag; + } + if (ph->ph_virtual_boundaries_present_flag) { + READ_UE_OR_RETURN(&ph->ph_num_ver_virtual_boundaries); + IN_RANGE_OR_RETURN(ph->ph_num_ver_virtual_boundaries, 0, + (pps->pps_pic_width_in_luma_samples <= 8) ? 0 : 3); + for (int i = 0; i < ph->ph_num_ver_virtual_boundaries; i++) { + READ_UE_OR_RETURN(&ph->ph_virtual_boundary_pos_x_minus1[i]); + IN_RANGE_OR_RETURN(ph->ph_virtual_boundary_pos_x_minus1[i], 0, + (pps->pps_pic_width_in_luma_samples + 7 / 8) - 2); + } + + READ_UE_OR_RETURN(&ph->ph_num_hor_virtual_boundaries); + IN_RANGE_OR_RETURN(ph->ph_num_hor_virtual_boundaries, 0, + (pps->pps_pic_height_in_luma_samples <= 8) ? 0 : 3); + for (int i = 0; i < ph->ph_num_hor_virtual_boundaries; i++) { + READ_UE_OR_RETURN(&ph->ph_virtual_boundary_pos_y_minus1[i]); + IN_RANGE_OR_RETURN(ph->ph_virtual_boundary_pos_y_minus1[i], 0, + (pps->pps_pic_height_in_luma_samples + 7 / 8) - 2); + } + } else { + ph->ph_num_ver_virtual_boundaries = 0; + } + } else { + ph->ph_virtual_boundaries_present_flag = 0; + ph->ph_num_ver_virtual_boundaries = 0; + } + + if (pps->pps_output_flag_present_flag && !ph->ph_non_ref_pic_flag) { + READ_BOOL_OR_RETURN(&ph->ph_pic_output_flag); + } else { + ph->ph_pic_output_flag = 1; + } + + if (pps->pps_rpl_info_in_ph_flag) { + ParseRefPicLists(*sps, *pps, &ph->ref_pic_lists); + } + + if (sps->sps_partition_constraints_override_enabled_flag) { + READ_BOOL_OR_RETURN(&ph->ph_partition_constraints_override_flag); + } else { + ph->ph_partition_constraints_override_flag = 0; + } + + if (ph->ph_intra_slice_allowed_flag) { + if (ph->ph_partition_constraints_override_flag) { + READ_UE_OR_RETURN(&ph->ph_log2_diff_min_qt_min_cb_intra_slice_luma); + IN_RANGE_OR_RETURN( + ph->ph_log2_diff_min_qt_min_cb_intra_slice_luma, 0, + std::min(6, sps->ctb_log2_size_y) - sps->min_cb_log2_size_y); + // Equation 82 + ph->min_qt_log2_size_intra_y = + ph->ph_log2_diff_min_qt_min_cb_intra_slice_luma + + sps->min_cb_log2_size_y; + + READ_UE_OR_RETURN(&ph->ph_max_mtt_hierarchy_depth_intra_slice_luma); + IN_RANGE_OR_RETURN(ph->ph_max_mtt_hierarchy_depth_intra_slice_luma, 0, + 2 * (sps->ctb_log2_size_y - sps->min_cb_log2_size_y)); + + if (ph->ph_max_mtt_hierarchy_depth_intra_slice_luma != 0) { + READ_UE_OR_RETURN(&ph->ph_log2_diff_max_bt_min_qt_intra_slice_luma); + IN_RANGE_OR_RETURN(ph->ph_log2_diff_max_bt_min_qt_intra_slice_luma, 0, + (sps->sps_qtbtt_dual_tree_intra_flag + ? std::min(6, sps->ctb_log2_size_y) + : sps->ctb_log2_size_y) - + ph->min_qt_log2_size_intra_y); + READ_UE_OR_RETURN(&ph->ph_log2_diff_max_tt_min_qt_intra_slice_luma); + IN_RANGE_OR_RETURN( + ph->ph_log2_diff_max_tt_min_qt_intra_slice_luma, 0, + std::min(6, sps->ctb_log2_size_y) - ph->min_qt_log2_size_intra_y); + } else { + ph->ph_log2_diff_max_bt_min_qt_intra_slice_luma = + sps->sps_log2_diff_max_bt_min_qt_intra_slice_luma; + ph->ph_log2_diff_max_tt_min_qt_intra_slice_luma = + sps->sps_log2_diff_max_tt_min_qt_intra_slice_luma; + } + + if (sps->sps_qtbtt_dual_tree_intra_flag) { + READ_UE_OR_RETURN(&ph->ph_log2_diff_min_qt_min_cb_intra_slice_chroma); + IN_RANGE_OR_RETURN( + ph->ph_log2_diff_min_qt_min_cb_intra_slice_chroma, 0, + std::min(6, sps->ctb_log2_size_y) - sps->min_cb_log2_size_y); + READ_UE_OR_RETURN(&ph->ph_max_mtt_hierarchy_depth_intra_slice_chroma); + IN_RANGE_OR_RETURN( + ph->ph_max_mtt_hierarchy_depth_intra_slice_chroma, 0, + 2 * (sps->ctb_log2_size_y - sps->min_cb_log2_size_y)); + + // Equation 83 + ph->min_qt_log2_size_intra_c = + ph->ph_log2_diff_min_qt_min_cb_intra_slice_chroma + + sps->min_cb_log2_size_y; + + if (ph->ph_max_mtt_hierarchy_depth_intra_slice_chroma) { + READ_UE_OR_RETURN(&ph->ph_log2_diff_max_bt_min_qt_intra_slice_chroma); + IN_RANGE_OR_RETURN( + ph->ph_log2_diff_max_bt_min_qt_intra_slice_chroma, 0, + std::min(6, sps->ctb_log2_size_y) - ph->min_qt_log2_size_intra_c); + READ_UE_OR_RETURN(&ph->ph_log2_diff_max_tt_min_qt_intra_slice_chroma); + IN_RANGE_OR_RETURN( + ph->ph_log2_diff_max_tt_min_qt_intra_slice_chroma, 0, + std::min(6, sps->ctb_log2_size_y) - ph->min_qt_log2_size_intra_c); + } else { + ph->ph_log2_diff_max_bt_min_qt_intra_slice_chroma = + sps->sps_log2_diff_max_bt_min_qt_intra_slice_chroma; + ph->ph_log2_diff_max_tt_min_qt_intra_slice_chroma = + sps->sps_log2_diff_max_tt_min_qt_intra_slice_chroma; + } + } else { + ph->ph_log2_diff_max_bt_min_qt_intra_slice_chroma = + sps->sps_log2_diff_max_bt_min_qt_intra_slice_chroma; + ph->ph_log2_diff_max_tt_min_qt_intra_slice_chroma = + sps->sps_log2_diff_max_tt_min_qt_intra_slice_chroma; + ph->ph_log2_diff_min_qt_min_cb_intra_slice_chroma = + sps->sps_log2_diff_min_qt_min_cb_intra_slice_chroma; + ph->ph_max_mtt_hierarchy_depth_intra_slice_chroma = + sps->sps_max_mtt_hierarchy_depth_intra_slice_chroma; + } + } else { + ph->ph_log2_diff_min_qt_min_cb_intra_slice_luma = + sps->sps_log2_diff_min_qt_min_cb_intra_slice_luma; + ph->ph_max_mtt_hierarchy_depth_intra_slice_luma = + sps->sps_max_mtt_hierarchy_depth_intra_slice_luma; + ph->ph_log2_diff_max_bt_min_qt_intra_slice_luma = + sps->sps_log2_diff_max_bt_min_qt_intra_slice_luma; + ph->ph_log2_diff_max_tt_min_qt_intra_slice_luma = + sps->sps_log2_diff_max_tt_min_qt_intra_slice_luma; + ph->ph_log2_diff_max_bt_min_qt_intra_slice_chroma = + sps->sps_log2_diff_max_bt_min_qt_intra_slice_chroma; + ph->ph_log2_diff_max_tt_min_qt_intra_slice_chroma = + sps->sps_log2_diff_max_tt_min_qt_intra_slice_chroma; + ph->ph_log2_diff_min_qt_min_cb_intra_slice_chroma = + sps->sps_log2_diff_min_qt_min_cb_intra_slice_chroma; + ph->ph_max_mtt_hierarchy_depth_intra_slice_chroma = + sps->sps_max_mtt_hierarchy_depth_intra_slice_chroma; + } + if (pps->pps_cu_qp_delta_enabled_flag) { + READ_UE_OR_RETURN(&ph->ph_cu_qp_delta_subdiv_intra_slice); + IN_RANGE_OR_RETURN( + ph->ph_cu_qp_delta_subdiv_intra_slice, 0, + 2 * (sps->ctb_log2_size_y - ph->min_qt_log2_size_intra_y + + ph->ph_max_mtt_hierarchy_depth_intra_slice_luma)); + } else { + ph->ph_cu_qp_delta_subdiv_intra_slice = 0; + } + if (pps->pps_cu_chroma_qp_offset_list_enabled_flag) { + READ_UE_OR_RETURN(&ph->ph_cu_chroma_qp_offset_subdiv_intra_slice); + IN_RANGE_OR_RETURN( + ph->ph_cu_chroma_qp_offset_subdiv_intra_slice, 0, + 2 * (sps->ctb_log2_size_y - ph->min_qt_log2_size_intra_y + + ph->ph_max_mtt_hierarchy_depth_intra_slice_luma)); + } else { + ph->ph_cu_chroma_qp_offset_subdiv_intra_slice = 0; + } + } // ph_intra_slice_allowed_flag + + if (ph->ph_inter_slice_allowed_flag) { // Syntax parsing till before + // ph_qp_delta + if (ph->ph_partition_constraints_override_flag) { + READ_UE_OR_RETURN(&ph->ph_log2_diff_min_qt_min_cb_inter_slice); + IN_RANGE_OR_RETURN( + ph->ph_log2_diff_min_qt_min_cb_inter_slice, 0, + std::min(6, sps->ctb_log2_size_y) - sps->min_cb_log2_size_y); + // Equation 84 + ph->min_qt_log2_size_inter_y = + ph->ph_log2_diff_min_qt_min_cb_inter_slice + sps->min_cb_log2_size_y; + + READ_UE_OR_RETURN(&ph->ph_max_mtt_hierarchy_depth_inter_slice); + IN_RANGE_OR_RETURN(ph->ph_max_mtt_hierarchy_depth_inter_slice, 0, + 2 * (sps->ctb_log2_size_y - sps->min_cb_log2_size_y)); + + if (ph->ph_max_mtt_hierarchy_depth_inter_slice != 0) { + READ_UE_OR_RETURN(&ph->ph_log2_diff_max_bt_min_qt_inter_slice); + IN_RANGE_OR_RETURN(ph->ph_log2_diff_max_bt_min_qt_inter_slice, 0, + sps->ctb_log2_size_y - ph->min_qt_log2_size_inter_y); + READ_UE_OR_RETURN(&ph->ph_log2_diff_max_tt_min_qt_inter_slice); + IN_RANGE_OR_RETURN( + ph->ph_log2_diff_max_tt_min_qt_inter_slice, 0, + std::min(6, sps->ctb_log2_size_y) - ph->min_qt_log2_size_inter_y); + } else { + ph->ph_log2_diff_max_bt_min_qt_inter_slice = + sps->sps_log2_diff_max_bt_min_qt_inter_slice; + ph->ph_log2_diff_max_tt_min_qt_inter_slice = + sps->sps_log2_diff_max_tt_min_qt_inter_slice; + } + } else { + ph->ph_log2_diff_min_qt_min_cb_inter_slice = + sps->sps_log2_diff_max_bt_min_qt_inter_slice; + ph->ph_max_mtt_hierarchy_depth_inter_slice = + sps->sps_max_mtt_hierarchy_depth_inter_slice; + ph->ph_log2_diff_max_bt_min_qt_inter_slice = + sps->sps_log2_diff_max_bt_min_qt_inter_slice; + ph->ph_log2_diff_max_tt_min_qt_inter_slice = + sps->sps_log2_diff_max_tt_min_qt_inter_slice; + } + + if (pps->pps_cu_qp_delta_enabled_flag) { + READ_UE_OR_RETURN(&ph->ph_cu_qp_delta_subdiv_inter_slice); + IN_RANGE_OR_RETURN( + ph->ph_cu_qp_delta_subdiv_inter_slice, 0, + 2 * (sps->ctb_log2_size_y - ph->min_qt_log2_size_inter_y + + ph->ph_max_mtt_hierarchy_depth_inter_slice)); + } else { + ph->ph_cu_qp_delta_subdiv_inter_slice = 0; + } + + if (pps->pps_cu_chroma_qp_offset_list_enabled_flag) { + READ_UE_OR_RETURN(&ph->ph_cu_chroma_qp_offset_subdiv_inter_slice); + IN_RANGE_OR_RETURN( + ph->ph_cu_chroma_qp_offset_subdiv_inter_slice, 0, + 2 * (sps->ctb_log2_size_y - ph->min_qt_log2_size_inter_y + + ph->ph_max_mtt_hierarchy_depth_inter_slice)); + } else { + ph->ph_cu_chroma_qp_offset_subdiv_inter_slice = 0; + } + + if (sps->sps_temporal_mvp_enabled_flag) { + READ_BOOL_OR_RETURN(&ph->ph_temporal_mvp_enabled_flag); + + if (ph->ph_temporal_mvp_enabled_flag && pps->pps_rpl_info_in_ph_flag) { + if (ph->ref_pic_lists.rpl_ref_lists[1].num_ref_entries > 0) { + READ_BOOL_OR_RETURN(&ph->ph_collocated_from_l0_flag); + } else { + ph->ph_collocated_from_l0_flag = 1; + } + + if ((ph->ph_collocated_from_l0_flag && + ph->ref_pic_lists.rpl_ref_lists[0].num_ref_entries > 1) || + (!ph->ph_collocated_from_l0_flag && + ph->ref_pic_lists.rpl_ref_lists[1].num_ref_entries > 1)) { + READ_UE_OR_RETURN(&ph->ph_collocated_ref_idx); + if (ph->ph_collocated_from_l0_flag) { + IN_RANGE_OR_RETURN( + ph->ph_collocated_ref_idx, 0, + ph->ref_pic_lists.rpl_ref_lists[0].num_ref_entries - 1); + } else { + IN_RANGE_OR_RETURN( + ph->ph_collocated_ref_idx, 0, + ph->ref_pic_lists.rpl_ref_lists[1].num_ref_entries - 1); + } + } else { + ph->ph_collocated_ref_idx = 0; + } + } + } + + if (sps->sps_mmvd_fullpel_only_enabled_flag) { + READ_BOOL_OR_RETURN(&ph->ph_mmvd_fullpel_only_flag); + } else { + ph->ph_mmvd_fullpel_only_flag = 0; + } + + bool presence_flag = 0; + if (!pps->pps_rpl_info_in_ph_flag) { + presence_flag = 1; + } else if (ph->ref_pic_lists.rpl_ref_lists[1].num_ref_entries > 0) { + presence_flag = 1; + } + if (presence_flag) { + READ_BOOL_OR_RETURN(&ph->ph_mvd_l1_zero_flag); + if (sps->sps_bdof_control_present_in_ph_flag) { + READ_BOOL_OR_RETURN(&ph->ph_bdof_disabled_flag); + } else { + ph->ph_bdof_disabled_flag = 1 - sps->sps_bdof_enabled_flag; + } + if (sps->sps_dmvr_control_present_in_ph_flag) { + READ_BOOL_OR_RETURN(&ph->ph_dmvr_disabled_flag); + } else { + ph->ph_dmvr_disabled_flag = 1 - sps->sps_dmvr_enabled_flag; + } + } else { + ph->ph_mvd_l1_zero_flag = 1; + ph->ph_bdof_disabled_flag = 1; + } + + if (sps->sps_prof_control_present_in_ph_flag) { + READ_BOOL_OR_RETURN(&ph->ph_prof_disabled_flag); + } else { + if (sps->sps_affine_prof_enabled_flag) { + ph->ph_prof_disabled_flag = 0; + } else { + ph->ph_prof_disabled_flag = 1; + } + } + + if ((pps->pps_weighted_pred_flag || pps->pps_weighted_bipred_flag) && + pps->pps_wp_info_in_ph_flag) { + int num_active_ref_idx[2] = {0, 0}; + ParsePredWeightTable(*sps, *pps, ph->ref_pic_lists, num_active_ref_idx, + &ph->pred_weight_table); + } + } // ph_inter_slice_allowed_flag + + if (pps->pps_qp_delta_info_in_ph_flag) { + READ_SE_OR_RETURN(&ph->ph_qp_delta); + // Equation 86 + ph->slice_qp_y = 26 + pps->pps_init_qp_minus26 + ph->ph_qp_delta; + IN_RANGE_OR_RETURN(ph->slice_qp_y, -sps->qp_bd_offset, 63); + } + + if (sps->sps_joint_cbcr_enabled_flag) { + READ_BOOL_OR_RETURN(&ph->ph_joint_cbcr_sign_flag); + } + + if (sps->sps_sao_enabled_flag && pps->pps_sao_info_in_ph_flag) { + READ_BOOL_OR_RETURN(&ph->ph_sao_luma_enabled_flag); + if (sps->sps_chroma_format_idc != 0) { + READ_BOOL_OR_RETURN(&ph->ph_sao_chroma_enabled_flag); + } else { + ph->ph_sao_chroma_enabled_flag = 0; + } + } else { + ph->ph_sao_luma_enabled_flag = 0; + ph->ph_sao_chroma_enabled_flag = 0; + } + + if (pps->pps_dbf_info_in_ph_flag) { + READ_BOOL_OR_RETURN(&ph->ph_deblocking_params_present_flag); + if (ph->ph_deblocking_params_present_flag) { + if (!pps->pps_deblocking_filter_disabled_flag) { + READ_BOOL_OR_RETURN(&ph->ph_deblocking_filter_disabled_flag); + } else { + if (pps->pps_deblocking_filter_disabled_flag && + ph->ph_deblocking_params_present_flag) { + ph->ph_deblocking_filter_disabled_flag = 0; + } else { + ph->ph_deblocking_filter_disabled_flag = + pps->pps_deblocking_filter_disabled_flag; + } + } + } + if (!ph->ph_deblocking_filter_disabled_flag) { + READ_SE_OR_RETURN(&ph->ph_luma_beta_offset_div2); + READ_SE_OR_RETURN(&ph->ph_luma_tc_offset_div2); + IN_RANGE_OR_RETURN(ph->ph_luma_beta_offset_div2, -12, 12); + IN_RANGE_OR_RETURN(ph->ph_luma_tc_offset_div2, -12, 12); + + if (pps->pps_chroma_tool_offsets_present_flag) { + READ_SE_OR_RETURN(&ph->ph_cb_beta_offset_div2); + READ_SE_OR_RETURN(&ph->ph_cb_tc_offset_div2); + READ_SE_OR_RETURN(&ph->ph_cr_beta_offset_div2); + READ_SE_OR_RETURN(&ph->ph_cr_tc_offset_div2); + IN_RANGE_OR_RETURN(ph->ph_cb_beta_offset_div2, -12, 12); + IN_RANGE_OR_RETURN(ph->ph_cb_tc_offset_div2, -12, 12); + IN_RANGE_OR_RETURN(ph->ph_cr_beta_offset_div2, -12, 12); + IN_RANGE_OR_RETURN(ph->ph_cr_tc_offset_div2, -12, 12); + } else { + if (pps->pps_chroma_tool_offsets_present_flag) { + ph->ph_cb_beta_offset_div2 = pps->pps_cb_beta_offset_div2; + ph->ph_cb_tc_offset_div2 = pps->pps_cb_tc_offset_div2; + ph->ph_cr_beta_offset_div2 = pps->pps_cr_beta_offset_div2; + ph->ph_cr_tc_offset_div2 = pps->pps_cr_tc_offset_div2; + } else { + ph->ph_cb_beta_offset_div2 = ph->ph_luma_beta_offset_div2; + ph->ph_cb_tc_offset_div2 = ph->ph_luma_tc_offset_div2; + ph->ph_cr_beta_offset_div2 = ph->ph_luma_beta_offset_div2; + ph->ph_cr_tc_offset_div2 = ph->ph_luma_tc_offset_div2; + } + } + } else { + ph->ph_luma_beta_offset_div2 = pps->pps_luma_beta_offset_div2; + ph->ph_luma_tc_offset_div2 = pps->pps_luma_tc_offset_div2; + if (pps->pps_chroma_tool_offsets_present_flag) { + ph->ph_cb_beta_offset_div2 = pps->pps_cb_beta_offset_div2; + ph->ph_cb_tc_offset_div2 = pps->pps_cb_tc_offset_div2; + ph->ph_cr_beta_offset_div2 = pps->pps_cr_beta_offset_div2; + ph->ph_cr_tc_offset_div2 = pps->pps_cr_tc_offset_div2; + } else { + ph->ph_cb_beta_offset_div2 = ph->ph_luma_beta_offset_div2; + ph->ph_cb_tc_offset_div2 = ph->ph_luma_tc_offset_div2; + ph->ph_cr_beta_offset_div2 = ph->ph_luma_beta_offset_div2; + ph->ph_cr_tc_offset_div2 = ph->ph_luma_tc_offset_div2; + } + } + } else { + ph->ph_deblocking_params_present_flag = 0; + } + + // We stop here and do not parse ph extension when + // pps_picture_header_extension_present_flag is 1. + + return kOk; +} + const H266VPS* H266Parser::GetVPS(int vps_id) const { auto it = active_vps_.find(vps_id); if (it == active_vps_.end()) {
diff --git a/media/video/h266_parser.h b/media/video/h266_parser.h index 52c58dc..ca9a3c8 100644 --- a/media/video/h266_parser.h +++ b/media/video/h266_parser.h
@@ -714,6 +714,126 @@ std::variant<H266AlfData, H266LmcsData, H266ScalingListData> data; }; +// 7.3.8. PredWeightTable could exist in picture header or slice header. +struct MEDIA_EXPORT H266PredWeightTable { + H266PredWeightTable(); + + // Syntax elements. + int luma_log2_weight_denom; + int delta_chroma_log2_weight_denom; + int num_l0_weights; + bool luma_weight_l0_flag[15]; + bool chroma_weight_l0_flag[15]; + int delta_luma_weight_l0[15]; + int luma_offset_l0[15]; + int delta_chroma_weight_l0[2][15]; + int delta_chroma_offset_l0[2][15]; + int num_l1_weights; + bool luma_weight_l1_flag[15]; + bool chroma_weight_l1_flag[15]; + int delta_luma_weight_l1[15]; + int luma_offset_l1[15]; + int delta_chroma_weight_l1[2][15]; + int delta_chroma_offset_l1[2][15]; + + // Calculated values. + int chroma_log2_weight_denom; + int num_weights_l0; + int num_weights_l1; +}; + +// 7.3.2.8 +struct MEDIA_EXPORT H266PictureHeader { + H266PictureHeader(); + + // Implies whether the picture header structure + // is within PH_NUT or slice header. + int nal_unit_type; + + // Syntax elements. + bool ph_gdr_or_irap_pic_flag; + bool ph_non_ref_pic_flag; + bool ph_gdr_pic_flag; + bool ph_inter_slice_allowed_flag; + bool ph_intra_slice_allowed_flag; + int ph_pic_parameter_set_id; + int ph_pic_order_cnt_lsb; + int ph_recovery_poc_cnt; + bool ph_poc_msb_cycle_present_flag; + int ph_poc_msb_cycle_val; + bool ph_alf_enabled_flag; + int ph_num_alf_aps_ids_luma; + int ph_alf_aps_id_luma[7]; + bool ph_alf_cb_enabled_flag; + bool ph_alf_cr_enabled_flag; + int ph_alf_aps_id_chroma; + bool ph_alf_cc_cb_enabled_flag; + int ph_alf_cc_cb_aps_id; + bool ph_alf_cc_cr_enabled_flag; + int ph_alf_cc_cr_aps_id; + bool ph_lmcs_enabled_flag; + int ph_lmcs_aps_id; + bool ph_chroma_residual_scale_flag; + bool ph_explicit_scaling_list_enabled_flag; + int ph_scaling_list_aps_id; + bool ph_virtual_boundaries_present_flag; + int ph_num_ver_virtual_boundaries; + int ph_virtual_boundary_pos_x_minus1[3]; + int ph_num_hor_virtual_boundaries; + int ph_virtual_boundary_pos_y_minus1[3]; + bool ph_pic_output_flag; + H266RefPicLists ref_pic_lists; + bool ph_partition_constraints_override_flag; + int ph_log2_diff_min_qt_min_cb_intra_slice_luma; + int ph_max_mtt_hierarchy_depth_intra_slice_luma; + int ph_log2_diff_max_bt_min_qt_intra_slice_luma; + int ph_log2_diff_max_tt_min_qt_intra_slice_luma; + int ph_log2_diff_min_qt_min_cb_intra_slice_chroma; + int ph_max_mtt_hierarchy_depth_intra_slice_chroma; + int ph_log2_diff_max_bt_min_qt_intra_slice_chroma; + int ph_log2_diff_max_tt_min_qt_intra_slice_chroma; + int ph_cu_qp_delta_subdiv_intra_slice; + int ph_cu_chroma_qp_offset_subdiv_intra_slice; + int ph_log2_diff_min_qt_min_cb_inter_slice; + int ph_max_mtt_hierarchy_depth_inter_slice; + int ph_log2_diff_max_bt_min_qt_inter_slice; + int ph_log2_diff_max_tt_min_qt_inter_slice; + int ph_cu_qp_delta_subdiv_inter_slice; + int ph_cu_chroma_qp_offset_subdiv_inter_slice; + bool ph_temporal_mvp_enabled_flag; + bool ph_collocated_from_l0_flag; + int ph_collocated_ref_idx; + bool ph_mmvd_fullpel_only_flag; + bool ph_mvd_l1_zero_flag; + bool ph_bdof_disabled_flag; + bool ph_dmvr_disabled_flag; + bool ph_prof_disabled_flag; + H266PredWeightTable pred_weight_table; + int ph_qp_delta; + bool ph_joint_cbcr_sign_flag; + bool ph_sao_luma_enabled_flag; + bool ph_sao_chroma_enabled_flag; + bool ph_deblocking_params_present_flag; + bool ph_deblocking_filter_disabled_flag; + int ph_luma_beta_offset_div2; + int ph_luma_tc_offset_div2; + int ph_cb_beta_offset_div2; + int ph_cb_tc_offset_div2; + int ph_cr_beta_offset_div2; + int ph_cr_tc_offset_div2; + int ph_extension_length; + // Skip any possible extension bytes. + + // Calculated values. + bool virtual_boundaries_present_flag; + int num_ver_virtual_boundaries; + int num_hor_virtual_boundaries; + int min_qt_log2_size_intra_y; + int min_qt_log2_size_intra_c; + int min_qt_log2_size_inter_y; + int slice_qp_y; +}; + // Class to parse an Annex-B H.266 stream. class MEDIA_EXPORT H266Parser : public H266NaluParser { public: @@ -752,6 +872,10 @@ // |*aps_id| and |*type| as parameter. Result ParseAPS(const H266NALU& nalu, int* pps_id, H266APS::ParamType* type); + // Parse a picture header(PH) NALU and return the parsed structure + // in |*ph|. + Result ParsePHNut(const H266NALU& nalu, H266PictureHeader* ph); + // Return a pointer to VPS with given |vps_id| or // null if not present. const H266VPS* GetVPS(int vps_id) const; @@ -800,6 +924,24 @@ const H266SPS& sps, H266VUIParameters* vui); + Result ParseRefPicLists(const H266SPS& sps, + const H266PPS& pps, + H266RefPicLists* ref_pic_lists); + + Result ParsePredWeightTable(const H266SPS& sps, + const H266PPS& pps, + const H266RefPicLists& ref_pic_lists, + int num_ref_idx_active[2], + H266PredWeightTable* pred_weight_table); + + // Called when picture header structure is in slice header. + Result ParsePHInSlice(const H266NALU& nalu, H266PictureHeader* ph); + + // Shared picture header structure parser for PH structure in PH_NUT and slice + // header. + Result ParsePictureHeaderStructure(const H266NALU& nalu, + H266PictureHeader* ph); + // VPSes/SPSes/PPSes stored for future reference. base::flat_map<int, std::unique_ptr<H266VPS>> active_vps_; base::flat_map<int, std::unique_ptr<H266SPS>> active_sps_;
diff --git a/media/video/h266_parser_fuzzertest.cc b/media/video/h266_parser_fuzzertest.cc index b1e4df9..5169156d 100644 --- a/media/video/h266_parser_fuzzertest.cc +++ b/media/video/h266_parser_fuzzertest.cc
@@ -20,6 +20,7 @@ // found. while (true) { media::H266NALU nalu; + media::H266PictureHeader ph; media::H266Parser::Result res = parser.AdvanceToNextNALU(&nalu); if (res != media::H266Parser::kOk) { break; @@ -44,6 +45,9 @@ int aps_id; res = parser.ParseAPS(nalu, &aps_id, &aps_type); break; + case media::H266NALU::kPH: + res = parser.ParsePHNut(nalu, &ph); + break; // TODO(crbugs.com/1417910): Other NALU types will be checked. default: // Skip other NALU types
diff --git a/media/video/h266_parser_unittest.cc b/media/video/h266_parser_unittest.cc index f51139b..08ca0f0 100644 --- a/media/video/h266_parser_unittest.cc +++ b/media/video/h266_parser_unittest.cc
@@ -61,6 +61,7 @@ int num_parsed_nalus = 0; while (true) { H266NALU nalu; + H266PictureHeader ph; H266Parser::Result res = parser_.AdvanceToNextNALU(&nalu); if (res == H266Parser::kEndOfStream) { DVLOG(1) << "Number of successfully parsed NALUs before EOS: " @@ -94,6 +95,9 @@ res = parser_.ParseAPS(nalu, &aps_id, &aps_type); EXPECT_TRUE(!!parser_.GetAPS(aps_type, aps_id)); break; + case H266NALU::kPH: + res = parser_.ParsePHNut(nalu, &ph); + break; // TODO(crbugs.com/1417910): add more NALU types. default: break; @@ -1190,4 +1194,168 @@ EXPECT_TRUE(!nonexisting_aps); } +// Verify parsing of simple PH_NUT. +TEST_F(H266ParserTest, ParseSimplePHNutShouldSucceed) { + LoadParserFile("bbb_9tiles_18slices.vvc"); + H266NALU target_nalu; + int sps_id; + EXPECT_TRUE(ParseNalusUntilNut(&target_nalu, H266NALU::kSPS)); + EXPECT_EQ(H266Parser::kOk, parser_.ParseSPS(target_nalu, &sps_id)); + // Parsing of the SPS should generate fake VPS with vps_id = 0; + const H266VPS* vps = parser_.GetVPS(0); + EXPECT_TRUE(!!vps); + const H266SPS* sps = parser_.GetSPS(sps_id); + EXPECT_TRUE(!!sps); + int pps_id; + EXPECT_TRUE(ParseNalusUntilNut(&target_nalu, H266NALU::kPPS)); + EXPECT_EQ(H266Parser::kOk, parser_.ParsePPS(target_nalu, &pps_id)); + const H266PPS* pps = parser_.GetPPS(pps_id); + EXPECT_TRUE(!!pps); + + EXPECT_TRUE(ParseNalusUntilNut(&target_nalu, H266NALU::kPH)); + H266PictureHeader ph; + EXPECT_EQ(H266Parser::kOk, parser_.ParsePHNut(target_nalu, &ph)); + EXPECT_TRUE(ph.ph_gdr_or_irap_pic_flag); + EXPECT_FALSE(ph.ph_non_ref_pic_flag); + EXPECT_FALSE(ph.ph_gdr_pic_flag); + EXPECT_FALSE(ph.ph_inter_slice_allowed_flag); + EXPECT_EQ(ph.ph_pic_parameter_set_id, 0); + EXPECT_EQ(ph.ph_pic_order_cnt_lsb, 0); + EXPECT_FALSE(ph.ph_lmcs_enabled_flag); + EXPECT_FALSE(ph.ph_partition_constraints_override_flag); + EXPECT_FALSE(ph.ph_joint_cbcr_sign_flag); +} + +// Verify parsing of complex PH_NUT in which the RPL, deblocking filter, +// SAO, ALF and etc are coded, instead of placing them in slice header(not +// even in the picture header structure of slice header, which will be covered +// by slice header parsing tests.). +TEST_F(H266ParserTest, ParseComplexPHNutShouldSucceed) { + LoadParserFile("bbb_rpl_in_ph_nut.vvc"); + H266NALU target_nalu; + int sps_id; + EXPECT_TRUE(ParseNalusUntilNut(&target_nalu, H266NALU::kSPS)); + EXPECT_EQ(H266Parser::kOk, parser_.ParseSPS(target_nalu, &sps_id)); + // Parsing of the SPS should generate fake VPS with vps_id = 0; + const H266VPS* vps = parser_.GetVPS(0); + EXPECT_TRUE(!!vps); + const H266SPS* sps = parser_.GetSPS(sps_id); + EXPECT_TRUE(!!sps); + int pps_id; + EXPECT_TRUE(ParseNalusUntilNut(&target_nalu, H266NALU::kPPS)); + EXPECT_EQ(H266Parser::kOk, parser_.ParsePPS(target_nalu, &pps_id)); + const H266PPS* pps = parser_.GetPPS(pps_id); + EXPECT_TRUE(!!pps); + + // Parse the first PH_NUT which is for slices of the IDR_N_LP frame. + EXPECT_TRUE(ParseNalusUntilNut(&target_nalu, H266NALU::kPH)); + H266PictureHeader ph; + EXPECT_EQ(H266Parser::kOk, parser_.ParsePHNut(target_nalu, &ph)); + EXPECT_TRUE(ph.ph_gdr_or_irap_pic_flag); + EXPECT_FALSE(ph.ph_non_ref_pic_flag); + EXPECT_FALSE(ph.ph_gdr_pic_flag); + EXPECT_FALSE(ph.ph_inter_slice_allowed_flag); + EXPECT_EQ(ph.ph_pic_parameter_set_id, 0); + EXPECT_EQ(ph.ph_pic_order_cnt_lsb, 0); + EXPECT_FALSE(ph.ph_alf_enabled_flag); + EXPECT_FALSE(ph.ph_lmcs_enabled_flag); + // For this test clip, RPL 0 in ref_pic_lists() is based on one of + // ref_pic_struct(0, rplsIdx), where rplsIdx is indicated by rpl_idx[0]. + EXPECT_EQ(sps->sps_num_ref_pic_lists[0], 20); + EXPECT_FALSE(sps->sps_rpl1_same_as_rpl0_flag); + EXPECT_FALSE(pps->pps_rpl1_idx_present_flag); + EXPECT_TRUE(ph.ref_pic_lists.rpl_sps_flag[0]); + EXPECT_EQ(ph.ref_pic_lists.rpl_idx[0], 0); + // rpl_sps_flag[1] & rpl_idx[1] is not present in PH, but they are inferred to + // be equal to rpl_sps_flag[0] since sps_num_ref_pic_lists[i] is non-zero. + EXPECT_EQ(sps->sps_num_ref_pic_lists[1], 20); + EXPECT_EQ(ph.ref_pic_lists.rpl_sps_flag[1], ph.ref_pic_lists.rpl_sps_flag[0]); + EXPECT_EQ(ph.ref_pic_lists.rpl_idx[1], ph.ref_pic_lists.rpl_idx[0]); + + EXPECT_FALSE(ph.ph_partition_constraints_override_flag); + EXPECT_EQ(ph.ph_qp_delta, -5); + EXPECT_FALSE(ph.ph_joint_cbcr_sign_flag); + EXPECT_TRUE(ph.ph_sao_luma_enabled_flag); + EXPECT_TRUE(ph.ph_sao_chroma_enabled_flag); + + // Parse the second PH_NUT which is for slices of first STSA frame. + EXPECT_TRUE(ParseNalusUntilNut(&target_nalu, H266NALU::kPH)); + H266PictureHeader ph2; + EXPECT_EQ(H266Parser::kOk, parser_.ParsePHNut(target_nalu, &ph2)); + EXPECT_FALSE(ph2.ph_gdr_or_irap_pic_flag); + EXPECT_FALSE(ph2.ph_non_ref_pic_flag); + EXPECT_TRUE(ph2.ph_inter_slice_allowed_flag); + EXPECT_FALSE(ph2.ph_intra_slice_allowed_flag); + EXPECT_EQ(ph2.ph_pic_parameter_set_id, 0); + EXPECT_EQ(ph2.ph_pic_order_cnt_lsb, 4); + // RPL 0/1 is signalled in PH, since rpl_sps_flag[1] is inferred to be + // equal to rpl_sps_flag[0], which is 0 here. + EXPECT_EQ(ph2.ref_pic_lists.rpl_sps_flag[0], 0); + EXPECT_EQ(ph2.ref_pic_lists.rpl_sps_flag[1], + ph2.ref_pic_lists.rpl_sps_flag[0]); + EXPECT_EQ(ph2.ref_pic_lists.rpl_ref_lists[0].num_ref_entries, 1); + EXPECT_EQ(ph2.ref_pic_lists.rpl_ref_lists[0].abs_delta_poc_st[0], 3); + EXPECT_EQ(ph2.ref_pic_lists.rpl_ref_lists[1].num_ref_entries, 1); + EXPECT_EQ(ph2.ref_pic_lists.rpl_ref_lists[1].abs_delta_poc_st[0], 3); + + EXPECT_TRUE(ph2.ph_temporal_mvp_enabled_flag); + EXPECT_FALSE(ph2.ph_collocated_from_l0_flag); + + // Verify the weighted prediction table. + EXPECT_EQ(ph2.pred_weight_table.luma_log2_weight_denom, 0); + EXPECT_EQ(ph2.pred_weight_table.delta_chroma_log2_weight_denom, 0); + EXPECT_EQ(ph2.pred_weight_table.num_l0_weights, 1); + EXPECT_FALSE(ph2.pred_weight_table.luma_weight_l0_flag[0]); + EXPECT_FALSE(ph2.pred_weight_table.chroma_weight_l0_flag[0]); + EXPECT_EQ(ph2.pred_weight_table.num_l1_weights, 1); + EXPECT_FALSE(ph2.pred_weight_table.luma_weight_l1_flag[0]); + EXPECT_FALSE(ph2.pred_weight_table.chroma_weight_l1_flag[0]); + + // Verify other misc syntax elements. + EXPECT_EQ(ph2.ph_qp_delta, 4); + EXPECT_FALSE(ph2.ph_joint_cbcr_sign_flag); + EXPECT_TRUE(ph2.ph_sao_chroma_enabled_flag); + EXPECT_TRUE(ph2.ph_sao_chroma_enabled_flag); + + // Parse till the end of the stream for the last PH_NUT. + H266PictureHeader last_ph; + while (ParseNalusUntilNut(&target_nalu, H266NALU::kPH)) { + EXPECT_EQ(H266Parser::kOk, parser_.ParsePHNut(target_nalu, &last_ph)); + } + EXPECT_EQ(last_ph.ph_pic_order_cnt_lsb, 3); + EXPECT_EQ(last_ph.ref_pic_lists.rpl_ref_lists[0].num_ref_entries, 2); + EXPECT_EQ(last_ph.ref_pic_lists.rpl_ref_lists[0].abs_delta_poc_st[0], 0); + EXPECT_EQ(last_ph.ref_pic_lists.rpl_ref_lists[0].abs_delta_poc_st[1], 2); + EXPECT_EQ(last_ph.ref_pic_lists.rpl_ref_lists[1].abs_delta_poc_st[0], 0); + EXPECT_EQ(last_ph.ref_pic_lists.rpl_ref_lists[1].abs_delta_poc_st[1], 2); + EXPECT_EQ(last_ph.pred_weight_table.luma_log2_weight_denom, 0); + EXPECT_EQ(last_ph.pred_weight_table.delta_chroma_log2_weight_denom, 0); + EXPECT_EQ(last_ph.pred_weight_table.num_l0_weights, 2); + EXPECT_FALSE(last_ph.pred_weight_table.luma_weight_l0_flag[0]); + EXPECT_FALSE(last_ph.pred_weight_table.luma_weight_l0_flag[1]); + EXPECT_FALSE(last_ph.pred_weight_table.chroma_weight_l0_flag[0]); + EXPECT_FALSE(last_ph.pred_weight_table.chroma_weight_l0_flag[1]); + EXPECT_EQ(last_ph.pred_weight_table.num_l1_weights, 2); + EXPECT_FALSE(last_ph.pred_weight_table.luma_weight_l1_flag[0]); + EXPECT_FALSE(last_ph.pred_weight_table.chroma_weight_l1_flag[0]); + EXPECT_EQ(last_ph.ph_qp_delta, 7); +} + +TEST_F(H266ParserTest, ParsePHNutWithoutParsingPPSShouldFail) { + LoadParserFile("bbb_9tiles_18slices.vvc"); + H266NALU target_nalu; + int sps_id; + EXPECT_TRUE(ParseNalusUntilNut(&target_nalu, H266NALU::kSPS)); + EXPECT_EQ(H266Parser::kOk, parser_.ParseSPS(target_nalu, &sps_id)); + // Parsing of the SPS should generate fake VPS with vps_id = 0; + const H266VPS* vps = parser_.GetVPS(0); + EXPECT_TRUE(!!vps); + const H266SPS* sps = parser_.GetSPS(sps_id); + EXPECT_TRUE(!!sps); + + EXPECT_TRUE(ParseNalusUntilNut(&target_nalu, H266NALU::kPH)); + H266PictureHeader ph; + EXPECT_EQ(H266Parser::kInvalidStream, parser_.ParsePHNut(target_nalu, &ph)); +} + } // namespace media
diff --git a/net/quic/quic_chromium_client_session.cc b/net/quic/quic_chromium_client_session.cc index bf24813..551c8a0 100644 --- a/net/quic/quic_chromium_client_session.cc +++ b/net/quic/quic_chromium_client_session.cc
@@ -1830,11 +1830,10 @@ logger_->OnConnectionClosed(frame, source); - const quic::QuicConnection::MultiPortStats* multi_port_stats = - connection()->multi_port_stats(); - if (multi_port_stats != nullptr) { - UMA_HISTOGRAM_COUNTS_1000("Net.QuicMultiPort.NumDefaultPathDegrading", - multi_port_stats->num_path_degrading); + UMA_HISTOGRAM_COUNTS_1000("Net.QuicSession.NumDefaultPathDegrading", + connection()->GetStats().num_path_degrading); + if (const quic::QuicConnection::MultiPortStats* multi_port_stats = + connection()->multi_port_stats()) { UMA_HISTOGRAM_COUNTS_1000( "Net.QuicMultiPort.NumMultiPortFailureWhenPathNotDegrading", multi_port_stats @@ -1845,7 +1844,7 @@ multi_port_stats->num_multi_port_probe_failures_when_path_degrading; uint64_t srtt_ms = multi_port_stats->rtt_stats.smoothed_rtt().ToMilliseconds(); - if (multi_port_stats->num_path_degrading > 0 && + if (connection()->GetStats().num_path_degrading > 0 && total_multi_port_probe_failures > 0 && srtt_ms > 0) { base::UmaHistogramSparse( "Net.QuicMultiPort.AltPortRttWhenPathDegradingVsGeneral", @@ -3079,10 +3078,10 @@ StartProbing(std::move(probing_callback), network, peer_address); } -std::unique_ptr<quic::QuicPathValidationContext> -QuicChromiumClientSession::CreateContextForMultiPortPath() { +void QuicChromiumClientSession::CreateContextForMultiPortPath( + std::unique_ptr<quic::MultiPortPathContextObserver> context_observer) { if (!connection()->connection_migration_use_new_cid()) { - return nullptr; + return; } // Create and configure socket on default network @@ -3091,7 +3090,7 @@ if (stream_factory_->ConfigureSocket( probing_socket.get(), ToIPEndPoint(peer_address()), default_network_, session_key_.socket_tag()) != OK) { - return nullptr; + return; } // Create new packet writer and reader on the probing socket. @@ -3107,10 +3106,11 @@ probing_writer->set_delegate(&path_validation_writer_delegate_); IPEndPoint local_address; probing_socket->GetLocalAddress(&local_address); - return std::make_unique<QuicChromiumPathValidationContext>( - ToQuicSocketAddress(local_address), peer_address(), default_network_, - std::move(probing_socket), std::move(probing_writer), - std::move(probing_reader)); + context_observer->OnMultiPortPathContextAvailable( + std::make_unique<QuicChromiumPathValidationContext>( + ToQuicSocketAddress(local_address), peer_address(), default_network_, + std::move(probing_socket), std::move(probing_writer), + std::move(probing_reader))); } void QuicChromiumClientSession::MigrateToMultiPortPath(
diff --git a/net/quic/quic_chromium_client_session.h b/net/quic/quic_chromium_client_session.h index 117b838cf..14d91c7 100644 --- a/net/quic/quic_chromium_client_session.h +++ b/net/quic/quic_chromium_client_session.h
@@ -749,8 +749,9 @@ void OnPathDegrading() override; void OnForwardProgressMadeAfterPathDegrading() override; void OnKeyUpdate(quic::KeyUpdateReason reason) override; - std::unique_ptr<quic::QuicPathValidationContext> - CreateContextForMultiPortPath() override; + void CreateContextForMultiPortPath( + std::unique_ptr<quic::MultiPortPathContextObserver> context_observer) + override; void MigrateToMultiPortPath( std::unique_ptr<quic::QuicPathValidationContext> context) override;
diff --git a/net/socket/socket_bio_adapter.cc b/net/socket/socket_bio_adapter.cc index 59e928e1..4126ea3 100644 --- a/net/socket/socket_bio_adapter.cc +++ b/net/socket/socket_bio_adapter.cc
@@ -4,11 +4,13 @@ #include "net/socket/socket_bio_adapter.h" +#include <stdio.h> #include <string.h> #include <algorithm> #include "base/check_op.h" +#include "base/debug/alias.h" #include "base/functional/bind.h" #include "base/location.h" #include "base/notreached.h" @@ -284,9 +286,24 @@ int write_buffer_used_old = write_buffer_used_; int write_size = std::min(write_buffer_used_, write_buffer_->RemainingCapacity()); + + // TODO(crbug.com/1440692): Remove this once the crash is resolved. + char debug[128]; + snprintf(debug, sizeof(debug), + "offset=%d;remaining=%d;used=%d;write_size=%d", + write_buffer_->offset(), write_buffer_->RemainingCapacity(), + write_buffer_used_, write_size); + base::debug::Alias(debug); + write_error_ = ERR_IO_PENDING; int result = socket_->Write(write_buffer_.get(), write_size, write_callback_, kTrafficAnnotation); + + // TODO(crbug.com/1440692): Remove this once the crash is resolved. + char debug2[32]; + snprintf(debug2, sizeof(debug2), "result=%d", result); + base::debug::Alias(debug2); + // If `write_buffer_used_` changed across a call to the underlying socket, // something went very wrong. //
diff --git a/net/socket/socket_posix.cc b/net/socket/socket_posix.cc index ea3d794d98..14f0993 100644 --- a/net/socket/socket_posix.cc +++ b/net/socket/socket_posix.cc
@@ -325,12 +325,12 @@ CompletionOnceCallback callback, const NetworkTrafficAnnotationTag& /* traffic_annotation */) { DCHECK(thread_checker_.CalledOnValidThread()); - DCHECK_NE(kInvalidSocket, socket_fd_); - DCHECK(!waiting_connect_); + CHECK_NE(kInvalidSocket, socket_fd_); + CHECK(!waiting_connect_); CHECK(write_callback_.is_null()); // Synchronous operation not supported - DCHECK(!callback.is_null()); - DCHECK_LT(0, buf_len); + CHECK(!callback.is_null()); + CHECK_LT(0, buf_len); int rv = DoWrite(buf, buf_len); if (rv == ERR_IO_PENDING) @@ -525,6 +525,9 @@ #else int rv = HANDLE_EINTR(write(socket_fd_, buf->data(), buf_len)); #endif + if (rv >= 0) { + CHECK_LE(rv, buf_len); + } return rv >= 0 ? rv : MapSystemError(errno); }
diff --git a/net/socket/ssl_client_socket_impl.cc b/net/socket/ssl_client_socket_impl.cc index 60634adc..d3a5dd61 100644 --- a/net/socket/ssl_client_socket_impl.cc +++ b/net/socket/ssl_client_socket_impl.cc
@@ -702,8 +702,10 @@ if (rv == ERR_IO_PENDING) { user_write_callback_ = std::move(callback); } else { - if (rv > 0) + if (rv > 0) { + CHECK_LE(rv, buf_len); was_ever_used_ = true; + } user_write_buf_ = nullptr; user_write_buf_len_ = 0; } @@ -1505,6 +1507,7 @@ int rv = SSL_write(ssl_.get(), user_write_buf_->data(), user_write_buf_len_); if (rv >= 0) { + CHECK_LE(rv, user_write_buf_len_); net_log_.AddByteTransferEvent(NetLogEventType::SSL_SOCKET_BYTES_SENT, rv, user_write_buf_->data()); if (first_post_handshake_write_ && SSL_is_init_finished(ssl_.get())) {
diff --git a/net/third_party/quiche/BUILD.gn b/net/third_party/quiche/BUILD.gn index 5710a5b8..acbddba 100644 --- a/net/third_party/quiche/BUILD.gn +++ b/net/third_party/quiche/BUILD.gn
@@ -791,16 +791,21 @@ "src/quiche/quic/core/io/quic_default_event_loop.h", "src/quiche/quic/core/io/quic_poll_event_loop.cc", "src/quiche/quic/core/io/quic_poll_event_loop.h", + "src/quiche/quic/core/io/socket.cc", "src/quiche/quic/core/io/socket.h", - "src/quiche/quic/core/io/socket_posix.cc", + "src/quiche/quic/core/io/socket_internal.h", + "src/quiche/quic/core/io/socket_posix.inc", + "src/quiche/quic/core/io/socket_win.inc", "src/quiche/quic/core/quic_default_clock.cc", "src/quiche/quic/core/quic_default_clock.h", "src/quiche/quic/core/quic_default_packet_writer.cc", "src/quiche/quic/core/quic_default_packet_writer.h", "src/quiche/quic/core/quic_packet_reader.cc", "src/quiche/quic/core/quic_packet_reader.h", + "src/quiche/quic/core/quic_udp_socket.cc", "src/quiche/quic/core/quic_udp_socket.h", - "src/quiche/quic/core/quic_udp_socket_posix.cc", + "src/quiche/quic/core/quic_udp_socket_posix.inc", + "src/quiche/quic/core/quic_udp_socket_win.inc", "src/quiche/quic/masque/masque_client.cc", "src/quiche/quic/masque/masque_client.h", "src/quiche/quic/masque/masque_client_session.cc",
diff --git a/remoting/test/it2me_cli_host.cc b/remoting/test/it2me_cli_host.cc index bf71356b..8d80bad 100644 --- a/remoting/test/it2me_cli_host.cc +++ b/remoting/test/it2me_cli_host.cc
@@ -146,9 +146,9 @@ } void It2MeCliHost::SendMessageToHost(const std::string& type, - base::Value params) { + base::Value::Dict params) { std::string message_json; - params.SetKey(kMessageType, base::Value(type)); + params.Set(kMessageType, type); base::JSONWriter::Write(params, &message_json); base::SingleThreadTaskRunner::GetCurrentDefault()->PostTask( FROM_HERE, base::BindOnce(&It2MeCliHost::DoSendMessage, @@ -175,14 +175,11 @@ DCHECK(!host_); // Store all parameters for future connect call. - base::Value connect_params(base::Value::Type::DICT); - - connect_params.SetKey(kUserName, base::Value(user_email)); - connect_params.SetKey(kAuthServiceWithToken, - base::Value("oauth2:" + access_token)); - connect_params.SetKey(kSuppressUserDialogs, base::Value(true)); - connect_params.SetKey(kSuppressNotifications, base::Value(true)); - connect_params_ = std::move(connect_params); + connect_params_ = base::Value::Dict() + .Set(kUserName, user_email) + .Set(kAuthServiceWithToken, "oauth2:" + access_token) + .Set(kSuppressUserDialogs, true) + .Set(kSuppressNotifications, true); remote_connected_ = false; command_awaiting_crd_access_code_ = true; @@ -190,8 +187,7 @@ host_ = CreateNativeMessagingHost(ui_task_runner_); host_->Start(this); - base::Value params(base::Value::Type::DICT); - SendMessageToHost(kHelloMessage, std::move(params)); + SendMessageToHost(kHelloMessage, base::Value::Dict()); } void It2MeCliHost::ShutdownHost() { @@ -261,8 +257,7 @@ remote_connected_ = false; // Remote has disconnected, time to send "disconnect" that would result // in shutting down the host. - base::Value params(base::Value::Type::DICT); - SendMessageToHost(kDisconnectMessage, std::move(params)); + SendMessageToHost(kDisconnectMessage, base::Value::Dict()); } void It2MeCliHost::OnStateReceivedAccessCode(const base::Value::Dict& message) { @@ -272,8 +267,7 @@ // this CRD session through a remote command, and we can not send a new // access code. Assuming that the old access code is no longer valid, we // can only terminate the current CRD session. - base::Value params(base::Value::Type::DICT); - SendMessageToHost(kDisconnectMessage, std::move(params)); + SendMessageToHost(kDisconnectMessage, base::Value::Dict()); } return; }
diff --git a/remoting/test/it2me_cli_host.h b/remoting/test/it2me_cli_host.h index 733e934..2ce44e1 100644 --- a/remoting/test/it2me_cli_host.h +++ b/remoting/test/it2me_cli_host.h
@@ -44,7 +44,7 @@ void CloseChannel(const std::string& error_message) override; // Sends message to host in separate task. - void SendMessageToHost(const std::string& type, base::Value params); + void SendMessageToHost(const std::string& type, base::Value::Dict params); // Actually sends message to host. void DoSendMessage(const std::string& json); void OnProtocolBroken(const std::string& message); @@ -74,7 +74,7 @@ std::unique_ptr<extensions::NativeMessageHost> host_; // Filled structure with parameters for "connect" message. - base::Value connect_params_; + base::Value::Dict connect_params_; // Determines actions when receiving messages from CRD host, // if command is still running (no error / access code), then
diff --git a/services/accessibility/BUILD.gn b/services/accessibility/BUILD.gn index aa0ddfe1..8e952c10 100644 --- a/services/accessibility/BUILD.gn +++ b/services/accessibility/BUILD.gn
@@ -42,6 +42,8 @@ "features/text_decoder.h", "features/text_encoder.cc", "features/text_encoder.h", + "features/tts_interface_binder.cc", + "features/tts_interface_binder.h", "features/v8_bindings_utils.cc", "features/v8_bindings_utils.h", "features/v8_manager.cc", @@ -50,9 +52,11 @@ "os_accessibility_service.h", ] public_deps += [ + "public/mojom:os_service_mojom", "//gin", "//ui/accessibility:accessibility", ] + deps = [ "public/mojom:os_service_mojom_js__generator" ] configs += [ "//v8:external_startup_data" ] } else { sources = [ @@ -72,7 +76,10 @@ "fake_service_client.h", ] - deps = [ ":lib" ] + deps = [ + ":buildflags", + ":lib", + ] if (supports_os_accessibility_service) { sources += [ @@ -82,6 +89,7 @@ deps += [ "//base/test:test_support", "//services/accessibility/features/mojo/test:mojom_js_api", + "//services/accessibility/public/mojom:os_service_mojom", ] } } @@ -105,8 +113,19 @@ "os_accessibility_service_unittest.cc", ] deps += [ "//base" ] - data_deps = - [ "//services/accessibility/features/mojo/test:test_support_data" ] + if (!is_fuchsia) { + # TODO(b:262637320): Get this working on Fuchsia, which cannot + # currently ReadFileToString and therefore can't run tests which + # load JS files. + sources += [ "features/atp_js_api_test.cc" ] + deps += + [ "//services/accessibility/features/javascript:js_api_copied_files" ] + data_deps = [ + "//services/accessibility/features/javascript:js_api_files", + "//services/accessibility/features/mojo/test:test_support_data", + "//services/accessibility/public/mojom:os_accessibility_service_js", + ] + } } else { sources = [ "browser_accessibility_service_unittest.cc" ] }
diff --git a/services/accessibility/assistive_technology_controller_impl.cc b/services/accessibility/assistive_technology_controller_impl.cc index 5ec26a5..4635a42 100644 --- a/services/accessibility/assistive_technology_controller_impl.cc +++ b/services/accessibility/assistive_technology_controller_impl.cc
@@ -40,6 +40,11 @@ std::move(automation), std::move(automation_client)); } +void AssistiveTechnologyControllerImpl::BindTts( + mojo::PendingReceiver<mojom::Tts> tts_receiver) { + accessibility_service_client_remote_->BindTts(std::move(tts_receiver)); +} + void AssistiveTechnologyControllerImpl::EnableAssistiveTechnology( const std::vector<mojom::AssistiveTechnologyType>& enabled_features) { for (int i = static_cast<int>(mojom::AssistiveTechnologyType::kMinValue); @@ -88,6 +93,10 @@ // Install bindings on the global context depending on the type. // For example, some types may need TTS and some may not. All need Automation. v8_manager->InstallAutomation(weak_ptr_factory_.GetWeakPtr()); + if (type == mojom::AssistiveTechnologyType::kChromeVox || + type == mojom::AssistiveTechnologyType::kSelectToSpeak) { + v8_manager->InstallTts(weak_ptr_factory_.GetWeakPtr()); + } // TODO(crbug.com/1355633): Install other bindings based on the type // once they are implemented.
diff --git a/services/accessibility/assistive_technology_controller_impl.h b/services/accessibility/assistive_technology_controller_impl.h index 09f7308..7ea21a6 100644 --- a/services/accessibility/assistive_technology_controller_impl.h +++ b/services/accessibility/assistive_technology_controller_impl.h
@@ -39,11 +39,12 @@ accessibility_client_remote); // Called by AutomationInternalBindings owned by a V8 instance - // to request binding of Automation and AutomationClient in the OS. + // to request binding of mojo interfaces in the OS. // mojom::AccessibilityServiceClient: void BindAutomation(mojo::PendingRemote<mojom::Automation> automation, mojo::PendingReceiver<mojom::AutomationClient> automation_client) override; + void BindTts(mojo::PendingReceiver<mojom::Tts> tts_receiver) override; // mojom::AssistiveTechnologyController: void EnableAssistiveTechnology(
diff --git a/services/accessibility/fake_service_client.cc b/services/accessibility/fake_service_client.cc index f9faf8f..1fce8c5 100644 --- a/services/accessibility/fake_service_client.cc +++ b/services/accessibility/fake_service_client.cc
@@ -20,6 +20,44 @@ } } +#if BUILDFLAG(SUPPORTS_OS_ACCESSIBILITY_SERVICE) +void FakeServiceClient::BindTts( + mojo::PendingReceiver<ax::mojom::Tts> tts_receiver) { + tts_receivers_.Add(this, std::move(tts_receiver)); + if (tts_bound_closure_) { + std::move(tts_bound_closure_).Run(); + } +} + +void FakeServiceClient::GetVoices(GetVoicesCallback callback) { + std::vector<ax::mojom::TtsVoicePtr> voices; + + // Create a voice with all event types. + auto first_voice = ax::mojom::TtsVoice::New(); + first_voice->voice_name = "Lyra"; + first_voice->lang = "en-US", first_voice->remote = false; + first_voice->engine_id = "us_toddler"; + first_voice->event_types = std::vector<mojom::TtsEventType>(); + for (int i = static_cast<int>(mojom::TtsEventType::kMinValue); + i <= static_cast<int>(mojom::TtsEventType::kMaxValue); i++) { + first_voice->event_types->emplace_back(static_cast<mojom::TtsEventType>(i)); + } + + // Create a voice with just two event types/ + auto second_voice = ax::mojom::TtsVoice::New(); + second_voice->voice_name = "Juno"; + second_voice->lang = "en-GB", second_voice->remote = true; + second_voice->engine_id = "us_baby"; + second_voice->event_types = std::vector<mojom::TtsEventType>(); + second_voice->event_types->emplace_back(mojom::TtsEventType::kStart); + second_voice->event_types->emplace_back(mojom::TtsEventType::kEnd); + + voices.emplace_back(std::move(first_voice)); + voices.emplace_back(std::move(second_voice)); + std::move(callback).Run(std::move(voices)); +} +#endif // BUILDFLAG(SUPPORTS_OS_ACCESSIBILITY_SERVICE) + void FakeServiceClient::BindAccessibilityServiceClientForTest() { if (service_) { service_->BindAccessibilityServiceClient( @@ -35,6 +73,16 @@ return automation_client_receivers_.size() && automation_remotes_.size(); } +#if BUILDFLAG(SUPPORTS_OS_ACCESSIBILITY_SERVICE) +void FakeServiceClient::SetTtsBoundClosure(base::OnceClosure closure) { + tts_bound_closure_ = std::move(closure); +} + +bool FakeServiceClient::TtsIsBound() const { + return tts_receivers_.size(); +} +#endif // BUILDFLAG(SUPPORTS_OS_ACCESSIBILITY_SERVICE) + bool FakeServiceClient::AccessibilityServiceClientIsBound() const { return a11y_client_receiver_.is_bound(); }
diff --git a/services/accessibility/fake_service_client.h b/services/accessibility/fake_service_client.h index ba8a419..0075430 100644 --- a/services/accessibility/fake_service_client.h +++ b/services/accessibility/fake_service_client.h
@@ -6,18 +6,28 @@ #define SERVICES_ACCESSIBILITY_FAKE_SERVICE_CLIENT_H_ #include "base/memory/raw_ptr.h" +#include "build/build_config.h" #include "mojo/public/cpp/bindings/receiver.h" #include "mojo/public/cpp/bindings/receiver_set.h" #include "mojo/public/cpp/bindings/remote_set.h" +#include "services/accessibility/buildflags.h" #include "services/accessibility/public/mojom/accessibility_service.mojom.h" +#if BUILDFLAG(SUPPORTS_OS_ACCESSIBILITY_SERVICE) +#include "services/accessibility/public/mojom/tts.mojom.h" +#endif // BUILDFLAG(SUPPORTS_OS_ACCESSIBILITY_SERVICE) + namespace ax { // A fake AccessibilityServiceClient and AutomationClient for use in tests. // This allows tests to mock out the OS side of the mojom pipes. // TODO(crbug.com/1355633) This can be extended to allow for passing events into // the service once the mojom is landed. +// TODO(crbug.com/1355633): This should be split for OS vs Browser ATP. class FakeServiceClient : public mojom::AccessibilityServiceClient, +#if BUILDFLAG(SUPPORTS_OS_ACCESSIBILITY_SERVICE) + public mojom::Tts, +#endif public mojom::AutomationClient { public: // |service| may be null if it won't be used in the test. @@ -30,12 +40,23 @@ void BindAutomation(mojo::PendingRemote<ax::mojom::Automation> automation, mojo::PendingReceiver<ax::mojom::AutomationClient> automation_client) override; +#if BUILDFLAG(SUPPORTS_OS_ACCESSIBILITY_SERVICE) + void BindTts(mojo::PendingReceiver<ax::mojom::Tts> tts_receiver) override; + + // ax::mojom::Tts: + void GetVoices(GetVoicesCallback callback) override; +#endif // BUILDFLAG(SUPPORTS_OS_ACCESSIBILITY_SERVICE) // Methods for testing. void BindAccessibilityServiceClientForTest(); bool AccessibilityServiceClientIsBound() const; void SetAutomationBoundClosure(base::OnceClosure closure); bool AutomationIsBound() const; + +#if BUILDFLAG(SUPPORTS_OS_ACCESSIBILITY_SERVICE) + void SetTtsBoundClosure(base::OnceClosure closure); + bool TtsIsBound() const; +#endif // BUILDFLAG(SUPPORTS_OS_ACCESSIBILITY_SERVICE) base::WeakPtr<FakeServiceClient> GetWeakPtr() { return weak_ptr_factory_.GetWeakPtr(); } @@ -43,9 +64,13 @@ private: raw_ptr<mojom::AccessibilityService> service_; base::OnceClosure automation_bound_closure_; + base::OnceClosure tts_bound_closure_; mojo::RemoteSet<mojom::Automation> automation_remotes_; mojo::ReceiverSet<mojom::AutomationClient> automation_client_receivers_; +#if BUILDFLAG(SUPPORTS_OS_ACCESSIBILITY_SERVICE) + mojo::ReceiverSet<mojom::Tts> tts_receivers_; +#endif // BUILDFLAG(SUPPORTS_OS_ACCESSIBILITY_SERVICE) mojo::Receiver<mojom::AccessibilityServiceClient> a11y_client_receiver_{this}; base::WeakPtrFactory<FakeServiceClient> weak_ptr_factory_{this};
diff --git a/services/accessibility/features/atp_js_api_test.cc b/services/accessibility/features/atp_js_api_test.cc new file mode 100644 index 0000000..4825a8c --- /dev/null +++ b/services/accessibility/features/atp_js_api_test.cc
@@ -0,0 +1,173 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "base/base_paths.h" +#include "base/files/file_path.h" +#include "base/files/file_util.h" +#include "base/memory/raw_ptr.h" +#include "base/path_service.h" +#include "base/test/bind.h" +#include "base/test/task_environment.h" +#include "build/build_config.h" +#include "services/accessibility/assistive_technology_controller_impl.h" +#include "services/accessibility/fake_service_client.h" +#include "services/accessibility/features/mojo/test/js_test_interface.h" +#include "services/accessibility/os_accessibility_service.h" +#include "services/accessibility/public/mojom/accessibility_service.mojom-shared.h" +#include "services/accessibility/public/mojom/accessibility_service.mojom.h" +#include "testing/gtest/include/gtest/gtest.h" + +namespace ax { + +// Parent test class for JS APIs implemented for ATP features to consume. +class AtpJSApiTest : public testing::Test { + public: + AtpJSApiTest() = default; + AtpJSApiTest(const AtpJSApiTest&) = delete; + AtpJSApiTest& operator=(const AtpJSApiTest&) = delete; + ~AtpJSApiTest() override = default; + + void SetUp() override { + mojo::PendingReceiver<mojom::AccessibilityService> receiver; + service_ = std::make_unique<OSAccessibilityService>(std::move(receiver)); + at_controller_ = service_->at_controller_.get(); + + client_ = std::make_unique<FakeServiceClient>(service_.get()); + client_->BindAccessibilityServiceClientForTest(); + ASSERT_TRUE(client_->AccessibilityServiceClientIsBound()); + + SetUpTestEnvironment(); + } + + void ExecuteJS(const std::string& script) { + base::RunLoop script_waiter; + at_controller_->RunScriptForTest(GetATTypeForTest(), script, + script_waiter.QuitClosure()); + script_waiter.Run(); + } + + void WaitForJSTestComplete() { + // Wait for the test mojom API testComplete method. + test_waiter_.Run(); + } + + protected: + std::unique_ptr<FakeServiceClient> client_; + + private: + // The AT type to use, this will inform which APIs are added and available + // within V8. + virtual mojom::AssistiveTechnologyType GetATTypeForTest() const = 0; + + // Any additional JS files at these paths will be loaded during + // SetUpTestEnvironment. + virtual const std::vector<std::string> GetJSFilePathsToLoad() const = 0; + + std::string LoadScriptFromFile(const std::string& file_path) { + base::FilePath gen_test_data_root; + base::PathService::Get(base::DIR_GEN_TEST_DATA_ROOT, &gen_test_data_root); + base::FilePath source_path = + gen_test_data_root.Append(FILE_PATH_LITERAL(file_path)); + std::string script; + EXPECT_TRUE(ReadFileToString(source_path, &script)) + << "Could not load script from " << file_path; + return script; + } + + void SetUpTestEnvironment() { + // Turn on an AT. + std::vector<mojom::AssistiveTechnologyType> enabled_features; + enabled_features.emplace_back(GetATTypeForTest()); + at_controller_->EnableAssistiveTechnology(enabled_features); + + std::unique_ptr<JSTestInterface> test_interface = + std::make_unique<JSTestInterface>( + base::BindLambdaForTesting([this](bool success) { + EXPECT_TRUE(success) << "Mojo JS was not successful"; + test_waiter_.Quit(); + })); + at_controller_->SetTestInterface(GetATTypeForTest(), + std::move(test_interface)); + + for (const std::string& js_file_path : GetJSFilePathsToLoad()) { + base::RunLoop test_support_waiter; + at_controller_->RunScriptForTest(GetATTypeForTest(), + LoadScriptFromFile(js_file_path), + test_support_waiter.QuitClosure()); + test_support_waiter.Run(); + } + } + + private: + raw_ptr<AssistiveTechnologyControllerImpl, ExperimentalAsh> at_controller_ = + nullptr; + std::unique_ptr<OSAccessibilityService> service_; + base::test::TaskEnvironment task_environment_; + base::RunLoop test_waiter_; +}; + +class TtsJSApiTest : public AtpJSApiTest { + public: + TtsJSApiTest() = default; + TtsJSApiTest(const TtsJSApiTest&) = delete; + TtsJSApiTest& operator=(const TtsJSApiTest&) = delete; + ~TtsJSApiTest() override = default; + + mojom::AssistiveTechnologyType GetATTypeForTest() const override { + return mojom::AssistiveTechnologyType::kChromeVox; + } + + const std::vector<std::string> GetJSFilePathsToLoad() const override { + // TODO(b:266856702): Eventually ATP will load its own JS instead of us + // doing it in the test. Right now the service doesn't have enough + // permissions so we load support JS within the test. + return std::vector<std::string>{ + "gen/services/accessibility/features/mojo/test/mojom_test_support.js", + "gen/services/accessibility/public/mojom/tts.mojom-lite.js", + "gen/services/accessibility/features/javascript/tts.js", + }; + } +}; + +TEST_F(TtsJSApiTest, TtsGetVoices) { + // Note: voices are created in FakeServiceClient. + // TODO(b/266767386): Load test JS from files instead of as strings in C++. + ExecuteJS(R"JS( + const remote = axtest.mojom.TestBindingInterface.getRemote(); + chrome.tts.getVoices(voices => { + if (voices.length !== 2) { + remote.testComplete(/*success=*/false); + return; + } + expectedFirst = { + "voiceName": "Lyra", + "eventTypes": [ + "start", "end", "word", "sentence", "marker", "interrupted", + "cancelled", "error", "pause", "resume"], + "extensionId": "us_toddler", + "lang": "en-US", + "remote":false + }; + if (JSON.stringify(voices[0]) !== JSON.stringify(expectedFirst)) { + remote.testComplete(/*success=*/false); + return; + } + expectedSecond = { + "voiceName": "Juno", + "eventTypes": ["start", "end"], + "extensionId": "us_baby", + "lang": "en-GB", + "remote":true + }; + if (JSON.stringify(voices[1]) !== JSON.stringify(expectedSecond)) { + remote.testComplete(/*success=*/false); + return; + } + remote.testComplete(/*success=*/true); + }); + )JS"); + WaitForJSTestComplete(); +} + +} // namespace ax
diff --git a/services/accessibility/features/javascript/BUILD.gn b/services/accessibility/features/javascript/BUILD.gn new file mode 100644 index 0000000..dce5a8d --- /dev/null +++ b/services/accessibility/features/javascript/BUILD.gn
@@ -0,0 +1,13 @@ +# 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. + +copy("js_api_copied_files") { + sources = [ "tts.js" ] + outputs = [ "$target_gen_dir/{{source_file_part}}" ] +} + +group("js_api_files") { + data = [ "$target_gen_dir/tts.js" ] + deps = [ ":js_api_copied_files" ] +}
diff --git a/services/accessibility/features/javascript/tts.js b/services/accessibility/features/javascript/tts.js new file mode 100644 index 0000000..f3230d3 --- /dev/null +++ b/services/accessibility/features/javascript/tts.js
@@ -0,0 +1,73 @@ +// 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. + +// Massages the tts mojo into the chrome.tts extension API surface used +// by a11y component extensions. +// TODO(b:277221897): Compile and type-check this. +// TODO(b:266767235): Convert to typescript. +class AtpTts { + constructor() { + const TtsApi = ax.mojom.Tts; + this.remote_ = TtsApi.getRemote(); + } + + /** + * Gets the currently available voices. + * @param {function(!Array<!chrome.tts.TtsVoice>)} callback + */ + getVoices(callback) { + this.remote_.getVoices().then(voicesResult => { + // Shape into chrome.tts API getvoices response for callback. + let result = []; + for (let voice of voicesResult.voices) { + let eventTypes = []; + for (let eventType of voice.eventTypes) { + eventTypes.push(AtpTts.eventTypeToString_(eventType)); + } + result.push({ + voiceName: voice.voiceName, + eventTypes, + extensionId: voice.engineId, + lang: voice.lang, + remote: voice.remote + }); + } + callback(result); + }); + } + + /** + * Converts ax.mojom.TtsEventType into the string used by TTS extension API. + * @param {ax.mojom.TtsEventType} eventType + * @return {chrome.tts.EventType} + * @private + */ + static eventTypeToString_(eventType) { + switch (eventType) { + case ax.mojom.TtsEventType.kStart: + return 'start'; + case ax.mojom.TtsEventType.kEnd: + return 'end'; + case ax.mojom.TtsEventType.kWord: + return 'word'; + case ax.mojom.TtsEventType.kSentence: + return 'sentence'; + case ax.mojom.TtsEventType.kMarker: + return 'marker'; + case ax.mojom.TtsEventType.kInterrupted: + return 'interrupted'; + case ax.mojom.TtsEventType.kCancelled: + return 'cancelled'; + case ax.mojom.TtsEventType.kError: + return 'error'; + case ax.mojom.TtsEventType.kPause: + return 'pause'; + case ax.mojom.TtsEventType.kResume: + return 'resume'; + } + } +} + +// Shim the TTS api onto the Chrome object to mimic chrome.tts in extensions. +chrome.tts = new AtpTts();
diff --git a/services/accessibility/features/tts_interface_binder.cc b/services/accessibility/features/tts_interface_binder.cc new file mode 100644 index 0000000..1d1dcd6 --- /dev/null +++ b/services/accessibility/features/tts_interface_binder.cc
@@ -0,0 +1,39 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "services/accessibility/features/tts_interface_binder.h" +#include "services/accessibility/public/mojom/accessibility_service.mojom.h" +#include "services/accessibility/public/mojom/tts.mojom.h" + +namespace ax { + +TtsInterfaceBinder::TtsInterfaceBinder( + base::WeakPtr<mojom::AccessibilityServiceClient> ax_service_client, + scoped_refptr<base::SequencedTaskRunner> main_runner) + : ax_service_client_(ax_service_client), main_runner_(main_runner) {} + +TtsInterfaceBinder::~TtsInterfaceBinder() = default; + +bool TtsInterfaceBinder::MatchesInterface(const std::string& interface_name) { + return interface_name == "ax.mojom.Tts"; +} + +void TtsInterfaceBinder::BindReceiver( + mojo::GenericPendingReceiver tts_receiver) { + CHECK(main_runner_); + auto receiver = tts_receiver.As<ax::mojom::Tts>(); + // This might be called on any thread because it's initiated by Mojom. + // Do the actual binding on the service main thread, where the + // AccessibilityServiceClient lives. + main_runner_->PostTask( + FROM_HERE, + base::BindOnce( + [](base::WeakPtr<mojom::AccessibilityServiceClient> ax_service_client, + mojo::PendingReceiver<ax::mojom::Tts> receiver) { + ax_service_client->BindTts(std::move(receiver)); + }, + ax_service_client_, std::move(receiver))); +} + +} // namespace ax
diff --git a/services/accessibility/features/tts_interface_binder.h b/services/accessibility/features/tts_interface_binder.h new file mode 100644 index 0000000..30a05e41 --- /dev/null +++ b/services/accessibility/features/tts_interface_binder.h
@@ -0,0 +1,35 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef SERVICES_ACCESSIBILITY_FEATURES_TTS_INTERFACE_BINDER_H_ +#define SERVICES_ACCESSIBILITY_FEATURES_TTS_INTERFACE_BINDER_H_ + +#include "services/accessibility/features/interface_binder.h" +#include "services/accessibility/public/mojom/accessibility_service.mojom.h" + +namespace ax { + +// Binds one end of a mojom TTS pipe hosted in Javascript to the +// AccessibilityServiceClient that connects back to the main OS process. +class TtsInterfaceBinder : public InterfaceBinder { + public: + TtsInterfaceBinder( + base::WeakPtr<mojom::AccessibilityServiceClient> ax_service_client, + scoped_refptr<base::SequencedTaskRunner> main_runner); + ~TtsInterfaceBinder() override; + TtsInterfaceBinder(const TtsInterfaceBinder&) = delete; + TtsInterfaceBinder& operator=(const TtsInterfaceBinder&) = delete; + + // InterfaceBinder: + bool MatchesInterface(const std::string& interface_name) override; + void BindReceiver(mojo::GenericPendingReceiver tts_receiver) override; + + private: + base::WeakPtr<mojom::AccessibilityServiceClient> ax_service_client_; + scoped_refptr<base::SequencedTaskRunner> main_runner_; +}; + +} // namespace ax + +#endif // SERVICES_ACCESSIBILITY_FEATURES_TTS_INTERFACE_BINDER_H_
diff --git a/services/accessibility/features/v8_manager.cc b/services/accessibility/features/v8_manager.cc index 8336b0d..6540445 100644 --- a/services/accessibility/features/v8_manager.cc +++ b/services/accessibility/features/v8_manager.cc
@@ -21,6 +21,7 @@ #include "services/accessibility/assistive_technology_controller_impl.h" #include "services/accessibility/features/automation_internal_bindings.h" #include "services/accessibility/features/mojo/mojo.h" +#include "services/accessibility/features/tts_interface_binder.h" #include "services/accessibility/features/v8_bindings_utils.h" #include "v8/include/v8-context.h" #include "v8/include/v8-object.h" @@ -93,6 +94,15 @@ weak_ptr_factory_.GetWeakPtr(), at_controller)); } +void V8Manager::InstallTts( + base::WeakPtr<AssistiveTechnologyControllerImpl> at_controller) { + DETACH_FROM_SEQUENCE(sequence_checker_); + DCHECK(main_runner_ == base::SequencedTaskRunner::GetCurrentDefault()); + v8_runner_->PostTask( + FROM_HERE, base::BindOnce(&V8Manager::BindTtsOnThread, + weak_ptr_factory_.GetWeakPtr(), at_controller)); +} + void V8Manager::AddV8Bindings() { DETACH_FROM_SEQUENCE(sequence_checker_); DCHECK(main_runner_ == base::SequencedTaskRunner::GetCurrentDefault()); @@ -125,13 +135,22 @@ mojo::GenericPendingReceiver pending_receiver) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); // TODO(b:262637071): Add mappings for bindings for other C++/JS mojom APIs. + // TODO(b:262637071): We may need to use associated remotes/receivers to avoid + // messages coming in an unpredicted order compared to the Extensions system. if (test_mojo_interface_ && test_mojo_interface_->MatchesInterface(interface_name)) { test_mojo_interface_->BindReceiver(std::move(pending_receiver)); return; } - LOG(ERROR) << "Couldn't find remote implementation for interface " - << interface_name; + if (tts_interface_binder_ && + tts_interface_binder_->MatchesInterface(interface_name)) { + tts_interface_binder_->BindReceiver(std::move(pending_receiver)); + return; + } + LOG(ERROR) << "Couldn't find Receiver for interface " << interface_name + << ". Ensure it's installed in the isolate with " + << "V8Manager::Install* and available for binding in " + << "V8Manager::BindInterface."; } void V8Manager::SetTestMojoInterface( @@ -246,6 +265,13 @@ weak_ptr_factory_.GetWeakPtr(), at_controller, main_runner_); } +void V8Manager::BindTtsOnThread( + base::WeakPtr<AssistiveTechnologyControllerImpl> at_controller) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + tts_interface_binder_ = + std::make_unique<TtsInterfaceBinder>(at_controller, main_runner_); +} + void V8Manager::SetTestMojoInterfaceOnThread( std::unique_ptr<InterfaceBinder> test_interface) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
diff --git a/services/accessibility/features/v8_manager.h b/services/accessibility/features/v8_manager.h index fd47a24a..2efd4aa3 100644 --- a/services/accessibility/features/v8_manager.h +++ b/services/accessibility/features/v8_manager.h
@@ -34,6 +34,7 @@ namespace ax { class AutomationInternalBindings; class AssistiveTechnologyControllerImpl; +class TtsInterfaceBinder; // A V8Manager owns a V8 isolate within the Accessibility Service, and manages // the bindings that belong to that isolate, as well as loading the Javascript @@ -59,6 +60,8 @@ // All of the APIs should be installed before adding V8 bindings. void InstallAutomation( base::WeakPtr<AssistiveTechnologyControllerImpl> at_controller); + void InstallTts( + base::WeakPtr<AssistiveTechnologyControllerImpl> at_controller); void AddV8Bindings(); // Executes the given string as a Javascript script, and calls the @@ -93,6 +96,8 @@ void AddV8BindingsOnThread(); void BindAutomationOnThread( base::WeakPtr<AssistiveTechnologyControllerImpl> at_controller); + void BindTtsOnThread( + base::WeakPtr<AssistiveTechnologyControllerImpl> at_controller); void SetTestMojoInterfaceOnThread( std::unique_ptr<InterfaceBinder> test_interface); void ExecuteScriptOnThread(const std::string& script, @@ -110,6 +115,8 @@ // TODO(crbug.com/1355633): Add more APIs including TTS, SST, etc. std::unique_ptr<AutomationInternalBindings> automation_bindings_ GUARDED_BY_CONTEXT(sequence_checker_); + std::unique_ptr<TtsInterfaceBinder> tts_interface_binder_ + GUARDED_BY_CONTEXT(sequence_checker_); // Bindings wrappers for test. std::unique_ptr<InterfaceBinder> test_mojo_interface_
diff --git a/services/accessibility/os_accessibility_service.h b/services/accessibility/os_accessibility_service.h index 10e279c3..aed4634 100644 --- a/services/accessibility/os_accessibility_service.h +++ b/services/accessibility/os_accessibility_service.h
@@ -26,6 +26,7 @@ private: friend class OSAccessibilityServiceTest; friend class AssistiveTechnologyControllerTest; + friend class AtpJSApiTest; // mojom::AccessibilityService: void BindAccessibilityServiceClient(
diff --git a/services/accessibility/public/mojom/BUILD.gn b/services/accessibility/public/mojom/BUILD.gn index d5b8efe..85f2916 100644 --- a/services/accessibility/public/mojom/BUILD.gn +++ b/services/accessibility/public/mojom/BUILD.gn
@@ -15,4 +15,21 @@ "//sandbox/policy/mojom", "//ui/accessibility/mojom", ] + if (supports_os_accessibility_service) { + public_deps += [ ":os_service_mojom" ] + } +} + +if (supports_os_accessibility_service) { + mojom("os_service_mojom") { + sources = [ "tts.mojom" ] + public_deps = [ "//mojo/public/mojom/base" ] + webui_module_path = "/" + } + + group("os_accessibility_service_js") { + testonly = true + data = [ "$target_gen_dir/tts.mojom-lite.js" ] + deps = [ ":os_service_mojom_js__generator" ] + } }
diff --git a/services/accessibility/public/mojom/accessibility_service.mojom b/services/accessibility/public/mojom/accessibility_service.mojom index 2cd7bfc3..5c0db4a 100644 --- a/services/accessibility/public/mojom/accessibility_service.mojom +++ b/services/accessibility/public/mojom/accessibility_service.mojom
@@ -12,6 +12,9 @@ import "ui/accessibility/mojom/ax_tree_update.mojom"; import "ui/gfx/geometry/mojom/geometry.mojom"; +[EnableIf=supports_os_accessibility_service] +import "services/accessibility/public/mojom/tts.mojom"; + // Main interface a client uses to send accessibility tree updates and // results, implemented in the Accessibility service. Clients may // be the main OS browser process, renderers, or other accessibility tree @@ -140,4 +143,9 @@ BindAutomation( pending_remote<Automation> automation, pending_receiver<AutomationClient> automation_client); + + // Binds to a Text-to-Speech client implemented in the main OS process, + // called by the service. + [EnableIf=supports_os_accessibility_service] + BindTts(pending_receiver<Tts> tts_receiver); };
diff --git a/services/accessibility/public/mojom/tts.mojom b/services/accessibility/public/mojom/tts.mojom new file mode 100644 index 0000000..bd6f67b --- /dev/null +++ b/services/accessibility/public/mojom/tts.mojom
@@ -0,0 +1,60 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +module ax.mojom; + +// Events sent back from the TTS engine in the OS browser process to the +// service and indicate the progress of an utterance. The type can be: +// kStart as soon as speech has started, +// kEnd when the end of the utterance is reached, +// kWord when a word boundary is reached, +// kSentence when a sentence boundary is reached, +// kMarker when an SSML mark element is reached, +// kInterrupted when the utterance is stopped or interrupted before the end, +// kCancelled when it's removed from the queue before ever being synthesized, +// kError when any other error occurs. +// When pausing speech, a kPause event is fired if a particular utterance +// is paused in the middle, and kResume if an utterance resumes +// speech. Note that kPause and kResume events may not fire if speech is paused +// in-between utterances. +enum TtsEventType { + kStart, + kEnd, + kWord, + kSentence, + kMarker, + kInterrupted, + kCancelled, + kError, + kPause, + kResume, +}; + +// A description of a voice available for speech synthesis. +struct TtsVoice { + // The name of the voice. + string? voice_name; + + // The language that this voice supports, in the form + // <em>language</em>-<em>region</em>. Examples: 'en', 'en-US', + // 'en-GB', 'zh-CN'. + string? lang; + + // If true, the synthesis engine is a remote network resource. It may be + // higher latency and may incur bandwidth costs. + bool remote; + + // The ID of the TTS engine providing this voice. + string? engine_id; + + // All of the callback event types that this voice is capable of sending. + array<TtsEventType>? event_types; +}; + +// Provides speech. Implemented in the main OS browser process +// and called from Accessibility Service Javascript. +interface Tts { + // Gets an array of all available voices. + GetVoices() => (array<TtsVoice> voices); +};
diff --git a/services/network/test/trust_token_test_util.cc b/services/network/test/trust_token_test_util.cc index a9e71fd..c888e002 100644 --- a/services/network/test/trust_token_test_util.cc +++ b/services/network/test/trust_token_test_util.cc
@@ -5,7 +5,7 @@ #include "services/network/test/trust_token_test_util.h" #include "base/json/json_reader.h" -#include "base/json/json_string_value_serializer.h" +#include "base/json/json_writer.h" #include "base/test/bind.h" #include "base/test/task_environment.h" #include "base/test/test_future.h" @@ -161,33 +161,20 @@ parameters.Set("issuers", std::move(issuers)); } - std::string serialized_parameters; - JSONStringValueSerializer serializer(&serialized_parameters); - CHECK(serializer.Serialize(parameters)); - - return {std::move(trust_token_params), std::move(serialized_parameters)}; + return {std::move(trust_token_params), *base::WriteJson(parameters)}; } std::string WrapKeyCommitmentsForIssuers( base::flat_map<url::Origin, base::StringPiece> issuers_and_commitments) { - std::string ret; - JSONStringValueSerializer serializer(&ret); - - base::Value to_serialize(base::Value::Type::DICT); - - for (const auto& kv : issuers_and_commitments) { - const url::Origin& issuer = kv.first; - base::StringPiece commitment = kv.second; - + base::Value::Dict to_serialize; + for (const auto& [issuer, commitment] : issuers_and_commitments) { // guard against accidentally passing an origin without a unique // serialization CHECK_NE(issuer.Serialize(), "null"); - to_serialize.SetKey(issuer.Serialize(), - *base::JSONReader::Read(commitment)); + to_serialize.Set(issuer.Serialize(), *base::JSONReader::Read(commitment)); } - CHECK(serializer.Serialize(to_serialize)); - return ret; + return *base::WriteJson(to_serialize); } } // namespace network
diff --git a/services/viz/privileged/mojom/viz_main.mojom b/services/viz/privileged/mojom/viz_main.mojom index befb4898..20763d9 100644 --- a/services/viz/privileged/mojom/viz_main.mojom +++ b/services/viz/privileged/mojom/viz_main.mojom
@@ -74,7 +74,7 @@ // Sends debug filtering information to the active Viz Debugger instance. // This is only called if the flag --enable-viz-devtools is used. [EnableIf=use_viz_debugger] - FilterDebugStream(mojo_base.mojom.Value filterData); + FilterDebugStream(mojo_base.mojom.DictionaryValue filterData); // Ends the Viz debugging session. This is only called if the flag // --enable-viz-devtools is used.
diff --git a/testing/buildbot/chrome.json b/testing/buildbot/chrome.json index 74133f1..f238878 100644 --- a/testing/buildbot/chrome.json +++ b/testing/buildbot/chrome.json
@@ -1555,7 +1555,7 @@ "args": [], "autotest_name": "tast.chrome-from-tls", "cros_board": "octopus", - "cros_img": "octopus-release/R114-15408.0.0", + "cros_img": "octopus-release/R115-15460.0.0", "name": "chrome_all_tast_tests OCTOPUS_RELEASE_CHROME_FROM_TLS_LKGM", "shards": 10, "swarming": {},
diff --git a/testing/buildbot/chromium.fyi.json b/testing/buildbot/chromium.fyi.json index e424010..145ad727 100644 --- a/testing/buildbot/chromium.fyi.json +++ b/testing/buildbot/chromium.fyi.json
@@ -3248,1016 +3248,6 @@ } ] }, - "android-backuprefptr-arm-fyi-rel": { - "gtest_tests": [ - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer", - "--gs-results-bucket=chromium-result-details", - "--recover-devices" - ], - "merge": { - "args": [ - "--bucket", - "chromium-result-details", - "--test-name", - "base_unittests" - ], - "script": "//build/android/pylib/results/presentation/test_results_presentation.py" - }, - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "device_os": "PQ3A.190801.002", - "device_os_flavor": "google", - "device_os_type": "userdebug", - "device_type": "walleye", - "os": "Android" - } - ], - "output_links": [ - { - "link": [ - "https://luci-logdog.appspot.com/v/?s", - "=android%2Fswarming%2Flogcats%2F", - "${TASK_ID}%2F%2B%2Funified_logcats" - ], - "name": "shard #${SHARD_INDEX} logcats" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "base_unittests", - "test_id_prefix": "ninja://base:base_unittests/" - }, - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer", - "--gs-results-bucket=chromium-result-details", - "--recover-devices" - ], - "merge": { - "args": [ - "--bucket", - "chromium-result-details", - "--test-name", - "blink_common_unittests" - ], - "script": "//build/android/pylib/results/presentation/test_results_presentation.py" - }, - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "device_os": "PQ3A.190801.002", - "device_os_flavor": "google", - "device_os_type": "userdebug", - "device_type": "walleye", - "os": "Android" - } - ], - "output_links": [ - { - "link": [ - "https://luci-logdog.appspot.com/v/?s", - "=android%2Fswarming%2Flogcats%2F", - "${TASK_ID}%2F%2B%2Funified_logcats" - ], - "name": "shard #${SHARD_INDEX} logcats" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "blink_common_unittests", - "test_id_prefix": "ninja://third_party/blink/common:blink_common_unittests/" - }, - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer", - "--gs-results-bucket=chromium-result-details", - "--recover-devices" - ], - "merge": { - "args": [ - "--bucket", - "chromium-result-details", - "--test-name", - "blink_platform_unittests" - ], - "script": "//build/android/pylib/results/presentation/test_results_presentation.py" - }, - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "device_os": "PQ3A.190801.002", - "device_os_flavor": "google", - "device_os_type": "userdebug", - "device_type": "walleye", - "os": "Android" - } - ], - "output_links": [ - { - "link": [ - "https://luci-logdog.appspot.com/v/?s", - "=android%2Fswarming%2Flogcats%2F", - "${TASK_ID}%2F%2B%2Funified_logcats" - ], - "name": "shard #${SHARD_INDEX} logcats" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "blink_platform_unittests", - "test_id_prefix": "ninja://third_party/blink/renderer/platform:blink_platform_unittests/" - }, - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer", - "--gs-results-bucket=chromium-result-details", - "--recover-devices" - ], - "merge": { - "args": [ - "--bucket", - "chromium-result-details", - "--test-name", - "webkit_unit_tests" - ], - "script": "//build/android/pylib/results/presentation/test_results_presentation.py" - }, - "name": "webkit_unit_tests", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "device_os": "PQ3A.190801.002", - "device_os_flavor": "google", - "device_os_type": "userdebug", - "device_type": "walleye", - "os": "Android" - } - ], - "output_links": [ - { - "link": [ - "https://luci-logdog.appspot.com/v/?s", - "=android%2Fswarming%2Flogcats%2F", - "${TASK_ID}%2F%2B%2Funified_logcats" - ], - "name": "shard #${SHARD_INDEX} logcats" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", - "shards": 6 - }, - "test": "blink_unittests", - "test_id_prefix": "ninja://third_party/blink/renderer/controller:blink_unittests/" - }, - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer", - "--gs-results-bucket=chromium-result-details", - "--recover-devices" - ], - "merge": { - "args": [ - "--bucket", - "chromium-result-details", - "--test-name", - "cast_unittests" - ], - "script": "//build/android/pylib/results/presentation/test_results_presentation.py" - }, - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "device_os": "PQ3A.190801.002", - "device_os_flavor": "google", - "device_os_type": "userdebug", - "device_type": "walleye", - "os": "Android" - } - ], - "output_links": [ - { - "link": [ - "https://luci-logdog.appspot.com/v/?s", - "=android%2Fswarming%2Flogcats%2F", - "${TASK_ID}%2F%2B%2Funified_logcats" - ], - "name": "shard #${SHARD_INDEX} logcats" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "cast_unittests", - "test_id_prefix": "ninja://media/cast:cast_unittests/" - }, - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer", - "--gs-results-bucket=chromium-result-details", - "--recover-devices" - ], - "merge": { - "args": [ - "--bucket", - "chromium-result-details", - "--test-name", - "cc_unittests" - ], - "script": "//build/android/pylib/results/presentation/test_results_presentation.py" - }, - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "device_os": "PQ3A.190801.002", - "device_os_flavor": "google", - "device_os_type": "userdebug", - "device_type": "walleye", - "os": "Android" - } - ], - "output_links": [ - { - "link": [ - "https://luci-logdog.appspot.com/v/?s", - "=android%2Fswarming%2Flogcats%2F", - "${TASK_ID}%2F%2B%2Funified_logcats" - ], - "name": "shard #${SHARD_INDEX} logcats" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "cc_unittests", - "test_id_prefix": "ninja://cc:cc_unittests/" - }, - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer", - "--gs-results-bucket=chromium-result-details", - "--recover-devices" - ], - "merge": { - "args": [ - "--bucket", - "chromium-result-details", - "--test-name", - "components_unittests" - ], - "script": "//build/android/pylib/results/presentation/test_results_presentation.py" - }, - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "device_os": "PQ3A.190801.002", - "device_os_flavor": "google", - "device_os_type": "userdebug", - "device_type": "walleye", - "os": "Android" - } - ], - "output_links": [ - { - "link": [ - "https://luci-logdog.appspot.com/v/?s", - "=android%2Fswarming%2Flogcats%2F", - "${TASK_ID}%2F%2B%2Funified_logcats" - ], - "name": "shard #${SHARD_INDEX} logcats" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", - "shards": 6 - }, - "test": "components_unittests", - "test_id_prefix": "ninja://components:components_unittests/" - }, - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer", - "--gs-results-bucket=chromium-result-details", - "--recover-devices" - ], - "merge": { - "args": [ - "--bucket", - "chromium-result-details", - "--test-name", - "content_browsertests" - ], - "script": "//build/android/pylib/results/presentation/test_results_presentation.py" - }, - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "device_os": "PQ3A.190801.002", - "device_os_flavor": "google", - "device_os_type": "userdebug", - "device_type": "walleye", - "os": "Android" - } - ], - "output_links": [ - { - "link": [ - "https://luci-logdog.appspot.com/v/?s", - "=android%2Fswarming%2Flogcats%2F", - "${TASK_ID}%2F%2B%2Funified_logcats" - ], - "name": "shard #${SHARD_INDEX} logcats" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", - "shards": 15 - }, - "test": "content_browsertests", - "test_id_prefix": "ninja://content/test:content_browsertests/" - }, - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer", - "--gs-results-bucket=chromium-result-details", - "--recover-devices" - ], - "merge": { - "args": [ - "--bucket", - "chromium-result-details", - "--test-name", - "content_unittests" - ], - "script": "//build/android/pylib/results/presentation/test_results_presentation.py" - }, - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "device_os": "PQ3A.190801.002", - "device_os_flavor": "google", - "device_os_type": "userdebug", - "device_type": "walleye", - "os": "Android" - } - ], - "output_links": [ - { - "link": [ - "https://luci-logdog.appspot.com/v/?s", - "=android%2Fswarming%2Flogcats%2F", - "${TASK_ID}%2F%2B%2Funified_logcats" - ], - "name": "shard #${SHARD_INDEX} logcats" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", - "shards": 3 - }, - "test": "content_unittests", - "test_id_prefix": "ninja://content/test:content_unittests/" - }, - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer", - "--gs-results-bucket=chromium-result-details", - "--recover-devices" - ], - "merge": { - "args": [ - "--bucket", - "chromium-result-details", - "--test-name", - "unit_tests" - ], - "script": "//build/android/pylib/results/presentation/test_results_presentation.py" - }, - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "device_os": "PQ3A.190801.002", - "device_os_flavor": "google", - "device_os_type": "userdebug", - "device_type": "walleye", - "os": "Android" - } - ], - "output_links": [ - { - "link": [ - "https://luci-logdog.appspot.com/v/?s", - "=android%2Fswarming%2Flogcats%2F", - "${TASK_ID}%2F%2B%2Funified_logcats" - ], - "name": "shard #${SHARD_INDEX} logcats" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", - "shards": 2 - }, - "test": "unit_tests", - "test_id_prefix": "ninja://chrome/test:unit_tests/" - }, - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer", - "--gs-results-bucket=chromium-result-details", - "--recover-devices" - ], - "merge": { - "args": [ - "--bucket", - "chromium-result-details", - "--test-name", - "wtf_unittests" - ], - "script": "//build/android/pylib/results/presentation/test_results_presentation.py" - }, - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "device_os": "PQ3A.190801.002", - "device_os_flavor": "google", - "device_os_type": "userdebug", - "device_type": "walleye", - "os": "Android" - } - ], - "output_links": [ - { - "link": [ - "https://luci-logdog.appspot.com/v/?s", - "=android%2Fswarming%2Flogcats%2F", - "${TASK_ID}%2F%2B%2Funified_logcats" - ], - "name": "shard #${SHARD_INDEX} logcats" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "wtf_unittests", - "test_id_prefix": "ninja://third_party/blink/renderer/platform/wtf:wtf_unittests/" - } - ] - }, - "android-backuprefptr-arm64-fyi-rel": { - "gtest_tests": [ - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer", - "--gs-results-bucket=chromium-result-details", - "--recover-devices" - ], - "merge": { - "args": [ - "--bucket", - "chromium-result-details", - "--test-name", - "base_unittests" - ], - "script": "//build/android/pylib/results/presentation/test_results_presentation.py" - }, - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "device_os": "PQ3A.190801.002", - "device_os_flavor": "google", - "device_os_type": "userdebug", - "device_type": "walleye", - "os": "Android" - } - ], - "output_links": [ - { - "link": [ - "https://luci-logdog.appspot.com/v/?s", - "=android%2Fswarming%2Flogcats%2F", - "${TASK_ID}%2F%2B%2Funified_logcats" - ], - "name": "shard #${SHARD_INDEX} logcats" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "base_unittests", - "test_id_prefix": "ninja://base:base_unittests/" - }, - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer", - "--gs-results-bucket=chromium-result-details", - "--recover-devices" - ], - "merge": { - "args": [ - "--bucket", - "chromium-result-details", - "--test-name", - "blink_common_unittests" - ], - "script": "//build/android/pylib/results/presentation/test_results_presentation.py" - }, - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "device_os": "PQ3A.190801.002", - "device_os_flavor": "google", - "device_os_type": "userdebug", - "device_type": "walleye", - "os": "Android" - } - ], - "output_links": [ - { - "link": [ - "https://luci-logdog.appspot.com/v/?s", - "=android%2Fswarming%2Flogcats%2F", - "${TASK_ID}%2F%2B%2Funified_logcats" - ], - "name": "shard #${SHARD_INDEX} logcats" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "blink_common_unittests", - "test_id_prefix": "ninja://third_party/blink/common:blink_common_unittests/" - }, - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer", - "--gs-results-bucket=chromium-result-details", - "--recover-devices" - ], - "merge": { - "args": [ - "--bucket", - "chromium-result-details", - "--test-name", - "blink_platform_unittests" - ], - "script": "//build/android/pylib/results/presentation/test_results_presentation.py" - }, - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "device_os": "PQ3A.190801.002", - "device_os_flavor": "google", - "device_os_type": "userdebug", - "device_type": "walleye", - "os": "Android" - } - ], - "output_links": [ - { - "link": [ - "https://luci-logdog.appspot.com/v/?s", - "=android%2Fswarming%2Flogcats%2F", - "${TASK_ID}%2F%2B%2Funified_logcats" - ], - "name": "shard #${SHARD_INDEX} logcats" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "blink_platform_unittests", - "test_id_prefix": "ninja://third_party/blink/renderer/platform:blink_platform_unittests/" - }, - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer", - "--gs-results-bucket=chromium-result-details", - "--recover-devices" - ], - "merge": { - "args": [ - "--bucket", - "chromium-result-details", - "--test-name", - "webkit_unit_tests" - ], - "script": "//build/android/pylib/results/presentation/test_results_presentation.py" - }, - "name": "webkit_unit_tests", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "device_os": "PQ3A.190801.002", - "device_os_flavor": "google", - "device_os_type": "userdebug", - "device_type": "walleye", - "os": "Android" - } - ], - "output_links": [ - { - "link": [ - "https://luci-logdog.appspot.com/v/?s", - "=android%2Fswarming%2Flogcats%2F", - "${TASK_ID}%2F%2B%2Funified_logcats" - ], - "name": "shard #${SHARD_INDEX} logcats" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", - "shards": 6 - }, - "test": "blink_unittests", - "test_id_prefix": "ninja://third_party/blink/renderer/controller:blink_unittests/" - }, - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer", - "--gs-results-bucket=chromium-result-details", - "--recover-devices" - ], - "merge": { - "args": [ - "--bucket", - "chromium-result-details", - "--test-name", - "cast_unittests" - ], - "script": "//build/android/pylib/results/presentation/test_results_presentation.py" - }, - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "device_os": "PQ3A.190801.002", - "device_os_flavor": "google", - "device_os_type": "userdebug", - "device_type": "walleye", - "os": "Android" - } - ], - "output_links": [ - { - "link": [ - "https://luci-logdog.appspot.com/v/?s", - "=android%2Fswarming%2Flogcats%2F", - "${TASK_ID}%2F%2B%2Funified_logcats" - ], - "name": "shard #${SHARD_INDEX} logcats" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "cast_unittests", - "test_id_prefix": "ninja://media/cast:cast_unittests/" - }, - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer", - "--gs-results-bucket=chromium-result-details", - "--recover-devices" - ], - "merge": { - "args": [ - "--bucket", - "chromium-result-details", - "--test-name", - "cc_unittests" - ], - "script": "//build/android/pylib/results/presentation/test_results_presentation.py" - }, - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "device_os": "PQ3A.190801.002", - "device_os_flavor": "google", - "device_os_type": "userdebug", - "device_type": "walleye", - "os": "Android" - } - ], - "output_links": [ - { - "link": [ - "https://luci-logdog.appspot.com/v/?s", - "=android%2Fswarming%2Flogcats%2F", - "${TASK_ID}%2F%2B%2Funified_logcats" - ], - "name": "shard #${SHARD_INDEX} logcats" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "cc_unittests", - "test_id_prefix": "ninja://cc:cc_unittests/" - }, - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer", - "--gs-results-bucket=chromium-result-details", - "--recover-devices" - ], - "merge": { - "args": [ - "--bucket", - "chromium-result-details", - "--test-name", - "components_unittests" - ], - "script": "//build/android/pylib/results/presentation/test_results_presentation.py" - }, - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "device_os": "PQ3A.190801.002", - "device_os_flavor": "google", - "device_os_type": "userdebug", - "device_type": "walleye", - "os": "Android" - } - ], - "output_links": [ - { - "link": [ - "https://luci-logdog.appspot.com/v/?s", - "=android%2Fswarming%2Flogcats%2F", - "${TASK_ID}%2F%2B%2Funified_logcats" - ], - "name": "shard #${SHARD_INDEX} logcats" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", - "shards": 6 - }, - "test": "components_unittests", - "test_id_prefix": "ninja://components:components_unittests/" - }, - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer", - "--gs-results-bucket=chromium-result-details", - "--recover-devices" - ], - "merge": { - "args": [ - "--bucket", - "chromium-result-details", - "--test-name", - "content_browsertests" - ], - "script": "//build/android/pylib/results/presentation/test_results_presentation.py" - }, - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "device_os": "PQ3A.190801.002", - "device_os_flavor": "google", - "device_os_type": "userdebug", - "device_type": "walleye", - "os": "Android" - } - ], - "output_links": [ - { - "link": [ - "https://luci-logdog.appspot.com/v/?s", - "=android%2Fswarming%2Flogcats%2F", - "${TASK_ID}%2F%2B%2Funified_logcats" - ], - "name": "shard #${SHARD_INDEX} logcats" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", - "shards": 15 - }, - "test": "content_browsertests", - "test_id_prefix": "ninja://content/test:content_browsertests/" - }, - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer", - "--gs-results-bucket=chromium-result-details", - "--recover-devices" - ], - "merge": { - "args": [ - "--bucket", - "chromium-result-details", - "--test-name", - "content_unittests" - ], - "script": "//build/android/pylib/results/presentation/test_results_presentation.py" - }, - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "device_os": "PQ3A.190801.002", - "device_os_flavor": "google", - "device_os_type": "userdebug", - "device_type": "walleye", - "os": "Android" - } - ], - "output_links": [ - { - "link": [ - "https://luci-logdog.appspot.com/v/?s", - "=android%2Fswarming%2Flogcats%2F", - "${TASK_ID}%2F%2B%2Funified_logcats" - ], - "name": "shard #${SHARD_INDEX} logcats" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", - "shards": 3 - }, - "test": "content_unittests", - "test_id_prefix": "ninja://content/test:content_unittests/" - }, - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer", - "--gs-results-bucket=chromium-result-details", - "--recover-devices" - ], - "merge": { - "args": [ - "--bucket", - "chromium-result-details", - "--test-name", - "unit_tests" - ], - "script": "//build/android/pylib/results/presentation/test_results_presentation.py" - }, - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "device_os": "PQ3A.190801.002", - "device_os_flavor": "google", - "device_os_type": "userdebug", - "device_type": "walleye", - "os": "Android" - } - ], - "output_links": [ - { - "link": [ - "https://luci-logdog.appspot.com/v/?s", - "=android%2Fswarming%2Flogcats%2F", - "${TASK_ID}%2F%2B%2Funified_logcats" - ], - "name": "shard #${SHARD_INDEX} logcats" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", - "shards": 2 - }, - "test": "unit_tests", - "test_id_prefix": "ninja://chrome/test:unit_tests/" - }, - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer", - "--gs-results-bucket=chromium-result-details", - "--recover-devices" - ], - "merge": { - "args": [ - "--bucket", - "chromium-result-details", - "--test-name", - "wtf_unittests" - ], - "script": "//build/android/pylib/results/presentation/test_results_presentation.py" - }, - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "device_os": "PQ3A.190801.002", - "device_os_flavor": "google", - "device_os_type": "userdebug", - "device_type": "walleye", - "os": "Android" - } - ], - "output_links": [ - { - "link": [ - "https://luci-logdog.appspot.com/v/?s", - "=android%2Fswarming%2Flogcats%2F", - "${TASK_ID}%2F%2B%2Funified_logcats" - ], - "name": "shard #${SHARD_INDEX} logcats" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "wtf_unittests", - "test_id_prefix": "ninja://third_party/blink/renderer/platform/wtf:wtf_unittests/" - } - ] - }, "android-fieldtrial-rel": { "gtest_tests": [ { @@ -38562,232 +37552,6 @@ } ] }, - "linux-backuprefptr-x64-fyi-rel": { - "gtest_tests": [ - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer" - ], - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "cpu": "x86-64", - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "base_unittests", - "test_id_prefix": "ninja://base:base_unittests/" - }, - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer" - ], - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "cpu": "x86-64", - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "blink_common_unittests", - "test_id_prefix": "ninja://third_party/blink/common:blink_common_unittests/" - }, - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer" - ], - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "cpu": "x86-64", - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "blink_platform_unittests", - "test_id_prefix": "ninja://third_party/blink/renderer/platform:blink_platform_unittests/" - }, - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer" - ], - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "name": "webkit_unit_tests", - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "cpu": "x86-64", - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "blink_unittests", - "test_id_prefix": "ninja://third_party/blink/renderer/controller:blink_unittests/" - }, - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer" - ], - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "cpu": "x86-64", - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "cast_unittests", - "test_id_prefix": "ninja://media/cast:cast_unittests/" - }, - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer" - ], - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "cpu": "x86-64", - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "cc_unittests", - "test_id_prefix": "ninja://cc:cc_unittests/" - }, - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer" - ], - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "cpu": "x86-64", - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "components_unittests", - "test_id_prefix": "ninja://components:components_unittests/" - }, - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer" - ], - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "cpu": "x86-64", - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", - "shards": 8 - }, - "test": "content_browsertests", - "test_id_prefix": "ninja://content/test:content_browsertests/" - }, - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer" - ], - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "cpu": "x86-64", - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "content_unittests", - "test_id_prefix": "ninja://content/test:content_unittests/" - }, - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer" - ], - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "cpu": "x86-64", - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "unit_tests", - "test_id_prefix": "ninja://chrome/test:unit_tests/" - }, - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer" - ], - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "cpu": "x86-64", - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "wtf_unittests", - "test_id_prefix": "ninja://third_party/blink/renderer/platform/wtf:wtf_unittests/" - } - ] - }, "linux-blink-animation-use-time-delta": { "additional_compile_targets": [ "all" @@ -47106,232 +45870,6 @@ } ] }, - "mac-backuprefptr-x64-fyi-rel": { - "gtest_tests": [ - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer" - ], - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "cpu": "x86-64", - "os": "Mac-10.15" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "base_unittests", - "test_id_prefix": "ninja://base:base_unittests/" - }, - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer" - ], - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "cpu": "x86-64", - "os": "Mac-10.15" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "blink_common_unittests", - "test_id_prefix": "ninja://third_party/blink/common:blink_common_unittests/" - }, - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer" - ], - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "cpu": "x86-64", - "os": "Mac-10.15" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "blink_platform_unittests", - "test_id_prefix": "ninja://third_party/blink/renderer/platform:blink_platform_unittests/" - }, - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer" - ], - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "name": "webkit_unit_tests", - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "cpu": "x86-64", - "os": "Mac-10.15" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "blink_unittests", - "test_id_prefix": "ninja://third_party/blink/renderer/controller:blink_unittests/" - }, - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer" - ], - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "cpu": "x86-64", - "os": "Mac-10.15" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "cast_unittests", - "test_id_prefix": "ninja://media/cast:cast_unittests/" - }, - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer" - ], - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "cpu": "x86-64", - "os": "Mac-10.15" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "cc_unittests", - "test_id_prefix": "ninja://cc:cc_unittests/" - }, - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer" - ], - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "cpu": "x86-64", - "os": "Mac-10.15" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "components_unittests", - "test_id_prefix": "ninja://components:components_unittests/" - }, - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer" - ], - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "cpu": "x86-64", - "os": "Mac-10.15" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", - "shards": 8 - }, - "test": "content_browsertests", - "test_id_prefix": "ninja://content/test:content_browsertests/" - }, - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer" - ], - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "cpu": "x86-64", - "os": "Mac-10.15" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "content_unittests", - "test_id_prefix": "ninja://content/test:content_unittests/" - }, - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer" - ], - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "cpu": "x86-64", - "os": "Mac-10.15" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "unit_tests", - "test_id_prefix": "ninja://chrome/test:unit_tests/" - }, - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer" - ], - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "cpu": "x86-64", - "os": "Mac-10.15" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "wtf_unittests", - "test_id_prefix": "ninja://third_party/blink/renderer/platform/wtf:wtf_unittests/" - } - ] - }, "mac-cr23-rel": { "gtest_tests": [ { @@ -49669,458 +48207,6 @@ } ] }, - "win-backuprefptr-x64-fyi-rel": { - "gtest_tests": [ - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer" - ], - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "cpu": "x86-64", - "os": "Windows-10-19045" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "base_unittests", - "test_id_prefix": "ninja://base:base_unittests/" - }, - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer" - ], - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "cpu": "x86-64", - "os": "Windows-10-19045" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "blink_common_unittests", - "test_id_prefix": "ninja://third_party/blink/common:blink_common_unittests/" - }, - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer" - ], - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "cpu": "x86-64", - "os": "Windows-10-19045" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "blink_platform_unittests", - "test_id_prefix": "ninja://third_party/blink/renderer/platform:blink_platform_unittests/" - }, - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer" - ], - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "name": "webkit_unit_tests", - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "cpu": "x86-64", - "os": "Windows-10-19045" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "blink_unittests", - "test_id_prefix": "ninja://third_party/blink/renderer/controller:blink_unittests/" - }, - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer" - ], - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "cpu": "x86-64", - "os": "Windows-10-19045" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "cast_unittests", - "test_id_prefix": "ninja://media/cast:cast_unittests/" - }, - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer" - ], - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "cpu": "x86-64", - "os": "Windows-10-19045" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "cc_unittests", - "test_id_prefix": "ninja://cc:cc_unittests/" - }, - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer" - ], - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "cpu": "x86-64", - "os": "Windows-10-19045" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "components_unittests", - "test_id_prefix": "ninja://components:components_unittests/" - }, - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer" - ], - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "cpu": "x86-64", - "os": "Windows-10-19045" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", - "shards": 8 - }, - "test": "content_browsertests", - "test_id_prefix": "ninja://content/test:content_browsertests/" - }, - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer" - ], - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "cpu": "x86-64", - "os": "Windows-10-19045" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "content_unittests", - "test_id_prefix": "ninja://content/test:content_unittests/" - }, - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer" - ], - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "cpu": "x86-64", - "os": "Windows-10-19045" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "unit_tests", - "test_id_prefix": "ninja://chrome/test:unit_tests/" - }, - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer" - ], - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "cpu": "x86-64", - "os": "Windows-10-19045" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "wtf_unittests", - "test_id_prefix": "ninja://third_party/blink/renderer/platform/wtf:wtf_unittests/" - } - ] - }, - "win-backuprefptr-x86-fyi-rel": { - "gtest_tests": [ - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer" - ], - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "cpu": "x86-64", - "os": "Windows-10-19045" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "base_unittests", - "test_id_prefix": "ninja://base:base_unittests/" - }, - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer" - ], - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "cpu": "x86-64", - "os": "Windows-10-19045" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "blink_common_unittests", - "test_id_prefix": "ninja://third_party/blink/common:blink_common_unittests/" - }, - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer" - ], - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "cpu": "x86-64", - "os": "Windows-10-19045" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "blink_platform_unittests", - "test_id_prefix": "ninja://third_party/blink/renderer/platform:blink_platform_unittests/" - }, - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer" - ], - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "name": "webkit_unit_tests", - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "cpu": "x86-64", - "os": "Windows-10-19045" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "blink_unittests", - "test_id_prefix": "ninja://third_party/blink/renderer/controller:blink_unittests/" - }, - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer" - ], - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "cpu": "x86-64", - "os": "Windows-10-19045" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "cast_unittests", - "test_id_prefix": "ninja://media/cast:cast_unittests/" - }, - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer" - ], - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "cpu": "x86-64", - "os": "Windows-10-19045" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "cc_unittests", - "test_id_prefix": "ninja://cc:cc_unittests/" - }, - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer" - ], - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "cpu": "x86-64", - "os": "Windows-10-19045" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "components_unittests", - "test_id_prefix": "ninja://components:components_unittests/" - }, - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer" - ], - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "cpu": "x86-64", - "os": "Windows-10-19045" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", - "shards": 8 - }, - "test": "content_browsertests", - "test_id_prefix": "ninja://content/test:content_browsertests/" - }, - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer" - ], - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "cpu": "x86-64", - "os": "Windows-10-19045" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "content_unittests", - "test_id_prefix": "ninja://content/test:content_unittests/" - }, - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer" - ], - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "cpu": "x86-64", - "os": "Windows-10-19045" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "unit_tests", - "test_id_prefix": "ninja://chrome/test:unit_tests/" - }, - { - "args": [ - "--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer" - ], - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "cpu": "x86-64", - "os": "Windows-10-19045" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "wtf_unittests", - "test_id_prefix": "ninja://third_party/blink/renderer/platform/wtf:wtf_unittests/" - } - ] - }, "win-cr23-rel": { "gtest_tests": [ {
diff --git a/testing/buildbot/filters/BUILD.gn b/testing/buildbot/filters/BUILD.gn index b3fd112e..55b70e3 100644 --- a/testing/buildbot/filters/BUILD.gn +++ b/testing/buildbot/filters/BUILD.gn
@@ -70,7 +70,6 @@ "//testing/buildbot/filters/pixel_tests.filter", "//testing/buildbot/filters/webrtc_functional.browser_tests.filter", "//testing/buildbot/filters/win.win-rel-cft.browser_tests.filter", - "//testing/buildbot/filters/win_backuprefptr_fyi.browser_tests.filter", ] }
diff --git a/testing/buildbot/filters/win_backuprefptr_fyi.browser_tests.filter b/testing/buildbot/filters/win_backuprefptr_fyi.browser_tests.filter deleted file mode 100644 index e72a8bb..0000000 --- a/testing/buildbot/filters/win_backuprefptr_fyi.browser_tests.filter +++ /dev/null
@@ -1,2 +0,0 @@ -# TODO(crbug.com/1263350): Enable this. --OutOfMemoryReporterPrerenderBrowserTest.NotReportedOnPrerenderPage
diff --git a/testing/buildbot/internal.chromeos.fyi.json b/testing/buildbot/internal.chromeos.fyi.json index 134638a7..3b15b06 100644 --- a/testing/buildbot/internal.chromeos.fyi.json +++ b/testing/buildbot/internal.chromeos.fyi.json
@@ -1190,7 +1190,7 @@ "args": [], "autotest_name": "tast.chrome-from-tls", "cros_board": "jacuzzi", - "cros_img": "jacuzzi-release/R114-15419.0.0", + "cros_img": "jacuzzi-release/R115-15460.0.0", "name": "chrome_all_tast_tests JACUZZI_RELEASE_CHROME_FROM_TLS_LKGM", "shards": 10, "swarming": {}, @@ -1213,7 +1213,7 @@ "args": [], "autotest_name": "tast.chrome-from-tls", "cros_board": "octopus", - "cros_img": "octopus-release/R114-15408.0.0", + "cros_img": "octopus-release/R115-15460.0.0", "name": "chrome_all_tast_tests OCTOPUS_RELEASE_CHROME_FROM_TLS_LKGM", "shards": 10, "swarming": {},
diff --git a/testing/buildbot/test_suite_exceptions.pyl b/testing/buildbot/test_suite_exceptions.pyl index 19f9e5b2..551ca4e 100644 --- a/testing/buildbot/test_suite_exceptions.pyl +++ b/testing/buildbot/test_suite_exceptions.pyl
@@ -1247,11 +1247,6 @@ 'shards': 60, }, }, - 'win-backuprefptr-x64-fyi-rel': { - 'args': [ - '--test-launcher-filter-file=../../testing/buildbot/filters/win_backuprefptr_fyi.browser_tests.filter', - ], - }, 'win-rel-cft': { 'args': [ # crbug.com/868082
diff --git a/testing/buildbot/test_suites.pyl b/testing/buildbot/test_suites.pyl index 5af6c5a7..6489169 100644 --- a/testing/buildbot/test_suites.pyl +++ b/testing/buildbot/test_suites.pyl
@@ -295,44 +295,6 @@ 'wm_unittests': {}, }, - 'backuprefptr_generic_gtests': { - 'base_unittests': {}, - 'blink_common_unittests': {}, - 'blink_platform_unittests': {}, - 'cast_unittests': {}, - 'cc_unittests': {}, - 'components_unittests': { - 'android_swarming': { - 'shards': 6, - }, - }, - 'content_browsertests': { - 'android_swarming': { - 'shards': 15, - }, - 'swarming': { - 'shards': 8, - }, - }, - 'content_unittests': { - 'android_swarming': { - 'shards': 3, - }, - }, - 'unit_tests': { - 'android_swarming': { - 'shards': 2, - }, - }, - 'webkit_unit_tests': { - 'test': 'blink_unittests', - 'android_swarming': { - 'shards': 6, - }, - }, - 'wtf_unittests': {}, - }, - 'bfcache_android_specific_gtests': { 'bf_cache_android_browsertests': { 'args': [ @@ -5933,10 +5895,6 @@ 'webengine_android_gtests', ], - 'backuprefptr_gtests': [ - 'backuprefptr_generic_gtests', - ], - 'bfcache_android_gtests': [ 'bfcache_android_specific_gtests', 'bfcache_generic_gtests',
diff --git a/testing/buildbot/variants.pyl b/testing/buildbot/variants.pyl index 3e7b7bc3..21b4a33 100644 --- a/testing/buildbot/variants.pyl +++ b/testing/buildbot/variants.pyl
@@ -589,8 +589,8 @@ 'CROS_JACUZZI_RELEASE_CHROME_FROM_TLS_LKGM': { 'skylab': { 'cros_board': 'jacuzzi', - 'cros_chrome_version': '114.0.5707.0', - 'cros_img': 'jacuzzi-release/R114-15419.0.0', + 'cros_chrome_version': '115.0.5762.0', + 'cros_img': 'jacuzzi-release/R115-15460.0.0', 'tast_expr': '("group:mainline" && !informational)', 'autotest_name': 'tast.chrome-from-tls', 'shards': 10, @@ -662,8 +662,8 @@ 'CROS_OCTOPUS_RELEASE_CHROME_FROM_TLS_LKGM': { 'skylab': { 'cros_board': 'octopus', - 'cros_chrome_version': '114.0.5689.0', - 'cros_img': 'octopus-release/R114-15408.0.0', + 'cros_chrome_version': '115.0.5762.0', + 'cros_img': 'octopus-release/R115-15460.0.0', 'tast_expr': '("group:mainline" && !informational)', 'autotest_name': 'tast.chrome-from-tls', 'shards': 10,
diff --git a/testing/buildbot/waterfalls.pyl b/testing/buildbot/waterfalls.pyl index 484369e1..8d491a1 100644 --- a/testing/buildbot/waterfalls.pyl +++ b/testing/buildbot/waterfalls.pyl
@@ -3186,34 +3186,6 @@ 'scripts': 'chromium_win_scripts', }, }, - 'android-backuprefptr-arm-fyi-rel': { - 'test_suites': { - 'gtest_tests': 'backuprefptr_gtests', - }, - 'mixins': [ - 'has_native_resultdb_integration', - 'pie_fleet', - 'walleye', - ], - 'os_type': 'android', - 'gtest_args': [ - '--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer', - ], - }, - 'android-backuprefptr-arm64-fyi-rel': { - 'test_suites': { - 'gtest_tests': 'backuprefptr_gtests', - }, - 'mixins': [ - 'has_native_resultdb_integration', - 'pie_fleet', - 'walleye', - ], - 'os_type': 'android', - 'gtest_args': [ - '--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer', - ], - }, 'android-fieldtrial-rel': { 'mixins': [ 'has_native_resultdb_integration', @@ -3499,18 +3471,6 @@ 'scripts': 'test_traffic_annotation_auditor_script', }, }, - 'linux-backuprefptr-x64-fyi-rel': { - 'test_suites': { - 'gtest_tests': 'backuprefptr_gtests', - }, - 'mixins': [ - 'linux-bionic', - 'x86-64', - ], - 'gtest_args': [ - '--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer', - ], - }, 'linux-blink-animation-use-time-delta': { 'mixins': [ 'linux-bionic', @@ -3716,18 +3676,6 @@ 'isolated_scripts': 'wpt_web_tests_input', }, }, - 'mac-backuprefptr-x64-fyi-rel': { - 'test_suites': { - 'gtest_tests': 'backuprefptr_gtests', - }, - 'mixins': [ - 'mac_10.15', - 'x86-64', - ], - 'gtest_args': [ - '--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer', - ], - }, 'mac-cr23-rel': { 'test_suites': { 'gtest_tests': 'cr23_gtests', @@ -3843,30 +3791,6 @@ 'scripts': 'test_traffic_annotation_auditor_script', }, }, - 'win-backuprefptr-x64-fyi-rel': { - 'test_suites': { - 'gtest_tests': 'backuprefptr_gtests', - }, - 'mixins': [ - 'win10', - 'x86-64', - ], - 'gtest_args': [ - '--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer', - ], - }, - 'win-backuprefptr-x86-fyi-rel': { - 'test_suites': { - 'gtest_tests': 'backuprefptr_gtests', - }, - 'mixins': [ - 'win10', - 'x86-64', - ], - 'gtest_args': [ - '--enable-features=PartitionAllocBackupRefPtr:enabled-processes/non-renderer', - ], - }, 'win-cr23-rel': { 'test_suites': { 'gtest_tests': 'cr23_gtests',
diff --git a/testing/variations/fieldtrial_testing_config.json b/testing/variations/fieldtrial_testing_config.json index 0044e28b..bff0576 100644 --- a/testing/variations/fieldtrial_testing_config.json +++ b/testing/variations/fieldtrial_testing_config.json
@@ -1884,6 +1884,33 @@ ] } ], + "BackNavigationMenuIPH": [ + { + "platforms": [ + "chromeos", + "chromeos_lacros", + "linux", + "mac", + "windows" + ], + "experiments": [ + { + "name": "EnabledIPHWhenUserPerformsChainedBackNavigation_20230510", + "params": { + "availability": ">0", + "event_trigger": "name:back_navigation_menu_iph_is_triggered;comparator:<=4;window:365;storage:365", + "event_used": "name:back_navigation_menu_is_opened;comparator:==0;window:7;storage:365", + "session_rate": "<1", + "snooze_params": "max_limit:4,snooze_interval:7", + "x_experiment": "1" + }, + "enable_features": [ + "IPH_BackNavigationMenu" + ] + } + ] + } + ], "BackgroundTabLoadingFromPerformanceManager": [ { "platforms": [
diff --git a/third_party/bidimapper/README.chromium b/third_party/bidimapper/README.chromium index 61a2bbfa..0a5cd197 100644 --- a/third_party/bidimapper/README.chromium +++ b/third_party/bidimapper/README.chromium
@@ -1,10 +1,10 @@ Name: Implementation of WebDriver BiDi standard Short Name: chromium-bidi -URL: https://github.com/GoogleChromeLabs/chromium-bidi/archive/175fa98da68f37a5194b5f54b286abbfd5402437.zip +URL: https://github.com/GoogleChromeLabs/chromium-bidi/archive/fe3145bb0ba4e809dd610c0f04eb2a353caf092a.zip Version: 0 -Date: 2023-05-08 -Revision: 175fa98da68f37a5194b5f54b286abbfd5402437 -SHA-512: 39f4f9df108166afec30818e22d6bba122d33c6d7dc92c71178a99624c84e5f7624c59b53b94b9653380694aff83f1543420be2d2a2d57fb96a05f1c7b93e074 +Date: 2023-05-16 +Revision: fe3145bb0ba4e809dd610c0f04eb2a353caf092a +SHA-512: ea04d62e36ec01bc22f1e44fa7030d0ef9912a11c52caca97af3699ade12855741949f8aecba11a5009ea39c09007cc8d5413cdce6a4febdf68bab4fe2a34058 License: Apache 2.0 License File: LICENSE Security Critical: no
diff --git a/third_party/bidimapper/mapper.js b/third_party/bidimapper/mapper.js index f4796a4f..ebc247a 100644 --- a/third_party/bidimapper/mapper.js +++ b/third_party/bidimapper/mapper.js
@@ -1,4 +1,4 @@ -var mapperTab=function(){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){if(this instanceof e){var n=[null];return n.push.apply(n,arguments),new(Function.bind.apply(t,n))}return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})})),n}var n={},s={},r={},a={},i={},o={},d={};!function(e){var t;Object.defineProperty(e,"__esModule",{value:!0}),e.getParsedType=e.ZodParsedType=e.objectUtil=e.util=void 0,function(e){e.assertEqual=e=>e,e.assertIs=function(e){},e.assertNever=function(e){throw new Error},e.arrayToEnum=e=>{const t={};for(const n of e)t[n]=n;return t},e.getValidEnumValues=t=>{const n=e.objectKeys(t).filter((e=>"number"!=typeof t[t[e]])),s={};for(const e of n)s[e]=t[e];return e.objectValues(s)},e.objectValues=t=>e.objectKeys(t).map((function(e){return t[e]})),e.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=(e,t)=>{for(const n of e)if(t(n))return n},e.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e,t=" | "){return e.map((e=>"string"==typeof e?`'${e}'`:e)).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t}(t=e.util||(e.util={})),(e.objectUtil||(e.objectUtil={})).mergeShapes=(e,t)=>({...e,...t}),e.ZodParsedType=t.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);e.getParsedType=t=>{switch(typeof t){case"undefined":return e.ZodParsedType.undefined;case"string":return e.ZodParsedType.string;case"number":return isNaN(t)?e.ZodParsedType.nan:e.ZodParsedType.number;case"boolean":return e.ZodParsedType.boolean;case"function":return e.ZodParsedType.function;case"bigint":return e.ZodParsedType.bigint;case"symbol":return e.ZodParsedType.symbol;case"object":return Array.isArray(t)?e.ZodParsedType.array:null===t?e.ZodParsedType.null:t.then&&"function"==typeof t.then&&t.catch&&"function"==typeof t.catch?e.ZodParsedType.promise:"undefined"!=typeof Map&&t instanceof Map?e.ZodParsedType.map:"undefined"!=typeof Set&&t instanceof Set?e.ZodParsedType.set:"undefined"!=typeof Date&&t instanceof Date?e.ZodParsedType.date:e.ZodParsedType.object;default:return e.ZodParsedType.unknown}}}(d);var c={};Object.defineProperty(c,"__esModule",{value:!0}),c.ZodError=c.quotelessJson=c.ZodIssueCode=void 0;const u=d;c.ZodIssueCode=u.util.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);c.quotelessJson=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class l extends Error{constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const t=e||function(e){return e.message},n={_errors:[]},s=e=>{for(const r of e.issues)if("invalid_union"===r.code)r.unionErrors.map(s);else if("invalid_return_type"===r.code)s(r.returnTypeError);else if("invalid_arguments"===r.code)s(r.argumentsError);else if(0===r.path.length)n._errors.push(t(r));else{let e=n,s=0;for(;s<r.path.length;){const n=r.path[s];s===r.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(r))):e[n]=e[n]||{_errors:[]},e=e[n],s++}}};return s(this),n}toString(){return this.message}get message(){return JSON.stringify(this.issues,u.util.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=(e=>e.message)){const t={},n=[];for(const s of this.issues)s.path.length>0?(t[s.path[0]]=t[s.path[0]]||[],t[s.path[0]].push(e(s))):n.push(e(s));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}}c.ZodError=l,l.create=e=>new l(e),Object.defineProperty(o,"__esModule",{value:!0});const p=d,h=c;o.default=(e,t)=>{let n;switch(e.code){case h.ZodIssueCode.invalid_type:n=e.received===p.ZodParsedType.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case h.ZodIssueCode.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,p.util.jsonStringifyReplacer)}`;break;case h.ZodIssueCode.unrecognized_keys:n=`Unrecognized key(s) in object: ${p.util.joinValues(e.keys,", ")}`;break;case h.ZodIssueCode.invalid_union:n="Invalid input";break;case h.ZodIssueCode.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${p.util.joinValues(e.options)}`;break;case h.ZodIssueCode.invalid_enum_value:n=`Invalid enum value. Expected ${p.util.joinValues(e.options)}, received '${e.received}'`;break;case h.ZodIssueCode.invalid_arguments:n="Invalid function arguments";break;case h.ZodIssueCode.invalid_return_type:n="Invalid function return type";break;case h.ZodIssueCode.invalid_date:n="Invalid date";break;case h.ZodIssueCode.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:p.util.assertNever(e.validation):n="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case h.ZodIssueCode.too_small:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case h.ZodIssueCode.too_big:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case h.ZodIssueCode.custom:n="Invalid input";break;case h.ZodIssueCode.invalid_intersection_types:n="Intersection results could not be merged";break;case h.ZodIssueCode.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case h.ZodIssueCode.not_finite:n="Number must be finite";break;default:n=t.defaultError,p.util.assertNever(e)}return{message:n}};var m=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i,"__esModule",{value:!0}),i.getErrorMap=i.setErrorMap=i.defaultErrorMap=void 0;const g=m(o);i.defaultErrorMap=g.default;let f=g.default;i.setErrorMap=function(e){f=e},i.getErrorMap=function(){return f};var v={};!function(t){var n=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isAsync=t.isValid=t.isDirty=t.isAborted=t.OK=t.DIRTY=t.INVALID=t.ParseStatus=t.addIssueToContext=t.EMPTY_PATH=t.makeIssue=void 0;const s=i,r=n(o);t.makeIssue=e=>{const{data:t,path:n,errorMaps:s,issueData:r}=e,a=[...n,...r.path||[]],i={...r,path:a};let o="";const d=s.filter((e=>!!e)).slice().reverse();for(const e of d)o=e(i,{data:t,defaultError:o}).message;return{...r,path:a,message:r.message||o}},t.EMPTY_PATH=[],t.addIssueToContext=function(e,n){const a=(0,t.makeIssue)({issueData:n,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,(0,s.getErrorMap)(),r.default].filter((e=>!!e))});e.common.issues.push(a)};class a{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,n){const s=[];for(const r of n){if("aborted"===r.status)return t.INVALID;"dirty"===r.status&&e.dirty(),s.push(r.value)}return{status:e.value,value:s}}static async mergeObjectAsync(e,t){const n=[];for(const e of t)n.push({key:await e.key,value:await e.value});return a.mergeObjectSync(e,n)}static mergeObjectSync(e,n){const s={};for(const r of n){const{key:n,value:a}=r;if("aborted"===n.status)return t.INVALID;if("aborted"===a.status)return t.INVALID;"dirty"===n.status&&e.dirty(),"dirty"===a.status&&e.dirty(),(void 0!==a.value||r.alwaysSet)&&(s[n.value]=a.value)}return{status:e.value,value:s}}}t.ParseStatus=a,t.INVALID=Object.freeze({status:"aborted"});t.DIRTY=e=>({status:"dirty",value:e});t.OK=e=>({status:"valid",value:e});t.isAborted=e=>"aborted"===e.status;t.isDirty=e=>"dirty"===e.status;t.isValid=e=>"valid"===e.status;t.isAsync=e=>"undefined"!=typeof Promise&&e instanceof Promise}(v);var y={};Object.defineProperty(y,"__esModule",{value:!0});var b,x={},C={};b=C,Object.defineProperty(b,"__esModule",{value:!0}),b.errorUtil=void 0,function(e){e.errToObj=e=>"string"==typeof e?{message:e}:e||{},e.toString=e=>"string"==typeof e?e:null==e?void 0:e.message}(b.errorUtil||(b.errorUtil={})),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.discriminatedUnion=e.date=e.boolean=e.bigint=e.array=e.any=e.coerce=e.ZodFirstPartyTypeKind=e.late=e.ZodSchema=e.Schema=e.custom=e.ZodPipeline=e.ZodBranded=e.BRAND=e.ZodNaN=e.ZodCatch=e.ZodDefault=e.ZodNullable=e.ZodOptional=e.ZodTransformer=e.ZodEffects=e.ZodPromise=e.ZodNativeEnum=e.ZodEnum=e.ZodLiteral=e.ZodLazy=e.ZodFunction=e.ZodSet=e.ZodMap=e.ZodRecord=e.ZodTuple=e.ZodIntersection=e.ZodDiscriminatedUnion=e.ZodUnion=e.ZodObject=e.ZodArray=e.ZodVoid=e.ZodNever=e.ZodUnknown=e.ZodAny=e.ZodNull=e.ZodUndefined=e.ZodSymbol=e.ZodDate=e.ZodBoolean=e.ZodBigInt=e.ZodNumber=e.ZodString=e.ZodType=void 0,e.NEVER=e.void=e.unknown=e.union=e.undefined=e.tuple=e.transformer=e.symbol=e.string=e.strictObject=e.set=e.record=e.promise=e.preprocess=e.pipeline=e.ostring=e.optional=e.onumber=e.oboolean=e.object=e.number=e.nullable=e.null=e.never=e.nativeEnum=e.nan=e.map=e.literal=e.lazy=e.intersection=e.instanceof=e.function=e.enum=e.effect=void 0;const t=i,n=C,s=v,r=d,a=c;class o{constructor(e,t,n,s){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=s}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const u=(e,t)=>{if((0,s.isValid)(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new a.ZodError(e.common.issues);return this._error=t,this._error}}};function l(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:s,description:r}=e;if(t&&(n||s))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');if(t)return{errorMap:t,description:r};return{errorMap:(e,t)=>"invalid_type"!==e.code?{message:t.defaultError}:void 0===t.data?{message:null!=s?s:t.defaultError}:{message:null!=n?n:t.defaultError},description:r}}class p{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return(0,r.getParsedType)(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:(0,r.getParsedType)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new s.ParseStatus,ctx:{common:e.parent.common,data:e.data,parsedType:(0,r.getParsedType)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if((0,s.isAsync)(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){var n;const s={common:{issues:[],async:null!==(n=null==t?void 0:t.async)&&void 0!==n&&n,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,r.getParsedType)(e)},a=this._parseSync({data:e,path:s.path,parent:s});return u(s,a)}async parseAsync(e,t){const n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){const n={common:{issues:[],contextualErrorMap:null==t?void 0:t.errorMap,async:!0},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,r.getParsedType)(e)},a=this._parse({data:e,path:n.path,parent:n}),i=await((0,s.isAsync)(a)?a:Promise.resolve(a));return u(n,i)}refine(e,t){const n=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement(((t,s)=>{const r=e(t),i=()=>s.addIssue({code:a.ZodIssueCode.custom,...n(t)});return"undefined"!=typeof Promise&&r instanceof Promise?r.then((e=>!!e||(i(),!1))):!!r||(i(),!1)}))}refinement(e,t){return this._refinement(((n,s)=>!!e(n)||(s.addIssue("function"==typeof t?t(n,s):t),!1)))}_refinement(e){return new ne({schema:this,typeName:ue.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return se.create(this,this._def)}nullable(){return re.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return A.create(this,this._def)}promise(){return te.create(this,this._def)}or(e){return B.create([this,e],this._def)}and(e){return F.create(this,e,this._def)}transform(e){return new ne({...l(this._def),schema:this,typeName:ue.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new ae({...l(this._def),innerType:this,defaultValue:t,typeName:ue.ZodDefault})}brand(){return new de({typeName:ue.ZodBranded,type:this,...l(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new ie({...l(this._def),innerType:this,catchValue:t,typeName:ue.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return ce.create(this,e)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}e.ZodType=p,e.Schema=p,e.ZodSchema=p;const h=/^c[^\s-]{8,}$/i,m=/^[a-z][a-z0-9]*$/,g=/[0-9A-HJKMNP-TV-Z]{26}/,f=/^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i,y=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\])|(\[IPv6:(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))\])|([A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])*(\.[A-Za-z]{2,})+))$/,b=/^(\p{Extended_Pictographic}|\p{Emoji_Component})+$/u,x=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,w=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/;function _(e,t){return!("v4"!==t&&t||!x.test(e))||!("v6"!==t&&t||!w.test(e))}class I extends p{constructor(){super(...arguments),this._regex=(e,t,s)=>this.refinement((t=>e.test(t)),{validation:t,code:a.ZodIssueCode.invalid_string,...n.errorUtil.errToObj(s)}),this.nonempty=e=>this.min(1,n.errorUtil.errToObj(e)),this.trim=()=>new I({...this._def,checks:[...this._def.checks,{kind:"trim"}]}),this.toLowerCase=()=>new I({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]}),this.toUpperCase=()=>new I({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}_parse(e){this._def.coerce&&(e.data=String(e.data));if(this._getType(e)!==r.ZodParsedType.string){const t=this._getOrReturnCtx(e);return(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.invalid_type,expected:r.ZodParsedType.string,received:t.parsedType}),s.INVALID}const t=new s.ParseStatus;let n;for(const o of this._def.checks)if("min"===o.kind)e.data.length<o.value&&(n=this._getOrReturnCtx(e,n),(0,s.addIssueToContext)(n,{code:a.ZodIssueCode.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),t.dirty());else if("max"===o.kind)e.data.length>o.value&&(n=this._getOrReturnCtx(e,n),(0,s.addIssueToContext)(n,{code:a.ZodIssueCode.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),t.dirty());else if("length"===o.kind){const r=e.data.length>o.value,i=e.data.length<o.value;(r||i)&&(n=this._getOrReturnCtx(e,n),r?(0,s.addIssueToContext)(n,{code:a.ZodIssueCode.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):i&&(0,s.addIssueToContext)(n,{code:a.ZodIssueCode.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),t.dirty())}else if("email"===o.kind)y.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,s.addIssueToContext)(n,{validation:"email",code:a.ZodIssueCode.invalid_string,message:o.message}),t.dirty());else if("emoji"===o.kind)b.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,s.addIssueToContext)(n,{validation:"emoji",code:a.ZodIssueCode.invalid_string,message:o.message}),t.dirty());else if("uuid"===o.kind)f.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,s.addIssueToContext)(n,{validation:"uuid",code:a.ZodIssueCode.invalid_string,message:o.message}),t.dirty());else if("cuid"===o.kind)h.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,s.addIssueToContext)(n,{validation:"cuid",code:a.ZodIssueCode.invalid_string,message:o.message}),t.dirty());else if("cuid2"===o.kind)m.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,s.addIssueToContext)(n,{validation:"cuid2",code:a.ZodIssueCode.invalid_string,message:o.message}),t.dirty());else if("ulid"===o.kind)g.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,s.addIssueToContext)(n,{validation:"ulid",code:a.ZodIssueCode.invalid_string,message:o.message}),t.dirty());else if("url"===o.kind)try{new URL(e.data)}catch(r){n=this._getOrReturnCtx(e,n),(0,s.addIssueToContext)(n,{validation:"url",code:a.ZodIssueCode.invalid_string,message:o.message}),t.dirty()}else if("regex"===o.kind){o.regex.lastIndex=0;o.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,s.addIssueToContext)(n,{validation:"regex",code:a.ZodIssueCode.invalid_string,message:o.message}),t.dirty())}else if("trim"===o.kind)e.data=e.data.trim();else if("includes"===o.kind)e.data.includes(o.value,o.position)||(n=this._getOrReturnCtx(e,n),(0,s.addIssueToContext)(n,{code:a.ZodIssueCode.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),t.dirty());else if("toLowerCase"===o.kind)e.data=e.data.toLowerCase();else if("toUpperCase"===o.kind)e.data=e.data.toUpperCase();else if("startsWith"===o.kind)e.data.startsWith(o.value)||(n=this._getOrReturnCtx(e,n),(0,s.addIssueToContext)(n,{code:a.ZodIssueCode.invalid_string,validation:{startsWith:o.value},message:o.message}),t.dirty());else if("endsWith"===o.kind)e.data.endsWith(o.value)||(n=this._getOrReturnCtx(e,n),(0,s.addIssueToContext)(n,{code:a.ZodIssueCode.invalid_string,validation:{endsWith:o.value},message:o.message}),t.dirty());else if("datetime"===o.kind){((i=o).precision?i.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${i.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${i.precision}}Z$`):0===i.precision?i.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):i.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$")).test(e.data)||(n=this._getOrReturnCtx(e,n),(0,s.addIssueToContext)(n,{code:a.ZodIssueCode.invalid_string,validation:"datetime",message:o.message}),t.dirty())}else"ip"===o.kind?_(e.data,o.version)||(n=this._getOrReturnCtx(e,n),(0,s.addIssueToContext)(n,{validation:"ip",code:a.ZodIssueCode.invalid_string,message:o.message}),t.dirty()):r.util.assertNever(o);var i;return{status:t.value,value:e.data}}_addCheck(e){return new I({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...n.errorUtil.errToObj(e)})}url(e){return this._addCheck({kind:"url",...n.errorUtil.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...n.errorUtil.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...n.errorUtil.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...n.errorUtil.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...n.errorUtil.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...n.errorUtil.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...n.errorUtil.errToObj(e)})}datetime(e){var t;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,offset:null!==(t=null==e?void 0:e.offset)&&void 0!==t&&t,...n.errorUtil.errToObj(null==e?void 0:e.message)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...n.errorUtil.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...n.errorUtil.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...n.errorUtil.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...n.errorUtil.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...n.errorUtil.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...n.errorUtil.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...n.errorUtil.errToObj(t)})}get isDatetime(){return!!this._def.checks.find((e=>"datetime"===e.kind))}get isEmail(){return!!this._def.checks.find((e=>"email"===e.kind))}get isURL(){return!!this._def.checks.find((e=>"url"===e.kind))}get isEmoji(){return!!this._def.checks.find((e=>"emoji"===e.kind))}get isUUID(){return!!this._def.checks.find((e=>"uuid"===e.kind))}get isCUID(){return!!this._def.checks.find((e=>"cuid"===e.kind))}get isCUID2(){return!!this._def.checks.find((e=>"cuid2"===e.kind))}get isULID(){return!!this._def.checks.find((e=>"ulid"===e.kind))}get isIP(){return!!this._def.checks.find((e=>"ip"===e.kind))}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function S(e,t){const n=(e.toString().split(".")[1]||"").length,s=(t.toString().split(".")[1]||"").length,r=n>s?n:s;return parseInt(e.toFixed(r).replace(".",""))%parseInt(t.toFixed(r).replace(".",""))/Math.pow(10,r)}e.ZodString=I,I.create=e=>{var t;return new I({checks:[],typeName:ue.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...l(e)})};class T extends p{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){this._def.coerce&&(e.data=Number(e.data));if(this._getType(e)!==r.ZodParsedType.number){const t=this._getOrReturnCtx(e);return(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.invalid_type,expected:r.ZodParsedType.number,received:t.parsedType}),s.INVALID}let t;const n=new s.ParseStatus;for(const i of this._def.checks)if("int"===i.kind)r.util.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.invalid_type,expected:"integer",received:"float",message:i.message}),n.dirty());else if("min"===i.kind){(i.inclusive?e.data<i.value:e.data<=i.value)&&(t=this._getOrReturnCtx(e,t),(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty())}else if("max"===i.kind){(i.inclusive?e.data>i.value:e.data>=i.value)&&(t=this._getOrReturnCtx(e,t),(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty())}else"multipleOf"===i.kind?0!==S(e.data,i.value)&&(t=this._getOrReturnCtx(e,t),(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):"finite"===i.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.not_finite,message:i.message}),n.dirty()):r.util.assertNever(i);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,n.errorUtil.toString(t))}gt(e,t){return this.setLimit("min",e,!1,n.errorUtil.toString(t))}lte(e,t){return this.setLimit("max",e,!0,n.errorUtil.toString(t))}lt(e,t){return this.setLimit("max",e,!1,n.errorUtil.toString(t))}setLimit(e,t,s,r){return new T({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:n.errorUtil.toString(r)}]})}_addCheck(e){return new T({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:n.errorUtil.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:n.errorUtil.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:n.errorUtil.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:n.errorUtil.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:n.errorUtil.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:n.errorUtil.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:n.errorUtil.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:n.errorUtil.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:n.errorUtil.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find((e=>"int"===e.kind||"multipleOf"===e.kind&&r.util.isInteger(e.value)))}get isFinite(){let e=null,t=null;for(const n of this._def.checks){if("finite"===n.kind||"int"===n.kind||"multipleOf"===n.kind)return!0;"min"===n.kind?(null===t||n.value>t)&&(t=n.value):"max"===n.kind&&(null===e||n.value<e)&&(e=n.value)}return Number.isFinite(t)&&Number.isFinite(e)}}e.ZodNumber=T,T.create=e=>new T({checks:[],typeName:ue.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...l(e)});class E extends p{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){this._def.coerce&&(e.data=BigInt(e.data));if(this._getType(e)!==r.ZodParsedType.bigint){const t=this._getOrReturnCtx(e);return(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.invalid_type,expected:r.ZodParsedType.bigint,received:t.parsedType}),s.INVALID}let t;const n=new s.ParseStatus;for(const i of this._def.checks)if("min"===i.kind){(i.inclusive?e.data<i.value:e.data<=i.value)&&(t=this._getOrReturnCtx(e,t),(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty())}else if("max"===i.kind){(i.inclusive?e.data>i.value:e.data>=i.value)&&(t=this._getOrReturnCtx(e,t),(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty())}else"multipleOf"===i.kind?e.data%i.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):r.util.assertNever(i);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,n.errorUtil.toString(t))}gt(e,t){return this.setLimit("min",e,!1,n.errorUtil.toString(t))}lte(e,t){return this.setLimit("max",e,!0,n.errorUtil.toString(t))}lt(e,t){return this.setLimit("max",e,!1,n.errorUtil.toString(t))}setLimit(e,t,s,r){return new E({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:n.errorUtil.toString(r)}]})}_addCheck(e){return new E({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:n.errorUtil.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:n.errorUtil.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:n.errorUtil.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:n.errorUtil.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:n.errorUtil.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}e.ZodBigInt=E,E.create=e=>{var t;return new E({checks:[],typeName:ue.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...l(e)})};class P extends p{_parse(e){this._def.coerce&&(e.data=Boolean(e.data));if(this._getType(e)!==r.ZodParsedType.boolean){const t=this._getOrReturnCtx(e);return(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.invalid_type,expected:r.ZodParsedType.boolean,received:t.parsedType}),s.INVALID}return(0,s.OK)(e.data)}}e.ZodBoolean=P,P.create=e=>new P({typeName:ue.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...l(e)});class k extends p{_parse(e){this._def.coerce&&(e.data=new Date(e.data));if(this._getType(e)!==r.ZodParsedType.date){const t=this._getOrReturnCtx(e);return(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.invalid_type,expected:r.ZodParsedType.date,received:t.parsedType}),s.INVALID}if(isNaN(e.data.getTime())){const t=this._getOrReturnCtx(e);return(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.invalid_date}),s.INVALID}const t=new s.ParseStatus;let n;for(const i of this._def.checks)"min"===i.kind?e.data.getTime()<i.value&&(n=this._getOrReturnCtx(e,n),(0,s.addIssueToContext)(n,{code:a.ZodIssueCode.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),t.dirty()):"max"===i.kind?e.data.getTime()>i.value&&(n=this._getOrReturnCtx(e,n),(0,s.addIssueToContext)(n,{code:a.ZodIssueCode.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),t.dirty()):r.util.assertNever(i);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new k({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:n.errorUtil.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:n.errorUtil.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}e.ZodDate=k,k.create=e=>new k({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:ue.ZodDate,...l(e)});class N extends p{_parse(e){if(this._getType(e)!==r.ZodParsedType.symbol){const t=this._getOrReturnCtx(e);return(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.invalid_type,expected:r.ZodParsedType.symbol,received:t.parsedType}),s.INVALID}return(0,s.OK)(e.data)}}e.ZodSymbol=N,N.create=e=>new N({typeName:ue.ZodSymbol,...l(e)});class Z extends p{_parse(e){if(this._getType(e)!==r.ZodParsedType.undefined){const t=this._getOrReturnCtx(e);return(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.invalid_type,expected:r.ZodParsedType.undefined,received:t.parsedType}),s.INVALID}return(0,s.OK)(e.data)}}e.ZodUndefined=Z,Z.create=e=>new Z({typeName:ue.ZodUndefined,...l(e)});class O extends p{_parse(e){if(this._getType(e)!==r.ZodParsedType.null){const t=this._getOrReturnCtx(e);return(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.invalid_type,expected:r.ZodParsedType.null,received:t.parsedType}),s.INVALID}return(0,s.OK)(e.data)}}e.ZodNull=O,O.create=e=>new O({typeName:ue.ZodNull,...l(e)});class M extends p{constructor(){super(...arguments),this._any=!0}_parse(e){return(0,s.OK)(e.data)}}e.ZodAny=M,M.create=e=>new M({typeName:ue.ZodAny,...l(e)});class D extends p{constructor(){super(...arguments),this._unknown=!0}_parse(e){return(0,s.OK)(e.data)}}e.ZodUnknown=D,D.create=e=>new D({typeName:ue.ZodUnknown,...l(e)});class R extends p{_parse(e){const t=this._getOrReturnCtx(e);return(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.invalid_type,expected:r.ZodParsedType.never,received:t.parsedType}),s.INVALID}}e.ZodNever=R,R.create=e=>new R({typeName:ue.ZodNever,...l(e)});class j extends p{_parse(e){if(this._getType(e)!==r.ZodParsedType.undefined){const t=this._getOrReturnCtx(e);return(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.invalid_type,expected:r.ZodParsedType.void,received:t.parsedType}),s.INVALID}return(0,s.OK)(e.data)}}e.ZodVoid=j,j.create=e=>new j({typeName:ue.ZodVoid,...l(e)});class A extends p{_parse(e){const{ctx:t,status:n}=this._processInputParams(e),i=this._def;if(t.parsedType!==r.ZodParsedType.array)return(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.invalid_type,expected:r.ZodParsedType.array,received:t.parsedType}),s.INVALID;if(null!==i.exactLength){const e=t.data.length>i.exactLength.value,r=t.data.length<i.exactLength.value;(e||r)&&((0,s.addIssueToContext)(t,{code:e?a.ZodIssueCode.too_big:a.ZodIssueCode.too_small,minimum:r?i.exactLength.value:void 0,maximum:e?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),n.dirty())}if(null!==i.minLength&&t.data.length<i.minLength.value&&((0,s.addIssueToContext)(t,{code:a.ZodIssueCode.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),null!==i.maxLength&&t.data.length>i.maxLength.value&&((0,s.addIssueToContext)(t,{code:a.ZodIssueCode.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map(((e,n)=>i.type._parseAsync(new o(t,e,t.path,n))))).then((e=>s.ParseStatus.mergeArray(n,e)));const d=[...t.data].map(((e,n)=>i.type._parseSync(new o(t,e,t.path,n))));return s.ParseStatus.mergeArray(n,d)}get element(){return this._def.type}min(e,t){return new A({...this._def,minLength:{value:e,message:n.errorUtil.toString(t)}})}max(e,t){return new A({...this._def,maxLength:{value:e,message:n.errorUtil.toString(t)}})}length(e,t){return new A({...this._def,exactLength:{value:e,message:n.errorUtil.toString(t)}})}nonempty(e){return this.min(1,e)}}function z(e){if(e instanceof L){const t={};for(const n in e.shape){const s=e.shape[n];t[n]=se.create(z(s))}return new L({...e._def,shape:()=>t})}return e instanceof A?new A({...e._def,type:z(e.element)}):e instanceof se?se.create(z(e.unwrap())):e instanceof re?re.create(z(e.unwrap())):e instanceof q?q.create(e.items.map((e=>z(e)))):e}e.ZodArray=A,A.create=(e,t)=>new A({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ue.ZodArray,...l(t)});class L extends p{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=r.util.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==r.ZodParsedType.object){const t=this._getOrReturnCtx(e);return(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.invalid_type,expected:r.ZodParsedType.object,received:t.parsedType}),s.INVALID}const{status:t,ctx:n}=this._processInputParams(e),{shape:i,keys:d}=this._getCached(),c=[];if(!(this._def.catchall instanceof R&&"strip"===this._def.unknownKeys))for(const e in n.data)d.includes(e)||c.push(e);const u=[];for(const e of d){const t=i[e],s=n.data[e];u.push({key:{status:"valid",value:e},value:t._parse(new o(n,s,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof R){const e=this._def.unknownKeys;if("passthrough"===e)for(const e of c)u.push({key:{status:"valid",value:e},value:{status:"valid",value:n.data[e]}});else if("strict"===e)c.length>0&&((0,s.addIssueToContext)(n,{code:a.ZodIssueCode.unrecognized_keys,keys:c}),t.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of c){const s=n.data[t];u.push({key:{status:"valid",value:t},value:e._parse(new o(n,s,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then((async()=>{const e=[];for(const t of u){const n=await t.key;e.push({key:n,value:await t.value,alwaysSet:t.alwaysSet})}return e})).then((e=>s.ParseStatus.mergeObjectSync(t,e))):s.ParseStatus.mergeObjectSync(t,u)}get shape(){return this._def.shape()}strict(e){return n.errorUtil.errToObj,new L({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,s)=>{var r,a,i,o;const d=null!==(i=null===(a=(r=this._def).errorMap)||void 0===a?void 0:a.call(r,t,s).message)&&void 0!==i?i:s.defaultError;return"unrecognized_keys"===t.code?{message:null!==(o=n.errorUtil.errToObj(e).message)&&void 0!==o?o:d}:{message:d}}}:{}})}strip(){return new L({...this._def,unknownKeys:"strip"})}passthrough(){return new L({...this._def,unknownKeys:"passthrough"})}extend(e){return new L({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new L({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:ue.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new L({...this._def,catchall:e})}pick(e){const t={};return r.util.objectKeys(e).forEach((n=>{e[n]&&this.shape[n]&&(t[n]=this.shape[n])})),new L({...this._def,shape:()=>t})}omit(e){const t={};return r.util.objectKeys(this.shape).forEach((n=>{e[n]||(t[n]=this.shape[n])})),new L({...this._def,shape:()=>t})}deepPartial(){return z(this)}partial(e){const t={};return r.util.objectKeys(this.shape).forEach((n=>{const s=this.shape[n];e&&!e[n]?t[n]=s:t[n]=s.optional()})),new L({...this._def,shape:()=>t})}required(e){const t={};return r.util.objectKeys(this.shape).forEach((n=>{if(e&&!e[n])t[n]=this.shape[n];else{let e=this.shape[n];for(;e instanceof se;)e=e._def.innerType;t[n]=e}})),new L({...this._def,shape:()=>t})}keyof(){return Q(r.util.objectKeys(this.shape))}}e.ZodObject=L,L.create=(e,t)=>new L({shape:()=>e,unknownKeys:"strip",catchall:R.create(),typeName:ue.ZodObject,...l(t)}),L.strictCreate=(e,t)=>new L({shape:()=>e,unknownKeys:"strict",catchall:R.create(),typeName:ue.ZodObject,...l(t)}),L.lazycreate=(e,t)=>new L({shape:e,unknownKeys:"strip",catchall:R.create(),typeName:ue.ZodObject,...l(t)});class B extends p{_parse(e){const{ctx:t}=this._processInputParams(e),n=this._def.options;if(t.common.async)return Promise.all(n.map((async e=>{const n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}}))).then((function(e){for(const t of e)if("valid"===t.result.status)return t.result;for(const n of e)if("dirty"===n.result.status)return t.common.issues.push(...n.ctx.common.issues),n.result;const n=e.map((e=>new a.ZodError(e.ctx.common.issues)));return(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.invalid_union,unionErrors:n}),s.INVALID}));{let e;const r=[];for(const s of n){const n={...t,common:{...t.common,issues:[]},parent:null},a=s._parseSync({data:t.data,path:t.path,parent:n});if("valid"===a.status)return a;"dirty"!==a.status||e||(e={result:a,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const i=r.map((e=>new a.ZodError(e)));return(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.invalid_union,unionErrors:i}),s.INVALID}}get options(){return this._def.options}}e.ZodUnion=B,B.create=(e,t)=>new B({options:e,typeName:ue.ZodUnion,...l(t)});const V=e=>e instanceof G?V(e.schema):e instanceof ne?V(e.innerType()):e instanceof Y?[e.value]:e instanceof X?e.options:e instanceof ee?Object.keys(e.enum):e instanceof ae?V(e._def.innerType):e instanceof Z?[void 0]:e instanceof O?[null]:null;class U extends p{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==r.ZodParsedType.object)return(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.invalid_type,expected:r.ZodParsedType.object,received:t.parsedType}),s.INVALID;const n=this.discriminator,i=t.data[n],o=this.optionsMap.get(i);return o?t.common.async?o._parseAsync({data:t.data,path:t.path,parent:t}):o._parseSync({data:t.data,path:t.path,parent:t}):((0,s.addIssueToContext)(t,{code:a.ZodIssueCode.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),s.INVALID)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,n){const s=new Map;for(const n of t){const t=V(n.shape[e]);if(!t)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const r of t){if(s.has(r))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(r)}`);s.set(r,n)}}return new U({typeName:ue.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:s,...l(n)})}}function $(e,t){const n=(0,r.getParsedType)(e),s=(0,r.getParsedType)(t);if(e===t)return{valid:!0,data:e};if(n===r.ZodParsedType.object&&s===r.ZodParsedType.object){const n=r.util.objectKeys(t),s=r.util.objectKeys(e).filter((e=>-1!==n.indexOf(e))),a={...e,...t};for(const n of s){const s=$(e[n],t[n]);if(!s.valid)return{valid:!1};a[n]=s.data}return{valid:!0,data:a}}if(n===r.ZodParsedType.array&&s===r.ZodParsedType.array){if(e.length!==t.length)return{valid:!1};const n=[];for(let s=0;s<e.length;s++){const r=$(e[s],t[s]);if(!r.valid)return{valid:!1};n.push(r.data)}return{valid:!0,data:n}}return n===r.ZodParsedType.date&&s===r.ZodParsedType.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}e.ZodDiscriminatedUnion=U;class F extends p{_parse(e){const{status:t,ctx:n}=this._processInputParams(e),r=(e,r)=>{if((0,s.isAborted)(e)||(0,s.isAborted)(r))return s.INVALID;const i=$(e.value,r.value);return i.valid?(((0,s.isDirty)(e)||(0,s.isDirty)(r))&&t.dirty(),{status:t.value,value:i.data}):((0,s.addIssueToContext)(n,{code:a.ZodIssueCode.invalid_intersection_types}),s.INVALID)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then((([e,t])=>r(e,t))):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}e.ZodIntersection=F,F.create=(e,t,n)=>new F({left:e,right:t,typeName:ue.ZodIntersection,...l(n)});class q extends p{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==r.ZodParsedType.array)return(0,s.addIssueToContext)(n,{code:a.ZodIssueCode.invalid_type,expected:r.ZodParsedType.array,received:n.parsedType}),s.INVALID;if(n.data.length<this._def.items.length)return(0,s.addIssueToContext)(n,{code:a.ZodIssueCode.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),s.INVALID;!this._def.rest&&n.data.length>this._def.items.length&&((0,s.addIssueToContext)(n,{code:a.ZodIssueCode.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const i=[...n.data].map(((e,t)=>{const s=this._def.items[t]||this._def.rest;return s?s._parse(new o(n,e,n.path,t)):null})).filter((e=>!!e));return n.common.async?Promise.all(i).then((e=>s.ParseStatus.mergeArray(t,e))):s.ParseStatus.mergeArray(t,i)}get items(){return this._def.items}rest(e){return new q({...this._def,rest:e})}}e.ZodTuple=q,q.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new q({items:e,typeName:ue.ZodTuple,rest:null,...l(t)})};class W extends p{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==r.ZodParsedType.object)return(0,s.addIssueToContext)(n,{code:a.ZodIssueCode.invalid_type,expected:r.ZodParsedType.object,received:n.parsedType}),s.INVALID;const i=[],d=this._def.keyType,c=this._def.valueType;for(const e in n.data)i.push({key:d._parse(new o(n,e,n.path,e)),value:c._parse(new o(n,n.data[e],n.path,e))});return n.common.async?s.ParseStatus.mergeObjectAsync(t,i):s.ParseStatus.mergeObjectSync(t,i)}get element(){return this._def.valueType}static create(e,t,n){return new W(t instanceof p?{keyType:e,valueType:t,typeName:ue.ZodRecord,...l(n)}:{keyType:I.create(),valueType:e,typeName:ue.ZodRecord,...l(t)})}}e.ZodRecord=W;class K extends p{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==r.ZodParsedType.map)return(0,s.addIssueToContext)(n,{code:a.ZodIssueCode.invalid_type,expected:r.ZodParsedType.map,received:n.parsedType}),s.INVALID;const i=this._def.keyType,d=this._def.valueType,c=[...n.data.entries()].map((([e,t],s)=>({key:i._parse(new o(n,e,n.path,[s,"key"])),value:d._parse(new o(n,t,n.path,[s,"value"]))})));if(n.common.async){const e=new Map;return Promise.resolve().then((async()=>{for(const n of c){const r=await n.key,a=await n.value;if("aborted"===r.status||"aborted"===a.status)return s.INVALID;"dirty"!==r.status&&"dirty"!==a.status||t.dirty(),e.set(r.value,a.value)}return{status:t.value,value:e}}))}{const e=new Map;for(const n of c){const r=n.key,a=n.value;if("aborted"===r.status||"aborted"===a.status)return s.INVALID;"dirty"!==r.status&&"dirty"!==a.status||t.dirty(),e.set(r.value,a.value)}return{status:t.value,value:e}}}}e.ZodMap=K,K.create=(e,t,n)=>new K({valueType:t,keyType:e,typeName:ue.ZodMap,...l(n)});class J extends p{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==r.ZodParsedType.set)return(0,s.addIssueToContext)(n,{code:a.ZodIssueCode.invalid_type,expected:r.ZodParsedType.set,received:n.parsedType}),s.INVALID;const i=this._def;null!==i.minSize&&n.data.size<i.minSize.value&&((0,s.addIssueToContext)(n,{code:a.ZodIssueCode.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),t.dirty()),null!==i.maxSize&&n.data.size>i.maxSize.value&&((0,s.addIssueToContext)(n,{code:a.ZodIssueCode.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),t.dirty());const d=this._def.valueType;function c(e){const n=new Set;for(const r of e){if("aborted"===r.status)return s.INVALID;"dirty"===r.status&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}const u=[...n.data.values()].map(((e,t)=>d._parse(new o(n,e,n.path,t))));return n.common.async?Promise.all(u).then((e=>c(e))):c(u)}min(e,t){return new J({...this._def,minSize:{value:e,message:n.errorUtil.toString(t)}})}max(e,t){return new J({...this._def,maxSize:{value:e,message:n.errorUtil.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}e.ZodSet=J,J.create=(e,t)=>new J({valueType:e,minSize:null,maxSize:null,typeName:ue.ZodSet,...l(t)});class H extends p{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==r.ZodParsedType.function)return(0,s.addIssueToContext)(n,{code:a.ZodIssueCode.invalid_type,expected:r.ZodParsedType.function,received:n.parsedType}),s.INVALID;function i(e,r){return(0,s.makeIssue)({data:e,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,(0,t.getErrorMap)(),t.defaultErrorMap].filter((e=>!!e)),issueData:{code:a.ZodIssueCode.invalid_arguments,argumentsError:r}})}function o(e,r){return(0,s.makeIssue)({data:e,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,(0,t.getErrorMap)(),t.defaultErrorMap].filter((e=>!!e)),issueData:{code:a.ZodIssueCode.invalid_return_type,returnTypeError:r}})}const d={errorMap:n.common.contextualErrorMap},c=n.data;return this._def.returns instanceof te?(0,s.OK)((async(...e)=>{const t=new a.ZodError([]),n=await this._def.args.parseAsync(e,d).catch((n=>{throw t.addIssue(i(e,n)),t})),s=await c(...n);return await this._def.returns._def.type.parseAsync(s,d).catch((e=>{throw t.addIssue(o(s,e)),t}))})):(0,s.OK)(((...e)=>{const t=this._def.args.safeParse(e,d);if(!t.success)throw new a.ZodError([i(e,t.error)]);const n=c(...t.data),s=this._def.returns.safeParse(n,d);if(!s.success)throw new a.ZodError([o(n,s.error)]);return s.data}))}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new H({...this._def,args:q.create(e).rest(D.create())})}returns(e){return new H({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){return new H({args:e||q.create([]).rest(D.create()),returns:t||D.create(),typeName:ue.ZodFunction,...l(n)})}}e.ZodFunction=H;class G extends p{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}e.ZodLazy=G,G.create=(e,t)=>new G({getter:e,typeName:ue.ZodLazy,...l(t)});class Y extends p{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return(0,s.addIssueToContext)(t,{received:t.data,code:a.ZodIssueCode.invalid_literal,expected:this._def.value}),s.INVALID}return{status:"valid",value:e.data}}get value(){return this._def.value}}function Q(e,t){return new X({values:e,typeName:ue.ZodEnum,...l(t)})}e.ZodLiteral=Y,Y.create=(e,t)=>new Y({value:e,typeName:ue.ZodLiteral,...l(t)});class X extends p{_parse(e){if("string"!=typeof e.data){const t=this._getOrReturnCtx(e),n=this._def.values;return(0,s.addIssueToContext)(t,{expected:r.util.joinValues(n),received:t.parsedType,code:a.ZodIssueCode.invalid_type}),s.INVALID}if(-1===this._def.values.indexOf(e.data)){const t=this._getOrReturnCtx(e),n=this._def.values;return(0,s.addIssueToContext)(t,{received:t.data,code:a.ZodIssueCode.invalid_enum_value,options:n}),s.INVALID}return(0,s.OK)(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e){return X.create(e)}exclude(e){return X.create(this.options.filter((t=>!e.includes(t))))}}e.ZodEnum=X,X.create=Q;class ee extends p{_parse(e){const t=r.util.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==r.ZodParsedType.string&&n.parsedType!==r.ZodParsedType.number){const e=r.util.objectValues(t);return(0,s.addIssueToContext)(n,{expected:r.util.joinValues(e),received:n.parsedType,code:a.ZodIssueCode.invalid_type}),s.INVALID}if(-1===t.indexOf(e.data)){const e=r.util.objectValues(t);return(0,s.addIssueToContext)(n,{received:n.data,code:a.ZodIssueCode.invalid_enum_value,options:e}),s.INVALID}return(0,s.OK)(e.data)}get enum(){return this._def.values}}e.ZodNativeEnum=ee,ee.create=(e,t)=>new ee({values:e,typeName:ue.ZodNativeEnum,...l(t)});class te extends p{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==r.ZodParsedType.promise&&!1===t.common.async)return(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.invalid_type,expected:r.ZodParsedType.promise,received:t.parsedType}),s.INVALID;const n=t.parsedType===r.ZodParsedType.promise?t.data:Promise.resolve(t.data);return(0,s.OK)(n.then((e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap}))))}}e.ZodPromise=te,te.create=(e,t)=>new te({type:e,typeName:ue.ZodPromise,...l(t)});class ne extends p{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ue.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:n}=this._processInputParams(e),a=this._def.effect||null;if("preprocess"===a.type){const e=a.transform(n.data);return n.common.async?Promise.resolve(e).then((e=>this._def.schema._parseAsync({data:e,path:n.path,parent:n}))):this._def.schema._parseSync({data:e,path:n.path,parent:n})}const i={addIssue:e=>{(0,s.addIssueToContext)(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),"refinement"===a.type){const e=e=>{const t=a.refinement(e,i);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===n.common.async){const r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===r.status?s.INVALID:("dirty"===r.status&&t.dirty(),e(r.value),{status:t.value,value:r.value})}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then((n=>"aborted"===n.status?s.INVALID:("dirty"===n.status&&t.dirty(),e(n.value).then((()=>({status:t.value,value:n.value}))))))}if("transform"===a.type){if(!1===n.common.async){const e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!(0,s.isValid)(e))return e;const r=a.transform(e.value,i);if(r instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:r}}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then((e=>(0,s.isValid)(e)?Promise.resolve(a.transform(e.value,i)).then((e=>({status:t.value,value:e}))):e))}r.util.assertNever(a)}}e.ZodEffects=ne,e.ZodTransformer=ne,ne.create=(e,t,n)=>new ne({schema:e,typeName:ue.ZodEffects,effect:t,...l(n)}),ne.createWithPreprocess=(e,t,n)=>new ne({schema:t,effect:{type:"preprocess",transform:e},typeName:ue.ZodEffects,...l(n)});class se extends p{_parse(e){return this._getType(e)===r.ZodParsedType.undefined?(0,s.OK)(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}e.ZodOptional=se,se.create=(e,t)=>new se({innerType:e,typeName:ue.ZodOptional,...l(t)});class re extends p{_parse(e){return this._getType(e)===r.ZodParsedType.null?(0,s.OK)(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}e.ZodNullable=re,re.create=(e,t)=>new re({innerType:e,typeName:ue.ZodNullable,...l(t)});class ae extends p{_parse(e){const{ctx:t}=this._processInputParams(e);let n=t.data;return t.parsedType===r.ZodParsedType.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}e.ZodDefault=ae,ae.create=(e,t)=>new ae({innerType:e,typeName:ue.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...l(t)});class ie extends p{_parse(e){const{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return(0,s.isAsync)(r)?r.then((e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new a.ZodError(n.common.issues)},input:n.data})}))):{status:"valid",value:"valid"===r.status?r.value:this._def.catchValue({get error(){return new a.ZodError(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}e.ZodCatch=ie,ie.create=(e,t)=>new ie({innerType:e,typeName:ue.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...l(t)});class oe extends p{_parse(e){if(this._getType(e)!==r.ZodParsedType.nan){const t=this._getOrReturnCtx(e);return(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.invalid_type,expected:r.ZodParsedType.nan,received:t.parsedType}),s.INVALID}return{status:"valid",value:e.data}}}e.ZodNaN=oe,oe.create=e=>new oe({typeName:ue.ZodNaN,...l(e)}),e.BRAND=Symbol("zod_brand");class de extends p{_parse(e){const{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}}e.ZodBranded=de;class ce extends p{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.common.async){return(async()=>{const e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?s.INVALID:"dirty"===e.status?(t.dirty(),(0,s.DIRTY)(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})()}{const e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?s.INVALID:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(e,t){return new ce({in:e,out:t,typeName:ue.ZodPipeline})}}e.ZodPipeline=ce;var ue;e.custom=(e,t={},n)=>e?M.create().superRefine(((s,r)=>{var a,i;if(!e(s)){const e="function"==typeof t?t(s):"string"==typeof t?{message:t}:t,o=null===(i=null!==(a=e.fatal)&&void 0!==a?a:n)||void 0===i||i,d="string"==typeof e?{message:e}:e;r.addIssue({code:"custom",...d,fatal:o})}})):M.create(),e.late={object:L.lazycreate},function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline"}(ue=e.ZodFirstPartyTypeKind||(e.ZodFirstPartyTypeKind={}));e.instanceof=(t,n={message:`Input not instance of ${t.name}`})=>(0,e.custom)((e=>e instanceof t),n);const le=I.create;e.string=le;const pe=T.create;e.number=pe;const he=oe.create;e.nan=he;const me=E.create;e.bigint=me;const ge=P.create;e.boolean=ge;const fe=k.create;e.date=fe;const ve=N.create;e.symbol=ve;const ye=Z.create;e.undefined=ye;const be=O.create;e.null=be;const xe=M.create;e.any=xe;const Ce=D.create;e.unknown=Ce;const we=R.create;e.never=we;const _e=j.create;e.void=_e;const Ie=A.create;e.array=Ie;const Se=L.create;e.object=Se;const Te=L.strictCreate;e.strictObject=Te;const Ee=B.create;e.union=Ee;const Pe=U.create;e.discriminatedUnion=Pe;const ke=F.create;e.intersection=ke;const Ne=q.create;e.tuple=Ne;const Ze=W.create;e.record=Ze;const Oe=K.create;e.map=Oe;const Me=J.create;e.set=Me;const De=H.create;e.function=De;const Re=G.create;e.lazy=Re;const je=Y.create;e.literal=je;const Ae=X.create;e.enum=Ae;const ze=ee.create;e.nativeEnum=ze;const Le=te.create;e.promise=Le;const Be=ne.create;e.effect=Be,e.transformer=Be;const Ve=se.create;e.optional=Ve;const Ue=re.create;e.nullable=Ue;const $e=ne.createWithPreprocess;e.preprocess=$e;const Fe=ce.create;e.pipeline=Fe;e.ostring=()=>le().optional();e.onumber=()=>pe().optional();e.oboolean=()=>ge().optional(),e.coerce={string:e=>I.create({...e,coerce:!0}),number:e=>T.create({...e,coerce:!0}),boolean:e=>P.create({...e,coerce:!0}),bigint:e=>E.create({...e,coerce:!0}),date:e=>k.create({...e,coerce:!0})},e.NEVER=s.INVALID}(x),function(t){var n=e&&e.__createBinding||(Object.create?function(e,t,n,s){void 0===s&&(s=n),Object.defineProperty(e,s,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,s){void 0===s&&(s=n),e[s]=t[n]}),s=e&&e.__exportStar||function(e,t){for(var s in e)"default"===s||Object.prototype.hasOwnProperty.call(t,s)||n(t,e,s)};Object.defineProperty(t,"__esModule",{value:!0}),s(i,t),s(v,t),s(y,t),s(d,t),s(x,t),s(c,t)}(a),function(t){var n=e&&e.__createBinding||(Object.create?function(e,t,n,s){void 0===s&&(s=n),Object.defineProperty(e,s,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,s){void 0===s&&(s=n),e[s]=t[n]}),s=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return s(t,e),t},i=e&&e.__exportStar||function(e,t){for(var s in e)"default"===s||Object.prototype.hasOwnProperty.call(t,s)||n(t,e,s)};Object.defineProperty(t,"__esModule",{value:!0}),t.z=void 0;const o=r(a);t.z=o,i(a,t),t.default=o}(r);var w={};!function(e){var t,n,s,r,a,i;Object.defineProperty(e,"__esModule",{value:!0}),e.CDP=e.Network=e.Log=e.BrowsingContext=e.Script=e.Message=void 0,function(e){let t;!function(e){e.InvalidArgument="invalid argument",e.InvalidSessionId="invalid session id",e.NoSuchAlert="no such alert",e.NoSuchFrame="no such frame",e.NoSuchHandle="no such handle",e.NoSuchNode="no such node",e.NoSuchScript="no such script",e.SessionNotCreated="session not created",e.UnknownCommand="unknown command",e.UnknownError="unknown error",e.UnsupportedOperation="unsupported operation"}(t=e.ErrorCode||(e.ErrorCode={}));class n{error;message;stacktrace;constructor(e,t,n){this.error=e,this.message=t,this.stacktrace=n}toErrorResponse(e){return{id:e,error:this.error,message:this.message,stacktrace:this.stacktrace}}}e.ErrorResponse=n;e.InvalidArgumentException=class extends n{constructor(e,n){super(t.InvalidArgument,e,n)}};e.NoSuchHandleException=class extends n{constructor(e,n){super(t.NoSuchHandle,e,n)}};e.InvalidSessionIdException=class extends n{constructor(e,n){super(t.InvalidSessionId,e,n)}};e.NoSuchAlertException=class extends n{constructor(e,n){super(t.NoSuchAlert,e,n)}};e.NoSuchFrameException=class extends n{constructor(e){super(t.NoSuchFrame,e)}};e.NoSuchNodeException=class extends n{constructor(e,n){super(t.NoSuchNode,e,n)}};e.NoSuchScriptException=class extends n{constructor(e,n){super(t.NoSuchScript,e,n)}};e.SessionNotCreatedException=class extends n{constructor(e,n){super(t.SessionNotCreated,e,n)}};e.UnknownCommandException=class extends n{constructor(e,n){super(t.UnknownCommand,e,n)}};e.UnknownErrorException=class extends n{constructor(e,n){super(t.UnknownError,e,n)}};e.UnsupportedOperationException=class extends n{constructor(e,n){super(t.UnsupportedOperation,e,n)}}}(e.Message||(e.Message={})),((t=e.Script||(e.Script={})).EventNames||(t.EventNames={})).MessageEvent="script.message",t.AllEvents="script",n=e.BrowsingContext||(e.BrowsingContext={}),(s=n.EventNames||(n.EventNames={})).LoadEvent="browsingContext.load",s.DomContentLoadedEvent="browsingContext.domContentLoaded",s.ContextCreatedEvent="browsingContext.contextCreated",s.ContextDestroyedEvent="browsingContext.contextDestroyed",n.AllEvents="browsingContext",(r=e.Log||(e.Log={})).AllEvents="log",function(e){e.LogEntryAddedEvent="log.entryAdded"}(r.EventNames||(r.EventNames={})),(a=e.Network||(e.Network={})).AllEvents="network",function(e){e.BeforeRequestSentEvent="network.beforeRequestSent",e.ResponseCompletedEvent="network.responseCompleted",e.FetchErrorEvent="network.fetchError"}(a.EventNames||(a.EventNames={})),(i=e.CDP||(e.CDP={})).AllEvents="cdp",function(e){e.EventReceivedEvent="cdp.eventReceived"}(i.EventNames||(i.EventNames={}))}(w),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Session=e.CDP=e.BrowsingContext=e.Script=e.CommonDataTypes=e.parseObject=void 0;const t=r,n=w;function s(e,t){const s=t.safeParse(e);if(s.success)return s.data;const r=s.error.errors.map((e=>`${e.message} in ${e.path.map((e=>JSON.stringify(e))).join("/")}.`)).join(" ");throw new n.Message.InvalidArgumentException(r)}var a;e.parseObject=s,function(e){e.SharedReferenceSchema=t.z.object({sharedId:t.z.string().min(1),handle:t.z.string().optional()}),e.RemoteReferenceSchema=t.z.object({handle:t.z.string().min(1)});const n=t.z.object({type:t.z.literal("undefined")}),s=t.z.object({type:t.z.literal("null")}),r=t.z.object({type:t.z.literal("string"),value:t.z.string()}),a=t.z.enum(["NaN","-0","Infinity","-Infinity"]),i=t.z.object({type:t.z.literal("number"),value:t.z.union([a,t.z.number()])}),o=t.z.object({type:t.z.literal("boolean"),value:t.z.boolean()}),d=t.z.object({type:t.z.literal("bigint"),value:t.z.string()}),c=t.z.union([n,s,r,i,o,d]);e.LocalValueSchema=t.z.lazy((()=>t.z.union([c,p,h,g,f,v,y])));const u=t.z.union([e.SharedReferenceSchema,e.RemoteReferenceSchema,e.LocalValueSchema]),l=t.z.array(u),p=t.z.object({type:t.z.literal("array"),value:l}),h=t.z.object({type:t.z.literal("date"),value:t.z.string().min(1)}),m=t.z.tuple([t.z.union([t.z.string(),u]),u]),g=t.z.object({type:t.z.literal("map"),value:t.z.array(m)}),f=t.z.object({type:t.z.literal("object"),value:t.z.array(m)}),v=t.z.object({type:t.z.literal("regexp"),value:t.z.object({pattern:t.z.string(),flags:t.z.string().optional()})}),y=t.z.lazy((()=>t.z.object({type:t.z.literal("set"),value:l})));e.BrowsingContextSchema=t.z.string(),e.MaxDepthSchema=t.z.number().int().nonnegative().max(9007199254740991)}(a=e.CommonDataTypes||(e.CommonDataTypes={})),function(e){const n=t.z.enum(["window","dedicated-worker","shared-worker","service-worker","worker","paint-worklet","audio-worklet","worklet"]);e.GetRealmsParametersSchema=t.z.object({context:a.BrowsingContextSchema.optional(),type:n.optional()}),e.parseGetRealmsParams=function(t){return s(t,e.GetRealmsParametersSchema)};const r=t.z.object({context:a.BrowsingContextSchema,sandbox:t.z.string().optional()}),i=t.z.object({realm:t.z.string().min(1)}),o=t.z.union([i,r]),d=t.z.enum(["root","none"]),c=t.z.object({expression:t.z.string(),awaitPromise:t.z.boolean(),target:o,resultOwnership:d.optional()});e.parseEvaluateParams=function(e){return s(e,c)};const u=t.z.object({target:o,handles:t.z.array(t.z.string())});e.parseDisownParams=function(e){return s(e,u)};const l=t.z.string(),p=t.z.object({channel:l,maxDepth:t.z.number().int().min(1).max(1).optional(),ownership:d.optional()});e.ChannelValueSchema=t.z.object({type:t.z.literal("channel"),value:p}),e.PreloadScriptSchema=t.z.string(),e.AddPreloadScriptParametersSchema=t.z.object({functionDeclaration:t.z.string(),arguments:t.z.array(e.ChannelValueSchema).optional(),sandbox:t.z.string().optional(),context:a.BrowsingContextSchema.optional()}),e.parseAddPreloadScriptParams=function(t){return s(t,e.AddPreloadScriptParametersSchema)},e.RemovePreloadScriptParametersSchema=t.z.object({script:e.PreloadScriptSchema}),e.parseRemovePreloadScriptParams=function(t){return s(t,e.RemovePreloadScriptParametersSchema)};const h=t.z.union([a.RemoteReferenceSchema,a.SharedReferenceSchema,a.LocalValueSchema,e.ChannelValueSchema]),m=t.z.object({functionDeclaration:t.z.string(),target:o,arguments:t.z.array(h).optional(),this:h.optional(),awaitPromise:t.z.boolean(),resultOwnership:d.optional()});e.parseCallFunctionParams=function(e){return s(e,m)}}(e.Script||(e.Script={})),function(e){const n=t.z.object({maxDepth:a.MaxDepthSchema.optional(),root:a.BrowsingContextSchema.optional()});e.parseGetTreeParams=function(e){return s(e,n)};const r=t.z.enum(["none","interactive","complete"]),i=t.z.object({context:a.BrowsingContextSchema,url:t.z.string().url(),wait:r.optional()});e.parseNavigateParams=function(e){return s(e,i)};const o=t.z.object({type:t.z.enum(["tab","window"]),referenceContext:a.BrowsingContextSchema.optional()});e.parseCreateParams=function(e){return s(e,o)};const d=t.z.object({context:a.BrowsingContextSchema});e.parseCloseParams=function(e){return s(e,d)};const c=t.z.object({context:a.BrowsingContextSchema});e.parseCaptureScreenshotParams=function(e){return s(e,c)};const u=t.z.object({height:t.z.number().min(0).default(27.94).optional(),width:t.z.number().min(0).default(21.59).optional()}),l=t.z.object({bottom:t.z.number().min(0).default(1).optional(),left:t.z.number().min(0).default(1).optional(),right:t.z.number().min(0).default(1).optional(),top:t.z.number().min(0).default(1).optional()}),p=t.z.array(t.z.union([t.z.string().min(1),t.z.number().int().nonnegative()])).refine((e=>e.every((e=>{const t=String(e).match(/^(?:(?:\d+)|(?:\d+[-])|(?:[-]\d+)|(?:(?<start>\d+)[-](?<end>\d+)))$/),{start:n,end:s}=t?.groups??{};return!(n&&s&&Number(n)>Number(s))&&t})))),h=t.z.object({context:a.BrowsingContextSchema,background:t.z.boolean().default(!1).optional(),margin:l.optional(),orientation:t.z.enum(["portrait","landscape"]).default("portrait").optional(),page:u.optional(),pageRanges:p.default([]).optional(),scale:t.z.number().min(.1).max(2).default(1).optional(),shrinkToFit:t.z.boolean().default(!0).optional()});e.parsePrintParams=function(e){return s(e,h)}}(e.BrowsingContext||(e.BrowsingContext={})),function(e){const n=t.z.object({cdpMethod:t.z.string(),cdpParams:t.z.object({}).passthrough(),cdpSession:t.z.string().optional()});e.parseSendCommandParams=function(e){return s(e,n)};const r=t.z.object({context:a.BrowsingContextSchema});e.parseGetSessionParams=function(e){return s(e,r)}}(e.CDP||(e.CDP={})),function(e){const r=t.z.enum([n.BrowsingContext.AllEvents,...Object.values(n.BrowsingContext.EventNames),n.Log.AllEvents,...Object.values(n.Log.EventNames),n.CDP.AllEvents,...Object.values(n.CDP.EventNames),n.Network.AllEvents,...Object.values(n.Network.EventNames),n.Script.AllEvents,...Object.values(n.Script.EventNames)]),i=t.z.object({events:t.z.array(r),contexts:t.z.array(a.BrowsingContextSchema).optional()});e.parseSubscribeParams=function(e){return s(e,i)}}(e.Session||(e.Session={}))}(s);var _={},I={},S=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(I,"__esModule",{value:!0}),I.EventEmitter=void 0;const T=S((function(e){return{all:e=e||new Map,on:function(t,n){var s=e.get(t);s?s.push(n):e.set(t,[n])},off:function(t,n){var s=e.get(t);s&&(n?s.splice(s.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var s=e.get(t);s&&s.slice().map((function(e){e(n)})),(s=e.get("*"))&&s.slice().map((function(e){e(t,n)}))}}}));I.EventEmitter=class{#e=(0,T.default)();on(e,t){return this.#e.on(e,t),this}once(e,t){const n=s=>{t(s),this.off(e,n)};return this.on(e,n)}off(e,t){return this.#e.off(e,t),this}emit(e,t){this.#e.emit(e,t)}};var E={},P={};!function(e){var t;Object.defineProperty(e,"__esModule",{value:!0}),e.LogType=void 0,(t=e.LogType||(e.LogType={})).bidi="BiDi Messages",t.browsingContexts="Browsing Contexts",t.cdp="CDP",t.system="System"}(P),Object.defineProperty(E,"__esModule",{value:!0}),E.ProcessingQueue=void 0;const k=P;E.ProcessingQueue=class{#t;#n;#s;#r=[];#a=!1;constructor(e,t=(()=>Promise.resolve()),n){this.#t=t,this.#s=e,this.#n=n}add(e){this.#r.push(e),this.#i()}async#i(){if(!this.#a){for(this.#a=!0;this.#r.length>0;){const e=this.#r.shift();void 0!==e&&await e.then((e=>this.#s(e))).catch((e=>{this.#n?.(k.LogType.system,"Event was not processed:",e),this.#t(e)}))}this.#a=!1}}};var N={},Z={},O={},M={};Object.defineProperty(M,"__esModule",{value:!0}),M.inchesFromCm=void 0,M.inchesFromCm=function(e){return e/2.54};var D={};Object.defineProperty(D,"__esModule",{value:!0}),D.Deferred=void 0;class R{#o=!1;#d;#c=()=>{};#u=()=>{};get isFinished(){return this.#o}constructor(){this.#d=new Promise(((e,t)=>{this.#c=e,this.#u=t})),this.#d.catch((()=>{}))}then(e,t){return this.#d.then(e,t)}catch(e){return this.#d.catch(e)}resolve(e){this.#o=!0,this.#c(e)}reject(e){this.#o=!0,this.#u(e)}finally(e){return this.#d.finally(e)}[Symbol.toStringTag]="Promise"}D.Deferred=R;var j={},A={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ScriptEvaluator=e.SHARED_ID_DIVIDER=void 0;const t=w;e.SHARED_ID_DIVIDER="_element_";class n{#l;constructor(e){this.#l=e}static async stringifyObject(e,t){return(await t.cdpClient.sendCommand("Runtime.callFunctionOn",{functionDeclaration:String((e=>String(e))),awaitPromise:!1,arguments:[e],returnByValue:!0,executionContextId:t.executionContextId})).result.value}async serializeCdpObject(e,t,s){const r=n.#p(e),a=await s.cdpClient.sendCommand("Runtime.callFunctionOn",{functionDeclaration:String((e=>e)),awaitPromise:!1,arguments:[r],generateWebDriverValue:!0,executionContextId:s.executionContextId});return s.cdpToBidiValue(a,t)}async scriptEvaluate(e,t,n,s){const r=await e.cdpClient.sendCommand("Runtime.evaluate",{contextId:e.executionContextId,expression:t,awaitPromise:n,generateWebDriverValue:!0});return r.exceptionDetails?{exceptionDetails:await this.#h(r.exceptionDetails,0,s,e),type:"exception",realm:e.realmId}:{type:"success",result:e.cdpToBidiValue(r,s),realm:e.realmId}}async callFunction(e,n,s,r,a,i){const o=`(...args)=>{ return _callFunction((\n${n}\n), args);\n function _callFunction(f, args) {\n const deserializedThis = args.shift();\n const deserializedArgs = args;\n return f.apply(deserializedThis, deserializedArgs);\n }}`,d=[await this.#m(s,e)];let c;d.push(...await Promise.all(r.map((async t=>this.#m(t,e)))));try{c=await e.cdpClient.sendCommand("Runtime.callFunctionOn",{functionDeclaration:o,awaitPromise:a,arguments:d,generateWebDriverValue:!0,executionContextId:e.executionContextId})}catch(e){if(-32e3===e.code&&["Could not find object with given id","Argument should belong to the same JavaScript world as target object","Invalid remote object id"].includes(e.message))throw new t.Message.NoSuchHandleException("Handle was not found.");throw e}return c.exceptionDetails?{exceptionDetails:await this.#h(c.exceptionDetails,1,i,e),type:"exception",realm:e.realmId}:{type:"success",result:e.cdpToBidiValue(c,i),realm:e.realmId}}static#p(e){return void 0!==e.objectId?{objectId:e.objectId}:void 0!==e.unserializableValue?{unserializableValue:e.unserializableValue}:{value:e.value}}async#m(n,s){if("sharedId"in n){const[r,a]=n.sharedId.split(e.SHARED_ID_DIVIDER),i=parseInt(a??"");if(isNaN(i)||void 0===i||void 0===r)throw new t.Message.InvalidArgumentException(`SharedId "${n.sharedId}" should have format "{navigableId}${e.SHARED_ID_DIVIDER}{backendNodeId}".`);if(s.navigableId!==r)throw new t.Message.NoSuchNodeException(`SharedId "${n.sharedId}" belongs to different document. Current document is ${s.navigableId}.`);try{return{objectId:(await s.cdpClient.sendCommand("DOM.resolveNode",{backendNodeId:i,executionContextId:s.executionContextId})).object.objectId}}catch(e){if(-32e3===e.code&&"No node with given id found"===e.message)throw new t.Message.NoSuchNodeException(`SharedId "${n.sharedId}" was not found.`);throw e}}if("handle"in n)return{objectId:n.handle};switch(n.type){case"undefined":return{unserializableValue:"undefined"};case"null":return{unserializableValue:"null"};case"string":return{value:n.value};case"number":return"NaN"===n.value?{unserializableValue:"NaN"}:"-0"===n.value?{unserializableValue:"-0"}:"Infinity"===n.value?{unserializableValue:"Infinity"}:"-Infinity"===n.value?{unserializableValue:"-Infinity"}:{value:n.value};case"boolean":return{value:Boolean(n.value)};case"bigint":return{unserializableValue:`BigInt(${JSON.stringify(n.value)})`};case"date":return{unserializableValue:`new Date(Date.parse(${JSON.stringify(n.value)}))`};case"regexp":return{unserializableValue:`new RegExp(${JSON.stringify(n.value.pattern)}, ${JSON.stringify(n.value.flags)})`};case"map":{const e=await this.#g(n.value,s),t=await s.cdpClient.sendCommand("Runtime.callFunctionOn",{functionDeclaration:String(((...e)=>{const t=new Map;for(let n=0;n<e.length;n+=2)t.set(e[n],e[n+1]);return t})),awaitPromise:!1,arguments:e,returnByValue:!1,executionContextId:s.executionContextId});return{objectId:t.result.objectId}}case"object":{const e=await this.#g(n.value,s),t=await s.cdpClient.sendCommand("Runtime.callFunctionOn",{functionDeclaration:String(((...e)=>{const t={};for(let n=0;n<e.length;n+=2){t[e[n]]=e[n+1]}return t})),awaitPromise:!1,arguments:e,returnByValue:!1,executionContextId:s.executionContextId});return{objectId:t.result.objectId}}case"array":{const e=await this.#f(n.value,s);return{objectId:(await s.cdpClient.sendCommand("Runtime.callFunctionOn",{functionDeclaration:String(((...e)=>e)),awaitPromise:!1,arguments:e,returnByValue:!1,executionContextId:s.executionContextId})).result.objectId}}case"set":{const e=await this.#f(n.value,s);return{objectId:(await s.cdpClient.sendCommand("Runtime.callFunctionOn",{functionDeclaration:String(((...e)=>new Set(e))),awaitPromise:!1,arguments:e,returnByValue:!1,executionContextId:s.executionContextId})).result.objectId}}case"channel":{const e=(await s.cdpClient.sendCommand("Runtime.callFunctionOn",{functionDeclaration:String((()=>{const e=[];let t=null;return{async getMessage(){const n=e.length>0?Promise.resolve():new Promise((e=>{t=e}));return await n,e.shift()},sendMessage(n){e.push(n),null!==t&&(t(),t=null)}}})),returnByValue:!1,executionContextId:s.executionContextId,generateWebDriverValue:!1})).result.objectId;this.#v(n,e,s);return{objectId:(await s.cdpClient.sendCommand("Runtime.callFunctionOn",{functionDeclaration:String((e=>e.sendMessage)),arguments:[{objectId:e}],returnByValue:!1,executionContextId:s.executionContextId,generateWebDriverValue:!1})).result.objectId}}default:throw new Error(`Value ${JSON.stringify(n)} is not deserializable.`)}}async#g(e,t){const n=[];for(const[s,r]of e){let e;e="string"==typeof s?{value:s}:await this.#m(s,t);const a=await this.#m(r,t);n.push(e),n.push(a)}return n}async#f(e,t){return Promise.all(e.map((e=>this.#m(e,t))))}async#v(e,n,s){const r=e.value.channel;for(;;){const a=await s.cdpClient.sendCommand("Runtime.callFunctionOn",{functionDeclaration:String((async e=>e.getMessage())),arguments:[{objectId:n}],awaitPromise:!0,executionContextId:s.executionContextId,generateWebDriverValue:!0});this.#l.registerEvent({method:t.Script.EventNames.MessageEvent,params:{channel:r,data:s.cdpToBidiValue(a,e.value.ownership??"none"),source:{realm:s.realmId,context:s.browsingContextId}}},s.browsingContextId)}}async#h(e,t,s,r){const a=e.stackTrace?.callFrames.map((e=>({url:e.url,functionName:e.functionName,lineNumber:e.lineNumber-t,columnNumber:e.columnNumber}))),i=await this.serializeCdpObject(e.exception,s,r),o=await n.stringifyObject(e.exception,r);return{exception:i,columnNumber:e.columnNumber,lineNumber:e.lineNumber-t,stackTrace:{callFrames:a||[]},text:o||e.text}}}e.ScriptEvaluator=n}(A),Object.defineProperty(j,"__esModule",{value:!0}),j.Realm=void 0;const z=A;j.Realm=class{#y;#b;#x;#C;#w;#_;#I;#S;#l;#T;sandbox;cdpSessionId;constructor(e,t,n,s,r,a,i,o,d,c,u){this.#x=n,this.#C=s,this.#w=r,this.sandbox=o,this.#_=a,this.#I=i,this.cdpSessionId=d,this.#S=c,this.#y=e,this.#b=t,this.#l=u,this.#T=new z.ScriptEvaluator(this.#l),this.#y.realmMap.set(this.#x,this)}async disown(e){if(this.#y.knownHandlesToRealm.get(e)===this.realmId){try{await this.cdpClient.sendCommand("Runtime.releaseObject",{objectId:e})}catch(e){if(-32e3!==e.code||"Invalid remote object id"!==e.message)throw e}this.#y.knownHandlesToRealm.delete(e)}}cdpToBidiValue(e,t){const n=e.result.webDriverValue,s=this.webDriverValueToBiDi(n);if(e.result.objectId){const n=e.result.objectId;"root"===t?(s.handle=n,this.#y.knownHandlesToRealm.set(n,this.realmId)):this.cdpClient.sendCommand("Runtime.releaseObject",{objectId:n})}return s}webDriverValueToBiDi(e){const t=e;if("platformobject"===t.type)return{type:"object"};const n=t.value;if(void 0===n)return t;if("node"===t.type&&(Object.hasOwn(n,"backendNodeId")&&(t.sharedId=`${this.navigableId}${z.SHARED_ID_DIVIDER}${n.backendNodeId}`,delete n.backendNodeId),Object.hasOwn(n,"children")))for(const e in n.children)n.children[e]=this.webDriverValueToBiDi(n.children[e]);if(["array","set"].includes(e.type))for(const e in n)n[e]=this.webDriverValueToBiDi(n[e]);if(["object","map"].includes(e.type))for(const e in n)n[e]=[this.webDriverValueToBiDi(n[e][0]),this.webDriverValueToBiDi(n[e][1])];return t}toBiDi(){return{realm:this.realmId,origin:this.origin,type:this.type,context:this.browsingContextId,...void 0===this.sandbox?{}:{sandbox:this.sandbox}}}get realmId(){return this.#x}get navigableId(){return this.#b.findContext(this.#C)?.navigableId??"UNKNOWN"}get browsingContextId(){return this.#C}get executionContextId(){return this.#w}get origin(){return this.#_}get type(){return this.#I}get cdpClient(){return this.#S}async callFunction(e,t,n,s,r){const a=this.#b.getContext(this.browsingContextId);return await a.awaitUnblocked(),{result:await this.#T.callFunction(this,e,t,n,s,r)}}async scriptEvaluate(e,t,n){const s=this.#b.getContext(this.browsingContextId);return await s.awaitUnblocked(),{result:await this.#T.scriptEvaluate(this,e,t,n)}}async serializeCdpObject(e,t){return this.#T.serializeCdpObject(e,t,this)}async stringifyObject(e){return z.ScriptEvaluator.stringifyObject(e,this)}},Object.defineProperty(O,"__esModule",{value:!0}),O.BrowsingContextImpl=void 0;const L=M,B=w,V=P,U=D,$=j;class F{#E;#P;#k=new Set;#b;#N={documentInitialized:new U.Deferred,Page:{navigatedWithinDocument:new U.Deferred,lifecycleEvent:{DOMContentLoaded:new U.Deferred,load:new U.Deferred}}};#Z="about:blank";#l;#y;#O=null;#M;#D;#n;constructor(e,t,n,s,r,a,i){this.#M=e,this.#y=t,this.#E=n,this.#P=s,this.#l=r,this.#b=a,this.#n=i}static create(e,t,n,s,r,a,i){const o=new F(e,t,n,s,r,a,i);return o.#R(),a.addContext(o),o.isTopLevelContext()||o.parent.addChild(o.id),r.registerEvent({method:B.BrowsingContext.EventNames.ContextCreatedEvent,params:o.serializeToBidiValue()},o.id),o}get navigableId(){return this.#O}delete(){this.#j(),this.#y.deleteRealms({browsingContextId:this.id}),this.isTopLevelContext()||this.parent.#k.delete(this.id),this.#l.registerEvent({method:B.BrowsingContext.EventNames.ContextDestroyedEvent,params:this.serializeToBidiValue()},this.id),this.#b.deleteContextById(this.id)}get id(){return this.#E}get parentId(){return this.#P}get parent(){return null===this.parentId?null:this.#b.getContext(this.parentId)}get directChildren(){return[...this.#k].map((e=>this.#b.getContext(e)))}get allChildren(){const e=this.directChildren;return e.concat(...e.map((e=>e.allChildren)))}isTopLevelContext(){return null===this.#P}addChild(e){this.#k.add(e)}#j(){this.directChildren.map((e=>e.delete()))}get#A(){if(void 0===this.#D)throw new Error(`No default realm for browsing context ${this.#E}`);return this.#D}get cdpTarget(){return this.#M}updateCdpTarget(e){this.#M=e,this.#R()}get url(){return this.#Z}async awaitLoaded(){await this.#N.Page.lifecycleEvent.load}awaitUnblocked(){return this.#M.targetUnblocked}async getOrCreateSandbox(e){if(void 0===e||""===e)return this.#A;let t=this.#y.findRealms({browsingContextId:this.id,sandbox:e});if(0===t.length&&(await this.#M.cdpClient.sendCommand("Page.createIsolatedWorld",{frameId:this.id,worldName:e}),t=this.#y.findRealms({browsingContextId:this.id,sandbox:e})),1!==t.length)throw Error(`Sandbox ${e} wasn't created.`);return t[0]}serializeToBidiValue(e=0,t=!0){return{context:this.#E,url:this.url,children:e>0?this.directChildren.map((t=>t.serializeToBidiValue(e-1,!1))):null,...t?{parent:this.#P}:{}}}#R(){this.#M.cdpClient.on("Target.targetInfoChanged",(e=>{this.id===e.targetInfo.targetId&&(this.#Z=e.targetInfo.url)})),this.#M.cdpClient.on("Page.frameNavigated",(e=>{this.id===e.frame.id&&(this.#Z=e.frame.url+(e.frame.urlFragment??""),this.#j())})),this.#M.cdpClient.on("Page.navigatedWithinDocument",(e=>{this.id===e.frameId&&(this.#Z=e.url,this.#N.Page.navigatedWithinDocument.resolve(e))})),this.#M.cdpClient.on("Page.lifecycleEvent",(e=>{if(this.id!==e.frameId)return;const t=(new Date).getTime();if("init"===e.name&&(this.#z(e.loaderId),this.#N.documentInitialized.resolve()),"commit"!==e.name){if(e.loaderId===this.#O)switch(e.name){case"DOMContentLoaded":this.#N.Page.lifecycleEvent.DOMContentLoaded.resolve(e),this.#l.registerEvent({method:B.BrowsingContext.EventNames.DomContentLoadedEvent,params:{context:this.id,navigation:this.#O,timestamp:t,url:this.#Z}},this.id);break;case"load":this.#N.Page.lifecycleEvent.load.resolve(e),this.#l.registerEvent({method:B.BrowsingContext.EventNames.LoadEvent,params:{context:this.id,navigation:this.#O,timestamp:t,url:this.#Z}},this.id)}}else this.#O=e.loaderId})),this.#M.cdpClient.on("Runtime.executionContextCreated",(e=>{if(e.context.auxData.frameId!==this.id)return;if(!["default","isolated"].includes(e.context.auxData.type))return;const t=new $.Realm(this.#y,this.#b,e.context.uniqueId,this.id,e.context.id,this.#L(e),"window","isolated"===e.context.auxData.type?e.context.name:void 0,this.#M.cdpSessionId,this.#M.cdpClient,this.#l);e.context.auxData.isDefault&&(this.#D=t)})),this.#M.cdpClient.on("Runtime.executionContextDestroyed",(e=>{this.#y.deleteRealms({cdpSessionId:this.#M.cdpSessionId,executionContextId:e.executionContextId})})),this.#M.cdpClient.on("Runtime.executionContextsCleared",(()=>{this.#y.deleteRealms({cdpSessionId:this.#M.cdpSessionId})}))}#L(e){return"isolated"===e.context.auxData.type?this.#A.origin:["://",""].includes(e.context.origin)?"null":e.context.origin}#z(e){void 0!==e&&this.#O!==e?(this.#N.documentInitialized.isFinished?this.#N.documentInitialized=new U.Deferred:this.#n?.(V.LogType.browsingContexts,"Document changed"),this.#N.Page.lifecycleEvent.DOMContentLoaded.isFinished?this.#N.Page.lifecycleEvent.DOMContentLoaded=new U.Deferred:this.#n?.(V.LogType.browsingContexts,"Document changed"),this.#N.Page.lifecycleEvent.load.isFinished?this.#N.Page.lifecycleEvent.load=new U.Deferred:this.#n?.(V.LogType.browsingContexts,"Document changed"),this.#O=e):this.#N.Page.navigatedWithinDocument.isFinished&&(this.#N.Page.navigatedWithinDocument=new U.Deferred)}async navigate(e,t){await this.awaitUnblocked();const n=await this.#M.cdpClient.sendCommand("Page.navigate",{url:e,frameId:this.id});if(n.errorText)throw new B.Message.UnknownErrorException(n.errorText);switch(this.#z(n.loaderId),t){case"none":break;case"interactive":void 0===n.loaderId?await this.#N.Page.navigatedWithinDocument:await this.#N.Page.lifecycleEvent.DOMContentLoaded;break;case"complete":void 0===n.loaderId?await this.#N.Page.navigatedWithinDocument:await this.#N.Page.lifecycleEvent.load}return{result:{navigation:n.loaderId||null,url:e}}}async captureScreenshot(){const[,e]=await Promise.all([this.#M.cdpClient.sendCommand("Page.bringToFront"),this.#M.cdpClient.sendCommand("Page.captureScreenshot",{})]);return{result:{data:e.data}}}async print(e){const t={printBackground:e.background,landscape:"landscape"===e.orientation,pageRanges:e.pageRanges?.join(",")??"",scale:e.scale,preferCSSPageSize:!e.shrinkToFit};e.margin?.bottom&&(t.marginBottom=(0,L.inchesFromCm)(e.margin.bottom)),e.margin?.left&&(t.marginLeft=(0,L.inchesFromCm)(e.margin.left)),e.margin?.right&&(t.marginRight=(0,L.inchesFromCm)(e.margin.right)),e.margin?.top&&(t.marginTop=(0,L.inchesFromCm)(e.margin.top)),e.page?.height&&(t.paperHeight=(0,L.inchesFromCm)(e.page.height)),e.page?.width&&(t.paperWidth=(0,L.inchesFromCm)(e.page.width));return{result:{data:(await this.#M.cdpClient.sendCommand("Page.printToPDF",t)).data}}}}O.BrowsingContextImpl=F;var q={},W={},K={};Object.defineProperty(K,"__esModule",{value:!0}),K.getRemoteValuesText=K.logMessageFormatter=void 0;const J=["%s","%d","%i","%f","%o","%O","%c"];function H(e){return J.some((t=>e.includes(t)))}function G(e){let t="";const n=e[0].value.toString(),s=e.slice(1,void 0),r=n.split(new RegExp(J.map((e=>`(${e})`)).join("|"),"g"));for(const n of r)if(void 0!==n&&""!==n)if(H(n)){const r=s.shift();if(void 0===r)throw new Error(`Less value is provided: "${X(e,!1)}"`);"%s"===n?t+=Q(r):"%d"===n||"%i"===n?"bigint"===r.type||"number"===r.type||"string"===r.type?t+=parseInt(r.value.toString(),10):t+="NaN":"%f"===n?"bigint"===r.type||"number"===r.type||"string"===r.type?t+=parseFloat(r.value.toString()):t+="NaN":t+=Y(r)}else t+=n;if(s.length>0)throw new Error(`More value is provided: "${X(e,!1)}"`);return t}function Y(e){if("array"!==e.type&&"bigint"!==e.type&&"date"!==e.type&&"number"!==e.type&&"object"!==e.type&&"string"!==e.type)return Q(e);if("bigint"===e.type)return`${e.value.toString()}n`;if("number"===e.type)return e.value.toString();if(["date","string"].includes(e.type))return JSON.stringify(e.value);if("object"===e.type)return`{${e.value.map((e=>`${JSON.stringify(e[0])}:${Y(e[1])}`)).join(",")}}`;if("array"===e.type)return`[${e.value?.map((e=>Y(e))).join(",")??""}]`;throw Error(`Invalid value type: ${e.toString()}`)}function Q(e){if(!Object.hasOwn(e,"value"))return e.type;switch(e.type){case"string":case"number":case"boolean":case"bigint":return String(e.value);case"regexp":return`/${e.value.pattern}/${e.value.flags??""}`;case"date":return new Date(e.value).toString();case"object":return`Object(${e.value?.length??""})`;case"array":return`Array(${e.value?.length??""})`;case"map":return`Map(${e.value.length})`;case"set":return`Set(${e.value.length})`;case"node":return"node";default:return e.type}}function X(e,t){const n=e[0];return n?"string"===n.type&&H(n.value.toString())&&t?G(e):e.map((e=>Q(e))).join(" "):""}K.logMessageFormatter=G,K.getRemoteValuesText=X,Object.defineProperty(W,"__esModule",{value:!0}),W.LogManager=void 0;const ee=w,te=K;function ne(e){const t=e?.callFrames.map((e=>({columnNumber:e.columnNumber,functionName:e.functionName,lineNumber:e.lineNumber,url:e.url})));return t?{callFrames:t}:void 0}class se{#l;#y;#M;constructor(e,t,n){this.#M=e,this.#y=t,this.#l=n}static create(e,t,n){const s=new se(e,t,n);return s.#B(),s}#B(){this.#V()}#V(){this.#M.cdpClient.on("Runtime.consoleAPICalled",(e=>{const t=this.#y.findRealm({cdpSessionId:this.#M.cdpSessionId,executionContextId:e.executionContextId}),n=void 0===t?Promise.resolve(e.args):Promise.all(e.args.map((e=>t.serializeCdpObject(e,"none"))));this.#l.registerPromiseEvent(n.then((n=>{return{method:ee.Log.EventNames.LogEntryAddedEvent,params:{level:(s=e.type,["assert","error"].includes(s)?"error":["debug","trace"].includes(s)?"debug":["warn","warning"].includes(s)?"warn":"info"),source:{realm:t?.realmId??"UNKNOWN",context:t?.browsingContextId??"UNKNOWN"},text:(0,te.getRemoteValuesText)(n,!0),timestamp:Math.round(e.timestamp),stackTrace:ne(e.stackTrace),type:"console",method:"warning"===e.type?"warn":e.type,args:n}};var s})),t?.browsingContextId??"UNKNOWN",ee.Log.EventNames.LogEntryAddedEvent)})),this.#M.cdpClient.on("Runtime.exceptionThrown",(e=>{const t=this.#y.findRealm({cdpSessionId:this.#M.cdpSessionId,executionContextId:e.exceptionDetails.executionContextId}),n=(async()=>e.exceptionDetails.exception?void 0===t?JSON.stringify(e.exceptionDetails.exception):t.stringifyObject(e.exceptionDetails.exception):e.exceptionDetails.text)();this.#l.registerPromiseEvent(n.then((n=>({method:ee.Log.EventNames.LogEntryAddedEvent,params:{level:"error",source:{realm:t?.realmId??"UNKNOWN",context:t?.browsingContextId??"UNKNOWN"},text:n,timestamp:Math.round(e.timestamp),stackTrace:ne(e.exceptionDetails.stackTrace),type:"javascript"}}))),t?.browsingContextId??"UNKNOWN",ee.Log.EventNames.LogEntryAddedEvent)}))}}W.LogManager=se;var re={},ae={};Object.defineProperty(ae,"__esModule",{value:!0}),ae.DefaultMap=void 0;class ie extends Map{#U;constructor(e,t){super(t),this.#U=e}get(e){return this.has(e)||this.set(e,this.#U(e)),super.get(e)}}ae.DefaultMap=ie;var oe={};Object.defineProperty(oe,"__esModule",{value:!0}),oe.NetworkRequest=void 0;const de=D,ce=w;class ue{static#$="UNKNOWN";requestId;#l;#F;#q;#W;#K;#J;#H;constructor(e,t){this.requestId=e,this.#l=t,this.#J=new de.Deferred,this.#H=new de.Deferred}onRequestWillBeSentEvent(e){void 0===this.#F&&(this.#F=e,void 0!==this.#q&&this.#J.resolve(),this.#G())}onRequestWillBeSentExtraInfoEvent(e){void 0===this.#q&&(this.#q=e,void 0!==this.#F&&this.#J.resolve())}onResponseReceivedEvent(e){void 0===this.#W&&(this.#W=e,!0===e.hasExtraInfo||this.#J.isFinished||this.#J.resolve(),!0===e.hasExtraInfo&&void 0===this.#K||this.#H.resolve(),this.#Y())}onResponseReceivedEventExtraInfo(e){void 0===this.#K&&(this.#K=e,void 0!==this.#W&&this.#H.resolve())}onLoadingFailedEvent(e){this.#J.resolve(),this.#H.reject(e);const t={...this.#Q(),errorText:e.errorText};this.#l.registerEvent({method:ce.Network.EventNames.FetchErrorEvent,params:t},this.#F?.frameId??null)}#G(){this.#X()||this.#l.registerPromiseEvent(this.#J.then((()=>this.#ee())),this.#F?.frameId??null,ce.Network.EventNames.BeforeRequestSentEvent)}#ee(){if(void 0===this.#F)throw new Error("RequestWillBeSentEvent is not set");const e={...this.#Q(),initiator:{type:this.#te()}};return{method:ce.Network.EventNames.BeforeRequestSentEvent,params:e}}#Q(){return{context:this.#F?.frameId??null,navigation:this.#F?.loaderId??null,redirectCount:0,request:this.#ne(),timestamp:Math.round(1e3*(this.#F?.wallTime??0))}}#ne(){const e=void 0===this.#q?[]:ue.#se(this.#q.associatedCookies);return{request:this.#F?.requestId??ue.#$,url:this.#F?.request.url??ue.#$,method:this.#F?.request.method??ue.#$,headers:Object.keys(this.#F?.request.headers??[]).map((e=>({name:e,value:this.#F?.request.headers[e]}))),cookies:e,headersSize:-1,bodySize:0,timings:{timeOrigin:0,requestTime:0,redirectStart:0,redirectEnd:0,fetchStart:0,dnsStart:0,dnsEnd:0,connectStart:0,connectEnd:0,tlsStart:0,tlsEnd:0,requestStart:0,responseStart:0,responseEnd:0}}}#te(){switch(this.#F?.initiator.type){case"parser":case"script":case"preflight":return this.#F.initiator.type;default:return"other"}}static#re(e){switch(e){case"Strict":return"strict";case"Lax":return"lax";default:return"none"}}static#se(e){return e.map((e=>({name:e.cookie.name,value:e.cookie.value,domain:e.cookie.domain,path:e.cookie.path,expires:e.cookie.expires,size:e.cookie.size,httpOnly:e.cookie.httpOnly,secure:e.cookie.secure,sameSite:ue.#re(e.cookie.sameSite)})))}#Y(){this.#X()||this.#l.registerPromiseEvent(this.#H.then((()=>this.#ae())),this.#W?.frameId??null,ce.Network.EventNames.ResponseCompletedEvent)}#ae(){if(void 0===this.#W)throw new Error("ResponseReceivedEvent is not set");if(void 0===this.#F)throw new Error("RequestWillBeSentEvent is not set");return{method:ce.Network.EventNames.ResponseCompletedEvent,params:{...this.#Q(),response:{url:this.#W.response.url,protocol:this.#W.response.protocol,status:this.#W.response.status,statusText:this.#W.response.statusText,fromCache:this.#W.response.fromDiskCache||this.#W.response.fromPrefetchCache,headers:this.#ie(this.#W.response.headers),mimeType:this.#W.response.mimeType,bytesReceived:this.#W.response.encodedDataLength,headersSize:this.#K?.headersText?.length??-1,bodySize:-1,content:{size:-1}}}}}#ie(e){return Object.keys(e).map((t=>({name:t,value:e[t]})))}#X(){return this.#F?.request.url.endsWith("/favicon.ico")??!1}}oe.NetworkRequest=ue,Object.defineProperty(re,"__esModule",{value:!0}),re.NetworkProcessor=void 0;const le=ae,pe=oe;class he{#l;#oe;constructor(e){this.#l=e,this.#oe=new le.DefaultMap((e=>new pe.NetworkRequest(e,this.#l)))}static async create(e,t){const n=new he(t);return e.on("Network.requestWillBeSent",(e=>{n.#de(e.requestId).onRequestWillBeSentEvent(e)})),e.on("Network.requestWillBeSentExtraInfo",(e=>{n.#de(e.requestId).onRequestWillBeSentExtraInfoEvent(e)})),e.on("Network.responseReceived",(e=>{n.#de(e.requestId).onResponseReceivedEvent(e)})),e.on("Network.responseReceivedExtraInfo",(e=>{n.#de(e.requestId).onResponseReceivedEventExtraInfo(e)})),e.on("Network.loadingFailed",(e=>{n.#de(e.requestId).onLoadingFailedEvent(e)})),await e.sendCommand("Network.enable"),n}#de(e){return this.#oe.get(e)}}re.NetworkProcessor=he,Object.defineProperty(q,"__esModule",{value:!0}),q.CdpTarget=void 0;const me=W,ge=w,fe=D,ve=re;class ye{#ce;#S;#ue;#l;#le;#pe;static create(e,t,n,s,r){const a=new ye(e,t,n,r);return me.LogManager.create(a,s,r),a.#he(),a.#me(),a}constructor(e,t,n,s){this.#ce=e,this.#S=t,this.#ue=n,this.#l=s,this.#pe=!1,this.#le=new fe.Deferred}get targetUnblocked(){return this.#le}get targetId(){return this.#ce}get cdpClient(){return this.#S}get cdpSessionId(){return this.#ue}async#me(){this.#l.isNetworkDomainEnabled&&await this.enableNetworkDomain(),await this.#S.sendCommand("Runtime.enable"),await this.#S.sendCommand("Page.enable"),await this.#S.sendCommand("Page.setLifecycleEventsEnabled",{enabled:!0}),await this.#S.sendCommand("Target.setAutoAttach",{autoAttach:!0,waitForDebuggerOnStart:!0,flatten:!0}),await this.#S.sendCommand("Runtime.runIfWaitingForDebugger"),this.#le.resolve()}async enableNetworkDomain(){this.#pe||(this.#pe=!0,await ve.NetworkProcessor.create(this.cdpClient,this.#l))}#he(){this.#S.on("*",((e,t)=>{this.#l.registerEvent({method:ge.CDP.EventNames.EventReceivedEvent,params:{cdpMethod:e,cdpParams:t??{},cdpSession:this.#ue}},null)}))}async addPreloadScript(e,t){return(await this.cdpClient.sendCommand("Page.addScriptToEvaluateOnNewDocument",{source:e,worldName:t})).identifier}async removePreloadScript(e){await this.cdpClient.sendCommand("Page.removeScriptToEvaluateOnNewDocument",{identifier:e})}}q.CdpTarget=ye;var be,xe={},Ce=new Uint8Array(16);function we(){if(!be&&!(be="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return be(Ce)}var _e=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Ie(e){return"string"==typeof e&&_e.test(e)}for(var Se,Te,Ee=[],Pe=0;Pe<256;++Pe)Ee.push((Pe+256).toString(16).substr(1));function ke(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(Ee[e[t+0]]+Ee[e[t+1]]+Ee[e[t+2]]+Ee[e[t+3]]+"-"+Ee[e[t+4]]+Ee[e[t+5]]+"-"+Ee[e[t+6]]+Ee[e[t+7]]+"-"+Ee[e[t+8]]+Ee[e[t+9]]+"-"+Ee[e[t+10]]+Ee[e[t+11]]+Ee[e[t+12]]+Ee[e[t+13]]+Ee[e[t+14]]+Ee[e[t+15]]).toLowerCase();if(!Ie(n))throw TypeError("Stringified UUID is invalid");return n}var Ne=0,Ze=0;function Oe(e){if(!Ie(e))throw TypeError("Invalid UUID");var t,n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n}function Me(e,t,n){function s(e,s,r,a){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t}(e)),"string"==typeof s&&(s=Oe(s)),16!==s.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var i=new Uint8Array(16+e.length);if(i.set(s),i.set(e,s.length),(i=n(i))[6]=15&i[6]|t,i[8]=63&i[8]|128,r){a=a||0;for(var o=0;o<16;++o)r[a+o]=i[o];return r}return ke(i)}try{s.name=e}catch(e){}return s.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",s.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",s}function De(e){return 14+(e+64>>>9<<4)+1}function Re(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function je(e,t,n,s,r,a){return Re((i=Re(Re(t,e),Re(s,a)))<<(o=r)|i>>>32-o,n);var i,o}function Ae(e,t,n,s,r,a,i){return je(t&n|~t&s,e,t,r,a,i)}function ze(e,t,n,s,r,a,i){return je(t&s|n&~s,e,t,r,a,i)}function Le(e,t,n,s,r,a,i){return je(t^n^s,e,t,r,a,i)}function Be(e,t,n,s,r,a,i){return je(n^(t|~s),e,t,r,a,i)}var Ve=Me("v3",48,(function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var n=0;n<t.length;++n)e[n]=t.charCodeAt(n)}return function(e){for(var t=[],n=32*e.length,s="0123456789abcdef",r=0;r<n;r+=8){var a=e[r>>5]>>>r%32&255,i=parseInt(s.charAt(a>>>4&15)+s.charAt(15&a),16);t.push(i)}return t}(function(e,t){e[t>>5]|=128<<t%32,e[De(t)-1]=t;for(var n=1732584193,s=-271733879,r=-1732584194,a=271733878,i=0;i<e.length;i+=16){var o=n,d=s,c=r,u=a;n=Ae(n,s,r,a,e[i],7,-680876936),a=Ae(a,n,s,r,e[i+1],12,-389564586),r=Ae(r,a,n,s,e[i+2],17,606105819),s=Ae(s,r,a,n,e[i+3],22,-1044525330),n=Ae(n,s,r,a,e[i+4],7,-176418897),a=Ae(a,n,s,r,e[i+5],12,1200080426),r=Ae(r,a,n,s,e[i+6],17,-1473231341),s=Ae(s,r,a,n,e[i+7],22,-45705983),n=Ae(n,s,r,a,e[i+8],7,1770035416),a=Ae(a,n,s,r,e[i+9],12,-1958414417),r=Ae(r,a,n,s,e[i+10],17,-42063),s=Ae(s,r,a,n,e[i+11],22,-1990404162),n=Ae(n,s,r,a,e[i+12],7,1804603682),a=Ae(a,n,s,r,e[i+13],12,-40341101),r=Ae(r,a,n,s,e[i+14],17,-1502002290),n=ze(n,s=Ae(s,r,a,n,e[i+15],22,1236535329),r,a,e[i+1],5,-165796510),a=ze(a,n,s,r,e[i+6],9,-1069501632),r=ze(r,a,n,s,e[i+11],14,643717713),s=ze(s,r,a,n,e[i],20,-373897302),n=ze(n,s,r,a,e[i+5],5,-701558691),a=ze(a,n,s,r,e[i+10],9,38016083),r=ze(r,a,n,s,e[i+15],14,-660478335),s=ze(s,r,a,n,e[i+4],20,-405537848),n=ze(n,s,r,a,e[i+9],5,568446438),a=ze(a,n,s,r,e[i+14],9,-1019803690),r=ze(r,a,n,s,e[i+3],14,-187363961),s=ze(s,r,a,n,e[i+8],20,1163531501),n=ze(n,s,r,a,e[i+13],5,-1444681467),a=ze(a,n,s,r,e[i+2],9,-51403784),r=ze(r,a,n,s,e[i+7],14,1735328473),n=Le(n,s=ze(s,r,a,n,e[i+12],20,-1926607734),r,a,e[i+5],4,-378558),a=Le(a,n,s,r,e[i+8],11,-2022574463),r=Le(r,a,n,s,e[i+11],16,1839030562),s=Le(s,r,a,n,e[i+14],23,-35309556),n=Le(n,s,r,a,e[i+1],4,-1530992060),a=Le(a,n,s,r,e[i+4],11,1272893353),r=Le(r,a,n,s,e[i+7],16,-155497632),s=Le(s,r,a,n,e[i+10],23,-1094730640),n=Le(n,s,r,a,e[i+13],4,681279174),a=Le(a,n,s,r,e[i],11,-358537222),r=Le(r,a,n,s,e[i+3],16,-722521979),s=Le(s,r,a,n,e[i+6],23,76029189),n=Le(n,s,r,a,e[i+9],4,-640364487),a=Le(a,n,s,r,e[i+12],11,-421815835),r=Le(r,a,n,s,e[i+15],16,530742520),n=Be(n,s=Le(s,r,a,n,e[i+2],23,-995338651),r,a,e[i],6,-198630844),a=Be(a,n,s,r,e[i+7],10,1126891415),r=Be(r,a,n,s,e[i+14],15,-1416354905),s=Be(s,r,a,n,e[i+5],21,-57434055),n=Be(n,s,r,a,e[i+12],6,1700485571),a=Be(a,n,s,r,e[i+3],10,-1894986606),r=Be(r,a,n,s,e[i+10],15,-1051523),s=Be(s,r,a,n,e[i+1],21,-2054922799),n=Be(n,s,r,a,e[i+8],6,1873313359),a=Be(a,n,s,r,e[i+15],10,-30611744),r=Be(r,a,n,s,e[i+6],15,-1560198380),s=Be(s,r,a,n,e[i+13],21,1309151649),n=Be(n,s,r,a,e[i+4],6,-145523070),a=Be(a,n,s,r,e[i+11],10,-1120210379),r=Be(r,a,n,s,e[i+2],15,718787259),s=Be(s,r,a,n,e[i+9],21,-343485551),n=Re(n,o),s=Re(s,d),r=Re(r,c),a=Re(a,u)}return[n,s,r,a]}(function(e){if(0===e.length)return[];for(var t=8*e.length,n=new Uint32Array(De(t)),s=0;s<t;s+=8)n[s>>5]|=(255&e[s/8])<<s%32;return n}(e),8*e.length))})),Ue=Ve;function $e(e,t,n,s){switch(e){case 0:return t&n^~t&s;case 1:case 3:return t^n^s;case 2:return t&n^t&s^n&s}}function Fe(e,t){return e<<t|e>>>32-t}var qe=Me("v5",80,(function(e){var t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var s=unescape(encodeURIComponent(e));e=[];for(var r=0;r<s.length;++r)e.push(s.charCodeAt(r))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var a=e.length/4+2,i=Math.ceil(a/16),o=new Array(i),d=0;d<i;++d){for(var c=new Uint32Array(16),u=0;u<16;++u)c[u]=e[64*d+4*u]<<24|e[64*d+4*u+1]<<16|e[64*d+4*u+2]<<8|e[64*d+4*u+3];o[d]=c}o[i-1][14]=8*(e.length-1)/Math.pow(2,32),o[i-1][14]=Math.floor(o[i-1][14]),o[i-1][15]=8*(e.length-1)&4294967295;for(var l=0;l<i;++l){for(var p=new Uint32Array(80),h=0;h<16;++h)p[h]=o[l][h];for(var m=16;m<80;++m)p[m]=Fe(p[m-3]^p[m-8]^p[m-14]^p[m-16],1);for(var g=n[0],f=n[1],v=n[2],y=n[3],b=n[4],x=0;x<80;++x){var C=Math.floor(x/20),w=Fe(g,5)+$e(C,f,v,y)+b+t[C]+p[x]>>>0;b=y,y=v,v=Fe(f,30)>>>0,f=g,g=w}n[0]=n[0]+g>>>0,n[1]=n[1]+f>>>0,n[2]=n[2]+v>>>0,n[3]=n[3]+y>>>0,n[4]=n[4]+b>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]})),We=qe;var Ke=Object.freeze({__proto__:null,NIL:"00000000-0000-0000-0000-000000000000",parse:Oe,stringify:ke,v1:function(e,t,n){var s=t&&n||0,r=t||new Array(16),a=(e=e||{}).node||Se,i=void 0!==e.clockseq?e.clockseq:Te;if(null==a||null==i){var o=e.random||(e.rng||we)();null==a&&(a=Se=[1|o[0],o[1],o[2],o[3],o[4],o[5]]),null==i&&(i=Te=16383&(o[6]<<8|o[7]))}var d=void 0!==e.msecs?e.msecs:Date.now(),c=void 0!==e.nsecs?e.nsecs:Ze+1,u=d-Ne+(c-Ze)/1e4;if(u<0&&void 0===e.clockseq&&(i=i+1&16383),(u<0||d>Ne)&&void 0===e.nsecs&&(c=0),c>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");Ne=d,Ze=c,Te=i;var l=(1e4*(268435455&(d+=122192928e5))+c)%4294967296;r[s++]=l>>>24&255,r[s++]=l>>>16&255,r[s++]=l>>>8&255,r[s++]=255&l;var p=d/4294967296*1e4&268435455;r[s++]=p>>>8&255,r[s++]=255&p,r[s++]=p>>>24&15|16,r[s++]=p>>>16&255,r[s++]=i>>>8|128,r[s++]=255&i;for(var h=0;h<6;++h)r[s+h]=a[h];return t||ke(r)},v3:Ue,v4:function(e,t,n){var s=(e=e||{}).random||(e.rng||we)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t){n=n||0;for(var r=0;r<16;++r)t[n+r]=s[r];return t}return ke(s)},v5:We,validate:Ie,version:function(e){if(!Ie(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}}),Je=t(Ke);Object.defineProperty(xe,"__esModule",{value:!0}),xe.PreloadScriptStorage=void 0;const He=Je;xe.PreloadScriptStorage=class{#ge=new Set;findPreloadScripts(e){return e?[...this.#ge].filter((t=>(void 0===e?.id||e?.id===t.id)&&(void 0===e?.contextId||e?.contextId===t.contextId))):[...this.#ge]}addPreloadScripts(e,t,n,s){const r={id:(0,He.v4)(),contextId:e,cdpPreloadScripts:t,functionDeclaration:n,sandbox:s};return this.#ge.add(r),r}appendPreloadScript(e,t){e.cdpPreloadScripts.push(t)}removePreloadScripts(e){for(const t of this.findPreloadScripts(e))this.#ge.delete(t)}},Object.defineProperty(Z,"__esModule",{value:!0}),Z.BrowsingContextProcessor=void 0;const Ge=w,Ye=P,Qe=O,Xe=q,et=xe;Z.BrowsingContextProcessor=class{#b;#fe;#l;#n;#y;#ve;#ye;constructor(e,t,n,s,r,a){this.#b=r,this.#fe=t,this.#l=s,this.#n=a,this.#y=e,this.#ve=n,this.#ye=new et.PreloadScriptStorage,this.#he(this.#fe.browserClient())}#he(e){e.on("Target.attachedToTarget",(t=>{this.#be(t,e)})),e.on("Target.detachedFromTarget",(e=>{this.#xe(e)})),e.on("Page.frameAttached",(e=>{this.#Ce(e)})),e.on("Page.frameDetached",(e=>{this.#we(e)}))}#Ce(e){const t=this.#b.findContext(e.parentFrameId);void 0!==t&&Qe.BrowsingContextImpl.create(t.cdpTarget,this.#y,e.frameId,e.parentFrameId,this.#l,this.#b,this.#n)}#we(e){"swap"!==e.reason&&this.#b.findContext(e.frameId)?.delete()}#be(e,t){const{sessionId:n,targetInfo:s}=e,r=this.#fe.getCdpClient(n);if(!this.#_e(s))return void r.sendCommand("Runtime.runIfWaitingForDebugger").then((()=>t.sendCommand("Target.detachFromTarget",e)));this.#n?.(Ye.LogType.browsingContexts,"AttachedToTarget event received:",JSON.stringify(e,null,2)),this.#he(r);const a=Xe.CdpTarget.create(s.targetId,r,n,this.#y,this.#l);this.#b.hasContext(s.targetId)?this.#b.getContext(s.targetId).updateCdpTarget(a):Qe.BrowsingContextImpl.create(a,this.#y,s.targetId,null,this.#l,this.#b,this.#n)}#xe(e){const t=e.targetId;this.#b.findContext(t)?.delete()}async#Ie(e){if("realm"in e)return this.#y.getRealm({realmId:e.realm});return this.#b.getContext(e.context).getOrCreateSandbox(e.sandbox)}process_browsingContext_getTree(e){return{result:{contexts:(void 0===e.root?this.#b.getTopLevelContexts():[this.#b.getContext(e.root)]).map((t=>t.serializeToBidiValue(e.maxDepth??Number.MAX_VALUE)))}}}async process_browsingContext_create(e){const t=this.#fe.browserClient();let n;if(void 0!==e.referenceContext&&(n=this.#b.getContext(e.referenceContext),!n.isTopLevelContext()))throw new Ge.Message.InvalidArgumentException("referenceContext should be a top-level context");const s=(await t.sendCommand("Target.createTarget",{url:"about:blank",newWindow:"window"===e.type})).targetId,r=this.#b.getContext(s);return await r.awaitLoaded(),{result:r.serializeToBidiValue(1)}}process_browsingContext_navigate(e){return this.#b.getContext(e.context).navigate(e.url,void 0===e.wait?"none":e.wait)}async process_browsingContext_captureScreenshot(e){return this.#b.getContext(e.context).captureScreenshot()}async process_browsingContext_print(e){return this.#b.getContext(e.context).print(e)}async process_script_addPreloadScript(e){if(void 0!==e.arguments&&e.arguments.length>0)throw new Ge.Message.UnsupportedOperationException("add preload script arguments are not supported");const t=new Set(void 0===e.context||null===e.context?this.#b.getTopLevelContexts().map((e=>e.cdpTarget)):[this.#b.getContext(e.context).cdpTarget]),n=[];for(const s of t){const t=await s.addPreloadScript(`(${e.functionDeclaration})();`,e.sandbox);n.push({target:s,preloadScriptId:t})}return{result:{script:this.#ye.addPreloadScripts(e.context??null,n,e.functionDeclaration,e.sandbox).id}}}async process_script_removePreloadScript(e){const t=e.script,n=this.#ye.findPreloadScripts({id:t});if(0===n.length)throw new Ge.Message.NoSuchScriptException(`No preload script with BiDi ID '${t}'`);for(const e of n)for(const t of e.cdpPreloadScripts){const e=t.target,n=t.preloadScriptId;await e.removePreloadScript(n)}return this.#ye.removePreloadScripts({id:t}),{result:{}}}async process_script_evaluate(e){return(await this.#Ie(e.target)).scriptEvaluate(e.expression,e.awaitPromise,e.resultOwnership??"none")}process_script_getRealms(e){void 0!==e.context&&this.#b.getContext(e.context);const t=this.#y.findRealms({browsingContextId:e.context,type:e.type}).map((e=>e.toBiDi()));return{result:{realms:t}}}async process_script_callFunction(e){return(await this.#Ie(e.target)).callFunction(e.functionDeclaration,e.this||{type:"undefined"},e.arguments||[],e.awaitPromise,e.resultOwnership??"none")}async process_script_disown(e){const t=await this.#Ie(e.target);return await Promise.all(e.handles.map((async e=>t.disown(e)))),{result:{}}}async process_browsingContext_close(e){const t=this.#fe.browserClient();if(!this.#b.getContext(e.context).isTopLevelContext())throw new Ge.Message.InvalidArgumentException("A top-level browsing context cannot be closed.");const n=new Promise((n=>{const s=r=>{r.targetId===e.context&&(t.off("Target.detachedFromTarget",s),n())};t.on("Target.detachedFromTarget",s)}));return await t.sendCommand("Target.closeTarget",{targetId:e.context}),await n,{result:{}}}#_e(e){return e.targetId!==this.#ve&&["page","iframe"].includes(e.type)}async process_cdp_sendCommand(e){const t=e.cdpSession?this.#fe.getCdpClient(e.cdpSession):this.#fe.browserClient();return{result:await t.sendCommand(e.cdpMethod,e.cdpParams),cdpSession:e.cdpSession}}process_cdp_getSession(e){const t=e.context,n=this.#b.getContext(t).cdpTarget.cdpSessionId;return void 0===n?{result:{cdpSession:null}}:{result:{cdpSession:n}}}};var tt={};Object.defineProperty(tt,"__esModule",{value:!0}),tt.OutgoingBidiMessage=void 0;class nt{#Se;#Te;constructor(e,t){this.#Se=e,this.#Te=t}static async createFromPromise(e,t){return e.then((e=>new nt(e,t)))}static createResolved(e,t){return Promise.resolve(new nt(e,t))}get message(){return this.#Se}get channel(){return this.#Te}}tt.OutgoingBidiMessage=nt,Object.defineProperty(N,"__esModule",{value:!0}),N.CommandProcessor=void 0;const st=w,rt=P,at=I,it=Z,ot=tt;class dt{parseAddPreloadScriptParams(e){return e}parseRemovePreloadScriptParams(e){return e}parseGetRealmsParams(e){return e}parseCallFunctionParams(e){return e}parseEvaluateParams(e){return e}parseDisownParams(e){return e}parseSendCommandParams(e){return e}parseGetSessionParams(e){return e}parseSubscribeParams(e){return e}parseNavigateParams(e){return e}parseGetTreeParams(e){return e}parseCreateParams(e){return e}parseCloseParams(e){return e}parseCaptureScreenshotParams(e){return e}parsePrintParams(e){return e}}class ct extends at.EventEmitter{#Ee;#l;#Pe;#n;constructor(e,t,n,s,r=new dt,a,i){super(),this.#l=n,this.#n=i,this.#Ee=new it.BrowsingContextProcessor(e,t,s,n,a,i),this.#Pe=r}static#ke(){return{result:{ready:!1,message:"already connected"}}}async#Ne(e,t){return await this.#l.subscribe(e.events,e.contexts??[null],t),{result:{}}}async#Ze(e,t){return await this.#l.unsubscribe(e.events,e.contexts??[null],t),{result:{}}}async#Oe(e){switch(e.method){case"session.status":return ct.#ke();case"session.subscribe":return this.#Ne(this.#Pe.parseSubscribeParams(e.params),e.channel??null);case"session.unsubscribe":return this.#Ze(this.#Pe.parseSubscribeParams(e.params),e.channel??null);case"browsingContext.create":return this.#Ee.process_browsingContext_create(this.#Pe.parseCreateParams(e.params));case"browsingContext.close":return this.#Ee.process_browsingContext_close(this.#Pe.parseCloseParams(e.params));case"browsingContext.getTree":return this.#Ee.process_browsingContext_getTree(this.#Pe.parseGetTreeParams(e.params));case"browsingContext.navigate":return this.#Ee.process_browsingContext_navigate(this.#Pe.parseNavigateParams(e.params));case"browsingContext.captureScreenshot":return this.#Ee.process_browsingContext_captureScreenshot(this.#Pe.parseCaptureScreenshotParams(e.params));case"browsingContext.print":return this.#Ee.process_browsingContext_print(this.#Pe.parsePrintParams(e.params));case"script.addPreloadScript":return this.#Ee.process_script_addPreloadScript(this.#Pe.parseAddPreloadScriptParams(e.params));case"script.removePreloadScript":return this.#Ee.process_script_removePreloadScript(this.#Pe.parseRemovePreloadScriptParams(e.params));case"script.getRealms":return this.#Ee.process_script_getRealms(this.#Pe.parseGetRealmsParams(e.params));case"script.callFunction":return this.#Ee.process_script_callFunction(this.#Pe.parseCallFunctionParams(e.params));case"script.evaluate":return this.#Ee.process_script_evaluate(this.#Pe.parseEvaluateParams(e.params));case"script.disown":return this.#Ee.process_script_disown(this.#Pe.parseDisownParams(e.params));case"cdp.sendCommand":return this.#Ee.process_cdp_sendCommand(this.#Pe.parseSendCommandParams(e.params));case"cdp.getSession":return this.#Ee.process_cdp_getSession(this.#Pe.parseGetSessionParams(e.params));default:throw new st.Message.UnknownCommandException(`Unknown command '${e.method}'.`)}}async processCommand(e){try{const t=await this.#Oe(e),n={id:e.id,...t};this.emit("response",ot.OutgoingBidiMessage.createResolved(n,e.channel??null))}catch(t){if(t instanceof st.Message.ErrorResponse){const n=t;this.emit("response",ot.OutgoingBidiMessage.createResolved(n.toErrorResponse(e.id),e.channel??null))}else{const n=t;this.#n?.(rt.LogType.bidi,n),this.emit("response",ot.OutgoingBidiMessage.createResolved(new st.Message.ErrorResponse(st.Message.ErrorCode.UnknownError,n.message).toErrorResponse(e.id),e.channel??null))}}}}N.CommandProcessor=ct;var ut={};Object.defineProperty(ut,"__esModule",{value:!0}),ut.BrowsingContextStorage=void 0;const lt=w;ut.BrowsingContextStorage=class{#Me=new Map;getTopLevelContexts(){return this.getAllContexts().filter((e=>e.isTopLevelContext()))}getAllContexts(){return Array.from(this.#Me.values())}deleteContextById(e){this.#Me.delete(e)}deleteContext(e){this.#Me.delete(e.id)}addContext(e){this.#Me.set(e.id,e)}hasContext(e){return this.#Me.has(e)}findContext(e){return this.#Me.get(e)}findTopLevelContextId(e){if(null===e)return null;const t=this.findContext(e),n=t?.parentId??null;return null===n?e:this.findTopLevelContextId(n)}findTopLevelContext(e){const t=this.findTopLevelContextId(e);return null===t?null:this.findContext(t)}getContext(e){const t=this.findContext(e);if(void 0===t)throw new lt.Message.NoSuchFrameException(`Context ${e} not found`);return t}};var pt={},ht={};Object.defineProperty(ht,"__esModule",{value:!0}),ht.Buffer=void 0;ht.Buffer=class{#De;#Re=[];#je;constructor(e,t=(()=>{})){this.#De=e,this.#je=t}get(){return this.#Re}add(e){for(this.#Re.push(e);this.#Re.length>this.#De;){const e=this.#Re.shift();void 0!==e&&this.#je(e)}}};var mt={};Object.defineProperty(mt,"__esModule",{value:!0}),mt.IdWrapper=void 0;class gt{static#Ae=0;#E;constructor(){this.#E=++gt.#Ae}get id(){return this.#E}}mt.IdWrapper=gt;var ft={};Object.defineProperty(ft,"__esModule",{value:!0}),ft.SubscriptionManager=ft.unrollEvents=ft.cartesianProduct=void 0;const vt=w;function yt(...e){return e.reduce(((e,t)=>e.flatMap((e=>t.map((t=>[e,t].flat()))))))}function bt(e){const t=[];for(const n of e)switch(n){case vt.BrowsingContext.AllEvents:t.push(...Object.values(vt.BrowsingContext.EventNames));break;case vt.CDP.AllEvents:t.push(...Object.values(vt.CDP.EventNames));break;case vt.Log.AllEvents:t.push(...Object.values(vt.Log.EventNames));break;case vt.Network.AllEvents:t.push(...Object.values(vt.Network.EventNames));break;case vt.Script.AllEvents:t.push(...Object.values(vt.Script.EventNames));break;default:t.push(n)}return t}ft.cartesianProduct=yt,ft.unrollEvents=bt;ft.SubscriptionManager=class{#ze=0;#Le=new Map;#b;constructor(e){this.#b=e}getChannelsSubscribedToEvent(e,t){return Array.from(this.#Le.keys()).map((n=>({priority:this.#Be(e,t,n),channel:n}))).filter((({priority:e})=>null!==e)).sort(((e,t)=>e.priority-t.priority)).map((({channel:e})=>e))}#Be(e,t,n){const s=this.#Le.get(n);if(void 0===s)return null;const r=this.#b.findTopLevelContextId(t),a=[...new Set([null,r])].map((t=>s.get(t)?.get(e))).filter((e=>void 0!==e));return 0===a.length?null:Math.min(...a)}subscribe(e,t,n){if(t=this.#b.findTopLevelContextId(t),e===vt.BrowsingContext.AllEvents)return void Object.values(vt.BrowsingContext.EventNames).map((e=>this.subscribe(e,t,n)));if(e===vt.CDP.AllEvents)return void Object.values(vt.CDP.EventNames).map((e=>this.subscribe(e,t,n)));if(e===vt.Log.AllEvents)return void Object.values(vt.Log.EventNames).map((e=>this.subscribe(e,t,n)));if(e===vt.Network.AllEvents)return void Object.values(vt.Network.EventNames).map((e=>this.subscribe(e,t,n)));if(e===vt.Script.AllEvents)return void Object.values(vt.Script.EventNames).map((e=>this.subscribe(e,t,n)));this.#Le.has(n)||this.#Le.set(n,new Map);const s=this.#Le.get(n);s.has(t)||s.set(t,new Map);const r=s.get(t);r.has(e)||r.set(e,this.#ze++)}unsubscribeAll(e,t,n){for(const e of t)null!==e&&this.#b.getContext(e);yt(bt(e),t).map((([e,t])=>this.#Ve(e,t,n))).forEach((e=>e()))}unsubscribe(e,t,n){this.unsubscribeAll([e],[t],n)}#Ve(e,t,n){if(t=this.#b.findTopLevelContextId(t),!this.#Le.has(n))throw new vt.Message.InvalidArgumentException(`Cannot unsubscribe from ${e}, ${null===t?"null":t}. No subscription found.`);const s=this.#Le.get(n);if(!s.has(t))throw new vt.Message.InvalidArgumentException(`Cannot unsubscribe from ${e}, ${null===t?"null":t}. No subscription found.`);const r=s.get(t);if(!r.has(e))throw new vt.Message.InvalidArgumentException(`Cannot unsubscribe from ${e}, ${null===t?"null":t}. No subscription found.`);return()=>{r.delete(e),0===r.size&&s.delete(e),0===s.size&&this.#Le.delete(n)}}},Object.defineProperty(pt,"__esModule",{value:!0}),pt.EventManager=void 0;const xt=w,Ct=ht,wt=mt,_t=tt,It=ae,St=ft;class Tt{#Ue;#$e;#Fe;constructor(e,t){this.#Ue=new wt.IdWrapper,this.#$e=t,this.#Fe=e}get id(){return this.#Ue.id}get contextId(){return this.#$e}get event(){return this.#Fe}}const Et=new Map([[xt.Log.EventNames.LogEntryAddedEvent,100]]);class Pt{static#qe="network";#We=new It.DefaultMap((()=>new Set));#Ke=new Map;#Je=new Map;#He;#Ge;#Ye;constructor(e){this.#Ge=e,this.#He=new St.SubscriptionManager(e.getBrowsingContextStorage()),this.#Ye=!1}get isNetworkDomainEnabled(){return this.#Ye}static#Qe(e,t,n){return JSON.stringify({eventName:e,browsingContext:t,channel:n})}registerEvent(e,t){this.registerPromiseEvent(Promise.resolve(e),t,e.method)}registerPromiseEvent(e,t,n){const s=new Tt(e,t),r=this.#He.getChannelsSubscribedToEvent(n,t);this.#Xe(s,n);for(const t of r)this.#Ge.emitOutgoingMessage(_t.OutgoingBidiMessage.createFromPromise(e,t)),this.#et(s,t,n)}async subscribe(e,t,n){for(const e of t)null!==e&&this.#Ge.getBrowsingContextStorage().getContext(e);for(const s of e)for(const e of t){await this.#tt(s,e),this.#He.subscribe(s,e,n);for(const t of this.#nt(s,e,n))this.#Ge.emitOutgoingMessage(_t.OutgoingBidiMessage.createFromPromise(t.event,n)),this.#et(t,n,s)}}async#tt(e,t){e.startsWith(Pt.#qe)&&(null===t?(this.#Ye=!0,await Promise.all(this.#Ge.getBrowsingContextStorage().getAllContexts().map((e=>e.cdpTarget.enableNetworkDomain())))):await this.#Ge.getBrowsingContextStorage().getContext(t).cdpTarget.enableNetworkDomain())}unsubscribe(e,t,n){this.#He.unsubscribeAll(e,t,n)}#Xe(e,t){if(!Et.has(t))return;const n=Pt.#Qe(t,e.contextId);this.#Ke.has(n)||this.#Ke.set(n,new Ct.Buffer(Et.get(t))),this.#Ke.get(n).add(e),this.#We.get(t).add(e.contextId)}#et(e,t,n){if(!Et.has(n))return;const s=Pt.#Qe(n,e.contextId,t);this.#Je.set(s,Math.max(this.#Je.get(s)??0,e.id))}#nt(e,t,n){const s=Pt.#Qe(e,t),r=Pt.#Qe(e,t,n),a=this.#Je.get(r)??-1/0,i=this.#Ke.get(s)?.get().filter((e=>e.id>a))??[];return null===t&&Array.from(this.#We.get(e).keys()).filter((e=>null!==e&&this.#Ge.getBrowsingContextStorage().hasContext(e))).map((t=>this.#nt(e,t,n))).forEach((e=>i.push(...e))),i.sort(((e,t)=>e.id-t.id))}}pt.EventManager=Pt;var kt={};Object.defineProperty(kt,"__esModule",{value:!0}),kt.RealmStorage=void 0;const Nt=w;kt.RealmStorage=class{#st=new Map;#rt=new Map;get knownHandlesToRealm(){return this.#st}get realmMap(){return this.#rt}findRealms(e){return Array.from(this.#rt.values()).filter((t=>(void 0===e.realmId||e.realmId===t.realmId)&&((void 0===e.browsingContextId||e.browsingContextId===t.browsingContextId)&&((void 0===e.navigableId||e.navigableId===t.navigableId)&&((void 0===e.executionContextId||e.executionContextId===t.executionContextId)&&((void 0===e.origin||e.origin===t.origin)&&((void 0===e.type||e.type===t.type)&&((void 0===e.sandbox||e.sandbox===t.sandbox)&&(void 0===e.cdpSessionId||e.cdpSessionId===t.cdpSessionId)))))))))}findRealm(e){const t=this.findRealms(e);if(1===t.length)return t[0]}getRealm(e){const t=this.findRealm(e);if(void 0===t)throw new Nt.Message.NoSuchFrameException(`Realm ${JSON.stringify(e)} not found`);return t}deleteRealms(e){this.findRealms(e).map((e=>{this.#rt.delete(e.realmId),Array.from(this.#st.entries()).filter((([,t])=>t===e.realmId)).map((([e])=>this.#st.delete(e)))}))}},Object.defineProperty(_,"__esModule",{value:!0}),_.BidiServer=void 0;const Zt=I,Ot=E,Mt=N,Dt=ut,Rt=pt,jt=kt;class At extends Zt.EventEmitter{#at;#it;#ot;#b;#y;#n;#dt=e=>{this.#ot.processCommand(e)};#ct=async e=>{const t=e.message;null!==e.channel&&(t.channel=e.channel),await this.#it.sendMessage(t)};constructor(e,t,n,s,r){super(),this.#n=r,this.#b=new Dt.BrowsingContextStorage,this.#y=new jt.RealmStorage,this.#at=new Ot.ProcessingQueue(this.#ct,(()=>Promise.resolve()),this.#n),this.#it=e,this.#it.setOnMessage(this.#dt),this.#ot=new Mt.CommandProcessor(this.#y,t,new Rt.EventManager(this),n,s,this.#b,this.#n),this.#ot.on("response",(e=>{this.emitOutgoingMessage(e)}))}static async createAndStart(e,t,n,s,r){const a=new At(e,t,n,s,r),i=t.browserClient();return await i.sendCommand("Target.setDiscoverTargets",{discover:!0}),await i.sendCommand("Target.setAutoAttach",{autoAttach:!0,waitForDebuggerOnStart:!0,flatten:!0}),await a.topLevelContextsLoaded(),a}async topLevelContextsLoaded(){await Promise.all(this.#b.getTopLevelContexts().map((e=>e.awaitLoaded())))}emitOutgoingMessage(e){this.#at.add(e)}close(){this.#it.close()}getBrowsingContextStorage(){return this.#b}}_.BidiServer=At;var zt={},Lt={};Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.CdpClient=void 0;const Bt=I;class Vt extends Bt.EventEmitter{#fe;#ut;constructor(e,t){super(),this.#fe=e,this.#ut=t}static create(e,t){return new Vt(e,t)}sendCommand(e,...t){const n=t[0];return this.#fe.sendCommand(e,n,this.#ut)}}Lt.CdpClient=Vt;var Ut={};Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.CdpConnection=void 0;const $t=Lt;Ut.CdpConnection=class{#it;#lt;#pt=new Map;#ht=new Map;#mt;#gt=0;constructor(e,t=(()=>{})){this.#it=e,this.#mt=t,this.#it.setOnMessage(this.#ft),this.#lt=$t.CdpClient.create(this,null)}close(){this.#it.close();for(const[,{reject:e,error:t}]of this.#ht)e(t);this.#ht.clear(),this.#pt.clear()}browserClient(){return this.#lt}getCdpClient(e){const t=this.#pt.get(e);if(!t)throw new Error("Unknown CDP session ID");return t}sendCommand(e,t,n){return new Promise(((s,r)=>{const a=this.#gt++;this.#ht.set(a,{resolve:s,reject:r,error:new Error(`${e} ${JSON.stringify(t)} ${n} call rejected because the connection has been closed.`)});const i={id:a,method:e,params:t};n&&(i.sessionId=n);const o=JSON.stringify(i),d=JSON.stringify(i,null,2);this.#it.sendMessage(o),this.#mt("sent â–¸",d)}))}#ft=e=>{const t=JSON.parse(e),n=JSON.stringify(t,null,2);if(this.#mt("received â—‚",n),"Target.attachedToTarget"===t.method){const{sessionId:e}=t.params;this.#pt.set(e,$t.CdpClient.create(this,e))}else if("Target.detachedFromTarget"===t.method){const{sessionId:e}=t.params;this.#pt.get(e)&&this.#pt.delete(e)}if(void 0!==t.id){const e=this.#ht.get(t.id);this.#ht.delete(t.id),e&&(t.result?e.resolve(t.result):t.error&&e.reject(t.error))}else if(t.method){const e=t.sessionId?this.#pt.get(t.sessionId):this.#lt;e&&e.emit(t.method,t.params||{})}}};var Ft={};Object.defineProperty(Ft,"__esModule",{value:!0}),Ft.WebSocketTransport=void 0;Ft.WebSocketTransport=class{#ft=null;#vt;constructor(e){this.#vt=e,this.#vt.on("message",(e=>{this.#ft?.(e)}))}setOnMessage(e){this.#ft=e}sendMessage(e){this.#vt.send(e)}close(){this.#ft=null,this.#vt.close()}},function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WebSocketTransport=e.CdpConnection=e.CdpClient=void 0;var t=Lt;Object.defineProperty(e,"CdpClient",{enumerable:!0,get:function(){return t.CdpClient}});var n=Ut;Object.defineProperty(e,"CdpConnection",{enumerable:!0,get:function(){return n.CdpConnection}});var s=Ft;Object.defineProperty(e,"WebSocketTransport",{enumerable:!0,get:function(){return s.WebSocketTransport}})}(zt);var qt={};Object.defineProperty(qt,"__esModule",{value:!0}),qt.log=qt.generatePage=void 0;const Wt=P;function Kt(e){const t=`${e}_log`,n=document.getElementById(t);if(n)return n;const s=document.getElementById("details"),r=document.createElement("div");r.className="divider",s.appendChild(r);const a=document.createElement("div");return a.className="item",a.innerHTML=`<h3>${e}</h3><div id="${t}" class="log"></div>`,s.appendChild(a),document.getElementById(t)}qt.generatePage=function(){globalThis.document.documentElement&&(globalThis.document.documentElement.innerHTML='<!DOCTYPE html><title>BiDi-CDP Mapper</title><style>body{font-family: Roboto, serif; font-size: 13px; color: #202124;}.log{padding: 12px; font-family: Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace; font-size: 11px; line-height: 180%; background: #f1f3f4; border-radius: 4px;}.pre{overflow-wrap: break-word; padding: 10px;}.card{margin: 60px auto; padding: 2px 0; max-width: 900px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15), 0 1px 6px rgba(0, 0, 0, 0.2); border-radius: 8px;}.divider{height: 1px; background: #f0f0f0;}.item{padding: 16px 20px;}</style><div class="card"><div class="item"><h1>BiDi-CDP Mapper is controlling this tab</h1><p>Closing or reloading it will stop the BiDi process. <a target="_blank" title="BiDi-CDP Mapper GitHub Repository" href="https://github.com/GoogleChromeLabs/chromium-bidi">Details.</a></p></div><div class="divider"></div><details id="details"><summary class="item">Debug information</summary></details></div>',Kt(Wt.LogType.system),Kt(Wt.LogType.bidi),Kt(Wt.LogType.browsingContexts),Kt(Wt.LogType.cdp))},qt.log=function(t,...n){if(!globalThis.document.documentElement)return;e.window?.sendDebugMessage?.(JSON.stringify({logType:t,messages:n}));const s=Kt(t),r=document.createElement("div");r.className="pre",r.textContent=n.join(" "),s.appendChild(r)}; +var mapperTab=function(){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){if(this instanceof e){var n=[null];return n.push.apply(n,arguments),new(Function.bind.apply(t,n))}return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})})),n}var n={},s={},r={},a={},i={},o={},d={};!function(e){var t;Object.defineProperty(e,"__esModule",{value:!0}),e.getParsedType=e.ZodParsedType=e.objectUtil=e.util=void 0,function(e){e.assertEqual=e=>e,e.assertIs=function(e){},e.assertNever=function(e){throw new Error},e.arrayToEnum=e=>{const t={};for(const n of e)t[n]=n;return t},e.getValidEnumValues=t=>{const n=e.objectKeys(t).filter((e=>"number"!=typeof t[t[e]])),s={};for(const e of n)s[e]=t[e];return e.objectValues(s)},e.objectValues=t=>e.objectKeys(t).map((function(e){return t[e]})),e.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=(e,t)=>{for(const n of e)if(t(n))return n},e.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e,t=" | "){return e.map((e=>"string"==typeof e?`'${e}'`:e)).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t}(t=e.util||(e.util={})),(e.objectUtil||(e.objectUtil={})).mergeShapes=(e,t)=>({...e,...t}),e.ZodParsedType=t.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);e.getParsedType=t=>{switch(typeof t){case"undefined":return e.ZodParsedType.undefined;case"string":return e.ZodParsedType.string;case"number":return isNaN(t)?e.ZodParsedType.nan:e.ZodParsedType.number;case"boolean":return e.ZodParsedType.boolean;case"function":return e.ZodParsedType.function;case"bigint":return e.ZodParsedType.bigint;case"symbol":return e.ZodParsedType.symbol;case"object":return Array.isArray(t)?e.ZodParsedType.array:null===t?e.ZodParsedType.null:t.then&&"function"==typeof t.then&&t.catch&&"function"==typeof t.catch?e.ZodParsedType.promise:"undefined"!=typeof Map&&t instanceof Map?e.ZodParsedType.map:"undefined"!=typeof Set&&t instanceof Set?e.ZodParsedType.set:"undefined"!=typeof Date&&t instanceof Date?e.ZodParsedType.date:e.ZodParsedType.object;default:return e.ZodParsedType.unknown}}}(d);var c={};Object.defineProperty(c,"__esModule",{value:!0}),c.ZodError=c.quotelessJson=c.ZodIssueCode=void 0;const l=d;c.ZodIssueCode=l.util.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);c.quotelessJson=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class u extends Error{constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const t=e||function(e){return e.message},n={_errors:[]},s=e=>{for(const r of e.issues)if("invalid_union"===r.code)r.unionErrors.map(s);else if("invalid_return_type"===r.code)s(r.returnTypeError);else if("invalid_arguments"===r.code)s(r.argumentsError);else if(0===r.path.length)n._errors.push(t(r));else{let e=n,s=0;for(;s<r.path.length;){const n=r.path[s];s===r.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(r))):e[n]=e[n]||{_errors:[]},e=e[n],s++}}};return s(this),n}toString(){return this.message}get message(){return JSON.stringify(this.issues,l.util.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=(e=>e.message)){const t={},n=[];for(const s of this.issues)s.path.length>0?(t[s.path[0]]=t[s.path[0]]||[],t[s.path[0]].push(e(s))):n.push(e(s));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}}c.ZodError=u,u.create=e=>new u(e),Object.defineProperty(o,"__esModule",{value:!0});const p=d,h=c;o.default=(e,t)=>{let n;switch(e.code){case h.ZodIssueCode.invalid_type:n=e.received===p.ZodParsedType.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case h.ZodIssueCode.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,p.util.jsonStringifyReplacer)}`;break;case h.ZodIssueCode.unrecognized_keys:n=`Unrecognized key(s) in object: ${p.util.joinValues(e.keys,", ")}`;break;case h.ZodIssueCode.invalid_union:n="Invalid input";break;case h.ZodIssueCode.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${p.util.joinValues(e.options)}`;break;case h.ZodIssueCode.invalid_enum_value:n=`Invalid enum value. Expected ${p.util.joinValues(e.options)}, received '${e.received}'`;break;case h.ZodIssueCode.invalid_arguments:n="Invalid function arguments";break;case h.ZodIssueCode.invalid_return_type:n="Invalid function return type";break;case h.ZodIssueCode.invalid_date:n="Invalid date";break;case h.ZodIssueCode.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:p.util.assertNever(e.validation):n="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case h.ZodIssueCode.too_small:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case h.ZodIssueCode.too_big:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case h.ZodIssueCode.custom:n="Invalid input";break;case h.ZodIssueCode.invalid_intersection_types:n="Intersection results could not be merged";break;case h.ZodIssueCode.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case h.ZodIssueCode.not_finite:n="Number must be finite";break;default:n=t.defaultError,p.util.assertNever(e)}return{message:n}};var m=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i,"__esModule",{value:!0}),i.getErrorMap=i.setErrorMap=i.defaultErrorMap=void 0;const g=m(o);i.defaultErrorMap=g.default;let f=g.default;i.setErrorMap=function(e){f=e},i.getErrorMap=function(){return f};var v={};!function(t){var n=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isAsync=t.isValid=t.isDirty=t.isAborted=t.OK=t.DIRTY=t.INVALID=t.ParseStatus=t.addIssueToContext=t.EMPTY_PATH=t.makeIssue=void 0;const s=i,r=n(o);t.makeIssue=e=>{const{data:t,path:n,errorMaps:s,issueData:r}=e,a=[...n,...r.path||[]],i={...r,path:a};let o="";const d=s.filter((e=>!!e)).slice().reverse();for(const e of d)o=e(i,{data:t,defaultError:o}).message;return{...r,path:a,message:r.message||o}},t.EMPTY_PATH=[],t.addIssueToContext=function(e,n){const a=(0,t.makeIssue)({issueData:n,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,(0,s.getErrorMap)(),r.default].filter((e=>!!e))});e.common.issues.push(a)};class a{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,n){const s=[];for(const r of n){if("aborted"===r.status)return t.INVALID;"dirty"===r.status&&e.dirty(),s.push(r.value)}return{status:e.value,value:s}}static async mergeObjectAsync(e,t){const n=[];for(const e of t)n.push({key:await e.key,value:await e.value});return a.mergeObjectSync(e,n)}static mergeObjectSync(e,n){const s={};for(const r of n){const{key:n,value:a}=r;if("aborted"===n.status)return t.INVALID;if("aborted"===a.status)return t.INVALID;"dirty"===n.status&&e.dirty(),"dirty"===a.status&&e.dirty(),(void 0!==a.value||r.alwaysSet)&&(s[n.value]=a.value)}return{status:e.value,value:s}}}t.ParseStatus=a,t.INVALID=Object.freeze({status:"aborted"});t.DIRTY=e=>({status:"dirty",value:e});t.OK=e=>({status:"valid",value:e});t.isAborted=e=>"aborted"===e.status;t.isDirty=e=>"dirty"===e.status;t.isValid=e=>"valid"===e.status;t.isAsync=e=>"undefined"!=typeof Promise&&e instanceof Promise}(v);var y={};Object.defineProperty(y,"__esModule",{value:!0});var x,b={},C={};x=C,Object.defineProperty(x,"__esModule",{value:!0}),x.errorUtil=void 0,function(e){e.errToObj=e=>"string"==typeof e?{message:e}:e||{},e.toString=e=>"string"==typeof e?e:null==e?void 0:e.message}(x.errorUtil||(x.errorUtil={})),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.discriminatedUnion=e.date=e.boolean=e.bigint=e.array=e.any=e.coerce=e.ZodFirstPartyTypeKind=e.late=e.ZodSchema=e.Schema=e.custom=e.ZodPipeline=e.ZodBranded=e.BRAND=e.ZodNaN=e.ZodCatch=e.ZodDefault=e.ZodNullable=e.ZodOptional=e.ZodTransformer=e.ZodEffects=e.ZodPromise=e.ZodNativeEnum=e.ZodEnum=e.ZodLiteral=e.ZodLazy=e.ZodFunction=e.ZodSet=e.ZodMap=e.ZodRecord=e.ZodTuple=e.ZodIntersection=e.ZodDiscriminatedUnion=e.ZodUnion=e.ZodObject=e.ZodArray=e.ZodVoid=e.ZodNever=e.ZodUnknown=e.ZodAny=e.ZodNull=e.ZodUndefined=e.ZodSymbol=e.ZodDate=e.ZodBoolean=e.ZodBigInt=e.ZodNumber=e.ZodString=e.ZodType=void 0,e.NEVER=e.void=e.unknown=e.union=e.undefined=e.tuple=e.transformer=e.symbol=e.string=e.strictObject=e.set=e.record=e.promise=e.preprocess=e.pipeline=e.ostring=e.optional=e.onumber=e.oboolean=e.object=e.number=e.nullable=e.null=e.never=e.nativeEnum=e.nan=e.map=e.literal=e.lazy=e.intersection=e.instanceof=e.function=e.enum=e.effect=void 0;const t=i,n=C,s=v,r=d,a=c;class o{constructor(e,t,n,s){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=s}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const l=(e,t)=>{if((0,s.isValid)(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new a.ZodError(e.common.issues);return this._error=t,this._error}}};function u(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:s,description:r}=e;if(t&&(n||s))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');if(t)return{errorMap:t,description:r};return{errorMap:(e,t)=>"invalid_type"!==e.code?{message:t.defaultError}:void 0===t.data?{message:null!=s?s:t.defaultError}:{message:null!=n?n:t.defaultError},description:r}}class p{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return(0,r.getParsedType)(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:(0,r.getParsedType)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new s.ParseStatus,ctx:{common:e.parent.common,data:e.data,parsedType:(0,r.getParsedType)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if((0,s.isAsync)(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){var n;const s={common:{issues:[],async:null!==(n=null==t?void 0:t.async)&&void 0!==n&&n,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,r.getParsedType)(e)},a=this._parseSync({data:e,path:s.path,parent:s});return l(s,a)}async parseAsync(e,t){const n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){const n={common:{issues:[],contextualErrorMap:null==t?void 0:t.errorMap,async:!0},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,r.getParsedType)(e)},a=this._parse({data:e,path:n.path,parent:n}),i=await((0,s.isAsync)(a)?a:Promise.resolve(a));return l(n,i)}refine(e,t){const n=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement(((t,s)=>{const r=e(t),i=()=>s.addIssue({code:a.ZodIssueCode.custom,...n(t)});return"undefined"!=typeof Promise&&r instanceof Promise?r.then((e=>!!e||(i(),!1))):!!r||(i(),!1)}))}refinement(e,t){return this._refinement(((n,s)=>!!e(n)||(s.addIssue("function"==typeof t?t(n,s):t),!1)))}_refinement(e){return new ne({schema:this,typeName:le.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return se.create(this,this._def)}nullable(){return re.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return z.create(this,this._def)}promise(){return te.create(this,this._def)}or(e){return B.create([this,e],this._def)}and(e){return F.create(this,e,this._def)}transform(e){return new ne({...u(this._def),schema:this,typeName:le.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new ae({...u(this._def),innerType:this,defaultValue:t,typeName:le.ZodDefault})}brand(){return new de({typeName:le.ZodBranded,type:this,...u(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new ie({...u(this._def),innerType:this,catchValue:t,typeName:le.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return ce.create(this,e)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}e.ZodType=p,e.Schema=p,e.ZodSchema=p;const h=/^c[^\s-]{8,}$/i,m=/^[a-z][a-z0-9]*$/,g=/[0-9A-HJKMNP-TV-Z]{26}/,f=/^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i,y=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\])|(\[IPv6:(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))\])|([A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])*(\.[A-Za-z]{2,})+))$/,x=/^(\p{Extended_Pictographic}|\p{Emoji_Component})+$/u,b=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,w=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/;function _(e,t){return!("v4"!==t&&t||!b.test(e))||!("v6"!==t&&t||!w.test(e))}class I extends p{constructor(){super(...arguments),this._regex=(e,t,s)=>this.refinement((t=>e.test(t)),{validation:t,code:a.ZodIssueCode.invalid_string,...n.errorUtil.errToObj(s)}),this.nonempty=e=>this.min(1,n.errorUtil.errToObj(e)),this.trim=()=>new I({...this._def,checks:[...this._def.checks,{kind:"trim"}]}),this.toLowerCase=()=>new I({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]}),this.toUpperCase=()=>new I({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}_parse(e){this._def.coerce&&(e.data=String(e.data));if(this._getType(e)!==r.ZodParsedType.string){const t=this._getOrReturnCtx(e);return(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.invalid_type,expected:r.ZodParsedType.string,received:t.parsedType}),s.INVALID}const t=new s.ParseStatus;let n;for(const o of this._def.checks)if("min"===o.kind)e.data.length<o.value&&(n=this._getOrReturnCtx(e,n),(0,s.addIssueToContext)(n,{code:a.ZodIssueCode.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),t.dirty());else if("max"===o.kind)e.data.length>o.value&&(n=this._getOrReturnCtx(e,n),(0,s.addIssueToContext)(n,{code:a.ZodIssueCode.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),t.dirty());else if("length"===o.kind){const r=e.data.length>o.value,i=e.data.length<o.value;(r||i)&&(n=this._getOrReturnCtx(e,n),r?(0,s.addIssueToContext)(n,{code:a.ZodIssueCode.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):i&&(0,s.addIssueToContext)(n,{code:a.ZodIssueCode.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),t.dirty())}else if("email"===o.kind)y.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,s.addIssueToContext)(n,{validation:"email",code:a.ZodIssueCode.invalid_string,message:o.message}),t.dirty());else if("emoji"===o.kind)x.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,s.addIssueToContext)(n,{validation:"emoji",code:a.ZodIssueCode.invalid_string,message:o.message}),t.dirty());else if("uuid"===o.kind)f.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,s.addIssueToContext)(n,{validation:"uuid",code:a.ZodIssueCode.invalid_string,message:o.message}),t.dirty());else if("cuid"===o.kind)h.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,s.addIssueToContext)(n,{validation:"cuid",code:a.ZodIssueCode.invalid_string,message:o.message}),t.dirty());else if("cuid2"===o.kind)m.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,s.addIssueToContext)(n,{validation:"cuid2",code:a.ZodIssueCode.invalid_string,message:o.message}),t.dirty());else if("ulid"===o.kind)g.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,s.addIssueToContext)(n,{validation:"ulid",code:a.ZodIssueCode.invalid_string,message:o.message}),t.dirty());else if("url"===o.kind)try{new URL(e.data)}catch(r){n=this._getOrReturnCtx(e,n),(0,s.addIssueToContext)(n,{validation:"url",code:a.ZodIssueCode.invalid_string,message:o.message}),t.dirty()}else if("regex"===o.kind){o.regex.lastIndex=0;o.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,s.addIssueToContext)(n,{validation:"regex",code:a.ZodIssueCode.invalid_string,message:o.message}),t.dirty())}else if("trim"===o.kind)e.data=e.data.trim();else if("includes"===o.kind)e.data.includes(o.value,o.position)||(n=this._getOrReturnCtx(e,n),(0,s.addIssueToContext)(n,{code:a.ZodIssueCode.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),t.dirty());else if("toLowerCase"===o.kind)e.data=e.data.toLowerCase();else if("toUpperCase"===o.kind)e.data=e.data.toUpperCase();else if("startsWith"===o.kind)e.data.startsWith(o.value)||(n=this._getOrReturnCtx(e,n),(0,s.addIssueToContext)(n,{code:a.ZodIssueCode.invalid_string,validation:{startsWith:o.value},message:o.message}),t.dirty());else if("endsWith"===o.kind)e.data.endsWith(o.value)||(n=this._getOrReturnCtx(e,n),(0,s.addIssueToContext)(n,{code:a.ZodIssueCode.invalid_string,validation:{endsWith:o.value},message:o.message}),t.dirty());else if("datetime"===o.kind){((i=o).precision?i.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${i.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${i.precision}}Z$`):0===i.precision?i.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):i.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$")).test(e.data)||(n=this._getOrReturnCtx(e,n),(0,s.addIssueToContext)(n,{code:a.ZodIssueCode.invalid_string,validation:"datetime",message:o.message}),t.dirty())}else"ip"===o.kind?_(e.data,o.version)||(n=this._getOrReturnCtx(e,n),(0,s.addIssueToContext)(n,{validation:"ip",code:a.ZodIssueCode.invalid_string,message:o.message}),t.dirty()):r.util.assertNever(o);var i;return{status:t.value,value:e.data}}_addCheck(e){return new I({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...n.errorUtil.errToObj(e)})}url(e){return this._addCheck({kind:"url",...n.errorUtil.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...n.errorUtil.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...n.errorUtil.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...n.errorUtil.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...n.errorUtil.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...n.errorUtil.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...n.errorUtil.errToObj(e)})}datetime(e){var t;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,offset:null!==(t=null==e?void 0:e.offset)&&void 0!==t&&t,...n.errorUtil.errToObj(null==e?void 0:e.message)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...n.errorUtil.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...n.errorUtil.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...n.errorUtil.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...n.errorUtil.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...n.errorUtil.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...n.errorUtil.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...n.errorUtil.errToObj(t)})}get isDatetime(){return!!this._def.checks.find((e=>"datetime"===e.kind))}get isEmail(){return!!this._def.checks.find((e=>"email"===e.kind))}get isURL(){return!!this._def.checks.find((e=>"url"===e.kind))}get isEmoji(){return!!this._def.checks.find((e=>"emoji"===e.kind))}get isUUID(){return!!this._def.checks.find((e=>"uuid"===e.kind))}get isCUID(){return!!this._def.checks.find((e=>"cuid"===e.kind))}get isCUID2(){return!!this._def.checks.find((e=>"cuid2"===e.kind))}get isULID(){return!!this._def.checks.find((e=>"ulid"===e.kind))}get isIP(){return!!this._def.checks.find((e=>"ip"===e.kind))}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function S(e,t){const n=(e.toString().split(".")[1]||"").length,s=(t.toString().split(".")[1]||"").length,r=n>s?n:s;return parseInt(e.toFixed(r).replace(".",""))%parseInt(t.toFixed(r).replace(".",""))/Math.pow(10,r)}e.ZodString=I,I.create=e=>{var t;return new I({checks:[],typeName:le.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...u(e)})};class T extends p{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){this._def.coerce&&(e.data=Number(e.data));if(this._getType(e)!==r.ZodParsedType.number){const t=this._getOrReturnCtx(e);return(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.invalid_type,expected:r.ZodParsedType.number,received:t.parsedType}),s.INVALID}let t;const n=new s.ParseStatus;for(const i of this._def.checks)if("int"===i.kind)r.util.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.invalid_type,expected:"integer",received:"float",message:i.message}),n.dirty());else if("min"===i.kind){(i.inclusive?e.data<i.value:e.data<=i.value)&&(t=this._getOrReturnCtx(e,t),(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty())}else if("max"===i.kind){(i.inclusive?e.data>i.value:e.data>=i.value)&&(t=this._getOrReturnCtx(e,t),(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty())}else"multipleOf"===i.kind?0!==S(e.data,i.value)&&(t=this._getOrReturnCtx(e,t),(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):"finite"===i.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.not_finite,message:i.message}),n.dirty()):r.util.assertNever(i);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,n.errorUtil.toString(t))}gt(e,t){return this.setLimit("min",e,!1,n.errorUtil.toString(t))}lte(e,t){return this.setLimit("max",e,!0,n.errorUtil.toString(t))}lt(e,t){return this.setLimit("max",e,!1,n.errorUtil.toString(t))}setLimit(e,t,s,r){return new T({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:n.errorUtil.toString(r)}]})}_addCheck(e){return new T({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:n.errorUtil.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:n.errorUtil.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:n.errorUtil.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:n.errorUtil.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:n.errorUtil.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:n.errorUtil.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:n.errorUtil.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:n.errorUtil.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:n.errorUtil.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find((e=>"int"===e.kind||"multipleOf"===e.kind&&r.util.isInteger(e.value)))}get isFinite(){let e=null,t=null;for(const n of this._def.checks){if("finite"===n.kind||"int"===n.kind||"multipleOf"===n.kind)return!0;"min"===n.kind?(null===t||n.value>t)&&(t=n.value):"max"===n.kind&&(null===e||n.value<e)&&(e=n.value)}return Number.isFinite(t)&&Number.isFinite(e)}}e.ZodNumber=T,T.create=e=>new T({checks:[],typeName:le.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...u(e)});class E extends p{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){this._def.coerce&&(e.data=BigInt(e.data));if(this._getType(e)!==r.ZodParsedType.bigint){const t=this._getOrReturnCtx(e);return(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.invalid_type,expected:r.ZodParsedType.bigint,received:t.parsedType}),s.INVALID}let t;const n=new s.ParseStatus;for(const i of this._def.checks)if("min"===i.kind){(i.inclusive?e.data<i.value:e.data<=i.value)&&(t=this._getOrReturnCtx(e,t),(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty())}else if("max"===i.kind){(i.inclusive?e.data>i.value:e.data>=i.value)&&(t=this._getOrReturnCtx(e,t),(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty())}else"multipleOf"===i.kind?e.data%i.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):r.util.assertNever(i);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,n.errorUtil.toString(t))}gt(e,t){return this.setLimit("min",e,!1,n.errorUtil.toString(t))}lte(e,t){return this.setLimit("max",e,!0,n.errorUtil.toString(t))}lt(e,t){return this.setLimit("max",e,!1,n.errorUtil.toString(t))}setLimit(e,t,s,r){return new E({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:n.errorUtil.toString(r)}]})}_addCheck(e){return new E({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:n.errorUtil.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:n.errorUtil.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:n.errorUtil.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:n.errorUtil.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:n.errorUtil.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}e.ZodBigInt=E,E.create=e=>{var t;return new E({checks:[],typeName:le.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...u(e)})};class P extends p{_parse(e){this._def.coerce&&(e.data=Boolean(e.data));if(this._getType(e)!==r.ZodParsedType.boolean){const t=this._getOrReturnCtx(e);return(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.invalid_type,expected:r.ZodParsedType.boolean,received:t.parsedType}),s.INVALID}return(0,s.OK)(e.data)}}e.ZodBoolean=P,P.create=e=>new P({typeName:le.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...u(e)});class k extends p{_parse(e){this._def.coerce&&(e.data=new Date(e.data));if(this._getType(e)!==r.ZodParsedType.date){const t=this._getOrReturnCtx(e);return(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.invalid_type,expected:r.ZodParsedType.date,received:t.parsedType}),s.INVALID}if(isNaN(e.data.getTime())){const t=this._getOrReturnCtx(e);return(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.invalid_date}),s.INVALID}const t=new s.ParseStatus;let n;for(const i of this._def.checks)"min"===i.kind?e.data.getTime()<i.value&&(n=this._getOrReturnCtx(e,n),(0,s.addIssueToContext)(n,{code:a.ZodIssueCode.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),t.dirty()):"max"===i.kind?e.data.getTime()>i.value&&(n=this._getOrReturnCtx(e,n),(0,s.addIssueToContext)(n,{code:a.ZodIssueCode.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),t.dirty()):r.util.assertNever(i);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new k({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:n.errorUtil.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:n.errorUtil.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}e.ZodDate=k,k.create=e=>new k({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:le.ZodDate,...u(e)});class N extends p{_parse(e){if(this._getType(e)!==r.ZodParsedType.symbol){const t=this._getOrReturnCtx(e);return(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.invalid_type,expected:r.ZodParsedType.symbol,received:t.parsedType}),s.INVALID}return(0,s.OK)(e.data)}}e.ZodSymbol=N,N.create=e=>new N({typeName:le.ZodSymbol,...u(e)});class Z extends p{_parse(e){if(this._getType(e)!==r.ZodParsedType.undefined){const t=this._getOrReturnCtx(e);return(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.invalid_type,expected:r.ZodParsedType.undefined,received:t.parsedType}),s.INVALID}return(0,s.OK)(e.data)}}e.ZodUndefined=Z,Z.create=e=>new Z({typeName:le.ZodUndefined,...u(e)});class O extends p{_parse(e){if(this._getType(e)!==r.ZodParsedType.null){const t=this._getOrReturnCtx(e);return(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.invalid_type,expected:r.ZodParsedType.null,received:t.parsedType}),s.INVALID}return(0,s.OK)(e.data)}}e.ZodNull=O,O.create=e=>new O({typeName:le.ZodNull,...u(e)});class D extends p{constructor(){super(...arguments),this._any=!0}_parse(e){return(0,s.OK)(e.data)}}e.ZodAny=D,D.create=e=>new D({typeName:le.ZodAny,...u(e)});class M extends p{constructor(){super(...arguments),this._unknown=!0}_parse(e){return(0,s.OK)(e.data)}}e.ZodUnknown=M,M.create=e=>new M({typeName:le.ZodUnknown,...u(e)});class j extends p{_parse(e){const t=this._getOrReturnCtx(e);return(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.invalid_type,expected:r.ZodParsedType.never,received:t.parsedType}),s.INVALID}}e.ZodNever=j,j.create=e=>new j({typeName:le.ZodNever,...u(e)});class R extends p{_parse(e){if(this._getType(e)!==r.ZodParsedType.undefined){const t=this._getOrReturnCtx(e);return(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.invalid_type,expected:r.ZodParsedType.void,received:t.parsedType}),s.INVALID}return(0,s.OK)(e.data)}}e.ZodVoid=R,R.create=e=>new R({typeName:le.ZodVoid,...u(e)});class z extends p{_parse(e){const{ctx:t,status:n}=this._processInputParams(e),i=this._def;if(t.parsedType!==r.ZodParsedType.array)return(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.invalid_type,expected:r.ZodParsedType.array,received:t.parsedType}),s.INVALID;if(null!==i.exactLength){const e=t.data.length>i.exactLength.value,r=t.data.length<i.exactLength.value;(e||r)&&((0,s.addIssueToContext)(t,{code:e?a.ZodIssueCode.too_big:a.ZodIssueCode.too_small,minimum:r?i.exactLength.value:void 0,maximum:e?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),n.dirty())}if(null!==i.minLength&&t.data.length<i.minLength.value&&((0,s.addIssueToContext)(t,{code:a.ZodIssueCode.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),null!==i.maxLength&&t.data.length>i.maxLength.value&&((0,s.addIssueToContext)(t,{code:a.ZodIssueCode.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map(((e,n)=>i.type._parseAsync(new o(t,e,t.path,n))))).then((e=>s.ParseStatus.mergeArray(n,e)));const d=[...t.data].map(((e,n)=>i.type._parseSync(new o(t,e,t.path,n))));return s.ParseStatus.mergeArray(n,d)}get element(){return this._def.type}min(e,t){return new z({...this._def,minLength:{value:e,message:n.errorUtil.toString(t)}})}max(e,t){return new z({...this._def,maxLength:{value:e,message:n.errorUtil.toString(t)}})}length(e,t){return new z({...this._def,exactLength:{value:e,message:n.errorUtil.toString(t)}})}nonempty(e){return this.min(1,e)}}function A(e){if(e instanceof L){const t={};for(const n in e.shape){const s=e.shape[n];t[n]=se.create(A(s))}return new L({...e._def,shape:()=>t})}return e instanceof z?new z({...e._def,type:A(e.element)}):e instanceof se?se.create(A(e.unwrap())):e instanceof re?re.create(A(e.unwrap())):e instanceof q?q.create(e.items.map((e=>A(e)))):e}e.ZodArray=z,z.create=(e,t)=>new z({type:e,minLength:null,maxLength:null,exactLength:null,typeName:le.ZodArray,...u(t)});class L extends p{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=r.util.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==r.ZodParsedType.object){const t=this._getOrReturnCtx(e);return(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.invalid_type,expected:r.ZodParsedType.object,received:t.parsedType}),s.INVALID}const{status:t,ctx:n}=this._processInputParams(e),{shape:i,keys:d}=this._getCached(),c=[];if(!(this._def.catchall instanceof j&&"strip"===this._def.unknownKeys))for(const e in n.data)d.includes(e)||c.push(e);const l=[];for(const e of d){const t=i[e],s=n.data[e];l.push({key:{status:"valid",value:e},value:t._parse(new o(n,s,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof j){const e=this._def.unknownKeys;if("passthrough"===e)for(const e of c)l.push({key:{status:"valid",value:e},value:{status:"valid",value:n.data[e]}});else if("strict"===e)c.length>0&&((0,s.addIssueToContext)(n,{code:a.ZodIssueCode.unrecognized_keys,keys:c}),t.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of c){const s=n.data[t];l.push({key:{status:"valid",value:t},value:e._parse(new o(n,s,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then((async()=>{const e=[];for(const t of l){const n=await t.key;e.push({key:n,value:await t.value,alwaysSet:t.alwaysSet})}return e})).then((e=>s.ParseStatus.mergeObjectSync(t,e))):s.ParseStatus.mergeObjectSync(t,l)}get shape(){return this._def.shape()}strict(e){return n.errorUtil.errToObj,new L({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,s)=>{var r,a,i,o;const d=null!==(i=null===(a=(r=this._def).errorMap)||void 0===a?void 0:a.call(r,t,s).message)&&void 0!==i?i:s.defaultError;return"unrecognized_keys"===t.code?{message:null!==(o=n.errorUtil.errToObj(e).message)&&void 0!==o?o:d}:{message:d}}}:{}})}strip(){return new L({...this._def,unknownKeys:"strip"})}passthrough(){return new L({...this._def,unknownKeys:"passthrough"})}extend(e){return new L({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new L({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:le.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new L({...this._def,catchall:e})}pick(e){const t={};return r.util.objectKeys(e).forEach((n=>{e[n]&&this.shape[n]&&(t[n]=this.shape[n])})),new L({...this._def,shape:()=>t})}omit(e){const t={};return r.util.objectKeys(this.shape).forEach((n=>{e[n]||(t[n]=this.shape[n])})),new L({...this._def,shape:()=>t})}deepPartial(){return A(this)}partial(e){const t={};return r.util.objectKeys(this.shape).forEach((n=>{const s=this.shape[n];e&&!e[n]?t[n]=s:t[n]=s.optional()})),new L({...this._def,shape:()=>t})}required(e){const t={};return r.util.objectKeys(this.shape).forEach((n=>{if(e&&!e[n])t[n]=this.shape[n];else{let e=this.shape[n];for(;e instanceof se;)e=e._def.innerType;t[n]=e}})),new L({...this._def,shape:()=>t})}keyof(){return Q(r.util.objectKeys(this.shape))}}e.ZodObject=L,L.create=(e,t)=>new L({shape:()=>e,unknownKeys:"strip",catchall:j.create(),typeName:le.ZodObject,...u(t)}),L.strictCreate=(e,t)=>new L({shape:()=>e,unknownKeys:"strict",catchall:j.create(),typeName:le.ZodObject,...u(t)}),L.lazycreate=(e,t)=>new L({shape:e,unknownKeys:"strip",catchall:j.create(),typeName:le.ZodObject,...u(t)});class B extends p{_parse(e){const{ctx:t}=this._processInputParams(e),n=this._def.options;if(t.common.async)return Promise.all(n.map((async e=>{const n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}}))).then((function(e){for(const t of e)if("valid"===t.result.status)return t.result;for(const n of e)if("dirty"===n.result.status)return t.common.issues.push(...n.ctx.common.issues),n.result;const n=e.map((e=>new a.ZodError(e.ctx.common.issues)));return(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.invalid_union,unionErrors:n}),s.INVALID}));{let e;const r=[];for(const s of n){const n={...t,common:{...t.common,issues:[]},parent:null},a=s._parseSync({data:t.data,path:t.path,parent:n});if("valid"===a.status)return a;"dirty"!==a.status||e||(e={result:a,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const i=r.map((e=>new a.ZodError(e)));return(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.invalid_union,unionErrors:i}),s.INVALID}}get options(){return this._def.options}}e.ZodUnion=B,B.create=(e,t)=>new B({options:e,typeName:le.ZodUnion,...u(t)});const V=e=>e instanceof G?V(e.schema):e instanceof ne?V(e.innerType()):e instanceof Y?[e.value]:e instanceof X?e.options:e instanceof ee?Object.keys(e.enum):e instanceof ae?V(e._def.innerType):e instanceof Z?[void 0]:e instanceof O?[null]:null;class U extends p{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==r.ZodParsedType.object)return(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.invalid_type,expected:r.ZodParsedType.object,received:t.parsedType}),s.INVALID;const n=this.discriminator,i=t.data[n],o=this.optionsMap.get(i);return o?t.common.async?o._parseAsync({data:t.data,path:t.path,parent:t}):o._parseSync({data:t.data,path:t.path,parent:t}):((0,s.addIssueToContext)(t,{code:a.ZodIssueCode.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),s.INVALID)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,n){const s=new Map;for(const n of t){const t=V(n.shape[e]);if(!t)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const r of t){if(s.has(r))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(r)}`);s.set(r,n)}}return new U({typeName:le.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:s,...u(n)})}}function $(e,t){const n=(0,r.getParsedType)(e),s=(0,r.getParsedType)(t);if(e===t)return{valid:!0,data:e};if(n===r.ZodParsedType.object&&s===r.ZodParsedType.object){const n=r.util.objectKeys(t),s=r.util.objectKeys(e).filter((e=>-1!==n.indexOf(e))),a={...e,...t};for(const n of s){const s=$(e[n],t[n]);if(!s.valid)return{valid:!1};a[n]=s.data}return{valid:!0,data:a}}if(n===r.ZodParsedType.array&&s===r.ZodParsedType.array){if(e.length!==t.length)return{valid:!1};const n=[];for(let s=0;s<e.length;s++){const r=$(e[s],t[s]);if(!r.valid)return{valid:!1};n.push(r.data)}return{valid:!0,data:n}}return n===r.ZodParsedType.date&&s===r.ZodParsedType.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}e.ZodDiscriminatedUnion=U;class F extends p{_parse(e){const{status:t,ctx:n}=this._processInputParams(e),r=(e,r)=>{if((0,s.isAborted)(e)||(0,s.isAborted)(r))return s.INVALID;const i=$(e.value,r.value);return i.valid?(((0,s.isDirty)(e)||(0,s.isDirty)(r))&&t.dirty(),{status:t.value,value:i.data}):((0,s.addIssueToContext)(n,{code:a.ZodIssueCode.invalid_intersection_types}),s.INVALID)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then((([e,t])=>r(e,t))):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}e.ZodIntersection=F,F.create=(e,t,n)=>new F({left:e,right:t,typeName:le.ZodIntersection,...u(n)});class q extends p{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==r.ZodParsedType.array)return(0,s.addIssueToContext)(n,{code:a.ZodIssueCode.invalid_type,expected:r.ZodParsedType.array,received:n.parsedType}),s.INVALID;if(n.data.length<this._def.items.length)return(0,s.addIssueToContext)(n,{code:a.ZodIssueCode.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),s.INVALID;!this._def.rest&&n.data.length>this._def.items.length&&((0,s.addIssueToContext)(n,{code:a.ZodIssueCode.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const i=[...n.data].map(((e,t)=>{const s=this._def.items[t]||this._def.rest;return s?s._parse(new o(n,e,n.path,t)):null})).filter((e=>!!e));return n.common.async?Promise.all(i).then((e=>s.ParseStatus.mergeArray(t,e))):s.ParseStatus.mergeArray(t,i)}get items(){return this._def.items}rest(e){return new q({...this._def,rest:e})}}e.ZodTuple=q,q.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new q({items:e,typeName:le.ZodTuple,rest:null,...u(t)})};class W extends p{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==r.ZodParsedType.object)return(0,s.addIssueToContext)(n,{code:a.ZodIssueCode.invalid_type,expected:r.ZodParsedType.object,received:n.parsedType}),s.INVALID;const i=[],d=this._def.keyType,c=this._def.valueType;for(const e in n.data)i.push({key:d._parse(new o(n,e,n.path,e)),value:c._parse(new o(n,n.data[e],n.path,e))});return n.common.async?s.ParseStatus.mergeObjectAsync(t,i):s.ParseStatus.mergeObjectSync(t,i)}get element(){return this._def.valueType}static create(e,t,n){return new W(t instanceof p?{keyType:e,valueType:t,typeName:le.ZodRecord,...u(n)}:{keyType:I.create(),valueType:e,typeName:le.ZodRecord,...u(t)})}}e.ZodRecord=W;class K extends p{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==r.ZodParsedType.map)return(0,s.addIssueToContext)(n,{code:a.ZodIssueCode.invalid_type,expected:r.ZodParsedType.map,received:n.parsedType}),s.INVALID;const i=this._def.keyType,d=this._def.valueType,c=[...n.data.entries()].map((([e,t],s)=>({key:i._parse(new o(n,e,n.path,[s,"key"])),value:d._parse(new o(n,t,n.path,[s,"value"]))})));if(n.common.async){const e=new Map;return Promise.resolve().then((async()=>{for(const n of c){const r=await n.key,a=await n.value;if("aborted"===r.status||"aborted"===a.status)return s.INVALID;"dirty"!==r.status&&"dirty"!==a.status||t.dirty(),e.set(r.value,a.value)}return{status:t.value,value:e}}))}{const e=new Map;for(const n of c){const r=n.key,a=n.value;if("aborted"===r.status||"aborted"===a.status)return s.INVALID;"dirty"!==r.status&&"dirty"!==a.status||t.dirty(),e.set(r.value,a.value)}return{status:t.value,value:e}}}}e.ZodMap=K,K.create=(e,t,n)=>new K({valueType:t,keyType:e,typeName:le.ZodMap,...u(n)});class J extends p{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==r.ZodParsedType.set)return(0,s.addIssueToContext)(n,{code:a.ZodIssueCode.invalid_type,expected:r.ZodParsedType.set,received:n.parsedType}),s.INVALID;const i=this._def;null!==i.minSize&&n.data.size<i.minSize.value&&((0,s.addIssueToContext)(n,{code:a.ZodIssueCode.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),t.dirty()),null!==i.maxSize&&n.data.size>i.maxSize.value&&((0,s.addIssueToContext)(n,{code:a.ZodIssueCode.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),t.dirty());const d=this._def.valueType;function c(e){const n=new Set;for(const r of e){if("aborted"===r.status)return s.INVALID;"dirty"===r.status&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}const l=[...n.data.values()].map(((e,t)=>d._parse(new o(n,e,n.path,t))));return n.common.async?Promise.all(l).then((e=>c(e))):c(l)}min(e,t){return new J({...this._def,minSize:{value:e,message:n.errorUtil.toString(t)}})}max(e,t){return new J({...this._def,maxSize:{value:e,message:n.errorUtil.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}e.ZodSet=J,J.create=(e,t)=>new J({valueType:e,minSize:null,maxSize:null,typeName:le.ZodSet,...u(t)});class H extends p{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==r.ZodParsedType.function)return(0,s.addIssueToContext)(n,{code:a.ZodIssueCode.invalid_type,expected:r.ZodParsedType.function,received:n.parsedType}),s.INVALID;function i(e,r){return(0,s.makeIssue)({data:e,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,(0,t.getErrorMap)(),t.defaultErrorMap].filter((e=>!!e)),issueData:{code:a.ZodIssueCode.invalid_arguments,argumentsError:r}})}function o(e,r){return(0,s.makeIssue)({data:e,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,(0,t.getErrorMap)(),t.defaultErrorMap].filter((e=>!!e)),issueData:{code:a.ZodIssueCode.invalid_return_type,returnTypeError:r}})}const d={errorMap:n.common.contextualErrorMap},c=n.data;return this._def.returns instanceof te?(0,s.OK)((async(...e)=>{const t=new a.ZodError([]),n=await this._def.args.parseAsync(e,d).catch((n=>{throw t.addIssue(i(e,n)),t})),s=await c(...n);return await this._def.returns._def.type.parseAsync(s,d).catch((e=>{throw t.addIssue(o(s,e)),t}))})):(0,s.OK)(((...e)=>{const t=this._def.args.safeParse(e,d);if(!t.success)throw new a.ZodError([i(e,t.error)]);const n=c(...t.data),s=this._def.returns.safeParse(n,d);if(!s.success)throw new a.ZodError([o(n,s.error)]);return s.data}))}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new H({...this._def,args:q.create(e).rest(M.create())})}returns(e){return new H({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){return new H({args:e||q.create([]).rest(M.create()),returns:t||M.create(),typeName:le.ZodFunction,...u(n)})}}e.ZodFunction=H;class G extends p{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}e.ZodLazy=G,G.create=(e,t)=>new G({getter:e,typeName:le.ZodLazy,...u(t)});class Y extends p{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return(0,s.addIssueToContext)(t,{received:t.data,code:a.ZodIssueCode.invalid_literal,expected:this._def.value}),s.INVALID}return{status:"valid",value:e.data}}get value(){return this._def.value}}function Q(e,t){return new X({values:e,typeName:le.ZodEnum,...u(t)})}e.ZodLiteral=Y,Y.create=(e,t)=>new Y({value:e,typeName:le.ZodLiteral,...u(t)});class X extends p{_parse(e){if("string"!=typeof e.data){const t=this._getOrReturnCtx(e),n=this._def.values;return(0,s.addIssueToContext)(t,{expected:r.util.joinValues(n),received:t.parsedType,code:a.ZodIssueCode.invalid_type}),s.INVALID}if(-1===this._def.values.indexOf(e.data)){const t=this._getOrReturnCtx(e),n=this._def.values;return(0,s.addIssueToContext)(t,{received:t.data,code:a.ZodIssueCode.invalid_enum_value,options:n}),s.INVALID}return(0,s.OK)(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e){return X.create(e)}exclude(e){return X.create(this.options.filter((t=>!e.includes(t))))}}e.ZodEnum=X,X.create=Q;class ee extends p{_parse(e){const t=r.util.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==r.ZodParsedType.string&&n.parsedType!==r.ZodParsedType.number){const e=r.util.objectValues(t);return(0,s.addIssueToContext)(n,{expected:r.util.joinValues(e),received:n.parsedType,code:a.ZodIssueCode.invalid_type}),s.INVALID}if(-1===t.indexOf(e.data)){const e=r.util.objectValues(t);return(0,s.addIssueToContext)(n,{received:n.data,code:a.ZodIssueCode.invalid_enum_value,options:e}),s.INVALID}return(0,s.OK)(e.data)}get enum(){return this._def.values}}e.ZodNativeEnum=ee,ee.create=(e,t)=>new ee({values:e,typeName:le.ZodNativeEnum,...u(t)});class te extends p{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==r.ZodParsedType.promise&&!1===t.common.async)return(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.invalid_type,expected:r.ZodParsedType.promise,received:t.parsedType}),s.INVALID;const n=t.parsedType===r.ZodParsedType.promise?t.data:Promise.resolve(t.data);return(0,s.OK)(n.then((e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap}))))}}e.ZodPromise=te,te.create=(e,t)=>new te({type:e,typeName:le.ZodPromise,...u(t)});class ne extends p{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===le.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:n}=this._processInputParams(e),a=this._def.effect||null;if("preprocess"===a.type){const e=a.transform(n.data);return n.common.async?Promise.resolve(e).then((e=>this._def.schema._parseAsync({data:e,path:n.path,parent:n}))):this._def.schema._parseSync({data:e,path:n.path,parent:n})}const i={addIssue:e=>{(0,s.addIssueToContext)(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),"refinement"===a.type){const e=e=>{const t=a.refinement(e,i);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===n.common.async){const r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===r.status?s.INVALID:("dirty"===r.status&&t.dirty(),e(r.value),{status:t.value,value:r.value})}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then((n=>"aborted"===n.status?s.INVALID:("dirty"===n.status&&t.dirty(),e(n.value).then((()=>({status:t.value,value:n.value}))))))}if("transform"===a.type){if(!1===n.common.async){const e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!(0,s.isValid)(e))return e;const r=a.transform(e.value,i);if(r instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:r}}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then((e=>(0,s.isValid)(e)?Promise.resolve(a.transform(e.value,i)).then((e=>({status:t.value,value:e}))):e))}r.util.assertNever(a)}}e.ZodEffects=ne,e.ZodTransformer=ne,ne.create=(e,t,n)=>new ne({schema:e,typeName:le.ZodEffects,effect:t,...u(n)}),ne.createWithPreprocess=(e,t,n)=>new ne({schema:t,effect:{type:"preprocess",transform:e},typeName:le.ZodEffects,...u(n)});class se extends p{_parse(e){return this._getType(e)===r.ZodParsedType.undefined?(0,s.OK)(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}e.ZodOptional=se,se.create=(e,t)=>new se({innerType:e,typeName:le.ZodOptional,...u(t)});class re extends p{_parse(e){return this._getType(e)===r.ZodParsedType.null?(0,s.OK)(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}e.ZodNullable=re,re.create=(e,t)=>new re({innerType:e,typeName:le.ZodNullable,...u(t)});class ae extends p{_parse(e){const{ctx:t}=this._processInputParams(e);let n=t.data;return t.parsedType===r.ZodParsedType.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}e.ZodDefault=ae,ae.create=(e,t)=>new ae({innerType:e,typeName:le.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...u(t)});class ie extends p{_parse(e){const{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return(0,s.isAsync)(r)?r.then((e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new a.ZodError(n.common.issues)},input:n.data})}))):{status:"valid",value:"valid"===r.status?r.value:this._def.catchValue({get error(){return new a.ZodError(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}e.ZodCatch=ie,ie.create=(e,t)=>new ie({innerType:e,typeName:le.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...u(t)});class oe extends p{_parse(e){if(this._getType(e)!==r.ZodParsedType.nan){const t=this._getOrReturnCtx(e);return(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.invalid_type,expected:r.ZodParsedType.nan,received:t.parsedType}),s.INVALID}return{status:"valid",value:e.data}}}e.ZodNaN=oe,oe.create=e=>new oe({typeName:le.ZodNaN,...u(e)}),e.BRAND=Symbol("zod_brand");class de extends p{_parse(e){const{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}}e.ZodBranded=de;class ce extends p{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.common.async){return(async()=>{const e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?s.INVALID:"dirty"===e.status?(t.dirty(),(0,s.DIRTY)(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})()}{const e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?s.INVALID:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(e,t){return new ce({in:e,out:t,typeName:le.ZodPipeline})}}e.ZodPipeline=ce;var le;e.custom=(e,t={},n)=>e?D.create().superRefine(((s,r)=>{var a,i;if(!e(s)){const e="function"==typeof t?t(s):"string"==typeof t?{message:t}:t,o=null===(i=null!==(a=e.fatal)&&void 0!==a?a:n)||void 0===i||i,d="string"==typeof e?{message:e}:e;r.addIssue({code:"custom",...d,fatal:o})}})):D.create(),e.late={object:L.lazycreate},function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline"}(le=e.ZodFirstPartyTypeKind||(e.ZodFirstPartyTypeKind={}));e.instanceof=(t,n={message:`Input not instance of ${t.name}`})=>(0,e.custom)((e=>e instanceof t),n);const ue=I.create;e.string=ue;const pe=T.create;e.number=pe;const he=oe.create;e.nan=he;const me=E.create;e.bigint=me;const ge=P.create;e.boolean=ge;const fe=k.create;e.date=fe;const ve=N.create;e.symbol=ve;const ye=Z.create;e.undefined=ye;const xe=O.create;e.null=xe;const be=D.create;e.any=be;const Ce=M.create;e.unknown=Ce;const we=j.create;e.never=we;const _e=R.create;e.void=_e;const Ie=z.create;e.array=Ie;const Se=L.create;e.object=Se;const Te=L.strictCreate;e.strictObject=Te;const Ee=B.create;e.union=Ee;const Pe=U.create;e.discriminatedUnion=Pe;const ke=F.create;e.intersection=ke;const Ne=q.create;e.tuple=Ne;const Ze=W.create;e.record=Ze;const Oe=K.create;e.map=Oe;const De=J.create;e.set=De;const Me=H.create;e.function=Me;const je=G.create;e.lazy=je;const Re=Y.create;e.literal=Re;const ze=X.create;e.enum=ze;const Ae=ee.create;e.nativeEnum=Ae;const Le=te.create;e.promise=Le;const Be=ne.create;e.effect=Be,e.transformer=Be;const Ve=se.create;e.optional=Ve;const Ue=re.create;e.nullable=Ue;const $e=ne.createWithPreprocess;e.preprocess=$e;const Fe=ce.create;e.pipeline=Fe;e.ostring=()=>ue().optional();e.onumber=()=>pe().optional();e.oboolean=()=>ge().optional(),e.coerce={string:e=>I.create({...e,coerce:!0}),number:e=>T.create({...e,coerce:!0}),boolean:e=>P.create({...e,coerce:!0}),bigint:e=>E.create({...e,coerce:!0}),date:e=>k.create({...e,coerce:!0})},e.NEVER=s.INVALID}(b),function(t){var n=e&&e.__createBinding||(Object.create?function(e,t,n,s){void 0===s&&(s=n),Object.defineProperty(e,s,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,s){void 0===s&&(s=n),e[s]=t[n]}),s=e&&e.__exportStar||function(e,t){for(var s in e)"default"===s||Object.prototype.hasOwnProperty.call(t,s)||n(t,e,s)};Object.defineProperty(t,"__esModule",{value:!0}),s(i,t),s(v,t),s(y,t),s(d,t),s(b,t),s(c,t)}(a),function(t){var n=e&&e.__createBinding||(Object.create?function(e,t,n,s){void 0===s&&(s=n),Object.defineProperty(e,s,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,s){void 0===s&&(s=n),e[s]=t[n]}),s=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return s(t,e),t},i=e&&e.__exportStar||function(e,t){for(var s in e)"default"===s||Object.prototype.hasOwnProperty.call(t,s)||n(t,e,s)};Object.defineProperty(t,"__esModule",{value:!0}),t.z=void 0;const o=r(a);t.z=o,i(a,t),t.default=o}(r);var w={};!function(e){var t,n,s,r,a,i;Object.defineProperty(e,"__esModule",{value:!0}),e.CDP=e.Network=e.Log=e.BrowsingContext=e.Script=e.Message=void 0,function(e){let t;!function(e){e.InvalidArgument="invalid argument",e.InvalidSessionId="invalid session id",e.NoSuchAlert="no such alert",e.NoSuchFrame="no such frame",e.NoSuchHandle="no such handle",e.NoSuchNode="no such node",e.NoSuchScript="no such script",e.SessionNotCreated="session not created",e.UnknownCommand="unknown command",e.UnknownError="unknown error",e.UnsupportedOperation="unsupported operation"}(t=e.ErrorCode||(e.ErrorCode={}));class n{error;message;stacktrace;constructor(e,t,n){this.error=e,this.message=t,this.stacktrace=n}toErrorResponse(e){return{id:e,error:this.error,message:this.message,stacktrace:this.stacktrace}}}e.ErrorResponse=n;e.InvalidArgumentException=class extends n{constructor(e,n){super(t.InvalidArgument,e,n)}};e.NoSuchHandleException=class extends n{constructor(e,n){super(t.NoSuchHandle,e,n)}};e.InvalidSessionIdException=class extends n{constructor(e,n){super(t.InvalidSessionId,e,n)}};e.NoSuchAlertException=class extends n{constructor(e,n){super(t.NoSuchAlert,e,n)}};e.NoSuchFrameException=class extends n{constructor(e){super(t.NoSuchFrame,e)}};e.NoSuchNodeException=class extends n{constructor(e,n){super(t.NoSuchNode,e,n)}};e.NoSuchScriptException=class extends n{constructor(e,n){super(t.NoSuchScript,e,n)}};e.SessionNotCreatedException=class extends n{constructor(e,n){super(t.SessionNotCreated,e,n)}};e.UnknownCommandException=class extends n{constructor(e,n){super(t.UnknownCommand,e,n)}};e.UnknownErrorException=class extends n{constructor(e,n){super(t.UnknownError,e,n)}};e.UnsupportedOperationException=class extends n{constructor(e,n){super(t.UnsupportedOperation,e,n)}}}(e.Message||(e.Message={})),((t=e.Script||(e.Script={})).EventNames||(t.EventNames={})).MessageEvent="script.message",t.AllEvents="script",n=e.BrowsingContext||(e.BrowsingContext={}),(s=n.EventNames||(n.EventNames={})).LoadEvent="browsingContext.load",s.DomContentLoadedEvent="browsingContext.domContentLoaded",s.ContextCreatedEvent="browsingContext.contextCreated",s.ContextDestroyedEvent="browsingContext.contextDestroyed",n.AllEvents="browsingContext",(r=e.Log||(e.Log={})).AllEvents="log",function(e){e.LogEntryAddedEvent="log.entryAdded"}(r.EventNames||(r.EventNames={})),(a=e.Network||(e.Network={})).AllEvents="network",function(e){e.BeforeRequestSentEvent="network.beforeRequestSent",e.ResponseCompletedEvent="network.responseCompleted",e.FetchErrorEvent="network.fetchError"}(a.EventNames||(a.EventNames={})),(i=e.CDP||(e.CDP={})).AllEvents="cdp",function(e){e.EventReceivedEvent="cdp.eventReceived"}(i.EventNames||(i.EventNames={}))}(w),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Session=e.CDP=e.BrowsingContext=e.Script=e.CommonDataTypes=e.parseObject=void 0;const t=r,n=w,s=9007199254740991;function a(e,t){const s=t.safeParse(e);if(s.success)return s.data;const r=s.error.errors.map((e=>`${e.message} in ${e.path.map((e=>JSON.stringify(e))).join("/")}.`)).join(" ");throw new n.Message.InvalidArgumentException(r)}var i;e.parseObject=a,function(e){e.SharedReferenceSchema=t.z.object({sharedId:t.z.string().min(1),handle:t.z.string().optional()}),e.RemoteReferenceSchema=t.z.object({handle:t.z.string().min(1)});const n=t.z.object({type:t.z.literal("undefined")}),r=t.z.object({type:t.z.literal("null")}),a=t.z.object({type:t.z.literal("string"),value:t.z.string()}),i=t.z.enum(["NaN","-0","Infinity","-Infinity"]),o=t.z.object({type:t.z.literal("number"),value:t.z.union([i,t.z.number()])}),d=t.z.object({type:t.z.literal("boolean"),value:t.z.boolean()}),c=t.z.object({type:t.z.literal("bigint"),value:t.z.string()}),l=t.z.union([n,r,a,o,d,c]);e.LocalValueSchema=t.z.lazy((()=>t.z.union([l,h,m,f,v,y,x])));const u=t.z.union([e.SharedReferenceSchema,e.RemoteReferenceSchema,e.LocalValueSchema]),p=t.z.array(u),h=t.z.object({type:t.z.literal("array"),value:p}),m=t.z.object({type:t.z.literal("date"),value:t.z.string().min(1)}),g=t.z.tuple([t.z.union([t.z.string(),u]),u]),f=t.z.object({type:t.z.literal("map"),value:t.z.array(g)}),v=t.z.object({type:t.z.literal("object"),value:t.z.array(g)}),y=t.z.object({type:t.z.literal("regexp"),value:t.z.object({pattern:t.z.string(),flags:t.z.string().optional()})}),x=t.z.lazy((()=>t.z.object({type:t.z.literal("set"),value:p})));e.BrowsingContextSchema=t.z.string(),e.MaxDepthSchema=t.z.number().int().nonnegative().max(s)}(i=e.CommonDataTypes||(e.CommonDataTypes={})),function(e){const n=t.z.enum(["window","dedicated-worker","shared-worker","service-worker","worker","paint-worklet","audio-worklet","worklet"]);e.GetRealmsParametersSchema=t.z.object({context:i.BrowsingContextSchema.optional(),type:n.optional()}),e.parseGetRealmsParams=function(t){return a(t,e.GetRealmsParametersSchema)};const r=t.z.object({context:i.BrowsingContextSchema,sandbox:t.z.string().optional()}),o=t.z.object({realm:t.z.string().min(1)}),d=t.z.union([o,r]),c=t.z.enum(["root","none"]),l=t.z.object({maxDomDepth:t.z.number().int().min(0).optional(),maxObjectDepth:t.z.number().int().min(0).max(s).optional(),includeShadowTree:t.z.enum(["none","open","all"]).optional()}),u=t.z.object({expression:t.z.string(),awaitPromise:t.z.boolean(),target:d,resultOwnership:c.optional()});e.parseEvaluateParams=function(e){return a(e,u)};const p=t.z.object({target:d,handles:t.z.array(t.z.string())});e.parseDisownParams=function(e){return a(e,p)};const h=t.z.string(),m=t.z.object({channel:h,maxDepth:t.z.number().int().min(1).max(1).optional(),ownership:c.optional()});e.ChannelValueSchema=t.z.object({type:t.z.literal("channel"),value:m}),e.PreloadScriptSchema=t.z.string(),e.AddPreloadScriptParametersSchema=t.z.object({functionDeclaration:t.z.string(),arguments:t.z.array(e.ChannelValueSchema).optional(),sandbox:t.z.string().optional(),context:i.BrowsingContextSchema.optional()}),e.parseAddPreloadScriptParams=function(t){return a(t,e.AddPreloadScriptParametersSchema)},e.RemovePreloadScriptParametersSchema=t.z.object({script:e.PreloadScriptSchema}),e.parseRemovePreloadScriptParams=function(t){return a(t,e.RemovePreloadScriptParametersSchema)};const g=t.z.union([i.RemoteReferenceSchema,i.SharedReferenceSchema,i.LocalValueSchema,e.ChannelValueSchema]),f=t.z.object({functionDeclaration:t.z.string(),awaitPromise:t.z.boolean(),target:d,arguments:t.z.array(g).optional(),resultOwnership:c.optional(),serializationOptions:l.optional(),this:g.optional()});e.parseCallFunctionParams=function(e){return a(e,f)}}(e.Script||(e.Script={})),function(e){const n=t.z.object({maxDepth:i.MaxDepthSchema.optional(),root:i.BrowsingContextSchema.optional()});e.parseGetTreeParams=function(e){return a(e,n)};const s=t.z.enum(["none","interactive","complete"]),r=t.z.object({context:i.BrowsingContextSchema,url:t.z.string().url(),wait:s.optional()});e.parseNavigateParams=function(e){return a(e,r)};const o=t.z.object({type:t.z.enum(["tab","window"]),referenceContext:i.BrowsingContextSchema.optional()});e.parseCreateParams=function(e){return a(e,o)};const d=t.z.object({context:i.BrowsingContextSchema});e.parseCloseParams=function(e){return a(e,d)};const c=t.z.object({context:i.BrowsingContextSchema});e.parseCaptureScreenshotParams=function(e){return a(e,c)};const l=t.z.object({height:t.z.number().min(0).default(27.94).optional(),width:t.z.number().min(0).default(21.59).optional()}),u=t.z.object({bottom:t.z.number().min(0).default(1).optional(),left:t.z.number().min(0).default(1).optional(),right:t.z.number().min(0).default(1).optional(),top:t.z.number().min(0).default(1).optional()}),p=t.z.array(t.z.union([t.z.string().min(1),t.z.number().int().nonnegative()])).refine((e=>e.every((e=>{const t=String(e).match(/^(?:(?:\d+)|(?:\d+[-])|(?:[-]\d+)|(?:(?<start>\d+)[-](?<end>\d+)))$/),{start:n,end:s}=t?.groups??{};return!(n&&s&&Number(n)>Number(s))&&t})))),h=t.z.object({context:i.BrowsingContextSchema,background:t.z.boolean().default(!1).optional(),margin:u.optional(),orientation:t.z.enum(["portrait","landscape"]).default("portrait").optional(),page:l.optional(),pageRanges:p.default([]).optional(),scale:t.z.number().min(.1).max(2).default(1).optional(),shrinkToFit:t.z.boolean().default(!0).optional()});e.parsePrintParams=function(e){return a(e,h)}}(e.BrowsingContext||(e.BrowsingContext={})),function(e){const n=t.z.object({cdpMethod:t.z.string(),cdpParams:t.z.object({}).passthrough(),cdpSession:t.z.string().optional()});e.parseSendCommandParams=function(e){return a(e,n)};const s=t.z.object({context:i.BrowsingContextSchema});e.parseGetSessionParams=function(e){return a(e,s)}}(e.CDP||(e.CDP={})),function(e){const s=t.z.enum([n.BrowsingContext.AllEvents,...Object.values(n.BrowsingContext.EventNames),n.Log.AllEvents,...Object.values(n.Log.EventNames),n.CDP.AllEvents,...Object.values(n.CDP.EventNames),n.Network.AllEvents,...Object.values(n.Network.EventNames),n.Script.AllEvents,...Object.values(n.Script.EventNames)]),r=t.z.object({events:t.z.array(s),contexts:t.z.array(i.BrowsingContextSchema).optional()});e.parseSubscribeParams=function(e){return a(e,r)}}(e.Session||(e.Session={}))}(s);var _={},I={},S=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(I,"__esModule",{value:!0}),I.EventEmitter=void 0;const T=S((function(e){return{all:e=e||new Map,on:function(t,n){var s=e.get(t);s?s.push(n):e.set(t,[n])},off:function(t,n){var s=e.get(t);s&&(n?s.splice(s.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var s=e.get(t);s&&s.slice().map((function(e){e(n)})),(s=e.get("*"))&&s.slice().map((function(e){e(t,n)}))}}}));I.EventEmitter=class{#e=(0,T.default)();on(e,t){return this.#e.on(e,t),this}once(e,t){const n=s=>{t(s),this.off(e,n)};return this.on(e,n)}off(e,t){return this.#e.off(e,t),this}emit(e,t){this.#e.emit(e,t)}};var E={};!function(e){var t;Object.defineProperty(e,"__esModule",{value:!0}),e.LogType=void 0,(t=e.LogType||(e.LogType={})).bidi="BiDi Messages",t.browsingContexts="Browsing Contexts",t.cdp="CDP",t.system="System"}(E);var P={};Object.defineProperty(P,"__esModule",{value:!0}),P.ProcessingQueue=void 0;const k=E;P.ProcessingQueue=class{#t;#n;#s=[];#r=!1;constructor(e,t){this.#n=e,this.#t=t}add(e){this.#s.push(e),this.#a()}async#a(){if(!this.#r){for(this.#r=!0;this.#s.length>0;){const e=this.#s.shift();void 0!==e&&await e.then((e=>this.#n(e))).catch((e=>{this.#t?.(k.LogType.system,"Event was not processed:",e)}))}this.#r=!1}}};var N={},Z={},O={},D={};Object.defineProperty(D,"__esModule",{value:!0}),D.inchesFromCm=void 0,D.inchesFromCm=function(e){return e/2.54};var M={};Object.defineProperty(M,"__esModule",{value:!0}),M.Deferred=void 0;class j{#i=!1;#o;#d=()=>{};#c=()=>{};get isFinished(){return this.#i}constructor(){this.#o=new Promise(((e,t)=>{this.#d=e,this.#c=t})),this.#o.catch((()=>{}))}then(e,t){return this.#o.then(e,t)}catch(e){return this.#o.catch(e)}resolve(e){this.#i=!0,this.#d(e)}reject(e){this.#i=!0,this.#c(e)}finally(e){return this.#o.finally(e)}[Symbol.toStringTag]="Promise"}M.Deferred=j;var R={},z={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ScriptEvaluator=e.SHARED_ID_DIVIDER=void 0;const t=w;e.SHARED_ID_DIVIDER="_element_";class n{#l;constructor(e){this.#l=e}static async stringifyObject(e,t){return(await t.cdpClient.sendCommand("Runtime.callFunctionOn",{functionDeclaration:String((e=>String(e))),awaitPromise:!1,arguments:[e],returnByValue:!0,executionContextId:t.executionContextId})).result.value}async serializeCdpObject(e,t,s){const r=n.#u(e),a=await s.cdpClient.sendCommand("Runtime.callFunctionOn",{functionDeclaration:String((e=>e)),awaitPromise:!1,arguments:[r],serializationOptions:{serialization:"deep"},executionContextId:s.executionContextId});return s.cdpToBidiValue(a,t)}async scriptEvaluate(e,t,n,s,r){if(![0,void 0].includes(r?.maxDomDepth))throw new Error("serializationOptions.maxDomDepth!=0 is not supported");const a=await e.cdpClient.sendCommand("Runtime.evaluate",{contextId:e.executionContextId,expression:t,awaitPromise:n,serializationOptions:{serialization:"deep",...r?.maxObjectDepth?{}:{maxDepth:r?.maxObjectDepth}}});return a.exceptionDetails?{exceptionDetails:await this.#p(a.exceptionDetails,0,s,e),type:"exception",realm:e.realmId}:{type:"success",result:e.cdpToBidiValue(a,s),realm:e.realmId}}async callFunction(e,n,s,r,a,i,o){if(![0,void 0].includes(o?.maxDomDepth))throw new Error("serializationOptions.maxDomDepth!=0 is not supported");const d=`(...args)=>{ return _callFunction((\n${n}\n), args);\n function _callFunction(f, args) {\n const deserializedThis = args.shift();\n const deserializedArgs = args;\n return f.apply(deserializedThis, deserializedArgs);\n }}`,c=[await this.#h(s,e)];let l;c.push(...await Promise.all(r.map((async t=>this.#h(t,e)))));try{l=await e.cdpClient.sendCommand("Runtime.callFunctionOn",{functionDeclaration:d,awaitPromise:a,arguments:c,serializationOptions:{serialization:"deep",...o?.maxObjectDepth?{}:{maxDepth:o?.maxObjectDepth}},executionContextId:e.executionContextId})}catch(e){if(-32e3===e.code&&["Could not find object with given id","Argument should belong to the same JavaScript world as target object","Invalid remote object id"].includes(e.message))throw new t.Message.NoSuchHandleException("Handle was not found.");throw e}return l.exceptionDetails?{exceptionDetails:await this.#p(l.exceptionDetails,1,i,e),type:"exception",realm:e.realmId}:{type:"success",result:e.cdpToBidiValue(l,i),realm:e.realmId}}static#u(e){return void 0!==e.objectId?{objectId:e.objectId}:void 0!==e.unserializableValue?{unserializableValue:e.unserializableValue}:{value:e.value}}async#h(n,s){if("sharedId"in n){const[r,a]=n.sharedId.split(e.SHARED_ID_DIVIDER),i=parseInt(a??"");if(isNaN(i)||void 0===i||void 0===r)throw new t.Message.InvalidArgumentException(`SharedId "${n.sharedId}" should have format "{navigableId}${e.SHARED_ID_DIVIDER}{backendNodeId}".`);if(s.navigableId!==r)throw new t.Message.NoSuchNodeException(`SharedId "${n.sharedId}" belongs to different document. Current document is ${s.navigableId}.`);try{return{objectId:(await s.cdpClient.sendCommand("DOM.resolveNode",{backendNodeId:i,executionContextId:s.executionContextId})).object.objectId}}catch(e){if(-32e3===e.code&&"No node with given id found"===e.message)throw new t.Message.NoSuchNodeException(`SharedId "${n.sharedId}" was not found.`);throw e}}if("handle"in n)return{objectId:n.handle};switch(n.type){case"undefined":return{unserializableValue:"undefined"};case"null":return{unserializableValue:"null"};case"string":return{value:n.value};case"number":return"NaN"===n.value?{unserializableValue:"NaN"}:"-0"===n.value?{unserializableValue:"-0"}:"Infinity"===n.value?{unserializableValue:"Infinity"}:"-Infinity"===n.value?{unserializableValue:"-Infinity"}:{value:n.value};case"boolean":return{value:Boolean(n.value)};case"bigint":return{unserializableValue:`BigInt(${JSON.stringify(n.value)})`};case"date":return{unserializableValue:`new Date(Date.parse(${JSON.stringify(n.value)}))`};case"regexp":return{unserializableValue:`new RegExp(${JSON.stringify(n.value.pattern)}, ${JSON.stringify(n.value.flags)})`};case"map":{const e=await this.#m(n.value,s),t=await s.cdpClient.sendCommand("Runtime.callFunctionOn",{functionDeclaration:String(((...e)=>{const t=new Map;for(let n=0;n<e.length;n+=2)t.set(e[n],e[n+1]);return t})),awaitPromise:!1,arguments:e,returnByValue:!1,executionContextId:s.executionContextId});return{objectId:t.result.objectId}}case"object":{const e=await this.#m(n.value,s),t=await s.cdpClient.sendCommand("Runtime.callFunctionOn",{functionDeclaration:String(((...e)=>{const t={};for(let n=0;n<e.length;n+=2){t[e[n]]=e[n+1]}return t})),awaitPromise:!1,arguments:e,returnByValue:!1,executionContextId:s.executionContextId});return{objectId:t.result.objectId}}case"array":{const e=await this.#g(n.value,s);return{objectId:(await s.cdpClient.sendCommand("Runtime.callFunctionOn",{functionDeclaration:String(((...e)=>e)),awaitPromise:!1,arguments:e,returnByValue:!1,executionContextId:s.executionContextId})).result.objectId}}case"set":{const e=await this.#g(n.value,s);return{objectId:(await s.cdpClient.sendCommand("Runtime.callFunctionOn",{functionDeclaration:String(((...e)=>new Set(e))),awaitPromise:!1,arguments:e,returnByValue:!1,executionContextId:s.executionContextId})).result.objectId}}case"channel":{const e=(await s.cdpClient.sendCommand("Runtime.callFunctionOn",{functionDeclaration:String((()=>{const e=[];let t=null;return{async getMessage(){const n=e.length>0?Promise.resolve():new Promise((e=>{t=e}));return await n,e.shift()},sendMessage(n){e.push(n),null!==t&&(t(),t=null)}}})),returnByValue:!1,executionContextId:s.executionContextId,serializationOptions:{serialization:"deep"}})).result.objectId;this.#f(n,e,s);return{objectId:(await s.cdpClient.sendCommand("Runtime.callFunctionOn",{functionDeclaration:String((e=>e.sendMessage)),arguments:[{objectId:e}],returnByValue:!1,executionContextId:s.executionContextId,serializationOptions:{serialization:"deep"}})).result.objectId}}default:throw new Error(`Value ${JSON.stringify(n)} is not deserializable.`)}}async#m(e,t){const n=[];for(const[s,r]of e){let e;e="string"==typeof s?{value:s}:await this.#h(s,t);const a=await this.#h(r,t);n.push(e),n.push(a)}return n}async#g(e,t){return Promise.all(e.map((e=>this.#h(e,t))))}async#f(e,n,s){const r=e.value.channel;for(;;){const a=await s.cdpClient.sendCommand("Runtime.callFunctionOn",{functionDeclaration:String((async e=>e.getMessage())),arguments:[{objectId:n}],awaitPromise:!0,executionContextId:s.executionContextId,serializationOptions:{serialization:"deep"}});this.#l.registerEvent({method:t.Script.EventNames.MessageEvent,params:{channel:r,data:s.cdpToBidiValue(a,e.value.ownership??"none"),source:{realm:s.realmId,context:s.browsingContextId}}},s.browsingContextId)}}async#p(e,t,s,r){const a=e.stackTrace?.callFrames.map((e=>({url:e.url,functionName:e.functionName,lineNumber:e.lineNumber-t,columnNumber:e.columnNumber}))),i=await this.serializeCdpObject(e.exception,s,r),o=await n.stringifyObject(e.exception,r);return{exception:i,columnNumber:e.columnNumber,lineNumber:e.lineNumber-t,stackTrace:{callFrames:a||[]},text:o||e.text}}}e.ScriptEvaluator=n}(z),Object.defineProperty(R,"__esModule",{value:!0}),R.Realm=void 0;const A=E,L=z;R.Realm=class{#v;#y;#x;#b;#C;#w;#_;#I;#l;#S;sandbox;cdpSessionId;#t;constructor(e,t,n,s,r,a,i,o,d,c,l,u){this.#x=n,this.#b=s,this.#C=r,this.sandbox=o,this.#w=a,this.#_=i,this.cdpSessionId=d,this.#I=c,this.#v=e,this.#y=t,this.#l=l,this.#S=new L.ScriptEvaluator(this.#l),this.#v.realmMap.set(this.#x,this),this.#t=u}async#T(e){try{await this.cdpClient.sendCommand("Runtime.releaseObject",{objectId:e})}catch(e){if(-32e3!==e.code||"Invalid remote object id"!==e.message)throw e}}async disown(e){this.#v.knownHandlesToRealm.get(e)===this.realmId&&(await this.#T(e),this.#v.knownHandlesToRealm.delete(e))}cdpToBidiValue(e,t){const n=e.result.deepSerializedValue,s=this.deepSerializedToBiDi(n);if(e.result.objectId){const n=e.result.objectId;"root"===t?(s.handle=n,this.#v.knownHandlesToRealm.set(n,this.realmId)):this.#T(n).catch((e=>this.#t?.(A.LogType.system,e)))}return s}deepSerializedToBiDi(e){const t=e;if(Object.hasOwn(t,"weakLocalObjectReference")&&(t.internalId=`${t.weakLocalObjectReference}`,delete t.weakLocalObjectReference),"platformobject"===t.type)return{type:"object"};const n=t.value;if(void 0===n)return t;if("node"===t.type&&(Object.hasOwn(n,"backendNodeId")&&(t.sharedId=`${this.navigableId}${L.SHARED_ID_DIVIDER}${n.backendNodeId}`,delete n.backendNodeId),Object.hasOwn(n,"children")))for(const e in n.children)n.children[e]=this.deepSerializedToBiDi(n.children[e]);if(["array","set"].includes(e.type))for(const e in n)n[e]=this.deepSerializedToBiDi(n[e]);if(["object","map"].includes(e.type))for(const e in n)n[e]=[this.deepSerializedToBiDi(n[e][0]),this.deepSerializedToBiDi(n[e][1])];return t}toBiDi(){return{realm:this.realmId,origin:this.origin,type:this.type,context:this.browsingContextId,...void 0===this.sandbox?{}:{sandbox:this.sandbox}}}get realmId(){return this.#x}get navigableId(){return this.#y.findContext(this.#b)?.navigableId??"UNKNOWN"}get browsingContextId(){return this.#b}get executionContextId(){return this.#C}get origin(){return this.#w}get type(){return this.#_}get cdpClient(){return this.#I}async callFunction(e,t,n,s,r,a){const i=this.#y.getContext(this.browsingContextId);return await i.awaitUnblocked(),{result:await this.#S.callFunction(this,e,t,n,s,r,a)}}async scriptEvaluate(e,t,n,s){const r=this.#y.getContext(this.browsingContextId);return await r.awaitUnblocked(),{result:await this.#S.scriptEvaluate(this,e,t,n,s)}}async serializeCdpObject(e,t){return this.#S.serializeCdpObject(e,t,this)}async stringifyObject(e){return L.ScriptEvaluator.stringifyObject(e,this)}},Object.defineProperty(O,"__esModule",{value:!0}),O.BrowsingContextImpl=void 0;const B=D,V=w,U=E,$=M,F=R;class q{#E;#P;#k=new Set;#y;#N={documentInitialized:new $.Deferred,Page:{navigatedWithinDocument:new $.Deferred,lifecycleEvent:{DOMContentLoaded:new $.Deferred,load:new $.Deferred}}};#Z="about:blank";#l;#v;#O=null;#D;#M;#t;constructor(e,t,n,s,r,a,i){this.#D=e,this.#v=t,this.#E=n,this.#P=s,this.#l=r,this.#y=a,this.#t=i}static create(e,t,n,s,r,a,i){const o=new q(e,t,n,s,r,a,i);return o.#j(),a.addContext(o),o.isTopLevelContext()||o.parent.addChild(o.id),r.registerEvent({method:V.BrowsingContext.EventNames.ContextCreatedEvent,params:o.serializeToBidiValue()},o.id),o}get navigableId(){return this.#O}delete(){this.#R(),this.#v.deleteRealms({browsingContextId:this.id}),this.isTopLevelContext()||this.parent.#k.delete(this.id),this.#l.registerEvent({method:V.BrowsingContext.EventNames.ContextDestroyedEvent,params:this.serializeToBidiValue()},this.id),this.#y.deleteContextById(this.id)}get id(){return this.#E}get parentId(){return this.#P}get parent(){return null===this.parentId?null:this.#y.getContext(this.parentId)}get directChildren(){return[...this.#k].map((e=>this.#y.getContext(e)))}get allChildren(){const e=this.directChildren;return e.concat(...e.map((e=>e.allChildren)))}isTopLevelContext(){return null===this.#P}addChild(e){this.#k.add(e)}#R(){this.directChildren.map((e=>e.delete()))}get#z(){if(void 0===this.#M)throw new Error(`No default realm for browsing context ${this.#E}`);return this.#M}get cdpTarget(){return this.#D}updateCdpTarget(e){this.#D=e,this.#j()}get url(){return this.#Z}async awaitLoaded(){await this.#N.Page.lifecycleEvent.load}awaitUnblocked(){return this.#D.targetUnblocked}async getOrCreateSandbox(e){if(void 0===e||""===e)return this.#z;let t=this.#v.findRealms({browsingContextId:this.id,sandbox:e});if(0===t.length&&(await this.#D.cdpClient.sendCommand("Page.createIsolatedWorld",{frameId:this.id,worldName:e}),t=this.#v.findRealms({browsingContextId:this.id,sandbox:e})),1!==t.length)throw Error(`Sandbox ${e} wasn't created.`);return t[0]}serializeToBidiValue(e=0,t=!0){return{context:this.#E,url:this.url,children:e>0?this.directChildren.map((t=>t.serializeToBidiValue(e-1,!1))):null,...t?{parent:this.#P}:{}}}#j(){this.#D.cdpClient.on("Target.targetInfoChanged",(e=>{this.id===e.targetInfo.targetId&&(this.#Z=e.targetInfo.url)})),this.#D.cdpClient.on("Page.frameNavigated",(e=>{this.id===e.frame.id&&(this.#Z=e.frame.url+(e.frame.urlFragment??""),this.#R())})),this.#D.cdpClient.on("Page.navigatedWithinDocument",(e=>{this.id===e.frameId&&(this.#Z=e.url,this.#N.Page.navigatedWithinDocument.resolve(e))})),this.#D.cdpClient.on("Page.lifecycleEvent",(e=>{if(this.id!==e.frameId)return;const t=(new Date).getTime();if("init"===e.name&&(this.#A(e.loaderId),this.#N.documentInitialized.resolve()),"commit"!==e.name){if(e.loaderId===this.#O)switch(e.name){case"DOMContentLoaded":this.#N.Page.lifecycleEvent.DOMContentLoaded.resolve(e),this.#l.registerEvent({method:V.BrowsingContext.EventNames.DomContentLoadedEvent,params:{context:this.id,navigation:this.#O,timestamp:t,url:this.#Z}},this.id);break;case"load":this.#N.Page.lifecycleEvent.load.resolve(e),this.#l.registerEvent({method:V.BrowsingContext.EventNames.LoadEvent,params:{context:this.id,navigation:this.#O,timestamp:t,url:this.#Z}},this.id)}}else this.#O=e.loaderId})),this.#D.cdpClient.on("Runtime.executionContextCreated",(e=>{if(e.context.auxData.frameId!==this.id)return;if(!["default","isolated"].includes(e.context.auxData.type))return;const t=new F.Realm(this.#v,this.#y,e.context.uniqueId,this.id,e.context.id,this.#L(e),"window","isolated"===e.context.auxData.type?e.context.name:void 0,this.#D.cdpSessionId,this.#D.cdpClient,this.#l,this.#t);e.context.auxData.isDefault&&(this.#M=t)})),this.#D.cdpClient.on("Runtime.executionContextDestroyed",(e=>{this.#v.deleteRealms({cdpSessionId:this.#D.cdpSessionId,executionContextId:e.executionContextId})})),this.#D.cdpClient.on("Runtime.executionContextsCleared",(()=>{this.#v.deleteRealms({cdpSessionId:this.#D.cdpSessionId})}))}#L(e){return"isolated"===e.context.auxData.type?this.#z.origin:["://",""].includes(e.context.origin)?"null":e.context.origin}#A(e){void 0!==e&&this.#O!==e?(this.#N.documentInitialized.isFinished?this.#N.documentInitialized=new $.Deferred:this.#t?.(U.LogType.browsingContexts,"Document changed"),this.#N.Page.lifecycleEvent.DOMContentLoaded.isFinished?this.#N.Page.lifecycleEvent.DOMContentLoaded=new $.Deferred:this.#t?.(U.LogType.browsingContexts,"Document changed"),this.#N.Page.lifecycleEvent.load.isFinished?this.#N.Page.lifecycleEvent.load=new $.Deferred:this.#t?.(U.LogType.browsingContexts,"Document changed"),this.#O=e):this.#N.Page.navigatedWithinDocument.isFinished&&(this.#N.Page.navigatedWithinDocument=new $.Deferred)}async navigate(e,t){await this.awaitUnblocked();const n=await this.#D.cdpClient.sendCommand("Page.navigate",{url:e,frameId:this.id});if(n.errorText)throw new V.Message.UnknownErrorException(n.errorText);switch(this.#A(n.loaderId),t){case"none":break;case"interactive":void 0===n.loaderId?await this.#N.Page.navigatedWithinDocument:await this.#N.Page.lifecycleEvent.DOMContentLoaded;break;case"complete":void 0===n.loaderId?await this.#N.Page.navigatedWithinDocument:await this.#N.Page.lifecycleEvent.load}return{result:{navigation:n.loaderId||null,url:e}}}async captureScreenshot(){const[,e]=await Promise.all([this.#D.cdpClient.sendCommand("Page.bringToFront"),this.#D.cdpClient.sendCommand("Page.captureScreenshot",{})]);return{result:{data:e.data}}}async print(e){const t={printBackground:e.background,landscape:"landscape"===e.orientation,pageRanges:e.pageRanges?.join(",")??"",scale:e.scale,preferCSSPageSize:!e.shrinkToFit};e.margin?.bottom&&(t.marginBottom=(0,B.inchesFromCm)(e.margin.bottom)),e.margin?.left&&(t.marginLeft=(0,B.inchesFromCm)(e.margin.left)),e.margin?.right&&(t.marginRight=(0,B.inchesFromCm)(e.margin.right)),e.margin?.top&&(t.marginTop=(0,B.inchesFromCm)(e.margin.top)),e.page?.height&&(t.paperHeight=(0,B.inchesFromCm)(e.page.height)),e.page?.width&&(t.paperWidth=(0,B.inchesFromCm)(e.page.width));return{result:{data:(await this.#D.cdpClient.sendCommand("Page.printToPDF",t)).data}}}}O.BrowsingContextImpl=q;var W={},K={},J={};Object.defineProperty(J,"__esModule",{value:!0}),J.getRemoteValuesText=J.logMessageFormatter=void 0;const H=["%s","%d","%i","%f","%o","%O","%c"];function G(e){return H.some((t=>e.includes(t)))}function Y(e){let t="";const n=e[0].value.toString(),s=e.slice(1,void 0),r=n.split(new RegExp(H.map((e=>`(${e})`)).join("|"),"g"));for(const n of r)if(void 0!==n&&""!==n)if(G(n)){const r=s.shift();if(void 0===r)throw new Error(`Less value is provided: "${ee(e,!1)}"`);"%s"===n?t+=X(r):"%d"===n||"%i"===n?"bigint"===r.type||"number"===r.type||"string"===r.type?t+=parseInt(r.value.toString(),10):t+="NaN":"%f"===n?"bigint"===r.type||"number"===r.type||"string"===r.type?t+=parseFloat(r.value.toString()):t+="NaN":t+=Q(r)}else t+=n;if(s.length>0)throw new Error(`More value is provided: "${ee(e,!1)}"`);return t}function Q(e){if("array"!==e.type&&"bigint"!==e.type&&"date"!==e.type&&"number"!==e.type&&"object"!==e.type&&"string"!==e.type)return X(e);if("bigint"===e.type)return`${e.value.toString()}n`;if("number"===e.type)return e.value.toString();if(["date","string"].includes(e.type))return JSON.stringify(e.value);if("object"===e.type)return`{${e.value.map((e=>`${JSON.stringify(e[0])}:${Q(e[1])}`)).join(",")}}`;if("array"===e.type)return`[${e.value?.map((e=>Q(e))).join(",")??""}]`;throw Error(`Invalid value type: ${e.toString()}`)}function X(e){if(!Object.hasOwn(e,"value"))return e.type;switch(e.type){case"string":case"number":case"boolean":case"bigint":return String(e.value);case"regexp":return`/${e.value.pattern}/${e.value.flags??""}`;case"date":return new Date(e.value).toString();case"object":return`Object(${e.value?.length??""})`;case"array":return`Array(${e.value?.length??""})`;case"map":return`Map(${e.value.length})`;case"set":return`Set(${e.value.length})`;case"node":return"node";default:return e.type}}function ee(e,t){const n=e[0];return n?"string"===n.type&&G(n.value.toString())&&t?Y(e):e.map((e=>X(e))).join(" "):""}J.logMessageFormatter=Y,J.getRemoteValuesText=ee,Object.defineProperty(K,"__esModule",{value:!0}),K.LogManager=void 0;const te=w,ne=J;function se(e){const t=e?.callFrames.map((e=>({columnNumber:e.columnNumber,functionName:e.functionName,lineNumber:e.lineNumber,url:e.url})));return t?{callFrames:t}:void 0}class re{#l;#v;#D;constructor(e,t,n){this.#D=e,this.#v=t,this.#l=n}static create(e,t,n){const s=new re(e,t,n);return s.#B(),s}#B(){this.#V()}#V(){this.#D.cdpClient.on("Runtime.consoleAPICalled",(e=>{const t=this.#v.findRealm({cdpSessionId:this.#D.cdpSessionId,executionContextId:e.executionContextId}),n=void 0===t?Promise.resolve(e.args):Promise.all(e.args.map((e=>t.serializeCdpObject(e,"none"))));this.#l.registerPromiseEvent(n.then((n=>{return{method:te.Log.EventNames.LogEntryAddedEvent,params:{level:(s=e.type,["assert","error"].includes(s)?"error":["debug","trace"].includes(s)?"debug":["warn","warning"].includes(s)?"warn":"info"),source:{realm:t?.realmId??"UNKNOWN",context:t?.browsingContextId??"UNKNOWN"},text:(0,ne.getRemoteValuesText)(n,!0),timestamp:Math.round(e.timestamp),stackTrace:se(e.stackTrace),type:"console",method:"warning"===e.type?"warn":e.type,args:n}};var s})),t?.browsingContextId??"UNKNOWN",te.Log.EventNames.LogEntryAddedEvent)})),this.#D.cdpClient.on("Runtime.exceptionThrown",(e=>{const t=this.#v.findRealm({cdpSessionId:this.#D.cdpSessionId,executionContextId:e.exceptionDetails.executionContextId}),n=(async()=>e.exceptionDetails.exception?void 0===t?JSON.stringify(e.exceptionDetails.exception):t.stringifyObject(e.exceptionDetails.exception):e.exceptionDetails.text)();this.#l.registerPromiseEvent(n.then((n=>({method:te.Log.EventNames.LogEntryAddedEvent,params:{level:"error",source:{realm:t?.realmId??"UNKNOWN",context:t?.browsingContextId??"UNKNOWN"},text:n,timestamp:Math.round(e.timestamp),stackTrace:se(e.exceptionDetails.stackTrace),type:"javascript"}}))),t?.browsingContextId??"UNKNOWN",te.Log.EventNames.LogEntryAddedEvent)}))}}K.LogManager=re;var ae={},ie={};Object.defineProperty(ie,"__esModule",{value:!0}),ie.DefaultMap=void 0;class oe extends Map{#U;constructor(e,t){super(t),this.#U=e}get(e){return this.has(e)||this.set(e,this.#U(e)),super.get(e)}}ie.DefaultMap=oe;var de={};Object.defineProperty(de,"__esModule",{value:!0}),de.NetworkRequest=void 0;const ce=M,le=w;class ue{static#$="UNKNOWN";requestId;#l;#F;#q;#W;#K;#J;#H;constructor(e,t){this.requestId=e,this.#l=t,this.#J=new ce.Deferred,this.#H=new ce.Deferred}onRequestWillBeSentEvent(e){void 0===this.#F&&(this.#F=e,void 0!==this.#q&&this.#J.resolve(),this.#G())}onRequestWillBeSentExtraInfoEvent(e){void 0===this.#q&&(this.#q=e,void 0!==this.#F&&this.#J.resolve())}onResponseReceivedEvent(e){void 0===this.#W&&(this.#W=e,!0===e.hasExtraInfo||this.#J.isFinished||this.#J.resolve(),!0===e.hasExtraInfo&&void 0===this.#K||this.#H.resolve(),this.#Y())}onResponseReceivedEventExtraInfo(e){void 0===this.#K&&(this.#K=e,void 0!==this.#W&&this.#H.resolve())}onLoadingFailedEvent(e){this.#J.resolve(),this.#H.reject(e);const t={...this.#Q(),errorText:e.errorText};this.#l.registerEvent({method:le.Network.EventNames.FetchErrorEvent,params:t},this.#F?.frameId??null)}#G(){this.#X()||this.#l.registerPromiseEvent(this.#J.then((()=>this.#ee())),this.#F?.frameId??null,le.Network.EventNames.BeforeRequestSentEvent)}#ee(){if(void 0===this.#F)throw new Error("RequestWillBeSentEvent is not set");const e={...this.#Q(),initiator:{type:this.#te()}};return{method:le.Network.EventNames.BeforeRequestSentEvent,params:e}}#Q(){return{context:this.#F?.frameId??null,navigation:this.#F?.loaderId??null,redirectCount:0,request:this.#ne(),timestamp:Math.round(1e3*(this.#F?.wallTime??0))}}#ne(){const e=void 0===this.#q?[]:ue.#se(this.#q.associatedCookies);return{request:this.#F?.requestId??ue.#$,url:this.#F?.request.url??ue.#$,method:this.#F?.request.method??ue.#$,headers:Object.keys(this.#F?.request.headers??[]).map((e=>({name:e,value:this.#F?.request.headers[e]}))),cookies:e,headersSize:-1,bodySize:0,timings:{timeOrigin:0,requestTime:0,redirectStart:0,redirectEnd:0,fetchStart:0,dnsStart:0,dnsEnd:0,connectStart:0,connectEnd:0,tlsStart:0,tlsEnd:0,requestStart:0,responseStart:0,responseEnd:0}}}#te(){switch(this.#F?.initiator.type){case"parser":case"script":case"preflight":return this.#F.initiator.type;default:return"other"}}static#re(e){switch(e){case"Strict":return"strict";case"Lax":return"lax";default:return"none"}}static#se(e){return e.map((e=>({name:e.cookie.name,value:e.cookie.value,domain:e.cookie.domain,path:e.cookie.path,expires:e.cookie.expires,size:e.cookie.size,httpOnly:e.cookie.httpOnly,secure:e.cookie.secure,sameSite:ue.#re(e.cookie.sameSite)})))}#Y(){this.#X()||this.#l.registerPromiseEvent(this.#H.then((()=>this.#ae())),this.#W?.frameId??null,le.Network.EventNames.ResponseCompletedEvent)}#ae(){if(void 0===this.#W)throw new Error("ResponseReceivedEvent is not set");if(void 0===this.#F)throw new Error("RequestWillBeSentEvent is not set");return{method:le.Network.EventNames.ResponseCompletedEvent,params:{...this.#Q(),response:{url:this.#W.response.url,protocol:this.#W.response.protocol,status:this.#W.response.status,statusText:this.#W.response.statusText,fromCache:this.#W.response.fromDiskCache||this.#W.response.fromPrefetchCache,headers:this.#ie(this.#W.response.headers),mimeType:this.#W.response.mimeType,bytesReceived:this.#W.response.encodedDataLength,headersSize:this.#K?.headersText?.length??-1,bodySize:-1,content:{size:-1}}}}}#ie(e){return Object.keys(e).map((t=>({name:t,value:e[t]})))}#X(){return this.#F?.request.url.endsWith("/favicon.ico")??!1}}de.NetworkRequest=ue,Object.defineProperty(ae,"__esModule",{value:!0}),ae.NetworkProcessor=void 0;const pe=ie,he=de;class me{#l;#oe;constructor(e){this.#l=e,this.#oe=new pe.DefaultMap((e=>new he.NetworkRequest(e,this.#l)))}static async create(e,t){const n=new me(t);return e.on("Network.requestWillBeSent",(e=>{n.#de(e.requestId).onRequestWillBeSentEvent(e)})),e.on("Network.requestWillBeSentExtraInfo",(e=>{n.#de(e.requestId).onRequestWillBeSentExtraInfoEvent(e)})),e.on("Network.responseReceived",(e=>{n.#de(e.requestId).onResponseReceivedEvent(e)})),e.on("Network.responseReceivedExtraInfo",(e=>{n.#de(e.requestId).onResponseReceivedEventExtraInfo(e)})),e.on("Network.loadingFailed",(e=>{n.#de(e.requestId).onLoadingFailedEvent(e)})),await e.sendCommand("Network.enable"),n}#de(e){return this.#oe.get(e)}}ae.NetworkProcessor=me,Object.defineProperty(W,"__esModule",{value:!0}),W.CdpTarget=void 0;const ge=K,fe=w,ve=M,ye=ae;class xe{#ce;#le;#I;#ue;#l;#pe;#he;#me;static create(e,t,n,s,r,a,i){const o=new xe(e,t,n,s,a,i);return ge.LogManager.create(o,r,a),o.#ge(),o.#fe(),o}constructor(e,t,n,s,r,a){this.#ce=e,this.#le=t,this.#I=n,this.#ue=s,this.#l=r,this.#pe=a,this.#me=!1,this.#he=new ve.Deferred}get targetUnblocked(){return this.#he}get targetId(){return this.#ce}get cdpClient(){return this.#I}get cdpSessionId(){return this.#ue}async#fe(){try{this.#l.isNetworkDomainEnabled&&await this.enableNetworkDomain(),await this.#I.sendCommand("Runtime.enable"),await this.#I.sendCommand("Page.enable"),await this.#I.sendCommand("Page.setLifecycleEventsEnabled",{enabled:!0}),await this.#I.sendCommand("Target.setAutoAttach",{autoAttach:!0,waitForDebuggerOnStart:!0,flatten:!0}),await this.loadPreloadScripts(),await this.#I.sendCommand("Runtime.runIfWaitingForDebugger")}catch(e){if(!e.message.includes("Target closed"))throw e}this.#he.resolve()}async enableNetworkDomain(){this.#me||(this.#me=!0,await ye.NetworkProcessor.create(this.cdpClient,this.#l))}#ge(){this.#I.on("*",((e,t)=>{this.#l.registerEvent({method:fe.CDP.EventNames.EventReceivedEvent,params:{cdpMethod:e,cdpParams:t??{},cdpSession:this.#ue}},null)}))}async loadPreloadScripts(){for(const e of this.#pe.findPreloadScripts({contextIds:[null,this.#le]})){const t=e.functionDeclaration,n=e.sandbox,s=await this.addPreloadScript(`(${t})();`,n);this.#pe.appendCdpPreloadScript(e,{target:this,preloadScriptId:s})}}async addPreloadScript(e,t){return(await this.cdpClient.sendCommand("Page.addScriptToEvaluateOnNewDocument",{source:e,worldName:t})).identifier}async removePreloadScript(e){await this.cdpClient.sendCommand("Page.removeScriptToEvaluateOnNewDocument",{identifier:e})}}W.CdpTarget=xe;var be,Ce={},we=new Uint8Array(16);function _e(){if(!be&&!(be="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return be(we)}var Ie=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Se(e){return"string"==typeof e&&Ie.test(e)}for(var Te,Ee,Pe=[],ke=0;ke<256;++ke)Pe.push((ke+256).toString(16).substr(1));function Ne(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(Pe[e[t+0]]+Pe[e[t+1]]+Pe[e[t+2]]+Pe[e[t+3]]+"-"+Pe[e[t+4]]+Pe[e[t+5]]+"-"+Pe[e[t+6]]+Pe[e[t+7]]+"-"+Pe[e[t+8]]+Pe[e[t+9]]+"-"+Pe[e[t+10]]+Pe[e[t+11]]+Pe[e[t+12]]+Pe[e[t+13]]+Pe[e[t+14]]+Pe[e[t+15]]).toLowerCase();if(!Se(n))throw TypeError("Stringified UUID is invalid");return n}var Ze=0,Oe=0;function De(e){if(!Se(e))throw TypeError("Invalid UUID");var t,n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n}function Me(e,t,n){function s(e,s,r,a){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t}(e)),"string"==typeof s&&(s=De(s)),16!==s.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var i=new Uint8Array(16+e.length);if(i.set(s),i.set(e,s.length),(i=n(i))[6]=15&i[6]|t,i[8]=63&i[8]|128,r){a=a||0;for(var o=0;o<16;++o)r[a+o]=i[o];return r}return Ne(i)}try{s.name=e}catch(e){}return s.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",s.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",s}function je(e){return 14+(e+64>>>9<<4)+1}function Re(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function ze(e,t,n,s,r,a){return Re((i=Re(Re(t,e),Re(s,a)))<<(o=r)|i>>>32-o,n);var i,o}function Ae(e,t,n,s,r,a,i){return ze(t&n|~t&s,e,t,r,a,i)}function Le(e,t,n,s,r,a,i){return ze(t&s|n&~s,e,t,r,a,i)}function Be(e,t,n,s,r,a,i){return ze(t^n^s,e,t,r,a,i)}function Ve(e,t,n,s,r,a,i){return ze(n^(t|~s),e,t,r,a,i)}var Ue=Me("v3",48,(function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var n=0;n<t.length;++n)e[n]=t.charCodeAt(n)}return function(e){for(var t=[],n=32*e.length,s="0123456789abcdef",r=0;r<n;r+=8){var a=e[r>>5]>>>r%32&255,i=parseInt(s.charAt(a>>>4&15)+s.charAt(15&a),16);t.push(i)}return t}(function(e,t){e[t>>5]|=128<<t%32,e[je(t)-1]=t;for(var n=1732584193,s=-271733879,r=-1732584194,a=271733878,i=0;i<e.length;i+=16){var o=n,d=s,c=r,l=a;n=Ae(n,s,r,a,e[i],7,-680876936),a=Ae(a,n,s,r,e[i+1],12,-389564586),r=Ae(r,a,n,s,e[i+2],17,606105819),s=Ae(s,r,a,n,e[i+3],22,-1044525330),n=Ae(n,s,r,a,e[i+4],7,-176418897),a=Ae(a,n,s,r,e[i+5],12,1200080426),r=Ae(r,a,n,s,e[i+6],17,-1473231341),s=Ae(s,r,a,n,e[i+7],22,-45705983),n=Ae(n,s,r,a,e[i+8],7,1770035416),a=Ae(a,n,s,r,e[i+9],12,-1958414417),r=Ae(r,a,n,s,e[i+10],17,-42063),s=Ae(s,r,a,n,e[i+11],22,-1990404162),n=Ae(n,s,r,a,e[i+12],7,1804603682),a=Ae(a,n,s,r,e[i+13],12,-40341101),r=Ae(r,a,n,s,e[i+14],17,-1502002290),n=Le(n,s=Ae(s,r,a,n,e[i+15],22,1236535329),r,a,e[i+1],5,-165796510),a=Le(a,n,s,r,e[i+6],9,-1069501632),r=Le(r,a,n,s,e[i+11],14,643717713),s=Le(s,r,a,n,e[i],20,-373897302),n=Le(n,s,r,a,e[i+5],5,-701558691),a=Le(a,n,s,r,e[i+10],9,38016083),r=Le(r,a,n,s,e[i+15],14,-660478335),s=Le(s,r,a,n,e[i+4],20,-405537848),n=Le(n,s,r,a,e[i+9],5,568446438),a=Le(a,n,s,r,e[i+14],9,-1019803690),r=Le(r,a,n,s,e[i+3],14,-187363961),s=Le(s,r,a,n,e[i+8],20,1163531501),n=Le(n,s,r,a,e[i+13],5,-1444681467),a=Le(a,n,s,r,e[i+2],9,-51403784),r=Le(r,a,n,s,e[i+7],14,1735328473),n=Be(n,s=Le(s,r,a,n,e[i+12],20,-1926607734),r,a,e[i+5],4,-378558),a=Be(a,n,s,r,e[i+8],11,-2022574463),r=Be(r,a,n,s,e[i+11],16,1839030562),s=Be(s,r,a,n,e[i+14],23,-35309556),n=Be(n,s,r,a,e[i+1],4,-1530992060),a=Be(a,n,s,r,e[i+4],11,1272893353),r=Be(r,a,n,s,e[i+7],16,-155497632),s=Be(s,r,a,n,e[i+10],23,-1094730640),n=Be(n,s,r,a,e[i+13],4,681279174),a=Be(a,n,s,r,e[i],11,-358537222),r=Be(r,a,n,s,e[i+3],16,-722521979),s=Be(s,r,a,n,e[i+6],23,76029189),n=Be(n,s,r,a,e[i+9],4,-640364487),a=Be(a,n,s,r,e[i+12],11,-421815835),r=Be(r,a,n,s,e[i+15],16,530742520),n=Ve(n,s=Be(s,r,a,n,e[i+2],23,-995338651),r,a,e[i],6,-198630844),a=Ve(a,n,s,r,e[i+7],10,1126891415),r=Ve(r,a,n,s,e[i+14],15,-1416354905),s=Ve(s,r,a,n,e[i+5],21,-57434055),n=Ve(n,s,r,a,e[i+12],6,1700485571),a=Ve(a,n,s,r,e[i+3],10,-1894986606),r=Ve(r,a,n,s,e[i+10],15,-1051523),s=Ve(s,r,a,n,e[i+1],21,-2054922799),n=Ve(n,s,r,a,e[i+8],6,1873313359),a=Ve(a,n,s,r,e[i+15],10,-30611744),r=Ve(r,a,n,s,e[i+6],15,-1560198380),s=Ve(s,r,a,n,e[i+13],21,1309151649),n=Ve(n,s,r,a,e[i+4],6,-145523070),a=Ve(a,n,s,r,e[i+11],10,-1120210379),r=Ve(r,a,n,s,e[i+2],15,718787259),s=Ve(s,r,a,n,e[i+9],21,-343485551),n=Re(n,o),s=Re(s,d),r=Re(r,c),a=Re(a,l)}return[n,s,r,a]}(function(e){if(0===e.length)return[];for(var t=8*e.length,n=new Uint32Array(je(t)),s=0;s<t;s+=8)n[s>>5]|=(255&e[s/8])<<s%32;return n}(e),8*e.length))})),$e=Ue;function Fe(e,t,n,s){switch(e){case 0:return t&n^~t&s;case 1:case 3:return t^n^s;case 2:return t&n^t&s^n&s}}function qe(e,t){return e<<t|e>>>32-t}var We=Me("v5",80,(function(e){var t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var s=unescape(encodeURIComponent(e));e=[];for(var r=0;r<s.length;++r)e.push(s.charCodeAt(r))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var a=e.length/4+2,i=Math.ceil(a/16),o=new Array(i),d=0;d<i;++d){for(var c=new Uint32Array(16),l=0;l<16;++l)c[l]=e[64*d+4*l]<<24|e[64*d+4*l+1]<<16|e[64*d+4*l+2]<<8|e[64*d+4*l+3];o[d]=c}o[i-1][14]=8*(e.length-1)/Math.pow(2,32),o[i-1][14]=Math.floor(o[i-1][14]),o[i-1][15]=8*(e.length-1)&4294967295;for(var u=0;u<i;++u){for(var p=new Uint32Array(80),h=0;h<16;++h)p[h]=o[u][h];for(var m=16;m<80;++m)p[m]=qe(p[m-3]^p[m-8]^p[m-14]^p[m-16],1);for(var g=n[0],f=n[1],v=n[2],y=n[3],x=n[4],b=0;b<80;++b){var C=Math.floor(b/20),w=qe(g,5)+Fe(C,f,v,y)+x+t[C]+p[b]>>>0;x=y,y=v,v=qe(f,30)>>>0,f=g,g=w}n[0]=n[0]+g>>>0,n[1]=n[1]+f>>>0,n[2]=n[2]+v>>>0,n[3]=n[3]+y>>>0,n[4]=n[4]+x>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]})),Ke=We;var Je=Object.freeze({__proto__:null,NIL:"00000000-0000-0000-0000-000000000000",parse:De,stringify:Ne,v1:function(e,t,n){var s=t&&n||0,r=t||new Array(16),a=(e=e||{}).node||Te,i=void 0!==e.clockseq?e.clockseq:Ee;if(null==a||null==i){var o=e.random||(e.rng||_e)();null==a&&(a=Te=[1|o[0],o[1],o[2],o[3],o[4],o[5]]),null==i&&(i=Ee=16383&(o[6]<<8|o[7]))}var d=void 0!==e.msecs?e.msecs:Date.now(),c=void 0!==e.nsecs?e.nsecs:Oe+1,l=d-Ze+(c-Oe)/1e4;if(l<0&&void 0===e.clockseq&&(i=i+1&16383),(l<0||d>Ze)&&void 0===e.nsecs&&(c=0),c>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");Ze=d,Oe=c,Ee=i;var u=(1e4*(268435455&(d+=122192928e5))+c)%4294967296;r[s++]=u>>>24&255,r[s++]=u>>>16&255,r[s++]=u>>>8&255,r[s++]=255&u;var p=d/4294967296*1e4&268435455;r[s++]=p>>>8&255,r[s++]=255&p,r[s++]=p>>>24&15|16,r[s++]=p>>>16&255,r[s++]=i>>>8|128,r[s++]=255&i;for(var h=0;h<6;++h)r[s+h]=a[h];return t||Ne(r)},v3:$e,v4:function(e,t,n){var s=(e=e||{}).random||(e.rng||_e)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t){n=n||0;for(var r=0;r<16;++r)t[n+r]=s[r];return t}return Ne(s)},v5:Ke,validate:Se,version:function(e){if(!Se(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}}),He=t(Je);Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.PreloadScriptStorage=void 0;const Ge=He;Ce.PreloadScriptStorage=class{#ve=new Set;findPreloadScripts(e){return e?[...this.#ve].filter((t=>(void 0===e?.id||e?.id===t.id)&&((void 0===e?.contextId||e?.contextId===t.contextId)&&!(void 0!==e?.contextIds&&!e?.contextIds.includes(t.contextId))))):[...this.#ve]}addPreloadScripts(e,t,n,s){const r={id:(0,Ge.v4)(),contextId:e,cdpPreloadScripts:t,functionDeclaration:n,sandbox:s};return this.#ve.add(r),r}appendCdpPreloadScript(e,t){e.cdpPreloadScripts.push(t)}removeBiDiPreloadScripts(e){for(const t of this.findPreloadScripts(e))this.#ve.delete(t)}removeCdpPreloadScripts(e){for(const t of this.#ve)t.cdpPreloadScripts=t.cdpPreloadScripts.filter((t=>void 0!==e?.targetId&&e?.targetId!==t.target.targetId||void 0!==e?.sessionId&&e?.sessionId!==t.target.cdpSessionId))}},Object.defineProperty(Z,"__esModule",{value:!0}),Z.BrowsingContextProcessor=void 0;const Ye=w,Qe=E,Xe=O,et=W,tt=Ce;Z.BrowsingContextProcessor=class{#y;#ye;#l;#t;#v;#xe;#pe;constructor(e,t,n,s,r,a){this.#y=r,this.#ye=t,this.#l=s,this.#t=a,this.#v=e,this.#xe=n,this.#pe=new tt.PreloadScriptStorage,this.#ge(this.#ye.browserClient())}#ge(e){e.on("Target.attachedToTarget",(t=>{this.#be(t,e)})),e.on("Target.detachedFromTarget",(e=>{this.#Ce(e)})),e.on("Page.frameAttached",(e=>{this.#we(e)})),e.on("Page.frameDetached",(e=>{this.#_e(e)}))}#we(e){const t=this.#y.findContext(e.parentFrameId);void 0!==t&&Xe.BrowsingContextImpl.create(t.cdpTarget,this.#v,e.frameId,e.parentFrameId,this.#l,this.#y,this.#t)}#_e(e){"swap"!==e.reason&&this.#y.findContext(e.frameId)?.delete()}#be(e,t){const{sessionId:n,targetInfo:s}=e,r=this.#ye.getCdpClient(n);if(!this.#Ie(s))return void r.sendCommand("Runtime.runIfWaitingForDebugger").then((()=>t.sendCommand("Target.detachFromTarget",e))).catch((e=>this.#t?.(Qe.LogType.system,e)));this.#t?.(Qe.LogType.browsingContexts,"AttachedToTarget event received:",JSON.stringify(e,null,2)),this.#ge(r);const a=this.#y.findContext(s.targetId),i=et.CdpTarget.create(s.targetId,a?.parentId??null,r,n,this.#v,this.#l,this.#pe);a?a.updateCdpTarget(i):Xe.BrowsingContextImpl.create(i,this.#v,s.targetId,null,this.#l,this.#y,this.#t)}#Ce(e){const t=e.targetId;this.#y.findContext(t)?.delete(),this.#pe.removeCdpPreloadScripts({targetId:t})}async#Se(e){if("realm"in e)return this.#v.getRealm({realmId:e.realm});return this.#y.getContext(e.context).getOrCreateSandbox(e.sandbox)}process_browsingContext_getTree(e){return{result:{contexts:(void 0===e.root?this.#y.getTopLevelContexts():[this.#y.getContext(e.root)]).map((t=>t.serializeToBidiValue(e.maxDepth??Number.MAX_VALUE)))}}}async process_browsingContext_create(e){const t=this.#ye.browserClient();let n;if(void 0!==e.referenceContext&&(n=this.#y.getContext(e.referenceContext),!n.isTopLevelContext()))throw new Ye.Message.InvalidArgumentException("referenceContext should be a top-level context");const s=(await t.sendCommand("Target.createTarget",{url:"about:blank",newWindow:"window"===e.type})).targetId,r=this.#y.getContext(s);return await r.awaitLoaded(),{result:r.serializeToBidiValue(1)}}process_browsingContext_navigate(e){return this.#y.getContext(e.context).navigate(e.url,void 0===e.wait?"none":e.wait)}async process_browsingContext_captureScreenshot(e){return this.#y.getContext(e.context).captureScreenshot()}async process_browsingContext_print(e){return this.#y.getContext(e.context).print(e)}async process_script_addPreloadScript(e){if(void 0!==e.arguments&&e.arguments.length>0)throw new Error("add preload script arguments are not supported");const t=new Set(void 0===e.context||null===e.context?this.#y.getTopLevelContexts().map((e=>e.cdpTarget)):[this.#y.getContext(e.context).cdpTarget]),n=[];for(const s of t){const t=await s.addPreloadScript(`(${e.functionDeclaration})();`,e.sandbox);n.push({target:s,preloadScriptId:t})}return{result:{script:this.#pe.addPreloadScripts(e.context??null,n,e.functionDeclaration,e.sandbox).id}}}async process_script_removePreloadScript(e){const t=e.script,n=this.#pe.findPreloadScripts({id:t});if(0===n.length)throw new Ye.Message.NoSuchScriptException(`No preload script with BiDi ID '${t}'`);for(const e of n)for(const t of e.cdpPreloadScripts){const e=t.target,n=t.preloadScriptId;await e.removePreloadScript(n)}return this.#pe.removeBiDiPreloadScripts({id:t}),{result:{}}}async process_script_evaluate(e){return(await this.#Se(e.target)).scriptEvaluate(e.expression,e.awaitPromise,e.resultOwnership??"none",e.serializationOptions??{})}process_script_getRealms(e){void 0!==e.context&&this.#y.getContext(e.context);const t=this.#v.findRealms({browsingContextId:e.context,type:e.type}).map((e=>e.toBiDi()));return{result:{realms:t}}}async process_script_callFunction(e){return(await this.#Se(e.target)).callFunction(e.functionDeclaration,e.this||{type:"undefined"},e.arguments||[],e.awaitPromise,e.resultOwnership??"none",e.serializationOptions??{})}async process_script_disown(e){const t=await this.#Se(e.target);return await Promise.all(e.handles.map((async e=>t.disown(e)))),{result:{}}}async process_browsingContext_close(e){const t=this.#ye.browserClient();if(!this.#y.getContext(e.context).isTopLevelContext())throw new Ye.Message.InvalidArgumentException("A top-level browsing context cannot be closed.");const n=new Promise((n=>{const s=r=>{r.targetId===e.context&&(t.off("Target.detachedFromTarget",s),n())};t.on("Target.detachedFromTarget",s)}));return await t.sendCommand("Target.closeTarget",{targetId:e.context}),await n,{result:{}}}#Ie(e){return e.targetId!==this.#xe&&["page","iframe"].includes(e.type)}async process_cdp_sendCommand(e){const t=e.cdpSession?this.#ye.getCdpClient(e.cdpSession):this.#ye.browserClient();return{result:await t.sendCommand(e.cdpMethod,e.cdpParams),cdpSession:e.cdpSession}}process_cdp_getSession(e){const t=e.context,n=this.#y.getContext(t).cdpTarget.cdpSessionId;return void 0===n?{result:{cdpSession:null}}:{result:{cdpSession:n}}}};var nt={};Object.defineProperty(nt,"__esModule",{value:!0}),nt.OutgoingBidiMessage=void 0;class st{#Te;#Ee;constructor(e,t){this.#Te=e,this.#Ee=t}static async createFromPromise(e,t){return e.then((e=>new st(e,t)))}static createResolved(e,t){return Promise.resolve(new st(e,t))}get message(){return this.#Te}get channel(){return this.#Ee}}nt.OutgoingBidiMessage=st,Object.defineProperty(N,"__esModule",{value:!0}),N.CommandProcessor=void 0;const rt=w,at=E,it=I,ot=Z,dt=nt;class ct{parseAddPreloadScriptParams(e){return e}parseRemovePreloadScriptParams(e){return e}parseGetRealmsParams(e){return e}parseCallFunctionParams(e){return e}parseEvaluateParams(e){return e}parseDisownParams(e){return e}parseSendCommandParams(e){return e}parseGetSessionParams(e){return e}parseSubscribeParams(e){return e}parseNavigateParams(e){return e}parseGetTreeParams(e){return e}parseCreateParams(e){return e}parseCloseParams(e){return e}parseCaptureScreenshotParams(e){return e}parsePrintParams(e){return e}}class lt extends it.EventEmitter{#Pe;#l;#ke;#t;constructor(e,t,n,s,r=new ct,a,i){super(),this.#l=n,this.#t=i,this.#Pe=new ot.BrowsingContextProcessor(e,t,s,n,a,i),this.#ke=r}static#Ne(){return{result:{ready:!1,message:"already connected"}}}async#Ze(e,t){return await this.#l.subscribe(e.events,e.contexts??[null],t),{result:{}}}async#Oe(e,t){return await this.#l.unsubscribe(e.events,e.contexts??[null],t),{result:{}}}async#De(e){switch(e.method){case"session.status":return lt.#Ne();case"session.subscribe":return this.#Ze(this.#ke.parseSubscribeParams(e.params),e.channel??null);case"session.unsubscribe":return this.#Oe(this.#ke.parseSubscribeParams(e.params),e.channel??null);case"browsingContext.create":return this.#Pe.process_browsingContext_create(this.#ke.parseCreateParams(e.params));case"browsingContext.close":return this.#Pe.process_browsingContext_close(this.#ke.parseCloseParams(e.params));case"browsingContext.getTree":return this.#Pe.process_browsingContext_getTree(this.#ke.parseGetTreeParams(e.params));case"browsingContext.navigate":return this.#Pe.process_browsingContext_navigate(this.#ke.parseNavigateParams(e.params));case"browsingContext.captureScreenshot":return this.#Pe.process_browsingContext_captureScreenshot(this.#ke.parseCaptureScreenshotParams(e.params));case"browsingContext.print":return this.#Pe.process_browsingContext_print(this.#ke.parsePrintParams(e.params));case"script.addPreloadScript":return this.#Pe.process_script_addPreloadScript(this.#ke.parseAddPreloadScriptParams(e.params));case"script.removePreloadScript":return this.#Pe.process_script_removePreloadScript(this.#ke.parseRemovePreloadScriptParams(e.params));case"script.getRealms":return this.#Pe.process_script_getRealms(this.#ke.parseGetRealmsParams(e.params));case"script.callFunction":return this.#Pe.process_script_callFunction(this.#ke.parseCallFunctionParams(e.params));case"script.evaluate":return this.#Pe.process_script_evaluate(this.#ke.parseEvaluateParams(e.params));case"script.disown":return this.#Pe.process_script_disown(this.#ke.parseDisownParams(e.params));case"cdp.sendCommand":return this.#Pe.process_cdp_sendCommand(this.#ke.parseSendCommandParams(e.params));case"cdp.getSession":return this.#Pe.process_cdp_getSession(this.#ke.parseGetSessionParams(e.params))}throw new rt.Message.UnknownCommandException(`Unknown command '${e.method}'.`)}async processCommand(e){try{const t=await this.#De(e),n={id:e.id,...t};this.emit("response",dt.OutgoingBidiMessage.createResolved(n,e.channel??null))}catch(t){if(t instanceof rt.Message.ErrorResponse){const n=t;this.emit("response",dt.OutgoingBidiMessage.createResolved(n.toErrorResponse(e.id),e.channel??null))}else{const n=t;this.#t?.(at.LogType.bidi,n),this.emit("response",dt.OutgoingBidiMessage.createResolved(new rt.Message.UnknownErrorException(n.message).toErrorResponse(e.id),e.channel??null))}}}}N.CommandProcessor=lt;var ut={};Object.defineProperty(ut,"__esModule",{value:!0}),ut.BrowsingContextStorage=void 0;const pt=w;ut.BrowsingContextStorage=class{#Me=new Map;getTopLevelContexts(){return this.getAllContexts().filter((e=>e.isTopLevelContext()))}getAllContexts(){return Array.from(this.#Me.values())}deleteContextById(e){this.#Me.delete(e)}deleteContext(e){this.#Me.delete(e.id)}addContext(e){this.#Me.set(e.id,e)}hasContext(e){return this.#Me.has(e)}findContext(e){return this.#Me.get(e)}findTopLevelContextId(e){if(null===e)return null;const t=this.findContext(e),n=t?.parentId??null;return null===n?e:this.findTopLevelContextId(n)}findTopLevelContext(e){const t=this.findTopLevelContextId(e);return null===t?null:this.findContext(t)}getContext(e){const t=this.findContext(e);if(void 0===t)throw new pt.Message.NoSuchFrameException(`Context ${e} not found`);return t}};var ht={},mt={};Object.defineProperty(mt,"__esModule",{value:!0}),mt.Buffer=void 0;mt.Buffer=class{#je;#Re=[];#ze;constructor(e,t=(()=>{})){this.#je=e,this.#ze=t}get(){return this.#Re}add(e){for(this.#Re.push(e);this.#Re.length>this.#je;){const e=this.#Re.shift();void 0!==e&&this.#ze(e)}}};var gt={};Object.defineProperty(gt,"__esModule",{value:!0}),gt.IdWrapper=void 0;class ft{static#Ae=0;#E;constructor(){this.#E=++ft.#Ae}get id(){return this.#E}}gt.IdWrapper=ft;var vt={};Object.defineProperty(vt,"__esModule",{value:!0}),vt.SubscriptionManager=vt.unrollEvents=vt.cartesianProduct=void 0;const yt=w;function xt(...e){return e.reduce(((e,t)=>e.flatMap((e=>t.map((t=>[e,t].flat()))))))}function bt(e){const t=[];for(const n of e)switch(n){case yt.BrowsingContext.AllEvents:t.push(...Object.values(yt.BrowsingContext.EventNames));break;case yt.CDP.AllEvents:t.push(...Object.values(yt.CDP.EventNames));break;case yt.Log.AllEvents:t.push(...Object.values(yt.Log.EventNames));break;case yt.Network.AllEvents:t.push(...Object.values(yt.Network.EventNames));break;case yt.Script.AllEvents:t.push(...Object.values(yt.Script.EventNames));break;default:t.push(n)}return t}vt.cartesianProduct=xt,vt.unrollEvents=bt;vt.SubscriptionManager=class{#Le=0;#Be=new Map;#y;constructor(e){this.#y=e}getChannelsSubscribedToEvent(e,t){return Array.from(this.#Be.keys()).map((n=>({priority:this.#Ve(e,t,n),channel:n}))).filter((({priority:e})=>null!==e)).sort(((e,t)=>e.priority-t.priority)).map((({channel:e})=>e))}#Ve(e,t,n){const s=this.#Be.get(n);if(void 0===s)return null;const r=this.#y.findTopLevelContextId(t),a=[...new Set([null,r])].map((t=>s.get(t)?.get(e))).filter((e=>void 0!==e));return 0===a.length?null:Math.min(...a)}subscribe(e,t,n){if(t=this.#y.findTopLevelContextId(t),e===yt.BrowsingContext.AllEvents)return void Object.values(yt.BrowsingContext.EventNames).map((e=>this.subscribe(e,t,n)));if(e===yt.CDP.AllEvents)return void Object.values(yt.CDP.EventNames).map((e=>this.subscribe(e,t,n)));if(e===yt.Log.AllEvents)return void Object.values(yt.Log.EventNames).map((e=>this.subscribe(e,t,n)));if(e===yt.Network.AllEvents)return void Object.values(yt.Network.EventNames).map((e=>this.subscribe(e,t,n)));if(e===yt.Script.AllEvents)return void Object.values(yt.Script.EventNames).map((e=>this.subscribe(e,t,n)));this.#Be.has(n)||this.#Be.set(n,new Map);const s=this.#Be.get(n);s.has(t)||s.set(t,new Map);const r=s.get(t);r.has(e)||r.set(e,this.#Le++)}unsubscribeAll(e,t,n){for(const e of t)null!==e&&this.#y.getContext(e);xt(bt(e),t).map((([e,t])=>this.#Ue(e,t,n))).forEach((e=>e()))}unsubscribe(e,t,n){this.unsubscribeAll([e],[t],n)}#Ue(e,t,n){if(t=this.#y.findTopLevelContextId(t),!this.#Be.has(n))throw new yt.Message.InvalidArgumentException(`Cannot unsubscribe from ${e}, ${null===t?"null":t}. No subscription found.`);const s=this.#Be.get(n);if(!s.has(t))throw new yt.Message.InvalidArgumentException(`Cannot unsubscribe from ${e}, ${null===t?"null":t}. No subscription found.`);const r=s.get(t);if(!r.has(e))throw new yt.Message.InvalidArgumentException(`Cannot unsubscribe from ${e}, ${null===t?"null":t}. No subscription found.`);return()=>{r.delete(e),0===r.size&&s.delete(e),0===s.size&&this.#Be.delete(n)}}},Object.defineProperty(ht,"__esModule",{value:!0}),ht.EventManager=void 0;const Ct=w,wt=mt,_t=gt,It=nt,St=ie,Tt=vt;class Et{#$e;#Fe;#qe;constructor(e,t){this.#$e=new _t.IdWrapper,this.#Fe=t,this.#qe=e}get id(){return this.#$e.id}get contextId(){return this.#Fe}get event(){return this.#qe}}const Pt=new Map([[Ct.Log.EventNames.LogEntryAddedEvent,100]]);class kt{static#We="network";#Ke=new St.DefaultMap((()=>new Set));#Je=new Map;#He=new Map;#Ge;#Ye;#Qe;constructor(e){this.#Ye=e,this.#Ge=new Tt.SubscriptionManager(e.getBrowsingContextStorage()),this.#Qe=!1}get isNetworkDomainEnabled(){return this.#Qe}static#Xe(e,t,n){return JSON.stringify({eventName:e,browsingContext:t,channel:n})}registerEvent(e,t){this.registerPromiseEvent(Promise.resolve(e),t,e.method)}registerPromiseEvent(e,t,n){const s=new Et(e,t),r=this.#Ge.getChannelsSubscribedToEvent(n,t);this.#et(s,n);for(const t of r)this.#Ye.emitOutgoingMessage(It.OutgoingBidiMessage.createFromPromise(e,t)),this.#tt(s,t,n)}async subscribe(e,t,n){for(const e of t)null!==e&&this.#Ye.getBrowsingContextStorage().getContext(e);for(const s of e)for(const e of t){await this.#nt(s,e),this.#Ge.subscribe(s,e,n);for(const t of this.#st(s,e,n))this.#Ye.emitOutgoingMessage(It.OutgoingBidiMessage.createFromPromise(t.event,n)),this.#tt(t,n,s)}}async#nt(e,t){e.startsWith(kt.#We)&&(null===t?(this.#Qe=!0,await Promise.all(this.#Ye.getBrowsingContextStorage().getAllContexts().map((e=>e.cdpTarget.enableNetworkDomain())))):await this.#Ye.getBrowsingContextStorage().getContext(t).cdpTarget.enableNetworkDomain())}unsubscribe(e,t,n){this.#Ge.unsubscribeAll(e,t,n)}#et(e,t){if(!Pt.has(t))return;const n=kt.#Xe(t,e.contextId);this.#Je.has(n)||this.#Je.set(n,new wt.Buffer(Pt.get(t))),this.#Je.get(n).add(e),this.#Ke.get(t).add(e.contextId)}#tt(e,t,n){if(!Pt.has(n))return;const s=kt.#Xe(n,e.contextId,t);this.#He.set(s,Math.max(this.#He.get(s)??0,e.id))}#st(e,t,n){const s=kt.#Xe(e,t),r=kt.#Xe(e,t,n),a=this.#He.get(r)??-1/0,i=this.#Je.get(s)?.get().filter((e=>e.id>a))??[];return null===t&&Array.from(this.#Ke.get(e).keys()).filter((e=>null!==e&&this.#Ye.getBrowsingContextStorage().hasContext(e))).map((t=>this.#st(e,t,n))).forEach((e=>i.push(...e))),i.sort(((e,t)=>e.id-t.id))}}ht.EventManager=kt;var Nt={};Object.defineProperty(Nt,"__esModule",{value:!0}),Nt.RealmStorage=void 0;const Zt=w;Nt.RealmStorage=class{#rt=new Map;#at=new Map;get knownHandlesToRealm(){return this.#rt}get realmMap(){return this.#at}findRealms(e){return Array.from(this.#at.values()).filter((t=>(void 0===e.realmId||e.realmId===t.realmId)&&((void 0===e.browsingContextId||e.browsingContextId===t.browsingContextId)&&((void 0===e.navigableId||e.navigableId===t.navigableId)&&((void 0===e.executionContextId||e.executionContextId===t.executionContextId)&&((void 0===e.origin||e.origin===t.origin)&&((void 0===e.type||e.type===t.type)&&((void 0===e.sandbox||e.sandbox===t.sandbox)&&(void 0===e.cdpSessionId||e.cdpSessionId===t.cdpSessionId)))))))))}findRealm(e){const t=this.findRealms(e);if(1===t.length)return t[0]}getRealm(e){const t=this.findRealm(e);if(void 0===t)throw new Zt.Message.NoSuchFrameException(`Realm ${JSON.stringify(e)} not found`);return t}deleteRealms(e){this.findRealms(e).map((e=>{this.#at.delete(e.realmId),Array.from(this.#rt.entries()).filter((([,t])=>t===e.realmId)).map((([e])=>this.#rt.delete(e)))}))}},Object.defineProperty(_,"__esModule",{value:!0}),_.BidiServer=void 0;const Ot=I,Dt=E,Mt=P,jt=N,Rt=ut,zt=ht,At=Nt;class Lt extends Ot.EventEmitter{#it;#ot;#dt;#y;#v;#t;#ct=e=>{this.#dt.processCommand(e).catch((e=>{this.#t?.(Dt.LogType.system,e)}))};#lt=async e=>{const t=e.message;null!==e.channel&&(t.channel=e.channel),await this.#ot.sendMessage(t)};constructor(e,t,n,s,r){super(),this.#t=r,this.#y=new Rt.BrowsingContextStorage,this.#v=new At.RealmStorage,this.#it=new Mt.ProcessingQueue(this.#lt,this.#t),this.#ot=e,this.#ot.setOnMessage(this.#ct),this.#dt=new jt.CommandProcessor(this.#v,t,new zt.EventManager(this),n,s,this.#y,this.#t),this.#dt.on("response",(e=>{this.emitOutgoingMessage(e)}))}static async createAndStart(e,t,n,s,r){const a=new Lt(e,t,n,s,r),i=t.browserClient();return await i.sendCommand("Target.setDiscoverTargets",{discover:!0}),await i.sendCommand("Target.setAutoAttach",{autoAttach:!0,waitForDebuggerOnStart:!0,flatten:!0}),await a.topLevelContextsLoaded(),a}async topLevelContextsLoaded(){await Promise.all(this.#y.getTopLevelContexts().map((e=>e.awaitLoaded())))}emitOutgoingMessage(e){this.#it.add(e)}close(){this.#ot.close()}getBrowsingContextStorage(){return this.#y}}_.BidiServer=Lt;var Bt={},Vt={};Object.defineProperty(Vt,"__esModule",{value:!0}),Vt.CdpClient=void 0;const Ut=I;class $t extends Ut.EventEmitter{#ye;#ut;constructor(e,t){super(),this.#ye=e,this.#ut=t}static create(e,t){return new $t(e,t)}sendCommand(e,...t){const n=t[0];return this.#ye.sendCommand(e,n,this.#ut)}}Vt.CdpClient=$t;var Ft={};Object.defineProperty(Ft,"__esModule",{value:!0}),Ft.CdpConnection=void 0;const qt=Vt;Ft.CdpConnection=class{#ot;#pt;#ht=new Map;#mt=new Map;#gt;#ft=0;constructor(e,t=(()=>{})){this.#ot=e,this.#gt=t,this.#ot.setOnMessage(this.#vt),this.#pt=qt.CdpClient.create(this,null)}close(){this.#ot.close();for(const[,{reject:e,error:t}]of this.#mt)e(t);this.#mt.clear(),this.#ht.clear()}browserClient(){return this.#pt}getCdpClient(e){const t=this.#ht.get(e);if(!t)throw new Error("Unknown CDP session ID");return t}sendCommand(e,t,n){return new Promise(((s,r)=>{const a=this.#ft++;this.#mt.set(a,{resolve:s,reject:r,error:new Error(`${e} ${JSON.stringify(t)} ${n??""} call rejected because the connection has been closed.`)});const i={id:a,method:e,params:t};n&&(i.sessionId=n);const o=JSON.stringify(i),d=JSON.stringify(i,null,2);this.#ot.sendMessage(o)?.catch((e=>{this.#gt("error",e),this.#ot.close()})),this.#gt("sent â–¸",d)}))}#vt=e=>{const t=JSON.parse(e),n=JSON.stringify(t,null,2);if(this.#gt("received â—‚",n),"Target.attachedToTarget"===t.method){const{sessionId:e}=t.params;this.#ht.set(e,qt.CdpClient.create(this,e))}else if("Target.detachedFromTarget"===t.method){const{sessionId:e}=t.params;this.#ht.get(e)&&this.#ht.delete(e)}if(void 0!==t.id){const e=this.#mt.get(t.id);this.#mt.delete(t.id),e&&(t.result?e.resolve(t.result):t.error&&e.reject(t.error))}else if(t.method){const e=t.sessionId?this.#ht.get(t.sessionId):this.#pt;e&&e.emit(t.method,t.params||{})}}};var Wt={};Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.WebSocketTransport=void 0;Wt.WebSocketTransport=class{#vt=null;#yt;constructor(e){this.#yt=e,this.#yt.on("message",(e=>{this.#vt?.(e)}))}setOnMessage(e){this.#vt=e}sendMessage(e){this.#yt.send(e)}close(){this.#vt=null,this.#yt.close()}},function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WebSocketTransport=e.CdpConnection=e.CdpClient=void 0;var t=Vt;Object.defineProperty(e,"CdpClient",{enumerable:!0,get:function(){return t.CdpClient}});var n=Ft;Object.defineProperty(e,"CdpConnection",{enumerable:!0,get:function(){return n.CdpConnection}});var s=Wt;Object.defineProperty(e,"WebSocketTransport",{enumerable:!0,get:function(){return s.WebSocketTransport}})}(Bt);var Kt={};Object.defineProperty(Kt,"__esModule",{value:!0}),Kt.log=Kt.generatePage=void 0;const Jt=E;function Ht(e){const t=`${e}_log`,n=document.getElementById(t);if(n)return n;const s=document.getElementById("details"),r=document.createElement("div");r.className="divider",s.appendChild(r);const a=document.createElement("div");return a.className="item",a.innerHTML=`<h3>${e}</h3><div id="${t}" class="log"></div>`,s.appendChild(a),document.getElementById(t)}Kt.generatePage=function(){globalThis.document.documentElement&&(globalThis.document.documentElement.innerHTML='<!DOCTYPE html><title>BiDi-CDP Mapper</title><style>body{font-family: Roboto, serif; font-size: 13px; color: #202124;}.log{padding: 12px; font-family: Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace; font-size: 11px; line-height: 180%; background: #f1f3f4; border-radius: 4px;}.pre{overflow-wrap: break-word; padding: 10px;}.card{margin: 60px auto; padding: 2px 0; max-width: 900px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15), 0 1px 6px rgba(0, 0, 0, 0.2); border-radius: 8px;}.divider{height: 1px; background: #f0f0f0;}.item{padding: 16px 20px;}</style><div class="card"><div class="item"><h1>BiDi-CDP Mapper is controlling this tab</h1><p>Closing or reloading it will stop the BiDi process. <a target="_blank" title="BiDi-CDP Mapper GitHub Repository" href="https://github.com/GoogleChromeLabs/chromium-bidi">Details.</a></p></div><div class="divider"></div><details id="details"><summary class="item">Debug information</summary></details></div>',Ht(Jt.LogType.system),Ht(Jt.LogType.bidi),Ht(Jt.LogType.browsingContexts),Ht(Jt.LogType.cdp))},Kt.log=function(t,...n){if(!globalThis.document.documentElement)return;e.window?.sendDebugMessage?.(JSON.stringify({logType:t,messages:n}));const s=Ht(t),r=document.createElement("div");r.className="pre",r.textContent=n.join(" "),s.appendChild(r)}; /** * Copyright 2021 Google LLC. * Copyright (c) Microsoft Corporation. @@ -17,5 +17,5 @@ * * @license */ -var Jt=e&&e.__createBinding||(Object.create?function(e,t,n,s){void 0===s&&(s=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,r)}:function(e,t,n,s){void 0===s&&(s=n),e[s]=t[n]}),Ht=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Gt=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&Jt(t,e,n);return Ht(t,e),t};Object.defineProperty(n,"__esModule",{value:!0});const Yt=Gt(s),Qt=w,Xt=_,en=zt,tn=P,nn=tt,sn=qt,rn=async function(){return new Promise((e=>{window.setSelfTargetId=t=>{(0,sn.log)(tn.LogType.system,"Current target ID:",t),e(t)}}))}();(async()=>{(0,sn.generatePage)();const e=await rn,t=await function(e){class t{#ft=null;constructor(){window.onBidiMessage=e=>{let n;(0,sn.log)(tn.LogType.bidi,"received â—‚",e);try{n=t.#yt(e)}catch(t){return void this.#bt(e,Qt.Message.ErrorCode.InvalidArgument,t.message,null)}this.#ft?.call(null,n)}}setOnMessage(e){this.#ft=e}sendMessage(e){const t=JSON.stringify(e);window.sendBidiResponse(t),(0,sn.log)(tn.LogType.bidi,"sent â–¸",t)}close(){this.#ft=null,window.onBidiMessage=null}#bt(e,n,s,r){const a=t.#xt(e,n,s);r?this.sendMessage({...a,channel:r}):this.sendMessage(a)}static#Ct(e){return null===e?"null":Array.isArray(e)?"array":typeof e}static#xt(e,n,s){let r;try{const n=JSON.parse(e);"object"===t.#Ct(n)&&"id"in n&&(r=n.id)}catch{}return{id:r,error:n,message:s}}static#yt(e){let n;try{n=JSON.parse(e)}catch{throw new Error("Cannot parse data as JSON")}const s=t.#Ct(n);if("object"!==s)throw new Error(`Expected JSON object but got ${s}`);const{id:r,method:a,params:i}=n,o=t.#Ct(r);if("number"!==o||!Number.isInteger(r)||r<0)throw new Error(`Expected unsigned integer but got ${o}`);const d=t.#Ct(a);if("string"!==d)throw new Error(`Expected string method but got ${d}`);const c=t.#Ct(i);if("object"!==c)throw new Error(`Expected object params but got ${c}`);let u=n.channel;if(void 0!==u){const e=t.#Ct(u);if("string"!==e)throw new Error(`Expected string channel but got ${e}`);""===u&&(u=void 0)}return{id:r,method:a,params:i,channel:u}}}return Xt.BidiServer.createAndStart(new t,function(){class e{#ft=null;constructor(){window.cdp.onmessage=e=>{this.#ft?.call(null,e)}}setOnMessage(e){this.#ft=e}sendMessage(e){window.cdp.send(e)}close(){this.#ft=null,window.cdp.onmessage=null}}return new en.CdpConnection(new e,((...e)=>{(0,sn.log)(tn.LogType.cdp,...e)}))}(),e,new an,sn.log)}(e);(0,sn.log)(tn.LogType.system,"Launched"),t.emitOutgoingMessage(nn.OutgoingBidiMessage.createResolved({launched:!0},null))})();class an{parseAddPreloadScriptParams(e){return Yt.Script.parseAddPreloadScriptParams(e)}parseRemovePreloadScriptParams(e){return Yt.Script.parseRemovePreloadScriptParams(e)}parseGetRealmsParams(e){return Yt.Script.parseGetRealmsParams(e)}parseCallFunctionParams(e){return Yt.Script.parseCallFunctionParams(e)}parseEvaluateParams(e){return Yt.Script.parseEvaluateParams(e)}parseDisownParams(e){return Yt.Script.parseDisownParams(e)}parseSendCommandParams(e){return Yt.CDP.parseSendCommandParams(e)}parseGetSessionParams(e){return Yt.CDP.parseGetSessionParams(e)}parseSubscribeParams(e){return Yt.Session.parseSubscribeParams(e)}parseNavigateParams(e){return Yt.BrowsingContext.parseNavigateParams(e)}parseGetTreeParams(e){return Yt.BrowsingContext.parseGetTreeParams(e)}parseCreateParams(e){return Yt.BrowsingContext.parseCreateParams(e)}parseCloseParams(e){return Yt.BrowsingContext.parseCloseParams(e)}parseCaptureScreenshotParams(e){return Yt.BrowsingContext.parseCaptureScreenshotParams(e)}parsePrintParams(e){return Yt.BrowsingContext.parsePrintParams(e)}}return n}(); +var Gt=e&&e.__createBinding||(Object.create?function(e,t,n,s){void 0===s&&(s=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,r)}:function(e,t,n,s){void 0===s&&(s=n),e[s]=t[n]}),Yt=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Qt=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&Gt(t,e,n);return Yt(t,e),t};Object.defineProperty(n,"__esModule",{value:!0});const Xt=Qt(s),en=w,tn=_,nn=Bt,sn=E,rn=nt,an=Kt,on=async function(){return new Promise((e=>{window.setSelfTargetId=t=>{(0,an.log)(sn.LogType.system,"Current target ID:",t),e(t)}}))}();(async()=>{(0,an.generatePage)();const e=await on,t=await function(e){class t{#vt=null;constructor(){window.onBidiMessage=e=>{let n;(0,an.log)(sn.LogType.bidi,"received â—‚",e);try{n=t.#xt(e)}catch(t){return void this.#bt(e,en.Message.ErrorCode.InvalidArgument,t.message,null)}this.#vt?.call(null,n)}}setOnMessage(e){this.#vt=e}sendMessage(e){const t=JSON.stringify(e);window.sendBidiResponse(t),(0,an.log)(sn.LogType.bidi,"sent â–¸",t)}close(){this.#vt=null,window.onBidiMessage=null}#bt(e,n,s,r){const a=t.#Ct(e,n,s);r?this.sendMessage({...a,channel:r}):this.sendMessage(a)}static#wt(e){return null===e?"null":Array.isArray(e)?"array":typeof e}static#Ct(e,n,s){let r;try{const n=JSON.parse(e);"object"===t.#wt(n)&&"id"in n&&(r=n.id)}catch{}return{id:r,error:n,message:s}}static#xt(e){let n;try{n=JSON.parse(e)}catch{throw new Error("Cannot parse data as JSON")}const s=t.#wt(n);if("object"!==s)throw new Error(`Expected JSON object but got ${s}`);const{id:r,method:a,params:i}=n,o=t.#wt(r);if("number"!==o||!Number.isInteger(r)||r<0)throw new Error(`Expected unsigned integer but got ${o}`);const d=t.#wt(a);if("string"!==d)throw new Error(`Expected string method but got ${d}`);const c=t.#wt(i);if("object"!==c)throw new Error(`Expected object params but got ${c}`);let l=n.channel;if(void 0!==l){const e=t.#wt(l);if("string"!==e)throw new Error(`Expected string channel but got ${e}`);""===l&&(l=void 0)}return{id:r,method:a,params:i,channel:l}}}return tn.BidiServer.createAndStart(new t,function(){class e{#vt=null;constructor(){window.cdp.onmessage=e=>{this.#vt?.call(null,e)}}setOnMessage(e){this.#vt=e}sendMessage(e){window.cdp.send(e)}close(){this.#vt=null,window.cdp.onmessage=null}}return new nn.CdpConnection(new e,((...e)=>{(0,an.log)(sn.LogType.cdp,...e)}))}(),e,new dn,an.log)}(e);(0,an.log)(sn.LogType.system,"Launched"),t.emitOutgoingMessage(rn.OutgoingBidiMessage.createResolved({launched:!0},null))})();class dn{parseAddPreloadScriptParams(e){return Xt.Script.parseAddPreloadScriptParams(e)}parseRemovePreloadScriptParams(e){return Xt.Script.parseRemovePreloadScriptParams(e)}parseGetRealmsParams(e){return Xt.Script.parseGetRealmsParams(e)}parseCallFunctionParams(e){return Xt.Script.parseCallFunctionParams(e)}parseEvaluateParams(e){return Xt.Script.parseEvaluateParams(e)}parseDisownParams(e){return Xt.Script.parseDisownParams(e)}parseSendCommandParams(e){return Xt.CDP.parseSendCommandParams(e)}parseGetSessionParams(e){return Xt.CDP.parseGetSessionParams(e)}parseSubscribeParams(e){return Xt.Session.parseSubscribeParams(e)}parseNavigateParams(e){return Xt.BrowsingContext.parseNavigateParams(e)}parseGetTreeParams(e){return Xt.BrowsingContext.parseGetTreeParams(e)}parseCreateParams(e){return Xt.BrowsingContext.parseCreateParams(e)}parseCloseParams(e){return Xt.BrowsingContext.parseCloseParams(e)}parseCaptureScreenshotParams(e){return Xt.BrowsingContext.parseCaptureScreenshotParams(e)}parsePrintParams(e){return Xt.BrowsingContext.parsePrintParams(e)}}return n}(); //# sourceMappingURL=mapperTab.js.map
diff --git a/third_party/blink/common/mime_util/mime_util.cc b/third_party/blink/common/mime_util/mime_util.cc index f49cf1f..50d5ddd4 100644 --- a/third_party/blink/common/mime_util/mime_util.cc +++ b/third_party/blink/common/mime_util/mime_util.cc
@@ -121,6 +121,8 @@ bool IsUnsupportedTextMimeType(const std::string& mime_type) const; bool IsSupportedJavascriptMimeType(const std::string& mime_type) const; bool IsJSONMimeType(const std::string&) const; + bool IsXMLMimeType(const std::string& mime_type) const; + bool IsSVGMimeType(const std::string& mime_type) const; bool IsSupportedMimeType(const std::string& mime_type) const; @@ -186,6 +188,17 @@ net::MatchesMimeType("application/*+json", mime_type); } +// https://mimesniff.spec.whatwg.org/#xml-mime-type +bool MimeUtil::IsXMLMimeType(const std::string& mime_type) const { + return net::MatchesMimeType("text/xml", mime_type) || + net::MatchesMimeType("application/xml", mime_type) || + net::MatchesMimeType("application/*+xml", mime_type); +} + +bool MimeUtil::IsSVGMimeType(const std::string& mime_type) const { + return net::MatchesMimeType("image/svg+xml", mime_type); +} + bool MimeUtil::IsSupportedMimeType(const std::string& mime_type) const { return (base::StartsWith(mime_type, "image/", base::CompareCase::INSENSITIVE_ASCII) && @@ -219,6 +232,14 @@ return g_mime_util.Get().IsJSONMimeType(mime_type); } +bool IsXMLMimeType(const std::string& mime_type) { + return g_mime_util.Get().IsXMLMimeType(mime_type); +} + +bool IsSVGMimeType(const std::string& mime_type) { + return g_mime_util.Get().IsSVGMimeType(mime_type); +} + bool IsSupportedMimeType(const std::string& mime_type) { return g_mime_util.Get().IsSupportedMimeType(mime_type); }
diff --git a/third_party/blink/public/common/loader/loading_behavior_flag.h b/third_party/blink/public/common/loader/loading_behavior_flag.h index 2807058..9042faa 100644 --- a/third_party/blink/public/common/loader/loading_behavior_flag.h +++ b/third_party/blink/public/common/loader/loading_behavior_flag.h
@@ -72,6 +72,18 @@ // Indicates that the main resource fetch for the page controlled by // a service worker at the navigation time fallback to network. kLoadingBehaviorServiceWorkerMainResourceFetchFallback = 1 << 21, + // Indicates that the page uses the Drupal CMS. + kLoadingBehaviorDrupalCMSUsed = 1 << 22, + // Indicates that the page uses the Joomla CMS. + kLoadingBehaviorJoomlaCMSUsed = 1 << 23, + // Indicates that the page uses the Shopify CMS. + kLoadingBehaviorShopifyCMSUsed = 1 << 24, + // Indicates that the page uses the Squarespace CMS. + kLoadingBehaviorSquarespaceCMSUsed = 1 << 25, + // Indicates that the page uses the Wix CMS. + kLoadingBehaviorWixCMSUsed = 1 << 26, + // Indicates that the page uses the WordPress CMS. + kLoadingBehaviorWordPressCMSUsed = 1 << 27, }; } // namespace blink
diff --git a/third_party/blink/public/common/mime_util/mime_util.h b/third_party/blink/public/common/mime_util/mime_util.h index 9675518..05538330 100644 --- a/third_party/blink/public/common/mime_util/mime_util.h +++ b/third_party/blink/public/common/mime_util/mime_util.h
@@ -20,6 +20,8 @@ bool BLINK_COMMON_EXPORT IsSupportedJavascriptMimeType(const std::string& mime_type); bool BLINK_COMMON_EXPORT IsJSONMimeType(const std::string& mime_type); +bool BLINK_COMMON_EXPORT IsXMLMimeType(const std::string& mime_type); +bool BLINK_COMMON_EXPORT IsSVGMimeType(const std::string& mime_type); // Convenience function. bool BLINK_COMMON_EXPORT IsSupportedMimeType(const std::string& mime_type);
diff --git a/third_party/blink/public/devtools_protocol/browser_protocol.pdl b/third_party/blink/public/devtools_protocol/browser_protocol.pdl index 812d38b..3a8acad 100644 --- a/third_party/blink/public/devtools_protocol/browser_protocol.pdl +++ b/third_party/blink/public/devtools_protocol/browser_protocol.pdl
@@ -11004,9 +11004,6 @@ SameSiteCrossOriginNavigationNotOptInInMainFrameNavigation MemoryPressureOnTrigger MemoryPressureAfterTriggered - SpeculationRuleRemoved - TriggerPageNavigated - OtherPrerenderedPageActivated # Fired when a prerender attempt is completed. event prerenderAttemptCompleted @@ -11102,6 +11099,7 @@ Page.FrameId initiatingFrameId string prerenderingUrl PreloadingStatus status + optional PrerenderFinalStatus prerenderStatus # Send a list of sources for all preloading attempts in a document. event preloadingAttemptSourcesUpdated
diff --git a/third_party/blink/public/mojom/peerconnection/peer_connection_tracker.mojom b/third_party/blink/public/mojom/peerconnection/peer_connection_tracker.mojom index d5c7559..69dda175 100644 --- a/third_party/blink/public/mojom/peerconnection/peer_connection_tracker.mojom +++ b/third_party/blink/public/mojom/peerconnection/peer_connection_tracker.mojom
@@ -59,6 +59,9 @@ // Requests legacy PeerConnection stats for webrtc-internals. GetLegacyStats(); + + // Requests a state dump for webrtc-internals. + GetCurrentState(); }; // This interface allows forwarding PeerConnection events to WebRTCInternals in
diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h index 78eb25f4..882f276 100644 --- a/third_party/blink/public/platform/platform.h +++ b/third_party/blink/public/platform/platform.h
@@ -441,13 +441,6 @@ bool prefer_low_power_gpu = false; bool fail_if_major_performance_caveat = false; ContextType context_type = kGLES2ContextType; - // Offscreen contexts usually share a surface for the default frame buffer - // since they aren't rendering to it. Setting any of the following - // attributes causes creation of a custom surface owned by the context. - bool support_alpha = false; - bool support_depth = false; - bool support_antialias = false; - bool support_stencil = false; // Offscreen contexts created for WebGL should not need the RasterInterface // or GrContext. If either of these are set to false, it will not be
diff --git a/third_party/blink/renderer/bindings/core/v8/serialization/serialized_script_value_test.cc b/third_party/blink/renderer/bindings/core/v8/serialization/serialized_script_value_test.cc index 61d770af..cfd9b46 100644 --- a/third_party/blink/renderer/bindings/core/v8/serialization/serialized_script_value_test.cc +++ b/third_party/blink/renderer/bindings/core/v8/serialization/serialized_script_value_test.cc
@@ -112,7 +112,7 @@ serializedScriptValue->Deserialize(isolate); ASSERT_TRUE(deserialized->IsObject()); v8::Local<v8::Object> deserializedObject = deserialized.As<v8::Object>(); - ASSERT_TRUE(V8ImageData::HasInstance(deserializedObject, isolate)); + ASSERT_TRUE(V8ImageData::HasInstance(isolate, deserializedObject)); ImageData* imageData = V8ImageData::ToImpl(deserializedObject); EXPECT_EQ(imageData->width(), 127); EXPECT_EQ(imageData->height(), 1); @@ -138,7 +138,7 @@ v8::Local<v8::Value> v8_file = serialized_script_value->Deserialize(scope.GetIsolate()); - ASSERT_TRUE(V8File::HasInstance(v8_file, scope.GetIsolate())); + ASSERT_TRUE(V8File::HasInstance(scope.GetIsolate(), v8_file)); File* file = V8File::ToImpl(v8::Local<v8::Object>::Cast(v8_file)); EXPECT_TRUE(file->HasBackingFile()); EXPECT_EQ(File::kIsUserVisible, file->GetUserVisibility()); @@ -164,7 +164,7 @@ v8::Local<v8::Value> v8_file = serialized_script_value->Deserialize(scope.GetIsolate()); - ASSERT_TRUE(V8File::HasInstance(v8_file, scope.GetIsolate())); + ASSERT_TRUE(V8File::HasInstance(scope.GetIsolate(), v8_file)); File* file = V8File::ToImpl(v8::Local<v8::Object>::Cast(v8_file)); EXPECT_FALSE(file->HasBackingFile()); EXPECT_EQ(File::kIsNotUserVisible, file->GetUserVisibility());
diff --git a/third_party/blink/renderer/bindings/core/v8/serialization/v8_script_value_serializer.cc b/third_party/blink/renderer/bindings/core/v8/serialization/v8_script_value_serializer.cc index 62de65f..7cc1894 100644 --- a/third_party/blink/renderer/bindings/core/v8/serialization/v8_script_value_serializer.cc +++ b/third_party/blink/renderer/bindings/core/v8/serialization/v8_script_value_serializer.cc
@@ -91,7 +91,7 @@ Transferables& transferables, ExceptionState& exception_state) { // Validation of Objects implementing an interface, per WebIDL spec 4.1.15. - if (V8MessagePort::HasInstance(object, isolate)) { + if (V8MessagePort::HasInstance(isolate, object)) { MessagePort* port = V8MessagePort::ToImpl(v8::Local<v8::Object>::Cast(object)); // Check for duplicate MessagePorts. @@ -105,7 +105,7 @@ transferables.message_ports.push_back(port); return true; } - if (V8MojoHandle::HasInstance(object, isolate)) { + if (V8MojoHandle::HasInstance(isolate, object)) { MojoHandle* handle = V8MojoHandle::ToImpl(v8::Local<v8::Object>::Cast(object)); // Check for duplicate MojoHandles. @@ -151,7 +151,7 @@ transferables.array_buffers.push_back(shared_array_buffer); return true; } - if (V8ImageBitmap::HasInstance(object, isolate)) { + if (V8ImageBitmap::HasInstance(isolate, object)) { ImageBitmap* image_bitmap = V8ImageBitmap::ToImpl(v8::Local<v8::Object>::Cast(object)); if (transferables.image_bitmaps.Contains(image_bitmap)) { @@ -164,7 +164,7 @@ transferables.image_bitmaps.push_back(image_bitmap); return true; } - if (V8OffscreenCanvas::HasInstance(object, isolate)) { + if (V8OffscreenCanvas::HasInstance(isolate, object)) { OffscreenCanvas* offscreen_canvas = V8OffscreenCanvas::ToImpl(v8::Local<v8::Object>::Cast(object)); if (transferables.offscreen_canvases.Contains(offscreen_canvas)) { @@ -177,7 +177,7 @@ transferables.offscreen_canvases.push_back(offscreen_canvas); return true; } - if (V8ReadableStream::HasInstance(object, isolate)) { + if (V8ReadableStream::HasInstance(isolate, object)) { ReadableStream* stream = V8ReadableStream::ToImpl(v8::Local<v8::Object>::Cast(object)); if (transferables.readable_streams.Contains(stream)) { @@ -190,7 +190,7 @@ transferables.readable_streams.push_back(stream); return true; } - if (V8WritableStream::HasInstance(object, isolate)) { + if (V8WritableStream::HasInstance(isolate, object)) { WritableStream* stream = V8WritableStream::ToImpl(v8::Local<v8::Object>::Cast(object)); if (transferables.writable_streams.Contains(stream)) { @@ -203,7 +203,7 @@ transferables.writable_streams.push_back(stream); return true; } - if (V8TransformStream::HasInstance(object, isolate)) { + if (V8TransformStream::HasInstance(isolate, object)) { TransformStream* stream = V8TransformStream::ToImpl(v8::Local<v8::Object>::Cast(object)); if (transferables.transform_streams.Contains(stream)) {
diff --git a/third_party/blink/renderer/bindings/core/v8/serialization/v8_script_value_serializer_test.cc b/third_party/blink/renderer/bindings/core/v8/serialization/v8_script_value_serializer_test.cc index 8f3b463..54b01c6f 100644 --- a/third_party/blink/renderer/bindings/core/v8/serialization/v8_script_value_serializer_test.cc +++ b/third_party/blink/renderer/bindings/core/v8/serialization/v8_script_value_serializer_test.cc
@@ -247,7 +247,7 @@ ToV8Traits<DOMPoint>::ToV8(scope.GetScriptState(), point) .ToLocalChecked(); v8::Local<v8::Value> result = RoundTrip(wrapper, scope); - ASSERT_TRUE(V8DOMPoint::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8DOMPoint::HasInstance(scope.GetIsolate(), result)); DOMPoint* new_point = V8DOMPoint::ToImpl(result.As<v8::Object>()); EXPECT_NE(point, new_point); EXPECT_EQ(point->x(), new_point->x()); @@ -266,7 +266,7 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x40}); v8::Local<v8::Value> result = V8ScriptValueDeserializer(script_state, input).Deserialize(); - ASSERT_TRUE(V8DOMPoint::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8DOMPoint::HasInstance(scope.GetIsolate(), result)); DOMPoint* point = V8DOMPoint::ToImpl(result.As<v8::Object>()); EXPECT_EQ(1, point->x()); EXPECT_EQ(2, point->y()); @@ -281,8 +281,8 @@ v8::Local<v8::Value> wrapper = ToV8(point, scope.GetContext()->Global(), scope.GetIsolate()); v8::Local<v8::Value> result = RoundTrip(wrapper, scope); - ASSERT_TRUE(V8DOMPointReadOnly::HasInstance(result, scope.GetIsolate())); - EXPECT_FALSE(V8DOMPoint::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8DOMPointReadOnly::HasInstance(scope.GetIsolate(), result)); + EXPECT_FALSE(V8DOMPoint::HasInstance(scope.GetIsolate(), result)); DOMPointReadOnly* new_point = V8DOMPointReadOnly::ToImpl(result.As<v8::Object>()); EXPECT_NE(point, new_point); @@ -302,7 +302,7 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x40}); v8::Local<v8::Value> result = V8ScriptValueDeserializer(script_state, input).Deserialize(); - ASSERT_TRUE(V8DOMPointReadOnly::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8DOMPointReadOnly::HasInstance(scope.GetIsolate(), result)); DOMPointReadOnly* point = V8DOMPointReadOnly::ToImpl(result.As<v8::Object>()); EXPECT_EQ(1, point->x()); EXPECT_EQ(2, point->y()); @@ -317,7 +317,7 @@ v8::Local<v8::Value> wrapper = ToV8(rect, scope.GetContext()->Global(), scope.GetIsolate()); v8::Local<v8::Value> result = RoundTrip(wrapper, scope); - ASSERT_TRUE(V8DOMRect::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8DOMRect::HasInstance(scope.GetIsolate(), result)); DOMRect* new_rect = V8DOMRect::ToImpl(result.As<v8::Object>()); EXPECT_NE(rect, new_rect); EXPECT_EQ(rect->x(), new_rect->x()); @@ -336,7 +336,7 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x40}); v8::Local<v8::Value> result = V8ScriptValueDeserializer(script_state, input).Deserialize(); - ASSERT_TRUE(V8DOMRect::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8DOMRect::HasInstance(scope.GetIsolate(), result)); DOMRect* rect = V8DOMRect::ToImpl(result.As<v8::Object>()); EXPECT_EQ(1, rect->x()); EXPECT_EQ(2, rect->y()); @@ -351,8 +351,8 @@ v8::Local<v8::Value> wrapper = ToV8(rect, scope.GetContext()->Global(), scope.GetIsolate()); v8::Local<v8::Value> result = RoundTrip(wrapper, scope); - ASSERT_TRUE(V8DOMRectReadOnly::HasInstance(result, scope.GetIsolate())); - EXPECT_FALSE(V8DOMRect::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8DOMRectReadOnly::HasInstance(scope.GetIsolate(), result)); + EXPECT_FALSE(V8DOMRect::HasInstance(scope.GetIsolate(), result)); DOMRectReadOnly* new_rect = V8DOMRectReadOnly::ToImpl(result.As<v8::Object>()); EXPECT_NE(rect, new_rect); @@ -372,7 +372,7 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x40}); v8::Local<v8::Value> result = V8ScriptValueDeserializer(script_state, input).Deserialize(); - ASSERT_TRUE(V8DOMRectReadOnly::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8DOMRectReadOnly::HasInstance(scope.GetIsolate(), result)); DOMRectReadOnly* rect = V8DOMRectReadOnly::ToImpl(result.As<v8::Object>()); EXPECT_EQ(1, rect->x()); EXPECT_EQ(2, rect->y()); @@ -407,7 +407,7 @@ v8::Local<v8::Value> wrapper = ToV8(quad, scope.GetContext()->Global(), scope.GetIsolate()); v8::Local<v8::Value> result = RoundTrip(wrapper, scope); - ASSERT_TRUE(V8DOMQuad::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8DOMQuad::HasInstance(scope.GetIsolate(), result)); DOMQuad* new_quad = V8DOMQuad::ToImpl(result.As<v8::Object>()); EXPECT_NE(quad, new_quad); EXPECT_NE(quad->p1(), new_quad->p1()); @@ -450,7 +450,7 @@ 0x30, 0x40}); v8::Local<v8::Value> result = V8ScriptValueDeserializer(script_state, input).Deserialize(); - ASSERT_TRUE(V8DOMQuad::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8DOMQuad::HasInstance(scope.GetIsolate(), result)); DOMQuad* quad = V8DOMQuad::ToImpl(result.As<v8::Object>()); EXPECT_EQ(1, quad->p1()->x()); EXPECT_EQ(5, quad->p1()->y()); @@ -486,7 +486,7 @@ v8::Local<v8::Value> wrapper = ToV8(matrix, scope.GetContext()->Global(), scope.GetIsolate()); v8::Local<v8::Value> result = RoundTrip(wrapper, scope); - ASSERT_TRUE(V8DOMMatrix::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8DOMMatrix::HasInstance(scope.GetIsolate(), result)); DOMMatrix* new_matrix = V8DOMMatrix::ToImpl(result.As<v8::Object>()); EXPECT_NE(matrix, new_matrix); EXPECT_TRUE(new_matrix->is2D()); @@ -514,7 +514,7 @@ }); v8::Local<v8::Value> result = V8ScriptValueDeserializer(script_state, input).Deserialize(); - ASSERT_TRUE(V8DOMMatrix::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8DOMMatrix::HasInstance(scope.GetIsolate(), result)); DOMMatrix* matrix = V8DOMMatrix::ToImpl(result.As<v8::Object>()); EXPECT_TRUE(matrix->is2D()); EXPECT_EQ(1.0, matrix->a()); @@ -542,8 +542,8 @@ v8::Local<v8::Value> wrapper = ToV8(matrix, scope.GetContext()->Global(), scope.GetIsolate()); v8::Local<v8::Value> result = RoundTrip(wrapper, scope); - ASSERT_TRUE(V8DOMMatrixReadOnly::HasInstance(result, scope.GetIsolate())); - EXPECT_FALSE(V8DOMMatrix::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8DOMMatrixReadOnly::HasInstance(scope.GetIsolate(), result)); + EXPECT_FALSE(V8DOMMatrix::HasInstance(scope.GetIsolate(), result)); DOMMatrixReadOnly* new_matrix = V8DOMMatrixReadOnly::ToImpl(result.As<v8::Object>()); EXPECT_NE(matrix, new_matrix); @@ -572,7 +572,7 @@ }); v8::Local<v8::Value> result = V8ScriptValueDeserializer(script_state, input).Deserialize(); - ASSERT_TRUE(V8DOMMatrixReadOnly::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8DOMMatrixReadOnly::HasInstance(scope.GetIsolate(), result)); DOMMatrixReadOnly* matrix = V8DOMMatrixReadOnly::ToImpl(result.As<v8::Object>()); EXPECT_TRUE(matrix->is2D()); @@ -610,7 +610,7 @@ v8::Local<v8::Value> wrapper = ToV8(matrix, scope.GetContext()->Global(), scope.GetIsolate()); v8::Local<v8::Value> result = RoundTrip(wrapper, scope); - ASSERT_TRUE(V8DOMMatrix::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8DOMMatrix::HasInstance(scope.GetIsolate(), result)); DOMMatrix* new_matrix = V8DOMMatrix::ToImpl(result.As<v8::Object>()); EXPECT_NE(matrix, new_matrix); EXPECT_FALSE(new_matrix->is2D()); @@ -651,7 +651,7 @@ }); v8::Local<v8::Value> result = V8ScriptValueDeserializer(script_state, input).Deserialize(); - ASSERT_TRUE(V8DOMMatrix::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8DOMMatrix::HasInstance(scope.GetIsolate(), result)); DOMMatrix* matrix = V8DOMMatrix::ToImpl(result.As<v8::Object>()); EXPECT_FALSE(matrix->is2D()); EXPECT_EQ(1.1, matrix->m11()); @@ -699,8 +699,8 @@ v8::Local<v8::Value> wrapper = ToV8(matrix, scope.GetContext()->Global(), scope.GetIsolate()); v8::Local<v8::Value> result = RoundTrip(wrapper, scope); - ASSERT_TRUE(V8DOMMatrixReadOnly::HasInstance(result, scope.GetIsolate())); - EXPECT_FALSE(V8DOMMatrix::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8DOMMatrixReadOnly::HasInstance(scope.GetIsolate(), result)); + EXPECT_FALSE(V8DOMMatrix::HasInstance(scope.GetIsolate(), result)); DOMMatrixReadOnly* new_matrix = V8DOMMatrixReadOnly::ToImpl(result.As<v8::Object>()); EXPECT_NE(matrix, new_matrix); @@ -743,7 +743,7 @@ }); v8::Local<v8::Value> result = V8ScriptValueDeserializer(script_state, input).Deserialize(); - ASSERT_TRUE(V8DOMMatrixReadOnly::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8DOMMatrixReadOnly::HasInstance(scope.GetIsolate(), result)); DOMMatrixReadOnly* matrix = V8DOMMatrixReadOnly::ToImpl(result.As<v8::Object>()); EXPECT_FALSE(matrix->is2D()); @@ -777,7 +777,7 @@ v8::Local<v8::Value> wrapper = ToV8(image_data, scope.GetContext()->Global(), scope.GetIsolate()); v8::Local<v8::Value> result = RoundTrip(wrapper, scope); - ASSERT_TRUE(V8ImageData::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8ImageData::HasInstance(scope.GetIsolate(), result)); ImageData* new_image_data = V8ImageData::ToImpl(result.As<v8::Object>()); EXPECT_NE(image_data, new_image_data); EXPECT_EQ(image_data->Size(), new_image_data->Size()); @@ -800,7 +800,7 @@ v8::Local<v8::Value> wrapper = ToV8(image_data, scope.GetContext()->Global(), scope.GetIsolate()); v8::Local<v8::Value> result = RoundTrip(wrapper, scope); - EXPECT_FALSE(V8ImageData::HasInstance(result, scope.GetIsolate())); + EXPECT_FALSE(V8ImageData::HasInstance(scope.GetIsolate(), result)); } TEST(V8ScriptValueSerializerTest, RoundTripImageDataWithColorSpaceInfo) { @@ -820,7 +820,7 @@ v8::Local<v8::Value> wrapper = ToV8(image_data, scope.GetContext()->Global(), scope.GetIsolate()); v8::Local<v8::Value> result = RoundTrip(wrapper, scope); - ASSERT_TRUE(V8ImageData::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8ImageData::HasInstance(scope.GetIsolate(), result)); ImageData* new_image_data = V8ImageData::ToImpl(result.As<v8::Object>()); EXPECT_NE(image_data, new_image_data); EXPECT_EQ(image_data->Size(), new_image_data->Size()); @@ -843,7 +843,7 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}); v8::Local<v8::Value> result = V8ScriptValueDeserializer(script_state, input).Deserialize(); - ASSERT_TRUE(V8ImageData::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8ImageData::HasInstance(scope.GetIsolate(), result)); ImageData* new_image_data = V8ImageData::ToImpl(result.As<v8::Object>()); EXPECT_EQ(gfx::Size(2, 1), new_image_data->Size()); SkPixmap new_pm = new_image_data->GetSkPixmap(); @@ -859,7 +859,7 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}); v8::Local<v8::Value> result = V8ScriptValueDeserializer(script_state, input).Deserialize(); - ASSERT_TRUE(V8ImageData::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8ImageData::HasInstance(scope.GetIsolate(), result)); ImageData* new_image_data = V8ImageData::ToImpl(result.As<v8::Object>()); EXPECT_EQ(gfx::Size(2, 1), new_image_data->Size()); SkPixmap new_pm = new_image_data->GetSkPixmap(); @@ -878,7 +878,7 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}); v8::Local<v8::Value> result = V8ScriptValueDeserializer(script_state, input).Deserialize(); - ASSERT_TRUE(V8ImageData::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8ImageData::HasInstance(scope.GetIsolate(), result)); ImageData* new_image_data = V8ImageData::ToImpl(result.As<v8::Object>()); EXPECT_EQ(gfx::Size(2, 1), new_image_data->Size()); ImageDataSettings* new_image_data_settings = new_image_data->getSettings(); @@ -927,7 +927,7 @@ v8::Local<v8::Value> result = RoundTrip(wrapper, scope, nullptr, &transferables); - ASSERT_TRUE(V8MessagePort::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8MessagePort::HasInstance(scope.GetIsolate(), result)); MessagePort* new_port = V8MessagePort::ToImpl(result.As<v8::Object>()); EXPECT_FALSE(port->IsEntangled()); EXPECT_TRUE(new_port->IsEntangled()); @@ -998,7 +998,7 @@ options.message_ports->push_back(port2); V8ScriptValueDeserializer deserializer(script_state, input, options); v8::Local<v8::Value> result = deserializer.Deserialize(); - ASSERT_TRUE(V8MessagePort::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8MessagePort::HasInstance(scope.GetIsolate(), result)); EXPECT_EQ(port2, V8MessagePort::ToImpl(result.As<v8::Object>())); } } @@ -1019,7 +1019,7 @@ v8::Local<v8::Value> result = RoundTrip(wrapper, scope, nullptr, &transferables); - ASSERT_TRUE(V8MojoHandle::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8MojoHandle::HasInstance(scope.GetIsolate(), result)); MojoHandle* new_handle = V8MojoHandle::ToImpl(result.As<v8::Object>()); EXPECT_FALSE(handle->TakeHandle().is_valid()); EXPECT_TRUE(new_handle->TakeHandle().is_valid()); @@ -1060,7 +1060,7 @@ // Serialize and deserialize it. v8::Local<v8::Value> wrapper = ToV8(image_bitmap, scope.GetScriptState()); v8::Local<v8::Value> result = RoundTrip(wrapper, scope); - ASSERT_TRUE(V8ImageBitmap::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8ImageBitmap::HasInstance(scope.GetIsolate(), result)); ImageBitmap* new_image_bitmap = V8ImageBitmap::ToImpl(result.As<v8::Object>()); ASSERT_TRUE(new_image_bitmap->BitmapImage()); @@ -1096,7 +1096,7 @@ // Serialize and deserialize it. v8::Local<v8::Value> wrapper = ToV8(image_bitmap, scope.GetScriptState()); v8::Local<v8::Value> result = RoundTrip(wrapper, scope); - ASSERT_TRUE(V8ImageBitmap::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8ImageBitmap::HasInstance(scope.GetIsolate(), result)); ImageBitmap* new_image_bitmap = V8ImageBitmap::ToImpl(result.As<v8::Object>()); ASSERT_TRUE(new_image_bitmap->BitmapImage()); @@ -1122,7 +1122,7 @@ // Serialize and deserialize it. v8::Local<v8::Value> wrapper = ToV8(image_bitmap, scope.GetScriptState()); v8::Local<v8::Value> result = RoundTrip(wrapper, scope); - ASSERT_TRUE(V8ImageBitmap::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8ImageBitmap::HasInstance(scope.GetIsolate(), result)); ImageBitmap* new_image_bitmap = V8ImageBitmap::ToImpl(result.As<v8::Object>()); ASSERT_TRUE(new_image_bitmap->BitmapImage()); @@ -1177,7 +1177,7 @@ v8::Local<v8::Value> result = V8ScriptValueDeserializer(script_state, input).Deserialize(); - ASSERT_TRUE(V8ImageBitmap::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8ImageBitmap::HasInstance(scope.GetIsolate(), result)); ImageBitmap* new_image_bitmap = V8ImageBitmap::ToImpl(result.As<v8::Object>()); ASSERT_EQ(gfx::Size(2, 1), new_image_bitmap->Size()); @@ -1206,7 +1206,7 @@ v8::Local<v8::Value> result = V8ScriptValueDeserializer(script_state, input).Deserialize(); - ASSERT_TRUE(V8ImageBitmap::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8ImageBitmap::HasInstance(scope.GetIsolate(), result)); ImageBitmap* new_image_bitmap = V8ImageBitmap::ToImpl(result.As<v8::Object>()); ASSERT_EQ(gfx::Size(2, 1), new_image_bitmap->Size()); @@ -1269,7 +1269,7 @@ v8::Local<v8::Value> result = V8ScriptValueDeserializer(script_state, input).Deserialize(); - ASSERT_TRUE(V8ImageBitmap::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8ImageBitmap::HasInstance(scope.GetIsolate(), result)); ImageBitmap* new_image_bitmap = V8ImageBitmap::ToImpl(result.As<v8::Object>()); // Check image size @@ -1331,7 +1331,7 @@ v8::Local<v8::Value> result = V8ScriptValueDeserializer(script_state, input).Deserialize(); - ASSERT_TRUE(V8ImageBitmap::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8ImageBitmap::HasInstance(scope.GetIsolate(), result)); ImageBitmap* new_image_bitmap = V8ImageBitmap::ToImpl(result.As<v8::Object>()); // Check image size @@ -1488,7 +1488,7 @@ transferables.image_bitmaps.push_back(image_bitmap); v8::Local<v8::Value> result = RoundTrip(wrapper, scope, nullptr, &transferables); - ASSERT_TRUE(V8ImageBitmap::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8ImageBitmap::HasInstance(scope.GetIsolate(), result)); ImageBitmap* new_image_bitmap = V8ImageBitmap::ToImpl(result.As<v8::Object>()); ASSERT_TRUE(new_image_bitmap->BitmapImage()); @@ -1520,7 +1520,7 @@ transferables.offscreen_canvases.push_back(canvas); v8::Local<v8::Value> result = RoundTrip(wrapper, scope, nullptr, &transferables); - ASSERT_TRUE(V8OffscreenCanvas::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8OffscreenCanvas::HasInstance(scope.GetIsolate(), result)); OffscreenCanvas* new_canvas = V8OffscreenCanvas::ToImpl(result.As<v8::Object>()); EXPECT_EQ(gfx::Size(10, 7), new_canvas->Size()); @@ -1539,7 +1539,7 @@ EXPECT_FALSE(uuid.empty()); v8::Local<v8::Value> wrapper = ToV8(blob, scope.GetScriptState()); v8::Local<v8::Value> result = RoundTrip(wrapper, scope); - ASSERT_TRUE(V8Blob::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8Blob::HasInstance(scope.GetIsolate(), result)); Blob* new_blob = V8Blob::ToImpl(result.As<v8::Object>()); EXPECT_EQ("text/plain", new_blob->type()); EXPECT_EQ(sizeof(kHelloWorld), new_blob->size()); @@ -1556,7 +1556,7 @@ 0x65, 0x78, 0x74, 0x2f, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x0c}); v8::Local<v8::Value> result = V8ScriptValueDeserializer(scope.GetScriptState(), input).Deserialize(); - ASSERT_TRUE(V8Blob::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8Blob::HasInstance(scope.GetIsolate(), result)); Blob* new_blob = V8Blob::ToImpl(result.As<v8::Object>()); EXPECT_EQ("d875dfc2-4505-461b-98fe-0cf6cc5eaf44", new_blob->Uuid()); EXPECT_EQ("text/plain", new_blob->type()); @@ -1577,7 +1577,7 @@ RoundTrip(wrapper, scope, nullptr, nullptr, &blob_info_array); // As before, the resulting blob should be correct. - ASSERT_TRUE(V8Blob::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8Blob::HasInstance(scope.GetIsolate(), result)); Blob* new_blob = V8Blob::ToImpl(result.As<v8::Object>()); EXPECT_EQ("text/plain", new_blob->type()); EXPECT_EQ(sizeof(kHelloWorld), new_blob->size()); @@ -1605,7 +1605,7 @@ V8ScriptValueDeserializer deserializer(scope.GetScriptState(), input, options); v8::Local<v8::Value> result = deserializer.Deserialize(); - ASSERT_TRUE(V8Blob::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8Blob::HasInstance(scope.GetIsolate(), result)); Blob* new_blob = V8Blob::ToImpl(result.As<v8::Object>()); EXPECT_EQ("d875dfc2-4505-461b-98fe-0cf6cc5eaf44", new_blob->Uuid()); EXPECT_EQ("text/plain", new_blob->type()); @@ -1637,7 +1637,7 @@ auto* file = MakeGarbageCollected<File>("/native/path"); v8::Local<v8::Value> wrapper = ToV8(file, scope.GetScriptState()); v8::Local<v8::Value> result = RoundTrip(wrapper, scope); - ASSERT_TRUE(V8File::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8File::HasInstance(scope.GetIsolate(), result)); File* new_file = V8File::ToImpl(result.As<v8::Object>()); EXPECT_TRUE(new_file->HasBackingFile()); EXPECT_EQ("/native/path", new_file->GetPath()); @@ -1652,7 +1652,7 @@ blob_data_handle); v8::Local<v8::Value> wrapper = ToV8(file, scope.GetScriptState()); v8::Local<v8::Value> result = RoundTrip(wrapper, scope); - ASSERT_TRUE(V8File::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8File::HasInstance(scope.GetIsolate(), result)); File* new_file = V8File::ToImpl(result.As<v8::Object>()); EXPECT_FALSE(new_file->HasBackingFile()); EXPECT_TRUE(file->GetPath().empty()); @@ -1667,7 +1667,7 @@ File::CreateForFileSystemFile("name", metadata, File::kIsUserVisible); v8::Local<v8::Value> wrapper = ToV8(file, scope.GetScriptState()); v8::Local<v8::Value> result = RoundTrip(wrapper, scope); - ASSERT_TRUE(V8File::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8File::HasInstance(scope.GetIsolate(), result)); File* new_file = V8File::ToImpl(result.As<v8::Object>()); EXPECT_TRUE(new_file->HasBackingFile()); EXPECT_EQ("/native/snapshot", new_file->GetPath()); @@ -1684,7 +1684,7 @@ url, metadata, File::kIsUserVisible, BlobDataHandle::Create()); v8::Local<v8::Value> wrapper = ToV8(file, scope.GetScriptState()); v8::Local<v8::Value> result = RoundTrip(wrapper, scope); - ASSERT_TRUE(V8File::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8File::HasInstance(scope.GetIsolate(), result)); File* new_file = V8File::ToImpl(result.As<v8::Object>()); EXPECT_FALSE(new_file->HasBackingFile()); EXPECT_TRUE(file->GetPath().empty()); @@ -1721,7 +1721,7 @@ 't', 'e', 'x', 't', '/', 'p', 'l', 'a', 'i', 'n'}); v8::Local<v8::Value> result = V8ScriptValueDeserializer(scope.GetScriptState(), input).Deserialize(); - ASSERT_TRUE(V8File::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8File::HasInstance(scope.GetIsolate(), result)); File* new_file = V8File::ToImpl(result.As<v8::Object>()); EXPECT_EQ("path", new_file->GetPath()); EXPECT_EQ("f4a6edd5-65ad-4dc3-b67c-a779c02f0fa3", new_file->Uuid()); @@ -1744,7 +1744,7 @@ 't', '/', 'p', 'l', 'a', 'i', 'n', 0x00}); v8::Local<v8::Value> result = V8ScriptValueDeserializer(scope.GetScriptState(), input).Deserialize(); - ASSERT_TRUE(V8File::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8File::HasInstance(scope.GetIsolate(), result)); File* new_file = V8File::ToImpl(result.As<v8::Object>()); EXPECT_EQ("path", new_file->GetPath()); EXPECT_EQ("name", new_file->name()); @@ -1769,7 +1769,7 @@ 0x00, 0x00, 0x00, 0x00, 0xd0, 0xbf}); v8::Local<v8::Value> result = V8ScriptValueDeserializer(scope.GetScriptState(), input).Deserialize(); - ASSERT_TRUE(V8File::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8File::HasInstance(scope.GetIsolate(), result)); File* new_file = V8File::ToImpl(result.As<v8::Object>()); EXPECT_EQ("path", new_file->GetPath()); EXPECT_EQ("name", new_file->name()); @@ -1797,7 +1797,7 @@ 't', '/', 'p', 'l', 'a', 'i', 'n', 0x00, 0x00, 0x00}); v8::Local<v8::Value> result = V8ScriptValueDeserializer(scope.GetScriptState(), input).Deserialize(); - ASSERT_TRUE(V8File::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8File::HasInstance(scope.GetIsolate(), result)); File* new_file = V8File::ToImpl(result.As<v8::Object>()); EXPECT_EQ("path", new_file->GetPath()); EXPECT_EQ("name", new_file->name()); @@ -1822,7 +1822,7 @@ 0x00, 0x00, 0x00, 0x00, 0xd0, 0xbf, 0x01, 0x00}); v8::Local<v8::Value> result = V8ScriptValueDeserializer(scope.GetScriptState(), input).Deserialize(); - ASSERT_TRUE(V8File::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8File::HasInstance(scope.GetIsolate(), result)); File* new_file = V8File::ToImpl(result.As<v8::Object>()); EXPECT_EQ("path", new_file->GetPath()); EXPECT_EQ("name", new_file->name()); @@ -1852,7 +1852,7 @@ // The only users of the 'blob_info_array' version of serialization is // IndexedDB, and the full path is not needed for that system - thus it is not // sent in the round trip. - ASSERT_TRUE(V8File::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8File::HasInstance(scope.GetIsolate(), result)); File* new_file = V8File::ToImpl(result.As<v8::Object>()); EXPECT_FALSE(new_file->HasBackingFile()); EXPECT_EQ("path", new_file->name()); @@ -1879,7 +1879,7 @@ V8ScriptValueDeserializer deserializer(scope.GetScriptState(), input, options); v8::Local<v8::Value> result = deserializer.Deserialize(); - ASSERT_TRUE(V8File::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8File::HasInstance(scope.GetIsolate(), result)); File* new_file = V8File::ToImpl(result.As<v8::Object>()); EXPECT_EQ("d875dfc2-4505-461b-98fe-0cf6cc5eaf44", new_file->Uuid()); EXPECT_EQ("text/plain", new_file->type()); @@ -1917,7 +1917,7 @@ file_list->Append(MakeGarbageCollected<File>("/native/path2")); v8::Local<v8::Value> wrapper = ToV8(file_list, scope.GetScriptState()); v8::Local<v8::Value> result = RoundTrip(wrapper, scope); - ASSERT_TRUE(V8FileList::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8FileList::HasInstance(scope.GetIsolate(), result)); FileList* new_file_list = V8FileList::ToImpl(result.As<v8::Object>()); ASSERT_EQ(2u, new_file_list->length()); EXPECT_EQ("/native/path", new_file_list->item(0)->GetPath()); @@ -1930,7 +1930,7 @@ SerializedValue({0xff, 0x09, 0x3f, 0x00, 0x6c, 0x00}); v8::Local<v8::Value> result = V8ScriptValueDeserializer(scope.GetScriptState(), input).Deserialize(); - ASSERT_TRUE(V8FileList::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8FileList::HasInstance(scope.GetIsolate(), result)); FileList* new_file_list = V8FileList::ToImpl(result.As<v8::Object>()); EXPECT_EQ(0u, new_file_list->length()); } @@ -1956,7 +1956,7 @@ 'x', 't', '/', 'p', 'l', 'a', 'i', 'n', 0x00, 0x00}); v8::Local<v8::Value> result = V8ScriptValueDeserializer(scope.GetScriptState(), input).Deserialize(); - ASSERT_TRUE(V8FileList::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8FileList::HasInstance(scope.GetIsolate(), result)); FileList* new_file_list = V8FileList::ToImpl(result.As<v8::Object>()); EXPECT_EQ(1u, new_file_list->length()); File* new_file = new_file_list->item(0); @@ -1985,7 +1985,7 @@ // The only users of the 'blob_info_array' version of serialization is // IndexedDB, and the full path is not needed for that system - thus it is not // sent in the round trip. - ASSERT_TRUE(V8FileList::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8FileList::HasInstance(scope.GetIsolate(), result)); FileList* new_file_list = V8FileList::ToImpl(result.As<v8::Object>()); ASSERT_EQ(2u, new_file_list->length()); EXPECT_EQ("path", new_file_list->item(0)->name()); @@ -2009,7 +2009,7 @@ V8ScriptValueDeserializer deserializer(scope.GetScriptState(), input, options); v8::Local<v8::Value> result = deserializer.Deserialize(); - ASSERT_TRUE(V8FileList::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8FileList::HasInstance(scope.GetIsolate(), result)); FileList* new_file_list = V8FileList::ToImpl(result.As<v8::Object>()); EXPECT_EQ(0u, new_file_list->length()); } @@ -2090,7 +2090,7 @@ v8::Local<v8::Value> result = RoundTrip(wrapper, scope, &ASSERT_NO_EXCEPTION, &transferables); EXPECT_TRUE(result->IsObject()); - ASSERT_TRUE(V8ReadableStream::HasInstance(result, isolate)); + ASSERT_TRUE(V8ReadableStream::HasInstance(isolate, result)); ReadableStream* transferred = V8ReadableStream::ToImpl(result.As<v8::Object>()); EXPECT_NE(rs, transferred); @@ -2160,7 +2160,7 @@ v8::Local<v8::Value> wrapper = ToV8(exception, scope.GetContext()->Global(), scope.GetIsolate()); v8::Local<v8::Value> result = RoundTrip(wrapper, scope); - ASSERT_TRUE(V8DOMException::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8DOMException::HasInstance(scope.GetIsolate(), result)); DOMException* new_exception = V8DOMException::ToImpl(result.As<v8::Object>()); EXPECT_NE(exception, new_exception); EXPECT_EQ(exception->code(), new_exception->code());
diff --git a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc index 2646d3bd..b32cdc1 100644 --- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc +++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
@@ -415,7 +415,7 @@ // If the input is not a string or TrustedScript, pass it through. if (!source->IsString() && !is_code_like && - !V8TrustedScript::HasInstance(source, isolate)) { + !V8TrustedScript::HasInstance(isolate, source)) { return {true, v8::MaybeLocal<v8::String>()}; }
diff --git a/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_serializer_for_modules.cc b/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_serializer_for_modules.cc index 26d608c..2e06e52 100644 --- a/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_serializer_for_modules.cc +++ b/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_serializer_for_modules.cc
@@ -77,7 +77,7 @@ if (exception_state.HadException()) return false; - if (V8VideoFrame::HasInstance(object, isolate)) { + if (V8VideoFrame::HasInstance(isolate, object)) { VideoFrame* video_frame = V8VideoFrame::ToImpl(v8::Local<v8::Object>::Cast(object)); VideoFrameTransferList* transfer_list = @@ -93,7 +93,7 @@ return true; } - if (V8AudioData::HasInstance(object, isolate)) { + if (V8AudioData::HasInstance(isolate, object)) { AudioData* audio_data = V8AudioData::ToImpl(v8::Local<v8::Object>::Cast(object)); AudioDataTransferList* transfer_list = @@ -109,7 +109,7 @@ return true; } - if (V8MediaStreamTrack::HasInstance(object, isolate) && + if (V8MediaStreamTrack::HasInstance(isolate, object) && RuntimeEnabledFeatures::MediaStreamTrackTransferEnabled( CurrentExecutionContext(isolate))) { MediaStreamTrack* track = @@ -125,7 +125,7 @@ return true; } - if (V8MediaSourceHandle::HasInstance(object, isolate)) { + if (V8MediaSourceHandle::HasInstance(isolate, object)) { MediaSourceHandleImpl* media_source_handle = V8MediaSourceHandle::ToImpl(v8::Local<v8::Object>::Cast(object)); MediaSourceHandleTransferList* transfer_list =
diff --git a/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_serializer_for_modules_test.cc b/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_serializer_for_modules_test.cc index fcbbdb7..4d9fd68 100644 --- a/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_serializer_for_modules_test.cc +++ b/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_serializer_for_modules_test.cc
@@ -208,7 +208,7 @@ ToV8Traits<RTCCertificate>::ToV8(scope.GetScriptState(), certificate) .ToLocalChecked(); v8::Local<v8::Value> result = RoundTripForModules(wrapper, scope); - ASSERT_TRUE(V8RTCCertificate::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8RTCCertificate::HasInstance(scope.GetIsolate(), result)); RTCCertificate* new_certificate = V8RTCCertificate::ToImpl(result.As<v8::Object>()); rtc::RTCCertificatePEM pem = new_certificate->Certificate()->ToPEM(); @@ -235,7 +235,7 @@ // Decode test. v8::Local<v8::Value> result = V8ScriptValueDeserializerForModules(script_state, input).Deserialize(); - ASSERT_TRUE(V8RTCCertificate::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8RTCCertificate::HasInstance(scope.GetIsolate(), result)); RTCCertificate* new_certificate = V8RTCCertificate::ToImpl(result.As<v8::Object>()); rtc::RTCCertificatePEM pem = new_certificate->Certificate()->ToPEM(); @@ -450,7 +450,7 @@ // Round trip it and check the visible attributes. v8::Local<v8::Value> wrapper = ToV8(key, scope.GetScriptState()); v8::Local<v8::Value> result = RoundTripForModules(wrapper, scope); - ASSERT_TRUE(V8CryptoKey::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8CryptoKey::HasInstance(scope.GetIsolate(), result)); CryptoKey* new_key = V8CryptoKey::ToImpl(result.As<v8::Object>()); EXPECT_EQ("secret", new_key->type()); EXPECT_TRUE(new_key->extractable()); @@ -487,7 +487,7 @@ 0x70, 0xa2, 0xae, 0x98, 0x79, 0x1b, 0xc5, 0xf7}); v8::Local<v8::Value> result = V8ScriptValueDeserializerForModules(script_state, input).Deserialize(); - ASSERT_TRUE(V8CryptoKey::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8CryptoKey::HasInstance(scope.GetIsolate(), result)); CryptoKey* new_key = V8CryptoKey::ToImpl(result.As<v8::Object>()); EXPECT_EQ("secret", new_key->type()); EXPECT_FALSE(new_key->extractable()); @@ -522,7 +522,7 @@ // Round trip it and check the visible attributes. v8::Local<v8::Value> wrapper = ToV8(key, scope.GetScriptState()); v8::Local<v8::Value> result = RoundTripForModules(wrapper, scope); - ASSERT_TRUE(V8CryptoKey::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8CryptoKey::HasInstance(scope.GetIsolate(), result)); CryptoKey* new_key = V8CryptoKey::ToImpl(result.As<v8::Object>()); EXPECT_EQ("secret", new_key->type()); EXPECT_TRUE(new_key->extractable()); @@ -560,7 +560,7 @@ 0x85, 0xaf, 0x41, 0xc4, 0x6a, 0x2d, 0x06, 0x7a}); v8::Local<v8::Value> result = V8ScriptValueDeserializerForModules(script_state, input).Deserialize(); - ASSERT_TRUE(V8CryptoKey::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8CryptoKey::HasInstance(scope.GetIsolate(), result)); CryptoKey* new_key = V8CryptoKey::ToImpl(result.As<v8::Object>()); EXPECT_EQ("secret", new_key->type()); EXPECT_FALSE(new_key->extractable()); @@ -597,7 +597,7 @@ // Round trip the private key and check the visible attributes. v8::Local<v8::Value> wrapper = ToV8(private_key, scope.GetScriptState()); v8::Local<v8::Value> result = RoundTripForModules(wrapper, scope); - ASSERT_TRUE(V8CryptoKey::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8CryptoKey::HasInstance(scope.GetIsolate(), result)); CryptoKey* new_private_key = V8CryptoKey::ToImpl(result.As<v8::Object>()); EXPECT_EQ("private", new_private_key->type()); EXPECT_TRUE(new_private_key->extractable()); @@ -643,7 +643,7 @@ 0xb1, 0x19, 0x24, 0xae, 0x8d, 0x22, 0xb5, 0x02, 0x03, 0x01, 0x00, 0x01}); v8::Local<v8::Value> result = V8ScriptValueDeserializerForModules(script_state, input).Deserialize(); - ASSERT_TRUE(V8CryptoKey::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8CryptoKey::HasInstance(scope.GetIsolate(), result)); CryptoKey* new_public_key = V8CryptoKey::ToImpl(result.As<v8::Object>()); EXPECT_EQ("public", new_public_key->type()); EXPECT_TRUE(new_public_key->extractable()); @@ -688,7 +688,7 @@ // Round trip the private key and check the visible attributes. v8::Local<v8::Value> wrapper = ToV8(private_key, scope.GetScriptState()); v8::Local<v8::Value> result = RoundTripForModules(wrapper, scope); - ASSERT_TRUE(V8CryptoKey::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8CryptoKey::HasInstance(scope.GetIsolate(), result)); CryptoKey* new_private_key = V8CryptoKey::ToImpl(result.As<v8::Object>()); EXPECT_EQ("private", new_private_key->type()); EXPECT_TRUE(new_private_key->extractable()); @@ -730,7 +730,7 @@ v8::Local<v8::Value> result = V8ScriptValueDeserializerForModules(script_state, input).Deserialize(); - ASSERT_TRUE(V8CryptoKey::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8CryptoKey::HasInstance(scope.GetIsolate(), result)); CryptoKey* new_public_key = V8CryptoKey::ToImpl(result.As<v8::Object>()); EXPECT_EQ("public", new_public_key->type()); EXPECT_TRUE(new_public_key->extractable()); @@ -769,7 +769,7 @@ // Round trip the private key and check the visible attributes. v8::Local<v8::Value> wrapper = ToV8(private_key, scope.GetScriptState()); v8::Local<v8::Value> result = RoundTripForModules(wrapper, scope); - ASSERT_TRUE(V8CryptoKey::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8CryptoKey::HasInstance(scope.GetIsolate(), result)); CryptoKey* new_private_key = V8CryptoKey::ToImpl(result.As<v8::Object>()); EXPECT_EQ("private", new_private_key->type()); EXPECT_TRUE(new_private_key->extractable()); @@ -808,7 +808,7 @@ }); v8::Local<v8::Value> result = V8ScriptValueDeserializerForModules(script_state, input).Deserialize(); - ASSERT_TRUE(V8CryptoKey::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8CryptoKey::HasInstance(scope.GetIsolate(), result)); CryptoKey* new_public_key = V8CryptoKey::ToImpl(result.As<v8::Object>()); EXPECT_EQ("public", new_public_key->type()); EXPECT_TRUE(new_public_key->extractable()); @@ -843,7 +843,7 @@ // Round trip the private key and check the visible attributes. v8::Local<v8::Value> wrapper = ToV8(private_key, scope.GetScriptState()); v8::Local<v8::Value> result = RoundTripForModules(wrapper, scope); - ASSERT_TRUE(V8CryptoKey::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8CryptoKey::HasInstance(scope.GetIsolate(), result)); CryptoKey* new_private_key = V8CryptoKey::ToImpl(result.As<v8::Object>()); EXPECT_EQ("private", new_private_key->type()); EXPECT_TRUE(new_private_key->extractable()); @@ -884,7 +884,7 @@ }); v8::Local<v8::Value> result = V8ScriptValueDeserializerForModules(script_state, input).Deserialize(); - ASSERT_TRUE(V8CryptoKey::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8CryptoKey::HasInstance(scope.GetIsolate(), result)); CryptoKey* private_key = V8CryptoKey::ToImpl(result.As<v8::Object>()); EXPECT_EQ("private", private_key->type()); EXPECT_FALSE(private_key->extractable()); @@ -901,7 +901,7 @@ }); result = V8ScriptValueDeserializerForModules(script_state, input).Deserialize(); - ASSERT_TRUE(V8CryptoKey::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8CryptoKey::HasInstance(scope.GetIsolate(), result)); CryptoKey* public_key = V8CryptoKey::ToImpl(result.As<v8::Object>()); EXPECT_EQ("public", public_key->type()); EXPECT_TRUE(public_key->extractable()); @@ -932,7 +932,7 @@ // Round trip the key and check the visible attributes. v8::Local<v8::Value> wrapper = ToV8(key, scope.GetScriptState()); v8::Local<v8::Value> result = RoundTripForModules(wrapper, scope); - ASSERT_TRUE(V8CryptoKey::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8CryptoKey::HasInstance(scope.GetIsolate(), result)); CryptoKey* new_key = V8CryptoKey::ToImpl(result.As<v8::Object>()); EXPECT_EQ("secret", new_key->type()); EXPECT_FALSE(new_key->extractable()); @@ -962,7 +962,7 @@ 0x03, 0x01, 0x02, 0x03, 0x00}); v8::Local<v8::Value> result = V8ScriptValueDeserializerForModules(script_state, input).Deserialize(); - ASSERT_TRUE(V8CryptoKey::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8CryptoKey::HasInstance(scope.GetIsolate(), result)); CryptoKey* new_key = V8CryptoKey::ToImpl(result.As<v8::Object>()); EXPECT_EQ("secret", new_key->type()); EXPECT_FALSE(new_key->extractable()); @@ -1113,7 +1113,7 @@ v8::Local<v8::Value> wrapper = ToV8(fs, scope.GetScriptState()); v8::Local<v8::Value> result = RoundTripForModules(wrapper, scope); ASSERT_FALSE(result.IsEmpty()); - ASSERT_TRUE(V8DOMFileSystem::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8DOMFileSystem::HasInstance(scope.GetIsolate(), result)); DOMFileSystem* new_fs = V8DOMFileSystem::ToImpl(result.As<v8::Object>()); EXPECT_EQ("http_example.com_0:Persistent", new_fs->name()); EXPECT_EQ(mojom::blink::FileSystemType::kPersistent, new_fs->GetType()); @@ -1156,7 +1156,7 @@ // Decode test. v8::Local<v8::Value> result = V8ScriptValueDeserializerForModules(script_state, input).Deserialize(); - ASSERT_TRUE(V8DOMFileSystem::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8DOMFileSystem::HasInstance(scope.GetIsolate(), result)); DOMFileSystem* new_fs = V8DOMFileSystem::ToImpl(result.As<v8::Object>()); EXPECT_EQ("http_example.com_0:Persistent", new_fs->name()); EXPECT_EQ(mojom::blink::FileSystemType::kPersistent, new_fs->GetType()); @@ -1201,7 +1201,7 @@ v8::Local<v8::Value> wrapper = ToV8(blink_frame, scope.GetScriptState()); v8::Local<v8::Value> result = RoundTripForModules(wrapper, scope); - ASSERT_TRUE(V8VideoFrame::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8VideoFrame::HasInstance(scope.GetIsolate(), result)); VideoFrame* new_frame = V8VideoFrame::ToImpl(result.As<v8::Object>()); EXPECT_EQ(new_frame->frame()->natural_size(), kFrameSize); @@ -1236,7 +1236,7 @@ v8::Local<v8::Value> result = RoundTripForModules(wrapper, scope, &transferables); - ASSERT_TRUE(V8VideoFrame::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8VideoFrame::HasInstance(scope.GetIsolate(), result)); VideoFrame* new_frame = V8VideoFrame::ToImpl(result.As<v8::Object>()); EXPECT_EQ(new_frame->frame()->natural_size(), kFrameSize); @@ -1308,7 +1308,7 @@ // The data should have been copied, not transferred. EXPECT_TRUE(audio_data->data()); - ASSERT_TRUE(V8AudioData::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8AudioData::HasInstance(scope.GetIsolate(), result)); AudioData* new_data = V8AudioData::ToImpl(result.As<v8::Object>()); EXPECT_EQ(base::Microseconds(new_data->timestamp()), kTimestamp); @@ -1360,7 +1360,7 @@ v8::Local<v8::Value> result = RoundTripForModules(wrapper, scope, &transferables); - ASSERT_TRUE(V8AudioData::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8AudioData::HasInstance(scope.GetIsolate(), result)); AudioData* new_data = V8AudioData::ToImpl(result.As<v8::Object>()); EXPECT_EQ(new_data->numberOfFrames(), kFrames); @@ -1427,7 +1427,7 @@ // Transferring should have ended the original track. EXPECT_TRUE(blink_track->Ended()); - ASSERT_TRUE(V8MediaStreamTrack::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8MediaStreamTrack::HasInstance(scope.GetIsolate(), result)); EXPECT_EQ(V8MediaStreamTrack::ToImpl(result.As<v8::Object>()), mock_impl.return_value.Get()); @@ -1474,7 +1474,7 @@ v8::Local<v8::Value> result = RoundTripForModules(wrapper, scope, &transferables); - ASSERT_TRUE(V8MediaStreamTrack::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8MediaStreamTrack::HasInstance(scope.GetIsolate(), result)); EXPECT_EQ(V8MediaStreamTrack::ToImpl(result.As<v8::Object>()), mock_impl.return_value.Get()); @@ -1506,7 +1506,7 @@ // Transferring should have ended the original track. EXPECT_TRUE(blink_track->Ended()); - ASSERT_TRUE(V8MediaStreamTrack::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8MediaStreamTrack::HasInstance(scope.GetIsolate(), result)); EXPECT_EQ(V8MediaStreamTrack::ToImpl(result.As<v8::Object>()), mock_impl.return_value.Get()); @@ -1842,7 +1842,7 @@ v8::Local<v8::Value> wrapper = ToV8(crop_target, scope.GetScriptState()); v8::Local<v8::Value> result = RoundTripForModules(wrapper, scope); - ASSERT_TRUE(V8CropTarget::HasInstance(result, scope.GetIsolate())); + ASSERT_TRUE(V8CropTarget::HasInstance(scope.GetIsolate(), result)); CropTarget* const new_crop_target = V8CropTarget::ToImpl(result.As<v8::Object>());
diff --git a/third_party/blink/renderer/bindings/modules/v8/v8_binding_for_modules.cc b/third_party/blink/renderer/bindings/modules/v8/v8_binding_for_modules.cc index abf261c8..442442de 100644 --- a/third_party/blink/renderer/bindings/modules/v8/v8_binding_for_modules.cc +++ b/third_party/blink/renderer/bindings/modules/v8/v8_binding_for_modules.cc
@@ -357,11 +357,13 @@ return true; if (value->IsArray() && name == "length") return true; - if (V8Blob::HasInstance(value, isolate)) + if (V8Blob::HasInstance(isolate, value)) { return name == "size" || name == "type"; - if (V8File::HasInstance(value, isolate)) + } + if (V8File::HasInstance(isolate, value)) { return name == "name" || name == "lastModified" || name == "lastModifiedDate"; + } return false; } @@ -419,7 +421,7 @@ return nullptr; v8::Local<v8::Object> object = v8_value.As<v8::Object>(); - if (V8Blob::HasInstance(object, isolate)) { + if (V8Blob::HasInstance(isolate, object)) { if (element == "size") { v8_value = v8::Number::New(isolate, V8Blob::ToImpl(object)->size()); continue; @@ -431,7 +433,7 @@ // Fall through. } - if (V8File::HasInstance(object, isolate)) { + if (V8File::HasInstance(isolate, object)) { if (element == "name") { v8_value = V8String(isolate, V8File::ToImpl(object)->name()); continue;
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 f09bb1fc..7bc1d3c 100644 --- a/third_party/blink/renderer/core/accessibility/ax_object_cache.h +++ b/third_party/blink/renderer/core/accessibility/ax_object_cache.h
@@ -211,7 +211,7 @@ static bool IsInsideFocusableElementOrARIAWidget(const Node&); // Returns true if there are any pending updates that need processing. - virtual bool IsDirty() = 0; + virtual bool IsDirty() const = 0; virtual void SerializeLocationChanges() = 0;
diff --git a/third_party/blink/renderer/core/animation/BUILD.gn b/third_party/blink/renderer/core/animation/BUILD.gn index 08f992de..a442635 100644 --- a/third_party/blink/renderer/core/animation/BUILD.gn +++ b/third_party/blink/renderer/core/animation/BUILD.gn
@@ -91,6 +91,8 @@ "css_display_interpolation_type.h", "css_filter_list_interpolation_type.cc", "css_filter_list_interpolation_type.h", + "css_font_size_adjust_interpolation_type.cc", + "css_font_size_adjust_interpolation_type.h", "css_font_size_interpolation_type.cc", "css_font_size_interpolation_type.h", "css_font_stretch_interpolation_type.cc",
diff --git a/third_party/blink/renderer/core/animation/css_font_size_adjust_interpolation_type.cc b/third_party/blink/renderer/core/animation/css_font_size_adjust_interpolation_type.cc new file mode 100644 index 0000000..2ceff7e --- /dev/null +++ b/third_party/blink/renderer/core/animation/css_font_size_adjust_interpolation_type.cc
@@ -0,0 +1,166 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "third_party/blink/renderer/core/animation/css_font_size_adjust_interpolation_type.h" + +#include "third_party/blink/renderer/core/css/resolver/style_builder_converter.h" + +namespace blink { + +class CSSFontSizeAdjustNonInterpolableValue : public NonInterpolableValue { + public: + ~CSSFontSizeAdjustNonInterpolableValue() override = default; + + static scoped_refptr<CSSFontSizeAdjustNonInterpolableValue> Create( + FontSizeAdjust::Metric metric) { + return base::AdoptRef(new CSSFontSizeAdjustNonInterpolableValue(metric)); + } + + FontSizeAdjust::Metric Metric() const { return metric_; } + + DECLARE_NON_INTERPOLABLE_VALUE_TYPE(); + + private: + explicit CSSFontSizeAdjustNonInterpolableValue(FontSizeAdjust::Metric metric) + : metric_(metric) {} + + FontSizeAdjust::Metric metric_; +}; + +DEFINE_NON_INTERPOLABLE_VALUE_TYPE(CSSFontSizeAdjustNonInterpolableValue); +template <> +struct DowncastTraits<CSSFontSizeAdjustNonInterpolableValue> { + static bool AllowFrom(const NonInterpolableValue* value) { + return value && AllowFrom(*value); + } + static bool AllowFrom(const NonInterpolableValue& value) { + return value.GetType() == + CSSFontSizeAdjustNonInterpolableValue::static_type_; + } +}; + +namespace { + +class InheritedFontSizeAdjustChecker + : public CSSInterpolationType::CSSConversionChecker { + public: + explicit InheritedFontSizeAdjustChecker(FontSizeAdjust font_size_adjust) + : font_size_adjust_(font_size_adjust) {} + + private: + bool IsValid(const StyleResolverState& state, + const InterpolationValue&) const final { + return font_size_adjust_ == state.ParentStyle()->FontSizeAdjust(); + } + + const FontSizeAdjust font_size_adjust_; +}; + +InterpolationValue CreateFontSizeAdjustValue(FontSizeAdjust font_size_adjust) { + if (!font_size_adjust) { + return nullptr; + } + + return InterpolationValue( + std::make_unique<InterpolableNumber>(font_size_adjust.Value()), + CSSFontSizeAdjustNonInterpolableValue::Create( + font_size_adjust.GetMetric())); +} + +} // namespace + +InterpolationValue CSSFontSizeAdjustInterpolationType::MaybeConvertNeutral( + const InterpolationValue& underlying, + ConversionCheckers& conversion_checkers) const { + return InterpolationValue(underlying.interpolable_value->CloneAndZero(), + underlying.non_interpolable_value); +} + +InterpolationValue CSSFontSizeAdjustInterpolationType::MaybeConvertInitial( + const StyleResolverState&, + ConversionCheckers& conversion_checkers) const { + return CreateFontSizeAdjustValue(FontBuilder::InitialSizeAdjust()); +} + +InterpolationValue CSSFontSizeAdjustInterpolationType::MaybeConvertInherit( + const StyleResolverState& state, + ConversionCheckers& conversion_checkers) const { + if (!state.ParentStyle()) { + return nullptr; + } + + FontSizeAdjust inherited_font_size_adjust = + state.ParentStyle()->FontSizeAdjust(); + conversion_checkers.push_back( + std::make_unique<InheritedFontSizeAdjustChecker>( + inherited_font_size_adjust)); + return CreateFontSizeAdjustValue(inherited_font_size_adjust); +} + +InterpolationValue CSSFontSizeAdjustInterpolationType::MaybeConvertValue( + const CSSValue& value, + const StyleResolverState* state, + ConversionCheckers& conversion_checkers) const { + return CreateFontSizeAdjustValue( + StyleBuilderConverterBase::ConvertFontSizeAdjust(value)); +} + +PairwiseInterpolationValue +CSSFontSizeAdjustInterpolationType::MaybeMergeSingles( + InterpolationValue&& start, + InterpolationValue&& end) const { + const FontSizeAdjust::Metric& start_metric = + To<CSSFontSizeAdjustNonInterpolableValue>(*start.non_interpolable_value) + .Metric(); + const FontSizeAdjust::Metric& end_metric = + To<CSSFontSizeAdjustNonInterpolableValue>(*end.non_interpolable_value) + .Metric(); + if (start_metric != end_metric) { + return nullptr; + } + return PairwiseInterpolationValue(std::move(start.interpolable_value), + std::move(end.interpolable_value), + std::move(start.non_interpolable_value)); +} + +InterpolationValue +CSSFontSizeAdjustInterpolationType::MaybeConvertStandardPropertyUnderlyingValue( + const ComputedStyle& style) const { + if (!style.HasFontSizeAdjust()) { + return nullptr; + } + return CreateFontSizeAdjustValue(style.FontSizeAdjust()); +} + +void CSSFontSizeAdjustInterpolationType::Composite( + UnderlyingValueOwner& underlying_value_owner, + double underlying_fraction, + const InterpolationValue& value, + double interpolation_fraction) const { + const FontSizeAdjust::Metric& underlying_metric = + To<CSSFontSizeAdjustNonInterpolableValue>( + *underlying_value_owner.Value().non_interpolable_value) + .Metric(); + const FontSizeAdjust::Metric& metric = + To<CSSFontSizeAdjustNonInterpolableValue>(*value.non_interpolable_value) + .Metric(); + if (underlying_metric == metric) { + underlying_value_owner.MutableValue().interpolable_value->ScaleAndAdd( + underlying_fraction, *value.interpolable_value); + } else { + underlying_value_owner.Set(*this, value); + } +} + +void CSSFontSizeAdjustInterpolationType::ApplyStandardPropertyValue( + const InterpolableValue& interpolable_value, + const NonInterpolableValue* non_interpolable_value, + StyleResolverState& state) const { + state.GetFontBuilder().SetSizeAdjust(FontSizeAdjust( + ClampTo<float>(To<InterpolableNumber>(interpolable_value).Value(), 0), + To<CSSFontSizeAdjustNonInterpolableValue>(*non_interpolable_value) + .Metric())); +} + +} // namespace blink
diff --git a/third_party/blink/renderer/core/animation/css_font_size_adjust_interpolation_type.h b/third_party/blink/renderer/core/animation/css_font_size_adjust_interpolation_type.h new file mode 100644 index 0000000..29ab40c --- /dev/null +++ b/third_party/blink/renderer/core/animation/css_font_size_adjust_interpolation_type.h
@@ -0,0 +1,47 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_ANIMATION_CSS_FONT_SIZE_ADJUST_INTERPOLATION_TYPE_H_ +#define THIRD_PARTY_BLINK_RENDERER_CORE_ANIMATION_CSS_FONT_SIZE_ADJUST_INTERPOLATION_TYPE_H_ + +#include "third_party/blink/renderer/core/animation/css_interpolation_type.h" + +namespace blink { + +class CSSFontSizeAdjustInterpolationType : public CSSInterpolationType { + public: + explicit CSSFontSizeAdjustInterpolationType(PropertyHandle property) + : CSSInterpolationType(property) { + DCHECK_EQ(CssProperty().PropertyID(), CSSPropertyID::kFontSizeAdjust); + } + + InterpolationValue MaybeConvertStandardPropertyUnderlyingValue( + const ComputedStyle&) const final; + void Composite(UnderlyingValueOwner&, + double underlying_fraction, + const InterpolationValue&, + double interpolation_fraction) const final; + void ApplyStandardPropertyValue(const InterpolableValue&, + const NonInterpolableValue*, + StyleResolverState&) const final; + + private: + InterpolationValue MaybeConvertNeutral(const InterpolationValue& underlying, + ConversionCheckers&) const final; + InterpolationValue MaybeConvertInitial(const StyleResolverState&, + ConversionCheckers&) const final; + InterpolationValue MaybeConvertInherit(const StyleResolverState&, + ConversionCheckers&) const final; + InterpolationValue MaybeConvertValue(const CSSValue&, + const StyleResolverState*, + ConversionCheckers&) const final; + + PairwiseInterpolationValue MaybeMergeSingles( + InterpolationValue&& start, + InterpolationValue&& end) const final; +}; + +} // namespace blink + +#endif // THIRD_PARTY_BLINK_RENDERER_CORE_ANIMATION_CSS_FONT_SIZE_ADJUST_INTERPOLATION_TYPE_H_
diff --git a/third_party/blink/renderer/core/animation/css_interpolation_types_map.cc b/third_party/blink/renderer/core/animation/css_interpolation_types_map.cc index ee5e690..021b89b 100644 --- a/third_party/blink/renderer/core/animation/css_interpolation_types_map.cc +++ b/third_party/blink/renderer/core/animation/css_interpolation_types_map.cc
@@ -20,6 +20,7 @@ #include "third_party/blink/renderer/core/animation/css_default_interpolation_type.h" #include "third_party/blink/renderer/core/animation/css_display_interpolation_type.h" #include "third_party/blink/renderer/core/animation/css_filter_list_interpolation_type.h" +#include "third_party/blink/renderer/core/animation/css_font_size_adjust_interpolation_type.h" #include "third_party/blink/renderer/core/animation/css_font_size_interpolation_type.h" #include "third_party/blink/renderer/core/animation/css_font_stretch_interpolation_type.h" #include "third_party/blink/renderer/core/animation/css_font_style_interpolation_type.h" @@ -213,7 +214,6 @@ case CSSPropertyID::kFlexShrink: case CSSPropertyID::kFillOpacity: case CSSPropertyID::kFloodOpacity: - case CSSPropertyID::kFontSizeAdjust: case CSSPropertyID::kOpacity: case CSSPropertyID::kOrder: case CSSPropertyID::kOrphans: @@ -375,6 +375,11 @@ applicable_types->push_back( std::make_unique<CSSFontSizeInterpolationType>(used_property)); break; + case CSSPropertyID::kFontSizeAdjust: + applicable_types->push_back( + std::make_unique<CSSFontSizeAdjustInterpolationType>( + used_property)); + break; case CSSPropertyID::kTextIndent: applicable_types->push_back( std::make_unique<CSSTextIndentInterpolationType>(used_property));
diff --git a/third_party/blink/renderer/core/animation/number_property_functions.cc b/third_party/blink/renderer/core/animation/number_property_functions.cc index 278b7bb..03d9f842 100644 --- a/third_party/blink/renderer/core/animation/number_property_functions.cc +++ b/third_party/blink/renderer/core/animation/number_property_functions.cc
@@ -42,11 +42,6 @@ return style.StrokeOpacity(); case CSSPropertyID::kWidows: return style.Widows(); - - case CSSPropertyID::kFontSizeAdjust: - if (!style.HasFontSizeAdjust()) - return absl::optional<double>(); - return style.FontSizeAdjust().Value(); case CSSPropertyID::kColumnCount: if (style.HasAutoColumnCount()) return absl::optional<double>(); @@ -104,7 +99,6 @@ case CSSPropertyID::kFlexGrow: case CSSPropertyID::kFlexShrink: - case CSSPropertyID::kFontSizeAdjust: case CSSPropertyID::kLineHeight: case CSSPropertyID::kTabSize: case CSSPropertyID::kTextSizeAdjust:
diff --git a/third_party/blink/renderer/core/animation/scroll_timeline.cc b/third_party/blink/renderer/core/animation/scroll_timeline.cc index f73c2a0..37f8b69 100644 --- a/third_party/blink/renderer/core/animation/scroll_timeline.cc +++ b/third_party/blink/renderer/core/animation/scroll_timeline.cc
@@ -158,6 +158,13 @@ return MakeGarbageCollected<V8CSSNumberish>(CSSUnitValues::percent(100)); } +void ScrollTimeline::ResolveTimelineOffsets() const { + TimelineRange timeline_range = GetTimelineRange(); + for (Animation* animation : GetAnimations()) { + animation->ResolveTimelineOffsets(timeline_range); + } +} + Element* ScrollTimeline::RetainingElement() const { if (attachment_type_ == TimelineAttachment::kLocal) { return CurrentAttachment()->GetReferenceElement(); @@ -180,7 +187,7 @@ // Resolved to remove the before and after phases in // https://github.com/w3c/csswg-drafts/issues/7240. // https://drafts.csswg.org/scroll-animations-1/#current-time-algorithm -ScrollTimeline::TimelineState ScrollTimeline::ComputeTimelineState() { +ScrollTimeline::TimelineState ScrollTimeline::ComputeTimelineState() const { TimelineState state; state.resolved_source = ComputeResolvedSource(); @@ -211,13 +218,6 @@ DCHECK(scrollable_area->MaximumScrollOffset().x() == 0 || scrollable_area->MinimumScrollOffset().x() == 0); - // Record the scroll range for a quick validation check at the end - // of the layout process. If the cached values change, a fresh - // style + layout cycle is required. The check is performed only once - // per frame to avoid an infinite loop in the update cycle. - minimum_scroll_offset_ = scrollable_area->MinimumScrollOffset(); - maximum_scroll_offset_ = scrollable_area->MaximumScrollOffset(); - ScrollOffset scroll_offset = scrollable_area->GetScrollOffset(); auto physical_orientation = ToPhysicalScrollOrientation(GetAxis(), *layout_box); @@ -315,29 +315,6 @@ return current_phase_and_time != last_current_phase_and_time_; } -bool ScrollTimeline::CheckIfNeedsValidation() { - Node* resolved_source = ComputeResolvedSource(); - - if (CheckIfSubjectNeedsValidation(resolved_source)) { - return true; - } - - absl::optional<ScrollOffset> min_scroll_offset; - absl::optional<ScrollOffset> max_scroll_offset; - - if (ComputeIsResolved(resolved_source)) { - LayoutBox* layout_box = resolved_source->GetLayoutBox(); - PaintLayerScrollableArea* scrollable_area = layout_box->GetScrollableArea(); - min_scroll_offset = scrollable_area->MinimumScrollOffset(); - max_scroll_offset = scrollable_area->MaximumScrollOffset(); - } - - // Scroll range is cached during the snapshot update. If the values do not - // align, the timeline state is no longer valid. - return min_scroll_offset != minimum_scroll_offset_ || - max_scroll_offset != maximum_scroll_offset_; -} - void ScrollTimeline::ScheduleNextService() { // See DocumentAnimations::UpdateAnimations() for why we shouldn't reach here. NOTREACHED(); @@ -353,6 +330,7 @@ animation->InvalidateNormalizedTiming(); } } + ResolveTimelineOffsets(); } Element* ScrollTimeline::source() const { @@ -432,15 +410,17 @@ } bool ScrollTimeline::ValidateSnapshot() { - // ValidateTimelineOffsets will resolve timeline offsets according to - // data in `timeline_state_snapshotted_`, so that needs to be updated - // before the call. - TimelineState old_state = timeline_state_snapshotted_; - timeline_state_snapshotted_ = ComputeTimelineState(); - if (ValidateTimelineOffsets() && old_state == timeline_state_snapshotted_) { + TimelineState new_state = ComputeTimelineState(); + + if (timeline_state_snapshotted_.HasConsistentLayout(new_state)) { return true; } + // Note that `timeline_state_snapshotted_` must be updated before + // ResolveTimelineOffsets is called. + timeline_state_snapshotted_ = new_state; + ResolveTimelineOffsets(); + // Mark an attached animation's target as dirty if the play state is running // or finished. Idle animations are not in effect and the effect of a paused // animation is not impacted by timeline staleness.
diff --git a/third_party/blink/renderer/core/animation/scroll_timeline.h b/third_party/blink/renderer/core/animation/scroll_timeline.h index 9588f92..244702b 100644 --- a/third_party/blink/renderer/core/animation/scroll_timeline.h +++ b/third_party/blink/renderer/core/animation/scroll_timeline.h
@@ -18,6 +18,7 @@ #include "third_party/blink/renderer/core/dom/element.h" #include "third_party/blink/renderer/core/scroll/scroll_snapshot_client.h" #include "third_party/blink/renderer/core/scroll/scroll_types.h" +#include "third_party/blink/renderer/platform/geometry/layout_size.h" #include "third_party/blink/renderer/platform/heap/collection_support/heap_hash_set.h" #include "third_party/blink/renderer/platform/wtf/text/wtf_string.h" @@ -165,6 +166,8 @@ void AddAttachment(ScrollTimelineAttachment*); void RemoveAttachment(ScrollTimelineAttachment*); + void ResolveTimelineOffsets() const; + protected: ScrollTimeline(Document*, TimelineAttachment, ScrollTimelineAttachment*); @@ -219,12 +222,6 @@ void UpdateSnapshot() override; bool ValidateSnapshot() override; bool ShouldScheduleNextService() override; - bool CheckIfNeedsValidation() override; - - virtual bool ValidateTimelineOffsets() { return true; } - virtual bool CheckIfSubjectNeedsValidation(Node* resolved_source) const { - return false; - } bool ComputeIsResolved() const; @@ -238,11 +235,9 @@ // See Node::[Un]RegisterScrollTimeline. Element* RetainingElement() const; - TimelineState ComputeTimelineState(); + TimelineState ComputeTimelineState() const; TimelineAttachment attachment_type_; - absl::optional<ScrollOffset> minimum_scroll_offset_; - absl::optional<ScrollOffset> maximum_scroll_offset_; // Snapshotted value produced by the last SnapshotState call. TimelineState timeline_state_snapshotted_;
diff --git a/third_party/blink/renderer/core/animation/view_timeline.cc b/third_party/blink/renderer/core/animation/view_timeline.cc index bb49a54..a1a6484d 100644 --- a/third_party/blink/renderer/core/animation/view_timeline.cc +++ b/third_party/blink/renderer/core/animation/view_timeline.cc
@@ -299,22 +299,23 @@ DCHECK(ComputeIsResolved(state->resolved_source)); DCHECK(subject()); - subject_position_ = SubjectPosition(state->resolved_source); - subject_size_ = SubjectSize(); + absl::optional<LayoutSize> subject_size = SubjectSize(); + absl::optional<gfx::PointF> subject_position = + SubjectPosition(state->resolved_source); - DCHECK(subject_position_); + DCHECK(subject_position); double target_offset = physical_orientation == kHorizontalScroll - ? subject_position_->x() - : subject_position_->y(); + ? subject_position->x() + : subject_position->y(); - DCHECK(subject_size_); + DCHECK(subject_size); double target_size; LayoutUnit viewport_size; if (physical_orientation == kHorizontalScroll) { - target_size = subject_size_->Width().ToDouble(); + target_size = subject_size->Width().ToDouble(); viewport_size = scrollable_area->LayoutContentRect().Width(); } else { - target_size = subject_size_->Height().ToDouble(); + target_size = subject_size->Height().ToDouble(); viewport_size = scrollable_area->LayoutContentRect().Height(); } @@ -502,30 +503,6 @@ return CSSUnitValues::px(scroll_offsets->end / GetResolvedZoom()); } -void ViewTimeline::UpdateSnapshot() { - ScrollTimeline::UpdateSnapshot(); - ResolveTimelineOffsets(); -} - -bool ViewTimeline::ValidateTimelineOffsets() { - bool has_keyframe_update = ResolveTimelineOffsets(); - return !has_keyframe_update; -} - -bool ViewTimeline::CheckIfSubjectNeedsValidation(Node* resolved_source) const { - return subject_size_ != SubjectSize() || - subject_position_ != SubjectPosition(resolved_source); -} - -bool ViewTimeline::ResolveTimelineOffsets() const { - TimelineRange timeline_range = GetTimelineRange(); - bool has_keyframe_update = false; - for (Animation* animation : GetAnimations()) { - has_keyframe_update |= animation->ResolveTimelineOffsets(timeline_range); - } - return has_keyframe_update; -} - void ViewTimeline::Trace(Visitor* visitor) const { visitor->Trace(style_dependant_start_inset_); visitor->Trace(style_dependant_end_inset_);
diff --git a/third_party/blink/renderer/core/animation/view_timeline.h b/third_party/blink/renderer/core/animation/view_timeline.h index a5afada..61b378f 100644 --- a/third_party/blink/renderer/core/animation/view_timeline.h +++ b/third_party/blink/renderer/core/animation/view_timeline.h
@@ -66,8 +66,6 @@ CSSNumericValue* startOffset() const; CSSNumericValue* endOffset() const; - bool ResolveTimelineOffsets() const; - void Trace(Visitor*) const override; protected: @@ -75,23 +73,12 @@ ScrollOrientation physical_orientation, TimelineState* state) const override; - // ScrollSnapshotClient: - void UpdateSnapshot() override; - - bool ValidateTimelineOffsets() override; - bool CheckIfSubjectNeedsValidation(Node* resolved_source) const override; - absl::optional<LayoutSize> SubjectSize() const; absl::optional<gfx::PointF> SubjectPosition(Node* resolved_source) const; private: double ToFractionalOffset(const TimelineOffset& timeline_offset) const; - // Cache values for post-layout validation check. If the subject position or - // size changes, then the range boundaries are stale. - mutable absl::optional<LayoutSize> subject_size_; - mutable absl::optional<gfx::PointF> subject_position_; - // If either of the following elements are non-null, we need to update // |inset_| on a style change. Member<const CSSValue> style_dependant_start_inset_;
diff --git a/third_party/blink/renderer/core/css/resolver/scoped_style_resolver.cc b/third_party/blink/renderer/core/css/resolver/scoped_style_resolver.cc index a5bf1b4..abb55e6 100644 --- a/third_party/blink/renderer/core/css/resolver/scoped_style_resolver.cc +++ b/third_party/blink/renderer/core/css/resolver/scoped_style_resolver.cc
@@ -348,7 +348,7 @@ for (auto& rule : font_feature_values_rules) { for (auto& font_family : rule->GetFamilies()) { unsigned layer_order = CascadeLayerMap::kImplicitOuterLayerOrder; - if (cascade_layer_map_) { + if (cascade_layer_map_ && rule->GetCascadeLayer() != nullptr) { layer_order = cascade_layer_map_->GetLayerOrder(*rule->GetCascadeLayer()); }
diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink/renderer/core/dom/document.cc index 61fad032..70f1782 100644 --- a/third_party/blink/renderer/core/dom/document.cc +++ b/third_party/blink/renderer/core/dom/document.cc
@@ -270,6 +270,7 @@ #include "third_party/blink/renderer/core/loader/pending_link_preload.h" #include "third_party/blink/renderer/core/loader/progress_tracker.h" #include "third_party/blink/renderer/core/loader/render_blocking_resource_manager.h" +#include "third_party/blink/renderer/core/loader/resource/link_dictionary_resource.h" #include "third_party/blink/renderer/core/mathml/mathml_element.h" #include "third_party/blink/renderer/core/mathml/mathml_row_element.h" #include "third_party/blink/renderer/core/mathml_element_factory.h" @@ -815,10 +816,6 @@ worklet_animation_controller_( MakeGarbageCollected<WorkletAnimationController>(this)), template_document_host_(nullptr), - did_add_or_remove_form_related_elements_timer_( - GetTaskRunner(TaskType::kInternalLoading), - this, - &Document::DidAddOrRemoveFormRelatedElementsTimerFired), parser_sync_policy_(kAllowDeferredParsing), // Use the source id from the document initializer if it is available. // Otherwise, generate a new source id to cover any cases that don't @@ -3820,6 +3817,16 @@ } } +void Document::FetchDictionaryFromLinkHeader() { + if (!CompressionDictionaryTransportFullyEnabled(GetExecutionContext()) || + !Loader()) { + return; + } + Loader()->DispatchLinkHeaderPreloads( + nullptr /* viewport */, + PreloadHelper::LoadLinksFromHeaderMode::kDocumentAfterLoadCompleted); +} + bool Document::CheckCompletedInternal() { if (!ShouldComplete()) return false; @@ -3874,6 +3881,10 @@ GetFrame()->GetFrameScheduler()->OnLoad(); DetectJavascriptFrameworksOnLoad(*this); + // Only load the dictionary after the full document load completes. + // The compression dictionary is of low priority and shall be only loaded + // when the browser is idle. + FetchDictionaryFromLinkHeader(); } else if (loading_for_print_) { loading_for_print_ = false; GetFrame()->Client()->DispatchDidFinishLoadForPrinting(); @@ -8365,18 +8376,6 @@ if (!GetFrame() || !GetFrame()->GetPage() || !HasFinishedParsing()) return; - // We add a slight delay because this could be called rapidly. - if (!did_add_or_remove_form_related_elements_timer_.IsActive()) { - did_add_or_remove_form_related_elements_timer_.StartOneShot( - base::Milliseconds(300), FROM_HERE); - } -} - -void Document::DidAddOrRemoveFormRelatedElementsTimerFired(TimerBase* timer) { - DCHECK_EQ(timer, &did_add_or_remove_form_related_elements_timer_); - if (!GetFrame() || !GetFrame()->GetPage()) - return; - GetFrame() ->GetPage() ->GetChromeClient() @@ -8794,7 +8793,6 @@ visitor->Trace(use_elements_needing_update_); visitor->Trace(template_document_); visitor->Trace(template_document_host_); - visitor->Trace(did_add_or_remove_form_related_elements_timer_); visitor->Trace(user_action_elements_); visitor->Trace(svg_extensions_); visitor->Trace(layout_view_); @@ -9199,6 +9197,16 @@ agent_ = agent; } +Resource* Document::GetPendingLinkPreloadForTesting(const KURL& url) { + for (auto pending_preload : pending_link_header_preloads_) { + Resource* resource = pending_preload->GetResourceForTesting(); + if (resource && resource->Url() == url) { + return resource; + } + } + return nullptr; +} + template class CORE_TEMPLATE_EXPORT Supplement<Document>; } // namespace blink
diff --git a/third_party/blink/renderer/core/dom/document.h b/third_party/blink/renderer/core/dom/document.h index 6f3228c..20ae21d 100644 --- a/third_party/blink/renderer/core/dom/document.h +++ b/third_party/blink/renderer/core/dom/document.h
@@ -80,6 +80,7 @@ #include "third_party/blink/renderer/platform/heap/collection_support/heap_vector.h" #include "third_party/blink/renderer/platform/heap_observer_set.h" #include "third_party/blink/renderer/platform/instrumentation/use_counter.h" +#include "third_party/blink/renderer/platform/loader/fetch/resource.h" #include "third_party/blink/renderer/platform/scheduler/public/post_cancellable_task.h" #include "third_party/blink/renderer/platform/supplementable.h" #include "third_party/blink/renderer/platform/timer.h" @@ -1999,6 +2000,8 @@ BeforeMatchExpandedHiddenMatchableUkm); FRIEND_TEST_ALL_PREFIXES(TextFinderSimTest, BeforeMatchExpandedHiddenMatchableUkmNoHandler); + FRIEND_TEST_ALL_PREFIXES(DictionaryLoadFromHeaderTest, + LoadDictionaryFromHeader); // Listed elements that are not associated to a <form> element. class UnassociatedListedElementsList { @@ -2110,8 +2113,6 @@ } void AddMutationEventListenerTypeIfEnabled(ListenerType); - void DidAddOrRemoveFormRelatedElementsTimerFired(TimerBase*); - void ClearFocusedElementTimerFired(TimerBase*); bool HaveScriptBlockingStylesheetsLoaded() const; @@ -2202,6 +2203,12 @@ bool use_existing_status, mojom::blink::PermissionStatus status); + // Fetch the compression dictionary sent in the response header after the + // document load completes. + void FetchDictionaryFromLinkHeader(); + + Resource* GetPendingLinkPreloadForTesting(const KURL&); + const DocumentToken token_; // Bitfield used for tracking UKM sampling of media features such that each @@ -2525,8 +2532,6 @@ Member<Document> template_document_; Member<Document> template_document_host_; - HeapTaskRunnerTimer<Document> did_add_or_remove_form_related_elements_timer_; - HeapHashSet<Member<SVGUseElement>> use_elements_needing_update_; ParserSynchronizationPolicy parser_sync_policy_;
diff --git a/third_party/blink/renderer/core/exported/web_blob.cc b/third_party/blink/renderer/core/exported/web_blob.cc index 4a3a2de..02f319d1 100644 --- a/third_party/blink/renderer/core/exported/web_blob.cc +++ b/third_party/blink/renderer/core/exported/web_blob.cc
@@ -58,7 +58,7 @@ } WebBlob WebBlob::FromV8Value(v8::Local<v8::Value> value) { - if (V8Blob::HasInstance(value, v8::Isolate::GetCurrent())) { + if (V8Blob::HasInstance(v8::Isolate::GetCurrent(), value)) { v8::Local<v8::Object> object = v8::Local<v8::Object>::Cast(value); Blob* blob = V8Blob::ToImpl(object); DCHECK(blob);
diff --git a/third_party/blink/renderer/core/fetch/request.cc b/third_party/blink/renderer/core/fetch/request.cc index 4fab7bb..f83d452d 100644 --- a/third_party/blink/renderer/core/fetch/request.cc +++ b/third_party/blink/renderer/core/fetch/request.cc
@@ -143,7 +143,7 @@ ExecutionContext* execution_context = ExecutionContext::From(script_state); v8::Isolate* isolate = script_state->GetIsolate(); - if (V8Blob::HasInstance(body, isolate)) { + if (V8Blob::HasInstance(isolate, body)) { Blob* blob = V8Blob::ToImpl(body.As<v8::Object>()); return_buffer = BodyStreamBuffer::Create( script_state, @@ -187,7 +187,7 @@ script_state, MakeGarbageCollected<FormDataBytesConsumer>(array_buffer_view), nullptr /* AbortSignal */, /*cached_metadata_handler=*/nullptr); - } else if (V8FormData::HasInstance(body, isolate)) { + } else if (V8FormData::HasInstance(isolate, body)) { scoped_refptr<EncodedFormData> form_data = V8FormData::ToImpl(body.As<v8::Object>())->EncodeMultiPartFormData(); // Here we handle formData->boundary() as a C-style string. See @@ -199,7 +199,7 @@ MakeGarbageCollected<FormDataBytesConsumer>(execution_context, std::move(form_data)), nullptr /* AbortSignal */, /*cached_metadata_handler=*/nullptr); - } else if (V8URLSearchParams::HasInstance(body, isolate)) { + } else if (V8URLSearchParams::HasInstance(isolate, body)) { scoped_refptr<EncodedFormData> form_data = V8URLSearchParams::ToImpl(body.As<v8::Object>())->ToEncodedFormData(); return_buffer = BodyStreamBuffer::Create( @@ -210,7 +210,7 @@ content_type = "application/x-www-form-urlencoded;charset=UTF-8"; } else if (RuntimeEnabledFeatures::FetchUploadStreamingEnabled( execution_context) && - V8ReadableStream::HasInstance(body, isolate)) { + V8ReadableStream::HasInstance(isolate, body)) { ReadableStream* readable_stream = V8ReadableStream::ToImpl(body.As<v8::Object>()); // This is implemented in Request::CreateRequestWithRequestOrString(): @@ -706,7 +706,7 @@ // From "extract a body": // - If the keepalive flag is set, then throw a TypeError. if (init->hasKeepalive() && init->keepalive() && - V8ReadableStream::HasInstance(init_body, script_state->GetIsolate())) { + V8ReadableStream::HasInstance(script_state->GetIsolate(), init_body)) { exception_state.ThrowTypeError( "Keepalive request cannot have a ReadableStream body."); return nullptr;
diff --git a/third_party/blink/renderer/core/fetch/response.cc b/third_party/blink/renderer/core/fetch/response.cc index fe849e0..c4f10834 100644 --- a/third_party/blink/renderer/core/fetch/response.cc +++ b/third_party/blink/renderer/core/fetch/response.cc
@@ -146,7 +146,7 @@ if (body_value.IsUndefined() || body_value.IsNull()) { // Note: The IDL processor cannot handle this situation. See // https://crbug.com/335871. - } else if (V8Blob::HasInstance(body, isolate)) { + } else if (V8Blob::HasInstance(isolate, body)) { Blob* blob = V8Blob::ToImpl(body.As<v8::Object>()); body_buffer = BodyStreamBuffer::Create( script_state, @@ -193,7 +193,7 @@ MakeGarbageCollected<FormDataBytesConsumer>(array_buffer_view), nullptr /* AbortSignal */, /*cached_metadata_handler=*/nullptr); } - } else if (V8FormData::HasInstance(body, isolate)) { + } else if (V8FormData::HasInstance(isolate, body)) { scoped_refptr<EncodedFormData> form_data = V8FormData::ToImpl(body.As<v8::Object>())->EncodeMultiPartFormData(); // Here we handle formData->boundary() as a C-style string. See @@ -205,7 +205,7 @@ MakeGarbageCollected<FormDataBytesConsumer>(execution_context, std::move(form_data)), nullptr /* AbortSignal */, /*cached_metadata_handler=*/nullptr); - } else if (V8URLSearchParams::HasInstance(body, isolate)) { + } else if (V8URLSearchParams::HasInstance(isolate, body)) { scoped_refptr<EncodedFormData> form_data = V8URLSearchParams::ToImpl(body.As<v8::Object>())->ToEncodedFormData(); body_buffer = BodyStreamBuffer::Create( @@ -214,7 +214,7 @@ std::move(form_data)), nullptr /* AbortSignal */, /*cached_metadata_handler=*/nullptr); content_type = "application/x-www-form-urlencoded;charset=UTF-8"; - } else if (V8ReadableStream::HasInstance(body, isolate)) { + } else if (V8ReadableStream::HasInstance(isolate, body)) { UseCounter::Count(execution_context, WebFeature::kFetchResponseConstructionWithStream); body_buffer = MakeGarbageCollected<BodyStreamBuffer>(
diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc index fa70d68..c01a9165 100644 --- a/third_party/blink/renderer/core/frame/local_frame.cc +++ b/third_party/blink/renderer/core/frame/local_frame.cc
@@ -3487,7 +3487,7 @@ bool LocalFrame::ValidateScrollSnapshotClients() { bool valid = true; for (auto& client : scroll_snapshot_clients_) { - valid &= client->ValidateSnapshotIfNeeded(); + valid &= client->ValidateSnapshot(); } return valid; }
diff --git a/third_party/blink/renderer/core/frame/local_frame.h b/third_party/blink/renderer/core/frame/local_frame.h index 401686b..50e103a 100644 --- a/third_party/blink/renderer/core/frame/local_frame.h +++ b/third_party/blink/renderer/core/frame/local_frame.h
@@ -842,22 +842,19 @@ // https://drafts.csswg.org/scroll-animations-1/#avoiding-cycles void UpdateScrollSnapshots(); - // All newly created ScrollSnapshotClients are considered "unvalidated". This - // means that the internal state of the client is considered tentative, and - // computing the actual state may require an additional style/layout pass. - // ScrollSnapshotClients may be marked as unvalidated if a style or layout - // change suggests that the snapshot is stale. This additional check is - // expected to be lightweight since run once per frame. - - // The lifecycle update will call this function after style and layout has - // completed. The function will then go though all unvalidated clients, - // and compare the current state snapshot to a fresh state snapshot. If they - // are equal, then the tentative state turned out to be correct, and no - // further action is needed. Otherwise, all effects targets associated with - // the client are marked for recalc, which causes the style/layout phase to - // run again. + // Each ScrollSnapshotClients has their internal state updated at + // a specific point in the lifecycle (see call to UpdateSnapshot). + // Since this call takes place *before* layout, ScrollSnapshotClients also + // get an additional opportunity to update their state (see ValidateSnapshot). // - // Returns true if all client states are correct, otherwise returns false. + // The lifecycle update will call this function after style and layout has + // completed. The function will then go though all clients, and compare the + // current state snapshot to a fresh state snapshot. If they are equal, then + // no further action is needed. Otherwise, all effect targets associated + // with the client are marked for recalc, which causes the style/layout phase + // to run again. + // + // Returns true if all client states are valid, otherwise returns false. // // https://github.com/w3c/csswg-drafts/issues/5261 bool ValidateScrollSnapshotClients();
diff --git a/third_party/blink/renderer/core/input/event_handler.h b/third_party/blink/renderer/core/input/event_handler.h index 2cca72f..9a5eae9b 100644 --- a/third_party/blink/renderer/core/input/event_handler.h +++ b/third_party/blink/renderer/core/input/event_handler.h
@@ -259,6 +259,10 @@ GestureManager& GetGestureManager() const { return *gesture_manager_; } + KeyboardEventManager& GetKeyboardEventManager() const { + return *keyboard_event_manager_; + } + void AnimateSnapFling(base::TimeTicks monotonic_time); void RecomputeMouseHoverStateIfNeeded();
diff --git a/third_party/blink/renderer/core/input/event_handler_test.cc b/third_party/blink/renderer/core/input/event_handler_test.cc index 2cfc7e100..f3f89be2 100644 --- a/third_party/blink/renderer/core/input/event_handler_test.cc +++ b/third_party/blink/renderer/core/input/event_handler_test.cc
@@ -3464,4 +3464,199 @@ EXPECT_EQ("no wheel event", element->innerHTML().Utf8()); } +TEST_F(EventHandlerSimTest, TestScrollendFiresOnKeyUpAfterScroll) { + WebView().MainFrameViewWidget()->Resize(gfx::Size(800, 600)); + SimRequest request("https://example.com/test.html", "text/html"); + LoadURL("https://example.com/test.html"); + request.Complete(R"HTML( + <!DOCTYPE html> + <style> + #scroller { + overflow: scroll; + height: 100px; + height: 100px; + } + #spacer { + height: 400px; + height: 400px; + } + </style> + <body> + <p id='log'></p> <br> + <div id="scroller"> + <div id="spacer"></div> + </div> + </body> + <script> + scroller.addEventListener('scrollend', (e) => { + let log = document.getElementById('log'); + log.innerText += 'scrollend'; + }); + </script> + )HTML"); + Compositor().BeginFrame(); + WebKeyboardEvent e{WebInputEvent::Type::kRawKeyDown, + WebInputEvent::kNoModifiers, + WebInputEvent::GetStaticTimeStampForTests()}; + const int num_keydowns = 5; + + GetDocument().getElementById("scroller")->Focus(FocusOptions::Create()); + // Send first keyDown. + e.windows_key_code = VKEY_DOWN; + e.SetType(WebInputEvent::Type::kKeyDown); + GetDocument().GetFrame()->GetEventHandler().KeyEvent(e); + // BeginFrame to create scroll_animation. + Compositor().BeginFrame(); + // BeginFrame to Tick scroll_animation far enough to complete scroll. + Compositor().BeginFrame(0.30); + + // The first invocation of BeginFrame will create another scroll_animation + // and subsequent ones will update the animation target. + for (int i = 0; i < num_keydowns - 1; i++) { + GetDocument().GetFrame()->GetEventHandler().KeyEvent(e); + Compositor().BeginFrame(); + } + // BeginFrame to advance to the end of the last scroll animation. + Compositor().BeginFrame(0.15 * num_keydowns); + + // Verify that we have not yet fired scrollend. + EXPECT_EQ(GetDocument().getElementById("log")->innerHTML().Utf8(), ""); + + // Fire keyUp, which should tigger a scrollend event. + e.SetType(WebInputEvent::Type::kKeyUp); + GetDocument().GetFrame()->GetEventHandler().KeyEvent(e); + + Compositor().BeginFrame(); + EXPECT_EQ(GetDocument().getElementById("log")->innerHTML().Utf8(), + "scrollend"); +} + +TEST_F(EventHandlerSimTest, TestScrollendFiresAfterScrollWithEarlyKeyUp) { + WebView().MainFrameViewWidget()->Resize(gfx::Size(800, 600)); + SimRequest request("https://example.com/test.html", "text/html"); + LoadURL("https://example.com/test.html"); + request.Complete(R"HTML( + <!DOCTYPE html> + <style> + #scroller { + overflow: scroll; + height: 100px; + height: 100px; + } + #spacer { + height: 400px; + height: 400px; + } + </style> + <body> + <p id='log'></p> <br> + <div id="scroller"> + <div id="spacer"></div> + </div> + </body> + <script> + scroller.addEventListener('scrollend', (e) => { + let log = document.getElementById('log'); + log.innerText += 'scrollend'; + }); + </script> + )HTML"); + Compositor().BeginFrame(); + WebKeyboardEvent e{WebInputEvent::Type::kRawKeyDown, + WebInputEvent::kNoModifiers, + WebInputEvent::GetStaticTimeStampForTests()}; + + GetDocument().getElementById("scroller")->Focus(FocusOptions::Create()); + + // Send first keyDown. + e.windows_key_code = VKEY_DOWN; + e.SetType(WebInputEvent::Type::kKeyDown); + GetDocument().GetFrame()->GetEventHandler().KeyEvent(e); + // BeginFrame to create first scroll_animation. + Compositor().BeginFrame(); + // BeginFrame to tick first scroll_animation to completion. + Compositor().BeginFrame(0.30); + + // Start a second scroll_animation that should end after the keyup event. + GetDocument().GetFrame()->GetEventHandler().KeyEvent(e); + Compositor().BeginFrame(); + + // Verify that we have not yet fired scrollend. + EXPECT_EQ(GetDocument().getElementById("log")->innerHTML().Utf8(), ""); + + // Fire keyUp, which should not tigger a scrollend event since another scroll + // is in progress. + e.SetType(WebInputEvent::Type::kKeyUp); + GetDocument().GetFrame()->GetEventHandler().KeyEvent(e); + + // Tick second scroll to completion which should fire scrollend. + Compositor().BeginFrame(0.30); + + EXPECT_EQ(GetDocument().getElementById("log")->innerHTML().Utf8(), + "scrollend"); +} + +TEST_F(EventHandlerSimTest, TestScrollendFiresOnKeyUpAfterScrollInstant) { + GetDocument().GetSettings()->SetScrollAnimatorEnabled(false); + WebView().MainFrameViewWidget()->Resize(gfx::Size(800, 600)); + SimRequest request("https://example.com/test.html", "text/html"); + LoadURL("https://example.com/test.html"); + request.Complete(R"HTML( + <!DOCTYPE html> + <style> + #scroller { + overflow: scroll; + height: 100px; + height: 100px; + } + #spacer { + height: 400px; + height: 400px; + } + </style> + <body> + <p id='log'></p> <br> + <div id="scroller"> + <div id="spacer"></div> + </div> + </body> + <script> + scroller.addEventListener('scrollend', (e) => { + let log = document.getElementById('log'); + log.innerText += 'scrollend'; + }); + </script> + )HTML"); + Compositor().BeginFrame(); + WebKeyboardEvent e{WebInputEvent::Type::kRawKeyDown, + WebInputEvent::kNoModifiers, + WebInputEvent::GetStaticTimeStampForTests()}; + const int num_keydowns = 5; + + GetDocument().getElementById("scroller")->Focus(FocusOptions::Create()); + // Send first keyDown. + e.windows_key_code = VKEY_DOWN; + e.SetType(WebInputEvent::Type::kKeyDown); + GetDocument().GetFrame()->GetEventHandler().KeyEvent(e); + // BeginFrame to trigger first instant scroll. + Compositor().BeginFrame(); + + // Trigger a sequence of instant scrolls. + for (int i = 0; i < num_keydowns - 1; i++) { + GetDocument().GetFrame()->GetEventHandler().KeyEvent(e); + Compositor().BeginFrame(); + } + + // Verify that we have not yet fired scrollend. + EXPECT_EQ(GetDocument().getElementById("log")->innerHTML().Utf8(), ""); + + // Fire keyUp, which should trigger a scrollend event. + e.SetType(WebInputEvent::Type::kKeyUp); + GetDocument().GetFrame()->GetEventHandler().KeyEvent(e); + + Compositor().BeginFrame(); + EXPECT_EQ(GetDocument().getElementById("log")->innerHTML().Utf8(), + "scrollend"); +} + } // namespace blink
diff --git a/third_party/blink/renderer/core/input/keyboard_event_manager.cc b/third_party/blink/renderer/core/input/keyboard_event_manager.cc index c130db6..d3d2170 100644 --- a/third_party/blink/renderer/core/input/keyboard_event_manager.cc +++ b/third_party/blink/renderer/core/input/keyboard_event_manager.cc
@@ -176,6 +176,7 @@ void KeyboardEventManager::Trace(Visitor* visitor) const { visitor->Trace(frame_); visitor->Trace(scroll_manager_); + visitor->Trace(scrollend_event_target_); } bool KeyboardEventManager::HandleAccessKey(const WebKeyboardEvent& evt) { @@ -429,6 +430,14 @@ if (event->key() == "Enter") { DefaultEnterEventHandler(event); } + if (event->keyCode() == last_scrolling_keycode_) { + if (scrollend_event_target_ && has_pending_scrollend_on_key_up_) { + scrollend_event_target_->OnScrollFinished(true); + } + scrollend_event_target_.Clear(); + last_scrolling_keycode_ = VKEY_UNKNOWN; + has_pending_scrollend_on_key_up_ = false; + } } } @@ -445,13 +454,22 @@ ? mojom::blink::ScrollDirection::kScrollBlockDirectionBackward : mojom::blink::ScrollDirection::kScrollBlockDirectionForward; + // We must clear |scrollend_event_target_| at the beginning of each scroll + // so that we don't fire scrollend based on a prior scroll if a newer scroll + // begins before the keyup event associated with the prior scroll/keydown. + // If a newer scroll begins before the keyup event and ends after it, + // we should fire scrollend at the end of that newer scroll rather than at + // the keyup event. + scrollend_event_target_.Clear(); // TODO(bokan): enable scroll customization in this case. See // crbug.com/410974. if (scroll_manager_->LogicalScroll(direction, - ui::ScrollGranularity::kScrollByPage, nullptr, - possible_focused_node)) { + ui::ScrollGranularity::kScrollByPage, + nullptr, possible_focused_node, true)) { UseCounter::Count(frame_->GetDocument(), WebFeature::kScrollByKeyboardSpacebarKey); + last_scrolling_keycode_ = event->keyCode(); + has_pending_scrollend_on_key_up_ = true; event->SetDefaultHandled(); return; } @@ -495,9 +513,14 @@ &scroll_use_uma)) return; + // See KeyboardEventManager::DefaultSpaceEventHandler for the reason for + // this Clear. + scrollend_event_target_.Clear(); if (scroll_manager_->BubblingScroll(scroll_direction, scroll_granularity, - nullptr, possible_focused_node)) { + nullptr, possible_focused_node, true)) { UseCounter::Count(frame_->GetDocument(), scroll_use_uma); + last_scrolling_keycode_ = event->keyCode(); + has_pending_scrollend_on_key_up_ = true; event->SetDefaultHandled(); return; }
diff --git a/third_party/blink/renderer/core/input/keyboard_event_manager.h b/third_party/blink/renderer/core/input/keyboard_event_manager.h index 6e6e9b3..15d7f8e4 100644 --- a/third_party/blink/renderer/core/input/keyboard_event_manager.h +++ b/third_party/blink/renderer/core/input/keyboard_event_manager.h
@@ -9,8 +9,10 @@ #include "third_party/blink/public/common/input/web_input_event.h" #include "third_party/blink/public/platform/web_input_event_result.h" #include "third_party/blink/renderer/core/core_export.h" +#include "third_party/blink/renderer/core/scroll/scrollable_area.h" #include "third_party/blink/renderer/platform/heap/garbage_collected.h" #include "third_party/blink/renderer/platform/heap/member.h" +#include "third_party/blink/renderer/platform/keyboard_codes.h" #include "third_party/blink/renderer/platform/wtf/allocator/allocator.h" namespace blink { @@ -46,6 +48,12 @@ void CapsLockStateMayHaveChanged(); static WebInputEvent::Modifiers GetCurrentModifierState(); static bool CurrentCapsLockState(); + void SetScrollendEventTarget(ScrollableArea* scrollable_area) { + scrollend_event_target_ = scrollable_area; + } + bool HasPendingScrollendOnKeyUp() const { + return has_pending_scrollend_on_key_up_; + } bool is_handling_key_event() const { return is_handling_key_event_; } @@ -65,8 +73,15 @@ const Member<LocalFrame> frame_; Member<ScrollManager> scroll_manager_; + WeakMember<ScrollableArea> scrollend_event_target_; bool is_handling_key_event_ = false; + // If a ScrollManager::BubblingScroll or ScrollManager::LogicalScroll is + // started by a keydown event, this records the keycode for that event so + // that we can fire a "scrollend" event if necessary on the accompanying keyup + // event. + int last_scrolling_keycode_ = VKEY_UNKNOWN; + bool has_pending_scrollend_on_key_up_ = false; }; } // namespace blink
diff --git a/third_party/blink/renderer/core/input/scroll_manager.cc b/third_party/blink/renderer/core/input/scroll_manager.cc index 337aede0..48104ad 100644 --- a/third_party/blink/renderer/core/input/scroll_manager.cc +++ b/third_party/blink/renderer/core/input/scroll_manager.cc
@@ -20,6 +20,7 @@ #include "third_party/blink/renderer/core/html/html_frame_owner_element.h" #include "third_party/blink/renderer/core/input/event_handler.h" #include "third_party/blink/renderer/core/input/event_handling_util.h" +#include "third_party/blink/renderer/core/input/keyboard_event_manager.h" #include "third_party/blink/renderer/core/layout/layout_block.h" #include "third_party/blink/renderer/core/layout/layout_embedded_content.h" #include "third_party/blink/renderer/core/layout/layout_view.h" @@ -320,7 +321,8 @@ bool ScrollManager::LogicalScroll(mojom::blink::ScrollDirection direction, ui::ScrollGranularity granularity, Node* start_node, - Node* mouse_press_node) { + Node* mouse_press_node, + bool scrolling_via_key) { Node* node = start_node; if (!node) @@ -402,6 +404,8 @@ ScrollableArea::ScrollCallback callback(WTF::BindOnce( [](WeakPersistent<ScrollableArea> area, + WeakPersistent<KeyboardEventManager> keyboard_event_manager, + bool is_key_scroll, ScrollableArea::ScrollCompletionMode completion_mode) { if (area) { bool enqueue_scrollend = @@ -417,10 +421,24 @@ } } + // For key-triggered scrolls, we defer firing scrollend till the + // accompanying keyup fires, unless the keyup happens before the + // scroll finishes. (Instant scrolls always finish before the + // keyup event.) + if (is_key_scroll && enqueue_scrollend && keyboard_event_manager) { + if (keyboard_event_manager->HasPendingScrollendOnKeyUp() || + !area->ScrollAnimatorEnabled()) { + keyboard_event_manager->SetScrollendEventTarget(area); + enqueue_scrollend = false; + } + } area->OnScrollFinished(enqueue_scrollend); } }, - WrapWeakPersistent(scrollable_area))); + WrapWeakPersistent(scrollable_area), + WrapWeakPersistent( + &(frame_->GetEventHandler().GetKeyboardEventManager())), + scrolling_via_key)); ScrollResult result = scrollable_area->UserScroll( granularity, ToScrollDelta(physical_direction, @@ -437,13 +455,16 @@ bool ScrollManager::BubblingScroll(mojom::blink::ScrollDirection direction, ui::ScrollGranularity granularity, Node* starting_node, - Node* mouse_press_node) { + Node* mouse_press_node, + bool scrolling_via_key) { // The layout needs to be up to date to determine if we can scroll. We may be // here because of an onLoad event, in which case the final layout hasn't been // performed yet. frame_->GetDocument()->UpdateStyleAndLayout(DocumentUpdateReason::kScroll); - if (LogicalScroll(direction, granularity, starting_node, mouse_press_node)) + if (LogicalScroll(direction, granularity, starting_node, mouse_press_node, + scrolling_via_key)) { return true; + } return frame_->BubbleLogicalScrollInParentFrame(direction, granularity); }
diff --git a/third_party/blink/renderer/core/input/scroll_manager.h b/third_party/blink/renderer/core/input/scroll_manager.h index 26e8025d..82750fd 100644 --- a/third_party/blink/renderer/core/input/scroll_manager.h +++ b/third_party/blink/renderer/core/input/scroll_manager.h
@@ -72,14 +72,16 @@ bool LogicalScroll(mojom::blink::ScrollDirection, ui::ScrollGranularity, Node* start_node, - Node* mouse_press_node); + Node* mouse_press_node, + bool scrolling_via_key = false); // Performs a logical scroll that chains, crossing frames, starting from // the given node or a reasonable default (focus/last clicked). bool BubblingScroll(mojom::blink::ScrollDirection, ui::ScrollGranularity, Node* starting_node, - Node* mouse_press_node); + Node* mouse_press_node, + bool scrolling_via_key = false); // TODO(crbug.com/616491): Consider moving all gesture related functions to // another class.
diff --git a/third_party/blink/renderer/core/inspector/inspector_css_agent.h b/third_party/blink/renderer/core/inspector/inspector_css_agent.h index 70ad937..607e189 100644 --- a/third_party/blink/renderer/core/inspector/inspector_css_agent.h +++ b/third_party/blink/renderer/core/inspector/inspector_css_agent.h
@@ -38,7 +38,6 @@ #include "third_party/blink/renderer/core/inspector/inspector_dom_agent.h" #include "third_party/blink/renderer/core/inspector/inspector_style_sheet.h" #include "third_party/blink/renderer/core/inspector/protocol/css.h" -#include "third_party/blink/renderer/core/probe/core_probes.h" #include "third_party/blink/renderer/platform/heap/collection_support/heap_hash_map.h" #include "third_party/blink/renderer/platform/heap/collection_support/heap_hash_set.h" #include "third_party/blink/renderer/platform/wtf/hash_counted_set.h"
diff --git a/third_party/blink/renderer/core/inspector/inspector_dom_agent.cc b/third_party/blink/renderer/core/inspector/inspector_dom_agent.cc index 51216db..d2728a1 100644 --- a/third_party/blink/renderer/core/inspector/inspector_dom_agent.cc +++ b/third_party/blink/renderer/core/inspector/inspector_dom_agent.cc
@@ -1344,7 +1344,7 @@ return protocol::Response::ServerError( ToCoreString(std::move(error)).Utf8()); } - if (!V8Node::HasInstance(value, isolate_)) { + if (!V8Node::HasInstance(isolate_, value)) { return protocol::Response::ServerError( "Object id doesn't reference a Node"); } @@ -2720,7 +2720,7 @@ ToCoreString(std::move(error)).Utf8()); } - if (!V8File::HasInstance(value, isolate_)) { + if (!V8File::HasInstance(isolate_, value)) { return protocol::Response::ServerError( "Object id doesn't reference a File"); }
diff --git a/third_party/blink/renderer/core/inspector/inspector_io_agent.cc b/third_party/blink/renderer/core/inspector/inspector_io_agent.cc index 161edb25..70623d7 100644 --- a/third_party/blink/renderer/core/inspector/inspector_io_agent.cc +++ b/third_party/blink/renderer/core/inspector/inspector_io_agent.cc
@@ -28,7 +28,7 @@ ToCoreString(std::move(error)).Utf8()); } - if (!V8Blob::HasInstance(value, isolate_)) { + if (!V8Blob::HasInstance(isolate_, value)) { return protocol::Response::ServerError( "Object id doesn't reference a Blob"); }
diff --git a/third_party/blink/renderer/core/inspector/thread_debugger_common_impl.cc b/third_party/blink/renderer/core/inspector/thread_debugger_common_impl.cc index cc62fdb4..cc415c9 100644 --- a/third_party/blink/renderer/core/inspector/thread_debugger_common_impl.cc +++ b/third_party/blink/renderer/core/inspector/thread_debugger_common_impl.cc
@@ -303,12 +303,12 @@ v8::Local<v8::Value> v8_value, int max_depth) { // Serialize according to https://w3c.github.io/webdriver-bidi. - if (V8Node::HasInstance(v8_value, isolate_)) { + if (V8Node::HasInstance(isolate_, v8_value)) { Node* node = V8Node::ToImplWithTypeCheck(isolate_, v8_value); return SerializeNodeToWebDriverValue(node, isolate_, max_depth); } - if (V8Window::HasInstance(v8_value, isolate_)) { + if (V8Window::HasInstance(isolate_, v8_value)) { return std::make_unique<v8_inspector::WebDriverValue>( ToV8InspectorStringBuffer("window")); } @@ -329,21 +329,24 @@ static const char kBlob[] = "blob"; static const char kTrustedType[] = "trustedtype"; - if (V8Node::HasInstance(value, isolate_)) + if (V8Node::HasInstance(isolate_, value)) { return ToV8InspectorStringBuffer(kNode); - if (V8NodeList::HasInstance(value, isolate_) || - V8DOMTokenList::HasInstance(value, isolate_) || - V8HTMLCollection::HasInstance(value, isolate_) || - V8HTMLAllCollection::HasInstance(value, isolate_)) { + } + if (V8NodeList::HasInstance(isolate_, value) || + V8DOMTokenList::HasInstance(isolate_, value) || + V8HTMLCollection::HasInstance(isolate_, value) || + V8HTMLAllCollection::HasInstance(isolate_, value)) { return ToV8InspectorStringBuffer(kArray); } - if (V8DOMException::HasInstance(value, isolate_)) + if (V8DOMException::HasInstance(isolate_, value)) { return ToV8InspectorStringBuffer(kError); - if (V8Blob::HasInstance(value, isolate_)) + } + if (V8Blob::HasInstance(isolate_, value)) { return ToV8InspectorStringBuffer(kBlob); - if (V8TrustedHTML::HasInstance(value, isolate_) || - V8TrustedScript::HasInstance(value, isolate_) || - V8TrustedScriptURL::HasInstance(value, isolate_)) { + } + if (V8TrustedHTML::HasInstance(isolate_, value) || + V8TrustedScript::HasInstance(isolate_, value) || + V8TrustedScriptURL::HasInstance(isolate_, value)) { return ToV8InspectorStringBuffer(kTrustedType); } return nullptr; @@ -353,19 +356,19 @@ ThreadDebuggerCommonImpl::descriptionForValueSubtype( v8::Local<v8::Context> context, v8::Local<v8::Value> value) { - if (V8TrustedHTML::HasInstance(value, isolate_)) { + if (V8TrustedHTML::HasInstance(isolate_, value)) { TrustedHTML* trusted_html = V8TrustedHTML::ToImplWithTypeCheck(isolate_, value); return ToV8InspectorStringBuffer(trusted_html->toString()); - } else if (V8TrustedScript::HasInstance(value, isolate_)) { + } else if (V8TrustedScript::HasInstance(isolate_, value)) { TrustedScript* trusted_script = V8TrustedScript::ToImplWithTypeCheck(isolate_, value); return ToV8InspectorStringBuffer(trusted_script->toString()); - } else if (V8TrustedScriptURL::HasInstance(value, isolate_)) { + } else if (V8TrustedScriptURL::HasInstance(isolate_, value)) { TrustedScriptURL* trusted_script_url = V8TrustedScriptURL::ToImplWithTypeCheck(isolate_, value); return ToV8InspectorStringBuffer(trusted_script_url->toString()); - } else if (V8Node::HasInstance(value, isolate_)) { + } else if (V8Node::HasInstance(isolate_, value)) { Node* node = V8Node::ToImplWithTypeCheck(isolate_, value); StringBuilder description; switch (node->getNodeType()) {
diff --git a/third_party/blink/renderer/core/layout/anchor_scroll_data.cc b/third_party/blink/renderer/core/layout/anchor_scroll_data.cc index 825502dd..3332257f 100644 --- a/third_party/blink/renderer/core/layout/anchor_scroll_data.cc +++ b/third_party/blink/renderer/core/layout/anchor_scroll_data.cc
@@ -204,6 +204,11 @@ } bool AnchorScrollData::ValidateSnapshot() { + if (is_snapshot_validated_) { + return true; + } + is_snapshot_validated_ = true; + // If this AnchorScrollData is detached in the previous style recalc, we no // longer need to validate it. if (!IsActive())
diff --git a/third_party/blink/renderer/core/layout/anchor_scroll_data.h b/third_party/blink/renderer/core/layout/anchor_scroll_data.h index 8989ca1..2d98946 100644 --- a/third_party/blink/renderer/core/layout/anchor_scroll_data.h +++ b/third_party/blink/renderer/core/layout/anchor_scroll_data.h
@@ -93,6 +93,10 @@ void InvalidateLayout(); void InvalidatePaint(); + // ValidateSnapshot is called every frame, but AnchorScrollData only needs + // to perform the validation once (during the frame it was created). + bool is_snapshot_validated_ = false; + // The anchor-positioned element. Member<Element> owner_;
diff --git a/third_party/blink/renderer/core/layout/ng/flex/ng_flex_layout_algorithm.cc b/third_party/blink/renderer/core/layout/ng/flex/ng_flex_layout_algorithm.cc index d28a74b..53125a0 100644 --- a/third_party/blink/renderer/core/layout/ng/flex/ng_flex_layout_algorithm.cc +++ b/third_party/blink/renderer/core/layout/ng/flex/ng_flex_layout_algorithm.cc
@@ -1327,6 +1327,11 @@ !flex_item.layout_result_) << "If we already have a 'measure' result from " "ConstructAndAppendFlexItems, we don't want to evict it."; + absl::optional<NGDisableSideEffectsScope> disable_side_effects; + if (is_computing_multiline_column_intrinsic_size && + !flex_item.ng_input_node_.GetLayoutBox()->NeedsLayout()) { + disable_side_effects.emplace(); + } flex_item.layout_result_ = flex_item.ng_input_node_.Layout( child_space, nullptr /*break token*/); // TODO(layout-dev): Handle abortions caused by block fragmentation.
diff --git a/third_party/blink/renderer/core/layout/ng/inline/ng_inline_layout_algorithm.cc b/third_party/blink/renderer/core/layout/ng/inline/ng_inline_layout_algorithm.cc index c9ed3931..c34cbf3 100644 --- a/third_party/blink/renderer/core/layout/ng/inline/ng_inline_layout_algorithm.cc +++ b/third_party/blink/renderer/core/layout/ng/inline/ng_inline_layout_algorithm.cc
@@ -1321,7 +1321,6 @@ Node(), ConstraintSpace(), line_opportunity)); } - absl::optional<NGLineLayoutOpportunity> saved_line_opportunity; bool is_line_info_cached = false; NGLineInfo& line_info = context_->GetLineInfo(break_token, is_line_info_cached); @@ -1330,17 +1329,14 @@ // `line_info` was cached. line_info.SetBfcBlockOffset(line_opportunity.bfc_block_offset); } else { - if (const absl::optional<LayoutUnit>& balanced_available_width = - context_->BalancedAvailableWidth()) { - saved_line_opportunity = line_opportunity; - NGParagraphLineBreaker::PrepareForNextLine(*balanced_available_width, - &line_opportunity); - } - NGLineBreaker line_breaker( Node(), NGLineBreakerMode::kContent, ConstraintSpace(), line_opportunity, leading_floats, handled_leading_floats_index, break_token, column_spanner_path_, &ExclusionSpace()); + if (const absl::optional<LayoutUnit>& balanced_available_width = + context_->BalancedAvailableWidth()) { + line_breaker.OverrideAvailableWidth(*balanced_available_width); + } line_breaker.NextLine(&line_info); } @@ -1425,12 +1421,6 @@ // to overflow in that case. } - if (saved_line_opportunity) { - // Restore `line_opportunity` if `NGParagraphLineBreaker` updated it. - line_opportunity = *saved_line_opportunity; - line_info.SetAvailableWidth(line_opportunity.AvailableInlineSize()); - } - PrepareBoxStates(line_info, break_token); CreateLine(line_opportunity, &line_info, line_box);
diff --git a/third_party/blink/renderer/core/layout/ng/inline/ng_line_breaker.cc b/third_party/blink/renderer/core/layout/ng/inline/ng_line_breaker.cc index ecefd10..1e72ad0 100644 --- a/third_party/blink/renderer/core/layout/ng/inline/ng_line_breaker.cc +++ b/third_party/blink/renderer/core/layout/ng/inline/ng_line_breaker.cc
@@ -328,8 +328,13 @@ return style.ShouldWrapLine(); } -LayoutUnit NGLineBreaker::ComputeAvailableWidth() const { - LayoutUnit available_width = line_opportunity_.AvailableInlineSize(); +void NGLineBreaker::UpdateAvailableWidth() { + LayoutUnit available_width; + if (UNLIKELY(override_available_width_)) { + available_width = override_available_width_; + } else { + available_width = line_opportunity_.AvailableInlineSize(); + } // Make sure it's at least the initial size, which is usually 0 but not so // when `box-decoration-break: clone`. available_width = @@ -337,7 +342,7 @@ // Available width must be smaller than |LayoutUnit::Max()| so that the // position can be larger. available_width = std::min(available_width, LayoutUnit::NearlyMax()); - return available_width; + available_width_ = available_width; } NGLineBreaker::NGLineBreaker(NGInlineNode node, @@ -377,7 +382,7 @@ leading_floats_(leading_floats), handled_leading_floats_index_(handled_leading_floats_index), base_direction_(node_.BaseDirection()) { - available_width_ = ComputeAvailableWidth(); + UpdateAvailableWidth(); break_iterator_.SetBreakSpace(BreakSpaceType::kAfterSpaceRun); if (is_svg_text_) { const auto& char_data_list = node_.SvgCharacterDataList(); @@ -421,6 +426,12 @@ NGLineBreaker::~NGLineBreaker() = default; +void NGLineBreaker::OverrideAvailableWidth(LayoutUnit available_width) { + DCHECK(available_width); + override_available_width_ = available_width; + UpdateAvailableWidth(); +} + inline NGInlineItemResult* NGLineBreaker::AddItem(const NGInlineItem& item, unsigned end_offset, NGLineInfo* line_info) { @@ -545,7 +556,7 @@ // accommodate cloned box decorations. position_ += cloned_box_decorations_initial_size_; // |cloned_box_decorations_initial_size_| may affect available width. - available_width_ = ComputeAvailableWidth(); + UpdateAvailableWidth(); DCHECK_GE(available_width_, cloned_box_decorations_initial_size_); } @@ -721,6 +732,12 @@ if (trailing_whitespace_ == WhitespaceState::kPreserved) line_info->SetHasTrailingSpaces(); + if (UNLIKELY(override_available_width_)) { + // Clear the overridden available width so that `line_info` has the original + // available width for aligning. + override_available_width_ = LayoutUnit(); + UpdateAvailableWidth(); + } ComputeLineLocation(line_info); if (mode_ == NGLineBreakerMode::kContent) { line_info->SetBreakToken(CreateBreakToken(*line_info)); @@ -2701,7 +2718,7 @@ line_opportunity_ = opportunity.ComputeLineLayoutOpportunity( constraint_space_, line_opportunity_.line_block_size, LayoutUnit()); - available_width_ = ComputeAvailableWidth(); + UpdateAvailableWidth(); DCHECK_GE(AvailableWidth(), LayoutUnit()); }
diff --git a/third_party/blink/renderer/core/layout/ng/inline/ng_line_breaker.h b/third_party/blink/renderer/core/layout/ng/inline/ng_line_breaker.h index d5e539f8..41c3eaa 100644 --- a/third_party/blink/renderer/core/layout/ng/inline/ng_line_breaker.h +++ b/third_party/blink/renderer/core/layout/ng/inline/ng_line_breaker.h
@@ -61,6 +61,10 @@ bool IsFinished() const { return current_.item_index >= Items().size(); } + // Override the available width to compute line breaks. This is reset after + // each `NextLine`. + void OverrideAvailableWidth(LayoutUnit available_width); + // Computing |NGLineBreakerMode::kMinContent| with |MaxSizeCache| caches // information that can help computing |kMaxContent|. It is recommended to set // this when computing both |kMinContent| and |kMaxContent|. @@ -216,10 +220,7 @@ void ComputeBaseDirection(); void RecalcClonedBoxDecorations(); - LayoutUnit AvailableWidth() const { - DCHECK_EQ(available_width_, ComputeAvailableWidth()); - return available_width_; - } + LayoutUnit AvailableWidth() const { return available_width_; } LayoutUnit AvailableWidthToFit() const { return AvailableWidth().AddEpsilon(); } @@ -227,7 +228,7 @@ return AvailableWidthToFit() - position_; } bool CanFitOnLine() const { return position_ <= AvailableWidthToFit(); } - LayoutUnit ComputeAvailableWidth() const; + void UpdateAvailableWidth(); // True if the current line is hyphenated. bool HasHyphen() const { return hyphen_index_.has_value(); } @@ -349,6 +350,8 @@ }; absl::optional<TrailingCollapsibleSpace> trailing_collapsible_space_; + LayoutUnit override_available_width_; + // Keep track of handled float items. See HandleFloat(). const NGPositionedFloatVector& leading_floats_; unsigned leading_floats_index_ = 0u;
diff --git a/third_party/blink/renderer/core/layout/ng/inline/ng_line_info.h b/third_party/blink/renderer/core/layout/ng/inline/ng_line_info.h index abb6b70..beea172 100644 --- a/third_party/blink/renderer/core/layout/ng/inline/ng_line_info.h +++ b/third_party/blink/renderer/core/layout/ng/inline/ng_line_info.h
@@ -150,9 +150,6 @@ void SetBfcBlockOffset(LayoutUnit block_offset) { bfc_offset_.block_offset = block_offset; } - void SetAvailableWidth(LayoutUnit available_width) { - available_width_ = available_width; - } void SetWidth(LayoutUnit available_width, LayoutUnit width) { available_width_ = available_width; width_ = width;
diff --git a/third_party/blink/renderer/core/layout/ng/inline/ng_paragraph_line_breaker.cc b/third_party/blink/renderer/core/layout/ng/inline/ng_paragraph_line_breaker.cc index 246ba1a..6cca4493 100644 --- a/third_party/blink/renderer/core/layout/ng/inline/ng_paragraph_line_breaker.cc +++ b/third_party/blink/renderer/core/layout/ng/inline/ng_paragraph_line_breaker.cc
@@ -227,18 +227,4 @@ normal_lines.BreakToken()); } -// static -void NGParagraphLineBreaker::PrepareForNextLine( - LayoutUnit balanced_available_width, - NGLineLayoutOpportunity* line_opportunity) { - DCHECK_GE(line_opportunity->line_right_offset, - line_opportunity->line_left_offset); - DCHECK_EQ(line_opportunity->line_left_offset, - line_opportunity->float_line_left_offset); - DCHECK_EQ(line_opportunity->line_right_offset, - line_opportunity->float_line_right_offset); - line_opportunity->line_right_offset = - line_opportunity->line_left_offset + balanced_available_width; -} - } // namespace blink
diff --git a/third_party/blink/renderer/core/layout/ng/inline/ng_paragraph_line_breaker.h b/third_party/blink/renderer/core/layout/ng/inline/ng_paragraph_line_breaker.h index c97781a..9ba0bd64 100644 --- a/third_party/blink/renderer/core/layout/ng/inline/ng_paragraph_line_breaker.h +++ b/third_party/blink/renderer/core/layout/ng/inline/ng_paragraph_line_breaker.h
@@ -23,9 +23,6 @@ const NGConstraintSpace& space, const NGLineLayoutOpportunity& line_opportunity); - static void PrepareForNextLine(LayoutUnit balanced_available_width, - NGLineLayoutOpportunity* line_opportunity); - private: static absl::optional<LayoutUnit> AttemptParagraphBalancingCore( const NGInlineNode& node,
diff --git a/third_party/blink/renderer/core/loader/link_loader_test.cc b/third_party/blink/renderer/core/loader/link_loader_test.cc index 75fae178..8941e9a 100644 --- a/third_party/blink/renderer/core/loader/link_loader_test.cc +++ b/third_party/blink/renderer/core/loader/link_loader_test.cc
@@ -25,10 +25,13 @@ #include "third_party/blink/renderer/core/loader/document_loader.h" #include "third_party/blink/renderer/core/loader/link_loader_client.h" #include "third_party/blink/renderer/core/loader/modulescript/module_script_fetch_request.h" +#include "third_party/blink/renderer/core/loader/pending_link_preload.h" #include "third_party/blink/renderer/core/loader/resource/link_dictionary_resource.h" #include "third_party/blink/renderer/core/testing/dummy_modulator.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/core/testing/sim/sim_request.h" +#include "third_party/blink/renderer/core/testing/sim/sim_test.h" #include "third_party/blink/renderer/platform/heap/garbage_collected.h" #include "third_party/blink/renderer/platform/loader/fetch/memory_cache.h" #include "third_party/blink/renderer/platform/loader/fetch/resource_fetcher.h" @@ -854,4 +857,70 @@ } } // namespace + +// Required to be outside the anomymous namespace for testing +class DictionaryLoadFromHeaderTest : public SimTest, + public testing::WithParamInterface<bool> { + public: + DictionaryLoadFromHeaderTest() + : dictionary_scoped_feature_(GetParam()), + backend_scoped_feature_(GetParam()) {} + + void SetUp() override { + SimTest::SetUp(); + + SimRequestBase::Params params; + String link_header = String("<") + dict_href_ + ">; rel=\"dictionary\""; + params.response_http_headers.Set(http_names::kLink, link_header); + main_resource_ = + std::make_unique<SimRequest>(page_href_, "text/html", params); + } + + void RunIdleTasks() { + ThreadScheduler::Current() + ->ToMainThreadScheduler() + ->StartIdlePeriodForTesting(); + base::RunLoop().RunUntilIdle(); + } + + protected: + static constexpr char page_href_[] = "http://example.test/test.html"; + static constexpr char dict_href_[] = "http://example.test/test.dict"; + + std::unique_ptr<SimRequest> main_resource_; + + private: + ScopedCompressionDictionaryTransportForTest dictionary_scoped_feature_; + ScopedCompressionDictionaryTransportBackendForTest backend_scoped_feature_; +}; + +INSTANTIATE_TEST_SUITE_P(DictionaryLoadFromHeaderTest, + DictionaryLoadFromHeaderTest, + testing::Bool()); + +TEST_P(DictionaryLoadFromHeaderTest, LoadDictionaryFromHeader) { + bool is_dictionary_load_enabled = GetParam(); + + KURL dict_url = KURL(NullURL(), dict_href_); + ResourceResponse dict_response(dict_url); + dict_response.SetHttpStatusCode(200); + url_test_helpers::RegisterMockedURLLoadWithCustomResponse( + dict_url, "", WrappedResourceResponse(dict_response)); + + LoadURL(page_href_); + main_resource_->Complete(""); + + RunIdleTasks(); + Resource* dictionary_resource = + GetDocument().GetPendingLinkPreloadForTesting(dict_url); + ASSERT_EQ(dictionary_resource != nullptr, is_dictionary_load_enabled); + if (is_dictionary_load_enabled) { + ASSERT_TRUE(dictionary_resource->IsLoading()); + URLLoaderMockFactory::GetSingletonInstance()->ServeAsynchronousRequests(); + ASSERT_TRUE(dictionary_resource->IsLoaded()); + } + URLLoaderMockFactory::GetSingletonInstance() + ->UnregisterAllURLsAndClearMemoryCache(); +} + } // namespace blink
diff --git a/third_party/blink/renderer/core/loader/pending_link_preload.cc b/third_party/blink/renderer/core/loader/pending_link_preload.cc index b282e40..723e0b1 100644 --- a/third_party/blink/renderer/core/loader/pending_link_preload.cc +++ b/third_party/blink/renderer/core/loader/pending_link_preload.cc
@@ -110,7 +110,7 @@ document_->RemovePendingLinkHeaderPreloadIfNeeded(*this); } -Resource* PendingLinkPreload::GetResourceForTesting() { +Resource* PendingLinkPreload::GetResourceForTesting() const { return finish_observer_ ? finish_observer_->GetResource() : nullptr; }
diff --git a/third_party/blink/renderer/core/loader/pending_link_preload.h b/third_party/blink/renderer/core/loader/pending_link_preload.h index a4d43314..d633136 100644 --- a/third_party/blink/renderer/core/loader/pending_link_preload.h +++ b/third_party/blink/renderer/core/loader/pending_link_preload.h
@@ -30,7 +30,7 @@ bool HasResource() const { return finish_observer_.Get(); } bool MatchesMedia() const { return matches_media_; } void SetMatchesMedia(bool matches) { matches_media_ = matches; } - Resource* GetResourceForTesting(); + Resource* GetResourceForTesting() const; void Trace(Visitor*) const override;
diff --git a/third_party/blink/renderer/core/loader/preload_helper.cc b/third_party/blink/renderer/core/loader/preload_helper.cc index c0cfd355..d1e0e2b 100644 --- a/third_party/blink/renderer/core/loader/preload_helper.cc +++ b/third_party/blink/renderer/core/loader/preload_helper.cc
@@ -189,6 +189,8 @@ case PreloadHelper::LoadLinksFromHeaderMode:: kDocumentAfterCommitWithViewport: return false; + case PreloadHelper::LoadLinksFromHeaderMode::kDocumentAfterLoadCompleted: + return false; case PreloadHelper::LoadLinksFromHeaderMode::kSubresourceFromMemoryCache: return true; case PreloadHelper::LoadLinksFromHeaderMode::kSubresourceNotFromMemoryCache: @@ -207,6 +209,8 @@ case PreloadHelper::LoadLinksFromHeaderMode:: kDocumentAfterCommitWithViewport: return is_viewport_dependent; + case PreloadHelper::LoadLinksFromHeaderMode::kDocumentAfterLoadCompleted: + return false; case PreloadHelper::LoadLinksFromHeaderMode::kSubresourceFromMemoryCache: return false; case PreloadHelper::LoadLinksFromHeaderMode::kSubresourceNotFromMemoryCache: @@ -733,7 +737,11 @@ bool is_network_hint_allowed = IsNetworkHintAllowed(mode); bool is_resource_load_allowed = IsResourceLoadAllowed(mode, header.IsViewportDependent()); - if (!is_network_hint_allowed && !is_resource_load_allowed) { + // We load compression dictionaries after the page load completes. + bool is_dictionary_load_allowed = + (mode == LoadLinksFromHeaderMode::kDocumentAfterLoadCompleted); + if (!is_network_hint_allowed && !is_resource_load_allowed && + !is_dictionary_load_allowed) { continue; } @@ -809,18 +817,23 @@ PreconnectIfNeeded(params, document, &frame, kLinkCalledFromHeader); } - if (is_resource_load_allowed) { + if (is_resource_load_allowed || is_dictionary_load_allowed) { DCHECK(document); PendingLinkPreload* pending_preload = MakeGarbageCollected<PendingLinkPreload>(*document, nullptr /* LinkLoader */); document->AddPendingLinkHeaderPreload(*pending_preload); - PreloadIfNeeded(params, *document, base_url, kLinkCalledFromHeader, - viewport_description, kNotParserInserted, - pending_preload); - PrefetchIfNeeded(params, *document, pending_preload); - ModulePreloadIfNeeded(params, *document, viewport_description, - pending_preload); + if (is_resource_load_allowed) { + PreloadIfNeeded(params, *document, base_url, kLinkCalledFromHeader, + viewport_description, kNotParserInserted, + pending_preload); + PrefetchIfNeeded(params, *document, pending_preload); + ModulePreloadIfNeeded(params, *document, viewport_description, + pending_preload); + } + if (is_dictionary_load_allowed) { + FetchDictionaryIfNeeded(params, *document, pending_preload); + } } if (params.rel.IsServiceWorker()) { UseCounter::Count(document, WebFeature::kLinkHeaderServiceWorker); @@ -829,6 +842,8 @@ } } +// TODO(crbug.com/1413922): +// Always load the resource after the full document load completes void PreloadHelper::FetchDictionaryIfNeeded( const LinkLoadParameters& params, Document& document,
diff --git a/third_party/blink/renderer/core/loader/preload_helper.h b/third_party/blink/renderer/core/loader/preload_helper.h index 62c972d3..39cf36c 100644 --- a/third_party/blink/renderer/core/loader/preload_helper.h +++ b/third_party/blink/renderer/core/loader/preload_helper.h
@@ -28,6 +28,7 @@ kDocumentBeforeCommit, kDocumentAfterCommitWithoutViewport, kDocumentAfterCommitWithViewport, + kDocumentAfterLoadCompleted, kSubresourceFromMemoryCache, kSubresourceNotFromMemoryCache, };
diff --git a/third_party/blink/renderer/core/origin_trials/origin_trial_context.cc b/third_party/blink/renderer/core/origin_trials/origin_trial_context.cc index ecf70c1d..033db9d7 100644 --- a/third_party/blink/renderer/core/origin_trials/origin_trial_context.cc +++ b/third_party/blink/renderer/core/origin_trials/origin_trial_context.cc
@@ -544,7 +544,7 @@ network::features::kAttributionReportingCrossAppWeb); } - if (trial_name == "ComputePressure") { + if (trial_name == "ComputePressure_v2") { return base::FeatureList::IsEnabled(features::kComputePressure); }
diff --git a/third_party/blink/renderer/core/probe/core_probes.cc b/third_party/blink/renderer/core/probe/core_probes.cc index 3846213..1038ff28 100644 --- a/third_party/blink/renderer/core/probe/core_probes.cc +++ b/third_party/blink/renderer/core/probe/core_probes.cc
@@ -34,6 +34,7 @@ #include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_core.h" #include "third_party/blink/renderer/core/core_probes_inl.h" #include "third_party/blink/renderer/core/inspector/inspector_trace_events.h" +#include "third_party/blink/renderer/core/offscreencanvas/offscreen_canvas.h" #include "third_party/blink/renderer/core/probe/async_task_context.h" #include "third_party/blink/renderer/platform/bindings/thread_debugger.h" #include "third_party/blink/renderer/platform/instrumentation/tracing/trace_event.h" @@ -96,6 +97,12 @@ TRACE_EVENT_END("blink"); // "AsyncTask Run" } +CoreProbeSink* ToCoreProbeSink(OffscreenCanvas* offscreen_canvas) { + return offscreen_canvas + ? ToCoreProbeSink(offscreen_canvas->GetExecutionContext()) + : nullptr; +} + void AllAsyncTasksCanceled(ExecutionContext* context) { if (context) { if (ThreadDebugger* debugger = ThreadDebugger::From(context->GetIsolate()))
diff --git a/third_party/blink/renderer/core/probe/core_probes.h b/third_party/blink/renderer/core/probe/core_probes.h index d18cec6..e71ea00 100644 --- a/third_party/blink/renderer/core/probe/core_probes.h +++ b/third_party/blink/renderer/core/probe/core_probes.h
@@ -36,7 +36,6 @@ #include "third_party/blink/renderer/core/execution_context/execution_context.h" #include "third_party/blink/renderer/core/frame/ad_tracker.h" #include "third_party/blink/renderer/core/frame/local_frame.h" -#include "third_party/blink/renderer/core/offscreencanvas/offscreen_canvas.h" #include "third_party/blink/renderer/platform/loader/fetch/resource.h" namespace network { @@ -51,6 +50,7 @@ namespace blink { class CoreProbeSink; +class OffscreenCanvas; class ThreadDebugger; namespace protocol { @@ -145,11 +145,7 @@ : nullptr; } -inline CoreProbeSink* ToCoreProbeSink(OffscreenCanvas* offscreen_canvas) { - return offscreen_canvas - ? ToCoreProbeSink(offscreen_canvas->GetExecutionContext()) - : nullptr; -} +CoreProbeSink* ToCoreProbeSink(OffscreenCanvas* offscreen_canvas); CORE_EXPORT void AllAsyncTasksCanceled(ExecutionContext*);
diff --git a/third_party/blink/renderer/core/script/detect_javascript_frameworks.cc b/third_party/blink/renderer/core/script/detect_javascript_frameworks.cc index 2b81ab0c..8f3ce57 100644 --- a/third_party/blink/renderer/core/script/detect_javascript_frameworks.cc +++ b/third_party/blink/renderer/core/script/detect_javascript_frameworks.cc
@@ -15,6 +15,8 @@ #include "third_party/blink/renderer/core/dom/element_traversal.h" #include "third_party/blink/renderer/core/frame/local_frame.h" #include "third_party/blink/renderer/core/frame/local_frame_client.h" +#include "third_party/blink/renderer/core/html/html_head_element.h" +#include "third_party/blink/renderer/core/html/html_meta_element.h" #include "third_party/blink/renderer/platform/bindings/v8_binding.h" #include "third_party/blink/renderer/platform/wtf/std_lib_extras.h" #include "third_party/blink/renderer/platform/wtf/text/atomic_string.h" @@ -35,6 +37,8 @@ constexpr char kNuxtjsData[] = "__NUXT__"; constexpr char kSapperData[] = "__SAPPER__"; constexpr char kVuepressData[] = "__VUEPRESS__"; +constexpr char kShopify[] = "Shopify"; +constexpr char kSquarespace[] = "Squarespace"; bool IsFrameworkVariableUsed(v8::Local<v8::Context> context, const String& framework_variable_name) { @@ -148,18 +152,36 @@ // TODO(npm): Add check for window.React.Component, not just window.React. if (IsFrameworkVariableUsed(context, kReactData)) loading_behavior_flag |= kLoadingBehaviorReactFrameworkUsed; + if (IsFrameworkVariableUsed(context, kShopify)) { + loading_behavior_flag |= kLoadingBehaviorShopifyCMSUsed; + } + if (IsFrameworkVariableUsed(context, kSquarespace)) { + loading_behavior_flag |= kLoadingBehaviorSquarespaceCMSUsed; + } } void DidObserveLoadingBehaviors(Document& document, int loading_behavior_flag) { // TODO(npm): ideally we'd be able to surface multiple loading behaviors to // the document loader at once. static constexpr LoadingBehaviorFlag flags[] = { - kLoadingBehaviorAngularFrameworkUsed, kLoadingBehaviorGatsbyFrameworkUsed, - kLoadingBehaviorNextJSFrameworkUsed, kLoadingBehaviorNextJSFrameworkUsed, - kLoadingBehaviorNuxtJSFrameworkUsed, kLoadingBehaviorPreactFrameworkUsed, - kLoadingBehaviorReactFrameworkUsed, kLoadingBehaviorSapperFrameworkUsed, - kLoadingBehaviorSvelteFrameworkUsed, kLoadingBehaviorVueFrameworkUsed, - kLoadingBehaviorVuePressFrameworkUsed}; + kLoadingBehaviorAngularFrameworkUsed, + kLoadingBehaviorGatsbyFrameworkUsed, + kLoadingBehaviorNextJSFrameworkUsed, + kLoadingBehaviorNextJSFrameworkUsed, + kLoadingBehaviorNuxtJSFrameworkUsed, + kLoadingBehaviorPreactFrameworkUsed, + kLoadingBehaviorReactFrameworkUsed, + kLoadingBehaviorSapperFrameworkUsed, + kLoadingBehaviorSvelteFrameworkUsed, + kLoadingBehaviorVueFrameworkUsed, + kLoadingBehaviorVuePressFrameworkUsed, + kLoadingBehaviorDrupalCMSUsed, + kLoadingBehaviorJoomlaCMSUsed, + kLoadingBehaviorShopifyCMSUsed, + kLoadingBehaviorSquarespaceCMSUsed, + kLoadingBehaviorWixCMSUsed, + kLoadingBehaviorWordPressCMSUsed, + }; for (LoadingBehaviorFlag flag : flags) { if (loading_behavior_flag & flag) { document.Loader()->DidObserveLoadingBehavior(flag); @@ -201,7 +223,7 @@ void DetectFrameworkVersions(Document& document, v8::Local<v8::Context> context, v8::Isolate* isolate, - int detected_flags, + int& loading_behavior_flags, const AtomicString& detected_ng_version) { if (!document.UkmRecorder() || document.UkmSourceID() == ukm::kInvalidSourceId) { @@ -233,7 +255,7 @@ return value; }; - if (detected_flags & kLoadingBehaviorNextJSFrameworkUsed) { + if (loading_behavior_flags & kLoadingBehaviorNextJSFrameworkUsed) { static constexpr char kNext[] = "next"; static constexpr char kVersion[] = "version"; v8::Local<v8::Value> version_string = @@ -260,7 +282,7 @@ } } - if (detected_flags & kLoadingBehaviorVueFrameworkUsed) { + if (loading_behavior_flags & kLoadingBehaviorVueFrameworkUsed) { static constexpr char kVue2[] = "Vue"; static constexpr char kVersion[] = "version"; if (global->HasRealNamedProperty(context, V8AtomicString(isolate, kVue2)) @@ -288,6 +310,61 @@ } } + HTMLMetaElement* generator_meta = nullptr; + + for (HTMLMetaElement& meta_element : + Traversal<HTMLMetaElement>::DescendantsOf(*document.head())) { + if (EqualIgnoringASCIICase(meta_element.GetName(), "generator")) { + generator_meta = &meta_element; + break; + } + } + + if (generator_meta) { + const AtomicString& content = generator_meta->Content(); + if (!content.empty()) { + if (content.StartsWith("Wix")) { + loading_behavior_flags |= kLoadingBehaviorWixCMSUsed; + } else if (content.StartsWith("Joomla")) { + loading_behavior_flags |= kLoadingBehaviorJoomlaCMSUsed; + } else { + constexpr char wordpress_prefix[] = "WordPress "; + constexpr size_t wordpress_prefix_length = + std::char_traits<char>::length(wordpress_prefix); + + if (content.StartsWith(wordpress_prefix)) { + String version_string = + String(content).Substring(wordpress_prefix_length); + absl::optional<int64_t> version = ExtractVersion( + version_regexp, context, V8String(isolate, version_string)); + if (version) { + detected = true; + loading_behavior_flags |= kLoadingBehaviorWordPressCMSUsed; + builder.SetWordPressVersion(version.value()); + } + } + + constexpr char drupal_prefix[] = "Drupal "; + constexpr size_t drupal_prefix_length = + std::char_traits<char>::length(drupal_prefix); + + if (content.StartsWith(drupal_prefix)) { + String version_string = + String(content).Substring(drupal_prefix_length); + String trimmed = + version_string.Substring(0, version_string.Find(" ")); + bool ok = true; + int version = trimmed.ToInt(&ok); + if (ok) { + detected = true; + loading_behavior_flags |= kLoadingBehaviorDrupalCMSUsed; + builder.SetDrupalVersion((version & 0xff) << 8); + } + } + } + } + } + if (detected) { builder.Record(document.UkmRecorder()); } @@ -313,9 +390,9 @@ CheckGlobalPropertyMatches(context, isolate, loading_behavior_flag, has_nextjs_id); DCHECK(!try_catch.HasCaught()); - DidObserveLoadingBehaviors(document, loading_behavior_flag); DetectFrameworkVersions(document, context, isolate, loading_behavior_flag, detected_ng_version); + DidObserveLoadingBehaviors(document, loading_behavior_flag); } } // namespace
diff --git a/third_party/blink/renderer/core/scroll/scroll_snapshot_client.cc b/third_party/blink/renderer/core/scroll/scroll_snapshot_client.cc index 867b566..9a85a0d 100644 --- a/third_party/blink/renderer/core/scroll/scroll_snapshot_client.cc +++ b/third_party/blink/renderer/core/scroll/scroll_snapshot_client.cc
@@ -13,13 +13,4 @@ frame->AddScrollSnapshotClient(*this); } -bool ScrollSnapshotClient::ValidateSnapshotIfNeeded() { - bool valid = true; - if (force_validation_ || CheckIfNeedsValidation()) { - valid = ValidateSnapshot(); - } - force_validation_ = false; - return valid; -} - } // namespace blink
diff --git a/third_party/blink/renderer/core/scroll/scroll_snapshot_client.h b/third_party/blink/renderer/core/scroll/scroll_snapshot_client.h index c563a7b..81cdf2d 100644 --- a/third_party/blink/renderer/core/scroll/scroll_snapshot_client.h +++ b/third_party/blink/renderer/core/scroll/scroll_snapshot_client.h
@@ -19,11 +19,15 @@ // update. virtual void UpdateSnapshot() = 0; - // Called for clients marked as needed validation at layout clean and at most - // once per frame to handle changes during style and layout recalc. - // All new clients are marked as needing validation since the initial snapshot - // is tentative. Returns true if the client state is correct, or false - // otherwise. + // Called for all ScrollSnapshotClients once per frame, after layout is + // finished. ValidateSnapshot is an opportunity for the client to update + // its snapshot again in the same frame (taking information from the recently + // finished layout into account). + // + // A return value of 'true' means the snapshot was valid(and therefore not + // updated by this function). A return value of 'false' means the snapshot was + // invalid (and therefore was updated by this function), and that the style + // and layout phases need to run again. virtual bool ValidateSnapshot() = 0; // Compares the last snapshot with the current state, and returns true if a @@ -31,18 +35,6 @@ virtual bool ShouldScheduleNextService() = 0; virtual bool IsAnchorScrollData() const { return false; } - - // Performs a lightweight check at layout clean to determine if the client - // state requires snapshot validation. Called once per animation frame. - // https://github.com/w3c/csswg-drafts/issues/8694 - virtual bool CheckIfNeedsValidation() { return false; } - - // Conditionally performs snapshot validation. Returns true if the client - // state is correct, or false otherwise. - bool ValidateSnapshotIfNeeded(); - - private: - bool force_validation_ = true; }; } // namespace blink
diff --git a/third_party/blink/renderer/core/speculation_rules/OWNERS b/third_party/blink/renderer/core/speculation_rules/OWNERS index 4fee46c..2bd3328c 100644 --- a/third_party/blink/renderer/core/speculation_rules/OWNERS +++ b/third_party/blink/renderer/core/speculation_rules/OWNERS
@@ -1,3 +1,6 @@ adithyas@chromium.org +isaboori@chromium.org jbroman@chromium.org +lingqi@chromium.org mcnee@chromium.org +ryansturm@chromium.org
diff --git a/third_party/blink/renderer/modules/accessibility/ax_object.cc b/third_party/blink/renderer/modules/accessibility/ax_object.cc index 0875a56..532e17d 100644 --- a/third_party/blink/renderer/modules/accessibility/ax_object.cc +++ b/third_party/blink/renderer/modules/accessibility/ax_object.cc
@@ -598,46 +598,6 @@ --number_of_live_ax_objects_; } -void AXObject::SetAncestorsHaveDirtyDescendants() const { - if (!RuntimeEnabledFeatures::AccessibilityEagerAXTreeUpdateEnabled()) { - return; - } - for (auto* obj = CachedParentObject(); obj; obj = obj->CachedParentObject()) { - DCHECK(!obj->IsDetached()); - // We need to to continue setting bits through AX objects for which - // LastKnownIsIncludedInTreeValue is false, since those objects are omitted - // from the generated tree. - if (obj->has_dirty_descendants_ && obj->LastKnownIsIncludedInTreeValue()) { - break; - } - obj->has_dirty_descendants_ = true; - } -#if DCHECK_IS_ON() - // Walk up the tree looking for dirty bits that failed to be set. If any - // are found, this is a bug. - if (!AXObjectCache().UpdatingTree()) { - bool fail = false; - for (auto* obj = CachedParentObject(); obj; - obj = obj->CachedParentObject()) { - if (!obj->has_dirty_descendants_) { - fail = true; - break; - } - } - if (fail) { - LOG(ERROR) << "Failed to set dirty bits on some objects in the ancestor" - "chain. Bits set: "; - for (auto* obj = this; obj; obj = obj->CachedParentObject()) { - LOG(ERROR) << "has_dirty_descendants_: " << obj->has_dirty_descendants_ - << " object: " << obj->AXObjectID() - << " detached: " << obj->IsDetached(); - } - DCHECK(false); - } - } -#endif -} - void AXObject::Init(AXObject* parent) { #if DCHECK_IS_ON() DCHECK(!parent_) << "Should not already have a cached parent:" @@ -733,7 +693,6 @@ parent_ = nullptr; ax_object_cache_ = nullptr; children_dirty_ = false; - has_dirty_descendants_ = false; id_ = 0; } @@ -797,7 +756,6 @@ #endif parent_ = new_parent; - SetAncestorsHaveDirtyDescendants(); } bool AXObject::IsMissingParent() const { @@ -5515,7 +5473,6 @@ return; children_dirty_ = true; ClearChildren(); - SetAncestorsHaveDirtyDescendants(); } // static
diff --git a/third_party/blink/renderer/modules/accessibility/ax_object.h b/third_party/blink/renderer/modules/accessibility/ax_object.h index e6cf2c4b..359ae2e 100644 --- a/third_party/blink/renderer/modules/accessibility/ax_object.h +++ b/third_party/blink/renderer/modules/accessibility/ax_object.h
@@ -293,19 +293,6 @@ // root of the tree. virtual void Init(AXObject* parent); - // TODO(chrishtr): these methods are not really const, but there are various - // other related methods that need const. Review/fix. - - // Sets, clears or queries the has_dirty_descendants_ bit. This dirty - // bit controls whether the object, or a descendant, needs to be visited - // a tree walk to update the AX tree via - // AXObjectCacheImpl::UpdateTreeIfNeeded. It does not directly indicate - // whether children, parent or other pointers are actually out of date; there - // are other dirty bits such as children_dirty_ for that. - void SetAncestorsHaveDirtyDescendants() const; - void ClearHasDirtyDescendants() { has_dirty_descendants_ = false; } - bool HasDirtyDescendants() const { return has_dirty_descendants_; } - // When the corresponding WebCore object that this AXObject // wraps is deleted, it must be detached. virtual void Detach(); @@ -1407,8 +1394,7 @@ mutable Member<AXObject> parent_; // Only children that are included in tree, maybe rename to children_in_tree_. mutable AXObjectVector children_; - mutable bool children_dirty_ = false; - mutable bool has_dirty_descendants_ = false; + mutable bool children_dirty_; // The final role, taking into account the ARIA role and native role. ax::mojom::blink::Role role_;
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 1e24da35..8a66260f 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
@@ -2369,60 +2369,6 @@ relation_cache_->UpdateRelatedTree(optional_node, obj); } -void AXObjectCacheImpl::UpdateTreeIfNeededOnce() { - DCHECK(!updating_tree_); - base::AutoReset<bool> updating(&updating_tree_, true); - HeapDeque<Member<AXObject>> objects_to_process; - objects_to_process.push_back(Root()); - while (!objects_to_process.empty()) { - AXObject* obj = objects_to_process.front(); - objects_to_process.pop_front(); - if (obj->IsDetached()) { - continue; - } - obj->UpdateChildrenIfNecessary(); - if (obj->HasDirtyDescendants()) { - obj->ClearHasDirtyDescendants(); - for (auto& child : obj->ChildrenIncludingIgnored()) { - objects_to_process.push_back(child); - } - } - } -} - -void AXObjectCacheImpl::UpdateTreeIfNeeded() { - if (!RuntimeEnabledFeatures::AccessibilityEagerAXTreeUpdateEnabled()) { - return; - } - UpdateTreeIfNeededOnce(); - // Update a second time because image maps or AX relations may invalidate - // ancestors. See AXNodeObject::AddImageMapChildren or - // AXRelationCache::UpdateRelatedText. - // TODO(chrishtr): find a way to do this without two tree walks. - if (Root()->HasDirtyDescendants() || Root()->NeedsToUpdateChildren()) { - UpdateTreeIfNeededOnce(); - } - -#if EXPENSIVE_DCHECKS_ARE_ON() - HeapDeque<Member<AXObject>> objects_to_process; - objects_to_process.push_back(Root()); - while (!objects_to_process.empty()) { - AXObject* obj = objects_to_process.TakeFirst(); - if (obj->IsDetached()) { - continue; - } - DCHECK(!obj->NeedsToUpdateChildren()) - << "No children in the tree should require an update at this point."; - // Use CachedChildrenIncludingIgnored() so that the DCHECK code paths don't - // end up with a different tree. - DCHECK(!obj->HasDirtyDescendants()) << " " << obj; - for (auto& child : obj->CachedChildrenIncludingIgnored()) { - objects_to_process.push_back(child); - } - } -#endif -} - void AXObjectCacheImpl::ProcessDeferredAccessibilityEvents(Document& document) { if (IsPopup(document)) { // Only process popup document together with main document. @@ -2501,7 +2447,7 @@ relation_cache_->ProcessUpdatesWithCleanLayout(); // Keep going if there are more ids to invalidate or children changes to - // process from previous steps. For example, a display locked + // process from previous steps. For examople, a display locked // (content-visibility:auto) element could be invalidated as it is scrolled // in or out of view, causing Invalidate() to add it to invalidated_ids_. // As ProcessInvalidatedObjects() refreshes the objectt and calls @@ -2513,10 +2459,6 @@ } while (!nodes_with_pending_children_changed_.empty() || !GetInvalidatedIds(document).empty()); - if (RuntimeEnabledFeatures::AccessibilityEagerAXTreeUpdateEnabled()) { - UpdateTreeIfNeeded(); - } - // Send events to RenderAccessibilityImpl, which serializes them and then // sends the serialized events and dirty objects to the browser process. PostNotifications(document); @@ -2535,19 +2477,9 @@ !invalidated_ids_popup_.empty(); } -bool AXObjectCacheImpl::IsDirty() { - if (IsMainDocumentDirty() || IsPopupDocumentDirty() || - relation_cache_->IsDirty()) { - return true; - } - DCHECK(RuntimeEnabledFeatures::AccessibilityEagerAXTreeUpdateEnabled() || - !Root()->HasDirtyDescendants()); - if (RuntimeEnabledFeatures::AccessibilityEagerAXTreeUpdateEnabled()) { - if (Root()->NeedsToUpdateChildren() || Root()->HasDirtyDescendants()) { - return true; - } - } - return false; +bool AXObjectCacheImpl::IsDirty() const { + return IsMainDocumentDirty() || IsPopupDocumentDirty() || + relation_cache_->IsDirty(); } void AXObjectCacheImpl::EmbeddingTokenChanged(HTMLFrameOwnerElement* element) { @@ -3704,9 +3636,6 @@ if (!obj) return; - // TODO(chrishtr): handle |subtree|. - obj->SetAncestorsHaveDirtyDescendants(); - // If the content is inside the popup, mark the owning element dirty. // TODO(aleventhal): not sure why this works, but now that we run a11y in // PostRunLifecycleTasks(), we need this, otherwise the pending updates in
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 0621982..8ea076d 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
@@ -233,7 +233,7 @@ // Called during the accessibility lifecycle to refresh the AX tree. void ProcessDeferredAccessibilityEvents(Document&) override; // Is there work to be done when layout becomes clean? - bool IsDirty() override; + bool IsDirty() const override; // Called when a HTMLFrameOwnerElement (such as an iframe element) changes the // embedding token of its child frame. @@ -513,10 +513,6 @@ void ResetSerializer() override; void MarkElementDirty(const Node*) override; - // Returns true if UpdateTreeIfNeeded has been called and has not yet - /// finished. - bool UpdatingTree() { return updating_tree_; } - protected: void PostPlatformNotification( AXObject* obj, @@ -568,17 +564,6 @@ "blink::WebAXObject"); }; - // Calls UpdateTreeIfNeededOnce if NeedsUpdate is true on the root AXObject, - // and a second time if it is still true. - void UpdateTreeIfNeeded(); - // Updates the AX tree once by walking from the root, calling AXObject:: - // UpdateChildrenIfNecessary on each AXObject for which NeedsUpdate is true. - // This method is part of a11y-during-render, and in particular transitioning - // to an eager (as opposed to lazy) AX tree update pattern. See - // https://bugs.chromium.org/p/chromium/issues/detail?id=1342801#c12 for more - // details. - void UpdateTreeIfNeededOnce(); - // Create an AXObject, and do not check if a previous one exists. // Also, initialize the object and add it to maps for later retrieval. AXObject* CreateAndInit(Node*, @@ -949,7 +934,6 @@ Deque<ui::AXEvent> pending_events_; - bool updating_tree_ = false; // Make sure the next serialization sends everything. bool mark_all_dirty_ = false;
diff --git a/third_party/blink/renderer/modules/exported/web_dom_file_system.cc b/third_party/blink/renderer/modules/exported/web_dom_file_system.cc index 0ac9931..1328159 100644 --- a/third_party/blink/renderer/modules/exported/web_dom_file_system.cc +++ b/third_party/blink/renderer/modules/exported/web_dom_file_system.cc
@@ -48,8 +48,9 @@ namespace blink { WebDOMFileSystem WebDOMFileSystem::FromV8Value(v8::Local<v8::Value> value) { - if (!V8DOMFileSystem::HasInstance(value, v8::Isolate::GetCurrent())) + if (!V8DOMFileSystem::HasInstance(v8::Isolate::GetCurrent(), value)) { return WebDOMFileSystem(); + } v8::Local<v8::Object> object = v8::Local<v8::Object>::Cast(value); DOMFileSystem* dom_file_system = V8DOMFileSystem::ToImpl(object); DCHECK(dom_file_system);
diff --git a/third_party/blink/renderer/modules/exported/web_dom_media_stream_track.cc b/third_party/blink/renderer/modules/exported/web_dom_media_stream_track.cc index 7c396a4..2e708de 100644 --- a/third_party/blink/renderer/modules/exported/web_dom_media_stream_track.cc +++ b/third_party/blink/renderer/modules/exported/web_dom_media_stream_track.cc
@@ -40,7 +40,7 @@ WebDOMMediaStreamTrack WebDOMMediaStreamTrack::FromV8Value( v8::Local<v8::Value> value) { - if (V8MediaStreamTrack::HasInstance(value, v8::Isolate::GetCurrent())) { + if (V8MediaStreamTrack::HasInstance(v8::Isolate::GetCurrent(), value)) { v8::Local<v8::Object> object = v8::Local<v8::Object>::Cast(value); return WebDOMMediaStreamTrack(V8MediaStreamTrack::ToImpl(object)); }
diff --git a/third_party/blink/renderer/modules/peerconnection/peer_connection_tracker.cc b/third_party/blink/renderer/modules/peerconnection/peer_connection_tracker.cc index 5b5f2098..38069dfd 100644 --- a/third_party/blink/renderer/modules/peerconnection/peer_connection_tracker.cc +++ b/third_party/blink/renderer/modules/peerconnection/peer_connection_tracker.cc
@@ -840,6 +840,14 @@ } } +void PeerConnectionTracker::GetCurrentState() { + DCHECK_CALLED_ON_VALID_THREAD(main_thread_); + + for (const auto& pair : peer_connection_local_id_map_) { + pair.key->EmitCurrentStateForTracker(); + } +} + void PeerConnectionTracker::RegisterPeerConnection( RTCPeerConnectionHandler* pc_handler, const webrtc::PeerConnectionInterface::RTCConfiguration& config,
diff --git a/third_party/blink/renderer/modules/peerconnection/peer_connection_tracker.h b/third_party/blink/renderer/modules/peerconnection/peer_connection_tracker.h index bedc7b0..4149aeb 100644 --- a/third_party/blink/renderer/modules/peerconnection/peer_connection_tracker.h +++ b/third_party/blink/renderer/modules/peerconnection/peer_connection_tracker.h
@@ -281,6 +281,7 @@ void StopEventLog(int peer_connection_local_id) override; void GetStandardStats() override; void GetLegacyStats() override; + void GetCurrentState() override; // Called to deliver an update to the host (PeerConnectionTrackerHost). // |local_id| - The id of the registered RTCPeerConnectionHandler.
diff --git a/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection_handler.cc b/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection_handler.cc index e76746e..2b05b13b 100644 --- a/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection_handler.cc +++ b/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection_handler.cc
@@ -1546,6 +1546,54 @@ native_peer_connection_->GetStats(observer.get()); } +void RTCPeerConnectionHandler::EmitCurrentStateForTracker() { + if (!peer_connection_tracker_) { + return; + } + RTC_DCHECK(native_peer_connection_); + const webrtc::SessionDescriptionInterface* local_desc = + native_peer_connection_->local_description(); + // If the local desc is an answer, emit it after the offer. + if (local_desc != nullptr && + local_desc->GetType() == webrtc::SdpType::kOffer) { + std::string local_sdp; + if (local_desc->ToString(&local_sdp)) { + peer_connection_tracker_->TrackSetSessionDescription( + this, String(local_sdp), + String(SdpTypeToString(local_desc->GetType())), + PeerConnectionTracker::kSourceLocal); + } + } + const webrtc::SessionDescriptionInterface* remote_desc = + native_peer_connection_->remote_description(); + if (remote_desc != nullptr) { + std::string remote_sdp; + if (remote_desc->ToString(&remote_sdp)) { + peer_connection_tracker_->TrackSetSessionDescription( + this, String(remote_sdp), + String(SdpTypeToString(remote_desc->GetType())), + PeerConnectionTracker::kSourceRemote); + } + } + + if (local_desc != nullptr && + local_desc->GetType() != webrtc::SdpType::kOffer) { + std::string local_sdp; + if (local_desc->ToString(&local_sdp)) { + peer_connection_tracker_->TrackSetSessionDescription( + this, String(local_sdp), + String(SdpTypeToString(local_desc->GetType())), + PeerConnectionTracker::kSourceLocal); + } + } + peer_connection_tracker_->TrackSignalingStateChange( + this, native_peer_connection_->signaling_state()); + peer_connection_tracker_->TrackIceConnectionStateChange( + this, native_peer_connection_->standardized_ice_connection_state()); + peer_connection_tracker_->TrackConnectionStateChange( + this, native_peer_connection_->peer_connection_state()); +} + void RTCPeerConnectionHandler::GetStats(RTCStatsRequest* request) { DCHECK(task_runner_->RunsTasksInCurrentSequence()); scoped_refptr<LocalRTCStatsRequest> inner_request(
diff --git a/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection_handler.h b/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection_handler.h index cfa4759f..8b3e82e 100644 --- a/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection_handler.h +++ b/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection_handler.h
@@ -248,6 +248,9 @@ webrtc::PeerConnectionInterface::StatsOutputLevel level, rtc::scoped_refptr<webrtc::MediaStreamTrackInterface> selector); + // Allows webrtc-internals to request a brief dump of the current state. + void EmitCurrentStateForTracker(); + // Tells the |client_| to close RTCPeerConnection. // Make it virtual for testing purpose. virtual void CloseClientPeerConnection();
diff --git a/third_party/blink/renderer/modules/service_worker/fetch_respond_with_observer.cc b/third_party/blink/renderer/modules/service_worker/fetch_respond_with_observer.cc index e94e2a2..5bcb9e8 100644 --- a/third_party/blink/renderer/modules/service_worker/fetch_respond_with_observer.cc +++ b/third_party/blink/renderer/modules/service_worker/fetch_respond_with_observer.cc
@@ -251,7 +251,7 @@ const ScriptValue& value, const ExceptionContext& exception_context) { DCHECK(GetExecutionContext()); - if (!V8Response::HasInstance(value.V8Value(), script_state->GetIsolate())) { + if (!V8Response::HasInstance(script_state->GetIsolate(), value.V8Value())) { OnResponseRejected(ServiceWorkerResponseError::kNoV8Instance); return; }
diff --git a/third_party/blink/renderer/modules/webgl/webgl_context_attribute_helpers.cc b/third_party/blink/renderer/modules/webgl/webgl_context_attribute_helpers.cc index 2d7af34..b2e92fb5 100644 --- a/third_party/blink/renderer/modules/webgl/webgl_context_attribute_helpers.cc +++ b/third_party/blink/renderer/modules/webgl/webgl_context_attribute_helpers.cc
@@ -28,8 +28,7 @@ Platform::ContextAttributes ToPlatformContextAttributes( const CanvasContextCreationAttributesCore& attrs, - Platform::ContextType context_type, - bool support_own_offscreen_surface) { + Platform::ContextType context_type) { Platform::ContextAttributes result; result.prefer_low_power_gpu = (PowerPreferenceToGpuPreference(attrs.power_preference) == @@ -37,14 +36,6 @@ result.fail_if_major_performance_caveat = attrs.fail_if_major_performance_caveat; result.context_type = context_type; - if (support_own_offscreen_surface) { - // Only ask for alpha/depth/stencil/antialias if we may be using the default - // framebuffer. They are not needed for standard offscreen rendering. - result.support_alpha = attrs.alpha; - result.support_depth = attrs.depth; - result.support_stencil = attrs.stencil; - result.support_antialias = attrs.antialias; - } return result; }
diff --git a/third_party/blink/renderer/modules/webgl/webgl_context_attribute_helpers.h b/third_party/blink/renderer/modules/webgl/webgl_context_attribute_helpers.h index 4861a67..1a02fe7 100644 --- a/third_party/blink/renderer/modules/webgl/webgl_context_attribute_helpers.h +++ b/third_party/blink/renderer/modules/webgl/webgl_context_attribute_helpers.h
@@ -23,8 +23,7 @@ // Platform API. Platform::ContextAttributes ToPlatformContextAttributes( const CanvasContextCreationAttributesCore&, - Platform::ContextType context_type, - bool support_own_offscreen_surface); + Platform::ContextType context_type); // Turns the powerPreference context creation attribute into the // gl::GpuPreference enum which is sent along with GPU switching
diff --git a/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc b/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc index b4351321..aee6a553 100644 --- a/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc +++ b/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc
@@ -519,15 +519,6 @@ return builder.ToString(); } -bool WebGLRenderingContextBase::SupportOwnOffscreenSurface( - ExecutionContext* execution_context) { - // Using an own offscreen surface disables virtualized contexts, and this - // doesn't currently work properly, see https://crbug.com/691102. - // TODO(https://crbug.com/791755): Remove this function and related code once - // the replacement is ready. - return false; -} - std::unique_ptr<WebGraphicsContext3DProvider> WebGLRenderingContextBase::CreateContextProviderInternal( CanvasRenderingContextHost* host, @@ -538,8 +529,8 @@ ExecutionContext* execution_context = host->GetTopExecutionContext(); DCHECK(execution_context); - Platform::ContextAttributes context_attributes = ToPlatformContextAttributes( - attributes, context_type, SupportOwnOffscreenSurface(execution_context)); + Platform::ContextAttributes context_attributes = + ToPlatformContextAttributes(attributes, context_type); // To run our tests with Chrome rendering on the low power GPU and WebGL on // the high performance GPU, we need to force the power preference attribute. @@ -8592,10 +8583,8 @@ // ensure its resources were freed. DCHECK(!GetDrawingBuffer()); - auto* execution_context = Host()->GetTopExecutionContext(); - Platform::ContextAttributes attributes = ToPlatformContextAttributes( - CreationAttributes(), context_type_, - SupportOwnOffscreenSurface(execution_context)); + Platform::ContextAttributes attributes = + ToPlatformContextAttributes(CreationAttributes(), context_type_); Platform::GraphicsInfo gl_info; const auto& url = Host()->GetExecutionContextUrl();
diff --git a/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.h b/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.h index ddb31ceb..814337c 100644 --- a/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.h +++ b/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.h
@@ -1934,7 +1934,6 @@ const Platform::GraphicsInfo& graphics_info, const CanvasContextCreationAttributesCore&, Platform::ContextType); - static bool SupportOwnOffscreenSurface(ExecutionContext*); static std::unique_ptr<WebGraphicsContext3DProvider> CreateContextProviderInternal(CanvasRenderingContextHost*, const CanvasContextCreationAttributesCore&,
diff --git a/third_party/blink/renderer/platform/bindings/v8_interface_bridge.h b/third_party/blink/renderer/platform/bindings/v8_interface_bridge.h index b6b31bf..9c60bfde 100644 --- a/third_party/blink/renderer/platform/bindings/v8_interface_bridge.h +++ b/third_party/blink/renderer/platform/bindings/v8_interface_bridge.h
@@ -31,11 +31,6 @@ V8T::GetWrapperTypeInfo(), value); } - // Migration adapter - static bool HasInstance(v8::Local<v8::Value> value, v8::Isolate* isolate) { - return HasInstance(isolate, value); - } - static T* ToImpl(v8::Local<v8::Object> value) { return ToWrappableUnsafe(value); }
diff --git a/third_party/blink/renderer/platform/fonts/font_size_adjust.cc b/third_party/blink/renderer/platform/fonts/font_size_adjust.cc index cbac0d5b8..597d2ea 100644 --- a/third_party/blink/renderer/platform/fonts/font_size_adjust.cc +++ b/third_party/blink/renderer/platform/fonts/font_size_adjust.cc
@@ -11,7 +11,7 @@ unsigned FontSizeAdjust::GetHash() const { unsigned computed_hash = 0; // Normalize negative zero. - WTF::AddFloatToHash(computed_hash, value_); + WTF::AddFloatToHash(computed_hash, value_ == 0.0 ? 0.0 : value_); WTF::AddIntToHash(computed_hash, static_cast<const unsigned>(metric_)); return computed_hash; }
diff --git a/third_party/blink/renderer/platform/geometry/math_functions.h b/third_party/blink/renderer/platform/geometry/math_functions.h index f8628a91..d379a7c 100644 --- a/third_party/blink/renderer/platform/geometry/math_functions.h +++ b/third_party/blink/renderer/platform/geometry/math_functions.h
@@ -143,27 +143,35 @@ if (std::isinf(b) && std::signbit(a) != std::signbit(b)) { return std::numeric_limits<ValueType>::quiet_NaN(); } - if ((a < 0.0) == (b < 0.0)) { - // If both arguments are positive or both are negative: - // the value of the function is equal to the value of A - // shifted by the integer multiple of B that brings - // the value between zero and B. - return std::fmod(a, b); - } else { - // If the A value and the B step are on opposite sides of zero: - // mod() (short for “modulus”) continues to choose the integer - // multiple of B that puts the value between zero and B, - // as above (guaranteeing that the result will either be zero - // or share the sign of B, not A) - // For example, mod(-18px, 5px) resolves to the value 2px: - // adding 5px * 4 to -18px yields 2px, which is between 0px and 5px. - // On the other hand, rem(-18px, 5px) resolves to the value -3px: - // adding 5px * 3 to -18px yields -3px, - // which has the same sign as -18px but is between 0px and -5px. - return std::remainder(a, b); + // If both arguments are positive or both are negative: + // the value of the function is equal to the value of A + // shifted by the integer multiple of B that brings + // the value between zero and B. + // If the A value and the B step are on opposite sides of zero: + // mod() (short for “modulus”) continues to choose the integer + // multiple of B that puts the value between zero and B. + // std::fmod - the returned value has the same sign as A + // and is less than B in magnitude. + ValueType result = std::fmod(a, b); + // If the result is on opposite side of zero from B, + // put it between 0 and B. As the result of std::fmod is less + // than B in magnitude, adding B would perform a correct shift. + if (std::signbit(result) != std::signbit(b)) { + result += b; } + return result; } case OperatorType::kRem: { + // If both arguments are positive or both are negative: + // the value of the function is equal to the value of A + // shifted by the integer multiple of B that brings + // the value between zero and B. + // If the A value and the B step are on opposite sides of zero: + // rem() (short for "remainder") chooses the integer multiple of B + // that puts the value between zero and -B, + // avoiding changing the sign of the value. + // std::fmod - the returned value has the same sign as A + // and is less than B in magnitude. return std::fmod(a, b); } default:
diff --git a/third_party/blink/renderer/platform/graphics/canvas_resource_provider.cc b/third_party/blink/renderer/platform/graphics/canvas_resource_provider.cc index 2653bd5a..298e8411 100644 --- a/third_party/blink/renderer/platform/graphics/canvas_resource_provider.cc +++ b/third_party/blink/renderer/platform/graphics/canvas_resource_provider.cc
@@ -183,8 +183,8 @@ private: scoped_refptr<CanvasResource> CreateResource() final { SkImageInfo info = GetSkImageInfo(); - if (!IsBitmapFormatSupported( - viz::SkColorTypeToResourceFormat(info.colorType()))) { + if (!viz::SkColorTypeToSinglePlaneSharedImageFormat(info.colorType()) + .IsBitmapFormatSupported()) { // If the rendering format is not supported, downgrade to 8-bits. // TODO(junov): Should we try 12-12-12-12 and 10-10-10-2? info = info.makeColorType(kN32_SkColorType);
diff --git a/third_party/blink/renderer/platform/loader/fetch/resource_timing_utils.cc b/third_party/blink/renderer/platform/loader/fetch/resource_timing_utils.cc index 29ea11dd..e19c8d0b 100644 --- a/third_party/blink/renderer/platform/loader/fetch/resource_timing_utils.cc +++ b/third_party/blink/renderer/platform/loader/fetch/resource_timing_utils.cc
@@ -92,7 +92,7 @@ if (allow_response_details) { info->response_status = response->HttpStatusCode(); if (!response->HttpContentType().IsNull()) { - info->content_type = response->HttpContentType(); + info->content_type = MinimizedMIMEType(response->HttpContentType()); } }
diff --git a/third_party/blink/renderer/platform/network/http_parsers.cc b/third_party/blink/renderer/platform/network/http_parsers.cc index 3c93a03..4026754 100644 --- a/third_party/blink/renderer/platform/network/http_parsers.cc +++ b/third_party/blink/renderer/platform/network/http_parsers.cc
@@ -50,6 +50,7 @@ #include "services/network/public/mojom/supports_loading_mode.mojom-blink.h" #include "services/network/public/mojom/timing_allow_origin.mojom-blink.h" #include "third_party/abseil-cpp/absl/types/optional.h" +#include "third_party/blink/public/common/mime_util/mime_util.h" #include "third_party/blink/public/platform/web_string.h" #include "third_party/blink/renderer/platform/loader/fetch/resource_response.h" #include "third_party/blink/renderer/platform/network/header_field_tokenizer.h" @@ -525,6 +526,31 @@ media_type.GetString().Substring(type_start, type_end - type_start)); } +// https://mimesniff.spec.whatwg.org/#minimize-a-supported-mime-type +AtomicString MinimizedMIMEType(const AtomicString& mime_type) { + if (blink::IsSupportedJavascriptMimeType(mime_type.GetString().Utf8())) { + return AtomicString("text/javascript"); + } + + if (blink::IsJSONMimeType(mime_type.GetString().Utf8())) { + return AtomicString("application/json"); + } + + if (blink::IsSVGMimeType(mime_type.GetString().Utf8())) { + return AtomicString("image/svg+xml"); + } + + if (blink::IsXMLMimeType(mime_type.GetString().Utf8())) { + return AtomicString("application/xml"); + } + + if (blink::IsSupportedMimeType(mime_type.GetString().Utf8())) { + return mime_type; + } + + return AtomicString(""); +} + ContentTypeOptionsDisposition ParseContentTypeOptionsHeader( const String& value) { if (value.empty())
diff --git a/third_party/blink/renderer/platform/network/http_parsers.h b/third_party/blink/renderer/platform/network/http_parsers.h index 64f742f..c94434d 100644 --- a/third_party/blink/renderer/platform/network/http_parsers.h +++ b/third_party/blink/renderer/platform/network/http_parsers.h
@@ -111,6 +111,8 @@ // are trimmed. PLATFORM_EXPORT AtomicString ExtractMIMETypeFromMediaType(const AtomicString&); +PLATFORM_EXPORT AtomicString MinimizedMIMEType(const AtomicString&); + PLATFORM_EXPORT CacheControlHeader ParseCacheControlDirectives(const AtomicString& cache_control_header, const AtomicString& pragma_header);
diff --git a/third_party/blink/renderer/platform/network/http_parsers_test.cc b/third_party/blink/renderer/platform/network/http_parsers_test.cc index 24417e5..ef18a7e 100644 --- a/third_party/blink/renderer/platform/network/http_parsers_test.cc +++ b/third_party/blink/renderer/platform/network/http_parsers_test.cc
@@ -209,6 +209,16 @@ EXPECT_EQ(text_html.Impl(), passthrough.Impl()); } +TEST(HTTPParsersTest, MinimizedMIMEType) { + EXPECT_EQ("text/javascript", + MinimizedMIMEType(AtomicString("application/javascript"))); + EXPECT_EQ("application/json", MinimizedMIMEType(AtomicString("text/json"))); + EXPECT_EQ("image/svg+xml", MinimizedMIMEType(AtomicString("image/svg+xml"))); + EXPECT_EQ("application/xml", + MinimizedMIMEType(AtomicString("application/rss+xml"))); + EXPECT_EQ("image/png", MinimizedMIMEType(AtomicString("image/png"))); +} + TEST(HTTPParsersTest, ExtractMIMETypeFromMediaTypeInvalidInput) { // extractMIMETypeFromMediaType() returns the string before the first // semicolon after trimming OWSes at the head and the tail even if the
diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5 index 59bced2..76d4361 100644 --- a/third_party/blink/renderer/platform/runtime_enabled_features.json5 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
@@ -252,10 +252,6 @@ base_feature: "none", }, { - name: "AccessibilityEagerAXTreeUpdate", - status: "stable", - }, - { name: "AccessibilityExposeDisplayNone", status: "test", base_feature: "none", @@ -679,7 +675,7 @@ // blink::features::kComputePressure is a kill switch for the API. If the // feature is disabled, origin trial tokens are ignored. name: "ComputePressure", - origin_trial_feature_name: "ComputePressure", + origin_trial_feature_name: "ComputePressure_v2", status: "experimental", base_feature_status: "enabled", copied_from_base_feature_if: "overridden",
diff --git a/third_party/blink/renderer/platform/wtf/allocator/partitions.cc b/third_party/blink/renderer/platform/wtf/allocator/partitions.cc index 09c2949..671b2a9 100644 --- a/third_party/blink/renderer/platform/wtf/allocator/partitions.cc +++ b/third_party/blink/renderer/platform/wtf/allocator/partitions.cc
@@ -134,14 +134,12 @@ #endif static base::NoDestructor<partition_alloc::PartitionAllocator> fast_malloc_allocator{}; - fast_malloc_allocator->init({ - partition_alloc::PartitionOptions::AlignedAlloc::kDisallowed, - thread_cache, - partition_alloc::PartitionOptions::Quarantine::kAllowed, - partition_alloc::PartitionOptions::Cookie::kAllowed, - brp_setting, - brp_zapping_setting, - partition_alloc::PartitionOptions::UseConfigurablePool::kNo, + fast_malloc_allocator->init(partition_alloc::PartitionOptions{ + .thread_cache = thread_cache, + .quarantine = partition_alloc::PartitionOptions::Quarantine::kAllowed, + .cookie = partition_alloc::PartitionOptions::Cookie::kAllowed, + .backup_ref_ptr = brp_setting, + .backup_ref_ptr_zapping = brp_zapping_setting, }); fast_malloc_root_ = fast_malloc_allocator->root(); } @@ -150,14 +148,11 @@ static base::NoDestructor<partition_alloc::PartitionAllocator> buffer_allocator{}; - buffer_allocator->init({ - partition_alloc::PartitionOptions::AlignedAlloc::kDisallowed, - partition_alloc::PartitionOptions::ThreadCache::kDisabled, - partition_alloc::PartitionOptions::Quarantine::kAllowed, - partition_alloc::PartitionOptions::Cookie::kAllowed, - brp_setting, - brp_zapping_setting, - partition_alloc::PartitionOptions::UseConfigurablePool::kNo, + buffer_allocator->init(partition_alloc::PartitionOptions{ + .quarantine = partition_alloc::PartitionOptions::Quarantine::kAllowed, + .cookie = partition_alloc::PartitionOptions::Cookie::kAllowed, + .backup_ref_ptr = brp_setting, + .backup_ref_ptr_zapping = brp_zapping_setting, }); buffer_root_ = buffer_allocator->root(); @@ -197,20 +192,19 @@ // BackupRefPtr disallowed because it will prevent allocations from being 16B // aligned as required by ArrayBufferContents. - array_buffer_allocator->init({ - partition_alloc::PartitionOptions::AlignedAlloc::kDisallowed, - partition_alloc::PartitionOptions::ThreadCache::kDisabled, - partition_alloc::PartitionOptions::Quarantine::kAllowed, - partition_alloc::PartitionOptions::Cookie::kAllowed, - partition_alloc::PartitionOptions::BackupRefPtr::kDisabled, - partition_alloc::PartitionOptions::BackupRefPtrZapping::kDisabled, + array_buffer_allocator->init(partition_alloc::PartitionOptions{ + .quarantine = partition_alloc::PartitionOptions::Quarantine::kAllowed, + .cookie = partition_alloc::PartitionOptions::Cookie::kAllowed, + .backup_ref_ptr = + partition_alloc::PartitionOptions::BackupRefPtr::kDisabled, // When the V8 virtual memory cage is enabled, the ArrayBuffer partition // must be placed inside of it. For that, PA's ConfigurablePool is // created inside the V8 Cage during initialization. As such, here all we // need to do is indicate that we'd like to use that Pool if it has been // created by now (if it hasn't been created, the cage isn't enabled, and // so we'll use the default Pool). - partition_alloc::PartitionOptions::UseConfigurablePool::kIfAvailable, + .use_configurable_pool = + partition_alloc::PartitionOptions::UseConfigurablePool::kIfAvailable, }); array_buffer_root_ = array_buffer_allocator->root();
diff --git a/third_party/blink/web_tests/animations/responsive/interpolation/font-size-adjust-responsive-expected.txt b/third_party/blink/web_tests/animations/responsive/interpolation/font-size-adjust-responsive-expected.txt new file mode 100644 index 0000000..cb407c80 --- /dev/null +++ b/third_party/blink/web_tests/animations/responsive/interpolation/font-size-adjust-responsive-expected.txt
@@ -0,0 +1,460 @@ +CONSOLE WARNING: Invalid keyframe value for property fontSizeAdjust: ic-height 1.0 +CONSOLE WARNING: Invalid keyframe value for property fontSizeAdjust: ic-height 1.0 +CONSOLE WARNING: Invalid keyframe value for property fontSizeAdjust: ic-height 1.0 +CONSOLE WARNING: Invalid keyframe value for property fontSizeAdjust: ic-height 1.0 +CONSOLE WARNING: Invalid keyframe value for property fontSizeAdjust: ic-height 1.0 +CONSOLE WARNING: Invalid keyframe value for property fontSizeAdjust: ic-height 1.0 +CONSOLE WARNING: Invalid keyframe value for property fontSizeAdjust: ic-height 1.0 +CONSOLE WARNING: Invalid keyframe value for property fontSizeAdjust: ic-height 1.0 +CONSOLE WARNING: Invalid keyframe value for property fontSizeAdjust: ic-height 1.0 +CONSOLE WARNING: Invalid keyframe value for property fontSizeAdjust: ic-height 1.0 +CONSOLE WARNING: Invalid keyframe value for property fontSizeAdjust: ic-height 1.0 +CONSOLE WARNING: Invalid keyframe value for property fontSizeAdjust: ic-height 1.0 +CONSOLE WARNING: Invalid keyframe value for property fontSizeAdjust: ic-height 1.0 +CONSOLE WARNING: Invalid keyframe value for property fontSizeAdjust: ic-height 1.0 +CONSOLE WARNING: Invalid keyframe value for property fontSizeAdjust: ic-height 1.0 +CONSOLE WARNING: Invalid keyframe value for property fontSizeAdjust: ic-height 1.0 +CONSOLE WARNING: Invalid keyframe value for property fontSizeAdjust: ic-height 1.0 +CONSOLE WARNING: Invalid keyframe value for property fontSizeAdjust: ic-height 1.0 +CONSOLE WARNING: Invalid keyframe value for property fontSizeAdjust: ic-height 1.0 +CONSOLE WARNING: Invalid keyframe value for property fontSizeAdjust: ic-height 1.0 +CONSOLE WARNING: Invalid keyframe value for property fontSizeAdjust: ic-height 1.0 +CONSOLE WARNING: Invalid keyframe value for property fontSizeAdjust: ic-height 1.0 +CONSOLE WARNING: Invalid keyframe value for property fontSizeAdjust: ic-height 1.0 +CONSOLE WARNING: Invalid keyframe value for property fontSizeAdjust: ic-height 1.0 +This is a testharness.js-based test. +PASS This test uses responsive-test.js. +PASS font-size-adjust interpolation responds to changes in inherited value +PASS font-size-adjust interpolation responds to changes in inherited value 1 +PASS font-size-adjust interpolation responds to changes in inherited value 2 +PASS font-size-adjust interpolation responds to changes in inherited value 3 +PASS font-size-adjust interpolation responds to changes in inherited value 4 +PASS font-size-adjust interpolation responds to changes in inherited value 5 +PASS font-size-adjust interpolation responds to changes in inherited value 6 +PASS font-size-adjust interpolation responds to changes in inherited value 7 +PASS font-size-adjust interpolation responds to changes in inherited value 8 +PASS font-size-adjust interpolation responds to changes in inherited value 9 +PASS font-size-adjust interpolation responds to changes in inherited value 10 +PASS font-size-adjust interpolation responds to changes in inherited value 11 +PASS font-size-adjust interpolation responds to changes in inherited value 12 +PASS font-size-adjust interpolation responds to changes in inherited value 13 +PASS font-size-adjust interpolation responds to changes in inherited value 14 +PASS font-size-adjust interpolation responds to changes in inherited value 15 +PASS font-size-adjust interpolation responds to changes in inherited value 16 +PASS font-size-adjust interpolation responds to changes in inherited value 17 +PASS font-size-adjust interpolation responds to changes in inherited value 18 +PASS font-size-adjust interpolation responds to changes in inherited value 19 +PASS font-size-adjust interpolation responds to changes in inherited value 20 +PASS font-size-adjust interpolation responds to changes in inherited value 21 +PASS font-size-adjust interpolation responds to changes in inherited value 22 +PASS font-size-adjust interpolation responds to changes in inherited value 23 +PASS font-size-adjust interpolation responds to changes in inherited value 24 +PASS font-size-adjust interpolation responds to changes in inherited value 25 +PASS font-size-adjust interpolation responds to changes in inherited value 26 +PASS font-size-adjust interpolation responds to changes in inherited value 27 +PASS font-size-adjust interpolation responds to changes in inherited value 28 +PASS font-size-adjust interpolation responds to changes in inherited value 29 +PASS font-size-adjust interpolation responds to changes in inherited value 30 +PASS font-size-adjust interpolation responds to changes in inherited value 31 +PASS font-size-adjust interpolation responds to changes in inherited value 32 +PASS font-size-adjust interpolation responds to changes in inherited value 33 +PASS font-size-adjust interpolation responds to changes in inherited value 34 +PASS font-size-adjust interpolation responds to changes in inherited value 35 +PASS font-size-adjust interpolation responds to changes in inherited value 36 +PASS font-size-adjust interpolation responds to changes in inherited value 37 +PASS font-size-adjust interpolation responds to changes in inherited value 38 +PASS font-size-adjust interpolation responds to changes in inherited value 39 +PASS font-size-adjust interpolation responds to changes in inherited value 40 +PASS font-size-adjust interpolation responds to changes in inherited value 41 +PASS font-size-adjust interpolation responds to changes in inherited value 42 +PASS font-size-adjust interpolation responds to changes in inherited value 43 +PASS font-size-adjust interpolation responds to changes in inherited value 44 +PASS font-size-adjust interpolation responds to changes in inherited value 45 +PASS font-size-adjust interpolation responds to changes in inherited value 46 +PASS font-size-adjust interpolation responds to changes in inherited value 47 +PASS font-size-adjust interpolation responds to changes in inherited value 48 +PASS font-size-adjust interpolation responds to changes in inherited value 49 +PASS font-size-adjust interpolation responds to changes in inherited value 50 +PASS font-size-adjust interpolation responds to changes in inherited value 51 +PASS font-size-adjust interpolation responds to changes in inherited value 52 +PASS font-size-adjust interpolation responds to changes in inherited value 53 +PASS font-size-adjust interpolation responds to changes in inherited value 54 +PASS font-size-adjust interpolation responds to changes in inherited value 55 +PASS font-size-adjust interpolation responds to changes in inherited value 56 +PASS font-size-adjust interpolation responds to changes in inherited value 57 +PASS font-size-adjust interpolation responds to changes in inherited value 58 +PASS font-size-adjust interpolation responds to changes in inherited value 59 +FAIL font-size-adjust interpolation responds to changes in inherited value 60 assert_true: CSS.supports font-size-adjust ic-height 0.0 expected true got false +FAIL font-size-adjust interpolation responds to changes in inherited value 61 assert_true: CSS.supports font-size-adjust ic-height 0.0 expected true got false +FAIL font-size-adjust interpolation responds to changes in inherited value 62 assert_true: CSS.supports font-size-adjust ic-height 0.5 expected true got false +FAIL font-size-adjust interpolation responds to changes in inherited value 63 assert_true: CSS.supports font-size-adjust ic-height 0.5 expected true got false +FAIL font-size-adjust interpolation responds to changes in inherited value 64 assert_true: CSS.supports font-size-adjust ic-height 2.0 expected true got false +FAIL font-size-adjust interpolation responds to changes in inherited value 65 assert_true: CSS.supports font-size-adjust ic-height 2.0 expected true got false +FAIL font-size-adjust interpolation responds to changes in inherited value 66 assert_true: CSS.supports font-size-adjust ic-height 0.0 expected true got false +FAIL font-size-adjust interpolation responds to changes in inherited value 67 assert_true: CSS.supports font-size-adjust ic-height 0.0 expected true got false +FAIL font-size-adjust interpolation responds to changes in inherited value 68 assert_true: CSS.supports font-size-adjust ic-height 0.5 expected true got false +FAIL font-size-adjust interpolation responds to changes in inherited value 69 assert_true: CSS.supports font-size-adjust ic-height 0.5 expected true got false +FAIL font-size-adjust interpolation responds to changes in inherited value 70 assert_true: CSS.supports font-size-adjust ic-height 2.0 expected true got false +FAIL font-size-adjust interpolation responds to changes in inherited value 71 assert_true: CSS.supports font-size-adjust ic-height 2.0 expected true got false +PASS font-size-adjust interpolation responds to changes in inherited value 72 +PASS font-size-adjust interpolation responds to changes in inherited value 73 +PASS font-size-adjust interpolation responds to changes in inherited value 74 +PASS font-size-adjust interpolation responds to changes in inherited value 75 +PASS font-size-adjust interpolation responds to changes in inherited value 76 +PASS font-size-adjust interpolation responds to changes in inherited value 77 +PASS font-size-adjust interpolation responds to changes in inherited value 78 +PASS font-size-adjust interpolation responds to changes in inherited value 79 +PASS font-size-adjust interpolation responds to changes in inherited value 80 +PASS font-size-adjust interpolation responds to changes in inherited value 81 +PASS font-size-adjust interpolation responds to changes in inherited value 82 +PASS font-size-adjust interpolation responds to changes in inherited value 83 +PASS font-size-adjust interpolation responds to changes in inherited value 84 +PASS font-size-adjust interpolation responds to changes in inherited value 85 +PASS font-size-adjust interpolation responds to changes in inherited value 86 +PASS font-size-adjust interpolation responds to changes in inherited value 87 +PASS font-size-adjust interpolation responds to changes in inherited value 88 +PASS font-size-adjust interpolation responds to changes in inherited value 89 +PASS font-size-adjust interpolation responds to changes in inherited value 90 +PASS font-size-adjust interpolation responds to changes in inherited value 91 +PASS font-size-adjust interpolation responds to changes in inherited value 92 +PASS font-size-adjust interpolation responds to changes in inherited value 93 +PASS font-size-adjust interpolation responds to changes in inherited value 94 +PASS font-size-adjust interpolation responds to changes in inherited value 95 +PASS font-size-adjust interpolation responds to changes in inherited value 96 +PASS font-size-adjust interpolation responds to changes in inherited value 97 +PASS font-size-adjust interpolation responds to changes in inherited value 98 +PASS font-size-adjust interpolation responds to changes in inherited value 99 +PASS font-size-adjust interpolation responds to changes in inherited value 100 +PASS font-size-adjust interpolation responds to changes in inherited value 101 +PASS font-size-adjust interpolation responds to changes in inherited value 102 +PASS font-size-adjust interpolation responds to changes in inherited value 103 +PASS font-size-adjust interpolation responds to changes in inherited value 104 +PASS font-size-adjust interpolation responds to changes in inherited value 105 +PASS font-size-adjust interpolation responds to changes in inherited value 106 +PASS font-size-adjust interpolation responds to changes in inherited value 107 +PASS font-size-adjust interpolation responds to changes in inherited value 108 +PASS font-size-adjust interpolation responds to changes in inherited value 109 +PASS font-size-adjust interpolation responds to changes in inherited value 110 +PASS font-size-adjust interpolation responds to changes in inherited value 111 +PASS font-size-adjust interpolation responds to changes in inherited value 112 +PASS font-size-adjust interpolation responds to changes in inherited value 113 +PASS font-size-adjust interpolation responds to changes in inherited value 114 +PASS font-size-adjust interpolation responds to changes in inherited value 115 +PASS font-size-adjust interpolation responds to changes in inherited value 116 +PASS font-size-adjust interpolation responds to changes in inherited value 117 +PASS font-size-adjust interpolation responds to changes in inherited value 118 +PASS font-size-adjust interpolation responds to changes in inherited value 119 +PASS font-size-adjust interpolation responds to changes in inherited value 120 +PASS font-size-adjust interpolation responds to changes in inherited value 121 +PASS font-size-adjust interpolation responds to changes in inherited value 122 +PASS font-size-adjust interpolation responds to changes in inherited value 123 +PASS font-size-adjust interpolation responds to changes in inherited value 124 +PASS font-size-adjust interpolation responds to changes in inherited value 125 +PASS font-size-adjust interpolation responds to changes in inherited value 126 +PASS font-size-adjust interpolation responds to changes in inherited value 127 +PASS font-size-adjust interpolation responds to changes in inherited value 128 +PASS font-size-adjust interpolation responds to changes in inherited value 129 +PASS font-size-adjust interpolation responds to changes in inherited value 130 +PASS font-size-adjust interpolation responds to changes in inherited value 131 +FAIL font-size-adjust interpolation responds to changes in inherited value 132 assert_true: CSS.supports font-size-adjust ic-height 0.5 expected true got false +FAIL font-size-adjust interpolation responds to changes in inherited value 133 assert_true: CSS.supports font-size-adjust ic-height 2.0 expected true got false +FAIL font-size-adjust interpolation responds to changes in inherited value 134 assert_true: CSS.supports font-size-adjust ic-height 0.0 expected true got false +FAIL font-size-adjust interpolation responds to changes in inherited value 135 assert_true: CSS.supports font-size-adjust ic-height 2.0 expected true got false +FAIL font-size-adjust interpolation responds to changes in inherited value 136 assert_true: CSS.supports font-size-adjust ic-height 0.0 expected true got false +FAIL font-size-adjust interpolation responds to changes in inherited value 137 assert_true: CSS.supports font-size-adjust ic-height 0.5 expected true got false +FAIL font-size-adjust interpolation responds to changes in inherited value 138 assert_true: CSS.supports font-size-adjust ic-height 0.5 expected true got false +FAIL font-size-adjust interpolation responds to changes in inherited value 139 assert_true: CSS.supports font-size-adjust ic-height 2.0 expected true got false +FAIL font-size-adjust interpolation responds to changes in inherited value 140 assert_true: CSS.supports font-size-adjust ic-height 0.0 expected true got false +FAIL font-size-adjust interpolation responds to changes in inherited value 141 assert_true: CSS.supports font-size-adjust ic-height 2.0 expected true got false +FAIL font-size-adjust interpolation responds to changes in inherited value 142 assert_true: CSS.supports font-size-adjust ic-height 0.0 expected true got false +FAIL font-size-adjust interpolation responds to changes in inherited value 143 assert_true: CSS.supports font-size-adjust ic-height 0.5 expected true got false +PASS font-size-adjust interpolation responds to changes in inherited value 144 +PASS Animation on property <fontSizeAdjust> from [inherit] to [1.0] with {"inherited":"0.0"} changed to {"inherited":"0.5"} at (0.25) is [0.625] +PASS font-size-adjust interpolation responds to changes in inherited value 145 +PASS Animation on property <fontSizeAdjust> from [inherit] to [1.0] with {"inherited":"0.0"} changed to {"inherited":"0.5"} at (0.75) is [0.875] +PASS font-size-adjust interpolation responds to changes in inherited value 146 +PASS Animation on property <fontSizeAdjust> from [inherit] to [1.0] with {"inherited":"0.0"} changed to {"inherited":"2.0"} at (0.25) is [1.75] +PASS font-size-adjust interpolation responds to changes in inherited value 147 +PASS Animation on property <fontSizeAdjust> from [inherit] to [1.0] with {"inherited":"0.0"} changed to {"inherited":"2.0"} at (0.75) is [1.25] +PASS font-size-adjust interpolation responds to changes in inherited value 148 +PASS Animation on property <fontSizeAdjust> from [inherit] to [1.0] with {"inherited":"0.5"} changed to {"inherited":"0.0"} at (0.25) is [0.25] +PASS font-size-adjust interpolation responds to changes in inherited value 149 +PASS Animation on property <fontSizeAdjust> from [inherit] to [1.0] with {"inherited":"0.5"} changed to {"inherited":"0.0"} at (0.75) is [0.75] +PASS font-size-adjust interpolation responds to changes in inherited value 150 +PASS Animation on property <fontSizeAdjust> from [inherit] to [1.0] with {"inherited":"0.5"} changed to {"inherited":"2.0"} at (0.25) is [1.75] +PASS font-size-adjust interpolation responds to changes in inherited value 151 +PASS Animation on property <fontSizeAdjust> from [inherit] to [1.0] with {"inherited":"0.5"} changed to {"inherited":"2.0"} at (0.75) is [1.25] +PASS font-size-adjust interpolation responds to changes in inherited value 152 +PASS Animation on property <fontSizeAdjust> from [inherit] to [1.0] with {"inherited":"2.0"} changed to {"inherited":"0.0"} at (0.25) is [0.25] +PASS font-size-adjust interpolation responds to changes in inherited value 153 +PASS Animation on property <fontSizeAdjust> from [inherit] to [1.0] with {"inherited":"2.0"} changed to {"inherited":"0.0"} at (0.75) is [0.75] +PASS font-size-adjust interpolation responds to changes in inherited value 154 +PASS Animation on property <fontSizeAdjust> from [inherit] to [1.0] with {"inherited":"2.0"} changed to {"inherited":"0.5"} at (0.25) is [0.625] +PASS font-size-adjust interpolation responds to changes in inherited value 155 +PASS Animation on property <fontSizeAdjust> from [inherit] to [1.0] with {"inherited":"2.0"} changed to {"inherited":"0.5"} at (0.75) is [0.875] +PASS font-size-adjust interpolation responds to changes in inherited value 156 +PASS Animation on property <fontSizeAdjust> from [1.0] to [inherit] with {"inherited":"0.0"} changed to {"inherited":"0.5"} at (0.25) is [0.875] +PASS font-size-adjust interpolation responds to changes in inherited value 157 +PASS Animation on property <fontSizeAdjust> from [1.0] to [inherit] with {"inherited":"0.0"} changed to {"inherited":"0.5"} at (0.75) is [0.625] +PASS font-size-adjust interpolation responds to changes in inherited value 158 +PASS Animation on property <fontSizeAdjust> from [1.0] to [inherit] with {"inherited":"0.0"} changed to {"inherited":"2.0"} at (0.25) is [1.25] +PASS font-size-adjust interpolation responds to changes in inherited value 159 +PASS Animation on property <fontSizeAdjust> from [1.0] to [inherit] with {"inherited":"0.0"} changed to {"inherited":"2.0"} at (0.75) is [1.75] +PASS font-size-adjust interpolation responds to changes in inherited value 160 +PASS Animation on property <fontSizeAdjust> from [1.0] to [inherit] with {"inherited":"0.5"} changed to {"inherited":"0.0"} at (0.25) is [0.75] +PASS font-size-adjust interpolation responds to changes in inherited value 161 +PASS Animation on property <fontSizeAdjust> from [1.0] to [inherit] with {"inherited":"0.5"} changed to {"inherited":"0.0"} at (0.75) is [0.25] +PASS font-size-adjust interpolation responds to changes in inherited value 162 +PASS Animation on property <fontSizeAdjust> from [1.0] to [inherit] with {"inherited":"0.5"} changed to {"inherited":"2.0"} at (0.25) is [1.25] +PASS font-size-adjust interpolation responds to changes in inherited value 163 +PASS Animation on property <fontSizeAdjust> from [1.0] to [inherit] with {"inherited":"0.5"} changed to {"inherited":"2.0"} at (0.75) is [1.75] +PASS font-size-adjust interpolation responds to changes in inherited value 164 +PASS Animation on property <fontSizeAdjust> from [1.0] to [inherit] with {"inherited":"2.0"} changed to {"inherited":"0.0"} at (0.25) is [0.75] +PASS font-size-adjust interpolation responds to changes in inherited value 165 +PASS Animation on property <fontSizeAdjust> from [1.0] to [inherit] with {"inherited":"2.0"} changed to {"inherited":"0.0"} at (0.75) is [0.25] +PASS font-size-adjust interpolation responds to changes in inherited value 166 +PASS Animation on property <fontSizeAdjust> from [1.0] to [inherit] with {"inherited":"2.0"} changed to {"inherited":"0.5"} at (0.25) is [0.875] +PASS font-size-adjust interpolation responds to changes in inherited value 167 +PASS Animation on property <fontSizeAdjust> from [1.0] to [inherit] with {"inherited":"2.0"} changed to {"inherited":"0.5"} at (0.75) is [0.625] +PASS font-size-adjust interpolation responds to changes in inherited value 168 +PASS Animation on property <fontSizeAdjust> from [inherit] to [ex-height 1.0] with {"inherited":"ex-height 0.0"} changed to {"inherited":"ex-height 0.5"} at (0.25) is [0.625] +PASS font-size-adjust interpolation responds to changes in inherited value 169 +PASS Animation on property <fontSizeAdjust> from [inherit] to [ex-height 1.0] with {"inherited":"ex-height 0.0"} changed to {"inherited":"ex-height 0.5"} at (0.75) is [0.875] +PASS font-size-adjust interpolation responds to changes in inherited value 170 +PASS Animation on property <fontSizeAdjust> from [inherit] to [ex-height 1.0] with {"inherited":"ex-height 0.0"} changed to {"inherited":"ex-height 2.0"} at (0.25) is [1.75] +PASS font-size-adjust interpolation responds to changes in inherited value 171 +PASS Animation on property <fontSizeAdjust> from [inherit] to [ex-height 1.0] with {"inherited":"ex-height 0.0"} changed to {"inherited":"ex-height 2.0"} at (0.75) is [1.25] +PASS font-size-adjust interpolation responds to changes in inherited value 172 +PASS Animation on property <fontSizeAdjust> from [inherit] to [ex-height 1.0] with {"inherited":"ex-height 0.5"} changed to {"inherited":"ex-height 0.0"} at (0.25) is [0.25] +PASS font-size-adjust interpolation responds to changes in inherited value 173 +PASS Animation on property <fontSizeAdjust> from [inherit] to [ex-height 1.0] with {"inherited":"ex-height 0.5"} changed to {"inherited":"ex-height 0.0"} at (0.75) is [0.75] +PASS font-size-adjust interpolation responds to changes in inherited value 174 +PASS Animation on property <fontSizeAdjust> from [inherit] to [ex-height 1.0] with {"inherited":"ex-height 0.5"} changed to {"inherited":"ex-height 2.0"} at (0.25) is [1.75] +PASS font-size-adjust interpolation responds to changes in inherited value 175 +PASS Animation on property <fontSizeAdjust> from [inherit] to [ex-height 1.0] with {"inherited":"ex-height 0.5"} changed to {"inherited":"ex-height 2.0"} at (0.75) is [1.25] +PASS font-size-adjust interpolation responds to changes in inherited value 176 +PASS Animation on property <fontSizeAdjust> from [inherit] to [ex-height 1.0] with {"inherited":"ex-height 2.0"} changed to {"inherited":"ex-height 0.0"} at (0.25) is [0.25] +PASS font-size-adjust interpolation responds to changes in inherited value 177 +PASS Animation on property <fontSizeAdjust> from [inherit] to [ex-height 1.0] with {"inherited":"ex-height 2.0"} changed to {"inherited":"ex-height 0.0"} at (0.75) is [0.75] +PASS font-size-adjust interpolation responds to changes in inherited value 178 +PASS Animation on property <fontSizeAdjust> from [inherit] to [ex-height 1.0] with {"inherited":"ex-height 2.0"} changed to {"inherited":"ex-height 0.5"} at (0.25) is [0.625] +PASS font-size-adjust interpolation responds to changes in inherited value 179 +PASS Animation on property <fontSizeAdjust> from [inherit] to [ex-height 1.0] with {"inherited":"ex-height 2.0"} changed to {"inherited":"ex-height 0.5"} at (0.75) is [0.875] +PASS font-size-adjust interpolation responds to changes in inherited value 180 +PASS Animation on property <fontSizeAdjust> from [ex-height 1.0] to [inherit] with {"inherited":"ex-height 0.0"} changed to {"inherited":"ex-height 0.5"} at (0.25) is [0.875] +PASS font-size-adjust interpolation responds to changes in inherited value 181 +PASS Animation on property <fontSizeAdjust> from [ex-height 1.0] to [inherit] with {"inherited":"ex-height 0.0"} changed to {"inherited":"ex-height 0.5"} at (0.75) is [0.625] +PASS font-size-adjust interpolation responds to changes in inherited value 182 +PASS Animation on property <fontSizeAdjust> from [ex-height 1.0] to [inherit] with {"inherited":"ex-height 0.0"} changed to {"inherited":"ex-height 2.0"} at (0.25) is [1.25] +PASS font-size-adjust interpolation responds to changes in inherited value 183 +PASS Animation on property <fontSizeAdjust> from [ex-height 1.0] to [inherit] with {"inherited":"ex-height 0.0"} changed to {"inherited":"ex-height 2.0"} at (0.75) is [1.75] +PASS font-size-adjust interpolation responds to changes in inherited value 184 +PASS Animation on property <fontSizeAdjust> from [ex-height 1.0] to [inherit] with {"inherited":"ex-height 0.5"} changed to {"inherited":"ex-height 0.0"} at (0.25) is [0.75] +PASS font-size-adjust interpolation responds to changes in inherited value 185 +PASS Animation on property <fontSizeAdjust> from [ex-height 1.0] to [inherit] with {"inherited":"ex-height 0.5"} changed to {"inherited":"ex-height 0.0"} at (0.75) is [0.25] +PASS font-size-adjust interpolation responds to changes in inherited value 186 +PASS Animation on property <fontSizeAdjust> from [ex-height 1.0] to [inherit] with {"inherited":"ex-height 0.5"} changed to {"inherited":"ex-height 2.0"} at (0.25) is [1.25] +PASS font-size-adjust interpolation responds to changes in inherited value 187 +PASS Animation on property <fontSizeAdjust> from [ex-height 1.0] to [inherit] with {"inherited":"ex-height 0.5"} changed to {"inherited":"ex-height 2.0"} at (0.75) is [1.75] +PASS font-size-adjust interpolation responds to changes in inherited value 188 +PASS Animation on property <fontSizeAdjust> from [ex-height 1.0] to [inherit] with {"inherited":"ex-height 2.0"} changed to {"inherited":"ex-height 0.0"} at (0.25) is [0.75] +PASS font-size-adjust interpolation responds to changes in inherited value 189 +PASS Animation on property <fontSizeAdjust> from [ex-height 1.0] to [inherit] with {"inherited":"ex-height 2.0"} changed to {"inherited":"ex-height 0.0"} at (0.75) is [0.25] +PASS font-size-adjust interpolation responds to changes in inherited value 190 +PASS Animation on property <fontSizeAdjust> from [ex-height 1.0] to [inherit] with {"inherited":"ex-height 2.0"} changed to {"inherited":"ex-height 0.5"} at (0.25) is [0.875] +PASS font-size-adjust interpolation responds to changes in inherited value 191 +PASS Animation on property <fontSizeAdjust> from [ex-height 1.0] to [inherit] with {"inherited":"ex-height 2.0"} changed to {"inherited":"ex-height 0.5"} at (0.75) is [0.625] +PASS font-size-adjust interpolation responds to changes in inherited value 192 +PASS Animation on property <fontSizeAdjust> from [inherit] to [cap-height 1.0] with {"inherited":"cap-height 0.0"} changed to {"inherited":"cap-height 0.5"} at (0.25) is [cap-height 0.625] +PASS font-size-adjust interpolation responds to changes in inherited value 193 +PASS Animation on property <fontSizeAdjust> from [inherit] to [cap-height 1.0] with {"inherited":"cap-height 0.0"} changed to {"inherited":"cap-height 0.5"} at (0.75) is [cap-height 0.875] +PASS font-size-adjust interpolation responds to changes in inherited value 194 +PASS Animation on property <fontSizeAdjust> from [inherit] to [cap-height 1.0] with {"inherited":"cap-height 0.0"} changed to {"inherited":"cap-height 2.0"} at (0.25) is [cap-height 1.75] +PASS font-size-adjust interpolation responds to changes in inherited value 195 +PASS Animation on property <fontSizeAdjust> from [inherit] to [cap-height 1.0] with {"inherited":"cap-height 0.0"} changed to {"inherited":"cap-height 2.0"} at (0.75) is [cap-height 1.25] +PASS font-size-adjust interpolation responds to changes in inherited value 196 +PASS Animation on property <fontSizeAdjust> from [inherit] to [cap-height 1.0] with {"inherited":"cap-height 0.5"} changed to {"inherited":"cap-height 0.0"} at (0.25) is [cap-height 0.25] +PASS font-size-adjust interpolation responds to changes in inherited value 197 +PASS Animation on property <fontSizeAdjust> from [inherit] to [cap-height 1.0] with {"inherited":"cap-height 0.5"} changed to {"inherited":"cap-height 0.0"} at (0.75) is [cap-height 0.75] +PASS font-size-adjust interpolation responds to changes in inherited value 198 +PASS Animation on property <fontSizeAdjust> from [inherit] to [cap-height 1.0] with {"inherited":"cap-height 0.5"} changed to {"inherited":"cap-height 2.0"} at (0.25) is [cap-height 1.75] +PASS font-size-adjust interpolation responds to changes in inherited value 199 +PASS Animation on property <fontSizeAdjust> from [inherit] to [cap-height 1.0] with {"inherited":"cap-height 0.5"} changed to {"inherited":"cap-height 2.0"} at (0.75) is [cap-height 1.25] +PASS font-size-adjust interpolation responds to changes in inherited value 200 +PASS Animation on property <fontSizeAdjust> from [inherit] to [cap-height 1.0] with {"inherited":"cap-height 2.0"} changed to {"inherited":"cap-height 0.0"} at (0.25) is [cap-height 0.25] +PASS font-size-adjust interpolation responds to changes in inherited value 201 +PASS Animation on property <fontSizeAdjust> from [inherit] to [cap-height 1.0] with {"inherited":"cap-height 2.0"} changed to {"inherited":"cap-height 0.0"} at (0.75) is [cap-height 0.75] +PASS font-size-adjust interpolation responds to changes in inherited value 202 +PASS Animation on property <fontSizeAdjust> from [inherit] to [cap-height 1.0] with {"inherited":"cap-height 2.0"} changed to {"inherited":"cap-height 0.5"} at (0.25) is [cap-height 0.625] +PASS font-size-adjust interpolation responds to changes in inherited value 203 +PASS Animation on property <fontSizeAdjust> from [inherit] to [cap-height 1.0] with {"inherited":"cap-height 2.0"} changed to {"inherited":"cap-height 0.5"} at (0.75) is [cap-height 0.875] +PASS font-size-adjust interpolation responds to changes in inherited value 204 +PASS Animation on property <fontSizeAdjust> from [cap-height 1.0] to [inherit] with {"inherited":"cap-height 0.0"} changed to {"inherited":"cap-height 0.5"} at (0.25) is [cap-height 0.875] +PASS font-size-adjust interpolation responds to changes in inherited value 205 +PASS Animation on property <fontSizeAdjust> from [cap-height 1.0] to [inherit] with {"inherited":"cap-height 0.0"} changed to {"inherited":"cap-height 0.5"} at (0.75) is [cap-height 0.625] +PASS font-size-adjust interpolation responds to changes in inherited value 206 +PASS Animation on property <fontSizeAdjust> from [cap-height 1.0] to [inherit] with {"inherited":"cap-height 0.0"} changed to {"inherited":"cap-height 2.0"} at (0.25) is [cap-height 1.25] +PASS font-size-adjust interpolation responds to changes in inherited value 207 +PASS Animation on property <fontSizeAdjust> from [cap-height 1.0] to [inherit] with {"inherited":"cap-height 0.0"} changed to {"inherited":"cap-height 2.0"} at (0.75) is [cap-height 1.75] +PASS font-size-adjust interpolation responds to changes in inherited value 208 +PASS Animation on property <fontSizeAdjust> from [cap-height 1.0] to [inherit] with {"inherited":"cap-height 0.5"} changed to {"inherited":"cap-height 0.0"} at (0.25) is [cap-height 0.75] +PASS font-size-adjust interpolation responds to changes in inherited value 209 +PASS Animation on property <fontSizeAdjust> from [cap-height 1.0] to [inherit] with {"inherited":"cap-height 0.5"} changed to {"inherited":"cap-height 0.0"} at (0.75) is [cap-height 0.25] +PASS font-size-adjust interpolation responds to changes in inherited value 210 +PASS Animation on property <fontSizeAdjust> from [cap-height 1.0] to [inherit] with {"inherited":"cap-height 0.5"} changed to {"inherited":"cap-height 2.0"} at (0.25) is [cap-height 1.25] +PASS font-size-adjust interpolation responds to changes in inherited value 211 +PASS Animation on property <fontSizeAdjust> from [cap-height 1.0] to [inherit] with {"inherited":"cap-height 0.5"} changed to {"inherited":"cap-height 2.0"} at (0.75) is [cap-height 1.75] +PASS font-size-adjust interpolation responds to changes in inherited value 212 +PASS Animation on property <fontSizeAdjust> from [cap-height 1.0] to [inherit] with {"inherited":"cap-height 2.0"} changed to {"inherited":"cap-height 0.0"} at (0.25) is [cap-height 0.75] +PASS font-size-adjust interpolation responds to changes in inherited value 213 +PASS Animation on property <fontSizeAdjust> from [cap-height 1.0] to [inherit] with {"inherited":"cap-height 2.0"} changed to {"inherited":"cap-height 0.0"} at (0.75) is [cap-height 0.25] +PASS font-size-adjust interpolation responds to changes in inherited value 214 +PASS Animation on property <fontSizeAdjust> from [cap-height 1.0] to [inherit] with {"inherited":"cap-height 2.0"} changed to {"inherited":"cap-height 0.5"} at (0.25) is [cap-height 0.875] +PASS font-size-adjust interpolation responds to changes in inherited value 215 +PASS Animation on property <fontSizeAdjust> from [cap-height 1.0] to [inherit] with {"inherited":"cap-height 2.0"} changed to {"inherited":"cap-height 0.5"} at (0.75) is [cap-height 0.625] +PASS font-size-adjust interpolation responds to changes in inherited value 216 +PASS Animation on property <fontSizeAdjust> from [inherit] to [ch-width 1.0] with {"inherited":"ch-width 0.0"} changed to {"inherited":"ch-width 0.5"} at (0.25) is [ch-width 0.625] +PASS font-size-adjust interpolation responds to changes in inherited value 217 +PASS Animation on property <fontSizeAdjust> from [inherit] to [ch-width 1.0] with {"inherited":"ch-width 0.0"} changed to {"inherited":"ch-width 0.5"} at (0.75) is [ch-width 0.875] +PASS font-size-adjust interpolation responds to changes in inherited value 218 +PASS Animation on property <fontSizeAdjust> from [inherit] to [ch-width 1.0] with {"inherited":"ch-width 0.0"} changed to {"inherited":"ch-width 2.0"} at (0.25) is [ch-width 1.75] +PASS font-size-adjust interpolation responds to changes in inherited value 219 +PASS Animation on property <fontSizeAdjust> from [inherit] to [ch-width 1.0] with {"inherited":"ch-width 0.0"} changed to {"inherited":"ch-width 2.0"} at (0.75) is [ch-width 1.25] +PASS font-size-adjust interpolation responds to changes in inherited value 220 +PASS Animation on property <fontSizeAdjust> from [inherit] to [ch-width 1.0] with {"inherited":"ch-width 0.5"} changed to {"inherited":"ch-width 0.0"} at (0.25) is [ch-width 0.25] +PASS font-size-adjust interpolation responds to changes in inherited value 221 +PASS Animation on property <fontSizeAdjust> from [inherit] to [ch-width 1.0] with {"inherited":"ch-width 0.5"} changed to {"inherited":"ch-width 0.0"} at (0.75) is [ch-width 0.75] +PASS font-size-adjust interpolation responds to changes in inherited value 222 +PASS Animation on property <fontSizeAdjust> from [inherit] to [ch-width 1.0] with {"inherited":"ch-width 0.5"} changed to {"inherited":"ch-width 2.0"} at (0.25) is [ch-width 1.75] +PASS font-size-adjust interpolation responds to changes in inherited value 223 +PASS Animation on property <fontSizeAdjust> from [inherit] to [ch-width 1.0] with {"inherited":"ch-width 0.5"} changed to {"inherited":"ch-width 2.0"} at (0.75) is [ch-width 1.25] +PASS font-size-adjust interpolation responds to changes in inherited value 224 +PASS Animation on property <fontSizeAdjust> from [inherit] to [ch-width 1.0] with {"inherited":"ch-width 2.0"} changed to {"inherited":"ch-width 0.0"} at (0.25) is [ch-width 0.25] +PASS font-size-adjust interpolation responds to changes in inherited value 225 +PASS Animation on property <fontSizeAdjust> from [inherit] to [ch-width 1.0] with {"inherited":"ch-width 2.0"} changed to {"inherited":"ch-width 0.0"} at (0.75) is [ch-width 0.75] +PASS font-size-adjust interpolation responds to changes in inherited value 226 +PASS Animation on property <fontSizeAdjust> from [inherit] to [ch-width 1.0] with {"inherited":"ch-width 2.0"} changed to {"inherited":"ch-width 0.5"} at (0.25) is [ch-width 0.625] +PASS font-size-adjust interpolation responds to changes in inherited value 227 +PASS Animation on property <fontSizeAdjust> from [inherit] to [ch-width 1.0] with {"inherited":"ch-width 2.0"} changed to {"inherited":"ch-width 0.5"} at (0.75) is [ch-width 0.875] +PASS font-size-adjust interpolation responds to changes in inherited value 228 +PASS Animation on property <fontSizeAdjust> from [ch-width 1.0] to [inherit] with {"inherited":"ch-width 0.0"} changed to {"inherited":"ch-width 0.5"} at (0.25) is [ch-width 0.875] +PASS font-size-adjust interpolation responds to changes in inherited value 229 +PASS Animation on property <fontSizeAdjust> from [ch-width 1.0] to [inherit] with {"inherited":"ch-width 0.0"} changed to {"inherited":"ch-width 0.5"} at (0.75) is [ch-width 0.625] +PASS font-size-adjust interpolation responds to changes in inherited value 230 +PASS Animation on property <fontSizeAdjust> from [ch-width 1.0] to [inherit] with {"inherited":"ch-width 0.0"} changed to {"inherited":"ch-width 2.0"} at (0.25) is [ch-width 1.25] +PASS font-size-adjust interpolation responds to changes in inherited value 231 +PASS Animation on property <fontSizeAdjust> from [ch-width 1.0] to [inherit] with {"inherited":"ch-width 0.0"} changed to {"inherited":"ch-width 2.0"} at (0.75) is [ch-width 1.75] +PASS font-size-adjust interpolation responds to changes in inherited value 232 +PASS Animation on property <fontSizeAdjust> from [ch-width 1.0] to [inherit] with {"inherited":"ch-width 0.5"} changed to {"inherited":"ch-width 0.0"} at (0.25) is [ch-width 0.75] +PASS font-size-adjust interpolation responds to changes in inherited value 233 +PASS Animation on property <fontSizeAdjust> from [ch-width 1.0] to [inherit] with {"inherited":"ch-width 0.5"} changed to {"inherited":"ch-width 0.0"} at (0.75) is [ch-width 0.25] +PASS font-size-adjust interpolation responds to changes in inherited value 234 +PASS Animation on property <fontSizeAdjust> from [ch-width 1.0] to [inherit] with {"inherited":"ch-width 0.5"} changed to {"inherited":"ch-width 2.0"} at (0.25) is [ch-width 1.25] +PASS font-size-adjust interpolation responds to changes in inherited value 235 +PASS Animation on property <fontSizeAdjust> from [ch-width 1.0] to [inherit] with {"inherited":"ch-width 0.5"} changed to {"inherited":"ch-width 2.0"} at (0.75) is [ch-width 1.75] +PASS font-size-adjust interpolation responds to changes in inherited value 236 +PASS Animation on property <fontSizeAdjust> from [ch-width 1.0] to [inherit] with {"inherited":"ch-width 2.0"} changed to {"inherited":"ch-width 0.0"} at (0.25) is [ch-width 0.75] +PASS font-size-adjust interpolation responds to changes in inherited value 237 +PASS Animation on property <fontSizeAdjust> from [ch-width 1.0] to [inherit] with {"inherited":"ch-width 2.0"} changed to {"inherited":"ch-width 0.0"} at (0.75) is [ch-width 0.25] +PASS font-size-adjust interpolation responds to changes in inherited value 238 +PASS Animation on property <fontSizeAdjust> from [ch-width 1.0] to [inherit] with {"inherited":"ch-width 2.0"} changed to {"inherited":"ch-width 0.5"} at (0.25) is [ch-width 0.875] +PASS font-size-adjust interpolation responds to changes in inherited value 239 +PASS Animation on property <fontSizeAdjust> from [ch-width 1.0] to [inherit] with {"inherited":"ch-width 2.0"} changed to {"inherited":"ch-width 0.5"} at (0.75) is [ch-width 0.625] +PASS font-size-adjust interpolation responds to changes in inherited value 240 +PASS Animation on property <fontSizeAdjust> from [inherit] to [ic-width 1.0] with {"inherited":"ic-width 0.0"} changed to {"inherited":"ic-width 0.5"} at (0.25) is [ic-width 0.625] +PASS font-size-adjust interpolation responds to changes in inherited value 241 +PASS Animation on property <fontSizeAdjust> from [inherit] to [ic-width 1.0] with {"inherited":"ic-width 0.0"} changed to {"inherited":"ic-width 0.5"} at (0.75) is [ic-width 0.875] +PASS font-size-adjust interpolation responds to changes in inherited value 242 +PASS Animation on property <fontSizeAdjust> from [inherit] to [ic-width 1.0] with {"inherited":"ic-width 0.0"} changed to {"inherited":"ic-width 2.0"} at (0.25) is [ic-width 1.75] +PASS font-size-adjust interpolation responds to changes in inherited value 243 +PASS Animation on property <fontSizeAdjust> from [inherit] to [ic-width 1.0] with {"inherited":"ic-width 0.0"} changed to {"inherited":"ic-width 2.0"} at (0.75) is [ic-width 1.25] +PASS font-size-adjust interpolation responds to changes in inherited value 244 +PASS Animation on property <fontSizeAdjust> from [inherit] to [ic-width 1.0] with {"inherited":"ic-width 0.5"} changed to {"inherited":"ic-width 0.0"} at (0.25) is [ic-width 0.25] +PASS font-size-adjust interpolation responds to changes in inherited value 245 +PASS Animation on property <fontSizeAdjust> from [inherit] to [ic-width 1.0] with {"inherited":"ic-width 0.5"} changed to {"inherited":"ic-width 0.0"} at (0.75) is [ic-width 0.75] +PASS font-size-adjust interpolation responds to changes in inherited value 246 +PASS Animation on property <fontSizeAdjust> from [inherit] to [ic-width 1.0] with {"inherited":"ic-width 0.5"} changed to {"inherited":"ic-width 2.0"} at (0.25) is [ic-width 1.75] +PASS font-size-adjust interpolation responds to changes in inherited value 247 +PASS Animation on property <fontSizeAdjust> from [inherit] to [ic-width 1.0] with {"inherited":"ic-width 0.5"} changed to {"inherited":"ic-width 2.0"} at (0.75) is [ic-width 1.25] +PASS font-size-adjust interpolation responds to changes in inherited value 248 +PASS Animation on property <fontSizeAdjust> from [inherit] to [ic-width 1.0] with {"inherited":"ic-width 2.0"} changed to {"inherited":"ic-width 0.0"} at (0.25) is [ic-width 0.25] +PASS font-size-adjust interpolation responds to changes in inherited value 249 +PASS Animation on property <fontSizeAdjust> from [inherit] to [ic-width 1.0] with {"inherited":"ic-width 2.0"} changed to {"inherited":"ic-width 0.0"} at (0.75) is [ic-width 0.75] +PASS font-size-adjust interpolation responds to changes in inherited value 250 +PASS Animation on property <fontSizeAdjust> from [inherit] to [ic-width 1.0] with {"inherited":"ic-width 2.0"} changed to {"inherited":"ic-width 0.5"} at (0.25) is [ic-width 0.625] +PASS font-size-adjust interpolation responds to changes in inherited value 251 +PASS Animation on property <fontSizeAdjust> from [inherit] to [ic-width 1.0] with {"inherited":"ic-width 2.0"} changed to {"inherited":"ic-width 0.5"} at (0.75) is [ic-width 0.875] +PASS font-size-adjust interpolation responds to changes in inherited value 252 +PASS Animation on property <fontSizeAdjust> from [ic-width 1.0] to [inherit] with {"inherited":"ic-width 0.0"} changed to {"inherited":"ic-width 0.5"} at (0.25) is [ic-width 0.875] +PASS font-size-adjust interpolation responds to changes in inherited value 253 +PASS Animation on property <fontSizeAdjust> from [ic-width 1.0] to [inherit] with {"inherited":"ic-width 0.0"} changed to {"inherited":"ic-width 0.5"} at (0.75) is [ic-width 0.625] +PASS font-size-adjust interpolation responds to changes in inherited value 254 +PASS Animation on property <fontSizeAdjust> from [ic-width 1.0] to [inherit] with {"inherited":"ic-width 0.0"} changed to {"inherited":"ic-width 2.0"} at (0.25) is [ic-width 1.25] +PASS font-size-adjust interpolation responds to changes in inherited value 255 +PASS Animation on property <fontSizeAdjust> from [ic-width 1.0] to [inherit] with {"inherited":"ic-width 0.0"} changed to {"inherited":"ic-width 2.0"} at (0.75) is [ic-width 1.75] +PASS font-size-adjust interpolation responds to changes in inherited value 256 +PASS Animation on property <fontSizeAdjust> from [ic-width 1.0] to [inherit] with {"inherited":"ic-width 0.5"} changed to {"inherited":"ic-width 0.0"} at (0.25) is [ic-width 0.75] +PASS font-size-adjust interpolation responds to changes in inherited value 257 +PASS Animation on property <fontSizeAdjust> from [ic-width 1.0] to [inherit] with {"inherited":"ic-width 0.5"} changed to {"inherited":"ic-width 0.0"} at (0.75) is [ic-width 0.25] +PASS font-size-adjust interpolation responds to changes in inherited value 258 +PASS Animation on property <fontSizeAdjust> from [ic-width 1.0] to [inherit] with {"inherited":"ic-width 0.5"} changed to {"inherited":"ic-width 2.0"} at (0.25) is [ic-width 1.25] +PASS font-size-adjust interpolation responds to changes in inherited value 259 +PASS Animation on property <fontSizeAdjust> from [ic-width 1.0] to [inherit] with {"inherited":"ic-width 0.5"} changed to {"inherited":"ic-width 2.0"} at (0.75) is [ic-width 1.75] +PASS font-size-adjust interpolation responds to changes in inherited value 260 +PASS Animation on property <fontSizeAdjust> from [ic-width 1.0] to [inherit] with {"inherited":"ic-width 2.0"} changed to {"inherited":"ic-width 0.0"} at (0.25) is [ic-width 0.75] +PASS font-size-adjust interpolation responds to changes in inherited value 261 +PASS Animation on property <fontSizeAdjust> from [ic-width 1.0] to [inherit] with {"inherited":"ic-width 2.0"} changed to {"inherited":"ic-width 0.0"} at (0.75) is [ic-width 0.25] +PASS font-size-adjust interpolation responds to changes in inherited value 262 +PASS Animation on property <fontSizeAdjust> from [ic-width 1.0] to [inherit] with {"inherited":"ic-width 2.0"} changed to {"inherited":"ic-width 0.5"} at (0.25) is [ic-width 0.875] +PASS font-size-adjust interpolation responds to changes in inherited value 263 +PASS Animation on property <fontSizeAdjust> from [ic-width 1.0] to [inherit] with {"inherited":"ic-width 2.0"} changed to {"inherited":"ic-width 0.5"} at (0.75) is [ic-width 0.625] +FAIL font-size-adjust interpolation responds to changes in inherited value 264 assert_true: CSS.supports font-size-adjust ic-height 0.625 expected true got false +PASS Animation on property <fontSizeAdjust> from [inherit] to [ic-height 1.0] with {"inherited":"ic-height 0.0"} changed to {"inherited":"ic-height 0.5"} at (0.25) is [ic-height 0.625] +FAIL font-size-adjust interpolation responds to changes in inherited value 265 assert_true: CSS.supports font-size-adjust ic-height 0.875 expected true got false +PASS Animation on property <fontSizeAdjust> from [inherit] to [ic-height 1.0] with {"inherited":"ic-height 0.0"} changed to {"inherited":"ic-height 0.5"} at (0.75) is [ic-height 0.875] +FAIL font-size-adjust interpolation responds to changes in inherited value 266 assert_true: CSS.supports font-size-adjust ic-height 1.75 expected true got false +PASS Animation on property <fontSizeAdjust> from [inherit] to [ic-height 1.0] with {"inherited":"ic-height 0.0"} changed to {"inherited":"ic-height 2.0"} at (0.25) is [ic-height 1.75] +FAIL font-size-adjust interpolation responds to changes in inherited value 267 assert_true: CSS.supports font-size-adjust ic-height 1.25 expected true got false +PASS Animation on property <fontSizeAdjust> from [inherit] to [ic-height 1.0] with {"inherited":"ic-height 0.0"} changed to {"inherited":"ic-height 2.0"} at (0.75) is [ic-height 1.25] +FAIL font-size-adjust interpolation responds to changes in inherited value 268 assert_true: CSS.supports font-size-adjust ic-height 0.25 expected true got false +PASS Animation on property <fontSizeAdjust> from [inherit] to [ic-height 1.0] with {"inherited":"ic-height 0.5"} changed to {"inherited":"ic-height 0.0"} at (0.25) is [ic-height 0.25] +FAIL font-size-adjust interpolation responds to changes in inherited value 269 assert_true: CSS.supports font-size-adjust ic-height 0.75 expected true got false +PASS Animation on property <fontSizeAdjust> from [inherit] to [ic-height 1.0] with {"inherited":"ic-height 0.5"} changed to {"inherited":"ic-height 0.0"} at (0.75) is [ic-height 0.75] +FAIL font-size-adjust interpolation responds to changes in inherited value 270 assert_true: CSS.supports font-size-adjust ic-height 1.75 expected true got false +PASS Animation on property <fontSizeAdjust> from [inherit] to [ic-height 1.0] with {"inherited":"ic-height 0.5"} changed to {"inherited":"ic-height 2.0"} at (0.25) is [ic-height 1.75] +FAIL font-size-adjust interpolation responds to changes in inherited value 271 assert_true: CSS.supports font-size-adjust ic-height 1.25 expected true got false +PASS Animation on property <fontSizeAdjust> from [inherit] to [ic-height 1.0] with {"inherited":"ic-height 0.5"} changed to {"inherited":"ic-height 2.0"} at (0.75) is [ic-height 1.25] +FAIL font-size-adjust interpolation responds to changes in inherited value 272 assert_true: CSS.supports font-size-adjust ic-height 0.25 expected true got false +PASS Animation on property <fontSizeAdjust> from [inherit] to [ic-height 1.0] with {"inherited":"ic-height 2.0"} changed to {"inherited":"ic-height 0.0"} at (0.25) is [ic-height 0.25] +FAIL font-size-adjust interpolation responds to changes in inherited value 273 assert_true: CSS.supports font-size-adjust ic-height 0.75 expected true got false +PASS Animation on property <fontSizeAdjust> from [inherit] to [ic-height 1.0] with {"inherited":"ic-height 2.0"} changed to {"inherited":"ic-height 0.0"} at (0.75) is [ic-height 0.75] +FAIL font-size-adjust interpolation responds to changes in inherited value 274 assert_true: CSS.supports font-size-adjust ic-height 0.625 expected true got false +PASS Animation on property <fontSizeAdjust> from [inherit] to [ic-height 1.0] with {"inherited":"ic-height 2.0"} changed to {"inherited":"ic-height 0.5"} at (0.25) is [ic-height 0.625] +FAIL font-size-adjust interpolation responds to changes in inherited value 275 assert_true: CSS.supports font-size-adjust ic-height 0.875 expected true got false +PASS Animation on property <fontSizeAdjust> from [inherit] to [ic-height 1.0] with {"inherited":"ic-height 2.0"} changed to {"inherited":"ic-height 0.5"} at (0.75) is [ic-height 0.875] +FAIL font-size-adjust interpolation responds to changes in inherited value 276 assert_true: CSS.supports font-size-adjust ic-height 0.875 expected true got false +PASS Animation on property <fontSizeAdjust> from [ic-height 1.0] to [inherit] with {"inherited":"ic-height 0.0"} changed to {"inherited":"ic-height 0.5"} at (0.25) is [ic-height 0.875] +FAIL font-size-adjust interpolation responds to changes in inherited value 277 assert_true: CSS.supports font-size-adjust ic-height 0.625 expected true got false +PASS Animation on property <fontSizeAdjust> from [ic-height 1.0] to [inherit] with {"inherited":"ic-height 0.0"} changed to {"inherited":"ic-height 0.5"} at (0.75) is [ic-height 0.625] +FAIL font-size-adjust interpolation responds to changes in inherited value 278 assert_true: CSS.supports font-size-adjust ic-height 1.25 expected true got false +PASS Animation on property <fontSizeAdjust> from [ic-height 1.0] to [inherit] with {"inherited":"ic-height 0.0"} changed to {"inherited":"ic-height 2.0"} at (0.25) is [ic-height 1.25] +FAIL font-size-adjust interpolation responds to changes in inherited value 279 assert_true: CSS.supports font-size-adjust ic-height 1.75 expected true got false +PASS Animation on property <fontSizeAdjust> from [ic-height 1.0] to [inherit] with {"inherited":"ic-height 0.0"} changed to {"inherited":"ic-height 2.0"} at (0.75) is [ic-height 1.75] +FAIL font-size-adjust interpolation responds to changes in inherited value 280 assert_true: CSS.supports font-size-adjust ic-height 0.75 expected true got false +PASS Animation on property <fontSizeAdjust> from [ic-height 1.0] to [inherit] with {"inherited":"ic-height 0.5"} changed to {"inherited":"ic-height 0.0"} at (0.25) is [ic-height 0.75] +FAIL font-size-adjust interpolation responds to changes in inherited value 281 assert_true: CSS.supports font-size-adjust ic-height 0.25 expected true got false +PASS Animation on property <fontSizeAdjust> from [ic-height 1.0] to [inherit] with {"inherited":"ic-height 0.5"} changed to {"inherited":"ic-height 0.0"} at (0.75) is [ic-height 0.25] +FAIL font-size-adjust interpolation responds to changes in inherited value 282 assert_true: CSS.supports font-size-adjust ic-height 1.25 expected true got false +PASS Animation on property <fontSizeAdjust> from [ic-height 1.0] to [inherit] with {"inherited":"ic-height 0.5"} changed to {"inherited":"ic-height 2.0"} at (0.25) is [ic-height 1.25] +FAIL font-size-adjust interpolation responds to changes in inherited value 283 assert_true: CSS.supports font-size-adjust ic-height 1.75 expected true got false +PASS Animation on property <fontSizeAdjust> from [ic-height 1.0] to [inherit] with {"inherited":"ic-height 0.5"} changed to {"inherited":"ic-height 2.0"} at (0.75) is [ic-height 1.75] +FAIL font-size-adjust interpolation responds to changes in inherited value 284 assert_true: CSS.supports font-size-adjust ic-height 0.75 expected true got false +PASS Animation on property <fontSizeAdjust> from [ic-height 1.0] to [inherit] with {"inherited":"ic-height 2.0"} changed to {"inherited":"ic-height 0.0"} at (0.25) is [ic-height 0.75] +FAIL font-size-adjust interpolation responds to changes in inherited value 285 assert_true: CSS.supports font-size-adjust ic-height 0.25 expected true got false +PASS Animation on property <fontSizeAdjust> from [ic-height 1.0] to [inherit] with {"inherited":"ic-height 2.0"} changed to {"inherited":"ic-height 0.0"} at (0.75) is [ic-height 0.25] +FAIL font-size-adjust interpolation responds to changes in inherited value 286 assert_true: CSS.supports font-size-adjust ic-height 0.875 expected true got false +PASS Animation on property <fontSizeAdjust> from [ic-height 1.0] to [inherit] with {"inherited":"ic-height 2.0"} changed to {"inherited":"ic-height 0.5"} at (0.25) is [ic-height 0.875] +FAIL font-size-adjust interpolation responds to changes in inherited value 287 assert_true: CSS.supports font-size-adjust ic-height 0.625 expected true got false +PASS Animation on property <fontSizeAdjust> from [ic-height 1.0] to [inherit] with {"inherited":"ic-height 2.0"} changed to {"inherited":"ic-height 0.5"} at (0.75) is [ic-height 0.625] +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/animations/responsive/interpolation/font-size-adjust-responsive.html b/third_party/blink/web_tests/animations/responsive/interpolation/font-size-adjust-responsive.html new file mode 100644 index 0000000..41482a1 --- /dev/null +++ b/third_party/blink/web_tests/animations/responsive/interpolation/font-size-adjust-responsive.html
@@ -0,0 +1,306 @@ +<!DOCTYPE html> +<title>font-size-adjust interpolation responds to changes in inherited value</title> +<link rel="help" href="https://www.w3.org/TR/css-fonts-5/#font-size-adjust-prop"> +<script src="resources/responsive-test.js"></script> +<script> +assertCSSResponsive({ + property: 'font-size-adjust', + from: 'inherit', + to: '1.0', + configurations: [{ + state: {inherited: '0.0'}, + expect: [ + {at: 0.25, is: '0.25'}, + {at: 0.75, is: '0.75'}, + ], + }, { + state: {inherited: '0.5'}, + expect: [ + {at: 0.25, is: '0.625'}, + {at: 0.75, is: '0.875'}, + ], + }, { + state: {inherited: '2.0'}, + expect: [ + {at: 0.25, is: '1.75'}, + {at: 0.75, is: '1.25'}, + ], + }], +}); + +assertCSSResponsive({ + property: 'font-size-adjust', + from: '1.0', + to: 'inherit', + configurations: [{ + state: {inherited: '0.0'}, + expect: [ + {at: 0.25, is: '0.75'}, + {at: 0.75, is: '0.25'}, + ], + }, { + state: {inherited: '0.5'}, + expect: [ + {at: 0.25, is: '0.875'}, + {at: 0.75, is: '0.625'}, + ], + }, { + state: {inherited: '2.0'}, + expect: [ + {at: 0.25, is: '1.25'}, + {at: 0.75, is: '1.75'}, + ], + }], +}); + +assertCSSResponsive({ + property: 'font-size-adjust', + from: 'inherit', + to: 'ex-height 1.0', + configurations: [{ + state: {inherited: 'ex-height 0.0'}, + expect: [ + {at: 0.25, is: '0.25'}, + {at: 0.75, is: '0.75'}, + ], + }, { + state: {inherited: 'ex-height 0.5'}, + expect: [ + {at: 0.25, is: '0.625'}, + {at: 0.75, is: '0.875'}, + ], + }, { + state: {inherited: 'ex-height 2.0'}, + expect: [ + {at: 0.25, is: '1.75'}, + {at: 0.75, is: '1.25'}, + ], + }], +}); + +assertCSSResponsive({ + property: 'font-size-adjust', + from: 'ex-height 1.0', + to: 'inherit', + configurations: [{ + state: {inherited: 'ex-height 0.0'}, + expect: [ + {at: 0.25, is: '0.75'}, + {at: 0.75, is: '0.25'}, + ], + }, { + state: {inherited: 'ex-height 0.5'}, + expect: [ + {at: 0.25, is: '0.875'}, + {at: 0.75, is: '0.625'}, + ], + }, { + state: {inherited: 'ex-height 2.0'}, + expect: [ + {at: 0.25, is: '1.25'}, + {at: 0.75, is: '1.75'}, + ], + }], +}); + +assertCSSResponsive({ + property: 'font-size-adjust', + from: 'inherit', + to: 'cap-height 1.0', + configurations: [{ + state: {inherited: 'cap-height 0.0'}, + expect: [ + {at: 0.25, is: 'cap-height 0.25'}, + {at: 0.75, is: 'cap-height 0.75'}, + ], + }, { + state: {inherited: 'cap-height 0.5'}, + expect: [ + {at: 0.25, is: 'cap-height 0.625'}, + {at: 0.75, is: 'cap-height 0.875'}, + ], + }, { + state: {inherited: 'cap-height 2.0'}, + expect: [ + {at: 0.25, is: 'cap-height 1.75'}, + {at: 0.75, is: 'cap-height 1.25'}, + ], + }], +}); + +assertCSSResponsive({ + property: 'font-size-adjust', + from: 'cap-height 1.0', + to: 'inherit', + configurations: [{ + state: {inherited: 'cap-height 0.0'}, + expect: [ + {at: 0.25, is: 'cap-height 0.75'}, + {at: 0.75, is: 'cap-height 0.25'}, + ], + }, { + state: {inherited: 'cap-height 0.5'}, + expect: [ + {at: 0.25, is: 'cap-height 0.875'}, + {at: 0.75, is: 'cap-height 0.625'}, + ], + }, { + state: {inherited: 'cap-height 2.0'}, + expect: [ + {at: 0.25, is: 'cap-height 1.25'}, + {at: 0.75, is: 'cap-height 1.75'}, + ], + }], +}); + +assertCSSResponsive({ + property: 'font-size-adjust', + from: 'inherit', + to: 'ch-width 1.0', + configurations: [{ + state: {inherited: 'ch-width 0.0'}, + expect: [ + {at: 0.25, is: 'ch-width 0.25'}, + {at: 0.75, is: 'ch-width 0.75'}, + ], + }, { + state: {inherited: 'ch-width 0.5'}, + expect: [ + {at: 0.25, is: 'ch-width 0.625'}, + {at: 0.75, is: 'ch-width 0.875'}, + ], + }, { + state: {inherited: 'ch-width 2.0'}, + expect: [ + {at: 0.25, is: 'ch-width 1.75'}, + {at: 0.75, is: 'ch-width 1.25'}, + ], + }], +}); + +assertCSSResponsive({ + property: 'font-size-adjust', + from: 'ch-width 1.0', + to: 'inherit', + configurations: [{ + state: {inherited: 'ch-width 0.0'}, + expect: [ + {at: 0.25, is: 'ch-width 0.75'}, + {at: 0.75, is: 'ch-width 0.25'}, + ], + }, { + state: {inherited: 'ch-width 0.5'}, + expect: [ + {at: 0.25, is: 'ch-width 0.875'}, + {at: 0.75, is: 'ch-width 0.625'}, + ], + }, { + state: {inherited: 'ch-width 2.0'}, + expect: [ + {at: 0.25, is: 'ch-width 1.25'}, + {at: 0.75, is: 'ch-width 1.75'}, + ], + }], +}); + +assertCSSResponsive({ + property: 'font-size-adjust', + from: 'inherit', + to: 'ic-width 1.0', + configurations: [{ + state: {inherited: 'ic-width 0.0'}, + expect: [ + {at: 0.25, is: 'ic-width 0.25'}, + {at: 0.75, is: 'ic-width 0.75'}, + ], + }, { + state: {inherited: 'ic-width 0.5'}, + expect: [ + {at: 0.25, is: 'ic-width 0.625'}, + {at: 0.75, is: 'ic-width 0.875'}, + ], + }, { + state: {inherited: 'ic-width 2.0'}, + expect: [ + {at: 0.25, is: 'ic-width 1.75'}, + {at: 0.75, is: 'ic-width 1.25'}, + ], + }], +}); + +assertCSSResponsive({ + property: 'font-size-adjust', + from: 'ic-width 1.0', + to: 'inherit', + configurations: [{ + state: {inherited: 'ic-width 0.0'}, + expect: [ + {at: 0.25, is: 'ic-width 0.75'}, + {at: 0.75, is: 'ic-width 0.25'}, + ], + }, { + state: {inherited: 'ic-width 0.5'}, + expect: [ + {at: 0.25, is: 'ic-width 0.875'}, + {at: 0.75, is: 'ic-width 0.625'}, + ], + }, { + state: {inherited: 'ic-width 2.0'}, + expect: [ + {at: 0.25, is: 'ic-width 1.25'}, + {at: 0.75, is: 'ic-width 1.75'}, + ], + }], +}); + +assertCSSResponsive({ + property: 'font-size-adjust', + from: 'inherit', + to: 'ic-height 1.0', + configurations: [{ + state: {inherited: 'ic-height 0.0'}, + expect: [ + {at: 0.25, is: 'ic-height 0.25'}, + {at: 0.75, is: 'ic-height 0.75'}, + ], + }, { + state: {inherited: 'ic-height 0.5'}, + expect: [ + {at: 0.25, is: 'ic-height 0.625'}, + {at: 0.75, is: 'ic-height 0.875'}, + ], + }, { + state: {inherited: 'ic-height 2.0'}, + expect: [ + {at: 0.25, is: 'ic-height 1.75'}, + {at: 0.75, is: 'ic-height 1.25'}, + ], + }], +}); + +assertCSSResponsive({ + property: 'font-size-adjust', + from: 'ic-height 1.0', + to: 'inherit', + configurations: [{ + state: {inherited: 'ic-height 0.0'}, + expect: [ + {at: 0.25, is: 'ic-height 0.75'}, + {at: 0.75, is: 'ic-height 0.25'}, + ], + }, { + state: {inherited: 'ic-height 0.5'}, + expect: [ + {at: 0.25, is: 'ic-height 0.875'}, + {at: 0.75, is: 'ic-height 0.625'}, + ], + }, { + state: {inherited: 'ic-height 2.0'}, + expect: [ + {at: 0.25, is: 'ic-height 1.25'}, + {at: 0.75, is: 'ic-height 1.75'}, + ], + }], +}); + +</script>
diff --git a/third_party/blink/web_tests/editing/selection/drag-drop-events.html b/third_party/blink/web_tests/editing/selection/drag-drop-events.html index 5137a29..5833a64 100644 --- a/third_party/blink/web_tests/editing/selection/drag-drop-events.html +++ b/third_party/blink/web_tests/editing/selection/drag-drop-events.html
@@ -21,8 +21,12 @@ var fired = 0; function checkEvent(name, target) { - assert_equals(name, expected[fired].name); - assert_equals(target, expected[fired].target); + assert_equals(name, expected[fired].name, `Expected: + "${expected[fired].name}" fired on "${expected[fired].target}". ` + + `Actual: "${name}" fired on "${target}".`); + assert_equals(target, expected[fired].target, `Expected: + "${expected[fired].name}" fired on "${expected[fired].target}". ` + + `Actual: "${name}" fired on "${target}".`); ++fired; }
diff --git a/third_party/blink/web_tests/editing/selection/select-text-overflow-ellipsis-mixed-in-ltr-2.html b/third_party/blink/web_tests/editing/selection/select-text-overflow-ellipsis-mixed-in-ltr-2.html index 8d67cd1..702db08 100644 --- a/third_party/blink/web_tests/editing/selection/select-text-overflow-ellipsis-mixed-in-ltr-2.html +++ b/third_party/blink/web_tests/editing/selection/select-text-overflow-ellipsis-mixed-in-ltr-2.html
@@ -12,6 +12,11 @@ text-overflow: ellipsis; text-decoration: inherit; } +::selection, +::selection:window-inactive { + background-color: rgb(176, 176, 176); + color: black; +} </style> <p>crbug.com/642454: Select all text in mixed ltr-rtl in rtl flow. None of the dots in the ellipsis should be selected.</p> <dl>
diff --git a/third_party/blink/web_tests/editing/selection/select-text-overflow-ellipsis-mixed-in-ltr.html b/third_party/blink/web_tests/editing/selection/select-text-overflow-ellipsis-mixed-in-ltr.html index e606b3ea..b3996d1 100644 --- a/third_party/blink/web_tests/editing/selection/select-text-overflow-ellipsis-mixed-in-ltr.html +++ b/third_party/blink/web_tests/editing/selection/select-text-overflow-ellipsis-mixed-in-ltr.html
@@ -12,6 +12,11 @@ text-overflow: ellipsis; text-decoration: inherit; } +::selection, +::selection:window-inactive { + background-color: rgb(176, 176, 176); + color: black; +} </style> <p>crbug.com/634445: Select all text in mixed ltr-rtl in ltr flow.</p> <dl>
diff --git a/third_party/blink/web_tests/editing/selection/select-text-overflow-ellipsis-mixed-in-rtl-2.html b/third_party/blink/web_tests/editing/selection/select-text-overflow-ellipsis-mixed-in-rtl-2.html index 39895c2..ced6996 100644 --- a/third_party/blink/web_tests/editing/selection/select-text-overflow-ellipsis-mixed-in-rtl-2.html +++ b/third_party/blink/web_tests/editing/selection/select-text-overflow-ellipsis-mixed-in-rtl-2.html
@@ -13,6 +13,11 @@ text-decoration: inherit; direction: rtl; } +::selection, +::selection:window-inactive { + background-color: rgb(176, 176, 176); + color: black; +} </style> <p>crbug.com/642454: Select all text in mixed ltr-rtl in rtl flow. None of the dots in the ellipsis should be selected.</p> <dl>
diff --git a/third_party/blink/web_tests/editing/selection/select-text-overflow-ellipsis-mixed-in-rtl.html b/third_party/blink/web_tests/editing/selection/select-text-overflow-ellipsis-mixed-in-rtl.html index dc469c5..fe1c40b8 100644 --- a/third_party/blink/web_tests/editing/selection/select-text-overflow-ellipsis-mixed-in-rtl.html +++ b/third_party/blink/web_tests/editing/selection/select-text-overflow-ellipsis-mixed-in-rtl.html
@@ -13,6 +13,11 @@ text-decoration: inherit; direction: rtl; } +::selection, +::selection:window-inactive { + background-color: rgb(176, 176, 176); + color: black; +} </style> <p>crbug.com/634445: Select all text in mixed ltr-rtl in rtl flow.</p> <dl>
diff --git a/third_party/blink/web_tests/editing/selection/select-text-overflow-ellipsis.html b/third_party/blink/web_tests/editing/selection/select-text-overflow-ellipsis.html index 8e363e21..9cdb84d 100644 --- a/third_party/blink/web_tests/editing/selection/select-text-overflow-ellipsis.html +++ b/third_party/blink/web_tests/editing/selection/select-text-overflow-ellipsis.html
@@ -8,6 +8,11 @@ overflow: hidden; text-overflow: ellipsis; } + ::selection, + ::selection:window-inactive { + background-color: rgb(176, 176, 176); + color: black; + } </style> <body> <h3>Test for <a href='https://bugs.webkit.org/show_bug.cgi?id=29968'>WebKit bug 29968</a>: Selecting text with text-overflow ellipsis should not show cut off text</h3>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-flexbox/percentage-padding-004.html b/third_party/blink/web_tests/external/wpt/css/css-flexbox/percentage-padding-004.html new file mode 100644 index 0000000..ca96e54 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-flexbox/percentage-padding-004.html
@@ -0,0 +1,35 @@ +<!DOCTYPE html> +<link rel="author" title="David Grogan" href="mailto:dgrogan@chromium.org"> +<link rel="help" href="https://crbug.com/1445257"> +<link rel="match" href="../reference/ref-filled-green-100px-square.xht"> +<meta name="assert" + content="vertical-rl block's auto height should encompass its column wrap flexbox child and descendants, and the percentage padding should resolve based on that." /> + +<style> + #reference-overlapped-red { + position: absolute; + background-color: red; + width: 100px; + height: 100px; + z-index: -1; + } +</style> + +<p>Test passes if there is a filled green square and <strong>no red</strong>. +</p> + +<div id=reference-overlapped-red></div> + +<div id="container" style="writing-mode:vertical-rl; width:101px;"> + <div style="display:flex; flex-flow:column wrap; padding-right:5%;"> + <div style="writing-mode:horizontal-tb; padding-right:10%;"> + <div + style="width:100px; height:100px; background:green; position:relative; left:15px;"> + </div> + </div> + </div> +</div> +<script> + document.body.offsetTop; + container.style.width = "100px"; +</script>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-fonts/animations/font-size-adjust-composition-expected.txt b/third_party/blink/web_tests/external/wpt/css/css-fonts/animations/font-size-adjust-composition-expected.txt new file mode 100644 index 0000000..21f150cd --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-fonts/animations/font-size-adjust-composition-expected.txt
@@ -0,0 +1,254 @@ +This is a testharness.js-based test. +Found 250 tests; 185 PASS, 65 FAIL, 0 TIMEOUT, 0 NOTRUN. +PASS Compositing: property <font-size-adjust> underlying [0.5] from replace [none] to add [2.0] at (-0.5) should be [none] +PASS Compositing: property <font-size-adjust> underlying [0.5] from replace [none] to add [2.0] at (0) should be [none] +PASS Compositing: property <font-size-adjust> underlying [0.5] from replace [none] to add [2.0] at (0.5) should be [2.5] +PASS Compositing: property <font-size-adjust> underlying [0.5] from replace [none] to add [2.0] at (1) should be [2.5] +PASS Compositing: property <font-size-adjust> underlying [0.5] from replace [none] to add [2.0] at (1.5) should be [2.5] +PASS Compositing: property <font-size-adjust> underlying [0.5] from add [0.0] to add [2.0] at (-0.5) should be [0.0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from add [0.0] to add [2.0] at (0) should be [0.5] +PASS Compositing: property <font-size-adjust> underlying [0.5] from add [0.0] to add [2.0] at (0.5) should be [1.5] +PASS Compositing: property <font-size-adjust> underlying [0.5] from add [0.0] to add [2.0] at (1) should be [2.5] +PASS Compositing: property <font-size-adjust> underlying [0.5] from add [0.0] to add [2.0] at (1.5) should be [3.5] +PASS Compositing: property <font-size-adjust> underlying [0.5] from replace [0.0] to add [2.0] at (-0.5) should be [0.0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from replace [0.0] to add [2.0] at (0) should be [0.0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from replace [0.0] to add [2.0] at (0.5) should be [1.25] +PASS Compositing: property <font-size-adjust> underlying [0.5] from replace [0.0] to add [2.0] at (1) should be [2.5] +PASS Compositing: property <font-size-adjust> underlying [0.5] from replace [0.0] to add [2.0] at (1.5) should be [3.75] +PASS Compositing: property <font-size-adjust> underlying [0.5] from add [0.0] to replace [2.0] at (-0.5) should be [0.0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from add [0.0] to replace [2.0] at (0) should be [0.5] +PASS Compositing: property <font-size-adjust> underlying [0.5] from add [0.0] to replace [2.0] at (0.5) should be [1.25] +PASS Compositing: property <font-size-adjust> underlying [0.5] from add [0.0] to replace [2.0] at (1) should be [2.0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from add [0.0] to replace [2.0] at (1.5) should be [2.75] +PASS Compositing: property <font-size-adjust> underlying [0.5] from replace [2.0] to add [none] at (-0.5) should be [2.0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from replace [2.0] to add [none] at (0) should be [2.0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from replace [2.0] to add [none] at (0.5) should be [none] +PASS Compositing: property <font-size-adjust> underlying [0.5] from replace [2.0] to add [none] at (1) should be [none] +PASS Compositing: property <font-size-adjust> underlying [0.5] from replace [2.0] to add [none] at (1.5) should be [none] +PASS Compositing: property <font-size-adjust> underlying [ex-height 0.5] from replace [none] to add [ex-height 2.0] at (-0.5) should be [none] +PASS Compositing: property <font-size-adjust> underlying [ex-height 0.5] from replace [none] to add [ex-height 2.0] at (0) should be [none] +PASS Compositing: property <font-size-adjust> underlying [ex-height 0.5] from replace [none] to add [ex-height 2.0] at (0.5) should be [2.5] +PASS Compositing: property <font-size-adjust> underlying [ex-height 0.5] from replace [none] to add [ex-height 2.0] at (1) should be [2.5] +PASS Compositing: property <font-size-adjust> underlying [ex-height 0.5] from replace [none] to add [ex-height 2.0] at (1.5) should be [2.5] +PASS Compositing: property <font-size-adjust> underlying [ex-height 0.5] from add [ex-height 0] to add [ex-height 2.0] at (-0.5) should be [0.0] +PASS Compositing: property <font-size-adjust> underlying [ex-height 0.5] from add [ex-height 0] to add [ex-height 2.0] at (0) should be [0.5] +PASS Compositing: property <font-size-adjust> underlying [ex-height 0.5] from add [ex-height 0] to add [ex-height 2.0] at (0.5) should be [1.5] +PASS Compositing: property <font-size-adjust> underlying [ex-height 0.5] from add [ex-height 0] to add [ex-height 2.0] at (1) should be [2.5] +PASS Compositing: property <font-size-adjust> underlying [ex-height 0.5] from add [ex-height 0] to add [ex-height 2.0] at (1.5) should be [3.5] +PASS Compositing: property <font-size-adjust> underlying [ex-height 0.5] from replace [ex-height 0] to add [ex-height 2.0] at (-0.5) should be [0.0] +PASS Compositing: property <font-size-adjust> underlying [ex-height 0.5] from replace [ex-height 0] to add [ex-height 2.0] at (0) should be [0.0] +PASS Compositing: property <font-size-adjust> underlying [ex-height 0.5] from replace [ex-height 0] to add [ex-height 2.0] at (0.5) should be [1.25] +PASS Compositing: property <font-size-adjust> underlying [ex-height 0.5] from replace [ex-height 0] to add [ex-height 2.0] at (1) should be [2.5] +PASS Compositing: property <font-size-adjust> underlying [ex-height 0.5] from replace [ex-height 0] to add [ex-height 2.0] at (1.5) should be [3.75] +PASS Compositing: property <font-size-adjust> underlying [ex-height 0.5] from add [ex-height 0] to replace [ex-height 2.0] at (-0.5) should be [0.0] +PASS Compositing: property <font-size-adjust> underlying [ex-height 0.5] from add [ex-height 0] to replace [ex-height 2.0] at (0) should be [0.5] +PASS Compositing: property <font-size-adjust> underlying [ex-height 0.5] from add [ex-height 0] to replace [ex-height 2.0] at (0.5) should be [1.25] +PASS Compositing: property <font-size-adjust> underlying [ex-height 0.5] from add [ex-height 0] to replace [ex-height 2.0] at (1) should be [2.0] +PASS Compositing: property <font-size-adjust> underlying [ex-height 0.5] from add [ex-height 0] to replace [ex-height 2.0] at (1.5) should be [2.75] +PASS Compositing: property <font-size-adjust> underlying [ex-height 0.5] from replace [ex-height 2.0] to add [none] at (-0.5) should be [2.0] +PASS Compositing: property <font-size-adjust> underlying [ex-height 0.5] from replace [ex-height 2.0] to add [none] at (0) should be [2.0] +PASS Compositing: property <font-size-adjust> underlying [ex-height 0.5] from replace [ex-height 2.0] to add [none] at (0.5) should be [none] +PASS Compositing: property <font-size-adjust> underlying [ex-height 0.5] from replace [ex-height 2.0] to add [none] at (1) should be [none] +PASS Compositing: property <font-size-adjust> underlying [ex-height 0.5] from replace [ex-height 2.0] to add [none] at (1.5) should be [none] +PASS Compositing: property <font-size-adjust> underlying [cap-height 0.5] from replace [none] to add [cap-height 2.0] at (-0.5) should be [none] +PASS Compositing: property <font-size-adjust> underlying [cap-height 0.5] from replace [none] to add [cap-height 2.0] at (0) should be [none] +PASS Compositing: property <font-size-adjust> underlying [cap-height 0.5] from replace [none] to add [cap-height 2.0] at (0.5) should be [cap-height 2.5] +PASS Compositing: property <font-size-adjust> underlying [cap-height 0.5] from replace [none] to add [cap-height 2.0] at (1) should be [cap-height 2.5] +PASS Compositing: property <font-size-adjust> underlying [cap-height 0.5] from replace [none] to add [cap-height 2.0] at (1.5) should be [cap-height 2.5] +PASS Compositing: property <font-size-adjust> underlying [cap-height 0.5] from add [cap-height 0] to add [cap-height 2.0] at (-0.5) should be [cap-height 0.0] +PASS Compositing: property <font-size-adjust> underlying [cap-height 0.5] from add [cap-height 0] to add [cap-height 2.0] at (0) should be [cap-height 0.5] +PASS Compositing: property <font-size-adjust> underlying [cap-height 0.5] from add [cap-height 0] to add [cap-height 2.0] at (0.5) should be [cap-height 1.5] +PASS Compositing: property <font-size-adjust> underlying [cap-height 0.5] from add [cap-height 0] to add [cap-height 2.0] at (1) should be [cap-height 2.5] +PASS Compositing: property <font-size-adjust> underlying [cap-height 0.5] from add [cap-height 0] to add [cap-height 2.0] at (1.5) should be [cap-height 3.5] +PASS Compositing: property <font-size-adjust> underlying [cap-height 0.5] from replace [cap-height 0] to add [cap-height 2.0] at (-0.5) should be [cap-height 0.0] +PASS Compositing: property <font-size-adjust> underlying [cap-height 0.5] from replace [cap-height 0] to add [cap-height 2.0] at (0) should be [cap-height 0.0] +PASS Compositing: property <font-size-adjust> underlying [cap-height 0.5] from replace [cap-height 0] to add [cap-height 2.0] at (0.5) should be [cap-height 1.25] +PASS Compositing: property <font-size-adjust> underlying [cap-height 0.5] from replace [cap-height 0] to add [cap-height 2.0] at (1) should be [cap-height 2.5] +PASS Compositing: property <font-size-adjust> underlying [cap-height 0.5] from replace [cap-height 0] to add [cap-height 2.0] at (1.5) should be [cap-height 3.75] +PASS Compositing: property <font-size-adjust> underlying [cap-height 0.5] from add [cap-height 0.0] to replace [cap-height 2.0] at (-0.5) should be [cap-height 0.0] +PASS Compositing: property <font-size-adjust> underlying [cap-height 0.5] from add [cap-height 0.0] to replace [cap-height 2.0] at (0) should be [cap-height 0.5] +PASS Compositing: property <font-size-adjust> underlying [cap-height 0.5] from add [cap-height 0.0] to replace [cap-height 2.0] at (0.5) should be [cap-height 1.25] +PASS Compositing: property <font-size-adjust> underlying [cap-height 0.5] from add [cap-height 0.0] to replace [cap-height 2.0] at (1) should be [cap-height 2] +PASS Compositing: property <font-size-adjust> underlying [cap-height 0.5] from add [cap-height 0.0] to replace [cap-height 2.0] at (1.5) should be [cap-height 2.75] +PASS Compositing: property <font-size-adjust> underlying [cap-height 0.5] from replace [cap-height 2.0] to add [none] at (-0.5) should be [cap-height 2.0] +PASS Compositing: property <font-size-adjust> underlying [cap-height 0.5] from replace [cap-height 2.0] to add [none] at (0) should be [cap-height 2.0] +PASS Compositing: property <font-size-adjust> underlying [cap-height 0.5] from replace [cap-height 2.0] to add [none] at (0.5) should be [none] +PASS Compositing: property <font-size-adjust> underlying [cap-height 0.5] from replace [cap-height 2.0] to add [none] at (1) should be [none] +PASS Compositing: property <font-size-adjust> underlying [cap-height 0.5] from replace [cap-height 2.0] to add [none] at (1.5) should be [none] +PASS Compositing: property <font-size-adjust> underlying [ch-width 0.5] from replace [none] to add [ch-width 2.0] at (-0.5) should be [none] +PASS Compositing: property <font-size-adjust> underlying [ch-width 0.5] from replace [none] to add [ch-width 2.0] at (0) should be [none] +PASS Compositing: property <font-size-adjust> underlying [ch-width 0.5] from replace [none] to add [ch-width 2.0] at (0.5) should be [ch-width 2.5] +PASS Compositing: property <font-size-adjust> underlying [ch-width 0.5] from replace [none] to add [ch-width 2.0] at (1) should be [ch-width 2.5] +PASS Compositing: property <font-size-adjust> underlying [ch-width 0.5] from replace [none] to add [ch-width 2.0] at (1.5) should be [ch-width 2.5] +PASS Compositing: property <font-size-adjust> underlying [ch-width 0.5] from add [ch-width 0] to add [ch-width 2.0] at (-0.5) should be [ch-width 0.0] +PASS Compositing: property <font-size-adjust> underlying [ch-width 0.5] from add [ch-width 0] to add [ch-width 2.0] at (0) should be [ch-width 0.5] +PASS Compositing: property <font-size-adjust> underlying [ch-width 0.5] from add [ch-width 0] to add [ch-width 2.0] at (0.5) should be [ch-width 1.5] +PASS Compositing: property <font-size-adjust> underlying [ch-width 0.5] from add [ch-width 0] to add [ch-width 2.0] at (1) should be [ch-width 2.5] +PASS Compositing: property <font-size-adjust> underlying [ch-width 0.5] from add [ch-width 0] to add [ch-width 2.0] at (1.5) should be [ch-width 3.5] +PASS Compositing: property <font-size-adjust> underlying [ch-width 0.5] from replace [ch-width 0] to add [ch-width 2.0] at (-0.5) should be [ch-width 0.0] +PASS Compositing: property <font-size-adjust> underlying [ch-width 0.5] from replace [ch-width 0] to add [ch-width 2.0] at (0) should be [ch-width 0.0] +PASS Compositing: property <font-size-adjust> underlying [ch-width 0.5] from replace [ch-width 0] to add [ch-width 2.0] at (0.5) should be [ch-width 1.25] +PASS Compositing: property <font-size-adjust> underlying [ch-width 0.5] from replace [ch-width 0] to add [ch-width 2.0] at (1) should be [ch-width 2.5] +PASS Compositing: property <font-size-adjust> underlying [ch-width 0.5] from replace [ch-width 0] to add [ch-width 2.0] at (1.5) should be [ch-width 3.75] +PASS Compositing: property <font-size-adjust> underlying [ch-width 0.5] from add [ch-width 0] to replace [ch-width 2.0] at (-0.5) should be [ch-width 0.0] +PASS Compositing: property <font-size-adjust> underlying [ch-width 0.5] from add [ch-width 0] to replace [ch-width 2.0] at (0) should be [ch-width 0.5] +PASS Compositing: property <font-size-adjust> underlying [ch-width 0.5] from add [ch-width 0] to replace [ch-width 2.0] at (0.5) should be [ch-width 1.25] +PASS Compositing: property <font-size-adjust> underlying [ch-width 0.5] from add [ch-width 0] to replace [ch-width 2.0] at (1) should be [ch-width 2] +PASS Compositing: property <font-size-adjust> underlying [ch-width 0.5] from add [ch-width 0] to replace [ch-width 2.0] at (1.5) should be [ch-width 2.75] +PASS Compositing: property <font-size-adjust> underlying [ch-width 0.5] from replace [ch-width 2.0] to add [none] at (-0.5) should be [ch-width 2.0] +PASS Compositing: property <font-size-adjust> underlying [ch-width 0.5] from replace [ch-width 2.0] to add [none] at (0) should be [ch-width 2.0] +PASS Compositing: property <font-size-adjust> underlying [ch-width 0.5] from replace [ch-width 2.0] to add [none] at (0.5) should be [none] +PASS Compositing: property <font-size-adjust> underlying [ch-width 0.5] from replace [ch-width 2.0] to add [none] at (1) should be [none] +PASS Compositing: property <font-size-adjust> underlying [ch-width 0.5] from replace [ch-width 2.0] to add [none] at (1.5) should be [none] +PASS Compositing: property <font-size-adjust> underlying [ic-width 0.5] from replace [none] to add [ic-width 2.0] at (-0.5) should be [none] +PASS Compositing: property <font-size-adjust> underlying [ic-width 0.5] from replace [none] to add [ic-width 2.0] at (0) should be [none] +PASS Compositing: property <font-size-adjust> underlying [ic-width 0.5] from replace [none] to add [ic-width 2.0] at (0.5) should be [ic-width 2.5] +PASS Compositing: property <font-size-adjust> underlying [ic-width 0.5] from replace [none] to add [ic-width 2.0] at (1) should be [ic-width 2.5] +PASS Compositing: property <font-size-adjust> underlying [ic-width 0.5] from replace [none] to add [ic-width 2.0] at (1.5) should be [ic-width 2.5] +PASS Compositing: property <font-size-adjust> underlying [ic-width 0.5] from add [ic-width 0] to add [ic-width 2.0] at (-0.5) should be [ic-width 0.0] +PASS Compositing: property <font-size-adjust> underlying [ic-width 0.5] from add [ic-width 0] to add [ic-width 2.0] at (0) should be [ic-width 0.5] +PASS Compositing: property <font-size-adjust> underlying [ic-width 0.5] from add [ic-width 0] to add [ic-width 2.0] at (0.5) should be [ic-width 1.5] +PASS Compositing: property <font-size-adjust> underlying [ic-width 0.5] from add [ic-width 0] to add [ic-width 2.0] at (1) should be [ic-width 2.5] +PASS Compositing: property <font-size-adjust> underlying [ic-width 0.5] from add [ic-width 0] to add [ic-width 2.0] at (1.5) should be [ic-width 3.5] +PASS Compositing: property <font-size-adjust> underlying [ic-width 0.5] from replace [ic-width 0] to add [ic-width 2.0] at (-0.5) should be [ic-width 0.0] +PASS Compositing: property <font-size-adjust> underlying [ic-width 0.5] from replace [ic-width 0] to add [ic-width 2.0] at (0) should be [ic-width 0.0] +PASS Compositing: property <font-size-adjust> underlying [ic-width 0.5] from replace [ic-width 0] to add [ic-width 2.0] at (0.5) should be [ic-width 1.25] +PASS Compositing: property <font-size-adjust> underlying [ic-width 0.5] from replace [ic-width 0] to add [ic-width 2.0] at (1) should be [ic-width 2.5] +PASS Compositing: property <font-size-adjust> underlying [ic-width 0.5] from replace [ic-width 0] to add [ic-width 2.0] at (1.5) should be [ic-width 3.75] +PASS Compositing: property <font-size-adjust> underlying [ic-width 0.5] from add [ic-width 0] to replace [ic-width 2.0] at (-0.5) should be [ic-width 0.0] +PASS Compositing: property <font-size-adjust> underlying [ic-width 0.5] from add [ic-width 0] to replace [ic-width 2.0] at (0) should be [ic-width 0.5] +PASS Compositing: property <font-size-adjust> underlying [ic-width 0.5] from add [ic-width 0] to replace [ic-width 2.0] at (0.5) should be [ic-width 1.25] +PASS Compositing: property <font-size-adjust> underlying [ic-width 0.5] from add [ic-width 0] to replace [ic-width 2.0] at (1) should be [ic-width 2] +PASS Compositing: property <font-size-adjust> underlying [ic-width 0.5] from add [ic-width 0] to replace [ic-width 2.0] at (1.5) should be [ic-width 2.75] +PASS Compositing: property <font-size-adjust> underlying [ic-width 0.5] from replace [ic-width 2.0] to add [none] at (-0.5) should be [ic-width 2.0] +PASS Compositing: property <font-size-adjust> underlying [ic-width 0.5] from replace [ic-width 2.0] to add [none] at (0) should be [ic-width 2.0] +PASS Compositing: property <font-size-adjust> underlying [ic-width 0.5] from replace [ic-width 2.0] to add [none] at (0.5) should be [none] +PASS Compositing: property <font-size-adjust> underlying [ic-width 0.5] from replace [ic-width 2.0] to add [none] at (1) should be [none] +PASS Compositing: property <font-size-adjust> underlying [ic-width 0.5] from replace [ic-width 2.0] to add [none] at (1.5) should be [none] +FAIL Compositing: property <font-size-adjust> underlying [ic-height 0.5] from replace [none] to add [ic-height 2.0] at (-0.5) should be [none] assert_true: 'to' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [ic-height 0.5] from replace [none] to add [ic-height 2.0] at (0) should be [none] assert_true: 'to' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [ic-height 0.5] from replace [none] to add [ic-height 2.0] at (0.5) should be [ic-height 2.5] assert_true: 'to' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [ic-height 0.5] from replace [none] to add [ic-height 2.0] at (1) should be [ic-height 2.5] assert_true: 'to' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [ic-height 0.5] from replace [none] to add [ic-height 2.0] at (1.5) should be [ic-height 2.5] assert_true: 'to' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [ic-height 0.5] from add [ic-height 0] to add [ic-height 2.0] at (-0.5) should be [ic-height 0.0] assert_true: 'from' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [ic-height 0.5] from add [ic-height 0] to add [ic-height 2.0] at (0) should be [ic-height 0.5] assert_true: 'from' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [ic-height 0.5] from add [ic-height 0] to add [ic-height 2.0] at (0.5) should be [ic-height 1.5] assert_true: 'from' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [ic-height 0.5] from add [ic-height 0] to add [ic-height 2.0] at (1) should be [ic-height 2.5] assert_true: 'from' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [ic-height 0.5] from add [ic-height 0] to add [ic-height 2.0] at (1.5) should be [ic-height 3.5] assert_true: 'from' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [ic-height 0.5] from replace [ic-height 0] to add [ic-height 2.0] at (-0.5) should be [ic-height 0.0] assert_true: 'from' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [ic-height 0.5] from replace [ic-height 0] to add [ic-height 2.0] at (0) should be [ic-height 0.0] assert_true: 'from' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [ic-height 0.5] from replace [ic-height 0] to add [ic-height 2.0] at (0.5) should be [ic-height 1.25] assert_true: 'from' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [ic-height 0.5] from replace [ic-height 0] to add [ic-height 2.0] at (1) should be [ic-height 2.5] assert_true: 'from' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [ic-height 0.5] from replace [ic-height 0] to add [ic-height 2.0] at (1.5) should be [ic-height 3.75] assert_true: 'from' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [ic-height 0.5] from add [ic-height 0] to replace [ic-height 2.0] at (-0.5) should be [ic-height 0.0] assert_true: 'from' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [ic-height 0.5] from add [ic-height 0] to replace [ic-height 2.0] at (0) should be [ic-height 0.5] assert_true: 'from' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [ic-height 0.5] from add [ic-height 0] to replace [ic-height 2.0] at (0.5) should be [ic-height 1.25] assert_true: 'from' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [ic-height 0.5] from add [ic-height 0] to replace [ic-height 2.0] at (1) should be [ic-height 2] assert_true: 'from' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [ic-height 0.5] from add [ic-height 0] to replace [ic-height 2.0] at (1.5) should be [ic-height 2.75] assert_true: 'from' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [ic-height 0.5] from replace [ic-height 2.0] to add [none] at (-0.5) should be [ic-height 2.0] assert_true: 'from' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [ic-height 0.5] from replace [ic-height 2.0] to add [none] at (0) should be [ic-height 2.0] assert_true: 'from' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [ic-height 0.5] from replace [ic-height 2.0] to add [none] at (0.5) should be [none] assert_true: 'from' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [ic-height 0.5] from replace [ic-height 2.0] to add [none] at (1) should be [none] assert_true: 'from' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [ic-height 0.5] from replace [ic-height 2.0] to add [none] at (1.5) should be [none] assert_true: 'from' value should be supported expected true got false +PASS Compositing: property <font-size-adjust> underlying [0.5] from add [ex-height 0.0] to add [cap-height 2.0] at (-0.5) should be [0.5] +PASS Compositing: property <font-size-adjust> underlying [0.5] from add [ex-height 0.0] to add [cap-height 2.0] at (0) should be [0.5] +PASS Compositing: property <font-size-adjust> underlying [0.5] from add [ex-height 0.0] to add [cap-height 2.0] at (0.5) should be [cap-height 2.0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from add [ex-height 0.0] to add [cap-height 2.0] at (1) should be [cap-height 2.0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from add [ex-height 0.0] to add [cap-height 2.0] at (1.5) should be [cap-height 2.0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from replace [ex-height 0.0] to replace [cap-height 2.0] at (-0.5) should be [0.0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from replace [ex-height 0.0] to replace [cap-height 2.0] at (0) should be [0.0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from replace [ex-height 0.0] to replace [cap-height 2.0] at (0.5) should be [cap-height 2.0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from replace [ex-height 0.0] to replace [cap-height 2.0] at (1) should be [cap-height 2.0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from replace [ex-height 0.0] to replace [cap-height 2.0] at (1.5) should be [cap-height 2.0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from replace [ex-height 0] to add [cap-height 2.0] at (-0.5) should be [0.0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from replace [ex-height 0] to add [cap-height 2.0] at (0) should be [0.0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from replace [ex-height 0] to add [cap-height 2.0] at (0.5) should be [cap-height 2.0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from replace [ex-height 0] to add [cap-height 2.0] at (1) should be [cap-height 2.0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from replace [ex-height 0] to add [cap-height 2.0] at (1.5) should be [cap-height 2.0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from add [ex-height 0] to replace [cap-height 2.0] at (-0.5) should be [0.5] +PASS Compositing: property <font-size-adjust> underlying [0.5] from add [ex-height 0] to replace [cap-height 2.0] at (0) should be [0.5] +PASS Compositing: property <font-size-adjust> underlying [0.5] from add [ex-height 0] to replace [cap-height 2.0] at (0.5) should be [cap-height 2.0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from add [ex-height 0] to replace [cap-height 2.0] at (1) should be [cap-height 2.0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from add [ex-height 0] to replace [cap-height 2.0] at (1.5) should be [cap-height 2.0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from add [cap-height 0.0] to add [ch-width 2.0] at (-0.5) should be [cap-height 0.0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from add [cap-height 0.0] to add [ch-width 2.0] at (0) should be [cap-height 0.0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from add [cap-height 0.0] to add [ch-width 2.0] at (0.5) should be [ch-width 2.0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from add [cap-height 0.0] to add [ch-width 2.0] at (1) should be [ch-width 2.0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from add [cap-height 0.0] to add [ch-width 2.0] at (1.5) should be [ch-width 2.0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from replace [cap-height 0.0] to replace [ch-width 2.0] at (-0.5) should be [cap-height 0.0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from replace [cap-height 0.0] to replace [ch-width 2.0] at (0) should be [cap-height 0.0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from replace [cap-height 0.0] to replace [ch-width 2.0] at (0.5) should be [ch-width 2.0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from replace [cap-height 0.0] to replace [ch-width 2.0] at (1) should be [ch-width 2.0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from replace [cap-height 0.0] to replace [ch-width 2.0] at (1.5) should be [ch-width 2.0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from replace [cap-height 0] to add [ch-width 2.0] at (-0.5) should be [cap-height 0.0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from replace [cap-height 0] to add [ch-width 2.0] at (0) should be [cap-height 0.0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from replace [cap-height 0] to add [ch-width 2.0] at (0.5) should be [ch-width 2.0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from replace [cap-height 0] to add [ch-width 2.0] at (1) should be [ch-width 2.0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from replace [cap-height 0] to add [ch-width 2.0] at (1.5) should be [ch-width 2.0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from add [cap-height 0] to replace [ch-width 2.0] at (-0.5) should be [cap-height 0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from add [cap-height 0] to replace [ch-width 2.0] at (0) should be [cap-height 0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from add [cap-height 0] to replace [ch-width 2.0] at (0.5) should be [ch-width 2.0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from add [cap-height 0] to replace [ch-width 2.0] at (1) should be [ch-width 2.0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from add [cap-height 0] to replace [ch-width 2.0] at (1.5) should be [ch-width 2.0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from add [ch-width 0.0] to add [ic-width 2.0] at (-0.5) should be [ch-width 0.0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from add [ch-width 0.0] to add [ic-width 2.0] at (0) should be [ch-width 0.0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from add [ch-width 0.0] to add [ic-width 2.0] at (0.5) should be [ic-width 2.0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from add [ch-width 0.0] to add [ic-width 2.0] at (1) should be [ic-width 2.0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from add [ch-width 0.0] to add [ic-width 2.0] at (1.5) should be [ic-width 2.0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from replace [ch-width 0.0] to replace [ic-width 2.0] at (-0.5) should be [ch-width 0.0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from replace [ch-width 0.0] to replace [ic-width 2.0] at (0) should be [ch-width 0.0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from replace [ch-width 0.0] to replace [ic-width 2.0] at (0.5) should be [ic-width 2.0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from replace [ch-width 0.0] to replace [ic-width 2.0] at (1) should be [ic-width 2.0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from replace [ch-width 0.0] to replace [ic-width 2.0] at (1.5) should be [ic-width 2.0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from replace [ch-width 0] to add [ic-width 2.0] at (-0.5) should be [ch-width 0.0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from replace [ch-width 0] to add [ic-width 2.0] at (0) should be [ch-width 0.0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from replace [ch-width 0] to add [ic-width 2.0] at (0.5) should be [ic-width 2.0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from replace [ch-width 0] to add [ic-width 2.0] at (1) should be [ic-width 2.0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from replace [ch-width 0] to add [ic-width 2.0] at (1.5) should be [ic-width 2.0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from add [ch-width 0] to replace [ic-width 2.0] at (-0.5) should be [ch-width 0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from add [ch-width 0] to replace [ic-width 2.0] at (0) should be [ch-width 0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from add [ch-width 0] to replace [ic-width 2.0] at (0.5) should be [ic-width 2.0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from add [ch-width 0] to replace [ic-width 2.0] at (1) should be [ic-width 2.0] +PASS Compositing: property <font-size-adjust> underlying [0.5] from add [ch-width 0] to replace [ic-width 2.0] at (1.5) should be [ic-width 2.0] +FAIL Compositing: property <font-size-adjust> underlying [0.5] from add [ic-width 0.0] to add [ic-height 2.0] at (-0.5) should be [ic-width 0.0] assert_true: 'to' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [0.5] from add [ic-width 0.0] to add [ic-height 2.0] at (0) should be [ic-width 0.0] assert_true: 'to' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [0.5] from add [ic-width 0.0] to add [ic-height 2.0] at (0.5) should be [ic-height 2.0] assert_true: 'to' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [0.5] from add [ic-width 0.0] to add [ic-height 2.0] at (1) should be [ic-height 2.0] assert_true: 'to' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [0.5] from add [ic-width 0.0] to add [ic-height 2.0] at (1.5) should be [ic-height 2.0] assert_true: 'to' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [0.5] from replace [ic-width 0.0] to replace [ic-height 2.0] at (-0.5) should be [ic-width 0.0] assert_true: 'to' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [0.5] from replace [ic-width 0.0] to replace [ic-height 2.0] at (0) should be [ic-width 0.0] assert_true: 'to' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [0.5] from replace [ic-width 0.0] to replace [ic-height 2.0] at (0.5) should be [ic-height 2.0] assert_true: 'to' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [0.5] from replace [ic-width 0.0] to replace [ic-height 2.0] at (1) should be [ic-height 2.0] assert_true: 'to' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [0.5] from replace [ic-width 0.0] to replace [ic-height 2.0] at (1.5) should be [ic-height 2.0] assert_true: 'to' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [0.5] from replace [ic-width 0] to add [ic-height 2.0] at (-0.5) should be [ic-width 0.0] assert_true: 'to' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [0.5] from replace [ic-width 0] to add [ic-height 2.0] at (0) should be [ic-width 0.0] assert_true: 'to' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [0.5] from replace [ic-width 0] to add [ic-height 2.0] at (0.5) should be [ic-height 2.0] assert_true: 'to' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [0.5] from replace [ic-width 0] to add [ic-height 2.0] at (1) should be [ic-height 2.0] assert_true: 'to' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [0.5] from replace [ic-width 0] to add [ic-height 2.0] at (1.5) should be [ic-height 2.0] assert_true: 'to' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [0.5] from add [ic-width 0] to replace [ic-height 2.0] at (-0.5) should be [ic-width 0] assert_true: 'to' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [0.5] from add [ic-width 0] to replace [ic-height 2.0] at (0) should be [ic-width 0] assert_true: 'to' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [0.5] from add [ic-width 0] to replace [ic-height 2.0] at (0.5) should be [ic-height 2.0] assert_true: 'to' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [0.5] from add [ic-width 0] to replace [ic-height 2.0] at (1) should be [ic-height 2.0] assert_true: 'to' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [0.5] from add [ic-width 0] to replace [ic-height 2.0] at (1.5) should be [ic-height 2.0] assert_true: 'to' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [0.5] from add [ic-height 0.0] to add [ex-height 2.0] at (-0.5) should be [ic-height 0.0] assert_true: 'from' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [0.5] from add [ic-height 0.0] to add [ex-height 2.0] at (0) should be [ic-height 0.0] assert_true: 'from' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [0.5] from add [ic-height 0.0] to add [ex-height 2.0] at (0.5) should be [ex-height 2.5] assert_true: 'from' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [0.5] from add [ic-height 0.0] to add [ex-height 2.0] at (1) should be [ex-height 2.5] assert_true: 'from' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [0.5] from add [ic-height 0.0] to add [ex-height 2.0] at (1.5) should be [ex-height 2.5] assert_true: 'from' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [0.5] from replace [ic-height 0.0] to replace [ex-height 2.0] at (-0.5) should be [ic-height 0.0] assert_true: 'from' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [0.5] from replace [ic-height 0.0] to replace [ex-height 2.0] at (0) should be [ic-height 0.0] assert_true: 'from' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [0.5] from replace [ic-height 0.0] to replace [ex-height 2.0] at (0.5) should be [ex-height 2.0] assert_true: 'from' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [0.5] from replace [ic-height 0.0] to replace [ex-height 2.0] at (1) should be [ex-height 2.0] assert_true: 'from' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [0.5] from replace [ic-height 0.0] to replace [ex-height 2.0] at (1.5) should be [ex-height 2.0] assert_true: 'from' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [0.5] from replace [ic-height 0] to add [ex-height 2.0] at (-0.5) should be [ic-height 0.0] assert_true: 'from' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [0.5] from replace [ic-height 0] to add [ex-height 2.0] at (0) should be [ic-height 0.0] assert_true: 'from' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [0.5] from replace [ic-height 0] to add [ex-height 2.0] at (0.5) should be [ex-height 2.5] assert_true: 'from' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [0.5] from replace [ic-height 0] to add [ex-height 2.0] at (1) should be [ex-height 2.5] assert_true: 'from' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [0.5] from replace [ic-height 0] to add [ex-height 2.0] at (1.5) should be [ex-height 2.5] assert_true: 'from' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [0.5] from add [ic-height 0] to replace [ex-height 2.0] at (-0.5) should be [ic-height 0] assert_true: 'from' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [0.5] from add [ic-height 0] to replace [ex-height 2.0] at (0) should be [ic-height 0] assert_true: 'from' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [0.5] from add [ic-height 0] to replace [ex-height 2.0] at (0.5) should be [ex-height 2.0] assert_true: 'from' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [0.5] from add [ic-height 0] to replace [ex-height 2.0] at (1) should be [ex-height 2.0] assert_true: 'from' value should be supported expected true got false +FAIL Compositing: property <font-size-adjust> underlying [0.5] from add [ic-height 0] to replace [ex-height 2.0] at (1.5) should be [ex-height 2.0] assert_true: 'from' value should be supported expected true got false +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/external/wpt/css/css-fonts/animations/font-size-adjust-composition.html b/third_party/blink/web_tests/external/wpt/css/css-fonts/animations/font-size-adjust-composition.html new file mode 100644 index 0000000..d98b0ff --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-fonts/animations/font-size-adjust-composition.html
@@ -0,0 +1,665 @@ +<!DOCTYPE html> +<meta charset="UTF-8"> +<title>font-size-adjust composition</title> +<link rel="author" title="ChangSeok Oh" href="mailto:changseok@webkit.org"> +<link rel="help" href="https://www.w3.org/TR/css-fonts-5/#font-size-adjust-prop"> +<meta name="assert" content="font-size-adjust supports animation with two value font metrics"> + +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/css/support/interpolation-testcommon.js"></script> + +<body></body> + +<script> +test_composition({ + property: 'font-size-adjust', + underlying: "0.5", + replaceFrom: "none", + addTo: "2.0", +}, [ + {at: -0.5, expect: "none"}, + {at: 0, expect: "none"}, + {at: 0.5, expect: "2.5"}, + {at: 1, expect: "2.5"}, + {at: 1.5, expect: "2.5"}, +]); + +test_composition({ + property: 'font-size-adjust', + underlying: "0.5", + addFrom: "0.0", + addTo: "2.0", +}, [ + {at: -0.5, expect: "0.0"}, + {at: 0, expect: "0.5"}, + {at: 0.5, expect: "1.5"}, + {at: 1, expect: "2.5"}, + {at: 1.5, expect: "3.5"}, +]); + +test_composition({ + property: 'font-size-adjust', + underlying: "0.5", + replaceFrom: "0.0", + addTo: "2.0", +}, [ + {at: -0.5, expect: "0.0"}, + {at: 0, expect: "0.0"}, + {at: 0.5, expect: "1.25"}, + {at: 1, expect: "2.5"}, + {at: 1.5, expect: "3.75"}, +]); + +test_composition({ + property: 'font-size-adjust', + underlying: "0.5", + addFrom: "0.0", + replaceTo: "2.0", +}, [ + {at: -0.5, expect: "0.0"}, + {at: 0, expect: "0.5"}, + {at: 0.5, expect: "1.25"}, + {at: 1, expect: "2.0"}, + {at: 1.5, expect: "2.75"}, +]); + +test_composition({ + property: 'font-size-adjust', + underlying: "0.5", + replaceFrom: "2.0", + addTo: "none", +}, [ + {at: -0.5, expect: "2.0"}, + {at: 0, expect: "2.0"}, + {at: 0.5, expect: "none"}, + {at: 1, expect: "none"}, + {at: 1.5, expect: "none"}, +]); + +test_composition({ + property: 'font-size-adjust', + underlying: "ex-height 0.5", + replaceFrom: "none", + addTo: "ex-height 2.0", +}, [ + {at: -0.5, expect: "none"}, + {at: 0, expect: "none"}, + {at: 0.5, expect: "2.5"}, + {at: 1, expect: "2.5"}, + {at: 1.5, expect: "2.5"}, +]); + +test_composition({ + property: 'font-size-adjust', + underlying: "ex-height 0.5", + addFrom: "ex-height 0", + addTo: "ex-height 2.0", +}, [ + {at: -0.5, expect: "0.0"}, + {at: 0, expect: "0.5"}, + {at: 0.5, expect: "1.5"}, + {at: 1, expect: "2.5"}, + {at: 1.5, expect: "3.5"}, +]); + +test_composition({ + property: 'font-size-adjust', + underlying: "ex-height 0.5", + replaceFrom: "ex-height 0", + addTo: "ex-height 2.0", +}, [ + {at: -0.5, expect: "0.0"}, + {at: 0, expect: "0.0"}, + {at: 0.5, expect: "1.25"}, + {at: 1, expect: "2.5"}, + {at: 1.5, expect: "3.75"}, +]); + +test_composition({ + property: 'font-size-adjust', + underlying: "ex-height 0.5", + addFrom: "ex-height 0", + replaceTo: "ex-height 2.0", +}, [ + {at: -0.5, expect: "0.0"}, + {at: 0, expect: "0.5"}, + {at: 0.5, expect: "1.25"}, + {at: 1, expect: "2.0"}, + {at: 1.5, expect: "2.75"}, +]); + +test_composition({ + property: 'font-size-adjust', + underlying: "ex-height 0.5", + replaceFrom: "ex-height 2.0", + addTo: "none", +}, [ + {at: -0.5, expect: "2.0"}, + {at: 0, expect: "2.0"}, + {at: 0.5, expect: "none"}, + {at: 1, expect: "none"}, + {at: 1.5, expect: "none"}, +]); + +test_composition({ + property: 'font-size-adjust', + underlying: "cap-height 0.5", + replaceFrom: "none", + addTo: "cap-height 2.0", +}, [ + {at: -0.5, expect: "none"}, + {at: 0, expect: "none"}, + {at: 0.5, expect: "cap-height 2.5"}, + {at: 1, expect: "cap-height 2.5"}, + {at: 1.5, expect: "cap-height 2.5"}, +]); + +test_composition({ + property: 'font-size-adjust', + underlying: "cap-height 0.5", + addFrom: "cap-height 0", + addTo: "cap-height 2.0", +}, [ + {at: -0.5, expect: "cap-height 0.0"}, + {at: 0, expect: "cap-height 0.5"}, + {at: 0.5, expect: "cap-height 1.5"}, + {at: 1, expect: "cap-height 2.5"}, + {at: 1.5, expect: "cap-height 3.5"}, +]); + +test_composition({ + property: 'font-size-adjust', + underlying: "cap-height 0.5", + replaceFrom: "cap-height 0", + addTo: "cap-height 2.0", +}, [ + {at: -0.5, expect: "cap-height 0.0"}, + {at: 0, expect: "cap-height 0.0"}, + {at: 0.5, expect: "cap-height 1.25"}, + {at: 1, expect: "cap-height 2.5"}, + {at: 1.5, expect: "cap-height 3.75"}, +]); + +test_composition({ + property: 'font-size-adjust', + underlying: "cap-height 0.5", + addFrom: "cap-height 0.0", + replaceTo: "cap-height 2.0", +}, [ + {at: -0.5, expect: "cap-height 0.0"}, + {at: 0, expect: "cap-height 0.5"}, + {at: 0.5, expect: "cap-height 1.25"}, + {at: 1, expect: "cap-height 2"}, + {at: 1.5, expect: "cap-height 2.75"}, +]); + +test_composition({ + property: 'font-size-adjust', + underlying: "cap-height 0.5", + replaceFrom: "cap-height 2.0", + addTo: "none", +}, [ + {at: -0.5, expect: "cap-height 2.0"}, + {at: 0, expect: "cap-height 2.0"}, + {at: 0.5, expect: "none"}, + {at: 1, expect: "none"}, + {at: 1.5, expect: "none"}, +]); + +test_composition({ + property: 'font-size-adjust', + underlying: "ch-width 0.5", + replaceFrom: "none", + addTo: "ch-width 2.0", +}, [ + {at: -0.5, expect: "none"}, + {at: 0, expect: "none"}, + {at: 0.5, expect: "ch-width 2.5"}, + {at: 1, expect: "ch-width 2.5"}, + {at: 1.5, expect: "ch-width 2.5"}, +]); + +test_composition({ + property: 'font-size-adjust', + underlying: "ch-width 0.5", + addFrom: "ch-width 0", + addTo: "ch-width 2.0", +}, [ + {at: -0.5, expect: "ch-width 0.0"}, + {at: 0, expect: "ch-width 0.5"}, + {at: 0.5, expect: "ch-width 1.5"}, + {at: 1, expect: "ch-width 2.5"}, + {at: 1.5, expect: "ch-width 3.5"}, +]); + +test_composition({ + property: 'font-size-adjust', + underlying: "ch-width 0.5", + replaceFrom: "ch-width 0", + addTo: "ch-width 2.0", +}, [ + {at: -0.5, expect: "ch-width 0.0"}, + {at: 0, expect: "ch-width 0.0"}, + {at: 0.5, expect: "ch-width 1.25"}, + {at: 1, expect: "ch-width 2.5"}, + {at: 1.5, expect: "ch-width 3.75"}, +]); + +test_composition({ + property: 'font-size-adjust', + underlying: "ch-width 0.5", + addFrom: "ch-width 0", + replaceTo: "ch-width 2.0", +}, [ + {at: -0.5, expect: "ch-width 0.0"}, + {at: 0, expect: "ch-width 0.5"}, + {at: 0.5, expect: "ch-width 1.25"}, + {at: 1, expect: "ch-width 2"}, + {at: 1.5, expect: "ch-width 2.75"}, +]); + +test_composition({ + property: 'font-size-adjust', + underlying: "ch-width 0.5", + replaceFrom: "ch-width 2.0", + addTo: "none", +}, [ + {at: -0.5, expect: "ch-width 2.0"}, + {at: 0, expect: "ch-width 2.0"}, + {at: 0.5, expect: "none"}, + {at: 1, expect: "none"}, + {at: 1.5, expect: "none"}, +]); + +test_composition({ + property: 'font-size-adjust', + underlying: "ic-width 0.5", + replaceFrom: "none", + addTo: "ic-width 2.0", +}, [ + {at: -0.5, expect: "none"}, + {at: 0, expect: "none"}, + {at: 0.5, expect: "ic-width 2.5"}, + {at: 1, expect: "ic-width 2.5"}, + {at: 1.5, expect: "ic-width 2.5"}, +]); + +test_composition({ + property: 'font-size-adjust', + underlying: "ic-width 0.5", + addFrom: "ic-width 0", + addTo: "ic-width 2.0", +}, [ + {at: -0.5, expect: "ic-width 0.0"}, + {at: 0, expect: "ic-width 0.5"}, + {at: 0.5, expect: "ic-width 1.5"}, + {at: 1, expect: "ic-width 2.5"}, + {at: 1.5, expect: "ic-width 3.5"}, +]); + +test_composition({ + property: 'font-size-adjust', + underlying: "ic-width 0.5", + replaceFrom: "ic-width 0", + addTo: "ic-width 2.0", +}, [ + {at: -0.5, expect: "ic-width 0.0"}, + {at: 0, expect: "ic-width 0.0"}, + {at: 0.5, expect: "ic-width 1.25"}, + {at: 1, expect: "ic-width 2.5"}, + {at: 1.5, expect: "ic-width 3.75"}, +]); + +test_composition({ + property: 'font-size-adjust', + underlying: "ic-width 0.5", + addFrom: "ic-width 0", + replaceTo: "ic-width 2.0", +}, [ + {at: -0.5, expect: "ic-width 0.0"}, + {at: 0, expect: "ic-width 0.5"}, + {at: 0.5, expect: "ic-width 1.25"}, + {at: 1, expect: "ic-width 2"}, + {at: 1.5, expect: "ic-width 2.75"}, +]); + +test_composition({ + property: 'font-size-adjust', + underlying: "ic-width 0.5", + replaceFrom: "ic-width 2.0", + addTo: "none", +}, [ + {at: -0.5, expect: "ic-width 2.0"}, + {at: 0, expect: "ic-width 2.0"}, + {at: 0.5, expect: "none"}, + {at: 1, expect: "none"}, + {at: 1.5, expect: "none"}, +]); + +test_composition({ + property: 'font-size-adjust', + underlying: "ic-height 0.5", + replaceFrom: "none", + addTo: "ic-height 2.0", +}, [ + {at: -0.5, expect: "none"}, + {at: 0, expect: "none"}, + {at: 0.5, expect: "ic-height 2.5"}, + {at: 1, expect: "ic-height 2.5"}, + {at: 1.5, expect: "ic-height 2.5"}, +]); + +test_composition({ + property: 'font-size-adjust', + underlying: "ic-height 0.5", + addFrom: "ic-height 0", + addTo: "ic-height 2.0", +}, [ + {at: -0.5, expect: "ic-height 0.0"}, + {at: 0, expect: "ic-height 0.5"}, + {at: 0.5, expect: "ic-height 1.5"}, + {at: 1, expect: "ic-height 2.5"}, + {at: 1.5, expect: "ic-height 3.5"}, +]); + +test_composition({ + property: 'font-size-adjust', + underlying: "ic-height 0.5", + replaceFrom: "ic-height 0", + addTo: "ic-height 2.0", +}, [ + {at: -0.5, expect: "ic-height 0.0"}, + {at: 0, expect: "ic-height 0.0"}, + {at: 0.5, expect: "ic-height 1.25"}, + {at: 1, expect: "ic-height 2.5"}, + {at: 1.5, expect: "ic-height 3.75"}, +]); + +test_composition({ + property: 'font-size-adjust', + underlying: "ic-height 0.5", + addFrom: "ic-height 0", + replaceTo: "ic-height 2.0", +}, [ + {at: -0.5, expect: "ic-height 0.0"}, + {at: 0, expect: "ic-height 0.5"}, + {at: 0.5, expect: "ic-height 1.25"}, + {at: 1, expect: "ic-height 2"}, + {at: 1.5, expect: "ic-height 2.75"}, +]); + +test_composition({ + property: 'font-size-adjust', + underlying: "ic-height 0.5", + replaceFrom: "ic-height 2.0", + addTo: "none", +}, [ + {at: -0.5, expect: "ic-height 2.0"}, + {at: 0, expect: "ic-height 2.0"}, + {at: 0.5, expect: "none"}, + {at: 1, expect: "none"}, + {at: 1.5, expect: "none"}, +]); + +test_composition({ + property: 'font-size-adjust', + underlying: "0.5", + addFrom: "ex-height 0.0", + addTo: "cap-height 2.0", +}, [ + {at: -0.5, expect: "0.5"}, + {at: 0, expect: "0.5"}, + {at: 0.5, expect: "cap-height 2.0"}, + {at: 1, expect: "cap-height 2.0"}, + {at: 1.5, expect: "cap-height 2.0"}, +]); + +test_composition({ + property: 'font-size-adjust', + underlying: "0.5", + replaceFrom: "ex-height 0.0", + replaceTo: "cap-height 2.0", +}, [ + {at: -0.5, expect: "0.0"}, + {at: 0, expect: "0.0"}, + {at: 0.5, expect: "cap-height 2.0"}, + {at: 1, expect: "cap-height 2.0"}, + {at: 1.5, expect: "cap-height 2.0"}, +]); + +test_composition({ + property: 'font-size-adjust', + underlying: "0.5", + replaceFrom: "ex-height 0", + addTo: "cap-height 2.0", +}, [ + {at: -0.5, expect: "0.0"}, + {at: 0, expect: "0.0"}, + {at: 0.5, expect: "cap-height 2.0"}, + {at: 1, expect: "cap-height 2.0"}, + {at: 1.5, expect: "cap-height 2.0"}, +]); + +test_composition({ + property: 'font-size-adjust', + underlying: "0.5", + addFrom: "ex-height 0", + replaceTo: "cap-height 2.0", +}, [ + {at: -0.5, expect: "0.5"}, + {at: 0, expect: "0.5"}, + {at: 0.5, expect: "cap-height 2.0"}, + {at: 1, expect: "cap-height 2.0"}, + {at: 1.5, expect: "cap-height 2.0"}, +]); + +test_composition({ + property: 'font-size-adjust', + underlying: "0.5", + addFrom: "cap-height 0.0", + addTo: "ch-width 2.0", +}, [ + {at: -0.5, expect: "cap-height 0.0"}, + {at: 0, expect: "cap-height 0.0"}, + {at: 0.5, expect: "ch-width 2.0"}, + {at: 1, expect: "ch-width 2.0"}, + {at: 1.5, expect: "ch-width 2.0"}, +]); + +test_composition({ + property: 'font-size-adjust', + underlying: "0.5", + replaceFrom: "cap-height 0.0", + replaceTo: "ch-width 2.0", +}, [ + {at: -0.5, expect: "cap-height 0.0"}, + {at: 0, expect: "cap-height 0.0"}, + {at: 0.5, expect: "ch-width 2.0"}, + {at: 1, expect: "ch-width 2.0"}, + {at: 1.5, expect: "ch-width 2.0"}, +]); + +test_composition({ + property: 'font-size-adjust', + underlying: "0.5", + replaceFrom: "cap-height 0", + addTo: "ch-width 2.0", +}, [ + {at: -0.5, expect: "cap-height 0.0"}, + {at: 0, expect: "cap-height 0.0"}, + {at: 0.5, expect: "ch-width 2.0"}, + {at: 1, expect: "ch-width 2.0"}, + {at: 1.5, expect: "ch-width 2.0"}, +]); + +test_composition({ + property: 'font-size-adjust', + underlying: "0.5", + addFrom: "cap-height 0", + replaceTo: "ch-width 2.0", +}, [ + {at: -0.5, expect: "cap-height 0"}, + {at: 0, expect: "cap-height 0"}, + {at: 0.5, expect: "ch-width 2.0"}, + {at: 1, expect: "ch-width 2.0"}, + {at: 1.5, expect: "ch-width 2.0"}, +]); + +test_composition({ + property: 'font-size-adjust', + underlying: "0.5", + addFrom: "ch-width 0.0", + addTo: "ic-width 2.0", +}, [ + {at: -0.5, expect: "ch-width 0.0"}, + {at: 0, expect: "ch-width 0.0"}, + {at: 0.5, expect: "ic-width 2.0"}, + {at: 1, expect: "ic-width 2.0"}, + {at: 1.5, expect: "ic-width 2.0"}, +]); + +test_composition({ + property: 'font-size-adjust', + underlying: "0.5", + replaceFrom: "ch-width 0.0", + replaceTo: "ic-width 2.0", +}, [ + {at: -0.5, expect: "ch-width 0.0"}, + {at: 0, expect: "ch-width 0.0"}, + {at: 0.5, expect: "ic-width 2.0"}, + {at: 1, expect: "ic-width 2.0"}, + {at: 1.5, expect: "ic-width 2.0"}, +]); + +test_composition({ + property: 'font-size-adjust', + underlying: "0.5", + replaceFrom: "ch-width 0", + addTo: "ic-width 2.0", +}, [ + {at: -0.5, expect: "ch-width 0.0"}, + {at: 0, expect: "ch-width 0.0"}, + {at: 0.5, expect: "ic-width 2.0"}, + {at: 1, expect: "ic-width 2.0"}, + {at: 1.5, expect: "ic-width 2.0"}, +]); + +test_composition({ + property: 'font-size-adjust', + underlying: "0.5", + addFrom: "ch-width 0", + replaceTo: "ic-width 2.0", +}, [ + {at: -0.5, expect: "ch-width 0"}, + {at: 0, expect: "ch-width 0"}, + {at: 0.5, expect: "ic-width 2.0"}, + {at: 1, expect: "ic-width 2.0"}, + {at: 1.5, expect: "ic-width 2.0"}, +]); + +test_composition({ + property: 'font-size-adjust', + underlying: "0.5", + addFrom: "ic-width 0.0", + addTo: "ic-height 2.0", +}, [ + {at: -0.5, expect: "ic-width 0.0"}, + {at: 0, expect: "ic-width 0.0"}, + {at: 0.5, expect: "ic-height 2.0"}, + {at: 1, expect: "ic-height 2.0"}, + {at: 1.5, expect: "ic-height 2.0"}, +]); + +test_composition({ + property: 'font-size-adjust', + underlying: "0.5", + replaceFrom: "ic-width 0.0", + replaceTo: "ic-height 2.0", +}, [ + {at: -0.5, expect: "ic-width 0.0"}, + {at: 0, expect: "ic-width 0.0"}, + {at: 0.5, expect: "ic-height 2.0"}, + {at: 1, expect: "ic-height 2.0"}, + {at: 1.5, expect: "ic-height 2.0"}, +]); + +test_composition({ + property: 'font-size-adjust', + underlying: "0.5", + replaceFrom: "ic-width 0", + addTo: "ic-height 2.0", +}, [ + {at: -0.5, expect: "ic-width 0.0"}, + {at: 0, expect: "ic-width 0.0"}, + {at: 0.5, expect: "ic-height 2.0"}, + {at: 1, expect: "ic-height 2.0"}, + {at: 1.5, expect: "ic-height 2.0"}, +]); + +test_composition({ + property: 'font-size-adjust', + underlying: "0.5", + addFrom: "ic-width 0", + replaceTo: "ic-height 2.0", +}, [ + {at: -0.5, expect: "ic-width 0"}, + {at: 0, expect: "ic-width 0"}, + {at: 0.5, expect: "ic-height 2.0"}, + {at: 1, expect: "ic-height 2.0"}, + {at: 1.5, expect: "ic-height 2.0"}, +]); + +test_composition({ + property: 'font-size-adjust', + underlying: "0.5", + addFrom: "ic-height 0.0", + addTo: "ex-height 2.0", +}, [ + {at: -0.5, expect: "ic-height 0.0"}, + {at: 0, expect: "ic-height 0.0"}, + {at: 0.5, expect: "ex-height 2.5"}, + {at: 1, expect: "ex-height 2.5"}, + {at: 1.5, expect: "ex-height 2.5"}, +]); + +test_composition({ + property: 'font-size-adjust', + underlying: "0.5", + replaceFrom: "ic-height 0.0", + replaceTo: "ex-height 2.0", +}, [ + {at: -0.5, expect: "ic-height 0.0"}, + {at: 0, expect: "ic-height 0.0"}, + {at: 0.5, expect: "ex-height 2.0"}, + {at: 1, expect: "ex-height 2.0"}, + {at: 1.5, expect: "ex-height 2.0"}, +]); + +test_composition({ + property: 'font-size-adjust', + underlying: "0.5", + replaceFrom: "ic-height 0", + addTo: "ex-height 2.0", +}, [ + {at: -0.5, expect: "ic-height 0.0"}, + {at: 0, expect: "ic-height 0.0"}, + {at: 0.5, expect: "ex-height 2.5"}, + {at: 1, expect: "ex-height 2.5"}, + {at: 1.5, expect: "ex-height 2.5"}, +]); + +test_composition({ + property: 'font-size-adjust', + underlying: "0.5", + addFrom: "ic-height 0", + replaceTo: "ex-height 2.0", +}, [ + {at: -0.5, expect: "ic-height 0"}, + {at: 0, expect: "ic-height 0"}, + {at: 0.5, expect: "ex-height 2.0"}, + {at: 1, expect: "ex-height 2.0"}, + {at: 1.5, expect: "ex-height 2.0"}, +]); +</script> +</body>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-fonts/animations/font-size-adjust-interpolation-expected.txt b/third_party/blink/web_tests/external/wpt/css/css-fonts/animations/font-size-adjust-interpolation-expected.txt deleted file mode 100644 index 58fe3c7..0000000 --- a/third_party/blink/web_tests/external/wpt/css/css-fonts/animations/font-size-adjust-interpolation-expected.txt +++ /dev/null
@@ -1,340 +0,0 @@ -This is a testharness.js-based test. -Found 336 tests; 279 PASS, 57 FAIL, 0 TIMEOUT, 0 NOTRUN. -PASS CSS Transitions: property <font-size-adjust> from neutral to [2] at (-2) should be [0] -PASS CSS Transitions: property <font-size-adjust> from neutral to [2] at (-0.3) should be [0.7] -PASS CSS Transitions: property <font-size-adjust> from neutral to [2] at (0) should be [1] -PASS CSS Transitions: property <font-size-adjust> from neutral to [2] at (0.3) should be [1.3] -PASS CSS Transitions: property <font-size-adjust> from neutral to [2] at (0.6) should be [1.6] -PASS CSS Transitions: property <font-size-adjust> from neutral to [2] at (1) should be [2] -PASS CSS Transitions: property <font-size-adjust> from neutral to [2] at (1.5) should be [2.5] -PASS CSS Transitions with transition: all: property <font-size-adjust> from neutral to [2] at (-2) should be [0] -PASS CSS Transitions with transition: all: property <font-size-adjust> from neutral to [2] at (-0.3) should be [0.7] -PASS CSS Transitions with transition: all: property <font-size-adjust> from neutral to [2] at (0) should be [1] -PASS CSS Transitions with transition: all: property <font-size-adjust> from neutral to [2] at (0.3) should be [1.3] -PASS CSS Transitions with transition: all: property <font-size-adjust> from neutral to [2] at (0.6) should be [1.6] -PASS CSS Transitions with transition: all: property <font-size-adjust> from neutral to [2] at (1) should be [2] -PASS CSS Transitions with transition: all: property <font-size-adjust> from neutral to [2] at (1.5) should be [2.5] -PASS CSS Animations: property <font-size-adjust> from neutral to [2] at (-2) should be [0] -PASS CSS Animations: property <font-size-adjust> from neutral to [2] at (-0.3) should be [0.7] -PASS CSS Animations: property <font-size-adjust> from neutral to [2] at (0) should be [1] -PASS CSS Animations: property <font-size-adjust> from neutral to [2] at (0.3) should be [1.3] -PASS CSS Animations: property <font-size-adjust> from neutral to [2] at (0.6) should be [1.6] -PASS CSS Animations: property <font-size-adjust> from neutral to [2] at (1) should be [2] -PASS CSS Animations: property <font-size-adjust> from neutral to [2] at (1.5) should be [2.5] -PASS Web Animations: property <font-size-adjust> from neutral to [2] at (-2) should be [0] -PASS Web Animations: property <font-size-adjust> from neutral to [2] at (-0.3) should be [0.7] -PASS Web Animations: property <font-size-adjust> from neutral to [2] at (0) should be [1] -PASS Web Animations: property <font-size-adjust> from neutral to [2] at (0.3) should be [1.3] -PASS Web Animations: property <font-size-adjust> from neutral to [2] at (0.6) should be [1.6] -PASS Web Animations: property <font-size-adjust> from neutral to [2] at (1) should be [2] -PASS Web Animations: property <font-size-adjust> from neutral to [2] at (1.5) should be [2.5] -PASS CSS Transitions: property <font-size-adjust> from [initial] to [2] at (-0.3) should be [initial] -PASS CSS Transitions: property <font-size-adjust> from [initial] to [2] at (0) should be [initial] -PASS CSS Transitions: property <font-size-adjust> from [initial] to [2] at (0.3) should be [initial] -PASS CSS Transitions: property <font-size-adjust> from [initial] to [2] at (0.5) should be [2] -PASS CSS Transitions: property <font-size-adjust> from [initial] to [2] at (0.6) should be [2] -PASS CSS Transitions: property <font-size-adjust> from [initial] to [2] at (1) should be [2] -PASS CSS Transitions: property <font-size-adjust> from [initial] to [2] at (1.5) should be [2] -PASS CSS Transitions with transition: all: property <font-size-adjust> from [initial] to [2] at (-0.3) should be [2] -PASS CSS Transitions with transition: all: property <font-size-adjust> from [initial] to [2] at (0) should be [2] -PASS CSS Transitions with transition: all: property <font-size-adjust> from [initial] to [2] at (0.3) should be [2] -PASS CSS Transitions with transition: all: property <font-size-adjust> from [initial] to [2] at (0.5) should be [2] -PASS CSS Transitions with transition: all: property <font-size-adjust> from [initial] to [2] at (0.6) should be [2] -PASS CSS Transitions with transition: all: property <font-size-adjust> from [initial] to [2] at (1) should be [2] -PASS CSS Transitions with transition: all: property <font-size-adjust> from [initial] to [2] at (1.5) should be [2] -PASS CSS Animations: property <font-size-adjust> from [initial] to [2] at (-0.3) should be [initial] -PASS CSS Animations: property <font-size-adjust> from [initial] to [2] at (0) should be [initial] -PASS CSS Animations: property <font-size-adjust> from [initial] to [2] at (0.3) should be [initial] -PASS CSS Animations: property <font-size-adjust> from [initial] to [2] at (0.5) should be [2] -PASS CSS Animations: property <font-size-adjust> from [initial] to [2] at (0.6) should be [2] -PASS CSS Animations: property <font-size-adjust> from [initial] to [2] at (1) should be [2] -PASS CSS Animations: property <font-size-adjust> from [initial] to [2] at (1.5) should be [2] -PASS Web Animations: property <font-size-adjust> from [initial] to [2] at (-0.3) should be [initial] -PASS Web Animations: property <font-size-adjust> from [initial] to [2] at (0) should be [initial] -PASS Web Animations: property <font-size-adjust> from [initial] to [2] at (0.3) should be [initial] -PASS Web Animations: property <font-size-adjust> from [initial] to [2] at (0.5) should be [2] -PASS Web Animations: property <font-size-adjust> from [initial] to [2] at (0.6) should be [2] -PASS Web Animations: property <font-size-adjust> from [initial] to [2] at (1) should be [2] -PASS Web Animations: property <font-size-adjust> from [initial] to [2] at (1.5) should be [2] -PASS CSS Transitions: property <font-size-adjust> from [initial] to [cap-height 2] at (-0.3) should be [initial] -PASS CSS Transitions: property <font-size-adjust> from [initial] to [cap-height 2] at (0) should be [initial] -PASS CSS Transitions: property <font-size-adjust> from [initial] to [cap-height 2] at (0.3) should be [initial] -PASS CSS Transitions: property <font-size-adjust> from [initial] to [cap-height 2] at (0.5) should be [cap-height 2] -PASS CSS Transitions: property <font-size-adjust> from [initial] to [cap-height 2] at (0.6) should be [cap-height 2] -PASS CSS Transitions: property <font-size-adjust> from [initial] to [cap-height 2] at (1) should be [cap-height 2] -PASS CSS Transitions: property <font-size-adjust> from [initial] to [cap-height 2] at (1.5) should be [cap-height 2] -PASS CSS Transitions with transition: all: property <font-size-adjust> from [initial] to [cap-height 2] at (-0.3) should be [cap-height 2] -PASS CSS Transitions with transition: all: property <font-size-adjust> from [initial] to [cap-height 2] at (0) should be [cap-height 2] -PASS CSS Transitions with transition: all: property <font-size-adjust> from [initial] to [cap-height 2] at (0.3) should be [cap-height 2] -PASS CSS Transitions with transition: all: property <font-size-adjust> from [initial] to [cap-height 2] at (0.5) should be [cap-height 2] -PASS CSS Transitions with transition: all: property <font-size-adjust> from [initial] to [cap-height 2] at (0.6) should be [cap-height 2] -PASS CSS Transitions with transition: all: property <font-size-adjust> from [initial] to [cap-height 2] at (1) should be [cap-height 2] -PASS CSS Transitions with transition: all: property <font-size-adjust> from [initial] to [cap-height 2] at (1.5) should be [cap-height 2] -PASS CSS Animations: property <font-size-adjust> from [initial] to [cap-height 2] at (-0.3) should be [initial] -PASS CSS Animations: property <font-size-adjust> from [initial] to [cap-height 2] at (0) should be [initial] -PASS CSS Animations: property <font-size-adjust> from [initial] to [cap-height 2] at (0.3) should be [initial] -PASS CSS Animations: property <font-size-adjust> from [initial] to [cap-height 2] at (0.5) should be [cap-height 2] -PASS CSS Animations: property <font-size-adjust> from [initial] to [cap-height 2] at (0.6) should be [cap-height 2] -PASS CSS Animations: property <font-size-adjust> from [initial] to [cap-height 2] at (1) should be [cap-height 2] -PASS CSS Animations: property <font-size-adjust> from [initial] to [cap-height 2] at (1.5) should be [cap-height 2] -PASS Web Animations: property <font-size-adjust> from [initial] to [cap-height 2] at (-0.3) should be [initial] -PASS Web Animations: property <font-size-adjust> from [initial] to [cap-height 2] at (0) should be [initial] -PASS Web Animations: property <font-size-adjust> from [initial] to [cap-height 2] at (0.3) should be [initial] -PASS Web Animations: property <font-size-adjust> from [initial] to [cap-height 2] at (0.5) should be [cap-height 2] -PASS Web Animations: property <font-size-adjust> from [initial] to [cap-height 2] at (0.6) should be [cap-height 2] -PASS Web Animations: property <font-size-adjust> from [initial] to [cap-height 2] at (1) should be [cap-height 2] -PASS Web Animations: property <font-size-adjust> from [initial] to [cap-height 2] at (1.5) should be [cap-height 2] -PASS CSS Transitions: property <font-size-adjust> from [inherit] to [2] at (-2) should be [5] -PASS CSS Transitions: property <font-size-adjust> from [inherit] to [2] at (-0.3) should be [3.3] -PASS CSS Transitions: property <font-size-adjust> from [inherit] to [2] at (0) should be [3] -PASS CSS Transitions: property <font-size-adjust> from [inherit] to [2] at (0.3) should be [2.7] -PASS CSS Transitions: property <font-size-adjust> from [inherit] to [2] at (0.6) should be [2.4] -PASS CSS Transitions: property <font-size-adjust> from [inherit] to [2] at (1) should be [2] -PASS CSS Transitions: property <font-size-adjust> from [inherit] to [2] at (1.5) should be [1.5] -PASS CSS Transitions with transition: all: property <font-size-adjust> from [inherit] to [2] at (-2) should be [5] -PASS CSS Transitions with transition: all: property <font-size-adjust> from [inherit] to [2] at (-0.3) should be [3.3] -PASS CSS Transitions with transition: all: property <font-size-adjust> from [inherit] to [2] at (0) should be [3] -PASS CSS Transitions with transition: all: property <font-size-adjust> from [inherit] to [2] at (0.3) should be [2.7] -PASS CSS Transitions with transition: all: property <font-size-adjust> from [inherit] to [2] at (0.6) should be [2.4] -PASS CSS Transitions with transition: all: property <font-size-adjust> from [inherit] to [2] at (1) should be [2] -PASS CSS Transitions with transition: all: property <font-size-adjust> from [inherit] to [2] at (1.5) should be [1.5] -PASS CSS Animations: property <font-size-adjust> from [inherit] to [2] at (-2) should be [5] -PASS CSS Animations: property <font-size-adjust> from [inherit] to [2] at (-0.3) should be [3.3] -PASS CSS Animations: property <font-size-adjust> from [inherit] to [2] at (0) should be [3] -PASS CSS Animations: property <font-size-adjust> from [inherit] to [2] at (0.3) should be [2.7] -PASS CSS Animations: property <font-size-adjust> from [inherit] to [2] at (0.6) should be [2.4] -PASS CSS Animations: property <font-size-adjust> from [inherit] to [2] at (1) should be [2] -PASS CSS Animations: property <font-size-adjust> from [inherit] to [2] at (1.5) should be [1.5] -PASS Web Animations: property <font-size-adjust> from [inherit] to [2] at (-2) should be [5] -PASS Web Animations: property <font-size-adjust> from [inherit] to [2] at (-0.3) should be [3.3] -PASS Web Animations: property <font-size-adjust> from [inherit] to [2] at (0) should be [3] -PASS Web Animations: property <font-size-adjust> from [inherit] to [2] at (0.3) should be [2.7] -PASS Web Animations: property <font-size-adjust> from [inherit] to [2] at (0.6) should be [2.4] -PASS Web Animations: property <font-size-adjust> from [inherit] to [2] at (1) should be [2] -PASS Web Animations: property <font-size-adjust> from [inherit] to [2] at (1.5) should be [1.5] -PASS CSS Transitions: property <font-size-adjust> from [unset] to [2] at (-2) should be [5] -PASS CSS Transitions: property <font-size-adjust> from [unset] to [2] at (-0.3) should be [3.3] -PASS CSS Transitions: property <font-size-adjust> from [unset] to [2] at (0) should be [3] -PASS CSS Transitions: property <font-size-adjust> from [unset] to [2] at (0.3) should be [2.7] -PASS CSS Transitions: property <font-size-adjust> from [unset] to [2] at (0.6) should be [2.4] -PASS CSS Transitions: property <font-size-adjust> from [unset] to [2] at (1) should be [2] -PASS CSS Transitions: property <font-size-adjust> from [unset] to [2] at (1.5) should be [1.5] -PASS CSS Transitions with transition: all: property <font-size-adjust> from [unset] to [2] at (-2) should be [5] -PASS CSS Transitions with transition: all: property <font-size-adjust> from [unset] to [2] at (-0.3) should be [3.3] -PASS CSS Transitions with transition: all: property <font-size-adjust> from [unset] to [2] at (0) should be [3] -PASS CSS Transitions with transition: all: property <font-size-adjust> from [unset] to [2] at (0.3) should be [2.7] -PASS CSS Transitions with transition: all: property <font-size-adjust> from [unset] to [2] at (0.6) should be [2.4] -PASS CSS Transitions with transition: all: property <font-size-adjust> from [unset] to [2] at (1) should be [2] -PASS CSS Transitions with transition: all: property <font-size-adjust> from [unset] to [2] at (1.5) should be [1.5] -PASS CSS Animations: property <font-size-adjust> from [unset] to [2] at (-2) should be [5] -PASS CSS Animations: property <font-size-adjust> from [unset] to [2] at (-0.3) should be [3.3] -PASS CSS Animations: property <font-size-adjust> from [unset] to [2] at (0) should be [3] -PASS CSS Animations: property <font-size-adjust> from [unset] to [2] at (0.3) should be [2.7] -PASS CSS Animations: property <font-size-adjust> from [unset] to [2] at (0.6) should be [2.4] -PASS CSS Animations: property <font-size-adjust> from [unset] to [2] at (1) should be [2] -PASS CSS Animations: property <font-size-adjust> from [unset] to [2] at (1.5) should be [1.5] -PASS Web Animations: property <font-size-adjust> from [unset] to [2] at (-2) should be [5] -PASS Web Animations: property <font-size-adjust> from [unset] to [2] at (-0.3) should be [3.3] -PASS Web Animations: property <font-size-adjust> from [unset] to [2] at (0) should be [3] -PASS Web Animations: property <font-size-adjust> from [unset] to [2] at (0.3) should be [2.7] -PASS Web Animations: property <font-size-adjust> from [unset] to [2] at (0.6) should be [2.4] -PASS Web Animations: property <font-size-adjust> from [unset] to [2] at (1) should be [2] -PASS Web Animations: property <font-size-adjust> from [unset] to [2] at (1.5) should be [1.5] -PASS CSS Transitions: property <font-size-adjust> from [0] to [1.2] at (-2) should be [0] -PASS CSS Transitions: property <font-size-adjust> from [0] to [1.2] at (-0.3) should be [0] -PASS CSS Transitions: property <font-size-adjust> from [0] to [1.2] at (0) should be [0] -PASS CSS Transitions: property <font-size-adjust> from [0] to [1.2] at (0.3) should be [0.36] -PASS CSS Transitions: property <font-size-adjust> from [0] to [1.2] at (0.6) should be [0.72] -PASS CSS Transitions: property <font-size-adjust> from [0] to [1.2] at (1) should be [1.2] -PASS CSS Transitions: property <font-size-adjust> from [0] to [1.2] at (1.5) should be [1.8] -PASS CSS Transitions with transition: all: property <font-size-adjust> from [0] to [1.2] at (-2) should be [0] -PASS CSS Transitions with transition: all: property <font-size-adjust> from [0] to [1.2] at (-0.3) should be [0] -PASS CSS Transitions with transition: all: property <font-size-adjust> from [0] to [1.2] at (0) should be [0] -PASS CSS Transitions with transition: all: property <font-size-adjust> from [0] to [1.2] at (0.3) should be [0.36] -PASS CSS Transitions with transition: all: property <font-size-adjust> from [0] to [1.2] at (0.6) should be [0.72] -PASS CSS Transitions with transition: all: property <font-size-adjust> from [0] to [1.2] at (1) should be [1.2] -PASS CSS Transitions with transition: all: property <font-size-adjust> from [0] to [1.2] at (1.5) should be [1.8] -PASS CSS Animations: property <font-size-adjust> from [0] to [1.2] at (-2) should be [0] -PASS CSS Animations: property <font-size-adjust> from [0] to [1.2] at (-0.3) should be [0] -PASS CSS Animations: property <font-size-adjust> from [0] to [1.2] at (0) should be [0] -PASS CSS Animations: property <font-size-adjust> from [0] to [1.2] at (0.3) should be [0.36] -PASS CSS Animations: property <font-size-adjust> from [0] to [1.2] at (0.6) should be [0.72] -PASS CSS Animations: property <font-size-adjust> from [0] to [1.2] at (1) should be [1.2] -PASS CSS Animations: property <font-size-adjust> from [0] to [1.2] at (1.5) should be [1.8] -PASS Web Animations: property <font-size-adjust> from [0] to [1.2] at (-2) should be [0] -PASS Web Animations: property <font-size-adjust> from [0] to [1.2] at (-0.3) should be [0] -PASS Web Animations: property <font-size-adjust> from [0] to [1.2] at (0) should be [0] -PASS Web Animations: property <font-size-adjust> from [0] to [1.2] at (0.3) should be [0.36] -PASS Web Animations: property <font-size-adjust> from [0] to [1.2] at (0.6) should be [0.72] -PASS Web Animations: property <font-size-adjust> from [0] to [1.2] at (1) should be [1.2] -PASS Web Animations: property <font-size-adjust> from [0] to [1.2] at (1.5) should be [1.8] -FAIL CSS Transitions: property <font-size-adjust> from [cap-height 0] to [cap-height 1.2] at (-2) should be [cap-height 0] assert_equals: expected "cap - height 0 " but got "0 " -FAIL CSS Transitions: property <font-size-adjust> from [cap-height 0] to [cap-height 1.2] at (-0.3) should be [cap-height 0] assert_equals: expected "cap - height 0 " but got "0 " -FAIL CSS Transitions: property <font-size-adjust> from [cap-height 0] to [cap-height 1.2] at (0) should be [cap-height 0] assert_equals: expected "cap - height 0 " but got "0 " -FAIL CSS Transitions: property <font-size-adjust> from [cap-height 0] to [cap-height 1.2] at (0.3) should be [cap-height 0.36] assert_equals: expected "cap - height 0.36 " but got "0.36 " -FAIL CSS Transitions: property <font-size-adjust> from [cap-height 0] to [cap-height 1.2] at (0.6) should be [cap-height 0.72] assert_equals: expected "cap - height 0.72 " but got "0.72 " -FAIL CSS Transitions: property <font-size-adjust> from [cap-height 0] to [cap-height 1.2] at (1) should be [cap-height 1.2] assert_equals: expected "cap - height 1.2 " but got "1.2 " -FAIL CSS Transitions: property <font-size-adjust> from [cap-height 0] to [cap-height 1.2] at (1.5) should be [cap-height 1.8] assert_equals: expected "cap - height 1.8 " but got "1.8 " -FAIL CSS Transitions with transition: all: property <font-size-adjust> from [cap-height 0] to [cap-height 1.2] at (-2) should be [cap-height 0] assert_equals: expected "cap - height 0 " but got "0 " -FAIL CSS Transitions with transition: all: property <font-size-adjust> from [cap-height 0] to [cap-height 1.2] at (-0.3) should be [cap-height 0] assert_equals: expected "cap - height 0 " but got "0 " -FAIL CSS Transitions with transition: all: property <font-size-adjust> from [cap-height 0] to [cap-height 1.2] at (0) should be [cap-height 0] assert_equals: expected "cap - height 0 " but got "0 " -FAIL CSS Transitions with transition: all: property <font-size-adjust> from [cap-height 0] to [cap-height 1.2] at (0.3) should be [cap-height 0.36] assert_equals: expected "cap - height 0.36 " but got "0.36 " -FAIL CSS Transitions with transition: all: property <font-size-adjust> from [cap-height 0] to [cap-height 1.2] at (0.6) should be [cap-height 0.72] assert_equals: expected "cap - height 0.72 " but got "0.72 " -FAIL CSS Transitions with transition: all: property <font-size-adjust> from [cap-height 0] to [cap-height 1.2] at (1) should be [cap-height 1.2] assert_equals: expected "cap - height 1.2 " but got "1.2 " -FAIL CSS Transitions with transition: all: property <font-size-adjust> from [cap-height 0] to [cap-height 1.2] at (1.5) should be [cap-height 1.8] assert_equals: expected "cap - height 1.8 " but got "1.8 " -PASS CSS Animations: property <font-size-adjust> from [cap-height 0] to [cap-height 1.2] at (-2) should be [cap-height 0] -PASS CSS Animations: property <font-size-adjust> from [cap-height 0] to [cap-height 1.2] at (-0.3) should be [cap-height 0] -PASS CSS Animations: property <font-size-adjust> from [cap-height 0] to [cap-height 1.2] at (0) should be [cap-height 0] -FAIL CSS Animations: property <font-size-adjust> from [cap-height 0] to [cap-height 1.2] at (0.3) should be [cap-height 0.36] assert_equals: expected "cap - height 0.36 " but got "cap - height 0 " -FAIL CSS Animations: property <font-size-adjust> from [cap-height 0] to [cap-height 1.2] at (0.6) should be [cap-height 0.72] assert_equals: expected "cap - height 0.72 " but got "cap - height 1.2 " -PASS CSS Animations: property <font-size-adjust> from [cap-height 0] to [cap-height 1.2] at (1) should be [cap-height 1.2] -FAIL CSS Animations: property <font-size-adjust> from [cap-height 0] to [cap-height 1.2] at (1.5) should be [cap-height 1.8] assert_equals: expected "cap - height 1.8 " but got "cap - height 1.2 " -PASS Web Animations: property <font-size-adjust> from [cap-height 0] to [cap-height 1.2] at (-2) should be [cap-height 0] -PASS Web Animations: property <font-size-adjust> from [cap-height 0] to [cap-height 1.2] at (-0.3) should be [cap-height 0] -PASS Web Animations: property <font-size-adjust> from [cap-height 0] to [cap-height 1.2] at (0) should be [cap-height 0] -FAIL Web Animations: property <font-size-adjust> from [cap-height 0] to [cap-height 1.2] at (0.3) should be [cap-height 0.36] assert_equals: expected "cap - height 0.36 " but got "cap - height 0 " -FAIL Web Animations: property <font-size-adjust> from [cap-height 0] to [cap-height 1.2] at (0.6) should be [cap-height 0.72] assert_equals: expected "cap - height 0.72 " but got "cap - height 1.2 " -PASS Web Animations: property <font-size-adjust> from [cap-height 0] to [cap-height 1.2] at (1) should be [cap-height 1.2] -FAIL Web Animations: property <font-size-adjust> from [cap-height 0] to [cap-height 1.2] at (1.5) should be [cap-height 1.8] assert_equals: expected "cap - height 1.8 " but got "cap - height 1.2 " -PASS CSS Transitions: property <font-size-adjust> from [none] to [1.2] at (-0.3) should be [none] -PASS CSS Transitions: property <font-size-adjust> from [none] to [1.2] at (0) should be [none] -PASS CSS Transitions: property <font-size-adjust> from [none] to [1.2] at (0.3) should be [none] -PASS CSS Transitions: property <font-size-adjust> from [none] to [1.2] at (0.5) should be [1.2] -PASS CSS Transitions: property <font-size-adjust> from [none] to [1.2] at (0.6) should be [1.2] -PASS CSS Transitions: property <font-size-adjust> from [none] to [1.2] at (1) should be [1.2] -PASS CSS Transitions: property <font-size-adjust> from [none] to [1.2] at (1.5) should be [1.2] -PASS CSS Transitions with transition: all: property <font-size-adjust> from [none] to [1.2] at (-0.3) should be [1.2] -PASS CSS Transitions with transition: all: property <font-size-adjust> from [none] to [1.2] at (0) should be [1.2] -PASS CSS Transitions with transition: all: property <font-size-adjust> from [none] to [1.2] at (0.3) should be [1.2] -PASS CSS Transitions with transition: all: property <font-size-adjust> from [none] to [1.2] at (0.5) should be [1.2] -PASS CSS Transitions with transition: all: property <font-size-adjust> from [none] to [1.2] at (0.6) should be [1.2] -PASS CSS Transitions with transition: all: property <font-size-adjust> from [none] to [1.2] at (1) should be [1.2] -PASS CSS Transitions with transition: all: property <font-size-adjust> from [none] to [1.2] at (1.5) should be [1.2] -PASS CSS Animations: property <font-size-adjust> from [none] to [1.2] at (-0.3) should be [none] -PASS CSS Animations: property <font-size-adjust> from [none] to [1.2] at (0) should be [none] -PASS CSS Animations: property <font-size-adjust> from [none] to [1.2] at (0.3) should be [none] -PASS CSS Animations: property <font-size-adjust> from [none] to [1.2] at (0.5) should be [1.2] -PASS CSS Animations: property <font-size-adjust> from [none] to [1.2] at (0.6) should be [1.2] -PASS CSS Animations: property <font-size-adjust> from [none] to [1.2] at (1) should be [1.2] -PASS CSS Animations: property <font-size-adjust> from [none] to [1.2] at (1.5) should be [1.2] -PASS Web Animations: property <font-size-adjust> from [none] to [1.2] at (-0.3) should be [none] -PASS Web Animations: property <font-size-adjust> from [none] to [1.2] at (0) should be [none] -PASS Web Animations: property <font-size-adjust> from [none] to [1.2] at (0.3) should be [none] -PASS Web Animations: property <font-size-adjust> from [none] to [1.2] at (0.5) should be [1.2] -PASS Web Animations: property <font-size-adjust> from [none] to [1.2] at (0.6) should be [1.2] -PASS Web Animations: property <font-size-adjust> from [none] to [1.2] at (1) should be [1.2] -PASS Web Animations: property <font-size-adjust> from [none] to [1.2] at (1.5) should be [1.2] -PASS CSS Transitions: property <font-size-adjust> from [none] to [cap-height 1.2] at (-0.3) should be [none] -PASS CSS Transitions: property <font-size-adjust> from [none] to [cap-height 1.2] at (0) should be [none] -PASS CSS Transitions: property <font-size-adjust> from [none] to [cap-height 1.2] at (0.3) should be [none] -PASS CSS Transitions: property <font-size-adjust> from [none] to [cap-height 1.2] at (0.5) should be [cap-height 1.2] -PASS CSS Transitions: property <font-size-adjust> from [none] to [cap-height 1.2] at (0.6) should be [cap-height 1.2] -PASS CSS Transitions: property <font-size-adjust> from [none] to [cap-height 1.2] at (1) should be [cap-height 1.2] -PASS CSS Transitions: property <font-size-adjust> from [none] to [cap-height 1.2] at (1.5) should be [cap-height 1.2] -PASS CSS Transitions with transition: all: property <font-size-adjust> from [none] to [cap-height 1.2] at (-0.3) should be [cap-height 1.2] -PASS CSS Transitions with transition: all: property <font-size-adjust> from [none] to [cap-height 1.2] at (0) should be [cap-height 1.2] -PASS CSS Transitions with transition: all: property <font-size-adjust> from [none] to [cap-height 1.2] at (0.3) should be [cap-height 1.2] -PASS CSS Transitions with transition: all: property <font-size-adjust> from [none] to [cap-height 1.2] at (0.5) should be [cap-height 1.2] -PASS CSS Transitions with transition: all: property <font-size-adjust> from [none] to [cap-height 1.2] at (0.6) should be [cap-height 1.2] -PASS CSS Transitions with transition: all: property <font-size-adjust> from [none] to [cap-height 1.2] at (1) should be [cap-height 1.2] -PASS CSS Transitions with transition: all: property <font-size-adjust> from [none] to [cap-height 1.2] at (1.5) should be [cap-height 1.2] -PASS CSS Animations: property <font-size-adjust> from [none] to [cap-height 1.2] at (-0.3) should be [none] -PASS CSS Animations: property <font-size-adjust> from [none] to [cap-height 1.2] at (0) should be [none] -PASS CSS Animations: property <font-size-adjust> from [none] to [cap-height 1.2] at (0.3) should be [none] -PASS CSS Animations: property <font-size-adjust> from [none] to [cap-height 1.2] at (0.5) should be [cap-height 1.2] -PASS CSS Animations: property <font-size-adjust> from [none] to [cap-height 1.2] at (0.6) should be [cap-height 1.2] -PASS CSS Animations: property <font-size-adjust> from [none] to [cap-height 1.2] at (1) should be [cap-height 1.2] -PASS CSS Animations: property <font-size-adjust> from [none] to [cap-height 1.2] at (1.5) should be [cap-height 1.2] -PASS Web Animations: property <font-size-adjust> from [none] to [cap-height 1.2] at (-0.3) should be [none] -PASS Web Animations: property <font-size-adjust> from [none] to [cap-height 1.2] at (0) should be [none] -PASS Web Animations: property <font-size-adjust> from [none] to [cap-height 1.2] at (0.3) should be [none] -PASS Web Animations: property <font-size-adjust> from [none] to [cap-height 1.2] at (0.5) should be [cap-height 1.2] -PASS Web Animations: property <font-size-adjust> from [none] to [cap-height 1.2] at (0.6) should be [cap-height 1.2] -PASS Web Animations: property <font-size-adjust> from [none] to [cap-height 1.2] at (1) should be [cap-height 1.2] -PASS Web Animations: property <font-size-adjust> from [none] to [cap-height 1.2] at (1.5) should be [cap-height 1.2] -PASS CSS Transitions: property <font-size-adjust> from [0.2] to [1.2] at (-2) should be [0] -PASS CSS Transitions: property <font-size-adjust> from [0.2] to [1.2] at (-0.3) should be [0] -PASS CSS Transitions: property <font-size-adjust> from [0.2] to [1.2] at (0) should be [0.2] -PASS CSS Transitions: property <font-size-adjust> from [0.2] to [1.2] at (0.3) should be [0.5] -PASS CSS Transitions: property <font-size-adjust> from [0.2] to [1.2] at (0.6) should be [0.8] -PASS CSS Transitions: property <font-size-adjust> from [0.2] to [1.2] at (1) should be [1.2] -PASS CSS Transitions: property <font-size-adjust> from [0.2] to [1.2] at (1.5) should be [1.7] -PASS CSS Transitions with transition: all: property <font-size-adjust> from [0.2] to [1.2] at (-2) should be [0] -PASS CSS Transitions with transition: all: property <font-size-adjust> from [0.2] to [1.2] at (-0.3) should be [0] -PASS CSS Transitions with transition: all: property <font-size-adjust> from [0.2] to [1.2] at (0) should be [0.2] -PASS CSS Transitions with transition: all: property <font-size-adjust> from [0.2] to [1.2] at (0.3) should be [0.5] -PASS CSS Transitions with transition: all: property <font-size-adjust> from [0.2] to [1.2] at (0.6) should be [0.8] -PASS CSS Transitions with transition: all: property <font-size-adjust> from [0.2] to [1.2] at (1) should be [1.2] -PASS CSS Transitions with transition: all: property <font-size-adjust> from [0.2] to [1.2] at (1.5) should be [1.7] -PASS CSS Animations: property <font-size-adjust> from [0.2] to [1.2] at (-2) should be [0] -PASS CSS Animations: property <font-size-adjust> from [0.2] to [1.2] at (-0.3) should be [0] -PASS CSS Animations: property <font-size-adjust> from [0.2] to [1.2] at (0) should be [0.2] -PASS CSS Animations: property <font-size-adjust> from [0.2] to [1.2] at (0.3) should be [0.5] -PASS CSS Animations: property <font-size-adjust> from [0.2] to [1.2] at (0.6) should be [0.8] -PASS CSS Animations: property <font-size-adjust> from [0.2] to [1.2] at (1) should be [1.2] -PASS CSS Animations: property <font-size-adjust> from [0.2] to [1.2] at (1.5) should be [1.7] -PASS Web Animations: property <font-size-adjust> from [0.2] to [1.2] at (-2) should be [0] -PASS Web Animations: property <font-size-adjust> from [0.2] to [1.2] at (-0.3) should be [0] -PASS Web Animations: property <font-size-adjust> from [0.2] to [1.2] at (0) should be [0.2] -PASS Web Animations: property <font-size-adjust> from [0.2] to [1.2] at (0.3) should be [0.5] -PASS Web Animations: property <font-size-adjust> from [0.2] to [1.2] at (0.6) should be [0.8] -PASS Web Animations: property <font-size-adjust> from [0.2] to [1.2] at (1) should be [1.2] -PASS Web Animations: property <font-size-adjust> from [0.2] to [1.2] at (1.5) should be [1.7] -FAIL CSS Transitions: property <font-size-adjust> from [ch-width 0.2] to [ch-width 1.2] at (-2) should be [ch-width 0] assert_equals: expected "ch - width 0 " but got "0 " -FAIL CSS Transitions: property <font-size-adjust> from [ch-width 0.2] to [ch-width 1.2] at (-0.3) should be [ch-width 0] assert_equals: expected "ch - width 0 " but got "0 " -FAIL CSS Transitions: property <font-size-adjust> from [ch-width 0.2] to [ch-width 1.2] at (0) should be [ch-width 0.2] assert_equals: expected "ch - width 0.2 " but got "0.2 " -FAIL CSS Transitions: property <font-size-adjust> from [ch-width 0.2] to [ch-width 1.2] at (0.3) should be [ch-width 0.5] assert_equals: expected "ch - width 0.5 " but got "0.5 " -FAIL CSS Transitions: property <font-size-adjust> from [ch-width 0.2] to [ch-width 1.2] at (0.6) should be [ch-width 0.8] assert_equals: expected "ch - width 0.8 " but got "0.8 " -FAIL CSS Transitions: property <font-size-adjust> from [ch-width 0.2] to [ch-width 1.2] at (1) should be [ch-width 1.2] assert_equals: expected "ch - width 1.2 " but got "1.2 " -FAIL CSS Transitions: property <font-size-adjust> from [ch-width 0.2] to [ch-width 1.2] at (1.5) should be [ch-width 1.7] assert_equals: expected "ch - width 1.7 " but got "1.7 " -FAIL CSS Transitions with transition: all: property <font-size-adjust> from [ch-width 0.2] to [ch-width 1.2] at (-2) should be [ch-width 0] assert_equals: expected "ch - width 0 " but got "0 " -FAIL CSS Transitions with transition: all: property <font-size-adjust> from [ch-width 0.2] to [ch-width 1.2] at (-0.3) should be [ch-width 0] assert_equals: expected "ch - width 0 " but got "0 " -FAIL CSS Transitions with transition: all: property <font-size-adjust> from [ch-width 0.2] to [ch-width 1.2] at (0) should be [ch-width 0.2] assert_equals: expected "ch - width 0.2 " but got "0.2 " -FAIL CSS Transitions with transition: all: property <font-size-adjust> from [ch-width 0.2] to [ch-width 1.2] at (0.3) should be [ch-width 0.5] assert_equals: expected "ch - width 0.5 " but got "0.5 " -FAIL CSS Transitions with transition: all: property <font-size-adjust> from [ch-width 0.2] to [ch-width 1.2] at (0.6) should be [ch-width 0.8] assert_equals: expected "ch - width 0.8 " but got "0.8 " -FAIL CSS Transitions with transition: all: property <font-size-adjust> from [ch-width 0.2] to [ch-width 1.2] at (1) should be [ch-width 1.2] assert_equals: expected "ch - width 1.2 " but got "1.2 " -FAIL CSS Transitions with transition: all: property <font-size-adjust> from [ch-width 0.2] to [ch-width 1.2] at (1.5) should be [ch-width 1.7] assert_equals: expected "ch - width 1.7 " but got "1.7 " -FAIL CSS Animations: property <font-size-adjust> from [ch-width 0.2] to [ch-width 1.2] at (-2) should be [ch-width 0] assert_equals: expected "ch - width 0 " but got "ch - width 0.2 " -FAIL CSS Animations: property <font-size-adjust> from [ch-width 0.2] to [ch-width 1.2] at (-0.3) should be [ch-width 0] assert_equals: expected "ch - width 0 " but got "ch - width 0.2 " -PASS CSS Animations: property <font-size-adjust> from [ch-width 0.2] to [ch-width 1.2] at (0) should be [ch-width 0.2] -FAIL CSS Animations: property <font-size-adjust> from [ch-width 0.2] to [ch-width 1.2] at (0.3) should be [ch-width 0.5] assert_equals: expected "ch - width 0.5 " but got "ch - width 0.2 " -FAIL CSS Animations: property <font-size-adjust> from [ch-width 0.2] to [ch-width 1.2] at (0.6) should be [ch-width 0.8] assert_equals: expected "ch - width 0.8 " but got "ch - width 1.2 " -PASS CSS Animations: property <font-size-adjust> from [ch-width 0.2] to [ch-width 1.2] at (1) should be [ch-width 1.2] -FAIL CSS Animations: property <font-size-adjust> from [ch-width 0.2] to [ch-width 1.2] at (1.5) should be [ch-width 1.7] assert_equals: expected "ch - width 1.7 " but got "ch - width 1.2 " -FAIL Web Animations: property <font-size-adjust> from [ch-width 0.2] to [ch-width 1.2] at (-2) should be [ch-width 0] assert_equals: expected "ch - width 0 " but got "ch - width 0.2 " -FAIL Web Animations: property <font-size-adjust> from [ch-width 0.2] to [ch-width 1.2] at (-0.3) should be [ch-width 0] assert_equals: expected "ch - width 0 " but got "ch - width 0.2 " -PASS Web Animations: property <font-size-adjust> from [ch-width 0.2] to [ch-width 1.2] at (0) should be [ch-width 0.2] -FAIL Web Animations: property <font-size-adjust> from [ch-width 0.2] to [ch-width 1.2] at (0.3) should be [ch-width 0.5] assert_equals: expected "ch - width 0.5 " but got "ch - width 0.2 " -FAIL Web Animations: property <font-size-adjust> from [ch-width 0.2] to [ch-width 1.2] at (0.6) should be [ch-width 0.8] assert_equals: expected "ch - width 0.8 " but got "ch - width 1.2 " -PASS Web Animations: property <font-size-adjust> from [ch-width 0.2] to [ch-width 1.2] at (1) should be [ch-width 1.2] -FAIL Web Animations: property <font-size-adjust> from [ch-width 0.2] to [ch-width 1.2] at (1.5) should be [ch-width 1.7] assert_equals: expected "ch - width 1.7 " but got "ch - width 1.2 " -FAIL CSS Transitions: property <font-size-adjust> from [ex-height 0.2] to [cap-height 1.2] at (-0.3) should be [ex-height 0.2] assert_equals: expected "0.2 " but got "0 " -PASS CSS Transitions: property <font-size-adjust> from [ex-height 0.2] to [cap-height 1.2] at (0) should be [ex-height 0.2] -FAIL CSS Transitions: property <font-size-adjust> from [ex-height 0.2] to [cap-height 1.2] at (0.3) should be [ex-height 0.2] assert_equals: expected "0.2 " but got "0.5 " -FAIL CSS Transitions: property <font-size-adjust> from [ex-height 0.2] to [cap-height 1.2] at (0.5) should be [cap-height 1.2] assert_equals: expected "cap - height 1.2 " but got "0.7 " -FAIL CSS Transitions: property <font-size-adjust> from [ex-height 0.2] to [cap-height 1.2] at (0.6) should be [cap-height 1.2] assert_equals: expected "cap - height 1.2 " but got "0.8 " -FAIL CSS Transitions: property <font-size-adjust> from [ex-height 0.2] to [cap-height 1.2] at (1) should be [cap-height 1.2] assert_equals: expected "cap - height 1.2 " but got "1.2 " -FAIL CSS Transitions: property <font-size-adjust> from [ex-height 0.2] to [cap-height 1.2] at (1.5) should be [cap-height 1.2] assert_equals: expected "cap - height 1.2 " but got "1.7 " -FAIL CSS Transitions with transition: all: property <font-size-adjust> from [ex-height 0.2] to [cap-height 1.2] at (-0.3) should be [cap-height 1.2] assert_equals: expected "cap - height 1.2 " but got "0 " -FAIL CSS Transitions with transition: all: property <font-size-adjust> from [ex-height 0.2] to [cap-height 1.2] at (0) should be [cap-height 1.2] assert_equals: expected "cap - height 1.2 " but got "0.2 " -FAIL CSS Transitions with transition: all: property <font-size-adjust> from [ex-height 0.2] to [cap-height 1.2] at (0.3) should be [cap-height 1.2] assert_equals: expected "cap - height 1.2 " but got "0.5 " -FAIL CSS Transitions with transition: all: property <font-size-adjust> from [ex-height 0.2] to [cap-height 1.2] at (0.5) should be [cap-height 1.2] assert_equals: expected "cap - height 1.2 " but got "0.7 " -FAIL CSS Transitions with transition: all: property <font-size-adjust> from [ex-height 0.2] to [cap-height 1.2] at (0.6) should be [cap-height 1.2] assert_equals: expected "cap - height 1.2 " but got "0.8 " -FAIL CSS Transitions with transition: all: property <font-size-adjust> from [ex-height 0.2] to [cap-height 1.2] at (1) should be [cap-height 1.2] assert_equals: expected "cap - height 1.2 " but got "1.2 " -FAIL CSS Transitions with transition: all: property <font-size-adjust> from [ex-height 0.2] to [cap-height 1.2] at (1.5) should be [cap-height 1.2] assert_equals: expected "cap - height 1.2 " but got "1.7 " -PASS CSS Animations: property <font-size-adjust> from [ex-height 0.2] to [cap-height 1.2] at (-0.3) should be [ex-height 0.2] -PASS CSS Animations: property <font-size-adjust> from [ex-height 0.2] to [cap-height 1.2] at (0) should be [ex-height 0.2] -PASS CSS Animations: property <font-size-adjust> from [ex-height 0.2] to [cap-height 1.2] at (0.3) should be [ex-height 0.2] -PASS CSS Animations: property <font-size-adjust> from [ex-height 0.2] to [cap-height 1.2] at (0.5) should be [cap-height 1.2] -PASS CSS Animations: property <font-size-adjust> from [ex-height 0.2] to [cap-height 1.2] at (0.6) should be [cap-height 1.2] -PASS CSS Animations: property <font-size-adjust> from [ex-height 0.2] to [cap-height 1.2] at (1) should be [cap-height 1.2] -PASS CSS Animations: property <font-size-adjust> from [ex-height 0.2] to [cap-height 1.2] at (1.5) should be [cap-height 1.2] -PASS Web Animations: property <font-size-adjust> from [ex-height 0.2] to [cap-height 1.2] at (-0.3) should be [ex-height 0.2] -PASS Web Animations: property <font-size-adjust> from [ex-height 0.2] to [cap-height 1.2] at (0) should be [ex-height 0.2] -PASS Web Animations: property <font-size-adjust> from [ex-height 0.2] to [cap-height 1.2] at (0.3) should be [ex-height 0.2] -PASS Web Animations: property <font-size-adjust> from [ex-height 0.2] to [cap-height 1.2] at (0.5) should be [cap-height 1.2] -PASS Web Animations: property <font-size-adjust> from [ex-height 0.2] to [cap-height 1.2] at (0.6) should be [cap-height 1.2] -PASS Web Animations: property <font-size-adjust> from [ex-height 0.2] to [cap-height 1.2] at (1) should be [cap-height 1.2] -PASS Web Animations: property <font-size-adjust> from [ex-height 0.2] to [cap-height 1.2] at (1.5) should be [cap-height 1.2] -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/external/wpt/css/css-fonts/animations/font-size-adjust-interpolation.html.ini b/third_party/blink/web_tests/external/wpt/css/css-fonts/animations/font-size-adjust-interpolation.html.ini deleted file mode 100644 index c973590..0000000 --- a/third_party/blink/web_tests/external/wpt/css/css-fonts/animations/font-size-adjust-interpolation.html.ini +++ /dev/null
@@ -1,420 +0,0 @@ -[font-size-adjust-interpolation.html] - [CSS Animations: property <font-size-adjust> from [cap-height 0\] to [cap-height 1.2\] at (-0.3) should be [cap-height 0\]] - expected: FAIL - - [CSS Animations: property <font-size-adjust> from [cap-height 0\] to [cap-height 1.2\] at (-2) should be [cap-height 0\]] - expected: FAIL - - [CSS Animations: property <font-size-adjust> from [cap-height 0\] to [cap-height 1.2\] at (0) should be [cap-height 0\]] - expected: FAIL - - [CSS Animations: property <font-size-adjust> from [cap-height 0\] to [cap-height 1.2\] at (0.3) should be [cap-height 0.36\]] - expected: FAIL - - [CSS Animations: property <font-size-adjust> from [cap-height 0\] to [cap-height 1.2\] at (0.6) should be [cap-height 0.72\]] - expected: FAIL - - [CSS Animations: property <font-size-adjust> from [cap-height 0\] to [cap-height 1.2\] at (1) should be [cap-height 1.2\]] - expected: FAIL - - [CSS Animations: property <font-size-adjust> from [cap-height 0\] to [cap-height 1.2\] at (1.5) should be [cap-height 1.8\]] - expected: FAIL - - [CSS Animations: property <font-size-adjust> from [ch-width 0.2\] to [ch-width 1.2\] at (-0.3) should be [ch-width 0\]] - expected: FAIL - - [CSS Animations: property <font-size-adjust> from [ch-width 0.2\] to [ch-width 1.2\] at (-2) should be [ch-width 0\]] - expected: FAIL - - [CSS Animations: property <font-size-adjust> from [ch-width 0.2\] to [ch-width 1.2\] at (0) should be [ch-width 0.2\]] - expected: FAIL - - [CSS Animations: property <font-size-adjust> from [ch-width 0.2\] to [ch-width 1.2\] at (0.3) should be [ch-width 0.5\]] - expected: FAIL - - [CSS Animations: property <font-size-adjust> from [ch-width 0.2\] to [ch-width 1.2\] at (0.6) should be [ch-width 0.8\]] - expected: FAIL - - [CSS Animations: property <font-size-adjust> from [ch-width 0.2\] to [ch-width 1.2\] at (1) should be [ch-width 1.2\]] - expected: FAIL - - [CSS Animations: property <font-size-adjust> from [ch-width 0.2\] to [ch-width 1.2\] at (1.5) should be [ch-width 1.7\]] - expected: FAIL - - [CSS Animations: property <font-size-adjust> from [ex-height 0.2\] to [cap-height 1.2\] at (-0.3) should be [ex-height 0.2\]] - expected: FAIL - - [CSS Animations: property <font-size-adjust> from [ex-height 0.2\] to [cap-height 1.2\] at (0) should be [ex-height 0.2\]] - expected: FAIL - - [CSS Animations: property <font-size-adjust> from [ex-height 0.2\] to [cap-height 1.2\] at (0.3) should be [ex-height 0.2\]] - expected: FAIL - - [CSS Animations: property <font-size-adjust> from [ex-height 0.2\] to [cap-height 1.2\] at (0.5) should be [cap-height 1.2\]] - expected: FAIL - - [CSS Animations: property <font-size-adjust> from [ex-height 0.2\] to [cap-height 1.2\] at (0.6) should be [cap-height 1.2\]] - expected: FAIL - - [CSS Animations: property <font-size-adjust> from [ex-height 0.2\] to [cap-height 1.2\] at (1) should be [cap-height 1.2\]] - expected: FAIL - - [CSS Animations: property <font-size-adjust> from [ex-height 0.2\] to [cap-height 1.2\] at (1.5) should be [cap-height 1.2\]] - expected: FAIL - - [CSS Animations: property <font-size-adjust> from [initial\] to [cap-height 2\] at (-0.3) should be [initial\]] - expected: FAIL - - [CSS Animations: property <font-size-adjust> from [initial\] to [cap-height 2\] at (0) should be [initial\]] - expected: FAIL - - [CSS Animations: property <font-size-adjust> from [initial\] to [cap-height 2\] at (0.3) should be [initial\]] - expected: FAIL - - [CSS Animations: property <font-size-adjust> from [initial\] to [cap-height 2\] at (0.5) should be [cap-height 2\]] - expected: FAIL - - [CSS Animations: property <font-size-adjust> from [initial\] to [cap-height 2\] at (0.6) should be [cap-height 2\]] - expected: FAIL - - [CSS Animations: property <font-size-adjust> from [initial\] to [cap-height 2\] at (1) should be [cap-height 2\]] - expected: FAIL - - [CSS Animations: property <font-size-adjust> from [initial\] to [cap-height 2\] at (1.5) should be [cap-height 2\]] - expected: FAIL - - [CSS Animations: property <font-size-adjust> from [none\] to [cap-height 1.2\] at (-0.3) should be [none\]] - expected: FAIL - - [CSS Animations: property <font-size-adjust> from [none\] to [cap-height 1.2\] at (0) should be [none\]] - expected: FAIL - - [CSS Animations: property <font-size-adjust> from [none\] to [cap-height 1.2\] at (0.3) should be [none\]] - expected: FAIL - - [CSS Animations: property <font-size-adjust> from [none\] to [cap-height 1.2\] at (0.5) should be [cap-height 1.2\]] - expected: FAIL - - [CSS Animations: property <font-size-adjust> from [none\] to [cap-height 1.2\] at (0.6) should be [cap-height 1.2\]] - expected: FAIL - - [CSS Animations: property <font-size-adjust> from [none\] to [cap-height 1.2\] at (1) should be [cap-height 1.2\]] - expected: FAIL - - [CSS Animations: property <font-size-adjust> from [none\] to [cap-height 1.2\] at (1.5) should be [cap-height 1.2\]] - expected: FAIL - - [CSS Transitions with transition: all: property <font-size-adjust> from [cap-height 0\] to [cap-height 1.2\] at (-0.3) should be [cap-height 0\]] - expected: FAIL - - [CSS Transitions with transition: all: property <font-size-adjust> from [cap-height 0\] to [cap-height 1.2\] at (-2) should be [cap-height 0\]] - expected: FAIL - - [CSS Transitions with transition: all: property <font-size-adjust> from [cap-height 0\] to [cap-height 1.2\] at (0) should be [cap-height 0\]] - expected: FAIL - - [CSS Transitions with transition: all: property <font-size-adjust> from [cap-height 0\] to [cap-height 1.2\] at (0.3) should be [cap-height 0.36\]] - expected: FAIL - - [CSS Transitions with transition: all: property <font-size-adjust> from [cap-height 0\] to [cap-height 1.2\] at (0.6) should be [cap-height 0.72\]] - expected: FAIL - - [CSS Transitions with transition: all: property <font-size-adjust> from [cap-height 0\] to [cap-height 1.2\] at (1) should be [cap-height 1.2\]] - expected: FAIL - - [CSS Transitions with transition: all: property <font-size-adjust> from [cap-height 0\] to [cap-height 1.2\] at (1.5) should be [cap-height 1.8\]] - expected: FAIL - - [CSS Transitions with transition: all: property <font-size-adjust> from [ch-width 0.2\] to [ch-width 1.2\] at (-0.3) should be [ch-width 0\]] - expected: FAIL - - [CSS Transitions with transition: all: property <font-size-adjust> from [ch-width 0.2\] to [ch-width 1.2\] at (-2) should be [ch-width 0\]] - expected: FAIL - - [CSS Transitions with transition: all: property <font-size-adjust> from [ch-width 0.2\] to [ch-width 1.2\] at (0) should be [ch-width 0.2\]] - expected: FAIL - - [CSS Transitions with transition: all: property <font-size-adjust> from [ch-width 0.2\] to [ch-width 1.2\] at (0.3) should be [ch-width 0.5\]] - expected: FAIL - - [CSS Transitions with transition: all: property <font-size-adjust> from [ch-width 0.2\] to [ch-width 1.2\] at (0.6) should be [ch-width 0.8\]] - expected: FAIL - - [CSS Transitions with transition: all: property <font-size-adjust> from [ch-width 0.2\] to [ch-width 1.2\] at (1) should be [ch-width 1.2\]] - expected: FAIL - - [CSS Transitions with transition: all: property <font-size-adjust> from [ch-width 0.2\] to [ch-width 1.2\] at (1.5) should be [ch-width 1.7\]] - expected: FAIL - - [CSS Transitions with transition: all: property <font-size-adjust> from [ex-height 0.2\] to [cap-height 1.2\] at (-0.3) should be [cap-height 1.2\]] - expected: FAIL - - [CSS Transitions with transition: all: property <font-size-adjust> from [ex-height 0.2\] to [cap-height 1.2\] at (0) should be [cap-height 1.2\]] - expected: FAIL - - [CSS Transitions with transition: all: property <font-size-adjust> from [ex-height 0.2\] to [cap-height 1.2\] at (0.3) should be [cap-height 1.2\]] - expected: FAIL - - [CSS Transitions with transition: all: property <font-size-adjust> from [ex-height 0.2\] to [cap-height 1.2\] at (0.5) should be [cap-height 1.2\]] - expected: FAIL - - [CSS Transitions with transition: all: property <font-size-adjust> from [ex-height 0.2\] to [cap-height 1.2\] at (0.6) should be [cap-height 1.2\]] - expected: FAIL - - [CSS Transitions with transition: all: property <font-size-adjust> from [ex-height 0.2\] to [cap-height 1.2\] at (1) should be [cap-height 1.2\]] - expected: FAIL - - [CSS Transitions with transition: all: property <font-size-adjust> from [ex-height 0.2\] to [cap-height 1.2\] at (1.5) should be [cap-height 1.2\]] - expected: FAIL - - [CSS Transitions with transition: all: property <font-size-adjust> from [initial\] to [cap-height 2\] at (-0.3) should be [cap-height 2\]] - expected: FAIL - - [CSS Transitions with transition: all: property <font-size-adjust> from [initial\] to [cap-height 2\] at (0) should be [cap-height 2\]] - expected: FAIL - - [CSS Transitions with transition: all: property <font-size-adjust> from [initial\] to [cap-height 2\] at (0.3) should be [cap-height 2\]] - expected: FAIL - - [CSS Transitions with transition: all: property <font-size-adjust> from [initial\] to [cap-height 2\] at (0.5) should be [cap-height 2\]] - expected: FAIL - - [CSS Transitions with transition: all: property <font-size-adjust> from [initial\] to [cap-height 2\] at (0.6) should be [cap-height 2\]] - expected: FAIL - - [CSS Transitions with transition: all: property <font-size-adjust> from [initial\] to [cap-height 2\] at (1) should be [cap-height 2\]] - expected: FAIL - - [CSS Transitions with transition: all: property <font-size-adjust> from [initial\] to [cap-height 2\] at (1.5) should be [cap-height 2\]] - expected: FAIL - - [CSS Transitions with transition: all: property <font-size-adjust> from [none\] to [cap-height 1.2\] at (-0.3) should be [cap-height 1.2\]] - expected: FAIL - - [CSS Transitions with transition: all: property <font-size-adjust> from [none\] to [cap-height 1.2\] at (0) should be [cap-height 1.2\]] - expected: FAIL - - [CSS Transitions with transition: all: property <font-size-adjust> from [none\] to [cap-height 1.2\] at (0.3) should be [cap-height 1.2\]] - expected: FAIL - - [CSS Transitions with transition: all: property <font-size-adjust> from [none\] to [cap-height 1.2\] at (0.5) should be [cap-height 1.2\]] - expected: FAIL - - [CSS Transitions with transition: all: property <font-size-adjust> from [none\] to [cap-height 1.2\] at (0.6) should be [cap-height 1.2\]] - expected: FAIL - - [CSS Transitions with transition: all: property <font-size-adjust> from [none\] to [cap-height 1.2\] at (1) should be [cap-height 1.2\]] - expected: FAIL - - [CSS Transitions with transition: all: property <font-size-adjust> from [none\] to [cap-height 1.2\] at (1.5) should be [cap-height 1.2\]] - expected: FAIL - - [CSS Transitions: property <font-size-adjust> from [cap-height 0\] to [cap-height 1.2\] at (-0.3) should be [cap-height 0\]] - expected: FAIL - - [CSS Transitions: property <font-size-adjust> from [cap-height 0\] to [cap-height 1.2\] at (-2) should be [cap-height 0\]] - expected: FAIL - - [CSS Transitions: property <font-size-adjust> from [cap-height 0\] to [cap-height 1.2\] at (0) should be [cap-height 0\]] - expected: FAIL - - [CSS Transitions: property <font-size-adjust> from [cap-height 0\] to [cap-height 1.2\] at (0.3) should be [cap-height 0.36\]] - expected: FAIL - - [CSS Transitions: property <font-size-adjust> from [cap-height 0\] to [cap-height 1.2\] at (0.6) should be [cap-height 0.72\]] - expected: FAIL - - [CSS Transitions: property <font-size-adjust> from [cap-height 0\] to [cap-height 1.2\] at (1) should be [cap-height 1.2\]] - expected: FAIL - - [CSS Transitions: property <font-size-adjust> from [cap-height 0\] to [cap-height 1.2\] at (1.5) should be [cap-height 1.8\]] - expected: FAIL - - [CSS Transitions: property <font-size-adjust> from [ch-width 0.2\] to [ch-width 1.2\] at (-0.3) should be [ch-width 0\]] - expected: FAIL - - [CSS Transitions: property <font-size-adjust> from [ch-width 0.2\] to [ch-width 1.2\] at (-2) should be [ch-width 0\]] - expected: FAIL - - [CSS Transitions: property <font-size-adjust> from [ch-width 0.2\] to [ch-width 1.2\] at (0) should be [ch-width 0.2\]] - expected: FAIL - - [CSS Transitions: property <font-size-adjust> from [ch-width 0.2\] to [ch-width 1.2\] at (0.3) should be [ch-width 0.5\]] - expected: FAIL - - [CSS Transitions: property <font-size-adjust> from [ch-width 0.2\] to [ch-width 1.2\] at (0.6) should be [ch-width 0.8\]] - expected: FAIL - - [CSS Transitions: property <font-size-adjust> from [ch-width 0.2\] to [ch-width 1.2\] at (1) should be [ch-width 1.2\]] - expected: FAIL - - [CSS Transitions: property <font-size-adjust> from [ch-width 0.2\] to [ch-width 1.2\] at (1.5) should be [ch-width 1.7\]] - expected: FAIL - - [CSS Transitions: property <font-size-adjust> from [ex-height 0.2\] to [cap-height 1.2\] at (-0.3) should be [ex-height 0.2\]] - expected: FAIL - - [CSS Transitions: property <font-size-adjust> from [ex-height 0.2\] to [cap-height 1.2\] at (0) should be [ex-height 0.2\]] - expected: FAIL - - [CSS Transitions: property <font-size-adjust> from [ex-height 0.2\] to [cap-height 1.2\] at (0.3) should be [ex-height 0.2\]] - expected: FAIL - - [CSS Transitions: property <font-size-adjust> from [ex-height 0.2\] to [cap-height 1.2\] at (0.5) should be [cap-height 1.2\]] - expected: FAIL - - [CSS Transitions: property <font-size-adjust> from [ex-height 0.2\] to [cap-height 1.2\] at (0.6) should be [cap-height 1.2\]] - expected: FAIL - - [CSS Transitions: property <font-size-adjust> from [ex-height 0.2\] to [cap-height 1.2\] at (1) should be [cap-height 1.2\]] - expected: FAIL - - [CSS Transitions: property <font-size-adjust> from [ex-height 0.2\] to [cap-height 1.2\] at (1.5) should be [cap-height 1.2\]] - expected: FAIL - - [CSS Transitions: property <font-size-adjust> from [initial\] to [cap-height 2\] at (-0.3) should be [initial\]] - expected: FAIL - - [CSS Transitions: property <font-size-adjust> from [initial\] to [cap-height 2\] at (0) should be [initial\]] - expected: FAIL - - [CSS Transitions: property <font-size-adjust> from [initial\] to [cap-height 2\] at (0.3) should be [initial\]] - expected: FAIL - - [CSS Transitions: property <font-size-adjust> from [initial\] to [cap-height 2\] at (0.5) should be [cap-height 2\]] - expected: FAIL - - [CSS Transitions: property <font-size-adjust> from [initial\] to [cap-height 2\] at (0.6) should be [cap-height 2\]] - expected: FAIL - - [CSS Transitions: property <font-size-adjust> from [initial\] to [cap-height 2\] at (1) should be [cap-height 2\]] - expected: FAIL - - [CSS Transitions: property <font-size-adjust> from [initial\] to [cap-height 2\] at (1.5) should be [cap-height 2\]] - expected: FAIL - - [CSS Transitions: property <font-size-adjust> from [none\] to [cap-height 1.2\] at (-0.3) should be [none\]] - expected: FAIL - - [CSS Transitions: property <font-size-adjust> from [none\] to [cap-height 1.2\] at (0) should be [none\]] - expected: FAIL - - [CSS Transitions: property <font-size-adjust> from [none\] to [cap-height 1.2\] at (0.3) should be [none\]] - expected: FAIL - - [CSS Transitions: property <font-size-adjust> from [none\] to [cap-height 1.2\] at (0.5) should be [cap-height 1.2\]] - expected: FAIL - - [CSS Transitions: property <font-size-adjust> from [none\] to [cap-height 1.2\] at (0.6) should be [cap-height 1.2\]] - expected: FAIL - - [CSS Transitions: property <font-size-adjust> from [none\] to [cap-height 1.2\] at (1) should be [cap-height 1.2\]] - expected: FAIL - - [CSS Transitions: property <font-size-adjust> from [none\] to [cap-height 1.2\] at (1.5) should be [cap-height 1.2\]] - expected: FAIL - - [Web Animations: property <font-size-adjust> from [cap-height 0\] to [cap-height 1.2\] at (-0.3) should be [cap-height 0\]] - expected: FAIL - - [Web Animations: property <font-size-adjust> from [cap-height 0\] to [cap-height 1.2\] at (-2) should be [cap-height 0\]] - expected: FAIL - - [Web Animations: property <font-size-adjust> from [cap-height 0\] to [cap-height 1.2\] at (0) should be [cap-height 0\]] - expected: FAIL - - [Web Animations: property <font-size-adjust> from [cap-height 0\] to [cap-height 1.2\] at (0.3) should be [cap-height 0.36\]] - expected: FAIL - - [Web Animations: property <font-size-adjust> from [cap-height 0\] to [cap-height 1.2\] at (0.6) should be [cap-height 0.72\]] - expected: FAIL - - [Web Animations: property <font-size-adjust> from [cap-height 0\] to [cap-height 1.2\] at (1) should be [cap-height 1.2\]] - expected: FAIL - - [Web Animations: property <font-size-adjust> from [cap-height 0\] to [cap-height 1.2\] at (1.5) should be [cap-height 1.8\]] - expected: FAIL - - [Web Animations: property <font-size-adjust> from [ch-width 0.2\] to [ch-width 1.2\] at (-0.3) should be [ch-width 0\]] - expected: FAIL - - [Web Animations: property <font-size-adjust> from [ch-width 0.2\] to [ch-width 1.2\] at (-2) should be [ch-width 0\]] - expected: FAIL - - [Web Animations: property <font-size-adjust> from [ch-width 0.2\] to [ch-width 1.2\] at (0) should be [ch-width 0.2\]] - expected: FAIL - - [Web Animations: property <font-size-adjust> from [ch-width 0.2\] to [ch-width 1.2\] at (0.3) should be [ch-width 0.5\]] - expected: FAIL - - [Web Animations: property <font-size-adjust> from [ch-width 0.2\] to [ch-width 1.2\] at (0.6) should be [ch-width 0.8\]] - expected: FAIL - - [Web Animations: property <font-size-adjust> from [ch-width 0.2\] to [ch-width 1.2\] at (1) should be [ch-width 1.2\]] - expected: FAIL - - [Web Animations: property <font-size-adjust> from [ch-width 0.2\] to [ch-width 1.2\] at (1.5) should be [ch-width 1.7\]] - expected: FAIL - - [Web Animations: property <font-size-adjust> from [ex-height 0.2\] to [cap-height 1.2\] at (-0.3) should be [ex-height 0.2\]] - expected: FAIL - - [Web Animations: property <font-size-adjust> from [ex-height 0.2\] to [cap-height 1.2\] at (0) should be [ex-height 0.2\]] - expected: FAIL - - [Web Animations: property <font-size-adjust> from [ex-height 0.2\] to [cap-height 1.2\] at (0.3) should be [ex-height 0.2\]] - expected: FAIL - - [Web Animations: property <font-size-adjust> from [ex-height 0.2\] to [cap-height 1.2\] at (0.5) should be [cap-height 1.2\]] - expected: FAIL - - [Web Animations: property <font-size-adjust> from [ex-height 0.2\] to [cap-height 1.2\] at (0.6) should be [cap-height 1.2\]] - expected: FAIL - - [Web Animations: property <font-size-adjust> from [ex-height 0.2\] to [cap-height 1.2\] at (1) should be [cap-height 1.2\]] - expected: FAIL - - [Web Animations: property <font-size-adjust> from [ex-height 0.2\] to [cap-height 1.2\] at (1.5) should be [cap-height 1.2\]] - expected: FAIL - - [Web Animations: property <font-size-adjust> from [initial\] to [cap-height 2\] at (-0.3) should be [initial\]] - expected: FAIL - - [Web Animations: property <font-size-adjust> from [initial\] to [cap-height 2\] at (0) should be [initial\]] - expected: FAIL - - [Web Animations: property <font-size-adjust> from [initial\] to [cap-height 2\] at (0.3) should be [initial\]] - expected: FAIL - - [Web Animations: property <font-size-adjust> from [initial\] to [cap-height 2\] at (0.5) should be [cap-height 2\]] - expected: FAIL - - [Web Animations: property <font-size-adjust> from [initial\] to [cap-height 2\] at (0.6) should be [cap-height 2\]] - expected: FAIL - - [Web Animations: property <font-size-adjust> from [initial\] to [cap-height 2\] at (1) should be [cap-height 2\]] - expected: FAIL - - [Web Animations: property <font-size-adjust> from [initial\] to [cap-height 2\] at (1.5) should be [cap-height 2\]] - expected: FAIL - - [Web Animations: property <font-size-adjust> from [none\] to [cap-height 1.2\] at (-0.3) should be [none\]] - expected: FAIL - - [Web Animations: property <font-size-adjust> from [none\] to [cap-height 1.2\] at (0) should be [none\]] - expected: FAIL - - [Web Animations: property <font-size-adjust> from [none\] to [cap-height 1.2\] at (0.3) should be [none\]] - expected: FAIL - - [Web Animations: property <font-size-adjust> from [none\] to [cap-height 1.2\] at (0.5) should be [cap-height 1.2\]] - expected: FAIL - - [Web Animations: property <font-size-adjust> from [none\] to [cap-height 1.2\] at (0.6) should be [cap-height 1.2\]] - expected: FAIL - - [Web Animations: property <font-size-adjust> from [none\] to [cap-height 1.2\] at (1) should be [cap-height 1.2\]] - expected: FAIL - - [Web Animations: property <font-size-adjust> from [none\] to [cap-height 1.2\] at (1.5) should be [cap-height 1.2\]] - expected: FAIL
diff --git a/third_party/blink/web_tests/external/wpt/css/css-fonts/font-features-two-stylesheets-crash.html b/third_party/blink/web_tests/external/wpt/css/css-fonts/font-features-two-stylesheets-crash.html new file mode 100644 index 0000000..0e64909 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-fonts/font-features-two-stylesheets-crash.html
@@ -0,0 +1,10 @@ +<!DOCTYPE HTML> +<html> +<head> +<title>CSS Test: @font-feature-values crashes with two stylesheets</title> +<link rel="author" href="mailto:sesse@chromium.org"> +<link rel="help" href="https://crbug.com/1444274"> +<meta http-equiv="Content-type" content="text/html; charset=utf-8"> +<style></style><iframe></iframe><style>@font-feature-values x {</style> +</head> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-values/round-mod-rem-computed-expected.txt b/third_party/blink/web_tests/external/wpt/css/css-values/round-mod-rem-computed-expected.txt index 6c536ed..3b5dcb2 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-values/round-mod-rem-computed-expected.txt +++ b/third_party/blink/web_tests/external/wpt/css/css-values/round-mod-rem-computed-expected.txt
@@ -1,5 +1,5 @@ This is a testharness.js-based test. -Found 120 tests; 116 PASS, 4 FAIL, 0 TIMEOUT, 0 NOTRUN. +Found 120 tests; 117 PASS, 3 FAIL, 0 TIMEOUT, 0 NOTRUN. PASS round(10,10) should be used-value-equivalent to 10 PASS mod(1,1) should be used-value-equivalent to 0 PASS rem(1,1) should be used-value-equivalent to 0 @@ -27,7 +27,7 @@ PASS calc(rem(mod(18,5),5)) should be used-value-equivalent to 3 PASS calc(rem(mod(18,5),mod(17,5))) should be used-value-equivalent to 1 PASS calc(mod(-140,-90)) should be used-value-equivalent to -50 -FAIL calc(mod(rem(1,18)* -1,5)) should be used-value-equivalent to 4 assert_equals: calc(mod(rem(1,18)* -1,5)) and 4 serialize to the same thing in used values. expected "matrix(4, 0, 0, 4, 0, 0)" but got "matrix(-1, 0, 0, -1, 0, 0)" +PASS calc(mod(rem(1,18)* -1,5)) should be used-value-equivalent to 4 PASS round(10px,6px) should be used-value-equivalent to 12px PASS round(10cm,6cm) should be used-value-equivalent to 12cm PASS round(10mm,6mm) should be used-value-equivalent to 12mm
diff --git a/third_party/blink/web_tests/external/wpt/mimesniff/mime-types/resources/mime-types-minimized.json b/third_party/blink/web_tests/external/wpt/mimesniff/mime-types/resources/mime-types-minimized.json new file mode 100644 index 0000000..cc2f60a8 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/mimesniff/mime-types/resources/mime-types-minimized.json
@@ -0,0 +1,130 @@ +[ + { + "input": "application/ecmascript", + "output": "text/javascript" + }, + { + "input": "application/javascript", + "output": "text/javascript" + }, + { + "input": "application/x-ecmascript", + "output": "text/javascript" + }, + { + "input": "application/x-javascript", + "output": "text/javascript" + }, + { + "input": "text/ecmascript", + "output": "text/javascript" + }, + { + "input": "text/javascript", + "output": "text/javascript" + }, + { + "input": "text/javascript1.0", + "output": "text/javascript" + }, + { + "input": "text/javascript1.1", + "output": "text/javascript" + }, + { + "input": "text/javascript1.2", + "output": "text/javascript" + }, + { + "input": "text/javascript1.3", + "output": "text/javascript" + }, + { + "input": "text/javascript1.4", + "output": "text/javascript" + }, + { + "input": "text/javascript1.5", + "output": "text/javascript" + }, + { + "input": "text/jscript", + "output": "text/javascript" + }, + { + "input": "text/livescript", + "output": "text/javascript" + }, + { + "input": "text/x-ecmascript", + "output": "text/javascript" + }, + { + "input": "text/x-javascript", + "output": "text/javascript" + }, + { + "input": "application/json", + "output": "application/json" + }, + { + "input": "text/json", + "output": "application/json" + }, + { + "input": "application/ld+json", + "output": "application/json" + }, + { + "input": "image/svg+xml", + "output": "image/svg+xml" + }, + { + "input": "application/xml", + "output": "application/xml" + }, + { + "input": "text/xml", + "output": "application/xml" + }, + { + "input": "application/rss+xml", + "output": "application/xml" + }, + { + "input": "application/xhtml+xml", + "output": "application/xml" + }, + { + "input": "application/atom+xml", + "output": "application/xml" + }, + { + "input": "image/png;7a752164-f10e-11ed-a05b-0242ac120003", + "output": "image/png" + }, + { + "input": "text/xml;7a758876-f40e-11ee-998b-0242abgh0003", + "output": "application/xml" + }, + { + "input": "image/png", + "output": "image/png" + }, + { + "input": "image/jpe", + "output": "" + }, + { + "input": "application/png", + "output": "" + }, + { + "input": "random/png", + "output": "" + }, + { + "input": "application/abcd", + "output": "" + } +]
diff --git a/third_party/blink/web_tests/external/wpt/mimesniff/mime-types/resources/mime-types.json b/third_party/blink/web_tests/external/wpt/mimesniff/mime-types/resources/mime-types.json index 1d0ec64..8692d77e 100644 --- a/third_party/blink/web_tests/external/wpt/mimesniff/mime-types/resources/mime-types.json +++ b/third_party/blink/web_tests/external/wpt/mimesniff/mime-types/resources/mime-types.json
@@ -4,394 +4,468 @@ "input": "text/html;charset=gbk", "output": "text/html;charset=gbk", "navigable": true, - "encoding": "GBK" + "encoding": "GBK", + "minimizedMIMEType": "text/html" }, { "input": "TEXT/HTML;CHARSET=GBK", "output": "text/html;charset=GBK", "navigable": true, - "encoding": "GBK" + "encoding": "GBK", + "minimizedMIMEType": "text/html" }, "Legacy comment syntax", { "input": "text/html;charset=gbk(", "output": "text/html;charset=\"gbk(\"", "navigable": true, - "encoding": null + "encoding": null, + "minimizedMIMEType": "text/html" }, { "input": "text/html;x=(;charset=gbk", "output": "text/html;x=\"(\";charset=gbk", "navigable": true, - "encoding": "GBK" + "encoding": "GBK", + "minimizedMIMEType": "text/html" }, "Duplicate parameter", { "input": "text/html;charset=gbk;charset=windows-1255", "output": "text/html;charset=gbk", "navigable": true, - "encoding": "GBK" + "encoding": "GBK", + "minimizedMIMEType": "text/html" }, { "input": "text/html;charset=();charset=GBK", "output": "text/html;charset=\"()\"", "navigable": true, - "encoding": null + "encoding": null, + "minimizedMIMEType": "text/html" }, "Spaces", { "input": "text/html;charset =gbk", "output": "text/html", "navigable": true, - "encoding": null + "encoding": null, + "minimizedMIMEType": "text/html" }, { "input": "text/html ;charset=gbk", "output": "text/html;charset=gbk", "navigable": true, - "encoding": "GBK" + "encoding": "GBK", + "minimizedMIMEType": "text/html" }, { "input": "text/html; charset=gbk", "output": "text/html;charset=gbk", "navigable": true, - "encoding": "GBK" + "encoding": "GBK", + "minimizedMIMEType": "text/html" }, { "input": "text/html;charset= gbk", "output": "text/html;charset=\" gbk\"", "navigable": true, - "encoding": "GBK" + "encoding": "GBK", + "minimizedMIMEType": "text/html" }, { "input": "text/html;charset= \"gbk\"", "output": "text/html;charset=\" \\\"gbk\\\"\"", "navigable": true, - "encoding": null + "encoding": null, + "minimizedMIMEType": "text/html" }, "0x0B and 0x0C", { "input": "text/html;charset=\u000Bgbk", "output": "text/html", "navigable": true, - "encoding": null + "encoding": null, + "minimizedMIMEType": "text/html" }, { "input": "text/html;charset=\u000Cgbk", "output": "text/html", "navigable": true, - "encoding": null + "encoding": null, + "minimizedMIMEType": "text/html" }, { "input": "text/html;\u000Bcharset=gbk", "output": "text/html", "navigable": true, - "encoding": null + "encoding": null, + "minimizedMIMEType": "text/html" }, { "input": "text/html;\u000Ccharset=gbk", "output": "text/html", "navigable": true, - "encoding": null + "encoding": null, + "minimizedMIMEType": "text/html" }, "Single quotes are a token, not a delimiter", { "input": "text/html;charset='gbk'", "output": "text/html;charset='gbk'", "navigable": true, - "encoding": null + "encoding": null, + "minimizedMIMEType": "text/html" }, { "input": "text/html;charset='gbk", "output": "text/html;charset='gbk", "navigable": true, - "encoding": null + "encoding": null, + "minimizedMIMEType": "text/html" }, { "input": "text/html;charset=gbk'", "output": "text/html;charset=gbk'", "navigable": true, - "encoding": null + "encoding": null, + "minimizedMIMEType": "text/html" }, { "input": "text/html;charset=';charset=GBK", "output": "text/html;charset='", "navigable": true, - "encoding": null + "encoding": null, + "minimizedMIMEType": "text/html" }, "Invalid parameters", { "input": "text/html;test;charset=gbk", "output": "text/html;charset=gbk", "navigable": true, - "encoding": "GBK" + "encoding": "GBK", + "minimizedMIMEType": "text/html" }, { "input": "text/html;test=;charset=gbk", "output": "text/html;charset=gbk", "navigable": true, - "encoding": "GBK" + "encoding": "GBK", + "minimizedMIMEType": "text/html" }, { "input": "text/html;';charset=gbk", "output": "text/html;charset=gbk", "navigable": true, - "encoding": "GBK" + "encoding": "GBK", + "minimizedMIMEType": "text/html" }, { "input": "text/html;\";charset=gbk", "output": "text/html;charset=gbk", "navigable": true, - "encoding": "GBK" + "encoding": "GBK", + "minimizedMIMEType": "text/html" }, { "input": "text/html ; ; charset=gbk", "output": "text/html;charset=gbk", "navigable": true, - "encoding": "GBK" + "encoding": "GBK", + "minimizedMIMEType": "text/html" }, { "input": "text/html;;;;charset=gbk", "output": "text/html;charset=gbk", "navigable": true, - "encoding": "GBK" + "encoding": "GBK", + "minimizedMIMEType": "text/html" }, { "input": "text/html;charset= \"\u007F;charset=GBK", "output": "text/html;charset=GBK", "navigable": true, - "encoding": "GBK" + "encoding": "GBK", + "minimizedMIMEType": "text/html" }, { "input": "text/html;charset=\"\u007F;charset=foo\";charset=GBK", "output": "text/html;charset=GBK", "navigable": true, - "encoding": "GBK" + "encoding": "GBK", + "minimizedMIMEType": "text/html" }, "Double quotes", { "input": "text/html;charset=\"gbk\"", "output": "text/html;charset=gbk", "navigable": true, - "encoding": "GBK" + "encoding": "GBK", + "minimizedMIMEType": "text/html" }, { "input": "text/html;charset=\"gbk", "output": "text/html;charset=gbk", "navigable": true, - "encoding": "GBK" + "encoding": "GBK", + "minimizedMIMEType": "text/html" }, { "input": "text/html;charset=gbk\"", "output": "text/html;charset=\"gbk\\\"\"", "navigable": true, - "encoding": null + "encoding": null, + "minimizedMIMEType": "text/html" }, { "input": "text/html;charset=\" gbk\"", "output": "text/html;charset=\" gbk\"", "navigable": true, - "encoding": "GBK" + "encoding": "GBK", + "minimizedMIMEType": "text/html" }, { "input": "text/html;charset=\"gbk \"", "output": "text/html;charset=\"gbk \"", "navigable": true, - "encoding": "GBK" + "encoding": "GBK", + "minimizedMIMEType": "text/html" }, { "input": "text/html;charset=\"\\ gbk\"", "output": "text/html;charset=\" gbk\"", "navigable": true, - "encoding": "GBK" + "encoding": "GBK", + "minimizedMIMEType": "text/html" }, { "input": "text/html;charset=\"\\g\\b\\k\"", "output": "text/html;charset=gbk", "navigable": true, - "encoding": "GBK" + "encoding": "GBK", + "minimizedMIMEType": "text/html" }, { "input": "text/html;charset=\"gbk\"x", "output": "text/html;charset=gbk", "navigable": true, - "encoding": "GBK" + "encoding": "GBK", + "minimizedMIMEType": "text/html" }, { "input": "text/html;charset=\"\";charset=GBK", "output": "text/html;charset=\"\"", "navigable": true, - "encoding": null + "encoding": null, + "minimizedMIMEType": "text/html" }, { "input": "text/html;charset=\";charset=GBK", "output": "text/html;charset=\";charset=GBK\"", "navigable": true, - "encoding": null + "encoding": null, + "minimizedMIMEType": "text/html" }, "Unexpected code points", { "input": "text/html;charset={gbk}", "output": "text/html;charset=\"{gbk}\"", "navigable": true, - "encoding": null + "encoding": null, + "minimizedMIMEType": "text/html" }, "Parameter name longer than 127", { "input": "text/html;0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789=x;charset=gbk", "output": "text/html;0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789=x;charset=gbk", "navigable": true, - "encoding": "GBK" + "encoding": "GBK", + "minimizedMIMEType": "text/html" }, "type/subtype longer than 127", { "input": "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789/0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789", - "output": "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789/0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" + "output": "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789/0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789", + "minimizedMIMEType": "" }, "Invalid names", { "input": "text/html;a]=bar;b[=bar;c=bar", - "output": "text/html;c=bar" + "output": "text/html;c=bar", + "minimizedMIMEType": "text/html" }, "Semicolons in value", { "input": "text/html;valid=\";\";foo=bar", - "output": "text/html;valid=\";\";foo=bar" + "output": "text/html;valid=\";\";foo=bar", + "minimizedMIMEType": "text/html" }, { "input": "text/html;in]valid=\";asd=foo\";foo=bar", - "output": "text/html;foo=bar" + "output": "text/html;foo=bar", + "minimizedMIMEType": "text/html" }, "Valid", { "input": "!#$%&'*+-.^_`|~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz/!#$%&'*+-.^_`|~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz;!#$%&'*+-.^_`|~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz=!#$%&'*+-.^_`|~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", - "output": "!#$%&'*+-.^_`|~0123456789abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz/!#$%&'*+-.^_`|~0123456789abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz;!#$%&'*+-.^_`|~0123456789abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz=!#$%&'*+-.^_`|~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" + "output": "!#$%&'*+-.^_`|~0123456789abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz/!#$%&'*+-.^_`|~0123456789abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz;!#$%&'*+-.^_`|~0123456789abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz=!#$%&'*+-.^_`|~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", + "minimizedMIMEType": "" }, { "input": "x/x;x=\"\t !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u0080\u0081\u0082\u0083\u0084\u0085\u0086\u0087\u0088\u0089\u008A\u008B\u008C\u008D\u008E\u008F\u0090\u0091\u0092\u0093\u0094\u0095\u0096\u0097\u0098\u0099\u009A\u009B\u009C\u009D\u009E\u009F\u00A0\u00A1\u00A2\u00A3\u00A4\u00A5\u00A6\u00A7\u00A8\u00A9\u00AA\u00AB\u00AC\u00AD\u00AE\u00AF\u00B0\u00B1\u00B2\u00B3\u00B4\u00B5\u00B6\u00B7\u00B8\u00B9\u00BA\u00BB\u00BC\u00BD\u00BE\u00BF\u00C0\u00C1\u00C2\u00C3\u00C4\u00C5\u00C6\u00C7\u00C8\u00C9\u00CA\u00CB\u00CC\u00CD\u00CE\u00CF\u00D0\u00D1\u00D2\u00D3\u00D4\u00D5\u00D6\u00D7\u00D8\u00D9\u00DA\u00DB\u00DC\u00DD\u00DE\u00DF\u00E0\u00E1\u00E2\u00E3\u00E4\u00E5\u00E6\u00E7\u00E8\u00E9\u00EA\u00EB\u00EC\u00ED\u00EE\u00EF\u00F0\u00F1\u00F2\u00F3\u00F4\u00F5\u00F6\u00F7\u00F8\u00F9\u00FA\u00FB\u00FC\u00FD\u00FE\u00FF\"", - "output": "x/x;x=\"\t !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u0080\u0081\u0082\u0083\u0084\u0085\u0086\u0087\u0088\u0089\u008A\u008B\u008C\u008D\u008E\u008F\u0090\u0091\u0092\u0093\u0094\u0095\u0096\u0097\u0098\u0099\u009A\u009B\u009C\u009D\u009E\u009F\u00A0\u00A1\u00A2\u00A3\u00A4\u00A5\u00A6\u00A7\u00A8\u00A9\u00AA\u00AB\u00AC\u00AD\u00AE\u00AF\u00B0\u00B1\u00B2\u00B3\u00B4\u00B5\u00B6\u00B7\u00B8\u00B9\u00BA\u00BB\u00BC\u00BD\u00BE\u00BF\u00C0\u00C1\u00C2\u00C3\u00C4\u00C5\u00C6\u00C7\u00C8\u00C9\u00CA\u00CB\u00CC\u00CD\u00CE\u00CF\u00D0\u00D1\u00D2\u00D3\u00D4\u00D5\u00D6\u00D7\u00D8\u00D9\u00DA\u00DB\u00DC\u00DD\u00DE\u00DF\u00E0\u00E1\u00E2\u00E3\u00E4\u00E5\u00E6\u00E7\u00E8\u00E9\u00EA\u00EB\u00EC\u00ED\u00EE\u00EF\u00F0\u00F1\u00F2\u00F3\u00F4\u00F5\u00F6\u00F7\u00F8\u00F9\u00FA\u00FB\u00FC\u00FD\u00FE\u00FF\"" + "output": "x/x;x=\"\t !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u0080\u0081\u0082\u0083\u0084\u0085\u0086\u0087\u0088\u0089\u008A\u008B\u008C\u008D\u008E\u008F\u0090\u0091\u0092\u0093\u0094\u0095\u0096\u0097\u0098\u0099\u009A\u009B\u009C\u009D\u009E\u009F\u00A0\u00A1\u00A2\u00A3\u00A4\u00A5\u00A6\u00A7\u00A8\u00A9\u00AA\u00AB\u00AC\u00AD\u00AE\u00AF\u00B0\u00B1\u00B2\u00B3\u00B4\u00B5\u00B6\u00B7\u00B8\u00B9\u00BA\u00BB\u00BC\u00BD\u00BE\u00BF\u00C0\u00C1\u00C2\u00C3\u00C4\u00C5\u00C6\u00C7\u00C8\u00C9\u00CA\u00CB\u00CC\u00CD\u00CE\u00CF\u00D0\u00D1\u00D2\u00D3\u00D4\u00D5\u00D6\u00D7\u00D8\u00D9\u00DA\u00DB\u00DC\u00DD\u00DE\u00DF\u00E0\u00E1\u00E2\u00E3\u00E4\u00E5\u00E6\u00E7\u00E8\u00E9\u00EA\u00EB\u00EC\u00ED\u00EE\u00EF\u00F0\u00F1\u00F2\u00F3\u00F4\u00F5\u00F6\u00F7\u00F8\u00F9\u00FA\u00FB\u00FC\u00FD\u00FE\u00FF\"", + "minimizedMIMEType": "" }, "End-of-file handling", { "input": "x/x;test", - "output": "x/x" + "output": "x/x", + "minimizedMIMEType": "" }, { "input": "x/x;test=\"\\", - "output": "x/x;test=\"\\\\\"" + "output": "x/x;test=\"\\\\\"", + "minimizedMIMEType": "" }, "Whitespace (not handled by generated-mime-types.json or above)", { "input": "x/x;x= ", - "output": "x/x" + "output": "x/x", + "minimizedMIMEType": "" }, { "input": "x/x;x=\t", - "output": "x/x" + "output": "x/x", + "minimizedMIMEType": "" }, { "input": "x/x\n\r\t ;x=x", - "output": "x/x;x=x" + "output": "x/x;x=x", + "minimizedMIMEType": "" }, { "input": "\n\r\t x/x;x=x\n\r\t ", - "output": "x/x;x=x" + "output": "x/x;x=x", + "minimizedMIMEType": "" }, { "input": "x/x;\n\r\t x=x\n\r\t ;x=y", - "output": "x/x;x=x" + "output": "x/x;x=x", + "minimizedMIMEType": "" }, "Latin1", { "input": "text/html;test=\u00FF;charset=gbk", "output": "text/html;test=\"\u00FF\";charset=gbk", "navigable": true, - "encoding": "GBK" + "encoding": "GBK", + "minimizedMIMEType": "text/html" }, ">Latin1", { "input": "x/x;test=\uFFFD;x=x", - "output": "x/x;x=x" + "output": "x/x;x=x", + "minimizedMIMEType": "" }, "Failure", { "input": "\u000Bx/x", - "output": null + "output": null, + "minimizedMIMEType": "" }, { "input": "\u000Cx/x", - "output": null + "output": null, + "minimizedMIMEType": "" }, { "input": "x/x\u000B", - "output": null + "output": null, + "minimizedMIMEType": "" }, { "input": "x/x\u000C", - "output": null + "output": null, + "minimizedMIMEType": "" }, { "input": "", - "output": null + "output": null, + "minimizedMIMEType": "" }, { "input": "\t", - "output": null + "output": null, + "minimizedMIMEType": "" }, { "input": "/", - "output": null + "output": null, + "minimizedMIMEType": "" }, { "input": "bogus", - "output": null + "output": null, + "minimizedMIMEType": "" }, { "input": "bogus/", - "output": null + "output": null, + "minimizedMIMEType": "" }, { "input": "bogus/ ", - "output": null + "output": null, + "minimizedMIMEType": "" }, { "input": "bogus/bogus/;", - "output": null + "output": null, + "minimizedMIMEType": "" }, { "input": "</>", - "output": null + "output": null, + "minimizedMIMEType": "" }, { "input": "(/)", - "output": null + "output": null, + "minimizedMIMEType": "" }, { "input": "ÿ/ÿ", - "output": null + "output": null, + "minimizedMIMEType": "" }, { "input": "text/html(;doesnot=matter", - "output": null + "output": null, + "minimizedMIMEType": "" }, { "input": "{/}", - "output": null + "output": null, + "minimizedMIMEType": "" }, { "input": "\u0100/\u0100", - "output": null + "output": null, + "minimizedMIMEType": "" }, { "input": "text /html", - "output": null + "output": null, + "minimizedMIMEType": "" }, { "input": "text/ html", - "output": null + "output": null, + "minimizedMIMEType": "" }, { "input": "\"text/html\"", - "output": null + "output": null, + "minimizedMIMEType": "" } ]
diff --git a/third_party/blink/web_tests/external/wpt/resource-timing/content-type-parsing.html b/third_party/blink/web_tests/external/wpt/resource-timing/content-type-minimization.html similarity index 66% rename from third_party/blink/web_tests/external/wpt/resource-timing/content-type-parsing.html rename to third_party/blink/web_tests/external/wpt/resource-timing/content-type-minimization.html index c0081eb..afca73a 100644 --- a/third_party/blink/web_tests/external/wpt/resource-timing/content-type-parsing.html +++ b/third_party/blink/web_tests/external/wpt/resource-timing/content-type-minimization.html
@@ -28,31 +28,33 @@ return "compatible"; } -// Test for content-type parsing. -const run_content_type_parsing_tests = (json_entries) => { +// Test for mime-type minimization +const run_mime_type_mimization_tests = (json_entries) => { json_entries.forEach( (json_entry, i) => { promise_test(async t => { - let url = "/fetch/content-type/resources/content-type.py?single_header&"; - json_entry.contentType.forEach(val => { - url += "value=" + encodeURIComponent(val) + "&"; - }); + let identifier = Math.floor(Math.random() * 1000000000); + let url = `/fetch/content-type/resources/content-type.py?single_header&value=`+ encodeURIComponent(json_entry.input) + `&identifier=${identifier}`; fetch(url); const entry = await new Promise(resolve => new PerformanceObserver((entryList, observer) => { - observer.disconnect(); - resolve(entryList.getEntries()[0]); + entryList.getEntries().forEach(e => { + if (e.name.includes(identifier)) { + resolve(e); + observer.disconnect(); + } + }); }).observe({entryTypes: ['resource']})); - assert_equals(entry.contentType, json_entry["mimeType"]); - }, "content-type " + i + " : " + json_entry.contentType); + assert_equals(entry.contentType, json_entry.output); + }, "mime-type-minimized " + i + " : " + json_entry.input); }); } // Test for mime-type parsing. -const run_mime_type_parsing_tests = (json_entries) => { +const run_mime_type_parsing_and_minimization_tests = (json_entries) => { json_entries.forEach( (val, i) => { if(typeof val === "string" || val.navigable === undefined || isByteCompatible(val.input) !== "compatible") { return; } - const output = val.output === null ? "" : val.output + const minimizedMIMEType = val.minimizedMIMEType; promise_test(async t => { let url = `/fetch/content-type/resources/content-type.py?single_header&value=${val.input}`; fetch(url); @@ -60,16 +62,16 @@ observer.disconnect(); resolve(entryList.getEntries()[0]); }).observe({entryTypes: ['resource']})); - assert_equals(entry.contentType, output); + assert_equals(entry.contentType, minimizedMIMEType); }, "mime-type " + i + " : " + val.input); }); } Promise.all([ - fetch("/fetch/content-type/resources/content-types.json"), + fetch("/mimesniff/mime-types/resources/mime-types-minimized.json"), fetch("/mimesniff/mime-types/resources/mime-types.json") - ]).then(([res, res2]) => res.json().then(run_content_type_parsing_tests) - .then(() => res2.json().then(run_mime_type_parsing_tests))); + ]).then(([res, res2]) => res.json().then(run_mime_type_mimization_tests) + .then(() => res2.json().then(run_mime_type_parsing_and_minimization_tests))); </script> </body>
diff --git a/third_party/blink/web_tests/external/wpt/resource-timing/content-type-parsing.html.ini b/third_party/blink/web_tests/external/wpt/resource-timing/content-type-parsing.html.ini deleted file mode 100644 index b3c6c1a..0000000 --- a/third_party/blink/web_tests/external/wpt/resource-timing/content-type-parsing.html.ini +++ /dev/null
@@ -1,185 +0,0 @@ -[content-type-parsing.html] - expected: - if (product == "content_shell") and (os == "mac"): TIMEOUT - [content-type 0 : ,text/plain] - expected: FAIL - - [content-type 1 : text/plain,] - expected: FAIL - - [content-type 10 : text/plain,*/*] - expected: - if (product == "content_shell") and (os == "mac"): PASS - if (product == "content_shell") and (os == "win"): PASS - FAIL - - [content-type 11 : text/html,*/*] - expected: - if (product == "content_shell") and (os == "mac"): PASS - if (product == "content_shell") and (os == "win"): PASS - FAIL - - [content-type 12 : */*,text/html] - expected: - if (product == "content_shell") and (os == "win"): FAIL - if (product == "content_shell") and (os == "mac"): FAIL - - [content-type 13 : text/plain,*/*;charset=gbk] - expected: - if (product == "content_shell") and (os == "win"): PASS - if (product == "content_shell") and (os == "mac"): PASS - FAIL - - [content-type 14 : text/html,*/*;charset=gbk] - expected: - if (product == "content_shell") and (os == "win"): PASS - if (product == "content_shell") and (os == "mac"): PASS - FAIL - - [content-type 15 : text/html;x=",text/plain] - expected: FAIL - - [content-type 18 : text/html;",\\",text/plain,";charset=GBK] - expected: FAIL - - [content-type 19 : text/html;",",text/plain] - expected: FAIL - - [content-type 2 : text/html,text/plain] - expected: - if (product == "content_shell") and (os == "win") and (port == "win10.20h2"): [PASS, FAIL] - if (product == "content_shell") and (os == "win") and (port == "win11"): FAIL - if (product == "content_shell") and (os == "mac"): FAIL - - [content-type 3 : text/plain;charset=gbk,text/html] - expected: - if (product == "content_shell") and (os == "win") and (port == "win11"): FAIL - if (product == "content_shell") and (os == "win") and (port == "win10.20h2"): [PASS, FAIL] - if (product == "content_shell") and (os == "mac"): FAIL - - [content-type 4 : text/plain;charset=gbk,text/html;charset=windows-1254] - expected: FAIL - - [content-type 5 : text/plain;charset=gbk,text/plain] - expected: FAIL - - [content-type 6 : text/plain;charset=gbk,text/plain;charset=windows-1252] - expected: FAIL - - [content-type 7 : text/html;charset=gbk,text/html;x=",text/plain] - expected: FAIL - - [content-type 8 : text/plain;charset=gbk;x=foo,text/plain] - expected: FAIL - - [content-type 9 : text/html;charset=gbk,text/plain,text/html] - expected: - if (product == "content_shell") and (os == "win") and (port == "win11"): PASS - if (product == "content_shell") and (os == "win") and (port == "win10.20h2"): [PASS, FAIL] - if (product == "content_shell") and (os == "mac"): PASS - FAIL - - [mime-type 1 : text/html;charset=gbk] - expected: FAIL - - [mime-type 11 : text/html ;charset=gbk] - expected: FAIL - - [mime-type 12 : text/html; charset=gbk] - expected: FAIL - - [mime-type 13 : text/html;charset= gbk] - expected: FAIL - - [mime-type 14 : text/html;charset= "gbk"] - expected: FAIL - - [mime-type 2 : TEXT/HTML;CHARSET=GBK] - expected: FAIL - - [mime-type 21 : text/html;charset='gbk'] - expected: FAIL - - [mime-type 22 : text/html;charset='gbk] - expected: FAIL - - [mime-type 23 : text/html;charset=gbk'] - expected: FAIL - - [mime-type 24 : text/html;charset=';charset=GBK] - expected: FAIL - - [mime-type 26 : text/html;test;charset=gbk] - expected: FAIL - - [mime-type 27 : text/html;test=;charset=gbk] - expected: FAIL - - [mime-type 28 : text/html;';charset=gbk] - expected: FAIL - - [mime-type 29 : text/html;";charset=gbk] - expected: FAIL - - [mime-type 30 : text/html ; ; charset=gbk] - expected: FAIL - - [mime-type 31 : text/html;;;;charset=gbk] - expected: FAIL - - [mime-type 32 : text/html;charset= ";charset=GBK] - expected: FAIL - - [mime-type 33 : text/html;charset=";charset=foo";charset=GBK] - expected: FAIL - - [mime-type 35 : text/html;charset="gbk"] - expected: FAIL - - [mime-type 36 : text/html;charset="gbk] - expected: FAIL - - [mime-type 37 : text/html;charset=gbk"] - expected: FAIL - - [mime-type 38 : text/html;charset=" gbk"] - expected: FAIL - - [mime-type 39 : text/html;charset="gbk "] - expected: FAIL - - [mime-type 4 : text/html;charset=gbk(] - expected: FAIL - - [mime-type 40 : text/html;charset="\\ gbk"] - expected: FAIL - - [mime-type 41 : text/html;charset="\\g\\b\\k"] - expected: FAIL - - [mime-type 42 : text/html;charset="gbk"x] - expected: FAIL - - [mime-type 43 : text/html;charset="";charset=GBK] - expected: FAIL - - [mime-type 44 : text/html;charset=";charset=GBK] - expected: FAIL - - [mime-type 46 : text/html;charset={gbk}] - expected: FAIL - - [mime-type 48 : text/html;0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789=x;charset=gbk] - expected: FAIL - - [mime-type 5 : text/html;x=(;charset=gbk] - expected: FAIL - - [mime-type 69 : text/html;test=ÿ;charset=gbk] - expected: FAIL - - [mime-type 7 : text/html;charset=gbk;charset=windows-1255] - expected: FAIL - - [mime-type 8 : text/html;charset=();charset=GBK] - expected: FAIL
diff --git a/third_party/blink/web_tests/external/wpt/resource-timing/content-type.html b/third_party/blink/web_tests/external/wpt/resource-timing/content-type.html index f6b1db7..ea4470b 100644 --- a/third_party/blink/web_tests/external/wpt/resource-timing/content-type.html +++ b/third_party/blink/web_tests/external/wpt/resource-timing/content-type.html
@@ -42,11 +42,10 @@ } const resource_loaders_and_types = [ - [load.font, ["font/woff", "font/otf"]], [load.image, ["image/png", "image/jpg"]], - [load.script, ["application/javascript", "text/javascript"]], + [load.script, ["text/javascript"]], [load.stylesheet, ["text/css"]], - [load.xhr_async, ["application/x-gzip", "application/pdf"]], + [load.xhr_async, ["image/png", "image/jpg"]], [load.iframe, ["text/html"]] ]; @@ -77,7 +76,7 @@ const resource_loaders_with_attrs_and_types = [ [load.image_with_attrs, ["image/gif", "image/jpeg"]], - [load.script_with_attrs, ["application/javascript", "text/javascript"]], + [load.script_with_attrs, ["text/javascript"]], [load.stylesheet_with_attrs, ["text/css"]], ]
diff --git a/third_party/blink/web_tests/external/wpt/storage/buckets/bucket-quota-indexeddb.tentative.https.any.js b/third_party/blink/web_tests/external/wpt/storage/buckets/bucket-quota-indexeddb.tentative.https.any.js new file mode 100644 index 0000000..ba82edb --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/storage/buckets/bucket-quota-indexeddb.tentative.https.any.js
@@ -0,0 +1,35 @@ +// META: title=Bucket quota enforcement for indexeddb +// META: script=/storage/buckets/resources/util.js + +promise_test(async t => { + const arraySize = 1e6; + const objectStoreName = "storageManager"; + const dbname = + this.window ? window.location.pathname : 'estimate-worker.https.html'; + + let quota = arraySize / 2; + const bucket = await navigator.storageBuckets.open('idb', {quota}); + + await indexedDbDeleteRequest(bucket.indexedDB, dbname); + + const db = + await indexedDbOpenRequest(t, bucket.indexedDB, dbname, (db_to_upgrade) => { + db_to_upgrade.createObjectStore(objectStoreName); + }); + + const txn = db.transaction(objectStoreName, 'readwrite'); + const buffer = new ArrayBuffer(arraySize); + const view = new Uint8Array(buffer); + + for (let i = 0; i < arraySize; i++) { + view[i] = Math.floor(Math.random() * 255); + } + + const testBlob = new Blob([buffer], {type: 'binary/random'}); + txn.objectStore(objectStoreName).add(testBlob, 1); + + await promise_rejects_dom( + t, 'QuotaExceededError', transactionPromise(txn)); + + db.close(); +}, 'IDB respects bucket quota');
diff --git a/third_party/blink/web_tests/external/wpt/storage/buckets/bucket-storage-policy.tentative.https.any.js b/third_party/blink/web_tests/external/wpt/storage/buckets/bucket-storage-policy.tentative.https.any.js new file mode 100644 index 0000000..d6dce367 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/storage/buckets/bucket-storage-policy.tentative.https.any.js
@@ -0,0 +1,21 @@ +// META: title=Buckets API: Tests for bucket storage policies. +// META: script=/storage/buckets/resources/util.js +// META: global=window,worker + +'use strict'; + +promise_test(async testCase => { + await prepareForBucketTest(testCase); + + await promise_rejects_js( + testCase, TypeError, + navigator.storageBuckets.open('negative', {quota: -1})); + + await promise_rejects_js( + testCase, TypeError, navigator.storageBuckets.open('zero', {quota: 0})); + + await promise_rejects_js( + testCase, TypeError, + navigator.storageBuckets.open( + 'above_max', {quota: Number.MAX_SAFE_INTEGER + 1})); +}, 'The open promise should reject with a TypeError when quota is requested outside the range of 1 to Number.MAX_SAFE_INTEGER.');
diff --git a/third_party/blink/web_tests/external/wpt/storage/buckets/buckets_storage_policy.tentative.https.any.js b/third_party/blink/web_tests/external/wpt/storage/buckets/buckets_storage_policy.tentative.https.any.js deleted file mode 100644 index a66fd81..0000000 --- a/third_party/blink/web_tests/external/wpt/storage/buckets/buckets_storage_policy.tentative.https.any.js +++ /dev/null
@@ -1,46 +0,0 @@ -// META: title=Buckets API: Tests for bucket storage policies. -// META: script=/storage/buckets/resources/util.js -// META: global=window,worker - -'use strict'; - -promise_test(async testCase => { - await prepareForBucketTest(testCase); - - await promise_rejects_js( - testCase, TypeError, - navigator.storageBuckets.open('negative', {quota: -1})); - - await promise_rejects_js( - testCase, TypeError, navigator.storageBuckets.open('zero', {quota: 0})); - - await promise_rejects_js( - testCase, TypeError, - navigator.storageBuckets.open( - 'above_max', {quota: Number.MAX_SAFE_INTEGER + 1})); -}, 'The open promise should reject with a TypeError when quota is requested outside the range of 1 to Number.MAX_SAFE_INTEGER.'); - - -promise_test(async testCase => { - await prepareForBucketTest(testCase); - - // IndexedDB - { - const quota = 1; - const bucket = await navigator.storageBuckets.open('idb', {quota}); - - const objectStoreName = 'store'; - const db = await indexedDbOpenRequest( - testCase, bucket.indexedDB, 'db', (db_to_upgrade) => { - db_to_upgrade.createObjectStore(objectStoreName); - }); - - const overflowBuffer = new Uint8Array(quota + 1); - - const txn = db.transaction(objectStoreName, 'readwrite'); - txn.objectStore(objectStoreName).add('', overflowBuffer); - - await promise_rejects_dom( - testCase, 'QuotaExceededError', transactionPromise(txn)); - } -}, 'A QuotaExceededError is thrown when a storage API exceeds the quota of the bucket its in.');
diff --git a/third_party/blink/web_tests/http/tests/inspector-protocol/prerender/prerender-failure-status-update-expected.txt b/third_party/blink/web_tests/http/tests/inspector-protocol/prerender/prerender-failure-status-update-expected.txt index c4aad50a..75468d9a 100644 --- a/third_party/blink/web_tests/http/tests/inspector-protocol/prerender/prerender-failure-status-update-expected.txt +++ b/third_party/blink/web_tests/http/tests/inspector-protocol/prerender/prerender-failure-status-update-expected.txt
@@ -36,6 +36,7 @@ loaderId : <string> url : http://127.0.0.1:8000/echo?status=204 } + prerenderStatus : NavigationBadHttpStatus prerenderingUrl : http://127.0.0.1:8000/echo?status=204 status : Failure }
diff --git a/third_party/blink/web_tests/http/tests/inspector-protocol/prerender/report-prerender-cancellation-status-expected.txt b/third_party/blink/web_tests/http/tests/inspector-protocol/prerender/report-prerender-cancellation-status-expected.txt index 0963d923..356216c 100644 --- a/third_party/blink/web_tests/http/tests/inspector-protocol/prerender/report-prerender-cancellation-status-expected.txt +++ b/third_party/blink/web_tests/http/tests/inspector-protocol/prerender/report-prerender-cancellation-status-expected.txt
@@ -2,7 +2,7 @@ { method : Preload.prerenderAttemptCompleted params : { - finalStatus : TriggerPageNavigated + finalStatus : TriggerDestroyed initiatingFrameId : <string> key : { action : Prerender
diff --git a/third_party/blink/web_tests/http/tests/origin_trials/webexposed/compute-pressure-origin-trial-interfaces.html b/third_party/blink/web_tests/http/tests/origin_trials/webexposed/compute-pressure-origin-trial-interfaces.html index 3d87c270..8e27f7c 100644 --- a/third_party/blink/web_tests/http/tests/origin_trials/webexposed/compute-pressure-origin-trial-interfaces.html +++ b/third_party/blink/web_tests/http/tests/origin_trials/webexposed/compute-pressure-origin-trial-interfaces.html
@@ -1,9 +1,9 @@ <!DOCTYPE html> <meta charset="utf-8"> <!-- Generate token with the command: -generate_token.py http://127.0.0.1:8000 ComputePressure --expire-timestamp=2000000000 +generate_token.py http://127.0.0.1:8000 ComputePressure_v2 --expire-timestamp=2000000000 -- --> -<meta http-equiv="origin-trial" content="A/ijBvNMU7/C+St5uZUkD/FosB1Q2iRiNhdXDcXxO0DsGQqsNxGOGR1ZFC1qmM9u1rq8F/OJkTPHLD/ei+WfvQ0AAABXeyJvcmlnaW4iOiAiaHR0cDovLzEyNy4wLjAuMTo4MDAwIiwgImZlYXR1cmUiOiAiQ29tcHV0ZVByZXNzdXJlIiwgImV4cGlyeSI6IDIwMDAwMDAwMDB9" /> +<meta http-equiv="origin-trial" content="AxZRvcj1/L8T6dR206rpmTEvEHFhCoYeVIEjYHvkkSdURAuX019bib6Rf0GJjwb6uh4OgjevQNBmQl7De5KJawsAAABaeyJvcmlnaW4iOiAiaHR0cDovLzEyNy4wLjAuMTo4MDAwIiwgImZlYXR1cmUiOiAiQ29tcHV0ZVByZXNzdXJlX3YyIiwgImV4cGlyeSI6IDIwMDAwMDAwMDB9" /> <title>Compute Pressure API - interfaces exposed by origin trial</title> <script src="../../resources/testharness.js"></script> <script src="../../resources/testharnessreport.js"></script>
diff --git a/third_party/blink/web_tests/platform/linux/editing/selection/select-text-overflow-ellipsis-expected.png b/third_party/blink/web_tests/platform/linux/editing/selection/select-text-overflow-ellipsis-expected.png index bbc2f5a..89e3409 100644 --- a/third_party/blink/web_tests/platform/linux/editing/selection/select-text-overflow-ellipsis-expected.png +++ b/third_party/blink/web_tests/platform/linux/editing/selection/select-text-overflow-ellipsis-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/editing/selection/select-text-overflow-ellipsis-mixed-in-ltr-2-expected.png b/third_party/blink/web_tests/platform/linux/editing/selection/select-text-overflow-ellipsis-mixed-in-ltr-2-expected.png index 90abdfb2..6748b07 100644 --- a/third_party/blink/web_tests/platform/linux/editing/selection/select-text-overflow-ellipsis-mixed-in-ltr-2-expected.png +++ b/third_party/blink/web_tests/platform/linux/editing/selection/select-text-overflow-ellipsis-mixed-in-ltr-2-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/editing/selection/select-text-overflow-ellipsis-mixed-in-ltr-expected.png b/third_party/blink/web_tests/platform/linux/editing/selection/select-text-overflow-ellipsis-mixed-in-ltr-expected.png index cce5bf27..a653a53 100644 --- a/third_party/blink/web_tests/platform/linux/editing/selection/select-text-overflow-ellipsis-mixed-in-ltr-expected.png +++ b/third_party/blink/web_tests/platform/linux/editing/selection/select-text-overflow-ellipsis-mixed-in-ltr-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/editing/selection/select-text-overflow-ellipsis-mixed-in-rtl-2-expected.png b/third_party/blink/web_tests/platform/linux/editing/selection/select-text-overflow-ellipsis-mixed-in-rtl-2-expected.png index 0d73f631..181012d 100644 --- a/third_party/blink/web_tests/platform/linux/editing/selection/select-text-overflow-ellipsis-mixed-in-rtl-2-expected.png +++ b/third_party/blink/web_tests/platform/linux/editing/selection/select-text-overflow-ellipsis-mixed-in-rtl-2-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/editing/selection/select-text-overflow-ellipsis-mixed-in-rtl-expected.png b/third_party/blink/web_tests/platform/linux/editing/selection/select-text-overflow-ellipsis-mixed-in-rtl-expected.png index 2e22aab..1761a73 100644 --- a/third_party/blink/web_tests/platform/linux/editing/selection/select-text-overflow-ellipsis-mixed-in-rtl-expected.png +++ b/third_party/blink/web_tests/platform/linux/editing/selection/select-text-overflow-ellipsis-mixed-in-rtl-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.13/editing/selection/select-text-overflow-ellipsis-expected.png b/third_party/blink/web_tests/platform/mac-mac10.13/editing/selection/select-text-overflow-ellipsis-expected.png deleted file mode 100644 index 9b6b38bd..0000000 --- a/third_party/blink/web_tests/platform/mac-mac10.13/editing/selection/select-text-overflow-ellipsis-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.13/editing/selection/select-text-overflow-ellipsis-mixed-in-ltr-2-expected.png b/third_party/blink/web_tests/platform/mac-mac10.13/editing/selection/select-text-overflow-ellipsis-mixed-in-ltr-2-expected.png deleted file mode 100644 index 20cdac0..0000000 --- a/third_party/blink/web_tests/platform/mac-mac10.13/editing/selection/select-text-overflow-ellipsis-mixed-in-ltr-2-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.13/editing/selection/select-text-overflow-ellipsis-mixed-in-ltr-expected.png b/third_party/blink/web_tests/platform/mac-mac10.13/editing/selection/select-text-overflow-ellipsis-mixed-in-ltr-expected.png deleted file mode 100644 index ec6f2a5d69..0000000 --- a/third_party/blink/web_tests/platform/mac-mac10.13/editing/selection/select-text-overflow-ellipsis-mixed-in-ltr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.13/editing/selection/select-text-overflow-ellipsis-mixed-in-rtl-2-expected.png b/third_party/blink/web_tests/platform/mac-mac10.13/editing/selection/select-text-overflow-ellipsis-mixed-in-rtl-2-expected.png deleted file mode 100644 index c264cde..0000000 --- a/third_party/blink/web_tests/platform/mac-mac10.13/editing/selection/select-text-overflow-ellipsis-mixed-in-rtl-2-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.13/editing/selection/select-text-overflow-ellipsis-mixed-in-rtl-expected.png b/third_party/blink/web_tests/platform/mac-mac10.13/editing/selection/select-text-overflow-ellipsis-mixed-in-rtl-expected.png deleted file mode 100644 index f415ab9..0000000 --- a/third_party/blink/web_tests/platform/mac-mac10.13/editing/selection/select-text-overflow-ellipsis-mixed-in-rtl-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/editing/selection/select-text-overflow-ellipsis-expected.png b/third_party/blink/web_tests/platform/mac/editing/selection/select-text-overflow-ellipsis-expected.png index f863719..f9a4ade 100644 --- a/third_party/blink/web_tests/platform/mac/editing/selection/select-text-overflow-ellipsis-expected.png +++ b/third_party/blink/web_tests/platform/mac/editing/selection/select-text-overflow-ellipsis-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/editing/selection/select-text-overflow-ellipsis-mixed-in-ltr-2-expected.png b/third_party/blink/web_tests/platform/mac/editing/selection/select-text-overflow-ellipsis-mixed-in-ltr-2-expected.png index ef926ed5..d883f94 100644 --- a/third_party/blink/web_tests/platform/mac/editing/selection/select-text-overflow-ellipsis-mixed-in-ltr-2-expected.png +++ b/third_party/blink/web_tests/platform/mac/editing/selection/select-text-overflow-ellipsis-mixed-in-ltr-2-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/editing/selection/select-text-overflow-ellipsis-mixed-in-ltr-expected.png b/third_party/blink/web_tests/platform/mac/editing/selection/select-text-overflow-ellipsis-mixed-in-ltr-expected.png index e803fc91..aa8d2df 100644 --- a/third_party/blink/web_tests/platform/mac/editing/selection/select-text-overflow-ellipsis-mixed-in-ltr-expected.png +++ b/third_party/blink/web_tests/platform/mac/editing/selection/select-text-overflow-ellipsis-mixed-in-ltr-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/editing/selection/select-text-overflow-ellipsis-mixed-in-rtl-2-expected.png b/third_party/blink/web_tests/platform/mac/editing/selection/select-text-overflow-ellipsis-mixed-in-rtl-2-expected.png index 548b6c71..823d0d1 100644 --- a/third_party/blink/web_tests/platform/mac/editing/selection/select-text-overflow-ellipsis-mixed-in-rtl-2-expected.png +++ b/third_party/blink/web_tests/platform/mac/editing/selection/select-text-overflow-ellipsis-mixed-in-rtl-2-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/editing/selection/select-text-overflow-ellipsis-mixed-in-rtl-expected.png b/third_party/blink/web_tests/platform/mac/editing/selection/select-text-overflow-ellipsis-mixed-in-rtl-expected.png index 0752f173..1cb7cfc 100644 --- a/third_party/blink/web_tests/platform/mac/editing/selection/select-text-overflow-ellipsis-mixed-in-rtl-expected.png +++ b/third_party/blink/web_tests/platform/mac/editing/selection/select-text-overflow-ellipsis-mixed-in-rtl-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/editing/selection/select-text-overflow-ellipsis-expected.png b/third_party/blink/web_tests/platform/win/editing/selection/select-text-overflow-ellipsis-expected.png index 04e9570b..0d3d4e4 100644 --- a/third_party/blink/web_tests/platform/win/editing/selection/select-text-overflow-ellipsis-expected.png +++ b/third_party/blink/web_tests/platform/win/editing/selection/select-text-overflow-ellipsis-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/editing/selection/select-text-overflow-ellipsis-mixed-in-ltr-2-expected.png b/third_party/blink/web_tests/platform/win/editing/selection/select-text-overflow-ellipsis-mixed-in-ltr-2-expected.png index 1c7423c..07d1f387 100644 --- a/third_party/blink/web_tests/platform/win/editing/selection/select-text-overflow-ellipsis-mixed-in-ltr-2-expected.png +++ b/third_party/blink/web_tests/platform/win/editing/selection/select-text-overflow-ellipsis-mixed-in-ltr-2-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/editing/selection/select-text-overflow-ellipsis-mixed-in-ltr-expected.png b/third_party/blink/web_tests/platform/win/editing/selection/select-text-overflow-ellipsis-mixed-in-ltr-expected.png index 4b5f516..3b94560e 100644 --- a/third_party/blink/web_tests/platform/win/editing/selection/select-text-overflow-ellipsis-mixed-in-ltr-expected.png +++ b/third_party/blink/web_tests/platform/win/editing/selection/select-text-overflow-ellipsis-mixed-in-ltr-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/editing/selection/select-text-overflow-ellipsis-mixed-in-rtl-2-expected.png b/third_party/blink/web_tests/platform/win/editing/selection/select-text-overflow-ellipsis-mixed-in-rtl-2-expected.png index 8d69edb8..f9a5208 100644 --- a/third_party/blink/web_tests/platform/win/editing/selection/select-text-overflow-ellipsis-mixed-in-rtl-2-expected.png +++ b/third_party/blink/web_tests/platform/win/editing/selection/select-text-overflow-ellipsis-mixed-in-rtl-2-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/editing/selection/select-text-overflow-ellipsis-mixed-in-rtl-expected.png b/third_party/blink/web_tests/platform/win/editing/selection/select-text-overflow-ellipsis-mixed-in-rtl-expected.png index 1b2a569..aa6c524b 100644 --- a/third_party/blink/web_tests/platform/win/editing/selection/select-text-overflow-ellipsis-mixed-in-rtl-expected.png +++ b/third_party/blink/web_tests/platform/win/editing/selection/select-text-overflow-ellipsis-mixed-in-rtl-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/wpt_internal/framework-detection/detect-drupal.html b/third_party/blink/web_tests/wpt_internal/framework-detection/detect-drupal.html new file mode 100644 index 0000000..089d477 --- /dev/null +++ b/third_party/blink/web_tests/wpt_internal/framework-detection/detect-drupal.html
@@ -0,0 +1,10 @@ +<!DOCTYPE html> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="resources/test-framework-version.js"></script> +<meta name="generator" content="Drupal 7 Something"></script> +<body> +<script> + test_framework_version("Drupal", '7.0'); +</script> +</body>
diff --git a/third_party/blink/web_tests/wpt_internal/framework-detection/detect-wordpress.html b/third_party/blink/web_tests/wpt_internal/framework-detection/detect-wordpress.html new file mode 100644 index 0000000..8022396f --- /dev/null +++ b/third_party/blink/web_tests/wpt_internal/framework-detection/detect-wordpress.html
@@ -0,0 +1,10 @@ +<!DOCTYPE html> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="resources/test-framework-version.js"></script> +<meta name="generator" content="WordPress 6.2.3"></script> +<body> +<script> + test_framework_version("WordPress", '6.2'); +</script> +</body>
diff --git a/third_party/cpuinfo/README.chromium b/third_party/cpuinfo/README.chromium index 27fa2dc..6b0694b 100644 --- a/third_party/cpuinfo/README.chromium +++ b/third_party/cpuinfo/README.chromium
@@ -1,8 +1,8 @@ Name: cpuinfo Short Name: cpuinfo URL: https://github.com/pytorch/cpuinfo -Version: b16eacd5291c99dfcf88c9a0b575d577ea456753 -Date: 2023-05-04 +Version: f44a9dabb2192ffb203ddd0c71f6373c7d82faed +Date: 2023/05/15 License: BSD License File: src/LICENSE Security Critical: Yes
diff --git a/third_party/libaom/README.chromium b/third_party/libaom/README.chromium index 8c2b086..2fd565d 100644 --- a/third_party/libaom/README.chromium +++ b/third_party/libaom/README.chromium
@@ -3,7 +3,7 @@ URL: https://aomedia.googlesource.com/aom/ Version: 0 Date: Wednesday May 10 2023 -Revision: f15d8bacc72479979182f7484e0b80cf988ffd67 +Revision: 5f516275fb8761562bd877f2a8f185cd76c2a274 CPEPrefix: cpe:/a:aomedia:aomedia:3.6.0 License: BSD License File: source/libaom/LICENSE
diff --git a/third_party/libaom/source/config/config/aom_version.h b/third_party/libaom/source/config/config/aom_version.h index 35f7559..e1df3a9 100644 --- a/third_party/libaom/source/config/config/aom_version.h +++ b/third_party/libaom/source/config/config/aom_version.h
@@ -12,8 +12,8 @@ #define VERSION_MAJOR 3 #define VERSION_MINOR 6 #define VERSION_PATCH 1 -#define VERSION_EXTRA "600-gf15d8bacc" +#define VERSION_EXTRA "606-g5f516275f" #define VERSION_PACKED \ ((VERSION_MAJOR << 16) | (VERSION_MINOR << 8) | (VERSION_PATCH)) -#define VERSION_STRING_NOSP "3.6.1-600-gf15d8bacc" -#define VERSION_STRING " 3.6.1-600-gf15d8bacc" +#define VERSION_STRING_NOSP "3.6.1-606-g5f516275f" +#define VERSION_STRING " 3.6.1-606-g5f516275f"
diff --git a/third_party/tflite/README.chromium b/third_party/tflite/README.chromium index eab3f2a..39a9250 100644 --- a/third_party/tflite/README.chromium +++ b/third_party/tflite/README.chromium
@@ -1,8 +1,8 @@ Name: TensorFlow Lite Short Name: tflite URL: https://github.com/tensorflow/tensorflow -Version: cdd9eec54ee64375548eafeb11623c71b2733d97 -Date: 2023/05/11 +Version: 2bc9b91925cc357c0c1a1843259cf47a33dda3d5 +Date: 2023/05/15 License: Apache 2.0 License File: LICENSE Security Critical: Yes
diff --git a/tools/bisect-builds.py b/tools/bisect-builds.py index 91de703..dfec34b 100755 --- a/tools/bisect-builds.py +++ b/tools/bisect-builds.py
@@ -158,6 +158,7 @@ # below where these are patched. self.archive_name = 'chrome-win32.zip' self._archive_extract_dir = 'chrome-win32' + self._binary_name = 'chrome.exe' elif self.platform in ('android', 'android64'): self._binary_name = 'apks/ChromePublic.apk' self.archive_name = 'chrome-android.zip'
diff --git a/tools/clang/plugins/CMakeLists.txt b/tools/clang/plugins/CMakeLists.txt index a320280..8f80ad9 100644 --- a/tools/clang/plugins/CMakeLists.txt +++ b/tools/clang/plugins/CMakeLists.txt
@@ -6,6 +6,7 @@ FindBadRawPtrPatterns.cpp CheckIPCVisitor.cpp CheckLayoutObjectMethodsVisitor.cpp + RawPtrCastingUnsafeChecker.cpp RawPtrHelpers.cpp StackAllocatedChecker.cpp Util.cpp
diff --git a/tools/clang/plugins/FindBadRawPtrPatterns.cpp b/tools/clang/plugins/FindBadRawPtrPatterns.cpp index c762850..ed14b992 100644 --- a/tools/clang/plugins/FindBadRawPtrPatterns.cpp +++ b/tools/clang/plugins/FindBadRawPtrPatterns.cpp
@@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "FindBadRawPtrPatterns.h" +#include <memory> #include "RawPtrHelpers.h" #include "RawPtrManualPathsToIgnore.h" @@ -22,29 +23,48 @@ namespace chrome_checker { -const char kBadCastSignature[] = - "[chromium-raw-ptr-cast] Casting raw_ptr<T>* to another type is not " - "allowed as it may cause BRP ref count mismatch and bypass security " - "checks."; +constexpr char kBadCastDiagnostic[] = + "[chromium-style] casting '%0' to '%1 is not allowed."; +constexpr char kBadCastDiagnosticNoteExplanation[] = + "[chromium-style] '%0' manages BackupRefPtr refcounts; bypassing its C++ " + "interface or treating it as a POD will lead to memory safety errors."; +constexpr char kBadCastDiagnosticNoteType[] = + "[chromium-style] '%0' manages BackupRefPtr or its container here."; class BadCastMatcher : public MatchFinder::MatchCallback { public: explicit BadCastMatcher(clang::CompilerInstance& compiler) : compiler_(compiler) { - error_bad_raw_ptr_cast_signature_ = + error_bad_cast_signature_ = compiler_.getDiagnostics().getCustomDiagID( + clang::DiagnosticsEngine::Error, kBadCastDiagnostic); + note_bad_cast_signature_explanation_ = compiler_.getDiagnostics().getCustomDiagID( - clang::DiagnosticsEngine::Error, kBadCastSignature); + clang::DiagnosticsEngine::Note, kBadCastDiagnosticNoteExplanation); + note_bad_cast_signature_type_ = compiler_.getDiagnostics().getCustomDiagID( + clang::DiagnosticsEngine::Note, kBadCastDiagnosticNoteType); } void Register(MatchFinder& match_finder) { - // TODO(keishi): Also find casts to and from classes that contain raw_ptr. + // Matches anything contains |raw_ptr<T>| / |raw_ref<T>|. + auto src_type = + type(isCastingUnsafe(casting_unsafe_predicate_)).bind("srcType"); + auto dst_type = + type(isCastingUnsafe(casting_unsafe_predicate_)).bind("dstType"); + // Matches |static_cast| on pointers, all |bit_cast| + // and all |reinterpret_cast|. + auto cast_kind = castExpr(anyOf( + hasCastKind(CK_BitCast), hasCastKind(CK_LValueBitCast), + hasCastKind(CK_LValueToRValueBitCast), + hasCastKind(CK_PointerToIntegral), hasCastKind(CK_IntegralToPointer))); + // Implicit/explicit casting from/to |raw_ptr<T>| matches. + // Both casting direction is unsafe. + // https://godbolt.org/z/zqKMzcKfo auto cast_matcher = castExpr( - allOf(hasSourceExpression(hasType(pointerType(pointee( - hasUnqualifiedDesugaredType(recordType(hasDeclaration( - cxxRecordDecl(classTemplateSpecializationDecl( - hasName("base::raw_ptr")))))))))), - hasCastKind(CK_BitCast))) + allOf(anyOf(hasSourceExpression(hasType(src_type)), + implicitCastExpr(hasImplicitDestinationType(dst_type)), + explicitCastExpr(hasDestinationType(dst_type))), + cast_kind)) .bind("castExpr"); match_finder.addMatcher(cast_matcher, this); } @@ -61,32 +81,65 @@ // Using raw_ptr<T> in a stdlib collection will cause a cast. // e.g. // https://source.chromium.org/chromium/chromium/src/+/main:components/feed/core/v2/xsurface_datastore.h;drc=a0ff03edcace35ec020edd235f4d9e9735fc9690;l=107 - if (file_path.find("buildtools/third_party/libc++") != std::string::npos) + // |__bit/bit_cast.h| header is excluded to perform checking on + // |std::bit_cast<T>|. + if (file_path.find("buildtools/third_party/libc++") != std::string::npos && + file_path.find("__bit/bit_cast.h") == std::string::npos) { return; - // CHECK(raw_ptr<T>) will cause a cast. - // e.g. - // https://source.chromium.org/chromium/chromium/src/+/main:base/task/sequence_manager/thread_controller_with_message_pump_impl.cc;drc=c49b7434a9d4a61c49fc0123e904a6c5e7162731;l=121 - if (file_path.find("base/check_op.h") != std::string::npos) - return; - // raw_ptr<T>* is cast to ui::metadata::PropertyKey - // https://source.chromium.org/chromium/chromium/src/+/main:ui/views/view.cc;drc=a0ff03edcace35ec020edd235f4d9e9735fc9690;l=2417 - if (file_path.find("ui/views/controls/table/table_view.cc") != - std::string::npos) - return; - // XdgActivation::activation_queue_ is a base::queue<raw_ptr> which causes a - // cast in VectorBuffer and circular_deque. - if (file_path.find("base/containers/vector_buffer.h") != std::string::npos) - return; - if (file_path.find("base/containers/circular_deque.h") != std::string::npos) - return; + } + // Exclude casts via "unsafe_raw_ptr_*_cast". + if (file_path.find( + "base/allocator/partition_allocator/pointers/raw_ptr_cast.h") != + std::string::npos) { + return; + } + + clang::PrintingPolicy printing_policy(result.Context->getLangOpts()); + const std::string src_name = + cast_expr->getSubExpr()->getType().getAsString(printing_policy); + const std::string dst_name = + cast_expr->getType().getAsString(printing_policy); + + const auto* src_type = result.Nodes.getNodeAs<clang::Type>("srcType"); + const auto* dst_type = result.Nodes.getNodeAs<clang::Type>("dstType"); + assert((src_type || dst_type) && + "matcher should bind 'srcType' or 'dstType'"); compiler_.getDiagnostics().Report(cast_expr->getEndLoc(), - error_bad_raw_ptr_cast_signature_); + error_bad_cast_signature_) + << src_name << dst_name; + + std::shared_ptr<CastingSafety> type_note; + if (src_type != nullptr) { + compiler_.getDiagnostics().Report(cast_expr->getEndLoc(), + note_bad_cast_signature_explanation_) + << src_name; + type_note = casting_unsafe_predicate_.GetCastingSafety(src_type); + } else { + compiler_.getDiagnostics().Report(cast_expr->getEndLoc(), + note_bad_cast_signature_explanation_) + << dst_name; + type_note = casting_unsafe_predicate_.GetCastingSafety(dst_type); + } + + while (type_note) { + if (type_note->source_loc()) { + const auto& type_name = clang::QualType::getAsString( + type_note->type(), {}, printing_policy); + compiler_.getDiagnostics().Report(*type_note->source_loc(), + note_bad_cast_signature_type_) + << type_name; + } + type_note = type_note->source(); + } } private: clang::CompilerInstance& compiler_; - unsigned error_bad_raw_ptr_cast_signature_; + CastingUnsafePredicate casting_unsafe_predicate_; + unsigned error_bad_cast_signature_; + unsigned note_bad_cast_signature_explanation_; + unsigned note_bad_cast_signature_type_; }; const char kNeedRawPtrSignature[] =
diff --git a/tools/clang/plugins/RawPtrCastingUnsafeChecker.cpp b/tools/clang/plugins/RawPtrCastingUnsafeChecker.cpp new file mode 100644 index 0000000..f90a4a0 --- /dev/null +++ b/tools/clang/plugins/RawPtrCastingUnsafeChecker.cpp
@@ -0,0 +1,149 @@ +// 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 "RawPtrCastingUnsafeChecker.h" +#include <vector> + +#include "clang/AST/DeclCXX.h" +#include "llvm/ADT/ScopeExit.h" + +// Removes any pointers, references, arrays and aliases. +static const clang::Type* GetBaseType(const clang::Type* type) { + const clang::Type* last_type = nullptr; + while (type && type != last_type) { + last_type = type; + + // Unwrap type aliases. + type = type->getUnqualifiedDesugaredType(); + + // Unwrap arrays and pointers. + type = type->getPointeeOrArrayElementType(); + + // Unwrap references (and pointers). + const auto pointee = type->getPointeeType(); + if (!pointee.isNull()) { + type = pointee.getTypePtrOrNull(); + } + } + return type; +} + +bool CastingUnsafePredicate::IsCastingUnsafe(const clang::Type* type) const { + return GetCastingSafety(type)->verdict_ == CastingSafety::kUnsafe; +} + +std::shared_ptr<CastingSafety> CastingUnsafePredicate::GetCastingSafety( + const clang::Type* type, + std::set<const clang::Type*>* visited) const { + // Retrieve a "base" type because: + // - A pointer pointing to a casting-unsafe type IS casting-unsafe. + // - A reference pointing to a casting-unsafe type IS casting-unsafe. + // - An array having casting-unsafe elements IS casting-unsafe. + const clang::Type* raw_type = GetBaseType(type); + if (!raw_type || !raw_type->isRecordType()) { + // We assume followings ARE NOT casting-unsafe. + // - function type + // - enum type + // - builtin type + // - complex type + // - obj-C types + // We should not have these types here because we desugared. + // - using type + // - typeof type + return std::make_shared<CastingSafety>(type); + } + const clang::RecordDecl* decl = raw_type->getAsRecordDecl(); + assert(decl); + + // Use a memoized result if exists. + auto iter = cache_.find(type); + if (iter != cache_.end()) { + return iter->second; + } + + // This performs DFS on a directed graph composed of |clang::Type*|. + // Avoid searching for visited nodes by managing |visited|, as this can lead + // to infinite loops in the presence of self-references and cross-references. + // Since |type| being casting-unsafe is equivalent to being able to reach node + // |raw_ptr<T>| or node |raw_ref<T>| from node |type|, there is no need to + // look up visited nodes again. + bool root = visited == nullptr; + if (root) { + // Will be deleted as a part of |clean_up()|. + visited = new std::set<const clang::Type*>(); + } else if (visited->count(type)) { + // This type is already visited but not memoized, + // therefore this node is reached by following cross-references from + // ancestors. The safety of this node cannot be determined without waiting + // for computation in its ancestors. + return std::make_shared<CastingSafety>(raw_type, + CastingSafety::kUndetermined); + } + visited->insert(type); + + auto safety = std::make_shared<CastingSafety>(raw_type); + + // Clean-up: this lambda is called automatically at the scope exit. + const auto clean_up = + llvm::make_scope_exit([this, &visited, &raw_type, &root, &safety] { + if (root) { + delete visited; + } + // Memoize the result if finalized. + if (safety->verdict_ != CastingSafety::kUndetermined) { + this->cache_.insert({raw_type, safety}); + } + }); + + const std::string record_name = decl->getQualifiedNameAsString(); + if (record_name == "base::raw_ptr" || record_name == "base::raw_ref") { + // Base case: |raw_ptr<T>| and |raw_ref<T>| are never safe to cast to/from. + safety->verdict_ = CastingSafety::kUnsafe; + return safety; + } + + // Check member fields + for (const auto& field : decl->fields()) { + safety->MergeSubResult( + GetCastingSafety(field->getType().getTypePtrOrNull(), visited), + field->getBeginLoc()); + + // Verdict finalized: early return. + if (safety->verdict_ == CastingSafety::kUnsafe) { + return safety; + } + } + + // Check base classes + const auto* cxx_decl = clang::dyn_cast<clang::CXXRecordDecl>(decl); + if (cxx_decl && cxx_decl->hasDefinition()) { + for (const auto& base_specifier : cxx_decl->bases()) { + safety->MergeSubResult( + GetCastingSafety(base_specifier.getType().getTypePtr(), visited), + base_specifier.getBeginLoc()); + + // Verdict finalized: early return. + if (safety->verdict_ == CastingSafety::kUnsafe) { + return safety; + } + } + for (const auto& base_specifier : cxx_decl->vbases()) { + safety->MergeSubResult( + GetCastingSafety(base_specifier.getType().getTypePtr(), visited), + base_specifier.getBeginLoc()); + + // Verdict finalized: early return. + if (safety->verdict_ == CastingSafety::kUnsafe) { + return safety; + } + } + } + + // All reachable types have been traversed but the root type has not + // been marked as unsafe; therefore it must be safe. + if (root && safety->verdict_ == CastingSafety::kUndetermined) { + safety->verdict_ = CastingSafety::kSafe; + } + return safety; +}
diff --git a/tools/clang/plugins/RawPtrCastingUnsafeChecker.h b/tools/clang/plugins/RawPtrCastingUnsafeChecker.h new file mode 100644 index 0000000..a72e0f1 --- /dev/null +++ b/tools/clang/plugins/RawPtrCastingUnsafeChecker.h
@@ -0,0 +1,107 @@ +// 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 TOOLS_CLANG_PLUGINS_RAWPTRCASTINGUNSAFECHECKER_H_ +#define TOOLS_CLANG_PLUGINS_RAWPTRCASTINGUNSAFECHECKER_H_ + +#include <map> +#include <memory> +#include <optional> +#include <set> +#include <string> +#include <vector> + +#include "clang/AST/Decl.h" +#include "clang/AST/Type.h" + +// Represents a casting safety judgement |verdict_|. +// - CastingSafety::kSafe: the |type| is casting-safe. +// - CastingSafety::kUnsafe: the |type| is casting-unsafe. +// - CastingSafety::kUndetermined: This denotes the safety status +// is not yet determined, due to cross references. +// Holds some additional information to tell reasons. +class CastingSafety { + public: + enum Verdict { + kSafe, + kUnsafe, + // This denotes the safety status is not yet determined. + kUndetermined, + }; + + explicit CastingSafety(const clang::Type* type) : type_(type) {} + explicit CastingSafety(const clang::Type* type, Verdict verdict) + : type_(type), verdict_(verdict) {} + + const clang::Type* type() const { return type_; } + + Verdict verdict() const { return this->verdict_; } + + std::shared_ptr<CastingSafety> source() const { return this->source_; } + + std::optional<clang::SourceLocation> source_loc() const { + return this->source_loc_; + } + + private: + friend class CastingUnsafePredicate; + + // Merges a sub verdict into this type's verdict. + // + // | this \ sub | kSafe | kUndetermined | kUnsafe | + // +---------------+---------------+---------------+---------+ + // | kSafe | kSafe | kUndetermined | kUnsafe | + // | kUndetermined | kUndetermined | kUndetermined | kUnsafe | + // | kUnsafe | kUnsafe | kUnsafe | kUnsafe | + Verdict MergeSubResult( + std::shared_ptr<CastingSafety> sub, + std::optional<clang::SourceLocation> loc = std::nullopt) { + if (sub->verdict_ == kUnsafe && this->verdict_ != kUnsafe) { + this->verdict_ = kUnsafe; + this->source_ = std::move(sub); + this->source_loc_ = loc; + } else if (sub->verdict_ == kUndetermined && this->verdict_ == kSafe) { + this->verdict_ = kUndetermined; + this->source_ = std::move(sub); + this->source_loc_ = loc; + } + return this->verdict_; + } + + // |type_| is considered to be casting-safety |verdict_|. + // Optionally, the result contains a reason for the verdict, |source_|. + // There can be multiple reasons (e.g. |type_| has multiple |raw_ptr| member + // variables), but only one of them is stored. The relation between |type_| + // and |source_| is shown at |source_loc_|. + const clang::Type* type_; + Verdict verdict_ = kSafe; + std::shared_ptr<CastingSafety> source_; + std::optional<clang::SourceLocation> source_loc_; +}; + +// Determines a type is "casting unsafe" or not. +// A type is considered "casting unsafe" if ref counting can be broken as a +// result of casting. We determine "casting unsafe" types by applying these +// rules recursively: +// - |raw_ptr<T>| or |raw_ref<T>| are casting unsafe; when implemented as +// BackupRefPtr, assignment needs to go through the C++ operators to ensure the +// refcount is properly maintained. +// - Pointers, references and arrays to "casting unsafe" element(s) are +// "casting unsafe" +// - Classes and structs having a "casting unsafe" member are "casting unsafe" +// - Classes and structs having a "casting unsafe" base class are "casting +// unsafe" +// `CastingUnsafePredicate` has a cache to memorize "casting unsafety" results. +class CastingUnsafePredicate { + public: + bool IsCastingUnsafe(const clang::Type* type) const; + std::shared_ptr<CastingSafety> GetCastingSafety( + const clang::Type* type, + std::set<const clang::Type*>* visited = nullptr) const; + + // Cache to efficiently determine casting safety. + mutable std::map<const clang::Type*, std::shared_ptr<CastingSafety>> cache_; +}; + +#endif // TOOLS_CLANG_PLUGINS_RAWPTRCASTINGUNSAFECHECKER_H_
diff --git a/tools/clang/plugins/RawPtrHelpers.h b/tools/clang/plugins/RawPtrHelpers.h index ada6c5a7d..ed09b28 100644 --- a/tools/clang/plugins/RawPtrHelpers.h +++ b/tools/clang/plugins/RawPtrHelpers.h
@@ -7,6 +7,7 @@ #include <optional> +#include "RawPtrCastingUnsafeChecker.h" #include "StackAllocatedChecker.h" #include "Util.h" #include "clang/ASTMatchers/ASTMatchers.h" @@ -360,4 +361,8 @@ return checker.IsStackAllocated(&Node); } +AST_MATCHER_P(clang::Type, isCastingUnsafe, CastingUnsafePredicate, checker) { + return checker.IsCastingUnsafe(&Node); +} + #endif // TOOLS_CLANG_PLUGINS_RAWPTRHELPERS_H_
diff --git a/tools/clang/plugins/tests/bad_raw_ptr_cast.cpp b/tools/clang/plugins/tests/bad_raw_ptr_cast.cpp index 54dfde0..53f86b4 100644 --- a/tools/clang/plugins/tests/bad_raw_ptr_cast.cpp +++ b/tools/clang/plugins/tests/bad_raw_ptr_cast.cpp
@@ -2,16 +2,117 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "bad_raw_ptr_cast.h" +#include <cstdint> +#include "base/memory/raw_ptr.h" -void* my_memcpy(void* destination, const void* source); +struct RawPtrWrapper { + raw_ptr<int> ptr; +}; -void BadRawPtr::Check() { - // Explicit cast from raw_ptr<T>* is not allowed. - void* bar = reinterpret_cast<void*>(&foo_); - bar = static_cast<void*>(&foo_); - bar = (void*)&foo_; - // Implicit cast from raw_ptr<T>* is not allowed. - bar = &foo_; - my_memcpy(&foo_, &foo_); +struct RawPtrWrapperWrapper { + RawPtrWrapper* ptr; +}; + +class RawPtrWrapperWrapperWrapper { + public: + explicit RawPtrWrapperWrapperWrapper(RawPtrWrapperWrapper& ptr) : ptr_(ptr) {} + + RawPtrWrapperWrapper& ptr_; +}; + +struct RawPtrWrapperSub : RawPtrWrapper {}; +struct RawPtrWrapperVirtualSub : virtual RawPtrWrapper {}; + +void MyFunc(void* p) {} + +void CastFromCastingUnsafe() { + // "Casting unsafe" type variables; + raw_ptr<int> p0; + RawPtrWrapper p1; + RawPtrWrapperWrapper p2; + RawPtrWrapperWrapperWrapper p3(p2); + RawPtrWrapper p4[10]; + RawPtrWrapperSub p5; + RawPtrWrapperVirtualSub p6; + + // CK_BitCast via |static_cast| should emit an error. + (void)static_cast<void*>(&p0); + (void)static_cast<void*>(&p1); + (void)static_cast<void*>(&p2); + (void)static_cast<void*>(&p3); + (void)static_cast<void*>(&p4); + (void)static_cast<void*>(&p5); + (void)static_cast<void*>(&p6); + + // CK_BitCast via C-style casting should emit an error. + (void)(void*)&p0; + (void)(void*)&p1; + (void)(void*)&p2; + (void)(void*)&p3; + (void)(void*)&p4; + (void)(void*)&p5; + (void)(void*)&p6; + + // CK_BitCast via |reinterpret_cast| should emit an error. + (void)reinterpret_cast<void*>(&p0); + (void)reinterpret_cast<void*>(&p1); + (void)reinterpret_cast<void*>(&p2); + (void)reinterpret_cast<void*>(&p3); + (void)reinterpret_cast<void*>(&p4); + (void)reinterpret_cast<void*>(&p5); + (void)reinterpret_cast<void*>(&p6); + + // CK_LValueToRValueBitCast via |bit_cast| should emit an error. + (void)__builtin_bit_cast(void*, &p0); + (void)__builtin_bit_cast(void*, &p1); + (void)__builtin_bit_cast(void*, &p2); + (void)__builtin_bit_cast(void*, &p3); + (void)__builtin_bit_cast(void*, &p4); + (void)__builtin_bit_cast(void*, &p5); + (void)__builtin_bit_cast(void*, &p6); + + // CK_BitCast via implicit casting should emit an error. + MyFunc(&p0); + MyFunc(&p1); + MyFunc(&p2); + MyFunc(&p3); + MyFunc(&p4); + MyFunc(&p5); + MyFunc(&p6); +} + +void CastToCastingUnsafe() { + void* p = nullptr; + + // CK_BitCast via |static_cast| should emit an error. + (void)static_cast<raw_ptr<int>*>(p); + (void)static_cast<RawPtrWrapper*>(p); + (void)static_cast<RawPtrWrapperWrapper*>(p); + (void)static_cast<RawPtrWrapperWrapperWrapper*>(p); + (void)static_cast<RawPtrWrapperSub*>(p); + (void)static_cast<RawPtrWrapperVirtualSub*>(p); + + // CK_BitCast via C-style casting should emit an error. + (void)(raw_ptr<int>*)p; + (void)(RawPtrWrapper*)p; + (void)(RawPtrWrapperWrapper*)p; + (void)(RawPtrWrapperWrapperWrapper*)p; + (void)(RawPtrWrapperSub*)p; + (void)(RawPtrWrapperVirtualSub*)p; + + // CK_BitCast via |reinterpret_cast| should emit an error. + (void)reinterpret_cast<raw_ptr<int>*>(p); + (void)reinterpret_cast<RawPtrWrapper*>(p); + (void)reinterpret_cast<RawPtrWrapperWrapper*>(p); + (void)reinterpret_cast<RawPtrWrapperWrapperWrapper*>(p); + (void)reinterpret_cast<RawPtrWrapperSub*>(p); + (void)reinterpret_cast<RawPtrWrapperVirtualSub*>(p); + + // CK_LValueToRValueBitCast via |bit_cast| should emit an error. + (void)__builtin_bit_cast(raw_ptr<int>*, p); + (void)__builtin_bit_cast(RawPtrWrapper*, p); + (void)__builtin_bit_cast(RawPtrWrapperWrapper*, p); + (void)__builtin_bit_cast(RawPtrWrapperWrapperWrapper*, p); + (void)__builtin_bit_cast(RawPtrWrapperSub*, p); + (void)__builtin_bit_cast(RawPtrWrapperVirtualSub*, p); }
diff --git a/tools/clang/plugins/tests/bad_raw_ptr_cast.flags b/tools/clang/plugins/tests/bad_raw_ptr_cast.flags index f56a9561..97c992b2 100644 --- a/tools/clang/plugins/tests/bad_raw_ptr_cast.flags +++ b/tools/clang/plugins/tests/bad_raw_ptr_cast.flags
@@ -1 +1 @@ --Xclang -plugin-arg-find-bad-constructs -Xclang check-bad-raw-ptr-cast +-ferror-limit=0 -Xclang -plugin-arg-find-bad-constructs -Xclang check-bad-raw-ptr-cast
diff --git a/tools/clang/plugins/tests/bad_raw_ptr_cast.h b/tools/clang/plugins/tests/bad_raw_ptr_cast.h deleted file mode 100644 index a6b8931..0000000 --- a/tools/clang/plugins/tests/bad_raw_ptr_cast.h +++ /dev/null
@@ -1,18 +0,0 @@ -// 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. - -#ifndef TOOLS_CLANG_PLUGINS_TESTS_BAD_RAW_PTR_CAST_H_ -#define TOOLS_CLANG_PLUGINS_TESTS_BAD_RAW_PTR_CAST_H_ - -#include "base/memory/raw_ptr.h" - -class BadRawPtr { - public: - void Check(); - - private: - raw_ptr<int> foo_; -}; - -#endif // TOOLS_CLANG_PLUGINS_TESTS_BAD_RAW_PTR_CAST_H_ \ No newline at end of file
diff --git a/tools/clang/plugins/tests/bad_raw_ptr_cast.txt b/tools/clang/plugins/tests/bad_raw_ptr_cast.txt index cc3e913..ec62cd9e 100644 --- a/tools/clang/plugins/tests/bad_raw_ptr_cast.txt +++ b/tools/clang/plugins/tests/bad_raw_ptr_cast.txt
@@ -1,19 +1,522 @@ -bad_raw_ptr_cast.cpp:11:44: error: [chromium-raw-ptr-cast] Casting raw_ptr<T>* to another type is not allowed as it may cause BRP ref count mismatch and bypass security checks. - void* bar = reinterpret_cast<void*>(&foo_); - ^ -bad_raw_ptr_cast.cpp:12:29: error: [chromium-raw-ptr-cast] Casting raw_ptr<T>* to another type is not allowed as it may cause BRP ref count mismatch and bypass security checks. - bar = static_cast<void*>(&foo_); +bad_raw_ptr_cast.cpp:39:29: error: [chromium-style] casting 'raw_ptr<int> *' to 'void * is not allowed. + (void)static_cast<void*>(&p0); ^ -bad_raw_ptr_cast.cpp:13:17: error: [chromium-raw-ptr-cast] Casting raw_ptr<T>* to another type is not allowed as it may cause BRP ref count mismatch and bypass security checks. - bar = (void*)&foo_; +bad_raw_ptr_cast.cpp:39:29: note: [chromium-style] 'raw_ptr<int> *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast.cpp:40:29: error: [chromium-style] casting 'RawPtrWrapper *' to 'void * is not allowed. + (void)static_cast<void*>(&p1); + ^ +bad_raw_ptr_cast.cpp:40:29: note: [chromium-style] 'RawPtrWrapper *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast.cpp:9:3: note: [chromium-style] 'RawPtrWrapper' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +bad_raw_ptr_cast.cpp:41:29: error: [chromium-style] casting 'RawPtrWrapperWrapper *' to 'void * is not allowed. + (void)static_cast<void*>(&p2); + ^ +bad_raw_ptr_cast.cpp:41:29: note: [chromium-style] 'RawPtrWrapperWrapper *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast.cpp:13:3: note: [chromium-style] 'RawPtrWrapperWrapper' manages BackupRefPtr or its container here. + RawPtrWrapper* ptr; + ^ +bad_raw_ptr_cast.cpp:9:3: note: [chromium-style] 'RawPtrWrapper' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +bad_raw_ptr_cast.cpp:42:29: error: [chromium-style] casting 'RawPtrWrapperWrapperWrapper *' to 'void * is not allowed. + (void)static_cast<void*>(&p3); + ^ +bad_raw_ptr_cast.cpp:42:29: note: [chromium-style] 'RawPtrWrapperWrapperWrapper *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast.cpp:20:3: note: [chromium-style] 'RawPtrWrapperWrapperWrapper' manages BackupRefPtr or its container here. + RawPtrWrapperWrapper& ptr_; + ^ +bad_raw_ptr_cast.cpp:13:3: note: [chromium-style] 'RawPtrWrapperWrapper' manages BackupRefPtr or its container here. + RawPtrWrapper* ptr; + ^ +bad_raw_ptr_cast.cpp:9:3: note: [chromium-style] 'RawPtrWrapper' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +bad_raw_ptr_cast.cpp:43:29: error: [chromium-style] casting 'RawPtrWrapper (*)[10]' to 'void * is not allowed. + (void)static_cast<void*>(&p4); + ^ +bad_raw_ptr_cast.cpp:43:29: note: [chromium-style] 'RawPtrWrapper (*)[10]' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast.cpp:9:3: note: [chromium-style] 'RawPtrWrapper' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +bad_raw_ptr_cast.cpp:44:29: error: [chromium-style] casting 'RawPtrWrapperSub *' to 'void * is not allowed. + (void)static_cast<void*>(&p5); + ^ +bad_raw_ptr_cast.cpp:44:29: note: [chromium-style] 'RawPtrWrapperSub *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast.cpp:23:27: note: [chromium-style] 'RawPtrWrapperSub' manages BackupRefPtr or its container here. +struct RawPtrWrapperSub : RawPtrWrapper {}; + ^ +bad_raw_ptr_cast.cpp:9:3: note: [chromium-style] 'RawPtrWrapper' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +bad_raw_ptr_cast.cpp:45:29: error: [chromium-style] casting 'RawPtrWrapperVirtualSub *' to 'void * is not allowed. + (void)static_cast<void*>(&p6); + ^ +bad_raw_ptr_cast.cpp:45:29: note: [chromium-style] 'RawPtrWrapperVirtualSub *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast.cpp:24:34: note: [chromium-style] 'RawPtrWrapperVirtualSub' manages BackupRefPtr or its container here. +struct RawPtrWrapperVirtualSub : virtual RawPtrWrapper {}; + ^ +bad_raw_ptr_cast.cpp:9:3: note: [chromium-style] 'RawPtrWrapper' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +bad_raw_ptr_cast.cpp:48:17: error: [chromium-style] casting 'raw_ptr<int> *' to 'void * is not allowed. + (void)(void*)&p0; ^ -bad_raw_ptr_cast.cpp:15:10: error: [chromium-raw-ptr-cast] Casting raw_ptr<T>* to another type is not allowed as it may cause BRP ref count mismatch and bypass security checks. - bar = &foo_; - ^ -bad_raw_ptr_cast.cpp:16:14: error: [chromium-raw-ptr-cast] Casting raw_ptr<T>* to another type is not allowed as it may cause BRP ref count mismatch and bypass security checks. - my_memcpy(&foo_, &foo_); - ^ -bad_raw_ptr_cast.cpp:16:21: error: [chromium-raw-ptr-cast] Casting raw_ptr<T>* to another type is not allowed as it may cause BRP ref count mismatch and bypass security checks. - my_memcpy(&foo_, &foo_); - ^ -6 errors generated. +bad_raw_ptr_cast.cpp:48:17: note: [chromium-style] 'raw_ptr<int> *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast.cpp:49:17: error: [chromium-style] casting 'RawPtrWrapper *' to 'void * is not allowed. + (void)(void*)&p1; + ^ +bad_raw_ptr_cast.cpp:49:17: note: [chromium-style] 'RawPtrWrapper *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast.cpp:9:3: note: [chromium-style] 'RawPtrWrapper' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +bad_raw_ptr_cast.cpp:50:17: error: [chromium-style] casting 'RawPtrWrapperWrapper *' to 'void * is not allowed. + (void)(void*)&p2; + ^ +bad_raw_ptr_cast.cpp:50:17: note: [chromium-style] 'RawPtrWrapperWrapper *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast.cpp:13:3: note: [chromium-style] 'RawPtrWrapperWrapper' manages BackupRefPtr or its container here. + RawPtrWrapper* ptr; + ^ +bad_raw_ptr_cast.cpp:9:3: note: [chromium-style] 'RawPtrWrapper' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +bad_raw_ptr_cast.cpp:51:17: error: [chromium-style] casting 'RawPtrWrapperWrapperWrapper *' to 'void * is not allowed. + (void)(void*)&p3; + ^ +bad_raw_ptr_cast.cpp:51:17: note: [chromium-style] 'RawPtrWrapperWrapperWrapper *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast.cpp:20:3: note: [chromium-style] 'RawPtrWrapperWrapperWrapper' manages BackupRefPtr or its container here. + RawPtrWrapperWrapper& ptr_; + ^ +bad_raw_ptr_cast.cpp:13:3: note: [chromium-style] 'RawPtrWrapperWrapper' manages BackupRefPtr or its container here. + RawPtrWrapper* ptr; + ^ +bad_raw_ptr_cast.cpp:9:3: note: [chromium-style] 'RawPtrWrapper' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +bad_raw_ptr_cast.cpp:52:17: error: [chromium-style] casting 'RawPtrWrapper (*)[10]' to 'void * is not allowed. + (void)(void*)&p4; + ^ +bad_raw_ptr_cast.cpp:52:17: note: [chromium-style] 'RawPtrWrapper (*)[10]' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast.cpp:9:3: note: [chromium-style] 'RawPtrWrapper' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +bad_raw_ptr_cast.cpp:53:17: error: [chromium-style] casting 'RawPtrWrapperSub *' to 'void * is not allowed. + (void)(void*)&p5; + ^ +bad_raw_ptr_cast.cpp:53:17: note: [chromium-style] 'RawPtrWrapperSub *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast.cpp:23:27: note: [chromium-style] 'RawPtrWrapperSub' manages BackupRefPtr or its container here. +struct RawPtrWrapperSub : RawPtrWrapper {}; + ^ +bad_raw_ptr_cast.cpp:9:3: note: [chromium-style] 'RawPtrWrapper' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +bad_raw_ptr_cast.cpp:54:17: error: [chromium-style] casting 'RawPtrWrapperVirtualSub *' to 'void * is not allowed. + (void)(void*)&p6; + ^ +bad_raw_ptr_cast.cpp:54:17: note: [chromium-style] 'RawPtrWrapperVirtualSub *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast.cpp:24:34: note: [chromium-style] 'RawPtrWrapperVirtualSub' manages BackupRefPtr or its container here. +struct RawPtrWrapperVirtualSub : virtual RawPtrWrapper {}; + ^ +bad_raw_ptr_cast.cpp:9:3: note: [chromium-style] 'RawPtrWrapper' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +bad_raw_ptr_cast.cpp:57:36: error: [chromium-style] casting 'raw_ptr<int> *' to 'void * is not allowed. + (void)reinterpret_cast<void*>(&p0); + ^ +bad_raw_ptr_cast.cpp:57:36: note: [chromium-style] 'raw_ptr<int> *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast.cpp:58:36: error: [chromium-style] casting 'RawPtrWrapper *' to 'void * is not allowed. + (void)reinterpret_cast<void*>(&p1); + ^ +bad_raw_ptr_cast.cpp:58:36: note: [chromium-style] 'RawPtrWrapper *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast.cpp:9:3: note: [chromium-style] 'RawPtrWrapper' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +bad_raw_ptr_cast.cpp:59:36: error: [chromium-style] casting 'RawPtrWrapperWrapper *' to 'void * is not allowed. + (void)reinterpret_cast<void*>(&p2); + ^ +bad_raw_ptr_cast.cpp:59:36: note: [chromium-style] 'RawPtrWrapperWrapper *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast.cpp:13:3: note: [chromium-style] 'RawPtrWrapperWrapper' manages BackupRefPtr or its container here. + RawPtrWrapper* ptr; + ^ +bad_raw_ptr_cast.cpp:9:3: note: [chromium-style] 'RawPtrWrapper' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +bad_raw_ptr_cast.cpp:60:36: error: [chromium-style] casting 'RawPtrWrapperWrapperWrapper *' to 'void * is not allowed. + (void)reinterpret_cast<void*>(&p3); + ^ +bad_raw_ptr_cast.cpp:60:36: note: [chromium-style] 'RawPtrWrapperWrapperWrapper *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast.cpp:20:3: note: [chromium-style] 'RawPtrWrapperWrapperWrapper' manages BackupRefPtr or its container here. + RawPtrWrapperWrapper& ptr_; + ^ +bad_raw_ptr_cast.cpp:13:3: note: [chromium-style] 'RawPtrWrapperWrapper' manages BackupRefPtr or its container here. + RawPtrWrapper* ptr; + ^ +bad_raw_ptr_cast.cpp:9:3: note: [chromium-style] 'RawPtrWrapper' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +bad_raw_ptr_cast.cpp:61:36: error: [chromium-style] casting 'RawPtrWrapper (*)[10]' to 'void * is not allowed. + (void)reinterpret_cast<void*>(&p4); + ^ +bad_raw_ptr_cast.cpp:61:36: note: [chromium-style] 'RawPtrWrapper (*)[10]' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast.cpp:9:3: note: [chromium-style] 'RawPtrWrapper' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +bad_raw_ptr_cast.cpp:62:36: error: [chromium-style] casting 'RawPtrWrapperSub *' to 'void * is not allowed. + (void)reinterpret_cast<void*>(&p5); + ^ +bad_raw_ptr_cast.cpp:62:36: note: [chromium-style] 'RawPtrWrapperSub *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast.cpp:23:27: note: [chromium-style] 'RawPtrWrapperSub' manages BackupRefPtr or its container here. +struct RawPtrWrapperSub : RawPtrWrapper {}; + ^ +bad_raw_ptr_cast.cpp:9:3: note: [chromium-style] 'RawPtrWrapper' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +bad_raw_ptr_cast.cpp:63:36: error: [chromium-style] casting 'RawPtrWrapperVirtualSub *' to 'void * is not allowed. + (void)reinterpret_cast<void*>(&p6); + ^ +bad_raw_ptr_cast.cpp:63:36: note: [chromium-style] 'RawPtrWrapperVirtualSub *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast.cpp:24:34: note: [chromium-style] 'RawPtrWrapperVirtualSub' manages BackupRefPtr or its container here. +struct RawPtrWrapperVirtualSub : virtual RawPtrWrapper {}; + ^ +bad_raw_ptr_cast.cpp:9:3: note: [chromium-style] 'RawPtrWrapper' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +bad_raw_ptr_cast.cpp:66:38: error: [chromium-style] casting 'raw_ptr<int> *' to 'void * is not allowed. + (void)__builtin_bit_cast(void*, &p0); + ^ +bad_raw_ptr_cast.cpp:66:38: note: [chromium-style] 'raw_ptr<int> *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast.cpp:67:38: error: [chromium-style] casting 'RawPtrWrapper *' to 'void * is not allowed. + (void)__builtin_bit_cast(void*, &p1); + ^ +bad_raw_ptr_cast.cpp:67:38: note: [chromium-style] 'RawPtrWrapper *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast.cpp:9:3: note: [chromium-style] 'RawPtrWrapper' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +bad_raw_ptr_cast.cpp:68:38: error: [chromium-style] casting 'RawPtrWrapperWrapper *' to 'void * is not allowed. + (void)__builtin_bit_cast(void*, &p2); + ^ +bad_raw_ptr_cast.cpp:68:38: note: [chromium-style] 'RawPtrWrapperWrapper *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast.cpp:13:3: note: [chromium-style] 'RawPtrWrapperWrapper' manages BackupRefPtr or its container here. + RawPtrWrapper* ptr; + ^ +bad_raw_ptr_cast.cpp:9:3: note: [chromium-style] 'RawPtrWrapper' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +bad_raw_ptr_cast.cpp:69:38: error: [chromium-style] casting 'RawPtrWrapperWrapperWrapper *' to 'void * is not allowed. + (void)__builtin_bit_cast(void*, &p3); + ^ +bad_raw_ptr_cast.cpp:69:38: note: [chromium-style] 'RawPtrWrapperWrapperWrapper *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast.cpp:20:3: note: [chromium-style] 'RawPtrWrapperWrapperWrapper' manages BackupRefPtr or its container here. + RawPtrWrapperWrapper& ptr_; + ^ +bad_raw_ptr_cast.cpp:13:3: note: [chromium-style] 'RawPtrWrapperWrapper' manages BackupRefPtr or its container here. + RawPtrWrapper* ptr; + ^ +bad_raw_ptr_cast.cpp:9:3: note: [chromium-style] 'RawPtrWrapper' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +bad_raw_ptr_cast.cpp:70:38: error: [chromium-style] casting 'RawPtrWrapper (*)[10]' to 'void * is not allowed. + (void)__builtin_bit_cast(void*, &p4); + ^ +bad_raw_ptr_cast.cpp:70:38: note: [chromium-style] 'RawPtrWrapper (*)[10]' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast.cpp:9:3: note: [chromium-style] 'RawPtrWrapper' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +bad_raw_ptr_cast.cpp:71:38: error: [chromium-style] casting 'RawPtrWrapperSub *' to 'void * is not allowed. + (void)__builtin_bit_cast(void*, &p5); + ^ +bad_raw_ptr_cast.cpp:71:38: note: [chromium-style] 'RawPtrWrapperSub *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast.cpp:23:27: note: [chromium-style] 'RawPtrWrapperSub' manages BackupRefPtr or its container here. +struct RawPtrWrapperSub : RawPtrWrapper {}; + ^ +bad_raw_ptr_cast.cpp:9:3: note: [chromium-style] 'RawPtrWrapper' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +bad_raw_ptr_cast.cpp:72:38: error: [chromium-style] casting 'RawPtrWrapperVirtualSub *' to 'void * is not allowed. + (void)__builtin_bit_cast(void*, &p6); + ^ +bad_raw_ptr_cast.cpp:72:38: note: [chromium-style] 'RawPtrWrapperVirtualSub *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast.cpp:24:34: note: [chromium-style] 'RawPtrWrapperVirtualSub' manages BackupRefPtr or its container here. +struct RawPtrWrapperVirtualSub : virtual RawPtrWrapper {}; + ^ +bad_raw_ptr_cast.cpp:9:3: note: [chromium-style] 'RawPtrWrapper' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +bad_raw_ptr_cast.cpp:75:11: error: [chromium-style] casting 'raw_ptr<int> *' to 'void * is not allowed. + MyFunc(&p0); + ^ +bad_raw_ptr_cast.cpp:75:11: note: [chromium-style] 'raw_ptr<int> *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast.cpp:76:11: error: [chromium-style] casting 'RawPtrWrapper *' to 'void * is not allowed. + MyFunc(&p1); + ^ +bad_raw_ptr_cast.cpp:76:11: note: [chromium-style] 'RawPtrWrapper *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast.cpp:9:3: note: [chromium-style] 'RawPtrWrapper' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +bad_raw_ptr_cast.cpp:77:11: error: [chromium-style] casting 'RawPtrWrapperWrapper *' to 'void * is not allowed. + MyFunc(&p2); + ^ +bad_raw_ptr_cast.cpp:77:11: note: [chromium-style] 'RawPtrWrapperWrapper *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast.cpp:13:3: note: [chromium-style] 'RawPtrWrapperWrapper' manages BackupRefPtr or its container here. + RawPtrWrapper* ptr; + ^ +bad_raw_ptr_cast.cpp:9:3: note: [chromium-style] 'RawPtrWrapper' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +bad_raw_ptr_cast.cpp:78:11: error: [chromium-style] casting 'RawPtrWrapperWrapperWrapper *' to 'void * is not allowed. + MyFunc(&p3); + ^ +bad_raw_ptr_cast.cpp:78:11: note: [chromium-style] 'RawPtrWrapperWrapperWrapper *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast.cpp:20:3: note: [chromium-style] 'RawPtrWrapperWrapperWrapper' manages BackupRefPtr or its container here. + RawPtrWrapperWrapper& ptr_; + ^ +bad_raw_ptr_cast.cpp:13:3: note: [chromium-style] 'RawPtrWrapperWrapper' manages BackupRefPtr or its container here. + RawPtrWrapper* ptr; + ^ +bad_raw_ptr_cast.cpp:9:3: note: [chromium-style] 'RawPtrWrapper' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +bad_raw_ptr_cast.cpp:79:11: error: [chromium-style] casting 'RawPtrWrapper (*)[10]' to 'void * is not allowed. + MyFunc(&p4); + ^ +bad_raw_ptr_cast.cpp:79:11: note: [chromium-style] 'RawPtrWrapper (*)[10]' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast.cpp:9:3: note: [chromium-style] 'RawPtrWrapper' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +bad_raw_ptr_cast.cpp:80:11: error: [chromium-style] casting 'RawPtrWrapperSub *' to 'void * is not allowed. + MyFunc(&p5); + ^ +bad_raw_ptr_cast.cpp:80:11: note: [chromium-style] 'RawPtrWrapperSub *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast.cpp:23:27: note: [chromium-style] 'RawPtrWrapperSub' manages BackupRefPtr or its container here. +struct RawPtrWrapperSub : RawPtrWrapper {}; + ^ +bad_raw_ptr_cast.cpp:9:3: note: [chromium-style] 'RawPtrWrapper' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +bad_raw_ptr_cast.cpp:81:11: error: [chromium-style] casting 'RawPtrWrapperVirtualSub *' to 'void * is not allowed. + MyFunc(&p6); + ^ +bad_raw_ptr_cast.cpp:81:11: note: [chromium-style] 'RawPtrWrapperVirtualSub *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast.cpp:24:34: note: [chromium-style] 'RawPtrWrapperVirtualSub' manages BackupRefPtr or its container here. +struct RawPtrWrapperVirtualSub : virtual RawPtrWrapper {}; + ^ +bad_raw_ptr_cast.cpp:9:3: note: [chromium-style] 'RawPtrWrapper' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +bad_raw_ptr_cast.cpp:88:37: error: [chromium-style] casting 'void *' to 'raw_ptr<int> * is not allowed. + (void)static_cast<raw_ptr<int>*>(p); + ^ +bad_raw_ptr_cast.cpp:88:37: note: [chromium-style] 'raw_ptr<int> *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast.cpp:89:38: error: [chromium-style] casting 'void *' to 'RawPtrWrapper * is not allowed. + (void)static_cast<RawPtrWrapper*>(p); + ^ +bad_raw_ptr_cast.cpp:89:38: note: [chromium-style] 'RawPtrWrapper *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast.cpp:9:3: note: [chromium-style] 'RawPtrWrapper' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +bad_raw_ptr_cast.cpp:90:45: error: [chromium-style] casting 'void *' to 'RawPtrWrapperWrapper * is not allowed. + (void)static_cast<RawPtrWrapperWrapper*>(p); + ^ +bad_raw_ptr_cast.cpp:90:45: note: [chromium-style] 'RawPtrWrapperWrapper *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast.cpp:13:3: note: [chromium-style] 'RawPtrWrapperWrapper' manages BackupRefPtr or its container here. + RawPtrWrapper* ptr; + ^ +bad_raw_ptr_cast.cpp:9:3: note: [chromium-style] 'RawPtrWrapper' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +bad_raw_ptr_cast.cpp:91:52: error: [chromium-style] casting 'void *' to 'RawPtrWrapperWrapperWrapper * is not allowed. + (void)static_cast<RawPtrWrapperWrapperWrapper*>(p); + ^ +bad_raw_ptr_cast.cpp:91:52: note: [chromium-style] 'RawPtrWrapperWrapperWrapper *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast.cpp:20:3: note: [chromium-style] 'RawPtrWrapperWrapperWrapper' manages BackupRefPtr or its container here. + RawPtrWrapperWrapper& ptr_; + ^ +bad_raw_ptr_cast.cpp:13:3: note: [chromium-style] 'RawPtrWrapperWrapper' manages BackupRefPtr or its container here. + RawPtrWrapper* ptr; + ^ +bad_raw_ptr_cast.cpp:9:3: note: [chromium-style] 'RawPtrWrapper' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +bad_raw_ptr_cast.cpp:92:41: error: [chromium-style] casting 'void *' to 'RawPtrWrapperSub * is not allowed. + (void)static_cast<RawPtrWrapperSub*>(p); + ^ +bad_raw_ptr_cast.cpp:92:41: note: [chromium-style] 'RawPtrWrapperSub *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast.cpp:23:27: note: [chromium-style] 'RawPtrWrapperSub' manages BackupRefPtr or its container here. +struct RawPtrWrapperSub : RawPtrWrapper {}; + ^ +bad_raw_ptr_cast.cpp:9:3: note: [chromium-style] 'RawPtrWrapper' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +bad_raw_ptr_cast.cpp:93:48: error: [chromium-style] casting 'void *' to 'RawPtrWrapperVirtualSub * is not allowed. + (void)static_cast<RawPtrWrapperVirtualSub*>(p); + ^ +bad_raw_ptr_cast.cpp:93:48: note: [chromium-style] 'RawPtrWrapperVirtualSub *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast.cpp:24:34: note: [chromium-style] 'RawPtrWrapperVirtualSub' manages BackupRefPtr or its container here. +struct RawPtrWrapperVirtualSub : virtual RawPtrWrapper {}; + ^ +bad_raw_ptr_cast.cpp:9:3: note: [chromium-style] 'RawPtrWrapper' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +bad_raw_ptr_cast.cpp:96:24: error: [chromium-style] casting 'void *' to 'raw_ptr<int> * is not allowed. + (void)(raw_ptr<int>*)p; + ^ +bad_raw_ptr_cast.cpp:96:24: note: [chromium-style] 'raw_ptr<int> *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast.cpp:97:25: error: [chromium-style] casting 'void *' to 'RawPtrWrapper * is not allowed. + (void)(RawPtrWrapper*)p; + ^ +bad_raw_ptr_cast.cpp:97:25: note: [chromium-style] 'RawPtrWrapper *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast.cpp:9:3: note: [chromium-style] 'RawPtrWrapper' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +bad_raw_ptr_cast.cpp:98:32: error: [chromium-style] casting 'void *' to 'RawPtrWrapperWrapper * is not allowed. + (void)(RawPtrWrapperWrapper*)p; + ^ +bad_raw_ptr_cast.cpp:98:32: note: [chromium-style] 'RawPtrWrapperWrapper *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast.cpp:13:3: note: [chromium-style] 'RawPtrWrapperWrapper' manages BackupRefPtr or its container here. + RawPtrWrapper* ptr; + ^ +bad_raw_ptr_cast.cpp:9:3: note: [chromium-style] 'RawPtrWrapper' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +bad_raw_ptr_cast.cpp:99:39: error: [chromium-style] casting 'void *' to 'RawPtrWrapperWrapperWrapper * is not allowed. + (void)(RawPtrWrapperWrapperWrapper*)p; + ^ +bad_raw_ptr_cast.cpp:99:39: note: [chromium-style] 'RawPtrWrapperWrapperWrapper *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast.cpp:20:3: note: [chromium-style] 'RawPtrWrapperWrapperWrapper' manages BackupRefPtr or its container here. + RawPtrWrapperWrapper& ptr_; + ^ +bad_raw_ptr_cast.cpp:13:3: note: [chromium-style] 'RawPtrWrapperWrapper' manages BackupRefPtr or its container here. + RawPtrWrapper* ptr; + ^ +bad_raw_ptr_cast.cpp:9:3: note: [chromium-style] 'RawPtrWrapper' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +bad_raw_ptr_cast.cpp:100:28: error: [chromium-style] casting 'void *' to 'RawPtrWrapperSub * is not allowed. + (void)(RawPtrWrapperSub*)p; + ^ +bad_raw_ptr_cast.cpp:100:28: note: [chromium-style] 'RawPtrWrapperSub *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast.cpp:23:27: note: [chromium-style] 'RawPtrWrapperSub' manages BackupRefPtr or its container here. +struct RawPtrWrapperSub : RawPtrWrapper {}; + ^ +bad_raw_ptr_cast.cpp:9:3: note: [chromium-style] 'RawPtrWrapper' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +bad_raw_ptr_cast.cpp:101:35: error: [chromium-style] casting 'void *' to 'RawPtrWrapperVirtualSub * is not allowed. + (void)(RawPtrWrapperVirtualSub*)p; + ^ +bad_raw_ptr_cast.cpp:101:35: note: [chromium-style] 'RawPtrWrapperVirtualSub *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast.cpp:24:34: note: [chromium-style] 'RawPtrWrapperVirtualSub' manages BackupRefPtr or its container here. +struct RawPtrWrapperVirtualSub : virtual RawPtrWrapper {}; + ^ +bad_raw_ptr_cast.cpp:9:3: note: [chromium-style] 'RawPtrWrapper' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +bad_raw_ptr_cast.cpp:104:42: error: [chromium-style] casting 'void *' to 'raw_ptr<int> * is not allowed. + (void)reinterpret_cast<raw_ptr<int>*>(p); + ^ +bad_raw_ptr_cast.cpp:104:42: note: [chromium-style] 'raw_ptr<int> *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast.cpp:105:43: error: [chromium-style] casting 'void *' to 'RawPtrWrapper * is not allowed. + (void)reinterpret_cast<RawPtrWrapper*>(p); + ^ +bad_raw_ptr_cast.cpp:105:43: note: [chromium-style] 'RawPtrWrapper *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast.cpp:9:3: note: [chromium-style] 'RawPtrWrapper' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +bad_raw_ptr_cast.cpp:106:50: error: [chromium-style] casting 'void *' to 'RawPtrWrapperWrapper * is not allowed. + (void)reinterpret_cast<RawPtrWrapperWrapper*>(p); + ^ +bad_raw_ptr_cast.cpp:106:50: note: [chromium-style] 'RawPtrWrapperWrapper *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast.cpp:13:3: note: [chromium-style] 'RawPtrWrapperWrapper' manages BackupRefPtr or its container here. + RawPtrWrapper* ptr; + ^ +bad_raw_ptr_cast.cpp:9:3: note: [chromium-style] 'RawPtrWrapper' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +bad_raw_ptr_cast.cpp:107:57: error: [chromium-style] casting 'void *' to 'RawPtrWrapperWrapperWrapper * is not allowed. + (void)reinterpret_cast<RawPtrWrapperWrapperWrapper*>(p); + ^ +bad_raw_ptr_cast.cpp:107:57: note: [chromium-style] 'RawPtrWrapperWrapperWrapper *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast.cpp:20:3: note: [chromium-style] 'RawPtrWrapperWrapperWrapper' manages BackupRefPtr or its container here. + RawPtrWrapperWrapper& ptr_; + ^ +bad_raw_ptr_cast.cpp:13:3: note: [chromium-style] 'RawPtrWrapperWrapper' manages BackupRefPtr or its container here. + RawPtrWrapper* ptr; + ^ +bad_raw_ptr_cast.cpp:9:3: note: [chromium-style] 'RawPtrWrapper' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +bad_raw_ptr_cast.cpp:108:46: error: [chromium-style] casting 'void *' to 'RawPtrWrapperSub * is not allowed. + (void)reinterpret_cast<RawPtrWrapperSub*>(p); + ^ +bad_raw_ptr_cast.cpp:108:46: note: [chromium-style] 'RawPtrWrapperSub *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast.cpp:23:27: note: [chromium-style] 'RawPtrWrapperSub' manages BackupRefPtr or its container here. +struct RawPtrWrapperSub : RawPtrWrapper {}; + ^ +bad_raw_ptr_cast.cpp:9:3: note: [chromium-style] 'RawPtrWrapper' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +bad_raw_ptr_cast.cpp:109:53: error: [chromium-style] casting 'void *' to 'RawPtrWrapperVirtualSub * is not allowed. + (void)reinterpret_cast<RawPtrWrapperVirtualSub*>(p); + ^ +bad_raw_ptr_cast.cpp:109:53: note: [chromium-style] 'RawPtrWrapperVirtualSub *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast.cpp:24:34: note: [chromium-style] 'RawPtrWrapperVirtualSub' manages BackupRefPtr or its container here. +struct RawPtrWrapperVirtualSub : virtual RawPtrWrapper {}; + ^ +bad_raw_ptr_cast.cpp:9:3: note: [chromium-style] 'RawPtrWrapper' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +bad_raw_ptr_cast.cpp:112:44: error: [chromium-style] casting 'void *' to 'raw_ptr<int> * is not allowed. + (void)__builtin_bit_cast(raw_ptr<int>*, p); + ^ +bad_raw_ptr_cast.cpp:112:44: note: [chromium-style] 'raw_ptr<int> *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast.cpp:113:45: error: [chromium-style] casting 'void *' to 'RawPtrWrapper * is not allowed. + (void)__builtin_bit_cast(RawPtrWrapper*, p); + ^ +bad_raw_ptr_cast.cpp:113:45: note: [chromium-style] 'RawPtrWrapper *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast.cpp:9:3: note: [chromium-style] 'RawPtrWrapper' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +bad_raw_ptr_cast.cpp:114:52: error: [chromium-style] casting 'void *' to 'RawPtrWrapperWrapper * is not allowed. + (void)__builtin_bit_cast(RawPtrWrapperWrapper*, p); + ^ +bad_raw_ptr_cast.cpp:114:52: note: [chromium-style] 'RawPtrWrapperWrapper *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast.cpp:13:3: note: [chromium-style] 'RawPtrWrapperWrapper' manages BackupRefPtr or its container here. + RawPtrWrapper* ptr; + ^ +bad_raw_ptr_cast.cpp:9:3: note: [chromium-style] 'RawPtrWrapper' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +bad_raw_ptr_cast.cpp:115:59: error: [chromium-style] casting 'void *' to 'RawPtrWrapperWrapperWrapper * is not allowed. + (void)__builtin_bit_cast(RawPtrWrapperWrapperWrapper*, p); + ^ +bad_raw_ptr_cast.cpp:115:59: note: [chromium-style] 'RawPtrWrapperWrapperWrapper *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast.cpp:20:3: note: [chromium-style] 'RawPtrWrapperWrapperWrapper' manages BackupRefPtr or its container here. + RawPtrWrapperWrapper& ptr_; + ^ +bad_raw_ptr_cast.cpp:13:3: note: [chromium-style] 'RawPtrWrapperWrapper' manages BackupRefPtr or its container here. + RawPtrWrapper* ptr; + ^ +bad_raw_ptr_cast.cpp:9:3: note: [chromium-style] 'RawPtrWrapper' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +bad_raw_ptr_cast.cpp:116:48: error: [chromium-style] casting 'void *' to 'RawPtrWrapperSub * is not allowed. + (void)__builtin_bit_cast(RawPtrWrapperSub*, p); + ^ +bad_raw_ptr_cast.cpp:116:48: note: [chromium-style] 'RawPtrWrapperSub *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast.cpp:23:27: note: [chromium-style] 'RawPtrWrapperSub' manages BackupRefPtr or its container here. +struct RawPtrWrapperSub : RawPtrWrapper {}; + ^ +bad_raw_ptr_cast.cpp:9:3: note: [chromium-style] 'RawPtrWrapper' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +bad_raw_ptr_cast.cpp:117:55: error: [chromium-style] casting 'void *' to 'RawPtrWrapperVirtualSub * is not allowed. + (void)__builtin_bit_cast(RawPtrWrapperVirtualSub*, p); + ^ +bad_raw_ptr_cast.cpp:117:55: note: [chromium-style] 'RawPtrWrapperVirtualSub *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast.cpp:24:34: note: [chromium-style] 'RawPtrWrapperVirtualSub' manages BackupRefPtr or its container here. +struct RawPtrWrapperVirtualSub : virtual RawPtrWrapper {}; + ^ +bad_raw_ptr_cast.cpp:9:3: note: [chromium-style] 'RawPtrWrapper' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +59 errors generated.
diff --git a/tools/clang/plugins/tests/bad_raw_ptr_cast_exclusion.cpp b/tools/clang/plugins/tests/bad_raw_ptr_cast_exclusion.cpp new file mode 100644 index 0000000..0340579 --- /dev/null +++ b/tools/clang/plugins/tests/bad_raw_ptr_cast_exclusion.cpp
@@ -0,0 +1,94 @@ +// 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 <array> +#include <cstdint> +#include "base/memory/raw_ptr.h" +#include "base/memory/raw_ptr_cast.h" + +struct RawPtrWrapper { + raw_ptr<int> ptr; +}; + +struct RawPtrWrapperWrapper { + RawPtrWrapper* ptr; +}; + +class RawPtrWrapperWrapperWrapper { + public: + explicit RawPtrWrapperWrapperWrapper(RawPtrWrapperWrapper& ptr) : ptr_(ptr) {} + + RawPtrWrapperWrapper& ptr_; +}; + +struct RawPtrWrapperSub : RawPtrWrapper {}; +struct RawPtrWrapperVirtualSub : virtual RawPtrWrapper {}; + +void MyFunc(void* p) {} + +// 'unsafe_raw_ptr_*_cast' should not emit errors. +void CastFromCastingUnsafeExclusion() { + // "Casting unsafe" type variables; + raw_ptr<int> p0; + RawPtrWrapper p1; + RawPtrWrapperWrapper p2; + RawPtrWrapperWrapperWrapper p3(p2); + RawPtrWrapper p4[10]; + RawPtrWrapperSub p5; + RawPtrWrapperVirtualSub p6; + + (void)base::unsafe_raw_ptr_static_cast<void*>(&p0); + (void)base::unsafe_raw_ptr_static_cast<void*>(&p1); + (void)base::unsafe_raw_ptr_static_cast<void*>(&p2); + (void)base::unsafe_raw_ptr_static_cast<void*>(&p3); + (void)base::unsafe_raw_ptr_static_cast<void*>(&p4); + (void)base::unsafe_raw_ptr_static_cast<void*>(&p5); + (void)base::unsafe_raw_ptr_static_cast<void*>(&p6); + + (void)base::unsafe_raw_ptr_reinterpret_cast<void*>(&p0); + (void)base::unsafe_raw_ptr_reinterpret_cast<void*>(&p1); + (void)base::unsafe_raw_ptr_reinterpret_cast<void*>(&p2); + (void)base::unsafe_raw_ptr_reinterpret_cast<void*>(&p3); + (void)base::unsafe_raw_ptr_reinterpret_cast<void*>(&p4); + (void)base::unsafe_raw_ptr_reinterpret_cast<void*>(&p5); + (void)base::unsafe_raw_ptr_reinterpret_cast<void*>(&p6); + + (void)base::unsafe_raw_ptr_bit_cast<void*>(&p0); + (void)base::unsafe_raw_ptr_bit_cast<void*>(&p1); + (void)base::unsafe_raw_ptr_bit_cast<void*>(&p2); + (void)base::unsafe_raw_ptr_bit_cast<void*>(&p3); + (void)base::unsafe_raw_ptr_bit_cast<void*>(&p4); + (void)base::unsafe_raw_ptr_bit_cast<void*>(&p5); + (void)base::unsafe_raw_ptr_bit_cast<void*>(&p6); +} + +// 'unsafe_raw_ptr_*_cast' should not emit errors. +void CastToCastingUnsafeExclusion() { + void* p = nullptr; + + // CK_BitCast via |base::unsafe_raw_ptr_static_cast| should emit an error. + (void)base::unsafe_raw_ptr_static_cast<raw_ptr<int>*>(p); + (void)base::unsafe_raw_ptr_static_cast<RawPtrWrapper*>(p); + (void)base::unsafe_raw_ptr_static_cast<RawPtrWrapperWrapper*>(p); + (void)base::unsafe_raw_ptr_static_cast<RawPtrWrapperWrapperWrapper*>(p); + (void)base::unsafe_raw_ptr_static_cast<RawPtrWrapperSub*>(p); + (void)base::unsafe_raw_ptr_static_cast<RawPtrWrapperVirtualSub*>(p); + + // CK_BitCast via |base::unsafe_raw_ptr_reinterpret_cast| should emit an + // error. + (void)base::unsafe_raw_ptr_reinterpret_cast<raw_ptr<int>*>(p); + (void)base::unsafe_raw_ptr_reinterpret_cast<RawPtrWrapper*>(p); + (void)base::unsafe_raw_ptr_reinterpret_cast<RawPtrWrapperWrapper*>(p); + (void)base::unsafe_raw_ptr_reinterpret_cast<RawPtrWrapperWrapperWrapper*>(p); + (void)base::unsafe_raw_ptr_reinterpret_cast<RawPtrWrapperSub*>(p); + (void)base::unsafe_raw_ptr_reinterpret_cast<RawPtrWrapperVirtualSub*>(p); + + // CK_BitCast via |bit_cast| should emit an error. + (void)base::unsafe_raw_ptr_bit_cast<raw_ptr<int>*>(p); + (void)base::unsafe_raw_ptr_bit_cast<RawPtrWrapper*>(p); + (void)base::unsafe_raw_ptr_bit_cast<RawPtrWrapperWrapper*>(p); + (void)base::unsafe_raw_ptr_bit_cast<RawPtrWrapperWrapperWrapper*>(p); + (void)base::unsafe_raw_ptr_bit_cast<RawPtrWrapperSub*>(p); + (void)base::unsafe_raw_ptr_bit_cast<RawPtrWrapperVirtualSub*>(p); +}
diff --git a/tools/clang/plugins/tests/bad_raw_ptr_cast_exclusion.flags b/tools/clang/plugins/tests/bad_raw_ptr_cast_exclusion.flags new file mode 100644 index 0000000..f56a9561 --- /dev/null +++ b/tools/clang/plugins/tests/bad_raw_ptr_cast_exclusion.flags
@@ -0,0 +1 @@ +-Xclang -plugin-arg-find-bad-constructs -Xclang check-bad-raw-ptr-cast
diff --git a/tools/clang/plugins/tests/bad_raw_ptr_cast_exclusion.txt b/tools/clang/plugins/tests/bad_raw_ptr_cast_exclusion.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tools/clang/plugins/tests/bad_raw_ptr_cast_exclusion.txt
diff --git a/tools/clang/plugins/tests/bad_raw_ptr_cast_in_the_wild.cpp b/tools/clang/plugins/tests/bad_raw_ptr_cast_in_the_wild.cpp new file mode 100644 index 0000000..b7e3c0c6 --- /dev/null +++ b/tools/clang/plugins/tests/bad_raw_ptr_cast_in_the_wild.cpp
@@ -0,0 +1,49 @@ +// 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 <array> +#include "base/memory/raw_ptr.h" + +// Real examples of bad casting, cited from here. +// https://docs.google.com/document/d/14Ol_adOdNpy4Ge-XReI7CXNKMzs_LL5vucDQIERDQyg/edit?usp=sharing + +// ============================== +// Example 1. "Initialization" +// ============================== +struct A { + raw_ptr<int> ptr; +}; + +A* ExampleOne(void* buf) { + return reinterpret_cast<A*>(buf); // Should error. +} + +// ============================== +// Example 2. "Matching Struct" +// ============================== +struct ThirdPartyA { + int* ptr; +}; + +A* ExampleTwo(ThirdPartyA* obj) { + return reinterpret_cast<A*>(obj); // Should error. +} + +// ============================== +// Example 3. "Reinterpreting as void**" +// ============================== +int** ExampleThree(raw_ptr<int>* ptr) { + return reinterpret_cast<int**>(ptr); // Should error. +} + +// ============================== +// Example 4. "Reinterpreting pointer to embedder class as void*" +// ============================== +void* my_memset(void* s, int c, std::size_t n); + +void ExampleFour() { + A obj; + A* obj_ptr = &obj; + my_memset(obj_ptr, 0, sizeof(obj_ptr)); // Should error. +}
diff --git a/tools/clang/plugins/tests/bad_raw_ptr_cast_in_the_wild.flags b/tools/clang/plugins/tests/bad_raw_ptr_cast_in_the_wild.flags new file mode 100644 index 0000000..d7daf45 --- /dev/null +++ b/tools/clang/plugins/tests/bad_raw_ptr_cast_in_the_wild.flags
@@ -0,0 +1 @@ +-ferror-limit=0 -Xclang -plugin-arg-find-bad-constructs -Xclang check-bad-raw-ptr-cast \ No newline at end of file
diff --git a/tools/clang/plugins/tests/bad_raw_ptr_cast_in_the_wild.txt b/tools/clang/plugins/tests/bad_raw_ptr_cast_in_the_wild.txt new file mode 100644 index 0000000..1b8f0cb --- /dev/null +++ b/tools/clang/plugins/tests/bad_raw_ptr_cast_in_the_wild.txt
@@ -0,0 +1,26 @@ +bad_raw_ptr_cast_in_the_wild.cpp:19:34: error: [chromium-style] casting 'void *' to 'A * is not allowed. + return reinterpret_cast<A*>(buf); // Should error. + ^ +bad_raw_ptr_cast_in_the_wild.cpp:19:34: note: [chromium-style] 'A *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast_in_the_wild.cpp:15:3: note: [chromium-style] 'A' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +bad_raw_ptr_cast_in_the_wild.cpp:30:34: error: [chromium-style] casting 'ThirdPartyA *' to 'A * is not allowed. + return reinterpret_cast<A*>(obj); // Should error. + ^ +bad_raw_ptr_cast_in_the_wild.cpp:30:34: note: [chromium-style] 'A *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast_in_the_wild.cpp:15:3: note: [chromium-style] 'A' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +bad_raw_ptr_cast_in_the_wild.cpp:37:37: error: [chromium-style] casting 'raw_ptr<int> *' to 'int ** is not allowed. + return reinterpret_cast<int**>(ptr); // Should error. + ^ +bad_raw_ptr_cast_in_the_wild.cpp:37:37: note: [chromium-style] 'raw_ptr<int> *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast_in_the_wild.cpp:48:13: error: [chromium-style] casting 'A *' to 'void * is not allowed. + my_memset(obj_ptr, 0, sizeof(obj_ptr)); // Should error. + ^ +bad_raw_ptr_cast_in_the_wild.cpp:48:13: note: [chromium-style] 'A *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast_in_the_wild.cpp:15:3: note: [chromium-style] 'A' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +4 errors generated.
diff --git a/tools/clang/plugins/tests/bad_raw_ptr_cast_kinds.cpp b/tools/clang/plugins/tests/bad_raw_ptr_cast_kinds.cpp new file mode 100644 index 0000000..da20187 --- /dev/null +++ b/tools/clang/plugins/tests/bad_raw_ptr_cast_kinds.cpp
@@ -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 <array> +#include <cstdint> +#include "base/memory/raw_ptr.h" + +struct RawPtrWrapper { + raw_ptr<int> ptr; +}; +struct RawPtrWrapperSub : RawPtrWrapper {}; + +void VariousCasting() { + raw_ptr<int> ptr; + RawPtrWrapper wrapped; + RawPtrWrapper arr[10]; + void* void_ptr = nullptr; + + // CK_BitCast should emit an error. + (void)reinterpret_cast<RawPtrWrapper*>(void_ptr); + + // CK_LValueBitCast should emit an error. + RawPtrWrapper& ref = wrapped; + ref = reinterpret_cast<RawPtrWrapper&>(void_ptr); + + // CK_LValueToRValueBitCast should emit an error. + (void)__builtin_bit_cast(int*, ptr); + (void)__builtin_bit_cast(raw_ptr<int>, wrapped); + (void)__builtin_bit_cast(int*, wrapped); + + // CK_PointerToIntegral should emit an error. + uintptr_t i = reinterpret_cast<uintptr_t>(&wrapped); + + // CK_IntegralToPointer should emit an error. + wrapped = *reinterpret_cast<RawPtrWrapper*>(i); + + // CK_ArrayToPointerDecay should be safe. + (void)static_cast<RawPtrWrapper*>(arr); + + // This line has two casts, CK_ArrayToPointerDecay and CK_BitCast. + // q = (void*) (RawPtrWrapper*) arr; + // The latter should emit an error. + void_ptr = arr; + + // CK_BaseToDerived should be safe. + RawPtrWrapperSub* sub = static_cast<RawPtrWrapperSub*>(&wrapped); + + // CK_DerivedToBase should be safe. + wrapped = *static_cast<RawPtrWrapper*>(sub); + + // CK_ToVoid should be safe. + (void)&wrapped; + + // Illegal casts: should be disallowed by the compiler. + (void)static_cast<int*>(ptr); + (void)static_cast<raw_ptr<int>>(wrapped); + (void)static_cast<int*>(wrapped); + + (void)reinterpret_cast<int*>(ptr); + (void)reinterpret_cast<raw_ptr<int>>(wrapped); + (void)reinterpret_cast<int*>(wrapped); +}
diff --git a/tools/clang/plugins/tests/bad_raw_ptr_cast_kinds.flags b/tools/clang/plugins/tests/bad_raw_ptr_cast_kinds.flags new file mode 100644 index 0000000..97c992b2 --- /dev/null +++ b/tools/clang/plugins/tests/bad_raw_ptr_cast_kinds.flags
@@ -0,0 +1 @@ +-ferror-limit=0 -Xclang -plugin-arg-find-bad-constructs -Xclang check-bad-raw-ptr-cast
diff --git a/tools/clang/plugins/tests/bad_raw_ptr_cast_kinds.txt b/tools/clang/plugins/tests/bad_raw_ptr_cast_kinds.txt new file mode 100644 index 0000000..1c96f3dc --- /dev/null +++ b/tools/clang/plugins/tests/bad_raw_ptr_cast_kinds.txt
@@ -0,0 +1,77 @@ +bad_raw_ptr_cast_kinds.cpp:56:9: error: cannot cast from type 'raw_ptr<int>' to pointer type 'int *' + (void)static_cast<int*>(ptr); + ^~~~~~~~~~~~~~~~~~~~~~ +bad_raw_ptr_cast_kinds.cpp:57:9: error: no matching conversion for static_cast from 'RawPtrWrapper' to 'raw_ptr<int>' + (void)static_cast<raw_ptr<int>>(wrapped); + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +./base/allocator/partition_allocator/pointers/raw_ptr.h:11:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'RawPtrWrapper' to 'const raw_ptr<int>' for 1st argument +class raw_ptr { + ^ +./base/allocator/partition_allocator/pointers/raw_ptr.h:11:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'RawPtrWrapper' to 'raw_ptr<int>' for 1st argument +./base/allocator/partition_allocator/pointers/raw_ptr.h:11:7: note: candidate constructor (the implicit default constructor) not viable: requires 0 arguments, but 1 was provided +bad_raw_ptr_cast_kinds.cpp:58:9: error: cannot cast from type 'RawPtrWrapper' to pointer type 'int *' + (void)static_cast<int*>(wrapped); + ^~~~~~~~~~~~~~~~~~~~~~~~~~ +bad_raw_ptr_cast_kinds.cpp:60:9: error: reinterpret_cast from 'raw_ptr<int>' to 'int *' is not allowed + (void)reinterpret_cast<int*>(ptr); + ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +bad_raw_ptr_cast_kinds.cpp:61:9: error: reinterpret_cast from 'RawPtrWrapper' to 'raw_ptr<int>' is not allowed + (void)reinterpret_cast<raw_ptr<int>>(wrapped); + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +bad_raw_ptr_cast_kinds.cpp:62:9: error: reinterpret_cast from 'RawPtrWrapper' to 'int *' is not allowed + (void)reinterpret_cast<int*>(wrapped); + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +bad_raw_ptr_cast_kinds.cpp:21:50: error: [chromium-style] casting 'void *' to 'RawPtrWrapper * is not allowed. + (void)reinterpret_cast<RawPtrWrapper*>(void_ptr); + ^ +bad_raw_ptr_cast_kinds.cpp:21:50: note: [chromium-style] 'RawPtrWrapper *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast_kinds.cpp:10:3: note: [chromium-style] 'RawPtrWrapper' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +bad_raw_ptr_cast_kinds.cpp:25:50: error: [chromium-style] casting 'void *' to 'RawPtrWrapper is not allowed. + ref = reinterpret_cast<RawPtrWrapper&>(void_ptr); + ^ +bad_raw_ptr_cast_kinds.cpp:25:50: note: [chromium-style] 'RawPtrWrapper' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast_kinds.cpp:10:3: note: [chromium-style] 'RawPtrWrapper' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +bad_raw_ptr_cast_kinds.cpp:28:37: error: [chromium-style] casting 'raw_ptr<int>' to 'int * is not allowed. + (void)__builtin_bit_cast(int*, ptr); + ^ +bad_raw_ptr_cast_kinds.cpp:28:37: note: [chromium-style] 'raw_ptr<int>' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast_kinds.cpp:29:49: error: [chromium-style] casting 'RawPtrWrapper' to 'raw_ptr<int> is not allowed. + (void)__builtin_bit_cast(raw_ptr<int>, wrapped); + ^ +bad_raw_ptr_cast_kinds.cpp:29:49: note: [chromium-style] 'RawPtrWrapper' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast_kinds.cpp:10:3: note: [chromium-style] 'RawPtrWrapper' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +bad_raw_ptr_cast_kinds.cpp:30:41: error: [chromium-style] casting 'RawPtrWrapper' to 'int * is not allowed. + (void)__builtin_bit_cast(int*, wrapped); + ^ +bad_raw_ptr_cast_kinds.cpp:30:41: note: [chromium-style] 'RawPtrWrapper' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast_kinds.cpp:10:3: note: [chromium-style] 'RawPtrWrapper' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +bad_raw_ptr_cast_kinds.cpp:33:53: error: [chromium-style] casting 'RawPtrWrapper *' to 'uintptr_t is not allowed. + uintptr_t i = reinterpret_cast<uintptr_t>(&wrapped); + ^ +bad_raw_ptr_cast_kinds.cpp:33:53: note: [chromium-style] 'RawPtrWrapper *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast_kinds.cpp:10:3: note: [chromium-style] 'RawPtrWrapper' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +bad_raw_ptr_cast_kinds.cpp:36:48: error: [chromium-style] casting 'uintptr_t' to 'RawPtrWrapper * is not allowed. + wrapped = *reinterpret_cast<RawPtrWrapper*>(i); + ^ +bad_raw_ptr_cast_kinds.cpp:36:48: note: [chromium-style] 'RawPtrWrapper *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast_kinds.cpp:10:3: note: [chromium-style] 'RawPtrWrapper' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +bad_raw_ptr_cast_kinds.cpp:44:14: error: [chromium-style] casting 'RawPtrWrapper *' to 'void * is not allowed. + void_ptr = arr; + ^ +bad_raw_ptr_cast_kinds.cpp:44:14: note: [chromium-style] 'RawPtrWrapper *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast_kinds.cpp:10:3: note: [chromium-style] 'RawPtrWrapper' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +14 errors generated.
diff --git a/tools/clang/plugins/tests/bad_raw_ptr_cast_recursive.cpp b/tools/clang/plugins/tests/bad_raw_ptr_cast_recursive.cpp new file mode 100644 index 0000000..d2e333a --- /dev/null +++ b/tools/clang/plugins/tests/bad_raw_ptr_cast_recursive.cpp
@@ -0,0 +1,40 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "base/memory/raw_ptr.h" + +struct A; +struct B; +struct C; +struct D; + +// raw_ptr<int> <-- A <-> B --> C +// ^ +// | +// D +// A, B and D are casting-unsafe. +struct A { + B* b; + raw_ptr<int> ptr; +}; + +struct B { + A* a; + C* c; +}; + +struct C {}; + +struct D { + B* b; +}; + +void CastToCastingUnsafe() { + void* p = nullptr; + + (void)static_cast<A*>(p); // Error. + (void)static_cast<B*>(p); // Error. + (void)static_cast<C*>(p); // OK. + (void)static_cast<D*>(p); // Error. +}
diff --git a/tools/clang/plugins/tests/bad_raw_ptr_cast_recursive.flags b/tools/clang/plugins/tests/bad_raw_ptr_cast_recursive.flags new file mode 100644 index 0000000..97c992b2 --- /dev/null +++ b/tools/clang/plugins/tests/bad_raw_ptr_cast_recursive.flags
@@ -0,0 +1 @@ +-ferror-limit=0 -Xclang -plugin-arg-find-bad-constructs -Xclang check-bad-raw-ptr-cast
diff --git a/tools/clang/plugins/tests/bad_raw_ptr_cast_recursive.txt b/tools/clang/plugins/tests/bad_raw_ptr_cast_recursive.txt new file mode 100644 index 0000000..d6efc16 --- /dev/null +++ b/tools/clang/plugins/tests/bad_raw_ptr_cast_recursive.txt
@@ -0,0 +1,31 @@ +bad_raw_ptr_cast_recursive.cpp:36:26: error: [chromium-style] casting 'void *' to 'A * is not allowed. + (void)static_cast<A*>(p); // Error. + ^ +bad_raw_ptr_cast_recursive.cpp:36:26: note: [chromium-style] 'A *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast_recursive.cpp:19:3: note: [chromium-style] 'A' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +bad_raw_ptr_cast_recursive.cpp:37:26: error: [chromium-style] casting 'void *' to 'B * is not allowed. + (void)static_cast<B*>(p); // Error. + ^ +bad_raw_ptr_cast_recursive.cpp:37:26: note: [chromium-style] 'B *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast_recursive.cpp:23:3: note: [chromium-style] 'B' manages BackupRefPtr or its container here. + A* a; + ^ +bad_raw_ptr_cast_recursive.cpp:19:3: note: [chromium-style] 'A' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +bad_raw_ptr_cast_recursive.cpp:39:26: error: [chromium-style] casting 'void *' to 'D * is not allowed. + (void)static_cast<D*>(p); // Error. + ^ +bad_raw_ptr_cast_recursive.cpp:39:26: note: [chromium-style] 'D *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ptr_cast_recursive.cpp:30:3: note: [chromium-style] 'D' manages BackupRefPtr or its container here. + B* b; + ^ +bad_raw_ptr_cast_recursive.cpp:23:3: note: [chromium-style] 'B' manages BackupRefPtr or its container here. + A* a; + ^ +bad_raw_ptr_cast_recursive.cpp:19:3: note: [chromium-style] 'A' manages BackupRefPtr or its container here. + raw_ptr<int> ptr; + ^ +3 errors generated.
diff --git a/tools/clang/plugins/tests/bad_raw_ref_cast.cpp b/tools/clang/plugins/tests/bad_raw_ref_cast.cpp new file mode 100644 index 0000000..4cb848c --- /dev/null +++ b/tools/clang/plugins/tests/bad_raw_ref_cast.cpp
@@ -0,0 +1,119 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include <array> +#include <cstdint> +#include "base/memory/raw_ptr.h" + +struct RawRefWrapper { + raw_ref<int> ref; +}; + +struct RawRefWrapperWrapper { + RawRefWrapper* ref; +}; + +class RawRefWrapperWrapperWrapper { + public: + explicit RawRefWrapperWrapperWrapper(RawRefWrapperWrapper& ref) : ref_(ref) {} + + RawRefWrapperWrapper& ref_; +}; + +struct RawRefWrapperSub : RawRefWrapper {}; +struct RawRefWrapperVirtualSub : virtual RawRefWrapper {}; + +void MyFunc(void* p) {} + +void CastFromCastingUnsafe() { + // "Casting unsafe" type variables; + raw_ref<int> p0; + RawRefWrapper p1; + RawRefWrapperWrapper p2; + RawRefWrapperWrapperWrapper p3(p2); + RawRefWrapper p4[10]; + RawRefWrapperSub p5; + RawRefWrapperVirtualSub p6; + + // CK_BitCast via |static_cast| should emit an error. + (void)static_cast<void*>(&p0); + (void)static_cast<void*>(&p1); + (void)static_cast<void*>(&p2); + (void)static_cast<void*>(&p3); + (void)static_cast<void*>(&p4); + (void)static_cast<void*>(&p5); + (void)static_cast<void*>(&p6); + + // CK_BitCast via C-style casting should emit an error. + (void)(void*)&p0; + (void)(void*)&p1; + (void)(void*)&p2; + (void)(void*)&p3; + (void)(void*)&p4; + (void)(void*)&p5; + (void)(void*)&p6; + + // CK_BitCast via |reinterpret_cast| should emit an error. + (void)reinterpret_cast<void*>(&p0); + (void)reinterpret_cast<void*>(&p1); + (void)reinterpret_cast<void*>(&p2); + (void)reinterpret_cast<void*>(&p3); + (void)reinterpret_cast<void*>(&p4); + (void)reinterpret_cast<void*>(&p5); + (void)reinterpret_cast<void*>(&p6); + + // CK_LValueToRValueBitCast via |bit_cast| should emit an error. + (void)__builtin_bit_cast(void*, &p0); + (void)__builtin_bit_cast(void*, &p1); + (void)__builtin_bit_cast(void*, &p2); + (void)__builtin_bit_cast(void*, &p3); + (void)__builtin_bit_cast(void*, &p4); + (void)__builtin_bit_cast(void*, &p5); + (void)__builtin_bit_cast(void*, &p6); + + // CK_BitCast via implicit casting should emit an error. + MyFunc(&p0); + MyFunc(&p1); + MyFunc(&p2); + MyFunc(&p3); + MyFunc(&p4); + MyFunc(&p5); + MyFunc(&p6); +} + +void CastToCastingUnsafe() { + void* p = nullptr; + + // CK_BitCast via |static_cast| should emit an error. + (void)static_cast<raw_ref<int>*>(p); + (void)static_cast<RawRefWrapper*>(p); + (void)static_cast<RawRefWrapperWrapper*>(p); + (void)static_cast<RawRefWrapperWrapperWrapper*>(p); + (void)static_cast<RawRefWrapperSub*>(p); + (void)static_cast<RawRefWrapperVirtualSub*>(p); + + // CK_BitCast via C-style casting should emit an error. + (void)(raw_ptr<int>*)p; + (void)(RawRefWrapper*)p; + (void)(RawRefWrapperWrapper*)p; + (void)(RawRefWrapperWrapperWrapper*)p; + (void)(RawRefWrapperSub*)p; + (void)(RawRefWrapperVirtualSub*)p; + + // CK_BitCast via |reinterpret_cast| should emit an error. + (void)reinterpret_cast<raw_ref<int>*>(p); + (void)reinterpret_cast<RawRefWrapper*>(p); + (void)reinterpret_cast<RawRefWrapperWrapper*>(p); + (void)reinterpret_cast<RawRefWrapperWrapperWrapper*>(p); + (void)reinterpret_cast<RawRefWrapperSub*>(p); + (void)reinterpret_cast<RawRefWrapperVirtualSub*>(p); + + // CK_LValueToRValueBitCast via |bit_cast| should emit an error. + (void)__builtin_bit_cast(raw_ref<int>*, p); + (void)__builtin_bit_cast(RawRefWrapper*, p); + (void)__builtin_bit_cast(RawRefWrapperWrapper*, p); + (void)__builtin_bit_cast(RawRefWrapperWrapperWrapper*, p); + (void)__builtin_bit_cast(RawRefWrapperSub*, p); + (void)__builtin_bit_cast(RawRefWrapperVirtualSub*, p); +}
diff --git a/tools/clang/plugins/tests/bad_raw_ref_cast.flags b/tools/clang/plugins/tests/bad_raw_ref_cast.flags new file mode 100644 index 0000000..97c992b2 --- /dev/null +++ b/tools/clang/plugins/tests/bad_raw_ref_cast.flags
@@ -0,0 +1 @@ +-ferror-limit=0 -Xclang -plugin-arg-find-bad-constructs -Xclang check-bad-raw-ptr-cast
diff --git a/tools/clang/plugins/tests/bad_raw_ref_cast.txt b/tools/clang/plugins/tests/bad_raw_ref_cast.txt new file mode 100644 index 0000000..00f98ef7 --- /dev/null +++ b/tools/clang/plugins/tests/bad_raw_ref_cast.txt
@@ -0,0 +1,522 @@ +bad_raw_ref_cast.cpp:40:29: error: [chromium-style] casting 'raw_ref<int> *' to 'void * is not allowed. + (void)static_cast<void*>(&p0); + ^ +bad_raw_ref_cast.cpp:40:29: note: [chromium-style] 'raw_ref<int> *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ref_cast.cpp:41:29: error: [chromium-style] casting 'RawRefWrapper *' to 'void * is not allowed. + (void)static_cast<void*>(&p1); + ^ +bad_raw_ref_cast.cpp:41:29: note: [chromium-style] 'RawRefWrapper *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ref_cast.cpp:10:3: note: [chromium-style] 'RawRefWrapper' manages BackupRefPtr or its container here. + raw_ref<int> ref; + ^ +bad_raw_ref_cast.cpp:42:29: error: [chromium-style] casting 'RawRefWrapperWrapper *' to 'void * is not allowed. + (void)static_cast<void*>(&p2); + ^ +bad_raw_ref_cast.cpp:42:29: note: [chromium-style] 'RawRefWrapperWrapper *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ref_cast.cpp:14:3: note: [chromium-style] 'RawRefWrapperWrapper' manages BackupRefPtr or its container here. + RawRefWrapper* ref; + ^ +bad_raw_ref_cast.cpp:10:3: note: [chromium-style] 'RawRefWrapper' manages BackupRefPtr or its container here. + raw_ref<int> ref; + ^ +bad_raw_ref_cast.cpp:43:29: error: [chromium-style] casting 'RawRefWrapperWrapperWrapper *' to 'void * is not allowed. + (void)static_cast<void*>(&p3); + ^ +bad_raw_ref_cast.cpp:43:29: note: [chromium-style] 'RawRefWrapperWrapperWrapper *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ref_cast.cpp:21:3: note: [chromium-style] 'RawRefWrapperWrapperWrapper' manages BackupRefPtr or its container here. + RawRefWrapperWrapper& ref_; + ^ +bad_raw_ref_cast.cpp:14:3: note: [chromium-style] 'RawRefWrapperWrapper' manages BackupRefPtr or its container here. + RawRefWrapper* ref; + ^ +bad_raw_ref_cast.cpp:10:3: note: [chromium-style] 'RawRefWrapper' manages BackupRefPtr or its container here. + raw_ref<int> ref; + ^ +bad_raw_ref_cast.cpp:44:29: error: [chromium-style] casting 'RawRefWrapper (*)[10]' to 'void * is not allowed. + (void)static_cast<void*>(&p4); + ^ +bad_raw_ref_cast.cpp:44:29: note: [chromium-style] 'RawRefWrapper (*)[10]' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ref_cast.cpp:10:3: note: [chromium-style] 'RawRefWrapper' manages BackupRefPtr or its container here. + raw_ref<int> ref; + ^ +bad_raw_ref_cast.cpp:45:29: error: [chromium-style] casting 'RawRefWrapperSub *' to 'void * is not allowed. + (void)static_cast<void*>(&p5); + ^ +bad_raw_ref_cast.cpp:45:29: note: [chromium-style] 'RawRefWrapperSub *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ref_cast.cpp:24:27: note: [chromium-style] 'RawRefWrapperSub' manages BackupRefPtr or its container here. +struct RawRefWrapperSub : RawRefWrapper {}; + ^ +bad_raw_ref_cast.cpp:10:3: note: [chromium-style] 'RawRefWrapper' manages BackupRefPtr or its container here. + raw_ref<int> ref; + ^ +bad_raw_ref_cast.cpp:46:29: error: [chromium-style] casting 'RawRefWrapperVirtualSub *' to 'void * is not allowed. + (void)static_cast<void*>(&p6); + ^ +bad_raw_ref_cast.cpp:46:29: note: [chromium-style] 'RawRefWrapperVirtualSub *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ref_cast.cpp:25:34: note: [chromium-style] 'RawRefWrapperVirtualSub' manages BackupRefPtr or its container here. +struct RawRefWrapperVirtualSub : virtual RawRefWrapper {}; + ^ +bad_raw_ref_cast.cpp:10:3: note: [chromium-style] 'RawRefWrapper' manages BackupRefPtr or its container here. + raw_ref<int> ref; + ^ +bad_raw_ref_cast.cpp:49:17: error: [chromium-style] casting 'raw_ref<int> *' to 'void * is not allowed. + (void)(void*)&p0; + ^ +bad_raw_ref_cast.cpp:49:17: note: [chromium-style] 'raw_ref<int> *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ref_cast.cpp:50:17: error: [chromium-style] casting 'RawRefWrapper *' to 'void * is not allowed. + (void)(void*)&p1; + ^ +bad_raw_ref_cast.cpp:50:17: note: [chromium-style] 'RawRefWrapper *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ref_cast.cpp:10:3: note: [chromium-style] 'RawRefWrapper' manages BackupRefPtr or its container here. + raw_ref<int> ref; + ^ +bad_raw_ref_cast.cpp:51:17: error: [chromium-style] casting 'RawRefWrapperWrapper *' to 'void * is not allowed. + (void)(void*)&p2; + ^ +bad_raw_ref_cast.cpp:51:17: note: [chromium-style] 'RawRefWrapperWrapper *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ref_cast.cpp:14:3: note: [chromium-style] 'RawRefWrapperWrapper' manages BackupRefPtr or its container here. + RawRefWrapper* ref; + ^ +bad_raw_ref_cast.cpp:10:3: note: [chromium-style] 'RawRefWrapper' manages BackupRefPtr or its container here. + raw_ref<int> ref; + ^ +bad_raw_ref_cast.cpp:52:17: error: [chromium-style] casting 'RawRefWrapperWrapperWrapper *' to 'void * is not allowed. + (void)(void*)&p3; + ^ +bad_raw_ref_cast.cpp:52:17: note: [chromium-style] 'RawRefWrapperWrapperWrapper *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ref_cast.cpp:21:3: note: [chromium-style] 'RawRefWrapperWrapperWrapper' manages BackupRefPtr or its container here. + RawRefWrapperWrapper& ref_; + ^ +bad_raw_ref_cast.cpp:14:3: note: [chromium-style] 'RawRefWrapperWrapper' manages BackupRefPtr or its container here. + RawRefWrapper* ref; + ^ +bad_raw_ref_cast.cpp:10:3: note: [chromium-style] 'RawRefWrapper' manages BackupRefPtr or its container here. + raw_ref<int> ref; + ^ +bad_raw_ref_cast.cpp:53:17: error: [chromium-style] casting 'RawRefWrapper (*)[10]' to 'void * is not allowed. + (void)(void*)&p4; + ^ +bad_raw_ref_cast.cpp:53:17: note: [chromium-style] 'RawRefWrapper (*)[10]' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ref_cast.cpp:10:3: note: [chromium-style] 'RawRefWrapper' manages BackupRefPtr or its container here. + raw_ref<int> ref; + ^ +bad_raw_ref_cast.cpp:54:17: error: [chromium-style] casting 'RawRefWrapperSub *' to 'void * is not allowed. + (void)(void*)&p5; + ^ +bad_raw_ref_cast.cpp:54:17: note: [chromium-style] 'RawRefWrapperSub *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ref_cast.cpp:24:27: note: [chromium-style] 'RawRefWrapperSub' manages BackupRefPtr or its container here. +struct RawRefWrapperSub : RawRefWrapper {}; + ^ +bad_raw_ref_cast.cpp:10:3: note: [chromium-style] 'RawRefWrapper' manages BackupRefPtr or its container here. + raw_ref<int> ref; + ^ +bad_raw_ref_cast.cpp:55:17: error: [chromium-style] casting 'RawRefWrapperVirtualSub *' to 'void * is not allowed. + (void)(void*)&p6; + ^ +bad_raw_ref_cast.cpp:55:17: note: [chromium-style] 'RawRefWrapperVirtualSub *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ref_cast.cpp:25:34: note: [chromium-style] 'RawRefWrapperVirtualSub' manages BackupRefPtr or its container here. +struct RawRefWrapperVirtualSub : virtual RawRefWrapper {}; + ^ +bad_raw_ref_cast.cpp:10:3: note: [chromium-style] 'RawRefWrapper' manages BackupRefPtr or its container here. + raw_ref<int> ref; + ^ +bad_raw_ref_cast.cpp:58:36: error: [chromium-style] casting 'raw_ref<int> *' to 'void * is not allowed. + (void)reinterpret_cast<void*>(&p0); + ^ +bad_raw_ref_cast.cpp:58:36: note: [chromium-style] 'raw_ref<int> *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ref_cast.cpp:59:36: error: [chromium-style] casting 'RawRefWrapper *' to 'void * is not allowed. + (void)reinterpret_cast<void*>(&p1); + ^ +bad_raw_ref_cast.cpp:59:36: note: [chromium-style] 'RawRefWrapper *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ref_cast.cpp:10:3: note: [chromium-style] 'RawRefWrapper' manages BackupRefPtr or its container here. + raw_ref<int> ref; + ^ +bad_raw_ref_cast.cpp:60:36: error: [chromium-style] casting 'RawRefWrapperWrapper *' to 'void * is not allowed. + (void)reinterpret_cast<void*>(&p2); + ^ +bad_raw_ref_cast.cpp:60:36: note: [chromium-style] 'RawRefWrapperWrapper *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ref_cast.cpp:14:3: note: [chromium-style] 'RawRefWrapperWrapper' manages BackupRefPtr or its container here. + RawRefWrapper* ref; + ^ +bad_raw_ref_cast.cpp:10:3: note: [chromium-style] 'RawRefWrapper' manages BackupRefPtr or its container here. + raw_ref<int> ref; + ^ +bad_raw_ref_cast.cpp:61:36: error: [chromium-style] casting 'RawRefWrapperWrapperWrapper *' to 'void * is not allowed. + (void)reinterpret_cast<void*>(&p3); + ^ +bad_raw_ref_cast.cpp:61:36: note: [chromium-style] 'RawRefWrapperWrapperWrapper *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ref_cast.cpp:21:3: note: [chromium-style] 'RawRefWrapperWrapperWrapper' manages BackupRefPtr or its container here. + RawRefWrapperWrapper& ref_; + ^ +bad_raw_ref_cast.cpp:14:3: note: [chromium-style] 'RawRefWrapperWrapper' manages BackupRefPtr or its container here. + RawRefWrapper* ref; + ^ +bad_raw_ref_cast.cpp:10:3: note: [chromium-style] 'RawRefWrapper' manages BackupRefPtr or its container here. + raw_ref<int> ref; + ^ +bad_raw_ref_cast.cpp:62:36: error: [chromium-style] casting 'RawRefWrapper (*)[10]' to 'void * is not allowed. + (void)reinterpret_cast<void*>(&p4); + ^ +bad_raw_ref_cast.cpp:62:36: note: [chromium-style] 'RawRefWrapper (*)[10]' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ref_cast.cpp:10:3: note: [chromium-style] 'RawRefWrapper' manages BackupRefPtr or its container here. + raw_ref<int> ref; + ^ +bad_raw_ref_cast.cpp:63:36: error: [chromium-style] casting 'RawRefWrapperSub *' to 'void * is not allowed. + (void)reinterpret_cast<void*>(&p5); + ^ +bad_raw_ref_cast.cpp:63:36: note: [chromium-style] 'RawRefWrapperSub *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ref_cast.cpp:24:27: note: [chromium-style] 'RawRefWrapperSub' manages BackupRefPtr or its container here. +struct RawRefWrapperSub : RawRefWrapper {}; + ^ +bad_raw_ref_cast.cpp:10:3: note: [chromium-style] 'RawRefWrapper' manages BackupRefPtr or its container here. + raw_ref<int> ref; + ^ +bad_raw_ref_cast.cpp:64:36: error: [chromium-style] casting 'RawRefWrapperVirtualSub *' to 'void * is not allowed. + (void)reinterpret_cast<void*>(&p6); + ^ +bad_raw_ref_cast.cpp:64:36: note: [chromium-style] 'RawRefWrapperVirtualSub *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ref_cast.cpp:25:34: note: [chromium-style] 'RawRefWrapperVirtualSub' manages BackupRefPtr or its container here. +struct RawRefWrapperVirtualSub : virtual RawRefWrapper {}; + ^ +bad_raw_ref_cast.cpp:10:3: note: [chromium-style] 'RawRefWrapper' manages BackupRefPtr or its container here. + raw_ref<int> ref; + ^ +bad_raw_ref_cast.cpp:67:38: error: [chromium-style] casting 'raw_ref<int> *' to 'void * is not allowed. + (void)__builtin_bit_cast(void*, &p0); + ^ +bad_raw_ref_cast.cpp:67:38: note: [chromium-style] 'raw_ref<int> *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ref_cast.cpp:68:38: error: [chromium-style] casting 'RawRefWrapper *' to 'void * is not allowed. + (void)__builtin_bit_cast(void*, &p1); + ^ +bad_raw_ref_cast.cpp:68:38: note: [chromium-style] 'RawRefWrapper *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ref_cast.cpp:10:3: note: [chromium-style] 'RawRefWrapper' manages BackupRefPtr or its container here. + raw_ref<int> ref; + ^ +bad_raw_ref_cast.cpp:69:38: error: [chromium-style] casting 'RawRefWrapperWrapper *' to 'void * is not allowed. + (void)__builtin_bit_cast(void*, &p2); + ^ +bad_raw_ref_cast.cpp:69:38: note: [chromium-style] 'RawRefWrapperWrapper *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ref_cast.cpp:14:3: note: [chromium-style] 'RawRefWrapperWrapper' manages BackupRefPtr or its container here. + RawRefWrapper* ref; + ^ +bad_raw_ref_cast.cpp:10:3: note: [chromium-style] 'RawRefWrapper' manages BackupRefPtr or its container here. + raw_ref<int> ref; + ^ +bad_raw_ref_cast.cpp:70:38: error: [chromium-style] casting 'RawRefWrapperWrapperWrapper *' to 'void * is not allowed. + (void)__builtin_bit_cast(void*, &p3); + ^ +bad_raw_ref_cast.cpp:70:38: note: [chromium-style] 'RawRefWrapperWrapperWrapper *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ref_cast.cpp:21:3: note: [chromium-style] 'RawRefWrapperWrapperWrapper' manages BackupRefPtr or its container here. + RawRefWrapperWrapper& ref_; + ^ +bad_raw_ref_cast.cpp:14:3: note: [chromium-style] 'RawRefWrapperWrapper' manages BackupRefPtr or its container here. + RawRefWrapper* ref; + ^ +bad_raw_ref_cast.cpp:10:3: note: [chromium-style] 'RawRefWrapper' manages BackupRefPtr or its container here. + raw_ref<int> ref; + ^ +bad_raw_ref_cast.cpp:71:38: error: [chromium-style] casting 'RawRefWrapper (*)[10]' to 'void * is not allowed. + (void)__builtin_bit_cast(void*, &p4); + ^ +bad_raw_ref_cast.cpp:71:38: note: [chromium-style] 'RawRefWrapper (*)[10]' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ref_cast.cpp:10:3: note: [chromium-style] 'RawRefWrapper' manages BackupRefPtr or its container here. + raw_ref<int> ref; + ^ +bad_raw_ref_cast.cpp:72:38: error: [chromium-style] casting 'RawRefWrapperSub *' to 'void * is not allowed. + (void)__builtin_bit_cast(void*, &p5); + ^ +bad_raw_ref_cast.cpp:72:38: note: [chromium-style] 'RawRefWrapperSub *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ref_cast.cpp:24:27: note: [chromium-style] 'RawRefWrapperSub' manages BackupRefPtr or its container here. +struct RawRefWrapperSub : RawRefWrapper {}; + ^ +bad_raw_ref_cast.cpp:10:3: note: [chromium-style] 'RawRefWrapper' manages BackupRefPtr or its container here. + raw_ref<int> ref; + ^ +bad_raw_ref_cast.cpp:73:38: error: [chromium-style] casting 'RawRefWrapperVirtualSub *' to 'void * is not allowed. + (void)__builtin_bit_cast(void*, &p6); + ^ +bad_raw_ref_cast.cpp:73:38: note: [chromium-style] 'RawRefWrapperVirtualSub *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ref_cast.cpp:25:34: note: [chromium-style] 'RawRefWrapperVirtualSub' manages BackupRefPtr or its container here. +struct RawRefWrapperVirtualSub : virtual RawRefWrapper {}; + ^ +bad_raw_ref_cast.cpp:10:3: note: [chromium-style] 'RawRefWrapper' manages BackupRefPtr or its container here. + raw_ref<int> ref; + ^ +bad_raw_ref_cast.cpp:76:11: error: [chromium-style] casting 'raw_ref<int> *' to 'void * is not allowed. + MyFunc(&p0); + ^ +bad_raw_ref_cast.cpp:76:11: note: [chromium-style] 'raw_ref<int> *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ref_cast.cpp:77:11: error: [chromium-style] casting 'RawRefWrapper *' to 'void * is not allowed. + MyFunc(&p1); + ^ +bad_raw_ref_cast.cpp:77:11: note: [chromium-style] 'RawRefWrapper *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ref_cast.cpp:10:3: note: [chromium-style] 'RawRefWrapper' manages BackupRefPtr or its container here. + raw_ref<int> ref; + ^ +bad_raw_ref_cast.cpp:78:11: error: [chromium-style] casting 'RawRefWrapperWrapper *' to 'void * is not allowed. + MyFunc(&p2); + ^ +bad_raw_ref_cast.cpp:78:11: note: [chromium-style] 'RawRefWrapperWrapper *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ref_cast.cpp:14:3: note: [chromium-style] 'RawRefWrapperWrapper' manages BackupRefPtr or its container here. + RawRefWrapper* ref; + ^ +bad_raw_ref_cast.cpp:10:3: note: [chromium-style] 'RawRefWrapper' manages BackupRefPtr or its container here. + raw_ref<int> ref; + ^ +bad_raw_ref_cast.cpp:79:11: error: [chromium-style] casting 'RawRefWrapperWrapperWrapper *' to 'void * is not allowed. + MyFunc(&p3); + ^ +bad_raw_ref_cast.cpp:79:11: note: [chromium-style] 'RawRefWrapperWrapperWrapper *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ref_cast.cpp:21:3: note: [chromium-style] 'RawRefWrapperWrapperWrapper' manages BackupRefPtr or its container here. + RawRefWrapperWrapper& ref_; + ^ +bad_raw_ref_cast.cpp:14:3: note: [chromium-style] 'RawRefWrapperWrapper' manages BackupRefPtr or its container here. + RawRefWrapper* ref; + ^ +bad_raw_ref_cast.cpp:10:3: note: [chromium-style] 'RawRefWrapper' manages BackupRefPtr or its container here. + raw_ref<int> ref; + ^ +bad_raw_ref_cast.cpp:80:11: error: [chromium-style] casting 'RawRefWrapper (*)[10]' to 'void * is not allowed. + MyFunc(&p4); + ^ +bad_raw_ref_cast.cpp:80:11: note: [chromium-style] 'RawRefWrapper (*)[10]' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ref_cast.cpp:10:3: note: [chromium-style] 'RawRefWrapper' manages BackupRefPtr or its container here. + raw_ref<int> ref; + ^ +bad_raw_ref_cast.cpp:81:11: error: [chromium-style] casting 'RawRefWrapperSub *' to 'void * is not allowed. + MyFunc(&p5); + ^ +bad_raw_ref_cast.cpp:81:11: note: [chromium-style] 'RawRefWrapperSub *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ref_cast.cpp:24:27: note: [chromium-style] 'RawRefWrapperSub' manages BackupRefPtr or its container here. +struct RawRefWrapperSub : RawRefWrapper {}; + ^ +bad_raw_ref_cast.cpp:10:3: note: [chromium-style] 'RawRefWrapper' manages BackupRefPtr or its container here. + raw_ref<int> ref; + ^ +bad_raw_ref_cast.cpp:82:11: error: [chromium-style] casting 'RawRefWrapperVirtualSub *' to 'void * is not allowed. + MyFunc(&p6); + ^ +bad_raw_ref_cast.cpp:82:11: note: [chromium-style] 'RawRefWrapperVirtualSub *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ref_cast.cpp:25:34: note: [chromium-style] 'RawRefWrapperVirtualSub' manages BackupRefPtr or its container here. +struct RawRefWrapperVirtualSub : virtual RawRefWrapper {}; + ^ +bad_raw_ref_cast.cpp:10:3: note: [chromium-style] 'RawRefWrapper' manages BackupRefPtr or its container here. + raw_ref<int> ref; + ^ +bad_raw_ref_cast.cpp:89:37: error: [chromium-style] casting 'void *' to 'raw_ref<int> * is not allowed. + (void)static_cast<raw_ref<int>*>(p); + ^ +bad_raw_ref_cast.cpp:89:37: note: [chromium-style] 'raw_ref<int> *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ref_cast.cpp:90:38: error: [chromium-style] casting 'void *' to 'RawRefWrapper * is not allowed. + (void)static_cast<RawRefWrapper*>(p); + ^ +bad_raw_ref_cast.cpp:90:38: note: [chromium-style] 'RawRefWrapper *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ref_cast.cpp:10:3: note: [chromium-style] 'RawRefWrapper' manages BackupRefPtr or its container here. + raw_ref<int> ref; + ^ +bad_raw_ref_cast.cpp:91:45: error: [chromium-style] casting 'void *' to 'RawRefWrapperWrapper * is not allowed. + (void)static_cast<RawRefWrapperWrapper*>(p); + ^ +bad_raw_ref_cast.cpp:91:45: note: [chromium-style] 'RawRefWrapperWrapper *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ref_cast.cpp:14:3: note: [chromium-style] 'RawRefWrapperWrapper' manages BackupRefPtr or its container here. + RawRefWrapper* ref; + ^ +bad_raw_ref_cast.cpp:10:3: note: [chromium-style] 'RawRefWrapper' manages BackupRefPtr or its container here. + raw_ref<int> ref; + ^ +bad_raw_ref_cast.cpp:92:52: error: [chromium-style] casting 'void *' to 'RawRefWrapperWrapperWrapper * is not allowed. + (void)static_cast<RawRefWrapperWrapperWrapper*>(p); + ^ +bad_raw_ref_cast.cpp:92:52: note: [chromium-style] 'RawRefWrapperWrapperWrapper *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ref_cast.cpp:21:3: note: [chromium-style] 'RawRefWrapperWrapperWrapper' manages BackupRefPtr or its container here. + RawRefWrapperWrapper& ref_; + ^ +bad_raw_ref_cast.cpp:14:3: note: [chromium-style] 'RawRefWrapperWrapper' manages BackupRefPtr or its container here. + RawRefWrapper* ref; + ^ +bad_raw_ref_cast.cpp:10:3: note: [chromium-style] 'RawRefWrapper' manages BackupRefPtr or its container here. + raw_ref<int> ref; + ^ +bad_raw_ref_cast.cpp:93:41: error: [chromium-style] casting 'void *' to 'RawRefWrapperSub * is not allowed. + (void)static_cast<RawRefWrapperSub*>(p); + ^ +bad_raw_ref_cast.cpp:93:41: note: [chromium-style] 'RawRefWrapperSub *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ref_cast.cpp:24:27: note: [chromium-style] 'RawRefWrapperSub' manages BackupRefPtr or its container here. +struct RawRefWrapperSub : RawRefWrapper {}; + ^ +bad_raw_ref_cast.cpp:10:3: note: [chromium-style] 'RawRefWrapper' manages BackupRefPtr or its container here. + raw_ref<int> ref; + ^ +bad_raw_ref_cast.cpp:94:48: error: [chromium-style] casting 'void *' to 'RawRefWrapperVirtualSub * is not allowed. + (void)static_cast<RawRefWrapperVirtualSub*>(p); + ^ +bad_raw_ref_cast.cpp:94:48: note: [chromium-style] 'RawRefWrapperVirtualSub *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ref_cast.cpp:25:34: note: [chromium-style] 'RawRefWrapperVirtualSub' manages BackupRefPtr or its container here. +struct RawRefWrapperVirtualSub : virtual RawRefWrapper {}; + ^ +bad_raw_ref_cast.cpp:10:3: note: [chromium-style] 'RawRefWrapper' manages BackupRefPtr or its container here. + raw_ref<int> ref; + ^ +bad_raw_ref_cast.cpp:97:24: error: [chromium-style] casting 'void *' to 'raw_ptr<int> * is not allowed. + (void)(raw_ptr<int>*)p; + ^ +bad_raw_ref_cast.cpp:97:24: note: [chromium-style] 'raw_ptr<int> *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ref_cast.cpp:98:25: error: [chromium-style] casting 'void *' to 'RawRefWrapper * is not allowed. + (void)(RawRefWrapper*)p; + ^ +bad_raw_ref_cast.cpp:98:25: note: [chromium-style] 'RawRefWrapper *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ref_cast.cpp:10:3: note: [chromium-style] 'RawRefWrapper' manages BackupRefPtr or its container here. + raw_ref<int> ref; + ^ +bad_raw_ref_cast.cpp:99:32: error: [chromium-style] casting 'void *' to 'RawRefWrapperWrapper * is not allowed. + (void)(RawRefWrapperWrapper*)p; + ^ +bad_raw_ref_cast.cpp:99:32: note: [chromium-style] 'RawRefWrapperWrapper *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ref_cast.cpp:14:3: note: [chromium-style] 'RawRefWrapperWrapper' manages BackupRefPtr or its container here. + RawRefWrapper* ref; + ^ +bad_raw_ref_cast.cpp:10:3: note: [chromium-style] 'RawRefWrapper' manages BackupRefPtr or its container here. + raw_ref<int> ref; + ^ +bad_raw_ref_cast.cpp:100:39: error: [chromium-style] casting 'void *' to 'RawRefWrapperWrapperWrapper * is not allowed. + (void)(RawRefWrapperWrapperWrapper*)p; + ^ +bad_raw_ref_cast.cpp:100:39: note: [chromium-style] 'RawRefWrapperWrapperWrapper *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ref_cast.cpp:21:3: note: [chromium-style] 'RawRefWrapperWrapperWrapper' manages BackupRefPtr or its container here. + RawRefWrapperWrapper& ref_; + ^ +bad_raw_ref_cast.cpp:14:3: note: [chromium-style] 'RawRefWrapperWrapper' manages BackupRefPtr or its container here. + RawRefWrapper* ref; + ^ +bad_raw_ref_cast.cpp:10:3: note: [chromium-style] 'RawRefWrapper' manages BackupRefPtr or its container here. + raw_ref<int> ref; + ^ +bad_raw_ref_cast.cpp:101:28: error: [chromium-style] casting 'void *' to 'RawRefWrapperSub * is not allowed. + (void)(RawRefWrapperSub*)p; + ^ +bad_raw_ref_cast.cpp:101:28: note: [chromium-style] 'RawRefWrapperSub *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ref_cast.cpp:24:27: note: [chromium-style] 'RawRefWrapperSub' manages BackupRefPtr or its container here. +struct RawRefWrapperSub : RawRefWrapper {}; + ^ +bad_raw_ref_cast.cpp:10:3: note: [chromium-style] 'RawRefWrapper' manages BackupRefPtr or its container here. + raw_ref<int> ref; + ^ +bad_raw_ref_cast.cpp:102:35: error: [chromium-style] casting 'void *' to 'RawRefWrapperVirtualSub * is not allowed. + (void)(RawRefWrapperVirtualSub*)p; + ^ +bad_raw_ref_cast.cpp:102:35: note: [chromium-style] 'RawRefWrapperVirtualSub *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ref_cast.cpp:25:34: note: [chromium-style] 'RawRefWrapperVirtualSub' manages BackupRefPtr or its container here. +struct RawRefWrapperVirtualSub : virtual RawRefWrapper {}; + ^ +bad_raw_ref_cast.cpp:10:3: note: [chromium-style] 'RawRefWrapper' manages BackupRefPtr or its container here. + raw_ref<int> ref; + ^ +bad_raw_ref_cast.cpp:105:42: error: [chromium-style] casting 'void *' to 'raw_ref<int> * is not allowed. + (void)reinterpret_cast<raw_ref<int>*>(p); + ^ +bad_raw_ref_cast.cpp:105:42: note: [chromium-style] 'raw_ref<int> *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ref_cast.cpp:106:43: error: [chromium-style] casting 'void *' to 'RawRefWrapper * is not allowed. + (void)reinterpret_cast<RawRefWrapper*>(p); + ^ +bad_raw_ref_cast.cpp:106:43: note: [chromium-style] 'RawRefWrapper *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ref_cast.cpp:10:3: note: [chromium-style] 'RawRefWrapper' manages BackupRefPtr or its container here. + raw_ref<int> ref; + ^ +bad_raw_ref_cast.cpp:107:50: error: [chromium-style] casting 'void *' to 'RawRefWrapperWrapper * is not allowed. + (void)reinterpret_cast<RawRefWrapperWrapper*>(p); + ^ +bad_raw_ref_cast.cpp:107:50: note: [chromium-style] 'RawRefWrapperWrapper *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ref_cast.cpp:14:3: note: [chromium-style] 'RawRefWrapperWrapper' manages BackupRefPtr or its container here. + RawRefWrapper* ref; + ^ +bad_raw_ref_cast.cpp:10:3: note: [chromium-style] 'RawRefWrapper' manages BackupRefPtr or its container here. + raw_ref<int> ref; + ^ +bad_raw_ref_cast.cpp:108:57: error: [chromium-style] casting 'void *' to 'RawRefWrapperWrapperWrapper * is not allowed. + (void)reinterpret_cast<RawRefWrapperWrapperWrapper*>(p); + ^ +bad_raw_ref_cast.cpp:108:57: note: [chromium-style] 'RawRefWrapperWrapperWrapper *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ref_cast.cpp:21:3: note: [chromium-style] 'RawRefWrapperWrapperWrapper' manages BackupRefPtr or its container here. + RawRefWrapperWrapper& ref_; + ^ +bad_raw_ref_cast.cpp:14:3: note: [chromium-style] 'RawRefWrapperWrapper' manages BackupRefPtr or its container here. + RawRefWrapper* ref; + ^ +bad_raw_ref_cast.cpp:10:3: note: [chromium-style] 'RawRefWrapper' manages BackupRefPtr or its container here. + raw_ref<int> ref; + ^ +bad_raw_ref_cast.cpp:109:46: error: [chromium-style] casting 'void *' to 'RawRefWrapperSub * is not allowed. + (void)reinterpret_cast<RawRefWrapperSub*>(p); + ^ +bad_raw_ref_cast.cpp:109:46: note: [chromium-style] 'RawRefWrapperSub *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ref_cast.cpp:24:27: note: [chromium-style] 'RawRefWrapperSub' manages BackupRefPtr or its container here. +struct RawRefWrapperSub : RawRefWrapper {}; + ^ +bad_raw_ref_cast.cpp:10:3: note: [chromium-style] 'RawRefWrapper' manages BackupRefPtr or its container here. + raw_ref<int> ref; + ^ +bad_raw_ref_cast.cpp:110:53: error: [chromium-style] casting 'void *' to 'RawRefWrapperVirtualSub * is not allowed. + (void)reinterpret_cast<RawRefWrapperVirtualSub*>(p); + ^ +bad_raw_ref_cast.cpp:110:53: note: [chromium-style] 'RawRefWrapperVirtualSub *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ref_cast.cpp:25:34: note: [chromium-style] 'RawRefWrapperVirtualSub' manages BackupRefPtr or its container here. +struct RawRefWrapperVirtualSub : virtual RawRefWrapper {}; + ^ +bad_raw_ref_cast.cpp:10:3: note: [chromium-style] 'RawRefWrapper' manages BackupRefPtr or its container here. + raw_ref<int> ref; + ^ +bad_raw_ref_cast.cpp:113:44: error: [chromium-style] casting 'void *' to 'raw_ref<int> * is not allowed. + (void)__builtin_bit_cast(raw_ref<int>*, p); + ^ +bad_raw_ref_cast.cpp:113:44: note: [chromium-style] 'raw_ref<int> *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ref_cast.cpp:114:45: error: [chromium-style] casting 'void *' to 'RawRefWrapper * is not allowed. + (void)__builtin_bit_cast(RawRefWrapper*, p); + ^ +bad_raw_ref_cast.cpp:114:45: note: [chromium-style] 'RawRefWrapper *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ref_cast.cpp:10:3: note: [chromium-style] 'RawRefWrapper' manages BackupRefPtr or its container here. + raw_ref<int> ref; + ^ +bad_raw_ref_cast.cpp:115:52: error: [chromium-style] casting 'void *' to 'RawRefWrapperWrapper * is not allowed. + (void)__builtin_bit_cast(RawRefWrapperWrapper*, p); + ^ +bad_raw_ref_cast.cpp:115:52: note: [chromium-style] 'RawRefWrapperWrapper *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ref_cast.cpp:14:3: note: [chromium-style] 'RawRefWrapperWrapper' manages BackupRefPtr or its container here. + RawRefWrapper* ref; + ^ +bad_raw_ref_cast.cpp:10:3: note: [chromium-style] 'RawRefWrapper' manages BackupRefPtr or its container here. + raw_ref<int> ref; + ^ +bad_raw_ref_cast.cpp:116:59: error: [chromium-style] casting 'void *' to 'RawRefWrapperWrapperWrapper * is not allowed. + (void)__builtin_bit_cast(RawRefWrapperWrapperWrapper*, p); + ^ +bad_raw_ref_cast.cpp:116:59: note: [chromium-style] 'RawRefWrapperWrapperWrapper *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ref_cast.cpp:21:3: note: [chromium-style] 'RawRefWrapperWrapperWrapper' manages BackupRefPtr or its container here. + RawRefWrapperWrapper& ref_; + ^ +bad_raw_ref_cast.cpp:14:3: note: [chromium-style] 'RawRefWrapperWrapper' manages BackupRefPtr or its container here. + RawRefWrapper* ref; + ^ +bad_raw_ref_cast.cpp:10:3: note: [chromium-style] 'RawRefWrapper' manages BackupRefPtr or its container here. + raw_ref<int> ref; + ^ +bad_raw_ref_cast.cpp:117:48: error: [chromium-style] casting 'void *' to 'RawRefWrapperSub * is not allowed. + (void)__builtin_bit_cast(RawRefWrapperSub*, p); + ^ +bad_raw_ref_cast.cpp:117:48: note: [chromium-style] 'RawRefWrapperSub *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ref_cast.cpp:24:27: note: [chromium-style] 'RawRefWrapperSub' manages BackupRefPtr or its container here. +struct RawRefWrapperSub : RawRefWrapper {}; + ^ +bad_raw_ref_cast.cpp:10:3: note: [chromium-style] 'RawRefWrapper' manages BackupRefPtr or its container here. + raw_ref<int> ref; + ^ +bad_raw_ref_cast.cpp:118:55: error: [chromium-style] casting 'void *' to 'RawRefWrapperVirtualSub * is not allowed. + (void)__builtin_bit_cast(RawRefWrapperVirtualSub*, p); + ^ +bad_raw_ref_cast.cpp:118:55: note: [chromium-style] 'RawRefWrapperVirtualSub *' manages BackupRefPtr refcounts; bypassing its C++ interface or treating it as a POD will lead to memory safety errors. +bad_raw_ref_cast.cpp:25:34: note: [chromium-style] 'RawRefWrapperVirtualSub' manages BackupRefPtr or its container here. +struct RawRefWrapperVirtualSub : virtual RawRefWrapper {}; + ^ +bad_raw_ref_cast.cpp:10:3: note: [chromium-style] 'RawRefWrapper' manages BackupRefPtr or its container here. + raw_ref<int> ref; + ^ +59 errors generated.
diff --git a/tools/clang/plugins/tests/base/allocator/partition_allocator/pointers/raw_ptr.h b/tools/clang/plugins/tests/base/allocator/partition_allocator/pointers/raw_ptr.h new file mode 100644 index 0000000..edf2516 --- /dev/null +++ b/tools/clang/plugins/tests/base/allocator/partition_allocator/pointers/raw_ptr.h
@@ -0,0 +1,25 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef TOOLS_CLANG_PLUGINS_TESTS_BASE_ALLOCATOR_PARTITION_ALLOCATOR_POINTERS_RAW_PTR_H_ +#define TOOLS_CLANG_PLUGINS_TESTS_BASE_ALLOCATOR_PARTITION_ALLOCATOR_POINTERS_RAW_PTR_H_ + +namespace base { + +template <typename T> +class raw_ptr { + T* ptr; +}; + +template <typename T> +class raw_ref { + T* ref; +}; + +} // namespace base + +using base::raw_ptr; +using base::raw_ref; + +#endif // TOOLS_CLANG_PLUGINS_TESTS_BASE_ALLOCATOR_PARTITION_ALLOCATOR_POINTERS_RAW_PTR_H_
diff --git a/tools/clang/plugins/tests/base/allocator/partition_allocator/pointers/raw_ptr_cast.h b/tools/clang/plugins/tests/base/allocator/partition_allocator/pointers/raw_ptr_cast.h new file mode 100644 index 0000000..ccd3b2b --- /dev/null +++ b/tools/clang/plugins/tests/base/allocator/partition_allocator/pointers/raw_ptr_cast.h
@@ -0,0 +1,27 @@ +// 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 TOOLS_CLANG_PLUGINS_TESTS_BASE_ALLOCATOR_PARTITION_ALLOCATOR_POINTERS_RAW_PTR_CAST_H_ +#define TOOLS_CLANG_PLUGINS_TESTS_BASE_ALLOCATOR_PARTITION_ALLOCATOR_POINTERS_RAW_PTR_CAST_H_ + +namespace base { + +template <typename Dest, typename Source> +inline constexpr Dest unsafe_raw_ptr_static_cast(Source source) { + return static_cast<Dest>(source); +} + +template <typename Dest, typename Source> +inline constexpr Dest unsafe_raw_ptr_reinterpret_cast(Source source) { + return reinterpret_cast<Dest>(source); +} + +template <typename Dest, typename Source> +inline constexpr Dest unsafe_raw_ptr_bit_cast(Source source) { + return __builtin_bit_cast(Dest, source); +} + +} // namespace base + +#endif // TOOLS_CLANG_PLUGINS_TESTS_BASE_ALLOCATOR_PARTITION_ALLOCATOR_POINTERS_RAW_PTR_CAST_H_
diff --git a/tools/clang/plugins/tests/base/allocator/partition_allocator/pointers/raw_ptr_exclusion.h b/tools/clang/plugins/tests/base/allocator/partition_allocator/pointers/raw_ptr_exclusion.h new file mode 100644 index 0000000..8d8b1c5 --- /dev/null +++ b/tools/clang/plugins/tests/base/allocator/partition_allocator/pointers/raw_ptr_exclusion.h
@@ -0,0 +1,12 @@ +// 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 TOOLS_CLANG_PLUGINS_TESTS_BASE_ALLOCATOR_PARTITION_ALLOCATOR_POINTERS_RAW_PTR_EXCLUSION_H_ +#define TOOLS_CLANG_PLUGINS_TESTS_BASE_ALLOCATOR_PARTITION_ALLOCATOR_POINTERS_RAW_PTR_EXCLUSION_H_ + +// Marks a field as excluded from the raw_ptr usage enforcement clang plugin. +// Example: RAW_PTR_EXCLUSION Foo* foo_; +#define RAW_PTR_EXCLUSION __attribute__((annotate("raw_ptr_exclusion"))) + +#endif // TOOLS_CLANG_PLUGINS_TESTS_BASE_ALLOCATOR_PARTITION_ALLOCATOR_POINTERS_RAW_PTR_EXCLUSION_H_
diff --git a/tools/clang/plugins/tests/base/memory/raw_ptr.h b/tools/clang/plugins/tests/base/memory/raw_ptr.h index 5915b470..443c3ae 100644 --- a/tools/clang/plugins/tests/base/memory/raw_ptr.h +++ b/tools/clang/plugins/tests/base/memory/raw_ptr.h
@@ -5,17 +5,9 @@ #ifndef TOOLS_CLANG_PLUGINS_TESTS_BASE_MEMORY_RAW_PTR_H_ #define TOOLS_CLANG_PLUGINS_TESTS_BASE_MEMORY_RAW_PTR_H_ -namespace base { - -template <typename T> -class raw_ptr {}; - -template <typename T> -class raw_ref {}; - -} // namespace base - -using base::raw_ptr; -using base::raw_ref; +// Although `raw_ptr` is part of the standalone PA distribution, it is +// easier to use the shorter path in `//base/memory`. We retain this +// facade header for ease of typing. +#include "base/allocator/partition_allocator/pointers/raw_ptr.h" // IWYU pragma: export #endif // TOOLS_CLANG_PLUGINS_TESTS_BASE_MEMORY_RAW_PTR_H_
diff --git a/tools/clang/plugins/tests/base/memory/raw_ptr_cast.h b/tools/clang/plugins/tests/base/memory/raw_ptr_cast.h new file mode 100644 index 0000000..e4f16ca --- /dev/null +++ b/tools/clang/plugins/tests/base/memory/raw_ptr_cast.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 TOOLS_CLANG_PLUGINS_TESTS_BASE_MEMORY_RAW_PTR_CAST_H_ +#define TOOLS_CLANG_PLUGINS_TESTS_BASE_MEMORY_RAW_PTR_CAST_H_ + +// Although `raw_ptr` is part of the standalone PA distribution, it is +// easier to use the shorter path in `//base/memory`. We retain this +// facade header for ease of typing. +#include "base/allocator/partition_allocator/pointers/raw_ptr_cast.h" // IWYU pragma: export + +#endif // TOOLS_CLANG_PLUGINS_TESTS_BASE_MEMORY_RAW_PTR_CAST_H_
diff --git a/tools/clang/plugins/tests/base/memory/raw_ptr_exclusion.h b/tools/clang/plugins/tests/base/memory/raw_ptr_exclusion.h index 6c74744..cb0cefbd 100644 --- a/tools/clang/plugins/tests/base/memory/raw_ptr_exclusion.h +++ b/tools/clang/plugins/tests/base/memory/raw_ptr_exclusion.h
@@ -5,8 +5,9 @@ #ifndef TOOLS_CLANG_PLUGINS_TESTS_BASE_MEMORY_RAW_PTR_EXCLUSION_H_ #define TOOLS_CLANG_PLUGINS_TESTS_BASE_MEMORY_RAW_PTR_EXCLUSION_H_ -// Marks a field as excluded from the raw_ptr usage enforcement clang plugin. -// Example: RAW_PTR_EXCLUSION Foo* foo_; -#define RAW_PTR_EXCLUSION __attribute__((annotate("raw_ptr_exclusion"))) +// Although `raw_ptr` is part of the standalone PA distribution, it is +// easier to use the shorter path in `//base/memory`. We retain this +// facade header for ease of typing. +#include "base/allocator/partition_allocator/pointers/raw_ptr_exclusion.h" // IWYU pragma: export #endif // TOOLS_CLANG_PLUGINS_TESTS_BASE_MEMORY_RAW_PTR_EXCLUSION_H_
diff --git a/tools/clang/plugins/tests/test.py b/tools/clang/plugins/tests/test.py index 01c9ead..8903ae1 100755 --- a/tools/clang/plugins/tests/test.py +++ b/tools/clang/plugins/tests/test.py
@@ -23,8 +23,11 @@ # Skip code generation '-fsyntax-only', # Fake system directory for tests - '-isystem', os.path.join(os.getcwd(), 'system'), + '-isystem', + os.path.join(os.getcwd(), 'system'), '-Wno-inconsistent-missing-override', + '--include-directory', + '.', ])
diff --git a/tools/mb/mb_config.pyl b/tools/mb/mb_config.pyl index f039579..b264cdc 100644 --- a/tools/mb/mb_config.pyl +++ b/tools/mb/mb_config.pyl
@@ -401,8 +401,6 @@ 'Win 10 Fast Ring': 'release_trybot_minimal_symbols_reclient', 'Win x64 Builder (reclient compare)': 'gpu_tests_release_bot_minimal_symbols_reclient', 'Win x64 Builder (reclient)': 'gpu_tests_release_bot_minimal_symbols_reclient', - 'android-backuprefptr-arm-fyi-rel': 'release_trybot_backuprefptr_arm_reclient', - 'android-backuprefptr-arm64-fyi-rel': 'release_trybot_backuprefptr_arm64_reclient', 'android-build-perf-developer': 'android_developer', 'android-fieldtrial-rel': 'android_release_bot_minimal_symbols_x86_fastbuild_webview_monochrome_reclient', 'android-perfetto-rel': 'perfetto_release_bot_reclient_android', @@ -447,7 +445,6 @@ 'lacros-arm-generic-rel-skylab-fyi': 'chromeos_arm-generic_lacros_rel_skylab_reclient', 'lacros-arm64-generic-rel-skylab-fyi': 'chromeos_arm64-generic_lacros_rel_skylab_reclient', 'linux-annotator-rel': 'release_bot_reclient', - 'linux-backuprefptr-x64-fyi-rel': 'release_trybot_backuprefptr_x64_reclient', 'linux-blink-animation-use-time-delta': 'debug_bot_enable_blink_animation_use_time_delta_reclient', 'linux-blink-heap-concurrent-marking-tsan-rel': 'release_trybot_minimal_symbols_tsan', 'linux-blink-heap-verification': 'release_bot_enable_blink_heap_verification_dcheck_always_on_reclient', @@ -473,7 +470,6 @@ 'linux-wpt-fyi-rel': 'release_trybot_minimal_symbols_reclient', 'linux-wpt-identity-fyi-rel': 'release_bot_minimal_symbols_reclient', 'linux-wpt-input-fyi-rel': 'release_bot_minimal_symbols_reclient', - 'mac-backuprefptr-x64-fyi-rel': 'release_trybot_backuprefptr_x64_reclient', 'mac-cr23-rel': 'release_bot_minimal_symbols_reclient', 'mac-osxbeta-rel': 'gpu_tests_debug_trybot_reclient', 'mac-perfetto-rel': 'perfetto_release_bot_reclient', @@ -485,8 +481,6 @@ 'mac13-arm64-wpt-content-shell-fyi-rel': 'mac_arm64_release_bot_reclient', 'mac13-wpt-content-shell-fyi-rel': 'release_trybot_minimal_symbols_reclient', 'win-annotator-rel': 'release_bot_reclient', - 'win-backuprefptr-x64-fyi-rel': 'release_trybot_backuprefptr_x64_reclient', - 'win-backuprefptr-x86-fyi-rel': 'release_trybot_backuprefptr_x86_reclient', 'win-build-perf-developer': 'developer', 'win-celab-builder-rel': 'release_bot_minimal_symbols_reclient', 'win-cr23-rel': 'release_bot_minimal_symbols_reclient', @@ -3515,22 +3509,6 @@ 'release_trybot', ], - 'release_trybot_backuprefptr_arm64_reclient': [ - 'release_trybot_blink', 'no_goma', 'reclient', 'backuprefptr', 'android', 'arm64', - ], - - 'release_trybot_backuprefptr_arm_reclient': [ - 'release_trybot_blink', 'no_goma', 'reclient', 'backuprefptr', 'android', 'arm', - ], - - 'release_trybot_backuprefptr_x64_reclient': [ - 'release_trybot_blink', 'no_goma', 'reclient', 'backuprefptr', 'x64', - ], - - 'release_trybot_backuprefptr_x86_reclient': [ - 'release_trybot_blink', 'no_goma', 'reclient', 'backuprefptr', 'x86', - ], - 'release_trybot_blink': [ 'release_trybot_blink', ], @@ -3808,10 +3786,6 @@ 'gn_args': 'is_asan=true', }, - 'backuprefptr': { - 'gn_args': 'use_partition_alloc_as_malloc=true enable_backup_ref_ptr_support=true put_ref_count_in_previous_slot=true enable_backup_ref_ptr_slow_checks=true', - }, - 'betty-arc-r': { 'args_file': '//build/args/chromeos/betty-arc-r.gni', },
diff --git a/tools/mb/mb_config_expectations/chromium.fyi.json b/tools/mb/mb_config_expectations/chromium.fyi.json index 92a2b72e..4f982ca 100644 --- a/tools/mb/mb_config_expectations/chromium.fyi.json +++ b/tools/mb/mb_config_expectations/chromium.fyi.json
@@ -358,44 +358,6 @@ "use_remoteexec": true } }, - "android-backuprefptr-arm-fyi-rel": { - "gn_args": { - "dcheck_always_on": true, - "debuggable_apks": false, - "enable_backup_ref_ptr_slow_checks": true, - "enable_backup_ref_ptr_support": true, - "ffmpeg_branding": "Chrome", - "is_component_build": false, - "is_debug": false, - "proprietary_codecs": true, - "put_ref_count_in_previous_slot": true, - "symbol_level": 1, - "target_cpu": "arm", - "target_os": "android", - "use_goma": false, - "use_partition_alloc_as_malloc": true, - "use_remoteexec": true - } - }, - "android-backuprefptr-arm64-fyi-rel": { - "gn_args": { - "dcheck_always_on": true, - "debuggable_apks": false, - "enable_backup_ref_ptr_slow_checks": true, - "enable_backup_ref_ptr_support": true, - "ffmpeg_branding": "Chrome", - "is_component_build": false, - "is_debug": false, - "proprietary_codecs": true, - "put_ref_count_in_previous_slot": true, - "symbol_level": 1, - "target_cpu": "arm64", - "target_os": "android", - "use_goma": false, - "use_partition_alloc_as_malloc": true, - "use_remoteexec": true - } - }, "android-build-perf-developer": { "gn_args": { "enable_nacl": false, @@ -904,23 +866,6 @@ "use_remoteexec": true } }, - "linux-backuprefptr-x64-fyi-rel": { - "gn_args": { - "dcheck_always_on": true, - "enable_backup_ref_ptr_slow_checks": true, - "enable_backup_ref_ptr_support": true, - "ffmpeg_branding": "Chrome", - "is_component_build": false, - "is_debug": false, - "proprietary_codecs": true, - "put_ref_count_in_previous_slot": true, - "symbol_level": 1, - "target_cpu": "x64", - "use_goma": false, - "use_partition_alloc_as_malloc": true, - "use_remoteexec": true - } - }, "linux-blink-animation-use-time-delta": { "gn_args": { "blink_animation_use_time_delta": true, @@ -1172,23 +1117,6 @@ "use_remoteexec": true } }, - "mac-backuprefptr-x64-fyi-rel": { - "gn_args": { - "dcheck_always_on": true, - "enable_backup_ref_ptr_slow_checks": true, - "enable_backup_ref_ptr_support": true, - "ffmpeg_branding": "Chrome", - "is_component_build": false, - "is_debug": false, - "proprietary_codecs": true, - "put_ref_count_in_previous_slot": true, - "symbol_level": 1, - "target_cpu": "x64", - "use_goma": false, - "use_partition_alloc_as_malloc": true, - "use_remoteexec": true - } - }, "mac-cr23-rel": { "gn_args": { "dcheck_always_on": false, @@ -1289,40 +1217,6 @@ "use_remoteexec": true } }, - "win-backuprefptr-x64-fyi-rel": { - "gn_args": { - "dcheck_always_on": true, - "enable_backup_ref_ptr_slow_checks": true, - "enable_backup_ref_ptr_support": true, - "ffmpeg_branding": "Chrome", - "is_component_build": false, - "is_debug": false, - "proprietary_codecs": true, - "put_ref_count_in_previous_slot": true, - "symbol_level": 1, - "target_cpu": "x64", - "use_goma": false, - "use_partition_alloc_as_malloc": true, - "use_remoteexec": true - } - }, - "win-backuprefptr-x86-fyi-rel": { - "gn_args": { - "dcheck_always_on": true, - "enable_backup_ref_ptr_slow_checks": true, - "enable_backup_ref_ptr_support": true, - "ffmpeg_branding": "Chrome", - "is_component_build": false, - "is_debug": false, - "proprietary_codecs": true, - "put_ref_count_in_previous_slot": true, - "symbol_level": 1, - "target_cpu": "x86", - "use_goma": false, - "use_partition_alloc_as_malloc": true, - "use_remoteexec": true - } - }, "win-build-perf-developer": { "gn_args": { "enable_nacl": false,
diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums.xml index 9d3b1b9..d262586 100644 --- a/tools/metrics/histograms/enums.xml +++ b/tools/metrics/histograms/enums.xml
@@ -61694,6 +61694,7 @@ <int value="-480263549" label="AutofillShadowDOM:disabled"/> <int value="-479601398" label="InfoCardAcknowledgementTracking:enabled"/> <int value="-478462945" label="enable-ephemeral-apps"/> + <int value="-478404134" label="CCTPageInsightsHub:enabled"/> <int value="-477101783" label="HandwritingGesture:disabled"/> <int value="-476171840" label="EnableFamilyInfoFeedback:enabled"/> <int value="-475537287" label="EcheLauncherListView:enabled"/> @@ -65713,6 +65714,7 @@ <int value="1691568199" label="AndroidSpellCheckerNonLowEnd:disabled"/> <int value="1691853573" label="PersonalizationHub:enabled"/> <int value="1692847616" label="ArcEnableWebAppShare:enabled"/> + <int value="1692995109" label="CCTPageInsightsHub:disabled"/> <int value="1693094211" label="FilesNG:disabled"/> <int value="1693658048" label="AppsShortcutDefaultOff:enabled"/> <int value="1693685694" @@ -85484,9 +85486,6 @@ label="kMainFrameSameSiteCrossOriginNavigationNotOptInInMainFrameNavigation"/> <int value="67" label="kMemoryPressureOnTrigger"/> <int value="68" label="kMemoryPressureAfterTriggered"/> - <int value="69" label="SpeculationRuleRemoved"/> - <int value="70" label="TriggerPageNavigated"/> - <int value="71" label="OtherPrerenderedPageActivated"/> </enum> <enum name="PrerenderHoverEvent"> @@ -93596,7 +93595,7 @@ <int value="18" label="ContextualPageActions"/> <int value="23" label="SearchUserSegment"/> <int value="28" label="AdaptiveToolbar"/> - <int value="31" label="WebAppInstallationPromo"/> + <int value="32" label="WebAppInstallationPromo"/> </enum> <enum name="SegmentationPlatformTrainingDataCollectionEvent"> @@ -97055,9 +97054,9 @@ <enum name="SmartLockAuthEventPasswordState"> <int value="0" label="Unknown state"/> - <int value="1" label="No pairing"/> - <int value="2" label="Pairing changed"/> - <int value="3" label="User hardlock"/> + <int value="1" label="(obsolete) No pairing"/> + <int value="2" label="(obsolete) Pairing changed"/> + <int value="3" label="(obsolete) User hardlock"/> <int value="4" label="Service not active"/> <int value="5" label="No Bluetooth"/> <int value="6" label="Bluetooth connecting"/> @@ -97066,37 +97065,40 @@ <int value="9" label="Phone locked"/> <int value="10" label="RSSI too low"/> <int value="11" label="Phone authenticated"/> - <int value="12" label="Sign-in failed"/> - <int value="13" label="Pairing added"/> - <int value="14" label="No screenlock state handler"/> + <int value="12" label="(obsolete) Sign-in failed"/> + <int value="13" label="(obsolete) Pairing added"/> + <int value="14" label="(obsolete) No screenlock state handler"/> <int value="15" label="Phone locked and RSSI too low"/> <int value="16" label="(obsolete) Forced Reauthentication"/> - <int value="17" label="Sign-in with Smart Lock disabled"/> + <int value="17" label="(obsolete) Sign-in with Smart Lock disabled"/> <int value="18" label="Phone not lockable"/> <int value="19" label="Primary user absent"/> </enum> <enum name="SmartLockAuthMethodChoice"> + <obsolete> + Deprecated on 05/2023. + </obsolete> <int value="0" label="Smart Lock"/> <int value="1" label="Other"/> </enum> <enum name="SmartLockAuthResultFailureReason"> <int value="0" label="Unlock not allowed"/> - <int value="1" label="Already attempting auth (deprecated)"/> + <int value="1" label="(obsolete) Already attempting auth"/> <int value="2" label="Empty user account"/> <int value="3" label="Invalid account id"/> <int value="4" label="Auth attempt cannot start"/> <int value="5" label="No pending or active host"/> <int value="6" label="Authentication channel dropped"/> <int value="7" label="Failed to send unlock request"/> - <int value="8" label="Failed to decrypt sign-in"/> + <int value="8" label="(obsolete) Failed to decrypt sign-in"/> <int value="9" label="Failed to notify host device that Smart Lock was used"/> <int value="10" label="Authentication attempt timed out"/> <int value="11" label="Unlock event sent but not attempting auth"/> <int value="12" label="Unlock request sent but not attempting auth"/> - <int value="13" label="Login display host does not exist"/> - <int value="14" label="User controller sign in failure"/> + <int value="13" label="(obsolete) Login display host does not exist"/> + <int value="14" label="(obsolete) User controller sign in failure"/> </enum> <enum name="SmartLockEnabledState">
diff --git a/tools/metrics/histograms/metadata/accessibility/histograms.xml b/tools/metrics/histograms/metadata/accessibility/histograms.xml index b245d9e4..4ff29f9 100644 --- a/tools/metrics/histograms/metadata/accessibility/histograms.xml +++ b/tools/metrics/histograms/metadata/accessibility/histograms.xml
@@ -359,7 +359,7 @@ </histogram> <histogram name="Accessibility.Android.UserFontSizePref.Change" units="%" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>twellington@chromium.org</owner> <owner>skym@chromium.org</owner> <summary> @@ -370,7 +370,7 @@ </histogram> <histogram name="Accessibility.Android.UserFontSizePref.OnStartup" units="%" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>twellington@chromium.org</owner> <owner>skym@chromium.org</owner> <summary> @@ -2258,7 +2258,7 @@ </histogram> <histogram name="DomDistiller.Time.ViewingReaderModePage" units="ms" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>mdjones@chromium.org</owner> <summary> Records the amount of time a user spent on a Reader Mode Page.
diff --git a/tools/metrics/histograms/metadata/android/histograms.xml b/tools/metrics/histograms/metadata/android/histograms.xml index 8b43411..52de85f6 100644 --- a/tools/metrics/histograms/metadata/android/histograms.xml +++ b/tools/metrics/histograms/metadata/android/histograms.xml
@@ -187,7 +187,7 @@ </histogram> <histogram name="Android.AdaptiveToolbarButton.Settings.Changed" - enum="AdaptiveToolbarRadioButtonState" expires_after="2023-08-27"> + enum="AdaptiveToolbarRadioButtonState" expires_after="2023-11-12"> <owner>shaktisahu@chromium.org</owner> <owner>chrome-segmentation-platform@google.com</owner> <summary> @@ -198,7 +198,7 @@ </histogram> <histogram name="Android.AdaptiveToolbarButton.Settings.Startup" - enum="AdaptiveToolbarRadioButtonState" expires_after="2023-08-27"> + enum="AdaptiveToolbarRadioButtonState" expires_after="2023-11-12"> <owner>shaktisahu@chromium.org</owner> <owner>chrome-segmentation-platform@google.com</owner> <summary> @@ -230,7 +230,7 @@ </histogram> <histogram name="Android.AdaptiveToolbarButton.Variant.OnPageLoad" - enum="AdaptiveToolbarButtonVariant" expires_after="2023-09-03"> + enum="AdaptiveToolbarButtonVariant" expires_after="2023-11-12"> <owner>shaktisahu@chromium.org</owner> <owner>chrome-segmentation-platform@google.com</owner> <summary> @@ -243,7 +243,7 @@ </histogram> <histogram name="Android.AdaptiveToolbarButton.Variant.OnStartNavigation" - enum="AdaptiveToolbarButtonVariant" expires_after="2023-09-03"> + enum="AdaptiveToolbarButtonVariant" expires_after="2023-11-12"> <owner>shaktisahu@chromium.org</owner> <owner>chrome-segmentation-platform@google.com</owner> <summary> @@ -358,7 +358,7 @@ </histogram> <histogram name="Android.ArmCpuPart" enum="ArmCpuPart" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>rsesek@chromium.org</owner> <owner>clank-security@google.com</owner> <summary> @@ -513,7 +513,7 @@ </histogram> <histogram name="Android.BackgroundTaskScheduler.TaskScheduled.Failure" - enum="BackgroundTaskId" expires_after="2023-08-13"> + enum="BackgroundTaskId" expires_after="2023-11-12"> <owner>nyquist@chromium.org</owner> <owner>shaktisahu@chromium.org</owner> <summary> @@ -548,7 +548,7 @@ </histogram> <histogram name="Android.BackPress.Failure" enum="BackPressConsumer" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>lazzzis@chromium.org</owner> <owner>src/chrome/browser/back_press/android/OWNERS</owner> <summary> @@ -846,7 +846,7 @@ </histogram> <histogram name="Android.DarkTheme.EnabledState" enum="BooleanEnabled" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>twellington@chromium.org</owner> <owner>clank-app-team@google.com</owner> <summary> @@ -892,7 +892,7 @@ </histogram> <histogram name="Android.DeviceSize.LargestDisplaySize2" units="dp" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>twellington@chromium.org</owner> <owner>shuyng@google.com</owner> <owner>clank-app-team@google.com</owner> @@ -904,7 +904,7 @@ </histogram> <histogram name="Android.DeviceSize.ScreenSizeInTensOfInches" - units="10x inches" expires_after="2023-08-27"> + units="10x inches" expires_after="2023-11-12"> <owner>twellington@chromium.org</owner> <owner>aishwaryarj@google.com</owner> <owner>clank-app-team@google.com</owner> @@ -931,7 +931,7 @@ </histogram> <histogram name="Android.DeviceSize.SmallestDisplaySize2" units="dp" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>twellington@chromium.org</owner> <owner>shuyng@google.com</owner> <owner>clank-app-team@google.com</owner> @@ -1447,7 +1447,7 @@ </histogram> <histogram name="Android.FontLookup.Blink.GetTableLatency" units="ms" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>drott@chromium.org</owner> <owner>cduvall@chromium.org</owner> <owner>layout-dev@chromium.org</owner> @@ -1657,7 +1657,7 @@ </histogram> <histogram name="Android.IncognitoReauth.PromoAcceptedOrDismissed" - enum="IncognitoReauthPromoActionType" expires_after="2023-09-10"> + enum="IncognitoReauthPromoActionType" expires_after="2023-11-12"> <owner>roagarwal@chromium.org</owner> <owner>chrome-incognito@google.com</owner> <summary> @@ -1683,7 +1683,7 @@ </histogram> <histogram name="Android.IncognitoReauth.ToggleOnOrOff" enum="BooleanToggled" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>roagarwal@chromium.org</owner> <owner>chrome-incognito@google.com</owner> <summary> @@ -1695,7 +1695,7 @@ </histogram> <histogram name="Android.Intent.BlockedExternalNavLastGestureTime" units="ms" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>mthiesse@chromium.org</owner> <owner>yfriedman@chromium.org</owner> <summary> @@ -1770,7 +1770,7 @@ </histogram> <histogram base="true" name="Android.IsolatedSplits.ContextCreateTime" - units="ms" expires_after="2023-08-27"> + units="ms" expires_after="2023-11-12"> <!-- Name completed by histogram_suffixes name="AndroidFeatureModuleName" --> <owner>cduvall@chromium.org</owner> @@ -1782,7 +1782,7 @@ </histogram> <histogram base="true" name="Android.IsolatedSplits.PreloadWaitTime" units="ms" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <!-- Name completed by histogram_suffixes name="AndroidFeatureModuleName" --> <owner>cduvall@chromium.org</owner> @@ -1807,7 +1807,7 @@ </histogram> <histogram name="Android.KernelVersion" enum="AndroidKernelVersion" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>rsesek@chromium.org</owner> <summary> Reports the kernel major and minor version from the utsname.release field. @@ -2016,7 +2016,7 @@ </histogram> <histogram name="Android.MultiInstance.MaxInstanceCount" units="instances" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>jinsukkim@chromium.org</owner> <owner>twellington@chromium.org</owner> <owner>clank-app-team@google.com</owner> @@ -2028,7 +2028,7 @@ </histogram> <histogram name="Android.MultiInstance.NumActivities" units="activities" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>jinsukkim@chromium.org</owner> <owner>twellington@chromium.org</owner> <owner>clank-app-team@google.com</owner> @@ -2043,7 +2043,7 @@ </histogram> <histogram name="Android.MultiInstance.NumInstances" units="instances" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>jinsukkim@chromium.org</owner> <owner>twellington@chromium.org</owner> <owner>clank-app-team@google.com</owner> @@ -2168,7 +2168,7 @@ </histogram> <histogram name="Android.NTP.Impression" enum="NTPImpressionType" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>finkm@chromium.org</owner> <summary> Counts impressions of the NTP on Android. It also counts potential @@ -2208,7 +2208,7 @@ </histogram> <histogram name="Android.Omnibox.InvalidMatch" enum="MatchResult" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>ender@chromium.org</owner> <owner>tedchoc@chromium.org</owner> <owner>mpearson@chromium.org</owner> @@ -2425,7 +2425,7 @@ </histogram> <histogram name="Android.Omnibox.SuggestionView.CreatedType" - enum="OmniboxSuggestionUiType" expires_after="2023-09-03"> + enum="OmniboxSuggestionUiType" expires_after="2023-11-12"> <owner>ender@google.com</owner> <owner>gangwu@chromium.org</owner> <owner>rongtan@chromium.org</owner> @@ -2535,7 +2535,7 @@ </histogram> <histogram name="Android.Omnibox.SuggestionView.ReusedType" - enum="OmniboxSuggestionUiType" expires_after="2023-09-03"> + enum="OmniboxSuggestionUiType" expires_after="2023-11-12"> <owner>ender@google.com</owner> <owner>gangwu@chromium.org</owner> <owner>rongtan@chromium.org</owner> @@ -2558,7 +2558,7 @@ </histogram> <histogram name="Android.Omnibox.SuggestionView.SessionViewsCreated" - units="count" expires_after="2023-09-03"> + units="count" expires_after="2023-11-12"> <owner>ender@google.com</owner> <owner>rongtan@google.com</owner> <summary> @@ -2584,7 +2584,7 @@ </histogram> <histogram name="Android.Omnibox.SuggestionView.SessionViewsReused" units="%" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>ender@google.com</owner> <owner>rongtan@google.com</owner> <summary> @@ -2682,7 +2682,7 @@ </histogram> <histogram name="Android.PartnerBrowserCustomizationInitDuration" units="ms" - expires_after="2023-09-01"> + expires_after="2023-11-12"> <owner>wenyufu@chromium.org</owner> <owner>twellington@chromium.org</owner> <summary> @@ -2694,7 +2694,7 @@ </histogram> <histogram name="Android.PartnerBrowserCustomizationInitDuration.WithCallbacks" - units="ms" expires_after="2023-09-01"> + units="ms" expires_after="2023-11-12"> <owner>wenyufu@chromium.org</owner> <owner>twellington@chromium.org</owner> <summary> @@ -2706,7 +2706,7 @@ </histogram> <histogram name="Android.PartnerCustomizationInitializedBeforeInitialTab" - enum="Boolean" expires_after="2023-09-01"> + enum="Boolean" expires_after="2023-11-12"> <owner>wenyufu@chromium.org</owner> <owner>twellington@chromium.org</owner> <summary> @@ -2983,7 +2983,7 @@ </histogram> <histogram name="Android.PlayServices.Version" units="versioncode" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>twellington@chromium.org</owner> <owner>tedchoc@chromium.org</owner> <summary> @@ -3026,7 +3026,7 @@ </histogram> <histogram name="Android.RequestDesktopSite.PerSiteIphDismissed.AppMenuOpened" - enum="Boolean" expires_after="2023-08-13"> + enum="Boolean" expires_after="2023-11-12"> <owner>aishwaryarj@google.com</owner> <owner>shuyng@google.com</owner> <summary> @@ -3063,7 +3063,7 @@ </histogram> <histogram name="Android.RequestDesktopSite.UseDesktopUserAgent" enum="Boolean" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>gangwu@chromium.org</owner> <owner>fgorski@chromium.org</owner> <summary> @@ -3073,7 +3073,7 @@ </histogram> <histogram name="Android.RequestDesktopSite.UserSwitchToDesktop" enum="Boolean" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>gangwu@chromium.org</owner> <owner>fgorski@chromium.org</owner> <summary> @@ -3084,7 +3084,7 @@ <histogram name="Android.RequestDesktopSite.UserSwitchToDesktop.DomainSettingAdded" - enum="Boolean" expires_after="2023-08-13"> + enum="Boolean" expires_after="2023-11-12"> <owner>shuyng@google.com</owner> <owner>twellington@chromium.org</owner> <summary> @@ -3109,7 +3109,7 @@ </histogram> <histogram name="Android.RestoreResult" enum="AndroidRestoreResult" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>triploblastic@chromium.org</owner> <owner>chrome-signin-team@google.com</owner> <summary> @@ -3119,7 +3119,7 @@ </histogram> <histogram name="Android.Rotation.BeginToRendererFrameActivation" units="ms" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>jonross@chromium.org</owner> <owner>graphics-dev@chromium.org</owner> <summary> @@ -3226,7 +3226,7 @@ </histogram> <histogram name="Android.StrictMode.OverrideUrlLoadingTime" units="ms" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>yfriedman@chromium.org</owner> <owner>wnwen@chromium.org</owner> <summary> @@ -3465,7 +3465,7 @@ </histogram> <histogram name="Android.TabNavigationIntercept.Scheme" - enum="NavigationInterceptScheme" expires_after="2023-08-27"> + enum="NavigationInterceptScheme" expires_after="2023-11-12"> <owner>rbyers@chromium.org</owner> <owner>mthiesse@chromium.org</owner> <summary> @@ -3566,7 +3566,7 @@ </histogram> <histogram name="Android.TabSwitcher.IncognitoClickedIsEmpty" enum="Boolean" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>roagarwal@chromium.org</owner> <owner>chrome-incognito@google.com</owner> <summary> @@ -3677,7 +3677,7 @@ </histogram> <histogram name="Android.TopToolbar.AllowCaptureReason" - enum="TopToolbarAllowCaptureReason" expires_after="2023-09-10"> + enum="TopToolbarAllowCaptureReason" expires_after="2023-11-12"> <owner>skym@chromium.org</owner> <owner>seacow@google.com</owner> <summary> @@ -3691,7 +3691,7 @@ </histogram> <histogram name="Android.TopToolbar.BlockCaptureReason" - enum="TopToolbarBlockCaptureReason" expires_after="2023-09-10"> + enum="TopToolbarBlockCaptureReason" expires_after="2023-11-12"> <owner>skym@chromium.org</owner> <owner>seacow@google.com</owner> <summary> @@ -4307,7 +4307,7 @@ </histogram> <histogram name="Android.WebView.Metrics.PackagesAllowList.RecordStatus" - enum="AppPackageNameLoggingRuleStatus" expires_after="2023-09-10"> + enum="AppPackageNameLoggingRuleStatus" expires_after="2023-11-12"> <owner>hazems@chromium.org</owner> <owner>src/android_webview/OWNERS</owner> <summary> @@ -4454,7 +4454,7 @@ </histogram> <histogram name="Android.WebView.NonEmbeddedMetrics.TransmissionResult" - enum="AndroidWebViewDevUiMetricsTransmission" expires_after="2023-09-10"> + enum="AndroidWebViewDevUiMetricsTransmission" expires_after="2023-11-12"> <owner>ntfschr@chromium.org</owner> <owner>hazems@chromium.org</owner> <owner>src/android_webview/OWNERS</owner>
diff --git a/tools/metrics/histograms/metadata/apps/histograms.xml b/tools/metrics/histograms/metadata/apps/histograms.xml index 53f961d..3c88c7a7 100644 --- a/tools/metrics/histograms/metadata/apps/histograms.xml +++ b/tools/metrics/histograms/metadata/apps/histograms.xml
@@ -385,7 +385,7 @@ </histogram> <histogram name="Apps.AppList.AppSearchProvider.QueryTime" units="ms" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>wrong@chromium.org</owner> <owner>tbarzic@chromium.org</owner> <summary> @@ -629,7 +629,7 @@ </histogram> <histogram name="Apps.AppList.GameProvider.SearchStatus" - enum="GameProviderSearchStatus" expires_after="2023-09-03"> + enum="GameProviderSearchStatus" expires_after="2023-11-12"> <owner>wrong@chromium.org</owner> <owner>amandadeacon@chromium.org</owner> <summary> @@ -638,7 +638,7 @@ </histogram> <histogram name="Apps.AppList.GameProvider.UpdateStatus" enum="DiscoveryError" - expires_after="2023-08-28"> + expires_after="2023-11-12"> <owner>wrong@chromium.org</owner> <owner>amandadeacon@chromium.org</owner> <summary> @@ -814,7 +814,7 @@ </histogram> <histogram name="Apps.AppList.OsSettingsProvider.Error" - enum="OsSettingsProviderStatus" expires_after="2023-08-27"> + enum="OsSettingsProviderStatus" expires_after="2023-11-12"> <owner>wrong@chromium.org</owner> <owner>tby@chromium.org</owner> <owner>thanhdng@chromium.org</owner> @@ -828,7 +828,7 @@ </histogram> <histogram name="Apps.AppList.OsSettingsProvider.IconLoadStatus" - enum="OsSettingsProviderIconLoadStatus" expires_after="2023-08-27"> + enum="OsSettingsProviderIconLoadStatus" expires_after="2023-11-12"> <owner>wrong@chromium.org</owner> <owner>tby@chromium.org</owner> <owner>chenjih@chromium.org</owner> @@ -1160,7 +1160,7 @@ </histogram> <histogram name="Apps.AppList.SearchQueryLength.Apps" units="characters" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>wrong@chromium.org</owner> <owner>thanhdng@chromium.org</owner> <owner>tby@chromium.org</owner> @@ -1171,7 +1171,7 @@ </histogram> <histogram name="Apps.AppList.SearchResultRemovalDecision" - enum="AppListResultRemovalConfirmation" expires_after="2023-09-03"> + enum="AppListResultRemovalConfirmation" expires_after="2023-11-12"> <owner>tbarzic@chromium.org</owner> <owner>gzadina@google.com</owner> <summary> @@ -1640,7 +1640,7 @@ </histogram> <histogram base="true" name="Apps.AppListFolderNameLength" units="characters" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <!-- Name completed by histogram_suffixes name="TabletOrClamshellMode" --> @@ -1678,7 +1678,7 @@ </histogram> <histogram name="Apps.AppListLauncherClickedSearchQueryLength" - units="characters" expires_after="2023-09-03"> + units="characters" expires_after="2023-11-12"> <owner>wrong@chromium.org</owner> <owner>tby@chromium.org</owner> <summary> @@ -2060,7 +2060,7 @@ </histogram> <histogram name="Apps.CreateShortcuts.Linux.Result" - enum="WebAppCreateShortcutLinuxResult" expires_after="2023-09-10"> + enum="WebAppCreateShortcutLinuxResult" expires_after="2023-11-12"> <owner>phillis@chromium.org</owner> <owner>cmumford@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/arc/histograms.xml b/tools/metrics/histograms/metadata/arc/histograms.xml index 28c1e62..4095e23 100644 --- a/tools/metrics/histograms/metadata/arc/histograms.xml +++ b/tools/metrics/histograms/metadata/arc/histograms.xml
@@ -237,7 +237,7 @@ </histogram> <histogram name="Arc.Accessibility.WindowCount" enum="ArcAccessibilityFeature" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>sahok@chromium.org</owner> <owner>arc-framework@google.com</owner> <summary> @@ -276,7 +276,7 @@ </histogram> <histogram name="Arc.AndroidData.PerApp.Size" units="KB" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>momohatt@google.com</owner> <owner>arc-storage@google.com</owner> <summary> @@ -328,7 +328,7 @@ </histogram> <histogram name="Arc.AndroidData.TraversalDuration" units="ms" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>momohatt@google.com</owner> <owner>arc-storage@google.com</owner> <summary> @@ -591,7 +591,7 @@ </histogram> <histogram name="Arc.AppSync.InitialSession.InstalledAppSize" units="MB" - expires_after="2023-09-24"> + expires_after="2024-01-30"> <owner>batoon@google.com</owner> <owner>arc-core@google.com</owner> <summary> @@ -602,7 +602,7 @@ </histogram> <histogram name="Arc.AppSync.InitialSession.Latency" units="seconds" - expires_after="2023-06-20"> + expires_after="2024-01-30"> <owner>batoon@google.com</owner> <owner>arc-core@google.com</owner> <summary> @@ -615,7 +615,7 @@ </histogram> <histogram name="Arc.AppSync.InitialSession.NumApps{ArcSyncAppTypes}" - units="apps" expires_after="2023-06-20"> + units="apps" expires_after="2024-01-30"> <owner>batoon@google.com</owner> <owner>arc-core@google.com</owner> <summary> @@ -726,7 +726,7 @@ <token key="ArcUserTypes" variants="ArcUserTypes"/> </histogram> -<histogram name="Arc.Auth.NumAccounts" units="count" expires_after="2023-09-03"> +<histogram name="Arc.Auth.NumAccounts" units="count" expires_after="2023-11-12"> <owner>anastasiian@google.com</owner> <owner>mhasank@google.com</owner> <owner>arc-core@google.com</owner> @@ -736,7 +736,7 @@ </summary> </histogram> -<histogram name="Arc.Auth.PercentAccounts" units="%" expires_after="2023-09-03"> +<histogram name="Arc.Auth.PercentAccounts" units="%" expires_after="2023-11-12"> <owner>anastasiian@google.com</owner> <owner>mhasank@google.com</owner> <owner>arc-core@google.com</owner> @@ -856,7 +856,7 @@ </histogram> <histogram name="Arc.ClipboardDragDrop" enum="ArcClipboardDragDropEvent" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>yhanada@google.com</owner> <owner>arc-framework@google.com</owner> <summary>The number of clipboard and drag-and-drop events.</summary> @@ -1221,7 +1221,7 @@ </histogram> <histogram name="Arc.FirstAppLaunchDelay.TimeDelta" units="ms" - expires_after="2023-09-01"> + expires_after="2023-11-12"> <owner>khmel@google.com</owner> <owner>arc-performance@google.com</owner> <summary> @@ -1235,7 +1235,7 @@ </histogram> <histogram name="Arc.FirstAppLaunchDelay.TimeDeltaUntilAppLaunch" units="ms" - expires_after="2023-09-01"> + expires_after="2023-11-12"> <owner>khmel@google.com</owner> <owner>alanding@google.com</owner> <summary> @@ -1644,7 +1644,7 @@ </histogram> <histogram name="Arc.Net.ArcNetworkEvent" enum="ArcNetworkEvent" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>hugobenichi@google.com</owner> <owner>cros-networking@google.com</owner> <summary> @@ -1655,7 +1655,7 @@ </histogram> <histogram name="Arc.Net.DnsQuery.AndroidApi" enum="BooleanSuccess" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>mhasank@google.com</owner> <owner>arc-core@google.com</owner> <summary> @@ -1664,7 +1664,7 @@ </histogram> <histogram name="Arc.Net.DnsQuery.Other" enum="BooleanSuccess" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>mhasank@google.com</owner> <owner>arc-core@google.com</owner> <summary> @@ -1941,7 +1941,7 @@ </histogram> <histogram name="Arc.Policy.Keys" enum="ArcPolicyKey" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>mhasank@google.com</owner> <owner>arc-commercial@google.com</owner> <summary> @@ -2110,7 +2110,7 @@ </histogram> <histogram name="Arc.Runtime.Performance.Generic.FirstFrameRendered" units="ms" - expires_after="2023-09-01"> + expires_after="2023-11-12"> <owner>khmel@google.com</owner> <owner>alanding@google.com</owner> <summary> @@ -2157,7 +2157,7 @@ </histogram> <histogram name="Arc.SdkVersionUpgradeType" enum="ArcSdkVersionUpgradeType" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>niwa@google.com</owner> <owner>arcvm-eng@google.com</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/ash/histograms.xml b/tools/metrics/histograms/metadata/ash/histograms.xml index 2b613f3..cc8df39 100644 --- a/tools/metrics/histograms/metadata/ash/histograms.xml +++ b/tools/metrics/histograms/metadata/ash/histograms.xml
@@ -1738,7 +1738,7 @@ </histogram> <histogram name="Ash.CaptureModeController.QuickAction" - enum="CaptureQuickAction" expires_after="2023-08-08"> + enum="CaptureQuickAction" expires_after="2023-11-12"> <owner>shidi@chromium.org</owner> <summary> Track all quick actions on screenshot notification. Including: Edit in @@ -1911,7 +1911,7 @@ </histogram> <histogram name="Ash.DarkTheme.SystemTray.IsDarkModeEnabled" enum="Boolean" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>minch@chromium.org</owner> <owner>changmar@chromium.org</owner> <summary> @@ -1937,7 +1937,7 @@ </histogram> <histogram name="Ash.Desks.AnimationLatency.DeskActivation" units="ms" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>afakhry@chromium.org</owner> <owner>tclaiborne@chromium.org</owner> <owner>chromeos-perfmetrics-eng@google.com</owner> @@ -2038,7 +2038,7 @@ </histogram> <histogram name="Ash.Desks.CloseAllTotal" enum="BooleanHit" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>aprilzhou@google.com</owner> <owner>janetmac@chromium.org</owner> <summary> @@ -2050,7 +2050,7 @@ </histogram> <histogram name="Ash.Desks.CloseAllUndo" enum="BooleanHit" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>aprilzhou@google.com</owner> <owner>janetmac@chromium.org</owner> <summary> @@ -2165,7 +2165,7 @@ </histogram> <histogram name="Ash.Desks.DesksSwitch" enum="DesksSwitchSource" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>afakhry@chromium.org</owner> <owner>tclaiborne@chromium.org</owner> <summary> @@ -2204,7 +2204,7 @@ </histogram> <histogram name="Ash.Desks.NumberOfDeskTraversals" units="units" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>afakhry@chromium.org</owner> <owner>sammiequon@chromium.org</owner> <owner>tclaiborne@chromium.org</owner> @@ -2280,7 +2280,7 @@ </histogram> <histogram name="Ash.Desks.NumberOfWindowsOnDesk_1" units="units" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>dandersson@chromium.org</owner> <owner>janetmac@chromium.org</owner> <summary> @@ -2290,7 +2290,7 @@ </histogram> <histogram name="Ash.Desks.NumberOfWindowsOnDesk_10" units="units" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>dandersson@chromium.org</owner> <owner>janetmac@chromium.org</owner> <summary> @@ -2360,7 +2360,7 @@ </histogram> <histogram name="Ash.Desks.NumberOfWindowsOnDesk_2" units="units" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>dandersson@chromium.org</owner> <owner>janetmac@chromium.org</owner> <summary> @@ -2430,7 +2430,7 @@ </histogram> <histogram name="Ash.Desks.NumberOfWindowsOnDesk_9" units="units" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>dandersson@chromium.org</owner> <owner>janetmac@chromium.org</owner> <summary> @@ -2469,7 +2469,7 @@ </histogram> <histogram name="Ash.Desks.RemoveDesk" enum="DesksCreationRemovalSource" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>afakhry@chromium.org</owner> <owner>janetmac@chromium.org</owner> <summary> @@ -2479,7 +2479,7 @@ </histogram> <histogram name="Ash.Desks.RemoveDeskType" enum="DeskCloseType" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>aprilzhou@google.com</owner> <owner>janetmac@chromium.org</owner> <summary> @@ -2841,7 +2841,7 @@ </histogram> <histogram name="Ash.DeviceActiveClient.PreservedFileState" - enum="DeviceActiveClientPreservedFileState" expires_after="2023-09-01"> + enum="DeviceActiveClientPreservedFileState" expires_after="2023-11-12"> <owner>hirthanan@google.com</owner> <owner>chromeos-data-team@google.com</owner> <summary> @@ -2876,7 +2876,7 @@ </histogram> <histogram name="Ash.DeviceActiveClient.QueryMembershipResult" - enum="BooleanSuccess" expires_after="2023-09-01"> + enum="BooleanSuccess" expires_after="2023-11-12"> <owner>hirthanan@google.com</owner> <owner>chromeos-data-team@google.com</owner> <summary> @@ -2934,7 +2934,7 @@ </histogram> <histogram name="Ash.DeviceActiveController.IsTestImageDevice" - enum="BooleanSuccess" expires_after="2023-09-01"> + enum="BooleanSuccess" expires_after="2023-11-12"> <owner>hirthanan@google.com</owner> <owner>chromeos-data-team@google.com</owner> <summary> @@ -2952,7 +2952,7 @@ </histogram> <histogram name="Ash.DeviceActivity.MethodCalled" enum="DeviceActivityMethod" - expires_after="2023-09-01"> + expires_after="2023-11-12"> <owner>hirthanan@google.com</owner> <owner>chromeos-data-team@google.com</owner> <summary> @@ -3540,7 +3540,7 @@ </histogram> <histogram name="Ash.Login.Login.AuthMethod.Switched" - enum="AuthMethodSwitchType" expires_after="2023-09-03"> + enum="AuthMethodSwitchType" expires_after="2023-11-12"> <owner>emaamari@google.com</owner> <owner>cros-lurs@google.com</owner> <summary> @@ -3560,7 +3560,7 @@ </histogram> <histogram name="Ash.Login.Login.AuthMethod.Used.TabletMode" enum="AuthMethod" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>emaamari@google.com</owner> <owner>cros-lurs@google.com</owner> <summary> @@ -3675,7 +3675,7 @@ </histogram> <histogram base="true" name="Ash.LoginAnimation.Smoothness" units="%" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>oshima@chromium.org</owner> <owner>chromeos-wmp@google.com</owner> <!-- Name completed by histogram_suffixes @@ -3903,7 +3903,7 @@ </histogram> <histogram name="Ash.Notification.CountOfNotificationsInOneGroup" - units="Notifications" expires_after="2023-09-03"> + units="Notifications" expires_after="2023-11-12"> <owner>leandre@chromium.org</owner> <owner>cros-status-area-eng@google.com</owner> <summary> @@ -3937,7 +3937,7 @@ </histogram> <histogram name="Ash.Notification.GroupNotificationAdded" - enum="GroupNotificationType" expires_after="2023-09-10"> + enum="GroupNotificationType" expires_after="2023-11-12"> <owner>leandre@chromium.org</owner> <owner>cros-status-area-eng@google.com</owner> <summary> @@ -3970,7 +3970,7 @@ </histogram> <histogram name="Ash.NotificationPopup.AnimationSmoothness" units="%" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>leandre@chromium.org</owner> <owner>amehfooz@chromium.org</owner> <owner>tbarzic@chromium.org</owner> @@ -4472,7 +4472,7 @@ </histogram> <histogram name="Ash.Overview.TimeInOverview" units="ms" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>nupurjain@chromium.org</owner> <owner>sammiequon@chromium.org</owner> <summary> @@ -4585,7 +4585,7 @@ </histogram> <histogram name="Ash.Personalization.AmbientMode.OptIn" enum="BooleanHit" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>jasontt@chromium.org</owner> <owner>assistive-eng@google.com</owner> <summary> @@ -4645,7 +4645,7 @@ </histogram> <histogram name="Ash.Personalization.EntryPoint" - enum="PersonalizationEntryPoint" expires_after="2023-09-10"> + enum="PersonalizationEntryPoint" expires_after="2023-11-12"> <owner>thuongphan@chromium.org</owner> <owner>assistive-eng@google.com</owner> <summary> @@ -5007,7 +5007,7 @@ </histogram> <histogram name="Ash.QuickSettings.Button.Activated" enum="QsButtonCatalogName" - expires_after="2023-09-08"> + expires_after="2023-11-12"> <owner>jiamingc@google.com</owner> <owner>cros-status-area-eng@google.com</owner> <summary> @@ -5628,7 +5628,7 @@ </histogram> <histogram name="Ash.SplitView.OrientationInSplitView" enum="DeviceOrientation" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>xdai@chromium.org</owner> <owner>zxdan@chromium.org</owner> <owner>nupurjain@chromium.org</owner> @@ -5693,7 +5693,7 @@ </histogram> <histogram name="Ash.SplitView.TimeInSplitView" units="ms" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>xdai@chromium.org</owner> <owner>nupurjain@chromim.org</owner> <owner>fanafan@chromium.org</owner> @@ -5918,7 +5918,7 @@ </histogram> <histogram name="Ash.SwipeHomeToOverviewGesture" - enum="SwipeHomeToOverviewResult" expires_after="2023-09-03"> + enum="SwipeHomeToOverviewResult" expires_after="2023-11-12"> <owner>andrewxu@chromium.org</owner> <owner>tbarzic@chromium.org</owner> <summary> @@ -6045,7 +6045,7 @@ </histogram> <histogram name="Ash.TouchView.TouchViewActive" units="ms" - expires_after="2023-08-08"> + expires_after="2023-11-12"> <owner>girard@chromium.org</owner> <summary> The length of time that TouchView is active, for each activation. @@ -6424,7 +6424,7 @@ </histogram> <histogram name="Ash.Wallpaper.CustomLayout" enum="WallpaperLayout" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>xiaohuic@chromium.org</owner> <owner>assistive-eng@chromium.org</owner> <summary> @@ -6545,7 +6545,7 @@ </histogram> <histogram name="Ash.Wallpaper.Type" enum="WallpaperType" - expires_after="2023-08-29"> + expires_after="2023-11-12"> <owner>kuscher@google.com</owner> <owner>assistive-eng@google.com</owner> <summary> @@ -6557,7 +6557,7 @@ </histogram> <histogram name="Ash.Window.AnimationSmoothness.CrossFade" units="%" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>sammiequon@chromium.org</owner> <owner>wutao@chromium.org</owner> <summary> @@ -6695,7 +6695,7 @@ </histogram> <histogram name="Ash.Window.Snap.DeviceOrientation" enum="DeviceOrientation" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>cattalyya@chromium.org</owner> <owner>afakhry@chromium.org</owner> <owner>nupurjain@chromium.org</owner> @@ -6719,7 +6719,7 @@ </histogram> <histogram name="Ash.WindowCycleController.InitialMode" enum="AltTabMode" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>afakhry@chromium.org</owner> <owner>xdai@chromium.org</owner> <owner>tclaiborne@chromium.org</owner> @@ -6731,7 +6731,7 @@ </histogram> <histogram name="Ash.WindowCycleController.Items" units="items" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>sammiequon@chromium.org</owner> <owner>tclaiborne@chromium.org</owner> <owner>xdai@chromium.org</owner> @@ -6790,7 +6790,7 @@ </histogram> <histogram name="Ash.WindowCycleController.SwitchMode" enum="AltTabMode" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>afakhry@chromium.org</owner> <owner>xdai@chromium.org</owner> <owner>tclaiborne@chromium.org</owner>
diff --git a/tools/metrics/histograms/metadata/ash_clipboard/histograms.xml b/tools/metrics/histograms/metadata/ash_clipboard/histograms.xml index fa393bb..c137066 100644 --- a/tools/metrics/histograms/metadata/ash_clipboard/histograms.xml +++ b/tools/metrics/histograms/metadata/ash_clipboard/histograms.xml
@@ -36,7 +36,7 @@ </histogram> <histogram name="Ash.Clipboard.ConsecutivePastes" units="times" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>ckincaid@chromium.org</owner> <owner>multipaste@google.com</owner> <summary> @@ -46,7 +46,7 @@ </histogram> <histogram name="Ash.ClipboardHistory.ConsecutivePastes" units="times" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>ckincaid@chromium.org</owner> <owner>multipaste@google.com</owner> <summary> @@ -61,7 +61,7 @@ </histogram> <histogram name="Ash.ClipboardHistory.ContextMenu.DisplayFormatDeleted" - enum="ClipboardHistoryDisplayFormat" expires_after="2023-08-27"> + enum="ClipboardHistoryDisplayFormat" expires_after="2023-11-12"> <owner>ckincaid@chromium.org</owner> <owner>multipaste@google.com</owner> <summary> @@ -75,7 +75,7 @@ </histogram> <histogram name="Ash.ClipboardHistory.ContextMenu.DisplayFormatPasted" - enum="ClipboardHistoryDisplayFormat" expires_after="2023-08-27"> + enum="ClipboardHistoryDisplayFormat" expires_after="2023-11-12"> <owner>ckincaid@chromium.org</owner> <owner>multipaste@google.com</owner> <summary> @@ -90,7 +90,7 @@ </histogram> <histogram name="Ash.ClipboardHistory.ContextMenu.DisplayFormatShown" - enum="ClipboardHistoryDisplayFormat" expires_after="2023-08-27"> + enum="ClipboardHistoryDisplayFormat" expires_after="2023-11-12"> <owner>ckincaid@chromium.org</owner> <owner>multipaste@google.com</owner> <summary> @@ -100,7 +100,7 @@ </histogram> <histogram name="Ash.ClipboardHistory.ContextMenu.MenuOptionSelected" - units="index" expires_after="2023-08-27"> + units="index" expires_after="2023-11-12"> <owner>ckincaid@chromium.org</owner> <owner>multipaste@google.com</owner> <summary> @@ -110,7 +110,7 @@ </histogram> <histogram name="Ash.ClipboardHistory.ContextMenu.NumberOfItemsShown" - units="Items Shown" expires_after="2023-08-27"> + units="Items Shown" expires_after="2023-11-12"> <owner>ckincaid@chromium.org</owner> <owner>multipaste@google.com</owner> <summary> @@ -120,7 +120,7 @@ </histogram> <histogram name="Ash.ClipboardHistory.ContextMenu.ShowMenu" - enum="ClipboardHistoryTriggerType" expires_after="2023-08-27"> + enum="ClipboardHistoryTriggerType" expires_after="2023-11-12"> <owner>ckincaid@chromium.org</owner> <owner>multipaste@google.com</owner> <summary> @@ -130,7 +130,7 @@ </histogram> <histogram name="Ash.ClipboardHistory.ContextMenu.UserJourneyTime" units="ms" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>ckincaid@chromium.org</owner> <owner>multipaste@google.com</owner> <summary> @@ -158,7 +158,7 @@ </histogram> <histogram name="Ash.ClipboardHistory.ControlToVDelayV2" units="ms" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>ckincaid@chromium.org</owner> <owner>multipaste@google.com</owner> <summary> @@ -175,7 +175,7 @@ </histogram> <histogram name="Ash.ClipboardHistory.ControlVHeldTime" units="ms" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>ckincaid@chromium.org</owner> <owner>multipaste@google.com</owner> <summary> @@ -186,7 +186,7 @@ </histogram> <histogram name="Ash.ClipboardHistory.ImageModelRequest.Lifetime" units="ms" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>ckincaid@chromium.org</owner> <owner>multipaste@google.com</owner> <summary> @@ -199,7 +199,7 @@ </histogram> <histogram name="Ash.ClipboardHistory.ImageModelRequest.Runtime" units="ms" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>ckincaid@chromium.org</owner> <owner>multipaste@google.com</owner> <summary> @@ -210,7 +210,7 @@ </histogram> <histogram name="Ash.ClipboardHistory.ImageModelRequest.StopReason" - enum="RequestStopReason" expires_after="2023-08-27"> + enum="RequestStopReason" expires_after="2023-11-12"> <owner>ckincaid@chromium.org</owner> <owner>multipaste@google.com</owner> <summary> @@ -291,7 +291,7 @@ </histogram> <histogram name="Ash.ClipboardHistory.Operation" - enum="ClipboardHistoryOperation" expires_after="2023-08-27"> + enum="ClipboardHistoryOperation" expires_after="2023-11-12"> <owner>ckincaid@chromium.org</owner> <owner>multipaste@google.com</owner> <summary> @@ -310,7 +310,7 @@ </histogram> <histogram name="Ash.ClipboardHistory.PasteSource" - enum="ClipboardHistoryTriggerType" expires_after="2023-08-27"> + enum="ClipboardHistoryTriggerType" expires_after="2023-11-12"> <owner>ckincaid@chromium.org</owner> <owner>multipaste@google.com</owner> <summary> @@ -321,7 +321,7 @@ </histogram> <histogram name="Ash.ClipboardHistory.PasteType" - enum="ClipboardHistoryPasteType" expires_after="2023-08-27"> + enum="ClipboardHistoryPasteType" expires_after="2023-11-12"> <owner>ckincaid@chromium.org</owner> <owner>multipaste@google.com</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/assistant/histograms.xml b/tools/metrics/histograms/metadata/assistant/histograms.xml index c6d4c8f..b435aab 100644 --- a/tools/metrics/histograms/metadata/assistant/histograms.xml +++ b/tools/metrics/histograms/metadata/assistant/histograms.xml
@@ -35,7 +35,7 @@ </variants> <histogram name="Assistant.BetterOnboarding.Click" - enum="AssistantBetterOnboardingType" expires_after="2023-09-03"> + enum="AssistantBetterOnboardingType" expires_after="2023-11-12"> <owner>xiaohuic@chromium.org</owner> <owner>croissant-eng@chromium.org</owner> <summary> @@ -105,7 +105,7 @@ </histogram> <histogram name="Assistant.Interaction.Resolution" - enum="AssistantInteractionResolution" expires_after="2023-09-03"> + enum="AssistantInteractionResolution" expires_after="2023-11-12"> <owner>xiaohuic@chromium.org</owner> <owner>croissant-eng@chromium.org</owner> <summary> @@ -116,7 +116,7 @@ </histogram> <histogram name="Assistant.Libassistant.DlcInstallResult" - enum="Assistant.LibassistantDlcInstallResult" expires_after="2023-09-03"> + enum="Assistant.LibassistantDlcInstallResult" expires_after="2023-11-12"> <owner>wutao@chromium.org</owner> <owner>assistive-eng@google.com</owner> <summary> @@ -126,7 +126,7 @@ </histogram> <histogram name="Assistant.Libassistant.DlcLoadStatus" - enum="Assistant.LibassistantDlcLoadStatus" expires_after="2023-09-03"> + enum="Assistant.LibassistantDlcLoadStatus" expires_after="2023-11-12"> <owner>wutao@chromium.org</owner> <owner>assistive-eng@google.com</owner> <summary> @@ -179,7 +179,7 @@ </histogram> <histogram name="Assistant.QuerySource" enum="AssistantQuerySource" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>xiaohuic@chromium.org</owner> <owner>croissant-eng@chromium.org</owner> <summary> @@ -189,7 +189,7 @@ </histogram> <histogram name="Assistant.ServiceEnabledUserCount" enum="BooleanEnabled" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>xiaohuic@chromium.org</owner> <owner>croissant-eng@chromium.org</owner> <summary> @@ -229,7 +229,7 @@ </histogram> <histogram name="Assistant.SetDspHotwordLocale" enum="BooleanSuccess" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>xiaohuic@chromium.org</owner> <owner>croissant-eng@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/autofill/histograms.xml b/tools/metrics/histograms/metadata/autofill/histograms.xml index 76113eb..c100c30 100644 --- a/tools/metrics/histograms/metadata/autofill/histograms.xml +++ b/tools/metrics/histograms/metadata/autofill/histograms.xml
@@ -665,7 +665,7 @@ </histogram> <histogram name="Autofill.BetterAuth.CardUnmaskDuration.Fido" units="ms" - expires_after="2023-10-22"> + expires_after="2023-11-12"> <owner>jsaul@google.com</owner> <owner>siyua@chromium.org</owner> <owner>autofill-auth-team@google.com</owner> @@ -712,7 +712,7 @@ <histogram name="Autofill.BetterAuth.CardUnmaskPreflightCalledWithFidoOptInStatus" - enum="Boolean" expires_after="2023-09-03"> + enum="Boolean" expires_after="2023-11-12"> <owner>jsaul@google.com</owner> <owner>siyua@chromium.org</owner> <owner>autofill-auth-team@google.com</owner> @@ -746,7 +746,7 @@ </histogram> <histogram name="Autofill.BetterAuth.CardUnmaskPreflightInitiated" - enum="Boolean" expires_after="2023-09-03"> + enum="Boolean" expires_after="2023-11-12"> <owner>vinnypersky@google.com</owner> <owner>autofill-auth-team@google.com</owner> <summary> @@ -758,7 +758,7 @@ </histogram> <histogram name="Autofill.BetterAuth.CardUnmaskTypeDecision" - enum="AutofillCreditCardUnmaskDecisionMetric" expires_after="2023-09-03"> + enum="AutofillCreditCardUnmaskDecisionMetric" expires_after="2023-11-12"> <owner>jsaul@google.com</owner> <owner>siyua@chromium.org</owner> <owner>autofill-auth-team@google.com</owner> @@ -824,7 +824,7 @@ </histogram> <histogram name="Autofill.BetterAuth.OptInPromoNotOfferedReason" - enum="WebauthnOptInPromoNotOfferedReason" expires_after="2023-09-03"> + enum="WebauthnOptInPromoNotOfferedReason" expires_after="2023-11-12"> <owner>vinnypersky@google.com</owner> <owner>shgar@google.com</owner> <summary> @@ -943,7 +943,7 @@ </histogram> <histogram name="Autofill.BetterAuth.UserVerifiabilityCheckDuration" units="ms" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>jsaul@google.com</owner> <owner>siyua@chromium.org</owner> <owner>autofill-auth-team@google.com</owner> @@ -1047,7 +1047,7 @@ </histogram> <histogram name="Autofill.CardUnmaskAuthenticationSelectionDialog.Shown2" - units="challenge_options" expires_after="2023-08-27"> + units="challenge_options" expires_after="2023-11-12"> <owner>siyua@chromium.org</owner> <owner>jsaul@google.com</owner> <owner>siashah@chromium.org</owner> @@ -1094,7 +1094,7 @@ </histogram> <histogram name="Autofill.CreditCard.IsEnabled.Startup" enum="BooleanEnabled" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>jsaul@google.com</owner> <owner>chrome-autofill-alerts@google.com</owner> <summary> @@ -1702,7 +1702,7 @@ </histogram> <histogram name="Autofill.FastCheckout.TriggerOutcome" - enum="FastCheckoutTriggerOutcome" expires_after="2023-08-15"> + enum="FastCheckoutTriggerOutcome" expires_after="2023-11-12"> <owner>bwolfgang@google.com</owner> <owner>jkeitel@google.com</owner> <owner>vizcay@google.com</owner> @@ -1714,7 +1714,7 @@ </histogram> <histogram name="Autofill.FieldContextMenuImpressions.ByAutocomplete" - enum="AutofillAutocompleteState" expires_after="2023-09-01"> + enum="AutofillAutocompleteState" expires_after="2023-11-12"> <owner>vidhanj@google.com</owner> <owner>chrome-autofill-alerts@google.com</owner> <summary> @@ -1724,7 +1724,7 @@ </histogram> <histogram name="Autofill.FieldContextMenuImpressions.ByAutofillType" - enum="AutofillServerFieldType" expires_after="2023-09-01"> + enum="AutofillServerFieldType" expires_after="2023-11-12"> <owner>vidhanj@google.com</owner> <owner>chrome-autofill-alerts@google.com</owner> <summary> @@ -1997,7 +1997,7 @@ </histogram> <histogram name="Autofill.FormContextMenuImpressions.ByNumberOfFields" - units="fields" expires_after="2023-09-01"> + units="fields" expires_after="2023-11-12"> <owner>vidhanj@google.com</owner> <owner>chrome-autofill-alerts@google.com</owner> <summary> @@ -2074,7 +2074,7 @@ </histogram> <histogram name="Autofill.FormForest.GetBrowserFormOfRendererForm.Duration" - units="microseconds" expires_after="2023-09-10"> + units="microseconds" expires_after="2023-11-12"> <owner>schwering@google.com</owner> <owner>chrome-autofill-alerts@google.com</owner> <summary> @@ -2088,7 +2088,7 @@ </histogram> <histogram name="Autofill.FormForest.GetRendererFormsOfBrowserForm.Duration" - units="microseconds" expires_after="2023-09-10"> + units="microseconds" expires_after="2023-11-12"> <owner>schwering@google.com</owner> <owner>chrome-autofill-alerts@google.com</owner> <summary> @@ -2102,7 +2102,7 @@ </histogram> <histogram name="Autofill.FormForest.UpdateTreeOfRendererForm.Duration" - units="microseconds" expires_after="2023-09-10"> + units="microseconds" expires_after="2023-11-12"> <owner>schwering@google.com</owner> <owner>chrome-autofill-alerts@google.com</owner> <summary> @@ -2114,7 +2114,7 @@ </histogram> <histogram name="Autofill.FormForest.UpdateTreeOfRendererForm.Visits" - units="node-visits" expires_after="2023-09-10"> + units="node-visits" expires_after="2023-11-12"> <owner>schwering@google.com</owner> <owner>chrome-autofill-alerts@google.com</owner> <summary> @@ -2125,7 +2125,7 @@ </histogram> <histogram name="Autofill.FormSubmission.PerProfileType" - enum="BrowserProfileType" expires_after="2023-09-03"> + enum="BrowserProfileType" expires_after="2023-11-12"> <owner>rhalavati@chromium.org</owner> <owner>chrome-privacy-core@google.com</owner> <summary> @@ -2436,7 +2436,7 @@ <histogram name="Autofill.IsValueNotAutofilledOverExistingValueSameAsSubmittedValue2" - enum="Boolean" expires_after="2023-08-20"> + enum="Boolean" expires_after="2023-11-12"> <owner>vidhanj@google.com</owner> <owner>koerber@google.com</owner> <owner>chrome-autofill-alerts@google.com</owner> @@ -2687,7 +2687,7 @@ <histogram name="Autofill.LocalCardMigrationDialogUserInteraction" enum="AutofillLocalCardMigrationDialogUserInteraction" - expires_after="2023-09-01"> + expires_after="2023-11-12"> <owner>siyua@chromium.org</owner> <owner>jsaul@google.com</owner> <summary> @@ -3323,7 +3323,7 @@ </histogram> <histogram name="Autofill.PopupHidingReason" enum="AutofillPopupHidingReason" - expires_after="2023-09-05"> + expires_after="2023-11-12"> <owner>koerber@google.com</owner> <owner>mamir@chromium.org</owner> <summary> @@ -3454,7 +3454,7 @@ </histogram> <histogram name="Autofill.ProfileImport.ProfileImportType" - enum="AutofillProfileImportType" expires_after="2023-09-03"> + enum="AutofillProfileImportType" expires_after="2023-11-12"> <owner>koerber@google.com</owner> <owner>src/components/autofill/OWNERS</owner> <summary> @@ -3531,7 +3531,7 @@ </histogram> <histogram name="Autofill.ProfileImport.UpdateProfileEditedType" - enum="AutofillSettingsVisibleTypes" expires_after="2023-08-20"> + enum="AutofillSettingsVisibleTypes" expires_after="2023-11-12"> <owner>koerber@google.com</owner> <owner>src/components/autofill/OWNERS</owner> <summary> @@ -4318,7 +4318,7 @@ </histogram> <histogram name="Autofill.StrikeDatabase.StrikesPresentWhenServerCardSaved" - units="strikes" expires_after="2023-09-01"> + units="strikes" expires_after="2023-11-12"> <owner>jsaul@google.com</owner> <owner>payments-autofill-team@google.com</owner> <summary> @@ -4343,7 +4343,7 @@ </histogram> <histogram name="Autofill.StrikeDatabase.StrikesPresentWhenVirtualCardEnrolled" - units="strikes" expires_after="2023-09-01"> + units="strikes" expires_after="2023-11-12"> <owner>jsaul@google.com</owner> <owner>siyua@chromium.org</owner> <owner>payments-autofill-team@google.com</owner> @@ -4414,7 +4414,7 @@ </histogram> <histogram name="Autofill.SuggestionAccepted.OffTheRecord" units="units" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>rhalavati@chromium.org</owner> <owner>chrome-privacy-core@google.com</owner> <summary> @@ -4532,7 +4532,7 @@ </histogram> <histogram name="Autofill.TouchToFill.CreditCard.FillingCorrectness" - enum="BooleanAutofillFillingCorrectness" expires_after="2023-09-03"> + enum="BooleanAutofillFillingCorrectness" expires_after="2023-11-12"> <owner>mlerman@google.com</owner> <owner>tchudakov@google.com</owner> <owner>vykochko@google.com</owner> @@ -4557,7 +4557,7 @@ </histogram> <histogram name="Autofill.TouchToFill.CreditCard.Outcome" - enum="TouchToFill.CreditCard.Outcome" expires_after="2023-09-03"> + enum="TouchToFill.CreditCard.Outcome" expires_after="2023-11-12"> <owner>mlerman@google.com</owner> <owner>tchudakov@google.com</owner> <owner>vykochko@google.com</owner> @@ -4578,7 +4578,7 @@ </histogram> <histogram name="Autofill.TouchToFill.CreditCard.Outcome2" - enum="TouchToFill.CreditCard.Outcome" expires_after="2023-09-03"> + enum="TouchToFill.CreditCard.Outcome" expires_after="2023-11-12"> <owner>mlerman@google.com</owner> <owner>tchudakov@google.com</owner> <owner>vykochko@google.com</owner> @@ -4599,7 +4599,7 @@ </histogram> <histogram name="Autofill.TouchToFill.CreditCard.PerfectFilling" enum="Boolean" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>mlerman@google.com</owner> <owner>tchudakov@google.com</owner> <owner>vykochko@google.com</owner> @@ -4613,7 +4613,7 @@ </histogram> <histogram name="Autofill.TouchToFill.CreditCard.SelectedIndex" units="index" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>mlerman@google.com</owner> <owner>tchudakov@google.com</owner> <owner>vykochko@google.com</owner> @@ -4625,7 +4625,7 @@ </histogram> <histogram name="Autofill.TouchToFill.CreditCard.TriggerOutcome" - enum="TouchToFill.CreditCard.TriggerOutcome" expires_after="2023-09-03"> + enum="TouchToFill.CreditCard.TriggerOutcome" expires_after="2023-11-12"> <owner>mlerman@google.com</owner> <owner>tchudakov@google.com</owner> <owner>vykochko@google.com</owner> @@ -4682,7 +4682,7 @@ </histogram> <histogram name="Autofill.UnmaskPrompt.GetRealPanDuration" units="ms" - expires_after="2023-10-22"> + expires_after="2023-11-12"> <owner>jsaul@google.com</owner> <owner>siyua@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/blink/histograms.xml b/tools/metrics/histograms/metadata/blink/histograms.xml index fcfcb0e..bce9026 100644 --- a/tools/metrics/histograms/metadata/blink/histograms.xml +++ b/tools/metrics/histograms/metadata/blink/histograms.xml
@@ -126,7 +126,7 @@ </histogram> <histogram base="true" name="Blink.Animate.UpdateTime" units="microseconds" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <!-- Name completed by histogram_suffixes name="BlinkUpdateTimePreFCPSuffixes" --> <!-- Name completed by histogram_suffixes name="BlinkUpdateTimePostFCPSuffixes" --> @@ -571,7 +571,7 @@ </histogram> <histogram name="Blink.Canvas.WebGPUMaxRecycledResourcesCount" - units="Recyclable resources" expires_after="2023-08-27"> + units="Recyclable resources" expires_after="2023-11-12"> <owner>magchen@chromium.org</owner> <owner>enga@chromium.org</owner> <owner>graphics-dev@chromium.org</owner> @@ -582,7 +582,7 @@ </histogram> <histogram name="Blink.Canvas.WebGPUMaxRecycledResourcesInKB" units="KB" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>magchen@chromium.org</owner> <owner>enga@chromium.org</owner> <owner>graphics-dev@chromium.org</owner> @@ -770,7 +770,7 @@ </histogram> <histogram name="Blink.ContextMenu.ImageSelection.Outcome" - enum="ImageSelectionOutcome" expires_after="2023-08-31"> + enum="ImageSelectionOutcome" expires_after="2023-11-12"> <owner>flackr@chromium.org</owner> <owner>blink-interactions-team@google.com</owner> <summary> @@ -807,7 +807,7 @@ </histogram> <histogram name="Blink.CSSStyleSheetResource.ParseTime" units="microseconds" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>gjc@chromium.org</owner> <owner>loading-dev@chromium.org</owner> <owner>blink-network-dev@chromium.org</owner> @@ -884,7 +884,7 @@ </histogram> <histogram name="Blink.DecodedImage.WebPFileFormat" enum="WebPFileFormat" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>mcasas@chromium.org</owner> <owner>andrescj@chromium.org</owner> <summary> @@ -894,7 +894,7 @@ </histogram> <histogram name="Blink.DecodedImageType" enum="DecodedImageType" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>urvang@chromium.org</owner> <summary> Image codec inferred during decode. The histogram is incremented when enough @@ -940,7 +940,7 @@ </histogram> <histogram name="Blink.Experimental.Cookies.CacheLookupResult2" - enum="CookieCacheLookupResult" expires_after="2023-09-10"> + enum="CookieCacheLookupResult" expires_after="2023-11-12"> <owner>carlscab@google.com</owner> <owner>woa-performance@google</owner> <summary> @@ -1057,7 +1057,7 @@ </histogram> <histogram name="Blink.FedCm.ClosedSheetType.Android" enum="FedCmSheetType" - expires_after="2023-07-16"> + expires_after="2023-11-12"> <owner>npm@chromium.org</owner> <owner>web-identity-eng@google.com</owner> <summary> @@ -1099,7 +1099,7 @@ </histogram> <histogram name="Blink.FedCm.IdpSigninRequestInitiatedByUser" - enum="BooleanYesNo" expires_after="2023-09-10"> + enum="BooleanYesNo" expires_after="2023-11-12"> <owner>cbiesinger@chromium.org</owner> <owner>web-identity-eng@google.com</owner> <summary> @@ -1111,7 +1111,7 @@ </histogram> <histogram name="Blink.FedCm.IdpSignoutRequestInitiatedByUser" - enum="BooleanYesNo" expires_after="2023-09-10"> + enum="BooleanYesNo" expires_after="2023-11-12"> <owner>cbiesinger@chromium.org</owner> <owner>web-identity-eng@google.com</owner> <summary> @@ -1425,7 +1425,7 @@ </histogram> <histogram name="Blink.Fonts.DecodeTime" units="microseconds" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>gjc@chromium.org</owner> <owner>blink-network-dev@chromium.org</owner> <summary> @@ -1460,7 +1460,7 @@ </histogram> <histogram base="true" name="Blink.ForcedStyleAndLayout.UpdateTime" - units="microseconds" expires_after="2023-08-27"> + units="microseconds" expires_after="2023-11-12"> <!-- Name completed by histogram_suffixes name="BlinkUpdateTimePreFCPSuffixes" --> <!-- Name completed by histogram_suffixes name="BlinkUpdateTimePostFCPSuffixes" --> @@ -1725,7 +1725,7 @@ </histogram> <histogram name="Blink.HTMLParsing.ParsingTimeMin4" units="microseconds" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>masonf@chromium.org</owner> <owner>dom-dev@chromium.org</owner> <summary> @@ -1770,7 +1770,7 @@ </histogram> <histogram name="Blink.HTMLParsing.TokensParsedAverage4" units="tokens" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>masonf@chromium.org</owner> <owner>dom-dev@chromium.org</owner> <summary> @@ -1809,7 +1809,7 @@ </histogram> <histogram name="Blink.HTMLParsing.TokensParsedTotal4" units="tokens" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>masonf@chromium.org</owner> <owner>dom-dev@chromium.org</owner> <summary> @@ -1836,7 +1836,7 @@ </histogram> <histogram name="Blink.HTMLParsing.YieldedTimeMax4" units="microseconds" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>masonf@chromium.org</owner> <owner>dom-dev@chromium.org</owner> <summary> @@ -2012,7 +2012,7 @@ </histogram> <histogram name="Blink.ImportMap.HasJSONComments" enum="Boolean" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>jbroman@chromium.org</owner> <owner>domenic@chromium.org</owner> <summary> @@ -2270,7 +2270,7 @@ </histogram> <histogram name="Blink.Loading.CachedResponseArrivalAtRenderer" - units="Milliseconds" expires_after="2023-09-10"> + units="Milliseconds" expires_after="2023-11-12"> <owner>yhirano@chromium.org</owner> <owner>loadingg-dev@chromium.org</owner> <summary> @@ -2281,7 +2281,7 @@ </histogram> <histogram name="Blink.Loading.CodeCacheArrivalAtRenderer" units="Milliseconds" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>yhirano@chromium.org</owner> <owner>loading-dev@chromium.org</owner> <summary> @@ -2608,7 +2608,7 @@ </histogram> <histogram name="Blink.Overflow.ReplacedElementAreaOutsideContentRect" - units="pixels" expires_after="2023-08-27"> + units="pixels" expires_after="2023-11-12"> <owner>khushalsagar@chromium.org</owner> <owner>vmpstr@chromium.org</owner> <summary> @@ -2885,7 +2885,7 @@ </histogram> <histogram name="Blink.Script.SchedulingType" enum="ScriptSchedulingType" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>kouhei@chromium.org</owner> <owner>hiroshige@chromium.org</owner> <owner>chikamune@chromium.org</owner> @@ -2950,7 +2950,7 @@ </histogram> <histogram name="Blink.Sms.PendingOriginCount" units="origins" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>yigu@chromium.org</owner> <owner>web-identity-eng@google.com</owner> <summary> @@ -2982,7 +2982,7 @@ </histogram> <histogram name="Blink.Sms.Receive.Outcome" enum="WebOTPServiceOutcome" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>yigu@chromium.org</owner> <owner>goto@chromium.org</owner> <owner>web-identity-eng@google.com</owner> @@ -3520,7 +3520,7 @@ </histogram> <histogram name="Blink.UseCounter.PermissionsPolicy.Header2" - enum="FeaturePolicyFeature" expires_after="2023-08-25"> + enum="FeaturePolicyFeature" expires_after="2023-11-12"> <owner>iclelland@chromium.org</owner> <owner>feature-control@chromium.org</owner> <summary> @@ -3548,7 +3548,7 @@ </histogram> <histogram base="true" name="Blink.UserDrivenDocumentUpdate.UpdateTime" - units="microseconds" expires_after="2023-09-03"> + units="microseconds" expires_after="2023-11-12"> <!-- Name completed by histogram_suffixes name="BlinkUpdateTimePreFCPSuffixes" --> <!-- Name completed by histogram_suffixes name="BlinkUpdateTimePostFCPSuffixes" --> @@ -3576,7 +3576,7 @@ </histogram> <histogram name="Blink.VisibleBeforeLoaded.LazyLoadImages.AboveTheFold2" - enum="NQEEffectiveConnectionType" expires_after="2023-09-01"> + enum="NQEEffectiveConnectionType" expires_after="2023-11-12"> <owner>pdr@chromium.org</owner> <owner>paint-dev@chromium.org</owner> <summary> @@ -3626,7 +3626,7 @@ </histogram> <histogram base="true" name="Blink.VisualUpdateDelay.UpdateTime" - units="microseconds" expires_after="2023-08-27"> + units="microseconds" expires_after="2023-11-12"> <!-- Name completed by histogram_suffixes name="BlinkUpdateTimePreFCPSuffixes" --> <!-- Name completed by histogram_suffixes name="BlinkUpdateTimePostFCPSuffixes" -->
diff --git a/tools/metrics/histograms/metadata/bluetooth/histograms.xml b/tools/metrics/histograms/metadata/bluetooth/histograms.xml index fc7bb27..66f7921 100644 --- a/tools/metrics/histograms/metadata/bluetooth/histograms.xml +++ b/tools/metrics/histograms/metadata/bluetooth/histograms.xml
@@ -155,7 +155,7 @@ </histogram> <histogram name="Bluetooth.ChromeOS.FastPair.AccountKey.Write.GattErrorReason" - enum="BluetoothDeviceConnectErrorCode" expires_after="2023-09-03"> + enum="BluetoothDeviceConnectErrorCode" expires_after="2023-11-12"> <owner>jackshira@google.com</owner> <owner>dclasson@google.com</owner> <owner>brandosocarras@google.com</owner> @@ -331,7 +331,7 @@ </histogram> <histogram name="Bluetooth.ChromeOS.FastPair.ConnectDevice.Result" - enum="BooleanSuccess" expires_after="2023-09-03"> + enum="BooleanSuccess" expires_after="2023-11-12"> <owner>jackshira@google.com</owner> <owner>dclasson@google.com</owner> <owner>brandosocarras@google.com</owner> @@ -346,7 +346,7 @@ </histogram> <histogram name="Bluetooth.ChromeOS.FastPair.CreateScanFilter.Result" - enum="BooleanSuccess" expires_after="2023-09-03"> + enum="BooleanSuccess" expires_after="2023-11-12"> <owner>jackshira@google.com</owner> <owner>dclasson@google.com</owner> <owner>brandosocarras@google.com</owner> @@ -584,7 +584,7 @@ <histogram name="Bluetooth.ChromeOS.FastPair.FastPairDataEncryptor.CreateResult" - enum="BooleanSuccess" expires_after="2023-09-03"> + enum="BooleanSuccess" expires_after="2023-11-12"> <owner>jackshira@google.com</owner> <owner>dclasson@google.com</owner> <owner>brandosocarras@google.com</owner> @@ -755,7 +755,7 @@ </histogram> <histogram name="Bluetooth.ChromeOS.FastPair.GattConnection.Result" - enum="BooleanSuccess" expires_after="2023-09-03"> + enum="BooleanSuccess" expires_after="2023-11-12"> <owner>jackshira@google.com</owner> <owner>dclasson@google.com</owner> <owner>brandosocarras@google.com</owner> @@ -781,7 +781,7 @@ </histogram> <histogram name="Bluetooth.ChromeOS.FastPair.Handshake.FailureReason" - enum="FastPairHandshakeFailureReason" expires_after="2023-09-03"> + enum="FastPairHandshakeFailureReason" expires_after="2023-11-12"> <owner>jackshira@google.com</owner> <owner>dclasson@google.com</owner> <owner>brandosocarras@google.com</owner> @@ -794,7 +794,7 @@ </histogram> <histogram name="Bluetooth.ChromeOS.FastPair.Handshake.Result" - enum="BooleanSuccess" expires_after="2023-09-03"> + enum="BooleanSuccess" expires_after="2023-11-12"> <owner>jackshira@google.com</owner> <owner>dclasson@google.com</owner> <owner>brandosocarras@google.com</owner> @@ -931,7 +931,7 @@ <histogram name="Bluetooth.ChromeOS.FastPair.MessageStream.ConnectToService.ErrorReason" - enum="BluetoothSocketErrorReason" expires_after="2023-09-03"> + enum="BluetoothSocketErrorReason" expires_after="2023-11-12"> <owner>jackshira@google.com</owner> <owner>dclasson@google.com</owner> <owner>brandosocarras@google.com</owner> @@ -946,7 +946,7 @@ <histogram name="Bluetooth.ChromeOS.FastPair.MessageStream.ConnectToService.Result" - enum="BooleanSuccess" expires_after="2023-09-03"> + enum="BooleanSuccess" expires_after="2023-11-12"> <owner>jackshira@google.com</owner> <owner>dclasson@google.com</owner> <owner>brandosocarras@google.com</owner> @@ -973,7 +973,7 @@ </histogram> <histogram name="Bluetooth.ChromeOS.FastPair.MessageStream.Receive.ErrorReason" - enum="BluetoothConnectToServiceError" expires_after="2023-09-03"> + enum="BluetoothConnectToServiceError" expires_after="2023-11-12"> <owner>jackshira@google.com</owner> <owner>dclasson@google.com</owner> <owner>brandosocarras@google.com</owner> @@ -987,7 +987,7 @@ </histogram> <histogram name="Bluetooth.ChromeOS.FastPair.MessageStream.Receive.Result" - enum="BooleanSuccess" expires_after="2023-09-03"> + enum="BooleanSuccess" expires_after="2023-11-12"> <owner>jackshira@google.com</owner> <owner>dclasson@google.com</owner> <owner>brandosocarras@google.com</owner> @@ -1086,7 +1086,7 @@ </histogram> <histogram name="Bluetooth.ChromeOS.FastPair.PairingMethod" - enum="FastPairPairingMethod" expires_after="2023-09-03"> + enum="FastPairPairingMethod" expires_after="2023-11-12"> <owner>jackshira@google.com</owner> <owner>dclasson@google.com</owner> <owner>brandosocarras@google.com</owner> @@ -1371,7 +1371,7 @@ </histogram> <histogram name="Bluetooth.ChromeOS.FastPair.RetroactivePairing.Result" - enum="BooleanSuccess" expires_after="2023-09-10"> + enum="BooleanSuccess" expires_after="2023-11-12"> <owner>jackshira@google.com</owner> <owner>dclasson@google.com</owner> <owner>brandosocarras@google.com</owner> @@ -1489,7 +1489,7 @@ </histogram> <histogram name="Bluetooth.ChromeOS.FastPair.Scanner.StartSession.Result" - enum="BooleanSuccess" expires_after="2023-09-03"> + enum="BooleanSuccess" expires_after="2023-11-12"> <owner>jackshira@google.com</owner> <owner>dclasson@google.com</owner> <owner>brandosocarras@google.com</owner> @@ -1791,7 +1791,7 @@ </histogram> <histogram name="Bluetooth.ConnectedDeviceCount" units="devices" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>adlr@chromium.org</owner> <summary> Counts the number of simulataneously connected Bluetooth devices. Used to @@ -1835,7 +1835,7 @@ <histogram name="Bluetooth.Linux.ConnectToServiceInsecurelyResult" enum="BluetoothAdapterConnectToServiceInsecurelyResult" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>hansenmichael@google.com</owner> <owner>nearby-share-chromeos-eng@google.com</owner> <summary> @@ -1905,7 +1905,7 @@ </histogram> <histogram name="Bluetooth.Web.Characteristic.WriteValue.Outcome" - enum="WebBluetoothGATTOperationOutcome" expires_after="2023-08-27"> + enum="WebBluetoothGATTOperationOutcome" expires_after="2023-11-12"> <owner>cmumford@chromium.org</owner> <owner>deviceapi-team@google.com</owner> <summary> @@ -1917,7 +1917,7 @@ </histogram> <histogram name="Bluetooth.Web.ConnectGATT.Outcome" - enum="WebBluetoothConnectGATTOutcome" expires_after="2023-08-27"> + enum="WebBluetoothConnectGATTOutcome" expires_after="2023-11-12"> <owner>reillyg@chromium.org</owner> <owner>deviceapi-team@google.com</owner> <summary> @@ -1928,7 +1928,7 @@ </histogram> <histogram name="Bluetooth.Web.GetCharacteristic.Characteristic" - enum="GATTCharacteristicHash" expires_after="2023-08-27"> + enum="GATTCharacteristicHash" expires_after="2023-11-12"> <owner>reillyg@chromium.org</owner> <owner>deviceapi-team@google.com</owner> <summary> @@ -1995,7 +1995,7 @@ </histogram> <histogram name="Bluetooth.Web.RequestDevice.UnionOfServices.Services" - enum="GATTServiceHash" expires_after="2023-08-27"> + enum="GATTServiceHash" expires_after="2023-11-12"> <owner>reillyg@chromium.org</owner> <owner>deviceapi-team@google.com</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/bookmarks/histograms.xml b/tools/metrics/histograms/metadata/bookmarks/histograms.xml index 0be5bb0a..be65fcb 100644 --- a/tools/metrics/histograms/metadata/bookmarks/histograms.xml +++ b/tools/metrics/histograms/metadata/bookmarks/histograms.xml
@@ -61,7 +61,7 @@ </histogram> <histogram name="Bookmarks.AddedPerProfileType" enum="BrowserProfileType" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>rhalavati@chromium.org</owner> <owner>chrome-privacy-core@google.com</owner> <component>UI>Browser>Bookmarks</component> @@ -275,7 +275,7 @@ </histogram> <histogram name="Bookmarks.Count.OnProfileLoad3" units="bookmarks" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>supertri@chromium.org</owner> <owner>isherman@chromium.org</owner> <owner>aidanday@google.com</owner> @@ -307,7 +307,7 @@ </histogram> <histogram name="Bookmarks.EditTitleSource" enum="BookmarkEditSource" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>wylieb@chromium.org</owner> <owner>chrome-collections@google.com</owner> <component>UI>Browser>Bookmarks</component> @@ -330,7 +330,7 @@ </histogram> <histogram name="Bookmarks.LaunchLocation" enum="BookmarkLaunchLocation" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>ianwen@chromium.org</owner> <component>UI>Browser>Bookmarks</component> <summary>Logs a UI location from which a bookmark is launched.</summary> @@ -410,7 +410,7 @@ </histogram> <histogram name="Bookmarks.Opened.TimeSinceAdded" units="days" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>wylieb@chromium.org</owner> <owner>chrome-collections@google.com</owner> <component>UI>Browser>Bookmarks</component> @@ -423,7 +423,7 @@ </histogram> <histogram name="Bookmarks.Opened.TimeSinceLastUsed" units="days" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>wylieb@chromium.org</owner> <owner>chrome-collections@google.com</owner> <component>UI>Browser>Bookmarks</component> @@ -448,7 +448,7 @@ </histogram> <histogram name="Bookmarks.ReadingList.NumberOfItems" units="items" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>shaktisahu@chromium.org</owner> <component>UI>Browser>Bookmarks</component> <component>UI>Browser>Mobile>ReadingList</component> @@ -528,7 +528,7 @@ </histogram> <histogram name="Bookmarks.Storage.FileSizeAtStartup2" units="KB" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>wylieb@chromium.org</owner> <owner>chrome-collections@google.com</owner> <component>UI>Browser>Bookmarks</component> @@ -688,7 +688,7 @@ </histogram> <histogram name="Bookmarks.UsageCountPerProfileType" enum="BrowserProfileType" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>rhalavati@chromium.org</owner> <owner>chrome-privacy-core@google.com</owner> <component>UI>Browser>Bookmarks</component> @@ -721,7 +721,7 @@ </histogram> <histogram name="Bookmarks.Utilization.OnProfileLoad.TotalUsed" - units="Bookmarks" expires_after="2023-09-10"> + units="Bookmarks" expires_after="2023-11-12"> <owner>wylieb@chromium.org</owner> <owner>chrome-collections@google.com</owner> <component>UI>Browser>Bookmarks</component>
diff --git a/tools/metrics/histograms/metadata/browser/histograms.xml b/tools/metrics/histograms/metadata/browser/histograms.xml index 596a64e..d2a1329 100644 --- a/tools/metrics/histograms/metadata/browser/histograms.xml +++ b/tools/metrics/histograms/metadata/browser/histograms.xml
@@ -110,7 +110,7 @@ </histogram> <histogram name="Browser.ChromeOS.HatsStatus" enum="HatsStatus" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>aalsum@chromium.org</owner> <owner>cros-telemetry@google.com</owner> <summary> @@ -123,7 +123,7 @@ </histogram> <histogram name="Browser.DarkModeStatus" enum="DarkModeStatus" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>lgrey@chromium.org</owner> <owner>robliao@chromium.org</owner> <summary> @@ -567,7 +567,7 @@ </histogram> <histogram name="Browser.Responsiveness.IOJanksTotalPerMinute" units="janks" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>gab@chromium.org</owner> <owner>olivierli@chromium.org</owner> <summary> @@ -581,7 +581,7 @@ </histogram> <histogram name="Browser.Responsiveness.IOJankyIntervalsPerMinute" - units="janks" expires_after="2023-08-27"> + units="janks" expires_after="2023-11-12"> <owner>gab@chromium.org</owner> <owner>olivierli@chromium.org</owner> <summary> @@ -667,7 +667,7 @@ </histogram> <histogram name="Browser.WindowCount.Guest" units="units" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>rhalavati@chromium.org</owner> <owner>chrome-privacy-core@google.com</owner> <summary> @@ -679,7 +679,7 @@ </histogram> <histogram name="Browser.WindowCount.Incognito" units="units" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>rhalavati@chromium.org</owner> <owner>chrome-privacy-core@google.com</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/browsing_topics/histograms.xml b/tools/metrics/histograms/metadata/browsing_topics/histograms.xml index 137095c9..20ebd77 100644 --- a/tools/metrics/histograms/metadata/browsing_topics/histograms.xml +++ b/tools/metrics/histograms/metadata/browsing_topics/histograms.xml
@@ -96,7 +96,7 @@ <histogram name="BrowsingTopics.EpochTopicsCalculation.TopTopicsCountBeforePadding" - units="topics" expires_after="2023-09-03"> + units="topics" expires_after="2023-11-12"> <owner>yaoxia@chromium.org</owner> <owner>jkarlin@chromium.org</owner> <summary> @@ -108,7 +108,7 @@ </histogram> <histogram name="BrowsingTopics.JavaScriptAPI.TimeToResolve" units="ms" - expires_after="2023-09-08"> + expires_after="2023-11-12"> <owner>yaoxia@chromium.org</owner> <owner>jkarlin@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/chrome/histograms.xml b/tools/metrics/histograms/metadata/chrome/histograms.xml index 438c475..3f93525 100644 --- a/tools/metrics/histograms/metadata/chrome/histograms.xml +++ b/tools/metrics/histograms/metadata/chrome/histograms.xml
@@ -81,7 +81,7 @@ </histogram> <histogram name="Chrome.KAnonymityService.QuerySet.Latency" units="ms" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>behamilton@google.com</owner> <owner>pauljensen@chromium.org</owner> <summary> @@ -275,7 +275,7 @@ </histogram> <histogram name="Chrome.SystemNetworkContextManager.NetworkSandboxState" - enum="NetworkSandboxState" expires_after="2023-09-10"> + enum="NetworkSandboxState" expires_after="2023-11-12"> <owner>wfh@chromium.org</owner> <owner>mmenke@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/chromeos/histograms.xml b/tools/metrics/histograms/metadata/chromeos/histograms.xml index 5ff1d7d3..2a64da99 100644 --- a/tools/metrics/histograms/metadata/chromeos/histograms.xml +++ b/tools/metrics/histograms/metadata/chromeos/histograms.xml
@@ -300,7 +300,7 @@ </histogram> <histogram name="ChromeOS.Camera.AutoFraming.EnabledTime" units="%" - expires_after="2023-08-20"> + expires_after="2023-11-12"> <owner>kamesan@chromium.org</owner> <owner>chromeos-camera-eng@google.com</owner> <summary> @@ -817,7 +817,7 @@ </histogram> <histogram name="ChromeOS.CWP.CollectPerf" - enum="ChromeOSProfileCollectionStatus" expires_after="2023-09-03"> + enum="ChromeOSProfileCollectionStatus" expires_after="2023-11-12"> <owner>aalexand@google.com</owner> <owner>gmx@chromium.org</owner> <owner>cwp-team@google.com</owner> @@ -852,7 +852,7 @@ </histogram> <histogram name="ChromeOS.CWP.ParseCPUFrequencies" - enum="ChromeOSParseCPUFrequencyStatus" expires_after="2023-09-03"> + enum="ChromeOSParseCPUFrequencyStatus" expires_after="2023-11-12"> <owner>gmx@chromium.org</owner> <owner>cwp-team@google.com</owner> <summary> @@ -917,7 +917,7 @@ </histogram> <histogram name="ChromeOS.CWP.RecordPerf" enum="ChromeOSProfileRecordStatus" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>shantuo@google.com</owner> <owner>cwp-team@google.com</owner> <summary> @@ -1224,7 +1224,7 @@ </histogram> <histogram name="ChromeOS.Gaia.Done.ElapsedTime" units="ms" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>bchikhaoui@google.com</owner> <owner>cros-oac@google.com</owner> <summary> @@ -1265,7 +1265,7 @@ </histogram> <histogram base="true" name="ChromeOS.HardwareVerifier.Report" - enum="HardwareVerifierQualificationStatus" expires_after="2023-09-03"> + enum="HardwareVerifierQualificationStatus" expires_after="2023-11-12"> <!-- Name completed by histogram_suffixes name="HardwareVerifierSupportCategory" --> <owner>itspeter@chromium.org</owner> @@ -1278,7 +1278,7 @@ </histogram> <histogram name="ChromeOS.HardwareVerifier.Report.IsCompliant" enum="Boolean" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>itspeter@chromium.org</owner> <owner>stimim@chromium.org</owner> <owner>chromeos-runtime-probe@google.com</owner> @@ -1897,7 +1897,7 @@ </histogram> <histogram name="ChromeOS.LanguagePacks.Mojo.PackStateResponse" - enum="LanguagePackMojoPackState" expires_after="2023-09-10"> + enum="LanguagePackMojoPackState" expires_after="2023-11-12"> <owner>mlcui@google.com</owner> <owner>cros-borders-eng@google.com</owner> <summary> @@ -2122,7 +2122,7 @@ </histogram> <histogram name="ChromeOS.PrivacyHub.Opened" enum="PrivacyHubNavigationOrigin" - expires_after="2023-09-01"> + expires_after="2023-11-12"> <owner>zauri@google.com</owner> <owner>chromeos-privacyhub@google.com</owner> <summary> @@ -2163,7 +2163,7 @@ </histogram> <histogram name="ChromeOS.RgbKeyboard.RgbKeyboardCapabilityType" - enum="RgbKeyboardCapabilityType" expires_after="2023-09-10"> + enum="RgbKeyboardCapabilityType" expires_after="2023-11-12"> <owner>michaelcheco@google.com</owner> <owner>dpad@google.com</owner> <owner>jimmyxgong@chromium.org</owner> @@ -2228,14 +2228,14 @@ </histogram> <histogram name="ChromeOS.SAML.Provider" enum="ChromeOSSamlProvider" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>mslus@chromium.org</owner> <owner>mohammedabdon@chromium.org</owner> <summary>Records SAML provider when SAML login flow is used.</summary> </histogram> <histogram name="ChromeOS.SAML.Scraping.PasswordCountAll" units="passwords" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>mslus@chromium.org</owner> <owner>emaxx@chromium.org</owner> <summary> @@ -2395,7 +2395,7 @@ </histogram> <histogram name="ChromeOS.SecurityAnomalyUploadSuccess" enum="Boolean" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>jorgelo@chromium.org</owner> <owner>chromeos-security-core@google.com</owner> <summary> @@ -2563,6 +2563,29 @@ </histogram> <histogram + name="ChromeOS.Settings.Device.Touchpad.{TouchpadType}.{TouchpadSetting}.{Difference}" + enum="PointerSensitivity" expires_after="2024-03-22"> + <owner>dpad@google.com</owner> + <owner>cros-peripherals@google.com</owner> + <summary> + Records the value {Difference} when {TouchpadSetting} settings on + {TouchpadType} touchpad are updated. + </summary> + <token key="TouchpadType"> + <variant name="External" summary="external touchpad"/> + <variant name="Internal" summary="internal touchpad"/> + </token> + <token key="TouchpadSetting"> + <variant name="HapticSensitivity"/> + <variant name="Sensitivity"/> + </token> + <token key="Difference"> + <variant name="Decrease"/> + <variant name="Increase"/> + </token> +</histogram> + +<histogram name="ChromeOS.Settings.Device.Touchpad.{TouchpadType}.{TouchpadSpeedSettings}.Changed" enum="PointerSensitivity" expires_after="2024-03-22"> <owner>dpad@google.com</owner> @@ -2645,6 +2668,25 @@ </histogram> <histogram + name="ChromeOS.Settings.Device.{Peripheral}.Sensitivity.{Difference}" + enum="PointerSensitivity" expires_after="2024-03-22"> + <owner>dpad@google.com</owner> + <owner>cros-peripherals@google.com</owner> + <summary> + Records the value {Difference} when sensitivity setting on {Peripheral} + device is updated. + </summary> + <token key="Peripheral"> + <variant name="Mouse"/> + <variant name="PointingStick"/> + </token> + <token key="Difference"> + <variant name="Decrease"/> + <variant name="Increase"/> + </token> +</histogram> + +<histogram name="ChromeOS.Settings.Device.{Peripheral}.{PeripheralSetting}.Changed" enum="Boolean" expires_after="2024-03-22"> <owner>dpad@google.com</owner> @@ -2751,7 +2793,7 @@ </histogram> <histogram name="ChromeOS.Sharesheet.LaunchSource" - enum="ChromeOSSharesheetLaunchSource" expires_after="2023-08-27"> + enum="ChromeOSSharesheetLaunchSource" expires_after="2023-11-12"> <owner>dominickn@chromium.org</owner> <owner>melzhang@chromium.org</owner> <summary> @@ -2773,7 +2815,7 @@ </histogram> <histogram name="ChromeOS.Sharesheet.UserAction" - enum="ChromeOSSharesheetAction" expires_after="2023-08-27"> + enum="ChromeOSSharesheetAction" expires_after="2023-11-12"> <owner>dominickn@chromium.org</owner> <owner>melzhang@chromium.org</owner> <summary>Records user action on sharesheet invocations.</summary> @@ -2800,7 +2842,7 @@ </histogram> <histogram name="ChromeOS.Sync.PreferencesMigrated" enum="BooleanMigrated" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>rsorokin@chromium.org</owner> <owner>jamescook@chromium.org</owner> <owner>cros-oac@google.com</owner> @@ -3007,7 +3049,7 @@ </histogram> <histogram name="ChromeOS.TypeC.PartnerLocation" enum="PartnerLocationMetric" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>wonchung@google.com</owner> <owner>chromeos-usb@google.com</owner> <summary> @@ -3029,7 +3071,7 @@ </histogram> <histogram name="ChromeOS.TypeC.PowerSourceLocation" - enum="PowerSourceLocationMetric" expires_after="2023-09-03"> + enum="PowerSourceLocationMetric" expires_after="2023-11-12"> <owner>wonchung@google.com</owner> <owner>chromeos-usb@google.com</owner> <summary> @@ -3144,7 +3186,7 @@ </histogram> <histogram name="ChromeOS.UserTypeByDeviceType.LogSegment" - enum="UserDeviceMatrix" expires_after="2023-08-27"> + enum="UserDeviceMatrix" expires_after="2023-11-12"> <owner>bmalcolm@chromium.org</owner> <owner>cros-client-wa@google.com</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/chromeos_settings/histograms.xml b/tools/metrics/histograms/metadata/chromeos_settings/histograms.xml index 65c8d3bc..bf6b6714 100644 --- a/tools/metrics/histograms/metadata/chromeos_settings/histograms.xml +++ b/tools/metrics/histograms/metadata/chromeos_settings/histograms.xml
@@ -112,7 +112,7 @@ </histogram> <histogram name="ChromeOS.Settings.Device.TouchpadSpeedValue" - enum="TouchpadSensitivity" expires_after="2023-08-27"> + enum="TouchpadSensitivity" expires_after="2023-11-12"> <owner>xiaohuic@chromium.org</owner> <owner>cros-settings@google.com</owner> <summary> @@ -123,7 +123,7 @@ </histogram> <histogram name="ChromeOS.Settings.Inputs.ShortcutReminderDismissed" - enum="SettingsInputsShortcutReminderState" expires_after="2023-08-27"> + enum="SettingsInputsShortcutReminderState" expires_after="2023-11-12"> <owner>mlcui@google.com</owner> <owner>cros-borders@google.com</owner> <summary> @@ -286,7 +286,7 @@ </histogram> <histogram base="true" name="ChromeOS.Settings.NumNavigationsUntilChange" - units="navigations" expires_after="2023-09-10"> + units="navigations" expires_after="2023-11-12"> <!-- Name completed by histogram_suffixes name="OsSettingsChangeType" --> <owner>wesokuhara@google.com</owner> @@ -530,7 +530,7 @@ </histogram> <histogram name="ChromeOS.Settings.Wifi.Hidden" enum="BooleanToggled" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>jonmann@chromium.org</owner> <owner>khorimoto@chromium.org</owner> <owner>tnagel@chromium.org</owner> @@ -543,7 +543,7 @@ </histogram> <histogram name="ChromeOS.Settings.WindowOpenDuration" units="ms" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>wesokuhara@google.com</owner> <owner>xiaohuic@chromium.org</owner> <owner>cros-settings@google.com</owner>
diff --git a/tools/metrics/histograms/metadata/commerce/histograms.xml b/tools/metrics/histograms/metadata/commerce/histograms.xml index 60f6492..c995fe9 100644 --- a/tools/metrics/histograms/metadata/commerce/histograms.xml +++ b/tools/metrics/histograms/metadata/commerce/histograms.xml
@@ -177,7 +177,7 @@ </histogram> <histogram name="Commerce.Heuristics.PartnerMerchantPatternSource" - enum="CommerceHeuristicsDataSource" expires_after="2023-08-27"> + enum="CommerceHeuristicsDataSource" expires_after="2023-11-12"> <owner>yuezhanggg@chromium.org</owner> <owner>wychen@chromium.org</owner> <owner>chrome-shopping@google.com</owner> @@ -600,7 +600,7 @@ </histogram> <histogram name="Commerce.Subscriptions.TrackResult" - enum="ShoppingSubscriptionsRequestStatus" expires_after="2023-08-27"> + enum="ShoppingSubscriptionsRequestStatus" expires_after="2023-11-12"> <owner>zhiyuancai@chromium.org</owner> <owner>ayman@chromium.org</owner> <owner>chrome-shopping@google.com</owner> @@ -611,7 +611,7 @@ </histogram> <histogram name="Commerce.Subscriptions.UntrackResult" - enum="ShoppingSubscriptionsRequestStatus" expires_after="2023-09-03"> + enum="ShoppingSubscriptionsRequestStatus" expires_after="2023-11-12"> <owner>zhiyuancai@chromium.org</owner> <owner>ayman@chromium.org</owner> <owner>chrome-shopping@google.com</owner> @@ -816,7 +816,7 @@ </histogram> <histogram name="MerchantTrust.PageInfo.IsStoreInfoVisible" - enum="BooleanVisible" expires_after="2023-08-27"> + enum="BooleanVisible" expires_after="2023-11-12"> <owner>zhiyuancai@chromium.org</owner> <owner>chrome-shopping@google.com</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/compositing/histograms.xml b/tools/metrics/histograms/metadata/compositing/histograms.xml index 58e05d78..0ca780e 100644 --- a/tools/metrics/histograms/metadata/compositing/histograms.xml +++ b/tools/metrics/histograms/metadata/compositing/histograms.xml
@@ -611,7 +611,7 @@ <histogram name="Compositing.Renderer.CALayer.ChangedIOSurfacesPercentagePerFrame" - units="%" expires_after="2023-08-27"> + units="%" expires_after="2023-11-12"> <owner>magchen@chromium.org</owner> <owner>ccameron@chromium.org</owner> <summary> @@ -621,7 +621,7 @@ </histogram> <histogram name="Compositing.Renderer.CALayer.ChangedIOSurfacesPerFrame" - units="surfaces" expires_after="2023-08-27"> + units="surfaces" expires_after="2023-11-12"> <owner>magchen@chromium.org</owner> <owner>ccameron@chromium.org</owner> <summary> @@ -631,7 +631,7 @@ </histogram> <histogram name="Compositing.Renderer.CALayer.ChangedIOSurfacesSizePerFrame" - units="bytes" expires_after="2023-08-27"> + units="bytes" expires_after="2023-11-12"> <owner>magchen@chromium.org</owner> <owner>ccameron@chromium.org</owner> <summary> @@ -662,7 +662,7 @@ </histogram> <histogram name="Compositing.Renderer.LayersUpdateTime" units="microseconds" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>pdr@chromium.org</owner> <owner>paint-dev@chromium.org</owner> <summary> @@ -703,7 +703,7 @@ </histogram> <histogram name="Compositing.Renderer.NumActiveLayers" units="layers" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>pdr@chromium.org</owner> <owner>paint-dev@chromium.org</owner> <summary> @@ -713,7 +713,7 @@ </histogram> <histogram name="Compositing.Renderer.NumActivePictureLayers" units="layers" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>pdr@chromium.org</owner> <owner>paint-dev@chromium.org</owner> <summary> @@ -724,7 +724,7 @@ </histogram> <histogram name="Compositing.Renderer.NumRenderSurfaces" units="surfaces" - expires_after="2023-09-11"> + expires_after="2023-11-12"> <owner>pdr@chromium.org</owner> <owner>paint-dev@chromium.org</owner> <summary> @@ -777,7 +777,7 @@ </histogram> <histogram name="Compositing.SurfaceAggregator.AggregateUs" - units="microseconds" expires_after="2023-09-03"> + units="microseconds" expires_after="2023-11-12"> <owner>kylechar@chromium.org</owner> <owner>graphics-dev@chromium.org</owner> <summary> @@ -926,7 +926,7 @@ </histogram> <histogram name="CompositorLatency.Type" enum="FrameReportType" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>jonross@chromium.org</owner> <owner>graphics-dev@chromium.org</owner> <summary> @@ -1063,7 +1063,7 @@ </histogram> <histogram name="Graphics.Smoothness.95pctPercentDroppedFrames_1sWindow" - units="%" expires_after="2023-09-03"> + units="%" expires_after="2023-11-12"> <owner>jonross@chromium.org</owner> <owner>graphics-dev@chromium.org</owner> <summary> @@ -1154,7 +1154,7 @@ </histogram> <histogram name="Graphics.Smoothness.MaxPercentDroppedFrames_1sWindow" - units="%" expires_after="2023-09-03"> + units="%" expires_after="2023-11-12"> <owner>jonross@chromium.org</owner> <owner>graphics-dev@chromium.org</owner> <summary> @@ -1168,7 +1168,7 @@ </histogram> <histogram name="Graphics.Smoothness.MaxStale" units="ms" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>jonross@chromium.org</owner> <owner>mjzhang@chromium.org</owner> <owner>graphics-dev@chromium.org</owner> @@ -1296,7 +1296,7 @@ </histogram> <histogram name="Graphics.Smoothness.Stale" units="ms" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>jonross@chromium.org</owner> <owner>mjzhang@chromium.org</owner> <owner>graphics-dev@chromium.org</owner>
diff --git a/tools/metrics/histograms/metadata/content/histograms.xml b/tools/metrics/histograms/metadata/content/histograms.xml index 64046fe8..0696b8a 100644 --- a/tools/metrics/histograms/metadata/content/histograms.xml +++ b/tools/metrics/histograms/metadata/content/histograms.xml
@@ -227,7 +227,7 @@ </histogram> <histogram name="ContentSettings.Popups.StrongBlockerActions" - enum="StrongPopupBlockerAction" expires_after="2023-09-10"> + enum="StrongPopupBlockerAction" expires_after="2023-11-12"> <owner>csharrison@chromium.org</owner> <summary> Counts of various events related to the strong popup blocker (aka abusive @@ -817,7 +817,7 @@ </histogram> <histogram name="ContentSuggestions.Feed.ContentAgeOnLoad.BlockingRefresh" - units="ms" expires_after="2023-09-03"> + units="ms" expires_after="2023-11-12"> <owner>carlosk@chromium.org</owner> <owner>harringtond@chromium.org</owner> <owner>feed@chromium.org</owner> @@ -831,7 +831,7 @@ </histogram> <histogram name="ContentSuggestions.Feed.ContentAgeOnLoad.NotRefreshed" - units="ms" expires_after="2023-09-03"> + units="ms" expires_after="2023-11-12"> <owner>carlosk@chromium.org</owner> <owner>harringtond@chromium.org</owner> <owner>feed@chromium.org</owner> @@ -970,7 +970,7 @@ </histogram> <histogram name="ContentSuggestions.Feed.DisplayStatusOnOpen" - enum="ContentSuggestionsDisplayStatus" expires_after="2023-09-03"> + enum="ContentSuggestionsDisplayStatus" expires_after="2023-11-12"> <owner>carlosk@chromium.org</owner> <owner>harringtond@chromium.org</owner> <owner>feed@chromium.org</owner> @@ -1005,7 +1005,7 @@ </histogram> <histogram name="ContentSuggestions.Feed.ImageFetchStatus" - enum="CombinedHttpResponseAndNetErrorCode" expires_after="2023-09-03"> + enum="CombinedHttpResponseAndNetErrorCode" expires_after="2023-11-12"> <owner>harringtond@chromium.org</owner> <owner>feed@chromium.org</owner> <summary> @@ -1016,7 +1016,7 @@ </histogram> <histogram base="true" name="ContentSuggestions.Feed.LoadStepLatency" - units="ms" expires_after="2023-09-03"> + units="ms" expires_after="2023-11-12"> <owner>harringtond@chromium.org</owner> <owner>feed@chromium.org</owner> <summary> @@ -1154,7 +1154,7 @@ </histogram> <histogram name="ContentSuggestions.Feed.NoticeCardFulfilled2" enum="Boolean" - expires_after="2023-09-01"> + expires_after="2023-11-12"> <owner>vincb@google.com</owner> <owner>feed@chromium.org</owner> <summary> @@ -1692,7 +1692,7 @@ </histogram> <histogram name="ContentSuggestions.Feed.WebFeed.FollowCount.Engaged" - units="follows" expires_after="2023-10-22"> + units="follows" expires_after="2023-11-12"> <owner>harringtond@chromium.org</owner> <owner>feed@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/content_creation/histograms.xml b/tools/metrics/histograms/metadata/content_creation/histograms.xml index 7c8f76d4..914baeb 100644 --- a/tools/metrics/histograms/metadata/content_creation/histograms.xml +++ b/tools/metrics/histograms/metadata/content_creation/histograms.xml
@@ -139,7 +139,7 @@ </histogram> <histogram name="SharedHighlights.AndroidShareSheet.SharedState" - enum="LinkGenerationSharedStatus" expires_after="2023-08-27"> + enum="LinkGenerationSharedStatus" expires_after="2023-11-12"> <owner>sebsg@chromium.org</owner> <owner>jeffreycohen@chromium.org</owner> <owner>chrome-shared-highlighting@google.com</owner> @@ -172,7 +172,7 @@ </histogram> <histogram name="SharedHighlights.Desktop.CopiedLinkType" - enum="LinkGenerationCopiedLinkType" expires_after="2023-09-10"> + enum="LinkGenerationCopiedLinkType" expires_after="2023-11-12"> <owner>sebsg@chromium.org</owner> <owner>jeffreycohen@chromium.org</owner> <owner>chrome-shared-highlighting@google.com</owner>
diff --git a/tools/metrics/histograms/metadata/cookie/histograms.xml b/tools/metrics/histograms/metadata/cookie/histograms.xml index 903cf86..9a0b5f5 100644 --- a/tools/metrics/histograms/metadata/cookie/histograms.xml +++ b/tools/metrics/histograms/metadata/cookie/histograms.xml
@@ -171,7 +171,7 @@ </summary> </histogram> -<histogram name="Cookie.Count2" units="units" expires_after="2023-08-27"> +<histogram name="Cookie.Count2" units="units" expires_after="2023-11-12"> <owner>bingler@chromium.org</owner> <owner>morlovich@chromium.org</owner> <summary> @@ -264,7 +264,7 @@ </histogram> <histogram name="Cookie.DomainHasNonASCII" enum="Boolean" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>johannhof@chromium.org</owner> <owner>bingler@chromium.org</owner> <summary> @@ -288,7 +288,7 @@ </histogram> <histogram name="Cookie.DoubleUnderscorePrefixedName" enum="Boolean" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>bingler@chromium.org</owner> <owner>miketaylr@chromium.org</owner> <summary> @@ -572,7 +572,7 @@ </histogram> <histogram name="Cookie.IncludedRequestEffectiveSameSite" - enum="CookieEffectiveSameSite" expires_after="2023-09-03"> + enum="CookieEffectiveSameSite" expires_after="2023-11-12"> <owner>bingler@chromium.org</owner> <owner>miketaylr@chromium.org</owner> <summary> @@ -604,7 +604,7 @@ </histogram> <histogram name="Cookie.LoadProblem" enum="CookieLoadProblem" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>morlovich@chromium.org</owner> <summary> Recorded when a problem is recorded when loading the persistent cookie @@ -625,7 +625,7 @@ </histogram> <histogram name="Cookie.NameOrValueHtab" enum="Boolean" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>bingler@chromium.org</owner> <owner>awillia@chromium.org</owner> <summary> @@ -637,7 +637,7 @@ </summary> </histogram> -<histogram name="Cookie.NumKeys" units="keys" expires_after="2023-09-03"> +<histogram name="Cookie.NumKeys" units="keys" expires_after="2023-11-12"> <owner>cfredric@chromium.org</owner> <owner>kaustubhag@chromium.org</owner> <summary> @@ -836,7 +836,7 @@ </histogram> <histogram name="Cookie.SameSiteAttributeValue" enum="CookieSameSiteString" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>bingler@chromium.org</owner> <owner>miketaylr@chromium.org</owner> <summary> @@ -856,7 +856,7 @@ </histogram> <histogram name="Cookie.TimeBlockedOnLoad" units="ms" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>nharper@chromium.org</owner> <summary> The amount of time (ms) between the cookie store load starting and @@ -874,7 +874,7 @@ </summary> </histogram> -<histogram name="Cookie.TimeInitializeDB" units="ms" expires_after="2023-09-10"> +<histogram name="Cookie.TimeInitializeDB" units="ms" expires_after="2023-11-12"> <owner>bingler@chromium.org</owner> <owner>src/net/cookies/OWNERS</owner> <summary>The amount of time (ms) to initialize the cookies database.</summary> @@ -890,7 +890,7 @@ </summary> </histogram> -<histogram name="Cookie.Type" enum="CookieType" expires_after="2023-09-10"> +<histogram name="Cookie.Type" enum="CookieType" expires_after="2023-11-12"> <owner>mkwst@chromium.org</owner> <summary>For each cookie added to the store, record it's type(s).</summary> </histogram>
diff --git a/tools/metrics/histograms/metadata/cras/histograms.xml b/tools/metrics/histograms/metadata/cras/histograms.xml index 0f6c272..347ffb4 100644 --- a/tools/metrics/histograms/metadata/cras/histograms.xml +++ b/tools/metrics/histograms/metadata/cras/histograms.xml
@@ -151,7 +151,7 @@ </histogram> <histogram name="Cras.DeviceNoiseCancellationStatus" - enum="CrasNoiseCancellationStatus" expires_after="2023-08-27"> + enum="CrasNoiseCancellationStatus" expires_after="2023-11-12"> <!-- Name completed by histogram_suffixes name="Cras.DeviceType" --> @@ -638,7 +638,7 @@ </histogram> <histogram name="Cras.StreamCallbackThreshold" units="frames" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <!-- Name completed by histogram_suffixes name="Cras.Direction" and name="Cras.ClientType" --> @@ -784,7 +784,7 @@ </histogram> <histogram name="Cras.WebRTC.Audio.ApmCaptureInputLevelAverageRms" - units="dBFS (negated)" expires_after="2023-09-03"> + units="dBFS (negated)" expires_after="2023-11-12"> <owner>hychao@chromium.org</owner> <owner>chromeos-audio@google.com</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/cross_device/histograms.xml b/tools/metrics/histograms/metadata/cross_device/histograms.xml index 8e1e256..48861974 100644 --- a/tools/metrics/histograms/metadata/cross_device/histograms.xml +++ b/tools/metrics/histograms/metadata/cross_device/histograms.xml
@@ -2116,6 +2116,9 @@ <histogram name="SmartLock.AuthMethodChoice.Unlock" enum="SmartLockAuthMethodChoice" expires_after="2023-12-31"> + <obsolete> + SmartLock.AuthResult.* is sufficient to determine engaged user count. + </obsolete> <owner>hansberry@chromium.org</owner> <owner>chromeos-cross-device-eng@google.com</owner> <summary>Records the user's unlock method choice.</summary>
diff --git a/tools/metrics/histograms/metadata/crostini/histograms.xml b/tools/metrics/histograms/metadata/crostini/histograms.xml index a726f72..4c8b7d2 100644 --- a/tools/metrics/histograms/metadata/crostini/histograms.xml +++ b/tools/metrics/histograms/metadata/crostini/histograms.xml
@@ -228,7 +228,7 @@ </histogram> <histogram name="Crostini.DiskType" enum="CrostiniDiskImageType" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>davidmunro@google.com</owner> <owner>clumptini@google.com</owner> <summary> @@ -333,7 +333,7 @@ </histogram> <histogram name="Crostini.Restarter.Started" enum="BooleanAttempted" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>davidmunro@google.com</owner> <owner>clumptini@google.com</owner> <summary> @@ -354,7 +354,7 @@ </histogram> <histogram name="Crostini.RestarterResult.Installer" enum="CrostiniResult" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>timloh@google.com</owner> <owner>clumptini@google.com</owner> <summary> @@ -418,7 +418,7 @@ </histogram> <histogram name="Crostini.Setup.Started" enum="BooleanAttempted" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>davidmunro@google.com</owner> <owner>clumptini@google.com</owner> <summary> @@ -533,7 +533,7 @@ </histogram> <histogram name="Crostini.TimeFromDeviceSetupToInstall" units="ms" - expires_after="2023-07-16"> + expires_after="2023-11-12"> <owner>davidmunro@google.com</owner> <owner>clumptini@google.com</owner> <summary> @@ -613,7 +613,7 @@ </histogram> <histogram base="true" name="Crostini.UnsupportedNotification.Reason" - enum="CrostiniUnsupportedNotificationReason" expires_after="2023-08-27"> + enum="CrostiniUnsupportedNotificationReason" expires_after="2023-11-12"> <owner>davidmunro@google.com</owner> <owner>clumptini@google.com</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/cryptohome/histograms.xml b/tools/metrics/histograms/metadata/cryptohome/histograms.xml index 2af373f2a..c6ab0a5 100644 --- a/tools/metrics/histograms/metadata/cryptohome/histograms.xml +++ b/tools/metrics/histograms/metadata/cryptohome/histograms.xml
@@ -309,7 +309,7 @@ </histogram> <histogram name="Cryptohome.HomedirEncryptionType" enum="HomedirEncryptionType" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>dspaid@chromium.org</owner> <summary> The encryption type used for a user's cryptohome directory. This is logged @@ -684,7 +684,7 @@ </histogram> <histogram name="Cryptohome.TimeToInitPkcs11" units="ms" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>apronin@chromium.org</owner> <owner>cros-hwsec+uma@chromium.org</owner> <summary> @@ -795,7 +795,7 @@ </histogram> <histogram name="Cryptohome.UssExperiment.FetchUssExperimentConfigStatus" - enum="CryptohomeFetchUssExperimentConfigStatus" expires_after="2023-09-03"> + enum="CryptohomeFetchUssExperimentConfigStatus" expires_after="2023-11-12"> <owner>hcyang@google.com</owner> <owner>cros-hwsec+uma@chromium.org</owner> <summary> @@ -808,7 +808,7 @@ </histogram> <histogram name="Cryptohome.UssExperiment.UssExperimentFlag" - enum="CryptohomeUssExperimentFlag" expires_after="2023-09-03"> + enum="CryptohomeUssExperimentFlag" expires_after="2023-11-12"> <owner>hcyang@google.com</owner> <owner>cros-hwsec+uma@chromium.org</owner> <summary> @@ -877,7 +877,7 @@ </histogram> <histogram name="Cryptohome.WrappingKeyDerivation.Mount" - enum="WrappingKeyDerivation" expires_after="2023-09-03"> + enum="WrappingKeyDerivation" expires_after="2023-11-12"> <owner>tnagel@chromium.org</owner> <owner>zauri@chromium.org</owner> <owner>cros-hwsec+uma@chromium.org</owner>
diff --git a/tools/metrics/histograms/metadata/custom_tabs/histograms.xml b/tools/metrics/histograms/metadata/custom_tabs/histograms.xml index 461a90b..4b68e37e1 100644 --- a/tools/metrics/histograms/metadata/custom_tabs/histograms.xml +++ b/tools/metrics/histograms/metadata/custom_tabs/histograms.xml
@@ -223,7 +223,7 @@ </histogram> <histogram name="CustomTabs.DetachedResourceRequest.FinalStatus" - enum="NetErrorCodes" expires_after="2023-09-10"> + enum="NetErrorCodes" expires_after="2023-11-12"> <owner>lizeb@chromium.org</owner> <owner>cct-team@google.com</owner> <summary> @@ -246,7 +246,7 @@ </histogram> <histogram name="CustomTabs.FeatureUsage" enum="CustomTabsFeatureUsed" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>donnd@chromium.org</owner> <owner>chrome-connective-tissue@google.com</owner> <summary> @@ -644,7 +644,7 @@ </histogram> <histogram name="CustomTabs.TimeScrollUpdateReceivedAfterScrollEnd" units="ms" - expires_after="2023-08-26"> + expires_after="2023-11-12"> <owner>sinansahin@google.com</owner> <owner>chrome-connective-tissue@google.com</owner> <summary> @@ -742,7 +742,7 @@ </histogram> <histogram name="TrustedWebActivity.LocationDelegationEnrolled" enum="Boolean" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>eirage@chromium.org</owner> <owner>peconn@chromium.org</owner> <summary> @@ -753,7 +753,7 @@ </histogram> <histogram name="TrustedWebActivity.LocationPermissionChanged" - enum="TrustedWebActivityPermissionChanged" expires_after="2023-09-03"> + enum="TrustedWebActivityPermissionChanged" expires_after="2023-11-12"> <owner>eirage@chromium.org</owner> <owner>peconn@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/data/histograms.xml b/tools/metrics/histograms/metadata/data/histograms.xml index 1ea3fe36..a90b4a2 100644 --- a/tools/metrics/histograms/metadata/data/histograms.xml +++ b/tools/metrics/histograms/metadata/data/histograms.xml
@@ -197,7 +197,7 @@ </histogram> <histogram name="DataUse.BytesReceived3.Delegate" units="bytes" - expires_after="2023-08-28"> + expires_after="2023-11-12"> <owner>curranmax@chromium.org</owner> <owner>ryansturm@chromium.org</owner> <owner>spelchat@chromium.org</owner> @@ -222,7 +222,7 @@ </histogram> <histogram name="DataUse.BytesSent3.Delegate" units="bytes" - expires_after="2023-08-28"> + expires_after="2023-11-12"> <owner>curranmax@chromium.org</owner> <owner>ryansturm@chromium.org</owner> <owner>spelchat@chromium.org</owner>
diff --git a/tools/metrics/histograms/metadata/dev/histograms.xml b/tools/metrics/histograms/metadata/dev/histograms.xml index d4b1fff..4026ce6 100644 --- a/tools/metrics/histograms/metadata/dev/histograms.xml +++ b/tools/metrics/histograms/metadata/dev/histograms.xml
@@ -288,7 +288,7 @@ </histogram> <histogram base="true" name="DevTools.Launch" units="ms" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <!-- Name completed by histogram_suffixes name="DevToolsLaunchPanels" --> <owner>yangguo@chromium.org</owner> @@ -402,7 +402,7 @@ </histogram> <histogram name="DevTools.RecordingEdited" enum="DevToolsRecordingEdited" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>alexrudenko@chromium.org</owner> <owner>mathias@chromium.org</owner> <owner>yangguo@chromium.org</owner> @@ -426,7 +426,7 @@ </histogram> <histogram name="DevTools.RecordingReplaySpeed" - enum="DevToolsRecordingReplaySpeed" expires_after="2023-09-03"> + enum="DevToolsRecordingReplaySpeed" expires_after="2023-11-12"> <owner>ergunsh@chromium.org</owner> <owner>alexrudenko@chromium.org</owner> <owner>mathias@chromium.org</owner>
diff --git a/tools/metrics/histograms/metadata/download/histograms.xml b/tools/metrics/histograms/metadata/download/histograms.xml index b86d90a27..0b50420 100644 --- a/tools/metrics/histograms/metadata/download/histograms.xml +++ b/tools/metrics/histograms/metadata/download/histograms.xml
@@ -99,7 +99,7 @@ </histogram> <histogram name="Download.Bubble.DragInfo" enum="Download.DragInfo" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>xinghuilu@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary> @@ -126,7 +126,7 @@ </histogram> <histogram name="Download.Bubble.PartialToFullViewLatency" units="ms" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>drubery@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary> @@ -140,7 +140,7 @@ </histogram> <histogram name="Download.Bubble.ProcessedCommand" enum="DownloadCommand" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>xinghuilu@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary> @@ -221,7 +221,7 @@ </histogram> <histogram name="Download.Complete.IsOpenWhenCompleteSet" enum="BooleanSet" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>xinghuilu@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary> @@ -233,7 +233,7 @@ </histogram> <histogram name="Download.Complete.IsShouldOpenFileBasedOnExtensionSet" - enum="BooleanSet" expires_after="2023-08-27"> + enum="BooleanSet" expires_after="2023-11-12"> <owner>xinghuilu@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary> @@ -292,7 +292,7 @@ </histogram> <histogram name="Download.DangerousDialog.Events" - enum="DangerousDownloadDialogEvent" expires_after="2023-09-03"> + enum="DangerousDownloadDialogEvent" expires_after="2023-11-12"> <owner>qinmin@chromium.org</owner> <summary> Records user interactions with the dangerous download dialog on Android. @@ -356,7 +356,7 @@ </histogram> <histogram name="Download.DownloadDangerPrompt" - enum="SBClientDownloadExtensions" expires_after="2023-08-27"> + enum="SBClientDownloadExtensions" expires_after="2023-11-12"> <owner>vakh@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary> @@ -367,7 +367,7 @@ </histogram> <histogram name="Download.DownloadManagerImpl.CreateDownloadItemTime" - units="ms" expires_after="2023-09-09"> + units="ms" expires_after="2023-11-12"> <owner>chlily@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary> @@ -377,7 +377,7 @@ </histogram> <histogram name="Download.DownloadManagerImpl.PostInitializationTime" - units="ms" expires_after="2023-09-09"> + units="ms" expires_after="2023-11-12"> <owner>chlily@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary> @@ -457,7 +457,7 @@ </histogram> <histogram name="Download.InputStreamReadError" - enum="DownloadInputStreamReadErrorType" expires_after="2023-08-31"> + enum="DownloadInputStreamReadErrorType" expires_after="2023-11-12"> <owner>qinmin@chromium.org</owner> <owner>shaktisahu@chromium.org</owner> <summary> @@ -704,7 +704,7 @@ </histogram> <histogram name="Download.LoadHistoryDownloads.AddExtensionInfoAndNotifyTime" - units="ms" expires_after="2023-09-09"> + units="ms" expires_after="2023-11-12"> <owner>chlily@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary> @@ -717,7 +717,7 @@ <histogram name="Download.LoadHistoryDownloads.DeserializeStoragePartitionConfigTime" - units="ms" expires_after="2023-09-09"> + units="ms" expires_after="2023-11-12"> <owner>chlily@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary> @@ -729,7 +729,7 @@ </histogram> <histogram name="Download.LoadHistoryDownloads.DownloadRows" units="rows" - expires_after="2023-09-09"> + expires_after="2023-11-12"> <owner>chlily@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary> @@ -739,7 +739,7 @@ </histogram> <histogram name="Download.LoadHistoryDownloads.NotifyObserversTime" units="ms" - expires_after="2023-09-09"> + expires_after="2023-11-12"> <owner>chlily@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary> @@ -750,7 +750,7 @@ </histogram> <histogram name="Download.LoadHistoryDownloadsTime" units="ms" - expires_after="2023-09-09"> + expires_after="2023-11-12"> <owner>chlily@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary> @@ -828,7 +828,7 @@ <histogram name="Download.NotPreferredOpeningInBrowserReasons" enum="DownloadNotPreferredOpeningInBrowserReason" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>xinghuilu@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary> @@ -853,7 +853,7 @@ </histogram> <histogram name="Download.OpenButtonPressed.IsDownloadCompleted" - enum="BooleanCompleted" expires_after="2023-08-27"> + enum="BooleanCompleted" expires_after="2023-11-12"> <owner>xinghuilu@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary> @@ -1271,7 +1271,7 @@ </histogram> <histogram name="Download.Session.TotalDurationIncludingBubbleTime" units="ms" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>xinghuilu@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary> @@ -1284,7 +1284,7 @@ </histogram> <histogram name="Download.SetAlwaysOpenTo" enum="BooleanEnabled" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>xinghuilu@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/enterprise/histograms.xml b/tools/metrics/histograms/metadata/enterprise/histograms.xml index c2adbd9..478d461 100644 --- a/tools/metrics/histograms/metadata/enterprise/histograms.xml +++ b/tools/metrics/histograms/metadata/enterprise/histograms.xml
@@ -570,21 +570,21 @@ </histogram> <histogram name="Enterprise.DeviceRemoteCommand.Crd.Capturer.Aura.Created" - units="units" expires_after="2023-08-30"> + units="units" expires_after="2023-11-12"> <owner>macinashutosh@google.com</owner> <owner>chromeos-commercial-crd@google.com</owner> <summary>Reports the creation of AuraDesktopCapturer class object</summary> </histogram> <histogram name="Enterprise.DeviceRemoteCommand.Crd.Capturer.Aura.Destroyed" - units="units" expires_after="2023-08-30"> + units="units" expires_after="2023-11-12"> <owner>macinashutosh@google.com</owner> <owner>chromeos-commercial-crd@google.com</owner> <summary>Reports the destruction of AuraDesktopCapturer class object</summary> </histogram> <histogram name="Enterprise.DeviceRemoteCommand.Crd.Capturer.FrameSink.Created" - units="units" expires_after="2023-08-30"> + units="units" expires_after="2023-11-12"> <owner>macinashutosh@google.com</owner> <owner>chromeos-commercial-crd@google.com</owner> <summary> @@ -594,7 +594,7 @@ <histogram name="Enterprise.DeviceRemoteCommand.Crd.Capturer.FrameSink.Destroyed" - units="units" expires_after="2023-08-30"> + units="units" expires_after="2023-11-12"> <owner>macinashutosh@google.com</owner> <owner>chromeos-commercial-crd@google.com</owner> <summary> @@ -1182,7 +1182,7 @@ </histogram> <histogram name="Enterprise.Dlp.ConfidentialContentsCount" units="entries" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>aidazolic@chromium.org</owner> <owner>chromeos-dlp@google.com</owner> <summary> @@ -2166,7 +2166,7 @@ </histogram> <histogram name="Enterprise.OnBulkDataEntry.DataSize" units="bytes" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>domfc@chromium.org</owner> <owner>webprotect-team@google.com</owner> <summary> @@ -2427,7 +2427,7 @@ </histogram> <histogram name="Enterprise.RegularUserSession.SessionLength" units="minutes" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>bfranz@chromium.org</owner> <owner>chromeos-kiosk-eng@google.com</owner> <summary> @@ -2595,7 +2595,7 @@ </histogram> <histogram name="Enterprise.TimeToUnthrottlePolicyInit" units="ms" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>emaxx@chromium.org</owner> <owner>pmarko@chromium.org</owner> <summary> @@ -2609,7 +2609,7 @@ </histogram> <histogram name="Enterprise.UserPolicyChromeOS.ChildUser.OAuthTokenError" - enum="GoogleServiceAuthError" expires_after="2023-09-10"> + enum="GoogleServiceAuthError" expires_after="2023-11-12"> <owner>agawronska@chromium.org</owner> <owner>michaelpg@chromium.org</owner> <summary>Failure reason for OAuth token fetch for child user.</summary> @@ -2682,14 +2682,14 @@ </histogram> <histogram name="Enterprise.UserSession.Logins" - enum="EnterpriseUserSessionLogins" expires_after="2023-08-27"> + enum="EnterpriseUserSessionLogins" expires_after="2023-11-12"> <owner>xiyuan@chromium.org</owner> <owner>sduraisamy@chromium.org</owner> <summary>Tracks the sign-in events on an enrolled device.</summary> </histogram> <histogram name="Enterprise.VerifiedAccess.SAML.DeviceTrustMatchesEndpoints" - enum="Boolean" expires_after="2023-08-01"> + enum="Boolean" expires_after="2023-11-12"> <owner>lmasopust@google.com</owner> <owner>rodmartin@chromium.org</owner> <owner>cbe-device-trust-eng@google.com</owner> @@ -2816,7 +2816,7 @@ </histogram> <histogram name="EnterpriseCheck.IsFullyManaged2" enum="IsFullyManagedBoolean" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>twellington@google.com</owner> <owner>tedchcoc@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/event/histograms.xml b/tools/metrics/histograms/metadata/event/histograms.xml index d00113f..8c13541c 100644 --- a/tools/metrics/histograms/metadata/event/histograms.xml +++ b/tools/metrics/histograms/metadata/event/histograms.xml
@@ -632,7 +632,7 @@ </histogram> <histogram name="Event.Latency.ScrollUpdate.TimeToScrollUpdateSwapBegin2" - units="microseconds" expires_after="2023-09-10"> + units="microseconds" expires_after="2023-11-12"> <owner>nzolghadr@chromium.org</owner> <summary> NOTE: This metric is deprecated in favor of @@ -659,7 +659,7 @@ </histogram> <histogram name="Event.Latency.ScrollUpdate.TotalEvents" units="counts" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>ddrone@google.com</owner> <owner>chrometto-team@google.com</owner> <summary> @@ -892,7 +892,7 @@ </histogram> <histogram name="Event.PassiveListeners" enum="EventResultType" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>dtapuska@chromium.org</owner> <summary> The result of handling of MouseWheel, TouchStart, TouchMove, TouchEnd events
diff --git a/tools/metrics/histograms/metadata/extensions/histograms.xml b/tools/metrics/histograms/metadata/extensions/histograms.xml index 1715e6f6..7ec0143 100644 --- a/tools/metrics/histograms/metadata/extensions/histograms.xml +++ b/tools/metrics/histograms/metadata/extensions/histograms.xml
@@ -244,7 +244,7 @@ </histogram> <histogram name="Extensions.BackgroundHostCreatedForExtension" - enum="BackgroundHostCreatedForExtensionValues" expires_after="2023-09-10"> + enum="BackgroundHostCreatedForExtensionValues" expires_after="2023-11-12"> <owner>fdoray@chromium.org</owner> <owner>catan-team@chromium.org</owner> <summary> @@ -459,7 +459,7 @@ </histogram> <histogram name="Extensions.ContentVerification.FetchResult" - enum="BooleanSuccess" expires_after="2023-09-01"> + enum="BooleanSuccess" expires_after="2023-11-12"> <owner>vkovalova@google.com</owner> <owner>lazyboy@chromium.org</owner> <owner>rdevlin.cronin@chromium.org</owner> @@ -733,7 +733,7 @@ </histogram> <histogram name="Extensions.DeclarativeNetRequest.CreateVerifiedMatcherTime" - units="ms" expires_after="2023-08-28"> + units="ms" expires_after="2023-11-12"> <owner>kelvinjiang@chromium.org</owner> <owner>src/extensions/OWNERS</owner> <summary> @@ -794,7 +794,7 @@ </histogram> <histogram name="Extensions.DeclarativeNetRequest.LoadRulesetResult" - enum="LoadRulesetResult" expires_after="2023-08-27"> + enum="LoadRulesetResult" expires_after="2023-11-12"> <owner>kelvinjiang@chromium.org</owner> <owner>src/extensions/OWNERS</owner> <summary> @@ -2187,7 +2187,7 @@ </histogram> <histogram name="Extensions.Functions.SynchronousExecutionTime" units="ms" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>rdevlin.cronin@chromium.org</owner> <owner>extensions-core@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/file/histograms.xml b/tools/metrics/histograms/metadata/file/histograms.xml index 5739961..1cf6dd5 100644 --- a/tools/metrics/histograms/metadata/file/histograms.xml +++ b/tools/metrics/histograms/metadata/file/histograms.xml
@@ -187,7 +187,7 @@ </histogram> <histogram name="FileBrowser.ChangeDirectory.RootType" - enum="FileManagerRootType" expires_after="2023-09-03"> + enum="FileManagerRootType" expires_after="2023-11-12"> <owner>simmonsjosh@google.com</owner> <owner>src/ui/file_manager/OWNERS</owner> <summary> @@ -304,7 +304,7 @@ </histogram> <histogram name="FileBrowser.DownloadsCount" units="units" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>simmonsjosh@google.com</owner> <owner>src/ui/file_manager/OWNERS</owner> <summary> @@ -419,7 +419,7 @@ </histogram> <histogram name="FileBrowser.Glitch" enum="FileManagerGlitch" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>majewski@chromium.org</owner> <owner>src/ui/file_manager/OWNERS</owner> <summary> @@ -434,7 +434,7 @@ <histogram name="FileBrowser.HoldingSpace.TimeFromFirstWelcomeBannerShowToFirstPin" - units="ms" expires_after="2023-08-27"> + units="ms" expires_after="2023-11-12"> <owner>dmblack@google.com</owner> <owner>tbarzic@chromium.org</owner> <summary> @@ -640,7 +640,7 @@ </histogram> <histogram name="FileBrowser.Notification.Show" - enum="FileManagerNotificationType" expires_after="2023-09-03"> + enum="FileManagerNotificationType" expires_after="2023-11-12"> <owner>simmonsjosh@google.com</owner> <owner>src/ui/file_manager/OWNERS</owner> <summary> @@ -769,7 +769,7 @@ </histogram> <histogram name="FileBrowser.Recent.LoadArcMedia" units="ms" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>simmonsjosh@google.com</owner> <owner>src/ui/file_manager/OWNERS</owner> <summary> @@ -779,7 +779,7 @@ </histogram> <histogram name="FileBrowser.Recent.LoadCrostini" units="ms" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>simmonsjosh@google.com</owner> <owner>src/ui/file_manager/OWNERS</owner> <summary> @@ -799,7 +799,7 @@ </histogram> <histogram name="FileBrowser.Recent.LoadDrive" units="ms" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>simmonsjosh@google.com</owner> <owner>src/ui/file_manager/OWNERS</owner> <summary> @@ -809,7 +809,7 @@ </histogram> <histogram name="FileBrowser.Recent.LoadTotal" units="ms" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>simmonsjosh@google.com</owner> <owner>src/ui/file_manager/OWNERS</owner> <summary> @@ -881,7 +881,7 @@ </histogram> <histogram name="FileBrowser.ToggleFileListType" enum="FileManagerListType" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>simmonsjosh@google.com</owner> <owner>src/ui/file_manager/OWNERS</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/fingerprint/histograms.xml b/tools/metrics/histograms/metadata/fingerprint/histograms.xml index 39b3e83..32c989d 100644 --- a/tools/metrics/histograms/metadata/fingerprint/histograms.xml +++ b/tools/metrics/histograms/metadata/fingerprint/histograms.xml
@@ -77,7 +77,7 @@ </histogram> <histogram name="Fingerprint.Enroll.ScanResult" enum="FingerprintScanResult" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>emaamari@google.com</owner> <owner>tomhughes@chromium.org</owner> <owner>cros-lurs@google.com</owner> @@ -103,7 +103,7 @@ </histogram> <histogram name="Fingerprint.FingerprintScanDone" units="units" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>emaamari@google.com</owner> <owner>chromeos-commercial-identity@google.com</owner> <owner>chromeos-fingerprint@google.com</owner>
diff --git a/tools/metrics/histograms/metadata/gcm/histograms.xml b/tools/metrics/histograms/metadata/gcm/histograms.xml index 0942a1c8b..af05dbd 100644 --- a/tools/metrics/histograms/metadata/gcm/histograms.xml +++ b/tools/metrics/histograms/metadata/gcm/histograms.xml
@@ -33,7 +33,7 @@ </histogram> <histogram name="GCM.CheckinRequestStatus" enum="GCMCheckinRequestStatus" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>peter@chromium.org</owner> <owner>knollr@chromium.org</owner> <summary>Status code of the outcome of a GCM checkin request.</summary> @@ -166,7 +166,7 @@ </histogram> <histogram name="GCM.SendWebPushMessageResult" enum="SendWebPushMessageResult" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>knollr@chromium.org</owner> <owner>peter@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/google/histograms.xml b/tools/metrics/histograms/metadata/google/histograms.xml index 8dce9fa..aab1ff0 100644 --- a/tools/metrics/histograms/metadata/google/histograms.xml +++ b/tools/metrics/histograms/metadata/google/histograms.xml
@@ -59,7 +59,7 @@ </histogram> <histogram name="GoogleUpdate.UpgradeResult" enum="GoogleUpdateUpgradeStatus" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>sorin@chromium.org</owner> <owner>waffles@chromium.org</owner> <summary>The result of an on-demand update check.</summary>
diff --git a/tools/metrics/histograms/metadata/gpu/histograms.xml b/tools/metrics/histograms/metadata/gpu/histograms.xml index ccaec89..e4e7459 100644 --- a/tools/metrics/histograms/metadata/gpu/histograms.xml +++ b/tools/metrics/histograms/metadata/gpu/histograms.xml
@@ -395,7 +395,7 @@ </histogram> <histogram name="GPU.CanvasOopRaster.OopRasterAndGpuAcceleration" - enum="CanvasOopRasterAndGpuAcceleration" expires_after="2023-09-10"> + enum="CanvasOopRasterAndGpuAcceleration" expires_after="2023-11-12"> <owner>vasilyt@chromium.org</owner> <owner>nazabris@microsoft.com</owner> <owner>jochin@microsoft.com</owner> @@ -418,7 +418,7 @@ </histogram> <histogram name="GPU.ContextLost" enum="ContextLostReason" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>sievers@chromium.org</owner> <summary> The reason a GPU command buffer context of a given type was lost. @@ -518,7 +518,7 @@ </histogram> <histogram name="GPU.DirectComposition.DCLayer.YUVOverlayCount" - units="overlays" expires_after="2023-09-10"> + units="overlays" expires_after="2023-11-12"> <owner>magchen@chromium.org</owner> <owner>zmo@chromium.org</owner> <summary> @@ -602,7 +602,7 @@ </histogram> <histogram name="GPU.DirectComposition.OverlayFormatUsed3" enum="DXGI_FORMAT" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>sunnyps@chromium.org</owner> <owner>zmo@chromium.org</owner> <owner>magchen@chromium.org</owner> @@ -615,7 +615,7 @@ </histogram> <histogram name="GPU.DirectComposition.OverlaysSupported" - enum="BooleanOverlaySupported" expires_after="2023-09-03"> + enum="BooleanOverlaySupported" expires_after="2023-11-12"> <owner>sunnyps@chromium.org</owner> <owner>zmo@chromium.org</owner> <owner>magchen@chromium.org</owner> @@ -639,7 +639,7 @@ </histogram> <histogram name="GPU.DirectComposition.SwapChainFormat3" enum="DXGI_FORMAT" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>sunnyps@chromium.org</owner> <owner>zmo@chromium.org</owner> <owner>magchen@chromium.org</owner> @@ -678,7 +678,7 @@ </histogram> <histogram name="GPU.EGLDisplayType" enum="EGLDisplayType" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>zmo@chromium.org</owner> <owner>graphics-dev@chromium.org</owner> <summary>The display type used to ask for an EGLDisplay.</summary> @@ -772,7 +772,7 @@ </histogram> <histogram name="GPU.GLImplementation" enum="GLImplementation" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>magchen@chromium.org</owner> <owner>zmo@chromium.org</owner> <summary> @@ -824,7 +824,7 @@ </histogram> <histogram name="GPU.GPUProcessExitCode" enum="GPUProcessExitCode" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>zmo@chromium.org</owner> <owner>graphics-dev@chromium.org</owner> <summary> @@ -842,7 +842,7 @@ </histogram> <histogram name="GPU.GPUProcessLaunchTime" units="ms" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>vmiura@chromium.org</owner> <summary> Startup time of the GPU process as measured by the GPU process host. @@ -867,7 +867,7 @@ </histogram> <histogram name="GPU.GPUProcessTerminationStatus2" enum="GpuTerminationStatus" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>vmiura@chromium.org</owner> <summary> Counts for each time the GPU Process Host detects the process dies. @@ -911,7 +911,7 @@ </histogram> <histogram name="GPU.IntelGpuGeneration" enum="IntelGpuGeneration" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>zmo@chromium.org</owner> <owner>graphics-dev@chromium.org</owner> <summary> @@ -921,7 +921,7 @@ </histogram> <histogram name="GPU.IntelGpuSeriesType" enum="IntelGpuSeriesType" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>sunnyps@chromium.org</owner> <owner>zmo@chromium.org</owner> <summary> @@ -1153,7 +1153,7 @@ </summary> </histogram> -<histogram name="GPU.Output.HDR" enum="Boolean" expires_after="2023-08-27"> +<histogram name="GPU.Output.HDR" enum="Boolean" expires_after="2023-11-12"> <owner>hubbe@chromium.org</owner> <owner>cassew@chromium.org</owner> <owner>media-dev@chromium.org</owner> @@ -1201,7 +1201,7 @@ </histogram> <histogram name="GPU.ProcessLifetimeEvents.HardwareAccelerated" - enum="GPUProcessLifetimeEvent" expires_after="2023-09-03"> + enum="GPUProcessLifetimeEvent" expires_after="2023-11-12"> <owner>vmiura@chromium.org</owner> <summary> Recorded once for every GPU process launch and crash when GPU process is @@ -1212,7 +1212,7 @@ </histogram> <histogram name="GPU.ProcessLifetimeEvents.SwiftShader" - enum="GPUProcessLifetimeEvent" expires_after="2023-09-03"> + enum="GPUProcessLifetimeEvent" expires_after="2023-11-12"> <owner>vmiura@chromium.org</owner> <summary> Recorded once for every GPU process launch and crash when GPU process is @@ -1379,7 +1379,7 @@ </histogram> <histogram name="GPU.SoftwareRendering" enum="BooleanSoftwareRendering" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>zmo@chromium.org</owner> <owner>graphics-dev@chromium.org</owner> <summary> @@ -1704,7 +1704,7 @@ </histogram> <histogram name="Viz.DisplayCompositor.OverlayNumProposedCandidates" - units="units" expires_after="2023-08-08"> + units="units" expires_after="2023-11-12"> <owner>petermcneeley@chromium.org</owner> <owner>khaslett@chromium.org</owner> <owner>graphics-dev@chromium.org</owner> @@ -1750,7 +1750,7 @@ </histogram> <histogram name="Viz.DisplayCompositor.RootDamageRect.Overlay" - enum="BooleanOverlayDamageRect" expires_after="2023-09-03"> + enum="BooleanOverlayDamageRect" expires_after="2023-11-12"> <owner>magchen@chromium.org</owner> <owner>zmo@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/history/histograms.xml b/tools/metrics/histograms/metadata/history/histograms.xml index 0b89f2b..3ff62d2 100644 --- a/tools/metrics/histograms/metadata/history/histograms.xml +++ b/tools/metrics/histograms/metadata/history/histograms.xml
@@ -474,7 +474,7 @@ </histogram> <histogram name="History.ClearBrowsingData.UserDeletedFromTab" - enum="ClearBrowsingDataTab" expires_after="2023-09-03"> + enum="ClearBrowsingDataTab" expires_after="2023-11-12"> <owner>dullweber@chromium.org</owner> <owner>msramek@chromium.org</owner> <component>UI>Browser>History</component> @@ -485,7 +485,7 @@ </histogram> <histogram name="History.Clusters.Actions.DidMakeQuery" enum="BooleanQueried" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>mcrouse@chromium.org</owner> <owner>chrome-journeys@google.com</owner> <component>UI>Browser>Journeys</component> @@ -1913,7 +1913,7 @@ </histogram> <histogram name="History.DatabaseSqliteError" enum="SqliteLoggedResultCode" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>sophiechang@chromium.org</owner> <owner>asully@chromium.org</owner> <component>UI>Browser>History</component> @@ -1924,7 +1924,7 @@ </histogram> <histogram name="History.DomainCount1Day_V2" units="domains" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>mpearson@chromium.org</owner> <owner>mjzhang@chromium.org</owner> <owner>chrome-analysis-team@google.com</owner> @@ -1986,7 +1986,7 @@ </histogram> <histogram name="History.DomainCount28Day_V2" units="domains" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>mpearson@chromium.org</owner> <owner>mjzhang@chromium.org</owner> <owner>chrome-analysis-team@google.com</owner> @@ -2048,7 +2048,7 @@ </histogram> <histogram name="History.DomainCount7Day_V2" units="domains" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>mpearson@chromium.org</owner> <owner>mjzhang@chromium.org</owner> <owner>chrome-analysis-team@google.com</owner> @@ -2359,7 +2359,7 @@ </histogram> <histogram name="History.MonthlyHostCount" units="hosts" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>mpearson@chromium.org</owner> <owner>sky@chromium.org</owner> <component>UI>Browser>History</component> @@ -2533,7 +2533,7 @@ </summary> </histogram> -<histogram name="History.URLTableCount" units="URLs" expires_after="2023-09-10"> +<histogram name="History.URLTableCount" units="URLs" expires_after="2023-11-12"> <owner>mpearson@chromium.org</owner> <owner>sky@chromium.org</owner> <component>UI>Browser>History</component> @@ -2625,7 +2625,7 @@ </histogram> <histogram name="History.WeeklyHostCount" units="hosts" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>mpearson@chromium.org</owner> <owner>sky@chromium.org</owner> <component>UI>Browser>History</component>
diff --git a/tools/metrics/histograms/metadata/input/histograms.xml b/tools/metrics/histograms/metadata/input/histograms.xml index f5e1a6f..418e33b 100644 --- a/tools/metrics/histograms/metadata/input/histograms.xml +++ b/tools/metrics/histograms/metadata/input/histograms.xml
@@ -23,7 +23,7 @@ <histograms> <histogram name="InputMethod.ActiveCount" units="units" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>myy@chromium.org</owner> <owner>essential-inputs-team@google.com</owner> <summary> @@ -327,7 +327,7 @@ </histogram> <histogram name="InputMethod.Assistive.AutocorrectV2.Quality.PkAccepted" - enum="IMEAutocorrectQualityBreakdown" expires_after="2023-09-03"> + enum="IMEAutocorrectQualityBreakdown" expires_after="2023-11-12"> <owner>mehrab@google.com</owner> <owner>essential-inputs-team@google.com</owner> <summary> @@ -514,7 +514,7 @@ </histogram> <histogram name="InputMethod.Assistive.Disabled" enum="IMEAssistiveAction" - expires_after="2023-08-20"> + expires_after="2023-11-12"> <owner>jiwan@google.com</owner> <owner>essential-inputs-team@google.com</owner> <summary> @@ -632,7 +632,7 @@ </histogram> <histogram name="InputMethod.Assistive.MultiWord.CandidatesGenerated" - enum="IMEAssistiveMultiWordSuggestionType" expires_after="2023-09-03"> + enum="IMEAssistiveMultiWordSuggestionType" expires_after="2023-11-12"> <owner>curtismcmullan@google.com</owner> <owner>essential-inputs-team@google.com</owner> <summary> @@ -704,7 +704,7 @@ </histogram> <histogram name="InputMethod.Assistive.MultiWord.RequestCandidates" - enum="IMEAssistiveMultiWordSuggestionType" expires_after="2023-09-03"> + enum="IMEAssistiveMultiWordSuggestionType" expires_after="2023-11-12"> <owner>curtismcmullan@google.com</owner> <owner>essential-inputs-team@google.com</owner> <summary> @@ -715,7 +715,7 @@ </histogram> <histogram name="InputMethod.Assistive.MultiWord.SuggestionLength" - units="chars" expires_after="2023-08-08"> + units="chars" expires_after="2023-11-12"> <owner>curtismcmullan@google.com</owner> <owner>essential-inputs-team@google.com</owner> <summary> @@ -851,7 +851,7 @@ </histogram> <histogram name="InputMethod.Category" enum="InputMethodCategory" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>shend@chromium.org</owner> <owner>essential-inputs-team@google.com</owner> <summary> @@ -880,7 +880,7 @@ </histogram> <histogram name="InputMethod.Commit.Index" units="units" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>shend@chromium.org</owner> <owner>essential-inputs-team@google.com</owner> <summary> @@ -890,7 +890,7 @@ </histogram> <histogram name="InputMethod.Commit.Type2" enum="IMECommitType2" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>dvallet@chromium.org</owner> <owner>shuchen@chromium.org</owner> <owner>essential-inputs-team@google.com</owner> @@ -1012,7 +1012,7 @@ </histogram> <histogram name="InputMethod.ID2" enum="InputMethodID2" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>tranbaoduy@chromium.org</owner> <owner>shuchen@chromium.org</owner> <owner>essential-inputs-team@google.com</owner> @@ -1038,7 +1038,7 @@ </histogram> <histogram name="InputMethod.ImeSwitch" enum="IMESwitchType" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>dvallet@chromium.org</owner> <owner>timloh@chromium.org</owner> <owner>essential-inputs-team@google.com</owner> @@ -1046,7 +1046,7 @@ </histogram> <histogram name="InputMethod.KeyEventLatency" units="ms" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>shend@chromium.org</owner> <owner>essential-inputs-team@google.com</owner> <summary>Time taken by the engine to handle a key event.</summary> @@ -1401,7 +1401,7 @@ </histogram> <histogram name="InputMethod.VirtualKeyboard.ContainerBehavior" - enum="VirtualKeyboardContainerType" expires_after="2023-09-03"> + enum="VirtualKeyboardContainerType" expires_after="2023-11-12"> <owner>shend@chromium.org</owner> <owner>essential-inputs-team@google.com</owner> <summary> @@ -1438,7 +1438,7 @@ </histogram> <histogram name="InputMethod.VirtualKeyboard.Emoji.TriggerType" - enum="VirtualKeyboardEmojiTriggerType" expires_after="2023-09-03"> + enum="VirtualKeyboardEmojiTriggerType" expires_after="2023-11-12"> <owner>shend@chromium.org</owner> <owner>essential-inputs-team@google.com</owner> <summary>How emojis were inserted.</summary>
diff --git a/tools/metrics/histograms/metadata/interstitial/histograms.xml b/tools/metrics/histograms/metadata/interstitial/histograms.xml index bb652cd..a3d5d85 100644 --- a/tools/metrics/histograms/metadata/interstitial/histograms.xml +++ b/tools/metrics/histograms/metadata/interstitial/histograms.xml
@@ -243,7 +243,7 @@ </histogram> <histogram name="TypedNavigationUpgradeThrottle.Event" - enum="TypedNavigationUpgradeThrottleEvent" expires_after="2023-08-27"> + enum="TypedNavigationUpgradeThrottleEvent" expires_after="2023-11-12"> <owner>meacer@chromium.org</owner> <owner>trusty-transport@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/kiosk/histograms.xml b/tools/metrics/histograms/metadata/kiosk/histograms.xml index b753fa8..ec0f16b1 100644 --- a/tools/metrics/histograms/metadata/kiosk/histograms.xml +++ b/tools/metrics/histograms/metadata/kiosk/histograms.xml
@@ -23,7 +23,7 @@ <histograms> <histogram name="Kiosk.AppService.Launch.AppReadiness" enum="AppReadiness" - expires_after="2023-09-01"> + expires_after="2023-11-12"> <owner>yixie@chromium.org</owner> <owner>chromeos-kiosk-eng@google.com</owner> <summary> @@ -33,7 +33,7 @@ </histogram> <histogram name="Kiosk.AppService.WebApp.InstallResult" - enum="WebAppInstallResultCode" expires_after="2023-09-01"> + enum="WebAppInstallResultCode" expires_after="2023-11-12"> <owner>yixie@chromium.org</owner> <owner>chromeos-kiosk-eng@google.com</owner> <summary> @@ -43,7 +43,7 @@ </histogram> <histogram name="Kiosk.AppService.WebApp.IsPlaceholder" enum="BooleanYesNo" - expires_after="2023-09-01"> + expires_after="2023-11-12"> <owner>yixie@chromium.org</owner> <owner>chromeos-kiosk-eng@google.com</owner> <summary> @@ -128,7 +128,7 @@ </histogram> <histogram name="Kiosk.DiskUsagePercentage" units="%" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>vkovalova@chromium.org</owner> <owner>chromeos-kiosk-eng@google.com</owner> <summary> @@ -202,7 +202,7 @@ </histogram> <histogram name="Kiosk.LaunchType" enum="KioskLaunchType" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>xiyuan@chromium.org</owner> <owner>aghuie@chromium.org</owner> <summary> @@ -222,7 +222,7 @@ </summary> </histogram> -<histogram name="Kiosk.RamUsagePercentage" units="%" expires_after="2023-09-03"> +<histogram name="Kiosk.RamUsagePercentage" units="%" expires_after="2023-11-12"> <owner>vkovalova@chromium.org</owner> <owner>chromeos-kiosk-eng@google.com</owner> <summary> @@ -300,7 +300,7 @@ </histogram> <histogram name="Kiosk.SessionDuration.Normal" units="ms" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>pbond@chromium.org</owner> <owner>chromeos-kiosk-eng@chromium.org</owner> <summary> @@ -383,7 +383,7 @@ </histogram> <histogram name="Kiosk.SwapUsagePercentage" units="%" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>vkovalova@chromium.org</owner> <owner>chromeos-kiosk-eng@google.com</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/language/histograms.xml b/tools/metrics/histograms/metadata/language/histograms.xml index e6578d50..270f46a 100644 --- a/tools/metrics/histograms/metadata/language/histograms.xml +++ b/tools/metrics/histograms/metadata/language/histograms.xml
@@ -23,7 +23,7 @@ <histograms> <histogram name="LanguageDetection.TFLiteModel.LanguageDetectionModelState" - enum="LanguageDetectionModelState" expires_after="2023-09-03"> + enum="LanguageDetectionModelState" expires_after="2023-11-12"> <owner>mcrouse@chromium.org</owner> <owner>chrome-language@google.com</owner> <summary> @@ -44,7 +44,7 @@ </histogram> <histogram name="LanguageDetection.TFLiteModel.WasModelRequestDeferred" - enum="BooleanDeferred" expires_after="2023-09-03"> + enum="BooleanDeferred" expires_after="2023-11-12"> <owner>mcrouse@chromium.org</owner> <owner>chrome-language@google.com</owner> <summary> @@ -56,7 +56,7 @@ <histogram name="LanguageDetection.TFLiteModel.WasModelUnavailableDueToDeferredLoad" - enum="Boolean" expires_after="2023-09-03"> + enum="Boolean" expires_after="2023-11-12"> <owner>mcrouse@chromium.org</owner> <owner>chrome-language@google.com</owner> <summary> @@ -214,7 +214,7 @@ </histogram> <histogram name="LanguageUsage.AcceptLanguageAndContentLanguageUsage" - enum="AcceptLanguageAndContentLanguageUsage" expires_after="2023-09-03"> + enum="AcceptLanguageAndContentLanguageUsage" expires_after="2023-11-12"> <owner>victortan@chromium.org</owner> <owner>potassium-katabolism@google.com</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/leveldb_proto/histograms.xml b/tools/metrics/histograms/metadata/leveldb_proto/histograms.xml index 25109ea2..956e98e 100644 --- a/tools/metrics/histograms/metadata/leveldb_proto/histograms.xml +++ b/tools/metrics/histograms/metadata/leveldb_proto/histograms.xml
@@ -187,7 +187,7 @@ </histogram> <histogram name="ProtoDB.SharedDbInitStatus" enum="ProtoDatabaseInitState" - expires_after="2023-08-26"> + expires_after="2023-11-12"> <owner>ssid@chromium.org</owner> <owner>salg@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/login/histograms.xml b/tools/metrics/histograms/metadata/login/histograms.xml index b5ab283a..e118942 100644 --- a/tools/metrics/histograms/metadata/login/histograms.xml +++ b/tools/metrics/histograms/metadata/login/histograms.xml
@@ -88,7 +88,7 @@ </histogram> <histogram name="Login.ArcContinueBootImpulseTime3" units="ms" - expires_after="2023-09-12"> + expires_after="2023-11-12"> <owner>mhasank@google.com</owner> <owner>arc-core@google.com</owner> <summary> @@ -99,7 +99,7 @@ </histogram> <histogram name="Login.BrowserShutdownTime" units="ms" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>xiyuan@chromium.org</owner> <owner>cros-oac@google.com</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/media/histograms.xml b/tools/metrics/histograms/metadata/media/histograms.xml index a0870c6..9f1c8e3 100644 --- a/tools/metrics/histograms/metadata/media/histograms.xml +++ b/tools/metrics/histograms/metadata/media/histograms.xml
@@ -162,7 +162,7 @@ </histogram> <histogram name="Media.AImageReaderGLOwner.AcquireImageResult" - enum="MediaStatus" expires_after="2023-09-03"> + enum="MediaStatus" expires_after="2023-11-12"> <owner>vikassoni@chromium.org</owner> <owner>media-dev@chromium.org</owner> <summary> @@ -222,7 +222,7 @@ </histogram> <histogram name="Media.Android.MediaPlayerSuccess" enum="MediaPlayerExitStatus" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>tguilbert@chromium.org</owner> <owner>media-dev@chromium.org</owner> <summary>Android: Whether MediaPlayer exited without errors.</summary> @@ -296,7 +296,7 @@ </histogram> <histogram name="Media.Audio.Capture.DetectedMissingCallbacks" - enum="BooleanMissingCallbacks" expires_after="2023-08-27"> + enum="BooleanMissingCallbacks" expires_after="2023-11-12"> <owner>guidou@chromium.org</owner> <owner>olka@chromium.org</owner> <owner>webrtc-audio-uma@google.com</owner> @@ -351,7 +351,7 @@ <histogram name="Media.Audio.Capture.Mac.MicSystemPermission.FixedTime.SinceFirstFailure" - units="ms" expires_after="2023-09-10"> + units="ms" expires_after="2023-11-12"> <owner>toprice@chromium.org</owner> <owner>video-cmi-apis@google.com</owner> <owner>webrtc-audio-uma@google.com</owner> @@ -366,7 +366,7 @@ <histogram name="Media.Audio.Capture.Mac.MicSystemPermission.FixedTime.SinceLastFailure" - units="ms" expires_after="2023-09-10"> + units="ms" expires_after="2023-11-12"> <owner>toprice@chromium.org</owner> <owner>video-cmi-apis@google.com</owner> <owner>webrtc-audio-uma@google.com</owner> @@ -380,7 +380,7 @@ </histogram> <histogram name="Media.Audio.Capture.Mac.MicSystemPermission.Startup" - enum="SystemMediaCapturePermission" expires_after="2023-09-03"> + enum="SystemMediaCapturePermission" expires_after="2023-11-12"> <owner>toprice@chromium.org</owner> <owner>video-cmi-apis@google.com</owner> <owner>webrtc-audio-uma@google.com</owner> @@ -395,7 +395,7 @@ <histogram name="Media.Audio.Capture.Mac.MicSystemPermission.StartupAfterFailure" - enum="SystemMediaCapturePermission" expires_after="2023-09-03"> + enum="SystemMediaCapturePermission" expires_after="2023-11-12"> <owner>toprice@chromium.org</owner> <owner>video-cmi-apis@google.com</owner> <owner>webrtc-audio-uma@google.com</owner> @@ -411,7 +411,7 @@ </histogram> <histogram name="Media.Audio.Capture.Mac.MicSystemPermission.UserMedia" - enum="SystemMediaCapturePermission" expires_after="2023-09-03"> + enum="SystemMediaCapturePermission" expires_after="2023-11-12"> <owner>toprice@chromium.org</owner> <owner>video-cmi-apis@google.com</owner> <owner>webrtc-audio-uma@google.com</owner> @@ -481,7 +481,7 @@ </histogram> <histogram name="Media.Audio.Capture.Win.InitError" enum="Hresult" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>olka@chromium.org</owner> <owner>tommi@chromium.org</owner> <owner>guidou@chromium.org</owner> @@ -664,7 +664,7 @@ </histogram> <histogram name="Media.Audio.OutputDeviceAuthorizationTime" units="ms" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>guidou@chromium.org</owner> <owner>olka@chromium.org</owner> <owner>webrtc-audio-uma@google.com</owner> @@ -951,7 +951,7 @@ </histogram> <histogram name="Media.Audio.Render.GetSourceDataTimeMax.WebRTC" - units="microseconds" expires_after="2023-09-03"> + units="microseconds" expires_after="2023-11-12"> <owner>guidou@chromium.org</owner> <owner>olka@chromium.org</owner> <owner>webrtc-audio-uma@google.com</owner> @@ -1058,7 +1058,7 @@ </histogram> <histogram name="Media.Audio.TabAudioMuted" enum="Boolean" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>evliu@google.com</owner> <owner>chrome-media-ux@google.com</owner> <summary> @@ -1347,7 +1347,7 @@ </histogram> <histogram name="Media.AudioInputDevice.AudioServiceDelay" units="ms" - expires_after="2023-10-22"> + expires_after="2023-11-12"> <owner>fhernqvist@google.com</owner> <owner>olka@chromium.org</owner> <owner>webrtc-audio-uma@google.com</owner> @@ -1886,7 +1886,7 @@ </histogram> <histogram name="Media.Controls.PlaybackSpeed" - enum="MediaControlsPlaybackSpeed" expires_after="2023-08-27"> + enum="MediaControlsPlaybackSpeed" expires_after="2023-11-12"> <owner>steimel@chromium.org</owner> <owner>media-dev@chromium.org</owner> <summary> @@ -2911,7 +2911,7 @@ </histogram> <histogram name="Media.GetDisplayMedia.Constraints.DisplaySurface" - enum="GetDisplayMediaConstraintsDisplaySurface" expires_after="2023-09-10"> + enum="GetDisplayMediaConstraintsDisplaySurface" expires_after="2023-11-12"> <owner>eladalon@chromium.org</owner> <owner>fbeaufort@chromium.org</owner> <summary> @@ -3454,7 +3454,7 @@ </histogram> <histogram name="Media.MediaDevices.EnumerateDevices.Latency" units="ms" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>toprice@chromium.org</owner> <owner>agpalak@chromium.org</owner> <summary> @@ -3466,7 +3466,7 @@ </histogram> <histogram name="Media.MediaDevices.EnumerateDevices.Result" - enum="EnumerateDevicesResult" expires_after="2023-09-03"> + enum="EnumerateDevicesResult" expires_after="2023-11-12"> <owner>toprice@chromium.org</owner> <owner>agpalak@chromium.org</owner> <summary> @@ -3525,7 +3525,7 @@ </histogram> <histogram name="Media.MediaDevices.GetUserMedia.Latency" units="ms" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>toprice@chromium.org</owner> <owner>agpalak@chromium.org</owner> <owner>video-cmi-apis@google.com</owner> @@ -3538,7 +3538,7 @@ </histogram> <histogram name="Media.MediaDevices.GetUserMedia.Result" - enum="UserMediaRequestResult" expires_after="2023-09-03"> + enum="UserMediaRequestResult" expires_after="2023-11-12"> <owner>toprice@chromium.org</owner> <owner>agpalak@chromium.org</owner> <owner>video-cmi-apis@google.com</owner> @@ -3550,7 +3550,7 @@ </histogram> <histogram name="Media.MediaDevicesManager.VideoDeviceEnumeration.Result" - enum="DeviceEnumerationResult" expires_after="2023-09-03"> + enum="DeviceEnumerationResult" expires_after="2023-11-12"> <owner>toprice@chromium.org</owner> <owner>agpalak@chromium.org</owner> <summary> @@ -3716,7 +3716,7 @@ </histogram> <histogram name="Media.MicrophoneMuted" enum="MicrophoneMuteResult" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>henrika@chromium.org</owner> <owner>webrtc-audio@google.com</owner> <summary> @@ -3767,7 +3767,7 @@ </histogram> <histogram name="Media.MojoVideoDecoder.ActiveInstances" units="units" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>sandersd@chromium.org</owner> <owner>media-dev@chromium.org</owner> <summary> @@ -4016,7 +4016,7 @@ </histogram> <histogram name="Media.Notification.Cast.Count" units="count" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>takumif@chromium.org</owner> <owner>openscreen-eng@google.com</owner> <owner>media-dev@chromium.org</owner> @@ -4041,7 +4041,7 @@ <histogram name="Media.Notification.Cast.StartStop" enum="GlobalMediaControlsCastActionAndEntryPoint" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>takumif@chromium.org</owner> <owner>openscreen-eng@google.com</owner> <owner>media-dev@chromium.org</owner> @@ -4052,7 +4052,7 @@ </histogram> <histogram name="Media.Notification.Cast.UserAction" enum="MediaSessionAction" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>takumif@chromium.org</owner> <owner>openscreen-eng@google.com</owner> <owner>media-dev@chromium.org</owner> @@ -4073,7 +4073,7 @@ </histogram> <histogram name="Media.Notification.Count" units="count" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>beccahughes@chromium.org</owner> <owner>media-dev@chromium.org</owner> <summary> @@ -4106,7 +4106,7 @@ </histogram> <histogram name="Media.Notification.UserAction" enum="MediaSessionAction" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>beccahughes@chromium.org</owner> <owner>media-dev@chromium.org</owner> <summary> @@ -4116,7 +4116,7 @@ </histogram> <histogram name="Media.OutputStreamDuration" units="ms" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>guidou@chromium.org</owner> <owner>olka@chromium.org</owner> <owner>webrtc-audio-uma@google.com</owner> @@ -4341,7 +4341,7 @@ </histogram> <histogram name="Media.Remoting.AudioBitrate" units="kbps" - expires_after="2023-09-12"> + expires_after="2023-11-12"> <owner>jophba@chromium.org</owner> <owner>openscreen-eng@google.com</owner> <summary> @@ -4357,7 +4357,7 @@ </histogram> <histogram name="Media.Remoting.AudioCodec" enum="AudioCodec" - expires_after="2023-09-12"> + expires_after="2023-11-12"> <owner>jophba@chromium.org</owner> <owner>openscreen-eng@google.com</owner> <summary>Audio codec used while remoting content.</summary> @@ -4380,7 +4380,7 @@ </histogram> <histogram name="Media.Remoting.Compatibility" enum="RemotingCompatibility" - expires_after="2023-09-12"> + expires_after="2023-11-12"> <owner>takumif@chromium.org</owner> <owner>openscreen-eng@google.com</owner> <summary> @@ -4391,7 +4391,7 @@ </histogram> <histogram name="Media.Remoting.RemotePlaybackEnabledByPage" - enum="BooleanEnabled" expires_after="2023-09-12"> + enum="BooleanEnabled" expires_after="2023-11-12"> <owner>jophba@chromium.org</owner> <owner>openscreen-eng@google.com</owner> <summary> @@ -4402,7 +4402,7 @@ </histogram> <histogram name="Media.Remoting.SessionDuration" units="ms" - expires_after="2023-09-12"> + expires_after="2023-11-12"> <owner>jophba@chromium.org</owner> <owner>openscreen-eng@google.com</owner> <summary>Measures the duration of each remoting session.</summary> @@ -4416,21 +4416,21 @@ </histogram> <histogram name="Media.Remoting.SessionStartTrigger" - enum="RemotingStartTrigger" expires_after="2023-09-12"> + enum="RemotingStartTrigger" expires_after="2023-11-12"> <owner>jophba@chromium.org</owner> <owner>openscreen-eng@google.com</owner> <summary>Tracks the trigger for starting a remoting session.</summary> </histogram> <histogram name="Media.Remoting.SessionStopTrigger" enum="RemotingStopTrigger" - expires_after="2023-09-12"> + expires_after="2023-11-12"> <owner>jophba@chromium.org</owner> <owner>openscreen-eng@google.com</owner> <summary>Tracks the trigger for stopping a remoting session.</summary> </histogram> <histogram name="Media.Remoting.ShortSessionDuration" units="ms" - expires_after="2023-09-12"> + expires_after="2023-11-12"> <owner>jophba@chromium.org</owner> <owner>openscreen-eng@google.com</owner> <summary> @@ -4439,7 +4439,7 @@ </histogram> <histogram name="Media.Remoting.TimeUntilFirstPlayout" units="ms" - expires_after="2023-09-12"> + expires_after="2023-11-12"> <owner>jophba@chromium.org</owner> <owner>openscreen-eng@google.com</owner> <summary> @@ -4449,7 +4449,7 @@ </histogram> <histogram name="Media.Remoting.TimeUntilRemoteInitialized" units="ms" - expires_after="2023-09-12"> + expires_after="2023-11-12"> <owner>jophba@chromium.org</owner> <owner>openscreen-eng@google.com</owner> <summary> @@ -4473,7 +4473,7 @@ </histogram> <histogram name="Media.Remoting.VideoBitrate" units="kbps" - expires_after="2023-09-12"> + expires_after="2023-11-12"> <owner>jophba@chromium.org</owner> <owner>openscreen-eng@google.com</owner> <summary> @@ -4489,7 +4489,7 @@ </histogram> <histogram name="Media.Remoting.VideoCodecProfile" enum="VideoCodecProfile" - expires_after="2023-09-12"> + expires_after="2023-11-12"> <owner>jophba@chromium.org</owner> <owner>openscreen-eng@google.com</owner> <summary>Video codec profile used while remoting content.</summary> @@ -4503,7 +4503,7 @@ </histogram> <histogram name="Media.Remoting.VideoPixelRateSupport" - enum="RemotingVideoPixelRateSupport" expires_after="2023-09-12"> + enum="RemotingVideoPixelRateSupport" expires_after="2023-11-12"> <owner>takumif@chromium.org</owner> <owner>openscreen-eng@google.com</owner> <summary> @@ -4930,7 +4930,7 @@ <histogram name="Media.Ui.GetDisplayMedia.BasicFlow.UserInteraction" enum="MediaUiGetDisplayMediaBasicFlowUserInteraction" - expires_after="2023-09-09"> + expires_after="2023-11-12"> <owner>eladalon@chromium.org</owner> <owner>fbeaufort@chromium.org</owner> <summary> @@ -4941,7 +4941,7 @@ </histogram> <histogram name="Media.Ui.GetDisplayMedia.DisplayCapturePolicyResult" - enum="DisplayCapturePolicyResult" expires_after="2023-09-03"> + enum="DisplayCapturePolicyResult" expires_after="2023-11-12"> <owner>eladalon@chromium.org</owner> <owner>guidou@chromium.org</owner> <summary> @@ -4952,7 +4952,7 @@ <histogram name="Media.Ui.GetDisplayMedia.PreferCurrentTabFlow.UserInteraction" enum="MediaUiGetDisplayMediaPreferCurrentTabFlowUserInteraction" - expires_after="2023-09-09"> + expires_after="2023-11-12"> <owner>eladalon@chromium.org</owner> <owner>fbeaufort@chromium.org</owner> <summary> @@ -5060,7 +5060,7 @@ </histogram> <histogram name="Media.Video.Autoplay" enum="AutoplaySource" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>dalecurtis@chromium.org</owner> <owner>evliu@google.com</owner> <owner>media-dev@chromium.org</owner> @@ -5162,7 +5162,7 @@ </histogram> <histogram name="Media.Video.Capture.Mac.CameraSystemPermission.UserMedia" - enum="SystemMediaCapturePermission" expires_after="2023-09-03"> + enum="SystemMediaCapturePermission" expires_after="2023-11-12"> <owner>toprice@chromium.org</owner> <owner>video-cmi-apis@google.com</owner> <summary> @@ -5188,7 +5188,7 @@ </summary> </histogram> -<histogram name="Media.Video.Roughness" units="ms" expires_after="2023-08-27"> +<histogram name="Media.Video.Roughness" units="ms" expires_after="2023-11-12"> <owner>eugene@chromium.org</owner> <owner>videostack-eng@chromium.org</owner> <summary> @@ -6209,7 +6209,7 @@ </histogram> <histogram name="MediaRouter.Cast.Channel.ConnectResult" enum="BooleanSuccess" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>mfoltz@chromium.org</owner> <owner>openscreen-eng@google.com</owner> <summary> @@ -6219,7 +6219,7 @@ </histogram> <histogram name="MediaRouter.Cast.Channel.Error" - enum="MediaRouterCastChannelError" expires_after="2023-09-03"> + enum="MediaRouterCastChannelError" expires_after="2023-11-12"> <owner>mfoltz@chromium.org</owner> <owner>openscreen-eng@google.com</owner> <summary> @@ -6341,7 +6341,7 @@ </histogram> <histogram name="MediaRouter.CastStreaming.Audio.PlaybackOnReceiver" - enum="Boolean" expires_after="2023-09-10"> + enum="Boolean" expires_after="2023-11-12"> <owner>takumif@chromium.org</owner> <owner>muyaoxu@google.com</owner> <owner>openscreen-eng@google.com</owner> @@ -6370,7 +6370,7 @@ </histogram> <histogram name="MediaRouter.CastStreaming.Session.Length.AccessCode" - units="ms" expires_after="2023-07-23"> + units="ms" expires_after="2023-11-12"> <owner>bzielinski@google.com</owner> <owner>cros-edu-eng@google.com</owner> <summary> @@ -6438,7 +6438,7 @@ </histogram> <histogram name="MediaRouter.CastStreaming.Start.Failure.Native" - enum="MirroringServiceErrorType" expires_after="2023-08-27"> + enum="MirroringServiceErrorType" expires_after="2023-11-12"> <owner>takumif@chromium.org</owner> <owner>openscreen-eng@google.com</owner> <summary> @@ -6449,7 +6449,7 @@ </histogram> <histogram name="MediaRouter.CastStreaming.Start.Success" enum="MirrorType" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>takumif@chromium.org</owner> <owner>openscreen-eng@google.com</owner> <summary> @@ -6459,7 +6459,7 @@ </histogram> <histogram name="MediaRouter.CastStreaming.Start.Success.AccessCodeManualEntry" - enum="MirrorType" expires_after="2023-07-23"> + enum="MirrorType" expires_after="2023-11-12"> <owner>bzielinski@google.com</owner> <owner>cros-edu-eng@google.com</owner> <summary> @@ -6493,7 +6493,7 @@ </histogram> <histogram name="MediaRouter.Dial.CreateRoute" - enum="MediaRouterDialCreateRouteResult" expires_after="2023-08-20"> + enum="MediaRouterDialCreateRouteResult" expires_after="2023-11-12"> <owner>takumif@chromium.org</owner> <owner>mfoltz@chromium.org</owner> <owner>openscreen-eng@google.com</owner> @@ -6560,7 +6560,7 @@ </histogram> <histogram name="MediaRouter.MirroringService.SessionError" - enum="MirroringServiceErrorType" expires_after="2023-09-10"> + enum="MirroringServiceErrorType" expires_after="2023-11-12"> <owner>takumif@chromium.org</owner> <owner>openscreen-eng@google.com</owner> <summary> @@ -6717,7 +6717,7 @@ </histogram> <histogram name="MediaRouter.Sink.SelectedType" enum="MediaSinkType" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>takumif@chromium.org</owner> <owner>openscreen-eng@google.com</owner> <summary> @@ -6742,7 +6742,7 @@ </histogram> <histogram name="MediaRouter.Source.CastingSource" - enum="MediaRouterSourceTypes" expires_after="2023-09-10"> + enum="MediaRouterSourceTypes" expires_after="2023-11-12"> <owner>takumif@chromium.org</owner> <owner>openscreen-eng@google.com</owner> <summary> @@ -6752,7 +6752,7 @@ </histogram> <histogram name="MediaRouter.Ui.Action.CloseLatency" units="ms" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>takumif@chromium.org</owner> <owner>openscreen-eng@google.com</owner> <summary> @@ -6763,7 +6763,7 @@ </histogram> <histogram name="MediaRouter.Ui.Action.StartLocal.Latency" units="ms" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>takumif@chromium.org</owner> <owner>openscreen-eng@google.com</owner> <summary> @@ -6774,14 +6774,14 @@ </histogram> <histogram name="MediaRouter.Ui.Action.StartLocalPosition" - enum="MediaRouterSinkPositionLabel" expires_after="2023-09-03"> + enum="MediaRouterSinkPositionLabel" expires_after="2023-11-12"> <owner>takumif@chromium.org</owner> <owner>openscreen-eng@google.com</owner> <summary>The index of the sink that was selected in the sink list.</summary> </histogram> <histogram name="MediaRouter.Ui.Action.StopRoute" enum="MediaRouteType" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>takumif@chromium.org</owner> <owner>openscreen-eng@google.com</owner> <summary>The number of times a user stops different types of routes.</summary> @@ -6824,7 +6824,7 @@ <histogram name="MediaRouter.Ui.Dialog.ActivationLocationAndCastMode" enum="MediaRouterDialogActivationLocationAndCastMode" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>takumif@chromium.org</owner> <owner>openscreen-eng@google.com</owner> <summary> @@ -6834,7 +6834,7 @@ </histogram> <histogram name="MediaRouter.Ui.Dialog.IconStateAtOpen" - enum="MediaRouterIconState" expires_after="2023-09-03"> + enum="MediaRouterIconState" expires_after="2023-11-12"> <owner>takumif@chromium.org</owner> <owner>openscreen-eng@google.com</owner> <summary> @@ -6854,7 +6854,7 @@ </histogram> <histogram name="MediaRouter.Ui.Dialog.Paint" units="ms" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>takumif@chromium.org</owner> <owner>openscreen-eng@google.com</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/memory/histograms.xml b/tools/metrics/histograms/metadata/memory/histograms.xml index 8bb27d09..0fa0320 100644 --- a/tools/metrics/histograms/metadata/memory/histograms.xml +++ b/tools/metrics/histograms/metadata/memory/histograms.xml
@@ -70,7 +70,7 @@ </variants> <histogram name="HeapProfiling.AndroidStackUnwinder" - enum="AndroidStackUnwinder" expires_after="2023-09-10"> + enum="AndroidStackUnwinder" expires_after="2023-11-12"> <owner>joenotcharles@google.com</owner> <owner>chrome-memory@google.com</owner> <summary> @@ -1840,7 +1840,7 @@ </histogram> <histogram name="Memory.ParkableString.Compression.Latency" - units="microseconds" expires_after="2023-09-03"> + units="microseconds" expires_after="2023-11-12"> <owner>lizeb@chromium.org</owner> <owner>thiabaud@google.com</owner> <summary> @@ -2119,7 +2119,7 @@ </histogram> <histogram name="Memory.PartitionAlloc.PeriodicPurge" units="microseconds" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>lizeb@chromium.org</owner> <owner>bartekn@chromium.org</owner> <summary> @@ -2189,7 +2189,7 @@ </histogram> <histogram base="true" name="Memory.PressureWindowDuration" units="ms" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <!-- Name completed by histogram_suffixes name="Memory.Pressure.TransitionType" --> <owner>fdoray@chromium.org</owner> @@ -2449,7 +2449,7 @@ </histogram> <histogram name="Memory.System.AvailableMB" units="MB" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>fdoray@chromium.org</owner> <owner>catan-team@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/mobile/histograms.xml b/tools/metrics/histograms/metadata/mobile/histograms.xml index 22e17116..7bc0c703f 100644 --- a/tools/metrics/histograms/metadata/mobile/histograms.xml +++ b/tools/metrics/histograms/metadata/mobile/histograms.xml
@@ -61,7 +61,7 @@ </histogram> <histogram name="Mobile.AppMenu.TimeToTakeAction.SelectedItem" units="ms" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>gangwu@chromium.org</owner> <owner>twellington@chromium.org</owner> <summary> @@ -415,7 +415,7 @@ </histogram> <histogram name="Mobile.Share.EntryPoints" enum="IOSActivityScenario" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>ellyjones@chromium.org</owner> <owner>bling-team@google.com</owner> <owner>chrome-with-friends-robots@google.com</owner> @@ -797,7 +797,7 @@ </histogram> <histogram name="MobileFre.ChildAccountStatusDuration" units="ms" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>skym@chromium.org</owner> <owner>wenyufu@chromium.org</owner> <summary> @@ -893,7 +893,7 @@ </histogram> <histogram name="MobileFre.NativeInitialized" units="ms" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>skym@chromium.org</owner> <owner>wenyufu@chromium.org</owner> <summary> @@ -1242,7 +1242,7 @@ </histogram> <histogram name="MobileStartup.DailyLaunchCount" units="units" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>tedchoc@chromium.org</owner> <owner>twellington@chromium.org</owner> <summary> @@ -1287,7 +1287,7 @@ </histogram> <histogram name="MobileStartup.LaunchCause" enum="LaunchCause" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>mthiesse@chromium.org</owner> <owner>tedchoc@chromium.org</owner> <owner>yfriedman@chromium.org</owner>
diff --git a/tools/metrics/histograms/metadata/navigation/histograms.xml b/tools/metrics/histograms/metadata/navigation/histograms.xml index 02865dd..2b62c1e 100644 --- a/tools/metrics/histograms/metadata/navigation/histograms.xml +++ b/tools/metrics/histograms/metadata/navigation/histograms.xml
@@ -432,7 +432,7 @@ </histogram> <histogram name="BackForwardCache.Restore.NavigationToFirstPaint" units="ms" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>sreejakshetty@chromium.org</owner> <owner>altimin@chromium.org</owner> <owner>bfcache-dev@chromium.org</owner> @@ -881,7 +881,7 @@ </histogram> <histogram name="Navigation.MainFrameHasRTLDomain2" enum="Boolean" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>cthomp@chromium.org</owner> <owner>trusty-transport@chromium.org</owner> <summary> @@ -892,7 +892,7 @@ </histogram> <histogram name="Navigation.MainFrameHasRTLDomainDifferentPage2" enum="Boolean" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>cthomp@chromium.org</owner> <owner>trusty-transport@chromium.org</owner> <summary> @@ -905,7 +905,7 @@ </histogram> <histogram name="Navigation.MainFrameProfileType2" enum="BrowserProfileType" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>rhalavati@chromium.org</owner> <owner>chrome-privacy-core@google.com</owner> <summary> @@ -1048,7 +1048,7 @@ </histogram> <histogram name="Navigation.OriginAgentCluster.Result" - enum="OriginAgentClusterEndResult" expires_after="2023-09-09"> + enum="OriginAgentClusterEndResult" expires_after="2023-11-12"> <owner>alexmos@chromium.org</owner> <owner>creis@chromium.org</owner> <owner>wjmaclean@chromium.org</owner> @@ -1310,7 +1310,7 @@ </histogram> <histogram name="Navigation.StartToCommit" units="ms" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>nasko@chromium.org</owner> <owner>csharrison@chromium.org</owner> <summary> @@ -1378,7 +1378,7 @@ </histogram> <histogram name="Navigation.TimeToReadyToCommit2" units="ms" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>clamy@chromium.org</owner> <owner>nasko@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/net/histograms.xml b/tools/metrics/histograms/metadata/net/histograms.xml index 60da652..b33c79b 100644 --- a/tools/metrics/histograms/metadata/net/histograms.xml +++ b/tools/metrics/histograms/metadata/net/histograms.xml
@@ -288,7 +288,7 @@ </histogram> <histogram name="HttpCache.Pattern" enum="HttpCachePattern" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>morlovich@chromium.org</owner> <owner>jkarlin@chromium.org</owner> <summary>For each http cache transaction, the recorded pattern.</summary> @@ -306,7 +306,7 @@ </histogram> <histogram name="HttpCache.PrefetchReuseState" enum="PrefetchReuseState" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>nrosenthal@chromium.org</owner> <owner>src/net/OWNERS</owner> <summary> @@ -341,7 +341,7 @@ </histogram> <histogram name="HttpCache.TotalDiskCacheTimePerTransaction.{AccessType}" - units="ms" expires_after="2023-06-28"> + units="ms" expires_after="2023-11-16"> <owner>bashi@chromium.org</owner> <owner>blink-network-stack@google.com</owner> <summary> @@ -799,7 +799,7 @@ </histogram> <histogram name="Net.DNS.DnsConfig.AdditionalDnsQueryTypesEnabled" - enum="BooleanEnabled" expires_after="2023-08-27"> + enum="BooleanEnabled" expires_after="2023-11-12"> <owner>horo@chromium.org</owner> <owner>src/net/OWNERS</owner> <summary> @@ -834,7 +834,7 @@ </histogram> <histogram name="Net.DNS.DnsConfig.Nsswitch.HostsFound" enum="BooleanFound" - expires_after="2023-09-07"> + expires_after="2023-11-12"> <owner>horo@chromium.org</owner> <owner>src/net/OWNERS</owner> <summary> @@ -898,7 +898,7 @@ </histogram> <histogram name="Net.DNS.DnsConfig.Resolv.Compatible" enum="BooleanValid" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>horo@chromium.org</owner> <owner>src/net/OWNERS</owner> <summary> @@ -953,7 +953,7 @@ </histogram> <histogram name="Net.DNS.DnsConfig.Windows.Compatibility" - enum="DNS.WindowsCompatibility" expires_after="2023-08-27"> + enum="DNS.WindowsCompatibility" expires_after="2023-11-12"> <owner>horo@chromium.org</owner> <owner>src/net/OWNERS</owner> <summary> @@ -1006,7 +1006,7 @@ </histogram> <histogram name="Net.DNS.DnsTask.AdditionalHttps.Unsolicited" - enum="UnsolicitedHttpsRecordStatus" expires_after="2023-08-27"> + enum="UnsolicitedHttpsRecordStatus" expires_after="2023-11-12"> <owner>awillia@chromium.org</owner> <owner>doh-core@google.com</owner> <summary> @@ -1029,7 +1029,7 @@ </histogram> <histogram name="Net.DNS.DnsTask.SuccessTime" units="ms" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>horo@chromium.org</owner> <owner>src/net/OWNERS</owner> <summary> @@ -1040,7 +1040,7 @@ </histogram> <histogram name="Net.DNS.DnsTask.SvcbHttpsTransactionError" - enum="DNS.SvcbHttpsTransactionError" expires_after="2023-09-10"> + enum="DNS.SvcbHttpsTransactionError" expires_after="2023-11-12"> <owner>horo@chromium.org</owner> <owner>src/net/OWNERS</owner> <summary> @@ -1051,7 +1051,7 @@ </histogram> <histogram name="Net.DNS.DnsTransaction.AttemptType" enum="DNS.AttemptType" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>horo@chromium.org</owner> <owner>src/net/OWNERS</owner> <summary> @@ -1642,7 +1642,7 @@ </histogram> <histogram name="Net.DNS.UpgradeConfig.Ineligible.DohSpecified" enum="Boolean" - expires_after="2023-09-07"> + expires_after="2023-11-12"> <owner>horo@chromium.org</owner> <owner>doh-core@google.com</owner> <summary> @@ -1756,7 +1756,7 @@ </histogram> <histogram name="Net.ErrorPageCounts" enum="NetErrorPageEvents" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>edwardjung@chromium.org</owner> <owner>src/net/OWNERS</owner> <summary> @@ -1811,7 +1811,7 @@ </histogram> <histogram name="Net.Fetch.CheckPoint.BodyConsumerBase" - enum="BodyConsumerBaseFetchCheckPoint" expires_after="2023-09-01"> + enum="BodyConsumerBaseFetchCheckPoint" expires_after="2023-11-12"> <owner>yyanagisawa@chromium.org</owner> <owner>chrome-loading@google.com</owner> <summary> @@ -1913,7 +1913,7 @@ </histogram> <histogram name="Net.HttpJob.MainJobWaitTimeWithAvailableSpdySession" - units="ms" expires_after="2023-08-27"> + units="ms" expires_after="2023-11-12"> <owner>fayang@chromium.org</owner> <owner>src/net/quic/OWNERS</owner> <summary> @@ -1923,7 +1923,7 @@ </histogram> <histogram name="Net.HttpJob.MainJobWaitTimeWithoutAvailableSpdySession" - units="ms" expires_after="2023-08-27"> + units="ms" expires_after="2023-11-12"> <owner>fayang@chromium.org</owner> <owner>src/net/quic/OWNERS</owner> <summary> @@ -1988,7 +1988,7 @@ </histogram> <histogram name="Net.HttpJob.TotalTime.TLS13.Google" units="ms" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>davidben@chromium.org</owner> <owner>trusty-transport@chromium.org</owner> <summary> @@ -2118,7 +2118,7 @@ </histogram> <histogram name="Net.HttpTimeToFirstByte.TLS13.Google" units="ms" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>davidben@chromium.org</owner> <owner>trusty-transport@chromium.org</owner> <summary> @@ -2153,7 +2153,7 @@ </histogram> <histogram name="Net.NetworkChangeNotifier.NewConnectionCost" - enum="NetworkConnectionCost" expires_after="2023-09-03"> + enum="NetworkConnectionCost" expires_after="2023-11-12"> <owner>fbeaufort@chromium.org</owner> <owner>src/net/OWNERS</owner> <summary> @@ -2163,7 +2163,7 @@ </histogram> <histogram name="Net.NetworkChangeNotifier.NewConnectionType" - enum="NetworkConnectionType" expires_after="2023-09-03"> + enum="NetworkConnectionType" expires_after="2023-11-12"> <owner>dschinazi@chromium.org</owner> <owner>src/net/OWNERS</owner> <summary> @@ -2374,7 +2374,7 @@ </histogram> <histogram name="Net.QuicConnectivityMonitor.NumActiveDegradingSessions" - units="sessions" expires_after="2023-09-03"> + units="sessions" expires_after="2023-11-12"> <owner>dschinazi@chromium.org</owner> <owner>src/net/quic/OWNERS</owner> <summary> @@ -2608,6 +2608,10 @@ <histogram name="Net.QuicMultiPort.NumDefaultPathDegrading" units="times" expires_after="2023-10-22"> + <obsolete> + Replaced by Net.QuicSession.NumDefaultPathDegrading in May 2023, as + num_path_degrading is no longer specific to the multi-port feature. + </obsolete> <owner>renjietang@chromium.org</owner> <owner>src/net/quic/OWNERS</owner> <summary> @@ -3630,6 +3634,16 @@ </summary> </histogram> +<histogram name="Net.QuicSession.NumDefaultPathDegrading" units="times" + expires_after="2023-10-22"> + <owner>renjietang@chromium.org</owner> + <owner>src/net/quic/OWNERS</owner> + <summary> + The number of time that a session which has multi-port enabled enters + path-degrading state on the default path. + </summary> +</histogram> + <histogram name="Net.QuicSession.NumMigrations" units="units" expires_after="2023-09-17"> <owner>renjietang@chromium.org</owner> @@ -4412,7 +4426,7 @@ </histogram> <histogram name="Net.QuicSession.WriteError" enum="NetErrorCodes" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>dschinazi@chromium.org</owner> <owner>src/net/quic/OWNERS</owner> <summary> @@ -4484,7 +4498,7 @@ </histogram> <histogram name="Net.QuicSession.ZeroRttState" enum="ZeroRttState" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>renjietang@chromium.org</owner> <owner>src/net/quic/OWNERS</owner> <summary>Whether 0-RTT was successfully used in the connection.</summary> @@ -4751,7 +4765,7 @@ </histogram> <histogram name="Net.RestrictedCookieManager.TopFrameOriginOK" - enum="BooleanMatched" expires_after="2023-09-10"> + enum="BooleanMatched" expires_after="2023-11-12"> <owner>morlovich@chromium.org</owner> <owner>src/net/cookies/OWNERS</owner> <summary> @@ -4791,7 +4805,7 @@ </histogram> <histogram name="Net.SpdyHeadersCompressionPercentage" units="%" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>dschinazi@chromium.org</owner> <owner>src/net/OWNERS</owner> <summary> @@ -4868,7 +4882,7 @@ </histogram> <histogram name="Net.SpdySession.AlpsDecoderStatus.Bypassed" - enum="AlpsDecoderError" expires_after="2023-09-11"> + enum="AlpsDecoderError" expires_after="2023-11-12"> <owner>arichiv@chromium.org</owner> <owner>src/net/OWNERS</owner> <summary> @@ -4932,7 +4946,7 @@ </histogram> <histogram name="Net.SpdySession.ServerSupportsWebSocket" enum="Boolean" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>dschinazi@chromium.org</owner> <owner>src/net/OWNERS</owner> <summary> @@ -4961,7 +4975,7 @@ </histogram> <histogram name="Net.SpdySessionGet" enum="SpdySessionGet" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>dschinazi@chromium.org</owner> <owner>src/net/OWNERS</owner> <summary>The type of SPDY Session used when looking up a session.</summary> @@ -5010,7 +5024,7 @@ </histogram> <histogram name="Net.SSL.ECHResult" enum="SSLECHResult" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>davidben@chromium.org</owner> <owner>trusty-transport@chromium.org</owner> <summary> @@ -5043,7 +5057,7 @@ </histogram> <histogram name="Net.SSL_Connection_Error_ECH" enum="NetErrorCodes" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>davidben@chromium.org</owner> <owner>trusty-transport@chromium.org</owner> <summary> @@ -5062,7 +5076,7 @@ </histogram> <histogram name="Net.SSL_Connection_Latency_ECH" units="ms" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>davidben@chromium.org</owner> <owner>trusty-transport@chromium.org</owner> <summary> @@ -5098,7 +5112,7 @@ </histogram> <histogram name="Net.SSLClientCertSignatureAlgorithm" - enum="SSLSignatureAlgorithm" expires_after="2023-09-10"> + enum="SSLSignatureAlgorithm" expires_after="2023-11-12"> <owner>davidben@chromium.org</owner> <owner>src/net/OWNERS</owner> <summary> @@ -5108,7 +5122,7 @@ </histogram> <histogram name="Net.SSLHandshakeDetails" enum="SSLHandshakeDetails" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>davidben@chromium.org</owner> <owner>src/net/OWNERS</owner> <summary> @@ -5145,7 +5159,7 @@ </histogram> <histogram name="Net.SSLKeyLogFileUse" enum="SSLKeyLogFileAction" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>cthomp@chromium.org</owner> <owner>trusty-transport@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/network/histograms.xml b/tools/metrics/histograms/metadata/network/histograms.xml index 78df7fd2..1809c493 100644 --- a/tools/metrics/histograms/metadata/network/histograms.xml +++ b/tools/metrics/histograms/metadata/network/histograms.xml
@@ -558,7 +558,7 @@ </histogram> <histogram name="Network.CacheTransparency.CacheNotUsed" - enum="CacheTransparencyCacheNotUsedReason" expires_after="2023-09-10"> + enum="CacheTransparencyCacheNotUsedReason" expires_after="2023-11-12"> <owner>nidhijaju@chromium.org</owner> <owner>ricea@chromium.org</owner> <summary> @@ -1449,7 +1449,7 @@ </histogram> <histogram name="Network.DnsProxy.DnsOverHttpsMode" - enum="DnsProxy.DnsOverHttpsMode" expires_after="2023-09-10"> + enum="DnsProxy.DnsOverHttpsMode" expires_after="2023-11-12"> <owner>garrick@chromium.org</owner> <owner>cros-network-metrics@google.com</owner> <summary> @@ -1469,7 +1469,7 @@ </histogram> <histogram name="Network.DnsProxy.NameserverTypes" - enum="DnsProxy.NameserverType" expires_after="2023-09-10"> + enum="DnsProxy.NameserverType" expires_after="2023-11-12"> <owner>garrick@chromium.org</owner> <owner>cros-network-metrics@google.com</owner> <summary> @@ -1937,7 +1937,7 @@ </histogram> <histogram name="Network.Shill.Cellular.DevicePresenceStatus" - enum="BooleanPresent" expires_after="2023-09-10"> + enum="BooleanPresent" expires_after="2023-11-12"> <owner>ejcaruso@chromium.org</owner> <owner>cros-network-metrics@google.com</owner> <summary> @@ -2150,7 +2150,7 @@ </histogram> <histogram name="Network.Shill.ConnectionDiagnosticsIssue" - enum="ConnectionDiagnosticsIssue" expires_after="2023-09-10"> + enum="ConnectionDiagnosticsIssue" expires_after="2023-11-12"> <owner>hugobenichi@google.com</owner> <owner>cros-network-metrics@google.com</owner> <summary> @@ -2208,7 +2208,7 @@ </histogram> <histogram name="Network.Shill.Ethernet.DevicePresenceStatus" - enum="BooleanPresent" expires_after="2023-09-10"> + enum="BooleanPresent" expires_after="2023-11-12"> <owner>hugobenichi@google.com</owner> <owner>cros-network-metrics@google.com</owner> <summary> @@ -2257,7 +2257,7 @@ </histogram> <histogram name="Network.Shill.Ethernet.PortalResult" - enum="NetworkPortalResult" expires_after="2023-09-10"> + enum="NetworkPortalResult" expires_after="2023-11-12"> <owner>hugobenichi@google.com</owner> <owner>cros-network-metrics@google.com</owner> <summary> @@ -2305,7 +2305,7 @@ </histogram> <histogram name="Network.Shill.Ethernet.TimeToInitialize" units="ms" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>hugobenichi@google.com</owner> <owner>cros-network-metrics@google.com</owner> <summary> @@ -2317,7 +2317,7 @@ </histogram> <histogram name="Network.Shill.Ethernet.TimeToOnline" units="ms" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>hugobenichi@google.com</owner> <owner>cros-network-metrics@google.com</owner> <summary> @@ -2329,7 +2329,7 @@ </histogram> <histogram name="Network.Shill.Ethernet.TimeToPortal" units="ms" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>hugobenichi@google.com</owner> <owner>cros-network-metrics@google.com</owner> <summary> @@ -2572,7 +2572,7 @@ </histogram> <histogram name="Network.Shill.Vpn.Driver" enum="VPNDriver" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>jiejiang@chromium.org</owner> <owner>cros-network-metrics@google.com</owner> <summary> @@ -2677,7 +2677,7 @@ </histogram> <histogram name="Network.Shill.Vpn.TimeToOnline" units="ms" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>jiejiang@chromium.org</owner> <owner>cros-network-metrics@google.com</owner> <summary> @@ -2930,7 +2930,7 @@ </histogram> <histogram name="Network.Shill.WiFi.AuthFailureType" enum="WiFiStatusCode" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>norvez@chromium.org</owner> <owner>cros-network-metrics@google.com</owner> <summary> @@ -3142,7 +3142,7 @@ </histogram> <histogram name="Network.Shill.WiFi.HiddenSSIDNetworkCount" units="units" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>tnagel@chromium.org</owner> <owner>cros-network-metrics@google.com</owner> <owner>cros-privacy-core@google.com</owner> @@ -3157,7 +3157,7 @@ </histogram> <histogram name="Network.Shill.WiFi.HS20Support" enum="HotspotSupport" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>kglund@google.com</owner> <owner>cros-network-metrics@google.com</owner> <summary> @@ -3169,7 +3169,7 @@ </histogram> <histogram name="Network.Shill.Wifi.IPv6ConnectivityStatus" - enum="IPv6ConnectivityStatus" expires_after="2023-09-10"> + enum="IPv6ConnectivityStatus" expires_after="2023-11-12"> <owner>norvez@chromium.org</owner> <owner>cros-network-metrics@google.com</owner> <summary> @@ -3190,7 +3190,7 @@ </histogram> <histogram name="Network.Shill.Wifi.NeighborLinkMonitorFailure" - enum="NeighborLinkMonitorFailureType" expires_after="2023-09-10"> + enum="NeighborLinkMonitorFailureType" expires_after="2023-11-12"> <owner>jiejiang@chromium.org</owner> <owner>cros-network-metrics@google.com</owner> <summary> @@ -3325,7 +3325,7 @@ </histogram> <histogram base="true" name="Network.Shill.WiFi.RoamComplete" - enum="WiFiRoamComplete" expires_after="2023-08-20"> + enum="WiFiRoamComplete" expires_after="2023-11-12"> <!-- Name completed by histogram_suffixes name="RoamSecurityType" --> <owner>matthewmwang@chromium.org</owner> @@ -3471,7 +3471,7 @@ </histogram> <histogram name="Network.Shill.WiFi.TimeFromRekeyToFailureSeconds" - units="seconds" expires_after="2023-09-03"> + units="seconds" expires_after="2023-11-12"> <owner>billyzhao@chromium.org</owner> <owner>cros-network-metrics@google.com</owner> <summary> @@ -3624,7 +3624,7 @@ </histogram> <histogram name="Network.Shill.WiFi.UserInitiatedConnectionFailureReason" - enum="ConnectionFailureReason" expires_after="2023-09-10"> + enum="ConnectionFailureReason" expires_after="2023-11-12"> <owner>norvez@chromium.org</owner> <owner>cros-network-metrics@google.com</owner> <summary> @@ -3860,7 +3860,7 @@ </histogram> <histogram name="NetworkService.DeletedOldCacheData" enum="Boolean" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>wfh@chromium.org</owner> <owner>mmenke@chromium.org</owner> <summary> @@ -3872,7 +3872,7 @@ </histogram> <histogram name="NetworkService.GrantSandboxResult" - enum="NetworkServiceSandboxGrantResult" expires_after="2023-09-03"> + enum="NetworkServiceSandboxGrantResult" expires_after="2023-11-12"> <owner>wfh@chromium.org</owner> <owner>mmenke@chromium.org</owner> <summary> @@ -4000,7 +4000,7 @@ </histogram> <histogram name="NetworkService.TimeToMigrateData" units="ms" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>wfh@chromium.org</owner> <owner>mmenke@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/new_tab_page/histograms.xml b/tools/metrics/histograms/metadata/new_tab_page/histograms.xml index cbe57b06..3465b66 100644 --- a/tools/metrics/histograms/metadata/new_tab_page/histograms.xml +++ b/tools/metrics/histograms/metadata/new_tab_page/histograms.xml
@@ -115,7 +115,7 @@ </histogram> <histogram name="NewTabPage.Carts.CartImageCount" units="count" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>yuezhanggg@chromium.org</owner> <owner>chrome-shopping@google.com</owner> <summary> @@ -153,7 +153,7 @@ </histogram> <histogram name="NewTabPage.Carts.DataRequest" enum="CartDiscountDataType" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>meiliang@chromium.org</owner> <owner>yuezhanggg@chromium.org</owner> <owner>chrome-shopping@google.com</owner> @@ -267,7 +267,7 @@ </histogram> <histogram name="NewTabPage.Carts.DiscountCountAtLoad" units="count" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>meiliang@chromium.org</owner> <owner>yuezhanggg@chromium.org</owner> <owner>chrome-shopping@google.com</owner> @@ -281,7 +281,7 @@ </histogram> <histogram name="NewTabPage.Carts.NonDiscountCountAtLoad" units="count" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>meiliang@chromium.org</owner> <owner>yuezhanggg@chromium.org</owner> <owner>chrome-shopping@google.com</owner> @@ -293,7 +293,7 @@ </summary> </histogram> -<histogram name="NewTabPage.Click" enum="NTPElement" expires_after="2023-08-27"> +<histogram name="NewTabPage.Click" enum="NTPElement" expires_after="2023-11-12"> <owner>tiborg@chromium.org</owner> <owner>yyushkina@chromium.org</owner> <owner>chrome-desktop-ntp@google.com</owner> @@ -306,7 +306,7 @@ </histogram> <histogram name="NewTabPage.Collections.IdOnLoad" enum="NTPCollectionId" - expires_after="2023-08-30"> + expires_after="2023-11-12"> <owner>danpeng@google.com</owner> <owner>pauladedeji@chromium.org</owner> <owner>chrome-desktop-ntp@google.com</owner> @@ -629,7 +629,7 @@ </histogram> <histogram name="NewTabPage.Drive.FileClick" units="index" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>tiborg@chromium.org</owner> <owner>aee@chromium.org</owner> <owner>andrevincent@google.com</owner> @@ -885,7 +885,7 @@ </histogram> <histogram name="NewTabPage.Lens.UploadDialog.DialogAction" - enum="NewTabPageLensUploadDialogActions" expires_after="2023-09-10"> + enum="NewTabPageLensUploadDialogActions" expires_after="2023-11-12"> <owner>nguyenbryan@google.com</owner> <owner>yowakita@google.com</owner> <owner>bbonnet@google.com</owner> @@ -942,7 +942,7 @@ </histogram> <histogram name="NewTabPage.LogoDownloadOutcome" - enum="NewTabPageLogoDownloadOutcome" expires_after="2023-09-03"> + enum="NewTabPageLogoDownloadOutcome" expires_after="2023-11-12"> <owner>tiborg@chromium.org</owner> <owner>danpeng@google.com</owner> <owner>chrome-desktop-ntp@google.com</owner> @@ -966,7 +966,7 @@ </histogram> <histogram name="NewTabPage.LogoImageDownloaded" enum="BooleanFromHTTPCache" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>tiborg@chromium.org</owner> <owner>danpeng@google.com</owner> <owner>chrome-desktop-ntp@google.com</owner> @@ -977,7 +977,7 @@ </histogram> <histogram name="NewTabPage.LogoShown" enum="NewTabPageLogoShown" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>tiborg@chromium.org</owner> <owner>danpeng@google.com</owner> <owner>chrome-desktop-ntp@google.com</owner> @@ -989,7 +989,7 @@ </histogram> <histogram name="NewTabPage.LogoShownTime2" units="ms" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>tiborg@chromium.org</owner> <owner>danpeng@google.com</owner> <owner>chrome-desktop-ntp@google.com</owner> @@ -1000,7 +1000,7 @@ </histogram> <histogram name="NewTabPage.MainUi.ShownTime" units="ms" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>tiborg@chromium.org</owner> <owner>chrome-desktop-ntp@google.com</owner> <summary> @@ -1024,7 +1024,7 @@ </histogram> <histogram name="NewTabPage.Module.Click" enum="ModuleTypeOnStartAndNTP" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>hanxi@chromium.org</owner> <owner>xinyiji@chromium.org</owner> <summary> @@ -1201,7 +1201,7 @@ </histogram> <histogram name="NewTabPage.Modules.Hover" enum="NtpModules" - expires_after="2023-09-01"> + expires_after="2023-11-12"> <owner>danpeng@google.com</owner> <owner>tiborg@chromium.org</owner> <owner>chrome-desktop-ntp@google.com</owner> @@ -1249,7 +1249,7 @@ </histogram> <histogram name="NewTabPage.Modules.InfoButtonClicked" enum="NtpModules" - expires_after="2023-09-01"> + expires_after="2023-11-12"> <owner>danpeng@google.com</owner> <owner>pauladedeji@chromium.org</owner> <owner>chrome-desktop-ntp@google.com</owner> @@ -1284,7 +1284,7 @@ </histogram> <histogram name="NewTabPage.Modules.LoadedModulesCount" units="count" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>danpeng@google.com</owner> <owner>tiborg@chromium.org</owner> <owner>chrome-desktop-ntp@google.com</owner> @@ -1440,7 +1440,7 @@ </histogram> <histogram name="NewTabPage.OneGoogleBar.ShownTime" units="ms" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>danpeng@google.com</owner> <owner>tiborg@chromium.org</owner> <owner>yyushkina@chromium.org</owner> @@ -1791,7 +1791,7 @@ </histogram> <histogram name="NewTabPage.SuggestionsImpression" enum="MostVisitedTileIndex" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>tiborg@chromium.org</owner> <owner>yyushkina@chromium.org</owner> <owner>chrome-desktop-ntp@google.com</owner> @@ -1856,7 +1856,7 @@ </histogram> <histogram name="NewTabPage.TileTitle" enum="NTPTileTitleSource" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>tiborg@chromium.org</owner> <owner>yyushkina@chromium.org</owner> <owner>chrome-desktop-ntp@google.com</owner> @@ -1878,7 +1878,7 @@ </histogram> <histogram name="NewTabPage.TileType" enum="NTPTileVisualType" - expires_after="2023-09-01"> + expires_after="2023-11-12"> <owner>danpeng@google.com</owner> <owner>tiborg@chromium.org</owner> <owner>yyushkina@chromium.org</owner> @@ -1891,7 +1891,7 @@ </histogram> <histogram name="NewTabPage.TileTypeClicked" enum="NTPTileVisualType" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>danpeng@google.com</owner> <owner>tiborg@chromium.org</owner> <owner>yyushkina@chromium.org</owner> @@ -1983,7 +1983,7 @@ </histogram> <histogram name="NewTabPage.VoiceActions" enum="NewTabPageVoiceAction" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>tiborg@chromium.org</owner> <owner>yyushkina@chromium.org</owner> <owner>chrome-desktop-ntp@google.com</owner>
diff --git a/tools/metrics/histograms/metadata/notifications/histograms.xml b/tools/metrics/histograms/metadata/notifications/histograms.xml index d1f3d61e..5eab1304 100644 --- a/tools/metrics/histograms/metadata/notifications/histograms.xml +++ b/tools/metrics/histograms/metadata/notifications/histograms.xml
@@ -104,7 +104,7 @@ </histogram> <histogram name="Notifications.Android.Build" enum="BooleanSuccess" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>peter@chromium.org</owner> <owner>knollr@chromium.org</owner> <summary> @@ -158,7 +158,7 @@ </histogram> <histogram name="Notifications.Blocker.ScreenCapture.ClosedCount" - units="notifications" expires_after="2023-09-10"> + units="notifications" expires_after="2023-11-12"> <owner>knollr@chromium.org</owner> <owner>peter@chromium.org</owner> <summary> @@ -230,7 +230,7 @@ </histogram> <histogram name="Notifications.Blocker.ScreenCapture.SessionDuration" - units="ms" expires_after="2023-09-10"> + units="ms" expires_after="2023-11-12"> <owner>knollr@chromium.org</owner> <owner>peter@chromium.org</owner> <summary> @@ -508,7 +508,7 @@ </histogram> <histogram name="Notifications.NonPersistentNotificationThirdPartyCount" - enum="Boolean" expires_after="2023-09-01"> + enum="Boolean" expires_after="2023-11-12"> <owner>awillia@chromium.org</owner> <owner>peter@chromium.org</owner> <summary> @@ -520,7 +520,7 @@ </histogram> <histogram name="Notifications.NotificationHelper.ComServerModuleStatus" - enum="NotificationHelperComServerModuleStatus" expires_after="2023-09-01"> + enum="NotificationHelperComServerModuleStatus" expires_after="2023-11-12"> <owner>finnur@chromium.org</owner> <summary> The execute status of a ComServerModule class instance. Logged whenever a @@ -569,7 +569,7 @@ </histogram> <histogram name="Notifications.NotifierType" enum="NotifierType" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>tbarzic@chromium.org</owner> <owner>tengs@chromium.org</owner> <owner>gzadina@google.com</owner> @@ -664,7 +664,7 @@ </histogram> <histogram name="Notifications.PersistentNotificationThirdPartyCount" - enum="Boolean" expires_after="2023-09-01"> + enum="Boolean" expires_after="2023-11-12"> <owner>awillia@chromium.org</owner> <owner>peter@chromium.org</owner> <summary> @@ -960,7 +960,7 @@ </histogram> <histogram name="Notifications.Windows.ActivationStatus" - enum="WindowsNotificationActivationStatus" expires_after="2023-09-01"> + enum="WindowsNotificationActivationStatus" expires_after="2023-11-12"> <owner>finnur@chromium.org</owner> <owner>peter@chromium.org</owner> <owner>chengx@chromium.org</owner> @@ -1006,7 +1006,7 @@ </histogram> <histogram name="Notifications.Windows.DisplayStatus" - enum="WindowsNotificationDisplayStatus" expires_after="2023-09-01"> + enum="WindowsNotificationDisplayStatus" expires_after="2023-11-12"> <owner>finnur@chromium.org</owner> <owner>peter@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/offline/histograms.xml b/tools/metrics/histograms/metadata/offline/histograms.xml index b79f760..a0b553f9 100644 --- a/tools/metrics/histograms/metadata/offline/histograms.xml +++ b/tools/metrics/histograms/metadata/offline/histograms.xml
@@ -151,7 +151,7 @@ </histogram> <histogram name="OfflinePages.CachedOfflineStatusValid" enum="BooleanMatched" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>pnoland@chromium.org</owner> <owner>offline-dev@chromium.org</owner> <summary> @@ -183,7 +183,7 @@ </histogram> <histogram name="OfflinePages.DidNavigationThrottleCancelNavigation" - enum="Boolean" expires_after="2023-09-03"> + enum="Boolean" expires_after="2023-11-12"> <owner>curranmax@chromium.org</owner> <owner>tbansal@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/omnibox/histograms.xml b/tools/metrics/histograms/metadata/omnibox/histograms.xml index 1a29be2..248a900 100644 --- a/tools/metrics/histograms/metadata/omnibox/histograms.xml +++ b/tools/metrics/histograms/metadata/omnibox/histograms.xml
@@ -591,7 +591,7 @@ </histogram> <histogram name="Omnibox.CutOrCopyAllText" units="count" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>jdonnelly@chromium.org</owner> <owner>mpearson@chromium.org</owner> <owner>chrome-omnibox-team@google.com</owner> @@ -775,7 +775,7 @@ </histogram> <histogram name="Omnibox.FocusResultedInNavigation" enum="BooleanNavigated" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>ender@chromium.org</owner> <owner>jdonnelly@chromium.org</owner> <owner>mpearson@chromium.org</owner> @@ -925,7 +925,7 @@ </histogram> <histogram name="Omnibox.InputType" enum="OmniboxInputType" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>jdonnelly@chromium.org</owner> <owner>mpearson@chromium.org</owner> <owner>chrome-omnibox-team@google.com</owner> @@ -943,7 +943,7 @@ </histogram> <histogram name="Omnibox.IPv4AddressPartsCount" units="count" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>gjc@chromium.org</owner> <owner>blink-network-stack@google.com</owner> <summary> @@ -991,7 +991,7 @@ </histogram> <histogram name="Omnibox.JustDeletedText" enum="Boolean" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>jdonnelly@chromium.org</owner> <owner>mpearson@chromium.org</owner> <owner>chrome-omnibox-team@google.com</owner> @@ -1396,7 +1396,7 @@ </histogram> <histogram name="Omnibox.ResumeJourneyShown" units="position" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>tommycli@chromium.org</owner> <owner>chrome-omnibox-team@google.com</owner> <summary> @@ -1413,7 +1413,7 @@ </histogram> <histogram name="Omnibox.ResumeJourneyShown.ClusterKeywordScore" units="count" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>junzou@chromium.org</owner> <owner>chrome-intelligence-core@google.com</owner> <summary> @@ -1640,7 +1640,7 @@ </histogram> <histogram name="Omnibox.SuggestionUsed.AnswerInSuggest" - enum="SuggestionAnswerOptionalType" expires_after="2023-09-03"> + enum="SuggestionAnswerOptionalType" expires_after="2023-11-12"> <owner>jdonnelly@chromium.org</owner> <owner>mpearson@chromium.org</owner> <owner>chrome-omnibox-team@google.com</owner> @@ -1653,7 +1653,7 @@ </histogram> <histogram name="Omnibox.SuggestionUsed.ClientSummarizedResultType" - enum="ClientSummarizedResultType" expires_after="2023-09-03"> + enum="ClientSummarizedResultType" expires_after="2023-11-12"> <owner>nyquist@chromium.org</owner> <owner>ssid@chromium.org</owner> <owner>tommycli@chromium.org</owner> @@ -1715,7 +1715,7 @@ </histogram> <histogram name="Omnibox.SuggestionUsed.ResumeJourney" units="position" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>tommycli@chromium.org</owner> <owner>chrome-omnibox-team@google.com</owner> <summary> @@ -1757,7 +1757,7 @@ </histogram> <histogram name="Omnibox.SuggestionUsed.ResumeJourney.ClusterKeywordType" - enum="HistoryClusterKeywordType" expires_after="2023-08-27"> + enum="HistoryClusterKeywordType" expires_after="2023-11-12"> <owner>junzou@chromium.org</owner> <owner>chrome-intelligence-core@google.com</owner> <summary> @@ -1810,7 +1810,7 @@ </histogram> <histogram name="Omnibox.SuggestionUsed.ResumeJourney.PageEntityCollection" - enum="OptimizationGuidePageEntityCollection" expires_after="2023-09-03"> + enum="OptimizationGuidePageEntityCollection" expires_after="2023-11-12"> <owner>junzou@chromium.org</owner> <owner>chrome-intelligence-core@google.com</owner> <summary> @@ -2012,7 +2012,7 @@ <histogram name="Omnibox.SuggestionUsed.Search.NavigationToLargestContentfulPaint2" - units="ms" expires_after="2023-09-03"> + units="ms" expires_after="2023-11-12"> <owner>lingqi@chromium.org</owner> <owner>chrome-prerendering@google.com</owner> <owner>chrome-omnibox-team@google.com</owner> @@ -2071,7 +2071,7 @@ <histogram name="Omnibox.SuggestionUsed.URL.Experimental.NavigationToFirstMeaningfulPaint" - units="ms" expires_after="2023-09-10"> + units="ms" expires_after="2023-11-12"> <owner>jdonnelly@chromium.org</owner> <owner>mpearson@chromium.org</owner> <owner>chrome-omnibox-team@google.com</owner> @@ -2094,7 +2094,7 @@ </histogram> <histogram name="Omnibox.SuggestionUsed.URL.NavigationToFirstContentfulPaint" - units="ms" expires_after="2023-08-27"> + units="ms" expires_after="2023-11-12"> <owner>jdonnelly@chromium.org</owner> <owner>mpearson@chromium.org</owner> <owner>chrome-omnibox-team@google.com</owner>
diff --git a/tools/metrics/histograms/metadata/optimization/histograms.xml b/tools/metrics/histograms/metadata/optimization/histograms.xml index 7f0bb54..2d6ff3c 100644 --- a/tools/metrics/histograms/metadata/optimization/histograms.xml +++ b/tools/metrics/histograms/metadata/optimization/histograms.xml
@@ -232,7 +232,7 @@ <histogram name="OptimizationGuide.HintCacheLevelDBStore.LoadMetadataResult" enum="OptimizationGuideHintCacheLevelDBStoreLoadMetadataResult" - expires_after="M117"> + expires_after="2023-11-12"> <owner>mcrouse@chromium.org</owner> <owner>sophiechang@chromium.org</owner> <summary> @@ -303,7 +303,7 @@ </histogram> <histogram name="OptimizationGuide.HintsFetcher.GetHintsRequest.HintCount" - units="units" expires_after="2023-09-10"> + units="units" expires_after="2023-11-12"> <owner>mcrouse@chromium.org</owner> <owner>sophiechang@chromium.org</owner> <summary> @@ -343,7 +343,7 @@ </histogram> <histogram name="OptimizationGuide.HintsFetcher.GetHintsRequest.UrlCount" - units="total url count" expires_after="2023-09-10"> + units="total url count" expires_after="2023-11-12"> <owner>mcrouse@chromium.org</owner> <owner>sophiechang@chromium.org</owner> <summary> @@ -389,7 +389,7 @@ <histogram name="OptimizationGuide.HintsManager.ConcurrentPageNavigationFetches" - units="counts" expires_after="2023-09-03"> + units="counts" expires_after="2023-11-12"> <owner>sophiechang@chromium.org</owner> <owner>mcrouse@chromium.org</owner> <summary> @@ -414,7 +414,7 @@ <histogram name="OptimizationGuide.HintsManager.RaceNavigationFetchAttemptStatus" enum="OptimizationGuideRaceNavigationFetchAttemptStatus" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>mcrouse@chromium.org</owner> <owner>sophiechang@chromium.org</owner> <summary> @@ -657,7 +657,7 @@ <histogram name="OptimizationGuide.PageContentAnnotations.AnnotateVisitResultCached" - enum="BooleanCacheHit" expires_after="2023-09-10"> + enum="BooleanCacheHit" expires_after="2023-11-12"> <owner>mcrouse@chromium.org</owner> <owner>chrome-intelligence-core@google.com</owner> <summary> @@ -744,7 +744,7 @@ <histogram name="OptimizationGuide.PageContentAnnotations.SalientImageAvailability" - enum="OptimizationGuideSalientImageAvailability" expires_after="2023-09-10"> + enum="OptimizationGuideSalientImageAvailability" expires_after="2023-11-12"> <owner>tbansal@chromium.org</owner> <owner>chrome-intelligence-core@google.com</owner> <summary>Records the availability of salient images on page load.</summary> @@ -816,7 +816,7 @@ <histogram name="OptimizationGuide.PageContentAnnotationsService.ContentAnnotationsStorageStatus" enum="OptimizationGuidePageContentAnnotationsStorageStatus" - expires_after="2023-10-22"> + expires_after="2023-11-12"> <owner>sophiechang@chromium.org</owner> <owner>mcrouse@chromium.org</owner> <summary> @@ -913,7 +913,7 @@ <histogram name="OptimizationGuide.PageContentAnnotationsService.VisibilityScoreOfGoogleSRP" - units="score" expires_after="M117"> + units="score" expires_after="2023-11-12"> <owner>robertogden@chromium.org</owner> <owner>chrome-intelligence-core@google.com</owner> <summary> @@ -956,7 +956,7 @@ <histogram name="OptimizationGuide.PageEntitiesModelHandler.CreatedSuccessfully" - enum="BooleanSuccess" expires_after="2023-08-27"> + enum="BooleanSuccess" expires_after="2023-11-12"> <owner>sophiechang@chromium.org</owner> <owner>chrome-intelligence-core@google.com</owner> <summary> @@ -968,7 +968,7 @@ <histogram name="OptimizationGuide.PageEntitiesModelHandler.CreationStatus" enum="OptimizationGuideEntityAnnotatorCreationStatus" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>sophiechang@chromium.org</owner> <owner>chrome-intelligence-core@google.com</owner> <summary> @@ -1280,7 +1280,7 @@ <histogram name="OptimizationGuide.PredictionModelFetcher.GetModelsResponse.NetErrorCode" - enum="NetErrorCodes" expires_after="2023-10-22"> + enum="NetErrorCodes" expires_after="2023-11-12"> <owner>mcrouse@chromium.org</owner> <owner>sophiechang@chromium.org</owner> <summary> @@ -1310,7 +1310,7 @@ <histogram name="OptimizationGuide.PredictionModelFetcher.GetModelsResponse.Status" - enum="HttpResponseCode" expires_after="2023-10-22"> + enum="HttpResponseCode" expires_after="2023-11-12"> <owner>mcrouse@chromium.org</owner> <owner>sophiechang@chromium.org</owner> <summary> @@ -1427,7 +1427,7 @@ </histogram> <histogram name="OptimizationGuide.ProcessHintsResult" - enum="OptimizationGuideProcessHintsResult" expires_after="2023-08-27"> + enum="OptimizationGuideProcessHintsResult" expires_after="2023-11-12"> <owner>mcrouse@chromium.org</owner> <owner>sophiechang@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/others/histograms.xml b/tools/metrics/histograms/metadata/others/histograms.xml index 521384b..05f22f4 100644 --- a/tools/metrics/histograms/metadata/others/histograms.xml +++ b/tools/metrics/histograms/metadata/others/histograms.xml
@@ -199,7 +199,7 @@ </variants> <histogram name="AccessCodeCast.Discovery.AddSinkResult.New" - enum="AccessCodeCastAddSinkResult" expires_after="2023-07-23"> + enum="AccessCodeCastAddSinkResult" expires_after="2023-11-12"> <owner>bzielinski@google.com</owner> <owner>cros-edu-eng@google.com</owner> <summary> @@ -222,7 +222,7 @@ </histogram> <histogram name="AccessCodeCast.Discovery.CastModeOnSuccess" - enum="AccessCodeCastCastMode" expires_after="2023-07-23"> + enum="AccessCodeCastCastMode" expires_after="2023-11-12"> <owner>bzielinski@google.com</owner> <owner>cros-edu-eng@google.com</owner> <summary> @@ -233,7 +233,7 @@ </histogram> <histogram name="AccessCodeCast.Discovery.DeviceDurationOnRoute" - units="seconds" expires_after="2023-08-20"> + units="seconds" expires_after="2023-11-12"> <owner>bzielinski@google.com</owner> <owner>cros-edu-eng@google.com</owner> <summary> @@ -244,7 +244,7 @@ </histogram> <histogram name="AccessCodeCast.Discovery.RememberedDevicesCount" - units="cast devices" expires_after="2023-09-10"> + units="cast devices" expires_after="2023-11-12"> <owner>bzielinski@google.com</owner> <owner>cros-edu-eng@google.com</owner> <summary> @@ -277,7 +277,7 @@ </histogram> <histogram name="AccessCodeCast.Session.RouteDiscoveryTypeAndSource" - enum="AccessCodeCastDiscoveryTypeAndSource" expires_after="2023-08-20"> + enum="AccessCodeCastDiscoveryTypeAndSource" expires_after="2023-11-12"> <owner>bzielinski@google.com</owner> <owner>cros-edu-eng@google.com</owner> <summary> @@ -288,7 +288,7 @@ </histogram> <histogram name="AccessCodeCast.Session.RouteDuration" units="ms" - expires_after="2023-08-13"> + expires_after="2023-11-12"> <owner>bzielinski@google.com</owner> <owner>cros-edu-eng@google.com</owner> <summary> @@ -299,7 +299,7 @@ </histogram> <histogram name="AccessCodeCast.Ui.AccessCodeInputTime" units="ms" - expires_after="2023-07-23"> + expires_after="2023-11-12"> <owner>bzielinski@google.com</owner> <owner>cros-edu-eng@google.com</owner> <summary> @@ -323,7 +323,7 @@ </histogram> <histogram name="AccessCodeCast.Ui.CastAttemptLength" units="ms" - expires_after="2023-07-23"> + expires_after="2023-11-12"> <owner>bzielinski@google.com</owner> <owner>cros-edu-eng@google.com</owner> <summary> @@ -335,7 +335,7 @@ </histogram> <histogram name="AccessCodeCast.Ui.DialogCloseReason" - enum="AccessCodeCastDialogCloseReason" expires_after="2023-07-23"> + enum="AccessCodeCastDialogCloseReason" expires_after="2023-11-12"> <owner>bzielinski@google.com</owner> <owner>cros-edu-eng@google.com</owner> <summary> @@ -345,7 +345,7 @@ </histogram> <histogram name="AccessCodeCast.Ui.DialogLoadTime" units="ms" - expires_after="2023-07-23"> + expires_after="2023-11-12"> <owner>bzielinski@google.com</owner> <owner>cros-edu-eng@google.com</owner> <summary> @@ -356,7 +356,7 @@ </histogram> <histogram name="AccessCodeCast.Ui.DialogOpenLocation" - enum="AccessCodeCastDialogOpenLocation" expires_after="2023-07-23"> + enum="AccessCodeCastDialogOpenLocation" expires_after="2023-11-12"> <owner>bzielinski@google.com</owner> <owner>cros-edu-eng@google.com</owner> <summary> @@ -518,7 +518,7 @@ </histogram> <histogram name="Ads.InterestGroup.Auction.DirectFromSellerSignals.RequestType" - enum="DirectFromSellerSignalsRequestType" expires_after="2023-07-31"> + enum="DirectFromSellerSignalsRequestType" expires_after="2023-11-12"> <owner>caraitto@chromium.org</owner> <owner>pauljensen@chromium.org</owner> <owner>privacy-sandbox-dev@chromium.org</owner> @@ -1668,7 +1668,7 @@ </histogram> <histogram name="BlueZ.ReasonOfDisconnection" enum="BlueZReasonOfDisconnection" - expires_after="2023-08-13"> + expires_after="2023-11-12"> <owner>mcchou@chromium.org</owner> <owner>chromeos-bt-platform-sw-core@google.com</owner> <summary> @@ -2258,7 +2258,7 @@ </histogram> <histogram name="ChildProcess.Launched.UtilityProcessHash" - enum="UtilityProcessNameHash" expires_after="2023-08-27"> + enum="UtilityProcessNameHash" expires_after="2023-11-12"> <owner>wfh@chromium.org</owner> <summary> Count of child utility process launches, bucketed by the hash of their @@ -2970,14 +2970,14 @@ </histogram> <histogram name="ComponentUpdater.UpdateCompleteError" - enum="UpdateClientErrors" expires_after="2023-08-27"> + enum="UpdateClientErrors" expires_after="2023-11-12"> <owner>sorin@chromium.org</owner> <owner>src/components/component_updater/OWNERS</owner> <summary>The result of an install or an update check.</summary> </histogram> <histogram name="ComponentUpdater.UpdateCompleteResult" enum="BooleanError" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>sorin@chromium.org</owner> <owner>src/components/component_updater/OWNERS</owner> <summary>The result of an install or an update check.</summary> @@ -3446,7 +3446,7 @@ <histogram name="Conversions.AggregatableReport.ExtraReportDelayForSuccessfulSend" - units="ms" expires_after="M117"> + units="ms" expires_after="2023-11-12"> <owner>tquintanilla@chromium.org</owner> <owner>johnidel@chromium.org</owner> <owner>measurement-api-dev+metrics@google.com</owner> @@ -3701,7 +3701,7 @@ </histogram> <histogram name="Conversions.DeferredDataHostProcessedAfterTimeout" - enum="Boolean" expires_after="M117"> + enum="Boolean" expires_after="2023-11-12"> <owner>anthonygarant@chromium.org</owner> <owner>measurement-api-dev+metrics@google.com</owner> <summary> @@ -3741,7 +3741,7 @@ </histogram> <histogram name="Conversions.EnqueueOsEventAllowed" enum="BooleanAllowed" - expires_after="M117"> + expires_after="2023-11-12"> <owner>apaseltiner@chromium.org</owner> <owner>johnidel@chromium.org</owner> <owner>measurement-api-dev+metrics@google.com</owner> @@ -3768,7 +3768,7 @@ </histogram> <histogram name="Conversions.ExtraReportDelayForSuccessfulSend" units="ms" - expires_after="M117"> + expires_after="2023-11-12"> <owner>tquintanilla@chromium.org</owner> <owner>johnidel@chromium.org</owner> <owner>measurement-api-dev+metrics@google.com</owner> @@ -3852,7 +3852,7 @@ </histogram> <histogram name="Conversions.ProcessRegisterDataHostDelay" units="ms" - expires_after="M117"> + expires_after="2023-11-12"> <owner>anthonygarant@chromium.org</owner> <owner>measurement-api-dev+metrics@google.com</owner> <summary> @@ -3863,7 +3863,7 @@ </histogram> <histogram name="Conversions.RegisterDataHostOutcome" - enum="ConversionRegisterDataHostOutcome" expires_after="M117"> + enum="ConversionRegisterDataHostOutcome" expires_after="2023-11-12"> <owner>anthonygarant@chromium.org</owner> <owner>measurement-api-dev+metrics@google.com</owner> <summary> @@ -4074,7 +4074,7 @@ </histogram> <histogram name="Conversions.SourceRegistrationError2" - enum="ConversionSourceRegistrationError" expires_after="M117"> + enum="ConversionSourceRegistrationError" expires_after="2023-11-12"> <owner>linnan@chromium.org</owner> <owner>johnidel@chromium.org</owner> <owner>measurement-api-dev+metrics@google.com</owner> @@ -4163,7 +4163,7 @@ </histogram> <histogram name="Conversions.TriggerRegistrationError5" - enum="ConversionTriggerRegistrationError" expires_after="M117"> + enum="ConversionTriggerRegistrationError" expires_after="2023-11-12"> <owner>linnan@chromium.org</owner> <owner>johnidel@chromium.org</owner> <owner>measurement-api-dev+metrics@google.com</owner> @@ -4962,7 +4962,7 @@ </histogram> <histogram name="DocumentScan.ScanFailed" enum="DocumentScanSaneBackend" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>bmgordon@chromium.org</owner> <owner>project-bolton@google.com</owner> <summary> @@ -4991,7 +4991,7 @@ </histogram> <histogram name="DocumentScan.ScanRequested" enum="DocumentScanSaneBackend" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>bmgordon@chromium.org</owner> <owner>project-bolton@google.com</owner> <summary> @@ -5001,7 +5001,7 @@ </histogram> <histogram name="DocumentScan.ScanSucceeded" enum="DocumentScanSaneBackend" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>bmgordon@chromium.org</owner> <owner>project-bolton@google.com</owner> <summary> @@ -5210,7 +5210,7 @@ </histogram> <histogram name="Drive.PushNotificationInitiallyEnabled" enum="BooleanEnabled" - expires_after="M116"> + expires_after="2023-11-12"> <owner>simmonsjosh@google.com</owner> <owner>src/ui/file_manager/OWNERS</owner> <summary> @@ -5221,7 +5221,7 @@ </histogram> <histogram name="Drive.PushNotificationRegistered" enum="BooleanRegistered" - expires_after="2023-09-11"> + expires_after="2023-11-12"> <owner>simmonsjosh@google.com</owner> <owner>src/ui/file_manager/OWNERS</owner> <summary> @@ -5637,7 +5637,7 @@ </histogram> <histogram name="ExploreSites.MonthlyHostCount" units="hosts" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>dimich@chromium.org</owner> <summary> Number of unique hosts visited by the user during the last 30 days. Reported @@ -5767,7 +5767,7 @@ </histogram> <histogram name="Feedback.ChromeOSApp.Duration.GetBigFeedbackLogs" units="ms" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>xiangdongkong@google.com</owner> <owner>cros-feedback-app@google.com</owner> <summary> @@ -5833,7 +5833,7 @@ </histogram> <histogram name="Feedback.ChromeOSApp.GetBigFeedbackLogs.Success" - units="boolean" expires_after="2023-09-03"> + units="boolean" expires_after="2023-11-12"> <owner>xiangdongkong@google.com</owner> <owner>cros-feedback-app@google.com</owner> <summary> @@ -6067,7 +6067,7 @@ </histogram> <histogram name="Feedback.Duration.FormSubmitToSendQueue" units="ms" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>xiangdongkong@google.com</owner> <owner>cros-feedback-app@google.com</owner> <summary> @@ -6127,7 +6127,7 @@ </histogram> <histogram name="Feedback.ReportSending.Online" units="boolean" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>xiangdongkong@google.com</owner> <owner>cros-feedback-app@google.com</owner> <summary> @@ -6136,7 +6136,7 @@ </histogram> <histogram name="Feedback.ReportSending.Result" - enum="FeedbackReportSendingResult" expires_after="2023-08-27"> + enum="FeedbackReportSendingResult" expires_after="2023-11-12"> <owner>xiangdongkong@google.com</owner> <owner>cros-feedback-app@google.com</owner> <summary> @@ -6163,7 +6163,7 @@ </histogram> <histogram name="Feedback.TrustSafetySentiment.TriggerOccurred" - enum="TrustSafetySentimentFeatureArea" expires_after="2023-09-03"> + enum="TrustSafetySentimentFeatureArea" expires_after="2023-11-12"> <owner>sauski@google.com</owner> <owner>chrome-hats-eng@google.com</owner> <summary> @@ -6273,7 +6273,7 @@ </histogram> <histogram name="FirstRun.NewUserExperience.NtpBackgroundInteraction" - enum="NuxNtpBackgroundInteractions" expires_after="2023-08-27"> + enum="NuxNtpBackgroundInteractions" expires_after="2023-11-12"> <owner>johntlee@chromium.org</owner> <owner>dpapad@chromium.org</owner> <summary> @@ -6605,7 +6605,7 @@ </histogram> <histogram name="Gamepad.KnownGamepadConnectedWithId" - enum="GamepadVendorProduct" expires_after="2023-09-10"> + enum="GamepadVendorProduct" expires_after="2023-11-12"> <owner>mattreynolds@chromium.org</owner> <owner>deviceapi-team@google.com</owner> <summary> @@ -6764,7 +6764,7 @@ </histogram> <histogram name="Hardware.Display.Count.OnChange" units="units" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>sashamcintosh@chromium.org</owner> <owner>chromeos-gfx@chromium.org</owner> <summary> @@ -6774,7 +6774,7 @@ </histogram> <histogram name="Hardware.Display.Count.OnStartup" units="units" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>sashamcintosh@chromium.org</owner> <owner>chromeos-gfx@chromium.org</owner> <summary> @@ -6784,7 +6784,7 @@ </histogram> <histogram name="Hardware.Display.SupportsHDR" enum="BooleanSupported" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>cassew@google.com</owner> <owner>media-dev@chromium.org</owner> <summary> @@ -6796,7 +6796,7 @@ </summary> </histogram> -<histogram name="Hardware.TotalDiskSpace" units="GB" expires_after="2023-09-03"> +<histogram name="Hardware.TotalDiskSpace" units="GB" expires_after="2023-11-12"> <owner>zmo@chromium.org</owner> <owner>graphics-dev@chromium.org</owner> <summary> @@ -8079,7 +8079,7 @@ </histogram> <histogram name="Mojo.Channel.WriteMessageSize" units="bytes" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>amistry@chromium.org</owner> <owner>bgeffon@chromium.org</owner> <owner>rockot@google.com</owner> @@ -8217,7 +8217,7 @@ </histogram> <histogram name="MPArch.ChildProcessLaunchSubsequent" units="ms" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>pasko@chromium.org</owner> <owner>yfriedman@chromium.org</owner> <summary> @@ -8736,7 +8736,7 @@ </histogram> <histogram name="OSCrypt.Linux.DecryptedWithEmptyKey" enum="Boolean" - expires_after="2023-09-01"> + expires_after="2023-11-12"> <owner>cfroussios@chromium.org</owner> <owner>thestig@chromium.org</owner> <summary> @@ -8747,7 +8747,7 @@ </histogram> <histogram name="OSCrypt.Win.Decrypt.Result" enum="BooleanSuccess" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>wfh@chromium.org</owner> <owner>nparker@chromium.org</owner> <summary> @@ -8757,7 +8757,7 @@ </histogram> <histogram name="OSCrypt.Win.Decrypt.Time" units="ms" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>wfh@chromium.org</owner> <owner>nparker@chromium.org</owner> <summary> @@ -8767,7 +8767,7 @@ </histogram> <histogram name="OSCrypt.Win.Encrypt.Result" enum="BooleanSuccess" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>wfh@chromium.org</owner> <owner>nparker@chromium.org</owner> <summary> @@ -8780,7 +8780,7 @@ </histogram> <histogram name="OSCrypt.Win.Encrypt.Time" units="ms" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>wfh@chromium.org</owner> <owner>nparker@chromium.org</owner> <summary> @@ -10227,7 +10227,7 @@ </histogram> <histogram name="ReadingList.WebUI.LoadDocumentTime" units="ms" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>corising@chromium.org</owner> <owner>chrome-desktop-ui-sea@google.com</owner> <summary> @@ -10550,7 +10550,7 @@ </histogram> <histogram name="ReportingAndNEL.NumberOfLoadedReportingEndpointGroups2" - units="endpoint group count" expires_after="2023-09-10"> + units="endpoint group count" expires_after="2023-11-12"> <owner>yhirano@chromium.org</owner> <owner>src/net/reporting/OWNERS</owner> <summary> @@ -10562,7 +10562,7 @@ </histogram> <histogram name="ReportingAndNEL.NumberOfLoadedReportingEndpoints2" - units="endpoint count" expires_after="2023-09-10"> + units="endpoint count" expires_after="2023-11-12"> <owner>yhirano@chromium.org</owner> <owner>src/net/reporting/OWNERS</owner> <summary> @@ -10855,7 +10855,7 @@ </histogram> <histogram name="SB2.RemoteCall.CheckDelta" units="microseconds" - expires_after="2023-07-16"> + expires_after="2023-11-12"> <owner>vakh@chromium.org</owner> <owner>csharrison@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> @@ -10943,7 +10943,7 @@ </histogram> <histogram base="true" name="SB2.RequestDestination" enum="RequestDestination" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>xinghuilu@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary> @@ -11510,7 +11510,7 @@ </histogram> <histogram name="Shutdown.BrowserExit.Time" units="ms" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>etienneb@chromium.org</owner> <owner>gab@chromium.org</owner> <summary> @@ -11519,7 +11519,7 @@ </histogram> <histogram name="Shutdown.BrowserExit.Time2" units="ms" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>etienneb@chromium.org</owner> <owner>gab@chromium.org</owner> <summary> @@ -11540,7 +11540,7 @@ </histogram> <histogram name="Shutdown.EndSession.Time2" units="ms" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>etienneb@chromium.org</owner> <owner>gab@chromium.org</owner> <summary> @@ -11613,7 +11613,7 @@ </histogram> <histogram name="Shutdown.ShutdownType" enum="ShutdownType" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>etienneb@chromium.org</owner> <owner>gab@chromium.org</owner> <summary> @@ -11625,7 +11625,7 @@ </histogram> <histogram name="Shutdown.ShutdownType2" enum="ShutdownType" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>etienneb@chromium.org</owner> <owner>gab@chromium.org</owner> <summary> @@ -11657,7 +11657,7 @@ </histogram> <histogram name="Shutdown.WindowClose.Time" units="ms" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>etienneb@chromium.org</owner> <owner>gab@chromium.org</owner> <summary> @@ -11666,7 +11666,7 @@ </histogram> <histogram name="Shutdown.WindowClose.Time2" units="ms" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>etienneb@chromium.org</owner> <owner>gab@chromium.org</owner> <summary> @@ -11884,7 +11884,7 @@ </histogram> <histogram name="SiteIsolatedCodeCache.JS.PotentialMemoryBackedCodeCacheSize2" - units="counts" expires_after="2023-08-08"> + units="counts" expires_after="2023-11-12"> <owner>yhirano@chromium.org</owner> <owner>loading-dev@chromium.org</owner> <summary> @@ -12065,7 +12065,7 @@ </histogram> <histogram name="SpellCheck.api.check" units="code units" - expires_after="2023-09-09"> + expires_after="2023-11-12"> <owner>basiaz@google.com</owner> <owner>chrome-language@google.com</owner> <summary> @@ -12159,7 +12159,7 @@ </histogram> <histogram name="SpellCheck.ReplacedWords" units="words" - expires_after="2023-09-09"> + expires_after="2023-11-12"> <owner>basiaz@google.com</owner> <owner>chrome-language@google.com</owner> <summary> @@ -12235,7 +12235,7 @@ </histogram> <histogram name="SpellCheck.SpellingService.RequestHttpResponseCode" - enum="HttpResponseCode" expires_after="2023-08-07"> + enum="HttpResponseCode" expires_after="2023-11-12"> <owner>yyushkina@google.com</owner> <owner>gujen@google.com</owner> <owner>chrome-language@google.com</owner> @@ -12255,7 +12255,7 @@ </histogram> <histogram name="SpellCheck.SuggestionHitRatio" units="%" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>gujen@google.com</owner> <owner>chrome-language@google.com</owner> <summary> @@ -12533,7 +12533,7 @@ </histogram> <histogram name="Style.InvalidationTime" units="microseconds" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>futhark@chromium.org</owner> <summary> Microseconds spent in StyleEngine::InvalidateStyle. Only samples from high @@ -12542,7 +12542,7 @@ </histogram> <histogram name="Style.RebuildLayoutTreeTime" units="microseconds" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>futhark@chromium.org</owner> <summary> Microseconds spent in RebuildLayoutTree called from Document::UpdateStyle. @@ -12550,7 +12550,7 @@ </histogram> <histogram name="Style.RecalcTime" units="microseconds" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>futhark@chromium.org</owner> <summary> Microseconds spent in RecalcStyle called from Document::UpdateStyle. @@ -12558,7 +12558,7 @@ </histogram> <histogram name="SubresourceWebBundles.BundleFetchErrorCode" - enum="NetErrorCodes" expires_after="2023-08-27"> + enum="NetErrorCodes" expires_after="2023-11-12"> <owner>ksakamoto@chromium.org</owner> <owner>webpackage-dev@chromium.org</owner> <summary> @@ -12578,7 +12578,7 @@ </histogram> <histogram name="SubresourceWebBundles.HasJSONComments" enum="Boolean" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>jbroman@chromium.org</owner> <owner>webpackage-dev@chromium.org</owner> <summary> @@ -12607,7 +12607,7 @@ </histogram> <histogram name="SubresourceWebBundles.OriginType" - enum="SubresourceWebBundleOriginType" expires_after="2023-09-03"> + enum="SubresourceWebBundleOriginType" expires_after="2023-11-12"> <owner>hayato@chromium.org</owner> <owner>webpackage-dev@chromium.org</owner> <summary> @@ -13699,7 +13699,7 @@ </histogram> <histogram name="UsageStats.Events" enum="UsageStatsEvents" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>pnoland@chromium.org</owner> <owner>fgorski@chromium.org</owner> <summary> @@ -13943,7 +13943,7 @@ </histogram> <histogram name="VoiceInteraction.DismissedEventSource" - enum="VoiceInteractionEventSource" expires_after="2023-09-10"> + enum="VoiceInteractionEventSource" expires_after="2023-11-12"> <owner>basiaz@google.com</owner> <owner>chrome-language@google.com</owner> <summary> @@ -13953,7 +13953,7 @@ </histogram> <histogram name="VoiceInteraction.DismissedEventTarget" - enum="VoiceIntentTarget" expires_after="2023-09-10"> + enum="VoiceIntentTarget" expires_after="2023-11-12"> <owner>basiaz@google.com</owner> <owner>chrome-language@google.com</owner> <summary> @@ -13988,7 +13988,7 @@ </histogram> <histogram name="VoiceInteraction.FinishEventSource" - enum="VoiceInteractionEventSource" expires_after="2023-09-10"> + enum="VoiceInteractionEventSource" expires_after="2023-11-12"> <owner>basiaz@google.com</owner> <owner>chrome-language@google.com</owner> <summary> @@ -13998,7 +13998,7 @@ </histogram> <histogram name="VoiceInteraction.FinishEventTarget" enum="VoiceIntentTarget" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>basiaz@google.com</owner> <owner>chrome-language@google.com</owner> <summary> @@ -14065,7 +14065,7 @@ </histogram> <histogram name="VoiceInteraction.StartEventSource" - enum="VoiceInteractionEventSource" expires_after="2023-09-10"> + enum="VoiceInteractionEventSource" expires_after="2023-11-12"> <owner>basiaz@google.com</owner> <owner>chrome-language@google.com</owner> <summary> @@ -14075,7 +14075,7 @@ </histogram> <histogram name="VoiceInteraction.StartEventTarget" enum="VoiceIntentTarget" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>basiaz@google.com</owner> <owner>chrome-language@google.com</owner> <summary> @@ -14138,7 +14138,7 @@ </histogram> <histogram name="VoiceInteraction.VoiceSearchResult" enum="BooleanSuccess" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>basiaz@google.com</owner> <owner>chrome-language@google.com</owner> <summary> @@ -14467,13 +14467,13 @@ </histogram> <histogram name="WebUI.CreatedForUrl" enum="WebUIUrlHashes" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>dbeam@chromium.org</owner> <summary>URLs for which Chrome creates WebUIControllers.</summary> </histogram> <histogram name="WebUI.Settings.PathVisited" enum="WebUISettingsPathHashes" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>dschuyler@chromium.org</owner> <owner>tbuckley@chromium.org</owner> <owner>bettes@chromium.org</owner> @@ -14797,7 +14797,7 @@ </histogram> <histogram name="WrenchMenu.MenuAction" enum="WrenchMenuAction" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>ainslie@chromium.org</owner> <owner>edwardjung@chromium.org</owner> <summary>Number of times that each menu item is clicked.</summary>
diff --git a/tools/metrics/histograms/metadata/page/histograms.xml b/tools/metrics/histograms/metadata/page/histograms.xml index c871701..f55d33de 100644 --- a/tools/metrics/histograms/metadata/page/histograms.xml +++ b/tools/metrics/histograms/metadata/page/histograms.xml
@@ -96,7 +96,7 @@ </histogram> <histogram name="PageActionController.Icon.CTR" enum="PageActionCTREvent" - expires_after="2023-08-01"> + expires_after="2023-11-12"> <owner>emshack@chromium.org</owner> <owner>chrome-desktop-ui-sea@google.com</owner> <summary> @@ -391,7 +391,7 @@ <histogram name="PageLoad.Clients.AMP.Experimental.PageTiming.InputToNavigation.Subframe" - units="ms" expires_after="2023-09-10"> + units="ms" expires_after="2023-11-12"> <owner>bmcquade@chromium.org</owner> <owner>sullivan@chromium.org</owner> <owner>speed-metrics-dev@chromium.org</owner> @@ -442,7 +442,7 @@ <histogram name="PageLoad.Clients.AMP.InteractiveTiming.NumInteractions.Subframe" - units="Count" expires_after="2023-09-10"> + units="Count" expires_after="2023-11-12"> <owner>sullivan@chromium.org</owner> <owner>speed-metrics-dev@chromium.org</owner> <summary> @@ -688,7 +688,7 @@ <histogram name="PageLoad.Clients.FencedFrames.LayoutInstability.CumulativeShiftScore" - units="scorex10" expires_after="2023-08-30"> + units="scorex10" expires_after="2023-11-12"> <owner>toyoshim@chromium.org</owner> <owner>mparch-dev@chromium.org</owner> <summary> @@ -849,7 +849,7 @@ <histogram name="PageLoad.Clients.GoogleSearch.PaintTiming.NavigationToFirstContentfulPaint" - units="ms" expires_after="2023-09-03"> + units="ms" expires_after="2023-11-12"> <owner>spelchat@chromium.org</owner> <owner>chrome-brapp-loading@google.com</owner> <summary> @@ -863,7 +863,7 @@ <histogram name="PageLoad.Clients.GoogleSearch.PaintTiming.NavigationToLargestContentfulPaint" - units="ms" expires_after="2023-09-03"> + units="ms" expires_after="2023-11-12"> <owner>spelchat@chromium.org</owner> <owner>chrome-brapp-loading@google.com</owner> <summary> @@ -1461,7 +1461,7 @@ </summary> </histogram> -<histogram name="PageLoad.Cpu.TotalUsage" units="ms" expires_after="2023-08-27"> +<histogram name="PageLoad.Cpu.TotalUsage" units="ms" expires_after="2023-11-12"> <owner>alexmt@chromium.org</owner> <owner>johnidel@chromium.org</owner> <summary> @@ -1485,7 +1485,7 @@ <histogram name="PageLoad.DocumentTiming.NavigationToDOMContentLoadedEventFired" - units="ms" expires_after="2023-09-03"> + units="ms" expires_after="2023-11-12"> <owner>bmcquade@chromium.org</owner> <owner>csharrison@chromium.org</owner> <summary> @@ -1636,7 +1636,7 @@ <histogram name="PageLoad.Experimental.InputTiming.InputToNavigationStart.FromLinkClick" - units="ms" expires_after="2023-09-10"> + units="ms" expires_after="2023-11-12"> <owner>spelchat@chromium.org</owner> <owner>chrome-brapp-loading@google.com</owner> <summary> @@ -1647,7 +1647,7 @@ <histogram name="PageLoad.Experimental.InputTiming.InputToNavigationStart.FromOmnibox" - units="ms" expires_after="2023-09-10"> + units="ms" expires_after="2023-11-12"> <owner>spelchat@chromium.org</owner> <owner>chrome-brapp-loading@google.com</owner> <summary> @@ -1853,7 +1853,7 @@ <histogram name="PageLoad.Experimental.NavigationTiming.NavigationStartToFirstRequestStart" - units="ms" expires_after="2023-08-27"> + units="ms" expires_after="2023-11-12"> <owner>nhiroki@chromium.org</owner> <owner>chrome-loading@google.com</owner> <summary> @@ -1864,7 +1864,7 @@ <histogram name="PageLoad.Experimental.NavigationTiming.NavigationStartToFirstResponseStart" - units="ms" expires_after="2023-09-03"> + units="ms" expires_after="2023-11-12"> <owner>nhiroki@chromium.org</owner> <owner>chrome-loading@google.com</owner> <summary> @@ -1875,7 +1875,7 @@ <histogram name="PageLoad.Experimental.NavigationTiming.NavigationStartToNavigationCommitSent" - units="ms" expires_after="2023-09-03"> + units="ms" expires_after="2023-11-12"> <owner>nhiroki@chromium.org</owner> <owner>chrome-loading@google.com</owner> <summary> @@ -2292,7 +2292,7 @@ </histogram> <histogram name="PageLoad.InteractiveTiming.ProcessingTime" units="ms" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>iclelland@chromium.org</owner> <owner>speed-metrics-dev@chromium.org</owner> <summary> @@ -2305,7 +2305,7 @@ </histogram> <histogram name="PageLoad.InteractiveTiming.TimeToNextPaint" units="ms" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>iclelland@chromium.org</owner> <owner>speed-metrics-dev@chromium.org</owner> <summary> @@ -2358,7 +2358,7 @@ </histogram> <histogram name="PageLoad.Internal.ErrorCode" enum="InternalErrorLoadEvent" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>csharrison@chromium.org</owner> <owner>bmcquade@chromium.org</owner> <summary> @@ -2556,7 +2556,7 @@ </histogram> <histogram name="PageLoad.Internal.SuppressedEventsCountBeforePaint" - units="count" expires_after="2023-09-10"> + units="count" expires_after="2023-11-12"> <owner>mehdika@chromium.org</owner> <owner>blink-interactions-team@google.com</owner> <summary> @@ -2573,7 +2573,7 @@ </histogram> <histogram name="PageLoad.Internal.SuppressedEventsTimingBeforePaint" - units="ms" expires_after="2023-09-10"> + units="ms" expires_after="2023-11-12"> <owner>mehdika@chromium.org</owner> <owner>blink-interactions-team@google.com</owner> <summary> @@ -2785,7 +2785,7 @@ </histogram> <histogram name="PageLoad.PageTiming.ForegroundDuration" units="ms" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>bmcquade@chromium.org</owner> <summary> For page loads that start in the foreground, measures the duration of time @@ -2822,7 +2822,7 @@ </histogram> <histogram name="PageLoad.PaintTiming.ForegroundToFirstContentfulPaint" - units="ms" expires_after="2023-09-03"> + units="ms" expires_after="2023-11-12"> <owner>sullivan@chromium.org</owner> <owner>speed-metrics-dev@chromium.org</owner> <summary> @@ -2985,7 +2985,7 @@ <histogram name="PageLoad.PaintTiming.NavigationToLargestContentfulPaint2.CrossSiteSubFrame" - units="ms" expires_after="2023-09-10"> + units="ms" expires_after="2023-11-12"> <owner>sisidovski@google.com</owner> <owner>kouhei@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/password/histograms.xml b/tools/metrics/histograms/metadata/password/histograms.xml index 6ce9c9e..57ba85d 100644 --- a/tools/metrics/histograms/metadata/password/histograms.xml +++ b/tools/metrics/histograms/metadata/password/histograms.xml
@@ -137,7 +137,7 @@ </histogram> <histogram name="KeyboardAccessory.AccessoryBarShown" - enum="AccessoryBarContents" expires_after="2023-09-03"> + enum="AccessoryBarContents" expires_after="2023-11-12"> <owner>fhorschig@chromium.org</owner> <owner>ioanap@chromium.org</owner> <summary> @@ -168,7 +168,7 @@ </histogram> <histogram name="KeyboardAccessory.AccessorySheetTriggered" - enum="AccessorySheetTrigger" expires_after="2023-09-03"> + enum="AccessorySheetTrigger" expires_after="2023-11-12"> <owner>fhorschig@chromium.org</owner> <owner>ioanap@chromium.org</owner> <summary> @@ -228,7 +228,7 @@ </histogram> <histogram name="PasswordBubble.BiometricAuthenticationPromo.AcceptClicked" - enum="BooleanSuccess" expires_after="2023-09-03"> + enum="BooleanSuccess" expires_after="2023-11-12"> <owner>vsemeniuk@google.com</owner> <owner>vasilii@chromium.org</owner> <summary> @@ -258,7 +258,7 @@ </histogram> <histogram name="PasswordBubble.DisplayDisposition" - enum="PasswordBubbleDisplayDisposition" expires_after="2023-09-10"> + enum="PasswordBubbleDisplayDisposition" expires_after="2023-11-12"> <owner>vasilii@chromium.org</owner> <summary> When the password management bubble opened, what state was it in? @@ -307,7 +307,7 @@ </histogram> <histogram name="PasswordGeneration.Event" enum="PasswordGenerationEvent" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>kazinova@google.com</owner> <owner>kolos@chromium.org</owner> <owner>vasilii@chromium.org</owner> @@ -324,7 +324,7 @@ </histogram> <histogram name="PasswordGeneration.GeneratedPasswordWasEdited" - enum="BooleanGeneratedPasswordWasEdited" expires_after="2023-09-10"> + enum="BooleanGeneratedPasswordWasEdited" expires_after="2023-11-12"> <owner>kolos@chromium.org</owner> <summary> Measures the frequency of user editing of generated passwords. Uploaded once @@ -376,7 +376,7 @@ </histogram> <histogram name="PasswordGeneration.UserDecision" - enum="PasswordGenerationUserEvent" expires_after="2023-08-27"> + enum="PasswordGenerationUserEvent" expires_after="2023-11-12"> <owner>ioanap@chromium.org</owner> <owner>vasilii@chromium.org</owner> <summary> @@ -394,7 +394,7 @@ </histogram> <histogram name="PasswordManager.AbleToSavePasswordsOnSuccessfulLogin" - enum="BooleanSuccess" expires_after="2023-09-10"> + enum="BooleanSuccess" expires_after="2023-11-12"> <owner>vasilii@chromium.org</owner> <owner>src/components/password_manager/OWNERS</owner> <summary> @@ -416,7 +416,7 @@ </histogram> <histogram name="PasswordManager.AccessPasswordInSettings" - enum="AccessPasswordInSettingsEvent" expires_after="2023-09-10"> + enum="AccessPasswordInSettingsEvent" expires_after="2023-11-12"> <owner>kazinova@google.com</owner> <owner>vasilii@chromium.org</owner> <summary> @@ -744,7 +744,7 @@ </histogram> <histogram name="PasswordManager.AffiliationDatabase.Error" - enum="SqliteLoggedResultCode" expires_after="2023-08-27"> + enum="SqliteLoggedResultCode" expires_after="2023-11-12"> <owner>vsemeniuk@google.com</owner> <owner>vasilii@chromium.org</owner> <summary> @@ -840,7 +840,7 @@ </histogram> <histogram name="PasswordManager.ApplySyncChanges.AddLoginSyncError" - enum="PasswordAddLoginSyncError" expires_after="2023-09-05"> + enum="PasswordAddLoginSyncError" expires_after="2023-11-12"> <owner>mamir@chromium.org</owner> <owner>mastiz@chromium.org</owner> <summary> @@ -851,7 +851,7 @@ </histogram> <histogram name="PasswordManager.ApplySyncChanges.UpdateLoginSyncError" - enum="PasswordUpdateLoginSyncError" expires_after="2023-09-05"> + enum="PasswordUpdateLoginSyncError" expires_after="2023-11-12"> <owner>mamir@chromium.org</owner> <owner>mastiz@chromium.org</owner> <summary> @@ -987,7 +987,7 @@ </histogram> <histogram name="PasswordManager.BiometricAvailabilityWin" - enum="BiometricAuthenticationStatusWin" expires_after="2023-09-10"> + enum="BiometricAuthenticationStatusWin" expires_after="2023-11-12"> <owner>vasilii@chromium.org</owner> <owner>vsemeniuk@google.com</owner> <summary> @@ -1037,7 +1037,7 @@ </histogram> <histogram name="PasswordManager.BulkCheck.CheckedCredentials" - units="credentials" expires_after="2023-09-10"> + units="credentials" expires_after="2023-11-12"> <owner>vasilii@chromium.org</owner> <owner>vsemeniuk@google.com</owner> <summary> @@ -1064,7 +1064,7 @@ <histogram name="PasswordManager.BulkCheck.CompromisedCredentialsCountAfterCheckAndroid" - units="credentials" expires_after="2023-09-10"> + units="credentials" expires_after="2023-11-12"> <owner>ioanap@chromium.org</owner> <owner>fhorschig@chromium.org</owner> <summary> @@ -1077,7 +1077,7 @@ </histogram> <histogram name="PasswordManager.BulkCheck.Error" - enum="PasswordLeakDetectionError" expires_after="2023-09-10"> + enum="PasswordLeakDetectionError" expires_after="2023-11-12"> <owner>vasilii@chromium.org</owner> <owner>vsemeniuk@google.com</owner> <summary>Error encountered during the password bulk check.</summary> @@ -1105,7 +1105,7 @@ </histogram> <histogram name="PasswordManager.BulkCheck.LeaksFound" units="credentials" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>vasilii@chromium.org</owner> <owner>vsemeniuk@google.com</owner> <summary> @@ -1117,7 +1117,7 @@ </histogram> <histogram name="PasswordManager.BulkCheck.PasswordCheckReferrer" - enum="PasswordCheckReferrer" expires_after="2023-09-03"> + enum="PasswordCheckReferrer" expires_after="2023-11-12"> <owner>vsemeniuk@google.com</owner> <owner>vasilii@chromium.org</owner> <summary> @@ -1127,7 +1127,7 @@ </histogram> <histogram name="PasswordManager.BulkCheck.PasswordCheckReferrerAndroid2" - enum="PasswordCheckReferrerAndroid" expires_after="M118"> + enum="PasswordCheckReferrerAndroid" expires_after="2023-11-12"> <owner>ioanap@chromium.org</owner> <owner>fhorschig@chromium.org</owner> <summary> @@ -1140,7 +1140,7 @@ </histogram> <histogram name="PasswordManager.BulkCheck.Time" units="ms" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>vasilii@chromium.org</owner> <owner>vsemeniuk@google.com</owner> <summary> @@ -1159,7 +1159,7 @@ </histogram> <histogram name="PasswordManager.BulkCheck.UserAction" - enum="PasswordCheckInteraction" expires_after="2023-09-10"> + enum="PasswordCheckInteraction" expires_after="2023-11-12"> <owner>vsemeniuk@google.com</owner> <owner>vasilii@chromium.org</owner> <summary> @@ -1206,7 +1206,7 @@ </histogram> <histogram name="PasswordManager.BulkCheck.UserActionAndroid" - enum="PasswordCheckUIUserActionAndroid" expires_after="2023-09-10"> + enum="PasswordCheckUIUserActionAndroid" expires_after="2023-11-12"> <owner>ioanap@chromium.org</owner> <owner>fhorschigg@chromium.org</owner> <summary>User actions performed on the Password Check settings view.</summary> @@ -1365,7 +1365,7 @@ </histogram> <histogram name="PasswordManager.CredentialsCountFromAccountStoreAfterUnlock" - units="credentials" expires_after="2023-09-10"> + units="credentials" expires_after="2023-11-12"> <owner>fhorschig@chromium.org</owner> <owner>mamir@chromium.org</owner> <summary> @@ -1558,7 +1558,7 @@ </histogram> <histogram name="PasswordManager.FieldNameCollisionInVotes" enum="Boolean" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>kolos@chromium.org</owner> <owner>khamutov@google.com</owner> <summary> @@ -1647,7 +1647,7 @@ </histogram> <histogram name="PasswordManager.FirstWaitForUsernameReason" - enum="PasswordManagerFirstWaitForUsernameReason" expires_after="2023-09-10"> + enum="PasswordManagerFirstWaitForUsernameReason" expires_after="2023-11-12"> <owner>kazinova@google.com</owner> <owner>battre@chromium.org</owner> <summary> @@ -1671,7 +1671,7 @@ </histogram> <histogram name="PasswordManager.FormVisited.PerProfileType" - enum="BrowserProfileType" expires_after="2023-08-27"> + enum="BrowserProfileType" expires_after="2023-11-12"> <owner>rhalavati@chromium.org</owner> <owner>chrome-privacy-core@google.com</owner> <summary> @@ -1880,7 +1880,7 @@ </histogram> <histogram name="PasswordManager.ImportedPasswordsPerUserInCSV" units="units" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>vasilii@chromium.org</owner> <owner>src/components/password_manager/OWNERS</owner> <summary> @@ -1890,7 +1890,7 @@ </histogram> <histogram name="PasswordManager.ImportEntryStatus" - enum="PasswordManagerImportEntryStatus" expires_after="2023-08-27"> + enum="PasswordManagerImportEntryStatus" expires_after="2023-11-12"> <owner>eliaskh@chromium.org</owner> <owner>natiahlyi@google.com</owner> <summary> @@ -2016,7 +2016,7 @@ </histogram> <histogram name="PasswordManager.LeakDetection.AnalyzeSingleLeakResponseResult" - enum="PasswordAnalyzeLeakResponseResult" expires_after="2023-09-10"> + enum="PasswordAnalyzeLeakResponseResult" expires_after="2023-11-12"> <owner>vsemeniuk@google.com</owner> <owner>vasilii@chromium.org</owner> <summary>Result of analyzing a single leak response.</summary> @@ -2024,7 +2024,7 @@ <histogram name="PasswordManager.LeakDetection.DialogDismissalReason" enum="PasswordLeakDetectionDialogDismissalReason" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>vsemeniuk@google.com</owner> <owner>vasilii@chromium.org</owner> <summary> @@ -2034,7 +2034,7 @@ </histogram> <histogram name="PasswordManager.LeakDetection.Error" - enum="PasswordLeakDetectionError" expires_after="2023-09-03"> + enum="PasswordLeakDetectionError" expires_after="2023-11-12"> <owner>vsemeniuk@google.com</owner> <owner>vasilii@chromium.org</owner> <summary> @@ -2043,7 +2043,7 @@ </histogram> <histogram name="PasswordManager.LeakDetection.HttpResponseCode" - enum="HttpResponseCode" expires_after="2023-09-03"> + enum="HttpResponseCode" expires_after="2023-11-12"> <owner>vsemeniuk@google.com</owner> <owner>vasilii@chromium.org</owner> <summary> @@ -2153,7 +2153,7 @@ </histogram> <histogram name="PasswordManager.ManagePasswordsReferrer" - enum="ManagePasswordsReferrer" expires_after="2023-09-03"> + enum="ManagePasswordsReferrer" expires_after="2023-11-12"> <owner>kazinova@google.com</owner> <owner>vasilii@chromium.org</owner> <summary> @@ -2164,7 +2164,7 @@ </histogram> <histogram name="PasswordManager.MatchedFormType" - enum="PasswordManagerMatchedFormType" expires_after="2023-09-10"> + enum="PasswordManagerMatchedFormType" expires_after="2023-11-12"> <owner>vsemeniuk@google.com</owner> <owner>vasilii@chromium.org</owner> <summary> @@ -2175,7 +2175,7 @@ </histogram> <histogram name="PasswordManager.MediationOptional" - enum="CredentialManagerGetResult" expires_after="2023-09-01"> + enum="CredentialManagerGetResult" expires_after="2023-11-12"> <owner>kazinova@google.com</owner> <owner>vasilii@chromium.org</owner> <summary> @@ -2455,7 +2455,7 @@ </histogram> <histogram name="PasswordManager.PasswordDropdownItemSelected" - enum="PasswordDropdownSelectedOption" expires_after="2023-09-10"> + enum="PasswordDropdownSelectedOption" expires_after="2023-11-12"> <owner>kazinova@google.com</owner> <owner>vasilii@chromium.org</owner> <summary> @@ -2562,7 +2562,7 @@ </histogram> <histogram name="PasswordManager.PasswordReuse.TotalPasswords" - units="credentials" expires_after="2023-08-27"> + units="credentials" expires_after="2023-11-12"> <owner>vakh@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary> @@ -2653,7 +2653,7 @@ </histogram> <histogram name="PasswordManager.PasswordsGrouping.Time" units="ms" - expires_after="2023-09-01"> + expires_after="2023-11-12"> <owner>vsemeniuk@google.com</owner> <owner>vasilii@chromium.org</owner> <summary> @@ -3210,7 +3210,7 @@ </histogram> <histogram name="PasswordManager.ReuseCheck.CheckedPasswords" units="passwords" - expires_after="2023-09-01"> + expires_after="2023-11-12"> <owner>vsemeniuk@google.com</owner> <owner>vasilii@chromium.org</owner> <summary> @@ -3221,7 +3221,7 @@ </histogram> <histogram name="PasswordManager.ReuseCheck.ReusedPasswords" units="passwords" - expires_after="2023-09-01"> + expires_after="2023-11-12"> <owner>vsemeniuk@google.com</owner> <owner>vasilii@chromium.org</owner> <summary> @@ -3232,7 +3232,7 @@ </histogram> <histogram name="PasswordManager.ReuseCheck.Time" units="ms" - expires_after="2023-09-01"> + expires_after="2023-11-12"> <owner>vsemeniuk@google.com</owner> <owner>vasilii@chromium.org</owner> <summary> @@ -3456,7 +3456,7 @@ </histogram> <histogram name="PasswordManager.SubmittedFormFrame2" - enum="SubmittedPasswordFormFrame" expires_after="2023-09-10"> + enum="SubmittedPasswordFormFrame" expires_after="2023-11-12"> <owner>kazinova@google.com</owner> <owner>vasilii@chromium.org</owner> <summary> @@ -3478,7 +3478,7 @@ </histogram> <histogram name="PasswordManager.SuccessfulLoginHappened" - enum="BooleanSuccessfulLoginHappenedOnHttps" expires_after="2023-09-10"> + enum="BooleanSuccessfulLoginHappenedOnHttps" expires_after="2023-11-12"> <owner>kazinova@google.com</owner> <owner>kolos@chromium.org</owner> <summary> @@ -3611,7 +3611,7 @@ </histogram> <histogram name="PasswordManager.TouchToFill.CredentialIndex" units="index" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>ioanap@chromium.org</owner> <owner>fhorschig@chromium.org</owner> <owner>kolos@chromium.org</owner> @@ -3622,7 +3622,7 @@ </histogram> <histogram name="PasswordManager.TouchToFill.DismissalReason" - enum="BottomSheet.StateChangeReason" expires_after="2023-09-03"> + enum="BottomSheet.StateChangeReason" expires_after="2023-11-12"> <owner>ioanap@chromium.org</owner> <owner>fhorschig@chromium.org</owner> <owner>kolos@chromium.org</owner> @@ -3640,7 +3640,7 @@ </histogram> <histogram name="PasswordManager.TouchToFill.Outcome" - enum="TouchToFill.Outcome" expires_after="2023-09-03"> + enum="TouchToFill.Outcome" expires_after="2023-11-12"> <owner>ioanap@chromium.org</owner> <owner>fhorschig@chromium.org</owner> <owner>kolos@chromium.org</owner> @@ -3652,7 +3652,7 @@ </histogram> <histogram name="PasswordManager.TouchToFill.SubmissionReadiness" - enum="TouchToFill.SubmissionReadiness" expires_after="2023-09-03"> + enum="TouchToFill.SubmissionReadiness" expires_after="2023-11-12"> <owner>kolos@chromium.org</owner> <owner>fhorschig@chromium.org</owner> <summary> @@ -3664,7 +3664,7 @@ </histogram> <histogram name="PasswordManager.TouchToFill.SuccessfulSubmissionWasObserved" - enum="Boolean" expires_after="2023-09-10"> + enum="Boolean" expires_after="2023-11-12"> <owner>ioanap@chromium.org</owner> <owner>fhorschig@chromium.org</owner> <owner>kolos@chromium.org</owner> @@ -3684,7 +3684,7 @@ </histogram> <histogram name="PasswordManager.TouchToFill.TimeToSuccessfulLogin" units="ms" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>ioanap@chromium.org</owner> <owner>fhorschig@chromium.org</owner> <owner>kolos@chromium.org</owner> @@ -3802,7 +3802,7 @@ </histogram> <histogram name="PasswordManager.UpdateUIDismissalReason" - enum="PasswordManagerUIDismissalReason" expires_after="2023-09-10"> + enum="PasswordManagerUIDismissalReason" expires_after="2023-11-12"> <owner>vasilii@chromium.org</owner> <summary>Why was the update password UI (bubble or infobar) closed?</summary> </histogram> @@ -3819,7 +3819,7 @@ </histogram> <histogram name="PasswordManager.UPMUnenrollmentReason" - enum="PasswordStoreAndroidBackendAPIError" expires_after="2023-09-10"> + enum="PasswordStoreAndroidBackendAPIError" expires_after="2023-11-12"> <owner>ioanap@chromium.org</owner> <owner>izuzic@google.com</owner> <summary> @@ -3865,7 +3865,7 @@ </histogram> <histogram name="PasswordManager.WeakCheck.PasswordScore" - enum="PasswordWeaknessScore" expires_after="2023-08-27"> + enum="PasswordWeaknessScore" expires_after="2023-11-12"> <owner>kazinova@google.com</owner> <owner>vasilii@chromium.org</owner> <summary> @@ -3885,14 +3885,14 @@ </histogram> <histogram name="PasswordManager.WeakCheck.Time" units="ms" - expires_after="2023-09-01"> + expires_after="2023-11-12"> <owner>kazinova@google.com</owner> <owner>vasilii@chromium.org</owner> <summary>The time it took to complete the passwords weak check.</summary> </histogram> <histogram name="PasswordManager.WeakCheck.WeakPasswords" units="passwords" - expires_after="2023-09-01"> + expires_after="2023-11-12"> <owner>kazinova@google.com</owner> <owner>vasilii@chromium.org</owner> <summary> @@ -4018,7 +4018,7 @@ </histogram> <histogram name="PasswordManager.{Store}InaccessiblePasswords3" - units="saved passwords" expires_after="2023-06-26"> + units="saved passwords" expires_after="2023-11-26"> <owner>derinel@google.com</owner> <owner>vasilii@chromium.org</owner> <owner>mamir@chromium.org</owner> @@ -4262,7 +4262,7 @@ </histogram> <histogram name="PasswordProtection.ModalWarningDialogAction" - enum="PasswordProtectionWarningAction" expires_after="2023-08-27"> + enum="PasswordProtectionWarningAction" expires_after="2023-11-12"> <owner>vakh@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary> @@ -4296,7 +4296,7 @@ </histogram> <histogram base="true" name="PasswordProtection.PasswordAlertModeOutcome" - enum="PasswordProtectionRequestOutcome" expires_after="2023-08-27"> + enum="PasswordProtectionRequestOutcome" expires_after="2023-11-12"> <owner>xinghuilu@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary> @@ -4308,7 +4308,7 @@ </histogram> <histogram name="PasswordProtection.PasswordProtectionResponseOrErrorCode" - enum="CombinedHttpResponseAndNetErrorCode" expires_after="2023-09-10"> + enum="CombinedHttpResponseAndNetErrorCode" expires_after="2023-11-12"> <owner>drubery@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary> @@ -4332,7 +4332,7 @@ </histogram> <histogram name="PasswordProtection.RequestNetworkDuration" units="ms" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>drubery@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/payment/histograms.xml b/tools/metrics/histograms/metadata/payment/histograms.xml index 6b527d6..2f4645e3 100644 --- a/tools/metrics/histograms/metadata/payment/histograms.xml +++ b/tools/metrics/histograms/metadata/payment/histograms.xml
@@ -95,7 +95,7 @@ </histogram> <histogram name="PaymentRequest.Events2" units="bitfield value" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>rouslan@chromium.org</owner> <owner>web-payments-team@google.com</owner> <summary> @@ -173,7 +173,7 @@ </histogram> <histogram name="PaymentRequest.PaymentHandlerInstallSuccess" - enum="BooleanSuccess" expires_after="2023-09-10"> + enum="BooleanSuccess" expires_after="2023-11-12"> <owner>rouslan@chromium.org</owner> <owner>web-payments-team@google.com</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/pdf/histograms.xml b/tools/metrics/histograms/metadata/pdf/histograms.xml index d6375199..6468bed 100644 --- a/tools/metrics/histograms/metadata/pdf/histograms.xml +++ b/tools/metrics/histograms/metadata/pdf/histograms.xml
@@ -23,7 +23,7 @@ <histograms> <histogram name="PDF.Actions" enum="ChromePDFViewerActions" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>hnakashima@chromium.org</owner> <summary> Tracks user actions in the PDF viewer. Logged when the document is opened @@ -36,7 +36,7 @@ </histogram> <histogram name="PDF.AttachmentType" enum="ViewFileType" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>nigi@chromium.org</owner> <owner>thestig@chromium.org</owner> <summary> @@ -59,7 +59,7 @@ </summary> </histogram> -<histogram name="PDF.HasAttachment" enum="Boolean" expires_after="2023-08-27"> +<histogram name="PDF.HasAttachment" enum="Boolean" expires_after="2023-11-12"> <owner>nigi@chromium.org</owner> <owner>thestig@chromium.org</owner> <summary> @@ -96,7 +96,7 @@ </summary> </histogram> -<histogram name="PDF.PageCount" units="pages" expires_after="2023-08-27"> +<histogram name="PDF.PageCount" units="pages" expires_after="2023-11-12"> <owner>hnakashima@chromium.org</owner> <owner>thestig@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/performance_controls/histograms.xml b/tools/metrics/histograms/metadata/performance_controls/histograms.xml index 8c31f9bb..82920e1 100644 --- a/tools/metrics/histograms/metadata/performance_controls/histograms.xml +++ b/tools/metrics/histograms/metadata/performance_controls/histograms.xml
@@ -29,7 +29,7 @@ </histogram> <histogram name="PerformanceControls.BatterySaver.IPHOpenSettings" - units="BooleanSettingsOpened" expires_after="2023-09-10"> + units="BooleanSettingsOpened" expires_after="2023-11-12"> <owner>agale@chromium.org</owner> <owner>estalin@chromium.org</owner> <owner>chrome-performance-ui-sea@google.com</owner> @@ -42,7 +42,7 @@ </histogram> <histogram name="PerformanceControls.BatterySaver.SettingsChangeMode" - enum="BatterySaverModeState" expires_after="2023-09-03"> + enum="BatterySaverModeState" expires_after="2023-11-12"> <owner>charlesmeng@chromium.org</owner> <owner>chrome-performance-ui-sea@google.com</owner> <summary> @@ -53,7 +53,7 @@ </histogram> <histogram name="PerformanceControls.HighEfficiency.BubbleAction" - enum="HighEfficiencyBubbleActionType" expires_after="2023-09-03"> + enum="HighEfficiencyBubbleActionType" expires_after="2023-11-12"> <owner>agale@chromium.org</owner> <owner>chrome-performance-ui-sea@google.com</owner> <summary> @@ -102,7 +102,7 @@ <histogram name="PerformanceControls.HighEfficiency.SettingsChangeExceptionList" - enum="HighEfficiencyModeExceptionListAction" expires_after="2023-09-03"> + enum="HighEfficiencyModeExceptionListAction" expires_after="2023-11-12"> <owner>charlesmeng@chromium.org</owner> <owner>chrome-performance-ui-sea@google.com</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/performance_manager/histograms.xml b/tools/metrics/histograms/metadata/performance_manager/histograms.xml index 32de8fad..f2010b6 100644 --- a/tools/metrics/histograms/metadata/performance_manager/histograms.xml +++ b/tools/metrics/histograms/metadata/performance_manager/histograms.xml
@@ -45,7 +45,7 @@ </histogram> <histogram name="PerformanceManager.UserTuning.EfficiencyMode" - enum="EfficiencyMode" expires_after="2023-09-10"> + enum="EfficiencyMode" expires_after="2023-11-12"> <owner>anthonyvd@chromium.org</owner> <owner>chrome-catan@google.com</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/permissions/histograms.xml b/tools/metrics/histograms/metadata/permissions/histograms.xml index 468cb6f..41eafb0 100644 --- a/tools/metrics/histograms/metadata/permissions/histograms.xml +++ b/tools/metrics/histograms/metadata/permissions/histograms.xml
@@ -508,7 +508,7 @@ </histogram> <histogram name="Permissions.Engagement.Accepted" units="%" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>engedy@chromium.org</owner> <owner>src/components/permissions/PERMISSIONS_OWNERS</owner> <summary> @@ -633,7 +633,7 @@ </histogram> <histogram name="Permissions.MissingOSLevelPermission.Action" - enum="PermissionAction" expires_after="2023-09-10"> + enum="PermissionAction" expires_after="2023-11-12"> <owner>andypaicu@chromium.org</owner> <owner>engedy@chromium.org</owner> <owner>hkamila@chromium.org</owner> @@ -645,7 +645,7 @@ </histogram> <histogram name="Permissions.MissingOSLevelPermission.ShouldShow" - enum="Boolean" expires_after="2023-09-10"> + enum="Boolean" expires_after="2023-11-12"> <owner>andypaicu@chromium.org</owner> <owner>engedy@chromium.org</owner> <owner>hkamila@chromium.org</owner> @@ -806,7 +806,7 @@ </histogram> <histogram name="Permissions.Prompt.Accepted" enum="PermissionRequestType" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>engedy@chromium.org</owner> <owner>src/components/permissions/PERMISSIONS_OWNERS</owner> <summary> @@ -880,7 +880,7 @@ </histogram> <histogram name="Permissions.Prompt.Denied" enum="PermissionRequestType" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>engedy@chromium.org</owner> <owner>src/components/permissions/PERMISSIONS_OWNERS</owner> <summary> @@ -980,7 +980,7 @@ </histogram> <histogram name="Permissions.Prompt.Notifications.EnabledAppLevel" - enum="Boolean" expires_after="2023-08-27"> + enum="Boolean" expires_after="2023-11-12"> <owner>engedy@chromium.org</owner> <owner>src/components/permissions/PERMISSIONS_OWNERS</owner> <summary> @@ -993,7 +993,7 @@ </histogram> <histogram name="Permissions.Prompt.Shown" enum="PermissionRequestType" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>engedy@chromium.org</owner> <owner>src/components/permissions/PERMISSIONS_OWNERS</owner> <summary> @@ -1316,7 +1316,7 @@ </histogram> <histogram base="true" name="Permissions.Usage.ElapsedTimeSinceGrant" - units="seconds" expires_after="2023-09-03"> + units="seconds" expires_after="2023-11-12"> <owner>engedy@chromium.org</owner> <owner>src/components/permissions/PERMISSIONS_OWNERS</owner> <summary> @@ -1327,7 +1327,7 @@ </histogram> <histogram name="Permissions.WebHid.ChooserClosed" enum="WebHidChooserClosed" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>mattreynolds@chromium.org</owner> <owner>deviceapi-team@google.com</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/platform/histograms.xml b/tools/metrics/histograms/metadata/platform/histograms.xml index 079597f..e6cca782 100644 --- a/tools/metrics/histograms/metadata/platform/histograms.xml +++ b/tools/metrics/histograms/metadata/platform/histograms.xml
@@ -580,7 +580,7 @@ </histogram> <histogram name="Platform.Fwupd.ActivateStatus" enum="FwupdReturnValue" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>campello@google.com</owner> <owner>chromeos-fwupd@google.com</owner> <summary> @@ -590,7 +590,7 @@ </histogram> <histogram name="Platform.Fwupd.UpdateDuration" units="seconds" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>campello@google.com</owner> <owner>chromeos-fwupd@google.com</owner> <summary> @@ -600,7 +600,7 @@ </histogram> <histogram name="Platform.Fwupd.UpdateStatus" enum="FwupdReturnValue" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>campello@google.com</owner> <owner>chromeos-fwupd@google.com</owner> <summary> @@ -1285,7 +1285,7 @@ </histogram> <histogram name="Platform.Missive.MemoryUsage" units="0.1MiB" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>xuhong@chromium.org</owner> <owner>lbaraz@chromium.org</owner> <owner>cros-reporting-team@google.com</owner> @@ -1333,7 +1333,7 @@ </histogram> <histogram name="Platform.Missive.StorageUsage" units="MiB" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>xuhong@chromium.org</owner> <owner>lbaraz@chromium.org</owner> <owner>cros-reporting-team@google.com</owner> @@ -1425,7 +1425,7 @@ </histogram> <histogram name="Platform.MountEncrypted.EncryptionKeyStatus" - enum="MountEncryptedEncryptionKeyStatus" expires_after="2023-09-10"> + enum="MountEncryptedEncryptionKeyStatus" expires_after="2023-11-12"> <owner>apronin@chromium.org</owner> <owner>mnissler@chromium.org</owner> <owner>cros-hwsec+uma@chromium.org</owner> @@ -1437,7 +1437,7 @@ </histogram> <histogram name="Platform.MountEncrypted.SystemKeyStatus" - enum="MountEncryptedSystemKeyStatus" expires_after="2023-09-10"> + enum="MountEncryptedSystemKeyStatus" expires_after="2023-11-12"> <owner>apronin@chromium.org</owner> <owner>mnissler@chromium.org</owner> <owner>cros-hwsec+uma@chromium.org</owner> @@ -1543,7 +1543,7 @@ </histogram> <histogram name="Platform.SmartTransferErrors" units="units" - expires_after="2023-09-08"> + expires_after="2023-11-12"> <owner>gwendal@google.com</owner> <owner>chromeos-storage@google.com</owner> <summary>Disk communication errors (SMART 199), sent at boot.</summary> @@ -1645,7 +1645,7 @@ </histogram> <histogram name="Platform.StatefulWritesDaily" units="KiB" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>asavery@chromium.org</owner> <owner>gwendal@chromium.org</owner> <owner>chromeos-storage@google.com</owner> @@ -1691,7 +1691,7 @@ </summary> </histogram> -<histogram name="Platform.SwapInDaily" units="pages" expires_after="2023-09-03"> +<histogram name="Platform.SwapInDaily" units="pages" expires_after="2023-11-12"> <owner>asavery@chromium.org</owner> <owner>chromeos-memory@google.com</owner> <summary>Number of pages swapped IN over a day, sampled daily.</summary> @@ -1716,7 +1716,7 @@ </histogram> <histogram name="Platform.SwapOutDaily" units="pages" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>asavery@chromium.org</owner> <owner>chromeos-memory@google.com</owner> <summary>Number of pages swapped OUT over a day, sampled daily.</summary> @@ -1750,7 +1750,7 @@ </histogram> <histogram name="Platform.TPM.AuthErrorCode" enum="TPMResultCodeEnum" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>yich@google.com</owner> <owner>cros-hwsec-userland-eng+uma@google.com</owner> <summary> @@ -1781,7 +1781,7 @@ </histogram> <histogram name="Platform.TPM.DictionaryAttackCounter" units="units" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>cylai@chromium.org</owner> <owner>cros-hwsec-userland-eng+uma@google.com</owner> <summary> @@ -1801,7 +1801,7 @@ </histogram> <histogram name="Platform.TPM.ErrorCode" enum="TPMResultCodeEnum" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>yich@google.com</owner> <owner>cros-hwsec-userland-eng+uma@google.com</owner> <summary> @@ -1919,7 +1919,7 @@ </histogram> <histogram name="Platform.TPM.VersionFingerprint" enum="TPMVersionFingerprint" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>mnissler@chromium.org</owner> <owner>cros-hwsec+uma@chromium.org</owner> <summary> @@ -1990,7 +1990,7 @@ </histogram> <histogram name="Platform.Trunks.FirstTimeoutWritingTime" units="seconds" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>chingkang@chromium.org</owner> <owner>cros-hwsec+uma@chromium.org</owner> <summary>System uptime when first timeout writing TPM command occurs</summary> @@ -2018,7 +2018,7 @@ </histogram> <histogram name="Platform.Trunks.TransitionedWriteErrorNo" - enum="PopularOSErrno" expires_after="2023-08-01"> + enum="PopularOSErrno" expires_after="2023-11-12"> <owner>cylai@google.com</owner> <owner>chingkang@chromium.org</owner> <owner>cros-hwsec+uma@chromium.org</owner>
diff --git a/tools/metrics/histograms/metadata/plugin_vm/histograms.xml b/tools/metrics/histograms/metadata/plugin_vm/histograms.xml index bdc8ff25..dc338d91 100644 --- a/tools/metrics/histograms/metadata/plugin_vm/histograms.xml +++ b/tools/metrics/histograms/metadata/plugin_vm/histograms.xml
@@ -30,7 +30,7 @@ </histogram> <histogram name="PluginVm.EngagementTime.Background" units="ms" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>timloh@google.com</owner> <owner>joelhockey@google.com</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/power/histograms.xml b/tools/metrics/histograms/metadata/power/histograms.xml index b0ef2d9..f40b5476 100644 --- a/tools/metrics/histograms/metadata/power/histograms.xml +++ b/tools/metrics/histograms/metadata/power/histograms.xml
@@ -738,7 +738,7 @@ </histogram> <histogram name="Power.AmbientLightOnResume" units="lux" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>bkersten@chromium.org</owner> <owner>slangley@chromium.org</owner> <summary> @@ -1112,7 +1112,7 @@ <token key="BatteryCapacityType" variants="BatteryCapacityType"/> </histogram> -<histogram name="Power.BatteryPercentDrop" units="%" expires_after="2023-08-27"> +<histogram name="Power.BatteryPercentDrop" units="%" expires_after="2023-11-12"> <owner>ryansturm@chromium.org</owner> <owner>tbansal@chromium.org</owner> <summary> @@ -1294,7 +1294,7 @@ </histogram> <histogram name="Power.CpuTimeSecondsPerProcessType" enum="ProcessType2" - expires_after="2023-10-22"> + expires_after="2023-11-12"> <owner>eseckler@chromium.org</owner> <owner>skyostil@chromium.org</owner> <owner>woa-performance@google.com</owner> @@ -1700,7 +1700,7 @@ </histogram> <histogram name="Power.ForegroundRadio.Wakeups.Cell.30Seconds" - enum="RadioSignalLevel" expires_after="2023-08-27"> + enum="RadioSignalLevel" expires_after="2023-11-12"> <owner>eseckler@chromium.org</owner> <owner>khokhlov@google.com</owner> <owner>skyostil@chromium.org</owner> @@ -1974,7 +1974,7 @@ </histogram> <histogram name="Power.IOPMPowerSource.SamplingEventDelta.MediumTimes" - units="ms" expires_after="2023-08-08"> + units="ms" expires_after="2023-11-12"> <owner>pmonette@chromium.org</owner> <owner>catan-team@chromium.org</owner> <summary> @@ -2138,7 +2138,7 @@ </histogram> <histogram name="Power.PC10inS0ixRuntimeResidencyRate" units="%" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>skardach@google.com</owner> <owner>svenva@google.com</owner> <owner>chromeos-platform-power@google.com</owner> @@ -2157,7 +2157,7 @@ </histogram> <histogram name="Power.PC10RuntimeResidencyRate" units="%" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>skardach@google.com</owner> <owner>svenva@google.com</owner> <owner>chromeos-platform-power@google.com</owner> @@ -2477,7 +2477,7 @@ </histogram> <histogram name="PowerML.ModelNoDim.Result" enum="PowerMLFinalResult" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>napper@chromium.org</owner> <owner>thanhdng@chromium.org</owner> <summary> @@ -2552,7 +2552,7 @@ </histogram> <histogram name="PowerML.SmartDimModel.RequestCanceledDuration" units="ms" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>amoylan@chromium.org</owner> <owner>napper@chromium.org</owner> <owner>napper@chromium.org</owner> @@ -2564,7 +2564,7 @@ </histogram> <histogram name="PowerML.SmartDimModel.RequestCompleteDuration" units="ms" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>amoylan@chromium.org</owner> <owner>napper@chromium.org</owner> <owner>napper@chromium.org</owner>
diff --git a/tools/metrics/histograms/metadata/prefetch/histograms.xml b/tools/metrics/histograms/metadata/prefetch/histograms.xml index c6865bf..169ea01 100644 --- a/tools/metrics/histograms/metadata/prefetch/histograms.xml +++ b/tools/metrics/histograms/metadata/prefetch/histograms.xml
@@ -76,7 +76,7 @@ </histogram> <histogram name="PrefetchProxy.AfterClick.Mainframe.CookieCopyTime" units="ms" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>curranmax@chromium.org</owner> <owner>ryansturm@chromium.org</owner> <owner>spelchat@chromium.org</owner> @@ -93,7 +93,7 @@ </histogram> <histogram name="PrefetchProxy.AfterClick.Mainframe.CookieReadTime" units="ms" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>curranmax@chromium.org</owner> <owner>ryansturm@chromium.org</owner> <owner>spelchat@chromium.org</owner> @@ -112,7 +112,7 @@ </histogram> <histogram name="PrefetchProxy.AfterClick.Mainframe.CookieWaitTime" units="ms" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>curranmax@chromium.org</owner> <owner>ryansturm@chromium.org</owner> <owner>spelchat@chromium.org</owner> @@ -130,7 +130,7 @@ </histogram> <histogram name="PrefetchProxy.AfterClick.Mainframe.CookieWriteTime" units="ms" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>curranmax@chromium.org</owner> <owner>ryansturm@chromium.org</owner> <owner>spelchat@chromium.org</owner> @@ -303,7 +303,7 @@ </histogram> <histogram name="PrefetchProxy.Prefetch.ExistingPrefetchWithMatchingURL" - units="Boolean" expires_after="2023-08-27"> + units="Boolean" expires_after="2023-11-12"> <owner>curranmax@chromium.org</owner> <owner>ryansturm@chromium.org</owner> <owner>spelchat@chromium.org</owner> @@ -315,7 +315,7 @@ </histogram> <histogram name="PrefetchProxy.Prefetch.Mainframe.BodyLength" units="bytes" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>curranmax@chromium.org</owner> <owner>ryansturm@chromium.org</owner> <owner>spelchat@chromium.org</owner> @@ -327,7 +327,7 @@ </histogram> <histogram name="PrefetchProxy.Prefetch.Mainframe.ConnectTime" units="ms" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>curranmax@chromium.org</owner> <owner>ryansturm@chromium.org</owner> <owner>spelchat@chromium.org</owner> @@ -350,7 +350,7 @@ </histogram> <histogram name="PrefetchProxy.Prefetch.Mainframe.NetError" - enum="NetErrorCodes" expires_after="2023-08-27"> + enum="NetErrorCodes" expires_after="2023-11-12"> <owner>curranmax@chromium.org</owner> <owner>ryansturm@chromium.org</owner> <owner>spelchat@chromium.org</owner> @@ -423,7 +423,7 @@ </histogram> <histogram name="PrefetchProxy.Prefetch.NumExistingPrefetchWithMatchingURL" - units="count" expires_after="2023-08-27"> + units="count" expires_after="2023-11-12"> <owner>curranmax@chromium.org</owner> <owner>ryansturm@chromium.org</owner> <owner>spelchat@chromium.org</owner> @@ -518,7 +518,7 @@ </histogram> <histogram name="PrefetchProxy.Proxy.RespCode" enum="HttpResponseCode" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>curranmax@chromium.org</owner> <owner>ryansturm@chromium.org</owner> <owner>spelchat@chromium.org</owner> @@ -543,7 +543,7 @@ </histogram> <histogram name="PrefetchProxy.Redirect.Result" enum="PrefetchRedirectResult" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>curranmax@chromium.org</owner> <owner>ryansturm@chromium.org</owner> <owner>spelchat@chromium.org</owner>
diff --git a/tools/metrics/histograms/metadata/print/histograms.xml b/tools/metrics/histograms/metadata/print/histograms.xml index fff2f0a..b8b7560 100644 --- a/tools/metrics/histograms/metadata/print/histograms.xml +++ b/tools/metrics/histograms/metadata/print/histograms.xml
@@ -66,7 +66,7 @@ </histogram> <histogram name="PrintPreview.NumberOfPrinters" units="units" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>thestig@chromium.org</owner> <owner>dhoss@chromium.org</owner> <summary> @@ -87,7 +87,7 @@ </histogram> <histogram name="PrintPreview.PrintDocumentType" - enum="PrintPreviewPrintDocumentTypeBuckets" expires_after="2023-09-03"> + enum="PrintPreviewPrintDocumentTypeBuckets" expires_after="2023-11-12"> <owner>rbpotter@chromium.org</owner> <owner>awscreen@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/printing/histograms.xml b/tools/metrics/histograms/metadata/printing/histograms.xml index 7523b3dd..5379407 100644 --- a/tools/metrics/histograms/metadata/printing/histograms.xml +++ b/tools/metrics/histograms/metadata/printing/histograms.xml
@@ -23,7 +23,7 @@ <histograms> <histogram name="Printing.ConversionSize.Emf" units="KB" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>thestig@chromium.org</owner> <owner>awscreen@chromium.org</owner> <summary> @@ -118,7 +118,7 @@ </histogram> <histogram name="Printing.CUPS.IppDeviceReachable" enum="BooleanSuccess" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>bmgordon@chromium.org</owner> <owner>cros-printing-dev@chromium.org</owner> <summary> @@ -195,7 +195,7 @@ </histogram> <histogram name="Printing.CUPS.NearbyNetworkPrintersCount" units="printers" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>bmgordon@chromium.org</owner> <owner>project-bolton@google.com</owner> <summary> @@ -206,7 +206,7 @@ </histogram> <histogram name="Printing.CUPS.PrintDocumentSize" units="KB" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>bmgordon@chromium.org</owner> <owner>project-bolton@google.com</owner> <summary> @@ -216,7 +216,7 @@ </histogram> <histogram name="Printing.CUPS.PrinterAdded" enum="PrinterProtocol" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>bmgordon@chromium.org</owner> <owner>src/chromeos/printing/OWNERS</owner> <summary> @@ -250,7 +250,7 @@ </histogram> <histogram name="Printing.CUPS.PrintersDiscovered" units="printers" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>bmgordon@chromium.org</owner> <owner>src/chromeos/printing/OWNERS</owner> <summary> @@ -274,7 +274,7 @@ </histogram> <histogram name="Printing.CUPS.PrinterSetupResult.PrintPreview" - enum="PrinterSetupResult" expires_after="2023-09-03"> + enum="PrinterSetupResult" expires_after="2023-11-12"> <owner>bmgordon@chromium.org</owner> <owner>cros-printing-dev@chromium.org</owner> <summary> @@ -299,7 +299,7 @@ </histogram> <histogram name="Printing.CUPS.PrinterStatusQueryResult" - enum="PrinterStatusQueryResult" expires_after="2023-09-10"> + enum="PrinterStatusQueryResult" expires_after="2023-11-12"> <owner>gavinwill@chromium.org</owner> <owner>cros-peripherals@google.com</owner> <summary> @@ -331,7 +331,7 @@ </histogram> <histogram name="Printing.CUPS.ProtocolUsed" enum="PrinterProtocol" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>bmgordon@chromium.org</owner> <owner>cros-printing-dev@chromium.org</owner> <summary> @@ -353,7 +353,7 @@ </histogram> <histogram name="Printing.CUPS.TotalNetworkPrintersCount" units="printers" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>bmgordon@chromium.org</owner> <owner>project-bolton@google.com</owner> <summary> @@ -401,7 +401,7 @@ </histogram> <histogram name="Printing.CUPS.ZeroconfPrinterSetupResult.PrintPreview" - enum="PrinterSetupResult" expires_after="2023-09-03"> + enum="PrinterSetupResult" expires_after="2023-11-12"> <owner>bmgordon@chromium.org</owner> <owner>cros-printing-dev@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/privacy/histograms.xml b/tools/metrics/histograms/metadata/privacy/histograms.xml index cba278b..08a7055 100644 --- a/tools/metrics/histograms/metadata/privacy/histograms.xml +++ b/tools/metrics/histograms/metadata/privacy/histograms.xml
@@ -336,7 +336,7 @@ </histogram> <histogram name="Privacy.DIPS.DIPSErrorCodes" enum="DIPSErrorCode" - expires_after="2023-09-13"> + expires_after="2023-11-12"> <owner>wanderview@chromium.org</owner> <owner>src/chrome/browser/dips/OWNERS</owner> <summary> @@ -586,7 +586,7 @@ <histogram name="PrivacySandbox.AggregationService.ScheduledRequests.NumRetriesBeforeSuccess" - units="retries" expires_after="M117"> + units="retries" expires_after="2023-11-12"> <owner>alexmt@chromium.org</owner> <owner>linnan@chromium.org</owner> <summary> @@ -597,7 +597,7 @@ </histogram> <histogram name="PrivacySandbox.AggregationService.ScheduledRequests.Status" - enum="AggregationServiceObserverReportStatus" expires_after="M117"> + enum="AggregationServiceObserverReportStatus" expires_after="2023-11-12"> <owner>alexmt@chromium.org</owner> <owner>linnan@chromium.org</owner> <summary> @@ -647,7 +647,7 @@ <histogram name="PrivacySandbox.AggregationService.Storage.Sql.StoreRequestHasCapacity" - enum="Boolean" expires_after="M117"> + enum="Boolean" expires_after="2023-11-12"> <owner>alexmt@chromium.org</owner> <owner>linnan@chromium.org</owner> <summary> @@ -658,7 +658,7 @@ </histogram> <histogram name="PrivacySandbox.AggregationService.UnscheduledRequests.Status" - enum="AggregationServiceObserverReportStatus" expires_after="M117"> + enum="AggregationServiceObserverReportStatus" expires_after="2023-11-12"> <owner>alexmt@chromium.org</owner> <owner>linnan@chromium.org</owner> <summary> @@ -687,7 +687,7 @@ <histogram name="PrivacySandbox.PrivateAggregation.Budgeter.RequestResult" enum="PrivacySandboxPrivateAggregationBudgeterRequestResult" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>alexmt@chromium.org</owner> <owner>linnan@chromium.org</owner> <summary> @@ -711,7 +711,7 @@ <histogram name="PrivacySandbox.PrivateAggregation.BudgetStorage.ShutdownBeforeFinishingInitialization" - enum="Boolean" expires_after="M117"> + enum="Boolean" expires_after="2023-11-12"> <owner>alexmt@chromium.org</owner> <owner>linnan@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/privacy_budget/histograms.xml b/tools/metrics/histograms/metadata/privacy_budget/histograms.xml index cafad109..261fcf3 100644 --- a/tools/metrics/histograms/metadata/privacy_budget/histograms.xml +++ b/tools/metrics/histograms/metadata/privacy_budget/histograms.xml
@@ -17,7 +17,7 @@ <histograms> <histogram name="PrivacyBudget.ClockDrift.FetchLatencyVariance" units="ms^2" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>antoniosartori@chromium.org</owner> <owner>areimers@chromium.org</owner> <summary> @@ -29,7 +29,7 @@ </histogram> <histogram name="PrivacyBudget.ClockDrift.Magnitude.Negative" - units="microseconds/s" expires_after="2023-09-03"> + units="microseconds/s" expires_after="2023-11-12"> <owner>antoniosartori@chromium.org</owner> <owner>areimers@chromium.org</owner> <summary> @@ -41,7 +41,7 @@ </histogram> <histogram name="PrivacyBudget.ClockDrift.Magnitude.Positive" - units="microseconds/s" expires_after="2023-09-03"> + units="microseconds/s" expires_after="2023-11-12"> <owner>antoniosartori@chromium.org</owner> <owner>areimers@chromium.org</owner> <summary> @@ -53,7 +53,7 @@ </histogram> <histogram name="PrivacyBudget.ClockSkew.FetchLatency" units="ms" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>antoniosartori@chromium.org</owner> <owner>areimers@chromium.org</owner> <summary> @@ -64,7 +64,7 @@ </histogram> <histogram name="PrivacyBudget.ClockSkew.FetchLatencyJitter" units="ms" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>antoniosartori@chromium.org</owner> <owner>areimers@chromium.org</owner> <summary> @@ -76,7 +76,7 @@ </histogram> <histogram name="PrivacyBudget.ClockSkew.Magnitude.Negative" units="ms" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>antoniosartori@chromium.org</owner> <owner>areimers@chromium.org</owner> <summary> @@ -87,7 +87,7 @@ </histogram> <histogram name="PrivacyBudget.ClockSkew.Magnitude.Positive" units="ms" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>antoniosartori@chromium.org</owner> <owner>areimers@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/profile/histograms.xml b/tools/metrics/histograms/metadata/profile/histograms.xml index 599eb8a..0ac25bd 100644 --- a/tools/metrics/histograms/metadata/profile/histograms.xml +++ b/tools/metrics/histograms/metadata/profile/histograms.xml
@@ -71,7 +71,7 @@ </histogram> <histogram name="Profile.Avatar" enum="ProfileAvatar" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>droger@chromium.org</owner> <owner>chrome-signin-team@google.com</owner> <summary>The frequency of selection of each avatar.</summary> @@ -84,7 +84,7 @@ </histogram> <histogram name="Profile.BrowserActive.PerProfile" enum="Profile" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>msarda@chromium.org</owner> <owner>tangltom@chromium.org</owner> <summary> @@ -193,7 +193,7 @@ </histogram> <histogram name="Profile.Guest.OTR.Lifetime" units="minutes" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>rhalavati@chromium.org</owner> <owner>chrome-incognito@google.com</owner> <summary> @@ -255,7 +255,7 @@ </histogram> <histogram name="Profile.Incognito.ResumedAfterReportedDuration" - units="minutes" expires_after="2023-09-03"> + units="minutes" expires_after="2023-11-12"> <owner>rhalavati@chromium.org</owner> <owner>chrome-incognito@google.com</owner> <summary> @@ -382,7 +382,7 @@ </histogram> <histogram name="Profile.NetUserCount" enum="ProfileNetUserCount" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>rogerta@chromium.org</owner> <summary> Counts of users added and deleted. Percentages are not meaningful. Please @@ -405,7 +405,7 @@ </histogram> <histogram name="Profile.NumberOfAccountsPerProfile" units="units" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>msarda@chromium.org</owner> <owner>droger@chromium.org</owner> <summary> @@ -469,7 +469,7 @@ </histogram> <histogram name="Profile.NumberOfSignedInProfiles" units="profiles" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>droger@chromium.org</owner> <owner>chrome-signin-team@google.com</owner> <summary> @@ -535,7 +535,7 @@ </histogram> <histogram base="true" name="Profile.State.LastUsed" units="days" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>droger@chromium.org</owner> <owner>chrome-signin-team@google.com</owner> <summary> @@ -556,7 +556,7 @@ </histogram> <histogram base="true" name="Profile.State.SyncEnabled" enum="BooleanEnabled" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>droger@chromium.org</owner> <owner>chrome-signin-team@google.com</owner> <summary> @@ -566,7 +566,7 @@ </histogram> <histogram base="true" name="Profile.State.UnconsentedPrimaryAccountType" - enum="ProfileUnconsentedPrimaryAccountType" expires_after="2023-09-03"> + enum="ProfileUnconsentedPrimaryAccountType" expires_after="2023-11-12"> <owner>droger@chromium.org</owner> <owner>chrome-signin-team@google.com</owner> <summary> @@ -958,7 +958,7 @@ </histogram> <histogram name="ProfilePicker.UserAction" enum="ProfilePickerAction" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>msalama@chromium.org</owner> <owner>chrome-signin-team@google.com</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/quick_answers/histograms.xml b/tools/metrics/histograms/metadata/quick_answers/histograms.xml index d8c1652..08470f95 100644 --- a/tools/metrics/histograms/metadata/quick_answers/histograms.xml +++ b/tools/metrics/histograms/metadata/quick_answers/histograms.xml
@@ -167,7 +167,7 @@ </histogram> <histogram name="QuickAnswers.Intent" enum="QuickAnswersIntentType" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>angelaxiao@chromium.org</owner> <owner>yawano@google.com</owner> <owner>llin@google.com</owner> @@ -191,7 +191,7 @@ </histogram> <histogram name="QuickAnswers.Loading.Status" enum="QuickAnswersLoadStatus" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>angelaxiao@chromium.org</owner> <owner>yawano@google.com</owner> <owner>llin@google.com</owner> @@ -273,7 +273,7 @@ </histogram> <histogram name="QuickAnswers.SelectedContent.Length" units="characters" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>angelaxiao@chromium.org</owner> <owner>yawano@google.com</owner> <owner>llin@google.com</owner>
diff --git a/tools/metrics/histograms/metadata/quota/histograms.xml b/tools/metrics/histograms/metadata/quota/histograms.xml index ade50b0..9ef1974 100644 --- a/tools/metrics/histograms/metadata/quota/histograms.xml +++ b/tools/metrics/histograms/metadata/quota/histograms.xml
@@ -22,7 +22,7 @@ <histograms> -<histogram name="Quota.AgeOfDataInDays" units="days" expires_after="2023-08-27"> +<histogram name="Quota.AgeOfDataInDays" units="days" expires_after="2023-11-12"> <owner>ayui@chromium.org</owner> <owner>chrome-owp-storage@google.com</owner> <summary> @@ -43,7 +43,7 @@ </histogram> <histogram name="Quota.AvailableDiskSpace" units="MB" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>ayui@chromium.org</owner> <owner>chrome-owp-storage@google.com</owner> <summary> @@ -79,7 +79,7 @@ </token> </histogram> -<histogram name="Quota.DiskspaceShortage" units="MB" expires_after="2023-09-03"> +<histogram name="Quota.DiskspaceShortage" units="MB" expires_after="2023-11-12"> <owner>ayui@chromium.org</owner> <owner>chrome-owp-storage@google.com</owner> <summary> @@ -131,7 +131,7 @@ </histogram> <histogram name="Quota.EvictionRoundsPerHour" units="units" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>ayui@chromium.org</owner> <owner>chrome-owp-storage@google.com</owner> <summary> @@ -141,7 +141,7 @@ </histogram> <histogram name="Quota.GlobalTemporaryPoolSize" units="MB" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>ayui@chromium.org</owner> <owner>chrome-owp-storage@google.com</owner> <summary> @@ -165,7 +165,7 @@ </histogram> <histogram name="Quota.PercentDiskAvailable" units="%" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>ayui@chromium.org</owner> <owner>chrome-owp-storage@google.com</owner> <summary> @@ -175,7 +175,7 @@ </histogram> <histogram name="Quota.PercentDiskAvailable2" units="%" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>ayui@chromium.org</owner> <owner>chrome-owp-storage@google.com</owner> <summary> @@ -185,7 +185,7 @@ </histogram> <histogram name="Quota.PercentUsedByOrigin" units="%" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>ayui@chromium.org</owner> <owner>chrome-owp-storage@google.com</owner> <summary> @@ -195,7 +195,7 @@ </histogram> <histogram name="Quota.PercentUsedForTemporaryStorage2" units="%" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>ayui@chromium.org</owner> <owner>chrome-owp-storage@google.com</owner> <summary> @@ -212,7 +212,7 @@ </histogram> <histogram name="Quota.QuotaDatabaseReset" enum="QuotaDatabaseResetReason" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>ayui@chromium.org</owner> <owner>chrome-owp-storage@google.com</owner> <summary> @@ -251,7 +251,7 @@ </histogram> <histogram name="Quota.SkippedEvictionRoundsPerHour" units="units" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>ayui@chromium.org</owner> <owner>chrome-owp-storage@google.com</owner> <summary> @@ -272,7 +272,7 @@ </histogram> <histogram name="Quota.StorageKeyNonceCount" units="buckets" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>ayui@chromium.org</owner> <owner>chrome-owp-storage@google.com</owner> <summary> @@ -283,7 +283,7 @@ </histogram> <histogram name="Quota.TimeDeltaOfEvictionRounds" units="units" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>ayui@chromium.org</owner> <owner>chrome-owp-storage@google.com</owner> <summary> @@ -293,7 +293,7 @@ </histogram> <histogram name="Quota.TimeSpentToAEvictionRound" units="units" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>ayui@chromium.org</owner> <owner>chrome-owp-storage@google.com</owner> <summary> @@ -303,7 +303,7 @@ </histogram> <histogram name="Quota.TotalBucketCount" units="buckets" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>ayui@chromium.org</owner> <owner>chrome-owp-storage@google.com</owner> <summary> @@ -321,7 +321,7 @@ </histogram> <histogram name="Quota.TotalDiskSpaceIsZero" enum="BooleanVolumeZero" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>ayui@chromium.org</owner> <owner>chrome-owp-storage@google.com</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/renderer/histograms.xml b/tools/metrics/histograms/metadata/renderer/histograms.xml index 15f452b4..7c893f5 100644 --- a/tools/metrics/histograms/metadata/renderer/histograms.xml +++ b/tools/metrics/histograms/metadata/renderer/histograms.xml
@@ -56,7 +56,7 @@ <histogram name="Renderer.Core.Timing.Performance.SwapsPerPerformanceEntryInsertion" - units="swaps" expires_after="2023-08-01"> + units="swaps" expires_after="2023-11-12"> <owner>iclelland@chromium.org</owner> <owner>speed-metrics-dev@chromium.org</owner> <summary> @@ -69,7 +69,7 @@ </histogram> <histogram name="Renderer.CriticalFonts.BlockingResourcesLoadTime" units="ms" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>yoavweiss@chromium.org</owner> <owner>speed-metrics-dev@chromium.org</owner> <summary> @@ -81,7 +81,7 @@ </histogram> <histogram name="Renderer.CriticalFonts.CriticalFontDelay" units="ms" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>yoavweiss@chromium.org</owner> <owner>speed-metrics-dev@chromium.org</owner> <summary> @@ -94,7 +94,7 @@ </histogram> <histogram name="Renderer.CriticalFonts.PreloadedFontsLoadTime" units="ms" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>yoavweiss@chromium.org</owner> <owner>speed-metrics-dev@chromium.org</owner> <summary> @@ -379,7 +379,7 @@ </histogram> <histogram name="Renderer.Images.HasOverfetchedCappedPixels" enum="Boolean" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>yoavweiss@chromium.org</owner> <owner>speed-metrics-dev@chromium.org</owner> <summary> @@ -423,7 +423,7 @@ </histogram> <histogram name="Renderer.Images.OverfetchedPixels" units="px^2" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>yoavweiss@chromium.org</owner> <owner>speed-metrics-dev@chromium.org</owner> <summary> @@ -462,7 +462,7 @@ </histogram> <histogram name="Renderer.PaintPreview.Capture.MainFrameBlinkCaptureDuration" - units="ms" expires_after="2023-09-10"> + units="ms" expires_after="2023-11-12"> <owner>ckitagawa@chromium.org</owner> <owner>fredmello@chromium.org</owner> <owner>chrome-fdt@google.com</owner>
diff --git a/tools/metrics/histograms/metadata/renderer4/histograms.xml b/tools/metrics/histograms/metadata/renderer4/histograms.xml index c04c012..e087eff 100644 --- a/tools/metrics/histograms/metadata/renderer4/histograms.xml +++ b/tools/metrics/histograms/metadata/renderer4/histograms.xml
@@ -72,7 +72,7 @@ </histogram> <histogram name="Renderer4.GpuImageDecodeState" enum="GpuImageUsageState" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>vmpstr@chromium.org</owner> <owner>thiabaud@google.com</owner> <summary> @@ -84,7 +84,7 @@ </histogram> <histogram name="Renderer4.GpuImageDecodeState.CachePeakUsagePercent" - units="units" expires_after="2023-09-10"> + units="units" expires_after="2023-11-12"> <owner>sashamcintosh@chromium.org</owner> <owner>vmpstr@chromium.org</owner> <owner>thiabaud@google.com</owner> @@ -97,7 +97,7 @@ </histogram> <histogram name="Renderer4.GpuImageDecodeState.FirstLockWasted" - enum="BooleanWasted" expires_after="2023-09-10"> + enum="BooleanWasted" expires_after="2023-11-12"> <owner>vmpstr@chromium.org</owner> <owner>thiabaud@google.com</owner> <summary> @@ -135,7 +135,7 @@ </histogram> <histogram name="Renderer4.GpuRasterizationEnabled" enum="BooleanEnabled" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>jonross@chromium.org</owner> <owner>graphics-dev@chromium.org</owner> <summary> @@ -145,7 +145,7 @@ </histogram> <histogram base="true" name="Renderer4.ImageDecodeTaskDurationUs" - units="microseconds" expires_after="2023-08-27"> + units="microseconds" expires_after="2023-11-12"> <!-- Name completed by histogram_suffixes name="DecodedImageType" --> <!-- Name completed by histogram_suffixes name="OutOfRaster" --> @@ -293,7 +293,7 @@ </histogram> <histogram name="Renderer4.ScrollingThread" enum="ScrollingThreadStatus" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <!-- Name completed by histogram_suffixes name="ScrollSourceDevice" --> <owner>bokan@chromium.org</owner>
diff --git a/tools/metrics/histograms/metadata/safe_browsing/histograms.xml b/tools/metrics/histograms/metadata/safe_browsing/histograms.xml index e38dcac..1b53c08c 100644 --- a/tools/metrics/histograms/metadata/safe_browsing/histograms.xml +++ b/tools/metrics/histograms/metadata/safe_browsing/histograms.xml
@@ -240,7 +240,7 @@ </histogram> <histogram name="SafeBrowsing.BlockingPage.RequestDestination" - enum="RequestDestination" expires_after="2023-09-10"> + enum="RequestDestination" expires_after="2023-11-12"> <owner>xinghuilu@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary> @@ -301,7 +301,7 @@ </histogram> <histogram name="SafeBrowsing.BrowserThrottle.RedirectedExtensionUrlScheme" - enum="SafeBrowsingUrlScheme" expires_after="2023-07-12"> + enum="SafeBrowsingUrlScheme" expires_after="2023-11-12"> <owner>xinghuilu@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary> @@ -422,7 +422,7 @@ </histogram> <histogram name="SafeBrowsing.CheckUrl.UrlScheme" enum="SafeBrowsingUrlScheme" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>thefrog@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary> @@ -445,7 +445,7 @@ </histogram> <histogram name="SafeBrowsing.ClientSafeBrowsingReport.HasThreatDetailsForTab" - enum="BooleanAvailable" expires_after="2023-08-27"> + enum="BooleanAvailable" expires_after="2023-11-12"> <owner>xinghuilu@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary> @@ -504,7 +504,7 @@ </histogram> <histogram name="SafeBrowsing.ClientSidePhishingDetection.AllowlistMatchResult" - enum="SafeBrowsingAllowlistAsyncMatch" expires_after="2023-09-10"> + enum="SafeBrowsingAllowlistAsyncMatch" expires_after="2023-11-12"> <owner>thefrog@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary> @@ -656,7 +656,7 @@ </histogram> <histogram name="SafeBrowsing.ExtensionPersister.CacheSize" units="files" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>psarouthakis@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary> @@ -667,7 +667,7 @@ </histogram> <histogram name="SafeBrowsing.ExtensionPersister.PersistedFileSize" - units="bytes" expires_after="2023-08-27"> + units="bytes" expires_after="2023-11-12"> <owner>psarouthakis@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary> @@ -677,7 +677,7 @@ </histogram> <histogram name="SafeBrowsing.ExtensionPersister.ReadResult" - enum="BooleanSuccess" expires_after="2023-09-03"> + enum="BooleanSuccess" expires_after="2023-11-12"> <owner>psarouthakis@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary> @@ -850,7 +850,7 @@ </histogram> <histogram name="SafeBrowsing.ExtensionTelemetry.RetriesTillUploadSuccess" - units="retries" expires_after="2023-08-27"> + units="retries" expires_after="2023-11-12"> <owner>anunoy@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary> @@ -959,7 +959,7 @@ </histogram> <histogram name="SafeBrowsing.FileTypeUpdate.ResourceBundleResult" - enum="SBFileTypeUpdateResult" expires_after="2023-08-27"> + enum="SBFileTypeUpdateResult" expires_after="2023-11-12"> <owner>drubery@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary> @@ -972,7 +972,7 @@ </histogram> <histogram name="SafeBrowsing.FileTypeUpdate.ResourceBundleVersion" - units="FileTypePolicies Version" expires_after="2023-08-27"> + units="FileTypePolicies Version" expires_after="2023-11-12"> <owner>drubery@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary> @@ -1167,7 +1167,7 @@ </histogram> <histogram name="SafeBrowsing.HPRT.Network.Result.WhenEnteringBackoff" - enum="CombinedHttpResponseAndNetErrorCode" expires_after="2023-08-05"> + enum="CombinedHttpResponseAndNetErrorCode" expires_after="2023-11-12"> <owner>thefrog@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary> @@ -1465,7 +1465,7 @@ </histogram> <histogram name="SafeBrowsing.MetricsCollectorEventCountAtCleanup" - units="events" expires_after="2023-09-07"> + units="events" expires_after="2023-11-12"> <owner>drubery@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary> @@ -1573,7 +1573,7 @@ </histogram> <histogram name="SafeBrowsing.Pref.Daily.Extended" enum="BooleanEnabled" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>xinghuilu@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary> @@ -1688,7 +1688,7 @@ </histogram> <histogram name="SafeBrowsing.RendererThrottle.TotalDelay" units="ms" - expires_after="2023-11-05"> + expires_after="2023-11-12"> <owner>xinghuilu@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary> @@ -1700,7 +1700,7 @@ </histogram> <histogram name="SafeBrowsing.RendererThrottle.TotalDelay3" units="ms" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>xinghuilu@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary> @@ -1759,7 +1759,7 @@ </histogram> <histogram name="SafeBrowsing.RT.CacheManager.RealTimeVerdictCount" - units="entries" expires_after="2023-09-10"> + units="entries" expires_after="2023-11-12"> <owner>xinghuilu@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary> @@ -1790,7 +1790,7 @@ </histogram> <histogram name="SafeBrowsing.RT.ConsumerVersionReason" - enum="SafeBrowsingRTConsumerVersionReason" expires_after="2023-09-03"> + enum="SafeBrowsingRTConsumerVersionReason" expires_after="2023-11-12"> <owner>xinghuilu@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary> @@ -1839,7 +1839,7 @@ </histogram> <histogram name="SafeBrowsing.RT.GetCacheResultIsFromPastSession" - enum="Boolean" expires_after="2023-07-20"> + enum="Boolean" expires_after="2023-11-12"> <owner>thefrog@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary> @@ -1860,7 +1860,7 @@ </histogram> <histogram name="SafeBrowsing.RT.HasTokenFromFetcher" enum="BooleanHasToken" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>xinghuilu@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary> @@ -2035,7 +2035,7 @@ </histogram> <histogram name="SafeBrowsing.RT.RequestDestinations.Checked" - enum="RequestDestination" expires_after="2023-09-10"> + enum="RequestDestination" expires_after="2023-11-12"> <owner>xinghuilu@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary> @@ -2046,7 +2046,7 @@ </histogram> <histogram name="SafeBrowsing.RT.RequestDestinations.Requested" - enum="RequestDestination" expires_after="2023-08-20"> + enum="RequestDestination" expires_after="2023-11-12"> <owner>xinghuilu@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary> @@ -2262,7 +2262,7 @@ <histogram name="SafeBrowsing.TailoredSecurityUnconsentedPromotionNotificationOutcome" - enum="SafeBrowsingTailoredSecurityOutcome" expires_after="2023-08-27"> + enum="SafeBrowsingTailoredSecurityOutcome" expires_after="2023-11-12"> <owner>jacastro@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary> @@ -2649,7 +2649,7 @@ </histogram> <histogram name="SafeBrowsing.V4ProcessPartialUpdate.RemovalsHashesCount" - units="entries" expires_after="2023-08-27"> + units="entries" expires_after="2023-11-12"> <owner>xinghuilu@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary> @@ -2914,7 +2914,7 @@ </histogram> <histogram name="SafeBrowsingBinaryUploadRequest.Duration" units="ms" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>drubery@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary> @@ -2925,7 +2925,7 @@ </histogram> <histogram name="SafeBrowsingBinaryUploadRequest.MalwareResult" - enum="BooleanSuccess" expires_after="2023-08-27"> + enum="BooleanSuccess" expires_after="2023-11-12"> <owner>drubery@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary> @@ -2936,7 +2936,7 @@ </histogram> <histogram name="SafeBrowsingBinaryUploadRequest.Result" - enum="SafeBrowsingBinaryUploadResult" expires_after="2023-08-27"> + enum="SafeBrowsingBinaryUploadResult" expires_after="2023-11-12"> <owner>drubery@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary> @@ -2947,7 +2947,7 @@ </histogram> <histogram name="SafeBrowsingBinaryUploadRequest.TimeToGetFCMToken" units="ms" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>drubery@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/sb_client/histograms.xml b/tools/metrics/histograms/metadata/sb_client/histograms.xml index 36fab16..4fb237bc 100644 --- a/tools/metrics/histograms/metadata/sb_client/histograms.xml +++ b/tools/metrics/histograms/metadata/sb_client/histograms.xml
@@ -144,7 +144,7 @@ </histogram> <histogram name="SBClientDownload.DownloadExtensions" - enum="SBClientDownloadExtensions" expires_after="2023-08-27"> + enum="SBClientDownloadExtensions" expires_after="2023-11-12"> <owner>vakh@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <owner>mattm@chromium.org</owner> @@ -265,7 +265,7 @@ </histogram> <histogram name="SBClientDownload.DownloadRequestResponseCode" - enum="HttpResponseCode" expires_after="2023-09-10"> + enum="HttpResponseCode" expires_after="2023-11-12"> <owner>drubery@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <owner>mattm@chromium.org</owner> @@ -611,7 +611,7 @@ </histogram> <histogram name="SBClientPhishing.ClassificationStart" enum="BooleanHit" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>drubery@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary> @@ -625,7 +625,7 @@ </histogram> <histogram name="SBClientPhishing.Classifier.Event" - enum="SBPhishingClassifierEvent" expires_after="2023-09-10"> + enum="SBPhishingClassifierEvent" expires_after="2023-11-12"> <owner>drubery@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary> @@ -744,7 +744,7 @@ </histogram> <histogram name="SBClientPhishing.PhishingDetectionDuration" units="ms" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>drubery@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary> @@ -767,7 +767,7 @@ <histogram name="SBClientPhishing.PreClassificationCheckResult" enum="SBClientDetectionPreClassificationCheckResult" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>drubery@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary> @@ -885,7 +885,7 @@ </histogram> <histogram name="SBClientPhishing.VisualFeatureTime" units="ms" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>drubery@chromium.org</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/search/histograms.xml b/tools/metrics/histograms/metadata/search/histograms.xml index 8c08808..2b58235 100644 --- a/tools/metrics/histograms/metadata/search/histograms.xml +++ b/tools/metrics/histograms/metadata/search/histograms.xml
@@ -134,7 +134,7 @@ </histogram> <histogram name="Search.ContextualSearch.NetError" enum="NetErrorCodes" - expires_after="M117"> + expires_after="2023-11-12"> <owner>donnd@chromium.org</owner> <owner>basiaz@google.com</owner> <summary> @@ -325,7 +325,7 @@ </histogram> <histogram name="Search.ContextualSearch.SelectionExpanded" - enum="ContextualSearchGestureIsTap" expires_after="2023-08-20"> + enum="ContextualSearchGestureIsTap" expires_after="2023-11-12"> <owner>donnd@chromium.org</owner> <owner>twellington@chromium.org</owner> <summary> @@ -1276,7 +1276,7 @@ </histogram> <histogram name="Search.DefaultSearchProviderType2" - enum="OmniboxSearchEngineType" expires_after="2023-09-12"> + enum="OmniboxSearchEngineType" expires_after="2023-11-12"> <owner>mpearson@chromium.org</owner> <owner>csharp@chromium.org</owner> <summary> @@ -1564,7 +1564,7 @@ </histogram> <histogram name="Search.QueryTiles.TrendingTileEvent" enum="TrendingTileEvent" - expires_after="2023-08-31"> + expires_after="2023-11-12"> <owner>qinmin@chromium.org</owner> <owner>chrome-upboarding-eng@google.com</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/security/histograms.xml b/tools/metrics/histograms/metadata/security/histograms.xml index c23755e..d6c2363 100644 --- a/tools/metrics/histograms/metadata/security/histograms.xml +++ b/tools/metrics/histograms/metadata/security/histograms.xml
@@ -162,7 +162,7 @@ </histogram> <histogram name="Security.HttpsFirstMode.NavigationEvent" - enum="HttpsFirstModeNavigationEvent" expires_after="2023-09-10"> + enum="HttpsFirstModeNavigationEvent" expires_after="2023-11-12"> <owner>cthomp@chromium.org</owner> <owner>trusty-transport@chromium.org</owner> <summary> @@ -173,7 +173,7 @@ </histogram> <histogram name="Security.HttpsFirstMode.SettingChanged" enum="BooleanEnabled" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>cthomp@chromium.org</owner> <owner>trusty-transport@chromium.org</owner> <summary> @@ -184,7 +184,7 @@ </histogram> <histogram name="Security.HttpsFirstMode.SettingEnabledAtStartup" - enum="BooleanEnabled" expires_after="2023-09-10"> + enum="BooleanEnabled" expires_after="2023-11-12"> <owner>cthomp@chromium.org</owner> <owner>trusty-transport@chromium.org</owner> <summary> @@ -253,7 +253,7 @@ </histogram> <histogram name="Security.JSONParser.ChromiumExtensionUsage" - enum="JsonParserExtension" expires_after="2023-09-10"> + enum="JsonParserExtension" expires_after="2023-11-12"> <owner>rsesek@chromium.org</owner> <owner>chrome-platform-security@google.com</owner> <summary> @@ -274,7 +274,7 @@ </histogram> <histogram base="true" name="Security.PageEndReason" enum="PageEndReason" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>cthomp@chromium.org</owner> <owner>trusty-transport@chromium.org</owner> <summary> @@ -314,7 +314,7 @@ </histogram> <histogram name="Security.PageInfo.AdPersonalizationRowShown" enum="Boolean" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>dullweber@chromium.org</owner> <owner>sauski@google.com</owner> <summary> @@ -345,7 +345,7 @@ </histogram> <histogram name="Security.PageInfo.TimeOpen.Action" units="ms" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>cthomp@chromium.org</owner> <owner>security-enamel@chromium.org</owner> <summary> @@ -355,7 +355,7 @@ </histogram> <histogram name="Security.PageInfo.TimeOpen.NoAction" units="ms" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>cthomp@chromium.org</owner> <owner>security-enamel@chromium.org</owner> <summary> @@ -462,7 +462,7 @@ </histogram> <histogram name="Security.SafetyTips.SafetyTipIgnoredPageLoad" - enum="SafetyTipStatus" expires_after="2023-08-27"> + enum="SafetyTipStatus" expires_after="2023-11-12"> <owner>jdeblasio@chromium.org</owner> <owner>src/chrome/browser/lookalikes/OWNERS</owner> <summary> @@ -484,7 +484,7 @@ </histogram> <histogram name="Security.SCTAuditing.NumPersistedReportsLoaded" - units="reports" expires_after="2023-09-10"> + units="reports" expires_after="2023-11-12"> <owner>cthomp@chromium.org</owner> <owner>trusty-transport@chromium.org</owner> <summary> @@ -657,7 +657,7 @@ </histogram> <histogram name="Security.SecurityLevel.OnCommit" enum="SecurityLevel" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>cthomp@chromium.org</owner> <owner>security-enamel@chromium.org</owner> <summary> @@ -682,7 +682,7 @@ </histogram> <histogram base="true" name="Security.SiteEngagement" units="units" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>cthomp@chromium.org</owner> <owner>security-enamel@chromium.org</owner> <summary> @@ -692,7 +692,7 @@ </histogram> <histogram base="true" name="Security.TimeOnPage2" units="ms" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>cthomp@chromium.org</owner> <owner>security-enamel@chromium.org</owner> <summary> @@ -716,7 +716,7 @@ </histogram> <histogram name="SiteIsolation.BrowsingInstanceCount" units="units" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>alexmos@chromium.org</owner> <owner>creis@chromium.org</owner> <summary> @@ -989,7 +989,7 @@ </histogram> <histogram name="SiteIsolation.ProxyCount" units="proxies" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>alexmos@chromium.org</owner> <owner>creis@chromium.org</owner> <owner>lukasza@chromium.org</owner> @@ -1075,7 +1075,7 @@ </histogram> <histogram name="SiteIsolation.SiteInstancesPerBrowsingInstance" units="units" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>alexmos@chromium.org</owner> <owner>creis@chromium.org</owner> <owner>lukasza@chromium.org</owner>
diff --git a/tools/metrics/histograms/metadata/service/histograms.xml b/tools/metrics/histograms/metadata/service/histograms.xml index 823ac3d..c10abe27 100644 --- a/tools/metrics/histograms/metadata/service/histograms.xml +++ b/tools/metrics/histograms/metadata/service/histograms.xml
@@ -137,7 +137,7 @@ </histogram> <histogram name="ServiceWorker.ActivateEvent.Time" units="ms" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>yyanagisawa@chromium.org</owner> <owner>chikamune@chromium.org</owner> <owner>chrome-worker@google.com</owner>
diff --git a/tools/metrics/histograms/metadata/session/histograms.xml b/tools/metrics/histograms/metadata/session/histograms.xml index 8aa0839..380a5f9 100644 --- a/tools/metrics/histograms/metadata/session/histograms.xml +++ b/tools/metrics/histograms/metadata/session/histograms.xml
@@ -23,7 +23,7 @@ <histograms> <histogram name="Session.Background.TotalDuration" units="ms" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>asvitkine@chromium.org</owner> <owner>src/base/metrics/OWNERS</owner> <summary> @@ -36,8 +36,24 @@ </summary> </histogram> +<histogram name="Session.BrowserFullscreen.DurationUpTo24H" units="ms" + expires_after="2024-02-01"> + <owner>bur@chromium.org</owner> + <owner>chrome-mac-dev@google.com</owner> + <summary> + The total time a Chrome browser window spends in fullscreen. Content + fullscreen is not represented. Records are capped at 24 hours. + + The metric is recorded when a browser window exits fullscreen or after 24 + hours has elapsed, whichever comes first. This includes quitting the browser + while in fullscreen. + + Mac-only. + </summary> +</histogram> + <histogram name="Session.IsActive" enum="BooleanActive" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>rogerm@chromium.org</owner> <owner>src/base/metrics/OWNERS</owner> <summary> @@ -350,7 +366,7 @@ </histogram> <histogram name="Session.TotalDuration.TouchMode" units="times" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>collinbaker@chromium.org</owner> <owner>chrome-desktop-ui-sea@google.com</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/settings/histograms.xml b/tools/metrics/histograms/metadata/settings/histograms.xml index 26937b5..83d7d34 100644 --- a/tools/metrics/histograms/metadata/settings/histograms.xml +++ b/tools/metrics/histograms/metadata/settings/histograms.xml
@@ -160,7 +160,7 @@ </histogram> <histogram name="Settings.Homepage.LocationType" enum="HomepageLocationType" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>bttk@chromium.org</owner> <owner>twellington@chromium.org</owner> <owner>wenyufu@chromium.org</owner> @@ -274,7 +274,7 @@ </histogram> <histogram name="Settings.PrivacyElementInteractions" - enum="SettingsPrivacyElementInteractions" expires_after="2023-08-27"> + enum="SettingsPrivacyElementInteractions" expires_after="2023-11-12"> <owner>harrisonsean@chromium.org</owner> <owner>msramek@chromium.org</owner> <owner>sauski@chromium.org</owner> @@ -354,7 +354,7 @@ </histogram> <histogram name="Settings.PrivacySandbox.AdMeasurement.Enabled" - enum="BooleanEnabled" expires_after="2023-08-27"> + enum="BooleanEnabled" expires_after="2023-11-12"> <owner>sauski@google.com</owner> <owner>olesiamarukhno@chromium.org</owner> <owner>msramek@chromium.org</owner> @@ -415,7 +415,7 @@ </histogram> <histogram name="Settings.PrivacySandbox.Enabled" - enum="SettingsPrivacySandboxEnabled" expires_after="2023-09-10"> + enum="SettingsPrivacySandboxEnabled" expires_after="2023-11-12"> <owner>harrisonsean@chromium.org</owner> <owner>msramek@chromium.org</owner> <owner>chrome-friendly-settings@google.com</owner> @@ -427,7 +427,7 @@ </histogram> <histogram name="Settings.PrivacySandbox.Fledge.Enabled" enum="BooleanEnabled" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>sauski@google.com</owner> <owner>olesiamarukhno@chromium.org</owner> <owner>msramek@chromium.org</owner> @@ -569,7 +569,7 @@ </histogram> <histogram name="Settings.SafetyCheck.PasswordsResult" - enum="SafetyCheckPasswordsStatus" expires_after="2023-08-27"> + enum="SafetyCheckPasswordsStatus" expires_after="2023-11-12"> <owner>andzaytsev@google.com</owner> <owner>msramek@chromium.org</owner> <summary>Resulting state of the safety check password check.</summary> @@ -871,7 +871,7 @@ </histogram> <histogram name="Settings.TrackedPreferenceChanged" enum="TrackedPreference" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>proberge@chromium.org</owner> <owner>junhao.huang@microsoft.com</owner> <summary> @@ -930,7 +930,7 @@ </histogram> <histogram name="Settings.TrackedPreferenceReset" enum="TrackedPreference" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>proberge@chromium.org</owner> <owner>junhao.huang@microsoft.com</owner> <summary>The id of a tracked preference which was reset by Chrome.</summary>
diff --git a/tools/metrics/histograms/metadata/sharing/histograms.xml b/tools/metrics/histograms/metadata/sharing/histograms.xml index 44fac112..c351ad85 100644 --- a/tools/metrics/histograms/metadata/sharing/histograms.xml +++ b/tools/metrics/histograms/metadata/sharing/histograms.xml
@@ -106,7 +106,7 @@ </histogram> <histogram name="Sharing.ClickToCallSelectedDeviceIndex" units="index" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <!-- Name completed by histogram_suffixes name="SharingClickToCallUi" --> <owner>mvanouwerkerk@chromium.org</owner> @@ -194,7 +194,7 @@ </histogram> <histogram name="Sharing.QRCodeGeneration.Duration" units="ms" - expires_after="M117"> + expires_after="2023-11-12"> <owner>danakj@chromium.org</owner> <owner>lukasza@chromium.org</owner> <owner>petewil@chromium.org</owner> @@ -213,7 +213,7 @@ </histogram> <histogram name="Sharing.QRCodeGeneration.Duration.BytesToQrPixels" units="ms" - expires_after="M117"> + expires_after="2023-11-12"> <owner>danakj@chromium.org</owner> <owner>lukasza@chromium.org</owner> <owner>petewil@chromium.org</owner> @@ -228,7 +228,7 @@ </histogram> <histogram name="Sharing.QRCodeGeneration.Duration.QrPixelsToQrImage" - units="ms" expires_after="M117"> + units="ms" expires_after="2023-11-12"> <owner>danakj@chromium.org</owner> <owner>lukasza@chromium.org</owner> <owner>petewil@chromium.org</owner> @@ -427,7 +427,7 @@ </histogram> <histogram name="Sharing.SendTabToSelf.NotificationStatus" - enum="SendTabToSelfNotificationStatus" expires_after="2023-09-03"> + enum="SendTabToSelfNotificationStatus" expires_after="2023-11-12"> <owner>ellyjones@chromium.org</owner> <owner>src/chrome/browser/share/OWNERS</owner> <summary> @@ -509,7 +509,7 @@ </histogram> <histogram name="Sharing.SharingHubAndroid.Opened" enum="ShareOrigin" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>sophey@chromium.org</owner> <owner>src/chrome/browser/share/OWNERS</owner> <summary> @@ -588,7 +588,7 @@ </histogram> <histogram name="Sharing.SharingHubDesktop.CrOSSharesheetResult" - enum="SharingHubSharesheetResult" expires_after="2023-09-03"> + enum="SharingHubSharesheetResult" expires_after="2023-11-12"> <owner>kristipark@chromium.org</owner> <owner>src/chrome/browser/share/OWNERS</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/signin/histograms.xml b/tools/metrics/histograms/metadata/signin/histograms.xml index a6e1debc..720d41a23f 100644 --- a/tools/metrics/histograms/metadata/signin/histograms.xml +++ b/tools/metrics/histograms/metadata/signin/histograms.xml
@@ -191,7 +191,7 @@ </histogram> <histogram name="Signin.AccountFetcher.AccountUserInfoFetchTime" units="ms" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>triploblastic@chromium.org</owner> <owner>chrome-signin-team@google.com</owner> <summary> @@ -323,7 +323,7 @@ </histogram> <histogram base="true" name="Signin.AndroidGetAccountsTime" units="ms" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>alexilin@chromium.org</owner> <owner>bsazonov@chromium.org</owner> <summary> @@ -343,7 +343,7 @@ </histogram> <histogram name="Signin.AndroidNumberOfDeviceAccounts" units="accounts" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>triploblastic@chromium.org</owner> <owner>chrome-signin-team@google.com</owner> <summary> @@ -352,7 +352,7 @@ </histogram> <histogram name="Signin.AuthError" enum="GoogleServiceAuthError" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>msarda@chromium.org</owner> <owner>droger@chromium.org</owner> <summary> @@ -553,7 +553,7 @@ </histogram> <histogram name="Signin.Extensions.LaunchWebAuthFlowResult" - enum="LaunchWebAuthFlowResult" expires_after="2023-08-27"> + enum="LaunchWebAuthFlowResult" expires_after="2023-11-12"> <owner>alexilin@chromium.org</owner> <owner>rsult@google.com</owner> <owner>chrome-signin-team@google.com</owner> @@ -941,7 +941,7 @@ </histogram> <histogram name="Signin.OAuth2MintToken.ApiCallResult" - enum="OAuth2MintTokenApiCallResult" expires_after="2023-08-27"> + enum="OAuth2MintTokenApiCallResult" expires_after="2023-11-12"> <owner>alexilin@chromium.org</owner> <owner>droger@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/stability/histograms.xml b/tools/metrics/histograms/metadata/stability/histograms.xml index 434a238..6508755 100644 --- a/tools/metrics/histograms/metadata/stability/histograms.xml +++ b/tools/metrics/histograms/metadata/stability/histograms.xml
@@ -104,7 +104,7 @@ </histogram> <histogram name="Stability.Android.RendererCrash" enum="Boolean" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>wnwen@chromium.org</owner> <summary> Counts renderer crashes including OOMs. Android only. Mirrors old stability
diff --git a/tools/metrics/histograms/metadata/start_surface/histograms.xml b/tools/metrics/histograms/metadata/start_surface/histograms.xml index da877f8..33916d1 100644 --- a/tools/metrics/histograms/metadata/start_surface/histograms.xml +++ b/tools/metrics/histograms/metadata/start_surface/histograms.xml
@@ -23,7 +23,7 @@ <histograms> <histogram name="StartSurface.ColdStartup.IsLastActiveTabNtp" enum="Boolean" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>hanxi@chromium.org</owner> <owner>xinyiji@chromium.org</owner> <summary> @@ -34,7 +34,7 @@ </histogram> <histogram name="StartSurface.Module.Click" enum="ModuleTypeOnStartAndNTP" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>hanxi@chromium.org</owner> <owner>xinyiji@chromium.org</owner> <summary> @@ -57,7 +57,7 @@ </histogram> <histogram name="StartSurface.Show.State" enum="StartSurfaceState" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>hanxi@chromium.org</owner> <owner>xinyiji@chromium.org</owner> <summary> @@ -71,7 +71,7 @@ </histogram> <histogram name="StartSurface.SpareTab.TimeBetweenShowAndCreate" units="ms" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>sreejakshetty@chromium.org</owner> <owner>hanxi@chromium.org</owner> <summary> @@ -81,7 +81,7 @@ </summary> </histogram> -<histogram name="StartSurface.TimeSpent" units="ms" expires_after="2023-09-10"> +<histogram name="StartSurface.TimeSpent" units="ms" expires_after="2023-11-12"> <owner>hanxi@chromium.org</owner> <owner>xinyiji@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/startup/histograms.xml b/tools/metrics/histograms/metadata/startup/histograms.xml index 66bd389..29f9019f 100644 --- a/tools/metrics/histograms/metadata/startup/histograms.xml +++ b/tools/metrics/histograms/metadata/startup/histograms.xml
@@ -23,7 +23,7 @@ <histograms> <histogram name="Startup.AfterStartupTaskCount" units="units" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>michaeln@chromium.org</owner> <summary> The number of after-startup tasks that were queued prior to startup @@ -240,7 +240,7 @@ </histogram> <histogram name="Startup.Android.DurationSinceLastBackgroundTime" units="ms" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>hanxi@chromium.org</owner> <summary> Android: The elapsed time from the last time when Chrome goes to background @@ -276,7 +276,7 @@ </histogram> <histogram base="true" name="Startup.Android.FeedStreamCreatedTime" units="ms" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <!-- Name completed by histogram_suffixes name="JavaStartMode" --> <owner>hanxi@chromium.org</owner> @@ -289,7 +289,7 @@ </histogram> <histogram base="true" name="Startup.Android.FirstDrawCompletedTime" units="ms" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <!-- Name completed by histogram_suffixes name="JavaStartMode" --> <owner>hanxi@chromium.org</owner> @@ -310,7 +310,7 @@ </histogram> <histogram name="Startup.Android.IsHomepagePolicyManagerInitialized" - enum="Boolean" expires_after="2023-09-03"> + enum="Boolean" expires_after="2023-11-12"> <owner>hanxi@chromium.org</owner> <owner>xinyiji@chromium.org</owner> <summary> @@ -343,7 +343,7 @@ </histogram> <histogram name="Startup.Android.LastVisitedTabIsSRPWhenOverviewShownAtLaunch" - enum="Boolean" expires_after="2023-09-03"> + enum="Boolean" expires_after="2023-11-12"> <owner>hanxi@chromium.org</owner> <owner>fredmello@chromium.org</owner> <summary> @@ -400,7 +400,7 @@ </histogram> <histogram name="Startup.BrowserMainRunnerImplInitializeLongTime" units="ms" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>robliao@chromium.org</owner> <summary> The amount of time that elapsed during BrowserMainRunnerImpl::Initialize. @@ -408,7 +408,7 @@ </histogram> <histogram name="Startup.BrowserMessageLoopFirstIdle" units="ms" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>gab@chromium.org</owner> <owner>etienneb@chromium.org</owner> <summary> @@ -493,7 +493,7 @@ </histogram> <histogram name="Startup.BrowserWindow.FirstPaint" units="ms" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>gab@chromium.org</owner> <owner>mblsha@yandex-team.ru</owner> <summary> @@ -837,7 +837,7 @@ </histogram> <histogram name="Startup.Temperature" enum="StartupTemperature" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <!-- expires-after: Diagnosis metric for changes in StartupTemperature suffix. Shouldn't truly expire but kColdStartHardFaultCountThreshold should be surveyed yearly. -->
diff --git a/tools/metrics/histograms/metadata/storage/histograms.xml b/tools/metrics/histograms/metadata/storage/histograms.xml index 085fa7d..839ef81 100644 --- a/tools/metrics/histograms/metadata/storage/histograms.xml +++ b/tools/metrics/histograms/metadata/storage/histograms.xml
@@ -684,7 +684,7 @@ </histogram> <histogram name="Storage.SharedStorage.Database.Error" enum="SqliteErrorCode" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>cammie@chromium.org</owner> <owner>yaoxia@chromium.org</owner> <owner>chrome-ads-histograms@google.com</owner>
diff --git a/tools/metrics/histograms/metadata/subresource/histograms.xml b/tools/metrics/histograms/metadata/subresource/histograms.xml index dfd470db..d184c67 100644 --- a/tools/metrics/histograms/metadata/subresource/histograms.xml +++ b/tools/metrics/histograms/metadata/subresource/histograms.xml
@@ -244,7 +244,7 @@ </histogram> <histogram name="SubresourceFilter.DocumentLoad.SubframeFilteringDelay.Allowed" - units="microseconds" expires_after="2023-08-09"> + units="microseconds" expires_after="2023-11-12"> <owner>alexmt@chromium.org</owner> <owner>chrome-ads-histograms@google.com</owner> <summary> @@ -353,7 +353,7 @@ </histogram> <histogram name="SubresourceFilter.IndexRuleset.Verify.Status" - enum="SubresourceFilterVerifyStatus" expires_after="2023-09-10"> + enum="SubresourceFilterVerifyStatus" expires_after="2023-11-12"> <owner>alexmt@chromium.org</owner> <owner>chrome-ads-histograms@google.com</owner> <summary> @@ -579,7 +579,7 @@ </histogram> <histogram name="SubresourceFilter.SafeBrowsing.TotalCheckTime" units="ms" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>alexmt@chromium.org</owner> <owner>chrome-ads-histograms@google.com</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/sync/histograms.xml b/tools/metrics/histograms/metadata/sync/histograms.xml index 39cc17f4..2d88c5df 100644 --- a/tools/metrics/histograms/metadata/sync/histograms.xml +++ b/tools/metrics/histograms/metadata/sync/histograms.xml
@@ -113,7 +113,7 @@ </histogram> <histogram name="Sync.BackedOffModelType" enum="SyncModelTypes" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>victorvianna@google.com</owner> <owner>src/components/sync/OWNERS</owner> <component>Services>Sync</component> @@ -314,7 +314,7 @@ </histogram> <histogram name="Sync.ConfigureDataTypes" enum="SyncModelTypes" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>mastiz@chromium.org</owner> <owner>treib@chromium.org</owner> <component>Services>Sync</component> @@ -438,7 +438,7 @@ </histogram> <histogram name="Sync.CustomSync3" enum="SyncModelTypes" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>treib@chromium.org</owner> <owner>mastiz@chromium.org</owner> <component>Services>Sync</component> @@ -453,7 +453,7 @@ </histogram> <histogram name="Sync.DataTypeRunFailures2" enum="SyncModelTypes" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>rushans@google.com</owner> <owner>mastiz@chromium.org</owner> <component>Services>Sync</component> @@ -466,7 +466,7 @@ </histogram> <histogram name="Sync.DataTypeStartFailures2" enum="SyncModelTypes" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>rushans@google.com</owner> <owner>mastiz@chromium.org</owner> <component>Services>Sync</component> @@ -548,7 +548,7 @@ </histogram> <histogram name="Sync.History.DatabaseError" enum="SyncHistoryDatabaseError" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>treib@chromium.org</owner> <owner>mastiz@chromium.org</owner> <component>Services>Sync</component> @@ -607,7 +607,7 @@ </histogram> <histogram name="Sync.InitialState2" enum="SyncInitialState" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>treib@chromium.org</owner> <owner>mastiz@chromium.org</owner> <component>Services>Sync</component> @@ -860,7 +860,7 @@ </histogram> <histogram name="Sync.ModelTypeEntityMetadataWithoutInitialSync" - enum="SyncModelTypes" expires_after="2023-09-03"> + enum="SyncModelTypes" expires_after="2023-11-12"> <owner>mastiz@chromium.org</owner> <owner>treib@chromium.org</owner> <component>Services>Sync</component> @@ -1058,7 +1058,7 @@ </histogram> <histogram name="Sync.PassphraseType" enum="SyncPassphraseType" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>treib@chromium.org</owner> <owner>mastiz@chromium.org</owner> <component>Services>Sync</component> @@ -1076,7 +1076,7 @@ </histogram> <histogram name="Sync.PassphraseTypeUponNotMyBirthdayOrEncryptionObsolete" - enum="SyncPassphraseType" expires_after="2023-08-27"> + enum="SyncPassphraseType" expires_after="2023-11-12"> <owner>mastiz@chromium.org</owner> <owner>mmoskvitin@google.com</owner> <component>Services>Sync</component> @@ -1099,7 +1099,7 @@ </histogram> <histogram name="Sync.PendingInvalidationStatus" - enum="PendingInvalidationStatus" expires_after="2023-09-03"> + enum="PendingInvalidationStatus" expires_after="2023-11-12"> <owner>shabdan@google.com</owner> <owner>rushans@google.com</owner> <component>Services>Sync</component> @@ -1479,7 +1479,7 @@ </histogram> <histogram name="Sync.TrustedVaultDegradedRecoverabilityValue2" - enum="TrustedVaultDegradedRecoverabilityValue" expires_after="2023-09-10"> + enum="TrustedVaultDegradedRecoverabilityValue" expires_after="2023-11-12"> <owner>mmrashad@google.com</owner> <owner>mmoskvitin@google.com</owner> <component>Services>Sync</component> @@ -1852,7 +1852,7 @@ </histogram> <histogram name="Sync.URLFetchTimedOut" enum="BooleanTimedOut" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>mastiz@chromium.org</owner> <owner>treib@chromium.org</owner> <component>Services>Sync</component>
diff --git a/tools/metrics/histograms/metadata/tab/histograms.xml b/tools/metrics/histograms/metadata/tab/histograms.xml index 2653b92..a0c809a 100644 --- a/tools/metrics/histograms/metadata/tab/histograms.xml +++ b/tools/metrics/histograms/metadata/tab/histograms.xml
@@ -211,7 +211,7 @@ </token> </histogram> -<histogram name="Tab.Count.Guest" units="units" expires_after="2023-09-03"> +<histogram name="Tab.Count.Guest" units="units" expires_after="2023-11-12"> <owner>rhalavati@chromium.org</owner> <owner>chrome-incognito@google.com</owner> <summary> @@ -227,7 +227,7 @@ </summary> </histogram> -<histogram name="Tab.Count.Incognito" units="units" expires_after="2023-08-27"> +<histogram name="Tab.Count.Incognito" units="units" expires_after="2023-11-12"> <owner>rhalavati@chromium.org</owner> <owner>chrome-incognito@google.com</owner> <summary> @@ -294,7 +294,7 @@ </histogram> <histogram name="Tab.PerceivedRestoreTime" units="ms" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>ckitagawa@chromium.org</owner> <owner>dtrainor@chromium.org</owner> <owner>yfriedman@chromium.org</owner> @@ -466,7 +466,7 @@ </histogram> <histogram name="Tab.StatusWhenSwitchedBackToForeground" enum="TabStatus" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>ckitagawa@chromium.org</owner> <owner>marq@chromium.org</owner> <summary> @@ -619,7 +619,7 @@ </histogram> <histogram name="TabGroups.UserCustomizedGroupCountPerLoad" units="groups" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>dpenning@chromium.org</owner> <owner>chrome-desktop-ui-sea@google.com</owner> <summary> @@ -629,7 +629,7 @@ </histogram> <histogram name="TabGroups.UserGroupCount" units="groups" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>yusufo@chromium.org</owner> <owner>wychen@chromium.org</owner> <summary> @@ -649,7 +649,7 @@ </histogram> <histogram name="TabGroups.UserNamedGroupCount" units="groups" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>yusufo@chromium.org</owner> <owner>wychen@chromium.org</owner> <summary> @@ -659,7 +659,7 @@ </histogram> <histogram name="TabGroups.UserPinnedTabCountPerLoad" units="tabs" - expires_after="2023-09-05"> + expires_after="2023-11-12"> <owner>dpenning@chromium.org</owner> <owner>chrome-desktop-ui-sea@google.com</owner> <summary> @@ -991,7 +991,7 @@ </histogram> <histogram name="TabManager.Discarding.InactiveToReloadTime" units="ms" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>chrisha@chromium.org</owner> <owner>catan-team@chromium.org</owner> <summary> @@ -1142,7 +1142,7 @@ </summary> </histogram> -<histogram name="Tabs.CountAtStartup" units="tabs" expires_after="2023-09-10"> +<histogram name="Tabs.CountAtStartup" units="tabs" expires_after="2023-11-12"> <owner>marq@chromium.org</owner> <owner>chromeleon@google.com</owner> <summary>[Android and iOS] The number of tabs opened at cold launch.</summary> @@ -1555,7 +1555,7 @@ </histogram> <histogram name="Tabs.RestoreTabStateException" enum="RestoreTabStateException" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>ckitagawa@chromium.org</owner> <owner>fredmello@chromium.org</owner> <summary> @@ -1568,7 +1568,7 @@ </histogram> <histogram name="Tabs.SadTab.Feedback.Event" enum="SadTabEvent" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>sonnyrao@chromium.org</owner> <owner>jamescook@chromium.org</owner> <summary> @@ -1579,7 +1579,7 @@ </histogram> <histogram name="Tabs.SadTab.Reload.Event" enum="SadTabEvent" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>sonnyrao@chromium.org</owner> <owner>jamescook@chromium.org</owner> <summary> @@ -1792,7 +1792,7 @@ </token> </histogram> -<histogram name="Tabs.TabCountPerLoad" units="tabs" expires_after="2023-08-27"> +<histogram name="Tabs.TabCountPerLoad" units="tabs" expires_after="2023-11-12"> <owner>mpearson@chromium.org</owner> <owner>chrome-desktop-ui-sea@google.com</owner> <owner>sbirch@google.com</owner> @@ -1805,7 +1805,7 @@ </histogram> <histogram name="Tabs.TabCountPerWindow" units="tabs" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>mpearson@chromium.org</owner> <owner>chrome-desktop-ui-sea@google.com</owner> <summary> @@ -1853,7 +1853,7 @@ </histogram> <histogram name="Tabs.TabRestoreMethod" enum="TabRestoreMethod" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>davidjm@chromium.org</owner> <owner>dtrainor@chromium.org</owner> <owner>nyquist@chromium.org</owner> @@ -2391,7 +2391,7 @@ <token key="BatteryState" variants="BatteryState"/> </histogram> -<histogram name="Tabs.WindowWidth" units="DIPs" expires_after="2023-09-03"> +<histogram name="Tabs.WindowWidth" units="DIPs" expires_after="2023-11-12"> <owner>collinbaker@chromium.org</owner> <owner>chrome-desktop-ui-sea@google.com</owner> <summary> @@ -2440,7 +2440,7 @@ </histogram> <histogram name="TabStrip.TabCountOnPageLoad" units="tabs" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>yusufo@chromium.org</owner> <owner>wychen@chromium.org</owner> <summary> @@ -2452,7 +2452,7 @@ </histogram> <histogram name="TabStrip.TimeToCreateNewTabFromPress" units="ms" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>robliao@chromium.org</owner> <owner>chrome-desktop-ui-sea@google.com</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/translate/histograms.xml b/tools/metrics/histograms/metadata/translate/histograms.xml index db8880ef..1acf0d7 100644 --- a/tools/metrics/histograms/metadata/translate/histograms.xml +++ b/tools/metrics/histograms/metadata/translate/histograms.xml
@@ -59,7 +59,7 @@ </histogram> <histogram name="Translate.ApplicationStart.NeverTranslateLanguage" - enum="LocaleCodeISO639" expires_after="2023-09-03"> + enum="LocaleCodeISO639" expires_after="2023-11-12"> <owner>megjablon@google.com</owner> <owner>chrome-language@google.com</owner> <summary> @@ -380,7 +380,7 @@ </histogram> <histogram name="Translate.MenuTranslation.IsAvailable" enum="BooleanAvailable" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>cuianthony@google.com</owner> <owner>chrome-language@google.com</owner> <summary> @@ -390,7 +390,7 @@ </histogram> <histogram name="Translate.MenuTranslation.UnavailableReasons" - enum="MenuTranslationUnavailableReason" expires_after="2023-09-03"> + enum="MenuTranslationUnavailableReason" expires_after="2023-11-12"> <owner>cuianthony@google.com</owner> <owner>chrome-language@google.com</owner> <summary> @@ -599,7 +599,7 @@ </histogram> <histogram name="Translate.PageLoad.Ranker.Decision" - enum="TranslateRankerDecision" expires_after="2023-08-31"> + enum="TranslateRankerDecision" expires_after="2023-11-12"> <owner>megjablon@google.com</owner> <owner>chrome-language@google.com</owner> <summary> @@ -624,7 +624,7 @@ </histogram> <histogram name="Translate.PageLoad.Ranker.Version" units="version" - expires_after="2023-08-31"> + expires_after="2023-11-12"> <owner>megjablon@google.com</owner> <owner>chrome-language@google.com</owner> <summary> @@ -646,7 +646,7 @@ </histogram> <histogram name="Translate.PartialTranslateBubbleUiEvent" - enum="PartialTranslateBubbleUiEvent" expires_after="2023-08-31"> + enum="PartialTranslateBubbleUiEvent" expires_after="2023-11-12"> <owner>cuianthony@google.com</owner> <owner>chrome-language@google.com</owner> <summary>Tracks UI events related to the Partial Translate bubble.</summary> @@ -740,7 +740,7 @@ </histogram> <histogram name="Translate.Ranker.Model.Status2" enum="RankerModelStatus" - expires_after="2023-08-31"> + expires_after="2023-11-12"> <owner>megjablon@google.com</owner> <owner>chrome-language@google.com</owner> <summary> @@ -829,7 +829,7 @@ </histogram> <histogram name="Translate.Translate.AMPCacheURL" enum="BooleanTranslate" - expires_after="2023-08-31"> + expires_after="2023-11-12"> <owner>sclittle@google.com</owner> <owner>megjablon@google.com</owner> <owner>chrome-language@google.com</owner> @@ -963,7 +963,7 @@ </histogram> <histogram name="Translate.Translation.TimeToBeReady" units="ms" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>megjablon@google.com</owner> <owner>chrome-language@google.com</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/ukm/histograms.xml b/tools/metrics/histograms/metadata/ukm/histograms.xml index f6180f2..56b2f1fc 100644 --- a/tools/metrics/histograms/metadata/ukm/histograms.xml +++ b/tools/metrics/histograms/metadata/ukm/histograms.xml
@@ -34,7 +34,7 @@ </histogram> <histogram name="UKM.BuildAndStoreLogIsEmpty" enum="Boolean" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>rkaplow@chromium.org</owner> <owner>chrome-metrics-team@google.com</owner> <summary> @@ -70,7 +70,7 @@ </histogram> <histogram name="UKM.ConsentObserver.Purge" enum="Boolean" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>rkaplow@chromium.org</owner> <owner>chrome-metrics-team@google.com</owner> <summary> @@ -91,7 +91,7 @@ </histogram> <histogram name="UKM.Entries.Dropped.ByEntryHash" enum="UkmEventNameHash" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>jwd@chromium.org</owner> <owner>chrome-metrics-team@google.com</owner> <summary> @@ -103,7 +103,7 @@ </histogram> <histogram name="UKM.Entries.Dropped.MaxHit.ByEntryHash" - enum="UkmEventNameHash" expires_after="2023-09-10"> + enum="UkmEventNameHash" expires_after="2023-11-12"> <owner>lucnguyen@google.com</owner> <owner>chrome-metrics-team@google.com</owner> <summary> @@ -128,7 +128,7 @@ </histogram> <histogram name="UKM.Entries.Dropped.SampledOut.ByEntryHash" - enum="UkmEventNameHash" expires_after="2023-09-10"> + enum="UkmEventNameHash" expires_after="2023-11-12"> <owner>lucnguyen@google.com</owner> <owner>chrome-metrics-team@google.com</owner> <summary> @@ -159,7 +159,7 @@ </histogram> <histogram name="UKM.Entries.SerializedCountFCP" units="entries" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>rkaplow@chromium.org</owner> <owner>chrome-metrics-team@google.com</owner> <summary> @@ -170,7 +170,7 @@ </histogram> <histogram name="UKM.InitSequence" enum="UmaInitSequence" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>rkaplow@chromium.org</owner> <owner>chrome-metrics-team@google.com</owner> <summary> @@ -302,7 +302,7 @@ </histogram> <histogram name="UKM.Sources.Dropped" enum="UkmDataDroppedReason" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>rkaplow@chromium.org</owner> <owner>chrome-metrics-team@google.com</owner> <summary> @@ -361,7 +361,7 @@ </histogram> <histogram name="UKM.UnsentLogs.DroppedSize" units="bytes" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>rkaplow@chromium.org</owner> <owner>chrome-metrics-team@google.com</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/uma/histograms.xml b/tools/metrics/histograms/metadata/uma/histograms.xml index fb8a0a5..20c6c03 100644 --- a/tools/metrics/histograms/metadata/uma/histograms.xml +++ b/tools/metrics/histograms/metadata/uma/histograms.xml
@@ -312,7 +312,7 @@ </histogram> <histogram name="UMA.IsClonedInstall" enum="BooleanCloned" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>asvitkine@chromium.org</owner> <owner>src/base/metrics/OWNERS</owner> <summary> @@ -460,7 +460,7 @@ </histogram> <histogram name="UMA.MetricsReporting.Toggle" enum="MetricsReportingChange" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>asvitkine@chromium.org</owner> <owner>src/base/metrics/OWNERS</owner> <summary> @@ -952,7 +952,7 @@ </histogram> <histogram name="UMA.TruncatedEvents.UserAction" units="events" - expires_after="2023-10-22"> + expires_after="2023-11-12"> <owner>rkaplow@chromium.org</owner> <owner>src/base/metrics/OWNERS</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/v8/histograms.xml b/tools/metrics/histograms/metadata/v8/histograms.xml index 5697e1a3..caaf830b 100644 --- a/tools/metrics/histograms/metadata/v8/histograms.xml +++ b/tools/metrics/histograms/metadata/v8/histograms.xml
@@ -212,7 +212,7 @@ </histogram> <histogram name="V8.CompileScriptMicroSeconds.ConsumeCache" - units="microseconds" expires_after="2023-09-03"> + units="microseconds" expires_after="2023-11-12"> <owner>leszeks@chromium.org</owner> <owner>v8-runtime@google.com</owner> <summary> @@ -402,7 +402,7 @@ </histogram> <histogram name="V8.ExecuteMicroSeconds" units="microseconds" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>cbruni@chromium.org</owner> <owner>v8-runtime@google.com</owner> <summary> @@ -1424,7 +1424,7 @@ </histogram> <histogram name="V8.TurboFanOptimizeExecute" units="microseconds" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>tebbi@chromium.org</owner> <owner>mslekova@chromium.org</owner> <summary> @@ -1436,7 +1436,7 @@ </histogram> <histogram name="V8.TurboFanOptimizeFinalize" units="microseconds" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>tebbi@chromium.org</owner> <owner>mslekova@chromium.org</owner> <summary> @@ -1448,7 +1448,7 @@ </histogram> <histogram name="V8.TurboFanOptimizeForOnStackReplacementExecute" - units="microseconds" expires_after="2023-09-10"> + units="microseconds" expires_after="2023-11-12"> <owner>tebbi@chromium.org</owner> <owner>mslekova@chromium.org</owner> <summary> @@ -1461,7 +1461,7 @@ </histogram> <histogram name="V8.TurboFanOptimizeForOnStackReplacementFinalize" - units="microseconds" expires_after="2023-09-10"> + units="microseconds" expires_after="2023-11-12"> <owner>tebbi@chromium.org</owner> <owner>mslekova@chromium.org</owner> <summary> @@ -1474,7 +1474,7 @@ </histogram> <histogram name="V8.TurboFanOptimizeForOnStackReplacementPrepare" - units="microseconds" expires_after="2023-09-10"> + units="microseconds" expires_after="2023-11-12"> <owner>tebbi@chromium.org</owner> <owner>mslekova@chromium.org</owner> <summary> @@ -1487,7 +1487,7 @@ </histogram> <histogram name="V8.TurboFanOptimizeForOnStackReplacementTotalTime" - units="microseconds" expires_after="2023-09-10"> + units="microseconds" expires_after="2023-11-12"> <owner>tebbi@chromium.org</owner> <owner>mslekova@chromium.org</owner> <summary> @@ -1512,7 +1512,7 @@ </histogram> <histogram name="V8.TurboFanOptimizePrepare" units="microseconds" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>tebbi@chromium.org</owner> <owner>mslekova@chromium.org</owner> <summary> @@ -1695,7 +1695,7 @@ </histogram> <histogram name="V8.WasmCompileHugeFunctionMilliSeconds" units="ms" - expires_after="2023-08-01"> + expires_after="2023-11-12"> <owner>clemensb@chromium.org</owner> <owner>ecmziegler@chromium.org</owner> <owner>wasm-v8@google.com</owner> @@ -1707,7 +1707,7 @@ </histogram> <histogram name="V8.WasmCompileHugeFunctionPeakMemoryBytes" units="bytes" - expires_after="2023-08-01"> + expires_after="2023-11-12"> <owner>clemensb@chromium.org</owner> <owner>ecmziegler@chromium.org</owner> <owner>wasm-v8@google.com</owner>
diff --git a/tools/metrics/histograms/metadata/variations/histograms.xml b/tools/metrics/histograms/metadata/variations/histograms.xml index 7ae914b..45c92f9 100644 --- a/tools/metrics/histograms/metadata/variations/histograms.xml +++ b/tools/metrics/histograms/metadata/variations/histograms.xml
@@ -400,7 +400,7 @@ </histogram> <histogram name="Variations.SafeMode.StoreSafeSeed.Result" - enum="VariationsSeedStoreResult" expires_after="2023-08-08"> + enum="VariationsSeedStoreResult" expires_after="2023-11-12"> <owner>isherman@chromium.org</owner> <owner>asvitkine@chromium.org</owner> <owner>src/base/metrics/OWNERS</owner>
diff --git a/tools/metrics/histograms/metadata/web_apk/histograms.xml b/tools/metrics/histograms/metadata/web_apk/histograms.xml index 082633a..c678d2c 100644 --- a/tools/metrics/histograms/metadata/web_apk/histograms.xml +++ b/tools/metrics/histograms/metadata/web_apk/histograms.xml
@@ -91,7 +91,7 @@ </histogram> <histogram name="WebApk.Install.InstallEvent" enum="WebApkInstallEvent" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>hartmanng@chromium.org</owner> <owner>src/chrome/android/webapk/OWNERS</owner> <summary> @@ -113,7 +113,7 @@ </histogram> <histogram name="WebApk.Install.PathToInstall" enum="PwaInstallPath" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>finnur@chromium.org</owner> <owner>peter@chromium.org</owner> <owner>src/chrome/android/webapk/OWNERS</owner> @@ -319,7 +319,7 @@ </histogram> <histogram name="WebApk.Update.UpdateEmptyUniqueId.NeedsUpgrade" enum="Boolean" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>eirage@chromium.org</owner> <owner>hartmanng@chromium.org</owner> <owner>src/chrome/android/webapk/OWNERS</owner>
diff --git a/tools/metrics/histograms/metadata/web_audio/histograms.xml b/tools/metrics/histograms/metadata/web_audio/histograms.xml index ecbc5db..6094c7ba 100644 --- a/tools/metrics/histograms/metadata/web_audio/histograms.xml +++ b/tools/metrics/histograms/metadata/web_audio/histograms.xml
@@ -79,7 +79,7 @@ </histogram> <histogram name="WebAudio.AudioContext.HardwareSampleRate" units="Hz" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>hongchan@chromium.org</owner> <owner>mjwilson@chromium.org</owner> <summary> @@ -159,7 +159,7 @@ </histogram> <histogram name="WebAudio.AudioDestination.CallbackBufferSize" units="units" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>hongchan@chromium.org</owner> <owner>mjwilson@chromium.org</owner> <owner>src/third_party/blink/renderer/modules/webaudio/OWNERS</owner> @@ -273,7 +273,7 @@ </histogram> <histogram name="WebAudio.PannerNode.PanningModel" enum="PanningModelType" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>hongchan@chromium.org</owner> <owner>mjwilson@chromium.org</owner> <owner>src/third_party/blink/renderer/modules/webaudio/OWNERS</owner> @@ -287,7 +287,7 @@ </histogram> <histogram name="WebAudio.PushPullFIFO.UnderflowGlitches" enum="Boolean" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>hongchan@chromium.org</owner> <owner>mjwilson@chromium.org</owner> <summary> @@ -298,7 +298,7 @@ </histogram> <histogram name="WebAudio.PushPullFIFO.UnderflowPercentage" units="%" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>hongchan@chromium.org</owner> <owner>mjwilson@chromium.org</owner> <owner>src/third_party/blink/renderer/modules/webaudio/OWNERS</owner>
diff --git a/tools/metrics/histograms/metadata/web_core/histograms.xml b/tools/metrics/histograms/metadata/web_core/histograms.xml index 9dd31ca..3d3a099 100644 --- a/tools/metrics/histograms/metadata/web_core/histograms.xml +++ b/tools/metrics/histograms/metadata/web_core/histograms.xml
@@ -31,7 +31,7 @@ </variants> <histogram name="WebCore.DistillabilityUs" units="microseconds" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>wychen@chromium.org</owner> <owner>gilmanmh@google.com</owner> <summary> @@ -68,7 +68,7 @@ </histogram> <histogram name="WebCore.FindInPage.DurationBetweenKeystrokes" units="ms" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>jarhar@chromium.org</owner> <owner>vmpstr@chromium.org</owner> <summary> @@ -339,7 +339,7 @@ </histogram> <histogram name="WebCore.IndexedDB.LevelDB.OpenTime" units="ms" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>ayui@chromium.org</owner> <owner>chrome-owp-storage@google.com</owner> <summary> @@ -432,7 +432,7 @@ </histogram> <histogram name="WebCore.IndexedDB.LevelDBWriteErrors" enum="LevelDBErrorTypes" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>ayui@chromium.org</owner> <owner>chrome-owp-storage@google.com</owner> <summary> @@ -441,7 +441,7 @@ </histogram> <histogram name="WebCore.IndexedDB.LevelDBWriteErrors.BFE" - enum="PlatformFileError" expires_after="2023-09-03"> + enum="PlatformFileError" expires_after="2023-11-12"> <owner>ayui@chromium.org</owner> <owner>chrome-owp-storage@google.com</owner> <summary> @@ -451,7 +451,7 @@ </histogram> <histogram name="WebCore.IndexedDB.LevelDBWriteErrors.Corruption" - enum="LevelDBCorruptionTypes" expires_after="2023-08-27"> + enum="LevelDBCorruptionTypes" expires_after="2023-11-12"> <owner>ayui@chromium.org</owner> <owner>chrome-owp-storage@google.com</owner> <summary> @@ -690,7 +690,7 @@ </histogram> <histogram name="WebCore.IndexedDB.TransactionAbortReason" enum="IDBException" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>ayui@chromium.org</owner> <owner>chrome-owp-storage@google.com</owner> <summary> @@ -748,7 +748,7 @@ </histogram> <histogram name="WebCore.Scripts.InlineStreamerTimedOut" enum="BooleanTimedOut" - expires_after="2023-08-08"> + expires_after="2023-11-12"> <owner>cduvall@chromium.org</owner> <owner>leszeks@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/web_rtc/histograms.xml b/tools/metrics/histograms/metadata/web_rtc/histograms.xml index eefa83d..4fbf073 100644 --- a/tools/metrics/histograms/metadata/web_rtc/histograms.xml +++ b/tools/metrics/histograms/metadata/web_rtc/histograms.xml
@@ -237,7 +237,7 @@ </histogram> <histogram name="WebRTC.Audio.ApmCaptureInputLevelAverageRms" - units="dBFS (negated)" expires_after="2023-08-27"> + units="dBFS (negated)" expires_after="2023-11-12"> <owner>hlundin@chromium.org</owner> <owner>webrtc-audio-uma@google.com</owner> <summary> @@ -250,7 +250,7 @@ </histogram> <histogram name="WebRTC.Audio.ApmCaptureInputLevelPeakRms" - units="dBFS (negated)" expires_after="2023-09-03"> + units="dBFS (negated)" expires_after="2023-11-12"> <owner>hlundin@chromium.org</owner> <owner>webrtc-audio-uma@google.com</owner> <summary> @@ -680,7 +680,7 @@ </histogram> <histogram name="WebRTC.Audio.TargetJitterBufferDelayMs" units="ms" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>hlundin@chromium.org</owner> <owner>webrtc-audio-uma@google.com</owner> <summary> @@ -723,7 +723,7 @@ </histogram> <histogram name="WebRTC.AudioOutputSampleRate" enum="AudioSampleRate" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>saza@chromium.org</owner> <owner>olka@chromium.org</owner> <owner>webrtc-audio-uma@google.com</owner> @@ -748,14 +748,14 @@ </histogram> <histogram name="WebRTC.BWE.InitiallyLostPackets" units="packets" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>holmer@chromium.org</owner> <summary> The number of video packets lost durig the first 2 seconds in a WebRTC call. </summary> </histogram> -<histogram name="WebRTC.BWE.InitialRtt" units="ms" expires_after="2023-09-10"> +<histogram name="WebRTC.BWE.InitialRtt" units="ms" expires_after="2023-11-12"> <owner>holmer@chromium.org</owner> <summary> The round-trip time as measured 2 seconds into a WebRTC call. @@ -763,7 +763,7 @@ </histogram> <histogram name="WebRTC.BWE.InitialVsConvergedDiff" units="kbps" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>holmer@chromium.org</owner> <summary> The difference between the bandwidth estimate at 2 seconds and 20 seconds @@ -814,7 +814,7 @@ </histogram> <histogram name="WebRTC.Call.AudioBitrateReceivedInKbps" units="kbps" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>holmer@chromium.org</owner> <summary> Average audio bitrate received during a call, counted from first packet @@ -844,7 +844,7 @@ </histogram> <histogram name="WebRTC.Call.LifetimeInSeconds" units="seconds" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>asapersson@chromium.org</owner> <summary> The lifetime of a call. Recorded when a Call instance is destroyed. @@ -862,7 +862,7 @@ </histogram> <histogram name="WebRTC.Call.RtcpBitrateReceivedInBps" units="bits/s" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>holmer@chromium.org</owner> <summary> Average RTCP bitrate received during a call, counted from first packet @@ -1261,7 +1261,7 @@ </histogram> <histogram name="WebRTC.PeerConnection.Duration.Signaling" units="microseconds" - expires_after="2023-09-01"> + expires_after="2023-11-12"> <owner>handellm@chromium.org</owner> <owner>webrtc-dev@chromium.org</owner> <summary> @@ -1405,7 +1405,7 @@ </histogram> <histogram name="WebRTC.PeerConnection.Latency.Worker" units="microseconds" - expires_after="2023-09-01"> + expires_after="2023-11-12"> <owner>handellm@chromium.org</owner> <owner>webrtc-dev@chromium.org</owner> <summary> @@ -1711,7 +1711,7 @@ </histogram> <histogram name="WebRTC.PeerConnection.ThermalState" enum="ThermalState" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>eshr@google.com</owner> <owner>hbos@chromium.org</owner> <summary> @@ -1744,7 +1744,7 @@ </histogram> <histogram name="WebRTC.PeerConnection.UsagePattern" - enum="WebRtcPeerConnectionUsagePattern" expires_after="2023-09-03"> + enum="WebRtcPeerConnectionUsagePattern" expires_after="2023-11-12"> <owner>hta@chromium.org</owner> <owner>webrtc-dev@chromium.org</owner> <summary> @@ -3933,7 +3933,7 @@ </histogram> <histogram name="WebRTC.webkitApiCount" enum="RTCAPIName" - expires_after="2023-08-27"> + expires_after="2023-11-12"> <owner>toprice@chromium.org</owner> <owner>hbos@chromium.org</owner> <owner>mcasas@chromium.org</owner>
diff --git a/tools/metrics/histograms/metadata/webapps/histograms.xml b/tools/metrics/histograms/metadata/webapps/histograms.xml index 5bebba6..a00670a0 100644 --- a/tools/metrics/histograms/metadata/webapps/histograms.xml +++ b/tools/metrics/histograms/metadata/webapps/histograms.xml
@@ -133,7 +133,7 @@ </histogram> <histogram name="Launch.HomeScreen" enum="LaunchFromHomeScreen" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>dominickn@chromium.org</owner> <owner>hartmanng@chromium.org</owner> <owner>peconn@chromium.org</owner> @@ -143,7 +143,7 @@ </histogram> <histogram name="Launch.HomeScreenSource" enum="LaunchFromHomeScreenSource" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>dominickn@chromium.org</owner> <owner>hartmanng@chromium.org</owner> <owner>peconn@chromium.org</owner> @@ -181,7 +181,7 @@ </histogram> <histogram name="Launch.WebAppLaunchHandlerClientMode" - enum="WebAppLaunchHandlerClientMode" expires_after="2023-09-03"> + enum="WebAppLaunchHandlerClientMode" expires_after="2023-11-12"> <owner>alancutter@chromium.org</owner> <owner>desktop-pwas-team@google.com</owner> <summary> @@ -363,7 +363,7 @@ </histogram> <histogram name="Webapp.CheckServiceWorker.Time" units="ms" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>asamidoi@chromium.org</owner> <owner>chrome-worker@google.com</owner> <summary> @@ -387,7 +387,7 @@ </histogram> <histogram name="WebApp.DefaultOffline.ClosingReason" - enum="DefaultOfflineClosingReason" expires_after="2023-09-01"> + enum="DefaultOfflineClosingReason" expires_after="2023-11-12"> <owner>finnur@chromium.org</owner> <owner>peter@chromium.org</owner> <summary> @@ -400,7 +400,7 @@ </histogram> <histogram name="WebApp.DefaultOffline.DurationShown" units="seconds" - expires_after="2023-09-01"> + expires_after="2023-11-12"> <owner>finnur@chromium.org</owner> <owner>peter@chromium.org</owner> <summary> @@ -413,7 +413,7 @@ </histogram> <histogram base="true" name="WebApp.Engagement" - enum="SiteEngagementServiceEngagementType" expires_after="2023-08-27"> + enum="SiteEngagementServiceEngagementType" expires_after="2023-11-12"> <owner>mgiuca@chromium.org</owner> <owner>desktop-pwas-team@google.com</owner> <summary> @@ -999,7 +999,7 @@ </histogram> <histogram name="WebApp.LaunchSource" enum="LaunchSource" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>phillis@chromium.org</owner> <owner>desktop-pwas-team@google.com</owner> <summary> @@ -1419,14 +1419,14 @@ </histogram> <histogram name="WebApp.ShortcutsMenuRegistration.Result" enum="BooleanSuccess" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>dibyapal@chromium.org</owner> <owner>desktop-pwas-team@google.com</owner> <summary>Records the result of shortcuts menu registration for PWAs.</summary> </histogram> <histogram name="WebApp.ShortcutsMenuUnregistered.Result" enum="BooleanSuccess" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>dibyapal@chromium.org</owner> <owner>desktop-pwas-team@google.com</owner> <summary> @@ -1476,7 +1476,7 @@ </histogram> <histogram name="Webapp.SystemApps.IconsAreHealthyInSession" - enum="BooleanSuccess" expires_after="2023-09-03"> + enum="BooleanSuccess" expires_after="2023-11-12"> <owner>qjw@chromium.org</owner> <owner>dominicschulz@chromium.org</owner> <summary> @@ -1487,7 +1487,7 @@ </histogram> <histogram name="Webapp.SystemApps.IconsFixedOnReinstall" enum="BooleanSuccess" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>qjw@chromium.org</owner> <owner>clamclamyan@google.com</owner> <owner>dominicschulz@chromium.org</owner>
diff --git a/tools/metrics/histograms/metadata/webauthn/histograms.xml b/tools/metrics/histograms/metadata/webauthn/histograms.xml index 3e74b81..0916b6b 100644 --- a/tools/metrics/histograms/metadata/webauthn/histograms.xml +++ b/tools/metrics/histograms/metadata/webauthn/histograms.xml
@@ -180,7 +180,7 @@ </histogram> <histogram name="WebAuthentication.ConditionalUiPasskeyCount" units="passkeys" - expires_after="2023-09-03"> + expires_after="2023-11-12"> <owner>kenrb@chromium.org</owner> <owner>nsatragno@chromium.org</owner> <owner>chrome-webauthn@google.com</owner> @@ -190,7 +190,7 @@ </histogram> <histogram name="WebAuthentication.GetAssertionRequestTransport" - enum="WebAuthenticationFidoTransport" expires_after="2023-09-10"> + enum="WebAuthenticationFidoTransport" expires_after="2023-11-12"> <owner>kenrb@chromium.org</owner> <owner>martinkr@google.com</owner> <summary> @@ -201,7 +201,7 @@ </histogram> <histogram name="WebAuthentication.GetAssertionResponseTransport" - enum="WebAuthenticationFidoTransport" expires_after="2023-09-10"> + enum="WebAuthenticationFidoTransport" expires_after="2023-11-12"> <owner>kenrb@chromium.org</owner> <owner>martinkr@google.com</owner> <summary> @@ -244,7 +244,7 @@ </histogram> <histogram name="WebAuthentication.MakeCredentialResponseTransport" - enum="WebAuthenticationFidoTransport" expires_after="2023-09-10"> + enum="WebAuthenticationFidoTransport" expires_after="2023-11-12"> <owner>kenrb@chromium.org</owner> <owner>martinkr@google.com</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/windows/histograms.xml b/tools/metrics/histograms/metadata/windows/histograms.xml index 7a55aa80..ec01f065 100644 --- a/tools/metrics/histograms/metadata/windows/histograms.xml +++ b/tools/metrics/histograms/metadata/windows/histograms.xml
@@ -76,7 +76,7 @@ </histogram> <histogram name="Windows.HighResolutionTimerUsage" units="%" - expires_after="2023-09-10"> + expires_after="2023-11-12"> <owner>olivierli@chromium.org</owner> <owner>catan-team@chromium.org</owner> <summary> @@ -98,7 +98,7 @@ </histogram> <histogram name="Windows.InstallerPinUnpinned" enum="IsPinnedToTaskbarResult" - expires_after="2023-08-31"> + expires_after="2023-11-12"> <owner>davidbienvenu@chromium.org</owner> <owner>jessemckenna@chromium.org</owner> <summary>
diff --git a/tools/metrics/ukm/ukm.xml b/tools/metrics/ukm/ukm.xml index 3ead1d1..98809cdf 100644 --- a/tools/metrics/ukm/ukm.xml +++ b/tools/metrics/ukm/ukm.xml
@@ -4046,6 +4046,11 @@ A bitmask (0xMMmm) representing the Angular version </summary> </metric> + <metric name="DrupalVersion"> + <summary> + A bitmask (0xMMmm) representing the Drupal version + </summary> + </metric> <metric name="NextJSVersion"> <summary> A bitmask (0xMMmm) representing the NextJS version @@ -4061,6 +4066,11 @@ A bitmask (0xMMmm) representing the Vue version </summary> </metric> + <metric name="WordPressVersion"> + <summary> + A bitmask (0xMMmm) representing the WordPress version + </summary> + </metric> </event> <event name="Blink.PageLoad"> @@ -11926,12 +11936,22 @@ framework. </summary> </metric> + <metric name="DrupalPageLoad" enum="Boolean"> + <summary> + True if the page loaded in the main frame uses the Drupal CMS. + </summary> + </metric> <metric name="GatsbyPageLoad" enum="Boolean"> <summary> True if the page loaded in the main frame uses the Gatsby JavaScript framework. </summary> </metric> + <metric name="JoomlaPageLoad" enum="Boolean"> + <summary> + True if the page loaded in the main frame uses the Joomloa CMS. + </summary> + </metric> <metric name="NextJSPageLoad" enum="Boolean"> <summary> True if the page loaded in the main frame uses the Next.js JavaScript @@ -11962,6 +11982,16 @@ framework. </summary> </metric> + <metric name="ShopifyPageLoad" enum="Boolean"> + <summary> + True if the page loaded in the main frame uses the Shopify CMS. + </summary> + </metric> + <metric name="SquarespacePageLoad" enum="Boolean"> + <summary> + True if the page loaded in the main frame uses the Squarespace CMS. + </summary> + </metric> <metric name="SveltePageLoad" enum="Boolean"> <summary> True if the page loaded in the main frame uses the Svelte JavaScript @@ -11980,6 +12010,16 @@ framework. </summary> </metric> + <metric name="WixPageLoad" enum="Boolean"> + <summary> + True if the page loaded in the main frame uses the Wix CMS. + </summary> + </metric> + <metric name="WordPressPageLoad" enum="Boolean"> + <summary> + True if the page loaded in the main frame uses the WordPress CMS. + </summary> + </metric> </event> <event name="Layout.DisplayCutout.StateChanged">
diff --git a/tools/perf/core/perfetto_binary_roller/binary_deps.json b/tools/perf/core/perfetto_binary_roller/binary_deps.json index a1bd229..6847a0a 100644 --- a/tools/perf/core/perfetto_binary_roller/binary_deps.json +++ b/tools/perf/core/perfetto_binary_roller/binary_deps.json
@@ -21,8 +21,8 @@ "full_remote_path": "perfetto-luci-artifacts/v34.0/mac-arm64/trace_processor_shell" }, "linux": { - "hash": "ab9efa3edd117f26568756e670183fdfb87141b2", - "full_remote_path": "chromium-telemetry/perfetto_binaries/trace_processor_shell/linux/287c9bfb7d7107806ee430453f2e8db09fe9ed8a/trace_processor_shell" + "hash": "dba28497d132b963956df1501b7732b08313ddfe", + "full_remote_path": "chromium-telemetry/perfetto_binaries/trace_processor_shell/linux/f18d5dceede0c5bc68675a4fbf964b467c919511/trace_processor_shell" } }, "power_profile.sql": {
diff --git a/ui/chromeos/styles/cros_sys_colors.json5 b/ui/chromeos/styles/cros_sys_colors.json5 index 3d2d6f7..9577f25 100644 --- a/ui/chromeos/styles/cros_sys_colors.json5 +++ b/ui/chromeos/styles/cros_sys_colors.json5
@@ -57,8 +57,7 @@ 'cros-textfield-background-color' : '$cros.sys.input-field-on-shaded', 'cros-textfield-label-color' : '$cros.sys.on-surface', 'cros-slider-color-active' : '$cros.sys.primary', - /** cros.sys.primary-container @ 30% */ - 'cros-slider-track-color-active': 'rgba($cros.sys.primary-container.rgb,.3)', + 'cros-slider-track-color-active': '$cros.sys.primary-container', /** cros.sys.primary-container @ 30% */ 'cros-slider-track-color-inactive': 'rgba($cros.sys.disabled.rgb,.3)', 'cros-slider-label-text-color' : '$cros.sys.on-primary',
diff --git a/ui/file_manager/file_manager/containers/nudge_container.ts b/ui/file_manager/file_manager/containers/nudge_container.ts index e5663c9..331788d 100644 --- a/ui/file_manager/file_manager/containers/nudge_container.ts +++ b/ui/file_manager/file_manager/containers/nudge_container.ts
@@ -201,6 +201,8 @@ // Self dismissable nudge only dismisses if the user clicks on the nudge. this.nudge_.addEventListener( 'pointerdown', () => this.closeNudge(this.currentNudgeType_), config); + anchor.addEventListener( + 'pointerdown', () => this.closeNudge(this.currentNudgeType_), config); const dismissOnKeyDown = info.dismissOnKeyDown; if (dismissOnKeyDown) { document.addEventListener('keydown', (event: KeyboardEvent) => {
diff --git a/ui/file_manager/file_manager/containers/nudge_container_unittest.ts b/ui/file_manager/file_manager/containers/nudge_container_unittest.ts index 25f84f2..3990aca 100644 --- a/ui/file_manager/file_manager/containers/nudge_container_unittest.ts +++ b/ui/file_manager/file_manager/containers/nudge_container_unittest.ts
@@ -244,6 +244,26 @@ } /** + * Tests the nudge is dismissed by clicking on the anchor. + */ +export async function testNudgeDismissAnchor(done: () => void) { + nudgeInfo[NudgeType.TEST_NUDGE].selfDismiss = true; + await createAndShowTestNudge(); + + // Click and wait it to dismiss. + const anchor = nudgeInfo[NudgeType.TEST_NUDGE].anchor(); + anchor!.dispatchEvent(new PointerEvent('pointerdown')); + + // Reposition to hidden. + await waitUntilRepositionsUninitialised(); + assertTrue( + await nudgeContainer!.checkSeen(NudgeType.TEST_NUDGE), + 'check nudge has been seen'); + + done(); +} + +/** * Tests the nudge using the dismissOnKeyDown(). */ export async function testNudgeDismissKeyDown(done: () => void) {
diff --git a/ui/file_manager/file_manager/foreground/js/ui/banners/drive_bulk_pinning_banner.html b/ui/file_manager/file_manager/foreground/js/ui/banners/drive_bulk_pinning_banner.html index fc78cf7..3d98460 100644 --- a/ui/file_manager/file_manager/foreground/js/ui/banners/drive_bulk_pinning_banner.html +++ b/ui/file_manager/file_manager/foreground/js/ui/banners/drive_bulk_pinning_banner.html
@@ -1,6 +1,7 @@ <style> educational-banner { --feature-icon-src: url(/foreground/images/files/ui/drive_bulk_pinning.svg); + --buttons-direction: row-reverse; } /* action-button's hover effect is handled by hoverBackground. */
diff --git a/ui/file_manager/file_manager/foreground/js/ui/banners/educational_banner.html b/ui/file_manager/file_manager/foreground/js/ui/banners/educational_banner.html index e4baae2..078e8638 100644 --- a/ui/file_manager/file_manager/foreground/js/ui/banners/educational_banner.html +++ b/ui/file_manager/file_manager/foreground/js/ui/banners/educational_banner.html
@@ -25,6 +25,8 @@ display: flex; flex-direction: row; flex-wrap: nowrap; + margin-bottom: 8px; + margin-top: 8px; } :host-context([theme='legacy']) .feature-icon { @@ -96,7 +98,9 @@ display: flex; flex: 0 0 auto; height: 32px; + margin-bottom: 8px; margin-inline-start: auto; + margin-top: 8px; padding-inline-start: 40px; } @@ -104,9 +108,11 @@ align-items: center; display: flex; flex: 0 0 auto; + flex-direction: var(--buttons-direction, row); height: 32px; + margin-bottom: 8px; margin-inline-start: auto; - padding-inline-start: 40px; + margin-top: 8px; padding-inline-start: 32px; }
diff --git a/ui/file_manager/file_manager/state/reducers/all_entries.ts b/ui/file_manager/file_manager/state/reducers/all_entries.ts index 242a1fff..f5fab7b 100644 --- a/ui/file_manager/file_manager/state/reducers/all_entries.ts +++ b/ui/file_manager/file_manager/state/reducers/all_entries.ts
@@ -381,6 +381,8 @@ return EntryType.PLACEHOLDER; case 'GuestOsPlaceholder': return EntryType.PLACEHOLDER; + case 'TrashEntry': + return EntryType.TRASH; default: console.warn(`Invalid entry.type_name='${entry.type_name}`); return EntryType.FS_API;
diff --git a/ui/gfx/BUILD.gn b/ui/gfx/BUILD.gn index 32652f9..4022d71 100644 --- a/ui/gfx/BUILD.gn +++ b/ui/gfx/BUILD.gn
@@ -176,7 +176,6 @@ "decorated_text_mac.h", "decorated_text_mac.mm", "font_fallback_mac.mm", - "font_render_params_mac.cc", "image/image_mac.mm", "image/image_skia_util_mac.h", "image/image_skia_util_mac.mm", @@ -227,6 +226,9 @@ "win/window_impl.h", ] } + if (is_apple) { + sources += [ "font_render_params_mac.cc" ] + } if (is_ios) { sources += [ "image/image_ios.mm", @@ -241,9 +243,7 @@ "scoped_ui_graphics_push_context_ios.mm", "text_utils_ios.mm", ] - if (use_blink) { - sources += [ "font_render_params_mac.cc" ] - } else { + if (!use_blink) { sources += [ "image/image_skia_rep_ios.cc", "image/image_skia_rep_ios.h",
diff --git a/ui/gfx/platform_font_ios.h b/ui/gfx/platform_font_ios.h index 71861397..22e5ebc 100644 --- a/ui/gfx/platform_font_ios.h +++ b/ui/gfx/platform_font_ios.h
@@ -70,6 +70,9 @@ int ascent_; int cap_height_; int average_width_; + + // Details about how the font should be rendered. + FontRenderParams render_params_; }; } // namespace gfx
diff --git a/ui/gfx/platform_font_ios.mm b/ui/gfx/platform_font_ios.mm index e23b56a..8f6347a 100644 --- a/ui/gfx/platform_font_ios.mm +++ b/ui/gfx/platform_font_ios.mm
@@ -117,9 +117,7 @@ } const FontRenderParams& PlatformFontIOS::GetFontRenderParams() { - NOTIMPLEMENTED(); - static FontRenderParams params; - return params; + return render_params_; } CTFontRef PlatformFontIOS::GetCTFont() const { @@ -159,6 +157,13 @@ ascent_ = ceil(font.ascender); cap_height_ = ceil(font.capHeight); average_width_ = [@"x" cr_sizeWithFont:font].width; + + FontRenderParamsQuery query; + query.families.push_back(font_name_); + query.pixel_size = font_size_; + query.style = style_; + query.weight = weight_; + render_params_ = gfx::GetFontRenderParams(query, nullptr); } ////////////////////////////////////////////////////////////////////////////////
diff --git a/ui/views/controls/menu/menu_item_view_unittest.cc b/ui/views/controls/menu/menu_item_view_unittest.cc index 5eaee797..59ed629 100644 --- a/ui/views/controls/menu/menu_item_view_unittest.cc +++ b/ui/views/controls/menu/menu_item_view_unittest.cc
@@ -251,8 +251,8 @@ // Test a title which is between the min and max allowed widths. gfx::Size item2_size = AppendItemAndGetSize(2, u"Item2 bigger than min less than max"); - EXPECT_GT(item2_size.width(), min_menu_width); - EXPECT_LT(item2_size.width(), max_menu_width); + EXPECT_GE(item2_size.width(), min_menu_width); + EXPECT_LE(item2_size.width(), max_menu_width); // Test a title which is longer than the max touchable menu width. gfx::Size item3_size =
diff --git a/ui/views/controls/textarea/textarea_unittest.cc b/ui/views/controls/textarea/textarea_unittest.cc index f50a7f8..b13174c 100644 --- a/ui/views/controls/textarea/textarea_unittest.cc +++ b/ui/views/controls/textarea/textarea_unittest.cc
@@ -12,9 +12,12 @@ #include "base/memory/raw_ptr.h" #include "base/strings/stringprintf.h" #include "base/strings/utf_string_conversions.h" +#include "base/test/scoped_feature_list.h" #include "build/build_config.h" +#include "ui/base/ui_base_features.h" #include "ui/events/event.h" #include "ui/gfx/render_text.h" +#include "ui/gfx/render_text_test_api.h" #include "ui/strings/grit/ui_strings.h" #include "ui/views/controls/textfield/textfield_test_api.h" #include "ui/views/controls/textfield/textfield_unittest.h" @@ -41,6 +44,10 @@ // TextfieldTest: void SetUp() override { + scoped_feature_list_.InitWithFeatures( + /*enabled_features=*/{::features::kTouchTextEditingRedesign}, + /*disabled_features=*/{}); + TextfieldTest::SetUp(); ASSERT_FALSE(textarea_); @@ -79,6 +86,7 @@ } raw_ptr<Textarea> textarea_ = nullptr; + base::test::ScopedFeatureList scoped_feature_list_; }; } // namespace @@ -300,4 +308,54 @@ EXPECT_EQ(kText.size(), textarea_->GetCursorPosition()); } +TEST_F(TextareaTest, MoveRangeSelectionExtentExpandByWord) { + gfx::test::RenderTextTestApi render_text_test_api(test_api_->GetRenderText()); + constexpr int kGlyphHeight = 10; + render_text_test_api.SetGlyphHeight(kGlyphHeight); + textarea_->SetText(u"a textarea\nwith multiline text"); + const int kFirstLineMiddleY = GetCursorYForTesting() + kGlyphHeight / 2; + const int kSecondLineMiddleY = kFirstLineMiddleY + kGlyphHeight; + textarea_->SelectBetweenCoordinates( + gfx::Point(GetCursorPositionX(2), kFirstLineMiddleY), + gfx::Point(GetCursorPositionX(3), kFirstLineMiddleY)); + + // Expand the selection. The end of the selection should move to the nearest + // word boundary. + textarea_->MoveRangeSelectionExtent( + gfx::Point(GetCursorPositionX(22), kSecondLineMiddleY)); + gfx::Range range; + textarea_->GetEditableSelectionRange(&range); + EXPECT_EQ(range, gfx::Range(2, 25)); + EXPECT_EQ(textarea_->GetSelectedText(), u"textarea\nwith multiline"); + + // Shrink then expand the selection again. + textarea_->MoveRangeSelectionExtent( + gfx::Point(GetCursorPositionX(7), kFirstLineMiddleY)); + textarea_->MoveRangeSelectionExtent( + gfx::Point(GetCursorPositionX(29), kSecondLineMiddleY)); + textarea_->GetEditableSelectionRange(&range); + EXPECT_EQ(range, gfx::Range(2, 30)); + EXPECT_EQ(textarea_->GetSelectedText(), u"textarea\nwith multiline text"); +} + +TEST_F(TextareaTest, MoveRangeSelectionExtentShrinkByCharacter) { + gfx::test::RenderTextTestApi render_text_test_api(test_api_->GetRenderText()); + constexpr int kGlyphHeight = 10; + render_text_test_api.SetGlyphHeight(kGlyphHeight); + textarea_->SetText(u"a textarea\nwith multiline text"); + const int kFirstLineMiddleY = GetCursorYForTesting() + kGlyphHeight / 2; + const int kSecondLineMiddleY = kFirstLineMiddleY + kGlyphHeight; + textarea_->SelectBetweenCoordinates( + gfx::Point(GetCursorPositionX(2), kFirstLineMiddleY), + gfx::Point(GetCursorPositionX(25), kSecondLineMiddleY)); + + // Shrink the selection. + textarea_->MoveRangeSelectionExtent( + gfx::Point(GetCursorPositionX(6), kFirstLineMiddleY)); + gfx::Range range; + textarea_->GetEditableSelectionRange(&range); + EXPECT_EQ(range, gfx::Range(2, 6)); + EXPECT_EQ(textarea_->GetSelectedText(), u"text"); +} + } // namespace views
diff --git a/ui/views/controls/textfield/textfield.cc b/ui/views/controls/textfield/textfield.cc index e5daeb5..0f12a889 100644 --- a/ui/views/controls/textfield/textfield.cc +++ b/ui/views/controls/textfield/textfield.cc
@@ -1281,64 +1281,114 @@ return; } - gfx::SelectionModel new_extent_caret = - GetRenderText()->FindCursorPosition(extent); - size_t new_extent_pos = new_extent_caret.caret_pos(); - size_t extent_pos = extent_caret_.caret_pos(); - if (new_extent_pos == extent_pos) { + gfx::RenderText* render_text = GetRenderText(); + if (!::features::IsTouchTextEditingRedesignEnabled()) { + gfx::SelectionModel base_caret = + render_text->GetSelectionModelForSelectionStart(); + gfx::SelectionModel extent_caret = render_text->FindCursorPosition(extent); + gfx::SelectionModel selection_model( + gfx::Range(base_caret.caret_pos(), extent_caret.caret_pos()), + extent_caret.caret_affinity()); + + OnBeforeUserAction(); + SelectSelectionModel(selection_model); + OnAfterUserAction(); return; } - gfx::SelectionModel base_caret = - GetRenderText()->GetSelectionModelForSelectionStart(); - size_t base_pos = base_caret.caret_pos(); - size_t end_pos = new_extent_pos; - gfx::LogicalCursorDirection cursor_direction = - new_extent_pos > base_pos ? gfx::CURSOR_FORWARD : gfx::CURSOR_BACKWARD; + const gfx::Range selection = GetSelectedRange(); + const gfx::SelectionModel cursor_position_at_old_extent = + render_text->FindCursorPosition(selection_extent_); + const gfx::SelectionModel cursor_position_at_new_extent = + render_text->FindCursorPosition(extent); - bool selection_shrinking = cursor_direction == gfx::CURSOR_FORWARD - ? new_extent_pos < extent_pos - : new_extent_pos > extent_pos; - - gfx::Range word_range = - GetRenderText()->ExpandRangeToWordBoundary(gfx::Range(extent_pos)); - bool extent_moved_past_next_word_boundary = - (cursor_direction == gfx::CURSOR_BACKWARD && - new_extent_pos <= word_range.start()) || - (cursor_direction == gfx::CURSOR_FORWARD && - new_extent_pos >= word_range.end()); - - if (::features::IsTouchTextEditingRedesignEnabled()) { - if (selection_shrinking) { - break_type_ = gfx::CHARACTER_BREAK; - } else if (extent_moved_past_next_word_boundary) { - // Switch to using word breaks only after the selection has expanded past - // a word boundary. This ensures that the selection can be adjusted by - // character when adjusting within a word after the selection has shrunk. - break_type_ = gfx::WORD_BREAK; + if (render_text->GetLineContainingCaret(cursor_position_at_old_extent) != + render_text->GetLineContainingCaret(cursor_position_at_new_extent)) { + // Reset the offset if a line change has occurred. + extent_offset_x_ = 0; + } else { + // Otherwise, if the extent has moved in the direction of the offset, reduce + // the amount of offset. + const int dx = extent.x() - selection_extent_.x(); + if (extent_offset_x_ > 0 && dx > 0) { + extent_offset_x_ = std::max(0, extent_offset_x_ - dx); + } else if (extent_offset_x_ < 0 && dx < 0) { + extent_offset_x_ = std::min(0, extent_offset_x_ - dx); } } + const gfx::Point old_extent_with_offset = + selection_extent_ + gfx::Vector2d(extent_offset_x_, 0); + const size_t caret_pos_at_old_extent_with_offset = + render_text->FindCursorPosition(old_extent_with_offset).caret_pos(); + gfx::Point new_extent_with_offset = + extent + gfx::Vector2d(extent_offset_x_, 0); + size_t caret_pos_at_new_extent_with_offset = + render_text->FindCursorPosition(new_extent_with_offset).caret_pos(); + + // Determine whether we need to switch between character and word + // granularity and update the offset again if necessary. + if (break_type_ == gfx::CHARACTER_BREAK) { + // Switch to word granularity only after the selection has expanded past a + // word boundary. This ensures that the selection can be adjusted by + // character within a word after the selection has shrunk. + const bool selection_expanding = + selection.is_reversed() ? caret_pos_at_new_extent_with_offset < + caret_pos_at_old_extent_with_offset + : caret_pos_at_new_extent_with_offset > + caret_pos_at_old_extent_with_offset; + const gfx::Range nearest_word_boundaries = + render_text->ExpandRangeToWordBoundary(selection); + const bool extent_moved_past_next_word_boundary = + caret_pos_at_new_extent_with_offset <= + nearest_word_boundaries.GetMin() || + caret_pos_at_new_extent_with_offset >= nearest_word_boundaries.GetMax(); + if (selection_expanding && extent_moved_past_next_word_boundary) { + break_type_ = gfx::WORD_BREAK; + extent_offset_x_ = 0; + } + } else { + const bool selection_shrinking = + selection.is_reversed() ? caret_pos_at_new_extent_with_offset > + caret_pos_at_old_extent_with_offset + : caret_pos_at_new_extent_with_offset < + caret_pos_at_old_extent_with_offset; + if (selection_shrinking) { + break_type_ = gfx::CHARACTER_BREAK; + const gfx::Rect cursor_bounds = + render_text->GetCursorBounds(GetSelectionModel(), true); + extent_offset_x_ = + cursor_bounds.CenterPoint().x() - selection_extent_.x(); + } + } + selection_extent_ = extent; + new_extent_with_offset = extent + gfx::Vector2d(extent_offset_x_, 0); + caret_pos_at_new_extent_with_offset = + render_text->FindCursorPosition(new_extent_with_offset).caret_pos(); + + size_t end = caret_pos_at_new_extent_with_offset; if (break_type_ == gfx::WORD_BREAK) { - // Compute the closest word boundary to the new extent position. - gfx::Range new_word_range = - GetRenderText()->ExpandRangeToWordBoundary(gfx::Range(new_extent_pos)); - DCHECK(new_extent_pos >= new_word_range.start() && - new_extent_pos <= new_word_range.end()); - end_pos = new_extent_pos - new_word_range.start() < - new_word_range.end() - new_extent_pos - ? new_word_range.start() - : new_word_range.end(); + // Move the selection end to the nearest word boundary. + const gfx::Range nearest_word_boundaries = + render_text->ExpandRangeToWordBoundary(gfx::Range(end)); + DCHECK(end >= nearest_word_boundaries.start() && + end <= nearest_word_boundaries.end()); + end = end - nearest_word_boundaries.start() < + nearest_word_boundaries.end() - end + ? nearest_word_boundaries.start() + : nearest_word_boundaries.end(); + } + if (end == selection.end()) { + return; } - gfx::SelectionModel selection(gfx::Range(base_pos, end_pos), - cursor_direction); + const size_t start = selection.start(); + const gfx::LogicalCursorDirection affinity = + start > end ? gfx::CURSOR_FORWARD : gfx::CURSOR_BACKWARD; OnBeforeUserAction(); - SelectSelectionModel(selection); + SelectSelectionModel(gfx::SelectionModel(gfx::Range(start, end), affinity)); OnAfterUserAction(); - - extent_caret_ = new_extent_caret; } void Textfield::SelectBetweenCoordinates(const gfx::Point& base, @@ -1358,7 +1408,8 @@ SelectSelectionModel(selection); OnAfterUserAction(); - extent_caret_ = extent_caret; + selection_extent_ = extent; + extent_offset_x_ = 0; break_type_ = gfx::CHARACTER_BREAK; }
diff --git a/ui/views/controls/textfield/textfield.h b/ui/views/controls/textfield/textfield.h index 55eb4f9b..7348a88 100644 --- a/ui/views/controls/textfield/textfield.h +++ b/ui/views/controls/textfield/textfield.h
@@ -779,19 +779,21 @@ // Tracks the selection extent, which is used to determine the logical end of // the selection. Roughly, this corresponds to the last drag position of the - // touch handle used to update the selection range. Note that the extent may - // be different to the logical end of the selection due to "expand by word, - // shrink by character" behaviour, in which the selection end can move to the - // next word boundary from the extent when expanding. - gfx::SelectionModel extent_caret_; + // touch handle or scroll gesture used to update the selection range. + gfx::Point selection_extent_; - // Break type which selection endpoints can be moved to when updating the - // selection extent. For "expand by word, shrink by character" behaviour, the - // break type is set to WORD_BREAK if the selection has expanded past the - // current word boundary and back to CHARACTER_BREAK if the selection is - // shrinking. + // Specifies granularity of selection extent updates, i.e. the break type + // where we can place the end of the selection when the extent is moved. For + // "expand by word, shrink by character" behaviour, the break type is set to + // WORD_BREAK if the selection has expanded past the current word boundary and + // back to CHARACTER_BREAK if the selection is shrinking. gfx::BreakType break_type_ = gfx::CHARACTER_BREAK; + // The horizontal offset applied to selection extent when adjusting the + // selection. We apply this offset to smoothen the movement of the end of the + // selection after switching between word and character granularity. + int extent_offset_x_ = 0; + // Whether touch selection handles should be shown once the current scroll // sequence ends. Handles should be shown if touch editing handles were hidden // while scrolling or if part of the scroll sequence was used for cursor
diff --git a/ui/views/controls/textfield/textfield_unittest.cc b/ui/views/controls/textfield/textfield_unittest.cc index 6080576..d1e27b265 100644 --- a/ui/views/controls/textfield/textfield_unittest.cc +++ b/ui/views/controls/textfield/textfield_unittest.cc
@@ -4417,42 +4417,29 @@ /*disabled_features=*/{}); InitTextfield(); - textfield_->SetText(u"hello world"); + textfield_->SetText(u"some textfield text"); const int cursor_y = GetCursorYForTesting(); - gfx::Range range; - textfield_->SelectBetweenCoordinates( gfx::Point(GetCursorPositionX(2), cursor_y), gfx::Point(GetCursorPositionX(3), cursor_y)); - textfield_->MoveRangeSelectionExtent( - gfx::Point(GetCursorPositionX(9), cursor_y)); - textfield_->GetEditableSelectionRange(&range); - EXPECT_EQ(range, gfx::Range(2, 11)); - EXPECT_EQ(textfield_->GetSelectedText(), u"llo world"); + // Expand the selection. The end of the selection should move to the nearest + // word boundary. textfield_->MoveRangeSelectionExtent( - gfx::Point(GetCursorPositionX(10), cursor_y)); + gfx::Point(GetCursorPositionX(11), cursor_y)); + gfx::Range range; textfield_->GetEditableSelectionRange(&range); - EXPECT_EQ(range, gfx::Range(2, 11)); - EXPECT_EQ(textfield_->GetSelectedText(), u"llo world"); + EXPECT_EQ(range, gfx::Range(2, 14)); + EXPECT_EQ(textfield_->GetSelectedText(), u"me textfield"); + // Shrink then expand the selection again. textfield_->MoveRangeSelectionExtent( - gfx::Point(GetCursorPositionX(5), cursor_y)); - textfield_->GetEditableSelectionRange(&range); - EXPECT_EQ(range, gfx::Range(2, 5)); - EXPECT_EQ(textfield_->GetSelectedText(), u"llo"); - + gfx::Point(GetCursorPositionX(8), cursor_y)); textfield_->MoveRangeSelectionExtent( - gfx::Point(GetCursorPositionX(7), cursor_y)); + gfx::Point(GetCursorPositionX(18), cursor_y)); textfield_->GetEditableSelectionRange(&range); - EXPECT_EQ(range, gfx::Range(2, 6)); - EXPECT_EQ(textfield_->GetSelectedText(), u"llo "); - - textfield_->MoveRangeSelectionExtent( - gfx::Point(GetCursorPositionX(9), cursor_y)); - textfield_->GetEditableSelectionRange(&range); - EXPECT_EQ(range, gfx::Range(2, 11)); - EXPECT_EQ(textfield_->GetSelectedText(), u"llo world"); + EXPECT_EQ(range, gfx::Range(2, 19)); + EXPECT_EQ(textfield_->GetSelectedText(), u"me textfield text"); } TEST_F(TextfieldTest, MoveRangeSelectionExtentShrinkByCharacter) { @@ -4462,32 +4449,59 @@ /*disabled_features=*/{}); InitTextfield(); - textfield_->SetText(u"hello world"); + textfield_->SetText(u"some textfield text"); const int cursor_y = GetCursorYForTesting(); - gfx::Range range; + textfield_->SelectBetweenCoordinates( + gfx::Point(GetCursorPositionX(2), cursor_y), + gfx::Point(GetCursorPositionX(12), cursor_y)); + // Shrink the selection. + textfield_->MoveRangeSelectionExtent( + gfx::Point(GetCursorPositionX(11), cursor_y)); + gfx::Range range; + textfield_->GetEditableSelectionRange(&range); + EXPECT_EQ(range, gfx::Range(2, 11)); + EXPECT_EQ(textfield_->GetSelectedText(), u"me textfi"); +} + +TEST_F(TextfieldTest, MoveRangeSelectionExtentOffset) { + base::test::ScopedFeatureList feature_list; + feature_list.InitWithFeatures( + /*enabled_features=*/{::features::kTouchTextEditingRedesign}, + /*disabled_features=*/{}); + + InitTextfield(); + textfield_->SetText(u"some textfield text"); + const int cursor_y = GetCursorYForTesting(); textfield_->SelectBetweenCoordinates( gfx::Point(GetCursorPositionX(2), cursor_y), gfx::Point(GetCursorPositionX(3), cursor_y)); + + // Expand the selection. The end of the selection should move to the nearest + // word boundary. textfield_->MoveRangeSelectionExtent( gfx::Point(GetCursorPositionX(11), cursor_y)); + gfx::Range range; textfield_->GetEditableSelectionRange(&range); - EXPECT_EQ(range, gfx::Range(2, 11)); - EXPECT_EQ(textfield_->GetSelectedText(), u"llo world"); + EXPECT_EQ(range, gfx::Range(2, 14)); + EXPECT_EQ(textfield_->GetSelectedText(), u"me textfield"); + // Shrink the selection. The offset between the selection extent and the end + // of the selection should be preserved. + const int offset = GetCursorPositionX(14) - GetCursorPositionX(11); textfield_->MoveRangeSelectionExtent( - gfx::Point(GetCursorPositionX(9), cursor_y)); + gfx::Point(GetCursorPositionX(12) - offset, cursor_y)); textfield_->GetEditableSelectionRange(&range); - EXPECT_EQ(range, gfx::Range(2, 9)); - EXPECT_EQ(textfield_->GetSelectedText(), u"llo wor"); + EXPECT_EQ(range, gfx::Range(2, 12)); + EXPECT_EQ(textfield_->GetSelectedText(), u"me textfie"); - // Check that selection can be adjusted by character within a word after the - // selection has shrunk. + // Move the extent past the end of the selection. The offset should be reset + // and the selection should expand. textfield_->MoveRangeSelectionExtent( - gfx::Point(GetCursorPositionX(10), cursor_y)); + gfx::Point(GetCursorPositionX(13), cursor_y)); textfield_->GetEditableSelectionRange(&range); - EXPECT_EQ(range, gfx::Range(2, 10)); - EXPECT_EQ(textfield_->GetSelectedText(), u"llo worl"); + EXPECT_EQ(range, gfx::Range(2, 13)); + EXPECT_EQ(textfield_->GetSelectedText(), u"me textfiel"); } TEST_F(TextfieldTest, SelectBetweenCoordinates) {
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 513a6b1..4e04527 100644 --- a/ui/webui/resources/cr_elements/cr_dialog/cr_dialog.html +++ b/ui/webui/resources/cr_elements/cr_dialog/cr_dialog.html
@@ -79,13 +79,15 @@ padding-top: var(--cr-dialog-title-slot-padding-top, 20px); } + /* Note that if the padding is non-uniform and the button-container + * border is visible, then the buttons will appear off-center. */ :host ::slotted([slot=button-container]) { display: flex; justify-content: flex-end; 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: 24px; + padding-top: 16px; } :host ::slotted([slot=footer]) {